observe_webview
Identify debuggable WebView pages in a mobile app and retrieve a compact DOM snapshot of the most content-rich page, optionally filtering by URL match to inspect specific web content.
Instructions
List the app's debuggable WebView pages and return a compact DOM snapshot of the one with the most content (css-selectored). The app must opt in to WebView debugging: on Android WebView.setWebContentsDebuggingEnabled(true), on iOS WKWebView.isInspectable = true (16.4+; Safari needs no opt-in). Pass match (a URL substring/regex) to target a specific page; pin a page in a flow with switchContext "WEBVIEW_@".
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| match | No | URL substring/regex selecting a specific page | |
| package | Yes | The app package (Android) or bundle id (iOS) hosting the WebView | |
| device_id | No | Target device. An adb serial selects an Android device; a UUID-shaped simulator UDID (from list_devices) selects an iOS simulator and is REQUIRED for iOS — omit it and this call runs against Android. Optional on Android when only one device is attached. |