How to verify the number of rows in a table (verify search results in function search)?
a. Problem: after performing search, we want to verify number of search results.
i. Assert that nth row exist and that nth + 1, doesn’t exist
ii. Use command assertXpath to count number of rows.
iii. Use command assertXpathCount to count number of rows.
although I dont have used selenium, logic can stand as you need design a function using regular expression and you need to run a loop for getting the page no.s in it. I mean the function should return the value.
for tabular data you need to take the table name or frame and you need to take the count of columns and rows in the table.
you may look for a function in selenium to get col and rows of table.
later you have to run a 2 for loops; one for row and another for col and get the values.