根据goto
文档,我必须设置navigationTimeout
以options
覆盖 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"