Why must I use browser.sleep while writing protractor tests Why must I use browser.sleep while writing protractor tests selenium selenium

Why must I use browser.sleep while writing protractor tests


Since there is an ignoreSynchronization turned on, you cannot use waitForAngular(), which would be a solution in case of an angular-site testing.

A better solution here would be to set a page load timeout:

browser.manage().timeouts().pageLoadTimeout(10000);  // 10 seconds

See also these relevant threads on explicit waits and timeouts: