testdriverai 5.6.3 → 5.6.4

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 (97) hide show
  1. package/agent.js +1 -1
  2. package/docs/account/dashboard.mdx +3 -6
  3. package/docs/account/enterprise.mdx +16 -15
  4. package/docs/account/pricing.mdx +4 -4
  5. package/docs/account/projects.mdx +2 -2
  6. package/docs/account/team.mdx +3 -3
  7. package/docs/action/browser.mdx +9 -9
  8. package/docs/action/os.mdx +12 -12
  9. package/docs/action/output.mdx +10 -10
  10. package/docs/action/performance.mdx +11 -11
  11. package/docs/{guide/lifecycle.mdx → action/pre-post-scripts.mdx} +87 -69
  12. package/docs/action/secrets.mdx +11 -11
  13. package/docs/action/setup.mdx +8 -8
  14. package/docs/apps/chrome-extensions.mdx +9 -9
  15. package/docs/apps/desktop-apps.mdx +6 -5
  16. package/docs/apps/mobile-apps.mdx +3 -3
  17. package/docs/apps/static-websites.mdx +2 -3
  18. package/docs/bugs/jira.mdx +16 -16
  19. package/docs/cli/overview.mdx +8 -8
  20. package/docs/commands/exec.mdx +152 -10
  21. package/docs/commands/focus-application.mdx +1 -1
  22. package/docs/commands/hover-image.mdx +1 -1
  23. package/docs/commands/hover-text.mdx +2 -2
  24. package/docs/commands/if.mdx +1 -1
  25. package/docs/commands/issues.mdx +8 -6
  26. package/docs/commands/match-image.mdx +2 -2
  27. package/docs/commands/press-keys.mdx +19 -2
  28. package/docs/commands/run.mdx +1 -1
  29. package/docs/commands/scroll-until-image.mdx +1 -1
  30. package/docs/commands/scroll-until-text.mdx +2 -2
  31. package/docs/commands/scroll.mdx +2 -2
  32. package/docs/commands/type.mdx +1 -1
  33. package/docs/commands/wait-for-image.mdx +1 -1
  34. package/docs/commands/wait-for-text.mdx +1 -1
  35. package/docs/commands/wait.mdx +1 -1
  36. package/docs/docs.json +9 -9
  37. package/docs/exporting/playwright.mdx +16 -16
  38. package/docs/features/auto-healing.mdx +5 -5
  39. package/docs/features/cross-platform.mdx +4 -4
  40. package/docs/features/generation.mdx +7 -4
  41. package/docs/features/github.mdx +21 -21
  42. package/docs/features/parallel-testing.mdx +9 -9
  43. package/docs/features/reusable-snippets.mdx +7 -7
  44. package/docs/features/selectorless.mdx +4 -4
  45. package/docs/features/visual-assertions.mdx +26 -23
  46. package/docs/getting-started/ci.mdx +19 -19
  47. package/docs/getting-started/editing.mdx +12 -8
  48. package/docs/getting-started/generating.mdx +4 -5
  49. package/docs/getting-started/running.mdx +3 -3
  50. package/docs/getting-started/setup.mdx +9 -9
  51. package/docs/getting-started/vscode.mdx +63 -85
  52. package/docs/getting-started/writing.mdx +11 -7
  53. package/docs/guide/assertions.mdx +21 -21
  54. package/docs/guide/authentication.mdx +11 -11
  55. package/docs/guide/code.mdx +6 -6
  56. package/docs/guide/environment-variables.mdx +9 -9
  57. package/docs/guide/lifecycle-prerun.mdx +191 -0
  58. package/docs/guide/locating.mdx +15 -18
  59. package/docs/guide/variables.mdx +8 -8
  60. package/docs/guide/waiting.mdx +10 -10
  61. package/docs/importing/csv.mdx +23 -24
  62. package/docs/importing/gherkin.mdx +20 -20
  63. package/docs/importing/jira.mdx +22 -23
  64. package/docs/importing/testrail.mdx +17 -17
  65. package/docs/integrations/electron.mdx +7 -7
  66. package/docs/integrations/netlify.mdx +7 -7
  67. package/docs/integrations/vercel.mdx +13 -13
  68. package/docs/interactive/assert.mdx +3 -3
  69. package/docs/interactive/dry.mdx +7 -7
  70. package/docs/interactive/explore.mdx +9 -9
  71. package/docs/interactive/generate.mdx +2 -2
  72. package/docs/interactive/run.mdx +10 -10
  73. package/docs/interactive/save.mdx +3 -3
  74. package/docs/interactive/undo.mdx +1 -1
  75. package/docs/overview/comparison.mdx +6 -6
  76. package/docs/overview/faq.mdx +2 -2
  77. package/docs/overview/quickstart.mdx +1 -1
  78. package/docs/overview/upgrading.mdx +8 -4
  79. package/docs/overview/what-is-testdriver.mdx +6 -6
  80. package/docs/quickstart.mdx +1 -1
  81. package/docs/scenarios/ai-chatbot.mdx +3 -3
  82. package/docs/scenarios/cookie-banner.mdx +2 -2
  83. package/docs/scenarios/file-upload.mdx +2 -2
  84. package/docs/scenarios/form-filling.mdx +3 -3
  85. package/docs/scenarios/log-in.mdx +3 -3
  86. package/docs/scenarios/pdf-generation.mdx +3 -3
  87. package/docs/scenarios/spell-check.mdx +2 -2
  88. package/docs/security/action.mdx +6 -6
  89. package/docs/security/agent.mdx +10 -10
  90. package/docs/security/platform.mdx +10 -8
  91. package/docs/snippets/test-prereqs.mdx +1 -1
  92. package/docs/snippets/yml-warning.mdx +1 -0
  93. package/docs/tutorials/advanced-test.mdx +9 -9
  94. package/docs/tutorials/basic-test.mdx +3 -3
  95. package/package.json +1 -1
  96. package/styles/config/vocabularies/Docs/accept.txt +32 -4
  97. package/docs/action/prerun.mdx +0 -137
@@ -5,7 +5,7 @@ sidebarTitle: "Basic Test"
5
5
  icon: "test-tube"
6
6
  ---
7
7
 
8
- # Basic Test Tutorial
8
+ # Basic test tutorial
9
9
 
10
10
  This tutorial will guide you through the process of creating and running a basic test using TestDriver.
11
11
 
@@ -15,7 +15,7 @@ Before you begin, ensure you have the following:
15
15
  - TestDriver installed on your system.
16
16
  - Basic understanding of how TestDriver works.
17
17
 
18
- ## Step 1: Create a Test
18
+ ## Step 1: Create a test
19
19
 
20
20
  To create a test, follow these steps:
21
21
  1. Open your code editor.
@@ -28,7 +28,7 @@ Example:
28
28
 
29
29
  ```
30
30
 
31
- ## Step 2: Run the Test
31
+ ## Step 2: Run the test
32
32
 
33
33
  To run the test, use the following command:
34
34
  ```bash
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "testdriverai",
3
- "version": "5.6.3",
3
+ "version": "5.6.4",
4
4
  "description": "Next generation autonomous AI agent for end-to-end testing of web & desktop",
5
5
  "main": "index.js",
6
6
  "bin": {
@@ -1,19 +1,47 @@
1
1
  testdriverai
2
+ TestDriver
2
3
  (?i)npm
4
+ (?i)csv
3
5
  Sonoma
4
6
  [Pp]rerun
5
7
  Protip
6
8
  Protips
7
9
  VS Code
8
10
  VSIX
9
- OAuth[2]?
11
+ OAuth2?
10
12
  Dashcam
11
13
  VM[s]?
12
- [Cc]hatbot[s]?
14
+ OCR
15
+ [Cc]hatbot|s
13
16
  [Ss]electorless
14
17
  [Ww]alkthrough
15
18
  [Ss]ignup
16
- (?i)PDF
19
+ (?i)PDF|s
17
20
  Vercel
18
21
  Netlify
19
- [Jj]ira
22
+ [Jj]ira
23
+ RBAC
24
+ SSL
25
+ GitHub Action|s
26
+ GitHub
27
+ [Vv]iewport
28
+ TestRail
29
+ YAML
30
+ Gherkin
31
+ Arc Browser
32
+ Touchpoint
33
+ [Hh]ardcod|ed|ing
34
+ [Ff]ullscreen
35
+ AJAX
36
+ [Tt]eardown
37
+ validator
38
+ OTP[s]?
39
+ Reusability
40
+ [Aa]sync
41
+ XPath
42
+ [Aa]uto-heal|ed|ing
43
+ [Oo]nboarding
44
+ Webkit
45
+ [Rr]ollout
46
+ [Bb]ackend
47
+ Cleanshot
@@ -1,137 +0,0 @@
1
- ---
2
- title: "Prerun Scripts"
3
- sidebarTitle: "Prerun Scripts"
4
- description: "Learn how to customize and set up your TestDriver environment to optimize your CI/CD pipeline."
5
- icon: "terminal"
6
- ---
7
-
8
- ## Overview
9
- Prerun scripts are commands executed on a TestDriver virtual machine (VM) before each test in a CI/CD pipeline. They are used to prepare the environment by provisioning the VM, installing dependencies, configuring settings, or building the application. This ensures a consistent and reproducible environment for every test execution.
10
-
11
- By using prerun scripts, you can:
12
- - Speed up test setup.
13
- - Prevent test failures caused by inconsistent environments.
14
- - Promote reproducible builds for reliable test results.
15
-
16
- ---
17
-
18
- ## Use Cases
19
- Prerun scripts are ideal for:
20
- - Installing necessary dependencies (e.g., browsers, libraries, or tools).
21
- - Building your application or running setup scripts.
22
- - Configuring the VM to match specific test requirements.
23
- - Preparing staging environments or accessing private resources.
24
-
25
- ---
26
-
27
- ## Example: Installing Arc Browser
28
- The following example demonstrates how to use a prerun script to download and install the Arc Browser on a Windows VM before running tests.
29
-
30
- ```yaml
31
- # permissions and other setup here
32
-
33
- jobs:
34
- test:
35
- name: "TestDriver"
36
- runs-on: ubuntu-latest
37
- steps:
38
- # Use the TestDriver GitHub Action
39
- - uses: testdriverai/action@main
40
- with:
41
- prerun: |
42
- # Get the IPv6 address of the VM
43
- Get-NetIPAddress -AddressFamily IPv6
44
- # URL for the Arc browser installer
45
- $installerUrl = "https://releases.arc.net/windows/ArcInstaller.exe"
46
- # Location to save the installer
47
- $installerPath = "$env:USERPROFILE\Downloads\ArcInstaller.exe"
48
- # Download the Arc browser installer
49
- Write-Host "Downloading Arc browser installer..."
50
- Invoke-WebRequest -Uri $installerUrl -OutFile $installerPath
51
- # Check if the download was successful
52
- if (Test-Path $installerPath) {
53
- Write-Host "Download successful. Running the installer..."
54
- Start-Process -FilePath $installerPath -ArgumentList '/silent' -Wait
55
- Start-Sleep -Seconds 10
56
- } else {
57
- Write-Host "Failed to download the Arc browser installer."
58
- }
59
- ```
60
-
61
- ## Example: Loading a Calculator App on Linux, Mac or Windows
62
- ```yaml
63
- version: 5.5.5
64
- session: 67f00511acbd9ccac373edf7
65
- steps:
66
- - prompt: launch a calculator
67
- commands:
68
- - command: exec
69
- lang: shell
70
- linux: |
71
- linux: |
72
- jumpapp /usr/bin/galculator > /dev/null 2>&1 &
73
- exit
74
- mac: |
75
- open "/Applications/Calculator.app"
76
- wait
77
- windows:
78
- start /B calc.exe
79
- timeout /t 5
80
- - command: wait-for-text
81
- text: "galculator"
82
- timeout: 30000
83
- ```
84
-
85
- ---
86
-
87
- ## Key Points
88
- - **Provisioning**: Prerun scripts allow you to provision the VM with the necessary tools and configurations before running tests.
89
- - **Reproducibility**: By ensuring a consistent environment, prerun scripts help prevent flaky tests caused by environmental differences.
90
- - **Flexibility**: You can use prerun scripts to customize the VM for specific test scenarios, such as installing alternative browsers or setting up staging environments.
91
-
92
- ---
93
-
94
- ## Best Practices
95
- - **Keep It Simple**: Write clear and concise prerun scripts to minimize setup time and reduce complexity.
96
- - **Error Handling**: Include checks to verify that dependencies are installed successfully. Log errors to help debug issues.
97
- - **Optimize Performance**: Cache dependencies or use lightweight tools to speed up the setup process.
98
- - **Security**: Avoid hardcoding sensitive information in prerun scripts. Use GitHub secrets to securely pass credentials or tokens.
99
-
100
- ---
101
-
102
- ## A Note on the Default Prerun Script
103
- When setting up your TestDriver environment, a default prerun script is automatically generated. This script includes essential commands to ensure your VM is ready for testing. You can customize this script to suit your specific needs, but it's important to understand that it serves as a baseline for your test environment. It looks like this:
104
-
105
- ```yaml
106
- version: 5.1.1
107
- session: 67f00511acbd9ccac373edf7
108
- steps:
109
- - prompt: launch chrome
110
- commands:
111
- - command: exec
112
- lang: shell
113
- linux: |
114
- jumpapp google-chrome --disable-fre --no-default-browser-check --no-first-run "${TD_WEBSITE}" &
115
- exit
116
- mac: |
117
- open -na "Google Chrome" --args --disable-fre --no-default-browser-check --no-first-run --disable-features=PasswordManagerEnabled "${TD_WEBSITE}" &
118
- exit
119
- windows:
120
- Start-Process "C:/Program Files/Google/Chrome/Application/chrome.exe" -ArgumentList "--start-maximized", "${TD_WEBSITE}"
121
- exit
122
- - command: wait-for-text
123
- text: "Google Chrome"
124
- timeout: 30000
125
- ```
126
-
127
- Take note that it defaults to launching the Chrome browser. If you want to use a different browser, you can modify the `prompt` and `commands` sections accordingly.
128
-
129
- <Warning>
130
- The `wait-For-text` command is crucial for ensuring that the browser is fully loaded before proceeding with the test steps. If you are testing a webapplication, you may want to adjust the `text` parameter to match the expected title or content of the page.
131
- </Warning>
132
-
133
-
134
- ## Notes
135
- - Prerun scripts are executed on the VM before the test suite begins.
136
- - They are essential for ensuring a consistent and reliable test environment.
137
- - For advanced workflows, combine prerun scripts with TestDriver prompts to create dynamic and flexible test setups.