0

According to the goto docs, I have to set navigationTimeout in options to override the default wait of 30 seconds. I am trying to override it to 100 seconds, but it isn't working - it times out in 40 seconds, as shown here: enter image description here

Here's my step:

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

My test case:

# 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"
Safwan Samsudeen
  • 1,645
  • 1
  • 10
  • 25

2 Answers2

0

NavigationTimeOut waits that amount of milliseconds while waitForNavigations waits for navigation that amount of time.

You can check it out in the link you posted

  • But honestly if I have to wait 100 seconds to add a new product into my car I’ll just go to some where else and buy the same product, even them default 30 seconds that’s too much consider that test case as failed and fix the code. It is a humble opinion –  Aug 23 '21 at 21:41
  • You're right, but it takes only a few seconds for the frontend page to load. But my tests wait for the background scripts and all to finish loading. I'm testing a Shopify site - really slow, but I can't do much about it. Will check your solution hopefully. – Safwan Samsudeen Aug 24 '21 at 04:08
0

The timeout shown here is from Gauge, try updating the gauge step timeout in the properties file default/js.properties to something above 120000.

It was failing because the step timeout of Gauge is lesser than that of Taiko's

par
  • 817
  • 8
  • 21