How to select the first item in SelectItem?

Help Activities
activities, uiautomation, question

Dear all,
How to select the first item in Select Item? because the item is random in drop-down menu, I want to choose the first item in the drop-down menu. I use Select Item activities do it, there isn’t fix string, so I want to choose the first item, thanks a lot!

1 个赞

Hi @wang_amanda

Please give a try,

  1. Use find children activity and indicate the drop down, store the output in a variable fndChildrens (use ctr+k to create a variable in outputs panel).

image

  1. use get attribute activity and in activities drop-down select “aaname” and in properties Uielement give fndChildrens(0) and store the output in a variable name (getattrOutput)

  1. Use select item activity, indicate the dropdown and pass the getattrOutput in drop-down.

Thanks

3 个赞
Select the first Option in the Select item Activity

Bravo! thanks

@wang_amanda glad that helped, please mark the solution and close the thread so it may be useful to others in the future.

Thanks

@prasath_S I am a junior , How to close the thread?

Hi,

You can mark solution for the post by @prasath_S it will automatically close after some period. Thanks.

1 个赞

Thanks @kirankumar.mahanthi1 :slightly_smiling_face:
@wang_amanda yes if you mark the solution it will close automatically after 3 days

Hello Guys Can you please let me know how to mark solution in UI path forum? Thanks Ankur

Thanks

1 个赞

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