Skip to main content

Find

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

Find elements matching a locator and return their refs, without tapping. These call app_find.

Find​

func (d *Device) Find(ctx context.Context, locator string) ([]Element, error)

Find returns the elements matching a locator, without acting on them.

Examples​

Find every button on screen, without tapping​

buttons, err := dev.Find(ctx, "role=button")
if err != nil {
return err
}
for _, b := range buttons {
fmt.Println(b.Ref, b.Label)
}

The same call from the command line, mobium find role=button, printed on an Android 15 emulator:

@e2 Profile picture, double tap to open Google Account (button)
@e3 Search settings (button)
(no ref) [53,599][200,736]
@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 find role=button on an Android 15 emulator

mobium find role=button on an Android 15 emulator