ui_long_press
Perform a long press touch-and-hold at specified coordinates on an iOS simulator. Use after locating elements with a snapshot to trigger context menus or secondary actions.
Instructions
Long press (touch-and-hold) at coordinates on the simulator. Use ui_snapshot to find the target element's frame coordinates.
Requires AXe CLI: brew tap cameroncooke/axe && brew install axe
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": {
"x": "<x>",
"y": "<y>"
},
"name": "ui_long_press"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| device | No | Device UDID, name, or 'booted' | booted |
| x | Yes | X coordinate | |
| y | Yes | Y coordinate | |
| duration_ms | No | Hold duration in milliseconds (default: 1000) |