I have written this test, however browser doesn't wait those 20 seconds before looking for an element. It ignores that part and only wait those default 11 seconds. Is there something wrong with my code?
it('should navigate to Home tab', function() {
element(by.css('[ui-sref="main.home"]')).click();
var telematicsSection = element(by.id('teleMap'));
var EC = protractor.ExpectedConditions;
browser.wait(EC.presenceOf(telematicsSection), 20000);
});
This is an error I get
Failed: Timed out waiting for asynchronous Angular tasks to finish after 11 seconds. This may be because the current page is not an Angular application. Please see the FAQ for more details: https://github.com/angular/protractor/blob/master/docs/timeouts.md#waiting-for-angular While waiting for element with locator - Locator: By(css selector, *[id="teleMap"]).
@edit
I've managed to fix it. Yash Jagdale's code and
allScriptsTimeout: 20000
in conf.js made it work.
allScriptsTimeout
? – Gunderson