@testdriverai/agent 7.11.240-test → 7.11.241-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-agent/SKILL.md +174 -91
- package/ai/skills/testdriver-assert/SKILL.md +73 -269
- package/ai/skills/testdriver-aws-setup/SKILL.md +194 -312
- package/ai/skills/testdriver-bring-your-own-machine/SKILL.md +137 -204
- package/ai/skills/testdriver-cache/SKILL.md +142 -149
- package/ai/skills/testdriver-caching/SKILL.md +97 -87
- package/ai/skills/testdriver-captcha/SKILL.md +126 -111
- package/ai/skills/testdriver-ci-cd/SKILL.md +153 -542
- package/ai/skills/testdriver-click/SKILL.md +74 -229
- package/ai/skills/testdriver-client/SKILL.md +175 -229
- package/ai/skills/testdriver-customizing-devices/SKILL.md +72 -250
- package/ai/skills/testdriver-dashcam/SKILL.md +71 -404
- package/ai/skills/testdriver-debugging-with-screenshots/SKILL.md +103 -369
- package/ai/skills/testdriver-double-click/SKILL.md +46 -67
- package/ai/skills/testdriver-errors/SKILL.md +102 -176
- package/ai/skills/testdriver-events/SKILL.md +170 -327
- package/ai/skills/testdriver-exec/SKILL.md +92 -256
- package/ai/skills/testdriver-extract/SKILL.md +69 -170
- package/ai/skills/testdriver-find/SKILL.md +140 -736
- package/ai/skills/testdriver-focus-application/SKILL.md +69 -246
- package/ai/skills/testdriver-generating-tests/SKILL.md +102 -136
- package/ai/skills/testdriver-hosted/SKILL.md +79 -143
- package/ai/skills/testdriver-hover/SKILL.md +62 -235
- package/ai/skills/testdriver-locating-elements/SKILL.md +71 -366
- package/ai/skills/testdriver-making-assertions/SKILL.md +114 -72
- package/ai/skills/testdriver-mcp-setup/SKILL.md +79 -62
- package/ai/skills/testdriver-mouse-down/SKILL.md +46 -124
- package/ai/skills/testdriver-mouse-up/SKILL.md +45 -128
- package/ai/skills/testdriver-options/SKILL.md +73 -46
- package/ai/skills/testdriver-parse/SKILL.md +95 -184
- package/ai/skills/testdriver-performing-actions/SKILL.md +101 -91
- package/ai/skills/testdriver-press-keys/SKILL.md +59 -299
- package/ai/skills/testdriver-provision/SKILL.md +135 -179
- package/ai/skills/testdriver-quickstart/SKILL.md +24 -8
- package/ai/skills/testdriver-quickstart-claude/SKILL.md +84 -0
- package/ai/skills/testdriver-quickstart-github/SKILL.md +62 -32
- package/ai/skills/testdriver-quickstart-manual/SKILL.md +59 -32
- package/ai/skills/testdriver-quickstart-vscode/SKILL.md +96 -0
- package/ai/skills/testdriver-redraw/SKILL.md +100 -164
- package/ai/skills/testdriver-reusable-code/SKILL.md +95 -199
- package/ai/skills/testdriver-right-click/SKILL.md +45 -88
- package/ai/skills/testdriver-screenshot/SKILL.md +47 -201
- package/ai/skills/testdriver-screenshots/SKILL.md +86 -136
- package/ai/skills/testdriver-scroll/SKILL.md +71 -154
- package/ai/skills/testdriver-secrets/SKILL.md +94 -90
- package/ai/skills/testdriver-self-hosted/SKILL.md +82 -140
- package/ai/skills/testdriver-test-results-json/SKILL.md +165 -202
- package/ai/skills/testdriver-type/SKILL.md +56 -304
- package/ai/skills/testdriver-variables/SKILL.md +119 -80
- package/ai/skills/testdriver-wait/SKILL.md +31 -29
- package/ai/skills/testdriver-what-is-testdriver/SKILL.md +80 -32
- package/package.json +1 -1
|
@@ -1,50 +1,52 @@
|
|
|
1
1
|
---
|
|
2
2
|
name: testdriver:wait
|
|
3
|
-
description: Pause the
|
|
3
|
+
description: Pause the test for a fixed number of milliseconds.
|
|
4
4
|
---
|
|
5
5
|
<!-- Generated from wait.mdx. DO NOT EDIT. -->
|
|
6
6
|
|
|
7
|
-
|
|
7
|
+
Pause the test for a fixed time, for example while an animation finishes:
|
|
8
8
|
|
|
9
|
-
|
|
9
|
+
```javascript
|
|
10
|
+
await testdriver.find('Menu toggle').click();
|
|
11
|
+
await testdriver.wait(1000);
|
|
12
|
+
```
|
|
10
13
|
|
|
11
|
-
|
|
14
|
+
To wait for an element to appear, don't use `wait()`. Use [`find()`](/find) with a `timeout`, which continues as soon as the element shows up:
|
|
12
15
|
|
|
13
16
|
```javascript
|
|
14
|
-
await testdriver.
|
|
17
|
+
await testdriver.find('Order confirmation message', { timeout: 30000 });
|
|
18
|
+
```
|
|
19
|
+
|
|
20
|
+
## Signature
|
|
21
|
+
|
|
22
|
+
```typescript
|
|
23
|
+
testdriver.wait(timeout?: number): Promise<void>
|
|
15
24
|
```
|
|
16
25
|
|
|
17
|
-
##
|
|
26
|
+
## Parameters
|
|
18
27
|
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
28
|
+
<ParamField path="timeout" type="number" default="3000">
|
|
29
|
+
How long to pause, in milliseconds.
|
|
30
|
+
</ParamField>
|
|
22
31
|
|
|
23
32
|
## Examples
|
|
24
33
|
|
|
34
|
+
### Let a transition finish
|
|
35
|
+
|
|
25
36
|
```javascript
|
|
26
|
-
|
|
27
|
-
await testdriver.
|
|
28
|
-
await testdriver.
|
|
37
|
+
await testdriver.find('Settings tab').click();
|
|
38
|
+
await testdriver.wait(500);
|
|
39
|
+
await testdriver.assert('the Settings panel is fully open');
|
|
40
|
+
```
|
|
29
41
|
|
|
30
|
-
|
|
31
|
-
await testdriver.wait(5000);
|
|
42
|
+
### Pause for the default time
|
|
32
43
|
|
|
33
|
-
|
|
34
|
-
await testdriver.wait();
|
|
44
|
+
```javascript
|
|
45
|
+
await testdriver.wait(); // 3 seconds
|
|
35
46
|
```
|
|
36
47
|
|
|
37
|
-
##
|
|
38
|
-
|
|
39
|
-
- **Use it for simple delays**. 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
|
-
```javascript
|
|
42
|
-
// ✅ Better for waiting for elements
|
|
43
|
-
const element = await testdriver.find('success message', { timeout: 30000 });
|
|
48
|
+
## Related
|
|
44
49
|
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
```
|
|
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.
|
|
50
|
+
- [find()](/find): wait for an element with a `timeout`
|
|
51
|
+
- [Wait for a changing UI](/performing-actions#wait-for-a-changing-ui): choose the right way to wait
|
|
52
|
+
- [Redraw detection](/redraw): wait for the screen to settle after each action
|
|
@@ -1,54 +1,102 @@
|
|
|
1
1
|
---
|
|
2
2
|
name: testdriver:what-is-testdriver
|
|
3
|
-
description:
|
|
3
|
+
description: TestDriver tests apps by seeing the screen and controlling a real machine, without selectors.
|
|
4
4
|
---
|
|
5
5
|
<!-- Generated from what-is-testdriver.mdx. DO NOT EDIT. -->
|
|
6
6
|
|
|
7
|
-
|
|
7
|
+
TestDriver is an end-to-end testing platform that tests your app the way a person uses it.
|
|
8
8
|
|
|
9
|
-
|
|
9
|
+
- It looks at the screen.
|
|
10
|
+
- It finds elements from plain-language descriptions.
|
|
11
|
+
- It controls a real machine with the mouse and keyboard.
|
|
10
12
|
|
|
11
|
-
|
|
13
|
+
It doesn't rely on CSS or XPath selectors. So it can test flows that selector-based tools can't reach, such as desktop apps, browser extensions, and content that changes every time it renders.
|
|
12
14
|
|
|
13
|
-
|
|
14
|
-
|-----------|---------|----------|
|
|
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 |
|
|
15
|
+
## Where selector-based tests fall short
|
|
20
16
|
|
|
21
|
-
|
|
17
|
+
Tools such as Playwright and Cypress drive a single web page through its DOM. They locate elements with selectors.
|
|
22
18
|
|
|
23
|
-
|
|
19
|
+
That works until a test needs something the DOM can't describe reliably:
|
|
24
20
|
|
|
25
|
-
|
|
21
|
+
| Situation | Why selectors break down | Examples |
|
|
22
|
+
| --- | --- | --- |
|
|
23
|
+
| **A fast-changing UI** | Each redesign changes the markup and breaks CSS and XPath selectors. | Startups, teams shipping AI-generated code |
|
|
24
|
+
| **Dynamic content** | Generated content has no stable structure to select. | AI chat responses, PDFs, images, video |
|
|
25
|
+
| **Software you don't own** | Third-party markup often lacks stable IDs or accessibility attributes. | Other websites, embedded widgets, third-party apps |
|
|
26
|
+
| **More than one application** | Web-only tools can't leave the browser tab. | Desktop apps, browser extensions, IDEs, installers |
|
|
27
|
+
| **Visual state** | Whether something *looks* right isn't in the DOM. | Charts, layout, spelling, rendered media |
|
|
26
28
|
|
|
27
|
-
|
|
29
|
+
## How TestDriver works
|
|
28
30
|
|
|
29
|
-
|
|
30
|
-
import { describe, expect, it } from "vitest";
|
|
31
|
-
import { TestDriver } from "testdriverai/vitest/hooks";
|
|
31
|
+
A TestDriver test is a [Vitest](https://vitest.dev) test. It runs against a cloud sandbox, a fresh Linux machine, or Windows on [Enterprise](https://testdriver.ai/enterprise/) plans.
|
|
32
32
|
|
|
33
|
-
|
|
34
|
-
const testdriver = TestDriver(context);
|
|
33
|
+
Each step describes what a user would see or do:
|
|
35
34
|
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
35
|
+
1. **[Provision](/provision)** launches the app under test in the sandbox, such as Chrome at a URL, a Chrome extension, VS Code, an Electron app, or a downloaded installer.
|
|
36
|
+
2. **[Find](/locating-elements)** takes a description like `'Sign in button'` and uses AI vision to locate the matching element on screen.
|
|
37
|
+
3. **[Act](/performing-actions)** clicks, types, scrolls, and presses keys on the real machine. The app receives the same input a person would produce.
|
|
38
|
+
4. **[Assert](/making-assertions)** checks a plain-language statement about the screen, such as `'the cart shows one item'`.
|
|
39
|
+
|
|
40
|
+
This test installs the Loom extension from the Chrome Web Store. It checks that Loom appears in Chrome's extensions menu, a flow that a DOM-only tool can't drive:
|
|
41
|
+
|
|
42
|
+
```javascript tests/loom-extension.test.mjs
|
|
43
|
+
import { describe, expect, it } from 'vitest';
|
|
44
|
+
import { TestDriver } from 'testdriverai/vitest/hooks';
|
|
45
|
+
|
|
46
|
+
describe('Loom extension', () => {
|
|
47
|
+
it('appears in the Chrome extensions menu', async (context) => {
|
|
48
|
+
const testdriver = TestDriver(context);
|
|
40
49
|
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
50
|
+
// Launch Chrome with Loom installed by its Chrome Web Store ID
|
|
51
|
+
await testdriver.provision.chromeExtension({
|
|
52
|
+
extensionId: 'liecbddmkiiihnedobmlmillhodjkdmb',
|
|
53
|
+
});
|
|
44
54
|
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
55
|
+
const extensionsButton = await testdriver.find('puzzle-piece extensions icon in the Chrome toolbar');
|
|
56
|
+
await extensionsButton.click();
|
|
57
|
+
|
|
58
|
+
const loomExtension = await testdriver.find('Loom in the extensions dropdown');
|
|
59
|
+
expect(loomExtension.found()).toBe(true);
|
|
60
|
+
});
|
|
48
61
|
});
|
|
49
62
|
```
|
|
50
63
|
|
|
64
|
+
To run this yourself, follow the [Quickstart](/quickstart).
|
|
65
|
+
|
|
66
|
+
## What's included
|
|
67
|
+
|
|
68
|
+
- **The SDK**, the `testdriverai` npm package. Use it in Vitest tests to provision apps, find elements, act, and assert.
|
|
69
|
+
- **Cloud sandboxes** that run your tests on fresh Linux machines, or Windows on Enterprise plans. Enterprise customers can also [self-host](/self-hosted) them.
|
|
70
|
+
- **Debugging tools**: screen recordings of every run, [screenshots](/debugging-with-screenshots), and [element caching](/caching) for faster, more stable repeat runs.
|
|
71
|
+
- **[The TestDriver agent](/agent)**, which reviews your pull requests and writes and maintains tests from GitHub.
|
|
72
|
+
|
|
73
|
+
## When to use TestDriver
|
|
74
|
+
|
|
75
|
+
TestDriver is built for flows that are hard to cover any other way:
|
|
76
|
+
|
|
77
|
+
- Multi-application workflows
|
|
78
|
+
- Desktop software
|
|
79
|
+
- Browser extensions
|
|
80
|
+
- Third-party UIs
|
|
81
|
+
- Visual checks
|
|
82
|
+
|
|
83
|
+
Each step runs on a real machine and uses AI vision. So a TestDriver test takes longer per step than a test that talks to the DOM directly.
|
|
84
|
+
|
|
85
|
+
If stable, selector-based tests already cover a flow, keep them. Use TestDriver for the parts they can't reach.
|
|
51
86
|
|
|
52
|
-
|
|
87
|
+
## Related
|
|
53
88
|
|
|
54
|
-
|
|
89
|
+
<CardGroup cols={2}>
|
|
90
|
+
<Card title="Quickstart" icon="rocket" href="/quickstart">
|
|
91
|
+
Install TestDriver and run your first test.
|
|
92
|
+
</Card>
|
|
93
|
+
<Card title="Locate elements" icon="crosshairs" href="/locating-elements">
|
|
94
|
+
Write descriptions that find the right element reliably.
|
|
95
|
+
</Card>
|
|
96
|
+
<Card title="The TestDriver agent" icon="hand-horns" href="/agent">
|
|
97
|
+
Let the agent review pull requests and build tests from GitHub.
|
|
98
|
+
</Card>
|
|
99
|
+
<Card title="Hosted sandboxes" icon="cloud" href="/hosted">
|
|
100
|
+
Run tests on TestDriver's cloud infrastructure.
|
|
101
|
+
</Card>
|
|
102
|
+
</CardGroup>
|