AI Steps
AI Validation
Verify if a condition is true
Overview
AI Validation steps allow you to verify simple conditions using natural language assertions. Each validation should focus on checking a single aspect of your application, such as text content, element presence, colors, or layout.
Key Benefits
- Natural Language Assertions: Write validations as you would describe them to a human
- Reduced Maintenance: Less brittle than traditional selector-based assertions
- Visual Understanding: Can verify colors, layouts, and visual properties easily
Use Cases
Text Validation
Element State
Visual Properties
Layout Position
Best Practices
- Keep It Simple: Focus on one check per validation
- Be Specific: Clearly state what you’re checking
Tips for Success
- Write one validation per check
- Be explicit about what you’re verifying
- Use clear, specific language
- Focus on visual properties that are easy to describe
- Break complex validations into multiple simple ones
Related Topics
- Variables in AI Steps - Using variables in validation assertions