我使用量角器3.30,即驱动程序2.52.0,即11。
我想关注protractor tutorial与Internet Explorer:
我的量角器配置文件是:
exports.config = {
seleniumAddress: 'http://localhost:4444/wd/hub',
specs: ['performance_test.js'],
capabilities: {
'browserName': 'internet explorer',
'ignoreZoomSetting': true,
'platform': 'ANY',
'version': '11'
}
};
我的测试文件来自教程:
describe('angularjs homepage todo list', function() {
it('should add a todo', function() {
browser.get('https://angularjs.org');
element(by.model('todoList.todoText')).sendKeys('write first protractor test');
element(by.css('[value="add"]')).click();
var todoList = element.all(by.repeater('todo in todoList.todos'));
expect(todoList.count()).toEqual(3);
expect(todoList.get(2).getText()).toEqual('write first protractor test');
// You wrote your first test, cross it off the list
todoList.get(2).element(by.css('input')).click();
var completedAmount = element.all(by.css('.done-true'));
expect(completedAmount.count()).toEqual(2);
});
});
当我跑线时:
量角器conf.js
我收到以下错误:
[14:16:18]我/托管 - 在http://localhost:4444/wd/hub使用selenium服务器
[14:16:18] I / launcher - 运行WebDriver的1个实例 开始
茉莉花规格超时。重置WebDriver控制流程。
˚F
故障:
1)angularjs主页待办事项列表应添加待办事项
消息: 错误:超时 - 在jasmine.DEFAULT_TIMEOUT_INTERVAL指定的超时内未调用异步回调。 堆: 错误:超时 - 在jasmine.DEFAULT_TIMEOUT_INTERVAL指定的超时时间内未调用异步回调。
在Timer.listOnTimeout(timers.js:92:15)
1规格,1失败
在30.027秒完成
[14:18:46] I / launcher - WebDriver的0个实例仍在运行
[14:18:46] I / launcher - internet explorer11#01失败1次测试
[14:18:46]我/发射器 - 整体:1个失败的规格
[14:18:46] E / launcher - 进程已退出,错误代码为1
当我查看selenium日志时,我将其视为最后一个命令
14:16:29.347 INFO - Done: [execute script: try { return (function (model, using, rootSelector) {
var root = document.querySelector(rootSelector || 'body');
using = using || document;
if (angular.getTestability) {
return angular.getTestability(root).
findModels(using, model, true);
}
var prefixes = ['ng-', 'ng_', 'data-ng-', 'x-ng-', 'ng\\:'];
for (var p = 0; p < prefixes.length; ++p) {
var selector = '[' + prefixes[p] + 'model="' + model + '"]';
var elements = using.querySelectorAll(selector);
if (elements.length) {
return elements;
}
}
}).apply(this, arguments); }
catch(e) { throw (e instanceof Error) ? e : new Error(e); }, [todoList.todoText, null, body]]
14:16:29.357 INFO - Executing: [send keys: 0 [org.openqa.selenium.remote.RemoteWebElement@bdfbd98 -> unknown locator], [write first protractor test]])
14:16:53.470 INFO - Executing: [delete session: d575f16c-51f0-4b0e-9531-1bcd00d3b7e2])
14:18:45.352 INFO - Done: [send keys: 0 [org.openqa.selenium.remote.RemoteWebElement@bdfbd98 -> unknown locator], [write first protractor test]]
14:18:46.356 INFO - Done: [delete session: d575f16c-51f0-4b0e-9531-1bcd00d3b7e2]
这里有什么问题?
答案 0 :(得分:0)
jasmineNodeOpts: {
defaultTimeoutInterval: 2500000,
},