Check input with Select Item list

Hi guys,
Need some help here!

Is there any way that I could check if my input is in the Select Item list? let’s say if I have a 53g but 53g is not in the list, I will throw an error.

In this case, I have tried on Element Exist, but it won’t select on the single element let’s say 13g or 75g.
And then I tried get OCR text, but it says object reference not set to an instance.

Please note, the element in the drop-down is random, for the current item it’s 13g and 75g, but for the next item, it will be something else.


please help!
thanks ahead

1 Like


You can use the activity Select item

Mention the item 53Kg in the item text field. Robot will throw error if 53Kg not found in the list.

Yes but I want to check if it is in the drop down before the select Item activity.

Hi @jadepu2010,

I gave a try. Not sure if it is correct approach. This will work if you can select individual item from dropdown list while Data Scrapping… I tested it on below ACEM page only…

  1. Navigate to page on which dropdown is located
  2. In UiPath Studio, use Data Scrapping -
  3. When the web page is displayed hit F2 to get 5 seconds time to select the data for scrapping. In that time click arrow on dropdown list to populate the list.
  4. Select first item in the list for scrapping
  5. When asked for second item select the Second Item in the list.
  6. Finish the Data Scrapping process (if list has more than 100 items set the value to 0 in Data Scrapping wizard)
  7. Now you can use the Data Table created Using data scrapping to verify if the required item is in the Dropdown or not.

Please see the sample (12.6 KB)

I have done this before using Element Exists.

Instead of selecting the element, type it in manually into the Selector property:

You can also throw in a variable into the Selector so it looks for that option instead.

Let me know if that works for you!

Well, in my case, the drop down box doesn’t support data scraping

But I want to check if the item exists in the drop-down before it reaches select elements, this way I could skip the select activity and throw an error.

Yes, the Element Exists on the option tag will give you a true/false on if the select item exists. If true, do the select item activity and if false throw an error.


Can you please try using “GetAttribute” Activity using “innertext” Attribute.
Please check this (555.4 KB)

1 Like

I’m sorry, but could you please be more specific on what should I type in the selector? It does not specify the size of the product in the selector. The wildcard I used is to replace a series of numbers which has nothing to do with the size.


Thank you! It works!!


You are Welcome :grinning:

I’m glad you got it working! The method I was referring to was to look for tag=‘OPTION’ instead of ‘SELECT’, but there are many paths you can take.

1 Like

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