Important Note About Test Execution
All tests automatically open the app when they start. You do NOT need to include manualopen_app steps at the beginning of your tests.
The examples below demonstrate the correct pattern: starting with instructions, validations, or extractions.
Basic Examples
Simple Validation (iOS)
Test that verifies an app launches correctly:Android App Validation
Login Flows
Simple Login (iOS)
Basic login test with hardcoded credentials:Login with High Level Instruction
Using a single instruction for the entire login flow:Mobile Login with Biometrics Check
Login flow with conditional:Data Extraction and Validation
Extract and Verify Price
Ensuring price consistency across screens:Extract Order ID for Later Use
Capturing data for verification:Extract Multiple Values
Working with multiple extracted variables:Conditional Logic
Optional Popup Handling
Handling popups that may or may not appear:Different Paths Based on State
Branching based on user state:Nested Conditionals
Complex conditional logic:Loops and Iteration
Load All Content
Loading paginated content:Dismiss Multiple Notifications
Clearing all notifications:When Manual Navigation IS Needed
Mobile App Lifecycle Testing
kill_app vs go_home:kill_app: Completely terminates the app. Use for testing cold-start behavior and state persistence after termination.go_home: Goes to home screen but keeps app in background. Use for testing background/foreground transitions.
Deep Link Testing
Testing deep link navigation:Opening System Apps
Testing cross-app workflows by opening system apps like Photos, Contacts, or Settings:Location-Based Testing
Testing features that depend on GPS location:Advanced Patterns
Form Submission with Validation
Complete form flow:Search with No Results Handling
Search flow with conditional result handling:Multi-Step Checkout
Complete e-commerce checkout flow:Best Practices
Validate Outcomes, Not Transient States
Validate the result of an action, not brief loading/transition states. Transient UI may vanish before screenshot capture.Use Wait Blocks Sparingly
Steps have built-in retry logic. Only add waits for known significant delays (afterkill_app, system-level pauses).
Do NOT Start with Manual Navigation
Use Descriptive Variable Names
Validate After Important Actions
Related Documentation
- YAML Schema Reference - Complete schema
- Control Flow Guide - Detailed if/while usage
- Using Variables - Variable management