@@ -27,23 +27,31 @@ npx -y agent-device
2727
2828## Core workflow
2929
30- 1 . Open app or just boot device: ` open [app] `
31- 2 . Snapshot: ` snapshot ` to get refs from accessibility tree
32- 3 . Interact using refs (` click @ref ` , ` fill @ref "text" ` )
33- 4 . Re-snapshot after navigation/UI changes
34- 5 . Close session when done
30+ 1 . Optional preflight in CI: ` boot --platform ios|android `
31+ 2 . Open app or just boot device: ` open [app] `
32+ 3 . Use ` reinstall <app> <path> ` when you need fresh app state before testing auth/onboarding flows
33+ 4 . Snapshot: ` snapshot ` to get refs from accessibility tree
34+ 5 . Interact using refs (` click @ref ` , ` fill @ref "text" ` )
35+ 6 . Re-snapshot after navigation/UI changes
36+ 7 . Close session when done
3537
3638## Commands
3739
3840### Navigation
3941
4042``` bash
43+ agent-device boot # Ensure target is booted/ready without opening app
44+ agent-device boot --platform ios # CI preflight for iOS simulator
45+ agent-device boot --platform android # CI preflight for Android device/emulator
4146agent-device open [app] # Boot device/simulator; optionally launch app
4247agent-device open [app] --activity com.example/.MainActivity # Android: open specific activity
4348agent-device close [app] # Close app or just end session
49+ agent-device reinstall < app> < path> # Uninstall + install app in one command
4450agent-device session list # List active sessions
4551```
4652
53+ ` boot ` requires either an active session or an explicit selector (` --platform ` , ` --device ` , ` --udid ` , or ` --serial ` ).
54+
4755### Snapshot (page analysis)
4856
4957``` bash
@@ -162,8 +170,10 @@ agent-device apps --platform android --user-installed
162170- On iOS, ` xctest ` is the default and does not require Accessibility permission.
163171- If XCTest returns 0 nodes (foreground app changed), agent-device falls back to AX when available.
164172- ` open <app> ` can be used within an existing session to switch apps and update the session bundle id.
173+ - ` reinstall <app> <path> ` supports Android devices/emulators and iOS simulators in v1.
165174- If AX returns the Simulator window or empty tree, restart Simulator or use ` --backend xctest ` .
166175- Use ` --session <name> ` for parallel sessions; avoid device contention.
176+ - Use ` boot --platform ios|android ` as explicit preflight in CI before ` open ` .
167177- Use ` --activity <component> ` on Android to launch a specific activity (e.g. TV apps with LEANBACK).
168178- Use ` fill ` when you want clear-then-type semantics.
169179- Use ` type ` when you want to append/enter text without clearing.
0 commit comments