Description:
Web Scraper adds "selected" attribute to option element that it clicked on so the selected value can be scraped by setting "option[selected]" CSS selector.
Sitemap:
{"_id":"web-scraper-dropdown-variation","startUrl":["https://webscraper.io/test-sites/e-commerce/ajax/product/10"],"selectors":[{"clickActionType":"real","clickElementSelector":"select option","clickElementUniquenessType":"uniqueText","clickType":"clickOnce","delay":0,"discardInitialElements":"discard-when-click-element-exists","id":"dropdown-click","multiple":true,"parentSelectors":["_root"],"selector":"div.wrapper","type":"SelectorElementClick"},{"id":"name","multiple":false,"parentSelectors":["dropdown-click"],"regex":"","selector":"h4.title","type":"SelectorText"},{"id":"color","multiple":false,"parentSelectors":["dropdown-click"],"regex":"","selector":"select option[selected]","type":"SelectorText"}]}