Core Principles
1. Descriptive Elements
Level 1: Basic Text
Level 1: Basic Text

Level 2: Position Context
Level 2: Position Context

Level 3: Surrounding Elements
Level 3: Surrounding Elements

2. Verify States
Always begin with ‘Verify’ to check for :-
Element presence
-
Content Validation
Writing Steps
Each test step is one of the 4 types. ACTION, VERIFICATION, JAVASCRIPT, EXTRACTAction
Click, Type, Hover, Scroll, Wait, Upload, or Select operations for user interactions
Verify
Check elements, states, and conditions on the page
JavaScript
Run custom JavaScript code for complex operations
Extract
Pull and store data from the page for later use
Best Practices
- Start Simple: Begin with discrete actions for common interactions
- Validate Early: Use verification actions to catch issues quickly
- Extract Strategically: Only extract data you need for subsequent steps
- JavaScript as Backup: Use JavaScript actions when other options aren’t sufficient
Common Pitfalls
- Multiple Actions: Combining multiple actions in one step
- Vague Descriptions: Using unclear element descriptions
- Missing Brackets: Forgetting to enclose values or elements
- Skipping Verifications: Not validating important states
- Implicit Waits: Not specifying wait durations
Next Steps
- Check out our prompt library
- Try writing your first test
- Explore available actions
- Learn about test configuration