We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
When the testing script runs for over 30 seconds the browser closes automatically, disrupting the test.
k6 v0.42.0 ((devel), go1.19.4, linux/amd64)
Ubuntu Linux 22.04.1 LTS
Chromium 109.0.5414.119 snap
No response
`
import { sleep } from 'k6'; import { chromium } from 'k6/x/browser'; export default function () { const browser = chromium.launch({ headless: false }); const page = browser.newPage(); page.goto("https://k6.io/docs/javascript-api/xk6-browser/api/page/") .then(() => { sleep(30); console.log("After 30 seconds") page.goto("https://k6.io/docs/javascript-api/xk6-browser/api/page/") console.log("After trying to goto k6 again") page.close() browser.close() }) }
The browser should remain open
The browser closes automatically failing the test
The text was updated successfully, but these errors were encountered:
Hi @GeorgeLoukovitis , Could you please open a ticket for this in our community forum? We will handle the issue from there. Thank you.
Sorry, something went wrong.
Solved by changing the following:
const browser = chromium.launch({ timeout: '5m' });
slowMo
timeout
No branches or pull requests
Brief summary
When the testing script runs for over 30 seconds the browser closes automatically, disrupting the test.
xk6-browser version
k6 v0.42.0 ((devel), go1.19.4, linux/amd64)
OS
Ubuntu Linux 22.04.1 LTS
Chrome version
Chromium 109.0.5414.119 snap
Docker version and image (if applicable)
No response
Steps to reproduce the problem
`
`
Expected behaviour
The browser should remain open
Actual behaviour
The browser closes automatically failing the test
The text was updated successfully, but these errors were encountered: