1

I was using jmeter with jp@gc - WebDriver Sampler plugin on Chrome driver. When I set thread count to 100 it will open 100 browsers. Is there any way to open the browser 1 after another?

Below is the code:

var pkg = JavaImporter(org.openqa.selenium);
WDS.sampleResult.sampleStart()

WDS.browser.get('https://www.XXXX.com/dp/B087X9X2JZ')
java.lang.Thread.sleep(10000);
var searchField = WDS.browser.findElement(pkg.By.id('ebooksSitbLogo')); //saves search field into searchField
searchField.click();
java.lang.Thread.sleep(10000);
WDS.sampleResult.sampleEnd()
1
  • First of all you can get the best recommendations for this in 'jmeter.log'.

Follow the given steps:

solution for Firefox browser

  • Add given line in system.properties file (located in the /bin folder of your JMeter installation)

    webdriver.firefox.bin=/path/to/your/firefox.exe

  • locate all duplicate http* libraries like httpcore*.jar httpmime.jar etc. and remove the ones with lesser version

  • restart JMeter to pick the property and the changes up
  • You can also refer this docs :https://www.blazemeter.com/blog/webdriver-sampler-your-top-ten-questions-answered

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.