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

## Goal

Verify a guest can start checkout.

## Steps
1. Open "/cart"
2. Click role "button" named "Checkout"

## Expected
1. Assert text "Contact information"

Useful Step Shapes

Prefer visible names and roles over brittle CSS selectors. That keeps specs readable and gives the runner stronger accessibility-tree signals.

The step language is exact. Unsupported wording fails fast with Unsupported step; the full supported grammar is listed in Config and API Reference.