I am starting the process of converting my WATIR scripts to use the WATIR webdriver. There are several table methods that I used in my WATIR scripts to check the size (rows and columns) of an HTML table.
myTable.row_count myTable.column_count
These methods do not exist in webdriver, so I'm looking for a good way to perform the same check.
For rows, this seems to give the same result as the row_count method
myTable.rows.length
In the column column of the table, I tried to convert the table to an array of strings and get the length of the first row, but converting to a string array takes some time.
myCols = myTable.strings[0].length
Can anyone suggest a better / faster way to get the size of the table?
source share