Find Children - Drop down menu's

I’ve been trying to gather the options available in various drop down menu’s.
I have used the Find Children on the drop down element, then wanted to do a write line to just output the options to the output window.
so For Each item in Status (FindChildren Variable IEnumerable)
WriteLine item.tostring

but it outputs “UiPath.Core.UiElement” rather than the actual option that the drop down contained"

Any help greatly appreciatedFndChildren.xaml (7.6 KB)

Try to access attribute of UiElement such as name, title, aaname etc… It will work.

Eg:
item.Get(“name”).ToString

.Get isn’t available all ive got is gettype

impretty sure its to do with the TypeArgument on the For Loop but not sure what I should be using.

Hello,

For each loop element type have to be “UiPath.Core.UiElement”
Inside loop, use the get attribute activity to get the option value you need, check in uiexplore for which attribute to get , usually it will be aaname or name or value

Thanks
Meg

Please refer this link.

Get Attribute of UiElement

Make sure to have TypeArgument as UiPath.Core.UiElement.

up2

Ok im getting closer :slight_smile:

but its only iterating through what the drop down says initially not the whole list.
FndChildren.xaml (8.9 KB)

Hi @Jersey_Practical_Sho

FndChildren.xaml (9.1 KB)

See this now, some changes, selector for Find Children is updated and for Get Attribute activity you should have passed the item of for each loop not a selector.

Thanks,
Prankur

7 Likes

Awesome Thankyou, I have now recreated your in mine :slight_smile:

1 Like

This topic was automatically closed 3 days after the last reply. New replies are no longer allowed.