Skill240 repo starsupdated 20d ago
testdriver:provision
Launch browsers, desktop apps, and extensions in your sandbox
Install in Claude Code
Copygit clone --depth 1 https://github.com/testdriverai/testdriverai /tmp/testdriver-provision && cp -r /tmp/testdriver-provision/ai/skills/testdriver-provision ~/.claude/skills/testdriver-provisionThen start a new Claude Code session; the skill loads automatically.
Definition
SKILL.md
<!-- Generated from provision.mdx. DO NOT EDIT. -->
## Overview
The Provision API sets up applications in your sandbox before tests run. It handles downloading, installing, and launching browsers, desktop apps, VS Code, Chrome extensions, and more.
Access provision methods via `testdriver.provision.*`:
```javascript
await testdriver.provision.chrome({ url: 'https://example.com' });
```
## Methods
### chrome()
Launch Google Chrome with an optional URL.
```javascript
await testdriver.provision.chrome(options?)
```
<ParamField path="options" type="ProvisionChromeOptions">
<Expandable title="properties">
<ParamField path="url" type="string" default="http://testdriver-sandbox.vercel.app/">
URL to navigate to after launch.
</ParamField>
<ParamField path="maximized" type="boolean" default={true}>
Launch Chrome in maximized window mode.
</ParamField>
<ParamField path="guest" type="boolean" default={false}>
Launch Chrome in guest profile mode.
</ParamField>
</Expandable>
</ParamField>
```javascript
// Basic
await testdriver.provision.chrome({ url: 'https://example.com' });
// With guest mode
await testdriver.provision.chrome({
url: 'https://example.com',
guest: true,
maximized: true,
});
```
### chromeExtension()
Install and launch a Chrome extension. You can install from a local unpacked directory or from the Chrome Web Store by extension ID.
```javascript
await testdriver.provision.chromeExtension(options)
```
<ParamField path="options" type="ProvisionChromeExtensionOptions" required>
One of `extensionPath` or `extensionId` is required.
<Expandable title="properties">
<ParamField path="extensionPath" type="string">
Local path to an unpacked extension directory. The extension files are uploaded to the sandbox.
</ParamField>
<ParamField path="extensionId" type="string">
Chrome Web Store extension ID to install.
</ParamField>
<ParamField path="maximized" type="boolean" default={true}>
Launch Chrome in maximized window mode.
</ParamField>
</Expandable>
</ParamField>
```javascript
// From local directory
await testdriver.provision.chromeExtension({
extensionPath: './my-extension',
});
// From Chrome Web Store
await testdriver.provision.chromeExtension({
extensionId: 'abcdefghijklmnop',
});
```
### vscode()
Launch Visual Studio Code with an optional workspace and extensions.
```javascript
await testdriver.provision.vscode(options?)
```
<ParamField path="options" type="ProvisionVSCodeOptions">
<Expandable title="properties">
<ParamField path="workspace" type="string">
Path to a workspace folder or `.code-workspace` file to open.
</ParamField>
<ParamField path="extensions" type="string[]" default={[]}>
Array of VS Code extension IDs to install before launching.
</ParamField>
</Expandable>
</ParamField>
```javascript
await testdriver.provision.vscode({
workspace: '/home/testdriver/project',
extensions: ['ms-python.python', 'esbenp.prettier-vscode'],
});
```
### installer()
Download and run an application installer. Supports `.msi`, `.exe`, `.deb`, `.rpm`, `.appimage`, `.sh`, `.dmg`, and `.pkg` formats.
```javascript
await testdriver.provision.installer(options)
```
<ParamField path="options" type="ProvisionInstallerOptions" required>
<Expandable title="properties">
<ParamField path="url" type="string" required>
Download URL for the installer.
</ParamField>
<ParamField path="filename" type="string">
Override the auto-detected filename from the URL.
</ParamField>
<ParamField path="appName" type="string">
Application name to focus after installation completes.
</ParamField>
<ParamField path="launch" type="boolean" default={true}>
Whether to focus/launch the app after installation.
</ParamField>
</Expandable>
</ParamField>
**Behavior:**
- Downloads the installer from the URL
- Auto-detects the install method based on file extension
- Runs the appropriate install command (e.g., `msiexec` for `.msi`, `dpkg` for `.deb`)
- Optionally focuses the installed application
```javascript
// Windows MSI installer
await testdriver.provision.installer({
url: 'https://example.com/app-setup.msi',
appName: 'MyApp',
});
// Linux DEB package
await testdriver.provision.installer({
url: 'https://example.com/app.deb',
appName: 'MyApp',
launch: true,
});
```
### electron()
Launch an Electron application.
```javascript
await testdriver.provision.electron(options)
```
<ParamField path="options" type="ProvisionElectronOptions" required>
<Expandable title="properties">
<ParamField path="appPath" type="string" required>
Path to the Electron application directory or executable.
</ParamField>
<ParamField path="args" type="string[]" default={[]}>
Additional command-line arguments to pass to the Electron app.
</ParamField>
</Expandable>
</ParamField>
```javascript
await testdriver.provision.electron({
appPath: '/home/testdriver/my-electron-app',
args: ['--no-sandbox'],
});
```
### dashcam()
Start Dashcam recording with custom options. Usually called automatically by other provision methods, but can be called directly for custom configurations.
```javascript
await testdriver.provision.dashcam(options?)
```
<ParamField path="options" type="ProvisionDashcamOptions">
<Expandable title="properties">
<ParamField path="logPath" type="string">
Path to the TestDriver log file. Defaults to `/tmp/testdriver.log` (Linux) or `C:\Users\testdriver\testdriver.log` (Windows).
</ParamField>
<ParamField path="logName" type="string" default="TestDriver Log">
Display name for the log file in the Dashcam replay.
</ParamField>
<ParamField path="webLogs" type="boolean" default={true}>
Enable web traffic log capture.
</ParamField>
<ParamField path="title" type="string">
RMore from this repository
testdriver:aiSkill
Execute natural language tasks using AI
testdriver:assertSkill
Make AI-powered assertions about screen state
testdriver:aws-setupSkill
Deploy TestDriver on your AWS infrastructure using CloudFormation
testdriver:cacheSkill
Speed up tests with screenshot-based caching
testdriver:cachingSkill
1.7x faster test execution with intelligent caching and optimization
testdriver:captchaSkill
Solve captchas using 2captcha service
testdriver:ci-cdSkill
Run TestDriver tests in CI/CD with parallel execution and cross-platform support
testdriver:clickSkill
Click at specific coordinates or on elements