简体   繁体   English

Jmeter:jp @ gc - WebDriver采样器

[英]Jmeter : jp@gc - WebDriver Sampler

My self facing the same issue in Jmeter. 我自己在Jmeter中遇到了同样的问题。 Mozilla firefox is opening automatically and the given URL is not get opening automatically. Mozilla firefox会自动打开,并且给定的URL不会自动打开。

My Test plan is Thread Group jp@gc - Firefox Driver Config jp@gc - WebDriver Sampler View Results in Table 我的测试计划是线程组jp @ gc - Firefox驱动程序配置jp @ gc - WebDriver采样器查看表中的结果

Webdriver sampler has the following code: Webdriver sampler具有以下代码:

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 我正在使用,Jmeter - 3.1版本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 您将无法将Firefox 50.1.0jmeter-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: 正如您所看到的那样,即Maven Repository WebDriver Sampler插件版本1.4.0依赖于Selenium库2.52.0,根据Selenium changelog,您可以使用以下Firefox版本:

This driver has been tested with Firefox 44 (current release), 43 (immediately prior release), 38 (current ESR release), and 31 (immediately prior ESR release). 此驱动程序已经过Firefox 44(当前版本),43(紧接在前发布),38(当前ESR版本)和31(紧接ESR发布之前)的测试。

So the options are in: 所以选项包括:

  1. Downgrade your Firefox to version 44. 将Firefox降级到版本44。
  2. Manually upgrade your Selenium Java libraries to version 3.0.1 手动将Selenium Java库升级到3.0.1

See The WebDriver Sampler: Your Top 10 Questions Answered article for the form of WebDriver Sampler FAQ. 有关WebDriver Sampler FAQ的表单,请参阅WebDriver采样器:您回答的十大问题文章。

Yes, It is common when you use firefox different versions. 是的,当你使用firefox不同版本时很常见。 Downgrade firefox to some versions like 44 or 45. Actually firefox 45.0 worked for me. 将firefox降级到44或45等版本。其实firefox 45.0对我有用。 And most important is the firefox should be installed in default directory (in windows "C:\\Program Files\\Mozilla Firefox" this will be the default). 而最重要的是firefox应该安装在默认目录中(在Windows“C:\\ Program Files \\ Mozilla Firefox”中这将是默认的)。 Hope it should work fine with you. 希望它能与你合作。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

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