Common test patterns organized by category. Use these as starting points when building test plans.
- Navigate to login page
- Fill username/email
- Fill password
- Click submit
- Assert: URL changes to dashboard/home, welcome message visible, login form gone
- Navigate to login page
- Fill wrong credentials
- Click submit
- Assert: Error message visible, URL stays on login page, form fields still present
- Navigate to login page
- Click submit without filling fields
- Assert: Validation errors shown for required fields
- Start from authenticated state
- Find and click logout
- Assert: Redirected to login/home, protected routes inaccessible
- Login successfully
- Reload the page
- Assert: Still authenticated, not redirected to login
- Take snapshot of navigation
- Click each nav link
- Assert: Correct page loads, URL matches, active state on nav item
- Navigate page A → page B
- Press browser back
- Assert: Returns to page A with correct state
- Navigate to non-existent URL path
- Assert: 404 page shown (not blank page or server error), navigation still works
- Navigate directly to a deep URL (e.g., /settings/notifications)
- Assert: Page loads correctly, not redirected to home
- Submit form with all fields empty
- Assert: Validation errors for each required field, form not submitted
- Fill all fields with valid data
- Submit
- Assert: Success message/redirect, data persisted (reload and verify)
For each field, test boundary conditions:
- Too short / too long input
- Invalid format (email without @, phone with letters)
- Special characters
- Leading/trailing whitespace
- Fill some fields, don't submit
- Navigate away, come back
- Assert: Data preserved or explicitly cleared with warning
- Find upload input
- Upload a file:
agent-browser upload @eN /path/to/file - Assert: File name shown, preview if applicable, submit works
- Navigate to create form/page
- Fill required fields
- Submit
- Assert: New item appears in list, success feedback shown
- Navigate to list view
- Click an item
- Assert: Detail view shows correct data matching list entry
- Open existing item for editing
- Change a field
- Save
- Assert: Updated value persists after reload
- Find delete action for an item
- Confirm deletion (check for confirmation dialog)
- Assert: Item removed from list, appropriate feedback shown
- Click delete
- Cancel/dismiss the confirmation
- Assert: Item still exists, not deleted
- Set offline mode:
agent-browser set offline on - Attempt an action that requires network
- Assert: Graceful error message, no crash
- Restore:
agent-browser set offline off
- Navigate through each major page
- Run
agent-browser errorson each - Assert: No uncaught JS errors
- Navigate to a list/table view with no data
- Assert: Empty state message shown (not blank or broken layout)
agent-browser set viewport 375 667Check: navigation collapses to hamburger, content doesn't overflow horizontally, touch targets are large enough, text is readable without zooming
agent-browser set viewport 768 1024Check: layout adapts, sidebars collapse or resize, images scale
agent-browser set viewport 1920 1080Check: content doesn't stretch excessively, max-width constraints work
- Press Tab repeatedly
- Assert: Focus moves through interactive elements in logical order
- Assert: Focus indicator visible on each element
- Take full snapshot (no -i flag)
- Assert: Headings follow hierarchy (h1 → h2 → h3), no skipped levels
- Check snapshot for images
- Assert: Images have meaningful alt text (not empty or "image")
- Snapshot interactive elements
- Assert: Every input has an associated label (visible in accessibility tree)
- Navigate to page
- Use
wait --load networkidle - If it takes noticeably long (>5s), flag it
- Check
network requestsfor large/slow resources
- Run
consoleafter page load - Flag excessive warnings, deprecation notices, or repeated errors
agent-browser diff url {STAGING} {PROD} --screenshotLook for: content differences, missing elements, layout shifts, broken images
- Screenshot before deploy
- Deploy
diff screenshot --baseline before.png- Flag pixel differences above threshold