How to iterate through a dropdown menu values and extract data

Hello and thanks in advance for your help :slight_smile:

I'm a newbie using the tool and trying to loop through a dropdown menu of the product size in order to extract informations.

I followed the tutorial video on the learning part of the website but couldn't make it work on my targeted website.

I'm trying to loop through the size of the product in the dropdown menu (ex : 2ml, 5ml, 10ml) and then click on it to get the info to be extracted.

Any help is appreciated.

cheers

Url: https://www.parfumsplit.com/product-page/maison-francis-kurkdjian-oud

Sitemap:
{"_id":"perfumsplit-ecommerce","startUrl":["https://www.parfumsplit.com/"],"selectors":[{"id":"perfums-link","linkType":"linkFromHref","multiple":true,"parentSelectors":["_root"],"selector":"#comp-kowqkb6y1 a.UiHgGh","type":"SelectorLink"},{"id":"product-link","linkType":"linkFromHref","multiple":true,"parentSelectors":["perfums-link"],"selector":".t1Z_7C a.JPDEZd","type":"SelectorLink"},{"clickActionType":"real","clickElementSelector":"button[data-hook='dropdown-base']","clickElementUniquenessType":"uniqueCSSSelector","clickType":"clickOnce","delay":2000,"discardInitialElements":"do-not-discard","id":"size-dropdown-list","multiple":true,"parentSelectors":["product-link"],"selector":"div[data-hook='options-dropdown']","type":"SelectorElementClick"},{"id":"brand-and-name","multiple":false,"parentSelectors":["product-link"],"regex":"","selector":"h1.OXQzmM","type":"SelectorText"},{"id":"starting-price","multiple":false,"parentSelectors":["product-link"],"regex":"","selector":".Vn31tB span[data-hook='price-range-from']","type":"SelectorText"},{"clickActionType":"real","clickElementSelector":"div[id^='dropdown-options-container_']","clickElementUniquenessType":"uniqueText","clickType":"clickOnce","delay":2000,"discardInitialElements":"do-not-discard","id":"size-link","multiple":true,"parentSelectors":["size-dropdown-list"],"selector":"div[id^='dropdown-options-container_']","type":"SelectorElementClick"}]}

Hi,

This is a bit tricky given that the variant elements only appear in the HTML after the dropdown is selected.

In this situation, a separate selector has to be created for each variant using the :nth-of-type() jQuery selector.

Please see the example sitemap below:

{"_id":"perfumsplit-ecommerce","startUrl":["https://www.parfumsplit.com/product-page/maison-francis-kurkdjian-oud"],"selectors":[{"id":"brand-and-name","multiple":false,"parentSelectors":["size-link1","size-link2","size-click3"],"regex":"","selector":"[data-hook=\"product-title\"]","type":"SelectorText"},{"id":"price","multiple":false,"parentSelectors":["size-link1","size-link2","size-click3"],"regex":"","selector":"span[data-hook='formatted-primary-price']","type":"SelectorText"},{"clickActionType":"real","clickElementSelector":"[data-hook=\"dropdown-base\"]","clickElementUniquenessType":"uniqueCSSSelector","clickType":"clickOnce","delay":0,"discardInitialElements":"discard-when-click-element-exists","id":"size-dropdown-click1","multiple":false,"parentSelectors":["_root"],"selector":"body","type":"SelectorElementClick"},{"clickActionType":"real","clickElementSelector":"[data-hook=\"option\"]:nth-of-type(1)","clickElementUniquenessType":"uniqueCSSSelector","clickType":"clickOnce","delay":0,"discardInitialElements":"discard-when-click-element-exists","id":"size-link1","multiple":true,"parentSelectors":["_root"],"selector":"body","type":"SelectorElementClick"},{"id":"size","multiple":false,"parentSelectors":["size-link1","size-link2","size-click3"],"regex":"","selector":"[data-hook=\"dropdown-base-text\"]","type":"SelectorText"},{"clickActionType":"real","clickElementSelector":"[data-hook=\"dropdown-base\"]","clickElementUniquenessType":"uniqueCSSSelector","clickType":"clickOnce","delay":0,"discardInitialElements":"discard-when-click-element-exists","id":"size-dropdown-click2","multiple":false,"parentSelectors":["_root"],"selector":"body","type":"SelectorElementClick"},{"clickActionType":"real","clickElementSelector":"[data-hook=\"option\"]:nth-of-type(2)","clickElementUniquenessType":"uniqueCSSSelector","clickType":"clickOnce","delay":0,"discardInitialElements":"discard-when-click-element-exists","id":"size-link2","multiple":true,"parentSelectors":["_root"],"selector":"body","type":"SelectorElementClick"},{"clickActionType":"real","clickElementSelector":"[data-hook=\"dropdown-base\"]","clickElementUniquenessType":"uniqueCSSSelector","clickType":"clickOnce","delay":0,"discardInitialElements":"discard-when-click-element-exists","id":"size-dropdown-click3","multiple":false,"parentSelectors":["_root"],"selector":"body","type":"SelectorElementClick"},{"clickActionType":"real","clickElementSelector":"[data-hook=\"option\"]:nth-of-type(3)","clickElementUniquenessType":"uniqueCSSSelector","clickType":"clickOnce","delay":0,"discardInitialElements":"discard-when-click-element-exists","id":"size-click3","multiple":true,"parentSelectors":["_root"],"selector":"body","type":"SelectorElementClick"}]}