Writing Specs
WebTest AI specs are Markdown files with optional frontmatter and one or more top-level test headings.
---
suite: checkout
baseUrl: https://shop.example
tags: [checkout]
---
# Guest Checkout
Verify a guest can start checkout.
Steps:
1. Open "/cart"
2. Click role "button" named "Checkout"
3. Assert text "Contact information"
Useful Step Shapes
Open "/path"Click text "Save"Click role "button" named "Continue"Fill field "Email" with "$USER_EMAIL"Assert text "Dashboard"Assert url contains "/dashboard"Capture screenshot "after-login"Wait for url contains "/complete"Wait for network "POST" "/api/orders"
Prefer visible names and roles over brittle CSS selectors. That keeps specs readable and gives the runner stronger accessibility-tree signals.