1. Install
2. Authenticate
Use one of these options:3. Run Your First Script
4. Auto-cleanup with a Context Manager
with block exits, the SDK stops the tracked session automatically.
Session Lifecycle Patterns
Single-session script
UseDeviceClient.start(...) and then stop explicitly:
Reusing an existing session index
If you already know the session index:Grounded Targets vs Raw Coordinates
Use grounded targets by default:Common Methods
- Session:
start,start_session,stop_session,stop_all,list_sessions,use_session,info - Actions:
tap,double_tap,long_press,type_text,swipe,drag - Utilities:
screenshot,install_app,launch_app,doctor
Common Failure Modes and Quick Fixes
| Symptom | Likely Cause | Quick Fix |
|---|---|---|
RevylError on first command | Not authenticated | Run revyl auth login or set REVYL_API_KEY |
| Actions hit wrong UI element | Ambiguous target description | Use more visible text in target, then verify with screenshot |
| Session appears missing | Session timed out | Start a fresh session with DeviceClient.start(...) |
| App launch fails | Wrong or missing bundle ID | Re-run install_app and confirm correct bundle_id |
Next
- Core onboarding flow: Device Quickstart
- Command behavior and flags: CLI Device Commands
- CI orchestration APIs: API Quickstart