Error when running jasmine and selenium-webdriver based tests Code Answer

Hello Developer, Hope you guys are doing great. Today at Tutorial Guruji Official website, we are sharing the answer of Error when running jasmine and selenium-webdriver based tests without wasting too much if your time.

The question is published on by Tutorial Guruji team.

I am in the process of creating some end to end tests for my website using selenium webdriver and jasmine. I tried searching for good beginners tutorial. I ended up with this tutorial which helped me to progress till the step of running the end to end tests. I have tried to follow the tutorial exactly the way it is described there including same directory names. I am using Chrome browser and installed chromedriver. When I run the tests using

$ jasmine specintegration-test.js

as stated there, I get a bunch of timeout errors as follows. It also opens up two Chrome windows with data:, as URL. I spent some time trying to figure it out, but seem to be going no where. Any help would be appreciated. Please let me know if any more information is required.

Started
FF

Failures:
1) Selenium Tutorial Should be on the home page
  Message:
    Error: Timeout - Async callback was not invoked within timeout specified by
jasmine.DEFAULT_TIMEOUT_INTERVAL.
  Stack:
    Error: Timeout - Async callback was not invoked within timeout specified by
jasmine.DEFAULT_TIMEOUT_INTERVAL.
        at Timer.listOnTimeout [as ontimeout] (timers.js:121:15)
  Message:
    Error: Timeout - Async callback was not invoked within timeout specified by
jasmine.DEFAULT_TIMEOUT_INTERVAL.
  Stack:
    Error: Timeout - Async callback was not invoked within timeout specified by
jasmine.DEFAULT_TIMEOUT_INTERVAL.
        at Timer.listOnTimeout [as ontimeout] (timers.js:121:15)
  Message:
    Error: Timeout - Async callback was not invoked within timeout specified by
jasmine.DEFAULT_TIMEOUT_INTERVAL.
  Stack:
    Error: Timeout - Async callback was not invoked within timeout specified by
jasmine.DEFAULT_TIMEOUT_INTERVAL.
        at Timer.listOnTimeout [as ontimeout] (timers.js:121:15)

2) Selenium Tutorial Has a working nav
  Message:
    Error: Timeout - Async callback was not invoked within timeout specified by
jasmine.DEFAULT_TIMEOUT_INTERVAL.
  Stack:
    Error: Timeout - Async callback was not invoked within timeout specified by
jasmine.DEFAULT_TIMEOUT_INTERVAL.
        at Timer.listOnTimeout [as ontimeout] (timers.js:121:15)
  Message:
    Error: Timeout - Async callback was not invoked within timeout specified by
jasmine.DEFAULT_TIMEOUT_INTERVAL.
  Stack:
    Error: Timeout - Async callback was not invoked within timeout specified by
jasmine.DEFAULT_TIMEOUT_INTERVAL.
        at Timer.listOnTimeout [as ontimeout] (timers.js:121:15)
  Message:
    Error: Timeout - Async callback was not invoked within timeout specified by
jasmine.DEFAULT_TIMEOUT_INTERVAL.
  Stack:
    Error: Timeout - Async callback was not invoked within timeout specified by
jasmine.DEFAULT_TIMEOUT_INTERVAL.
        at Timer.listOnTimeout [as ontimeout] (timers.js:121:15)

Answer

Add this to your jasmine config: (increase as necessary)

"default_timeout_interval": 5000
We are here to answer your question about Error when running jasmine and selenium-webdriver based tests - If you find the proper solution, please don't forgot to share this with your team members.

Related Posts

Tutorial Guruji