I use protractor 3.30 with ie driver 2.52.0 and ie 11.
I want to follow the protractor tutorial with internet explorer:
My protractor config file is:
exports.config = {
seleniumAddress: 'http://localhost:4444/wd/hub',
specs: ['performance_test.js'],
capabilities: {
'browserName': 'internet explorer',
'ignoreZoomSetting': true,
'platform': 'ANY',
'version': '11'
}
};
My test file is from the tutorial:
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);
});
});
When I run the line:
protractor conf.js
I get the following error:
[14:16:18] I/hosted - Using the selenium server at http://localhost:4444/wd/hub
[14:16:18] I/launcher - Running 1 instances of WebDriver Started
A Jasmine spec timed out. Resetting the WebDriver Control Flow.
F
Failures:
1) angularjs homepage todo list should add a todo
Message: Error: Timeout - Async callback was not invoked within timeout specified by jasmine.DEFAULT_TIMEOUT_INTERVAL. Stack: Error: Timeout - Async callback was not invoked within timeout specified by jasmine.DEFAULT_TIMEOUT_INTERVAL.
at Timer.listOnTimeout (timers.js:92:15)
1 spec, 1 failure
Finished in 30.027 seconds
[14:18:46] I/launcher - 0 instance(s) of WebDriver still running
[14:18:46] I/launcher - internet explorer11 #01 failed 1 test(s)
[14:18:46] I/launcher - overall: 1 failed spec(s)
[14:18:46] E/launcher - Process exited with error code 1
When I look at the selenium log i see as last command
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]
What is wrong here?