简体   繁体   English

量角器启动 Firefox 但不运行任何测试

[英]Protractor starts Firefox but doesn't run any tests

If I run protractor agains Firefox, Firefox is started and a blank tab is shown.如果我再次运行量角器 Firefox,Firefox 将启动并显示一个空白选项卡。 Which is all I get (no specs are executed).这就是我得到的(没有执行规范)。 After a while I get the following error:一段时间后,我收到以下错误:

WebDriverError: Unable to connect to host 127.0.0.1 on port 7055 after 45000 ms. Firefox console output:
"}],"targetPlatforms":[],"seen":true}
...

Now, I've also written a script which uses selenium webdriver directly, which works like a charm with FF.现在,我还编写了一个直接使用 selenium webdriver 的脚本,它对 FF 来说就像一个魅力。 So, the problem must be protractor specific I would say!所以,我会说这个问题必须是量角器特定的!

So, here is my protractor config file:所以,这是我的量角器配置文件:

require('babel-core/register'); // Spec files are in ES2015

exports.config = {
    framework: 'jasmine2',
    capabilities: {
        browserName: 'firefox'
    },
    specs: ['some.spec.js']
};

It doesn't matter if I start webdriver-manager and geckodriver I always end up with a blank tab.如果我启动webdriver-managergeckodriver并不重要,我总是以空白标签结束。 Any suggestions what I might be doing wrong here?有什么建议我可能在这里做错了吗?

Some more details:更多细节:

"babel-cli": "^6.18.0",
"babel-preset-es2015": "^6.18.0",
"babel-preset-stage-0": "^6.16.0",
"protractor": "^5.0.0",
"selenium-webdriver": "^3.0.1"

FF 50 Mac, macOS Sierra 10.12.2 FF 50 Mac,macOS Sierra 10.12.2

We recommend using Firefox 47. If you are on Protractor 5.0.0, you will need an additional capability to disable marionette.我们建议使用 Firefox 47。如果您使用的是 Protractor 5.0.0,则需要额外的功能来禁用牵线木偶。 Disabling marionette will let you use the Firefox legacy driver:禁用牵线木偶将让您使用 Firefox 旧版驱动程序:

capabilities: {
  browserName: 'firefox',
  marionette: false
}

Geckodriver is currently downloaded but is not being used by Protractor due to FF 48+ errors / selenium standalone server errors. Geckodriver 当前已下载,但由于 FF 48+ 错误/ selenium 独立服务器错误,Protractor 未使用。 Check out the Protractor CHANGELOG .查看量角器 更改日志 We will update this with recommended FF versions when it becomes more stable.当它变得更稳定时,我们将使用推荐的 FF 版本更新它。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM