Getting a list of all available items from a ComboBox

This one is driving me nuts folks!

I’m trying to get a list of all the items in this dropdown (Book)

If I use the activity “select item” UiPath pulls out all the items

but if I use get attribute or find children I get an error.
I took a look at some old posts (RPA Challenge 6) and it works fine (using “find children” using a web form) but this is slightly different because its a native application.

@Palaniyappan SOS :stuck_out_tongue:

find children activity is typically used for this

I’m having the same issue :expressionless:

If you want help, you’ll have to tell us more than that.

Hey, @postwick thanks for responding. I’m working with a old Windows app, 8 years old at least when we purchased it. It has a drop-down list and I want to be able to collect all the items in the list so that I can see if the item user is specifying in an Excel sheet is in the list of items in the drop-down. I tried using UI Explorer and I can see List and all the List Items but I have not had success with Find Children so I saw a post that said Select Item would return all the items in the list but have not had success with the either. Any help would be appreciated.

Then show me what you tried to do and I’ll show you how to correct it. Note that you’ll probably have to set Find Children to DESCENDANTS. The selector should be the pulldown and the filter should be set to only match the children you want (ie tag=‘option’ or something like that).

Hi @postwick I had thought I needed to grab the list if items in the dropdown in order figure own whether the item the user specified in the list of if it is in the list what’s its position in the list in order to figure out how to click it. But as it turns out I can use the Select Item activity and if the item is not there it will throw an error which I can handle with try/catch.

Thanks for offering to help.

Best regards,

1 Like

Yes, you found a better way to do it. One thing about that method, you should test trying to select an item you know doesn’t exist, without a Try/Catch, and see exactly which type of exception is thrown (there are many types). Then do your Catch specific to that exception type, so that other exceptions (like if it can’t find the pulldown) won’t be misinterpreted as meaning the item doesn’t exist in the pulldown.

Ah…excellent advice. Thanks again for your help.