Skip to main content

map · mapDiff

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

Map the actionable elements on the current screen and return them as refs (@e1, @e2, ...) with a label and role. These call app_map.

map​

map(): Promise<Element[]>

mapDiff​

mapDiff(): Promise<MapDiff>

Examples​

Map what can be acted on, with a ref for each​

const elements = await device.map()
for (const e of elements) console.log(e.ref, e.role, e.label)
// @e1 button Network & internet ...

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

@e1 settings_homepage_container (list)
@e2 Profile picture, double tap to open Google Account (button)
@e3 Search settings (button)
@e4 main_content_scrollable_container (list)
@e5 Network & internet Mobile, Wi‑Fi, hotspot (button)
@e6 Connected devices Bluetooth, pairing (button)
@e7 Apps Assistant, recent apps, default apps (button)
@e8 Notifications Notification history, conversations (button)
@e9 Battery 100% (button)
@e10 Storage 51% used - 7.85 GB free (button)
@e11 Sound & vibration Volume, haptics, Do Not Disturb (button)

mobium map on an Android 15 emulator

mobium map on an Android 15 emulator

What the last action changed​

const diff = await device.mapDiff()
for (const e of diff.added) console.log('+', e.ref, e.label)
for (const c of diff.changed) console.log('~', c.after.ref, c.after.label, c.what)