我试图只运行包含在Internet Explorer上的量角器中的示例测试,而不会太远:(
// 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”和“ version”: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中运行量角器测试,还是我只是在浪费时间?
我知道您会问我为什么要这么做?一个简单的答案,我必须,我的客户使用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)导航到“高级”选项卡
本文收集自互联网,转载请注明来源。
如有侵权,请联系[email protected] 删除。
我来说两句