Skip to content


The WebDriver executes real web browser interactions with your web-application. Running WebDriver virtual users alongside with HTTP virtual users allows to capture both network and real-user experience performance metrics. The WebDriver action uses the JMeter WebDriver sampler under the hood. It simulates real browser interactions by launching a web browser like Firefox.

WebDriver Action

The Selenium WebDriver action has several configuration options:

  • Name: the name of the action. This name appears in test results,
  • Script: contains the Selenium webdriver script to execute,
  • Script Language: Defines the script language (Java, Javascript and more),
  • Requests and Responses: when executing a virtual user validation, it shows the played request and the received server response.

WebDriver Action WebDriver script edition

For more advanced usage of the web driver action, it is recommended to look at the official documentation.

Performance consideration

We take care of the infrastructure. But, launching real browser to gather end-user experience performance metrics consumes a lot of resources. As a consequence, the number of concurrent WebDriver virtual users has been drastically limited.

We strongly recommend running only a single WebDriver virtual user to collect real browser metrics during a load test. The purpose of this kind of virtual user is not to simulate the load. Load must always be simulated using regular HTTP actions.

Advanced script example

This script is a more advanced example created on our demonstration application:

import openqa.selenium.OutputType.*;
import org.openqa.selenium.*;

// Required to start counting time which will get reported at the end of this code.

// Load the login page

// Entering login and password
WDS.browser.findElement("username")).sendKeys( new String[] { "user1" } );
WDS.browser.findElement("password")).sendKeys( new String[] { "pass1" } );
WebElement signon = WDS.browser.findElement("signon"));;

//Waiting for the logout link to appear as confirmation
WebDriverWait waitLogin = new WebDriverWait(WDS.browser, 30);
waitLogin.until(ExpectedConditions.elementToBeClickable(By.linkText("Sign Out")));

// End the test sampler, capturing length of time for the test.