use*_*512 2 testing node.js angularjs internet-explorer-11 protractor
我正试图在IE11上运行我的茉莉E2E测试,但没有运气或任何东西.我在Windows 8.1上.我的配置:
exports.config = {
directConnect: true,
// Capabilities to be passed to the webdriver instance.
capabilities: {
'browserName': 'chrome'
},
// run in multiple browsers
multiCapabilities:[
// {
// 'browserName': 'chrome'
// },
// {
// 'browserName': 'firefox'
// },
{
'browserName': 'internet explorer',
}
],
// Spec patterns are relative to the current working directly when
// protractor is called.
specs: ['./**/*js'],
// Options to be passed to Jasmine-node.
jasmineNodeOpts: {
showColors: true,
defaultTimeoutInterval: 30000
},
onPrepare: function () {
// The require statement must be down here, since jasmine-reporters@1.0
// needs jasmine to be in the global and protractor does not guarantee
// this until inside the onPrepare function.
require('jasmine-reporters');
jasmine.getEnv().addReporter(
new jasmine.JUnitXmlReporter('xmloutput', true, true)
);
}
};
Run Code Online (Sandbox Code Playgroud)
Chrome和Firefox就像魅力一样,但IE给了我这个:
Error: browserName (internet explorer) is not supported with directConnect.
Run Code Online (Sandbox Code Playgroud)
IEDriverServer.exe已添加到我的路径中.我已经完成了所有需要的配置:https://code.google.com/p/selenium/wiki/InternetExplorerDriver#Required_Configuration
有任何想法吗?
根据直接连接到浏览器驱动程序 directConnect设置仅适用于Firefox和Chrome:
directConnect:true - 您的测试脚本直接与Chrome驱动程序或Firefox驱动程序通信,绕过任何Selenium Server.如果是这样,将忽略seleniumAddress和seleniumServerJar的设置.如果您尝试使用Chrome或Firefox以外的浏览器,则会引发错误.
您需要删除/注释掉directConnect:
exports.config = {
multiCapabilities:[
{
'browserName': 'internet explorer'
}
],
...
}
Run Code Online (Sandbox Code Playgroud)
仅供参考,您实际上可以将capabilities其与...一起定义multiCapabilities,但在这种情况下protractor,只需忽略capabilities并使用multiCapabilities(docs).
| 归档时间: |
|
| 查看次数: |
10076 次 |
| 最近记录: |