To learn how to run Java Selenium scripts in Perfecto, review the following information.

To run a Selenium WebDriver test with Java in Perfecto, you should:

  • Be familiar with Selenium
  • Have existing tests to work with
  • Be a novice user of Perfecto

The setup process involves modifying your existing scripts to include:

  • What driver you want to use
  • Where your Perfecto instance is located 
  • Who you are
  • What devices you want to work on

We provide two versions of the same script to help you understand how you can modify your existing scripts to run them in and

For information on running the final script, see the file included with the sample project.

Important: This document includes references to third-party products, Eclipse IDE and IntelliJ IDEA. The user interface and usage of third-party products are subject to change without notice. For the latest published information about Eclipse IDE, see For the latest published information about IntelliJ IDEA, see


Before you get started, make sure you have installed the following:

1 | Get started

As a starting point, we will look at This is an example of a simple Selenium script that opens the website and verifies the title on the page.

The pom.xml file in the PerfectoSampleProject contains many additional dependencies. Your project pom.xml file may look different.

To run the sample project: 

  1. Access the sample project in GitHub:
  2. Clone the project locally, to the location of your choice, or download the project as a ZIP file (in this case, you need to extract the .zip file before using the project).
  3. Open the project in the IDE of your choice (for example, IntelliJ Idea).
  4. Run the test as TestNG Test.

2 | Configure the script for Perfecto

In this step, we will look into the changes that you need to perform to be able to run the same test on Perfecto.

You will need to update the pom.xml file with the Perfecto dependencies and add security information, the Perfecto cloud name, driver details, Smart Reporting information, and test data. The updated script example is called You can find it in the same sample project that we downloaded in 1 | Get started.

The following procedure walks you through the configuration.

Expand a step to view its content.