Software Testing and Development Blog Posts
Subscribe to the full blog feed using RSS
Subscribe to the full blog feed using RSS
Q: “Why does Selenium not work with my Alert?” or “Why can’t Selenium handle the alert in my application?”
A: “Because the thing you think is an alert, is not an alert”
TLDR: Selecting an id with a fullstop or period in it requires a little escaping with CSS selectors. \.
One question that crops up a lot is “Why is my browser not closing?”, and there are multiple reasons for this.
Earlier versions of WebDriver used a FluentWait class, the WebDriverWait now offers a fluent DSL approach for configuring the wait.
When using SlowLoadableComponent we have to remember that in the Java Throwable hierarchy the Error and the Exception are siblings. This means that you have to catch exceptions in SlowLoadableComponents and convert them to Errors to cause synchronisation to take place.
To capture HTTP Messages and network traffic with Selenium WebDriver we need to use an HTTP proxy, and configure the browser to direct all traffic through the proxy.
Abstraction layers can provide a new layer of specificity or flexibility to an existing library. How can we make a WebElement more fluent and act as a readable Domain Specific Language?
Amending the page under test can introduce risk, but if we know what we are doing, then it can make automating some conditions easier.
How to synchronise on application state? How to Wait with WebDriver? Thread.sleep is not the answer, so what is?
I can see why people find it hard to work with WebDriver, particularly people new to the tool. Over the years I have learned to expect almost constant change from the ecosystem within which I automate with WebDriver (Browsers, Drivers, WebDriver, Java, JUnit). After all, the ongoing betterment of web automating worldwide must continue.