Overview
The most effective test automation combines the speed of AI with the precision of manual control. This hybrid approach leverages each method’s strengths while compensating for their weaknesses.Why Hybrid?
| Approach | Strength | Weakness |
|---|---|---|
| AI Only | Fast, comprehensive | May miss nuances, locators might be unstable |
| Manual Only | Precise, reliable | Slow, time-consuming |
| Hybrid | Fast AND precise | Requires knowing when to use which |
The Hybrid Workflow
Phase 1: AI Generation
Start by letting AI do the heavy lifting:- Describe your test goal to the Test Planner Agent
- Review the generated plan - don’t accept blindly
- Identify what needs refinement - locators, assertions, timing
Phase 2: Manual Refinement
Apply precision where it matters:-
Fix locators with Element Picker
- Replace generic selectors with stable ones
- Add data-testid attributes where possible
-
Strengthen assertions
- AI might add basic verifications
- Add specific checks for your business logic
-
Handle edge cases
- Add waits for dynamic content
- Configure timeouts appropriately
Phase 3: Record Missing Pieces
Use the Recorder for tricky interactions:- Complex UI components - date pickers, dropdowns, drag-and-drop
- Multi-step flows - where clicking through is faster than describing
- Capturing exact user behavior - mimicking real user patterns
Phase 4: AI Assistance
Come back to AI for improvements:- AI Chat to add assertions you might have missed
- Suggestions for edge cases
- Refinement of step descriptions
Practical Examples
Example 1: E-commerce Checkout
Example 2: User Registration
Example 3: Search Functionality
When to Use Each Method
Use AI When
| Scenario | AI Method |
|---|---|
| Starting from scratch | Test Planner Agent |
| Need comprehensive coverage | Test Planner Agent |
| Adding multiple scenarios | AI Chat |
| Stuck on what to test | AI Chat for suggestions |
| Describing expected behavior | AI Chat |
Use Manual When
| Scenario | Manual Method |
|---|---|
| Locator is critical | Element Picker |
| Complex assertion logic | Editor |
| Timing-sensitive steps | Editor with waits |
| Debugging failures | Editor step-by-step |
| Business-critical verification | Manual assertions |
Use Recorder When
| Scenario | Why Recorder |
|---|---|
| Complex UI interactions | Captures exact behavior |
| Long user flows | Faster than describing |
| Learning the application | See what happens |
| Prototyping | Quick baseline |
Tips for Success
1. Don’t Trust AI Blindly
AI is smart but doesn’t know your application. Always:- Review generated locators
- Verify assertions match your expectations
- Test the generated steps
2. Let AI Do Repetitive Work
Don’t waste time on boilerplate:- Navigation sequences
- Form filling patterns
- Basic verification structures
3. Keep Manual Control Over Critical Paths
For business-critical tests:- Choose locators manually
- Write assertions explicitly
- Test thoroughly
4. Iterate Quickly
The hybrid approach enables rapid iteration:5. Document Your Decisions
When you override AI suggestions:- Note why in the test description
- Help teammates understand the choice
- Guide future AI interactions
Element Picker in Hybrid Workflow
The Element Picker bridges AI and manual work:After AI Generation
- Run the AI-generated test
- Find steps with unstable locators
- Use Element Picker to fix them
- Verify the fixed steps work
During Recording
- Record captures basic locators
- Pause recording
- Use Element Picker for critical elements
- Resume recording
Locator Priority
When fixing locators, prefer:[data-testid="..."]- Most stable[role="..."][name="..."]- Semantic and stable- Unique CSS classes - If stable in your app
- Text content - Only if text won’t change
Common Patterns
Pattern: AI Structure, Manual Polish
Pattern: Record, Enhance, Verify
Pattern: Manual Critical, AI Peripheral
Troubleshooting Hybrid Workflows
AI Suggestions Don’t Fit
- Provide more context in your prompts
- Reference specific elements by name
- Describe your application structure
Recorder Misses Steps
- Slow down your interactions
- Add missing steps manually
- Use AI Chat to fill gaps
Locators Keep Breaking
- Always verify with Element Picker
- Add stable test IDs to your application
- Use multiple fallback locators

