简体   繁体   中英

Jmeter : jp@gc - WebDriver Sampler

My self facing the same issue in Jmeter. Mozilla firefox is opening automatically and the given URL is not get opening automatically.

My Test plan is Thread Group jp@gc - Firefox Driver Config jp@gc - WebDriver Sampler View Results in Table

Webdriver sampler has the following code:

var pkg = JavaImporter(org.openqa.selenium)
var support_ui = JavaImporter(org.openqa.selenium.support.ui.WebDriverWait)
var wait = new support_ui.WebDriverWait(WDS.browser, 5000)
WDS.sampleResult.sampleStart()
WDS.browser.get('http://login.salesforce.com')
WDS.sampleResult.sampleEnd()

And I am using, Jmeter - 3.1 version Mozilla Firefox - 50.1.0 jmeter-plugins-webdriver- 1.4.0 jmeter-plugins-manager- 0.11

Please give me some solutions. Thanks in advance.

You won't be able to use Firefox 50.1.0 with the jmeter-plugins-webdriver- 1.4.0

As you can see from ie Maven Repository WebDriver Sampler plugin version 1.4.0 depends on Selenium libraries 2.52.0 and according to Selenium changelog you can use the following Firefox versions:

This driver has been tested with Firefox 44 (current release), 43 (immediately prior release), 38 (current ESR release), and 31 (immediately prior ESR release).

So the options are in:

  1. Downgrade your Firefox to version 44.
  2. Manually upgrade your Selenium Java libraries to version 3.0.1

See The WebDriver Sampler: Your Top 10 Questions Answered article for the form of WebDriver Sampler FAQ.

Yes, It is common when you use firefox different versions. Downgrade firefox to some versions like 44 or 45. Actually firefox 45.0 worked for me. And most important is the firefox should be installed in default directory (in windows "C:\\Program Files\\Mozilla Firefox" this will be the default). Hope it should work fine with you.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM