0

I am working with JMeter and Selenium. Installed the plugins manager and via that, installed web-driver sampler. When I look into lib folder, I found the selenium jars version are 2.52.0 which is much older. I can able to work with that without any issues. But the real problem is:

Using Maven, I updated all the selenium jars to 3.9.1 version and its dependant jars like guava, gson, commons, etc.

Now, when I open the jmx files with WebDriver sampler and driver configs, I receive below error.

enter image description here

Using maven, I mean, I downloaded all the jars from maven repo manually and pasted into JMeter lib folder.

Please help me to work with latest Selenium drivers in JMeter.

Bala
  • 184
  • 3
  • 19

1 Answers1

1

You won't be able to use WebDriver Sampler plugin with Selenium 3.9.1 as it explicitly relies on SessionNotFoundException class which has been removed in the latest Selenium libraries.

So the options are in:

  1. Use WebDriver Sampler with browser version(s) supported by Selenium 2.52.0
  2. Reach out to WebDriver Sampler plugin developers and/or maintainers at jmeter-plugins forum to check whether it is planned to update Selenium libraries and if yes - when. You can also update WebDriver Sampler source code by yourself and send pull request to the plugin maintainer.
  3. Switch to JSR223 Sampler and Groovy language instead. Apart from being able to use latest libraries you will have full control of the WebDriver instance using DesiredCapabilities at full instead of limited subset exposed via *Driver Config elements.
Dmitri T
  • 159,985
  • 5
  • 83
  • 133
  • Thanks for your comments. Could you please explain "full control of the WebDriver instance using DesiredCapabilities" ?? where can I define the capabilities in Web driver sampler ?. I currenlty edited the InternetExplorerDriverConfig.class file and added some more capabilities under Capabilities createCapabilities() method. But it doesnt work for me. – Bala Apr 06 '18 at 06:26
  • Hi Dmitri, here in this [Question](https://stackoverflow.com/questions/49239525/how-to-use-chromeoption-and-desirecapabilities-in-jmeter-webdriver-sampler), you have told about re-building the Plugin. Please tell me how to re-build that after the patch. – Bala Apr 09 '18 at 05:50
  • `mvn package` from the root of jmeter-plugins cloned repository – Dmitri T Apr 09 '18 at 07:14