testdriverai 7.3.1 → 7.3.3

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 (362) hide show
  1. package/.claude/settings.local.json +7 -0
  2. package/.env.example +4 -0
  3. package/.github/workflows/acceptance-linux-scheduled.yaml +45 -0
  4. package/.github/workflows/acceptance-windows-scheduled.yaml +54 -0
  5. package/.github/workflows/acceptance.yaml +106 -0
  6. package/.github/workflows/publish.yaml +75 -0
  7. package/.github/workflows/test-init.yml +157 -0
  8. package/.github/workflows/testdriver.yml +170 -0
  9. package/.github/workflows/windows-self-hosted.yaml +82 -0
  10. package/.prettierignore +4 -0
  11. package/.prettierrc +1 -0
  12. package/CHANGELOG.md +158 -0
  13. package/SKILLs.md +17 -0
  14. package/agent/index.js +32 -3
  15. package/ai/.claude-plugin/plugin.json +9 -0
  16. package/docs/GITHUB_COMMENTS.md +330 -0
  17. package/docs/GITHUB_COMMENTS_ANNOUNCEMENT.md +167 -0
  18. package/docs/QUICK-START-GITHUB-COMMENTS.md +84 -0
  19. package/docs/TEST-GITHUB-COMMENTS.md +129 -0
  20. package/docs/_scripts/generate-skills.js +149 -0
  21. package/docs/_scripts/link-replacer.js +164 -0
  22. package/docs/_scripts/upload-docs-to-openai.js +284 -0
  23. package/docs/claude-mcp-plugin.mdx +160 -0
  24. package/docs/docs.json +394 -0
  25. package/docs/github-integration-setup.md +266 -0
  26. package/docs/guide/best-practices-polling.mdx +154 -0
  27. package/docs/images/content/account/newprojectsettings.png +0 -0
  28. package/docs/images/content/account/projectpage.png +0 -0
  29. package/docs/images/content/account/projectreplays.png +0 -0
  30. package/docs/images/content/account/team-manage.png +0 -0
  31. package/docs/images/content/account/teampage.png +0 -0
  32. package/docs/images/content/extension/cursor.svg +1 -0
  33. package/docs/images/content/extension/vscode.svg +57 -0
  34. package/docs/images/content/extension/windsurf.svg +3 -0
  35. package/docs/images/content/self-hosted/launchtemplateid.png +0 -0
  36. package/docs/images/content/side-by-side.png +0 -0
  37. package/docs/images/content/vscode/ide-full.png +0 -0
  38. package/docs/images/content/vscode/running.png +0 -0
  39. package/docs/images/content/vscode/vscode-2-assert.png +0 -0
  40. package/docs/images/content/vscode/vscode-agent-preview.png +0 -0
  41. package/docs/images/content/vscode/vscode-copilot-ask.png +0 -0
  42. package/docs/images/content/vscode/vscode-file-creation.png +0 -0
  43. package/docs/images/content/vscode/vscode-install.png +0 -0
  44. package/docs/images/content/vscode/vscode-overview.png +0 -0
  45. package/docs/images/content/vscode/vscode-setup-walkthrough.png +0 -0
  46. package/docs/images/content/vscode/vscode-stopchat.png +0 -0
  47. package/docs/images/content/vscode/vscode-stoptest.png +0 -0
  48. package/docs/images/content/vscode/vscode-tdservice.png +0 -0
  49. package/docs/images/content/vscode/vscode-test-output.png +0 -0
  50. package/docs/images/content/vscode/vscode-testhistory.png +0 -0
  51. package/docs/images/content/vscode/vscode-testpane-runtests.png +0 -0
  52. package/docs/images/content/vscode/vscode-testpane.png +0 -0
  53. package/docs/images/template/dark.png +0 -0
  54. package/docs/images/template/icon.png +0 -0
  55. package/docs/images/template/light.png +0 -0
  56. package/docs/snippets/calendar-link.mdx +4 -0
  57. package/docs/snippets/gitignore-warning.mdx +7 -0
  58. package/docs/snippets/lifecycle-warning.mdx +6 -0
  59. package/docs/snippets/test-prereqs.mdx +12 -0
  60. package/docs/snippets/tests/assert-replay.mdx +7 -0
  61. package/docs/snippets/tests/assert-yaml.mdx +8 -0
  62. package/docs/snippets/tests/exec-js-replay.mdx +7 -0
  63. package/docs/snippets/tests/exec-js-yaml.mdx +32 -0
  64. package/docs/snippets/tests/exec-shell-replay.mdx +7 -0
  65. package/docs/snippets/tests/exec-shell-yaml.mdx +15 -0
  66. package/docs/snippets/tests/hover-image-replay.mdx +7 -0
  67. package/docs/snippets/tests/hover-image-yaml.mdx +17 -0
  68. package/docs/snippets/tests/hover-text-replay.mdx +7 -0
  69. package/docs/snippets/tests/hover-text-with-description-replay.mdx +7 -0
  70. package/docs/snippets/tests/hover-text-with-description-yaml.mdx +24 -0
  71. package/docs/snippets/tests/hover-text-yaml.mdx +14 -0
  72. package/docs/snippets/tests/match-image-replay.mdx +7 -0
  73. package/docs/snippets/tests/match-image-yaml.mdx +17 -0
  74. package/docs/snippets/tests/press-keys-replay.mdx +7 -0
  75. package/docs/snippets/tests/press-keys-yaml.mdx +36 -0
  76. package/docs/snippets/tests/remember-replay.mdx +7 -0
  77. package/docs/snippets/tests/remember-yaml.mdx +28 -0
  78. package/docs/snippets/tests/scroll-replay.mdx +7 -0
  79. package/docs/snippets/tests/scroll-until-image-replay.mdx +7 -0
  80. package/docs/snippets/tests/scroll-until-image-yaml.mdx +14 -0
  81. package/docs/snippets/tests/scroll-until-text-replay.mdx +7 -0
  82. package/docs/snippets/tests/scroll-until-text-yaml.mdx +17 -0
  83. package/docs/snippets/tests/scroll-yaml.mdx +30 -0
  84. package/docs/snippets/tests/type-repeated-replay.mdx +7 -0
  85. package/docs/snippets/tests/type-repeated-yaml.mdx +22 -0
  86. package/docs/snippets/tests/type-replay.mdx +7 -0
  87. package/docs/snippets/tests/type-yaml.mdx +28 -0
  88. package/docs/snippets/tests/wait-for-image-replay.mdx +7 -0
  89. package/docs/snippets/tests/wait-for-image-yaml.mdx +18 -0
  90. package/docs/snippets/tests/wait-for-text-replay.mdx +7 -0
  91. package/docs/snippets/tests/wait-for-text-yaml.mdx +18 -0
  92. package/docs/snippets/tests/wait-replay.mdx +7 -0
  93. package/docs/snippets/tests/wait-yaml.mdx +13 -0
  94. package/docs/styles.css +65 -0
  95. package/docs/v6/account/dashboard.mdx +16 -0
  96. package/docs/v6/account/enterprise.mdx +110 -0
  97. package/docs/v6/account/pricing.mdx +33 -0
  98. package/docs/v6/account/projects.mdx +33 -0
  99. package/docs/v6/account/team.mdx +35 -0
  100. package/docs/v6/action/ami.mdx +109 -0
  101. package/docs/v6/action/performance.mdx +105 -0
  102. package/docs/v6/action/secrets.mdx +93 -0
  103. package/docs/v6/apps/chrome-extensions.mdx +48 -0
  104. package/docs/v6/apps/desktop-apps.mdx +93 -0
  105. package/docs/v6/apps/mobile-apps.mdx +26 -0
  106. package/docs/v6/apps/static-websites.mdx +54 -0
  107. package/docs/v6/apps/tauri-apps.mdx +361 -0
  108. package/docs/v6/bugs/jira.mdx +232 -0
  109. package/docs/v6/cli/overview.mdx +66 -0
  110. package/docs/v6/commands/assert.mdx +45 -0
  111. package/docs/v6/commands/exec.mdx +282 -0
  112. package/docs/v6/commands/focus-application.mdx +44 -0
  113. package/docs/v6/commands/hover-image.mdx +69 -0
  114. package/docs/v6/commands/hover-text.mdx +47 -0
  115. package/docs/v6/commands/if.mdx +53 -0
  116. package/docs/v6/commands/match-image.mdx +67 -0
  117. package/docs/v6/commands/press-keys.mdx +87 -0
  118. package/docs/v6/commands/remember.mdx +49 -0
  119. package/docs/v6/commands/run.mdx +44 -0
  120. package/docs/v6/commands/scroll-until-image.mdx +66 -0
  121. package/docs/v6/commands/scroll-until-text.mdx +60 -0
  122. package/docs/v6/commands/scroll.mdx +69 -0
  123. package/docs/v6/commands/type.mdx +45 -0
  124. package/docs/v6/commands/wait-for-image.mdx +54 -0
  125. package/docs/v6/commands/wait-for-text.mdx +48 -0
  126. package/docs/v6/commands/wait.mdx +45 -0
  127. package/docs/v6/exporting/junit.mdx +218 -0
  128. package/docs/v6/exporting/playwright.mdx +197 -0
  129. package/docs/v6/features/auto-healing.mdx +144 -0
  130. package/docs/v6/features/generation.mdx +116 -0
  131. package/docs/v6/features/parallel-testing.mdx +151 -0
  132. package/docs/v6/features/reusable-snippets.mdx +131 -0
  133. package/docs/v6/features/selectorless.mdx +80 -0
  134. package/docs/v6/features/visual-assertions.mdx +139 -0
  135. package/docs/v6/getting-started/ci.mdx +146 -0
  136. package/docs/v6/getting-started/cli.mdx +91 -0
  137. package/docs/v6/getting-started/editing.mdx +100 -0
  138. package/docs/v6/getting-started/playwright.mdx +342 -0
  139. package/docs/v6/getting-started/running.mdx +48 -0
  140. package/docs/v6/getting-started/self-hosting.mdx +408 -0
  141. package/docs/v6/getting-started/vscode.mdx +88 -0
  142. package/docs/v6/guide/assertions.mdx +189 -0
  143. package/docs/v6/guide/authentication.mdx +136 -0
  144. package/docs/v6/guide/code.mdx +65 -0
  145. package/docs/v6/guide/dashcam.mdx +118 -0
  146. package/docs/v6/guide/environment-variables.mdx +26 -0
  147. package/docs/v6/guide/lifecycle.mdx +242 -0
  148. package/docs/v6/guide/locating.mdx +141 -0
  149. package/docs/v6/guide/protips.mdx +43 -0
  150. package/docs/v6/guide/variables.mdx +143 -0
  151. package/docs/v6/guide/waiting.mdx +130 -0
  152. package/docs/v6/importing/csv.mdx +196 -0
  153. package/docs/v6/importing/gherkin.mdx +143 -0
  154. package/docs/v6/importing/jira.mdx +164 -0
  155. package/docs/v6/importing/testrail.mdx +162 -0
  156. package/docs/v6/integrations/electron.mdx +146 -0
  157. package/docs/v6/integrations/netlify.mdx +100 -0
  158. package/docs/v6/integrations/vercel.mdx +125 -0
  159. package/docs/v6/interactive/explore.mdx +99 -0
  160. package/docs/v6/interactive/run.mdx +52 -0
  161. package/docs/v6/interactive/save.mdx +63 -0
  162. package/docs/v6/overview/comparison.mdx +101 -0
  163. package/docs/v6/overview/faq.mdx +162 -0
  164. package/docs/v6/overview/performance.mdx +52 -0
  165. package/docs/v6/overview/quickstart.mdx +137 -0
  166. package/docs/v6/overview/what-is-testdriver.mdx +85 -0
  167. package/docs/v6/scenarios/ai-chatbot.mdx +28 -0
  168. package/docs/v6/scenarios/cookie-banner.mdx +32 -0
  169. package/docs/v6/scenarios/file-upload.mdx +33 -0
  170. package/docs/v6/scenarios/form-filling.mdx +32 -0
  171. package/docs/v6/scenarios/log-in.mdx +75 -0
  172. package/docs/v6/scenarios/pdf-generation.mdx +25 -0
  173. package/docs/v6/scenarios/spell-check.mdx +22 -0
  174. package/docs/v6/security/action.mdx +84 -0
  175. package/docs/v6/security/agent.mdx +73 -0
  176. package/docs/v6/security/platform.mdx +77 -0
  177. package/docs/v6/tutorials/advanced-test.mdx +81 -0
  178. package/docs/v6/tutorials/basic-test.mdx +45 -0
  179. package/docs/v7/_drafts/agents.mdx +852 -0
  180. package/docs/v7/_drafts/architecture.mdx +399 -0
  181. package/docs/v7/_drafts/auto-cache-key.mdx +167 -0
  182. package/docs/v7/_drafts/awesome-logs-quick-ref.mdx +100 -0
  183. package/docs/v7/_drafts/best-practices.mdx +486 -0
  184. package/docs/v7/_drafts/caching-ai.mdx +215 -0
  185. package/docs/v7/_drafts/caching-selectors.mdx +424 -0
  186. package/docs/v7/_drafts/caching.mdx +366 -0
  187. package/docs/v7/_drafts/cli-to-sdk-migration.mdx +425 -0
  188. package/docs/v7/_drafts/commands/assert.mdx +45 -0
  189. package/docs/v7/_drafts/commands/exec.mdx +282 -0
  190. package/docs/v7/_drafts/commands/focus-application.mdx +44 -0
  191. package/docs/v7/_drafts/commands/hover-image.mdx +69 -0
  192. package/docs/v7/_drafts/commands/hover-text.mdx +47 -0
  193. package/docs/v7/_drafts/commands/if.mdx +53 -0
  194. package/docs/v7/_drafts/commands/match-image.mdx +67 -0
  195. package/docs/v7/_drafts/commands/press-keys.mdx +87 -0
  196. package/docs/v7/_drafts/commands/remember.mdx +49 -0
  197. package/docs/v7/_drafts/commands/run.mdx +44 -0
  198. package/docs/v7/_drafts/commands/scroll-until-image.mdx +66 -0
  199. package/docs/v7/_drafts/commands/scroll-until-text.mdx +60 -0
  200. package/docs/v7/_drafts/commands/scroll.mdx +69 -0
  201. package/docs/v7/_drafts/commands/type.mdx +45 -0
  202. package/docs/v7/_drafts/commands/wait-for-image.mdx +54 -0
  203. package/docs/v7/_drafts/commands/wait-for-text.mdx +48 -0
  204. package/docs/v7/_drafts/commands/wait.mdx +45 -0
  205. package/docs/v7/_drafts/configuration.mdx +378 -0
  206. package/docs/v7/_drafts/contributing.mdx +174 -0
  207. package/docs/v7/_drafts/core.mdx +458 -0
  208. package/docs/v7/_drafts/dashcam-title-feature.mdx +89 -0
  209. package/docs/v7/_drafts/debugging.mdx +349 -0
  210. package/docs/v7/_drafts/error-handling.mdx +501 -0
  211. package/docs/v7/_drafts/faq.mdx +393 -0
  212. package/docs/v7/_drafts/hooks.mdx +360 -0
  213. package/docs/v7/_drafts/init-command.mdx +95 -0
  214. package/docs/v7/_drafts/installation.mdx +420 -0
  215. package/docs/v7/_drafts/migration.mdx +562 -0
  216. package/docs/v7/_drafts/observable.mdx +604 -0
  217. package/docs/v7/_drafts/playwright.mdx +342 -0
  218. package/docs/v7/_drafts/plugin-migration.mdx +220 -0
  219. package/docs/v7/_drafts/powerful.mdx +419 -0
  220. package/docs/v7/_drafts/presets.mdx +210 -0
  221. package/docs/v7/_drafts/progressive-disclosure.mdx +230 -0
  222. package/docs/v7/_drafts/prompt-cache.mdx +200 -0
  223. package/docs/v7/_drafts/provision.mdx +390 -0
  224. package/docs/v7/_drafts/quick-start-test-recording.mdx +214 -0
  225. package/docs/v7/_drafts/readme.mdx +135 -0
  226. package/docs/v7/_drafts/reports.mdx +414 -0
  227. package/docs/v7/_drafts/scalable.mdx +754 -0
  228. package/docs/v7/_drafts/screenshot.mdx +155 -0
  229. package/docs/v7/_drafts/sdk-awesome-logs.mdx +468 -0
  230. package/docs/v7/_drafts/sdk-browser-rendering.mdx +167 -0
  231. package/docs/v7/_drafts/sdk-migration.mdx +474 -0
  232. package/docs/v7/_drafts/sdk-v7-complete.mdx +345 -0
  233. package/docs/v7/_drafts/self-hosting.mdx +369 -0
  234. package/docs/v7/_drafts/test-recording.mdx +382 -0
  235. package/docs/v7/_drafts/troubleshooting.mdx +526 -0
  236. package/docs/v7/_drafts/vitest-plugin.mdx +477 -0
  237. package/docs/v7/_drafts/vitest.mdx +535 -0
  238. package/docs/v7/_drafts/writing-tests.mdx +25 -0
  239. package/{ai/skills/testdriver:ai/SKILL.md → docs/v7/ai.mdx} +4 -3
  240. package/{ai/skills/testdriver:assert/SKILL.md → docs/v7/assert.mdx} +4 -3
  241. package/{ai/skills/testdriver:aws-setup/SKILL.md → docs/v7/aws-setup.mdx} +4 -3
  242. package/{ai/skills/testdriver:caching/SKILL.md → docs/v7/caching.mdx} +7 -3
  243. package/{ai/skills/testdriver:captcha/SKILL.md → docs/v7/captcha.mdx} +4 -3
  244. package/{ai/skills/testdriver:ci-cd/SKILL.md → docs/v7/ci-cd.mdx} +4 -3
  245. package/{ai/skills/testdriver:click/SKILL.md → docs/v7/click.mdx} +4 -3
  246. package/{ai/skills/testdriver:client/SKILL.md → docs/v7/client.mdx} +8 -3
  247. package/{ai/skills/testdriver:cloud/SKILL.md → docs/v7/cloud.mdx} +4 -3
  248. package/{ai/skills/testdriver:customizing-devices/SKILL.md → docs/v7/customizing-devices.mdx} +3 -3
  249. package/{ai/skills/testdriver:dashcam/SKILL.md → docs/v7/dashcam.mdx} +4 -3
  250. package/docs/v7/debugging-with-screenshots.mdx +402 -0
  251. package/{ai/skills/testdriver:device-config/SKILL.md → docs/v7/device-config.mdx} +3 -3
  252. package/{ai/skills/testdriver:double-click/SKILL.md → docs/v7/double-click.mdx} +3 -3
  253. package/{ai/skills/testdriver:elements/SKILL.md → docs/v7/elements.mdx} +4 -3
  254. package/{ai/skills/testdriver:enterprise/SKILL.md → docs/v7/enterprise.mdx} +5 -3
  255. package/docs/v7/examples.mdx +5 -0
  256. package/{ai/skills/testdriver:exec/SKILL.md → docs/v7/exec.mdx} +4 -3
  257. package/{ai/skills/testdriver:find/SKILL.md → docs/v7/find.mdx} +4 -3
  258. package/{ai/skills/testdriver:focus-application/SKILL.md → docs/v7/focus-application.mdx} +4 -3
  259. package/{ai/skills/testdriver:generating-tests/SKILL.md → docs/v7/generating-tests.mdx} +3 -3
  260. package/{ai/skills/testdriver:hover/SKILL.md → docs/v7/hover.mdx} +4 -3
  261. package/{ai/skills/testdriver:locating-elements/SKILL.md → docs/v7/locating-elements.mdx} +3 -3
  262. package/{ai/skills/testdriver:making-assertions/SKILL.md → docs/v7/making-assertions.mdx} +3 -3
  263. package/{ai/skills/testdriver:mouse-down/SKILL.md → docs/v7/mouse-down.mdx} +3 -3
  264. package/{ai/skills/testdriver:mouse-up/SKILL.md → docs/v7/mouse-up.mdx} +3 -3
  265. package/docs/v7/ocr.mdx +236 -0
  266. package/{ai/skills/testdriver:performing-actions/SKILL.md → docs/v7/performing-actions.mdx} +3 -3
  267. package/{ai/skills/testdriver:press-keys/SKILL.md → docs/v7/press-keys.mdx} +4 -3
  268. package/{ai/skills/testdriver:quickstart/SKILL.md → docs/v7/quickstart.mdx} +6 -20
  269. package/{ai/skills/testdriver:reusable-code/SKILL.md → docs/v7/reusable-code.mdx} +3 -3
  270. package/{ai/skills/testdriver:right-click/SKILL.md → docs/v7/right-click.mdx} +3 -3
  271. package/{ai/skills/testdriver:running-tests/SKILL.md → docs/v7/running-tests.mdx} +7 -3
  272. package/{ai/skills/testdriver:screenshot/SKILL.md → docs/v7/screenshot.mdx} +88 -6
  273. package/{ai/skills/testdriver:scroll/SKILL.md → docs/v7/scroll.mdx} +40 -3
  274. package/{ai/skills/testdriver:secrets/SKILL.md → docs/v7/secrets.mdx} +3 -3
  275. package/{ai/skills/testdriver:self-hosted/SKILL.md → docs/v7/self-hosted.mdx} +4 -3
  276. package/{ai/skills/testdriver:type/SKILL.md → docs/v7/type.mdx} +4 -3
  277. package/{ai/skills/testdriver:variables/SKILL.md → docs/v7/variables.mdx} +3 -3
  278. package/{ai/skills/testdriver:waiting-for-elements/SKILL.md → docs/v7/waiting-for-elements.mdx} +3 -3
  279. package/{ai/skills/testdriver:what-is-testdriver/SKILL.md → docs/v7/what-is-testdriver.mdx} +3 -3
  280. package/eslint.config.js +67 -0
  281. package/examples/ai.test.mjs +30 -0
  282. package/examples/assert.test.mjs +47 -0
  283. package/examples/captcha-api.test.mjs +50 -0
  284. package/examples/chrome-extension.test.mjs +94 -0
  285. package/examples/drag-and-drop.test.mjs +58 -0
  286. package/examples/element-not-found.test.mjs +26 -0
  287. package/examples/exec-output.test.mjs +59 -0
  288. package/examples/exec-pwsh.test.mjs +57 -0
  289. package/examples/focus-window.test.mjs +36 -0
  290. package/examples/formatted-logging.test.mjs +26 -0
  291. package/examples/hover-image.test.mjs +52 -0
  292. package/examples/hover-text-with-description.test.mjs +56 -0
  293. package/examples/hover-text.test.mjs +27 -0
  294. package/examples/installer.test.mjs +49 -0
  295. package/examples/launch-vscode-linux.test.mjs +54 -0
  296. package/examples/match-image.test.mjs +54 -0
  297. package/examples/no-provision.test.mjs +23 -0
  298. package/examples/press-keys.test.mjs +50 -0
  299. package/examples/prompt.test.mjs +33 -0
  300. package/examples/scroll-keyboard.test.mjs +37 -0
  301. package/examples/scroll-until-image.test.mjs +39 -0
  302. package/examples/scroll-until-text.test.mjs +67 -0
  303. package/examples/scroll.test.mjs +41 -0
  304. package/examples/type.test.mjs +45 -0
  305. package/examples/windows-installer.test.mjs +53 -0
  306. package/jsconfig.json +26 -0
  307. package/lib/vitest/hooks.mjs +3 -0
  308. package/manual/test-init-command.js +223 -0
  309. package/mcp-server/README.md +312 -0
  310. package/mcp-server/mcp-app.html +28 -0
  311. package/mcp-server/mcp-config.example.json +19 -0
  312. package/mcp-server/package-lock.json +4018 -0
  313. package/mcp-server/package.json +29 -0
  314. package/mcp-server/src/codegen.ts +189 -0
  315. package/mcp-server/src/mcp-app.css +360 -0
  316. package/mcp-server/src/mcp-app.ts +547 -0
  317. package/mcp-server/src/provision-types.ts +209 -0
  318. package/mcp-server/src/server.ts +2313 -0
  319. package/mcp-server/src/session.ts +194 -0
  320. package/mcp-server/tsconfig.json +16 -0
  321. package/mcp-server/vite.config.ts +23 -0
  322. package/package.json +2 -17
  323. package/scripts/generate-skills.js +94 -0
  324. package/sdk.js +3 -0
  325. package/setup/aws/cloudformation.yaml +470 -0
  326. package/setup/aws/spawn-runner.sh +190 -0
  327. package/test/api-resilience.test.mjs +0 -0
  328. package/test/captcha-solver.test.mjs +152 -0
  329. package/test/chrome-remote-debugging.test.mjs +66 -0
  330. package/test/duckduckgo/experiment.test.mjs +28 -0
  331. package/test/duckduckgo/setup.test.mjs +29 -0
  332. package/test/manual/debug-locate-response.js +82 -0
  333. package/test/manual/reconnect-provision.test.mjs +49 -0
  334. package/test/manual/test-console-logs.test.mjs +42 -0
  335. package/test/manual/test-find-api.js +73 -0
  336. package/test/manual/test-init.sh +54 -0
  337. package/test/manual/test-prompt-cache.js +97 -0
  338. package/test/manual/test-provision-auth.mjs +22 -0
  339. package/test/manual/test-sandbox-render.js +29 -0
  340. package/test/manual/test-sdk-methods.js +15 -0
  341. package/test/manual/test-sdk-refactor.js +53 -0
  342. package/test/manual/test-stack-trace.mjs +57 -0
  343. package/test/manual/verify-element-api.js +89 -0
  344. package/test/manual/verify-types.js +0 -0
  345. package/test/manual-unawaited-promise.test.mjs +31 -0
  346. package/test-ide-preview.mjs +17 -0
  347. package/tests/airbnb-booking.test.mjs +39 -0
  348. package/tests/airbnb-search.test.mjs +43 -0
  349. package/tests/example.test.js +33 -0
  350. package/tests/login.js +28 -0
  351. package/vitest.config.mjs +24 -0
  352. package/vscode-extension/.vscodeignore +12 -0
  353. package/vscode-extension/README.md +94 -0
  354. package/vscode-extension/media/icon.png +0 -0
  355. package/vscode-extension/package-lock.json +4126 -0
  356. package/vscode-extension/package.json +86 -0
  357. package/vscode-extension/src/extension.ts +829 -0
  358. package/vscode-extension/testdriverai-0.1.0.vsix +0 -0
  359. package/vscode-extension/tsconfig.json +16 -0
  360. package/ai/skills/testdriver:examples/SKILL.md +0 -7
  361. package/ai/skills/testdriver:mcp-workflow/SKILL.md +0 -410
  362. package/ai/skills/testdriver:testdriver/SKILL.md +0 -523
@@ -0,0 +1,22 @@
1
+ /**
2
+ * Quick test to verify provision() authentication works
3
+ */
4
+
5
+ import { test } from 'vitest';
6
+ import { provision } from '../../lib/presets/index.mjs';
7
+
8
+ test('provision auth test', async (context) => {
9
+ console.log('Starting provision...');
10
+
11
+ const { testdriver, dashcam } = await provision('chrome', {
12
+ url: 'http://testdriver-sandbox.vercel.app/',
13
+ }, context);
14
+
15
+ console.log('✅ Provision complete!');
16
+ console.log('TestDriver:', testdriver);
17
+ console.log('Dashcam:', dashcam);
18
+
19
+ // Try a simple find
20
+ const result = await testdriver.find('any element');
21
+ console.log('Find result:', result);
22
+ });
@@ -0,0 +1,29 @@
1
+ const TestDriver = require("./sdk.js");
2
+
3
+ async function test() {
4
+ console.log("Testing sandbox rendering...");
5
+
6
+ // API key loaded automatically from .env
7
+ const client = new TestDriver({
8
+ os: process.env.TEST_PLATFORM || "linux",
9
+ headless: false, // Should open browser
10
+ logging: true,
11
+ });
12
+
13
+ try {
14
+ console.log("Connecting to sandbox...");
15
+ const instance = await client.connect();
16
+ console.log("Connected to instance:", instance);
17
+
18
+ // Wait a bit to see if browser opens
19
+ await new Promise((resolve) => setTimeout(resolve, 5000));
20
+
21
+ await client.disconnect();
22
+ console.log("Test completed successfully");
23
+ } catch (error) {
24
+ console.error("Test failed:", error);
25
+ process.exit(1);
26
+ }
27
+ }
28
+
29
+ test();
@@ -0,0 +1,15 @@
1
+ const SDK = require("./sdk.js");
2
+
3
+ const client = new SDK("test-key");
4
+
5
+ // Get all public methods (non-private, non-constructor)
6
+ const methods = Object.getOwnPropertyNames(Object.getPrototypeOf(client))
7
+ .filter((m) => !m.startsWith("_") && m !== "constructor")
8
+ .sort();
9
+
10
+ console.log("Public SDK Methods:");
11
+ console.log(methods.join(", "));
12
+ console.log("\nTotal:", methods.length, "methods");
13
+
14
+ // Check if commands will be set up after connect
15
+ console.log("\nCommands before connect:", client.commands);
@@ -0,0 +1,53 @@
1
+ #!/usr/bin/env node
2
+
3
+ /**
4
+ * Quick test to verify SDK refactoring works correctly
5
+ */
6
+
7
+ const TestDriver = require("./sdk.js");
8
+
9
+ async function test() {
10
+ console.log("Testing SDK refactor...\n");
11
+
12
+ // Test 1: SDK construction (API key loaded automatically from .env)
13
+ console.log("✓ Test 1: Creating SDK instance");
14
+ const client = new TestDriver({
15
+ logging: false,
16
+ });
17
+
18
+ console.log(" - agent exists:", !!client.agent);
19
+ console.log(" - emitter exists:", !!client.emitter);
20
+ console.log(" - config exists:", !!client.config);
21
+ console.log(" - session exists:", !!client.session);
22
+ console.log(" - apiClient exists:", !!client.apiClient);
23
+ console.log(" - analytics exists:", !!client.analytics);
24
+ console.log(" - sandbox exists:", !!client.sandbox);
25
+ console.log(" - system exists:", !!client.system);
26
+
27
+ // Test 2: Check agent methods are accessible
28
+ console.log("\n✓ Test 2: Checking agent methods");
29
+ console.log(
30
+ " - agent.exploratoryLoop exists:",
31
+ typeof client.agent.exploratoryLoop,
32
+ );
33
+ console.log(" - agent.buildEnv exists:", typeof client.agent.buildEnv);
34
+ console.log(
35
+ " - agent.getRecentSandboxId exists:",
36
+ typeof client.agent.getRecentSandboxId,
37
+ );
38
+
39
+ // Test 3: Check SDK methods
40
+ console.log("\n✓ Test 3: Checking SDK methods");
41
+ console.log(" - ai() exists:", typeof client.ai);
42
+ console.log(" - auth() exists:", typeof client.auth);
43
+ console.log(" - connect() exists:", typeof client.connect);
44
+ console.log(" - disconnect() exists:", typeof client.disconnect);
45
+
46
+ console.log("\n✅ All basic tests passed!");
47
+ }
48
+
49
+ test().catch((error) => {
50
+ console.error("\n❌ Test failed:", error.message);
51
+ console.error(error.stack);
52
+ process.exit(1);
53
+ });
@@ -0,0 +1,57 @@
1
+ /**
2
+ * Quick test to verify stack trace filtering works
3
+ */
4
+
5
+ // Mock the MatchError similar to commands.js
6
+ class MatchError extends Error {
7
+ constructor(message, fatal = false) {
8
+ super(message);
9
+ this.fatal = fatal;
10
+ this.attachScreenshot = true;
11
+ }
12
+ }
13
+
14
+ // Simulate SDK wrapper with stack filtering (improved version)
15
+ class TestSDK {
16
+ constructor() {
17
+ const command = async (message) => {
18
+ // Simulate the command throwing an error
19
+ throw new MatchError(`AI Assertion failed: ${message}`, true);
20
+ };
21
+
22
+ // Wrap the method with proper stack trace handling
23
+ this.assert = async function (...args) {
24
+ // Capture the call site for better error reporting
25
+ const callSite = {};
26
+ Error.captureStackTrace(callSite, this.assert);
27
+
28
+ try {
29
+ return await command(...args);
30
+ } catch (error) {
31
+ // Replace the stack trace to point to the actual caller
32
+ if (Error.captureStackTrace && callSite.stack) {
33
+ const errorMessage = error.stack?.split("\n")[0];
34
+ const callerStack = callSite.stack?.split("\n").slice(1);
35
+ error.stack = errorMessage + "\n" + callerStack.join("\n");
36
+ }
37
+ throw error;
38
+ }
39
+ }.bind(this);
40
+ }
41
+ }
42
+
43
+ // Test it
44
+ async function runTest() {
45
+ const client = new TestSDK();
46
+
47
+ try {
48
+ console.log("Testing stack trace...\n");
49
+ await client.assert("home page appears"); // Line 42 - this should show in stack
50
+ } catch (error) {
51
+ console.log("Error caught!");
52
+ console.log("Stack trace:");
53
+ console.log(error.stack);
54
+ }
55
+ }
56
+
57
+ runTest();
@@ -0,0 +1,89 @@
1
+ #!/usr/bin/env node
2
+
3
+ /**
4
+ * Verify Element class API
5
+ * Tests that all expected methods and properties are available
6
+ */
7
+
8
+ async function verify() {
9
+ // Create a test element instance - need to access Element class directly
10
+ const { Element } = require("./sdk.js");
11
+ const elem = new Element("test", null, null, null);
12
+
13
+ console.log("Verifying Element class API...\n");
14
+
15
+ // Check methods exist
16
+ const methods = [
17
+ "find",
18
+ "found",
19
+ "click",
20
+ "hover",
21
+ "doubleClick",
22
+ "rightClick",
23
+ "mouseDown",
24
+ "mouseUp",
25
+ "getCoordinates",
26
+ "getResponse",
27
+ ];
28
+
29
+ let passed = 0;
30
+ let failed = 0;
31
+
32
+ console.log("Testing methods:");
33
+ methods.forEach((method) => {
34
+ if (typeof elem[method] === "function") {
35
+ console.log(` ✓ ${method}()`);
36
+ passed++;
37
+ } else {
38
+ console.log(` ✗ ${method}() - MISSING`);
39
+ failed++;
40
+ }
41
+ });
42
+
43
+ // Test property getters (should return null when element not found)
44
+ const props = [
45
+ "x",
46
+ "y",
47
+ "centerX",
48
+ "centerY",
49
+ "width",
50
+ "height",
51
+ "confidence",
52
+ "screenshot",
53
+ "boundingBox",
54
+ "text",
55
+ "label",
56
+ ];
57
+
58
+ console.log("\nTesting properties (should be null when not found):");
59
+ props.forEach((prop) => {
60
+ if (prop in elem) {
61
+ const value = elem[prop];
62
+ if (value === null) {
63
+ console.log(` ✓ ${prop} = null`);
64
+ passed++;
65
+ } else {
66
+ console.log(` ✗ ${prop} = ${value} (expected null)`);
67
+ failed++;
68
+ }
69
+ } else {
70
+ console.log(` ✗ ${prop} - MISSING`);
71
+ failed++;
72
+ }
73
+ });
74
+
75
+ console.log("\n" + "=".repeat(50));
76
+ console.log(`Results: ${passed} passed, ${failed} failed`);
77
+ console.log("=".repeat(50));
78
+
79
+ if (failed > 0) {
80
+ process.exit(1);
81
+ } else {
82
+ console.log("\n✅ All Element API verification tests passed!");
83
+ }
84
+ }
85
+
86
+ verify().catch((err) => {
87
+ console.error("Error:", err);
88
+ process.exit(1);
89
+ });
File without changes
@@ -0,0 +1,31 @@
1
+ /**
2
+ * Manual test to verify unawaited promise detection
3
+ *
4
+ * Run with: vitest run test/manual-unawaited-promise.test.mjs
5
+ *
6
+ * Expected: You should see a warning like:
7
+ * ⚠️ Warning: Previous find() may not have been awaited.
8
+ */
9
+ import { describe, expect, it } from "vitest";
10
+ import { TestDriver } from "../lib/vitest/hooks.mjs";
11
+
12
+ describe("Unawaited Promise Detection", () => {
13
+ it("should warn when a promise is not awaited", async (context) => {
14
+ const testdriver = TestDriver(context);
15
+
16
+ await testdriver.provision.chrome({
17
+ url: 'https://example.com',
18
+ });
19
+
20
+ // INTENTIONALLY missing await - should trigger warning on next call
21
+ testdriver.find("some button");
22
+
23
+ // This second call should print a warning about the previous unawaited find()
24
+ const element = await testdriver.find("Example Domain heading");
25
+
26
+ console.log("Element found:", element.found());
27
+
28
+ // If we got here without error and saw the warning, the feature works!
29
+ expect(true).toBeTruthy();
30
+ });
31
+ });
@@ -0,0 +1,17 @@
1
+ import { TestDriver } from './lib/vitest/hooks.mjs';
2
+ import { describe, it } from 'vitest';
3
+
4
+ describe('IDE Preview Test', () => {
5
+ it('should open preview in IDE', async (context) => {
6
+ const testdriver = TestDriver(context, {
7
+ preview: 'ide' // This should write the session file
8
+ });
9
+
10
+ await testdriver.provision.chrome({ url: 'https://example.com' });
11
+
12
+ // Give the extension a moment to detect the session file
13
+ await new Promise(resolve => setTimeout(resolve, 2000));
14
+
15
+ console.log('✅ Test completed - check if VSCode extension opened the preview panel');
16
+ });
17
+ });
@@ -0,0 +1,39 @@
1
+ /**
2
+ * Automated test that navigates to Airbnb and searches for a property in Austin, TX for 2 people from February 2-20
3
+ * Generated by TestDriver MCP Server
4
+ */
5
+ import { describe, expect, it } from "vitest";
6
+ import { TestDriver } from "testdriverai/lib/vitest/hooks.mjs";
7
+
8
+ describe("Airbnb Austin Booking Search", () => {
9
+ it("Automated test that navigates to Airbnb and searches for a property in Austin, TX for 2 people from February 2-20", async (context) => {
10
+ const testdriver = TestDriver(context);
11
+
12
+ // --- GENERATED COMMANDS ---
13
+ await testdriver.provision.chrome({ url: "https://www.airbnb.com" });
14
+
15
+ await testdriver.find("the \"Where\" search input field with placeholder \"Search destinations\"").click();
16
+
17
+ await testdriver.type("Austin, TX");
18
+
19
+ await testdriver.find("the \"When\" date picker button showing \"Add dates\"").click();
20
+
21
+ await testdriver.wait(2000);
22
+
23
+ await testdriver.find("February 2 date in the calendar picker").click();
24
+
25
+ await testdriver.find("February 20 in the calendar").click();
26
+
27
+ await testdriver.find("Who Add guests button").click();
28
+
29
+ await testdriver.wait(2000);
30
+
31
+ await testdriver.find("plus button to add adults next to the number 0").click();
32
+
33
+ await testdriver.find("plus button to add adults").click();
34
+
35
+ await testdriver.find("Search button").click();
36
+
37
+ // --- END GENERATED ---
38
+ });
39
+ });
@@ -0,0 +1,43 @@
1
+ /**
2
+ * Airbnb Search Test
3
+ * - Loads Airbnb
4
+ * - Searches for places in Austin, TX
5
+ * - Sets dates from Feb 2 to Feb 20
6
+ * - Sets 2 guests
7
+ *
8
+ * Generated by TestDriver MCP Server
9
+ */
10
+ import { describe, expect, it } from "vitest";
11
+ import { TestDriver } from "../lib/vitest/hooks.mjs";
12
+
13
+ describe("Airbnb Austin Search", () => {
14
+ it("should search for places in Austin, TX for 2 people from Feb 2 to Feb 20", async (context) => {
15
+ const testdriver = TestDriver(context);
16
+
17
+ // --- GENERATED COMMANDS ---
18
+ await testdriver.provision.chrome({ url: "https://www.airbnb.com" });
19
+
20
+ await testdriver.find("Where search input field or destination input").click();
21
+
22
+ await testdriver.type("Austin, TX");
23
+
24
+ await testdriver.find("Austin, Texas suggestion in the dropdown").click();
25
+
26
+ await testdriver.find("February 2 or the number 2 in the February 2026 calendar").click();
27
+
28
+ await testdriver.find("February 20 or the number 20 in the February 2026 calendar").click();
29
+
30
+ await testdriver.find("Who button or Add guests section").click();
31
+
32
+ await testdriver.find("Plus button or increase button for Adults").click();
33
+
34
+ await testdriver.find("Plus button or increase button for Adults").click();
35
+
36
+ await testdriver.find("Search button with magnifying glass icon").click();
37
+
38
+ const assertResult = await testdriver.assert("Search results are showing Airbnb listings in Austin, Texas for the selected dates");
39
+ expect(assertResult).toBeTruthy();
40
+
41
+ // --- END GENERATED ---
42
+ }, 120000); // 2 minute timeout for this test
43
+ });
@@ -0,0 +1,33 @@
1
+ import { test, expect } from 'vitest';
2
+ import { TestDriver } from 'testdriverai/vitest/hooks';
3
+ import { login } from './login.js';
4
+
5
+ test('should login and add item to cart', async (context) => {
6
+
7
+ // Create TestDriver instance - automatically connects to sandbox
8
+ const testdriver = TestDriver(context);
9
+
10
+ // Launch chrome and navigate to demo app
11
+ await testdriver.provision.chrome({ url: 'http://testdriver-sandbox.vercel.app/login' });
12
+
13
+ // Use the login snippet to handle authentication
14
+ // This demonstrates how to reuse test logic across multiple tests
15
+ await login(testdriver);
16
+
17
+ // Add item to cart
18
+ const addToCartButton = await testdriver.find(
19
+ 'add to cart button under TestDriver Hat'
20
+ );
21
+ await addToCartButton.click();
22
+
23
+ // Open cart
24
+ const cartButton = await testdriver.find(
25
+ 'cart button in the top right corner'
26
+ );
27
+ await cartButton.click();
28
+
29
+ // Verify item in cart
30
+ const result = await testdriver.assert('There is an item in the cart');
31
+ expect(result).toBeTruthy();
32
+
33
+ });
package/tests/login.js ADDED
@@ -0,0 +1,28 @@
1
+ /**
2
+ * Login snippet - reusable login function
3
+ *
4
+ * This demonstrates how to create reusable test snippets that can be
5
+ * imported and used across multiple test files.
6
+ */
7
+ export async function login(testdriver) {
8
+
9
+ // The password is displayed on screen, have TestDriver extract it
10
+ const password = await testdriver.extract('the password');
11
+
12
+ // Find the username field
13
+ const usernameField = await testdriver.find(
14
+ 'username input'
15
+ );
16
+ await usernameField.click();
17
+
18
+ // Type username
19
+ await testdriver.type('standard_user');
20
+
21
+ // Enter password form earlier
22
+ // Marked as secret so it's not logged or stored
23
+ await testdriver.pressKeys(['tab']);
24
+ await testdriver.type(password, { secret: true });
25
+
26
+ // Submit the form
27
+ await testdriver.find('submit button on the login form').click();
28
+ }
@@ -0,0 +1,24 @@
1
+ import TestDriver from "testdriverai/vitest";
2
+ import { defineConfig } from "vitest/config";
3
+
4
+ // Always include AWS setup - it will be a no-op unless TD_OS=windows
5
+ // Note: dotenv is loaded automatically by the TestDriver SDK
6
+ const setupFiles = [
7
+ "testdriverai/vitest/setup",
8
+ "testdriverai/vitest/setup-aws",
9
+ ];
10
+
11
+ export default defineConfig({
12
+ test: {
13
+ testTimeout: 900000,
14
+ hookTimeout: 900000,
15
+ disableConsoleIntercept: true,
16
+ maxConcurrency: 3,
17
+ reporters: [
18
+ "default",
19
+ TestDriver(),
20
+ ["junit", { outputFile: "test-report.junit.xml" }],
21
+ ],
22
+ setupFiles,
23
+ },
24
+ });
@@ -0,0 +1,12 @@
1
+ .vscode/**
2
+ .vscode-test/**
3
+ src/**
4
+ .gitignore
5
+ .yarnrc
6
+ vsc-extension-quickstart.md
7
+ **/tsconfig.json
8
+ **/.eslintrc.json
9
+ **/*.map
10
+ **/*.ts
11
+ node_modules/**
12
+ !node_modules/ws/**
@@ -0,0 +1,94 @@
1
+ # TestDriver.ai VSCode Extension
2
+
3
+ AI-powered end-to-end testing with live preview directly in your IDE.
4
+
5
+ ## Features
6
+
7
+ - **Live Test Preview**: Watch your tests execute in real-time within VSCode
8
+ - **MCP Integration**: Automatic MCP server setup for AI-assisted test creation
9
+ - **Seamless Workflow**: Tests automatically open in a side panel when running
10
+
11
+ ## Installation
12
+
13
+ ### From VSIX
14
+
15
+ 1. Download the `.vsix` file from releases
16
+ 2. In VSCode, press `Cmd+Shift+P` (Mac) or `Ctrl+Shift+P` (Windows/Linux)
17
+ 3. Type "Install from VSIX" and select the downloaded file
18
+
19
+ ### From Marketplace
20
+
21
+ Search for "TestDriver.ai" in the VSCode Extensions marketplace.
22
+
23
+ ## Usage
24
+
25
+ ### Live Preview
26
+
27
+ When running tests with the TestDriver SDK, set the `preview` option to `"ide"`:
28
+
29
+ ```javascript
30
+ import { TestDriver } from 'testdriverai/lib/vitest/hooks.mjs';
31
+
32
+ describe('My Test Suite', () => {
33
+ it('runs my test', async (context) => {
34
+ const testdriver = TestDriver(context, {
35
+ preview: 'ide' // Opens live preview in IDE (VSCode, Cursor, etc.)
36
+ });
37
+
38
+ await testdriver.provision.chrome({ url: 'https://example.com' });
39
+ await testdriver.find('Sign In button').click();
40
+ });
41
+ });
42
+ ```
43
+
44
+ ### Preview Options
45
+
46
+ | Value | Description |
47
+ |-------|-------------|
48
+ | `"browser"` | Opens debugger in default browser (default) |
49
+ | `"ide"` | Opens debugger in IDE panel (VSCode, Cursor, etc.) |
50
+ | `"none"` | Headless mode, no preview |
51
+
52
+ ### MCP Server
53
+
54
+ The extension can automatically install the TestDriver MCP server for AI-assisted test creation:
55
+
56
+ 1. Press `Cmd+Shift+P` (Mac) or `Ctrl+Shift+P` (Windows/Linux)
57
+ 2. Type "TestDriver: Install MCP Server"
58
+ 3. Choose where to save the configuration
59
+
60
+ Or accept the prompt when the extension first activates.
61
+
62
+ **Note:** When installed via this extension, the MCP server automatically uses IDE preview mode (`TD_PREVIEW=ide`), so the live test execution view opens directly in the IDE panel instead of an external browser.
63
+
64
+ ## Commands
65
+
66
+ | Command | Description |
67
+ |---------|-------------|
68
+ | `TestDriver: Open Live Preview` | Manually open the preview panel |
69
+ | `TestDriver: Close Live Preview` | Close the preview panel |
70
+ | `TestDriver: Install MCP Server` | Install MCP server configuration |
71
+
72
+ ## Configuration
73
+
74
+ | Setting | Default | Description |
75
+ |---------|---------|-------------|
76
+ | `testdriverai.autoOpenPreview` | `true` | Auto-open preview when test starts |
77
+ | `testdriverai.mcpServerPath` | `""` | Custom MCP server path |
78
+
79
+ ## Requirements
80
+
81
+ - VSCode 1.85.0 or later
82
+ - TestDriver.ai SDK installed in your project
83
+ - Valid TestDriver API key
84
+
85
+ ## Getting Started
86
+
87
+ 1. Install this extension
88
+ 2. Get an API key at [console.testdriver.ai](https://console.testdriver.ai/team)
89
+ 3. Set your `TD_API_KEY` environment variable
90
+ 4. Run a test with `preview: "ide"` option
91
+
92
+ ## License
93
+
94
+ MIT License - see LICENSE file for details.
Binary file