webview_interact
Perform click, double-click, long-press, scroll, swipe, or focus actions in Tauri app webviews using CSS, XPath, or text selectors.
Instructions
[Tauri Apps Only] Click, scroll, swipe, focus, or perform gestures in a Tauri app webview. Supported actions: click, double-click, long-press, scroll, swipe, focus. Supports CSS selectors (default), XPath, and text content matching via the strategy parameter. Requires active driver_session. For browser interaction, use Chrome DevTools MCP instead.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| windowId | No | Window label to target (defaults to "main") | |
| appIdentifier | No | App port or bundle ID to target. Defaults to the only connected app or the default app if multiple are connected. | |
| action | Yes | Type of interaction to perform | |
| selector | No | Element selector: CSS selector (default), XPath expression, text content, or ref ID (e.g., "ref=e3") | |
| strategy | No | Selector strategy: "css" (default) for CSS selectors, "xpath" for XPath expressions, "text" to find elements by text content, with fallback to placeholder, aria-label, and title attributes. Ref IDs (e.g., "ref=e3") work with any strategy. | css |
| x | No | X coordinate for direct coordinate interaction | |
| y | No | Y coordinate for direct coordinate interaction | |
| duration | No | Duration in ms for long-press or swipe (default: 500ms for long-press, 300ms for swipe) | |
| scrollX | No | Horizontal scroll amount in pixels (positive = right) | |
| scrollY | No | Vertical scroll amount in pixels (positive = down) | |
| fromX | No | Starting X coordinate for swipe | |
| fromY | No | Starting Y coordinate for swipe | |
| toX | No | Ending X coordinate for swipe | |
| toY | No | Ending Y coordinate for swipe |