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.
- package/.claude/settings.local.json +7 -0
- package/.env.example +4 -0
- package/.github/workflows/acceptance-linux-scheduled.yaml +45 -0
- package/.github/workflows/acceptance-windows-scheduled.yaml +54 -0
- package/.github/workflows/acceptance.yaml +106 -0
- package/.github/workflows/publish.yaml +75 -0
- package/.github/workflows/test-init.yml +157 -0
- package/.github/workflows/testdriver.yml +170 -0
- package/.github/workflows/windows-self-hosted.yaml +82 -0
- package/.prettierignore +4 -0
- package/.prettierrc +1 -0
- package/CHANGELOG.md +158 -0
- package/SKILLs.md +17 -0
- package/agent/index.js +32 -3
- package/ai/.claude-plugin/plugin.json +9 -0
- package/docs/GITHUB_COMMENTS.md +330 -0
- package/docs/GITHUB_COMMENTS_ANNOUNCEMENT.md +167 -0
- package/docs/QUICK-START-GITHUB-COMMENTS.md +84 -0
- package/docs/TEST-GITHUB-COMMENTS.md +129 -0
- package/docs/_scripts/generate-skills.js +149 -0
- package/docs/_scripts/link-replacer.js +164 -0
- package/docs/_scripts/upload-docs-to-openai.js +284 -0
- package/docs/claude-mcp-plugin.mdx +160 -0
- package/docs/docs.json +394 -0
- package/docs/github-integration-setup.md +266 -0
- package/docs/guide/best-practices-polling.mdx +154 -0
- package/docs/images/content/account/newprojectsettings.png +0 -0
- package/docs/images/content/account/projectpage.png +0 -0
- package/docs/images/content/account/projectreplays.png +0 -0
- package/docs/images/content/account/team-manage.png +0 -0
- package/docs/images/content/account/teampage.png +0 -0
- package/docs/images/content/extension/cursor.svg +1 -0
- package/docs/images/content/extension/vscode.svg +57 -0
- package/docs/images/content/extension/windsurf.svg +3 -0
- package/docs/images/content/self-hosted/launchtemplateid.png +0 -0
- package/docs/images/content/side-by-side.png +0 -0
- package/docs/images/content/vscode/ide-full.png +0 -0
- package/docs/images/content/vscode/running.png +0 -0
- package/docs/images/content/vscode/vscode-2-assert.png +0 -0
- package/docs/images/content/vscode/vscode-agent-preview.png +0 -0
- package/docs/images/content/vscode/vscode-copilot-ask.png +0 -0
- package/docs/images/content/vscode/vscode-file-creation.png +0 -0
- package/docs/images/content/vscode/vscode-install.png +0 -0
- package/docs/images/content/vscode/vscode-overview.png +0 -0
- package/docs/images/content/vscode/vscode-setup-walkthrough.png +0 -0
- package/docs/images/content/vscode/vscode-stopchat.png +0 -0
- package/docs/images/content/vscode/vscode-stoptest.png +0 -0
- package/docs/images/content/vscode/vscode-tdservice.png +0 -0
- package/docs/images/content/vscode/vscode-test-output.png +0 -0
- package/docs/images/content/vscode/vscode-testhistory.png +0 -0
- package/docs/images/content/vscode/vscode-testpane-runtests.png +0 -0
- package/docs/images/content/vscode/vscode-testpane.png +0 -0
- package/docs/images/template/dark.png +0 -0
- package/docs/images/template/icon.png +0 -0
- package/docs/images/template/light.png +0 -0
- package/docs/snippets/calendar-link.mdx +4 -0
- package/docs/snippets/gitignore-warning.mdx +7 -0
- package/docs/snippets/lifecycle-warning.mdx +6 -0
- package/docs/snippets/test-prereqs.mdx +12 -0
- package/docs/snippets/tests/assert-replay.mdx +7 -0
- package/docs/snippets/tests/assert-yaml.mdx +8 -0
- package/docs/snippets/tests/exec-js-replay.mdx +7 -0
- package/docs/snippets/tests/exec-js-yaml.mdx +32 -0
- package/docs/snippets/tests/exec-shell-replay.mdx +7 -0
- package/docs/snippets/tests/exec-shell-yaml.mdx +15 -0
- package/docs/snippets/tests/hover-image-replay.mdx +7 -0
- package/docs/snippets/tests/hover-image-yaml.mdx +17 -0
- package/docs/snippets/tests/hover-text-replay.mdx +7 -0
- package/docs/snippets/tests/hover-text-with-description-replay.mdx +7 -0
- package/docs/snippets/tests/hover-text-with-description-yaml.mdx +24 -0
- package/docs/snippets/tests/hover-text-yaml.mdx +14 -0
- package/docs/snippets/tests/match-image-replay.mdx +7 -0
- package/docs/snippets/tests/match-image-yaml.mdx +17 -0
- package/docs/snippets/tests/press-keys-replay.mdx +7 -0
- package/docs/snippets/tests/press-keys-yaml.mdx +36 -0
- package/docs/snippets/tests/remember-replay.mdx +7 -0
- package/docs/snippets/tests/remember-yaml.mdx +28 -0
- package/docs/snippets/tests/scroll-replay.mdx +7 -0
- package/docs/snippets/tests/scroll-until-image-replay.mdx +7 -0
- package/docs/snippets/tests/scroll-until-image-yaml.mdx +14 -0
- package/docs/snippets/tests/scroll-until-text-replay.mdx +7 -0
- package/docs/snippets/tests/scroll-until-text-yaml.mdx +17 -0
- package/docs/snippets/tests/scroll-yaml.mdx +30 -0
- package/docs/snippets/tests/type-repeated-replay.mdx +7 -0
- package/docs/snippets/tests/type-repeated-yaml.mdx +22 -0
- package/docs/snippets/tests/type-replay.mdx +7 -0
- package/docs/snippets/tests/type-yaml.mdx +28 -0
- package/docs/snippets/tests/wait-for-image-replay.mdx +7 -0
- package/docs/snippets/tests/wait-for-image-yaml.mdx +18 -0
- package/docs/snippets/tests/wait-for-text-replay.mdx +7 -0
- package/docs/snippets/tests/wait-for-text-yaml.mdx +18 -0
- package/docs/snippets/tests/wait-replay.mdx +7 -0
- package/docs/snippets/tests/wait-yaml.mdx +13 -0
- package/docs/styles.css +65 -0
- package/docs/v6/account/dashboard.mdx +16 -0
- package/docs/v6/account/enterprise.mdx +110 -0
- package/docs/v6/account/pricing.mdx +33 -0
- package/docs/v6/account/projects.mdx +33 -0
- package/docs/v6/account/team.mdx +35 -0
- package/docs/v6/action/ami.mdx +109 -0
- package/docs/v6/action/performance.mdx +105 -0
- package/docs/v6/action/secrets.mdx +93 -0
- package/docs/v6/apps/chrome-extensions.mdx +48 -0
- package/docs/v6/apps/desktop-apps.mdx +93 -0
- package/docs/v6/apps/mobile-apps.mdx +26 -0
- package/docs/v6/apps/static-websites.mdx +54 -0
- package/docs/v6/apps/tauri-apps.mdx +361 -0
- package/docs/v6/bugs/jira.mdx +232 -0
- package/docs/v6/cli/overview.mdx +66 -0
- package/docs/v6/commands/assert.mdx +45 -0
- package/docs/v6/commands/exec.mdx +282 -0
- package/docs/v6/commands/focus-application.mdx +44 -0
- package/docs/v6/commands/hover-image.mdx +69 -0
- package/docs/v6/commands/hover-text.mdx +47 -0
- package/docs/v6/commands/if.mdx +53 -0
- package/docs/v6/commands/match-image.mdx +67 -0
- package/docs/v6/commands/press-keys.mdx +87 -0
- package/docs/v6/commands/remember.mdx +49 -0
- package/docs/v6/commands/run.mdx +44 -0
- package/docs/v6/commands/scroll-until-image.mdx +66 -0
- package/docs/v6/commands/scroll-until-text.mdx +60 -0
- package/docs/v6/commands/scroll.mdx +69 -0
- package/docs/v6/commands/type.mdx +45 -0
- package/docs/v6/commands/wait-for-image.mdx +54 -0
- package/docs/v6/commands/wait-for-text.mdx +48 -0
- package/docs/v6/commands/wait.mdx +45 -0
- package/docs/v6/exporting/junit.mdx +218 -0
- package/docs/v6/exporting/playwright.mdx +197 -0
- package/docs/v6/features/auto-healing.mdx +144 -0
- package/docs/v6/features/generation.mdx +116 -0
- package/docs/v6/features/parallel-testing.mdx +151 -0
- package/docs/v6/features/reusable-snippets.mdx +131 -0
- package/docs/v6/features/selectorless.mdx +80 -0
- package/docs/v6/features/visual-assertions.mdx +139 -0
- package/docs/v6/getting-started/ci.mdx +146 -0
- package/docs/v6/getting-started/cli.mdx +91 -0
- package/docs/v6/getting-started/editing.mdx +100 -0
- package/docs/v6/getting-started/playwright.mdx +342 -0
- package/docs/v6/getting-started/running.mdx +48 -0
- package/docs/v6/getting-started/self-hosting.mdx +408 -0
- package/docs/v6/getting-started/vscode.mdx +88 -0
- package/docs/v6/guide/assertions.mdx +189 -0
- package/docs/v6/guide/authentication.mdx +136 -0
- package/docs/v6/guide/code.mdx +65 -0
- package/docs/v6/guide/dashcam.mdx +118 -0
- package/docs/v6/guide/environment-variables.mdx +26 -0
- package/docs/v6/guide/lifecycle.mdx +242 -0
- package/docs/v6/guide/locating.mdx +141 -0
- package/docs/v6/guide/protips.mdx +43 -0
- package/docs/v6/guide/variables.mdx +143 -0
- package/docs/v6/guide/waiting.mdx +130 -0
- package/docs/v6/importing/csv.mdx +196 -0
- package/docs/v6/importing/gherkin.mdx +143 -0
- package/docs/v6/importing/jira.mdx +164 -0
- package/docs/v6/importing/testrail.mdx +162 -0
- package/docs/v6/integrations/electron.mdx +146 -0
- package/docs/v6/integrations/netlify.mdx +100 -0
- package/docs/v6/integrations/vercel.mdx +125 -0
- package/docs/v6/interactive/explore.mdx +99 -0
- package/docs/v6/interactive/run.mdx +52 -0
- package/docs/v6/interactive/save.mdx +63 -0
- package/docs/v6/overview/comparison.mdx +101 -0
- package/docs/v6/overview/faq.mdx +162 -0
- package/docs/v6/overview/performance.mdx +52 -0
- package/docs/v6/overview/quickstart.mdx +137 -0
- package/docs/v6/overview/what-is-testdriver.mdx +85 -0
- package/docs/v6/scenarios/ai-chatbot.mdx +28 -0
- package/docs/v6/scenarios/cookie-banner.mdx +32 -0
- package/docs/v6/scenarios/file-upload.mdx +33 -0
- package/docs/v6/scenarios/form-filling.mdx +32 -0
- package/docs/v6/scenarios/log-in.mdx +75 -0
- package/docs/v6/scenarios/pdf-generation.mdx +25 -0
- package/docs/v6/scenarios/spell-check.mdx +22 -0
- package/docs/v6/security/action.mdx +84 -0
- package/docs/v6/security/agent.mdx +73 -0
- package/docs/v6/security/platform.mdx +77 -0
- package/docs/v6/tutorials/advanced-test.mdx +81 -0
- package/docs/v6/tutorials/basic-test.mdx +45 -0
- package/docs/v7/_drafts/agents.mdx +852 -0
- package/docs/v7/_drafts/architecture.mdx +399 -0
- package/docs/v7/_drafts/auto-cache-key.mdx +167 -0
- package/docs/v7/_drafts/awesome-logs-quick-ref.mdx +100 -0
- package/docs/v7/_drafts/best-practices.mdx +486 -0
- package/docs/v7/_drafts/caching-ai.mdx +215 -0
- package/docs/v7/_drafts/caching-selectors.mdx +424 -0
- package/docs/v7/_drafts/caching.mdx +366 -0
- package/docs/v7/_drafts/cli-to-sdk-migration.mdx +425 -0
- package/docs/v7/_drafts/commands/assert.mdx +45 -0
- package/docs/v7/_drafts/commands/exec.mdx +282 -0
- package/docs/v7/_drafts/commands/focus-application.mdx +44 -0
- package/docs/v7/_drafts/commands/hover-image.mdx +69 -0
- package/docs/v7/_drafts/commands/hover-text.mdx +47 -0
- package/docs/v7/_drafts/commands/if.mdx +53 -0
- package/docs/v7/_drafts/commands/match-image.mdx +67 -0
- package/docs/v7/_drafts/commands/press-keys.mdx +87 -0
- package/docs/v7/_drafts/commands/remember.mdx +49 -0
- package/docs/v7/_drafts/commands/run.mdx +44 -0
- package/docs/v7/_drafts/commands/scroll-until-image.mdx +66 -0
- package/docs/v7/_drafts/commands/scroll-until-text.mdx +60 -0
- package/docs/v7/_drafts/commands/scroll.mdx +69 -0
- package/docs/v7/_drafts/commands/type.mdx +45 -0
- package/docs/v7/_drafts/commands/wait-for-image.mdx +54 -0
- package/docs/v7/_drafts/commands/wait-for-text.mdx +48 -0
- package/docs/v7/_drafts/commands/wait.mdx +45 -0
- package/docs/v7/_drafts/configuration.mdx +378 -0
- package/docs/v7/_drafts/contributing.mdx +174 -0
- package/docs/v7/_drafts/core.mdx +458 -0
- package/docs/v7/_drafts/dashcam-title-feature.mdx +89 -0
- package/docs/v7/_drafts/debugging.mdx +349 -0
- package/docs/v7/_drafts/error-handling.mdx +501 -0
- package/docs/v7/_drafts/faq.mdx +393 -0
- package/docs/v7/_drafts/hooks.mdx +360 -0
- package/docs/v7/_drafts/init-command.mdx +95 -0
- package/docs/v7/_drafts/installation.mdx +420 -0
- package/docs/v7/_drafts/migration.mdx +562 -0
- package/docs/v7/_drafts/observable.mdx +604 -0
- package/docs/v7/_drafts/playwright.mdx +342 -0
- package/docs/v7/_drafts/plugin-migration.mdx +220 -0
- package/docs/v7/_drafts/powerful.mdx +419 -0
- package/docs/v7/_drafts/presets.mdx +210 -0
- package/docs/v7/_drafts/progressive-disclosure.mdx +230 -0
- package/docs/v7/_drafts/prompt-cache.mdx +200 -0
- package/docs/v7/_drafts/provision.mdx +390 -0
- package/docs/v7/_drafts/quick-start-test-recording.mdx +214 -0
- package/docs/v7/_drafts/readme.mdx +135 -0
- package/docs/v7/_drafts/reports.mdx +414 -0
- package/docs/v7/_drafts/scalable.mdx +754 -0
- package/docs/v7/_drafts/screenshot.mdx +155 -0
- package/docs/v7/_drafts/sdk-awesome-logs.mdx +468 -0
- package/docs/v7/_drafts/sdk-browser-rendering.mdx +167 -0
- package/docs/v7/_drafts/sdk-migration.mdx +474 -0
- package/docs/v7/_drafts/sdk-v7-complete.mdx +345 -0
- package/docs/v7/_drafts/self-hosting.mdx +369 -0
- package/docs/v7/_drafts/test-recording.mdx +382 -0
- package/docs/v7/_drafts/troubleshooting.mdx +526 -0
- package/docs/v7/_drafts/vitest-plugin.mdx +477 -0
- package/docs/v7/_drafts/vitest.mdx +535 -0
- package/docs/v7/_drafts/writing-tests.mdx +25 -0
- package/{ai/skills/testdriver:ai/SKILL.md → docs/v7/ai.mdx} +4 -3
- package/{ai/skills/testdriver:assert/SKILL.md → docs/v7/assert.mdx} +4 -3
- package/{ai/skills/testdriver:aws-setup/SKILL.md → docs/v7/aws-setup.mdx} +4 -3
- package/{ai/skills/testdriver:caching/SKILL.md → docs/v7/caching.mdx} +7 -3
- package/{ai/skills/testdriver:captcha/SKILL.md → docs/v7/captcha.mdx} +4 -3
- package/{ai/skills/testdriver:ci-cd/SKILL.md → docs/v7/ci-cd.mdx} +4 -3
- package/{ai/skills/testdriver:click/SKILL.md → docs/v7/click.mdx} +4 -3
- package/{ai/skills/testdriver:client/SKILL.md → docs/v7/client.mdx} +8 -3
- package/{ai/skills/testdriver:cloud/SKILL.md → docs/v7/cloud.mdx} +4 -3
- package/{ai/skills/testdriver:customizing-devices/SKILL.md → docs/v7/customizing-devices.mdx} +3 -3
- package/{ai/skills/testdriver:dashcam/SKILL.md → docs/v7/dashcam.mdx} +4 -3
- package/docs/v7/debugging-with-screenshots.mdx +402 -0
- package/{ai/skills/testdriver:device-config/SKILL.md → docs/v7/device-config.mdx} +3 -3
- package/{ai/skills/testdriver:double-click/SKILL.md → docs/v7/double-click.mdx} +3 -3
- package/{ai/skills/testdriver:elements/SKILL.md → docs/v7/elements.mdx} +4 -3
- package/{ai/skills/testdriver:enterprise/SKILL.md → docs/v7/enterprise.mdx} +5 -3
- package/docs/v7/examples.mdx +5 -0
- package/{ai/skills/testdriver:exec/SKILL.md → docs/v7/exec.mdx} +4 -3
- package/{ai/skills/testdriver:find/SKILL.md → docs/v7/find.mdx} +4 -3
- package/{ai/skills/testdriver:focus-application/SKILL.md → docs/v7/focus-application.mdx} +4 -3
- package/{ai/skills/testdriver:generating-tests/SKILL.md → docs/v7/generating-tests.mdx} +3 -3
- package/{ai/skills/testdriver:hover/SKILL.md → docs/v7/hover.mdx} +4 -3
- package/{ai/skills/testdriver:locating-elements/SKILL.md → docs/v7/locating-elements.mdx} +3 -3
- package/{ai/skills/testdriver:making-assertions/SKILL.md → docs/v7/making-assertions.mdx} +3 -3
- package/{ai/skills/testdriver:mouse-down/SKILL.md → docs/v7/mouse-down.mdx} +3 -3
- package/{ai/skills/testdriver:mouse-up/SKILL.md → docs/v7/mouse-up.mdx} +3 -3
- package/docs/v7/ocr.mdx +236 -0
- package/{ai/skills/testdriver:performing-actions/SKILL.md → docs/v7/performing-actions.mdx} +3 -3
- package/{ai/skills/testdriver:press-keys/SKILL.md → docs/v7/press-keys.mdx} +4 -3
- package/{ai/skills/testdriver:quickstart/SKILL.md → docs/v7/quickstart.mdx} +6 -20
- package/{ai/skills/testdriver:reusable-code/SKILL.md → docs/v7/reusable-code.mdx} +3 -3
- package/{ai/skills/testdriver:right-click/SKILL.md → docs/v7/right-click.mdx} +3 -3
- package/{ai/skills/testdriver:running-tests/SKILL.md → docs/v7/running-tests.mdx} +7 -3
- package/{ai/skills/testdriver:screenshot/SKILL.md → docs/v7/screenshot.mdx} +88 -6
- package/{ai/skills/testdriver:scroll/SKILL.md → docs/v7/scroll.mdx} +40 -3
- package/{ai/skills/testdriver:secrets/SKILL.md → docs/v7/secrets.mdx} +3 -3
- package/{ai/skills/testdriver:self-hosted/SKILL.md → docs/v7/self-hosted.mdx} +4 -3
- package/{ai/skills/testdriver:type/SKILL.md → docs/v7/type.mdx} +4 -3
- package/{ai/skills/testdriver:variables/SKILL.md → docs/v7/variables.mdx} +3 -3
- package/{ai/skills/testdriver:waiting-for-elements/SKILL.md → docs/v7/waiting-for-elements.mdx} +3 -3
- package/{ai/skills/testdriver:what-is-testdriver/SKILL.md → docs/v7/what-is-testdriver.mdx} +3 -3
- package/eslint.config.js +67 -0
- package/examples/ai.test.mjs +30 -0
- package/examples/assert.test.mjs +47 -0
- package/examples/captcha-api.test.mjs +50 -0
- package/examples/chrome-extension.test.mjs +94 -0
- package/examples/drag-and-drop.test.mjs +58 -0
- package/examples/element-not-found.test.mjs +26 -0
- package/examples/exec-output.test.mjs +59 -0
- package/examples/exec-pwsh.test.mjs +57 -0
- package/examples/focus-window.test.mjs +36 -0
- package/examples/formatted-logging.test.mjs +26 -0
- package/examples/hover-image.test.mjs +52 -0
- package/examples/hover-text-with-description.test.mjs +56 -0
- package/examples/hover-text.test.mjs +27 -0
- package/examples/installer.test.mjs +49 -0
- package/examples/launch-vscode-linux.test.mjs +54 -0
- package/examples/match-image.test.mjs +54 -0
- package/examples/no-provision.test.mjs +23 -0
- package/examples/press-keys.test.mjs +50 -0
- package/examples/prompt.test.mjs +33 -0
- package/examples/scroll-keyboard.test.mjs +37 -0
- package/examples/scroll-until-image.test.mjs +39 -0
- package/examples/scroll-until-text.test.mjs +67 -0
- package/examples/scroll.test.mjs +41 -0
- package/examples/type.test.mjs +45 -0
- package/examples/windows-installer.test.mjs +53 -0
- package/jsconfig.json +26 -0
- package/lib/vitest/hooks.mjs +3 -0
- package/manual/test-init-command.js +223 -0
- package/mcp-server/README.md +312 -0
- package/mcp-server/mcp-app.html +28 -0
- package/mcp-server/mcp-config.example.json +19 -0
- package/mcp-server/package-lock.json +4018 -0
- package/mcp-server/package.json +29 -0
- package/mcp-server/src/codegen.ts +189 -0
- package/mcp-server/src/mcp-app.css +360 -0
- package/mcp-server/src/mcp-app.ts +547 -0
- package/mcp-server/src/provision-types.ts +209 -0
- package/mcp-server/src/server.ts +2313 -0
- package/mcp-server/src/session.ts +194 -0
- package/mcp-server/tsconfig.json +16 -0
- package/mcp-server/vite.config.ts +23 -0
- package/package.json +2 -17
- package/scripts/generate-skills.js +94 -0
- package/sdk.js +3 -0
- package/setup/aws/cloudformation.yaml +470 -0
- package/setup/aws/spawn-runner.sh +190 -0
- package/test/api-resilience.test.mjs +0 -0
- package/test/captcha-solver.test.mjs +152 -0
- package/test/chrome-remote-debugging.test.mjs +66 -0
- package/test/duckduckgo/experiment.test.mjs +28 -0
- package/test/duckduckgo/setup.test.mjs +29 -0
- package/test/manual/debug-locate-response.js +82 -0
- package/test/manual/reconnect-provision.test.mjs +49 -0
- package/test/manual/test-console-logs.test.mjs +42 -0
- package/test/manual/test-find-api.js +73 -0
- package/test/manual/test-init.sh +54 -0
- package/test/manual/test-prompt-cache.js +97 -0
- package/test/manual/test-provision-auth.mjs +22 -0
- package/test/manual/test-sandbox-render.js +29 -0
- package/test/manual/test-sdk-methods.js +15 -0
- package/test/manual/test-sdk-refactor.js +53 -0
- package/test/manual/test-stack-trace.mjs +57 -0
- package/test/manual/verify-element-api.js +89 -0
- package/test/manual/verify-types.js +0 -0
- package/test/manual-unawaited-promise.test.mjs +31 -0
- package/test-ide-preview.mjs +17 -0
- package/tests/airbnb-booking.test.mjs +39 -0
- package/tests/airbnb-search.test.mjs +43 -0
- package/tests/example.test.js +33 -0
- package/tests/login.js +28 -0
- package/vitest.config.mjs +24 -0
- package/vscode-extension/.vscodeignore +12 -0
- package/vscode-extension/README.md +94 -0
- package/vscode-extension/media/icon.png +0 -0
- package/vscode-extension/package-lock.json +4126 -0
- package/vscode-extension/package.json +86 -0
- package/vscode-extension/src/extension.ts +829 -0
- package/vscode-extension/testdriverai-0.1.0.vsix +0 -0
- package/vscode-extension/tsconfig.json +16 -0
- package/ai/skills/testdriver:examples/SKILL.md +0 -7
- package/ai/skills/testdriver:mcp-workflow/SKILL.md +0 -410
- package/ai/skills/testdriver:testdriver/SKILL.md +0 -523
|
Binary file
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
{
|
|
2
|
+
"compilerOptions": {
|
|
3
|
+
"module": "commonjs",
|
|
4
|
+
"target": "ES2022",
|
|
5
|
+
"lib": ["ES2022"],
|
|
6
|
+
"outDir": "out",
|
|
7
|
+
"rootDir": "src",
|
|
8
|
+
"sourceMap": true,
|
|
9
|
+
"strict": true,
|
|
10
|
+
"esModuleInterop": true,
|
|
11
|
+
"skipLibCheck": true,
|
|
12
|
+
"resolveJsonModule": true
|
|
13
|
+
},
|
|
14
|
+
"include": ["src/**/*"],
|
|
15
|
+
"exclude": ["node_modules", ".vscode-test"]
|
|
16
|
+
}
|
|
@@ -1,410 +0,0 @@
|
|
|
1
|
-
---
|
|
2
|
-
name: testdriver:mcp-workflow
|
|
3
|
-
description: Build TestDriver tests iteratively using MCP tools with visual feedback
|
|
4
|
-
---
|
|
5
|
-
|
|
6
|
-
# TestDriver MCP Workflow
|
|
7
|
-
|
|
8
|
-
Build automated tests by directly controlling a sandbox through MCP tools. Every action returns a screenshot AND the generated code to add to your test file.
|
|
9
|
-
|
|
10
|
-
## When to Use This Skill
|
|
11
|
-
|
|
12
|
-
Use this skill when:
|
|
13
|
-
- You have access to TestDriver MCP tools (`session_start`, `find`, `click`, etc.)
|
|
14
|
-
- User asks to "write a test", "automate this workflow", "check if X works"
|
|
15
|
-
- You need to build tests iteratively with visual feedback
|
|
16
|
-
|
|
17
|
-
## Overview
|
|
18
|
-
|
|
19
|
-
Use MCP tools to:
|
|
20
|
-
|
|
21
|
-
1. **Control the sandbox directly** - Click, type, scroll in real-time
|
|
22
|
-
2. **See visual feedback** - Every action shows a screenshot with overlays
|
|
23
|
-
3. **Get generated code** - Each successful action returns the code to add to your test file
|
|
24
|
-
4. **Build tests incrementally** - Append code to test files as you go
|
|
25
|
-
|
|
26
|
-
## Quick Start
|
|
27
|
-
|
|
28
|
-
### 1. Start a Session
|
|
29
|
-
|
|
30
|
-
```
|
|
31
|
-
session_start({ type: "chrome", url: "https://your-app.com" })
|
|
32
|
-
```
|
|
33
|
-
|
|
34
|
-
This provisions a sandbox with Chrome and navigates to your URL. You'll see a screenshot and the provision code:
|
|
35
|
-
|
|
36
|
-
```
|
|
37
|
-
Add to test file:
|
|
38
|
-
await testdriver.provision.chrome({ url: "https://your-app.com" });
|
|
39
|
-
```
|
|
40
|
-
|
|
41
|
-
**For local development** (pointing to a custom API endpoint):
|
|
42
|
-
|
|
43
|
-
```
|
|
44
|
-
session_start({
|
|
45
|
-
type: "chrome",
|
|
46
|
-
url: "https://your-app.com",
|
|
47
|
-
apiRoot: "https://your-ngrok-url.ngrok.io"
|
|
48
|
-
})
|
|
49
|
-
```
|
|
50
|
-
|
|
51
|
-
**For self-hosted AWS instances** (your own Windows EC2):
|
|
52
|
-
|
|
53
|
-
```
|
|
54
|
-
session_start({
|
|
55
|
-
type: "chrome",
|
|
56
|
-
url: "https://your-app.com",
|
|
57
|
-
os: "windows",
|
|
58
|
-
ip: "1.2.3.4" // IP from your AWS instance
|
|
59
|
-
})
|
|
60
|
-
```
|
|
61
|
-
|
|
62
|
-
See [AWS Setup Guide](https://docs.testdriver.ai/v7/aws-setup) to deploy your own infrastructure.
|
|
63
|
-
|
|
64
|
-
### 2. Interact with the App
|
|
65
|
-
|
|
66
|
-
Find elements and interact with them. Each action returns a screenshot AND generated code:
|
|
67
|
-
|
|
68
|
-
```
|
|
69
|
-
find_and_click({ description: "Sign In button" })
|
|
70
|
-
→ Returns: screenshot with element highlighted
|
|
71
|
-
→ Add to test file: await testdriver.find("Sign In button").click();
|
|
72
|
-
|
|
73
|
-
type({ text: "user@example.com" })
|
|
74
|
-
→ Returns: screenshot showing typed text
|
|
75
|
-
→ Add to test file: await testdriver.type("user@example.com");
|
|
76
|
-
```
|
|
77
|
-
|
|
78
|
-
### 3. Check If Actions Succeeded
|
|
79
|
-
|
|
80
|
-
After performing actions, use `check` to verify they worked:
|
|
81
|
-
|
|
82
|
-
```
|
|
83
|
-
check({ task: "Was the text entered into the field?" })
|
|
84
|
-
→ Returns: AI analysis of whether the task completed, with screenshot
|
|
85
|
-
|
|
86
|
-
check({ task: "Did the button click navigate to a new page?" })
|
|
87
|
-
→ Returns: AI compares previous screenshot to current state
|
|
88
|
-
```
|
|
89
|
-
|
|
90
|
-
### 4. Make Assertions (for Test Files)
|
|
91
|
-
|
|
92
|
-
Use `assert` for boolean pass/fail conditions that get recorded in test files:
|
|
93
|
-
|
|
94
|
-
```
|
|
95
|
-
assert({ assertion: "the login form is visible" })
|
|
96
|
-
→ Returns: pass/fail with screenshot
|
|
97
|
-
→ Add to test file:
|
|
98
|
-
const assertResult = await testdriver.assert("the login form is visible");
|
|
99
|
-
expect(assertResult).toBeTruthy();
|
|
100
|
-
```
|
|
101
|
-
|
|
102
|
-
### 5. Write the Test File
|
|
103
|
-
|
|
104
|
-
As you perform actions, append the generated code to your test file:
|
|
105
|
-
|
|
106
|
-
```javascript
|
|
107
|
-
/**
|
|
108
|
-
* Login Flow test
|
|
109
|
-
*/
|
|
110
|
-
import { describe, expect, it } from "vitest";
|
|
111
|
-
import { TestDriver } from "testdriverai/lib/vitest/hooks.mjs";
|
|
112
|
-
|
|
113
|
-
describe("Login Flow", () => {
|
|
114
|
-
it("should complete login", async (context) => {
|
|
115
|
-
const testdriver = TestDriver(context);
|
|
116
|
-
|
|
117
|
-
// Append generated code here as you go:
|
|
118
|
-
await testdriver.provision.chrome({ url: "https://app.example.com" });
|
|
119
|
-
await testdriver.find("email input field").click();
|
|
120
|
-
await testdriver.type("user@example.com");
|
|
121
|
-
// ... more code as you perform actions
|
|
122
|
-
});
|
|
123
|
-
});
|
|
124
|
-
```
|
|
125
|
-
|
|
126
|
-
### 6. Verify the Test
|
|
127
|
-
|
|
128
|
-
Run the test from scratch to validate it works:
|
|
129
|
-
|
|
130
|
-
```
|
|
131
|
-
verify({ testFile: "tests/login.test.mjs" })
|
|
132
|
-
```
|
|
133
|
-
|
|
134
|
-
## Tools Reference
|
|
135
|
-
|
|
136
|
-
### Session Management
|
|
137
|
-
|
|
138
|
-
| Tool | Description |
|
|
139
|
-
|------|-------------|
|
|
140
|
-
| `session_start` | Start sandbox with browser/app, returns screenshot + provision code |
|
|
141
|
-
| `session_status` | Check session health and time remaining |
|
|
142
|
-
| `session_extend` | Add more time before session expires |
|
|
143
|
-
|
|
144
|
-
### Element Interaction
|
|
145
|
-
|
|
146
|
-
Each tool returns a screenshot AND the generated code to add to your test file.
|
|
147
|
-
|
|
148
|
-
| Tool | Description |
|
|
149
|
-
|------|-------------|
|
|
150
|
-
| `find` | Locate element by description, returns ref for later use |
|
|
151
|
-
| `click` | Click on element ref |
|
|
152
|
-
| `find_and_click` | Find and click in one action |
|
|
153
|
-
| `type` | Type text into focused field |
|
|
154
|
-
| `press_keys` | Press keyboard shortcuts (e.g., `["ctrl", "a"]`) |
|
|
155
|
-
| `scroll` | Scroll page (up/down/left/right) |
|
|
156
|
-
|
|
157
|
-
### Verification & Display
|
|
158
|
-
|
|
159
|
-
| Tool | Description |
|
|
160
|
-
|------|-------------|
|
|
161
|
-
| `check` | **For AI to understand screen state.** Analyzes current screen and tells you (the AI) whether a task/condition is met. Use this after actions to verify they worked. |
|
|
162
|
-
| `assert` | AI-powered boolean assertion for test files (pass/fail for CI). Returns generated code. |
|
|
163
|
-
| `screenshot` | **For showing the user the screen.** Captures and displays a screenshot. Does NOT return analysis to you (the AI). |
|
|
164
|
-
| `exec` | Execute JavaScript, shell, or PowerShell in sandbox. Returns generated code. |
|
|
165
|
-
|
|
166
|
-
### Test Validation
|
|
167
|
-
|
|
168
|
-
| Tool | Description |
|
|
169
|
-
|------|-------------|
|
|
170
|
-
| `verify` | Run test file from scratch to validate it works |
|
|
171
|
-
|
|
172
|
-
## Visual Feedback
|
|
173
|
-
|
|
174
|
-
Every tool returns a screenshot showing:
|
|
175
|
-
|
|
176
|
-
- **Element highlights** - Blue box around found elements
|
|
177
|
-
- **Click markers** - Red dot with ripple effect at click location
|
|
178
|
-
- **Scroll indicators** - Arrow showing scroll direction
|
|
179
|
-
- **Action status** - Success/failure with duration
|
|
180
|
-
- **Session info** - Time remaining before expiry
|
|
181
|
-
|
|
182
|
-
## Workflow Best Practices
|
|
183
|
-
|
|
184
|
-
### 1. Work Incrementally
|
|
185
|
-
|
|
186
|
-
Don't try to build the entire test at once:
|
|
187
|
-
|
|
188
|
-
```
|
|
189
|
-
# Step 1: Get to login page
|
|
190
|
-
session_start({ url: "https://app.com" })
|
|
191
|
-
→ Add to test: await testdriver.provision.chrome({ url: "https://app.com" });
|
|
192
|
-
|
|
193
|
-
# Step 2: Verify you're on the right page
|
|
194
|
-
check({ task: "Is this the login page?" })
|
|
195
|
-
|
|
196
|
-
# Step 3: Fill in email
|
|
197
|
-
find_and_click({ description: "email input field" })
|
|
198
|
-
→ Add to test: await testdriver.find("email input field").click();
|
|
199
|
-
|
|
200
|
-
type({ text: "user@example.com" })
|
|
201
|
-
→ Add to test: await testdriver.type("user@example.com");
|
|
202
|
-
|
|
203
|
-
# Step 4: Check if email was entered
|
|
204
|
-
check({ task: "Was the email entered correctly?" })
|
|
205
|
-
|
|
206
|
-
# Step 5: Continue with password...
|
|
207
|
-
```
|
|
208
|
-
|
|
209
|
-
### 2. Use Check After Actions
|
|
210
|
-
|
|
211
|
-
After each action, use `check` to verify it worked:
|
|
212
|
-
|
|
213
|
-
```
|
|
214
|
-
find_and_click({ description: "Submit button" })
|
|
215
|
-
check({ task: "Was the form submitted?" })
|
|
216
|
-
```
|
|
217
|
-
|
|
218
|
-
The `check` tool compares the previous screenshot (from before your action) with the current state, giving you AI analysis of what changed and whether the action succeeded.
|
|
219
|
-
|
|
220
|
-
### 3. Understanding Screen State
|
|
221
|
-
|
|
222
|
-
**For AI understanding:** Use `check` to analyze the screen:
|
|
223
|
-
```
|
|
224
|
-
check({ task: "Did the form submit successfully?" })
|
|
225
|
-
→ Returns AI analysis you can read and understand
|
|
226
|
-
```
|
|
227
|
-
|
|
228
|
-
**For user visibility:** Use `screenshot` to show the user:
|
|
229
|
-
```
|
|
230
|
-
screenshot()
|
|
231
|
-
→ Displays to user, no analysis returned to you
|
|
232
|
-
```
|
|
233
|
-
|
|
234
|
-
Action tools (`find`, `click`, `find_and_click`) return screenshots automatically, which the user can see. But if you need to understand the state, use `check`.
|
|
235
|
-
|
|
236
|
-
### 4. Handle Timing Issues
|
|
237
|
-
|
|
238
|
-
If elements take time to appear, use `find` with timeout:
|
|
239
|
-
|
|
240
|
-
```
|
|
241
|
-
find({ description: "Loading complete indicator", timeout: 30000 })
|
|
242
|
-
```
|
|
243
|
-
|
|
244
|
-
### 5. Check Session Time
|
|
245
|
-
|
|
246
|
-
Sessions expire after 5 minutes by default. Use `session_status` to check time remaining and `session_extend` to add more time:
|
|
247
|
-
|
|
248
|
-
```
|
|
249
|
-
session_status()
|
|
250
|
-
→ "Time remaining: 45s"
|
|
251
|
-
|
|
252
|
-
session_extend({ additionalMs: 60000 })
|
|
253
|
-
→ "New expiry: 105s"
|
|
254
|
-
```
|
|
255
|
-
|
|
256
|
-
### 6. Write Code as You Go
|
|
257
|
-
|
|
258
|
-
After each successful action, append the generated code to your test file. This ensures you don't lose progress and makes the test easier to debug.
|
|
259
|
-
|
|
260
|
-
## Error Recovery
|
|
261
|
-
|
|
262
|
-
### Element Not Found
|
|
263
|
-
|
|
264
|
-
If `find` fails:
|
|
265
|
-
|
|
266
|
-
1. Check the screenshot to see what's actually on screen
|
|
267
|
-
2. Adjust the element description to be more specific
|
|
268
|
-
3. Wait for page load with timeout: `find({ description: "...", timeout: 10000 })`
|
|
269
|
-
4. Scroll to find off-screen elements: `scroll({ direction: "down" })`
|
|
270
|
-
|
|
271
|
-
### Session Expired
|
|
272
|
-
|
|
273
|
-
If the session expires:
|
|
274
|
-
|
|
275
|
-
1. `session_start` again with the same URL
|
|
276
|
-
2. Run the test with `verify` to get back to last state
|
|
277
|
-
3. Continue from where you left off
|
|
278
|
-
|
|
279
|
-
### Test Verification Fails
|
|
280
|
-
|
|
281
|
-
If `verify` fails:
|
|
282
|
-
|
|
283
|
-
1. Check the error message and screenshot
|
|
284
|
-
2. Review the test file to see the generated code
|
|
285
|
-
3. Start a new session and manually test the failing step
|
|
286
|
-
4. Adjust element descriptions or add waits as needed
|
|
287
|
-
|
|
288
|
-
## Dependencies
|
|
289
|
-
|
|
290
|
-
When creating a new test project, use these exact dependencies:
|
|
291
|
-
|
|
292
|
-
**package.json:**
|
|
293
|
-
```json
|
|
294
|
-
{
|
|
295
|
-
"type": "module",
|
|
296
|
-
"devDependencies": {
|
|
297
|
-
"testdriverai": "beta",
|
|
298
|
-
"vitest": "^4.0.0"
|
|
299
|
-
},
|
|
300
|
-
"scripts": {
|
|
301
|
-
"test": "vitest"
|
|
302
|
-
}
|
|
303
|
-
}
|
|
304
|
-
```
|
|
305
|
-
|
|
306
|
-
**Important:** The package is `testdriverai` (NOT `@testdriverai/sdk`). Always install from the `beta` tag.
|
|
307
|
-
|
|
308
|
-
## Test File Format
|
|
309
|
-
|
|
310
|
-
Create test files using this standard format. Append generated code inside the test function:
|
|
311
|
-
|
|
312
|
-
```javascript
|
|
313
|
-
/**
|
|
314
|
-
* Login Flow test
|
|
315
|
-
*/
|
|
316
|
-
import { describe, expect, it } from "vitest";
|
|
317
|
-
import { TestDriver } from "testdriverai/lib/vitest/hooks.mjs";
|
|
318
|
-
|
|
319
|
-
describe("Login Flow", () => {
|
|
320
|
-
it("should complete Login Flow", async (context) => {
|
|
321
|
-
const testdriver = TestDriver(context);
|
|
322
|
-
|
|
323
|
-
// Append generated code from each action here:
|
|
324
|
-
await testdriver.provision.chrome({ url: "https://app.example.com" });
|
|
325
|
-
|
|
326
|
-
await testdriver.find("email input field").click();
|
|
327
|
-
await testdriver.type("user@example.com");
|
|
328
|
-
|
|
329
|
-
await testdriver.find("password field").click();
|
|
330
|
-
await testdriver.type("secret123");
|
|
331
|
-
|
|
332
|
-
await testdriver.find("Sign In button").click();
|
|
333
|
-
|
|
334
|
-
const assertResult = await testdriver.assert("dashboard is visible");
|
|
335
|
-
expect(assertResult).toBeTruthy();
|
|
336
|
-
});
|
|
337
|
-
});
|
|
338
|
-
```
|
|
339
|
-
|
|
340
|
-
## Self-Hosted AWS Instances
|
|
341
|
-
|
|
342
|
-
You can use your own AWS-hosted Windows instances instead of TestDriver cloud. This gives you:
|
|
343
|
-
|
|
344
|
-
- **Flat license fee** - No device-second metering
|
|
345
|
-
- **Your own AI keys** - Use your OpenAI/Anthropic keys
|
|
346
|
-
- **Custom configuration** - Install custom software, configure networking
|
|
347
|
-
- **Full debugging access** - RDP into instances
|
|
348
|
-
|
|
349
|
-
### Quick Setup
|
|
350
|
-
|
|
351
|
-
1. **Deploy AWS infrastructure** using [CloudFormation](https://docs.testdriver.ai/v7/aws-setup)
|
|
352
|
-
|
|
353
|
-
2. **Spawn an instance**:
|
|
354
|
-
```bash
|
|
355
|
-
AWS_REGION=us-east-2 \
|
|
356
|
-
AMI_ID=ami-0504bf50fad62f312 \
|
|
357
|
-
AWS_LAUNCH_TEMPLATE_ID=lt-xxx \
|
|
358
|
-
bash setup/aws/spawn-runner.sh
|
|
359
|
-
```
|
|
360
|
-
Output: `PUBLIC_IP=1.2.3.4`
|
|
361
|
-
|
|
362
|
-
3. **Connect via session_start**:
|
|
363
|
-
```
|
|
364
|
-
session_start({
|
|
365
|
-
type: "chrome",
|
|
366
|
-
url: "https://example.com",
|
|
367
|
-
os: "windows",
|
|
368
|
-
ip: "1.2.3.4"
|
|
369
|
-
})
|
|
370
|
-
```
|
|
371
|
-
|
|
372
|
-
4. **Terminate when done**:
|
|
373
|
-
```bash
|
|
374
|
-
aws ec2 terminate-instances --instance-ids i-xxx --region us-east-2
|
|
375
|
-
```
|
|
376
|
-
|
|
377
|
-
### Environment Variable
|
|
378
|
-
|
|
379
|
-
You can also set `TD_IP` environment variable in your MCP config instead of passing `ip` to each session:
|
|
380
|
-
|
|
381
|
-
```json
|
|
382
|
-
{
|
|
383
|
-
"mcpServers": {
|
|
384
|
-
"testdriver": {
|
|
385
|
-
"env": {
|
|
386
|
-
"TD_API_KEY": "your-key",
|
|
387
|
-
"TD_IP": "1.2.3.4"
|
|
388
|
-
}
|
|
389
|
-
}
|
|
390
|
-
}
|
|
391
|
-
}
|
|
392
|
-
```
|
|
393
|
-
|
|
394
|
-
## Tips
|
|
395
|
-
|
|
396
|
-
1. **Every action returns generated code** - Look for "Add to test file:" in responses and append that code
|
|
397
|
-
|
|
398
|
-
2. **Use `check` to understand the screen** - This is how you (the AI) see and analyze the current state
|
|
399
|
-
|
|
400
|
-
3. **Use `screenshot` to show the user** - This displays the screen to the user, but does NOT return analysis to you
|
|
401
|
-
|
|
402
|
-
4. **Use `check` after every action** - Verify your actions succeeded before moving on
|
|
403
|
-
|
|
404
|
-
5. **Be specific with element descriptions** - "the blue Sign In button in the header" is better than "button"
|
|
405
|
-
|
|
406
|
-
6. **Use `check` for verification, `assert` for test files** - `check` gives detailed AI analysis, `assert` gives boolean pass/fail for CI
|
|
407
|
-
|
|
408
|
-
7. **Write code incrementally** - Append generated code to your test file after each successful action
|
|
409
|
-
|
|
410
|
-
8. **Extend session proactively** - If you have complex workflows, extend before you run out of time
|