testdrivercustomizing-deviceslisted
Install: claude install-skill testdriverai/testdriverai
<!-- Generated from customizing-devices.mdx. DO NOT EDIT. -->
## TestDriver Options
Configure TestDriver behavior with options passed to the `TestDriver()` function:
```javascript
const testdriver = TestDriver(context, {
// === Sandbox & Connection ===
newSandbox: true, // Force creation of a new sandbox (default: true)
reconnect: false, // Reconnect to last sandbox (default: false)
keepAlive: 60000, // Keep sandbox alive after disconnect in ms (default: 60000)
os: "linux", // 'linux' | 'windows' (default: 'linux')
resolution: "1366x768", // Sandbox resolution (e.g., '1920x1080')
ip: "203.0.113.42", // Direct IP for self-hosted sandbox
sandboxAmi: "ami-1234", // Custom AMI ID (AWS deployments)
sandboxInstance: "i3.metal", // EC2 instance type (AWS deployments)
// === Preview & Debugging ===
preview: "browser", // "browser" | "ide" | "none" (default: "browser")
headless: false, // @deprecated - use preview: "none" instead
debugOnFailure: false, // Keep sandbox alive on test failure for debugging
// === Caching ===
cache: true, // Enable element caching (default: true)
// Or use advanced caching config:
// cache: {
// enabled: true,
// thresholds: {
// find: { screen: 0.05, element: 0.8 },
// assert: 0.05
// }
// },
cacheKey: "my-test", // Cache key for element finding operations
// === Recording & Screenshots ===