I cant find children to loop through dropdown menu

Hello
here a video whats going on…

i tried with for each
to catch all childrends with find elements to get them in a variable
unfortunally Im not able to do so because the items doesnt get cought. :frowning:

one thing is what they have in common is
the parent class
class=“ng-option ng-option-selected ng-star-inserted ng-option-marked”

although ich child has different unique id
with that indicating is an pain in the butt

click → find children
and /or
select item
select attribute
doesnt help me at all.

Hi @Dacapo ,

Have you tried select Item activity. This way you do not require to use loop and find children activity

Hello

thank you for your help

i have tried selct item but i get always error messages…

11.xaml: Value for a required activity argument 'Item' was not supplied.

@Dacapo

Try using get attribute and keep the property as “items”

Regards,

one moment im trying

well i have changed attribute it to innerhtml i get at least something now i have to figure it out how i can loop them through via for each. is that posible?

try using for each loop

Regards,

well i see that for loop is work but the listbox (dropdown menu) is not changing :-/

well guys
here is my final solution how i loop through each dropdown menu(actually list boxes.)

see attached video here

I have extracted each one as table and forwared it with for each row activity.

it works.

3 minor issues what needs to be fixed.

i cant use my computer anymore because it comes always in foreground we talking about hours
it is very slow even I have a fast computer

i tried to save my results as {variable}+“filename.xlsx” but this doesnt work.

who can help me with that?

You don’t indicate the options when doing “indicate element” for Find Children. You indicate the pulldown itself. The Find Children selector should indicate the pulldown itself.

Then in the filter of the Find Children put: "<webctrl tag='OPTION' />"

The filter makes it find all the OPTION children of the select box.

I often have to change the setting to FIND_DESCENDANTS but that shouldn’t be necessary as the OPTION elements are direct children of the SELECT element.

Hi Postwick,

thank you for your input I have tried this but the selector couldnt find it reliable because its dynamic.(always different id)

or could you please explain more?

this is how the source of one dropdown looks like

im still trying to find my childreens well i get all the time those options
Find Children ‘DIV’: Could not find the UI element corresponding to this selector:

The closest matches found are:

Find Children 'DIV': Could not find the UI element corresponding to this selector:
<webctrl class='ng-select-container ng-has-value' parentclass='checking-field ng-select ng-select-single ng-valid ng-select-bottom ng-touched ng-dirty' parentname='twoNaicsIndustries' tag='DIV'/>

The closest matches found are:
[96%] <webctrl class='ng-select-container ng-has-value' parentclass='checking-field ng-select ng-select-single ng-valid ng-select-bottom ng-touched ng-dirty ng-select-focused ng-select-opened' parentname='twoNaicsIndustries' tag='DIV'/>
[90%] <webctrl class='ng-select-container ng-has-value' parentclass='ng-select ng-select-single ng-select-clearable ng-select-bottom ng-touched ng-dirty ng-select-disabled' parentname='fourNaicsIndustries' tag='DIV'/>
[89%] <webctrl class='ng-select-container ng-has-value' parentclass='ng-select ng-select-single ng-select-clearable ng-select-bottom ng-touched ng-dirty ng-select-disabled' parentname='threeNaicsIndustries' tag='DIV'/>
[89%] <webctrl class='ng-select-container ng-has-value' parentclass='ng-select ng-select-single ng-select-clearable ng-select-bottom ng-touched ng-dirty ng-select-disabled' parentname='sixNaicsIndustries' tag='DIV'/>
[88%] <webctrl class='ng-select-container ng-has-value' parentclass='ng-select ng-select-single ng-select-clearable ng-select-bottom ng-touched ng-dirty ng-select-disabled' parentname='fiveNaicsIndustries' tag='DIV'/>
[86%] <webctrl class='ng-select-container ng-has-value' parentclass='ng-select ng-select-single ng-select-searchable ng-untouched ng-pristine ng-valid' parentname='industries' tag='DIV'/>
[81%] <webctrl class='ng-select-container ng-has-value' parentclass='checking-field ng-select ng-select-single ng-valid ng-select-bottom ng-touched ng-dirty' parentname='selectedSearchDropdown' tag='DIV'/>
[78%] <webctrl class='ng-select-container ng-has-value' parentclass='ng-select ng-select-single ng-select-searchable ng-untouched ng-pristine ng-valid' parentname='searchZipCriteria' tag='DIV'/>
[77%] <webctrl class='ng-value-container' parentclass='ng-select-container ng-has-value' parentname='twoNaicsIndustries' tag='DIV'/>
[75%] <webctrl class='ng-select-container ng-has-value' parentclass='checking-field ng-select ng-select-single ng-select-searchable ng-select-clearable ng-untouched ng-pristine ng-select-disabled' parentname='city' tag='DIV'/>

i have tried each single one and get the same over and over :frowning: I get frustrated :-/

You have to edit the selector. This is common and normal.

Use other attributes that don’t change. Use UI Explorer to see all its properties, not Inspect.

And you don’t want the DIV, you want the SELECT (assuming that’s what the UI element is).

Also, if you have to use the DIV then make sure to set the Find Children to descendants so it’ll go deeper than just immediate children. And if it’s a DIV not a SELECT then the children may not be tag=‘OPTION’ but you can figure that out by clearing the filter and seeing everything the Find Children returns.

Is this a public web page I can access? If so what’s the URL?