Issue with looping through records in a data table

Hello everyone,

I have an interesting problem looping through a data table. I cannot seem to find the answer anywhere else so I hope that someone can help me.

My process is as follows:

  1. Navigate to a website
  2. Click a refresh button to bring all new records to the top of the list (20 records at a time)
  3. Build a data table from values found on the screen
  4. For each row in the data table, download all new records (This works and breaks after this step)
    5.Once the robot completes the download of the first 20 files, I move back to the first log message activity. The loop is supposed to restart, it seems like the data table expands to 40 records but the robot cannot find those records on screen.


  • List item
    The initial data table is built with the 20 records on the screen
    It appears that when the data table rebuilds it finds the next page of records without refreshing the page
    The robot appears to get stuck on row 23 but rows 21-40 are not visible on the screen.

The status button is the refresh button as you will see in my screenshots.

Can someone help me fix this loop so I am properly refresh the records and continue downloading the next batch of new files?

Here is the error message
Click ‘IMG…’: Could not find the UI element corresponding to this selector:

Search failed at selector tag:

The closest matches found are:

When I rebuild the data table the second time the robot is looking to download a file in the header row of the DT despite the header not having “New” in any of the cells.

How do I ignore the header row?

Hi @MF.RPA ,Have a look at this ,Refresh Browser (

  1. In the “For Each Row” activity, add a “If” activity inside the loop.
  2. In the “If” activity, specify a condition to check if the current row is the header row. For example, if the first cell in the header row contains the text “Order Number”, you can use the following condition:
row(0).ToString() != "Order Number"
  1. If the condition is true, then the robot will process the current row. If the condition is false, the robot will skip the current row and move on to the next one.

This approach will ensure that the header row is ignored and only the relevant rows are processed.

1 Like


Thank you so much for the reply!

I actually tried your suggest to use an if statement and check the current row.

I was receiving an error message that row 21 (the next page of records) had no values in the data table.

I am going to continue testing tomorrow and hopefully identify the issue with the data table.

1 Like