Cannot run protractor on Internet explorer 11

我的梦境 提交于 2019-12-01 10:27:42

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).

Your config file like this below



exports.config = { multiCapabilities: { 'browserName': 'internet explorer',
}, framework: 'jasmine', specs: ['example_spec.js'], jasmineNodeOpts: { defaultTimeoutInterval: 30000 } };

Praveen

Direct connect supports Chrome and Firefox browsers. It doesn't do the same for Internet Explorer, though.

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!