webdriverjs-retry icon indicating copy to clipboard operation
webdriverjs-retry copied to clipboard

Jasmine integration

Open elgalu opened this issue 10 years ago • 1 comments

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?

elgalu avatar Jun 02 '14 18:06 elgalu

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.

elgalu avatar Jun 04 '14 20:06 elgalu