testdriverclientlisted
Install: claude install-skill testdriverai/testdriverai
<!-- Generated from client.mdx. DO NOT EDIT. -->
## Overview
The `TestDriver` client is the main entry point for the SDK. It does the authentication and the sandbox connection. It gives access to all test methods.
## Constructor
```javascript
const testdriver = new TestDriver(apiKey, options)
```
### Parameters
<ParamField path="apiKey" type="string" required>
Your TestDriver API key from the [dashboard](https://console.testdriver.ai/settings)
</ParamField>
<ParamField path="options" type="object">
The configuration options for the client. See [SDK Options](/options) for the full list, with defaults and examples for each option.
</ParamField>
### Example
```javascript
import TestDriver from 'testdriverai';
// API key is automatically loaded from TD_API_KEY in .env
const testdriver = new TestDriver({
os: 'windows',
resolution: '1920x1080',
logging: true,
analytics: true
});
// With AI config for stricter verification
const testdriver = new TestDriver({
ai: { temperature: 0, top: { p: 0.9, k: 40 } }
});
// Or pass API key explicitly
const testdriver = new TestDriver('your-api-key', {
os: 'windows'
});
```
## Authentication
### auth()
Authenticate with the TestDriver API.
```javascript
await testdriver.auth()
```
**Returns:** `Promise<string>` - Authentication token
**Example:**
```javascript
await testdriver.auth();
```
<Note>
You must call `auth()` before `connect()`. Most examples call both sequentially.
</Note>
## Connection Management