@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.
Files changed (52) hide show
  1. package/ai/skills/testdriver-agent/SKILL.md +174 -91
  2. package/ai/skills/testdriver-assert/SKILL.md +73 -269
  3. package/ai/skills/testdriver-aws-setup/SKILL.md +194 -312
  4. package/ai/skills/testdriver-bring-your-own-machine/SKILL.md +137 -204
  5. package/ai/skills/testdriver-cache/SKILL.md +142 -149
  6. package/ai/skills/testdriver-caching/SKILL.md +97 -87
  7. package/ai/skills/testdriver-captcha/SKILL.md +126 -111
  8. package/ai/skills/testdriver-ci-cd/SKILL.md +153 -542
  9. package/ai/skills/testdriver-click/SKILL.md +74 -229
  10. package/ai/skills/testdriver-client/SKILL.md +175 -229
  11. package/ai/skills/testdriver-customizing-devices/SKILL.md +72 -250
  12. package/ai/skills/testdriver-dashcam/SKILL.md +71 -404
  13. package/ai/skills/testdriver-debugging-with-screenshots/SKILL.md +103 -369
  14. package/ai/skills/testdriver-double-click/SKILL.md +46 -67
  15. package/ai/skills/testdriver-errors/SKILL.md +102 -176
  16. package/ai/skills/testdriver-events/SKILL.md +170 -327
  17. package/ai/skills/testdriver-exec/SKILL.md +92 -256
  18. package/ai/skills/testdriver-extract/SKILL.md +69 -170
  19. package/ai/skills/testdriver-find/SKILL.md +140 -736
  20. package/ai/skills/testdriver-focus-application/SKILL.md +69 -246
  21. package/ai/skills/testdriver-generating-tests/SKILL.md +102 -136
  22. package/ai/skills/testdriver-hosted/SKILL.md +79 -143
  23. package/ai/skills/testdriver-hover/SKILL.md +62 -235
  24. package/ai/skills/testdriver-locating-elements/SKILL.md +71 -366
  25. package/ai/skills/testdriver-making-assertions/SKILL.md +114 -72
  26. package/ai/skills/testdriver-mcp-setup/SKILL.md +79 -62
  27. package/ai/skills/testdriver-mouse-down/SKILL.md +46 -124
  28. package/ai/skills/testdriver-mouse-up/SKILL.md +45 -128
  29. package/ai/skills/testdriver-options/SKILL.md +73 -46
  30. package/ai/skills/testdriver-parse/SKILL.md +95 -184
  31. package/ai/skills/testdriver-performing-actions/SKILL.md +101 -91
  32. package/ai/skills/testdriver-press-keys/SKILL.md +59 -299
  33. package/ai/skills/testdriver-provision/SKILL.md +135 -179
  34. package/ai/skills/testdriver-quickstart/SKILL.md +24 -8
  35. package/ai/skills/testdriver-quickstart-claude/SKILL.md +84 -0
  36. package/ai/skills/testdriver-quickstart-github/SKILL.md +62 -32
  37. package/ai/skills/testdriver-quickstart-manual/SKILL.md +59 -32
  38. package/ai/skills/testdriver-quickstart-vscode/SKILL.md +96 -0
  39. package/ai/skills/testdriver-redraw/SKILL.md +100 -164
  40. package/ai/skills/testdriver-reusable-code/SKILL.md +95 -199
  41. package/ai/skills/testdriver-right-click/SKILL.md +45 -88
  42. package/ai/skills/testdriver-screenshot/SKILL.md +47 -201
  43. package/ai/skills/testdriver-screenshots/SKILL.md +86 -136
  44. package/ai/skills/testdriver-scroll/SKILL.md +71 -154
  45. package/ai/skills/testdriver-secrets/SKILL.md +94 -90
  46. package/ai/skills/testdriver-self-hosted/SKILL.md +82 -140
  47. package/ai/skills/testdriver-test-results-json/SKILL.md +165 -202
  48. package/ai/skills/testdriver-type/SKILL.md +56 -304
  49. package/ai/skills/testdriver-variables/SKILL.md +119 -80
  50. package/ai/skills/testdriver-wait/SKILL.md +31 -29
  51. package/ai/skills/testdriver-what-is-testdriver/SKILL.md +80 -32
  52. package/package.json +1 -1
@@ -1,50 +1,52 @@
1
1
  ---
2
2
  name: testdriver:wait
3
- description: Pause the execution of the script for a specified duration.
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
- ## Description
7
+ Pause the test for a fixed time, for example while an animation finishes:
8
8
 
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.
9
+ ```javascript
10
+ await testdriver.find('Menu toggle').click();
11
+ await testdriver.wait(1000);
12
+ ```
10
13
 
11
- ## Syntax
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.wait(timeout);
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
- ## Arguments
26
+ ## Parameters
18
27
 
19
- | Argument | Type | Default | Description |
20
- | --------- | -------- | ------- | ------------------------------------- |
21
- | `timeout` | `number` | `3000` | The duration in milliseconds to wait. |
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
- // Wait 2 seconds for an animation to complete
27
- await testdriver.find('submit button').click();
28
- await testdriver.wait(2000);
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
- // Wait 5 seconds
31
- await testdriver.wait(5000);
42
+ ### Pause for the default time
32
43
 
33
- // Wait with default timeout (3 seconds)
34
- await testdriver.wait();
44
+ ```javascript
45
+ await testdriver.wait(); // 3 seconds
35
46
  ```
36
47
 
37
- ## Best Practices
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
- // ❌ Don't do this for element waiting
46
- await testdriver.wait(5000);
47
- const element = await testdriver.find('success message');
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: Reliably test your most difficult user flows
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
- ## The problem with usual test tools
7
+ TestDriver is an end-to-end testing platform that tests your app the way a person uses it.
8
8
 
9
- Usual test tools such as Playwright test one web application. They use one browser tab and they use selectors.
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
- But selectors are frequently not reliable, or they are not available. This makes tests weak and not stable:
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
- | Challenge | Problem | Examples |
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
- ## The TestDriver solution
17
+ Tools such as Playwright and Cypress drive a single web page through its DOM. They locate elements with selectors.
22
18
 
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.
19
+ That works until a test needs something the DOM can't describe reliably:
24
20
 
25
- ### Javascript SDK
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
- 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:
29
+ ## How TestDriver works
28
30
 
29
- ```javascript Installing Loom from the Chrome Web Store
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
- describe("Chrome Extension Test", () => {
34
- const testdriver = TestDriver(context);
33
+ Each step describes what a user would see or do:
35
34
 
36
- // Launch Chrome with Loom loaded by its Chrome Web Store ID
37
- await testdriver.provision.chromeExtension({
38
- extensionId: 'liecbddmkiiihnedobmlmillhodjkdmb'
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
- // Click on the extensions button (puzzle piece icon) in Chrome toolbar
42
- const extensionsButton = await testdriver.find("The puzzle-shaped icon in the Chrome toolbar.");
43
- await extensionsButton.click();
50
+ // Launch Chrome with Loom installed by its Chrome Web Store ID
51
+ await testdriver.provision.chromeExtension({
52
+ extensionId: 'liecbddmkiiihnedobmlmillhodjkdmb',
53
+ });
44
54
 
45
- // Look for Loom in the extensions menu
46
- const loomExtension = await testdriver.find("Loom extension in the extensions dropdown");
47
- expect(loomExtension.found()).toBeTruthy();
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
- <Tip>[vitest](https://vitest.dev/) is the preferred test runner for TestDriver.</Tip>
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>
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@testdriverai/agent",
3
- "version": "7.11.240-test",
3
+ "version": "7.11.241-test",
4
4
  "description": "Next generation autonomous AI agent for end-to-end testing of web & desktop",
5
5
  "main": "sdk.js",
6
6
  "types": "sdk.d.ts",