Just a quick question: did you start your WebDriver on port 4444?
Because I replicated the error you received by simply disabling my chrome reverse.
[Behat\Mink\Exception\DriverException] Exception has been thrown in "beforeScenario" hook, defined in FeatureContext::windowSizeChange() Could not open connection: Curl error thrown for http POST to http://127.0.0.1:9515/session with params: {"desiredCapabilities":{"browserName":"chrome","version":"8","platform":"ANY","browserVersion":"8","browser":"firefox","name":"Behat test","deviceOrientation":"portrait","deviceType":"tablet","selenium-version":"2.31.0","max-duration":300}} Failed to connect to 127.0.0.1 port 9515: Connection refused [WebDriver\Exception\CurlExec] Curl error thrown for http POST to http://127.0.0.1:9515/session with params: {"desiredCapabilities":{"browserName":"chrome","version":"8","platform":"ANY","browserVersion":"8","browser":"firefox","name":"Behat test","deviceOrientation":"portrait","deviceType":"tablet","selenium-version":"2.31.0","max-duration":300}} Failed to connect to 127.0.0.1 port 9515: Connection refused
For selenium webdriver: java -jar selenium-server-standalone-<versionNumber>.jar -port 4444
For chrome rib: chromedriver --port=4444
For the operand: operadriver --port=4444
And also this segment in your FeatureContext.php?
default: extensions: Behat\MinkExtension: goutte: ~ base_url: 'http://localhost.dev/' javascript_session: selenium2 browser_name: firefox selenium2: ~
Because, if so, it is in the wrong place and should be in your behat.yml file.
source share