Table data and Pagination

For dynamic tables how do you search through multiple pages with pagination to find a specific row containing specific table data?

@bendece9228 Initiate a boolean to false outside of a while loop and set boolean as true when you “find” your specific table data. You will need a few if conditions within the loop for comparing.

https://www.tutorialspoint.com/groovy/groovy_while_statement.htm

boolean hasFound = false;
while (!hasFound) {

(note the exclamation point before the boolean to change it to a NOT; so it reads as “while not found”)

The concern is how the pagination is done; is it just a NEXT button or page1, page2, etc.? If just a NEXT button, then search web table; compare boolean as false at end of loop, then click NEXT button, else, exit loop.

If page1, page2, etc. buttons, then it is more difficult. In one instance, I used a switch case block with the counter–ugly but it worked as it was also a limited number of pages.

If you have lots of pages, then I hope someone else has a better method and I can learn too.

Last thing is if you don’t find the specific table data at all and you get to the last page, then you need to set boolean to true and exit–but this should have an exit condition to stop the TC.