大佬教程收集整理的这篇文章主要介绍了WebdriverIO-Jasmine Async 功能未在 10000 毫秒内完成,大佬教程大佬觉得挺不错的,现在分享给大家,也给大家做个参考。
我正在将 Wdio 与 Jasmine 和 Chai 一起使用。
我收到以下错误,并且我已经尝试找出根本原因超过一天了。
错误:超时 - 异步函数未在 10000 毫秒内完成(由 jasmine.DEFAulT_TIMEOUT_INTERVAL 设置)
describe('Lead RoutIng Functionality',() => {
beforeEach(function () {
lightningLeadPage.open();
lightningLeadPage.login();
console.log('[TEST STEP INFO]: checking header: ');
});
it('Verify valIDation',() => {
lightningLeadPage.click_app_launcher();
});
*************
export default class lightning_Page {
click_app_launcher() {
console.log("[TEST STEP INFO]: Verify App launcher icon is present. ");
console.log('DEBUG : I am waiTing...')
this.appLauncher().waitForExist(this.waitDuration());
console.log("[TEST STEP INFO]: Clicking on App Launcher");
this.appLauncher().click();
}
我注意到 console.log('DEBUG : I am waiTing...') 没有打印在控制台上。
Error log:
[0-0] Error in "Verify valIDation"
Error: Timeout - Async function dID not complete within 10000ms (set by jasmine.DEFAulT_TIMEOUT_INTERVAL)
at <Jasmine>
at ListOnTimeout (internal/timers.Js:549:17)
at processtimers (internal/timers.Js:492:7)
[0-0] DEPRECATION: An asynchronous before/it/after function took a done callBACk but also returned a promise. This is not supported and will stop working in the future. Either remove the done callBACk (recommended) or change the function to not return a promise.
config.Js 值:
waitforTimeout: 10000,connectionRetryTimeout: 90000,connectionRetryCount: 3,wdioRetrIEs:3,jasmineNodeOpts: {
defaultTimeoutInterval: (24 * 60 * 60 * 1000),expectationResultHandler: function(passed,assertion) {
// do something
}
},
我在尝试将 WDIO 升级到 v7 时也遇到了这个问题。在进一步研究时,我注意到 wdio 配置中指定 jasmine 选项的名称已从 jasmineNodeOpts
更改为 jasmineOpts
。它也在他们的 updated documentation 中。一旦我在 wdio 配置中更新了它,它现在适用于 v7。
我发现这是 wdio/jasmine V7 及更高版本的问题。将其恢复为 6.something,它应该可以工作(6.7.2 对我有用)。 您可以在测试开始时进行调试,但它仍然会失败 - 可能想在 wdio git 上报告此问题
,在最新更新 (https://webdriver.io/docs/frameworks/#intercept-assertion) 之后,jasmineOpts 与 jasmineNodeOpts 的区别似乎有所不同。
我刚刚从 jasmineNodeOpts 更改为 jasmineOpts。一切都像升级前一样。
以上是大佬教程为你收集整理的WebdriverIO-Jasmine Async 功能未在 10000 毫秒内完成全部内容,希望文章能够帮你解决WebdriverIO-Jasmine Async 功能未在 10000 毫秒内完成所遇到的程序开发问题。
如果觉得大佬教程网站内容还不错,欢迎将大佬教程推荐给程序员好友。
本图文内容来源于网友网络收集整理提供,作为学习参考使用,版权属于原作者。
如您有任何意见或建议可联系处理。小编QQ:384754419,请注明来意。