用量角器如何安装Internet Explorer的配置? [英] with protractor how to setup internet explorer configuration?
问题描述
我用的量角器1.3.1和运行iedriverserver.exe 2.43.0.0与IE11安装(视窗)。
这是我的规格:
描述('快速测试IE司机',函数(){
它('应该去纳克主页,函数(){
browser.driver.get('https://angularjs.org/');
VAR标题=元素(by.css(H1))的getText()。
期待(职称).toBe('HTML增强了对Web应用程序!);
});
});
这是我protractor.conf.js:
exports.config = {
//运行硒服务器的地址。
// seleniumAddress:HTTP://本地主机:4444 / WD /中心, 功能:{
browserName':'Internet Explorer的,
平台:任意,
'版本':'11'
},
//规格图案是相对于当前时直接工作
//量角器被调用。
规格:['main.spec.js'], //选项要传递给茉莉节点。
jasmineNodeOpts:{
showColors:真实,
defaultTimeoutInterval:30000,
isVerbose:真实,
includeStackTrace:真 }
};
收到此错误,虽然,对于解决任何想法:
不明错误:给司机可执行文件的路径必须由webdriver.ie.driver系统属性进行设置;
有关IE更新Web管理器
第一步是更新,即使用的webdriver webdriver的manager.Open命令提示符并运行以下
给出的命令 的webdriver经理更新--ie
进入故宫的位置在这一步中移动到NPM安装在您的系统NPM_LOCATION(文件夹,移动到以下路径NPM_LOCATION \\ node_modules \\量角器\\硒在这个位置检查IEDriverServer.exe是present与否。
在conf.js的IE更改
// conf.js exports.config = {seleniumAddress:HTTP://本地主机:4444 / WD /中心,规格:['specs.js'],功能: {
browserName':'Internet Explorer的// conf对于Internet Explorer的}}
// spec.js描述(量角器演示应用',函数(){它('应该有一个标题',函数(){
browser.get('http://juliemr.github.io/protractor-demo/');
期待(browser.getTitle())toEqual(超级计算器)。 }); });
现在运行量角器conf.js
注意:请确保您重新启动服务器 - > webdriver的经理开始
摘自:<一href=\"http://protractorsupport.blogspot.com/2015/05/use-protractor-with-internet-explorer.html\">http://protractorsupport.blogspot.com/2015/05/use-protractor-with-internet-explorer.html
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!');
});
});
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;
Update web manager for IE
First step is to update the ie webdriver using webdriver manager.Open command prompt and run the command given below
webdriver-manager update --ie
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\node_modules\protractor\selenium" At this location check that IEDriverServer.exe is present or not.
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'); }); });
Now run protractor conf.js
Note: Make sure you restart server by -->webdriver-manager start
taken from: http://protractorsupport.blogspot.com/2015/05/use-protractor-with-internet-explorer.html
这篇关于用量角器如何安装Internet Explorer的配置?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!