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
| options.timeout | number |`30000`| Maximum time in milliseconds. Pass `0` to disable the timeout. Default is overridden by the `setDefaultTimeout` option on [BrowserContext](https://grafana.com/docs/k6/<K6_VERSION>/javascript-api/k6-browser/browsercontext/) or [Page](https://grafana.com/docs/k6/<K6_VERSION>/javascript-api/k6-browser/page/). |
16
+
| options.waitUntil | string |`load`| When to consider operation to have succeeded. See [Events](#events) for more details. |
17
+
18
+
</TableWithNestedRows>
19
+
20
+
### Events
21
+
22
+
{{% admonition type="caution" %}}
23
+
24
+
`networkidle` is DISCOURAGED. Don't use this method for testing especially with chatty websites where the event may never fire, rely on web assertions to assess readiness instead.
25
+
26
+
{{% /admonition %}}
27
+
28
+
Events can be either:
29
+
30
+
-`'domcontentloaded'` - consider operation to be finished when the `DOMContentLoaded` event is fired.
31
+
-`'load'` - consider operation to be finished when the `load` event is fired.
32
+
-`'networkidle'` - Consider operation to be finished when there are no network connections for at least `500` ms.
| Promise<null \|[Response](https://grafana.com/docs/k6/<K6_VERSION>/javascript-api/k6-browser/response/)> | The `Response` instance associated with the frame. Else, it returns `null`|
0 commit comments