Using Selenium with JMeter

To use Selenium Webdriver with JMeter, install “Webdriver” plugins. The WebDriver sampler is useful if you want to test for performance AJAX or GWT based web applications.

Download WebDriver plugins from

Unzip the files and copy in the lib folder under JMeter home directory.

To test if WebDriver plugins installed open Jmeter and test if there is jp@gc – Firefox Driver Config.

*If not, check your JMeter’s lib folder.
 Selenium Webdriver SamplerAdd the Webdriver sampler and Firefox or chrome driver config element. Insert the following code to launch Bing search and search for a text. Also add tree listener to view the result.
var pkg = JavaImporter(org.openqa.selenium)
var support_ui = JavaImporter(
var wait = new support_ui.WebDriverWait(WDS.browser, 20000)
var searchField = WDS.browser.findElement('sb_form_q'))
var button = WDS.browser.findElement('sb_form_go'))
Explanation of the code
  • The code starts with the import Java packages “org.openqa.selenium” and “” which will allow you to use the WebDriver classes.
  • WDS.sampleResult.sampleStart() and WDS.sampleResult.sampleEnd() captures sampler’s time and will track it. You can remove them, the script will still work but you will not get load time
  • WDS.browser.get(‘’) – opens the browser with Bing search website
  • var searchField = WDS.browser.findElement(‘sb_form_q’)) – saves the search text box in searchField varialble
  • – Clicks the search field to make it active
  • searchField.sendKeys([‘testing’]) – Enters text to search
  • var button = WDS.browser.findElement(‘sb_form_go’)) – Saves search button in a variable
  • – clicks on the search button.

You are now ready to go. Do let us know your experience in using Selenium with JMeter

Monitoring windows server using JMeter plugin

JMeter plugin is the very much usefull in load testing. Long time back I had posted an article for monitoring windows server using Nagios. Now you do not require Nagios any more.  A JMeter plugin is available which can be used with JMeter to perform this. This plugin integrates with the JMeter tool.To install the JMeter Plugins, you simply have to copy the JMeterPlugins.jar file from inside JMETER_INSTALL_DIR/lib/ext. Now you can restart your JMeter and see jp@gc-prefixed plugins in menus.
The plugin can be downloaded from use the the Servers Monitoring Listener, you must also install the server agent on all servers which need to be monitored.You need to run JMeter 2.4 or above with a JRE 1.6 or above to use the plugin.
Update[20-Oct-2013]: The latest version of JMeter plugin is 1.1.1. and can be downloaded from the following location.
It requires JMeter 2.8 or above and JRE 1.6 or above.