Skip to content

Android: press @ref fails with "press requires x y" error #139

@clayne11

Description

@clayne11

Description

press @ref fails on Android emulator with Error (INVALID_ARGS): press requires x y, even though the ref was obtained from a successful snapshot -i call.

Steps to Reproduce

  1. Start an Android emulator session:

    agent-device open com.example.app --platform android --session my-session
  2. Take a snapshot:

    agent-device snapshot -i --session my-session

    Output includes refs like @e11 [text] "My App".

  3. Try to press the ref:

    agent-device press @e11 --session my-session
  4. Error:

    Error (INVALID_ARGS): press requires x y
    

Expected Behavior

press @e11 should tap the element identified by the ref, as documented in the SKILL.md:

press is canonical tap command; click is an equivalent alias.

The example agent-device press @e2 suggests refs should work with press.

Workaround

Using find "text" click works correctly:

agent-device find "My App" click --session my-session

Environment

  • agent-device version: latest (installed via npx)
  • Platform: Android emulator (Pixel 8 Pro API 36)
  • Host OS: macOS (Darwin, Apple Silicon)
  • Node: v22+

Notes

PR #70 unified press and click to support @ref, coordinate, and selector targets. This may be a regression or incomplete implementation for the Android platform.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions