← ClaudeAtlas

testdriverscreenshotslisted

Capture and manage screenshots during test execution
testdriverai/testdriverai · ★ 242 · Testing & QA · score 73
Install: claude install-skill testdriverai/testdriverai
<!-- Generated from screenshots.mdx. DO NOT EDIT. --> ## Overview TestDriver can capture screenshots manually at any point during a test, or automatically before and after every command. Screenshots are saved to a structured directory for easy debugging. ## Manual Screenshots Use `testdriver.screenshot()` to capture the current screen: ```javascript const path = await testdriver.screenshot(); console.log('Saved to:', path); // .testdriver/screenshots/my-test/screenshot-1719849312345.png ``` ### Options ```javascript await testdriver.screenshot(filename?) ``` <ParamField path="filename" type="string"> Custom filename for the screenshot. `.png` is appended automatically if missing. If omitted, defaults to `screenshot-<timestamp>.png`. </ParamField> **Returns:** `Promise<string>` — the absolute file path of the saved screenshot. ```javascript // Default filename await testdriver.screenshot(); // → .testdriver/screenshots/my-test/screenshot-1719849312345.png // Custom filename await testdriver.screenshot('login-page'); // → .testdriver/screenshots/my-test/login-page.png // With .png extension await testdriver.screenshot('dashboard-loaded.png'); // → .testdriver/screenshots/my-test/dashboard-loaded.png ``` ## Auto Screenshots Enable automatic screenshots before and after every command: ```javascript const testdriver = new TestDriver({ autoScreenshots: true, }); ``` <ParamField path="autoScreenshots" type="boolean" default={false}> When `true`, captures a scre