2

It seems when protractor execute "browser.driver.get(...)" it waits until page is loaded or throw "Error: Timeout - Async callback was not invoked within timeout specified by jasmine.DEFAULT_TIMEOUT_INTERVAL" message. Remote url is 1 to 10 times fail to load (following by freeze). A workaround for that is to refresh/reload page. Is there any way to implement that behaviour in Protractor? (let say repeat action 4-8 times and then continue)

Victor.Palyvoda
  • 523
  • 3
  • 12

1 Answers1

-1

You should be able to catch errors thrown through the promises api, like this:

browser.driver.get(...).then(function(result) {
  // do something when page is found
}.thenCatch(function(error) {
  // do something with the error
});
Andrew Eisenberg
  • 28,387
  • 9
  • 92
  • 148