perform-w3c-gesture
Execute mobile touch gestures like swipe, tap, and pinch using the W3C Actions API for reliable app automation testing with Appium.
Instructions
Perform touch gestures using the W3C Actions API (more reliable than TouchAction API)
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": {
"actionType": "<actionType>",
"startX": "<startX>",
"startY": "<startY>"
},
"name": "perform-w3c-gesture"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| actionType | Yes | The type of gesture to perform | |
| startX | Yes | Starting X coordinate | |
| startY | Yes | Starting Y coordinate | |
| endX | No | Ending X coordinate (for swipe/dragAndDrop) | |
| endY | No | Ending Y coordinate (for swipe/dragAndDrop) | |
| duration | No | Duration of the gesture in milliseconds (default: 750) | |
| secondPointStartX | No | Starting X coordinate for second finger (pinch gestures only) | |
| secondPointStartY | No | Starting Y coordinate for second finger (pinch gestures only) | |
| secondPointEndX | No | Ending X coordinate for second finger (pinch gestures only) | |
| secondPointEndY | No | Ending Y coordinate for second finger (pinch gestures only) |