← ClaudeAtlas

testdriverscreenshotlisted

Capture and save screenshots during test execution
testdriverai/testdriverai · ★ 243 · Testing & QA · score 72
Install: claude install-skill testdriverai/testdriverai
<!-- Generated from screenshot.mdx. DO NOT EDIT. --> ## Overview Capture a screenshot of the screen. TestDriver saves it to a local file automatically. TestDriver groups the screenshots by test file. This makes debug and review easy. <Note> **Automatic Screenshots**: TestDriver can capture screenshots automatically before and after each command (click, type, find, and more). It saves them with clear filenames such as `001-click-before-L42-submit-button.png`. The filename includes the line number from your test file. Enable this with `autoScreenshots: true` in your TestDriver options. </Note> ## Syntax ```javascript const filePath = await testdriver.screenshot(filename) ``` ## Parameters <ParamField path="filename" type="string" optional> A custom filename for the screenshot (without the .png extension). If you do not give one, TestDriver makes a filename from the timestamp automatically. </ParamField> ## Returns `Promise<string>` - The absolute file path where TestDriver saved the screenshot ## File Organization TestDriver saves screenshots automatically to `.testdriver/screenshots/<test-file-name>/` in your project root: ``` .testdriver/ screenshots/ login.test/ 001-find-before-L15-email-input.png # Auto: before find() 002-find-after-L15-email-input.png # Auto: after find() 003-click-before-L16-email-input.png # Auto: before click() 004-click-after-L16-email-input.png # Auto: after click() 005-type-before-L1