gpt4 book ai didi

javascript - WebdriverIO-Jasmine 异步功能未在 10000 毫秒内完成

转载 作者:行者123 更新时间:2023-12-04 01:04:10 24 4
gpt4 key购买 nike

我正在将 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。

关于javascript - WebdriverIO-Jasmine 异步功能未在 10000 毫秒内完成,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/67073043/

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