Monthly Archives: September 2012

Nested tables – trs vs rows and tds vs cells

Observation In the process of migrating code from Watir 1.6.5 to 3.0, one of the benefits has been improved handling for nested tables. In 1.6.5, the Water::Table class methods did not differentiate between the parent’s and child’s rows and cells. … Continue reading

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

Locating an element based on its decendants

Problem I ran into a situation where I could only identify an element based on the elements it contained (ie its descendants). The HTML of interest was: The goal was to locate the li elements based on the descendant link’s … Continue reading

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

Locate element via custom attribute – extending Watir-Webdriver

Problem In previous posts, we discussed using css/xpath and extending watir to locate elements with custom attributes. The solution used to extend watir does not work for watir-webdriver (due to its different implementation). This post will look at how to … Continue reading

Posted in Watir, Watir-Webdriver | Tagged , , | 8 Comments

Locate element via custom attribute – extending Watir

Problem In a previous post, we discussed how css and xpath locators could be used to locate elements with custom attributes. It works, but I find it tedious when: The custom attribute is used extensively throughout the application or Locating … Continue reading

Posted in Watir, Watir-Classic | Tagged , , | 1 Comment