-
Notifications
You must be signed in to change notification settings - Fork 231
Update the "Using k6 browser" section #1924
New issue
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
base: main
Are you sure you want to change the base?
Conversation
Move some of the content that was in the Running browser tests page to Hybrid approach to performance
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Left a tiny clarification question, but it's good to merge-as-is 👏🏻
Since many browser operations happen asynchronously, and to follow the Playwright API more closely, we are working on migrating most of the browser module methods to be asynchronous as well. | ||
|
||
At the moment, methods such as `page.goto()`, `page.waitForNavigation()` and `Element.click()` return [JavaScript promises](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Guide/Using_promises), and scripts must be written to handle this properly. | ||
|
||
To avoid timing errors or other race conditions in your script, if you have actions that load up a different page, you need to make sure that you wait for that action to finish before continuing. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I believe we're mostly done with this move, but I might be wrong, might be worth checking with the Browser folks 😇
What?
Updates to the "Using k6 browser" section.
Checklist
npm start
command locally and verified that the changes look good.docs/sources/k6/next
folder of the documentation.docs/sources/k6/v{most_recent_release}
folder of the documentation.Related PR(s)/Issue(s)