Enabling a checkbox based on text

I have a ForEach that is entering a username from a CSV into a search field in the UI. The results return in a html table. There is a checkbox in the returned record which needs to be checked > then a button clicked to save. Nice and easy, however, for some usernames, multiple results return e.g

username entered: smithC
results returned:
SmithC
SmithC1
SmithC2

an example row from the table
image

How do I get it to check only the checkbox for the username match?

Hi can u show the Selector in Uipath for any check ?

Hi @Andrew_Callaghan !

Correct me if I’m wrong:
1- You write in a csv smithC
2- Your bot types into a search field in a website smithC
3- Your bot gets the html table of all the results of the website
And what you’re looking for is to have the results on only one specific username (not smithc*)

So that we could help you, we need a sample of data of the html (you can put dummy data)

Also, what I am wondering is: why are you going through looking for the information by saving an html and looking for the box attribute ? Did UiPath Studio not recognize selectors when using “get attribute” activity, indicating the box that is supposed to be checked or not, and using a dynamic selector if needed ?

you both. I’ll get you some sample data when I return to work on Tuesday.

For clarification, your are right in what I am trying to achieve except that the bot is not saving html. I included the html in my post to show how the tick box is presented.

I just need to be able to select the box next to a strict match of the username

So here, I want to select the checkbox for MBTtest. It may not always be the first result that I need to select.

Hi @Andrew_Callaghan

Please indicate the first check box in ui explorer and show what selectors are coming…

Thank you. I get this:

And also the first User id (MBTest) indicate and show what selectors it is showing.

As you can see the row starts with 2 and column starts with 1.

By using get attribute activity we have to take the aaname(select on the activities drop-down), the selector is dynamic by changing the row number (column number is 2) in while loop

Once the output from get attribute equals to the input you are searching (username you entered) that row number is the one you have check the checkbox

So when using click or check activity we can check the checkbox, in the selector just change the column number from 2 to 1, and row number is taken in the while loop ,it will click the checkbox

2 Likes

Thank you. I’m experimenting with this now. Thanks for your help

Okay let me know if you need any help thanks…

Okay. I have the aaname coming through to an attribute but am not sure how to set up the while to loop through each row

I will send a sample workflow… in some time

Much appreciated

Please refer the workflow the selector is not accurate sincei don’t know the exact selectors.
sample.xaml (13.3 KB)

1 Like

Thank you, that was a massive help. This is working with my test user. How do I plug in the usernames from a preceeding ForEach. I’ve tried the row(“MyUsernameColumnHeader”) but this is obviously wrong.

happy to hear that it helps

Try using the sample sequence inside the for each loop

Its the assignment part that is not accepting the username column from the ForEach

Can you show what is the error it is showing?