Skip to content

Commit b02a238

Browse files
inancgumusschalksnyman
authored andcommitted
Async frame.waitForTimeout
1 parent 495de37 commit b02a238

File tree

1 file changed

+20
-0
lines changed

1 file changed

+20
-0
lines changed
Lines changed: 20 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,20 @@
1+
---
2+
title: 'waitForTimeout(timeout)'
3+
description: 'Browser module: waitForTimeout(timeout) method'
4+
---
5+
6+
# waitForTimeout(timeout)
7+
8+
{{% admonition type="note" %}}
9+
10+
Never wait for timeout in production, use this only for debugging. Tests that wait for time are inherently flaky. Use [`Locator`](https://grafana.com/docs/k6/<K6_VERSION>/javascript-api/k6-browser/locator/) actions and web assertions that wait automatically.
11+
12+
{{% /admonition %}}
13+
14+
Waits for the given `timeout` in milliseconds.
15+
16+
### Returns
17+
18+
| Type | Description |
19+
| --------------- | ---------------------------------------------------- |
20+
| `Promise<void>` | A Promise that fulfills when the timeout is reached. |

0 commit comments

Comments
 (0)