Question: I am getting error while using Firefox with WebDriver.

```
org.openqa.selenium.firefox.NotConnectedException: Unable to connect
to host 127.0.0.1 on port 7055 after 45000 ms.

```

* Firefox version:47.0
* Selenium:2.53.0
* Windows 10 64 bit

Is anyone getting a similar issue or any idea what is the solution for this? It's working fine with Chrome but with Firefox none of the URLs are getting loaded.

Answer: 
Unfortunately Selenium WebDriver 2.53.0 is not compatible with Firefox 47.0. The WebDriver component which handles Firefox browsers (`FirefoxDriver`) will be discontinued. As of version 3.0, Selenium WebDriver will need the `geckodriver` binary to manage Firefox browsers. More info [here](https://github.com/SeleniumHQ/selenium/issues/2110) and [here](https://github.com/SeleniumHQ/selenium/issues/1862).

Therefore, in order to use Firefox 47.0 as browser with Selenium WebDriver 2.53.0, you need to download the [Firefox driver](https://developer.mozilla.org/en-US/docs/Mozilla/QA/Marionette/WebDriver) (which is a binary file called `geckodriver` as of version 0.8.0, and formerly `wires`) and export its absolute path to the variable `webdriver.gecko.driver` as a system property in your Java code:

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

```

Luckily, the library [WebDriverManager](https://bonigarcia.dev/webdrivermanager/) can do this work for you, i.e. download the proper Marionette binary for your machine (Linux, Mac, or Windows) and export the value of the proper system property. To use this library, you need to include this dependency into your project:

```
<dependency>
    <groupId>io.github.bonigarcia</groupId>
    <artifactId>webdrivermanager</artifactId>
    <version>5.1.0</version>
</dependency>

```

... and then execute this line in your program before using WebDriver:

```
WebDriverManager.firefoxdriver().setup();

```

A complete running example of a JUnit 4 test case using WebDriver could be as follows:

```
public class FirefoxTest {

    protected WebDriver driver;

    @BeforeClass
    public static void setupClass() {
        WebDriverManager.firefoxdriver().setup();
    }

    @Before
    public void setupTest() {
        driver = new FirefoxDriver();
    }

    @After
    public void teardown() {
        if (driver != null) {
            driver.quit();
        }
    }

    @Test
    public void test() {
        // Your test code here
    }
}

```

Take into account that Marionette will be the only option for future (for WebDriver 3+ and Firefox 48+), but currently (version 0.9.0 at writing time) is not very stable. Take a look to the [Marionette roadmap](https://wiki.mozilla.org/Auto-tools/Projects/Marionette/Auto-tools/Projects/Marionette/Roadmap) for further details.

**UPDATE**

Selenium WebDriver **2.53.1** has been released on 30th June 2016. `FirefoxDriver` is working again with Firefox **47.0.1** as browser.
I eventually installed an additional old version of Firefox (used for testing only) to resolve this, besides my regular (secure, up to date) latest Firefox installation.

This requires webdriver to know where it can find the Firefox binary, which can be set through the `webdriver.firefox.bin` property.

What worked for me (mac, maven, `/tmp/ff46` as installation folder) is:

```
mvn -Dwebdriver.firefox.bin=/tmp/ff46/Firefox.app/Contents/MacOS/firefox-bin verify

```

To install an old version of Firefox in a dedicated folder, create the folder, open Finder in that folder, download the Firefox dmg, and drag it to that Finder.