This is recommended when working with the browser APIs.
What?
Update example to work with page.waitForTimeout.
Why?
It's recommended that we work with page.waitForTimeout over sleep due to the async nature of the browser API and the synchronous sleep that blocks the event loop.
Checklist
[x] I have performed a self-review of my code
[ ] I have added tests for my changes
[ ] I have commented on my code, particularly in hard-to-understand areas
This is recommended when working with the browser APIs.
What?
Update example to work with
page.waitForTimeout
.Why?
It's recommended that we work with
page.waitForTimeout
oversleep
due to the async nature of the browser API and the synchronoussleep
that blocks the event loop.Checklist
Related PR(s)/Issue(s)
Updates: https://github.com/grafana/k6-docs/issues/1719