Look up functionality

I have a variable “A” that I grab it from a json file and I need to look at a list of options on a website to match my variable “A” to one of the options on the website and click on it.

For example. Variable A = movie

Website options are:


How can I match my variable (movie) to the first option (movie) and select it? Any ideas how to achieve this?

Thank you!

If what you’re trying to do is select an option from a drop down you can use Select Item activity, and in the item field just put your variable.

If that’s not what you need to do, could you provide more information?

Fine we can use an activity called
Click text activity

—Where we can mention the string we want to click and in that input field enter the variable1.ToString and make a selection for the element where we need to click that text
—So that it will click on the word that we passed and if that is found in the selected region as a element
—make sure that the wait for ready property in the property panel of click text activity is selected as COMPLETE

Hope this would help you
Cheers @icosinga

When I use the click text activity and set it up like suggested, the error message below shows up

Hi @icosinga

If it is a website, then it should be easily done with selectors. You could use dynamic selectors to select your elements, like so:

See this sample project file to explore it a bit more:
DynamicSelectors.zip (7.2 KB)

Thank you for help! When I try to open the file you sent, I get the error below.

Also, yes, it’s a website. Similar to this one but with radio buttons https://providerportal.caresource.com/GL/SelectPlan.aspx

What is your Studio version? This project was done with latest Stable Community Edition 2019.7.0. Unfortunately, previous versions will not open the file.
(but this is also why I included a screenshot :slight_smile: )

2019.4.4 I tried to replique what you have on the screenshot but I couldn’t make it to work

I am no longer sure which version introduced the variables in selectors (which is the solution I used there).

Another way would be to concatenate a string with your variable, like so:

This is then the selector

"<webctrl aaname='" + item + "' tag='INPUT' />"

Do I need to use the open browser activity? I.e. this is just one step of my automation. Previous steps will take me to the website window where I need to make a selection

Why are you using the type into activity if I need to select a option with a radio button?

Thanks for all your help!

No need to use it. I have only explained the principle here with this simple example. You will want to use a click activity or any other, as long as you specify your target as a dynamic selector in the way explained above :slight_smile:

This is error that I see when I duplicate the above

Please hover over the blue exclamation mark to see the error message.

I cannot see if you placed it in the For Each loop, but if yes, then the Type of the loop is Object by default.
You can either change the type of the For Each loop to String in it’s properties or add .ToString to the item, like so