You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I have troubles changing the timeout of my browser script using the environment variable K6_BROWSER_TIMEOUT as follow: $env:K6_BROWSER_TIMEOUT='10s'; k6 run '.\unit tests\browser_script_fails.js'
as it always give me the error: ERRO[0031] Uncaught (in promise) GoError: typing "something" in "input[name=\"not_existing\"]": timed out after 30s
Thanks for raising an issue. Could you please search and create a new post in our community forum next time. It's a great place to see if anyone else has asked a similar question, and if not ask a new one and in the future someone else will be able to work with the answer.
K6_BROWSER_TIMEOUT is the timeout that you can use when the default timeout of 30s isn't enough when k6 is performing the initial connection to chrome, and when you perform browser API calls in your script e.g. browser.newPage. So this isn't the timeout you want to be working with in your case.
The timeout you should be working with is the one that you can set on page. The issue is that in the latest release of k6 (v0.46.0) the timeout in page can't be set through page.setDefaultTimeout or page.setDefaultNavigationTimeout due to a bug, but we've recently fixed that and it will be in the next release of k6 (v0.47.0).
For now though you can work with browserContext.setDefaultTimeout or browserContext.setDefaultNavigationTimeout instead. Unfortunately although the timeout does work it suffers from an issue where internally it will mistake a millisecond timeout to a second timeout in v0.46.0 of k6, which has also been fixed and will be in the next release.
To work with the timeout in browserContext you can:
Brief summary
Hello,
I have troubles changing the timeout of my browser script using the environment variable K6_BROWSER_TIMEOUT as follow:
$env:K6_BROWSER_TIMEOUT='10s'; k6 run '.\unit tests\browser_script_fails.js'
as it always give me the error:
ERRO[0031] Uncaught (in promise) GoError: typing "something" in "input[name=\"not_existing\"]": timed out after 30s
k6 version
k6 v0.46.0
OS
Windows 10
Docker version and image (if applicable)
No response
Steps to reproduce the problem
Executing the following simple script:
always fails after the default timeout of 30s:
Expected behaviour
The script is suppose to fail after 10s, as indicated in the environment variable.
Actual behaviour
The script fails after wating for the default timeout of 30s
The text was updated successfully, but these errors were encountered: