[Answered ]-Protractor did not run properly when using browser.wait, msg: "Wait timed out after XXXms"

2👍

There is at least one problem with your custom wait function is that you don’t have a return. But, anyway, there is a presenceOf built-in ExpectedCondition that fits your use case:

var EC = protractor.ExpectedConditions;
browser.wait(EC.presenceOf(element), 5000);
👤alecxe

Leave a comment