tap
Simulate a touch on an iOS simulator element by index, predicate, or coordinates to automate UI interactions and verify app behavior.
Instructions
Tap an element by index (from UI tree), predicate, or coordinates.
Tool call template
Replace each placeholder with a value matching the input schema. Only required parameters are included; add optional parameters as needed.
{
"id": 1,
"jsonrpc": "2.0",
"method": "tools/call",
"params": {
"arguments": {
"device_id": "<device_id>"
},
"name": "tap"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| x | No | X coordinate | |
| y | No | Y coordinate | |
| index | No | Element index from UI tree | |
| device_id | Yes | Simulator UDID | |
| predicate | No | Element predicate |
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
| result | Yes |