Use data from one selector in another dropdown selector

Is it possible to use data which has been scraped by one selector later down the selector chain in a selector e. g. to choose a specific dropdown option?

Example:

I want to scrape a specific product variation and I pass the necessary select value already to a previous selector. Can I know somehow use this value reference in the selector like:

select option:contains([selector-value])

@vibedesign Hello, could you, please, explain a practical use case for this?

Like mentioned above, I want to scrape specific product variations which need to be selected from a dropdown. My idea was to provide the needed select value together with the start url so the scraper could know from the provided value which option to select.

But I have already a different solution, so I don't really need this anymore. I still think this could be a very useful feature (if it exists).

@vibedesign Hello, does this require clicking through the dropdown options? If so - this can be achieved by using an 'Element click' selector.

Learn more: Web Scraper << How to >> video tutorials

Yes, but how can I input a previously scraped value in there?

select option:contains([selector-value?])

@vibedesign What's the purpose of using a previously scraped value? To target specific dropdown options you can use the jQuery selectors :has() or :contains()

Here's a sitemap example:

{"_id":"webscraper-io","startUrl":["https://webscraper.io/test-sites/e-commerce/allinone/product/505"],"selectors":[{"clickElementSelector":"select[aria-label=\"color\"] option:contains(\"White\")","clickElementUniquenessType":"uniqueCSSSelector","clickType":"clickOnce","delay":1000,"discardInitialElements":"discard-when-click-element-exists","id":"select-white","multiple":true,"parentSelectors":["_root"],"selector":"body","type":"SelectorElementClick"},{"id":"color","multiple":false,"parentSelectors":["select-white"],"regex":"","selector":"select[aria-label=\"color\"] option:checked","type":"SelectorText"}]}

Yes, I know but I need to specify a different selector for each start url so this needs to be an automated value, not a fixed one, as it is different for each product.

I use multiple start urls that each define a single product I need to scrape. So if there is no option to insert a previously scraped value, than my use case doesn't work.

But like I mentioned, I already have a different approach which works for me, so I just wanted to ask if this is a feature in general. If not, it's all good. Thank you for your efforts!