Vivek Mahajan
Vivek Mahajan

Reputation: 521

Selenium Firefox WebDriver

I am using following in my program on ubuntu:

this.mDriver = new FirefoxDriver();

then

driver.get("http://test.com");

I get an error message meaning to say that the Firefox version used is the latest and I need to use an older version.

I downloaded Firefox and extracted it. Added it to the path.

I modified the code as follows:

WebDriver driver = new FirefoxDriver(new FirefoxBinary(new File("/opt/firefox16/firefox")), profile);

When I execute /opt/firefox16/firefox from the terminal, it starts the browser.

But when I execute the WebDriver code lines above, It still does not invoke the Firefox browser. I don't get any error messages.

Please, can someone guide me on how to start Firefox when the WebDriver is created and executed?

Upvotes: 0

Views: 1988

Answers (1)

James Dunn
James Dunn

Reputation: 8284

The problem you are having is a common one. All too often a new version of Firefox will not work with the latest version of Selenium Firefox WebDriver.

The solution is to use compatible versions of Firefox and Selenium Firefox WebDriver.

I recommend the following:

  • Version 2.33.0 for Selenium Firefox WebDriver
  • Version 18.0.2 for Firefox

This combination has always worked well for me.

You can also see which version of Selenium Firefox WebDriver is (theoretically) compatible with which versions of Firefox in the Release Notes.

Upvotes: 7

Related Questions