Solved - Select specific hyperlinks within HTML table

Hi Guys

I’m trying to build a process whereby the first step is to initially click into a hyperlink from a html table row, and then it goes into another page, does some actions and returns to the original page with the table.

I’ve got the page with the actions to work without issue, but I need to somehow get it to identify the same button in the next row when it returns to the table page.

I can see it is identifying the selector as:

"<html title='Debtstream - new files awaiting confirmation' /><webctrl parentname='f_confirm' tableRow='1' tag='A' />"

whereby each selector changes by 1 based on the table row. Is there any way I can scrape this value out as a variable, or something else, so that my process can identify the same button in the next row and click it? Image of the HTML table page below.

Thanks :slight_smile:

As I understood, You want to get value from tableRow=‘1’. I would transform this selector to string and then use Regex:

yourSelectorInString = "<html title='Debtstream - new files awaiting confirmation' /><webctrl parentname='f_confirm' tableRow='1' tag='A' />"

yourValueInString = Regex.Match(yourSelectorInString.ToString,"\d+").Value.ToString

It will returns “1” for this case. You can convert it to Integer and increase it +1.

Would I be right in thinking the Find Children activity will be needed and then an assign to assign it to a variable?

Few ways:

  1. What if you datascrape that specific column? Are you able to get the Urls? If so, you can use foreach loop and use Navigate to.
  2. Use Find Children and loop all the children, use one of below queries in for each to directly get the links ( did not test) or do GetAttribute inside foreach for “Tag” and perform Click only for “A”

children.Where(Function(s) s.Get("href") isnot string.Empty)

children.Where(Function(s) s.Selector.ToString.Contains("tag='A'"))

  1. to create a dynamic selector inside the loop

"<html title='Debtstream - new files awaiting confirmation' /><webctrl parentname='f_confirm' tableRow='"+rowNum.ToString()+"' tag='A' />"

1 Like

Hi Guys

Thanks for the replies, I think I need to clarify on what I need though.

I need the robot to be able to distinguish between each of the rows in the table above and click on the 3 dots hyper-linked in each row.

action 1 = click the 3 dots in row 1
action 2 = click the 3 dots in row 2
action 3 = click the 3 dots in row 3
and so on.

The amount of table rows changes daily, so it also will need some logic in there to know when it hits the end of the table.

Forgive me, my programming skills are quite basic.

Thanks again.

  1. use find children activity and select the entire table as a target.
  2. change the scope property of find children activity to FIND_DESCENDANTS.
  3. change the Filter property to <webctrl tag='A' />.
  4. use for each activity to loop through the child elements.
  5. change the typeArgument of for each activity to UiPath.Core.UiElement.
  6. to verify use highlight activity inside the for each loop and change the Selector->target as Item.Selector.toString.
  7. write the logic based on the child element highlighted.

hope this will helps you…


Thanks for the replies, helpful as always.

I’ve tried to run this with the filter set to tag A but there are other anchor tags on the page and it is picking these up first.

Is there a method when I can get it just to look at the tableRow element as this is the only distinguishable thing on specific to the row. :slight_smile:

Credit Control.xaml

Attached for reference, current state.

I would try like that. But I’ve done this “in the air”, I mean I couldn’t really see the app, so it might not be completely working.

GoThroughRows.xaml (9.0 KB)

1 Like

How many A tag in a single row?

Hi Guys

Apologies for the delay.

I’m looking at tackling this a different way now, I used a recording sequence to see if it can click the selector when I pass the variable defined at the start of the process for the starting row into the selector, and then increase that variable by 1 at the end to loop back through and do all rows through the table.

However it fails on the Action Click ‘TD’ as it is timiig out. I don’t know if this is because it can’t find the selector as I am doing it wrong?


Attached is project as it is now.

Thanks Guys, help is appreciated.

Credit Control.xaml (12.6 KB)

Just the one anchor tag per row.

HI @searl,

Please refer my previous post


Thanks for all the help guys, got really confused with using selectors (find it hard to get my head around them), ended up doing it as follows:

  • Data Scrape Web table column URLs.(amount of rows change every day)
  • Write Range to Excel Sheet.
  • Use a flow decision to read through the spreadsheet and load each link in the URL bar/hit go.
  • Perform the sequence on each link and select return link to go back and repeat until the end of the spreadsheet, when a complete dialogue is shown.

Wouldn’t of stumbled my way to this without the help given though, so thanks again!

1 Like