Scenarios & Steps
Scenarios are sequences of steps that end in one or more captures. They can be recorded interactively or written manually, but the stored model is always JSON.

Smallest scenario
Every scenario needs a unique key, a human-readable name, and the target
url. The url is the route Reshot navigates to — you do not add a goto
step for it. screenshot steps each need their own unique key.
{
"scenarios": [
{
"key": "billing-overview",
"name": "Billing Overview",
"url": "/app/billing",
"steps": [
{ "action": "wait", "ms": 1000 },
{ "action": "screenshot", "key": "billing-overview" }
]
}
]
}Expanded example
{
"scenarios": [
{
"key": "user-login",
"name": "User Login",
"url": "/login",
"steps": [
{ "action": "type", "selector": "#email", "text": "user@example.com" },
{ "action": "type", "selector": "#password", "text": "password123" },
{ "action": "click", "selector": "button[type='submit']" },
{ "action": "waitForSelector", "selector": "[data-testid='dashboard']" },
{ "action": "screenshot", "key": "dashboard-logged-in" }
]
}
]
}Step API reference
| Action | Required fields | Optional fields | Description |
|---|---|---|---|
click | selector | description | Click an element |
type | selector, text | - | Type into an input |
hover | selector | - | Hover an element |
wait | - | ms | Pause execution |
waitForSelector | selector | timeout | Wait for a selector |
scroll | - | selector | Scroll the page or to an element |
screenshot | key | selector, clip, crop, description | Capture the current view |
Required flows
By default every flow is required: true: if a run fails to capture it, the
reshot/visual-review check fails and the merge stays blocked. Approving the
captures that did land cannot unblock a flow that was never captured — the
fix is to re-run the capture job.
Set required: false on a flow that should not hold up a merge:
{
"key": "marketing-changelog",
"name": "Changelog",
"url": "/changelog",
"required": false,
"steps": []
}The flow still publishes, still diffs, and still appears in the review queue. It just stops being part of the completeness gate.
Scenario-level overrides
{
"key": "checkout-flow",
"name": "Checkout Flow",
"url": "/checkout",
"timeout": 60000,
"viewport": {
"width": 1920,
"height": 1080
},
"steps": []
}Scenario-level settings override the global config.
Selector guidance
Prefer app-owned selectors such as data-testid or data-reshot-* attributes.
They are easier to keep stable across product changes than visual CSS selectors.

