Select values from Dropdown list using contains or Substring or starts with

HI All,

I am trying to select a value from a dropdown list using a string value(partial string) from excel sheet.
Please suggest how to achieve this.



  1. Retrieve the values from the excel using read range activity.
  2. Now using assign activity, retrieve the value from data table using row(“ColumnName”).toString
  3. Now substring the variable as per your requirement.
  4. Now use a selectitem activity and pass that variable
    i hope this helps.

Niket Ghai

HI Niket,

Thanks for your response!
I am able to retrieve the value from the excel and pass it to select item. But it is giving an error “Cannot select item. It was not found among existing items”. This is because the value from excel is not exactly same as in dropdown list. Value from excel is “Company1” and I have select “Company1 Dev2” from drop down.


Then try appending Dev2 in the string and then pass it to select item…I mean if you know that everytime it will end with Dev2

No. It should be dynamic. Is if possible to loop through the list of items in the dropdown and then pass the value to select Item ?


Might help you.

The below is my selector. Which attribute should I use to set the wild card ?

“<webctrl id=‘ddlDevCentre’ tag=‘SELECT’ /?>”

You need to add more tags here. Indicate the area again or use UIExplorer. Or try using click activity to open the drop down and then click the particular item. Then for the second activity make the selector dynamic. You might see a tag named aaname.
Set that to aaname=+thevariable.tostring+the rest of the selector