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
}
};
我已经尝试将浏览器名称明显更改为internet explorer"和version":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)
我得到的错误是...
WebDriverError:驱动程序可执行文件的路径必须由 webdriver.ie.driver 系统属性设置;有关更多信息,请参阅 https://github.com/SeleniumHQ/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:UsersdarrenpAppDataRoaming pm ode_modulesprotractorselenium
C:UsersdarrenpAppDataRoaming pm ode_modulesprotractorselenium
仍然没有快乐:(
谁能告诉我是否真的可以在 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 中运行良好,而不是像世界其他地方使用的那样 :)
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.exe2) 把它放在 C:WindowsSystem32
1) Download IEDriverServer.exe 2) Place it in C:WindowsSystem32
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)导航到高级选项卡
这篇关于IE 中的量角器测试的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!