问题描述
我试图运行IE11,但没有运气或任何我的茉莉花端到端测试。
我在Windows 8.1。
我的配置:
I'm trying to run my jasmine E2E tests on IE11 but with no luck or whatsoever.I'm on Windows 8.1.My config:
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 [email protected]
// 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)
);
}
};
Chrome和Firefox的工作就像一个魅力,但IE浏览器给了我这样的:
Chrome and Firefox work like a charm but IE gives me this:
Error: browserName (internet explorer) is not supported with directConnect.
IEDriverServer.exe添加到我的道路。我已经做了所有的requred配置:的
任何想法?
推荐答案
据直接连接到浏览器的驱动程序 的DirectConnect
设置将为Firefox和Chrome只工作:
According to Connecting Directly to Browser Drivers directConnect
setting would work for Firefox and Chrome only:
的DirectConnect:真正的 - 你的测试脚本直接通信的Chrome
驱动程序或Firefox驱动程序,绕过任何Selenium服务器。如果这是
真的,因为seleniumAddress和seleniumServerJar设置将
忽略。 如果您尝试使用比Chrome或Firefox等浏览器
错误会抛出
您需要删除/注释掉的DirectConnect
:
exports.config = {
multiCapabilities:[
{
'browserName': 'internet explorer'
}
],
...
}
仅供参考,实际上你可以离开
功能与 multiCapabilities
旁边的定义,但在这种情况下,量角器
将简单地忽略功能
,并使用 multiCapabilities
(文档)。
FYI, you can actually leave capabilities
defined alongside with multiCapabilities
, but in this case protractor
would simply ignore capabilities
and use multiCapabilities
(docs).
这篇关于无法在Internet Explorer 11运行量角器的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!