eval
This tool on every surface: CLI · MCP · Python · JavaScript · Go · Java · .NET
Run a JavaScript expression in the current WebView and return its value as a string. These call app_eval.
eval
def eval(expression: str) -> str
Run a JavaScript expression in the current WebView.
Objects come back as JSON.
Examples
Read the page title in a WebView
title = device.eval("document.title")
print(title)
On a device

mobium eval document.title on an Android 15 emulator