Selenium: How to wait for an element to be displayed / not displayed

In my previous post i talked about how to check whether an element is displayed or not. There are times when tests where such an action is performed fail randomly (sometimes they will pass, other times they won’t). The assumption here is that the element was not displayed within a decent amount of time when… Read More

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

Quick Tip: Running automated tests in parallel

The What I have a bunch of tests that i would like to run faster, by making them execute in parallel. In my tests: I am not using a DataProvider and only want to make the same test run several times. I am using a DataProvider and want my test to run with the provided… Read More

Quick Tip: Selenium – select / deselect a value from a dropdown

The What Having an HTML dropdown on a web page, i would like to select, via Selenium, an element from it, or deselect the selected one. An example of an HTML representation of a dropdown can be found below – it displays a list of winter months: <select id=”winter”> <option value=”Dec”>December</option> <option value=”Jan”>January</option> <option value=”Feb”>February</option>… Read More

Working with cookies in Selenium

What are cookies Cookies are text files stored on your computer, that contain information sites need to remember of your visit on them, like some of your preferences that the sites will persist while browsing their pages (for example: the language you are viewing the site in, the username you logged in with, the contents… Read More