Angular 页面测试中的量角器错误:Jasmine 规范超时。重置 WebDriver 控制流

Protractor error on Angular page testing: A Jasmine spec timed out. Resetting the WebDriver Control Flow

当我在我的规范中使用 browser.get 时,

出现此错误
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 是最新版本

怎么办才不会报错?

流量控制可能有问题,This Whosebug post有一些关于流量控制的有用信息。

解决此问题的方法之一:

flow = protractor.promise.controlFlow();
flow.execute(function(){
    browser.ignoreSynchronization = true;
    browser.get(link);
    browser.ignoreSynchronization = false;
});