Error Timeout until the Transcavator syncs with the page after 11 seconds

I have a problem with my Protractor tests. The angular app uses $ timeout to continuously poll something from the server. Unfortunately, this leads to the following error message when I run my tests:

 There was a webdriver error: Error Timed out waiting for Protractor to synchronize with the page after 11 seconds. Please see https://github.com/angular/protrac
tor/blob/master/docs/faq.md

How can I handle such continuous polling timeouts? Installing browser.ignoreSynchronizationin is falsenot a good solution in my case (when I do this, I need to insert a lot browser.sleep())

Switching from $ timeout to $ interval, as suggested here , is currently not possible in my application. Increasing the timeout is also impossible (since I said that the service constantly polls from the server)

Is it possible to change the procedure waitForAngularso that my test is not a timeout?

Any help would be greatly appreciated.

+4
source share
4 answers

From the carrier documentation :

Before performing any action, Protractor asks Angular to wait for the page to be synchronized. This means that all timeouts and http requests are complete. If your application continuously requests $ timeout or $ http, it will never be registered as fully loaded. You should use the $ interval ( interval.js ) service for everything that polls continuously (introduced in Angular 1.2rc3).

+12

.

, sleep(), waitForAngular() browser.ignoreSynchronization.

, : ignoreSynchronization = true, .

sleep(), waitForAngular() :

browser.sleep(10000);
browser.waitForAngular();

, waitForAngular() , " " .

, .

+2

allScriptsTimeout: 50000

exports.config = {
    ...
    allScriptsTimeout: 50000,
    ...
};

, ,

+1
source

Changing allScriptsTimeout to a larger value than 11,000 thousand fixed my problem

Conveyor waiting time reset ...

In node_modules / protractor / lib / configParser.js changed:

allScriptsTimeout: 25000

0
source

All Articles