Display the HAR format

Problem We have seen the HAR (Http ARchive) format as the output from the BrowserMob proxy implementation and the NetExport implementation. The HAR file contains a log with requests and responses to the server. The […]

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 […]

Expose methods

We can expose methods in order to reduce duplicated code. We are able to call the method multiple times. This will ensure a better maintainable test code, because we only have to make adjustments and […]

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 […]