Table extraction and clicking html button for each row that meets criteria

I’m extracting table data from a website, which is working fine for the most part. It’s invoice data and I’m extracting all the pages for the last 30 days, then comparing the date in the extracted table to today to ensure I’m only getting rows for the current month. Side note, would be great if there’s a way to only extract the rows meeting the above criteria into the extracted table? but that’s not really my question, as the way I’m doing it now will work.

My question is, each row contains a element, with a unique ID that’s made up of elements in the row that are re-formatted in a specific way. I’ve been able to re-create the ID and I’m storing it in a variable, but I need to do 2 things:

  1. click on the button that has that ID.
  2. presumably I would need to navigate back to the page that contains the ID of the element I want to click? If so, how do I do that?

It seems like it would be much more effective to iterate over the table, check the date, if it meets my criteria, click the button on the row to download the invoice, but it doesn’t seem like that’s the way Table Extraction works. Is there another method I should be using?


Welcome to forums

So you need to click on the button which has the ID, For that you can open the selector in UiExplorer and check if any tag contains the ID

Then select that tag and save it, later you can pass that to your variable, which will work as dynamic

Hope this will help you


Thanks for your help! So now I have a variable with a value in it that’s dynamic based on the current row, like this:

I added a click activity, and in the properties I set the selector to selector, and then in the Selector option, I just put the name of my variable. Not sure if that’s right?

Also, by the time it finishes iterating through the pages to extract the table, it’s on the last page, where none of the elements are that I’d want to click on.

When I look at the markup in the website, it only contains the rows for the current page, so how can UIPath click on an element that’s not technically there? Do I need to somehow navigate back to the page that has the element I want to click on? Or iterate over all the records again? I’m confused…

it stripped out my element.

"<webctrl id='0512342595110821;11-08-2021' tag='BUTTON' />"

Ok, I was able to get the button click working your help. The only thing I hope someone can help with is the paging aspect. Can reset back to the first page, but it’s likely the buttons I need to click on will span multiple pages, and I won’t know which page they’re on unless I could somehow track that during the extraction and go back to that page when I’m ready to click the button.

Extracting all the data up front and then manipulating it seems to be problematic/inefficient. It seems much more efficient to iterate over the table and do everything you need to do with the row while you’re on the row, but I don’t see that UIPath has that capability. That would also allow you to not import 10 pages of data when all you really need is 2 or 3.


You can get the link of the first page, so that whenever you want you can use navigate activity and paste your url

Hope this may help you