Click activity exact variable

I have a Click activity which selector already is set up to click on a variable which I get from a excel sheet. So far it has worked fine, except for when the results that appear after the search with same variable, has 2 results that are similar. For instance, searching for the name Adrian, 2 results appear. In a dropdown box at the top there is “Adrian Rodriguez” for instance, and below is “Adrian”. I want to click the bottom one but the selector decides on the top, because it contains the word “Adrian”.
How do I make it so that the selector specifically clicks on what my variable holds?

Sorry if it’s unclear, but please let me know and I will share as much details as I can

EDIT: Forgot to add that this is what the selector looks like, if it’s to any help

html app=‘chrome.exe’ title=‘Search result | Transfermarkt’ /><webctrl id=’*’ tag=‘A’ aaname=’"+convertedCase+"’/

Well it looks like your index is 2 so it will always click on first found

Maybe if you are able to put lastname also in selector that is how it will click on proper selector.


Thank you for your response!

In my case, I am retrieving the names from an excel file, where there are both first and family names and also names that only has a first name/nickname that the person goes by. That is why I want to create a selector that clicks on exactly the string that I am retrieving from the excel file, after they’ve been modified in the assign activities I put them through (turning the names into lowercase).
If there is a solution to that, I would love to hear it!
Thank you

can you share excel file? or make another one, the same as this one but with dummy data?

I can create something for you.

1 Like

If you could find a solution, that would be fantastic!

Here is a dummy of the data
DUMMYDATA.xlsx (718.7 KB)

And the URL where I am trying to search for the players at is:

Thank you

one more thing, where do you want to click? To paste name in search form and then click?


And give me one or two examples…

What I would like to do is search for the name and send Enter hotkey (already done). When the results appear I want to use a click activity that clicks on specifically the name that have been searched for.
My apologies, I am sending a smaller excel file with 3 name samples, whereas “Adrian” is the trickiest one since it clicks on anything that contains that name.

DUMMYDATA.xlsx (738.7 KB)

So, what I found out, your source data is not good, you are missing some letters


My lastname is Ivanković now in your table it would be Ivankovic and C is not Ć

In your list you have a lot of examples like that

Héctor Bellerín in your list is Hector Bellerin you missed é and í

Now this can be solved with string contain, but then it will click on wrong Adrian.

So if you want to click on proper selector you would need to have for source data exact.

what I tried to do with selector is:

from a selector:

<html app='chrome.exe' />
<webctrl tag='A' innertext='Héctor BELLErín' />

to make it:

<html app='chrome.exe' />
<webctrl tag='A' innertext='" + row("選手名(英表記)").ToString+ "' />

this is how you would create dynamic selector, but you need to have proper source data.


1 Like


Sorry for the late response and thank you for your help.

Yeah I figured that would be the case, seeing as how the names are spelled differently and missing case sensitive letters.
Since the names are to be searched on other web pages as well, the names spellings are changing, which causes a huge problem and because of that I am not sure if it is possible to create an accurate selector. I am pretty new to RPA in general so I thought maybe it could be done somehow.

Thank you for showing and explaining thoroughly, it really helps me learn and to become better!

Best regards