capture screenshot
Capture a PNG screenshot under the scenario screenshots folder
Write a full-page PNG beside the .stk file under screenshots/.
Syntax
Then I capture screenshot "<basename>"Requirements
| Item | Contract |
|---|---|
| Element / control shape | None — full-page PNG capture |
| How the label binds | Basename payload (no path segments) |
| Qualifiers that change resolve | None |
| Platform | Web only |
| Wrong shape → use instead | Visual assert → should match screenshot |
See also UI contracts.
Examples
Then I capture screenshot "checkout-step"Writes {stk-dir}/screenshots/checkout-step.png (creates the directory).
Notes
- Basename only — reject
/,\, and... - Optional
.pngsuffix is added if omitted. - No visual diff in v1 (capture only).
- Does not use action-resolve auto-wait (page-level op).
- Web only for v1.