long-press
Simulate a long press gesture on mobile app elements to access context menus or secondary actions. Specify element selector and press duration for precise automation.
Instructions
Perform a long press gesture on an element
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": {
"selector": "<selector>"
},
"name": "long-press"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| selector | Yes | Element selector (e.g., xpath, id) | |
| duration | No | Duration of the long press in milliseconds (default: 1000) | |
| strategy | No | Selector strategy: xpath, id, accessibility id, class name (default: xpath) |