webview_eval
Evaluate JavaScript expressions in iOS app WebViews to read app state or assert conditions against the live DOM.
Instructions
Evaluates a JavaScript expression in a WebView's page context and returns the result. Use it to read web-app state (location.href, store values, feature flags, on-screen balances) or to assert conditions against the live DOM. Requires the app's WKWebView to be inspectable (isInspectable=true) — on by default in debug/staging builds, frequently disabled in production App Store builds.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| udid | Yes | Simulator / device UDID | |
| expression | Yes | JavaScript expression to evaluate, e.g. "location.href" or "document.querySelectorAll('button').length" | |
| webviewId | No | Target WebView id. Omit to auto-select the first visible WebView. |