首页 > 解决方案 > Taiko 不等待navigationTimeout 完成

问题描述

根据goto 文档,我必须设置navigationTimeoutoptions覆盖 30 秒的默认等待时间。我试图将其覆盖为 100 秒,但它不起作用 - 它在 40 秒内超时,如下所示: 在此处输入图像描述

这是我的步骤:

step('Go to <path>', async function (path) {
  await goto(process.env.BASE_URL + path, { navigationTimeout: 100000 })
})

我的测试用例:

# Add product to cart

* Go to "/collections/all-products" 
* Click on the link with the text "A Prodcut"
* Click the button with the label "Add to Cart"
* Go to "/cart"

标签: node.jstestinggetgauge

解决方案


NavigationTimeOut 等待该毫秒数,而 waitForNavigations 等待导航该时间。

您可以在您发布的链接中查看


推荐阅读