gpt4 book ai didi

javascript - 运行基于 jasmine 和 selenium-webdriver 的测试时出错

转载 作者:行者123 更新时间:2023-12-03 08:54:55 24 4
gpt4 key购买 nike

我正在使用 selenium webdriver 和 jasmine 为我的网站创建一些端到端测试。我尝试寻找好的初学者教程。我最终得到 this tutorial这帮助我进展到运行端到端测试的步骤。我尝试完全按照教程中描述的方式进行操作,包括相同的目录名称。我使用的是 Chrome 浏览器并安装了 chromedriver。当我使用运行测试时

$ jasmine spec\integration-test.js

如上所述,我收到一堆超时错误,如下所示。它还会打开两个 Chrome 窗口,其中 data:, 作为 URL。我花了一些时间试图弄清楚,但似乎无济于事。任何帮助,将不胜感激。如果需要更多信息,请告诉我。

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)

最佳答案

将其添加到您的 jasmine 配置中:(根据需要增加)

"default_timeout_interval": 5000

关于javascript - 运行基于 jasmine 和 selenium-webdriver 的测试时出错,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/32547369/

24 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com