Selenium 与远程浏览器通信时出错。它可能已经死了

Selenium Error communicating with the remote browser. It may have died

当我尝试使用 behat 进行 运行 我的功能测试时,我遇到了 selenium 问题,我的测试之前工作得很好,我只安装了 php7 而不是 php5 我不不知道这是否是问题的原因我也将我的 ubuntu 升级到 16.04。

这是我收到的错误消息:

有人可以帮我解决这个问题吗?

您需要从 here and Looking at the examples at this

下载最新的 geckodriver

看来您需要做的是在以下所需功能中将 marionette 设置为 true :-

$capabilities->setCapability('marionette', true);

示例:

$host = 'http://localhost:4444/wd/hub';
$capabilities = DesiredCapabilities::firefox();
$capabilities->setCapability('marionette', true);
$driver = RemoteWebDriver::create($host, $capabilities, 5000);