From time to time I'm using "Expected Conditions" feature introduced in protractor 1.7.
Use case:
var EC = protractor.ExpectedConditions;
browser.wait(EC.visibilityOf(header.displayName), 10000);
where header
is a Page Object.
If header.displayName
would not become visible in 10 seconds, an error would be thrown:
[firefox #4] 2) Describe description here
[firefox #4] Message:
[firefox #4] Error: Wait timed out after 10082ms
[firefox #4] Stacktrace:
[firefox #4] Error: Wait timed out after 10082ms
[firefox #4] ==== async task ====
[firefox #4] at [object Object].<anonymous> (/Path/to/project/test/e2e/my.spec.js:38:17)
Which is not quite readable and require some time to understand and a bit of a research.
Question:
Is it possible to customize this kind of a wait timeout error?
FYI, we can provide custom expect
failure messages as described here: