Long-press
long_pressSimulates a sustained press at screen coordinates or on a UI element identified by text, content description, or resource ID, with configurable hold duration.
Instructions
Long-press x, y in physical pixels, or the center of the node whose text or contentDesc (iOS: label or value) equals text, or whose resource id (iOS: identifier) matches id. An iPhone needs install_runner once.
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": "long_press"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| x | No | ||
| y | No | ||
| id | No | Resource id, full or the part after :id/ (iOS: identifier). | |
| text | No | Exact text or contentDesc (iOS: label or value), case-sensitive. | |
| device | No | Id or name. | |
| timeout | No | With text or id: ms to keep reading the tree until the node appears; the call can run up to 6 s longer. | |
| duration | No | Hold time in ms. Default 1000. |