behat mink selenium2 errors

revision 1d290aa2de7a249c077e884127c4845d91bda356

raw

phork0.rst

Error: Unable to create new service: GeckoDriverService

Behat\Mink\Exception\DriverException: Could not open connection: Unable to create new service: GeckoDriverService
Build info: version: '3.6.0', revision: '6fbf3ec767', time: '2017-09-27T16:15:40.131Z'
System info: host: 'gpc-rom', ip: '127.0.1.1', os.name: 'Linux', os.arch: 'amd64', os.version: '4.12.3cw', java.version: '1.8.0_131'
Driver info: driver.version: unknown

Caused by
WebDriver\Exception\SessionNotCreated: Unable to create new service: GeckoDriverService
Build info: version: '3.6.0', revision: '6fbf3ec767', time: '2017-09-27T16:15:40.131Z'
System info: host: 'gpc-rom', ip: '127.0.1.1', os.name: 'Linux', os.arch: 'amd64', os.version: '4.12.3cw', java.version: '1.8.0_131'
Driver info: driver.version: unknown

Reason

Selenium server does not know where to find the firefox binary (even though it is in $PATH and in the standard /usr/bin/firefox on Ubuntu 17.04)

Solution

Pass the firefox path when starting selenium server:

$ java -jar -Dwebdriver.gecko.driver=/usr/bin/firefox selenium-server-standalone-3.6.0.jar

History