Webdriver Test

In order to create a Selenium based functional test, you can set up a Webdriver Sampler in JMeter and upload it to BlazeMeter or you can use BlazeMeter's Webdriver Test feature.  

How to Configure the Test

You need two things to create a Webdriver Test:

1. A Selenium script (Written according to the WDS Javascript syntax detailed in this wiki page).

2. A standard test configuration.

The Selenium Script

Notice that you are able to add Selenium scripts per label so you could get a more informative report, and see the results per test or per label\s.

If you need a kick start, you may copy and paste the below selenium script and generate a webdriver test in no time.

var pkg = JavaImporter(org.openqa.selenium); //WebDriver classes
var support_ui = JavaImporter(;//WebDriver classes
var wait = new support_ui.WebDriverWait(WDS.browser, 5000);

WDS.sampleResult.sampleStart();//captures sampler’s start time
WDS.sampleResult.getLatency();"Sample started");

WDS.browser.get('')//opens website specified in ''"Sample ended - navigated to");

var searchField = WDS.browser.findElement('search_form_input_homepage'))//saves search field into searchField search field
searchField.sendKeys(['blazemeter'])//types word “blazemeter” in field"Searched for BlazeMeter");

var button = WDS.browser.findElement('search_button_homepage'))//Find Search button Search Button"Clicked on the search button");

var link = WDS.browser.findElement(pkg.By.cssSelector('#r1-0 > div > h2 > a.result__a > b'))//also saves selector as variable but uses CSS. the search result's Link


A friendly and prompt view of the selenium scripts per each label can be viewed by hovering over the 'Eye' icon as seen below.

The Standard Test Configuration

Here's a breakdown of each property:

  • Users: Select the number of users you want. The engines and thread are adjusted automatically according to this number.
  • Engines and Threads: If you dont want these to be set automatically, you can manually set them by unchecking the 'Users' section. Note: Free-tier users dont have access to engines and are limited to 50 threads.
  • Ramp Up: Select how fast you want the test to ramp up.
  • Iterations: Select the number of iterations in the test. Note: this is automatically set to infinitive
  • Duration: Set the full time duration that you want the test to run
  • Delay: Set the time delay between each page request.
  • Limit RPS: Set the number of requests per second you don't want to go over.

That's it! You're ready to run your Webdriver test!

Want to learn more? Read our blog post, 6 Easy Steps to Testing Your Chrome Extension With Selenium.
Have more questions? Submit a request


Article is closed for comments.