我只是想在 Internet Explorer 上运行 Protractor 中包含的示例测试,但不会走得太远:(
// An example configuration file.
exports.config = {
directConnect: true,
// Capabilities to be passed to the webdriver instance.
capabilities: {
'browserName': 'chrome'
},
// Framework to use. Jasmine is recommended.
framework: 'jasmine',
// Spec patterns are relative to the current working directory when
// protractor is called.
specs: ['example_spec.js'],
// Options to be passed to Jasmine.
jasmineNodeOpts: {
defaultTimeoutInterval: 30000
}
};
我已经尝试将浏览器名称明显更改为“Internet Explorer”和“版本”:11,并且我已经注释掉了 directConnect(因为它正在提示这一点)
我得到的错误是...
WebDriverError:驱动程序可执行文件的路径必须由 webdriver.ie.driver 系统属性设置;有关详细信息,请参阅 https://github.com/SeleniumH Q/selenium/wiki/InternetExplorerDriver。最新版本可以从http://selenium-release.storage.googleapis.com/index.html下载
我已经下载了最新的IE驱动,放在这里...
C:\Users\darrenp\AppData\Roaming\npm\node_modules\protractor\selenium
仍然没有快乐:(
有人能告诉我是否真的可以在 IE 中运行 Protractor 测试,还是我只是在浪费时间?
我知道你会问我为什么要??简单的答案,我必须,我的客户使用 IE,而且只使用 IE,我需要确保我的应用程序在 IE 中很好,而不是像世界其他地方使用的 chrome :)
最佳答案
1) 下载IEDriverServer.exe 2) 放在C:\Windows\System32
exports.config = {
'autoStartStopServer': true,
capabilities: {
'browserName': 'internet explorer'
},
framework: 'jasmine',
specs: ['example_spec.js'],
jasmineNodeOpts: {
defaultTimeoutInterval: 30000
}
};
3)打开Internet Explorer点击选项
4)在安全选项卡>禁用所有区域的保护模式
5) 导航到“隐私”选项卡关闭弹出窗口阻止程序
6)导航到高级选项卡
关于internet-explorer - IE 中的 Protractor 测试,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/37456099/