Wildcard in select item activity

Hello,

I am trying to select an item from a drop-down list but i only have a few letters on an excel file that matches with the drop-down list.

For example, my excel sheet contains the letters MAN, but in the drop-down list it is “United Kingdom - Manchester City (MAN)”.

Is there any way to integrate a wildcard for this problem? I tried using wildcard in selector but it doesn’t show up when I select the dropdown list.

Thank you!

Hi,

Thought from my side. Did you tried select item activity in uipath to select vale from drop-down you have to input your name try giving your code alone and see whether it is clicking correctly or not. And also refer the below thread for your reference.

image
I tried this but got this error. Selecting an item from the already generated dropdown list works though.

Source: Select Item ‘From’

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.

Exception Type: UiPath.UIAutomationNext.Exceptions.UiAutomationException

we do try following two approaches:

  • click on drop drown to expand it
  • select item with the help of a dynamic selector

Or

  • read out the dropdown values (find children, other aproaches)
  • calculate the corresponding dropdown item related to the excel value
  • use the calculated value for the dropdown item selection

I can’t use the selector for the drop-down values. Finding the children/getting attributes also don’t help. I can’t seem to think of any way to go through with this.
Thank you

May we ask you for the reason, why you cannot use these options?

Done in a lot of automation projects running stable in production it was applied sucessfully.

image
Even when I do hoverable item selector, on the selector items I can’t put the actual option value as a selector.

we would not recommend to approach in this way. It looks like a web application. Dropdowns in webpages can be one type of variations:

  • select/option elements
  • textfield/datalist
  • webkit constructs

In a first analysis phase it is to find out, which type is present / is this dropdown made of.

For this use the browser f12 webtools along with the UiExplorer and a more deep analysis. E.g search for the elements forming the dropdown and search for elements representing an dropedown item.

1 Like

It’s a select/option element

then give a try on find children as similar it was done here:

getting all values:
arrValues | String( ) - String Array =
uiLists.Select(Function (x) x.Get(“innertext”).ToString).toArray

After writing the expression… how do I assign the filtered value to the new variable? What type does it need to be because it can’t be string. Thanks in advance


e

similar as mentioned the data type can be a string array (also a list(Of String) )

we would recommend at first collecting all values, then filter / check for the value given by the Excel / datatable

Okay I think I did that. Would you assist me into filtering an item that contains a specific substring in the list of all the strings in the array?

Solved! Thanks alot for the help.

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