I'm running protractor tests for my AngularJS application.
I'm facing the following problem - sometimes, after page was changed, protractor proceed without waiting angular to be initialized. Here is how I perform navigation.
beforeAll(async function() {
await browser.get('#/page-url');
})
And time to time, first test in kit fails because it is trying to access some element on page, that does not exist yet, reporter shows me a blank page screenshot.
I tried the following solution from similar issue answer
beforeAll(async function() {
await browser.waitForAngular();
await browser.get('#/page-url');
})
But it does not work for me either. What I'm doing wrong? (AngularJS Version 1.7.2 / Protractor Version 5.4.0)