Failed to connect to binary FirefoxBinary with Selenium in Maven Failed to connect to binary FirefoxBinary with Selenium in Maven selenium selenium

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 versionDouble 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 modeUnlikely 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


Trying Adding this to your pom

UPDATED:

<dependency>    <groupId>org.seleniumhq.webdriver</groupId>    <artifactId>selenium-firefox-driver</artifactId>    <version>2.XX.X</version></dependency><dependency>    <groupId>org.seleniumhq.selenium</groupId>    <artifactId>selenium-server</artifactId>    <version>2.XX.X</version></dependency>