Set up a Selenium project environment

Problem This recipe will describe how we can set up our project environment. We will use Eclipse as development environment as further examples will be written in Java, but we can use any IDE which […]

Model the application interface

The first step we have to take in implementing the page object model is that we have to model the user experience. This means that all page specific elements has to be extracted to separate […]

Locators – Introduction

Locators are the way to tell Selenium with which web element we like to do something (It can be anything, like: clicking, typing, selecting, verifying, etc.). Selenium provides different ways of locating those web elements; […]

Dealing with moving focus

Problem Imagine the following situation: after accepting a confirmation dialog you will be redirected to another page. This recipe will explain how to deal with this inevitable situation. Prerequisites We have made a class file […]

Implementing a Testing Framework Introduction

This chapter will cover all the basic things we need to know when creating a new test automation project. By the end of this chapter you should be able to set up a basic testing […]

Measure Performance – Introduction

We can measure the websites performance using Selenium WebDriver. There are a couple of ways to improve the performance of the application under test, but first we need to know where the bottleneck is. For […]

Page Object Model – Introduction

Creating Selenium test cases can result in an unmaintainable project. One of the reasons is that too many duplicated code is used. Duplicated code could be caused by duplicated functionality and this will result in […]

Locating sibling elements

Sibling elements do have something special in common, specifically they share the same parent. We can use this type of selector if one of the siblings doesn’t have an unique identifier. The following HTML code […]

Locating table cells

In the past tables were used to structure (lay-out) the entire page. There are many disadvantages with using tables, like they use more bytes of markup, they prevent incremental rendering, tables break text while copying, […]