Wong mendem
Wong mendem

Reputation: 151

Is Selenium 2.52.0 Compatible With Firefox 51.0.1?

I'm writing program in Java and I need to record user interaction through browser. I use Selenium 2.52.0 and I plan to use Browsermob in order to record HTTP request.

Here is a simple code to run Selenium

public static void main(String...args) {    
    WebDriver driver  = new FirefoxDriver();
    driver.navigate().to("http://localhost/stres.php");
    String appTitle = driver.getTitle();
    System.out.println("Application title is :: "+appTitle);
    driver.quit();
}

The Firefox browser run, but it didn't go to the specified address and only showed a blank white page. Then I got the following error

at org.openqa.selenium.firefox.internal.NewProfileExtensionConnection.start(NewProfileExtensionConnection.java:113)
    ... 7 more
------------------------------------------------------------------------
BUILD FAILURE
------------------------------------------------------------------------
Total time: 52.803s
Finished at: Sun Feb 12 17:41:42 ICT 2017
Final Memory: 7M/153M
------------------------------------------------------------------------
Failed to execute goal org.codehaus.mojo:exec-maven-plugin:1.2.1:exec (default-cli) on project mavenproject1: Command execution failed. Process exited with an error: 1 (Exit value: 1) -> [Help 1]

To see the full stack trace of the errors, re-run Maven with the -e switch.
Re-run Maven using the -X switch to enable full debug logging.

For more information about the errors and possible solutions, please read the following articles:
[Help 1] http://cwiki.apache.org/confluence/display/MAVEN/MojoExecutionException

Is Selenium Webdriver 2.52.0 compatible with Firefox 51.0.1? If not, what version of Firefox work with Selenium 2.52.0?

Upvotes: 1

Views: 5078

Answers (3)

Mounika Medipelli
Mounika Medipelli

Reputation: 61

It is compatible, but we need to add the gecko driver like we are adding for chrome driver and we need to set the path for it.

System.setProperty("webdriver.gecko.driver","path where the driver is present");
WebDriver driver = new FirefoxDriver();
driver.get("www.google.com");

Upvotes: 0

mosaad
mosaad

Reputation: 2381

Short answer: No it is not compatible, use firefox 46 or older.

This is because Firefox started using gecko from firefox 47 and selenium needs a driver to work with it. So from Firefox 47 and over you need to have the geckodriver. You can get it from here. Also You need to be using selenium 3.0 or later.

Upvotes: 2

Kumar S
Kumar S

Reputation: 1

To launch latest version of Firefox Browser using Selnium, we need to set a system property “webdriver.gecko.driver” to the path of executable file “geckodriver.exe”

Check this post.

Upvotes: 0

Related Questions