title: selenium webdriver to get visible row number in table
body: <p>I am writing test script using selenium webdriver and java for page which has a table with multiple rows column. This rows has same style and class. However, some of rows are hidden and some of them are displayed on page. There are ~1800 rows from which only seven rows are displayed on page. Now, I have to work on visible row for process data, I have created xpath but it is taking very long time to verify which row number is visible on page and if visible than proceed further with running script else check next row. This I have achieved by using for loop but it is too time consuming. Well there is a drop down option in rows but the id of those drop down is dynamic based on table row like testid_0 - row 1, testid_1 - row 2. My question is there any way we can get the visible row number of table like row 7, row 100, row 500 which is visible on page without spending time or using for loop? or can we get the javascript which run using selenium and return the number of row which are displayed on page.</p>