2

•Error: Timeout - Async callback was not invoked within timeout specified by jasmine.DEFAULT_TIMEOUT_INTERVAL.

I am getting above error even though i have increases the default Timeout Interval in config file.

jasmineNodeOpts: { defaultTimeoutInterval: 40000 }

Saurabh
  • 41
  • 1
  • 2
  • 10

1 Answers1

4

There are serveral way to config this timeout. But it is depend on the version of Jasmine. So to ensure it will worked.

// your main protractor config file
onPrepare: function(){
  // make your own configuration
  browser.param.jasmineTimeout = 40000;
}


// in your suites, do an override to JASMINE timeout configuration
it("something should run...", function(){...}, browser.param.jasmineTimeout);
Linh Pham
  • 3,005
  • 23
  • 34
  • I'm using protractor with appium i got the same error even after adding jasmineTimeout – Emna Ayadi Apr 28 '16 at 15:35
  • 2
    @Emma This answer is only solving the issue of either slow network connection or low spec of machine running test --- Your issue can cause by something else, if the suite is still hanging and test cannot be executed or resolved before the timeout. The error will still present. Make sure you are looking for correct answer or you can ask your own question. Cheers! – Linh Pham Apr 28 '16 at 16:45
  • @LinhPham : Thanks for your answer : now i have another error after making the login i can't click into any button in home page because of time out ==> http://stackoverflow.com/questions/37070680/timed-out-waiting-for-asynchronous-script-result-while-executing-protractor-scri – Emna Ayadi May 10 '16 at 14:58