Firefox 打开但没有使用量角器输入 URL,Chrome 工作正常

Firefox opens but no URL is entered using Protractor, Chrome works fine

当我尝试在 Firefox 上 运行 我的量角器测试时,Firefox 打开但没有输入 url,一段时间后我在 cmd 上收到以下错误:

Using FirefoxDriver directly...

[launcher] Running 1 instances of WebDriver

ERROR - Unable to start a WebDriver session.

C:\Users\XYZ\AppData\Roaming\npm\node_modules\protractor\node_modules\selen
ium-webdriver\http\util.js:87

          Error('Timed out waiting for the WebDriver server at ' + url));
Error: Timed out waiting for the WebDriver server at http://127.0.0.1:65288/hub

但是当我将其更改为 'chrome' 时,它工作正常。 Selenium 服务器在 http://localhost:4444/wd/hub 启动,我认为量角器正在寻找服务器的端口是错误的。如果是这样,我该如何纠正?

好的,所以我尝试使用 seleniumAddress: 'http://127.0.0.1:4444/wd/hub',而不是 directConnect: true。它对我有用。 我的 Firfox 版本是 36.01,Webdriver 是 2.45。