autoScreenshots instead. See Screenshots.
Signature
Parameters
string
The file name. TestDriver adds
.png if itβs missing. Without it, the file is named screenshot-<timestamp>.png.Returns
Promise<string>. The absolute path of the saved file.
Where files are saved
Screenshots go to.testdriver/screenshots/<test file>/ in the directory you run tests from. <test file> is the test fileβs name without its last extension, so tests/login.test.mjs saves to .testdriver/screenshots/login.test/.
.gitignore:
.gitignore
Examples
Save a named checkpoint
Log the path
Complete example
tests/login.test.mjs
Related
- Screenshots: capture every step automatically with
autoScreenshots - Debug a failing test: view saved screenshots from your AI client
- Dashcam: watch a video replay of the whole test

