testdriverai 5.3.12 → 5.3.14

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 (148) hide show
  1. package/agent.js +21 -18
  2. package/docs/30x30.mdx +1 -1
  3. package/docs/action/secrets.mdx +1 -1
  4. package/docs/commands/assert.mdx +4 -4
  5. package/docs/commands/exec.mdx +33 -23
  6. package/docs/commands/focus-application.mdx +3 -3
  7. package/docs/commands/hover-image.mdx +6 -6
  8. package/docs/commands/hover-text.mdx +3 -3
  9. package/docs/commands/if.mdx +1 -1
  10. package/docs/commands/match-image.mdx +4 -4
  11. package/docs/commands/run.mdx +1 -1
  12. package/docs/commands/scroll-until-image.mdx +6 -3
  13. package/docs/commands/scroll-until-text.mdx +3 -3
  14. package/docs/commands/type.mdx +1 -1
  15. package/docs/commands/wait-for-image.mdx +1 -1
  16. package/docs/commands/wait-for-text.mdx +1 -1
  17. package/docs/docs.json +1 -1
  18. package/docs/features/auto-healing.mdx +1 -1
  19. package/docs/features/cross-platform.mdx +1 -1
  20. package/docs/features/generation.mdx +76 -142
  21. package/docs/features/parallel-testing.mdx +1 -1
  22. package/docs/features/selectorless.mdx +1 -1
  23. package/docs/getting-started/generating.mdx +90 -30
  24. package/docs/getting-started/vscode.mdx +1 -1
  25. package/docs/guide/assertions.mdx +1 -1
  26. package/docs/guide/authentication.mdx +10 -26
  27. package/docs/guide/code.mdx +31 -141
  28. package/docs/guide/lifecycle.mdx +41 -0
  29. package/docs/guide/locating.mdx +1 -1
  30. package/docs/guide/variables.mdx +35 -121
  31. package/docs/guide/waiting.mdx +26 -101
  32. package/docs/interactive/assert.mdx +2 -2
  33. package/docs/interactive/undo.mdx +1 -1
  34. package/docs/overview/what-is-testdriver.mdx +1 -1
  35. package/docs/quickstart.mdx +3 -1
  36. package/docs/security/action.mdx +2 -2
  37. package/docs/security/agent.mdx +4 -4
  38. package/docs/security/platform.mdx +1 -1
  39. package/lib/init.js +0 -1
  40. package/lib/upload-secrets.js +1 -0
  41. package/package.json +3 -3
  42. package/styles/.vale-config/2-MDX.ini +5 -0
  43. package/styles/Microsoft/AMPM.yml +9 -0
  44. package/styles/Microsoft/Accessibility.yml +30 -0
  45. package/styles/Microsoft/Acronyms.yml +64 -0
  46. package/styles/Microsoft/Adverbs.yml +272 -0
  47. package/styles/Microsoft/Auto.yml +11 -0
  48. package/styles/Microsoft/Avoid.yml +14 -0
  49. package/styles/Microsoft/Contractions.yml +50 -0
  50. package/styles/Microsoft/Dashes.yml +13 -0
  51. package/styles/Microsoft/DateFormat.yml +8 -0
  52. package/styles/Microsoft/DateNumbers.yml +40 -0
  53. package/styles/Microsoft/DateOrder.yml +8 -0
  54. package/styles/Microsoft/Ellipses.yml +9 -0
  55. package/styles/Microsoft/FirstPerson.yml +16 -0
  56. package/styles/Microsoft/Foreign.yml +13 -0
  57. package/styles/Microsoft/Gender.yml +8 -0
  58. package/styles/Microsoft/GenderBias.yml +42 -0
  59. package/styles/Microsoft/GeneralURL.yml +11 -0
  60. package/styles/Microsoft/HeadingAcronyms.yml +7 -0
  61. package/styles/Microsoft/HeadingColons.yml +8 -0
  62. package/styles/Microsoft/HeadingPunctuation.yml +13 -0
  63. package/styles/Microsoft/Headings.yml +28 -0
  64. package/styles/Microsoft/Hyphens.yml +14 -0
  65. package/styles/Microsoft/Negative.yml +13 -0
  66. package/styles/Microsoft/Ordinal.yml +13 -0
  67. package/styles/Microsoft/OxfordComma.yml +8 -0
  68. package/styles/Microsoft/Passive.yml +183 -0
  69. package/styles/Microsoft/Percentages.yml +7 -0
  70. package/styles/Microsoft/Plurals.yml +7 -0
  71. package/styles/Microsoft/Quotes.yml +7 -0
  72. package/styles/Microsoft/RangeTime.yml +13 -0
  73. package/styles/Microsoft/Semicolon.yml +8 -0
  74. package/styles/Microsoft/SentenceLength.yml +7 -0
  75. package/styles/Microsoft/Spacing.yml +8 -0
  76. package/styles/Microsoft/Suspended.yml +7 -0
  77. package/styles/Microsoft/Terms.yml +42 -0
  78. package/styles/Microsoft/URLFormat.yml +9 -0
  79. package/styles/Microsoft/Units.yml +16 -0
  80. package/styles/Microsoft/Vocab.yml +25 -0
  81. package/styles/Microsoft/We.yml +11 -0
  82. package/styles/Microsoft/Wordiness.yml +127 -0
  83. package/styles/Microsoft/meta.json +4 -0
  84. package/styles/alex/Ablist.yml +245 -0
  85. package/styles/alex/Condescending.yml +16 -0
  86. package/styles/alex/Gendered.yml +108 -0
  87. package/styles/alex/LGBTQ.yml +55 -0
  88. package/styles/alex/OCD.yml +10 -0
  89. package/styles/alex/Press.yml +11 -0
  90. package/styles/alex/ProfanityLikely.yml +1289 -0
  91. package/styles/alex/ProfanityMaybe.yml +282 -0
  92. package/styles/alex/ProfanityUnlikely.yml +251 -0
  93. package/styles/alex/README.md +27 -0
  94. package/styles/alex/Race.yml +83 -0
  95. package/styles/alex/Suicide.yml +24 -0
  96. package/styles/alex/meta.json +4 -0
  97. package/styles/config/vocabularies/Docs/accept.txt +6 -0
  98. package/styles/proselint/Airlinese.yml +8 -0
  99. package/styles/proselint/AnimalLabels.yml +48 -0
  100. package/styles/proselint/Annotations.yml +9 -0
  101. package/styles/proselint/Apologizing.yml +8 -0
  102. package/styles/proselint/Archaisms.yml +52 -0
  103. package/styles/proselint/But.yml +8 -0
  104. package/styles/proselint/Cliches.yml +782 -0
  105. package/styles/proselint/CorporateSpeak.yml +30 -0
  106. package/styles/proselint/Currency.yml +5 -0
  107. package/styles/proselint/Cursing.yml +15 -0
  108. package/styles/proselint/DateCase.yml +7 -0
  109. package/styles/proselint/DateMidnight.yml +7 -0
  110. package/styles/proselint/DateRedundancy.yml +10 -0
  111. package/styles/proselint/DateSpacing.yml +7 -0
  112. package/styles/proselint/DenizenLabels.yml +52 -0
  113. package/styles/proselint/Diacritical.yml +95 -0
  114. package/styles/proselint/GenderBias.yml +45 -0
  115. package/styles/proselint/GroupTerms.yml +39 -0
  116. package/styles/proselint/Hedging.yml +8 -0
  117. package/styles/proselint/Hyperbole.yml +6 -0
  118. package/styles/proselint/Jargon.yml +11 -0
  119. package/styles/proselint/LGBTOffensive.yml +13 -0
  120. package/styles/proselint/LGBTTerms.yml +15 -0
  121. package/styles/proselint/Malapropisms.yml +8 -0
  122. package/styles/proselint/Needless.yml +358 -0
  123. package/styles/proselint/Nonwords.yml +38 -0
  124. package/styles/proselint/Oxymorons.yml +22 -0
  125. package/styles/proselint/P-Value.yml +6 -0
  126. package/styles/proselint/RASSyndrome.yml +30 -0
  127. package/styles/proselint/README.md +12 -0
  128. package/styles/proselint/Skunked.yml +13 -0
  129. package/styles/proselint/Spelling.yml +17 -0
  130. package/styles/proselint/Typography.yml +11 -0
  131. package/styles/proselint/Uncomparables.yml +50 -0
  132. package/styles/proselint/Very.yml +6 -0
  133. package/styles/proselint/meta.json +17 -0
  134. package/styles/write-good/Cliches.yml +702 -0
  135. package/styles/write-good/E-Prime.yml +32 -0
  136. package/styles/write-good/Illusions.yml +11 -0
  137. package/styles/write-good/Passive.yml +183 -0
  138. package/styles/write-good/README.md +27 -0
  139. package/styles/write-good/So.yml +5 -0
  140. package/styles/write-good/ThereIs.yml +6 -0
  141. package/styles/write-good/TooWordy.yml +221 -0
  142. package/styles/write-good/Weasel.yml +29 -0
  143. package/styles/write-good/meta.json +4 -0
  144. package/testdriver/testdriver_2025-04-17T16-04-30-454Z.yaml +6 -0
  145. package/vale.ini +18 -0
  146. package/docs/guide/setup-teardown.mdx +0 -162
  147. package/docs/reference/interactive/assert.mdx +0 -0
  148. /package/{docs/reference/commands/scroll.mdx → styles/config/vocabularies/Docs/reject.txt} +0 -0
package/agent.js CHANGED
@@ -28,7 +28,6 @@ const path = require("path");
28
28
  const chalk = require("chalk");
29
29
  const yaml = require("js-yaml");
30
30
  const sanitizeFilename = require("sanitize-filename");
31
- const macScreenPerms = require("mac-screen-capture-permissions");
32
31
 
33
32
  // local modules
34
33
  const { server } = require("./lib/ipc.js");
@@ -123,7 +122,7 @@ let getArgs = () => {
123
122
  // turn args[file] into local path
124
123
  if (args[file]) {
125
124
  args[file] = path.join(workingDir, args[file]);
126
- if (!args[file].endsWith(".yaml")) {
125
+ if (!args[file].endsWith(".yaml") && !args[file].endsWith(".yml")) {
127
126
  args[file] += ".yaml";
128
127
  }
129
128
  }
@@ -378,7 +377,7 @@ const runCommand = async (command, depth, shouldSave) => {
378
377
  }
379
378
 
380
379
  if (response && typeof response === "string") {
381
- return await actOnMarkdown(response, depth, true, false);
380
+ return await actOnMarkdown(response, depth, false, false, false);
382
381
  }
383
382
  } catch (error) {
384
383
  return await haveAIResolveError(
@@ -403,6 +402,7 @@ const executeCommands = async (
403
402
  ) => {
404
403
  if (commands?.length) {
405
404
  for (const command of commands) {
405
+
406
406
  if (pushToHistory) {
407
407
  executionHistory[executionHistory.length - 1]?.commands.push(command);
408
408
  }
@@ -738,7 +738,7 @@ const actOnMarkdown = async (
738
738
  depth,
739
739
  pushToHistory = false,
740
740
  dry = false,
741
- shouldSave,
741
+ shouldSave = false,
742
742
  ) => {
743
743
  logger.debug("%j", {
744
744
  message: "actOnMarkdown called",
@@ -771,18 +771,24 @@ const ensureMacScreenPerms = async () => {
771
771
  // if os is mac, check for screen capture permissions
772
772
  if (
773
773
  !config.TD_VM &&
774
- process.platform === "darwin" &&
775
- !macScreenPerms.hasScreenCapturePermission()
774
+ process.platform === "darwin"
776
775
  ) {
777
- logger.info(chalk.red("Screen capture permissions not enabled."));
778
- logger.info(
779
- "You must enable screen capture permissions for the application calling `testdriverai`.",
780
- );
781
- logger.info(
782
- "Read More: https://docs.testdriver.ai/faq/screen-recording-permissions-mac-only",
783
- );
784
- analytics.track("noMacPermissions");
785
- return exit();
776
+
777
+ const macScreenPerms = require("mac-screen-capture-permissions");
778
+ if (!macScreenPerms.hasScreenCapturePermission()) {
779
+
780
+ logger.info(chalk.red("Screen capture permissions not enabled."));
781
+ logger.info(
782
+ "You must enable screen capture permissions for the application calling `testdriverai`.",
783
+ );
784
+ logger.info(
785
+ "Read More: https://docs.testdriver.ai/faq/screen-recording-permissions-mac-only",
786
+ );
787
+ analytics.track("noMacPermissions");
788
+ return exit();
789
+
790
+ }
791
+
786
792
  }
787
793
  };
788
794
 
@@ -1039,9 +1045,6 @@ let save = async ({ filepath = thisFile, silent = false } = {}) => {
1039
1045
  ${regression}
1040
1046
  \`\`\``);
1041
1047
 
1042
- // logger.info(csv.join('\n'))
1043
-
1044
- const fileName = filepath.split("/").pop();
1045
1048
  if (!silent) {
1046
1049
  logger.info(chalk.dim(`saved as ${filepath}`));
1047
1050
  }
package/docs/30x30.mdx CHANGED
@@ -75,7 +75,7 @@ For more details, see the [Contract Details](#contract-details).
75
75
  - **Payment**: A payment method is required to begin the trial.
76
76
  - **Renewal**: The contract renews monthly.
77
77
  - **Cancellation**: Cancel anytime, for any reason.
78
- - **Credits**: Unused credits do not roll over and expire at the end of each month.
78
+ - **Credits**: Unused credits don't roll over and expire at the end of each month.
79
79
  - **Additional Usage**: Additional usage is billed at standard rates.
80
80
 
81
81
  ---
@@ -6,7 +6,7 @@ icon: "mask"
6
6
  ---
7
7
 
8
8
  ## Overview
9
- When using TestDriver to test your application, you may need to securely store and use sensitive information such as usernames, passwords, API keys, or other secrets. GitHub Actions provides a secure way to manage these secrets, ensuring they are not exposed in your test files or logs.
9
+ When using TestDriver to test your application, you may need to securely store and use sensitive information such as usernames, passwords, API keys, or other secrets. GitHub Actions provides a secure way to manage these secrets, ensuring they aren't exposed in your test files or logs.
10
10
 
11
11
  ---
12
12
 
@@ -4,7 +4,7 @@ icon: "check"
4
4
  ---
5
5
 
6
6
  ## Description
7
- The `assert` command is used to validate that a specific condition is true. It ensures that a task was completed successfully by checking the screen for the expected outcome. If the condition is not met, the test will fail.
7
+ The `assert` command validates that a specific condition is true. It ensures that a task completed successfully by checking the screen for the expected outcome. If the condition isn't met, the test will fail.
8
8
 
9
9
  ## Arguments
10
10
  | Argument | Type | Description |
@@ -12,7 +12,8 @@ The `assert` command is used to validate that a specific condition is true. It e
12
12
  | `expect` | `string` | The condition to check. This should describe what you expect to see on the screen. |
13
13
  | `async` | `boolean` | (Optional) If set to `true`, the test will continue without waiting for the assertion to pass. Default is `false`. |
14
14
 
15
- ## Example Usage
15
+ ## Example usage
16
+
16
17
  ```yaml
17
18
  command: assert
18
19
  expect: the video is playing
@@ -27,6 +28,5 @@ async: true
27
28
  ```
28
29
 
29
30
  ## Notes
30
- - Use `async: true` to speed up tests by allowing non-blocking assertions. However, the test will still fail if the condition is not met.
31
- - Assertions should be used sparingly, as too many can slow down the test execution.
31
+ - Use `async: true` to speed up tests by allowing non-blocking assertions. However, the test will still fail if the condition isn't met.
32
32
  - Ensure the `expect` string clearly describes the condition to avoid ambiguity.
@@ -9,35 +9,45 @@ The `exec` command allows you to execute custom NodeJS scripts within your TestD
9
9
  ## Arguments
10
10
  | Argument | Type | Description |
11
11
  |------------|-----------|-----------------------------------------------------------------------------|
12
- | `js` | `string` | The NodeJS script to execute. The script must define the output as `result`. |
12
+ | `lang` | `string` | The language of the script to execute. Supported values are `shell` and `js`. |
13
13
  | `output` | `string` | The variable name to store the result of the script. This variable can be accessed as `${OUTPUT.<var>}` in future steps. |
14
+ | `linux` | `string` | The script to execute on Linux systems. For `js`, the script must define the output as `result`. |
15
+ | `windows` | `string` | The script to execute on Windows systems. For `js`, the script must define the output as `result`. |
16
+ | `mac` | `string` | The script to execute on macOS systems. For `js`, the script must define the output as `result`. |
14
17
 
15
18
  ## Example Usage
19
+
20
+ This example demonstrates how to use the `exec` command to generate a TOTP (Time-based One-Time Password) using the `totp-generator` library.
21
+
16
22
  ```yaml
17
- version: 5.1.0
18
- session: 67e57d614dc25283aa0872a9
23
+ version: 5.3.8
19
24
  steps:
20
- - prompt: Log in with the totp
21
- commands:
22
- - command: exec
23
- output: totp
24
- js: |
25
- const { TOTP } = require("totp-generator");
26
- let otp = TOTP.generate("JBSWY3DPEB3W64TMMQQQ").otp;
27
- result = otp;
28
- - command: type
29
- text: ${OUTPUT.totp}
25
+ - commands:
26
+ - command: exec
27
+ lang: shell
28
+ linux: |
29
+ npm install totp-generator
30
+ - command: exec
31
+ lang: js
32
+ output: totp
33
+ linux: |
34
+ const { TOTP } = require("totp-generator");
35
+ let otp = TOTP.generate("JBSWY3DPEB3W64TMMQQQ").otp;
36
+ console.log(otp);
37
+ result = otp;
38
+ - command: type
39
+ text: ${OUTPUT.totp}
30
40
  ```
31
41
 
32
- ## Protips
33
- - Do not overwrite the `result` variable in your script, as it is used to store the output.
34
- - Ensure that all required NPM packages are installed locally using `npm install`. If using GitHub Actions, include the installation in the `prerun` step.
35
- - NodeJS code executes in the same context as the calling process on the host machine, using the [VM](https://nodejs.org/api/vm.html) module internally.
42
+ ## Additional Details
36
43
 
37
- ## Gotchas
38
- - This command is only supported on hosted Windows runners. Hosted Linux runners do not yet support the `prerun` step.
39
- - Ensure your NodeJS environment is properly configured with all necessary dependencies.
44
+ - The `exec` command now takes a `lang` argument and supports different operating systems (`linux`, `mac`, and `windows`).
45
+ - Supported `lang` values are `js` or `shell`:
46
+ - `js` code is executed in a NodeJS VM on the host machine (your computer).
47
+ - `shell` code is executed in the shell on the runner.
48
+ - Code specified in `linux`, `mac`, and `windows` is executed based on the platform of the runner machine.
40
49
 
41
- ## Notes
42
- - The `exec` command is available starting from TestDriver.ai version `5.1.0`.
43
- - Use this command to integrate custom logic or external libraries into your tests.
50
+ ## Protips
51
+
52
+ - Overwrite the `result` variable in your script, as it is used to store the output.
53
+ - NodeJS code executes in the same context as the calling process on the host machine, using the [VM](https://nodejs.org/api/vm.html) module internally.
@@ -4,7 +4,7 @@ icon: "window-restore"
4
4
  ---
5
5
 
6
6
  ## Description
7
- The `focus-application` command is used to bring a specific application window to the foreground. This ensures that subsequent commands interact with the correct application during a test.
7
+ The `focus-application` command brings a specific application window to the foreground. This ensures that subsequent commands interact with the correct application during a test.
8
8
 
9
9
  ## Arguments
10
10
  | Argument | Type | Description |
@@ -22,9 +22,9 @@ name: Google Chrome
22
22
  - Use this command at the start of a test or before interacting with an application to avoid focus-related issues.
23
23
 
24
24
  ## Gotchas
25
- - If the specified application is not running, the command will fail. Ensure the application is open before using this command.
25
+ - If the specified application isn't running, the command will fail. Ensure the application is open before using this command.
26
26
  - On macOS, the application name is case-sensitive.
27
27
 
28
28
  ## Notes
29
29
  - The `focus-application` command is useful for multi-application workflows where you need to switch between different apps during a test.
30
- - This command is supported on both Windows and macOS environments.
30
+ - Supported on both Windows and macOS environments.
@@ -4,14 +4,17 @@ icon: "image"
4
4
  ---
5
5
 
6
6
  ## Description
7
+
7
8
  The `hover-image` command is used to locate an image on the screen based on a description and perform an action on it. This can include hovering, clicking, right-clicking, or double-clicking the image.
8
9
 
9
10
  ## Arguments
10
11
  | Argument | Type | Description |
11
12
  |---------------|----------|-----------------------------------------------------------------------------|
12
- | `description` | `string` | A description of the image and what it represents. Do not include the image itself here. |
13
+ | `description` | `string` | A description of the image and what it represents. Don't include the image itself here. |
13
14
  | `action` | `string` | The action to take when the image is found. Available actions are: `click`, `right-click`, `double-click`, `hover`. |
14
15
 
16
+ The `hover-image` command is useful for interacting with visual elements that can't be identified using text-based selectors.
17
+
15
18
  ## Example Usage
16
19
  ```yaml
17
20
  command: hover-image
@@ -22,12 +25,9 @@ action: click
22
25
  ## Protips
23
26
  - Use clear and concise descriptions for the image to improve detection accuracy.
24
27
  - Ensure the action specified matches the intended interaction with the image.
25
- - If the hover-image command fails to locate an image based on the provided description, consider using the match-image command instead. The match-image command is specifically designed for scenarios where precise image matching is required, such as when the visual element cannot be reliably described with text. It works by directly comparing the image on the screen with a reference image file.
28
+ - If the hover-image command fails to locate an image based on the provided description, consider using the match-image command instead. The match-image command is specifically designed for scenarios where precise image matching is required, such as when the visual element can't be reliably described with text. It works by directly comparing the image on the screen with a reference image file.
26
29
 
27
30
  ## Gotchas
28
- - If the image cannot be located based on the description, the command will fail.
31
+ - If the image can't be located based on the description, the command will fail.
29
32
  - Ensure the screen resolution and scaling settings are consistent to avoid detection issues.
30
33
 
31
- ## Notes
32
- - The `hover-image` command is useful for interacting with visual elements that cannot be identified using text-based selectors.
33
- - Supported actions allow flexibility in how the image is interacted with during the test.
@@ -10,7 +10,7 @@ The `hover-text` command is used to locate text on the screen based on a descrip
10
10
  | Argument | Type | Description |
11
11
  |---------------|----------|-----------------------------------------------------------------------------|
12
12
  | `text` | `string` | The text to find on the screen. The longer and more unique, the better. |
13
- | `description` | `string` | A description of the text and what it represents. The actual text itself should not be included here. |
13
+ | `description` | `string` | A description of the text and what it represents. The actual text itself shouldn't be included here. |
14
14
  | `action` | `string` | The action to take when the text is found. Available actions are: `click`, `right-click`, `double-click`, `hover`. |
15
15
  | `method` | `enum` | The matching algorithm to use. Possible values are `turbo` (default) and `ai`. |
16
16
 
@@ -30,9 +30,9 @@ action: click
30
30
  - Ensure the action specified matches the intended interaction with the text.
31
31
 
32
32
  ## Gotchas
33
- - If the text cannot be located, the command will fail. Ensure the text is visible on the screen and matches exactly.
33
+ - If the text can't be located, the command will fail. Ensure the text is visible on the screen and matches exactly.
34
34
  - Variations in font size, style, or screen resolution may affect detection accuracy.
35
35
 
36
36
  ## Notes
37
- - The `hover-text` command is ideal for interacting with textual elements that cannot be identified using other selectors.
37
+ - The `hover-text` command is ideal for interacting with textual elements that can't be identified using other selectors.
38
38
  - Supported actions allow flexibility in how the text is interacted with during the test.
@@ -35,7 +35,7 @@ else:
35
35
  - Combine the `if` command with other commands like `hover-text` or `focus-application` to create dynamic workflows.
36
36
 
37
37
  ## Gotchas
38
- - If the `condition` is invalid or cannot be evaluated, the command will fail.
38
+ - If the `condition` is invalid or can't be evaluated, the command will fail.
39
39
  - Ensure all commands in the `then` and `else` blocks are valid and properly formatted.
40
40
 
41
41
  ## Notes
@@ -4,12 +4,12 @@ icon: "images"
4
4
  ---
5
5
 
6
6
  ## Description
7
- The `match-image` command is used to locate an image on the screen by matching it with a reference image file and performing an action (e.g., click or hover) at its center. This command is particularly useful for interacting with elements that the AI has difficulty locating using descriptions or other methods.
7
+ The `match-image` command is used to locate an image on the screen by matching it with a reference image file and performing an action (For example, click or hover) at its center. This command is particularly useful for interacting with elements that the AI has difficulty locating using descriptions or other methods.
8
8
 
9
9
  ## Arguments
10
10
  | Argument | Type | Description |
11
11
  |----------------|----------|-----------------------------------------------------------------------------|
12
- | `path` | `string` | The relative path to the image file that needs to be matched on the screen. Do not include `testdriver/screenshots/*/` in the path. |
12
+ | `path` | `string` | The relative path to the image file that needs to be matched on the screen. don't include `testdriver/screenshots/*/` in the path. |
13
13
  | `action` | `string` | The action to perform when the image is found. Available actions are: `click` or `hover`. The action will be performed at the center of the matched image. |
14
14
 
15
15
  ## Example Usage
@@ -27,7 +27,7 @@ action: click
27
27
  ## Protips
28
28
  - To create high-quality screenshots for matching:
29
29
  - Download the video of the test and open it at "full" or "actual" size on your computer.
30
- - Use a screenshot tool like Cleanshot X to capture the target element.
30
+ - Use a screenshot tool (like Cleanshot X) to capture the target element.
31
31
  - Center the clickable element as much as possible within the screenshot.
32
32
  - Ensure the image file is clear and free of unnecessary visual noise to improve matching accuracy.
33
33
 
@@ -37,6 +37,6 @@ action: click
37
37
  - Ensure the image file is stored in the correct directory structure (`testdriver/screenshots/(mac/linux/windows)/`) for dynamic resolution.
38
38
 
39
39
  ## Notes
40
- - The `match-image` command is ideal for interacting with visual elements that cannot be reliably described or located using other commands like `hover-image`.
40
+ - The `match-image` command is ideal for interacting with visual elements that can't be reliably described or located using other commands like `hover-image`.
41
41
  - This command supports flexible scaling to account for minor differences in image size or resolution.
42
42
  - Use this command as a fallback when other methods fail to locate the desired element.
@@ -22,7 +22,7 @@ file: path/to/another-script.yaml
22
22
  - Ensure the file path is correct and relative to the root of your git repository to avoid errors.
23
23
 
24
24
  ## Gotchas
25
- - If the specified file does not exist or contains errors, the command will fail.
25
+ - If the specified file doesn't exist or contains errors, the command will fail.
26
26
  - Ensure the embedded file is compatible with the current script's context, such as variable dependencies or session requirements.
27
27
 
28
28
  ## Notes
@@ -4,9 +4,11 @@ icon: "scroll"
4
4
  ---
5
5
 
6
6
  ## Description
7
- The `scroll-until-image` command is used to scroll the screen in a specified direction until an image matching the given description is found. This is useful for navigating to visual elements that are not initially visible on the screen.
7
+
8
+ The `scroll-until-image` command is used to scroll the screen in a specified direction until an image matching the given description is found. This is useful for navigating to visual elements that aren't initially visible on the screen.
8
9
 
9
10
  ## Arguments
11
+
10
12
  | Argument | Type | Description |
11
13
  |---------------|----------|-----------------------------------------------------------------------------|
12
14
  | `description` | `string` | A description of the image and what it represents. |
@@ -14,6 +16,7 @@ The `scroll-until-image` command is used to scroll the screen in a specified dir
14
16
  | `distance` | `number` | (Optional) The maximum number of pixels to scroll before giving up. Default is `1200`. |
15
17
 
16
18
  ## Example Usage
19
+
17
20
  ```yaml
18
21
  command: scroll-until-image
19
22
  description: Submit at the bottom of the form
@@ -26,9 +29,9 @@ direction: down
26
29
  - Combine this command with other commands like `hover-image` or `match-image` to interact with the located image.
27
30
 
28
31
  ## Gotchas
29
- - If the image cannot be located within the specified `distance`, the command will fail.
32
+ - If the image can't be located within the specified `distance`, the command will fail.
30
33
  - Ensure the description accurately represents the image to avoid detection issues.
31
34
 
32
35
  ## Notes
33
- - The `scroll-until-image` command is ideal for navigating to visual elements that are off-screen and cannot be located using text-based commands.
36
+ - The `scroll-until-image` command is ideal for navigating to visual elements that are off-screen and can't be located using text-based commands.
34
37
  - This command supports both vertical and horizontal scrolling for flexible navigation.
@@ -4,7 +4,7 @@ icon: "scroll"
4
4
  ---
5
5
 
6
6
  ## Description
7
- The `scroll-until-text` command is used to scroll the screen in a specified direction until the specified text is found. This is useful for navigating to elements that are not initially visible on the screen.
7
+ The `scroll-until-text` command is used to scroll the screen in a specified direction until the specified text is found. This is useful for navigating to elements that aren't initially visible on the screen.
8
8
 
9
9
  ## Arguments
10
10
  | Argument | Type | Description |
@@ -29,10 +29,10 @@ direction: down
29
29
  - Adjust the `distance` value to control how far the command scrolls before giving up.
30
30
 
31
31
  ## Gotchas
32
- - If the text cannot be located within the specified `distance`, the command will fail.
32
+ - If the text can't be located within the specified `distance`, the command will fail.
33
33
  - Ensure the text is visible and matches exactly, as variations in font size, style, or screen resolution may affect detection accuracy.
34
34
 
35
35
  ## Notes
36
- - The `scroll-until-text` command is ideal for navigating to elements that are off-screen and cannot be located using other commands.
36
+ - The `scroll-until-text` command is ideal for navigating to elements that are off-screen and can't be located using other commands.
37
37
  - This command supports both vertical and horizontal scrolling for flexible navigation.
38
38
 
@@ -22,7 +22,7 @@ text: Hello World
22
22
  - Ensure the target application or input field is in focus before using the `type` command to avoid unexpected behavior.
23
23
 
24
24
  ## Gotchas
25
- - If the input field is not active or in focus, the text may not be typed correctly.
25
+ - If the input field isn't active or in focus, the text may not be typed correctly.
26
26
  - Special characters in the `text` string may require additional handling depending on the application.
27
27
 
28
28
  ## Notes
@@ -24,7 +24,7 @@ timeout: 5000
24
24
  - Adjust the `timeout` value based on the expected load time of the image to avoid unnecessary delays.
25
25
 
26
26
  ## Gotchas
27
- - If the image does not appear within the specified `timeout`, the command will fail.
27
+ - If the image doesn't appear within the specified `timeout`, the command will fail.
28
28
  - Ensure the description accurately represents the image to avoid detection issues.
29
29
 
30
30
  ## Notes
@@ -28,7 +28,7 @@ timeout: 5000
28
28
  - Adjust the `timeout` value based on the expected load time of the text to avoid unnecessary delays.
29
29
 
30
30
  ## Gotchas
31
- - If the text does not appear within the specified `timeout`, the command will fail.
31
+ - If the text doesn't appear within the specified `timeout`, the command will fail.
32
32
  - Ensure the text matches exactly, as variations in font size, style, or screen resolution may affect detection accuracy.
33
33
 
34
34
  ## Notes
package/docs/docs.json CHANGED
@@ -43,7 +43,7 @@
43
43
  "/guide/assertions",
44
44
  "/guide/variables",
45
45
  "/guide/authentication",
46
- "/guide/setup-teardown",
46
+ "/guide/lifecycle",
47
47
  "/guide/code"
48
48
  ]
49
49
  },
@@ -7,7 +7,7 @@ icon: "bandage"
7
7
 
8
8
  Auto-healing is a powerful feature in TestDriver.ai that ensures your tests remain resilient even when the application under test changes.
9
9
 
10
- When TestDriver steps fail, the AI will progressively fall back to attemp to complete the test.
10
+ When TestDriver steps fail, the AI will progressively fall back to attempt to complete the test.
11
11
 
12
12
  If running on CI, TestDriver will open a pull request (PR) with the updated test, ensuring your test suite stays up-to-date with minimal manual intervention.
13
13
 
@@ -80,7 +80,7 @@ TestDriver.ai uses **selectorless testing**, meaning tests are written in a gene
80
80
  ### Benefits of Selectorless Testing
81
81
 
82
82
  - **Reduced Maintenance**: No need to update selectors when UI changes.
83
- - **Cross-Platform Compatibility**: Tests are not tied to platform-specific configurations.
83
+ - **Cross-Platform Compatibility**: Tests aren't tied to platform-specific configurations.
84
84
  - **Ease of Use**: Write high-level, natural language prompts, and let TestDriver handle the rest.
85
85
 
86
86
  ### Example Test