Duplicate data, adding each dupe to csv

I’m checking duplicate records in my database.

Sometimes I’ll have 6 records, other times 2, sometimes none.

How do I add all the displayed records to a csv, when the result varies each time?


22448 | John | Doe
33481 | John | Doe
20111 | John | Doe

I have a bare-bones script so far that will storeText the first record number, but I can’t figure out how to get it to loop through the rest of the records displayed in the table.

The “trick” is to modify the XPath that you use with storeText. In each loop, you need to move it to the next row.

What is the current XPath for the first row?

Thank you, @ulrich

The Xpath for rows 1 & 2 are:


I did notice that the 1st row starts at the _ctl03 and each row increases by 1, e.g. row 2 is _ctl04

It seems you could

a) check if ctl03 exists; if it doesn’t it means there are 0 records
b) if it does exist, storeText then check for ctl04 and so on

By loop do you mean internal looping? I think I saw some examples of that, if anyone can make suggestions or provide links to samples I can give it another try.