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
package/docs/v7/ocr.mdx
ADDED
|
@@ -0,0 +1,236 @@
|
|
|
1
|
+
---
|
|
2
|
+
title: "ocr()"
|
|
3
|
+
sidebarTitle: "ocr"
|
|
4
|
+
description: "Extract all visible text from the screen using OCR"
|
|
5
|
+
icon: "text"
|
|
6
|
+
---
|
|
7
|
+
|
|
8
|
+
## Overview
|
|
9
|
+
|
|
10
|
+
Extract all visible text from the current screen using Tesseract OCR. Returns structured data including each word's text content, bounding box coordinates, and confidence scores.
|
|
11
|
+
|
|
12
|
+
This method runs OCR on-demand and returns the results immediately. It's useful for:
|
|
13
|
+
- Verifying text content on screen
|
|
14
|
+
- Finding elements by their text when visual matching alone isn't enough
|
|
15
|
+
- Debugging what text TestDriver can "see"
|
|
16
|
+
- Building custom text-based assertions
|
|
17
|
+
|
|
18
|
+
<Note>
|
|
19
|
+
**Performance**: OCR runs server-side using Tesseract.js with a worker pool for fast extraction. A typical screenshot processes in 200-500ms.
|
|
20
|
+
</Note>
|
|
21
|
+
|
|
22
|
+
## Syntax
|
|
23
|
+
|
|
24
|
+
```javascript
|
|
25
|
+
const result = await testdriver.ocr()
|
|
26
|
+
```
|
|
27
|
+
|
|
28
|
+
## Parameters
|
|
29
|
+
|
|
30
|
+
None.
|
|
31
|
+
|
|
32
|
+
## Returns
|
|
33
|
+
|
|
34
|
+
`Promise<OCRResult>` - Object containing extracted text data
|
|
35
|
+
|
|
36
|
+
### OCRResult
|
|
37
|
+
|
|
38
|
+
| Property | Type | Description |
|
|
39
|
+
|----------|------|-------------|
|
|
40
|
+
| `words` | `OCRWord[]` | Array of extracted words with positions |
|
|
41
|
+
| `fullText` | `string` | All text concatenated with spaces |
|
|
42
|
+
| `confidence` | `number` | Overall OCR confidence (0-100) |
|
|
43
|
+
| `imageWidth` | `number` | Width of the analyzed screenshot |
|
|
44
|
+
| `imageHeight` | `number` | Height of the analyzed screenshot |
|
|
45
|
+
|
|
46
|
+
### OCRWord
|
|
47
|
+
|
|
48
|
+
| Property | Type | Description |
|
|
49
|
+
|----------|------|-------------|
|
|
50
|
+
| `content` | `string` | The word's text content |
|
|
51
|
+
| `confidence` | `number` | Confidence score for this word (0-100) |
|
|
52
|
+
| `bbox.x0` | `number` | Left edge X coordinate |
|
|
53
|
+
| `bbox.y0` | `number` | Top edge Y coordinate |
|
|
54
|
+
| `bbox.x1` | `number` | Right edge X coordinate |
|
|
55
|
+
| `bbox.y1` | `number` | Bottom edge Y coordinate |
|
|
56
|
+
|
|
57
|
+
## Examples
|
|
58
|
+
|
|
59
|
+
### Get All Text on Screen
|
|
60
|
+
|
|
61
|
+
```javascript
|
|
62
|
+
const result = await testdriver.ocr();
|
|
63
|
+
console.log(result.fullText);
|
|
64
|
+
// "Welcome to TestDriver Sign In Email Password Submit"
|
|
65
|
+
|
|
66
|
+
console.log(`Found ${result.words.length} words with ${result.confidence}% confidence`);
|
|
67
|
+
```
|
|
68
|
+
|
|
69
|
+
### Check if Text Exists
|
|
70
|
+
|
|
71
|
+
```javascript
|
|
72
|
+
const result = await testdriver.ocr();
|
|
73
|
+
|
|
74
|
+
// Check for error message
|
|
75
|
+
const hasError = result.words.some(w =>
|
|
76
|
+
w.content.toLowerCase().includes('error')
|
|
77
|
+
);
|
|
78
|
+
|
|
79
|
+
if (hasError) {
|
|
80
|
+
console.log('Error message detected on screen');
|
|
81
|
+
}
|
|
82
|
+
```
|
|
83
|
+
|
|
84
|
+
### Find and Click Text
|
|
85
|
+
|
|
86
|
+
```javascript
|
|
87
|
+
const result = await testdriver.ocr();
|
|
88
|
+
|
|
89
|
+
// Find the "Submit" button text
|
|
90
|
+
const submitWord = result.words.find(w => w.content === 'Submit');
|
|
91
|
+
|
|
92
|
+
if (submitWord) {
|
|
93
|
+
// Calculate center of the word's bounding box
|
|
94
|
+
const x = Math.round((submitWord.bbox.x0 + submitWord.bbox.x1) / 2);
|
|
95
|
+
const y = Math.round((submitWord.bbox.y0 + submitWord.bbox.y1) / 2);
|
|
96
|
+
|
|
97
|
+
// Click at those coordinates
|
|
98
|
+
await testdriver.click({ x, y });
|
|
99
|
+
}
|
|
100
|
+
```
|
|
101
|
+
|
|
102
|
+
### Filter Words by Confidence
|
|
103
|
+
|
|
104
|
+
```javascript
|
|
105
|
+
const result = await testdriver.ocr();
|
|
106
|
+
|
|
107
|
+
// Only use high-confidence words (90%+)
|
|
108
|
+
const reliableWords = result.words.filter(w => w.confidence >= 90);
|
|
109
|
+
|
|
110
|
+
console.log('High confidence words:', reliableWords.map(w => w.content));
|
|
111
|
+
```
|
|
112
|
+
|
|
113
|
+
### Build Custom Assertions
|
|
114
|
+
|
|
115
|
+
```javascript
|
|
116
|
+
import { describe, expect, it } from "vitest";
|
|
117
|
+
import { TestDriver } from "testdriverai/lib/vitest/hooks.mjs";
|
|
118
|
+
|
|
119
|
+
describe("Login Page", () => {
|
|
120
|
+
it("should show form labels", async (context) => {
|
|
121
|
+
const testdriver = TestDriver(context);
|
|
122
|
+
|
|
123
|
+
await testdriver.provision.chrome({
|
|
124
|
+
url: 'https://myapp.com/login',
|
|
125
|
+
});
|
|
126
|
+
|
|
127
|
+
const result = await testdriver.ocr();
|
|
128
|
+
|
|
129
|
+
// Assert expected labels are present
|
|
130
|
+
expect(result.fullText).toContain('Email');
|
|
131
|
+
expect(result.fullText).toContain('Password');
|
|
132
|
+
expect(result.fullText).toContain('Sign In');
|
|
133
|
+
});
|
|
134
|
+
});
|
|
135
|
+
```
|
|
136
|
+
|
|
137
|
+
### Debug Screen Content
|
|
138
|
+
|
|
139
|
+
```javascript
|
|
140
|
+
// Useful for debugging what TestDriver can see
|
|
141
|
+
const result = await testdriver.ocr();
|
|
142
|
+
|
|
143
|
+
console.log('=== Screen Text ===');
|
|
144
|
+
console.log(result.fullText);
|
|
145
|
+
console.log('');
|
|
146
|
+
|
|
147
|
+
console.log('=== Word Details ===');
|
|
148
|
+
result.words.forEach((word, i) => {
|
|
149
|
+
console.log(`${i + 1}. "${word.content}" at (${word.bbox.x0}, ${word.bbox.y0}) - ${word.confidence}% confidence`);
|
|
150
|
+
});
|
|
151
|
+
```
|
|
152
|
+
|
|
153
|
+
### Find Multiple Instances
|
|
154
|
+
|
|
155
|
+
```javascript
|
|
156
|
+
const result = await testdriver.ocr();
|
|
157
|
+
|
|
158
|
+
// Find all instances of "Button" text
|
|
159
|
+
const buttons = result.words.filter(w =>
|
|
160
|
+
w.content.toLowerCase() === 'button'
|
|
161
|
+
);
|
|
162
|
+
|
|
163
|
+
console.log(`Found ${buttons.length} buttons on screen`);
|
|
164
|
+
|
|
165
|
+
buttons.forEach((btn, i) => {
|
|
166
|
+
console.log(`Button ${i + 1} at position (${btn.bbox.x0}, ${btn.bbox.y0})`);
|
|
167
|
+
});
|
|
168
|
+
```
|
|
169
|
+
|
|
170
|
+
## How It Works
|
|
171
|
+
|
|
172
|
+
1. TestDriver captures a screenshot of the current screen
|
|
173
|
+
2. The image is sent to the TestDriver API
|
|
174
|
+
3. Tesseract.js processes the image server-side with multiple workers
|
|
175
|
+
4. The API returns structured data with text and positions
|
|
176
|
+
5. Bounding box coordinates are scaled to match the original screen resolution
|
|
177
|
+
|
|
178
|
+
<Note>
|
|
179
|
+
OCR works best with clear, readable text. Very small text, unusual fonts, or low-contrast text may have lower confidence scores or be missed entirely.
|
|
180
|
+
</Note>
|
|
181
|
+
|
|
182
|
+
## Best Practices
|
|
183
|
+
|
|
184
|
+
<AccordionGroup>
|
|
185
|
+
<Accordion title="Use find() for element location">
|
|
186
|
+
For locating elements, prefer `find()` which uses AI vision. Use `ocr()` when you need raw text data or want to build custom text-based logic.
|
|
187
|
+
|
|
188
|
+
```javascript
|
|
189
|
+
// Prefer this for clicking elements
|
|
190
|
+
await testdriver.find("Submit button").click();
|
|
191
|
+
|
|
192
|
+
// Use ocr() for text verification or custom logic
|
|
193
|
+
const result = await testdriver.ocr();
|
|
194
|
+
expect(result.fullText).toContain('Success');
|
|
195
|
+
```
|
|
196
|
+
</Accordion>
|
|
197
|
+
|
|
198
|
+
<Accordion title="Filter by confidence">
|
|
199
|
+
OCR can sometimes misread characters. Filter by confidence score when accuracy is critical.
|
|
200
|
+
|
|
201
|
+
```javascript
|
|
202
|
+
const result = await testdriver.ocr();
|
|
203
|
+
const reliable = result.words.filter(w => w.confidence >= 85);
|
|
204
|
+
```
|
|
205
|
+
</Accordion>
|
|
206
|
+
|
|
207
|
+
<Accordion title="Handle case sensitivity">
|
|
208
|
+
Text matching should usually be case-insensitive since OCR capitalization can vary.
|
|
209
|
+
|
|
210
|
+
```javascript
|
|
211
|
+
const result = await testdriver.ocr();
|
|
212
|
+
const hasLogin = result.words.some(w =>
|
|
213
|
+
w.content.toLowerCase() === 'login'
|
|
214
|
+
);
|
|
215
|
+
```
|
|
216
|
+
</Accordion>
|
|
217
|
+
|
|
218
|
+
<Accordion title="Wait for content to load">
|
|
219
|
+
If text isn't being found, the page may not be fully loaded. Add a wait or use `waitForText()`.
|
|
220
|
+
|
|
221
|
+
```javascript
|
|
222
|
+
// Wait for specific text to appear
|
|
223
|
+
await testdriver.waitForText("Welcome");
|
|
224
|
+
|
|
225
|
+
// Then run OCR
|
|
226
|
+
const result = await testdriver.ocr();
|
|
227
|
+
```
|
|
228
|
+
</Accordion>
|
|
229
|
+
</AccordionGroup>
|
|
230
|
+
|
|
231
|
+
## Related
|
|
232
|
+
|
|
233
|
+
- [find()](/v7/find) - AI-powered element location
|
|
234
|
+
- [assert()](/v7/assert) - Make AI-powered assertions about screen state
|
|
235
|
+
- [waitForText()](/v7/waiting-for-elements) - Wait for text to appear on screen
|
|
236
|
+
- [screenshot()](/v7/screenshot) - Capture screenshots
|
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
---
|
|
2
|
-
|
|
3
|
-
description: Click, type, hover, scroll and more with TestDriver
|
|
2
|
+
title: "Performing Actions"
|
|
3
|
+
description: "Click, type, hover, scroll and more with TestDriver"
|
|
4
|
+
icon: "computer-mouse"
|
|
4
5
|
---
|
|
5
|
-
<!-- Generated from performing-actions.mdx. DO NOT EDIT. -->
|
|
6
6
|
|
|
7
7
|
## Performing Actions
|
|
8
8
|
|
|
@@ -1,8 +1,9 @@
|
|
|
1
1
|
---
|
|
2
|
-
|
|
3
|
-
|
|
2
|
+
title: "pressKeys()"
|
|
3
|
+
sidebarTitle: "pressKeys"
|
|
4
|
+
description: "Press keyboard keys and shortcuts"
|
|
5
|
+
icon: "keyboard"
|
|
4
6
|
---
|
|
5
|
-
<!-- Generated from press-keys.mdx. DO NOT EDIT. -->
|
|
6
7
|
|
|
7
8
|
## Overview
|
|
8
9
|
|
|
@@ -1,8 +1,9 @@
|
|
|
1
1
|
---
|
|
2
|
-
|
|
3
|
-
|
|
2
|
+
title: "Quick Start"
|
|
3
|
+
sidebarTitle: "Quickstart"
|
|
4
|
+
description: "Run your first computer-use test in minutes."
|
|
5
|
+
icon: "rocket"
|
|
4
6
|
---
|
|
5
|
-
<!-- Generated from quickstart.mdx. DO NOT EDIT. -->
|
|
6
7
|
|
|
7
8
|
TestDriver makes it easy to write automated computer-use tests for web browsers, desktop apps, and more. Follow the directions below to run your first TestDriver test.
|
|
8
9
|
|
|
@@ -14,27 +15,12 @@ TestDriver makes it easy to write automated computer-use tests for web browsers,
|
|
|
14
15
|
Get started quickly with the TestDriver CLI.
|
|
15
16
|
|
|
16
17
|
<Steps>
|
|
17
|
-
<Step title="Create a TestDriver Account">
|
|
18
|
-
|
|
19
|
-
You will need a TestDriver account to get an API key.
|
|
20
|
-
|
|
21
|
-
<Card
|
|
22
|
-
title="Get an API Key"
|
|
23
|
-
icon="user-plus"
|
|
24
|
-
href="https://console.testdriver.ai/team"
|
|
25
|
-
arrow
|
|
26
|
-
horizontal
|
|
27
|
-
>
|
|
28
|
-
Start with 60 free device minutes, no credit-card required!
|
|
29
|
-
</Card>
|
|
30
|
-
|
|
31
|
-
</Step>
|
|
32
18
|
<Step title="Install TestDriver">
|
|
33
19
|
|
|
34
20
|
Use `npx` to quickly set up an example project:
|
|
35
21
|
|
|
36
22
|
```bash
|
|
37
|
-
npx testdriverai
|
|
23
|
+
npx testdriverai init
|
|
38
24
|
```
|
|
39
25
|
|
|
40
26
|
This will walk you through creating a new project folder, installing dependencies, and setting up your API key.
|
|
@@ -79,7 +65,7 @@ TestDriver makes it easy to write automated computer-use tests for web browsers,
|
|
|
79
65
|
Install Vitest and TestDriver as dev dependencies:
|
|
80
66
|
|
|
81
67
|
```bash
|
|
82
|
-
npm install --save-dev vitest testdriverai
|
|
68
|
+
npm install --save-dev vitest testdriverai
|
|
83
69
|
```
|
|
84
70
|
|
|
85
71
|
</Step>
|
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
---
|
|
2
|
-
|
|
3
|
-
description: Build maintainable test suites with reusable code patterns
|
|
2
|
+
title: "Reusable Code Snippets"
|
|
3
|
+
description: "Build maintainable test suites with reusable code patterns"
|
|
4
|
+
icon: "recycle"
|
|
4
5
|
---
|
|
5
|
-
<!-- Generated from reusable-code.mdx. DO NOT EDIT. -->
|
|
6
6
|
|
|
7
7
|
As your test suite grows, you'll want to extract common patterns into reusable code. This keeps tests DRY, readable, and easy to maintain.
|
|
8
8
|
|
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
---
|
|
2
|
-
|
|
3
|
-
description: Perform a right-click action to open context menus
|
|
2
|
+
title: "rightClick"
|
|
3
|
+
description: "Perform a right-click action to open context menus"
|
|
4
|
+
icon: "bars"
|
|
4
5
|
---
|
|
5
|
-
<!-- Generated from right-click.mdx. DO NOT EDIT. -->
|
|
6
6
|
|
|
7
7
|
## Overview
|
|
8
8
|
|
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
---
|
|
2
|
-
|
|
3
|
-
description: Run TestDriver tests with Vitest test runner
|
|
2
|
+
title: "Running Tests"
|
|
3
|
+
description: "Run TestDriver tests with Vitest test runner"
|
|
4
|
+
icon: "play"
|
|
4
5
|
---
|
|
5
|
-
<!-- Generated from running-tests.mdx. DO NOT EDIT. -->
|
|
6
6
|
|
|
7
7
|
Learn how to run TestDriver tests efficiently with Vitest's powerful test runner.
|
|
8
8
|
|
|
@@ -10,6 +10,10 @@ Learn how to run TestDriver tests efficiently with Vitest's powerful test runner
|
|
|
10
10
|
|
|
11
11
|
TestDriver works with Vitest's powerful test runner.
|
|
12
12
|
|
|
13
|
+
<Info>
|
|
14
|
+
Install Vitest globally for best results: `npm install vitest -g`
|
|
15
|
+
</Info>
|
|
16
|
+
|
|
13
17
|
### Run All Tests
|
|
14
18
|
|
|
15
19
|
```bash
|
|
@@ -1,13 +1,18 @@
|
|
|
1
1
|
---
|
|
2
|
-
|
|
3
|
-
|
|
2
|
+
title: "screenshot()"
|
|
3
|
+
sidebarTitle: "screenshot"
|
|
4
|
+
description: "Capture and save screenshots during test execution"
|
|
5
|
+
icon: "camera"
|
|
4
6
|
---
|
|
5
|
-
<!-- Generated from screenshot.mdx. DO NOT EDIT. -->
|
|
6
7
|
|
|
7
8
|
## Overview
|
|
8
9
|
|
|
9
10
|
Capture a screenshot of the current screen and automatically save it to a local file. Screenshots are organized by test file for easy debugging and review.
|
|
10
11
|
|
|
12
|
+
<Note>
|
|
13
|
+
**Automatic Screenshots (Default: Enabled)**: TestDriver automatically captures screenshots before and after every command (click, type, find, etc.). These are saved with descriptive filenames like `001-click-before-L42-submit-button.png` that include the line number from your test file. You can disable this with `autoScreenshots: false` in your TestDriver options.
|
|
14
|
+
</Note>
|
|
15
|
+
|
|
11
16
|
## Syntax
|
|
12
17
|
|
|
13
18
|
```javascript
|
|
@@ -32,12 +37,32 @@ Screenshots are automatically saved to `.testdriver/screenshots/<test-file-name>
|
|
|
32
37
|
.testdriver/
|
|
33
38
|
screenshots/
|
|
34
39
|
login.test/
|
|
35
|
-
|
|
36
|
-
|
|
40
|
+
001-find-before-L15-email-input.png # Auto: before find()
|
|
41
|
+
002-find-after-L15-email-input.png # Auto: after find()
|
|
42
|
+
003-click-before-L16-email-input.png # Auto: before click()
|
|
43
|
+
004-click-after-L16-email-input.png # Auto: after click()
|
|
44
|
+
005-type-before-L17-userexamplecom.png # Auto: before type()
|
|
45
|
+
006-type-after-L17-userexamplecom.png # Auto: after type()
|
|
46
|
+
custom-screenshot.png # Manual: screenshot("custom-screenshot")
|
|
37
47
|
checkout.test/
|
|
38
|
-
|
|
48
|
+
001-find-before-L12-checkout-button.png
|
|
49
|
+
...
|
|
39
50
|
```
|
|
40
51
|
|
|
52
|
+
### Automatic Screenshot Naming
|
|
53
|
+
|
|
54
|
+
When `autoScreenshots` is enabled (default), filenames follow this format:
|
|
55
|
+
|
|
56
|
+
`<seq>-<action>-<phase>-L<line>-<description>.png`
|
|
57
|
+
|
|
58
|
+
| Component | Description | Example |
|
|
59
|
+
|-----------|-------------|---------|
|
|
60
|
+
| `seq` | Sequential number (001, 002, ...) | `001` |
|
|
61
|
+
| `action` | Command name | `click`, `type`, `find` |
|
|
62
|
+
| `phase` | Before, after, or error | `before`, `after` |
|
|
63
|
+
| `L<line>` | Line number from test file | `L42` |
|
|
64
|
+
| `description` | Element description or action target | `submit-button` |
|
|
65
|
+
|
|
41
66
|
<Note>
|
|
42
67
|
The screenshot folder for each test file is automatically cleared when the test starts. This ensures you only see screenshots from the most recent test run.
|
|
43
68
|
</Note>
|
|
@@ -107,9 +132,66 @@ describe("Login Flow", () => {
|
|
|
107
132
|
});
|
|
108
133
|
```
|
|
109
134
|
|
|
135
|
+
## Automatic Screenshots
|
|
136
|
+
|
|
137
|
+
By default, TestDriver captures screenshots **automatically** before and after every command. This creates a complete visual timeline of your test execution without any additional code.
|
|
138
|
+
|
|
139
|
+
### Enabling/Disabling
|
|
140
|
+
|
|
141
|
+
```javascript
|
|
142
|
+
// Auto-screenshots enabled by default
|
|
143
|
+
const testdriver = TestDriver(context);
|
|
144
|
+
|
|
145
|
+
// Explicitly disable if needed (not recommended)
|
|
146
|
+
const testdriver = TestDriver(context, {
|
|
147
|
+
autoScreenshots: false
|
|
148
|
+
});
|
|
149
|
+
```
|
|
150
|
+
|
|
151
|
+
### What Gets Captured
|
|
152
|
+
|
|
153
|
+
Automatic screenshots are taken around these commands:
|
|
154
|
+
- `find()` / `findAll()`
|
|
155
|
+
- `click()` / `hover()` / `doubleClick()` / `rightClick()`
|
|
156
|
+
- `type()` / `pressKeys()`
|
|
157
|
+
- `scroll()` / `scrollUntilText()` / `scrollUntilImage()`
|
|
158
|
+
- `waitForText()` / `waitForImage()`
|
|
159
|
+
- `focusApplication()`
|
|
160
|
+
- `assert()` / `extract()` / `exec()`
|
|
161
|
+
|
|
162
|
+
### Example Output
|
|
163
|
+
|
|
164
|
+
For this test code:
|
|
165
|
+
|
|
166
|
+
```javascript
|
|
167
|
+
// Line 15: Find email input
|
|
168
|
+
const emailInput = await testdriver.find("email input");
|
|
169
|
+
// Line 16: Click it
|
|
170
|
+
await emailInput.click();
|
|
171
|
+
// Line 17: Type email
|
|
172
|
+
await testdriver.type("user@example.com");
|
|
173
|
+
```
|
|
174
|
+
|
|
175
|
+
TestDriver automatically saves:
|
|
176
|
+
|
|
177
|
+
```
|
|
178
|
+
001-find-before-L15-email-input.png
|
|
179
|
+
002-find-after-L15-email-input.png
|
|
180
|
+
003-click-before-L16-email-input.png
|
|
181
|
+
004-click-after-L16-email-input.png
|
|
182
|
+
005-type-before-L17-userexamplecom.png
|
|
183
|
+
006-type-after-L17-userexamplecom.png
|
|
184
|
+
```
|
|
185
|
+
|
|
186
|
+
If an error occurs, the phase will be `error` instead of `after`.
|
|
187
|
+
|
|
110
188
|
## Best Practices
|
|
111
189
|
|
|
112
190
|
<AccordionGroup>
|
|
191
|
+
<Accordion title="Let automatic screenshots do the work">
|
|
192
|
+
With `autoScreenshots: true` (default), you get comprehensive coverage without adding manual `screenshot()` calls. Only add manual screenshots for specific named checkpoints.
|
|
193
|
+
</Accordion>
|
|
194
|
+
|
|
113
195
|
<Accordion title="Use screenshots for debugging flaky tests">
|
|
114
196
|
When a test fails intermittently, add screenshots at key steps to capture the actual screen state. This helps identify timing issues or unexpected UI states.
|
|
115
197
|
</Accordion>
|
|
@@ -1,13 +1,29 @@
|
|
|
1
1
|
---
|
|
2
|
-
|
|
3
|
-
|
|
2
|
+
title: "scroll()"
|
|
3
|
+
sidebarTitle: "scroll"
|
|
4
|
+
description: "Scroll pages and elements"
|
|
5
|
+
icon: "arrows-up-down"
|
|
4
6
|
---
|
|
5
|
-
<!-- Generated from scroll.mdx. DO NOT EDIT. -->
|
|
6
7
|
|
|
7
8
|
## Overview
|
|
8
9
|
|
|
9
10
|
Scroll the page or active element in any direction using mouse wheel or keyboard.
|
|
10
11
|
|
|
12
|
+
<Warning>
|
|
13
|
+
**Focus Requirements**
|
|
14
|
+
|
|
15
|
+
Scrolling requires the page or a frame to be focused. If an input field or other interactive element has focus, scroll commands may not work as expected. Before scrolling, ensure focus is on the page by:
|
|
16
|
+
- Clicking on a non-interactive area (e.g., page background)
|
|
17
|
+
- Pressing the Escape key to unfocus interactive elements
|
|
18
|
+
- Clicking outside of input fields or text areas
|
|
19
|
+
|
|
20
|
+
**If scroll is still not working**, try using Page Down/Page Up keys directly:
|
|
21
|
+
```javascript
|
|
22
|
+
await testdriver.pressKeys(['pagedown']); // Scroll down
|
|
23
|
+
await testdriver.pressKeys(['pageup']); // Scroll up
|
|
24
|
+
```
|
|
25
|
+
</Warning>
|
|
26
|
+
|
|
11
27
|
## Syntax
|
|
12
28
|
|
|
13
29
|
```javascript
|
|
@@ -133,6 +149,27 @@ await testdriver.scrollUntilImage('loading spinner', 'down', 5000, 'keyboard', n
|
|
|
133
149
|
|
|
134
150
|
## Best Practices
|
|
135
151
|
|
|
152
|
+
<Check>
|
|
153
|
+
**Ensure page has focus before scrolling**
|
|
154
|
+
|
|
155
|
+
```javascript
|
|
156
|
+
// After typing in an input, unfocus it first
|
|
157
|
+
await testdriver.find('email input').click();
|
|
158
|
+
await testdriver.type('user@example.com');
|
|
159
|
+
|
|
160
|
+
// Click elsewhere or press Escape before scrolling
|
|
161
|
+
await testdriver.pressKeys(['escape']);
|
|
162
|
+
// Or click a non-interactive area
|
|
163
|
+
// await testdriver.find('page background').click();
|
|
164
|
+
|
|
165
|
+
// Now scroll will work properly
|
|
166
|
+
await testdriver.scroll('down', 300);
|
|
167
|
+
|
|
168
|
+
// If scroll still doesn't work, use Page Down directly
|
|
169
|
+
// await testdriver.pressKeys(['pagedown']);
|
|
170
|
+
```
|
|
171
|
+
</Check>
|
|
172
|
+
|
|
136
173
|
<Check>
|
|
137
174
|
**Choose the right scroll method**
|
|
138
175
|
|
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
---
|
|
2
|
-
|
|
3
|
-
description: Securely manage passwords and sensitive data in your tests
|
|
2
|
+
title: "Using Secrets"
|
|
3
|
+
description: "Securely manage passwords and sensitive data in your tests"
|
|
4
|
+
icon: "key"
|
|
4
5
|
---
|
|
5
|
-
<!-- Generated from secrets.mdx. DO NOT EDIT. -->
|
|
6
6
|
|
|
7
7
|
Protect sensitive information like passwords, API keys, and tokens in your TestDriver tests.
|
|
8
8
|
|
|
@@ -1,8 +1,9 @@
|
|
|
1
1
|
---
|
|
2
|
-
|
|
3
|
-
|
|
2
|
+
title: "Self-Hosted"
|
|
3
|
+
sidebarTitle: "Self-Hosted"
|
|
4
|
+
description: "Unlimited test execution, complete privacy, and the ability to customize everything — all for a predictable flat license fee."
|
|
5
|
+
icon: "server"
|
|
4
6
|
---
|
|
5
|
-
<!-- Generated from self-hosted.mdx. DO NOT EDIT. -->
|
|
6
7
|
|
|
7
8
|
Self-hosted pricing is based on **parallel test capacity**: the number of tests you can run simultaneously on **your infrastructure**.
|
|
8
9
|
|
|
@@ -1,8 +1,9 @@
|
|
|
1
1
|
---
|
|
2
|
-
|
|
3
|
-
|
|
2
|
+
title: "type()"
|
|
3
|
+
sidebarTitle: "type"
|
|
4
|
+
description: "Type text into focused input fields"
|
|
5
|
+
icon: "keyboard"
|
|
4
6
|
---
|
|
5
|
-
<!-- Generated from type.mdx. DO NOT EDIT. -->
|
|
6
7
|
|
|
7
8
|
## Overview
|
|
8
9
|
|
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
---
|
|
2
|
-
|
|
3
|
-
description: Use dynamic data and secure secrets in your tests
|
|
2
|
+
title: "Using Variables"
|
|
3
|
+
description: "Use dynamic data and secure secrets in your tests"
|
|
4
|
+
icon: "square-root-variable"
|
|
4
5
|
---
|
|
5
|
-
<!-- Generated from variables.mdx. DO NOT EDIT. -->
|
|
6
6
|
|
|
7
7
|
Scale your testing with dynamic data and secure secrets management. Choose the right approach based on your testing needs.
|
|
8
8
|
|
package/{ai/skills/testdriver:waiting-for-elements/SKILL.md → docs/v7/waiting-for-elements.mdx}
RENAMED
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
---
|
|
2
|
-
|
|
3
|
-
description: Handle async operations and prevent flaky tests
|
|
2
|
+
title: "Waiting for Elements"
|
|
3
|
+
description: "Handle async operations and prevent flaky tests"
|
|
4
|
+
icon: "clock"
|
|
4
5
|
---
|
|
5
|
-
<!-- Generated from waiting-for-elements.mdx. DO NOT EDIT. -->
|
|
6
6
|
|
|
7
7
|
## Waiting for Elements
|
|
8
8
|
|
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
---
|
|
2
|
-
|
|
3
|
-
description: Reliably test your most difficult user flows
|
|
2
|
+
title: "What is TestDriver?"
|
|
3
|
+
description: "Reliably test your most difficult user flows"
|
|
4
|
+
icon: "circle-info"
|
|
4
5
|
---
|
|
5
|
-
<!-- Generated from what-is-testdriver.mdx. DO NOT EDIT. -->
|
|
6
6
|
|
|
7
7
|
## The problem with modern testing tools
|
|
8
8
|
|