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
public List<String> contexts()
The automatable contexts: the native shell plus any WebViews.
@return the context ids
Examples
List the native app and its WebViews
List<String> contexts = device.contexts(); // e.g. [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