Overview
Agentic testing allows you to run complex browser tests using natural language instructions. AI agents interpret your instructions and perform the necessary actions, making testing more intuitive and powerful.Basic Agentic Test
The simplest way to run an agentic test:Structured Output
Define expected output schemas for consistent results:Advanced Instructions
Write detailed, step-by-step instructions for complex scenarios:Convenience Methods
BrowserTest provides specialized methods for common testing patterns:Login Testing
Form Filling
Simple Test Method
Configuration Options
Customize test execution behavior:Handling Dynamic Content
Test applications with dynamic content and user interactions:Error Handling & Retry Logic
Handle test failures gracefully:Test Result Analysis
Understanding and analyzing test results:Advanced Scenarios
Multi-Step Workflows
Data Validation Testing
Best Practices
Writing Effective Instructions
- Be specific: Clearly describe what you want the agent to do
- Use action verbs: “Click”, “Type”, “Navigate”, “Verify”, “Wait”
- Include timing: Specify when to wait for elements or actions
- Describe expectations: Explain what success looks like
- Handle edge cases: Consider what might go wrong
Optimizing Performance
Test Organization
Monitoring & Reporting
Common Patterns
Authentication Testing
Navigation Testing
Troubleshooting
Common Issues
- Test timeouts: Increase timeout or simplify instructions
- Element not found: Use more specific selectors or add wait times
- Dynamic content: Add explicit waits for content to load
- Complex interactions: Break down into smaller, sequential steps
