【发布时间】:2017-11-13 19:50:37
【问题描述】:
对量角器很陌生,但这个让我很难过。
在 Windows 10 上运行 Angular 1.5.0。
我希望能够从命令行覆盖在我的 config.js 文件中指定的浏览器。在挖掘之后,我发现使用以下是如何做到的: 量角器 --capabilities.browserName='x' config.js
但是,如果我尝试使用 firefox,则会启动 chrome,如果我尝试启动 IE(使用 --capabilities.browserName='internet explorer',则会收到关于只有一个配置文件的错误。
我还尝试将垃圾作为浏览器名称并启动 chrome - 所以看起来 chrome 是默认设置,从使用 selenium 我必须指定 IE 驱动程序服务器(实际上是 chrome 驱动程序)的路径 - 是量角器一样吗?
以下是配置文件供参考 - 它非常基本(就像我说的我还在学习量角器)
var HtmlReporter = require('protractor-beautiful-reporter');
exports.config = { 框架:'茉莉花',
capabilities: {
'browserName': 'chrome'
},
seleniumAddress: 'http://localhost:4444/wd/hub',
specs: ['LA1-310-Q4.js'],
baseUrl: 'http://localhost:4200',
onPrepare: function() {
jasmine.getEnv().addReporter(new HtmlReporter({
baseDirectory: 'reports2/'
}).getJasmine2Reporter());
}
};
【问题讨论】:
标签: protractor