waitFor()
This function is used to wait for number of milliseconds given or a given element or a given condition.
Examples
Section titled “Examples”waitFor(5000)waitFor("1 item in cart")waitFor("Order Created", 2000)waitFor(async () => !(await $("loading-text").exists()))Parameters
Section titled “Parameters”| Name | Type | Description |
|---|---|---|
element | string | Element/condition to wait for |
time | number | time | Time to wait. default to 10s |
options | unknown | Default: {}. |
null-null | options.message | Custom message |
Returns
Section titled “Returns”| Type | Description |
|---|---|
| promise |