IE中的量角器测试 [英] Protractor test in IE
问题描述
我正在尝试仅运行Internet Explorer量角器中包含的示例测试,而不会太远:(
I'm trying to just run the example test that is included in protractor on internet explorer and not getting very far :(
// 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
}
};
我已经尝试过将浏览器名称更改为互联网浏览器"和版本":11,并且我已注释掉directConnect(因为它对此有所抱怨)
I've tried the obvious changing browser name to 'internet explorer' and 'version': 11 and I have commented out directConnect (as it was complaining about this)
我得到的错误是...
The error I get is...
WebDriverError:必须通过webdriver.ie.driver系统属性设置驱动程序可执行文件的路径;有关更多信息,请参见 https://github.com/SeleniumH Q/selenium/wiki/InternetExplorerDriver.可以从 http://selenium-release.storage.googleapis.com/下载最新版本. index.html
WebDriverError: The path to the driver executable must be set by the webdriver.ie.driver system property; for more information, see https://github.com/SeleniumH Q/selenium/wiki/InternetExplorerDriver. The latest version can be downloaded from http://selenium-release.storage.googleapis.com/index.html
我已经下载了最新的IE驱动程序并将其放在这里...
I have downloaded the latest IE driver and put it here...
C:\ Users \ darrenp \ AppData \ Roaming \ npm \ node_modules \ protractor \ selenium
C:\Users\darrenp\AppData\Roaming\npm\node_modules\protractor\selenium
仍然没有喜悦:(
有人可以告诉我,实际上是否可以在IE中运行量角器测试,还是我只是在浪费时间?
can someone tell me if it is actually possible to run protractor tests in IE or am I just wasting my time?
我知道您会问我为什么要这么做?一个简单的答案,我必须,我的客户端只使用IE,而我使用的是IE,并且我需要确保我的应用程序在IE中是很好的,而不是像世界其他地方正在使用的chrome一样:)
I know you are going to ask why would I want to?? simple answer, I have to, my client uses IE and only IE and I need to be sure that my app is good in IE instead of chrome like what the rest of the world is using :)
推荐答案
1)下载IEDriverServer.exe 2)将其放在C:\ Windows \ System32
1) Download IEDriverServer.exe 2) Place it in C:\Windows\System32
exports.config = {
'autoStartStopServer': true,
capabilities: {
'browserName': 'internet explorer'
},
framework: 'jasmine',
specs: ['example_spec.js'],
jasmineNodeOpts: {
defaultTimeoutInterval: 30000
}
};
3)打开Internet Explorer单击选项
3)Open Internet Explorer click options
4)在安全性"标签>禁用所有区域的保护模式
4)In Security tab > Disable protected mode for all zones
5)导航到隐私"标签,关闭弹出窗口阻止程序
5)Navigate to Privacy tab TurnOff PopUp Blocker
6)导航到高级"标签
6)Navigate to Advanced tab
这篇关于IE中的量角器测试的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!