cheezy/page-object — pull request #114 by gshakhn (2012-07-25 03:07:17+00:00)
Title: Better support for table_row.find_index_by_title when tables have theads...

... and tbodys.

In Watir, if the row we're looking at is in a tbody, we need to go up one level before finding the first row in the table.
For Selenium, if the row we're looking at is in a thead, accessing the 0th element of the thead gets nil. We have to go up one level to the table so [0] will return a row.

The test case for the selenium bug may look weird (why would you try to access the cell with column header "Col1" in the header row itself?). However, we hit it while iterating over the rows in the table and looking at all cells with column header "Col1".