# wait_for

Wait inside the engine until a condition holds (element visible or gone, text, app, notification, stable screen).

Wait inside the engine until a condition holds (element visible or gone, text, app, notification, stable screen).

| | |
|---|---|
| REST operation | [`waitFor`](/reference/rest/waits/#waitfor) (`POST /v1/devices/{deviceId}/waits`) |
| Needs a device | yes |
| Read only | yes |
| Profiles | `core`, `testing`, `full` |

## Parameters

| Name | Required | Type | Goes to | What it is |
|---|---|---|---|---|
| `device_id` | yes | string | path `deviceId` | Stable device id such as `ios:00008120-001A2B3C4D5E6F70` or `android:R58M123ABC`. |
| `lease` | no | string | header `Silan-Lease` | Lease token when the device is claimed. |
| `condition` | yes | object | body `condition` | Single-device condition. Cross-device conditions live in scenarios. |
| `timeout_ms` | no | integer | body `timeoutMs` |  |

## Example call

```text
wait_for({ device_id: "ios:00008120-001A2B3C4D5E6F70", condition: … })
```