Author Archives: Justin Ko

Clearing the way to checking clickability via Element#obscured?

Problem When clicking an element, you are presented with an error like: (Chrome) Selenium::WebDriver::Error::UnknownError: unknown error: Element <button style=”width: 100px; margin: 40px 0;” id=”obscured”>…</button> is not clickable at point (58, 476). Other element would receive the click: < div style=”position: … Continue reading

Posted in Watir | Tagged | Leave a comment

Selecting another option. Fast.

Problem I was looking at the following Watir code to randomly select a different dropdown option: Short and simple… but with poor performance. How can we make this faster? Answer Most of these commands are necessary. We cannot get away … Continue reading

Posted in Watir | Tagged , | Leave a comment

One-liner to wait until clicked element is removed

Problem Buttons/links that trigger JavaScript processing before navigating to another page can cause timing issues. Watir, specifically Webdriver, does not know it needs to wait for the navigation. This can result in Watir continuing the execution even before the navigation … Continue reading

Posted in Uncategorized, Watir | Tagged , | 1 Comment

Identify the wire calls being sent

Identify the wire calls being sent Problem Knowing which wire calls are being sent to the driver/browser can be useful in understanding Watir’s behaviour, especially with performance issues. How do you find out what wire calls are being made? Answer … Continue reading

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

The many code paths of the :id locator

Problem While investigating the changes needed for Pull Request #662, I noticed that the :id locator had quite a few code paths. For example, the locator could be: Directly passed on to Selenium-WebDriver Incorporated into an XPath expression Compared while … Continue reading

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

Text field performance – #set vs #set!

Problem While investigating an issue for TextField#set!, I noticed that the method was: Notice that it calls the normal #set for the first character, as well as another call for the middle of the value, the end and validation. At … Continue reading

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

Reproducing the compound class error

Problem A Stack Overflow question by BIGJOHN mentioned getting a “compound class names not permitted error.” The usage of the compound class was obvious: The question is, where is this exception coming from? Compound class names, while on the list … Continue reading

Posted in Watir | Tagged , | Leave a comment