Monthly Archives: August 2012

Locate element via custom attribute – css and xpath

Problem In some cases, it is required that elements be located via their custom attributes. As an example, assume that the following HTML exists on the page. We might need to locate the span element that has the ‘customattribute’ with … Continue reading

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

jQueryUI autocomplete – display and select a suggestion

Problem I needed to randomly input a couple of pages that included the jQueryUI autocomplete widget (http://jqueryui.com/demos/autocomplete/). For each control, the list of suggestions were pulled from the database and the validation required that the field’s value match a suggestion. … Continue reading

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

Add custom elements to the browser

Problem Watir is great for supporting the basic HTML elements, but what if your application uses a custom control, like a tab control or autocomplete? Let us consider the jQuery-UI tab control (http://jqueryui.com/demos/tabs/). The HTML for the top tab control … Continue reading

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