Waiting periods until the Transcavator synchronizes with the page after 50001ms

I am testing AngularJS application and very new for protractor. Each time I open the browser, it opens and then waits for a timeout before throwing the following error on cmd.

Timed out waiting for Protractor to synchronize with the page after 50001ms

I tried to increase the timeout limit, but always get this error. I also tried using all of this:

  browser.ignoreSynchronization = true; browser.driver.sleep(5000); browser.debugger(); browser.waitForAngular(); 

The page loads correctly, and if I use Eclipse and Selenium to interact with button objects, this just works fine.

Only the protractor has problems with synchronization. Please, help.

+6
source share
1 answer

Possible reasons for pushing the timeout:

  • Your web page does not implement Angular in the expected way (i.e. with the ng-app tag in the body tag). Most often, the error you get in this case is Angular not found on page, , but the timeout is out of the question. Using ignoreSynchronization could fix this if it were a problem, so it's not you.
  • An HTTP request is waiting or not executing. Open the developerโ€™s console and check the "Network" tab when the page loads with the "Protractor" (this can happen with the Transporter, and not in a manual test). If you find something unsuccessful, make sure you make the request correctly. For example, if you are trying to access the HTTP endpoint via HTTPS, then it is definitely possible that the request will fail and Protractor will time out.
  • Your page repeatedly polls $timeout or $http . The protractor will not do anything until Angular reaches its quiescent state (all elements and data bindings are loaded and all requests are returned).

The official list of timeout reasons is here: https://github.com/angular/protractor/blob/master/docs/timeouts.md .

But if you check the Javascript console and network requests while loading the page, you should find out what is wrong. Good luck

+5
source

Source: https://habr.com/ru/post/983447/


All Articles