Reputation: 3640
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 and Firefox work like a charm but IE gives me this:
Error: browserName (internet explorer) is not supported with directConnect.
IEDriverServer.exe is added to my path. I've did all the requred config: https://code.google.com/p/selenium/wiki/InternetExplorerDriver#Required_Configuration
Any ideas?
Upvotes: 2
Views: 11694
Reputation: 1
Direct connect supports Chrome and Firefox browsers. It doesn't do the same for Internet Explorer, though.
Upvotes: 0
Reputation: 19
Your config file like this below
exports.config = {
multiCapabilities: {
'browserName': 'internet explorer',
},
framework: 'jasmine',
specs: ['example_spec.js'],
jasmineNodeOpts: {
defaultTimeoutInterval: 30000
}
};
Upvotes: 0
Reputation: 473813
According to Connecting Directly to Browser Drivers directConnect
setting would work for Firefox and Chrome only:
directConnect: true - Your test script communicates directly Chrome Driver or Firefox Driver, bypassing any Selenium Server. If this is true, settings for seleniumAddress and seleniumServerJar will be ignored. If you attempt to use a browser other than Chrome or Firefox an error will be thrown.
You need to remove/comment out directConnect
:
exports.config = {
multiCapabilities:[
{
'browserName': 'internet explorer'
}
],
...
}
FYI, you can actually leave capabilities
defined alongside with multiCapabilities
, but in this case protractor
would simply ignore capabilities
and use multiCapabilities
(docs).
Upvotes: 8