O'Reilly logo

Mastering Selenium WebDriver by Mark Collin

Stay ahead with the world's most comprehensive technology and business learning platform.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, tutorials, and more.

Start Free Trial

No credit card required

Extending our capabilities by using a Selenium Grid

Since we already have a working Maven implementation, let's enhance it so that it can connect to a Selenium Grid. These enhancements will enable you to connect to any Selenium Grid, but we are going to specifically look at connecting to a third-party service provided by Sauce Labs since it offers a free tier. Let's have a look at the modifications we need to make to our TestNG code.

We will start off with the modifications to our POM; first of all we are going to add some properties that we can configure on the command line:

<properties> <project.build.sourceEncoding>UTF-8</project.build.sourceEncoding> <project.reporting.outputEncoding>UTF-8</project.reporting.outputEncoding> <!-- Dependency versions ...

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, interactive tutorials, and more.

Start Free Trial

No credit card required