0
votes

I am working on protractor and I am using jasmine.DEFAULT_TIMEOUT_INTERVAL = 100000; and also browser.sleep(10000); for giving time to page to load. But sometimes it works and some times it give me error as :

Async callback was not invoked within timeout specified by jasmine.DEFAULT_TIMEOUT_INTERVAL

I have tried several functions also but its not the permanent solution in my case. Can someone help me in getting the proper and permanent solution to test the end to end flow.

Thanks in advance.

1
try by adding ``` it('test case', functtion(){ }, timeoutInMiliserec); - Yash Jagdale
This error comes when jamsineDefaultTimeout exhausted. like in your case your 100000, So looks like a problem in your test case may be in setup functions. like beforeAll or beforeEach. where you are using browser.sleep, try with browser.wait(). - tyaga001

1 Answers

0
votes

The timeout you get only indicates, that your it- and/or describe-block hasn't finished within timeout limit (100 sec, if I saw right).

Your browser.sleep(10000) alone uses 10% of your available maximum test execution time.

Try to either increase your default timeout to something bigger like 300000 (5 min.) and/or reduce your browser.sleep() times to only what's necessary.