Getting selected text from dropdown

Hi guys,

I'm trying to get the selected text from a dropdown using option[selected] but it's not working somehow.
Anyone know what might be wrong?

Here's an example:
Url: Baju Koko BHS Cosmo Coklat 02 – Sarung Indonesia

Sitemap:
{"_id":"test-combo","startUrl":["https://sarungindonesia.co.id/product/baju-koko-bhs-cosmo-coklat-02/"],"selectors":[{"clickElementSelector":"select#pa_size option","clickElementUniquenessType":"uniqueCSSSelector","clickType":"clickOnce","delay":1000,"discardInitialElements":"do-not-discard","id":"prod-wrapper","multiple":true,"parentSelectors":["_root"],"selector":"body","type":"SelectorElementClick"},{"id":"size","multiple":false,"parentSelectors":["prod-wrapper"],"regex":"","selector":"select#pa_size option[selected]","type":"SelectorText"},{"id":"prod_name","multiple":false,"parentSelectors":["prod-wrapper"],"regex":"","selector":"h1.product-title","type":"SelectorText"}]}

@shadowrun Hi, to extract the active size option you can use the following 'Text' selector: select#pa_size option:checked

Example:

{"_id":"test-combo","startUrl":["https://sarungindonesia.co.id/product/baju-koko-bhs-cosmo-coklat-02/"],"selectors":[{"clickElementSelector":"select#pa_size option:not(:contains(\"Pilih sebuah opsi\"))","clickElementUniquenessType":"uniqueCSSSelector","clickType":"clickOnce","delay":1000,"discardInitialElements":"discard-when-click-element-exists","id":"prod-wrapper","multiple":true,"parentSelectors":["_root"],"selector":"body","type":"SelectorElementClick"},{"id":"size","multiple":false,"parentSelectors":["prod-wrapper"],"regex":"","selector":"select#pa_size option:checked","type":"SelectorText"},{"id":"prod_name","multiple":false,"parentSelectors":["prod-wrapper"],"regex":"","selector":"h1.product-title","type":"SelectorText"}]}

Learn more: Selectors | jQuery API Documentation

Ah.. thanks a lot @ViestursWS, it works beautifully. Didn't know we could use that on a dropdown.

Cheers.