You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
This repository was archived by the owner on Jul 29, 2024. It is now read-only.
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.
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());
awaitbrowser.get('http://localhost:3000/index.html');awaitelement(by.model('todoList.todoText')).sendKeys('write first protractor test');awaitelement(by.css('[value="add"]')).click();awaitelement.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