Failed to connect to binary FirefoxBinary with Selenium in Maven

When I encounter this error it's usually one of two things.

The Selenium version does not support the browser version Double check the Selenium/browser versions are the same when ran from Eclipse vs Maven. Double check Eclipse and Maven are configured to use the same Selenium version. This occurred for me when my browser auto updates so I turned that off in the browser.

The Selenium tests are running in headless mode Unlikely if your manually executing mvn on the same machine as Eclipse. This occurred for me when running Selenium through Maven on my Jenkins server. The Jenkins server was running in headless mode. Took me minute to figure out the headless stuff, think I set a DISPLAY env variable in Linux or something.


I figured out where the problem was.

I loaded some extensions to add to the FirefoxProfile I use to instantiate the FireFoxDriver. These plugins where located under Java/main/resources. In Eclipse everything worked fine, but I couldn't access these plugins through Maven. After copying these files to a temporary folder, and load them from there it worked even from Maven.

Thanks for your Help