Skip to main content

contexts

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

List the automatable contexts on the device: the native shell plus any debuggable WebViews. These call app_contexts.

contexts​

contexts(): Promise<string[]>

Examples​

List the native app and its WebViews​

const contexts = await device.contexts()
// ['NATIVE_APP', 'WEBVIEW_com.example.shop', ...]

The same call from the command line, mobium contexts, printed on an Android 15 emulator:

NATIVE_APP (current)
WEBVIEW_dev.mobium.mobiumapp — about:blank about:blank

mobium contexts on an Android 15 emulator

mobium contexts on an Android 15 emulator