Javascript WebdriverIO Jasmine异步函数未在10000ms内完成

Javascript WebdriverIO Jasmine异步函数未在10000ms内完成,javascript,jasmine,webdriver-io,wdio-jasmine,Javascript,Jasmine,Webdriver Io,Wdio Jasmine,我正在用WDIO与茉莉花和柴 我得到下面的错误,我一直在努力寻找根本原因超过一天了 错误:超时-异步函数未在10000ms内完成(由jasmine设置。默认\u超时\u间隔) 代码: 我注意到console.log(“调试:我正在等待…”)没有打印在console上 Error log: [0-0] Error in "Verify validation" Error: Timeout - Async function did not complete within 1000

我正在用WDIO与茉莉花和柴

我得到下面的错误,我一直在努力寻找根本原因超过一天了

错误:超时-异步函数未在10000ms内完成(由jasmine设置。默认\u超时\u间隔)

代码:

我注意到console.log(“调试:我正在等待…”)没有打印在console上

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.


我发现这是wdio/jasmine V7及以上版本的一个问题。将它还原为6.2,它应该会工作(6.7.2对我来说很有用)。
您可以在测试开始时进行调试,但它仍然会失败-可能希望在wdio git上报告这一点

我发现这是wdio/jasmine V7及更高版本的一个问题。将它还原为6.2,它应该会工作(6.7.2对我来说很有用)。
您可以在测试开始时进行调试,但它仍然会失败-可能希望在wdio git上报告这一点

我在尝试将wdio升级到v7时也遇到了这一点。在进一步研究时,我注意到在wdio配置中指定jasmine选项的名称已从
jasmineNodeOpts
更改为
jasmineOpts
。这也在他们的生活中。一旦我在wdio配置中更新了它,v7现在就很好了。

我在尝试将wdio升级到v7时也遇到了这个问题。在进一步研究时,我注意到在wdio配置中指定jasmine选项的名称已从
jasmineNodeOpts
更改为
jasmineOpts
。这也在他们的生活中。一旦我在wdio配置中更新了它,v7现在就很好了。

看起来最新更新()之后的区别是jasmineOpts和jasmineNodeOpts()


我刚从Jasminenodepts换成jasmineOpts。一切都和升级前一样。

看起来最新更新()后的区别是jasmineOpts和jasmineNodeOpts()


我刚从Jasminenodepts换成jasmineOpts。一切都和升级前一样。

我觉得这个.appLauncher().waitForExist
有问题。你看到
DEBUG:I am waiting…
的日志了吗?更重要的是
[测试步骤信息]:点击App Launcher
?它没有到达这个.appLauncher().waitForExist。甚至没有打印“调试:我正在等待…”。失败,错误:[0-0][测试步骤信息]:验证应用程序启动器图标是否存在。[0-0]在“验证验证”错误中出错:超时-异步函数未在processTimers(internal/timers.js:492:7)上的listOnTimeout(internal/timers.js:549:17)的10000ms内完成(由jasmine.DEFAULT\u Timeout\u INTERVAL设置)``好,然后,我想你必须检查它是否卡在
open
login
上。它不是。现在我看到它到达console.log(“[测试步骤信息]:验证应用程序启动器图标是否存在”),然后失败。我怀疑这是代码问题。与WDIO等待有关吗?从外观上看,似乎有什么东西被卡住了
10s
。是否有任何操作需要超过10秒的时间?我认为
this.appLauncher().waitForExist
有问题。你看到
DEBUG:I am waiting…
的日志了吗?更重要的是
[测试步骤信息]:点击App Launcher
?它没有到达这个.appLauncher().waitForExist。甚至没有打印“调试:我正在等待…”。失败,错误:[0-0][测试步骤信息]:验证应用程序启动器图标是否存在。[0-0]在“验证验证”错误中出错:超时-异步函数未在processTimers(internal/timers.js:492:7)上的listOnTimeout(internal/timers.js:549:17)的10000ms内完成(由jasmine.DEFAULT\u Timeout\u INTERVAL设置)``好,然后,我想你必须检查它是否卡在
open
login
上。它不是。现在我看到它到达console.log(“[测试步骤信息]:验证应用程序启动器图标是否存在”),然后失败。我怀疑这是代码问题。与WDIO等待有关吗?从外观上看,似乎有什么东西被卡住了
10s
。有任何操作需要超过10秒的时间吗?成功了!谢谢:)真管用!谢谢:)
              *************
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();
  }

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.

waitforTimeout: 10000,
    connectionRetryTimeout: 90000,
    connectionRetryCount: 3,
    wdioRetries:3,

jasmineNodeOpts: {
        defaultTimeoutInterval: (24 * 60 * 60 * 1000),
        expectationResultHandler: function(passed, assertion) {
            // do something
        }
    },