← ClaudeAtlas

testdriverscreenshotlisted

Capture and save screenshots during test execution
testdriverai/testdriverai · ★ 242 · Testing & QA · score 71
Install: claude install-skill testdriverai/testdriverai
<!-- Generated from screenshot.mdx. DO NOT EDIT. --> ## Overview Capture a screenshot of the current screen and automatically save it to a local file. Screenshots are organized by test file for easy debugging and review. <Note> **Automatic Screenshots**: TestDriver can automatically capture screenshots before and after every command (click, type, find, etc.). These are saved with descriptive filenames like `001-click-before-L42-submit-button.png` that include 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> Custom filename for the screenshot (without .png extension). If not provided, a timestamp-based filename is generated automatically. </ParamField> ## Returns `Promise<string>` - The absolute file path where the screenshot was saved ## File Organization Screenshots are automatically saved 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-L17-userexamplecom.png # Auto: before type() 006-t