Monthly Archives: June 2013

Silencing diagnostic output when starting webdrivers

Problem When using Watir-Webdriver (ie Selenium-Webdriver), some of the drivers will output diagnostic output when the servers are started. Internet Explorer shows: Started InternetExplorerDriver server (64-bit) 2.33.0.0 Listening on port 5555 While Chrome shows: Started ChromeDriver (v2.0) on port 9515 … Continue reading

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

Specify chromedriver log path

In the newer versions of Chromedriver (at least for win32 v2.0.204324.dyu), the log details are now being outputted to stdout. This can be pretty noisy, so you may want to output it to a file instead. Log path support was … Continue reading

Posted in Watir, Watir-Webdriver | 1 Comment

Defining element collections using the page objects gem

There was a question today on StackOverflow that was looking to define an element collection in their page object (while using the page-object-gem). From another question, I learned that it was possible to do this by basically pluralizing the element … Continue reading

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

Locating an element based on its ancestors

Any element that contains the target element is considered an “ancestor”. Ancestor elements can be used to reduce the scope of where Watir searches for an element. The element type method will only look for the element within the html … Continue reading

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

Locating an element based on its siblings

Locating an element by its siblings is often seen when working with tables. For example, in the below table, you might need to find the colour of a specific creature. A user knows which colour belongs to the creature because … Continue reading

Posted in Watir, Watir-Classic, Watir-Webdriver | Tagged , | 7 Comments

Watir Recipes by Zhimin Zhan

I discovered on Leanpub that beyond Ċ½eljko Filipin’s Homebrewer’s Guide to Watir book, there is also another book – Watir Recipes by Zhimin Zhan. The minimum price is currently $9.99, so I have only glanced through the sample book. Some … Continue reading

Posted in Watir | Leave a comment

Element type methods

When locating an element, Watir needs to be told: What type of element to find. How many matches to return. This is achieved by calling the corresponding element type method. Single Element vs Collection Watir can find and return an: … Continue reading

Posted in Watir, Watir-Classic, Watir-Webdriver | 3 Comments