wait_for
Pause test execution until a widget appears or disappears in a live Flutter app. Set gone to true to wait for elements like loading spinners to vanish, ensuring reliable assertions before proceeding.
Instructions
Waits for a widget to appear or disappear. Set gone=true to wait for disappearance (e.g. loading spinners).
Tool call template
This tool declares no required parameters. Add optional parameters from the input schema as needed.
{
"id": 1,
"jsonrpc": "2.0",
"method": "tools/call",
"params": {
"arguments": {},
"name": "wait_for"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| gone | No | If true, waits for the widget to disappear instead of appear | |
| target | No | Target string (e.g. '#loginBtn', 'text="Submit"', 'type="ElevatedButton"', 'semanticsLabel="Username"') | |
| timeout | No | Timeout in milliseconds | |
| timeout_ms | No | Implicit wait timeout in milliseconds before failing |