webview_navigate
Navigate a WebView by going to a URL, moving back or forward, or reloading. Works with inspectable WKWebViews for automated testing.
Instructions
Drives a WebView's navigation: goto a URL, or back / forward / reload. Requires the app's WKWebView to be inspectable (isInspectable=true) — on by default in debug/staging builds, frequently disabled in production App Store builds.
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": {
"udid": "<udid>",
"action": "<action>"
},
"name": "webview_navigate"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| udid | Yes | Simulator / device UDID | |
| action | Yes | Navigation action. 'goto' requires url. | |
| url | No | Destination URL (required when action is 'goto') | |
| webviewId | No | Target WebView id. Omit to auto-select the first visible WebView. |