Is there any way to determine what Protractor's browser.waitForAngular()
is getting stuck on?
My Protractor test basically loads the page, clicks on an element, and then waits for a new page to load. I'm getting the "Timed out waiting for Protractor to synchronize with the page after 11 seconds," error; however, I don't use $timeout
, and can see that there are no outstanding http requests in my browser's Developer Console.
I can manually reproduce the same steps as my test in my browser, and run
angular.getTestability(document.body)
.whenStable(function() {console.log("holla")})
and see that the page is, in fact, stable within 1 second of loading.
If I write a protractor test that loads the first page, and then uses browser.get('index.html#second-page')
, the test passes.
I am aware that I can set ignoreSerialization
on Protractor, but honestly, I'd rather not, because I'm concerned that there is some insidious bug in my Angular project. Are there any steps I can take to get a deeper look at what's going on in Protractor?
If you have a setTimeout in your code, protractor will not be able to synchronize. Consider using $interval instead.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With