Describe the bug
navigationTimeout is not taking effect
To Reproduce
Steps (or script) to reproduce the behavior:
Since it really takes a lot of time:

I'm increasing the navigationTimeout
Logs
Stacktrace:
Error: Link with text Enable Screens not found
at findElements (node_modules\taiko\lib\elementSearch.js:271:11)
at async waitAndGetActionableElement (node_modules\taiko\lib\actions\pageActionChecks.js:85:47)
at async click (node_modules\taiko\lib\actions\click.js:50:21)
at async module.exports.click (node_modules\taiko\lib\taiko.js:1099:16)
at async module.exports.<computed> (node_modules\taiko\lib\taiko.js:3107:14)
at async Object.<anonymous> (tests\steps.js:110:5)```
Expected behavior
navigationTimeout should keep click() to wait up to 120 seconds, in this case
Versions:
Gauge version: 1.1.1
Commit Hash: 6e0d83f
Plugins
-------
flash (0.0.2)
html-report (4.0.12)
js (2.3.14)
screenshot (0.0.1)
navigationTimeout is for waiting after the action is performed and not for the availability of the element.. try waiting for existence of the element instead like below
await waitFor(link(text), 20000) // default timeout is 10s, increase it by passing second arg in milliseconds
try waiting for existence of the element instead
Closing this issue for now as this is the right way to wait for elements.
@NivedhaSenthil @zabil thanks for the reply. I have another question, based on https://github.com/getgauge/taiko#handle-xhr-and-dynamic-content:
Taiko implicitly waits for elements to load on the page before performing executing the command. Scripts written in Taiko are free of explicit local or global waits and the flakiness.
Is there any way to interact with a webpage like the above free of explicit local/global waits?
Thanks
Taiko implicitly waits for elements to load on the page before performing executing the command
This implicit wait has a default timeout to avoid indefinitely waiting for elements. If page rendering times are longer than the default time, you can check why the element takes so the time to load as this might be a usability issue. If that is not under your control you can override the default wait time globally
Thanks Zabil!
@NivedhaSenthil @zabil following your suggestion, I'm using:
setConfig({navigationTimeout:60000, retryTimeout:60000, highlightOnAction:'true'});
Now, in less than 40s I get a different error:
Stacktrace:
Error: Timed out
at Timeout.
at listOnTimeout (internal/timers.js:554:17)
at processTimers (internal/timers.js:497:7)
It seems like a bug, what do you think?
There are two timeouts.
If you are using Taiko with Gauge you need to increase Gauge's timeout to be more than Taiko's, you can find more info here
https://docs.gauge.org/configuration.html?os=linux&language=javascript&ide=vscode#language-plugin-configurations
Thank you Zabil!
Setting _test_timeout = 30000_ @ js.properties made the job!