webdriverjs-retry
webdriverjs-retry copied to clipboard
Jasmine integration
What happens if I put an expect() within the retry block?
retry.run(function() {
// This would throw a failed expectation error because
// the div does not appear for 3 seconds.
expect($('#creatediv').isPresent()).toBeTruthy();
}, 5000);
Would be possible to avoid failing the test with the jasmine error unless the retry block fails, in this case after 5 secs?
FYI I'm using a fork here: https://github.com/elgalu/jasminewd/tree/jasmine_retry
Basically by adding rit()
and rrit()
wrappers for it()
and iit()
but with 1 main difference, if any expectation fails or there is some webdriver error it will automatically retry the whole block up to jasmine.getEnv().defaultTimeoutInterval
or whatever 3rd argument passed if any.