Reputation: 6611
About 50% of the time, the first test in our suite of Protractor tests fails with the following error:
Timed out waiting for Protractor to synchronize with the page after 0ms
So, we updated the protractor.conf.js
to explicitly include some sensible timeouts:
exports.config = {
baseUrl: 'http://localhost:9001',
specs: ['e2e/website.spec.js'],
capabilities: {
browserName: 'firefox'
},
getPageTimeout: 10000,
allScriptsTimeout: 10000,
We still get timeouts on the first test, but this time with some arbitrarily low number, rather than 0ms:
Timed out waiting for Protractor to synchronize with the page after 15ms.
Timed out waiting for Protractor to synchronize with the page after 1ms.
The exact line it times-out on is:
beforeEach(function() {
browser.get('/#/signout');
browser.waitForAngular(); // Timeout here.
});
Upvotes: 2
Views: 173
Reputation: 6611
We found the culprit: 'angular-loading-bar'
After removing this from our project, the issue went away.
Upvotes: 1