我正在使用selenium webdriver和jasmine为我的网站创建一些端到端测试。我试着寻找好的初学者教程。我最终得到了this tutorial,这帮助我继续进行直到结束测试的步骤。我试图按照其中描述的方式完全遵循教程,包括相同的目录名称。我正在使用Chrome浏览器并安装了chromedriver。当我使用
运行测试时$ jasmine spec\integration-test.js
如上所述,我得到了一堆超时错误,如下所示。它还会打开两个Chrome窗口,其中data:,
为网址。我花了一些时间试图弄清楚,但似乎没有去哪里。任何帮助,将不胜感激。如果需要更多信息,请告诉我。
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)
答案 0 :(得分:1)
将此添加到您的jasmine配置中:(根据需要增加)
"default_timeout_interval": 5000