Capture Titles of Product Variations from a dropdown

I have followed the tutorials as best I can, and the drop down for product variations is a slightly different structure.

I have a selector which is an Element Click
cycling through options and i am either ending up with
Null 9.95
Null 10.25
Null 11.50

or I am getting

title 1 9.95
Title 1 10.25
Title 1 11.50
Title 2 9.95
Title 2 10.25
Title 2 11.50

Anyone want to tell me how I might capture the titles and prices of varations listed in this.

Hello @dynamodaveo

Something like this would work but there's no way to capture the selected option value because there is no indication in the code that it's active or unique when selected.

{"_id":"dropdown","startUrl":["https://holos.ie/product/this-is-more-range-samples/"],"selectors":[{"id":"click-1","type":"SelectorElementClick","parentSelectors":["_root"],"selector":"body:has(h1.entry-title)","multiple":true,"delay":2000,"clickElementSelector":"select option","clickType":"clickOnce","discardInitialElements":"discard","clickElementUniquenessType":"uniqueText"},{"id":"prices","type":"SelectorText","parentSelectors":["click-1"],"selector":".woocommerce-variation-price bdi","multiple":false,"regex":"","delay":0},{"id":"title","type":"SelectorText","parentSelectors":["click-1"],"selector":"div.woocommerce-variation-description","multiple":false,"regex":"","delay":0}]}

Actually, there is a jQuery selector just for this, :checked
So something like this:

{"_id":"forum-holos","startUrl":["https://holos.ie/product/this-is-more-range-samples/"],"selectors":[{"id":"Title","type":"SelectorText","parentSelectors":["_root"],"selector":"div > h1","multiple":false,"regex":""},{"id":"dropdowns","type":"SelectorElementClick","parentSelectors":["_root"],"selector":"div.elementor-jet-single-add-to-cart","multiple":true,"delay":"2250","clickElementSelector":"td.value select > option[class^='attach']","clickType":"clickOnce","discardInitialElements":"discard-when-click-element-exists","clickElementUniquenessType":"uniqueText"},{"id":"Variation Title","type":"SelectorText","parentSelectors":["dropdowns"],"selector":"td.value select > option:checked","multiple":false,"regex":""},{"id":"Price","type":"SelectorText","parentSelectors":["dropdowns"],"selector":"span.price","multiple":false,"regex":""}]}

Ref: Selectors | jQuery API Documentation

1 Like

That is 100% awesome.
Thank you both for helping.

The examples had [selected] but not :checked

thanks a mill