Fluent Helper Classes for SlowLoadableComponent Page Objects

Jul 2, 2020 - 3 minute read - Practices Selenium Simplified Blog WebDriver

I generally caution against ‘Helper’ classes and Static Helper classes when I’m consulting. SlowLoadableComponent isLoaded methods can be very ugly but are a good example of where helper classes can help, and in particular fluent helper classes.


How to Create Fluent Page Objects

Jul 2, 2020 - 3 minute read - Selenium WebDriver FAQs Test Automation

Fluent Page Objects can help make code easier to write, but we have to be careful not to couple too many classes together.


What are my next steps after writing my first Selenium WebDriver test?

Jul 2, 2020 - 2 minute read - Selenium WebDriver FAQs Test Automation

You have installed the tools? You have an IDE setup? You’ve written and run your first Selenium WebDriver test? What next?


Difference between Selenium WebDriver getText and getAttribute

Jul 2, 2020 - 3 minute read - Selenium WebDriver FAQs Test Automation

What is the difference between getText and getAttribute? Answer, inside, with some nuances explored.


Why Does Selenium Not Work With This Alert?

Jul 1, 2020 - 2 minute read - Selenium WebDriver FAQs Test Automation

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”


How to Select a Web Element using CSS when id containing '.'

Jul 1, 2020 - 1 minute read - Selenium WebDriver FAQs Test Automation

TLDR: Selecting an id with a fullstop or period in it requires a little escaping with CSS selectors. \.


Why has my WebDriver Browser Not Closed?

Jul 1, 2020 - 2 minute read - Selenium WebDriver FAQs Test Automation

One question that crops up a lot is “Why is my browser not closing?”, and there are multiple reasons for this.


How to Use a Fluent Wait DSL with WebDriver

Jul 1, 2020 - 2 minute read - Selenium WebDriver FAQs Test Automation

Earlier versions of WebDriver used a FluentWait class, the WebDriverWait now offers a fluent DSL approach for configuring the wait.


Why is my SlowLoadableComponent not waiting?

Jul 1, 2020 - 3 minute read - Selenium WebDriver FAQs Test Automation

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.


How to Capture HTTP Messages with WebDriver

Jul 1, 2020 - 2 minute read - Selenium WebDriver FAQs Test Automation

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.