Working on drop down lists

I am trying to select an item from drop down list using the data from csv file, my solution is throwing an exception saying:

Message: Cannot select item. It was not found among existing items.
TIP: Some combo-boxes delay load items until its dropdown is expanded. Try to simulate a click on control prior to selecting an item.

See that the data you are extracting from csv file is correct i.e. whether or not that same data exists in the drop down list.

Also, try to trim the data before passing to the select item activity. If it contains extra spaces then also could be chance of such error.

Thanks,
Rammohan B.

It is the same data and if possible can you tell me the procedure how to select an item from drop down list?

Thanks,
Lohitha

Yeah, I tried trimming the data before using it in select activity, but no use, i am getting the same error

You could try these steps:

  1. Hover/Click the combo box/drop down (Use Hover or click activity, whatever works for you)
  2. Use click activity to select an element inside Combo Box/drop down and change the selector to select the element that you are extracting from csv :slight_smile:
    Tell me if that works :slight_smile:
2 Likes

It worked. But any issue is, there are some items which are not available in the drop downlist, for that case how can I write an exception to just ignore if it doesn’t find the item in the list.

For the information, there is no possibility to just use the items only which are available in the list.

Thanks,
Lohitha

Did you tried using Try Catch?
Place the part of workflow which generates exception inside a tryblock and inside catch perform whatever activity you want to perform :slight_smile:

Trying that now :slight_smile: Will let you know after completing that.

1 Like

HI, Can you just give me an example. My work flow is initially hover through the list and select a particular item and then click the submit button, This procedure happens for couple of items based on number of rows in excel sheet. And the possibility is all the items in the excel sheet may not be in the list.

Hi @chintham,

A small condition should be implemented to check whether your item from the Excel sheet exists. The moment you try to click based on the invalid selector, UiPath will throw an exception.

In this case, I would suggest something like that:

  1. Hover over the list to activate available selectors
  2. Use activity Element Exists to check if your particular selector from Excel is available (this activity returns a boolean - True if it exists, False if not)
  3. Use that boolean variable in an IF statement to either click on a valid element or log an error message if it is not.
1 Like

bit3.xaml (10.3 KB)
Hi, Thanks for the suggestion, But is this how you told ? I am getting some errors. Can you please have a look at it and tell where it is going wrong.

Figured out what the issue is.

1 Like

I did for Page Down to scroll down the page but after that “Select” from drop down list cannot selected by extract data from csv. It is I need to put all the information under that drop down list at the selector?