How WebDriverWait works differently for WebElements defined by driver.findElement versus PageFactory initialization

When it comes to using WebDriverWait to wait for WebElement properties,like text or attributes, when sending WebElements as properties generated via PageFactory, that will work properly. However when using ‘driver.findElement()’ to identify the WebElements required as parameters in the WebDriverWaits, that will fail. Here is the reason why.

thewaiter: opening a page and waiting for it to load with Selenium

In this post i will discuss the methods you can find in thewaiter library, for waiting for a page to load completely. I will show the methods you can use from thewaiter that can help you with these waits, and some test examples for each, that you can also find in GitHub.  

Selenium: How to correctly test whether an element is displayed (or not)

One of the most frequent kind of interactions with the web page when testing with Selenium is checking whether a particular element is present. More specifically, whether it is visible when looking at the page and does not have a “hidden” attribute. The isDisplayed() method is used for such checks, but in many cases it… Read More

Creating the page objects

What is a page object Simply put, a page object is an object that Selenium uses as a representation of an HTML element. Selenium tests will not interact with HTML code directly, but with objects that use selectors to refer to particular bits of the HTML code. Defining page objects You will need to create… Read More