Launch a new browser at every thread group iteration(Web driver sampler)

754 views
Skip to first unread message

prabhanjan

unread,
Jul 4, 2015, 12:07:35 PM7/4/15
to jmeter-...@googlegroups.com
Hi,
    I am using Jmeter web driver sampler version: 1.3.0. 
I require Jmeter to launch a new web driver browser at each iteration of the thread group. Right now we have a check box 'Create a new browser at start of every iteration' in the experimental tab of  Driver config element. By checking it, I get a error :
jmeter.JMeter: Uncaught exception:  java.lang.NoClassDefFoundError: org/openqa/selenium/os/Kernel32
at org.openqa.selenium.os.ProcessUtils.killWinProcess(ProcessUtils.java:133)
at org.openqa.selenium.os.ProcessUtils.killProcess(ProcessUtils.java:81)
at org.openqa.selenium.os.UnixProcess$SeleniumWatchDog.destroyHarder(UnixProcess.java:248)
at org.openqa.selenium.os.UnixProcess$SeleniumWatchDog.access$200(UnixProcess.java:200)
at org.openqa.selenium.os.UnixProcess.destroy(UnixProcess.java:124)
at org.openqa.selenium.os.CommandLine.destroy(CommandLine.java:153)
at org.openqa.selenium.firefox.FirefoxBinary.quit(FirefoxBinary.java:259)
at org.openqa.selenium.firefox.internal.NewProfileExtensionConnection.quit(NewProfileExtensionConnection.java:202)
at org.openqa.selenium.firefox.FirefoxDriver$LazyCommandExecutor.quit(FirefoxDriver.java:376)
at org.openqa.selenium.firefox.FirefoxDriver.stopClient(FirefoxDriver.java:322)
at org.openqa.selenium.remote.RemoteWebDriver.quit(RemoteWebDriver.java:477)
at com.googlecode.jmeter.plugins.webdriver.config.WebDriverConfig.quitBrowser(WebDriverConfig.java:269)
at com.googlecode.jmeter.plugins.webdriver.config.WebDriverConfig.threadFinished(WebDriverConfig.java:244)
at org.apache.jmeter.threads.JMeterThread$ThreadListenerTraverser.addNode(JMeterThread.java:612)
at org.apache.jorphan.collections.HashTree.traverseInto(HashTree.java:998)
at org.apache.jorphan.collections.HashTree.traverse(HashTree.java:980)
at org.apache.jmeter.threads.JMeterThread.threadFinished(JMeterThread.java:584)
at org.apache.jmeter.threads.JMeterThread.run(JMeterThread.java:315)
at java.lang.Thread.run(Unknown Source)

This occurs for all the browsers i tried. If i uncheck the above option, it works fine but my requirement is to launch a new browser at every iteration. Can anyone help?


and...@blazemeter.com

unread,
Jul 5, 2015, 4:05:23 AM7/5/15
to jmeter-...@googlegroups.com
Hi,

This might be a packaging issue. Could you please try following:
  1. Open a page http://search.maven.org/#search%7Cga%7C1%7Cfc%3Aorg.openqa.selenium.os.Kernel32
  2. Download JAR for 2.46.0
  3. Put this jar into jmeter/lib directory
  4. Try running your test again
  5. Let us know the result
This will help us to resolve it.
--
Andrey

prabhanjan

unread,
Jul 15, 2015, 10:50:18 AM7/15/15
to jmeter-...@googlegroups.com, and...@blazemeter.com
Hello Andrey,
                    I tried your solution by downloading and replacing the 2.46 jar. I had the same Jar previously. But I still get the above error. Looks like a Bug... Can you please give a fix?
--
Prabhanjan

manjil...@gmail.com

unread,
Sep 14, 2015, 5:56:35 AM9/14/15
to jmeter-plugins
I tried the steps mentioned by Andrey.  It didn't work.  Getting same error which Prabhanjan mentioned.

arunv...@gmail.com

unread,
Dec 12, 2015, 2:57:08 PM12/12/15
to jmeter-plugins
Hi,

I am also stuck at the same problem. 
My Scripts were working and suddenly I am getting this error now. Can someone help us out in this.

Thanks


On Saturday, 4 July 2015 21:37:35 UTC+5:30, prabhanjan wrote:

minhv...@gmail.com

unread,
Jan 30, 2016, 12:21:52 AM1/30/16
to jmeter-plugins
This error also took me 1 day for finding solution. Luckily, I found my answer. Hope it will help you guys:
The root cause because my JMeter missing some libraries used by org.openqa.selenium.os.Kernel32. I have to found and copy these libraries into JMeter/lib folder. Here they are:
- jna-4.2.1
- platform-3.5.1
We can find them from Maven Repository. Need understand why I missed them in JMeter libs and whether it's the good fix; but, my issue has been solved. 
I hope this will help you who also facing this error :)

Vincent Daburon

unread,
Jan 30, 2016, 8:45:04 AM1/30/16
to jmeter-plugins, minhv...@gmail.com
Hi,

I explain the need to add or change libraries at :
https://groups.google.com/forum/#!topic/jmeter-plugins/-YmtZEOxYco

Regards.
Vincent D.
Reply all
Reply to author
Forward
0 new messages