Atlas › 01 Agent Skills for Browser Automation › Test Patterns for AI-Driven Browser Automation☰ Read as one page
Test Patterns for AI-Driven Browser Automation
11.1OverviewA note on how to read the examples: the Playwright CLI is ref-driven. The agent takes a snapshot (a YAML accessibility summary saved to…11.2Pattern 1: Navigate-Act-Verify (NAV)The fundamental test pattern. Every browser test follows this structure:11.3Pattern 2: Form Validation TestingTest that forms reject invalid input correctly.11.4Pattern 3: Multi-Page FlowTests that span multiple page navigations.11.5Pattern 4: Data Extraction and VerificationExtract structured data from the page and verify against expected values.11.6Pattern 5: Async Operations (Uploads, Debounce)For operations that don't complete immediately (AJAX calls, file uploads, etc.). Actions auto-wait for their target element, which covers…11.7Pattern 6: Multi-Session TestingTests that require multiple browser contexts — two users, two roles, two environments. Named sessions (-s=name) replace the tab juggling of…11.8Pattern 7: Negative TestingVerify that the application correctly rejects invalid operations.11.9Pattern 8: Visual Regression (Screenshot Comparison)Use screenshots to detect visual changes.11.10Pattern 9: Error State TestingVerify the application handles errors gracefully.11.11Anti-Patterns