JMeter WebDriver Issue with Closing Browser

I have been playing a bit with using WebDriver (Jmeter-plugins) from within JMeter. Usually something I abhorr but it does have the occasionto do was restarting the browser (Firefox) every thread loop. This ended up in a failure every time it tried to close the browser.

The error looked like this:

2016/03/11 13:18:00 ERROR - jmeter.JMeter: Uncaught exception:  java.lang.NoClassDefFoundError: org/openqa/selenium/os/Kernel32
    at org.openqa.selenium.os.ProcessUtils.killWinProcess(
    at org.openqa.selenium.os.ProcessUtils.killProcess(
    at org.openqa.selenium.os.UnixProcess$SeleniumWatchDog.destroyHarder(
    at org.openqa.selenium.os.UnixProcess$SeleniumWatchDog.access$200(
    at org.openqa.selenium.os.UnixProcess.destroy(
    at org.openqa.selenium.os.CommandLine.destroy(
    at org.openqa.selenium.firefox.FirefoxBinary.quit(
    at org.openqa.selenium.firefox.internal.NewProfileExtensionConnection.quit(
    at org.openqa.selenium.firefox.FirefoxDriver$LazyCommandExecutor.quit(
    at org.openqa.selenium.firefox.FirefoxDriver.stopClient(
    at org.openqa.selenium.remote.RemoteWebDriver.quit(
    at com.googlecode.jmeter.plugins.webdriver.config.WebDriverConfig.quitBrowser(
    at com.googlecode.jmeter.plugins.webdriver.config.WebDriverConfig.threadFinished(
    at org.apache.jmeter.threads.JMeterThread$ThreadListenerTraverser.addNode(
    at org.apache.jorphan.collections.HashTree.traverseInto(
    at org.apache.jorphan.collections.HashTree.traverse(
    at org.apache.jmeter.threads.JMeterThread.threadFinished(
    at Source)


Cryptic and no clue what’s going on really. But fret not, just install these two libraries into JMeter (jmeter/lib):

Restart JMeter and all should be hunky-dory!

by Oliver Erlewein

3 thoughts on “JMeter WebDriver Issue with Closing Browser

  1. Hi, I came across your site while searching for a solution for this error. Your fix didn’t work for me…may I ask what version of Firefox, JMeter, and Webdriver plugin you’re using?

    • Hi G,
      So I did this a while ago and I no longer have access to where I did this.. So I think I used Jmeter 2.13, JMeter-plugins 1.31. Firefox 38.0 (but I could be miles off with that). Hope that helps.
      Check that you have those files in the right directory and that access rights are matching (if not Windows).
      Cheers Oliver

Leave a Reply

Fill in your details below or click an icon to log in: Logo

You are commenting using your account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s