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
| state | string |`load`| Optional load state to wait for. See [Events](#events) for more details. |
21
+
| options | object |`null`||
22
+
| 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/). |
23
+
24
+
</TableWithNestedRows>
25
+
26
+
### Events
27
+
28
+
{{% admonition type="caution" %}}
29
+
30
+
`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.
31
+
32
+
{{% /admonition %}}
33
+
34
+
Events can be either:
35
+
36
+
-`'domcontentloaded'` - consider operation to be finished when the `DOMContentLoaded` event is fired.
37
+
-`'load'` - consider operation to be finished when the `load` event is fired.
38
+
-`'networkidle'` - Consider operation to be finished when there are no network connections for at least `500` ms.
0 commit comments