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
-
Start an Android emulator session:
agent-device open com.example.app --platform android --session my-session
-
Take a snapshot:
agent-device snapshot -i --session my-session
Output includes refs like @e11 [text] "My App".
-
Try to press the ref:
agent-device press @e11 --session my-session
-
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.
Description
press @reffails on Android emulator withError (INVALID_ARGS): press requires x y, even though the ref was obtained from a successfulsnapshot -icall.Steps to Reproduce
Start an Android emulator session:
Take a snapshot:
Output includes refs like
@e11 [text] "My App".Try to press the ref:
Error:
Expected Behavior
press @e11should tap the element identified by the ref, as documented in the SKILL.md:The example
agent-device press @e2suggests refs should work withpress.Workaround
Using
find "text" clickworks correctly:agent-device find "My App" click --session my-sessionEnvironment
Notes
PR #70 unified
pressandclickto support@ref, coordinate, and selector targets. This may be a regression or incomplete implementation for the Android platform.