0
votes

I am running Jmeter with the Webdriver plugin installed on Windows 7. My current test plan contains the Webdriver sampler and Firefox driver config. When I try to run the test plan, nothing happens. There is nothing recorded in the View Results Tree window, and the remaining test indicator in the top right hand corner counts down to 0 without anything happening.

When I deactivate the Webdriver Sampler and Firefox driver config elements, the remaining tests run without a problem.

Is there a bug with this software, or am I missing something? My code is below, if that helps.

var pkg = JavaImporter(org.openqa.selenium)

WDS.sampleResult.sampleStart()

WDS.browser.get('https://test.test.test.test') var username =

WDS.browser.findElement(pkg.By.id('USERNAME')).sendKeys([WDS.args[0]])

var password =

WDS.browser.findElement(pkg.By.id('PASSWORD')).sendKeys([WDS.args[1])

WDS.sampleResult.sampleEnd()

I have installed firefox 26, as this is the recommended supported browser, so it's not that there's no compatible browser.

My main question is this - Why doesn't the browser window open? Why do the other tests in the test plan fail to run when the config elements are active?

2

2 Answers

1
votes

In 99% of cases the answer should be in jmeter.log file. In the meantime a couple of recommendations:

  • add the following line to system.properties file (lives in the /bin folder of your JMeter installation)

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

    See https://code.google.com/p/selenium/wiki/FirefoxDriver page for other Firefox-related properties

  • 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

Check out The WebDriver Sampler: Your Top 10 Questions Answered guide for other tips and tricks

0
votes

You need to make sure you provided the full path of the Firefox driver in the jp@gc config element.

enter image description here