Each file under vt/specs can define frontmatter at the top of the file.
Example
---
title: Login
description: Login dialog interaction
url: /login
waitStrategy: selector
waitSelector: "[data-testid='login-ready']"
viewport:
id: tablet
width: 768
height: 1024
steps:
- action: sleep
timeoutMs: 200
- action: assert
type: exists
selector: "[data-testid='login-email']"
- action: select
selector: "#login-email"
steps:
- action: write
text: [email protected]
- action: screenshot
---
Supported Keys
| Key | Type | Description |
|---|---|---|
title |
string | Display title |
description |
string | Optional description |
template |
string | Template file under vt/templates |
url |
string | URL override for this spec |
waitEvent |
string | Event name to wait for |
waitSelector |
string | Selector to wait for |
waitStrategy |
networkidle | load | event | selector |
Readiness strategy |
viewport |
object or array | Viewport override(s) for this spec |
skipScreenshot |
boolean | Skip capture for this spec |
specs |
array of strings | Additional metadata list |
steps |
array | Structured action steps executed after initial screenshot |
Wait Strategy Rules
waitStrategy: eventrequireswaitEvent.waitStrategy: selectorrequireswaitSelector.- If
waitStrategyis omitted:eventis used whenwaitEventis set- otherwise
loadis used
steps Shape
steps only supports structured action objects:
- each step must include
action - additional keys depend on action type (
waitFor,assert,select,write, etc.) selectis the only nested action and requires astepsarray plus exactly one oftestIdorselector
Example:
steps:
- action: sleep
timeoutMs: 200
- action: assert
type: url
value: "/login"
match: includes
- action: select
selector: "#login-email"
steps:
- action: write
text: [email protected]
- action: assert
type: visible
- action: press
key: Enter
For full command reference, see Step Actions.