How to Click in a link in the same row the name is

I wondering how to click in the link Remove in the right of the row where I find the name:

Do you know how I can Implement this behaviour with xClick or xClickRelative…

Thanks for advance!!


like this?

Thanks for the suggestion DON_GAJE but I don’t see clear how I can do that click in automated way…I mean I have a name in the same row that the link “Remove”, the goal is do click in the link “Remove” in the same row that the name I found…The table could be 1 to n row…

Any idea?

try to find out about sourceExtract and sourceSearch in uivision docs (it’s on the main website, or you could do a google search by combining these keywords with UI Vision to get the main page).

It’ll show a formula between different rows, and you’ll know how to do it with a bit of executeScript

Here’s the shortest way I could do this for a similar use case:

- Create a variable containing the name you want to remove

Store | Name Here | nm

- Use sourceExtract to extract the HTML code starting with ‘Remove’ in the table’s header and ending with the name you want to remove (above variable)

sourceExtract | Remove*${nm}

- Execute a JS script to count occurrences of the word Remove in the extracted HTML code

executeScript |
var temp = ${nm};
var count = (temp.match(/Remove/g) || []).length;
return count
| count

- Use xpath to click on the word Remove and at the end of it add the JS return (count)+1 to click the word ‘Remove’ falling after the name

Click | xpath=(//*[contains(text(),‘Remove’)])[${count}+1]

This worked for me but let me know if you encounter any issues.