Find Children using Field name

Hi All,

I have dropdown field named “Gender” in UI with values Male and Female. Now this field can be there at any place in UI i.e it’s placement may change any time. Now I want to read the dropdown values of it and i am doing it with Find children and it’s working fine. My doubt here is when I indicated that dropdown using UI explorer I am not finding any property like aaname is Gender. I am only able to see some property like id=customObjectView_customPropertySheet_ddl_Prop_234567_10359. I don’t want to use this id for identifing because those numbers are changing.

Any idea on how to use it other than using id. I want to identify it will field name actually. So that it will be accurate

Thanks

1 Like

Hi,

Unfortunately, as web selector of UiPath doesn’t support selected item of Select element, we need to use GetAttribute activty, too , as the following, for example.

Or, if we set AA as UiFramework when indicate element (press F4), we can get selected item as text attribute of selector. However it’s not very good to handle web element, i think.

Regards,

Hey @bharathkumar.yerra1

For this scenario,

  1. There is a chance we can use the selector with proper unique attribute but if you can please show us the selector in the Ui-Explorer

  2. Else you can use anchor base to find the Gender label and then use Find Children to get the values of the drop-down

Hope this helps

Thanks
#nK

Hi @Nithinkrishna

I already tried your 2nd point it’s showing Error as “Anchor based selectors are not supported in Selector Editor”

And also there are no unique attributes. Only unique attribute is id=customObjectView_customPropertySheet_ddl_Prop_234567_10359 , but numbers keeps changing

Thanks

1 Like

Hey @bharathkumar.yerra1

Sorry at which part you are getting this error please…

Kindly show some screenshots ?

  • Ui Element appearance on the screen
  • The way how you tried it

Thanks
#nK

Hey @bharathkumar.yerra1

For this did you check the property explorer as well in UiExplorer or else we can also dig deep into the chrome dev tools to find in the HTML

Thanks
#nK

Hi @Nithinkrishna

This Error appears in Find Children → Properties Panel ->Selector Expression Editor - > Code in Expression Editor is

property Explorer is also checked i couldn’t find anything unique for Gender Attribute like aaname=gender

1 Like

I hope you dragged a new Find Children activity and indicated the element again after setting up the anchor right ?

Yes right. Find Element is towards left in Anchor base and Find children is right side

1 Like

Hey @bharathkumar.yerra1

Please find a demo here,

nmnithinkrishna_FindChildrenDropdownAnchor_01Apr2022_2318.zip (2.7 KB)

Hope this helps

Thanks
#nK

@bharathkumar.yerra1 Why don’t you try using wild card in the selector

id=customObjectView_customPropertySheet_ddl_Prop*

Hi @ushu

I am not using wild card because there are many Dropdown values in UI.

1 Like

Hey @bharathkumar.yerra1

Did the issue still exist ?

Thanks
#nK