简体   繁体   中英

Catching “angular could not be found on the window” in protractor

I have an angular.js app that connects to a STS for login. When i run the tests i need to login through the STS. But when i navigate away to the STS and come back randomly

angular could not be found on the window

error occurs. What i want to do is to catch this error and retry login because this is not an issue with the tests i have written. But i can't find where to attach the error handler. For example for a returning promise we can attach .catch() to handle the error. So to handle this error where should i attach the .catch() or is there similar way of handling this.?

如@emery所建议,此技巧对我有用:

browser.ignoreSynchronization=true;

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM