Category Archives: Watir Migration

Changes to make scripts Watir-Classic and Watir-Webdriver compatible.

Finding the next empty text field

Problem As I continued to investigate making Watir-Classic tests compatible with Watir-Webdriver, I noticed one test that failed to input the next empty row of a text field grid. The grid could start empty or it could start with rows … Continue reading

Posted in Watir, Watir Migration, Watir-Webdriver | Tagged , , | Leave a comment

Replace Table#row_count and Table#column_count with an ElementCollection#count

Given a table: You might want to check the number of rows and/or columns. Obsolete Method In Watir-Classic you may have retrieved these values using the row_count and column_count methods. However, these methods will give an error in Watir-Webdriver: Preferred … Continue reading

Posted in Watir, Watir Migration, Watir-Classic | Leave a comment

Replace SelectList#select with SelectList#select_value when selecting options by value

As of Watir v6.8.0, this change is no longer necessary. Watir’s Select#select now behaves similar to Watir-Classic. It will now select based on text, label and then value. Say a page has the following select list. The page is localized … Continue reading

Posted in Watir Migration, Watir-Classic | Tagged | Leave a comment

Replace Table#column_values and Table#row_values with Table#strings

Background It was pointed out to me that my answer to the StackOverflow question, “Get entire column text of a table using Watir,” was incomplete. My answer said that the method to get a column of values from a table … Continue reading

Posted in Watir Migration | Tagged , , , | Leave a comment