webview_get_styles
Retrieve computed CSS styles from elements in a Tauri app using CSS selectors, XPath, or text content matching. Target specific app instances and windows for style inspection.
Instructions
[Tauri Apps Only] Get computed CSS styles from elements in a Tauri app. Supports CSS selectors (default), XPath, and text content matching via the strategy parameter. Requires active driver_session. Targets the only connected app, or the default app if multiple are connected. Specify appIdentifier (port or bundle ID) to target a specific app. For browser style inspection, 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. | |
| selector | Yes | Element selector: CSS selector (default), XPath expression, text content, or ref ID | |
| 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 |
| properties | No | Specific CSS properties to retrieve. If omitted, returns all computed styles | |
| multiple | No | Whether to get styles for all matching elements (true) or just the first (false) |