@testdriverai/agent 7.9.32-test → 7.9.34-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.
Files changed (77) hide show
  1. package/ai/skills/testdriver:ai/SKILL.md +204 -0
  2. package/ai/skills/testdriver:assert/SKILL.md +315 -0
  3. package/ai/skills/testdriver:aws-setup/SKILL.md +448 -0
  4. package/ai/skills/testdriver:cache/SKILL.md +221 -0
  5. package/ai/skills/testdriver:caching/SKILL.md +124 -0
  6. package/ai/skills/testdriver:captcha/SKILL.md +158 -0
  7. package/ai/skills/testdriver:ci-cd/SKILL.md +602 -0
  8. package/ai/skills/testdriver:click/SKILL.md +286 -0
  9. package/ai/skills/testdriver:client/SKILL.md +477 -0
  10. package/ai/skills/testdriver:customizing-devices/SKILL.md +319 -0
  11. package/ai/skills/testdriver:dashcam/SKILL.md +451 -0
  12. package/ai/skills/testdriver:debugging-with-screenshots/SKILL.md +415 -0
  13. package/ai/skills/testdriver:device-config/SKILL.md +317 -0
  14. package/ai/skills/testdriver:double-click/SKILL.md +102 -0
  15. package/ai/skills/testdriver:elements/SKILL.md +605 -0
  16. package/ai/skills/testdriver:enterprise/SKILL.md +7 -0
  17. package/ai/skills/testdriver:errors/SKILL.md +246 -0
  18. package/ai/skills/testdriver:events/SKILL.md +356 -0
  19. package/ai/skills/testdriver:exec/SKILL.md +317 -0
  20. package/ai/skills/testdriver:find/SKILL.md +860 -0
  21. package/ai/skills/testdriver:focus-application/SKILL.md +293 -0
  22. package/ai/skills/testdriver:generating-tests/SKILL.md +36 -0
  23. package/ai/skills/testdriver:hosted/SKILL.md +156 -0
  24. package/ai/skills/testdriver:hover/SKILL.md +278 -0
  25. package/ai/skills/testdriver:locating-elements/SKILL.md +71 -0
  26. package/ai/skills/testdriver:making-assertions/SKILL.md +32 -0
  27. package/ai/skills/testdriver:mcp/SKILL.md +7 -0
  28. package/ai/skills/testdriver:mouse-down/SKILL.md +161 -0
  29. package/ai/skills/testdriver:mouse-up/SKILL.md +164 -0
  30. package/ai/skills/testdriver:parse/SKILL.md +236 -0
  31. package/ai/skills/testdriver:performing-actions/SKILL.md +53 -0
  32. package/ai/skills/testdriver:press-keys/SKILL.md +348 -0
  33. package/ai/skills/testdriver:provision/SKILL.md +331 -0
  34. package/ai/skills/testdriver:quickstart/SKILL.md +172 -0
  35. package/ai/skills/testdriver:redraw/SKILL.md +214 -0
  36. package/ai/skills/testdriver:reusable-code/SKILL.md +249 -0
  37. package/ai/skills/testdriver:right-click/SKILL.md +123 -0
  38. package/ai/skills/testdriver:running-tests/SKILL.md +185 -0
  39. package/ai/skills/testdriver:screenshot/SKILL.md +248 -0
  40. package/ai/skills/testdriver:screenshots/SKILL.md +184 -0
  41. package/ai/skills/testdriver:scroll/SKILL.md +205 -0
  42. package/ai/skills/testdriver:secrets/SKILL.md +115 -0
  43. package/ai/skills/testdriver:self-hosted/SKILL.md +147 -0
  44. package/ai/skills/testdriver:test-results-json/SKILL.md +257 -0
  45. package/ai/skills/testdriver:testdriver/SKILL.md +624 -0
  46. package/ai/skills/testdriver:type/SKILL.md +357 -0
  47. package/ai/skills/testdriver:variables/SKILL.md +111 -0
  48. package/ai/skills/testdriver:wait/SKILL.md +50 -0
  49. package/ai/skills/testdriver:waiting-for-elements/SKILL.md +90 -0
  50. package/ai/skills/testdriver:what-is-testdriver/SKILL.md +54 -0
  51. package/docs/_data/examples-manifest.json +42 -42
  52. package/docs/v7/debugging-with-screenshots.mdx +14 -0
  53. package/docs/v7/examples/ai.mdx +1 -1
  54. package/docs/v7/examples/assert.mdx +1 -1
  55. package/docs/v7/examples/chrome-extension.mdx +2 -2
  56. package/docs/v7/examples/element-not-found.mdx +1 -1
  57. package/docs/v7/examples/exec-output.mdx +1 -1
  58. package/docs/v7/examples/exec-pwsh.mdx +1 -1
  59. package/docs/v7/examples/findall-coffee-icons.mdx +1 -1
  60. package/docs/v7/examples/focus-window.mdx +1 -1
  61. package/docs/v7/examples/hover-image.mdx +1 -1
  62. package/docs/v7/examples/hover-text-with-description.mdx +1 -1
  63. package/docs/v7/examples/hover-text.mdx +1 -1
  64. package/docs/v7/examples/installer.mdx +1 -1
  65. package/docs/v7/examples/launch-vscode-linux.mdx +1 -1
  66. package/docs/v7/examples/parse.mdx +1 -1
  67. package/docs/v7/examples/press-keys.mdx +1 -1
  68. package/docs/v7/examples/prompt.mdx +1 -1
  69. package/docs/v7/examples/scroll-keyboard.mdx +1 -1
  70. package/docs/v7/examples/scroll-until-image.mdx +1 -1
  71. package/docs/v7/examples/scroll.mdx +1 -1
  72. package/docs/v7/examples/type.mdx +1 -1
  73. package/docs/v7/examples/windows-installer.mdx +1 -1
  74. package/docs/v7/find.mdx +33 -0
  75. package/examples/chrome-extension.test.mjs +1 -1
  76. package/package.json +1 -1
  77. package/setup/aws/spawn-runner.sh +24 -3
@@ -0,0 +1,205 @@
1
+ ---
2
+ name: testdriver:scroll
3
+ description: Scroll pages and elements
4
+ ---
5
+ <!-- Generated from scroll.mdx. DO NOT EDIT. -->
6
+
7
+ ## Overview
8
+
9
+ Scroll the page or active element in any direction using mouse wheel or keyboard.
10
+
11
+ <Warning>
12
+ **Focus Requirements**
13
+
14
+ Scrolling requires the page or a frame to be focused. If an input field or other interactive element has focus, scroll commands may not work as expected. Before scrolling, ensure focus is on the page by:
15
+ - Clicking on a non-interactive area (e.g., page background)
16
+ - Pressing the Escape key to unfocus interactive elements
17
+ - Clicking outside of input fields or text areas
18
+
19
+ **If scroll is still not working**, try using Page Down/Page Up keys directly:
20
+ ```javascript
21
+ await testdriver.pressKeys(['pagedown']); // Scroll down
22
+ await testdriver.pressKeys(['pageup']); // Scroll up
23
+ ```
24
+ </Warning>
25
+
26
+ ## Syntax
27
+
28
+ ```javascript
29
+ await testdriver.scroll(direction, options)
30
+ ```
31
+
32
+ ## Parameters
33
+
34
+ <ParamField path="direction" type="string" default="down">
35
+ Direction to scroll: `'up'`, `'down'`
36
+ </ParamField>
37
+
38
+ <ParamField path="options" type="object">
39
+ <Expandable title="properties">
40
+ <ParamField path="amount" type="number" default="300">
41
+ Amount to scroll in pixels
42
+ </ParamField>
43
+ </Expandable>
44
+ </ParamField>
45
+
46
+ ## Returns
47
+
48
+ `Promise<void>`
49
+
50
+ ## Examples
51
+
52
+ ### Basic Scrolling
53
+
54
+ ```javascript
55
+ // Scroll down (default)
56
+ await testdriver.scroll();
57
+
58
+ // Scroll down 5 clicks
59
+ await testdriver.scroll('down', { amount: 5 });
60
+
61
+ // Scroll up
62
+ await testdriver.scroll('up');
63
+
64
+ // Scroll up 2 clicks
65
+ await testdriver.scroll('up', { amount: 2 });
66
+ ```
67
+
68
+ ### Horizontal Scrolling
69
+
70
+ ```javascript
71
+ // Scroll right
72
+ await testdriver.scroll('right', { amount: 3 });
73
+
74
+ // Scroll left
75
+ await testdriver.scroll('left', { amount: 3 });
76
+ ```
77
+
78
+ ### Scroll Methods
79
+
80
+ ```javascript
81
+ // Mouse wheel scroll (default)
82
+ await testdriver.scroll('down', { amount: 3 });
83
+
84
+ // For keyboard-based scrolling, use pressKeys instead
85
+ await testdriver.pressKeys(['pagedown']);
86
+ ```
87
+
88
+ ## Best Practices
89
+
90
+ <Check>
91
+ **Ensure page has focus before scrolling**
92
+
93
+ ```javascript
94
+ // After typing in an input, unfocus it first
95
+ await testdriver.find('email input').click();
96
+ await testdriver.type('user@example.com');
97
+
98
+ // Click elsewhere or press Escape before scrolling
99
+ await testdriver.pressKeys(['escape']);
100
+ // Or click a non-interactive area
101
+ // await testdriver.find('page background').click();
102
+
103
+ // Now scroll will work properly
104
+ await testdriver.scroll('down');
105
+
106
+ // If scroll still doesn't work, use Page Down directly
107
+ // await testdriver.pressKeys(['pagedown']);
108
+ ```
109
+ </Check>
110
+
111
+ <Check>
112
+ **Control scroll distance with the options object**
113
+
114
+ ```javascript
115
+ // For web pages, mouse scroll works well
116
+ await testdriver.scroll('down', { amount: 3 });
117
+
118
+ // For desktop apps or when mouse doesn't work, use keyboard
119
+ await testdriver.pressKeys(['pagedown']);
120
+ ```
121
+ </Check>
122
+
123
+ <Warning>
124
+ **Keyboard scroll uses Page Down/Up**
125
+
126
+ Keyboard scrolling typically moves by one "page" at a time, which may be more than the specified click amount. It's more compatible but less precise than mouse scrolling.
127
+ </Warning>
128
+
129
+ ## Use Cases
130
+
131
+ <AccordionGroup>
132
+ <Accordion title="Infinite Scroll">
133
+ ```javascript
134
+ // Scroll multiple times for infinite scroll
135
+ for (let i = 0; i < 5; i++) {
136
+ await testdriver.scroll('down', { amount: 5 });
137
+ await new Promise(r => setTimeout(r, 1000)); // Wait for load
138
+ }
139
+ ```
140
+ </Accordion>
141
+
142
+ <Accordion title="Horizontal Gallery">
143
+ ```javascript
144
+ // Navigate horizontal carousel
145
+ await testdriver.scroll('right', { amount: 3 });
146
+ await new Promise(r => setTimeout(r, 500));
147
+
148
+ const nextImage = await testdriver.find('next image in carousel');
149
+ await nextImage.click();
150
+ ```
151
+ </Accordion>
152
+ </AccordionGroup>
153
+
154
+ ## Complete Example
155
+
156
+ ```javascript
157
+ import { beforeAll, afterAll, describe, it } from 'vitest';
158
+ import TestDriver from 'testdriverai';
159
+
160
+ describe('Scrolling', () => {
161
+ let testdriver;
162
+
163
+ beforeAll(async () => {
164
+ client = new TestDriver(process.env.TD_API_KEY);
165
+ await testdriver.auth();
166
+ await testdriver.connect();
167
+ });
168
+
169
+ afterAll(async () => {
170
+ await testdriver.disconnect();
171
+ });
172
+
173
+ it('should scroll to find elements', async () => {
174
+ await testdriver.focusApplication('Google Chrome');
175
+
176
+ // Scroll down the page
177
+ await testdriver.scroll('down', { amount: 5 });
178
+
179
+ // Click footer link
180
+ const privacyLink = await testdriver.find('Privacy Policy link');
181
+ await privacyLink.click();
182
+
183
+ await testdriver.assert('privacy policy page is displayed');
184
+ });
185
+
186
+ it('should handle infinite scroll', async () => {
187
+ await testdriver.focusApplication('Google Chrome');
188
+
189
+ // Scroll multiple times to load content
190
+ for (let i = 0; i < 3; i++) {
191
+ await testdriver.scroll('down', { amount: 5 });
192
+ await new Promise(r => setTimeout(r, 1500)); // Wait for load
193
+ }
194
+
195
+ // Verify content loaded
196
+ await testdriver.assert('more than 10 items are visible');
197
+ });
198
+ });
199
+ ```
200
+
201
+ ## Related Methods
202
+
203
+ - [`find()`](/v7/find) - Locate elements after scrolling
204
+ - [`pressKeys()`](/v7/press-keys) - Use Page Down/Up keys
205
+ - [`wait()`](/v7/wait) - Wait after scrolling
@@ -0,0 +1,115 @@
1
+ ---
2
+ name: testdriver:secrets
3
+ description: Securely manage passwords and sensitive data in your tests
4
+ ---
5
+ <!-- Generated from secrets.mdx. DO NOT EDIT. -->
6
+
7
+ Protect sensitive information like passwords, API keys, and tokens in your TestDriver tests.
8
+
9
+ ## Typing Secrets Securely
10
+
11
+ When typing sensitive information like passwords, use the `secret: true` option to prevent the value from being logged or stored:
12
+
13
+ ```javascript
14
+ import { test } from 'vitest';
15
+ import { chrome } from 'testdriverai/presets';
16
+
17
+ test('login with secure password', async (context) => {
18
+ const { testdriver } = await chrome(context, {
19
+ url: 'https://myapp.com/login'
20
+ });
21
+
22
+ await testdriver.find('email input').click();
23
+ await testdriver.type(process.env.TD_USERNAME);
24
+
25
+ await testdriver.find('password input').click();
26
+ // Password is masked in logs and recordings
27
+ await testdriver.type(process.env.TD_PASSWORD, { secret: true });
28
+
29
+ await testdriver.find('login button').click();
30
+ await testdriver.assert('dashboard is visible');
31
+ });
32
+ ```
33
+
34
+ <Note>
35
+ When `secret: true` is set, the typed text appears as `****` in all logs, recordings, and dashcam output.
36
+ </Note>
37
+
38
+ ## Storing Secrets in GitHub
39
+
40
+ Store sensitive credentials as GitHub repository secrets so they're never exposed in your code:
41
+
42
+ <Steps>
43
+ <Step title="Navigate to Repository Settings">
44
+ Go to your GitHub repository → **Settings** → **Secrets and variables** → **Actions**
45
+ </Step>
46
+ <Step title="Add Repository Secrets">
47
+ Click **New repository secret** and add your secrets:
48
+ - `TD_API_KEY` - Your TestDriver API key
49
+ - `TD_USERNAME` - Test account username
50
+ - `TD_PASSWORD` - Test account password
51
+ </Step>
52
+ <Step title="Use in GitHub Actions">
53
+ Reference secrets in your workflow file:
54
+ ```yaml .github/workflows/test.yml
55
+ - name: Run TestDriver tests
56
+ env:
57
+ TD_API_KEY: ${{ secrets.TD_API_KEY }}
58
+ TD_USERNAME: ${{ secrets.TD_USERNAME }}
59
+ TD_PASSWORD: ${{ secrets.TD_PASSWORD }}
60
+ run: vitest run
61
+ ```
62
+ </Step>
63
+ </Steps>
64
+
65
+ ## Local Development
66
+
67
+ For local development, store secrets in a `.env` file:
68
+
69
+ ```bash .env
70
+ TD_API_KEY=your_api_key_here
71
+ TD_USERNAME=testuser@example.com
72
+ TD_PASSWORD=your_secure_password
73
+ ```
74
+
75
+ <Warning>
76
+ Never commit `.env` files to version control. Add `.env` to your `.gitignore` file.
77
+ </Warning>
78
+
79
+ ## Complete Example
80
+
81
+ Here's a full login test with proper secrets handling:
82
+
83
+ ```javascript tests/login.test.js
84
+ import { test, expect } from 'vitest';
85
+ import { chrome } from 'testdriverai/presets';
86
+
87
+ test('secure login flow', async (context) => {
88
+ const { testdriver } = await chrome(context, {
89
+ url: process.env.TD_WEBSITE || 'https://staging.myapp.com'
90
+ });
91
+
92
+ // Enter username (not sensitive)
93
+ await testdriver.find('email input').click();
94
+ await testdriver.type(process.env.TD_USERNAME);
95
+
96
+ // Enter password securely
97
+ await testdriver.find('password input').click();
98
+ await testdriver.type(process.env.TD_PASSWORD, { secret: true });
99
+
100
+ // Submit login
101
+ await testdriver.find('login button').click();
102
+
103
+ // Verify successful login
104
+ const loggedIn = await testdriver.assert('user is logged in');
105
+ expect(loggedIn).toBeTruthy();
106
+ });
107
+ ```
108
+
109
+ <Card title="Secrets Best Practices" icon="shield-check">
110
+ - **Always use `secret: true`** when typing passwords, tokens, or sensitive data
111
+ - **Use environment variables** to keep secrets out of code
112
+ - **Store secrets in your CI provider** (GitHub Actions, GitLab CI, etc.)
113
+ - **Never commit secrets** to version control
114
+ - **Rotate secrets regularly** to maintain security
115
+ </Card>
@@ -0,0 +1,147 @@
1
+ ---
2
+ name: testdriver:self-hosted
3
+ description: Our enterprise solution with unlimited test execution, assisted setup, and dedicated support.
4
+ ---
5
+ <!-- Generated from self-hosted.mdx. DO NOT EDIT. -->
6
+
7
+ Self-hosted is our enterprise solution for teams that need unlimited test execution, infrastructure control, and dedicated support. Pricing is based on **parallel test capacity** with a flat license fee — no per-second billing.
8
+
9
+ <CardGroup cols={2}>
10
+ <Card title="Unlimited Execution" icon="infinity">
11
+ Run as many tests as you want with no device-second metering. Predictable monthly costs.
12
+ </Card>
13
+ <Card title="Assisted Setup & Support" icon="headset">
14
+ Our team helps you deploy, configure, and optimize your infrastructure. Dedicated engineering support included.
15
+ </Card>
16
+ <Card title="Full Control" icon="gear">
17
+ Use your own AI keys, custom hardware, specific software, and network configurations. RDP into test machines for debugging.
18
+ </Card>
19
+ <Card title="Security & Compliance" icon="shield-check">
20
+ Keep data in your environment. Air-gapped deployment available for regulated industries.
21
+ </Card>
22
+ </CardGroup>
23
+
24
+ ## Deployment Options
25
+
26
+ Choose the level of control you need:
27
+
28
+ | Component | Standard | Air-Gapped |
29
+ |-----------|----------|------------|
30
+ | **Test Sandboxes** | Your AWS | Your infrastructure (any cloud or on-prem) |
31
+ | **Dashboard** | TestDriver hosted | Your infrastructure |
32
+ | **API** | TestDriver hosted | Your infrastructure |
33
+ | **AI Processing** | Your API keys | Your infrastructure |
34
+ | **Data Storage** | Your AWS account | 100% your infrastructure |
35
+ | **Network** | Internet access required | Fully air-gapped |
36
+ | **Cloud Providers** | AWS | AWS, Azure, GCP, on-prem |
37
+
38
+ ### Standard Deployment
39
+
40
+ Run test sandboxes on your AWS infrastructure while using TestDriver's hosted dashboard and API:
41
+
42
+ - **Quick setup** via CloudFormation — deploy in hours
43
+ - **Dashboard access** at [console.testdriver.ai](https://console.testdriver.ai)
44
+ - **Your AI keys** — control costs with your own OpenAI, Anthropic, or other provider
45
+ - **Custom AMIs** — install specific software, configure networking
46
+
47
+ <Card
48
+ title="AWS Setup Guide"
49
+ icon="aws"
50
+ href="/v7/aws-setup"
51
+ >
52
+ Step-by-step instructions for deploying TestDriver on your AWS infrastructure using CloudFormation.
53
+ </Card>
54
+
55
+ ### Air-Gapped Deployment
56
+
57
+ Deploy the entire TestDriver stack in your environment for complete isolation:
58
+
59
+ - **Full stack** — dashboard, API, and test infrastructure all in your environment
60
+ - **No external dependencies** — data never leaves your network perimeter
61
+ - **Any infrastructure** — AWS, Azure, GCP, or on-premises
62
+ - **Regulated industries** — government, defense, healthcare, finance
63
+
64
+ ## Custom VM Images
65
+
66
+ Build test environments with your applications, dependencies, and user data pre-installed. You get full access to:
67
+
68
+ - **Golden VM** — our pre-configured base image with TestDriver agent, drivers, and optimizations
69
+ - **Packer scripts** — build custom AMIs with your applications, user data, and configurations
70
+ - **Faster test startup** — skip installation steps by baking dependencies into your image
71
+ - **Consistent environments** — every test runs on an identical, reproducible machine
72
+
73
+ <AccordionGroup>
74
+ <Accordion title="What can you customize?">
75
+ - Install applications (browsers, desktop apps, dev tools)
76
+ - Configure user accounts and credentials
77
+ - Set up network proxies and certificates
78
+ - Install fonts, language packs, and locales
79
+ - Pre-seed databases or test fixtures
80
+ - Configure Windows/Linux settings
81
+ </Accordion>
82
+
83
+ <Accordion title="How it works">
84
+ 1. We provide our golden VM base image and Packer scripts
85
+ 2. You customize the scripts to install your software and configuration
86
+ 3. Run Packer to build your custom AMI
87
+ 4. Configure TestDriver to use your custom AMI for test sandboxes
88
+ 5. Tests spin up with everything pre-installed — no setup time wasted
89
+ </Accordion>
90
+ </AccordionGroup>
91
+
92
+ ## Implementation Process
93
+
94
+ <Steps>
95
+ <Step title="Discovery Call">
96
+ Discuss your requirements, security constraints, and integration needs with our team.
97
+ </Step>
98
+
99
+ <Step title="Architecture Review">
100
+ Our engineers design a deployment architecture that meets your security and compliance requirements.
101
+ </Step>
102
+
103
+ <Step title="Deployment">
104
+ We work with your team to deploy TestDriver, including assisted setup and configuration.
105
+ </Step>
106
+
107
+ <Step title="Integration">
108
+ Connect TestDriver to your CI/CD pipelines, internal tools, and workflows.
109
+ </Step>
110
+
111
+ <Step title="Training & Handoff">
112
+ Comprehensive training for your team on operating and maintaining the deployment.
113
+ </Step>
114
+ </Steps>
115
+
116
+ ## What's Included
117
+
118
+ - **Flat license fee** per parallel test slot
119
+ - **Unlimited test execution** — no device-second charges
120
+ - **Assisted setup** — our team helps you deploy and configure
121
+ - **Dedicated support** — direct access to our engineering team
122
+ - **Custom contract terms** — volume-based pricing, custom SLAs
123
+ - **Professional services** — implementation assistance and training
124
+
125
+ ## Comparison: Hosted vs Self-Hosted
126
+
127
+ | Feature | Hosted | Self-Hosted |
128
+ |---------|--------|-------------|
129
+ | **Setup Time** | Minutes | Hours (assisted) |
130
+ | **Pricing Model** | Device-seconds | Flat license fee |
131
+ | **Infrastructure** | TestDriver | Your AWS or any cloud |
132
+ | **AI API Keys** | TestDriver's | Your own |
133
+ | **Custom Software** | Limited | Full control |
134
+ | **Hardware Selection** | Standard | Your choice |
135
+ | **Debugging Access** | Replays only | Full RDP access |
136
+ | **Support** | Community/Standard | Dedicated engineering |
137
+ | **Air-Gapped Option** | No | Yes |
138
+
139
+ ## Get Started
140
+
141
+ <Card
142
+ title="Schedule a Consultation"
143
+ icon="calendar"
144
+ href="https://testdriver.ai/demo"
145
+ >
146
+ Discuss your requirements with our team and get a custom proposal for your self-hosted deployment.
147
+ </Card>