How to select a specific Name when we have multiple search results

I’m new to Uipath. I have a CSV file with Full Name, First Name, Last Name, Date of Birth, and several other columns, so when I search with Full Name on a website, it gives me results like this:

The correct name and date of birth must be clicked, I have tried using dynamic selectors, but it gives a runtime error

Hi @Nipun ,
What is the Error that you receieve ?

Also, I do think that there should be a space after the comma (,)

Could you try modifying it and Check.

Also to verify, we can use default values for the variables used in Selectors to Check if the Element is Getting Highlighted i.e during Design time.

Let us know after you have tried this out.

Hello @supermanPunch ,
Here’s the error I get when I try to run it,

There is still no difference after giving space after the comma
Is there a way to click on the closest match which I want is 99%


There seems an extra whitespace after LastName and FirstName.
So can you try to add TrimEnd method to LastName and FirstName like ....+LastName.TrimEnd +","+FirstName.TrimEnd+"," ....


Thank you @Yoichi,
I tried it and it still doesn’t work for me.
Is there any different approach for clicking on the required name? or any other activity

this one should be your selector, the only space will be after the “,” would be before the DOB


@Nipun ,

Could we try first preparing the aaname value beforehand, and then using it in selector.

You could follow the below Steps and Let us know if it works :

  1. Create a String variable, say aaname

  2. Before the Click Operation, we will add the name value to aaname variable. Using an Assign activity do the below Assignment :

aaname = Last name.ToUpper.Trim+", "+FirstName.ToUpper.Trim+", "+DOB.Trim
  1. Next, Use a Write Line Activity and use the aaname as the value to be printed. This is to confirm the Value that is being selected.

  2. Next, In Selector use the aaname variable directly as the value of aaname attribute. Like below :

aaname = {{aaname}}

Let us know after you have tried and also post the Write Line Value that is being printed, if it doesn’t work. We may also need to Check the DOB value

I appreciate your help, it is working now

1 Like

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