As I write a test script using Selenium WebDriver and Java for a page containing a table with multiple rows and columns, I face the challenge of dealing with hidden rows alongside displayed ones. With around 1800 total rows, only seven are visible on the page. Determining which row is actually visible using XPath in a for loop has proven to be time-consuming. Additionally, each row has a dynamic dropdown option with an ID that changes based on the row number (e.g., testid_0 for row 1, testid_1 for row 2). Is there a more efficient way to identify the visible row numbers without resorting to lengthy loops? Perhaps through JavaScript executed by Selenium to pinpoint the displayed rows faster?