Click link in a table based on value in another column

Hello guys,

I wonder if any of you had similar situation. In a web form I have table with 2 column and few rows and it looks something like this:

Link 1
Link 2
Link 3

I have this id value in a variable and I want to click link based on this variable. For example if value of id is 3 I need to click third link which is left of id 3.

Tried with anchor base, find relative item but cant make it work. If you have any ideas please share it.


welcome to the forum

In general it can be don with dynamized selector along with a variable inside (representing the ID Information). Have a look here:

Thanks for your message. Sorry but i don’t think this tutorial can help me with this specific problem. It’s much more complicated than that, because first column with links are the same, second column holds value (11 digit number). I have variable that holds value of id, but how do i find it and click button left to it. Please see pic


in scenario like yours we do benefit much from this as described in the link.

  • with id information the relevant row can be found
  • then click on the select button within the row is executed

In case of you need further then please share some more details on the datarow (tr) / datacolumn (td) structure with us (e.g. screenshot from Browser F12 Tools)

have a look on this scenario similar to yours:

we would like to click remove for e.g. Guerra

the webelement structure looks like this:

  • with the variable in selector we identify the datarow of guerra (Anchoring to the name)
  • based on this the remove button is found

the selector for click looks like:
<html app='firedox.exe url='*' />
<webctrl parentid='table' tag='BUTTON' rowName='{{selectedName}}' />

sometimes it is needed to anchor it (Name in first column)
so it would look like this:

<html app='firedox.exe url='*' />
<webctrl tag='TABLE' />
<webctrl isleaf='1' tableCol='1' tag='TD' innertext='{{selectedName}}' />
<nav up='1' />
<webctrl parentid='table' tag='BUTTON' type='button' />

ensure that for the development the used variable does have a default value. So you can validate the selectors for the dynamic part.

Have starter help here:
ClickButton_AnchorByVariable_SameRow.xaml (9.2 KB)


@ppr Thank you so so so much. This is exactly what i was looking for. Perfect. Had to use anchor but finally made it work. At first it seemed like it has nothing to do with my problem, but i was wrong, good thing that you gone extra mile to make me realize it.


1 Like

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