我有一个我正在测试的应用程序,e2e测试似乎挂起并失败,直到我使用browser.ignoreSynchronization=true
。优选地,我宁愿修复应用程序然后使用此行。根据此评论,我知道它与$http
和$timeout
有关:https://github.com/angular/protractor/blob/9891d430aff477c5feb80ae01b48356866820132/lib/protractor.js#L158
/**
* If true, Protractor will not attempt to synchronize with the page before
* performing actions. This can be harmful because Protractor will not wait
* until $timeouts and $http calls have been processed, which can cause
* tests to become flaky. This should be used only when necessary, such as
* when a page continuously polls an API using $timeout.
*
* @type {boolean}
*/
是否有一种方法可以精确查明导致此延迟的原因?