Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Firefox WebDriver: Failed to connect to binary

I have a WebDriver based Java testsuite, which I try to execute with Jenkins. Project is imported and build was successful.

During execution of test I get following:

Running TestRunner Configuring TestNG with: org.apache.maven.surefire.testng.conf.TestNG652Configurator@2437c6dc org.openqa.selenium.firefox.NotConnectedException: Unable to connect to host 127.0.0.1 on port 7055 after 45000 ms. Firefox console output

It seems doesn't found binary, but it is located in the given path.

Failed tests: runBeforeTest(TestRunner): Failed to connect to binary FirefoxBinary(/home/user1/Desktop/firefox/firefox-bin) on port 7055; process output follows: (..)

Before execution I started a X server.

Xvfb :19 -screen 0 1024x768x16 &
export DISPLAY=:19
firefox &

Versions:

Ubuntu 16.04.3
Selenium 2.53.1
Firefox 55.0
Jenkins 2.60.3
like image 440
plaidshirt Avatar asked Oct 30 '22 03:10

plaidshirt


1 Answers

This is likely to be a version mismatch between Selenium and Firefox.

According to a comment on one of their GitHub issues, Selenium 2.53.1 is known to work well with Firefox 47.0.1.

https://github.com/SeleniumHQ/selenium/issues/2527

To keep using Firefox 55, you need to use a higher version of Selenium (if it's already supported).

like image 155
Luciano van der Veekens Avatar answered Nov 09 '22 07:11

Luciano van der Veekens