Bug report
- Node Version:
v8.5.0
- Protractor Version:
5.1.0
- Angular Version:
1.6.7
- Browser(s):
Chrome 64.0.3282.140
- Operating System and Version
Windows 7
While trying to move away from the promise manager of Selenium, I encountered new random failures which were not occurring before. After analyze it appeared that it might be linked to the filter function offered by Protractor.
Here is an extract of the configuration and scripts I am using. All the code is available on https://github.com/dubzzz/protractor-move-async-await. The localhost:3000 exposes the todolist example of AngularJS official website with a list of a thousand entries.
Using the promise manager:
conf.js
exports.config = {
seleniumAddress: 'http://localhost:4444/wd/hub',
specs: ['todo-spec.js'],
SELENIUM_PROMISE_MANAGER: 1
};
todo-spec.js
browser.get('http://localhost:3000/index.html');
element.all(by.repeater('todo in todoList.todos'))
.filter(todo => todo.getText().then(label => label.indexOf('#10') !== -1))
.each(todo => todo.element(by.css('input')).click());
Using async/await:
conf.js
exports.config = {
seleniumAddress: 'http://localhost:4444/wd/hub',
specs: ['todo-spec.js'],
SELENIUM_PROMISE_MANAGER: 0
};
todo-spec.js
await browser.get('http://localhost:3000/index.html');
await element(by.model('todoList.todoText')).sendKeys('write first protractor test');
await element(by.css('[value="add"]')).click();
await element.all(by.repeater('todo in todoList.todos'))
.filter(todo => todo.getText().then(label => label.indexOf('#10') !== -1))
.each(todo => todo.element(by.css('input')).click());
The asynchronous version failed with the following error:
1) [async] angularjs homepage todo list should add a todo
Message:
Failed: java.net.ConnectException: Connection refused: connect
The full proof off concept is available on my personal Github at https://github.com/dubzzz/protractor-move-async-await
Is the bug coming from an issue in my configuration or is there a real issue?
Thanks in advance
Bug report
v8.5.05.1.01.6.7Chrome 64.0.3282.140Windows 7While trying to move away from the promise manager of Selenium, I encountered new random failures which were not occurring before. After analyze it appeared that it might be linked to the
filterfunction offered by Protractor.Here is an extract of the configuration and scripts I am using. All the code is available on https://github.com/dubzzz/protractor-move-async-await. The localhost:3000 exposes the todolist example of AngularJS official website with a list of a thousand entries.
Using the promise manager:
conf.js
todo-spec.js
Using async/await:
conf.js
todo-spec.js
The asynchronous version failed with the following error:
The full proof off concept is available on my personal Github at https://github.com/dubzzz/protractor-move-async-await
Is the bug coming from an issue in my configuration or is there a real issue?
Thanks in advance