I have been struggling with these lines of Protractor code today:
element(by.linkText(\"People\")).click();
browser.waitForAngular();
var url = brows
Instead of waitForAngular() call, wait for the URL to change:
browser.wait(function() {
return browser.getCurrentUrl().then(function(url) {
return /index/.test(url);
});
}, 10000, "URL hasn't changed");
Originally suggested by @juliemr at UnknownError: javascript error: document unloaded while waiting for result.