@testdriverai/mcp 7.11.264-canary → 7.11.265-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.
Files changed (67) hide show
  1. package/ai/skills/testdriver-quickstart/SKILL.md +1 -1
  2. package/ai/skills/testdriver-quickstart-claude/SKILL.md +47 -10
  3. package/docs/_scripts/generate-skills.js +76 -24
  4. package/docs/quickstart-claude.mdx +47 -10
  5. package/docs/quickstart.mdx +1 -1
  6. package/package.json +2 -2
  7. package/ai/skills/testdriver-ai/SKILL.md +0 -204
  8. package/ai/skills/testdriver-claude-mcp-plugin/SKILL.md +0 -245
  9. package/ai/skills/testdriver-cloud/SKILL.md +0 -119
  10. package/ai/skills/testdriver-device-config/SKILL.md +0 -317
  11. package/ai/skills/testdriver-elements/SKILL.md +0 -605
  12. package/ai/skills/testdriver-examples/SKILL.md +0 -7
  13. package/ai/skills/testdriver-machine-setup/SKILL.md +0 -331
  14. package/ai/skills/testdriver-running-tests/SKILL.md +0 -185
  15. package/ai/skills/testdriver-test-writer/SKILL.md +0 -446
  16. package/ai/skills/testdriver-waiting-for-elements/SKILL.md +0 -90
  17. package/ai/skills/testdriver:ai/SKILL.md +0 -204
  18. package/ai/skills/testdriver:assert/SKILL.md +0 -315
  19. package/ai/skills/testdriver:aws-setup/SKILL.md +0 -448
  20. package/ai/skills/testdriver:cache/SKILL.md +0 -221
  21. package/ai/skills/testdriver:caching/SKILL.md +0 -124
  22. package/ai/skills/testdriver:captcha/SKILL.md +0 -158
  23. package/ai/skills/testdriver:ci-cd/SKILL.md +0 -659
  24. package/ai/skills/testdriver:click/SKILL.md +0 -286
  25. package/ai/skills/testdriver:client/SKILL.md +0 -481
  26. package/ai/skills/testdriver:customizing-devices/SKILL.md +0 -319
  27. package/ai/skills/testdriver:dashcam/SKILL.md +0 -451
  28. package/ai/skills/testdriver:debugging-with-screenshots/SKILL.md +0 -415
  29. package/ai/skills/testdriver:device-config/SKILL.md +0 -317
  30. package/ai/skills/testdriver:double-click/SKILL.md +0 -102
  31. package/ai/skills/testdriver:elements/SKILL.md +0 -605
  32. package/ai/skills/testdriver:enterprise/SKILL.md +0 -7
  33. package/ai/skills/testdriver:errors/SKILL.md +0 -246
  34. package/ai/skills/testdriver:events/SKILL.md +0 -356
  35. package/ai/skills/testdriver:exec/SKILL.md +0 -317
  36. package/ai/skills/testdriver:find/SKILL.md +0 -856
  37. package/ai/skills/testdriver:focus-application/SKILL.md +0 -293
  38. package/ai/skills/testdriver:generating-tests/SKILL.md +0 -25
  39. package/ai/skills/testdriver:hosted/SKILL.md +0 -155
  40. package/ai/skills/testdriver:hover/SKILL.md +0 -278
  41. package/ai/skills/testdriver:locating-elements/SKILL.md +0 -71
  42. package/ai/skills/testdriver:making-assertions/SKILL.md +0 -32
  43. package/ai/skills/testdriver:mcp/SKILL.md +0 -7
  44. package/ai/skills/testdriver:mouse-down/SKILL.md +0 -161
  45. package/ai/skills/testdriver:mouse-up/SKILL.md +0 -164
  46. package/ai/skills/testdriver:parse/SKILL.md +0 -236
  47. package/ai/skills/testdriver:performing-actions/SKILL.md +0 -53
  48. package/ai/skills/testdriver:press-keys/SKILL.md +0 -348
  49. package/ai/skills/testdriver:provision/SKILL.md +0 -331
  50. package/ai/skills/testdriver:quickstart/SKILL.md +0 -172
  51. package/ai/skills/testdriver:redraw/SKILL.md +0 -214
  52. package/ai/skills/testdriver:reusable-code/SKILL.md +0 -249
  53. package/ai/skills/testdriver:right-click/SKILL.md +0 -123
  54. package/ai/skills/testdriver:running-tests/SKILL.md +0 -185
  55. package/ai/skills/testdriver:screenshot/SKILL.md +0 -248
  56. package/ai/skills/testdriver:screenshots/SKILL.md +0 -184
  57. package/ai/skills/testdriver:scroll/SKILL.md +0 -205
  58. package/ai/skills/testdriver:secrets/SKILL.md +0 -115
  59. package/ai/skills/testdriver:self-hosted/SKILL.md +0 -147
  60. package/ai/skills/testdriver:test-results-json/SKILL.md +0 -257
  61. package/ai/skills/testdriver:testdriver/SKILL.md +0 -624
  62. package/ai/skills/testdriver:type/SKILL.md +0 -357
  63. package/ai/skills/testdriver:variables/SKILL.md +0 -111
  64. package/ai/skills/testdriver:wait/SKILL.md +0 -50
  65. package/ai/skills/testdriver:waiting-for-elements/SKILL.md +0 -90
  66. package/ai/skills/testdriver:what-is-testdriver/SKILL.md +0 -54
  67. package/scripts/generate-skills.js +0 -94
@@ -1,293 +0,0 @@
1
- ---
2
- name: testdriver:focus-application
3
- description: Bring an application window to the foreground
4
- ---
5
- <!-- Generated from focus-application.mdx. DO NOT EDIT. -->
6
-
7
- ## Overview
8
-
9
- Bring a specific application window to the foreground and make it the active window for interactions.
10
-
11
- ## Syntax
12
-
13
- ```javascript
14
- await testdriver.focusApplication(name)
15
- ```
16
-
17
- ## Parameters
18
-
19
- <ParamField path="name" type="string" required>
20
- Application name (e.g., `'Google Chrome'`, `'Microsoft Edge'`, `'Notepad'`)
21
- </ParamField>
22
-
23
- ## Returns
24
-
25
- `Promise<string>` - Result message
26
-
27
- ## Examples
28
-
29
- ### Common Applications
30
-
31
- ```javascript
32
- // Focus Chrome browser
33
- await testdriver.focusApplication('Google Chrome');
34
-
35
- // Focus Edge browser
36
- await testdriver.focusApplication('Microsoft Edge');
37
-
38
- // Focus Notepad
39
- await testdriver.focusApplication('Notepad');
40
-
41
- // Focus File Explorer
42
- await testdriver.focusApplication('File Explorer');
43
-
44
- // Focus Visual Studio Code
45
- await testdriver.focusApplication('Visual Studio Code');
46
- ```
47
-
48
- ### After Opening Applications
49
-
50
- ```javascript
51
- // Open Chrome and focus it
52
- await testdriver.exec('pwsh', `
53
- Start-Process "C:/Program Files/Google/Chrome/Application/chrome.exe" -ArgumentList "https://example.com"
54
- `, 5000);
55
-
56
- await new Promise(r => setTimeout(r, 2000)); // Wait for launch
57
-
58
- // Focus the Chrome window
59
- await testdriver.focusApplication('Google Chrome');
60
- ```
61
-
62
- ## Best Practices
63
-
64
- <Check>
65
- **Focus before UI interactions**
66
-
67
- Always focus the target application before interacting with its UI:
68
-
69
- ```javascript
70
- await testdriver.focusApplication('Google Chrome');
71
-
72
- const button = await testdriver.find('submit button');
73
- await button.click();
74
- ```
75
- </Check>
76
-
77
- <Check>
78
- **Wait after launching apps**
79
-
80
- Give applications time to open before focusing:
81
-
82
- ```javascript
83
- await testdriver.exec('pwsh', 'Start-Process notepad', 5000);
84
- await new Promise(r => setTimeout(r, 1000)); // Wait for launch
85
- await testdriver.focusApplication('Notepad');
86
- ```
87
- </Check>
88
-
89
- <Check>
90
- **Use exact application names**
91
-
92
- ```javascript
93
- // ✅ Correct
94
- await testdriver.focusApplication('Google Chrome');
95
-
96
- // ❌ May not work
97
- await testdriver.focusApplication('Chrome');
98
- await testdriver.focusApplication('chrome.exe');
99
- ```
100
- </Check>
101
-
102
- <Warning>
103
- **Application must be running**
104
-
105
- The application must already be running. `focusApplication()` won't launch applications, only bring existing windows to the foreground.
106
- </Warning>
107
-
108
- ## Use Cases
109
-
110
- <AccordionGroup>
111
- <Accordion title="Multi-Application Testing">
112
- ```javascript
113
- // Test workflow across multiple apps
114
- await testdriver.focusApplication('Google Chrome');
115
- const data = await testdriver.extract('the order number');
116
-
117
- await testdriver.focusApplication('Notepad');
118
- await testdriver.type(data);
119
- await testdriver.pressKeys(['ctrl', 's']);
120
-
121
- await testdriver.focusApplication('Google Chrome');
122
- const nextButton = await testdriver.find('next button');
123
- await nextButton.click();
124
- ```
125
- </Accordion>
126
-
127
- <Accordion title="Browser Switching">
128
- ```javascript
129
- // Compare behavior in different browsers
130
- await testdriver.focusApplication('Google Chrome');
131
- await testdriver.assert('page loaded correctly in Chrome');
132
-
133
- await testdriver.focusApplication('Microsoft Edge');
134
- await testdriver.assert('page loaded correctly in Edge');
135
- ```
136
- </Accordion>
137
-
138
- <Accordion title="Desktop Application Testing">
139
- ```javascript
140
- // Launch and focus desktop app
141
- await testdriver.exec('pwsh', 'Start-Process notepad', 5000);
142
- await new Promise(r => setTimeout(r, 1000));
143
-
144
- await testdriver.focusApplication('Notepad');
145
- await testdriver.type('Test content');
146
- ```
147
- </Accordion>
148
-
149
- <Accordion title="Window Management">
150
- ```javascript
151
- // Show desktop first
152
- await testdriver.pressKeys(['winleft', 'd']);
153
-
154
- // Click desktop icon
155
- const icon = await testdriver.find('Chrome icon on desktop');
156
- await icon.click();
157
-
158
- await new Promise(r => setTimeout(r, 2000));
159
-
160
- // Focus the opened window
161
- await testdriver.focusApplication('Google Chrome');
162
- ```
163
- </Accordion>
164
- </AccordionGroup>
165
-
166
- ## Common Application Names
167
-
168
- ### Browsers
169
- - `'Google Chrome'`
170
- - `'Microsoft Edge'`
171
- - `'Mozilla Firefox'`
172
- - `'Safari'` (macOS)
173
-
174
- ### Office Applications
175
- - `'Microsoft Word'`
176
- - `'Microsoft Excel'`
177
- - `'Microsoft PowerPoint'`
178
- - `'Microsoft Outlook'`
179
-
180
- ### Development Tools
181
- - `'Visual Studio Code'`
182
- - `'Visual Studio'`
183
- - `'IntelliJ IDEA'`
184
- - `'Sublime Text'`
185
-
186
- ### System Applications
187
- - `'Notepad'`
188
- - `'File Explorer'`
189
- - `'Command Prompt'`
190
- - `'Windows PowerShell'`
191
- - `'Task Manager'`
192
-
193
- ### Communication
194
- - `'Microsoft Teams'`
195
- - `'Slack'`
196
- - `'Discord'`
197
- - `'Zoom'`
198
-
199
- ## Complete Example
200
-
201
- ```javascript
202
- import { beforeAll, afterAll, describe, it } from 'vitest';
203
- import TestDriver from 'testdriverai';
204
-
205
- describe('Multi-Application Workflow', () => {
206
- let testdriver;
207
-
208
- beforeAll(async () => {
209
- client = new TestDriver(process.env.TD_API_KEY);
210
- await testdriver.auth();
211
- await testdriver.connect();
212
- });
213
-
214
- afterAll(async () => {
215
- await testdriver.disconnect();
216
- });
217
-
218
- it('should work across multiple applications', async () => {
219
- // Start in browser
220
- await testdriver.focusApplication('Google Chrome');
221
-
222
- // Get data from web page
223
- const orderNumber = await testdriver.extract('the order number');
224
- console.log('Order:', orderNumber);
225
-
226
- // Open Notepad
227
- await testdriver.exec('pwsh', 'Start-Process notepad', 5000);
228
- await new Promise(r => setTimeout(r, 1500));
229
-
230
- // Focus Notepad and save data
231
- await testdriver.focusApplication('Notepad');
232
- await testdriver.type(`Order Number: ${orderNumber}`);
233
- await testdriver.type('\n');
234
- await testdriver.type(`Date: ${new Date().toISOString()}`);
235
-
236
- // Save file
237
- await testdriver.pressKeys(['ctrl', 's']);
238
- await new Promise(r => setTimeout(r, 500));
239
-
240
- await testdriver.type('C:\\order-info.txt');
241
- await testdriver.pressKeys(['enter']);
242
-
243
- // Return to browser
244
- await testdriver.focusApplication('Google Chrome');
245
-
246
- const confirmButton = await testdriver.find('confirm order button');
247
- await confirmButton.click();
248
-
249
- await testdriver.assert('order confirmed');
250
- });
251
-
252
- it('should switch between browser tabs', async () => {
253
- await testdriver.focusApplication('Google Chrome');
254
-
255
- // Open new tab
256
- await testdriver.pressKeys(['ctrl', 't']);
257
- await new Promise(r => setTimeout(r, 500));
258
-
259
- // Navigate to URL
260
- await testdriver.pressKeys(['ctrl', 'l']);
261
- await testdriver.type('https://example.com');
262
- await testdriver.pressKeys(['enter']);
263
-
264
- await new Promise(r => setTimeout(r, 2000));
265
-
266
- // Ensure Chrome is still focused
267
- await testdriver.focusApplication('Google Chrome');
268
-
269
- await testdriver.assert('example.com page is loaded');
270
- });
271
-
272
- it('should handle dialog boxes', async () => {
273
- await testdriver.focusApplication('Google Chrome');
274
-
275
- const deleteButton = await testdriver.find('delete account button');
276
- await deleteButton.click();
277
-
278
- await new Promise(r => setTimeout(r, 500));
279
-
280
- // Dialog appears - make sure it's focused
281
- await testdriver.focusApplication('Google Chrome');
282
-
283
- const confirmBtn = await testdriver.find('confirm deletion button');
284
- await confirmBtn.click();
285
- });
286
- });
287
- ```
288
-
289
- ## Related Methods
290
-
291
- - [`exec()`](/v7/exec) - Launch applications with PowerShell
292
- - [`pressKeys()`](/v7/press-keys) - Use Alt+Tab to switch windows
293
- - [`find()`](/v7/find) - Locate elements in the focused window
@@ -1,25 +0,0 @@
1
- ---
2
- name: testdriver:generating-tests
3
- description: Use AI coding agents and exploration mode to generate TestDriver tests
4
- ---
5
- <!-- Generated from generating-tests.mdx. DO NOT EDIT. -->
6
-
7
- ## Instructions for Coding Agents
8
-
9
- We recommend starting with [our quickstart](./quickstart) then supplying your coding agent with our agent instructions file.
10
-
11
- <Card title="TestDriver Agent Instructions" icon="link" arrow="true" horizontal href="https://github.com/testdriverai/testdriverai/blob/main/ai/agents/testdriver.md?plain=1">
12
- Copy the current version of our agent instructions to provide your coding agent with up-to-date instructions on how to generate TestDriver tests.
13
- </Card>
14
-
15
- Then, you can prompt your coding agent to generate tests. Here is an example prompt:
16
-
17
- ```md
18
- Make me a TestDriver test that does the following steps:
19
-
20
- Navigate to practicetestautomation.com
21
- Type username student into Username field
22
- Type password Password123 into Password field
23
- Push Submit button
24
- Verify new page contains expected text 'logged in'
25
- ```
@@ -1,155 +0,0 @@
1
- ---
2
- name: testdriver:hosted
3
- description: The fastest way to get started with TestDriver. Just set your API key and start testing.
4
- ---
5
- <!-- Generated from hosted.mdx. DO NOT EDIT. -->
6
-
7
- Hosted pricing is based on **device-seconds**: the amount of time your tests run on **our infrastructure**.
8
-
9
- - **Zero Setup** — Start testing immediately. No DevOps required.
10
- - **Free Tier** — Get started with a limited preview at no cost.
11
- - **Pay As You Go** — Only pay for the device-seconds you use.
12
-
13
- ## Hosted Plans
14
-
15
- <CardGroup cols={3}>
16
- <Card title="Free Trial" icon="gift" href="https://docs.testdriver.ai">
17
- **$0/month**
18
-
19
- - 1 Concurrent Sandbox
20
- - 60 Minutes Included
21
- - 1 Team User
22
- - Community Support
23
- </Card>
24
-
25
- <Card title="Pro" icon="rocket" href="https://console.testdriver.ai/checkout/pro">
26
- **$20/month per user**
27
-
28
- - 2 Concurrent Sandboxes
29
- - 120 Minutes Included
30
- - Overage: $0.001/second
31
- - Test Recordings
32
- - Community Support
33
- </Card>
34
-
35
- <Card title="Team" icon="users" href="https://console.testdriver.ai/checkout/team">
36
- **$600/month**
37
-
38
- - 8 Concurrent Sandboxes
39
- - 10,000 Minutes Included
40
- - Overage: $0.001/second
41
- - 5 Team Users
42
- - Test Recordings
43
- - Private Support
44
- - Test Analytics
45
- - CPU, RAM, & Network Profiles
46
- </Card>
47
- </CardGroup>
48
-
49
- ## Get Started
50
- Hosted is the default when you follow the Quickstart guide.
51
- <Card
52
- title="Try the Quickstart"
53
- icon="play"
54
- href="/v7/quickstart"
55
- >
56
- Set your API key and start testing in minutes.
57
- </Card>
58
-
59
- ## Parallel Testing Limits
60
-
61
- Your account has a set number of **license slots** that determine how many devices can run simultaneously. You can view your available slots in the [TestDriver Dashboard](https://console.testdriver.ai).
62
-
63
- <Info>
64
- **When is a slot in use?** A license slot is occupied when a test client is connected. As soon as your device is destroyed the slot becomes available immediately.
65
- </Info>
66
-
67
- ## Avoiding Slot Conflicts
68
-
69
- To prevent tests from failing due to exceeding your license slot limit, we recommend two key configurations:
70
-
71
- <AccordionGroup>
72
- <Accordion title="Set Maximum Concurrency in Vitest">
73
- Limit concurrent tests to match your available license slots:
74
-
75
- ```javascript vitest.config.mjs
76
- import { defineConfig } from 'vitest/config';
77
- import TestDriver from 'testdriverai/vitest';
78
-
79
- export default defineConfig({
80
- test: {
81
- testTimeout: 900000,
82
- hookTimeout: 900000,
83
- maxConcurrency: 5, // Set to your license slot limit
84
- reporters: ['default', TestDriver()],
85
- setupFiles: ['testdriverai/vitest/setup'],
86
- },
87
- });
88
- ```
89
-
90
- <Tip>
91
- Check your slot count at [console.testdriver.ai](https://console.testdriver.ai) and set `maxConcurrency` to that number or lower.
92
- </Tip>
93
- </Accordion>
94
-
95
- <Accordion title="Use GitHub Concurrency Keys">
96
- Prevent multiple workflow runs from competing for the same slots by using [GitHub's concurrency controls](https://docs.github.com/actions/writing-workflows/choosing-what-your-workflow-does/control-the-concurrency-of-workflows-and-jobs):
97
-
98
- ```yaml .github/workflows/test.yml
99
- name: Tests
100
-
101
- on:
102
- push:
103
- branches: [main]
104
- pull_request:
105
-
106
- # Prevent concurrent runs from competing for license slots
107
- concurrency:
108
- group: ${{ github.workflow }}-${{ github.ref }}
109
- cancel-in-progress: true
110
-
111
- jobs:
112
- test:
113
- runs-on: ubuntu-latest
114
- steps:
115
- - uses: actions/checkout@v4
116
-
117
- - name: Setup Node.js
118
- uses: actions/setup-node@v4
119
- with:
120
- node-version: '20'
121
-
122
- - name: Install dependencies
123
- run: npm install
124
-
125
- - name: Run tests
126
- run: vitest run
127
- env:
128
- TD_API_KEY: ${{ secrets.TD_API_KEY }}
129
- ```
130
-
131
- The `concurrency` block ensures:
132
- - Only one workflow run per branch runs at a time
133
- - New pushes cancel in-progress runs on the same branch
134
- - Different branches/PRs can run in parallel (up to your slot limit)
135
- </Accordion>
136
- </AccordionGroup>
137
-
138
- ## When to Consider Self-Hosted
139
-
140
- Hosted is perfect for getting started and for teams that want zero infrastructure management. However, you might consider [Self-Hosted](/v7/self-hosted) if you:
141
-
142
- - Want to escape per-second billing with a flat license fee
143
- - Require greater concurrency than offered in Cloud plans
144
- - Need full control over your infrastructure and privacy
145
- - Want to use your own AI API keys
146
- - Require custom hardware configurations
147
- - Have high test volumes that make self-hosting more economical
148
-
149
- <Card
150
- title="Explore Self-Hosted"
151
- icon="server"
152
- href="/v7/self-hosted"
153
- >
154
- Learn about self-hosting for unlimited test execution at a flat rate.
155
- </Card>