@testdriverai/mcp 7.11.136-test → 7.11.138-test
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/ai/skills/testdriver-assert/SKILL.md +5 -5
- package/ai/skills/testdriver-caching/SKILL.md +2 -2
- package/ai/skills/testdriver-changelog/SKILL.md +186 -0
- package/ai/skills/testdriver-claude-mcp-plugin/SKILL.md +208 -0
- package/ai/skills/testdriver-click/SKILL.md +13 -13
- package/ai/skills/testdriver-client/SKILL.md +1 -1
- package/ai/skills/testdriver-debugging-with-screenshots/SKILL.md +5 -5
- package/ai/skills/testdriver-double-click/SKILL.md +7 -7
- package/ai/skills/testdriver-enterprise/SKILL.md +1 -1
- package/ai/skills/testdriver-events/SKILL.md +1 -1
- package/ai/skills/testdriver-exec/SKILL.md +10 -10
- package/ai/skills/testdriver-extract/SKILL.md +6 -6
- package/ai/skills/testdriver-find/SKILL.md +61 -61
- package/ai/skills/testdriver-focus-application/SKILL.md +6 -6
- package/ai/skills/testdriver-generating-tests/SKILL.md +3 -3
- package/ai/skills/testdriver-hosted/SKILL.md +3 -3
- package/ai/skills/testdriver-hover/SKILL.md +6 -6
- package/ai/skills/testdriver-making-assertions/SKILL.md +2 -2
- package/ai/skills/testdriver-mouse-down/SKILL.md +9 -9
- package/ai/skills/testdriver-mouse-up/SKILL.md +9 -9
- package/ai/skills/testdriver-parse/SKILL.md +4 -4
- package/ai/skills/testdriver-performing-actions/SKILL.md +4 -4
- package/ai/skills/testdriver-press-keys/SKILL.md +5 -5
- package/ai/skills/testdriver-quickstart/SKILL.md +51 -54
- package/ai/skills/testdriver-redraw/SKILL.md +1 -1
- package/ai/skills/testdriver-right-click/SKILL.md +7 -7
- package/ai/skills/testdriver-screenshot/SKILL.md +9 -9
- package/ai/skills/testdriver-scroll/SKILL.md +13 -13
- package/ai/skills/testdriver-self-hosted/SKILL.md +1 -1
- package/ai/skills/testdriver-type/SKILL.md +7 -7
- package/ai/skills/testdriver-wait/SKILL.md +5 -5
- package/ai/skills/testdriver-what-is-testdriver/SKILL.md +11 -11
- package/docs/{v7/_drafts → _drafts}/agents.mdx +1 -1
- package/docs/{v7/_drafts → _drafts}/best-practices.mdx +4 -4
- package/docs/{v7/_drafts → _drafts}/caching-selectors.mdx +3 -3
- package/docs/{v7/_drafts → _drafts}/configuration.mdx +4 -4
- package/docs/{v7/_drafts → _drafts}/debugging.mdx +4 -4
- package/docs/{v7/_drafts → _drafts}/error-handling.mdx +4 -4
- package/docs/{v7/_drafts → _drafts}/faq.mdx +7 -7
- package/docs/{v7/_drafts → _drafts}/installation.mdx +2 -2
- package/docs/{v7/_drafts → _drafts}/migration.mdx +4 -4
- package/docs/{v7/_drafts → _drafts}/observable.mdx +3 -3
- package/docs/{v7/_drafts → _drafts}/powerful.mdx +4 -4
- package/docs/{v7/_drafts → _drafts}/readme.mdx +11 -11
- package/docs/{v7/_drafts → _drafts}/reports.mdx +4 -4
- package/docs/{v7/_drafts → _drafts}/scalable.mdx +10 -10
- package/docs/{v7/_drafts → _drafts}/troubleshooting.mdx +4 -4
- package/docs/{v7/_drafts → _drafts}/vitest-plugin.mdx +2 -2
- package/docs/{v7/_drafts → _drafts}/vitest.mdx +9 -9
- package/docs/_scripts/generate-examples.js +9 -10
- package/docs/_scripts/generate-skills.js +4 -4
- package/docs/{v7/agent.mdx → agent.mdx} +17 -17
- package/docs/{v7/assert.mdx → assert.mdx} +5 -5
- package/docs/{v7/aws-setup.mdx → aws-setup.mdx} +6 -6
- package/docs/{v7/cache.mdx → cache.mdx} +9 -9
- package/docs/{v7/caching.mdx → caching.mdx} +13 -12
- package/docs/{v7/captcha.mdx → captcha.mdx} +7 -7
- package/docs/changelog.mdx +13 -13
- package/docs/{v7/ci-cd.mdx → ci-cd.mdx} +10 -10
- package/docs/{v7/click.mdx → click.mdx} +13 -13
- package/docs/client.mdx +323 -0
- package/docs/{v7/copilot → copilot}/auto-healing.mdx +2 -2
- package/docs/{v7/copilot → copilot}/running-tests.mdx +8 -8
- package/docs/{v7/customizing-devices.mdx → customizing-devices.mdx} +1 -1
- package/docs/{v7/dashcam.mdx → dashcam.mdx} +3 -3
- package/docs/{v7/debugging-with-screenshots.mdx → debugging-with-screenshots.mdx} +12 -12
- package/docs/docs.json +429 -288
- package/docs/{v7/double-click.mdx → double-click.mdx} +7 -7
- package/docs/{v7/elements.mdx → elements.mdx} +7 -7
- package/docs/{v7/enterprise.mdx → enterprise.mdx} +2 -2
- package/docs/{v7/errors.mdx → errors.mdx} +3 -3
- package/docs/{v7/events.mdx → events.mdx} +4 -4
- package/docs/{v7/exec.mdx → exec.mdx} +10 -10
- package/docs/{v7/extract.mdx → extract.mdx} +10 -10
- package/docs/{v7/find.mdx → find.mdx} +61 -61
- package/docs/{v7/focus-application.mdx → focus-application.mdx} +6 -6
- package/docs/{v7/generating-tests.mdx → generating-tests.mdx} +10 -10
- package/docs/guide/best-practices-polling.mdx +6 -1
- package/docs/{v7/hosted.mdx → hosted.mdx} +7 -7
- package/docs/{v7/hover.mdx → hover.mdx} +6 -6
- package/docs/interacting-with-your-app.mdx +198 -0
- package/docs/locating-elements.mdx +423 -0
- package/docs/{v7/making-assertions.mdx → making-assertions.mdx} +7 -7
- package/docs/{v7/mouse-down.mdx → mouse-down.mdx} +9 -9
- package/docs/{v7/mouse-up.mdx → mouse-up.mdx} +9 -9
- package/docs/options.mdx +320 -0
- package/docs/{v7/parse.mdx → parse.mdx} +12 -12
- package/docs/{v7/performing-actions.mdx → performing-actions.mdx} +11 -11
- package/docs/{v7/press-keys.mdx → press-keys.mdx} +5 -5
- package/docs/{v7/provision.mdx → provision.mdx} +9 -9
- package/docs/quickstart-cli.mdx +437 -0
- package/docs/quickstart-github.mdx +54 -0
- package/docs/quickstart-manual.mdx +135 -0
- package/docs/quickstart.mdx +22 -0
- package/docs/{v7/redraw.mdx → redraw.mdx} +7 -7
- package/docs/{v7/reusable-code.mdx → reusable-code.mdx} +3 -3
- package/docs/{v7/right-click.mdx → right-click.mdx} +7 -7
- package/docs/{v7/screenshot.mdx → screenshot.mdx} +9 -9
- package/docs/{v7/screenshots.mdx → screenshots.mdx} +3 -3
- package/docs/{v7/scroll.mdx → scroll.mdx} +13 -13
- package/docs/{v7/secrets.mdx → secrets.mdx} +4 -4
- package/docs/{v7/self-hosted.mdx → self-hosted.mdx} +7 -7
- package/docs/{v7/test-results-json.mdx → test-results-json.mdx} +4 -4
- package/docs/{v7/type.mdx → type.mdx} +7 -7
- package/docs/{v7/variables.mdx → variables.mdx} +2 -2
- package/docs/{v7/wait.mdx → wait.mdx} +5 -5
- package/docs/what-is-testdriver.mdx +54 -0
- package/lib/environments.json +1 -1
- package/lib/github-comment.mjs +2 -3
- package/package.json +1 -1
- package/scripts/generate-skills.js +1 -1
- package/docs/v7/client.mdx +0 -486
- package/docs/v7/quickstart.mdx +0 -451
- package/docs/v7/what-is-testdriver.mdx +0 -54
- /package/docs/{v7/_drafts → _drafts}/architecture.mdx +0 -0
- /package/docs/{v7/_drafts → _drafts}/auto-cache-key.mdx +0 -0
- /package/docs/{v7/_drafts → _drafts}/awesome-logs-quick-ref.mdx +0 -0
- /package/docs/{v7/_drafts → _drafts}/cli-to-sdk-migration.mdx +0 -0
- /package/docs/{v7/_drafts → _drafts}/commands/assert.mdx +0 -0
- /package/docs/{v7/_drafts → _drafts}/commands/exec.mdx +0 -0
- /package/docs/{v7/_drafts → _drafts}/commands/focus-application.mdx +0 -0
- /package/docs/{v7/_drafts → _drafts}/commands/hover-image.mdx +0 -0
- /package/docs/{v7/_drafts → _drafts}/commands/hover-text.mdx +0 -0
- /package/docs/{v7/_drafts → _drafts}/commands/if.mdx +0 -0
- /package/docs/{v7/_drafts → _drafts}/commands/match-image.mdx +0 -0
- /package/docs/{v7/_drafts → _drafts}/commands/press-keys.mdx +0 -0
- /package/docs/{v7/_drafts → _drafts}/commands/remember.mdx +0 -0
- /package/docs/{v7/_drafts → _drafts}/commands/run.mdx +0 -0
- /package/docs/{v7/_drafts → _drafts}/commands/scroll-until-image.mdx +0 -0
- /package/docs/{v7/_drafts → _drafts}/commands/scroll-until-text.mdx +0 -0
- /package/docs/{v7/_drafts → _drafts}/commands/scroll.mdx +0 -0
- /package/docs/{v7/_drafts → _drafts}/commands/type.mdx +0 -0
- /package/docs/{v7/_drafts → _drafts}/commands/wait-for-image.mdx +0 -0
- /package/docs/{v7/_drafts → _drafts}/commands/wait-for-text.mdx +0 -0
- /package/docs/{v7/_drafts → _drafts}/commands/wait.mdx +0 -0
- /package/docs/{v7/_drafts → _drafts}/contributing.mdx +0 -0
- /package/docs/{v7/_drafts → _drafts}/dashcam-title-feature.mdx +0 -0
- /package/docs/{v7/_drafts → _drafts}/hooks.mdx +0 -0
- /package/docs/{v7/_drafts → _drafts}/init-command.mdx +0 -0
- /package/docs/{v7/_drafts → _drafts}/playwright.mdx +0 -0
- /package/docs/{v7/_drafts → _drafts}/plugin-migration.mdx +0 -0
- /package/docs/{v7/_drafts → _drafts}/presets.mdx +0 -0
- /package/docs/{v7/_drafts → _drafts}/progressive-disclosure.mdx +0 -0
- /package/docs/{v7/_drafts → _drafts}/provision.mdx +0 -0
- /package/docs/{v7/_drafts → _drafts}/quick-start-test-recording.mdx +0 -0
- /package/docs/{v7/_drafts → _drafts}/screenshot.mdx +0 -0
- /package/docs/{v7/_drafts → _drafts}/sdk-awesome-logs.mdx +0 -0
- /package/docs/{v7/_drafts → _drafts}/sdk-browser-rendering.mdx +0 -0
- /package/docs/{v7/_drafts → _drafts}/sdk-migration.mdx +0 -0
- /package/docs/{v7/_drafts → _drafts}/sdk-v7-complete.mdx +0 -0
- /package/docs/{v7/_drafts → _drafts}/self-hosting.mdx +0 -0
- /package/docs/{v7/_drafts → _drafts}/test-recording.mdx +0 -0
- /package/docs/{v7/_drafts → _drafts}/writing-tests.mdx +0 -0
- /package/docs/{v7/examples → examples}/ai.mdx +0 -0
- /package/docs/{v7/examples → examples}/assert.mdx +0 -0
- /package/docs/{v7/examples → examples}/captcha-api.mdx +0 -0
- /package/docs/{v7/examples → examples}/chrome-extension.mdx +0 -0
- /package/docs/{v7/examples → examples}/drag-and-drop.mdx +0 -0
- /package/docs/{v7/examples → examples}/element-not-found.mdx +0 -0
- /package/docs/{v7/examples → examples}/findall-coffee-icons.mdx +0 -0
- /package/docs/{v7/examples → examples}/formatted-logging.mdx +0 -0
- /package/docs/{v7/examples → examples}/hover-image.mdx +0 -0
- /package/docs/{v7/examples → examples}/hover-text-with-description.mdx +0 -0
- /package/docs/{v7/examples → examples}/hover-text.mdx +0 -0
- /package/docs/{v7/examples → examples}/installer.mdx +0 -0
- /package/docs/{v7/examples → examples}/launch-vscode-linux.mdx +0 -0
- /package/docs/{v7/examples → examples}/match-image.mdx +0 -0
- /package/docs/{v7/examples → examples}/parse.mdx +0 -0
- /package/docs/{v7/examples → examples}/press-keys.mdx +0 -0
- /package/docs/{v7/examples → examples}/scroll-keyboard.mdx +0 -0
- /package/docs/{v7/examples → examples}/scroll-until-text.mdx +0 -0
- /package/docs/{v7/examples → examples}/scroll.mdx +0 -0
- /package/docs/{v7/examples → examples}/type.mdx +0 -0
- /package/docs/{v7/mcp.mdx → mcp.mdx} +0 -0
|
@@ -4,14 +4,14 @@ description: Run your first computer-use test in minutes.
|
|
|
4
4
|
---
|
|
5
5
|
<!-- Generated from quickstart.mdx. DO NOT EDIT. -->
|
|
6
6
|
|
|
7
|
-
TestDriver makes it easy to write automated computer-use tests
|
|
7
|
+
TestDriver makes it easy to write automated computer-use tests. You can test web browsers, desktop apps, and more. Follow the directions below to run your first TestDriver test.
|
|
8
8
|
|
|
9
9
|
<Tip><a href="https://discord.com/invite/cWDFW8DzPm" target="_blank" rel="noreferrer">Join our Discord</a> if you have any questions or need help getting started!</Tip>
|
|
10
10
|
|
|
11
11
|
<Tabs>
|
|
12
12
|
<Tab title="Add to GitHub" icon="github">
|
|
13
13
|
|
|
14
|
-
Drop-in UI
|
|
14
|
+
Drop-in UI tests for any GitHub repository. Mention `@testdriverai` in your repo. It writes UI tests and it finds regressions before they merge.
|
|
15
15
|
|
|
16
16
|
<Card
|
|
17
17
|
title="Add to GitHub"
|
|
@@ -25,30 +25,30 @@ TestDriver makes it easy to write automated computer-use tests for web browsers,
|
|
|
25
25
|
|
|
26
26
|
<Steps>
|
|
27
27
|
<Step title="Install the GitHub App">
|
|
28
|
-
Click **Add to GitHub** above
|
|
28
|
+
Click **Add to GitHub** above. Then install TestDriver on the repositories that you want to test.
|
|
29
29
|
</Step>
|
|
30
30
|
|
|
31
31
|
<Step title="Mention @testdriverai">
|
|
32
|
-
Open a pull request or issue
|
|
32
|
+
Open a pull request or an issue. Mention `@testdriverai` to make it write and run UI tests:
|
|
33
33
|
|
|
34
34
|
```
|
|
35
35
|
@testdriverai Write a test that verifies the homepage loads and the signup button works.
|
|
36
36
|
```
|
|
37
37
|
|
|
38
|
-
TestDriver
|
|
38
|
+
TestDriver starts a sandbox, writes the test, and shows the results in the conversation.
|
|
39
39
|
</Step>
|
|
40
40
|
|
|
41
41
|
<Step title="Catch Regressions Automatically">
|
|
42
|
-
|
|
42
|
+
After you commit your tests, TestDriver runs them on each pull request. It shows regressions before they merge.
|
|
43
43
|
</Step>
|
|
44
44
|
</Steps>
|
|
45
45
|
|
|
46
|
-
|
|
46
|
+
Do you want to use TestDriver from GitHub Copilot or the GitHub Mobile app? Read the full GitHub guide:
|
|
47
47
|
|
|
48
48
|
<Card
|
|
49
49
|
title="GitHub Integration Guide"
|
|
50
50
|
icon="arrow-right"
|
|
51
|
-
href="/
|
|
51
|
+
href="/copilot/auto-healing#use-testdriver-in-github"
|
|
52
52
|
arrow
|
|
53
53
|
horizontal
|
|
54
54
|
>
|
|
@@ -58,18 +58,18 @@ TestDriver makes it easy to write automated computer-use tests for web browsers,
|
|
|
58
58
|
</Tab>
|
|
59
59
|
<Tab title="CLI" icon="terminal">
|
|
60
60
|
|
|
61
|
-
|
|
61
|
+
Start quickly with the TestDriver CLI.
|
|
62
62
|
|
|
63
63
|
<Steps>
|
|
64
64
|
<Step title="Install TestDriver">
|
|
65
65
|
|
|
66
|
-
Use `npx` to
|
|
66
|
+
Use `npx` to set up an example project quickly:
|
|
67
67
|
|
|
68
68
|
```bash
|
|
69
69
|
npx testdriverai init
|
|
70
70
|
```
|
|
71
71
|
|
|
72
|
-
This
|
|
72
|
+
This helps you to make a new project folder, install dependencies, set up your API key, and configure MCP for your AI assistant (VS Code, Cursor, Claude Desktop, and others).
|
|
73
73
|
|
|
74
74
|
</Step>
|
|
75
75
|
|
|
@@ -81,22 +81,22 @@ TestDriver makes it easy to write automated computer-use tests for web browsers,
|
|
|
81
81
|
vitest run
|
|
82
82
|
```
|
|
83
83
|
|
|
84
|
-
This
|
|
84
|
+
This starts a sandbox, starts Chrome, and runs the example test.
|
|
85
85
|
|
|
86
86
|
</Step>
|
|
87
87
|
</Steps>
|
|
88
88
|
</Tab>
|
|
89
89
|
<Tab title="AI Setup" icon="robot">
|
|
90
90
|
|
|
91
|
-
|
|
91
|
+
Connect TestDriver to your AI client. Then you can write, run, and debug real end-to-end tests from chat. There are three parts. `testdriverai init` installs all of them for you:
|
|
92
92
|
|
|
93
|
-
- **The agent
|
|
94
|
-
- **Skills
|
|
95
|
-
- **The MCP server
|
|
93
|
+
- **The agent**. This is an expert test-creator. It controls a live sandbox, writes code after each step, and runs the test again until the test passes.
|
|
94
|
+
- **Skills**. These are small instruction files. They teach the agent the correct syntax for each TestDriver capability (`find`, `click`, `type`, `assert`, and more).
|
|
95
|
+
- **The MCP server**. This gives the computer-use tools of TestDriver through the [Model Context Protocol](https://modelcontextprotocol.io). Then an MCP client can use them.
|
|
96
96
|
|
|
97
97
|
### Quick install (recommended)
|
|
98
98
|
|
|
99
|
-
`testdriverai init`
|
|
99
|
+
`testdriverai init` connects the agent, skills, and MCP server for you. It writes the config of each client in the correct format and location:
|
|
100
100
|
|
|
101
101
|
```bash
|
|
102
102
|
# interactive — pick your client(s)
|
|
@@ -113,18 +113,18 @@ TestDriver makes it easy to write automated computer-use tests for web browsers,
|
|
|
113
113
|
```
|
|
114
114
|
|
|
115
115
|
<Info>
|
|
116
|
-
`init`
|
|
116
|
+
`init` finds the clients that are in your project. It selects them in the picker. To run `init` again is safe. It merges the TestDriver entry into the config that exists. It does not write over your other servers.
|
|
117
117
|
</Info>
|
|
118
118
|
|
|
119
|
-
You
|
|
119
|
+
You need a TestDriver API key. Create one at [console.testdriver.ai/settings](https://console.testdriver.ai/settings). Then `init` saves it to `.env` as `TD_API_KEY`.
|
|
120
120
|
|
|
121
121
|
### The agent
|
|
122
122
|
|
|
123
|
-
The **TestDriver agent** is an expert test-creator
|
|
123
|
+
The **TestDriver agent** is an expert test-creator. It runs in your AI client (Claude Code, Cursor, VS Code, and others). It writes, runs, and debugs real end-to-end tests. It controls your app the same as a person. It uses AI vision to find elements, click, type, and assert, through the TestDriver MCP server.
|
|
124
124
|
|
|
125
|
-
|
|
125
|
+
Unlike a chat assistant only suggests code, the agent works **iteratively on a live sandbox**. It starts a session, does each action, writes the code to your test file, makes sure of the result with a screenshot, and runs the test again until the test passes.
|
|
126
126
|
|
|
127
|
-
|
|
127
|
+
In init, the tool asks which AI clients to install into. The agent is written to the location that each client expects:
|
|
128
128
|
|
|
129
129
|
| Client | Agent location |
|
|
130
130
|
| --- | --- |
|
|
@@ -135,19 +135,19 @@ TestDriver makes it easy to write automated computer-use tests for web browsers,
|
|
|
135
135
|
| Codex | `AGENTS.md` |
|
|
136
136
|
| Zed | `.rules` |
|
|
137
137
|
|
|
138
|
-
|
|
138
|
+
After you install it, start it from the chat of your client:
|
|
139
139
|
|
|
140
140
|
```text
|
|
141
141
|
@testdriver write a test that logs in and verifies the dashboard loads
|
|
142
142
|
```
|
|
143
143
|
|
|
144
|
-
The agent
|
|
144
|
+
The agent starts a sandbox, does the steps live, writes them into a test file in `tests/`, and runs it for you.
|
|
145
145
|
|
|
146
146
|
### Skills
|
|
147
147
|
|
|
148
|
-
**Skills** are small
|
|
148
|
+
**Skills** are small instruction files. There is one skill for each TestDriver capability. They teach your AI client how to use each part of the TestDriver SDK and the MCP tools. They obey the [Anthropic `SKILL.md` format](https://code.claude.com/docs/en/skills): one folder for each skill. Each folder has a `SKILL.md` with YAML frontmatter and a markdown body.
|
|
149
149
|
|
|
150
|
-
There are **106 skills
|
|
150
|
+
There are **106 skills**. TestDriver makes them from the documentation. They include each action and concept: `find`, `click`, `type`, `assert`, `check`, `scroll`, `press-keys`, `provision`, caching, secrets, CI/CD, and more. They are written to the directory that each client expects:
|
|
151
151
|
|
|
152
152
|
| Client | Skills location |
|
|
153
153
|
| --- | --- |
|
|
@@ -156,19 +156,16 @@ TestDriver makes it easy to write automated computer-use tests for web browsers,
|
|
|
156
156
|
| Codex | referenced from `AGENTS.md` |
|
|
157
157
|
| VS Code · Cursor · Windsurf | folded into the agent rules/instructions |
|
|
158
158
|
|
|
159
|
-
<Note>
|
|
160
|
-
Skills are **generated, not hand-edited** — each is built from a `.mdx` docs page and carries a `DO NOT EDIT` marker. To change a skill, edit the corresponding documentation page and run `node docs/_scripts/generate-skills.js`.
|
|
161
|
-
</Note>
|
|
162
159
|
|
|
163
160
|
### MCP server
|
|
164
161
|
|
|
165
|
-
The **TestDriver MCP server**
|
|
162
|
+
The **TestDriver MCP server** gives the computer-use tools of TestDriver — `session_start`, `find`, `click`, `type`, `assert`, `check`, `screenshot`, and more through the [Model Context Protocol](https://modelcontextprotocol.io). It runs as a local stdio process:
|
|
166
163
|
|
|
167
164
|
```bash
|
|
168
165
|
npx -p testdriverai testdriverai-mcp
|
|
169
166
|
```
|
|
170
167
|
|
|
171
|
-
|
|
168
|
+
It authenticates with your `TD_API_KEY`. `testdriverai init` configures it for you. But you can also configure it by hand:
|
|
172
169
|
|
|
173
170
|
| Client | Auto-install | MCP config file | Config key |
|
|
174
171
|
| --- | --- | --- | --- |
|
|
@@ -184,12 +181,12 @@ TestDriver makes it easy to write automated computer-use tests for web browsers,
|
|
|
184
181
|
| v0 (Vercel) | 📝 manual | web UI only | — |
|
|
185
182
|
|
|
186
183
|
<Note>
|
|
187
|
-
Each client uses a **different top-level key** for MCP servers.
|
|
184
|
+
Each client uses a **different top-level key** for MCP servers. When you configure by hand, the most common error is to use `mcpServers` for VS Code (it needs `servers`), Codex (TOML `[mcp_servers]`), or Zed (`context_servers`).
|
|
188
185
|
</Note>
|
|
189
186
|
|
|
190
187
|
<Tabs>
|
|
191
188
|
<Tab title="Claude Code">
|
|
192
|
-
Add to `.mcp.json` at your project root (or `~/.claude.json` for all projects):
|
|
189
|
+
Add this to `.mcp.json` at your project root (or `~/.claude.json` for all projects):
|
|
193
190
|
|
|
194
191
|
```json
|
|
195
192
|
{
|
|
@@ -224,11 +221,11 @@ TestDriver makes it easy to write automated computer-use tests for web browsers,
|
|
|
224
221
|
}
|
|
225
222
|
```
|
|
226
223
|
|
|
227
|
-
|
|
224
|
+
Start Claude Desktop again after you save.
|
|
228
225
|
</Tab>
|
|
229
226
|
|
|
230
227
|
<Tab title="Cursor">
|
|
231
|
-
Add to `.cursor/mcp.json` (project) or `~/.cursor/mcp.json` (global):
|
|
228
|
+
Add this to `.cursor/mcp.json` (project) or `~/.cursor/mcp.json` (global):
|
|
232
229
|
|
|
233
230
|
```json
|
|
234
231
|
{
|
|
@@ -245,7 +242,7 @@ TestDriver makes it easy to write automated computer-use tests for web browsers,
|
|
|
245
242
|
</Tab>
|
|
246
243
|
|
|
247
244
|
<Tab title="VS Code">
|
|
248
|
-
Add to `.vscode/mcp.json`. VS Code uses the `servers` key and an `inputs` prompt for secrets:
|
|
245
|
+
Add this to `.vscode/mcp.json`. VS Code uses the `servers` key and an `inputs` prompt for secrets:
|
|
249
246
|
|
|
250
247
|
```json
|
|
251
248
|
{
|
|
@@ -270,7 +267,7 @@ TestDriver makes it easy to write automated computer-use tests for web browsers,
|
|
|
270
267
|
</Tab>
|
|
271
268
|
|
|
272
269
|
<Tab title="Windsurf">
|
|
273
|
-
Windsurf reads MCP config globally. Add to `~/.codeium/windsurf/mcp_config.json`:
|
|
270
|
+
Windsurf reads the MCP config globally. Add this to `~/.codeium/windsurf/mcp_config.json`:
|
|
274
271
|
|
|
275
272
|
```json
|
|
276
273
|
{
|
|
@@ -286,7 +283,7 @@ TestDriver makes it easy to write automated computer-use tests for web browsers,
|
|
|
286
283
|
</Tab>
|
|
287
284
|
|
|
288
285
|
<Tab title="Codex">
|
|
289
|
-
Codex uses TOML. Add to `~/.codex/config.toml`:
|
|
286
|
+
Codex uses TOML. Add this to `~/.codex/config.toml`:
|
|
290
287
|
|
|
291
288
|
```toml
|
|
292
289
|
[mcp_servers.testdriver]
|
|
@@ -297,7 +294,7 @@ TestDriver makes it easy to write automated computer-use tests for web browsers,
|
|
|
297
294
|
</Tab>
|
|
298
295
|
|
|
299
296
|
<Tab title="Zed">
|
|
300
|
-
Zed calls them "context servers". Add to `.zed/settings.json` (project) or `~/.config/zed/settings.json` (global):
|
|
297
|
+
Zed calls them "context servers". Add this to `.zed/settings.json` (project) or `~/.config/zed/settings.json` (global):
|
|
301
298
|
|
|
302
299
|
```json
|
|
303
300
|
{
|
|
@@ -313,46 +310,46 @@ TestDriver makes it easy to write automated computer-use tests for web browsers,
|
|
|
313
310
|
</Tab>
|
|
314
311
|
</Tabs>
|
|
315
312
|
|
|
316
|
-
**Web-based clients** — Lovable, Replit, and v0 run in the browser
|
|
313
|
+
**Web-based clients** — Lovable, Replit, and v0 run in the browser. Thus you cannot start the MCP server as a local process. Configure them through the UI of each product:
|
|
317
314
|
|
|
318
315
|
<AccordionGroup>
|
|
319
316
|
<Accordion title="Lovable">
|
|
320
|
-
1. Connect your GitHub repo
|
|
321
|
-
2. In Lovable, open **Settings → MCP
|
|
317
|
+
1. Connect your GitHub repo. Then run `npx testdriverai init --client lovable`. This writes `AGENTS.md` and the skills into the repo. Then the Lovable agent uses them.
|
|
318
|
+
2. In Lovable, open **Settings → MCP**. Then add the TestDriver server.
|
|
322
319
|
</Accordion>
|
|
323
320
|
|
|
324
321
|
<Accordion title="Replit">
|
|
325
322
|
1. Run `npx testdriverai init --client replit` to write `replit.md` with the TestDriver agent guidance.
|
|
326
|
-
2. In Replit, open **Tools → Integrations → MCP
|
|
323
|
+
2. In Replit, open **Tools → Integrations → MCP**. Then add a custom MCP server.
|
|
327
324
|
</Accordion>
|
|
328
325
|
|
|
329
326
|
<Accordion title="v0 (Vercel)">
|
|
330
|
-
v0
|
|
327
|
+
The v0 client uses only the UI. It does not read repo files.
|
|
331
328
|
|
|
332
|
-
1. Open **[v0.app/chat/settings/mcp-connections](https://v0.app/chat/settings/mcp-connections)
|
|
333
|
-
2.
|
|
329
|
+
1. Open **[v0.app/chat/settings/mcp-connections](https://v0.app/chat/settings/mcp-connections)**. Then add the TestDriver MCP connection.
|
|
330
|
+
2. Put the agent guidance into **Instructions** (the **+** in the prompt bar).
|
|
334
331
|
</Accordion>
|
|
335
332
|
</AccordionGroup>
|
|
336
333
|
|
|
337
|
-
###
|
|
334
|
+
### Verify the install
|
|
338
335
|
|
|
339
|
-
Open your client
|
|
336
|
+
Open the chat of your client. Then tell the agent to write a test:
|
|
340
337
|
|
|
341
338
|
```text
|
|
342
339
|
@testdriver write a test that opens the homepage and asserts the title
|
|
343
340
|
```
|
|
344
341
|
|
|
345
|
-
If the MCP server is
|
|
342
|
+
If the MCP server is correct, the agent starts a session. You see screenshots as it works. If the tools do not show, make sure that `TD_API_KEY` is set. Then start the client again.
|
|
346
343
|
|
|
347
344
|
</Tab>
|
|
348
345
|
<Tab title="Manual" icon="wrench">
|
|
349
346
|
|
|
350
|
-
Install TestDriver
|
|
347
|
+
Install TestDriver. Then make the files by hand.
|
|
351
348
|
|
|
352
349
|
<Steps>
|
|
353
350
|
<Step title="Create a TestDriver Account">
|
|
354
351
|
|
|
355
|
-
You
|
|
352
|
+
You need a TestDriver account to get an API key.
|
|
356
353
|
|
|
357
354
|
<Card
|
|
358
355
|
title="Get an API Key"
|
|
@@ -376,7 +373,7 @@ TestDriver makes it easy to write automated computer-use tests for web browsers,
|
|
|
376
373
|
</Step>
|
|
377
374
|
<Step title="Create a vitest.config.js File">
|
|
378
375
|
|
|
379
|
-
In your project root,
|
|
376
|
+
In your project root, make a `vitest.config.js` file with this content:
|
|
380
377
|
|
|
381
378
|
```js vitest.config.js
|
|
382
379
|
import TestDriver from 'testdriverai/vitest';
|
|
@@ -398,7 +395,7 @@ TestDriver makes it easy to write automated computer-use tests for web browsers,
|
|
|
398
395
|
</Step>
|
|
399
396
|
<Step title="Create an Example Test File">
|
|
400
397
|
|
|
401
|
-
Add your API key to the example test file below
|
|
398
|
+
Add your API key to the example test file below. Then save it as `test.mjs` in your project root.
|
|
402
399
|
|
|
403
400
|
```js test.mjs highlight={9}
|
|
404
401
|
import { describe, expect, it } from "vitest";
|
|
@@ -442,7 +439,7 @@ TestDriver makes it easy to write automated computer-use tests for web browsers,
|
|
|
442
439
|
vitest run
|
|
443
440
|
```
|
|
444
441
|
|
|
445
|
-
This
|
|
442
|
+
This starts a sandbox, starts Chrome, and runs the example test.
|
|
446
443
|
|
|
447
444
|
</Step>
|
|
448
445
|
</Steps>
|
|
@@ -132,7 +132,7 @@ The final settling condition requires **both** screen AND network to be settled
|
|
|
132
132
|
|
|
133
133
|
## Events
|
|
134
134
|
|
|
135
|
-
The redraw system emits events through the SDK emitter. See [Events](/
|
|
135
|
+
The redraw system emits events through the SDK emitter. See [Events](/events) for the full event reference.
|
|
136
136
|
|
|
137
137
|
| Event | Description |
|
|
138
138
|
|---|---|
|
|
@@ -6,7 +6,7 @@ description: Perform a right-click action to open context menus
|
|
|
6
6
|
|
|
7
7
|
## Overview
|
|
8
8
|
|
|
9
|
-
The `rightClick()` method
|
|
9
|
+
The `rightClick()` method does a right-click action on an element. It usually opens context menus. You can call it on an [`Element`](/core-concepts/elements) instance. Or you can use it with a selector.
|
|
10
10
|
|
|
11
11
|
## Syntax
|
|
12
12
|
|
|
@@ -30,7 +30,7 @@ When called directly on the AI client:
|
|
|
30
30
|
|
|
31
31
|
## Returns
|
|
32
32
|
|
|
33
|
-
|
|
33
|
+
It returns a `Promise<void>`. The promise resolves when the right-click action completes.
|
|
34
34
|
|
|
35
35
|
## Examples
|
|
36
36
|
|
|
@@ -116,8 +116,8 @@ test('uses custom context menu', async () => {
|
|
|
116
116
|
|
|
117
117
|
## Related Methods
|
|
118
118
|
|
|
119
|
-
- [`click()`](/
|
|
120
|
-
- [`doubleClick()`](/
|
|
121
|
-
- [`mouseDown()`](/
|
|
122
|
-
- [`mouseUp()`](/
|
|
123
|
-
- [`hover()`](/
|
|
119
|
+
- [`click()`](/click) - Single click on an element
|
|
120
|
+
- [`doubleClick()`](/double-click) - Double-click on an element
|
|
121
|
+
- [`mouseDown()`](/mouse-down) - Press mouse button without releasing
|
|
122
|
+
- [`mouseUp()`](/mouse-up) - Release mouse button
|
|
123
|
+
- [`hover()`](/hover) - Move mouse over element without clicking
|
|
@@ -6,10 +6,10 @@ description: Capture and save screenshots during test execution
|
|
|
6
6
|
|
|
7
7
|
## Overview
|
|
8
8
|
|
|
9
|
-
Capture a screenshot of the
|
|
9
|
+
Capture a screenshot of the screen. TestDriver saves it to a local file automatically. TestDriver groups the screenshots by test file. This makes debug and review easy.
|
|
10
10
|
|
|
11
11
|
<Note>
|
|
12
|
-
**Automatic Screenshots**: TestDriver can
|
|
12
|
+
**Automatic Screenshots**: TestDriver can capture screenshots automatically before and after each command (click, type, find, and more). It saves them with clear filenames such as `001-click-before-L42-submit-button.png`. The filename includes the line number from your test file. Enable this with `autoScreenshots: true` in your TestDriver options.
|
|
13
13
|
</Note>
|
|
14
14
|
|
|
15
15
|
## Syntax
|
|
@@ -21,16 +21,16 @@ const filePath = await testdriver.screenshot(filename)
|
|
|
21
21
|
## Parameters
|
|
22
22
|
|
|
23
23
|
<ParamField path="filename" type="string" optional>
|
|
24
|
-
|
|
24
|
+
A custom filename for the screenshot (without the .png extension). If you do not give one, TestDriver makes a filename from the timestamp automatically.
|
|
25
25
|
</ParamField>
|
|
26
26
|
|
|
27
27
|
## Returns
|
|
28
28
|
|
|
29
|
-
`Promise<string>` - The absolute file path where the screenshot
|
|
29
|
+
`Promise<string>` - The absolute file path where TestDriver saved the screenshot
|
|
30
30
|
|
|
31
31
|
## File Organization
|
|
32
32
|
|
|
33
|
-
|
|
33
|
+
TestDriver saves screenshots automatically to `.testdriver/screenshots/<test-file-name>/` in your project root:
|
|
34
34
|
|
|
35
35
|
```
|
|
36
36
|
.testdriver/
|
|
@@ -238,11 +238,11 @@ These commands allow you to:
|
|
|
238
238
|
- Compare screenshots across test runs to identify flaky behavior
|
|
239
239
|
|
|
240
240
|
<Note>
|
|
241
|
-
For detailed workflows and examples of using these MCP commands for debugging, see the [Debugging with Screenshots](/
|
|
241
|
+
For detailed workflows and examples of using these MCP commands for debugging, see the [Debugging with Screenshots](/debugging-with-screenshots) guide.
|
|
242
242
|
</Note>
|
|
243
243
|
|
|
244
244
|
## Related
|
|
245
245
|
|
|
246
|
-
- [Debugging with Screenshots](/
|
|
247
|
-
- [assert()](/
|
|
248
|
-
- [find()](/
|
|
246
|
+
- [Debugging with Screenshots](/debugging-with-screenshots) - View and analyze saved screenshots using MCP
|
|
247
|
+
- [assert()](/assert) - Make AI-powered assertions
|
|
248
|
+
- [find()](/find) - Locate elements on screen
|
|
@@ -6,17 +6,17 @@ description: Scroll pages and elements
|
|
|
6
6
|
|
|
7
7
|
## Overview
|
|
8
8
|
|
|
9
|
-
Scroll the page or active element in any direction
|
|
9
|
+
Scroll the page or the active element in any direction with the mouse wheel or the keyboard.
|
|
10
10
|
|
|
11
11
|
<Warning>
|
|
12
12
|
**Focus Requirements**
|
|
13
13
|
|
|
14
|
-
|
|
15
|
-
-
|
|
16
|
-
-
|
|
17
|
-
-
|
|
14
|
+
A scroll needs focus on the page or on a frame. If an input field or another interactive element has focus, scroll commands can fail. Before you scroll, put the focus on the page:
|
|
15
|
+
- Click a non-interactive area (for example, the page background)
|
|
16
|
+
- Push the Escape key to remove the focus from interactive elements
|
|
17
|
+
- Click outside of input fields or text areas
|
|
18
18
|
|
|
19
|
-
**If scroll
|
|
19
|
+
**If the scroll still does not work**, use the Page Down or Page Up keys directly:
|
|
20
20
|
```javascript
|
|
21
21
|
await testdriver.pressKeys(['pagedown']); // Scroll down
|
|
22
22
|
await testdriver.pressKeys(['pageup']); // Scroll up
|
|
@@ -88,7 +88,7 @@ await testdriver.pressKeys(['pagedown']);
|
|
|
88
88
|
## Best Practices
|
|
89
89
|
|
|
90
90
|
<Check>
|
|
91
|
-
**
|
|
91
|
+
**Make sure that the page has focus before you scroll**
|
|
92
92
|
|
|
93
93
|
```javascript
|
|
94
94
|
// After typing in an input, unfocus it first
|
|
@@ -109,7 +109,7 @@ await testdriver.pressKeys(['pagedown']);
|
|
|
109
109
|
</Check>
|
|
110
110
|
|
|
111
111
|
<Check>
|
|
112
|
-
**Control scroll distance with the options object**
|
|
112
|
+
**Control the scroll distance with the options object**
|
|
113
113
|
|
|
114
114
|
```javascript
|
|
115
115
|
// For web pages, mouse scroll works well
|
|
@@ -121,9 +121,9 @@ await testdriver.pressKeys(['pagedown']);
|
|
|
121
121
|
</Check>
|
|
122
122
|
|
|
123
123
|
<Warning>
|
|
124
|
-
**
|
|
124
|
+
**The keyboard scroll uses Page Down and Page Up**
|
|
125
125
|
|
|
126
|
-
|
|
126
|
+
A keyboard scroll usually moves one "page" each time. This can be more than the click amount that you set. It is more compatible than a mouse scroll, but it is less precise.
|
|
127
127
|
</Warning>
|
|
128
128
|
|
|
129
129
|
## Use Cases
|
|
@@ -200,6 +200,6 @@ describe('Scrolling', () => {
|
|
|
200
200
|
|
|
201
201
|
## Related Methods
|
|
202
202
|
|
|
203
|
-
- [`find()`](/
|
|
204
|
-
- [`pressKeys()`](/
|
|
205
|
-
- [`wait()`](/
|
|
203
|
+
- [`find()`](/find) - Find elements after a scroll
|
|
204
|
+
- [`pressKeys()`](/press-keys) - Use the Page Down and Page Up keys
|
|
205
|
+
- [`wait()`](/wait) - Wait after a scroll
|
|
@@ -47,7 +47,7 @@ Run test sandboxes on your AWS infrastructure while using TestDriver's hosted da
|
|
|
47
47
|
<Card
|
|
48
48
|
title="AWS Setup Guide"
|
|
49
49
|
icon="aws"
|
|
50
|
-
href="/
|
|
50
|
+
href="/aws-setup"
|
|
51
51
|
>
|
|
52
52
|
Step-by-step instructions for deploying TestDriver on your AWS infrastructure using CloudFormation.
|
|
53
53
|
</Card>
|
|
@@ -6,7 +6,7 @@ description: Type text into focused input fields
|
|
|
6
6
|
|
|
7
7
|
## Overview
|
|
8
8
|
|
|
9
|
-
Type text or numbers into the
|
|
9
|
+
Type text or numbers into the input field that has focus. You can set an optional delay between the keystrokes.
|
|
10
10
|
|
|
11
11
|
## Syntax
|
|
12
12
|
|
|
@@ -29,7 +29,7 @@ await testdriver.type(text, options)
|
|
|
29
29
|
</ParamField>
|
|
30
30
|
|
|
31
31
|
<ParamField path="secret" type="boolean" default={false}>
|
|
32
|
-
If `true`,
|
|
32
|
+
If `true`, TestDriver makes the text sensitive data. It does not log or store it in the debug info or in dashcam.
|
|
33
33
|
</ParamField>
|
|
34
34
|
</Expandable>
|
|
35
35
|
</ParamField>
|
|
@@ -78,9 +78,9 @@ await testdriver.type('4111111111111111', { secret: true });
|
|
|
78
78
|
```
|
|
79
79
|
|
|
80
80
|
<Warning>
|
|
81
|
-
**Always use `secret: true` for passwords and sensitive data
|
|
81
|
+
**Always use `secret: true` for passwords and sensitive data.**
|
|
82
82
|
|
|
83
|
-
|
|
83
|
+
If you do not use this option, the typed text shows in these:
|
|
84
84
|
- Dashcam video replays
|
|
85
85
|
- TestDriver logs
|
|
86
86
|
- Debug screenshots
|
|
@@ -352,6 +352,6 @@ describe('Form Filling with Type', () => {
|
|
|
352
352
|
|
|
353
353
|
## Related Methods
|
|
354
354
|
|
|
355
|
-
- [`pressKeys()`](/
|
|
356
|
-
- [`find()`](/
|
|
357
|
-
- [`click()`](/
|
|
355
|
+
- [`pressKeys()`](/press-keys) - Press keyboard keys and shortcuts
|
|
356
|
+
- [`find()`](/find) - Locate input fields
|
|
357
|
+
- [`click()`](/click) - Focus input fields
|
|
@@ -6,7 +6,7 @@ description: Pause the execution of the script for a specified duration.
|
|
|
6
6
|
|
|
7
7
|
## Description
|
|
8
8
|
|
|
9
|
-
The `wait` method
|
|
9
|
+
The `wait` method stops the test for a number of milliseconds. Then it continues. Use this to add delays between actions, to wait for animations to complete, or to let state changes become stable.
|
|
10
10
|
|
|
11
11
|
## Syntax
|
|
12
12
|
|
|
@@ -36,8 +36,8 @@ await testdriver.wait();
|
|
|
36
36
|
|
|
37
37
|
## Best Practices
|
|
38
38
|
|
|
39
|
-
- **Use for simple delays** —
|
|
40
|
-
- **
|
|
39
|
+
- **Use it for simple delays** — to wait for animations, transitions, or state changes after an action.
|
|
40
|
+
- **Do not use it to wait for an element** — if you wait for a specific element to show, use `find()` with a `timeout` option:
|
|
41
41
|
```javascript
|
|
42
42
|
// ✅ Better for waiting for elements
|
|
43
43
|
const element = await testdriver.find('success message', { timeout: 30000 });
|
|
@@ -46,5 +46,5 @@ await testdriver.wait();
|
|
|
46
46
|
await testdriver.wait(5000);
|
|
47
47
|
const element = await testdriver.find('success message');
|
|
48
48
|
```
|
|
49
|
-
-
|
|
50
|
-
- Use
|
|
49
|
+
- Do not use very long timeouts. This keeps the tests efficient.
|
|
50
|
+
- Use it only when necessary. The TestDriver [redraw detection](/performing-actions#waiting-for-dynamic-content) waits automatically for the screen and the network to become stable after each action.
|
|
@@ -4,27 +4,27 @@ description: Reliably test your most difficult user flows
|
|
|
4
4
|
---
|
|
5
5
|
<!-- Generated from what-is-testdriver.mdx. DO NOT EDIT. -->
|
|
6
6
|
|
|
7
|
-
## The problem with
|
|
7
|
+
## The problem with usual test tools
|
|
8
8
|
|
|
9
|
-
|
|
9
|
+
Usual test tools such as Playwright test one web application. They use one browser tab and they use selectors.
|
|
10
10
|
|
|
11
|
-
|
|
11
|
+
But selectors are frequently not reliable, or they are not available. This makes tests weak and not stable:
|
|
12
12
|
|
|
13
13
|
| Challenge | Problem | Examples |
|
|
14
14
|
|-----------|---------|----------|
|
|
15
|
-
| **
|
|
16
|
-
| **Dynamic content** |
|
|
17
|
-
| **Software you
|
|
18
|
-
| **
|
|
19
|
-
| **Visual states** |
|
|
15
|
+
| **Teams that move quickly** | They change the UI structure frequently. This breaks the CSS and XPath selectors. | Agile teams, startups, vibe-coders |
|
|
16
|
+
| **Dynamic content** | You cannot select it with selectors. | AI chatbots, PDFs, images, videos |
|
|
17
|
+
| **Software that you do not own** | It can have no correct accessibility attributes. | Other websites, extensions, third-party applications |
|
|
18
|
+
| **Workflows with more than one application** | You cannot test them with web-only tools. | Desktop apps, browser extensions, IDEs |
|
|
19
|
+
| **Visual states** | You cannot make a check of them with code selectors. | Charts, graphs, videos, images, spelling errors, UI layout |
|
|
20
20
|
|
|
21
|
-
## The TestDriver
|
|
21
|
+
## The TestDriver solution
|
|
22
22
|
|
|
23
|
-
TestDriver is a complete
|
|
23
|
+
TestDriver is a complete test platform. It handles these conditions. It has a Javascript SDK, hosted infrastructure, and debug tools. These tools make it easy to write, run, and keep tests for your most difficult user flows.
|
|
24
24
|
|
|
25
25
|
### Javascript SDK
|
|
26
26
|
|
|
27
|
-
|
|
27
|
+
This is an example of a TestDriver test. The test installs a production Chrome extension from the Chrome Web Store. Then it makes sure that the extension is in the extensions menu:
|
|
28
28
|
|
|
29
29
|
```javascript Installing Loom from the Chrome Web Store
|
|
30
30
|
import { describe, expect, it } from "vitest";
|
|
@@ -813,7 +813,7 @@ Using explicit sandboxes provides:
|
|
|
813
813
|
|
|
814
814
|
- **Documentation:** [docs.testdriver.ai](https://docs.testdriver.ai)
|
|
815
815
|
- **Dashboard:** [console.testdriver.ai](https://console.testdriver.ai)
|
|
816
|
-
- **API Reference:** Full method documentation in `/docs/
|
|
816
|
+
- **API Reference:** Full method documentation in `/docs/api/`
|
|
817
817
|
- **Examples:** See `/examples/` directory in the SDK package
|
|
818
818
|
|
|
819
819
|
---
|