Home  >  Article  >  Java  >  How to Use Selenium 2.53 with Firefox 47?

How to Use Selenium 2.53 with Firefox 47?

Barbara Streisand
Barbara StreisandOriginal
2024-11-12 04:19:02316browse

How to Use Selenium 2.53 with Firefox 47?

Selenium 2.53 and Firefox 47 Compatibility Issues

Selenium WebDriver 2.53 is not compatible with Firefox 47. This is because the FirefoxDriver component for handling Firefox browsers is being phased out. In fact, Selenium WebDriver 3.0 requires the geckodriver binary to manage Firefox browsers.

Solution:

To use Firefox 47 with Selenium WebDriver 2.53:

  • Method 1: Use WebDriverManager

Include the WebDriverManager library in your project, execute:

WebDriverManager.firefoxdriver().setup();
  • Method 2: Manually Set Selenium Property

Define the absolute path to the geckodriver binary:

System.setProperty("webdriver.gecko.driver", "/path/to/geckodriver");

Note:

  • WebDriverManager automatically sets the system property.
  • Marionette is the only option for Selenium WebDriver 3 and Firefox 48 .
  • Selenium WebDriver 2.53.1 has been released, restoring compatibility with Firefox 47.0.1.

The above is the detailed content of How to Use Selenium 2.53 with Firefox 47?. For more information, please follow other related articles on the PHP Chinese website!

Statement:
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn