@testdriverai/agent 7.11.150-test → 7.11.151-canary
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 +15 -15
- package/ai/skills/testdriver-aws-setup/SKILL.md +6 -6
- package/ai/skills/testdriver-cache/SKILL.md +8 -8
- package/ai/skills/testdriver-caching/SKILL.md +10 -9
- package/ai/skills/testdriver-captcha/SKILL.md +7 -7
- package/ai/skills/testdriver-ci-cd/SKILL.md +10 -10
- package/ai/skills/testdriver-claude-mcp-plugin/SKILL.md +37 -0
- package/ai/skills/testdriver-client/SKILL.md +3 -166
- package/ai/skills/testdriver-customizing-devices/SKILL.md +1 -1
- package/ai/skills/testdriver-dashcam/SKILL.md +3 -3
- package/ai/skills/testdriver-debugging-with-screenshots/SKILL.md +5 -5
- package/ai/skills/testdriver-elements/SKILL.md +5 -5
- package/ai/skills/testdriver-errors/SKILL.md +3 -3
- package/ai/skills/testdriver-events/SKILL.md +3 -3
- package/ai/skills/testdriver-extract/SKILL.md +5 -5
- package/ai/skills/testdriver-find/SKILL.md +1 -1
- package/ai/skills/testdriver-generating-tests/SKILL.md +6 -6
- package/ai/skills/testdriver-hosted/SKILL.md +4 -4
- package/ai/skills/testdriver-interacting-with-your-app/SKILL.md +197 -0
- package/ai/skills/testdriver-locating-elements/SKILL.md +390 -39
- package/ai/skills/testdriver-making-assertions/SKILL.md +4 -4
- package/ai/skills/testdriver-options/SKILL.md +319 -0
- package/ai/skills/testdriver-parse/SKILL.md +8 -8
- package/ai/skills/testdriver-performing-actions/SKILL.md +7 -7
- package/ai/skills/testdriver-provision/SKILL.md +7 -7
- package/ai/skills/testdriver-quickstart/SKILL.md +15 -441
- package/ai/skills/testdriver-quickstart-cli/SKILL.md +436 -0
- package/ai/skills/testdriver-quickstart-github/SKILL.md +53 -0
- package/ai/skills/testdriver-quickstart-manual/SKILL.md +134 -0
- package/ai/skills/testdriver-redraw/SKILL.md +6 -6
- package/ai/skills/testdriver-reusable-code/SKILL.md +3 -3
- package/ai/skills/testdriver-screenshots/SKILL.md +3 -3
- package/ai/skills/testdriver-secrets/SKILL.md +4 -4
- package/ai/skills/testdriver-self-hosted/SKILL.md +6 -6
- package/ai/skills/testdriver-test-results-json/SKILL.md +4 -4
- package/ai/skills/testdriver-variables/SKILL.md +2 -2
- package/ai/skills/testdriver-wait/SKILL.md +2 -2
- package/package.json +1 -1
|
@@ -6,9 +6,9 @@ description: Read information from the screen using AI and return it as a string
|
|
|
6
6
|
|
|
7
7
|
## Overview
|
|
8
8
|
|
|
9
|
-
|
|
9
|
+
Get information from the screen with AI. TestDriver returns it as a string. Describe what you want in natural language. The AI reads the screen and returns the correct value: text, numbers, labels, status messages, or other content on the screen.
|
|
10
10
|
|
|
11
|
-
|
|
11
|
+
[`assert()`](/assert) returns a boolean result. But `extract()` returns the real value. Thus you can store it, compare it, or use it in later steps and in framework assertions.
|
|
12
12
|
|
|
13
13
|
## Syntax
|
|
14
14
|
|
|
@@ -20,16 +20,16 @@ const value = await testdriver.extract({ description })
|
|
|
20
20
|
## Parameters
|
|
21
21
|
|
|
22
22
|
<ParamField path="description" type="string" required>
|
|
23
|
-
|
|
23
|
+
A natural language description of the information to read from the screen.
|
|
24
24
|
</ParamField>
|
|
25
25
|
|
|
26
26
|
<Info>
|
|
27
|
-
`extract()` also accepts an options object
|
|
27
|
+
`extract()` also accepts an options object, `extract({ description })`. This is the same as the positional form. The string form is the most common.
|
|
28
28
|
</Info>
|
|
29
29
|
|
|
30
30
|
## Returns
|
|
31
31
|
|
|
32
|
-
`Promise<string>` — The information
|
|
32
|
+
`Promise<string>` — The information from the screen. TestDriver returns the value as text. Parse it or cast it yourself if you need a number or another type.
|
|
33
33
|
|
|
34
34
|
## Examples
|
|
35
35
|
|
|
@@ -54,7 +54,7 @@ const element = await testdriver.find(description, options)
|
|
|
54
54
|
</ParamField>
|
|
55
55
|
|
|
56
56
|
<ParamField path="verify" type="boolean" default={false}>
|
|
57
|
-
This enables AI verification of the found element. When `true`, a second AI call makes sure that the coordinates agree with the correct element. This catches incorrect positions. It is disabled by default for less latency. When you do not set it for each call, it uses the global `verify` option from the [SDK
|
|
57
|
+
This enables AI verification of the found element. When `true`, a second AI call makes sure that the coordinates agree with the correct element. This catches incorrect positions. It is disabled by default for less latency. When you do not set it for each call, it uses the global `verify` option from the [SDK options](/options#ai-and-element-location).
|
|
58
58
|
</ParamField>
|
|
59
59
|
|
|
60
60
|
<ParamField path="ai" type="object">
|
|
@@ -4,9 +4,9 @@ description: Generate tests by exploring your app with the AI vision agent
|
|
|
4
4
|
---
|
|
5
5
|
<!-- Generated from generating-tests.mdx. DO NOT EDIT. -->
|
|
6
6
|
|
|
7
|
-
Start
|
|
7
|
+
Start with an exploration of your app. Tests begin here: you describe a flow in plain English. Then the TestDriver vision agent clicks, types, and reads the screen to understand it. Then it writes the test for you. There are no selectors, no DOM, and no weak locators. Only describe what you want to test. Let the agent find the other parts.
|
|
8
8
|
|
|
9
|
-
There are two
|
|
9
|
+
There are two methods for an exploration. You can chat with your AI assistant through the TestDriver MCP server. Or you can give a coding agent our instructions file and tell it to generate a test.
|
|
10
10
|
|
|
11
11
|
<Info>
|
|
12
12
|
Both paths need an MCP-capable AI coding assistant. If you don't have one yet, start with **GitHub Copilot** — there's a [free tier](https://github.com/features/copilot/plans), no credit card required. See [Run → Setup](/copilot/running-tests#setup) for the full install and sign-in walkthrough.
|
|
@@ -14,7 +14,7 @@ There are two ways to explore: chatting interactively with your AI assistant thr
|
|
|
14
14
|
|
|
15
15
|
## Instructions for Coding Agents
|
|
16
16
|
|
|
17
|
-
|
|
17
|
+
Start with [our quickstart](./quickstart). Then give your coding agent our agent instructions file.
|
|
18
18
|
|
|
19
19
|
<Card title="TestDriver Agent Instructions" icon="link" arrow="true" horizontal href="https://github.com/testdriverai/testdriverai/blob/main/ai/agents/testdriver.md?plain=1">
|
|
20
20
|
Copy the current version of our agent instructions to provide your coding agent with up-to-date instructions on how to generate TestDriver tests.
|
|
@@ -32,13 +32,13 @@ Push Submit button
|
|
|
32
32
|
Verify new page contains expected text 'logged in'
|
|
33
33
|
```
|
|
34
34
|
|
|
35
|
-
<Info>
|
|
35
|
+
<Info>Use explicit commands for production tests. They are at a lower cost, faster, and more reliable.</Info>
|
|
36
36
|
|
|
37
37
|
## Start a Conversation
|
|
38
38
|
|
|
39
|
-
|
|
39
|
+
Use the TestDriver MCP server and your AI assistant (GitHub Copilot, Cursor, or Claude Desktop) to make tests. You chat with an AI agent. The agent starts a virtual machine, does actions, and writes the test code for you.
|
|
40
40
|
|
|
41
|
-
Open your AI assistant
|
|
41
|
+
Open the chat of your AI assistant. If your project has no other agents, TestDriver uses the TestDriver agent by default. If not, select **testdriver** from the agent dropdown in the chat panel.
|
|
42
42
|
|
|
43
43
|
Describe what you want to test:
|
|
44
44
|
|
|
@@ -4,11 +4,11 @@ description: The fastest way to get started with TestDriver. Just set your API k
|
|
|
4
4
|
---
|
|
5
5
|
<!-- Generated from hosted.mdx. DO NOT EDIT. -->
|
|
6
6
|
|
|
7
|
-
|
|
7
|
+
The hosted price uses **device-seconds**: the time that your tests run on **our infrastructure**.
|
|
8
8
|
|
|
9
|
-
- **Zero Setup
|
|
10
|
-
- **Free Tier** —
|
|
11
|
-
- **Pay As You Go** —
|
|
9
|
+
- **Zero Setup**. Start tests immediately. You do not need DevOps.
|
|
10
|
+
- **Free Tier** — Start with a limited preview at no cost.
|
|
11
|
+
- **Pay As You Go** — Pay only for the device-seconds that you use.
|
|
12
12
|
|
|
13
13
|
## Hosted Plans
|
|
14
14
|
|
|
@@ -0,0 +1,197 @@
|
|
|
1
|
+
---
|
|
2
|
+
name: testdriver:interacting-with-your-app
|
|
3
|
+
description: Click, hover, drag, and interact with located UI elements
|
|
4
|
+
---
|
|
5
|
+
<!-- Generated from interacting-with-your-app.mdx. DO NOT EDIT. -->
|
|
6
|
+
|
|
7
|
+
## Overview
|
|
8
|
+
|
|
9
|
+
Once you've [located an element](/locating-elements), the `Element` object exposes methods to interact with it. Use these to click, hover, and perform mouse operations that drive your app.
|
|
10
|
+
|
|
11
|
+
## Interaction Methods
|
|
12
|
+
|
|
13
|
+
#### click()
|
|
14
|
+
|
|
15
|
+
Click on the element.
|
|
16
|
+
|
|
17
|
+
```javascript
|
|
18
|
+
await element.click(action)
|
|
19
|
+
```
|
|
20
|
+
|
|
21
|
+
**Parameters:**
|
|
22
|
+
- `action` (string, optional) - Type of click: `'click'` (default), `'double-click'`, `'right-click'`, `'hover'`, `'mouseDown'`, `'mouseUp'`
|
|
23
|
+
|
|
24
|
+
**Returns:** `Promise<void>`
|
|
25
|
+
|
|
26
|
+
**Example:**
|
|
27
|
+
```javascript
|
|
28
|
+
const button = await testdriver.find('submit button');
|
|
29
|
+
await button.click(); // Regular click
|
|
30
|
+
|
|
31
|
+
const file = await testdriver.find('document.txt');
|
|
32
|
+
await file.click('double-click'); // Double-click
|
|
33
|
+
|
|
34
|
+
const menu = await testdriver.find('settings icon');
|
|
35
|
+
await menu.click('right-click'); // Right-click
|
|
36
|
+
```
|
|
37
|
+
|
|
38
|
+
<Note>
|
|
39
|
+
The element must be found before clicking. The `find()` method automatically locates the element.
|
|
40
|
+
</Note>
|
|
41
|
+
|
|
42
|
+
#### hover()
|
|
43
|
+
|
|
44
|
+
Hover over the element without clicking.
|
|
45
|
+
|
|
46
|
+
```javascript
|
|
47
|
+
await element.hover()
|
|
48
|
+
```
|
|
49
|
+
|
|
50
|
+
**Returns:** `Promise<void>`
|
|
51
|
+
|
|
52
|
+
**Example:**
|
|
53
|
+
```javascript
|
|
54
|
+
const tooltip = await testdriver.find('info icon');
|
|
55
|
+
await tooltip.hover();
|
|
56
|
+
// Wait to see tooltip
|
|
57
|
+
await new Promise(resolve => setTimeout(resolve, 1000));
|
|
58
|
+
```
|
|
59
|
+
|
|
60
|
+
#### doubleClick()
|
|
61
|
+
|
|
62
|
+
Double-click on the element.
|
|
63
|
+
|
|
64
|
+
```javascript
|
|
65
|
+
await element.doubleClick()
|
|
66
|
+
```
|
|
67
|
+
|
|
68
|
+
**Returns:** `Promise<void>`
|
|
69
|
+
|
|
70
|
+
**Example:**
|
|
71
|
+
```javascript
|
|
72
|
+
const file = await testdriver.find('README.txt file icon');
|
|
73
|
+
await file.doubleClick();
|
|
74
|
+
```
|
|
75
|
+
|
|
76
|
+
#### rightClick()
|
|
77
|
+
|
|
78
|
+
Right-click on the element to open context menu.
|
|
79
|
+
|
|
80
|
+
```javascript
|
|
81
|
+
await element.rightClick()
|
|
82
|
+
```
|
|
83
|
+
|
|
84
|
+
**Returns:** `Promise<void>`
|
|
85
|
+
|
|
86
|
+
**Example:**
|
|
87
|
+
```javascript
|
|
88
|
+
const folder = await testdriver.find('Documents folder');
|
|
89
|
+
await folder.rightClick();
|
|
90
|
+
```
|
|
91
|
+
|
|
92
|
+
#### mouseDown() / mouseUp()
|
|
93
|
+
|
|
94
|
+
Press or release mouse button on the element (for drag operations).
|
|
95
|
+
|
|
96
|
+
```javascript
|
|
97
|
+
await element.mouseDown()
|
|
98
|
+
await element.mouseUp()
|
|
99
|
+
```
|
|
100
|
+
|
|
101
|
+
**Returns:** `Promise<void>`
|
|
102
|
+
|
|
103
|
+
**Example:**
|
|
104
|
+
```javascript
|
|
105
|
+
// Drag and drop
|
|
106
|
+
const item = await testdriver.find('draggable item');
|
|
107
|
+
await item.mouseDown();
|
|
108
|
+
|
|
109
|
+
// Move to drop target (using coordinates or another element)
|
|
110
|
+
const target = await testdriver.find('drop zone');
|
|
111
|
+
await target.hover();
|
|
112
|
+
await target.mouseUp();
|
|
113
|
+
```
|
|
114
|
+
|
|
115
|
+
## Examples
|
|
116
|
+
|
|
117
|
+
### Basic Element Interaction
|
|
118
|
+
|
|
119
|
+
```javascript
|
|
120
|
+
// Find and click
|
|
121
|
+
const submitButton = await testdriver.find('submit button');
|
|
122
|
+
await submitButton.click();
|
|
123
|
+
|
|
124
|
+
// Find, verify, then interact
|
|
125
|
+
const emailInput = await testdriver.find('email input field');
|
|
126
|
+
if (emailInput.found()) {
|
|
127
|
+
await emailInput.click();
|
|
128
|
+
await testdriver.type('user@example.com');
|
|
129
|
+
}
|
|
130
|
+
```
|
|
131
|
+
|
|
132
|
+
### Working with Forms
|
|
133
|
+
|
|
134
|
+
```javascript
|
|
135
|
+
// Fill out a multi-field form
|
|
136
|
+
const nameField = await testdriver.find('name input field');
|
|
137
|
+
await nameField.click();
|
|
138
|
+
await testdriver.type('John Doe');
|
|
139
|
+
|
|
140
|
+
const emailField = await testdriver.find('email input field');
|
|
141
|
+
await emailField.click();
|
|
142
|
+
await testdriver.type('john@example.com');
|
|
143
|
+
|
|
144
|
+
const submitButton = await testdriver.find('submit button');
|
|
145
|
+
await submitButton.click();
|
|
146
|
+
```
|
|
147
|
+
|
|
148
|
+
### Conditional Interactions
|
|
149
|
+
|
|
150
|
+
```javascript
|
|
151
|
+
// Check if element exists before interacting
|
|
152
|
+
const closeButton = await testdriver.find('close popup button');
|
|
153
|
+
|
|
154
|
+
if (closeButton.found()) {
|
|
155
|
+
await closeButton.click();
|
|
156
|
+
console.log('Popup closed');
|
|
157
|
+
} else {
|
|
158
|
+
console.log('No popup to close');
|
|
159
|
+
}
|
|
160
|
+
```
|
|
161
|
+
|
|
162
|
+
### Re-locating Dynamic Elements
|
|
163
|
+
|
|
164
|
+
```javascript
|
|
165
|
+
// Element that moves or changes
|
|
166
|
+
const notification = await testdriver.find('success notification');
|
|
167
|
+
|
|
168
|
+
// Do something that might cause it to move
|
|
169
|
+
await testdriver.scroll('down', 300);
|
|
170
|
+
|
|
171
|
+
// Re-locate the element
|
|
172
|
+
await notification.find();
|
|
173
|
+
|
|
174
|
+
if (notification.found()) {
|
|
175
|
+
await notification.click();
|
|
176
|
+
}
|
|
177
|
+
```
|
|
178
|
+
|
|
179
|
+
## Best Practices
|
|
180
|
+
|
|
181
|
+
<AccordionGroup>
|
|
182
|
+
<Accordion title="Reuse element references when possible">
|
|
183
|
+
If you need to interact with the same element multiple times, reuse the reference:
|
|
184
|
+
|
|
185
|
+
```javascript
|
|
186
|
+
const input = await testdriver.find('search input');
|
|
187
|
+
await input.click();
|
|
188
|
+
await testdriver.type('first search');
|
|
189
|
+
await testdriver.pressKeys(['enter']);
|
|
190
|
+
|
|
191
|
+
// Re-use the same element reference
|
|
192
|
+
await input.click();
|
|
193
|
+
await testdriver.pressKeys(['ctrl', 'a']); // Select all
|
|
194
|
+
await testdriver.type('second search');
|
|
195
|
+
```
|
|
196
|
+
</Accordion>
|
|
197
|
+
</AccordionGroup>
|