If match somethings in a web table then click a link


Webpage made in a table, Example: if somethings match 2nd column in any row then click 10th column same row. How to make this flow.


Hello @codertune

Inspect on an element in the second column and 10th column and identify an attributes that gives you the rownumber and the ID. The the Id you need to make dynamic and pass to the selector of 2nd column.

You can use the loop to incrment the rownumber attribute and then whenever identifies a ID in 2nd column, it can use the same counter variable(rownumber) to click the 10th column item.

If still confused, share the selectors of 2nd and 10th column sample elements.

Screenshot for Ready element.

Actually I want to download this pdf ,
like this method: First find or search “WH” number if found or match then click print button, and main problem is it’s a random process, So Incrementing by 1 is not work.

Screenshot for inspect


So one if the approach would be something like this…

You can first extract and export the data using extract table activity…

Now use a loop on the datatable and check your conditions…and in for loop properties you have a index property…which will give you the row index which is zero based can convert by adding 1…

Now you have the index of row where your both conditions meet by using if condition inside the loop

…now get a selector for the 10th column cell directly. Dont get for the url click…

Now what we can do is we can use the row index and the column index to get the correct cell.here column index is constant… row index is obtained from the previous loop…

Now once you get the cell…you can just add one more selector row for url which would be generic…or can use get children to get the urls elements inside the cell and click or use them…

Selector for your cell looks something like this…

<webctrl tag=‘tr’ rowindex/idx = ‘value from loop’ />
<webctrl tag=‘td’ columnindex = ‘10 may be’ />
<webctrl tag =‘a’ />

Hope this helps


Along the datatable based approach, used for calculating the presence and row index also have a look at this alternate option:

here we defined an integrated anchor to the specific ID/Name/Value with a dynamic selector and click in the same row the element of interest

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