使用量角器如何设置 Internet Explorer 配置? [英] with protractor how to setup internet explorer configuration?
问题描述
我正在使用量角器 1.3.1 并运行 iedriverserver.exe 2.43.0.0 并安装了 IE11(Windows).这是我的规格:
I am using protractor 1.3.1 and running iedriverserver.exe 2.43.0.0 with IE11 installed (windows). This is my spec:
describe('quick test IE driver', function () {
it('should go to ng homepage', function () {
browser.driver.get('https://angularjs.org/');
var title =element(by.css('h1')).getText();
expect(title).toBe('HTML enhanced for web apps!');
});
});
这是我的 protractor.conf.js:
And this is my protractor.conf.js:
exports.config = {
// The address of a running selenium server.
//seleniumAddress: 'http://localhost:4444/wd/hub',
capabilities: {
'browserName': 'internet explorer',
'platform': 'ANY',
'version': '11'
},
// Spec patterns are relative to the current working directly when
// protractor is called.
specs: ['main.spec.js'],
// Options to be passed to Jasmine-node.
jasmineNodeOpts: {
showColors: true,
defaultTimeoutInterval: 30000,
isVerbose:true,
includeStackTrace:true
}
};
虽然遇到此错误,但有任何解决方案的想法:
getting this error though, any ideas for a solution:
UnknownError: The path to the driver executable must be set by the webdriver.ie.driver system property;
推荐答案
更新 IE 网页管理器
Update web manager for IE
第一步是使用webdriver manager更新ie webdriver.打开命令提示符并运行下面给出的命令
First step is to update the ie webdriver using webdriver manager.Open command prompt and run the command given below
webdriver-manager update --ie
转到 npm 位置 在此步骤中,移动到 NPM_LOCATION(系统中安装 npm 的文件夹.移动到以下路径NPM_LOCATION ode_modulesprotractorselenium" 在此位置检查 IEDriverServer.exe 是否存在.
Go to npm location In this step move to the NPM_LOCATION(folder where npm is installed at your system. Move to the following path "NPM_LOCATION ode_modulesprotractorselenium" At this location check that IEDriverServer.exe is present or not.
在 conf.js 中更改 IE
Change for IE in conf.js
// conf.js exports.config = { seleniumAddress: 'http://localhost:4444/wd/hub', specs: ['specs.js'], capabilities: {
'browserName': 'internet explorer' // conf for internet explorer } }
// spec.js describe('Protractor Demo App', function() { it('should have a title', function() {
browser.get('http://juliemr.github.io/protractor-demo/');
expect(browser.getTitle()).toEqual('Super Calculator'); }); });
现在运行 protractor conf.js
Now run protractor conf.js
注意:确保通过 -->webdriver-manager start 重新启动服务器
Note: Make sure you restart server by -->webdriver-manager start
取自:http://protractorsupport.blogspot.com/2015/05/使用-protractor-with-internet-explorer.html
这篇关于使用量角器如何设置 Internet Explorer 配置?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!