Skip to main content

mobium eval

This tool on every surface: CLI · MCP · Python · JavaScript · Go · Java · .NET

Run a JavaScript expression in the current WebView

Needs a WebView context — mobium context WEBVIEW_... first.

Objects come back as JSON. This is the escape hatch for anything map and text do not cover, and the way to ask a page a question directly rather than inferring the answer from what is on screen.

Usage​

mobium eval <expression> [flags]

Examples​

Read the page title in a WebView​

mobium eval "document.title"

More, from mobium eval --help​

mobium eval "document.title"
mobium eval "JSON.stringify([innerWidth, innerHeight])"

On a device​

mobium eval document.title on an Android 15 emulator

mobium eval document.title on an Android 15 emulator

The tool​

eval calls app_eval; its arguments and what every client calls it are there.