量角器启动Firefox,但不运行任何测试 [英] Protractor starts Firefox but doesn't run any tests

查看:185
本文介绍了量角器启动Firefox,但不运行任何测试的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

如果我再次运行量角器Firefox,则启动Firefox并显示一个空白选项卡。我得到的是(没有规格执行)。一段时间后,我得到以下错误:

  WebDriverError:45000毫秒后无法连接到端口7055上的主机127.0.0.1。 Firefox控制台输出:
}],targetPlatforms:[],seen:true}
...



现在,我也写了一个直接使用selenium webdriver的脚本,这个脚本就像FF的魅力一样,所以问题一定是量角器的具体问题,我会说!



因此,这是我的量角器配置文件:

$ p $ require('babel-core / register'); // spec文件在ES2015

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

不管我是否启动 webdriver-manager geckodriver

一些更详细的信息:

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

FF 50
Mac,macOS Sierra 10.12.2

解决方案

你在Protractor 5.0.0上,你将需要一个额外的功能来禁用木偶。禁用木偶将允许您使用Firefox旧版驱动程序:

 功能:{
browserName:'firefox',
$ marionette:false
}

Geckodriver目前已下载,但未被量角器使用由于FF 48 +错误/硒独立服务器错误。查看量角器 CHANGELOG 。当它变得更加稳定的时候,我们会用推荐的FF版本来更新它。


If I run protractor agains Firefox, Firefox is started and a blank tab is shown. 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. 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. 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

解决方案

We recommend using Firefox 47. If you are on Protractor 5.0.0, you will need an additional capability to disable marionette. Disabling marionette will let you use the Firefox legacy driver:

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. Check out the Protractor CHANGELOG. We will update this with recommended FF versions when it becomes more stable.

这篇关于量角器启动Firefox,但不运行任何测试的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆