testdriverai 5.3.0 → 5.3.2

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 (56) hide show
  1. package/agent.js +8 -0
  2. package/docs/action/browser.mdx +1 -0
  3. package/docs/action/os.mdx +1 -0
  4. package/docs/action/output.mdx +1 -0
  5. package/docs/action/performance.mdx +1 -0
  6. package/docs/action/prerun.mdx +1 -0
  7. package/docs/action/secrets.mdx +1 -0
  8. package/docs/action/setup.mdx +1 -0
  9. package/docs/commands/assert.mdx +1 -0
  10. package/docs/commands/exec.mdx +1 -0
  11. package/docs/commands/focus-application.mdx +1 -0
  12. package/docs/commands/hover-image.mdx +1 -0
  13. package/docs/commands/hover-text.mdx +1 -0
  14. package/docs/commands/if.mdx +1 -0
  15. package/docs/commands/match-image.mdx +1 -0
  16. package/docs/commands/press-keys.mdx +1 -0
  17. package/docs/commands/run.mdx +1 -0
  18. package/docs/commands/scroll-until-image.mdx +1 -0
  19. package/docs/commands/scroll-until-text.mdx +1 -0
  20. package/docs/commands/scroll.mdx +1 -0
  21. package/docs/commands/type.mdx +1 -0
  22. package/docs/commands/wait-for-image.mdx +1 -0
  23. package/docs/commands/wait-for-text.mdx +1 -0
  24. package/docs/commands/wait.mdx +1 -0
  25. package/docs/docs-future.json.txt +114 -0
  26. package/docs/docs.json +19 -91
  27. package/docs/features/auto-healing.mdx +15 -34
  28. package/docs/getting-started/ci.mdx +65 -122
  29. package/docs/getting-started/editing.mdx +77 -0
  30. package/docs/getting-started/generating.mdx +14 -169
  31. package/docs/getting-started/running.mdx +28 -51
  32. package/docs/getting-started/setup.mdx +23 -2
  33. package/docs/getting-started/vscode.mdx +80 -0
  34. package/docs/getting-started/writing.mdx +4 -3
  35. package/docs/guide/assertions.mdx +1 -0
  36. package/docs/guide/authentication.mdx +1 -0
  37. package/docs/guide/code.mdx +1 -0
  38. package/docs/guide/locating.mdx +1 -0
  39. package/docs/guide/setup-teardown.mdx +1 -0
  40. package/docs/guide/variables.mdx +4 -0
  41. package/docs/guide/waiting.mdx +24 -28
  42. package/docs/overview/comparison.mdx +4 -0
  43. package/docs/overview/faq.mdx +1 -0
  44. package/docs/overview/quickstart.mdx +10 -0
  45. package/docs/overview/what-is-testdriver.mdx +2 -0
  46. package/docs/security/action.mdx +1 -2
  47. package/docs/security/agent.mdx +1 -2
  48. package/docs/security/platform.mdx +1 -2
  49. package/lib/commander.js +6 -0
  50. package/lib/commands.js +2 -1
  51. package/package.json +1 -1
  52. package/test.yml +18 -0
  53. package/testdriver/testdriver_2025-04-14T17-43-37-760Z.yaml +10 -0
  54. package/testdriver/testdriver_2025-04-14T17-45-00-565Z.yaml +13 -0
  55. package/testdriver/testdriver_2025-04-14T23-14-46-822Z.yaml +0 -0
  56. package/testdriver/testdriver_2025-04-14T23-14-51-653Z.yaml +0 -0
@@ -0,0 +1,80 @@
1
+ ---
2
+ title: "Install the TestDriver.ai VSCode Extension"
3
+ sidebarTitle: "VSCode Extension"
4
+ description: "Comprehensive guide to installing and setting up TestDriver.ai for VSCode"
5
+ icon: "file-code"
6
+ ---
7
+
8
+
9
+ [Download VSCode Extension](https://github.com/testdriverai/vscode/actions/runs/14451916515#artifacts)
10
+
11
+ # Install the extension
12
+
13
+ 1. Open Visual Studio Code.
14
+ 2. Go to the Extensions view by clicking on the Extensions icon in the Activity Bar on the side of the window or by pressing `Ctrl+Shift+X`.
15
+ 3. In the Extensions view, click on the three-dot menu in the top-right corner and select "Install from VSIX...".
16
+ 4. Navigate to the location where you downloaded the `testdriverai.vsix` file and select it.
17
+
18
+ ![](/images/content/vscode-install.png)
19
+
20
+ # Try the Walkthrough
21
+
22
+ The extension should launch a walkthrough. If it does not, you can manually start it by running the command `TestDriver: Start Walkthrough` from the Command Palette (`Ctrl+Shift+P`).
23
+
24
+ ![](/images/content/vscode-walkthrough.png)
25
+
26
+ # Overview
27
+
28
+ ![](/images/content/vscode-overview.png)
29
+
30
+ - Test Pane
31
+ - Located in the **Activity Bar** (left-hand side of the editor).
32
+ - Clicking the **flask icon** opens the TestDriver test explorer.
33
+ - Lists all the available YAML-based test definitions.
34
+ - Run all Tests
35
+ - This button runs all tests shown in the Test Explorer.
36
+ - Found near the top of the Test Explorer view.
37
+ - Especially useful for quickly validating a batch of test cases.
38
+ - AI Test Creation
39
+ - New files created by TestDriver will automatically be focused in the editor.
40
+ - Defines an automated test script created by TestDriver.
41
+ - AI Agent Test Preview
42
+ - Sidebar chat panel shows the TestDriver agent’s response to the prompt.
43
+ - Offers feedback, interpretation, or suggested actions for the test steps.
44
+ - Example: It identifies the context (e.g., a terminal is in focus) and suggests the correct automation action.
45
+ - Additional files modified by the agent are listed for context.
46
+ - Test Output
47
+ - Terminal panel at the bottom of the screen.
48
+ - Displays live output from running the test file.
49
+ - Shows TestDriver version, current test script, and metadata like session ID.
50
+ - Helpful for debugging and understanding test execution flow.
51
+ - Test History
52
+ - Shows a list of previously run test scripts.
53
+ - Allows developers to review or re-run older tests.
54
+ - Useful for regression testing or comparing AI-generated test iterations.
55
+
56
+ # Troubleshooting
57
+
58
+ ## I don't have GitHub Copilot Chat
59
+
60
+ You can still use the extension to run and manage tests. Use the CLI for test creation instead.
61
+
62
+ ## The @testdriverai command doesn't show up
63
+
64
+ Make sure the GitHub Copilot Chat is set to "ask."
65
+
66
+ ![](/images/content/vscode-ask.png)
67
+
68
+ ## How do I stop a running execution?
69
+
70
+ Click on the "Stop" button in the bottom of agent chat.
71
+
72
+ ![](/images/content/vscode-stop-chat.png)
73
+
74
+ Click on the "Stop" button in the top right corner of the test execution. This only shows on hover.
75
+
76
+ ![](/images/content/vscode-stop-test.png)
77
+
78
+ A TestDriver icon will show in the tray bar. Click it, then click "quit."
79
+
80
+ ![](/images/content/vscode-stop-quit.png)
@@ -1,7 +1,8 @@
1
1
  ---
2
- title: "Writing Tests with TestDriver.ai"
3
- sidebarTitle: "Writing Tests"
4
- description: "Step-by-step guide to writing and refining tests using TestDriver.ai's interactive CLI."
2
+ title: "Test Copilot"
3
+ sidebarTitle: "Test Copilot"
4
+ description: "Create tests with the help of TestDriver's interactive computer-use agent."
5
+ icon: "glasses"
5
6
  ---
6
7
 
7
8
  The TestDriver.ai interactive CLI allows you to create, refine, and execute tests dynamically using natural language commands. Here's how to get started.
@@ -2,6 +2,7 @@
2
2
  title: "Using Assertions in TestDriver.ai"
3
3
  sidebarTitle: "Assertions"
4
4
  description: "Comprehensive guide to understanding and implementing assertions in TestDriver.ai for robust test validation."
5
+ icon: "square-check"
5
6
  ---
6
7
 
7
8
  # Guide: Using Assertions in TestDriver.ai
@@ -2,6 +2,7 @@
2
2
  title: "Authentication in TestDriver.ai"
3
3
  sidebarTitle: "Authentication"
4
4
  description: "Learn how to securely handle authentication workflows in TestDriver.ai using GitHub Actions."
5
+ icon: "lock"
5
6
  ---
6
7
 
7
8
  This guide explains how to handle **authentication workflows** in **TestDriver.ai** using GitHub Actions. It covers securely passing credentials (e.g., usernames and passwords) to the TestDriver.ai action and using them in both the `prerun` script and test files.
@@ -2,6 +2,7 @@
2
2
  title: "Custom Code in TestDriver.ai"
3
3
  sidebarTitle: "Custom Code"
4
4
  description: "Learn how to integrate custom Node.js scripts into your TestDriver.ai workflows for dynamic testing."
5
+ icon: "code"
5
6
  ---
6
7
 
7
8
  TestDriver.ai allows you to execute custom **Node.js** scripts within your test workflows using the `exec` command. This feature, introduced in version `5.1.0`, enables you to integrate custom logic, such as generating one-time passwords (OTPs), hitting APIs, or performing other dynamic operations, directly into your tests.
@@ -2,6 +2,7 @@
2
2
  title: "Locating Elements in TestDriver.ai"
3
3
  sidebarTitle: "Locating Elements"
4
4
  description: "Learn how to effectively describe and locate elements using TestDriver.ai's visual understanding capabilities."
5
+ icon: "magnifying-glass"
5
6
  ---
6
7
 
7
8
  TestDriver.ai uses **visual understanding** to locate elements on the screen. Unlike traditional testing frameworks that rely on selectors or element IDs, TestDriver.ai identifies elements based on their **visual appearance**. This guide explains how to describe elements effectively to ensure TestDriver.ai can locate them accurately.
@@ -2,6 +2,7 @@
2
2
  title: "Setup & Teardown"
3
3
  sidebarTitle: "Setup & Teardown"
4
4
  description: "Learn how to effectively describe and locate elements using TestDriver.ai's visual understanding capabilities."
5
+ icon: "hammer"
5
6
  ---
6
7
 
7
8
 
@@ -1,3 +1,7 @@
1
+ ---
2
+ icon: "square-root-variable"
3
+ ---
4
+
1
5
  # Using Variables in TestDriver.ai
2
6
 
3
7
  Variables in **TestDriver.ai** allow you to dynamically store and reuse data during test execution. This feature is particularly useful for handling dynamic content, passing data between steps, and customizing test behavior based on runtime conditions.
@@ -1,25 +1,39 @@
1
+ ---
2
+ title: Waiting in TestDriver.ai
3
+ sidebarTitle: Waiting
4
+ icon: "hourglass-half"
5
+ ---
6
+
1
7
  # Waiting in TestDriver.ai: Ensuring Stability and Reducing Flakiness
2
8
 
3
- Waiting is a critical feature in TestDriver.ai that ensures tests are stable and reliable, even in dynamic or slow-loading environments. TestDriver.ai provides built-in mechanisms to wait for UI changes, network stabilization, and specific elements like text or images to appear on the screen. These features help reduce test flakiness and improve the accuracy of your test results.
9
+ Waiting is a critical feature in TestDriver.ai that ensures tests are stable and reliable, even in dynamic or slow-loading environments.
4
10
 
5
- ---
11
+
12
+ ## Summary of Waiting Features
13
+
14
+ | **Feature** | **Description** |
15
+ |-----------------------|---------------------------------------------------------------------------------|
16
+ | **`redraw`(automatic)** | TestDriver automatically waits for UI changes and network activity to resolve. |
17
+ | **`wait-for-text`** | Waits for specific text to appear on the screen. |
18
+ | **`wait-for-image`** | Waits for a specific image or visual element to appear on the screen. |
6
19
 
7
20
  ## Key Waiting Features in TestDriver.ai
8
21
 
9
- 1. **`wait-for-text` Command**:
22
+ 1. **Automatic Waiting with `redraw`**:
23
+ - TestDriver.ai automatically waits for the machine before moving to the next step.
24
+ - This includes waiting for:
25
+ - UI changes to complete.
26
+ - Network activity to stabilize (e.g., API calls).
27
+ - Reduces the need for manual waits, making tests faster and less prone to flakiness.
28
+
29
+ 2. **`wait-for-text` Command**:
10
30
  - Waits for specific text to appear on the screen.
11
31
  - Useful for validating dynamic content or ensuring that a page has fully loaded before proceeding.
12
32
 
13
- 2. **`wait-for-image` Command**:
33
+ 3. **`wait-for-image` Command**:
14
34
  - Waits for a specific image or visual element to appear on the screen.
15
35
  - Ideal for verifying the presence of icons, logos, or other graphical elements.
16
36
 
17
- 3. **Automatic Waiting with `redraw`**:
18
- - TestDriver.ai automatically waits for the screen to stabilize before moving to the next step.
19
- - This includes waiting for:
20
- - UI changes to complete.
21
- - Network activity to stabilize (e.g., AJAX requests or API calls).
22
- - Reduces the need for manual waits, making tests faster and less prone to flakiness.
23
37
 
24
38
  ---
25
39
 
@@ -74,7 +88,6 @@ The `wait-for-image` command pauses the test until the specified image or visual
74
88
 
75
89
  ```
76
90
 
77
-
78
91
  In this example, the test waits up to 8 seconds for the company logo to appear in the top-left corner.
79
92
 
80
93
  ---
@@ -160,11 +173,8 @@ steps:
160
173
  commands:
161
174
  - command: assert
162
175
  expect: The dashboard is displayed
163
-
164
-
165
176
  ```
166
177
 
167
-
168
178
  ---
169
179
 
170
180
  ## Best Practices for Waiting
@@ -183,17 +193,3 @@ steps:
183
193
 
184
194
  5. **Test Incrementally**:
185
195
  - Add waiting commands step-by-step to ensure each part of the workflow is stable.
186
-
187
- ---
188
-
189
- ## Summary of Waiting Features
190
-
191
- | **Feature** | **Description** |
192
- |-----------------------|---------------------------------------------------------------------------------|
193
- | **`wait-for-text`** | Waits for specific text to appear on the screen. |
194
- | **`wait-for-image`** | Waits for a specific image or visual element to appear on the screen. |
195
- | **`redraw` Function** | Automatically waits for UI changes, network stabilization, and screen updates. |
196
-
197
- ---
198
-
199
- By leveraging TestDriver.ai's waiting features, you can create stable and reliable tests that adapt to dynamic environments, reducing flakiness and improving overall test quality.
@@ -1,3 +1,7 @@
1
+ ---
2
+ title: "Comparison"
3
+ icon: "boxing-glove"
4
+ ---
1
5
 
2
6
  ### Application Support
3
7
 
@@ -1,6 +1,7 @@
1
1
  ---
2
2
  title: "FAQ"
3
3
  sidebarTitle: "FAQ"
4
+ icon: "block-question"
4
5
  ---
5
6
 
6
7
 
@@ -1,7 +1,17 @@
1
1
  ---
2
2
  title: "Quickstart"
3
+ description: "Get started with TestDriver.ai in minutes."
4
+ icon: "gauge-max"
3
5
  ---
4
6
 
7
+ <Card
8
+ title="Get the VSCode Extension"
9
+ icon="link"
10
+ href="/getting-started/vscode"
11
+ >
12
+ Turn your IDE into a powerful computer-use automation tool with our VSCode extension.
13
+ </Card>
14
+
5
15
  <Steps>
6
16
 
7
17
  <Step title="Install TestDriver">
@@ -1,6 +1,8 @@
1
1
  ---
2
2
  title: "What is TestDriver?"
3
3
  description: "TestDriver is a computer-use agent for QA testing of user interfaces."
4
+ icon: "circle-info"
5
+ mode: "wide"
4
6
  ---
5
7
 
6
8
  TestDriver uses AI vision and keyboard and mouse control to automate end-to-end testing. TestDriver is `selectorless` meaning it is not aware of the underlying code structure.
@@ -2,10 +2,9 @@
2
2
  title: "Security Features of the TestDriver Action"
3
3
  sidebarTitle: "GitHub Action"
4
4
  description: "Understand the ephemeral VM runners, secrets handling, and environment-specific security for the TestDriver Action."
5
+ icon: "code-pull-request"
5
6
  ---
6
7
 
7
- # TestDriver Action Security
8
-
9
8
  ## Open Source
10
9
  The TestDriver Action is open source, and its source code is available for review. You can find the repository here:
11
10
 
@@ -2,10 +2,9 @@
2
2
  title: "Security Features of the TestDriver Agent"
3
3
  sidebarTitle: "TestDriver Agent "
4
4
  description: "Explore the data collected, persistence, and privacy practices of the TestDriver Agent."
5
+ icon: "robot"
5
6
  ---
6
7
 
7
- # TestDriver Agent Security
8
-
9
8
  ## Source
10
9
  The TestDriver Agent is open-source and available on NPM. You can browse the source code to see all the data collected and understand how everything works.
11
10
 
@@ -2,10 +2,9 @@
2
2
  title: "Security Features of the Dashboard"
3
3
  sidebarTitle: "TestDriver Platform"
4
4
  description: "Learn about the security features of the TestDriver web dashboard, including SSL, OAuth, RBAC, and more."
5
+ icon: "layer-group"
5
6
  ---
6
7
 
7
- # TestDriver Web Dashboard Security
8
-
9
8
  ## Overview
10
9
  The TestDriver web dashboard provides a secure interface for managing and reviewing your tests. Tests executed via the GitHub Action are recorded and reported through Dashcam, another application developed by TestDriver. For more details, refer to the [Dashcam documentation](https://dashcam.docs.testdriver.ai).
11
10
 
package/lib/commander.js CHANGED
@@ -118,6 +118,12 @@ commands:
118
118
  notify(generator.jsonToManual(object, false));
119
119
  response = await commands["hover"](object.x, object.y);
120
120
  break;
121
+ case "drag":
122
+ speak(`dragging mouse`);
123
+ logger.info(generator.jsonToManual(object));
124
+ notify(generator.jsonToManual(object, false));
125
+ response = await commands["drag"](object.x, object.y);
126
+ break;
121
127
  case "hover-text":
122
128
  speak(`searching for ${object.description}`);
123
129
  server.broadcast("status", `searching for ${object.description}`);
package/lib/commands.js CHANGED
@@ -233,7 +233,7 @@ const click = async (x, y, action = "click") => {
233
233
  double = true;
234
234
  }
235
235
 
236
- logger.debug(chalk.dim(`${click} ${button} clicking at ${x}, ${y}...`), true);
236
+ logger.debug(chalk.dim(`${action} ${button} clicking at ${x}, ${y}...`), true);
237
237
 
238
238
  x = parseInt(x);
239
239
  y = parseInt(y);
@@ -276,6 +276,7 @@ const click = async (x, y, action = "click") => {
276
276
  }
277
277
 
278
278
  emitter.emit(events.mouseClick, { x, y, button, click });
279
+
279
280
  }
280
281
 
281
282
  if (!config.TD_VM && platform()== "darwin" && action === "right-click") {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "testdriverai",
3
- "version": "5.3.0",
3
+ "version": "5.3.2",
4
4
  "description": "Next generation autonomous AI agent for end-to-end testing of web & desktop",
5
5
  "main": "index.js",
6
6
  "bin": {
package/test.yml ADDED
@@ -0,0 +1,18 @@
1
+ version: 4
2
+ steps:
3
+ - prompt: Enter Password n stuff
4
+ commands:
5
+ - command: focus-application
6
+ name: Google Chrome
7
+ - command: hover-text
8
+ text: Username
9
+ description: username field
10
+ action: click
11
+ - command: type
12
+ text: ${TD_PASSWORD}
13
+ - command: hover-text
14
+ text: Password
15
+ description: Password field
16
+ action: click
17
+ - command: type
18
+ text: ${TD_PASSWORD}
@@ -0,0 +1,10 @@
1
+ version: 5.3.0
2
+ session: 67fd494ed04f2b16ef43c84e
3
+ steps:
4
+ - prompt: /try navigate to airbnb.com
5
+ commands:
6
+ - command: type
7
+ text: airbnb.com
8
+ - command: press-keys
9
+ keys:
10
+ - enter
@@ -0,0 +1,13 @@
1
+ version: 5.3.0
2
+ session: 67fd4b4fd04f2b16ef43c86d
3
+ steps:
4
+ - prompt: /try navigate to airbnb.com
5
+ commands:
6
+ - command: press-keys
7
+ keys:
8
+ - command
9
+ - space
10
+ - prompt: /try navigate to airbnb.com
11
+ commands:
12
+ - command: focus-application
13
+ name: Google Chrome