0

When I use browser.get in my specs I have this error with

ScriptTimeoutError: Timed out waiting for asynchronous Angular tasks to 
finish after 11 seconds. This may be because the current page is not an 
Angular application. Please see the FAQ for more details: 
https://github.com/angular/protractor/blob/master/docs/timeouts.md#waiting- 
for-angular While waiting for element with locator - Locator: By(css 
selector, [class="loading ng-scope ng-isolate-scope"]).`

Webdriver is the latest version

  • I have to use angular elements in my spec but I tried to change browser.ignoreSynchronization to true before browser.get(link) and changed to false after getting page. Nothing changed. I also tried using browser.driver.get(link) instead of browser.get(link). Increased allScriptsTimeout: 110000, getPageTimeout: 110000, defaultTimeoutInterval: 600000

What should I do not to take this error?

Vipin Yadav
  • 1,616
  • 1
  • 14
  • 23
kyo
  • 164
  • 14

1 Answers1

0

There is likely an issue with flow control, This stackOverflow post has some good info on flow control.

One of the ways to get around this:

flow = protractor.promise.controlFlow();
flow.execute(function(){
    browser.ignoreSynchronization = true;
    browser.get(link);
    browser.ignoreSynchronization = false;
});
Ben Mohorc
  • 694
  • 6
  • 16