@appium/mcp-documentation 1.0.3 → 1.0.5
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/CHANGELOG.md +17 -0
- package/package.json +4 -7
- package/src/resources/submodules/appium/.github/PULL_REQUEST_TEMPLATE.md +28 -0
- package/src/resources/submodules/appium/.github/copilot-instructions.md +9 -0
- package/src/resources/submodules/appium/CHANGELOG.md +45 -0
- package/src/resources/submodules/appium/GOVERNANCE.md +189 -0
- package/src/resources/submodules/appium/README.md +221 -0
- package/src/resources/submodules/appium/ROADMAP.md +30 -0
- package/src/resources/submodules/appium/SPONSORS.md +3 -0
- package/src/resources/submodules/appium/docs/README.md +6 -0
- package/src/resources/submodules/appium/docs/payout.md +35 -0
- package/src/resources/submodules/appium/packages/appium/CHANGELOG.md +1547 -0
- package/src/resources/submodules/appium/packages/appium/README.md +221 -0
- package/src/resources/submodules/appium/packages/appium/docs/en/blog/index.md +2 -0
- package/src/resources/submodules/appium/packages/appium/docs/en/blog/posts/announcing-appiumconf2024.md +45 -0
- package/src/resources/submodules/appium/packages/appium/docs/en/blog/posts/announcing-browserstack-as-strategic-partner.md +46 -0
- package/src/resources/submodules/appium/packages/appium/docs/en/blog/posts/announcing-headspin-as-development-partner.md +47 -0
- package/src/resources/submodules/appium/packages/appium/docs/en/blog/posts/announcing-lambdatest-as-development-partner.md +36 -0
- package/src/resources/submodules/appium/packages/appium/docs/en/blog/posts/announcing-lambdatest-as-strategic-partner.md +42 -0
- package/src/resources/submodules/appium/packages/appium/docs/en/blog/posts/announcing-sauce-labs-as-strategic-partner.md +36 -0
- package/src/resources/submodules/appium/packages/appium/docs/en/blog/posts/announcing-sponsorship-program.md +48 -0
- package/src/resources/submodules/appium/packages/appium/docs/en/blog/posts/appium3.md +40 -0
- package/src/resources/submodules/appium/packages/appium/docs/en/blog/posts/hello-world.md +15 -0
- package/src/resources/submodules/appium/packages/appium/docs/en/contributing/index.md +150 -0
- package/src/resources/submodules/appium/packages/appium/docs/en/developing/build-docs.md +86 -0
- package/src/resources/submodules/appium/packages/appium/docs/en/developing/build-doctor-checks.md +141 -0
- package/src/resources/submodules/appium/packages/appium/docs/en/developing/build-drivers.md +1002 -0
- package/src/resources/submodules/appium/packages/appium/docs/en/developing/build-plugins.md +523 -0
- package/src/resources/submodules/appium/packages/appium/docs/en/developing/config-system.md +451 -0
- package/src/resources/submodules/appium/packages/appium/docs/en/developing/index.md +18 -0
- package/src/resources/submodules/appium/packages/appium/docs/en/developing/sensitive.md +49 -0
- package/src/resources/submodules/appium/packages/appium/docs/en/ecosystem/clients.md +132 -0
- package/src/resources/submodules/appium/packages/appium/docs/en/ecosystem/drivers.md +207 -0
- package/src/resources/submodules/appium/packages/appium/docs/en/ecosystem/index.md +45 -0
- package/src/resources/submodules/appium/packages/appium/docs/en/ecosystem/plugins.md +138 -0
- package/src/resources/submodules/appium/packages/appium/docs/en/ecosystem/tools.md +106 -0
- package/src/resources/submodules/appium/packages/appium/docs/en/guides/branch-testing.md +57 -0
- package/src/resources/submodules/appium/packages/appium/docs/en/guides/caching.md +76 -0
- package/src/resources/submodules/appium/packages/appium/docs/en/guides/caps.md +271 -0
- package/src/resources/submodules/appium/packages/appium/docs/en/guides/config.md +98 -0
- package/src/resources/submodules/appium/packages/appium/docs/en/guides/context.md +44 -0
- package/src/resources/submodules/appium/packages/appium/docs/en/guides/event-timing.md +73 -0
- package/src/resources/submodules/appium/packages/appium/docs/en/guides/execute-methods.md +122 -0
- package/src/resources/submodules/appium/packages/appium/docs/en/guides/grid.md +178 -0
- package/src/resources/submodules/appium/packages/appium/docs/en/guides/headers.md +17 -0
- package/src/resources/submodules/appium/packages/appium/docs/en/guides/log-filters.md +86 -0
- package/src/resources/submodules/appium/packages/appium/docs/en/guides/managing-exts.md +87 -0
- package/src/resources/submodules/appium/packages/appium/docs/en/guides/migrating-1-to-2.md +368 -0
- package/src/resources/submodules/appium/packages/appium/docs/en/guides/migrating-2-to-3.md +464 -0
- package/src/resources/submodules/appium/packages/appium/docs/en/guides/security.md +87 -0
- package/src/resources/submodules/appium/packages/appium/docs/en/guides/settings.md +68 -0
- package/src/resources/submodules/appium/packages/appium/docs/en/guides/tls.md +42 -0
- package/src/resources/submodules/appium/packages/appium/docs/en/index.md +59 -0
- package/src/resources/submodules/appium/packages/appium/docs/en/intro/appium.md +202 -0
- package/src/resources/submodules/appium/packages/appium/docs/en/intro/clients.md +127 -0
- package/src/resources/submodules/appium/packages/appium/docs/en/intro/drivers.md +188 -0
- package/src/resources/submodules/appium/packages/appium/docs/en/intro/history.md +196 -0
- package/src/resources/submodules/appium/packages/appium/docs/en/intro/index.md +39 -0
- package/src/resources/submodules/appium/packages/appium/docs/en/quickstart/index.md +29 -0
- package/src/resources/submodules/appium/packages/appium/docs/en/quickstart/install.md +50 -0
- package/src/resources/submodules/appium/packages/appium/docs/en/quickstart/next-steps.md +23 -0
- package/src/resources/submodules/appium/packages/appium/docs/en/quickstart/requirements.md +29 -0
- package/src/resources/submodules/appium/packages/appium/docs/en/quickstart/test-dotnet.md +105 -0
- package/src/resources/submodules/appium/packages/appium/docs/en/quickstart/test-java.md +23 -0
- package/src/resources/submodules/appium/packages/appium/docs/en/quickstart/test-js.md +75 -0
- package/src/resources/submodules/appium/packages/appium/docs/en/quickstart/test-py.md +60 -0
- package/src/resources/submodules/appium/packages/appium/docs/en/quickstart/test-rb.md +83 -0
- package/src/resources/submodules/appium/packages/appium/docs/en/quickstart/uiauto2-driver.md +144 -0
- package/src/resources/submodules/appium/packages/appium/docs/en/reference/api/appium.md +394 -0
- package/src/resources/submodules/appium/packages/appium/docs/en/reference/api/bidi.md +70 -0
- package/src/resources/submodules/appium/packages/appium/docs/en/reference/api/index.md +30 -0
- package/src/resources/submodules/appium/packages/appium/docs/en/reference/api/jsonwp.md +214 -0
- package/src/resources/submodules/appium/packages/appium/docs/en/reference/api/mjsonwp.md +151 -0
- package/src/resources/submodules/appium/packages/appium/docs/en/reference/api/others.md +736 -0
- package/src/resources/submodules/appium/packages/appium/docs/en/reference/api/plugins.md +289 -0
- package/src/resources/submodules/appium/packages/appium/docs/en/reference/api/webdriver.md +1114 -0
- package/src/resources/submodules/appium/packages/appium/docs/en/reference/cli/env-vars.md +31 -0
- package/src/resources/submodules/appium/packages/appium/docs/en/reference/cli/extensions.md +246 -0
- package/src/resources/submodules/appium/packages/appium/docs/en/reference/cli/index.md +36 -0
- package/src/resources/submodules/appium/packages/appium/docs/en/reference/cli/insecure-features.md +24 -0
- package/src/resources/submodules/appium/packages/appium/docs/en/reference/cli/server.md +78 -0
- package/src/resources/submodules/appium/packages/appium/docs/en/reference/cli/setup.md +76 -0
- package/src/resources/submodules/appium/packages/appium/docs/en/reference/index.md +31 -0
- package/src/resources/submodules/appium/packages/appium/docs/en/reference/session/caps.md +56 -0
- package/src/resources/submodules/appium/packages/appium/docs/en/reference/session/index.md +23 -0
- package/src/resources/submodules/appium/packages/appium/docs/en/resources/index.md +28 -0
- package/src/resources/submodules/appium/packages/appium/docs/en/sponsors/index.md +69 -0
- package/src/resources/submodules/appium/packages/appium/docs/ja/blog/index.md +2 -0
- package/src/resources/submodules/appium/packages/appium/docs/ja/blog/posts/announcing-appiumconf2024.md +45 -0
- package/src/resources/submodules/appium/packages/appium/docs/ja/blog/posts/announcing-browserstack-as-strategic-partner.md +46 -0
- package/src/resources/submodules/appium/packages/appium/docs/ja/blog/posts/announcing-headspin-as-development-partner.md +47 -0
- package/src/resources/submodules/appium/packages/appium/docs/ja/blog/posts/announcing-lambdatest-as-development-partner.md +34 -0
- package/src/resources/submodules/appium/packages/appium/docs/ja/blog/posts/announcing-lambdatest-as-strategic-partner.md +41 -0
- package/src/resources/submodules/appium/packages/appium/docs/ja/blog/posts/announcing-sauce-labs-as-strategic-partner.md +36 -0
- package/src/resources/submodules/appium/packages/appium/docs/ja/blog/posts/announcing-sponsorship-program.md +48 -0
- package/src/resources/submodules/appium/packages/appium/docs/ja/blog/posts/appium3.md +40 -0
- package/src/resources/submodules/appium/packages/appium/docs/ja/blog/posts/hello-world.md +15 -0
- package/src/resources/submodules/appium/packages/appium/docs/ja/contributing/index.md +158 -0
- package/src/resources/submodules/appium/packages/appium/docs/ja/developing/build-docs.md +86 -0
- package/src/resources/submodules/appium/packages/appium/docs/ja/developing/build-doctor-checks.md +141 -0
- package/src/resources/submodules/appium/packages/appium/docs/ja/developing/build-drivers.md +1010 -0
- package/src/resources/submodules/appium/packages/appium/docs/ja/developing/build-plugins.md +529 -0
- package/src/resources/submodules/appium/packages/appium/docs/ja/developing/config-system.md +468 -0
- package/src/resources/submodules/appium/packages/appium/docs/ja/developing/index.md +18 -0
- package/src/resources/submodules/appium/packages/appium/docs/ja/developing/sensitive.md +49 -0
- package/src/resources/submodules/appium/packages/appium/docs/ja/ecosystem/clients.md +143 -0
- package/src/resources/submodules/appium/packages/appium/docs/ja/ecosystem/drivers.md +219 -0
- package/src/resources/submodules/appium/packages/appium/docs/ja/ecosystem/index.md +45 -0
- package/src/resources/submodules/appium/packages/appium/docs/ja/ecosystem/plugins.md +140 -0
- package/src/resources/submodules/appium/packages/appium/docs/ja/ecosystem/tools.md +115 -0
- package/src/resources/submodules/appium/packages/appium/docs/ja/guides/branch-testing.md +57 -0
- package/src/resources/submodules/appium/packages/appium/docs/ja/guides/caching.md +78 -0
- package/src/resources/submodules/appium/packages/appium/docs/ja/guides/caps.md +276 -0
- package/src/resources/submodules/appium/packages/appium/docs/ja/guides/config.md +102 -0
- package/src/resources/submodules/appium/packages/appium/docs/ja/guides/context.md +44 -0
- package/src/resources/submodules/appium/packages/appium/docs/ja/guides/event-timing.md +75 -0
- package/src/resources/submodules/appium/packages/appium/docs/ja/guides/execute-methods.md +142 -0
- package/src/resources/submodules/appium/packages/appium/docs/ja/guides/grid.md +178 -0
- package/src/resources/submodules/appium/packages/appium/docs/ja/guides/headers.md +17 -0
- package/src/resources/submodules/appium/packages/appium/docs/ja/guides/log-filters.md +86 -0
- package/src/resources/submodules/appium/packages/appium/docs/ja/guides/managing-exts.md +89 -0
- package/src/resources/submodules/appium/packages/appium/docs/ja/guides/migrating-1-to-2.md +402 -0
- package/src/resources/submodules/appium/packages/appium/docs/ja/guides/migrating-2-to-3.md +458 -0
- package/src/resources/submodules/appium/packages/appium/docs/ja/guides/security.md +89 -0
- package/src/resources/submodules/appium/packages/appium/docs/ja/guides/settings.md +70 -0
- package/src/resources/submodules/appium/packages/appium/docs/ja/guides/tls.md +43 -0
- package/src/resources/submodules/appium/packages/appium/docs/ja/index.md +55 -0
- package/src/resources/submodules/appium/packages/appium/docs/ja/intro/appium.md +191 -0
- package/src/resources/submodules/appium/packages/appium/docs/ja/intro/clients.md +139 -0
- package/src/resources/submodules/appium/packages/appium/docs/ja/intro/drivers.md +188 -0
- package/src/resources/submodules/appium/packages/appium/docs/ja/intro/history.md +196 -0
- package/src/resources/submodules/appium/packages/appium/docs/ja/intro/index.md +39 -0
- package/src/resources/submodules/appium/packages/appium/docs/ja/quickstart/index.md +23 -0
- package/src/resources/submodules/appium/packages/appium/docs/ja/quickstart/install.md +47 -0
- package/src/resources/submodules/appium/packages/appium/docs/ja/quickstart/next-steps.md +19 -0
- package/src/resources/submodules/appium/packages/appium/docs/ja/quickstart/requirements.md +29 -0
- package/src/resources/submodules/appium/packages/appium/docs/ja/quickstart/test-dotnet.md +107 -0
- package/src/resources/submodules/appium/packages/appium/docs/ja/quickstart/test-java.md +23 -0
- package/src/resources/submodules/appium/packages/appium/docs/ja/quickstart/test-js.md +77 -0
- package/src/resources/submodules/appium/packages/appium/docs/ja/quickstart/test-py.md +63 -0
- package/src/resources/submodules/appium/packages/appium/docs/ja/quickstart/test-rb.md +85 -0
- package/src/resources/submodules/appium/packages/appium/docs/ja/quickstart/uiauto2-driver.md +148 -0
- package/src/resources/submodules/appium/packages/appium/docs/ja/reference/api/appium.md +395 -0
- package/src/resources/submodules/appium/packages/appium/docs/ja/reference/api/bidi.md +71 -0
- package/src/resources/submodules/appium/packages/appium/docs/ja/reference/api/index.md +30 -0
- package/src/resources/submodules/appium/packages/appium/docs/ja/reference/api/jsonwp.md +215 -0
- package/src/resources/submodules/appium/packages/appium/docs/ja/reference/api/mjsonwp.md +152 -0
- package/src/resources/submodules/appium/packages/appium/docs/ja/reference/api/others.md +737 -0
- package/src/resources/submodules/appium/packages/appium/docs/ja/reference/api/plugins.md +291 -0
- package/src/resources/submodules/appium/packages/appium/docs/ja/reference/api/webdriver.md +1114 -0
- package/src/resources/submodules/appium/packages/appium/docs/ja/reference/cli/env-vars.md +31 -0
- package/src/resources/submodules/appium/packages/appium/docs/ja/reference/cli/extensions.md +247 -0
- package/src/resources/submodules/appium/packages/appium/docs/ja/reference/cli/index.md +36 -0
- package/src/resources/submodules/appium/packages/appium/docs/ja/reference/cli/insecure-features.md +23 -0
- package/src/resources/submodules/appium/packages/appium/docs/ja/reference/cli/server.md +78 -0
- package/src/resources/submodules/appium/packages/appium/docs/ja/reference/cli/setup.md +78 -0
- package/src/resources/submodules/appium/packages/appium/docs/ja/reference/index.md +31 -0
- package/src/resources/submodules/appium/packages/appium/docs/ja/reference/session/caps.md +56 -0
- package/src/resources/submodules/appium/packages/appium/docs/ja/reference/session/index.md +23 -0
- package/src/resources/submodules/appium/packages/appium/docs/ja/resources/index.md +28 -0
- package/src/resources/submodules/appium/packages/appium/docs/ja/sponsors/index.md +66 -0
- package/src/resources/submodules/appium/packages/appium/docs/overrides/assets/images/appium-logo-horiz-white.png +0 -0
- package/src/resources/submodules/appium/packages/appium/docs/overrides/assets/images/appium-logo-horiz.png +0 -0
- package/src/resources/submodules/appium/packages/appium/docs/overrides/assets/images/appium-logo-white.png +0 -0
- package/src/resources/submodules/appium/packages/appium/docs/overrides/assets/images/appium-logo.png +0 -0
- package/src/resources/submodules/appium/packages/appium/docs/overrides/assets/images/sponsor-logo-browserstack-dark.png +0 -0
- package/src/resources/submodules/appium/packages/appium/docs/overrides/assets/images/sponsor-logo-browserstack-light.png +0 -0
- package/src/resources/submodules/appium/packages/appium/docs/overrides/assets/images/sponsor-logo-lambdatest-dark.png +0 -0
- package/src/resources/submodules/appium/packages/appium/docs/overrides/assets/images/sponsor-logo-lambdatest-light.png +0 -0
- package/src/resources/submodules/appium/packages/appium/docs/overrides/assets/images/sponsor-logo-sauce.png +0 -0
- package/src/resources/submodules/appium/packages/appium/docs/overrides/assets/images/sponsor-logo-testmuai-dark.png +0 -0
- package/src/resources/submodules/appium/packages/appium/docs/overrides/assets/images/sponsor-logo-testmuai-light.png +0 -0
- package/src/resources/submodules/appium/packages/appium/docs/zh/blog/index.md +2 -0
- package/src/resources/submodules/appium/packages/appium/docs/zh/blog/posts/announcing-appiumconf2024.md +45 -0
- package/src/resources/submodules/appium/packages/appium/docs/zh/blog/posts/announcing-browserstack-as-strategic-partner.md +46 -0
- package/src/resources/submodules/appium/packages/appium/docs/zh/blog/posts/announcing-headspin-as-development-partner.md +47 -0
- package/src/resources/submodules/appium/packages/appium/docs/zh/blog/posts/announcing-lambdatest-as-development-partner.md +34 -0
- package/src/resources/submodules/appium/packages/appium/docs/zh/blog/posts/announcing-lambdatest-as-strategic-partner.md +41 -0
- package/src/resources/submodules/appium/packages/appium/docs/zh/blog/posts/announcing-sauce-labs-as-strategic-partner.md +36 -0
- package/src/resources/submodules/appium/packages/appium/docs/zh/blog/posts/announcing-sponsorship-program.md +48 -0
- package/src/resources/submodules/appium/packages/appium/docs/zh/blog/posts/appium3.md +40 -0
- package/src/resources/submodules/appium/packages/appium/docs/zh/blog/posts/hello-world.md +15 -0
- package/src/resources/submodules/appium/packages/appium/docs/zh/contributing/index.md +132 -0
- package/src/resources/submodules/appium/packages/appium/docs/zh/developing/build-docs.md +86 -0
- package/src/resources/submodules/appium/packages/appium/docs/zh/developing/build-doctor-checks.md +141 -0
- package/src/resources/submodules/appium/packages/appium/docs/zh/developing/build-drivers.md +1010 -0
- package/src/resources/submodules/appium/packages/appium/docs/zh/developing/build-plugins.md +529 -0
- package/src/resources/submodules/appium/packages/appium/docs/zh/developing/config-system.md +468 -0
- package/src/resources/submodules/appium/packages/appium/docs/zh/developing/index.md +18 -0
- package/src/resources/submodules/appium/packages/appium/docs/zh/developing/sensitive.md +49 -0
- package/src/resources/submodules/appium/packages/appium/docs/zh/ecosystem/clients.md +143 -0
- package/src/resources/submodules/appium/packages/appium/docs/zh/ecosystem/drivers.md +219 -0
- package/src/resources/submodules/appium/packages/appium/docs/zh/ecosystem/index.md +45 -0
- package/src/resources/submodules/appium/packages/appium/docs/zh/ecosystem/plugins.md +140 -0
- package/src/resources/submodules/appium/packages/appium/docs/zh/ecosystem/tools.md +115 -0
- package/src/resources/submodules/appium/packages/appium/docs/zh/guides/branch-testing.md +57 -0
- package/src/resources/submodules/appium/packages/appium/docs/zh/guides/caching.md +78 -0
- package/src/resources/submodules/appium/packages/appium/docs/zh/guides/caps.md +279 -0
- package/src/resources/submodules/appium/packages/appium/docs/zh/guides/config.md +102 -0
- package/src/resources/submodules/appium/packages/appium/docs/zh/guides/context.md +44 -0
- package/src/resources/submodules/appium/packages/appium/docs/zh/guides/event-timing.md +75 -0
- package/src/resources/submodules/appium/packages/appium/docs/zh/guides/execute-methods.md +142 -0
- package/src/resources/submodules/appium/packages/appium/docs/zh/guides/grid.md +178 -0
- package/src/resources/submodules/appium/packages/appium/docs/zh/guides/headers.md +17 -0
- package/src/resources/submodules/appium/packages/appium/docs/zh/guides/log-filters.md +86 -0
- package/src/resources/submodules/appium/packages/appium/docs/zh/guides/managing-exts.md +89 -0
- package/src/resources/submodules/appium/packages/appium/docs/zh/guides/migrating-1-to-2.md +410 -0
- package/src/resources/submodules/appium/packages/appium/docs/zh/guides/migrating-2-to-3.md +459 -0
- package/src/resources/submodules/appium/packages/appium/docs/zh/guides/security.md +89 -0
- package/src/resources/submodules/appium/packages/appium/docs/zh/guides/settings.md +70 -0
- package/src/resources/submodules/appium/packages/appium/docs/zh/guides/tls.md +43 -0
- package/src/resources/submodules/appium/packages/appium/docs/zh/index.md +54 -0
- package/src/resources/submodules/appium/packages/appium/docs/zh/intro/appium.md +91 -0
- package/src/resources/submodules/appium/packages/appium/docs/zh/intro/clients.md +100 -0
- package/src/resources/submodules/appium/packages/appium/docs/zh/intro/drivers.md +101 -0
- package/src/resources/submodules/appium/packages/appium/docs/zh/intro/history.md +72 -0
- package/src/resources/submodules/appium/packages/appium/docs/zh/intro/index.md +36 -0
- package/src/resources/submodules/appium/packages/appium/docs/zh/quickstart/index.md +23 -0
- package/src/resources/submodules/appium/packages/appium/docs/zh/quickstart/install.md +47 -0
- package/src/resources/submodules/appium/packages/appium/docs/zh/quickstart/next-steps.md +19 -0
- package/src/resources/submodules/appium/packages/appium/docs/zh/quickstart/requirements.md +21 -0
- package/src/resources/submodules/appium/packages/appium/docs/zh/quickstart/test-dotnet.md +99 -0
- package/src/resources/submodules/appium/packages/appium/docs/zh/quickstart/test-java.md +20 -0
- package/src/resources/submodules/appium/packages/appium/docs/zh/quickstart/test-js.md +62 -0
- package/src/resources/submodules/appium/packages/appium/docs/zh/quickstart/test-py.md +57 -0
- package/src/resources/submodules/appium/packages/appium/docs/zh/quickstart/test-rb.md +80 -0
- package/src/resources/submodules/appium/packages/appium/docs/zh/quickstart/uiauto2-driver.md +119 -0
- package/src/resources/submodules/appium/packages/appium/docs/zh/reference/api/appium.md +395 -0
- package/src/resources/submodules/appium/packages/appium/docs/zh/reference/api/bidi.md +71 -0
- package/src/resources/submodules/appium/packages/appium/docs/zh/reference/api/index.md +30 -0
- package/src/resources/submodules/appium/packages/appium/docs/zh/reference/api/jsonwp.md +215 -0
- package/src/resources/submodules/appium/packages/appium/docs/zh/reference/api/mjsonwp.md +152 -0
- package/src/resources/submodules/appium/packages/appium/docs/zh/reference/api/others.md +737 -0
- package/src/resources/submodules/appium/packages/appium/docs/zh/reference/api/plugins.md +291 -0
- package/src/resources/submodules/appium/packages/appium/docs/zh/reference/api/webdriver.md +1114 -0
- package/src/resources/submodules/appium/packages/appium/docs/zh/reference/cli/env-vars.md +31 -0
- package/src/resources/submodules/appium/packages/appium/docs/zh/reference/cli/extensions.md +247 -0
- package/src/resources/submodules/appium/packages/appium/docs/zh/reference/cli/index.md +36 -0
- package/src/resources/submodules/appium/packages/appium/docs/zh/reference/cli/insecure-features.md +23 -0
- package/src/resources/submodules/appium/packages/appium/docs/zh/reference/cli/server.md +78 -0
- package/src/resources/submodules/appium/packages/appium/docs/zh/reference/cli/setup.md +78 -0
- package/src/resources/submodules/appium/packages/appium/docs/zh/reference/index.md +31 -0
- package/src/resources/submodules/appium/packages/appium/docs/zh/reference/session/caps.md +56 -0
- package/src/resources/submodules/appium/packages/appium/docs/zh/reference/session/index.md +23 -0
- package/src/resources/submodules/appium/packages/appium/docs/zh/resources/index.md +28 -0
- package/src/resources/submodules/appium/packages/appium/docs/zh/sponsors/index.md +66 -0
- package/src/resources/submodules/appium/packages/appium/types/manifest/README.md +30 -0
- package/src/resources/submodules/appium/packages/base-driver/CHANGELOG.md +1244 -0
- package/src/resources/submodules/appium/packages/base-driver/README.md +15 -0
- package/src/resources/submodules/appium/packages/base-driver/docs/mjsonwp/errors.md +82 -0
- package/src/resources/submodules/appium/packages/base-driver/docs/mjsonwp/protocol-methods.md +182 -0
- package/src/resources/submodules/appium/packages/base-driver/static/appium.png +0 -0
- package/src/resources/submodules/appium/packages/base-plugin/CHANGELOG.md +764 -0
- package/src/resources/submodules/appium/packages/base-plugin/README.md +15 -0
- package/src/resources/submodules/appium/packages/docutils/CHANGELOG.md +1038 -0
- package/src/resources/submodules/appium/packages/docutils/README.md +27 -0
- package/src/resources/submodules/appium/packages/driver-test-support/CHANGELOG.md +790 -0
- package/src/resources/submodules/appium/packages/driver-test-support/README.md +103 -0
- package/src/resources/submodules/appium/packages/eslint-config-appium-ts/CHANGELOG.md +256 -0
- package/src/resources/submodules/appium/packages/eslint-config-appium-ts/README.md +47 -0
- package/src/resources/submodules/appium/packages/execute-driver-plugin/CHANGELOG.md +671 -0
- package/src/resources/submodules/appium/packages/execute-driver-plugin/README.md +55 -0
- package/src/resources/submodules/appium/packages/fake-driver/CHANGELOG.md +603 -0
- package/src/resources/submodules/appium/packages/fake-driver/README.md +7 -0
- package/src/resources/submodules/appium/packages/fake-driver/lib/screen.png +0 -0
- package/src/resources/submodules/appium/packages/fake-plugin/CHANGELOG.md +780 -0
- package/src/resources/submodules/appium/packages/fake-plugin/README.md +7 -0
- package/src/resources/submodules/appium/packages/images-plugin/CHANGELOG.md +691 -0
- package/src/resources/submodules/appium/packages/images-plugin/README.md +27 -0
- package/src/resources/submodules/appium/packages/images-plugin/docs/find-by-image.md +65 -0
- package/src/resources/submodules/appium/packages/images-plugin/docs/image-comparison.md +203 -0
- package/src/resources/submodules/appium/packages/images-plugin/test/fixtures/appstore.png +0 -0
- package/src/resources/submodules/appium/packages/images-plugin/test/fixtures/img1.png +0 -0
- package/src/resources/submodules/appium/packages/images-plugin/test/fixtures/img2.png +0 -0
- package/src/resources/submodules/appium/packages/images-plugin/test/fixtures/img2_part.png +0 -0
- package/src/resources/submodules/appium/packages/logger/CHANGELOG.md +212 -0
- package/src/resources/submodules/appium/packages/logger/README.md +31 -0
- package/src/resources/submodules/appium/packages/opencv/CHANGELOG.md +446 -0
- package/src/resources/submodules/appium/packages/opencv/README.md +68 -0
- package/src/resources/submodules/appium/packages/opencv/test/e2e/images/appium-diagram.jpg +0 -0
- package/src/resources/submodules/appium/packages/opencv/test/e2e/images/cc1.png +0 -0
- package/src/resources/submodules/appium/packages/opencv/test/e2e/images/cc2.png +0 -0
- package/src/resources/submodules/appium/packages/opencv/test/e2e/images/cc_rotated.png +0 -0
- package/src/resources/submodules/appium/packages/opencv/test/e2e/images/findwaldo.jpg +0 -0
- package/src/resources/submodules/appium/packages/opencv/test/e2e/images/number5.png +0 -0
- package/src/resources/submodules/appium/packages/opencv/test/e2e/images/waldo.jpg +0 -0
- package/src/resources/submodules/appium/packages/plugin-test-support/CHANGELOG.md +610 -0
- package/src/resources/submodules/appium/packages/plugin-test-support/README.md +49 -0
- package/src/resources/submodules/appium/packages/relaxed-caps-plugin/CHANGELOG.md +209 -0
- package/src/resources/submodules/appium/packages/relaxed-caps-plugin/README.md +35 -0
- package/src/resources/submodules/appium/packages/schema/CHANGELOG.md +308 -0
- package/src/resources/submodules/appium/packages/schema/README.md +50 -0
- package/src/resources/submodules/appium/packages/storage-plugin/CHANGELOG.md +157 -0
- package/src/resources/submodules/appium/packages/storage-plugin/README.md +83 -0
- package/src/resources/submodules/appium/packages/strongbox/CHANGELOG.md +129 -0
- package/src/resources/submodules/appium/packages/strongbox/README.md +110 -0
- package/src/resources/submodules/appium/packages/support/CHANGELOG.md +1147 -0
- package/src/resources/submodules/appium/packages/support/README.md +161 -0
- package/src/resources/submodules/appium/packages/tsconfig/CHANGELOG.md +147 -0
- package/src/resources/submodules/appium/packages/tsconfig/README.md +19 -0
- package/src/resources/submodules/appium/packages/types/CHANGELOG.md +871 -0
- package/src/resources/submodules/appium/packages/types/README.md +21 -0
- package/src/resources/submodules/appium/packages/universal-xml-plugin/CHANGELOG.md +502 -0
- package/src/resources/submodules/appium/packages/universal-xml-plugin/README.md +53 -0
- package/src/resources/submodules/appium/renovate/README.md +55 -0
- package/src/resources/submodules/appium-skills/.github/dependabot.yml +11 -0
- package/src/resources/submodules/appium-skills/.github/workflows/pr-title.yml +10 -0
- package/src/resources/submodules/appium-skills/AGENTS.md +214 -0
- package/src/resources/submodules/appium-skills/LICENSE +201 -0
- package/src/resources/submodules/appium-skills/README.md +33 -0
- package/src/resources/submodules/appium-skills/skills/appium-troubleshooting/SKILL.md +66 -0
- package/src/resources/submodules/appium-skills/skills/appium-troubleshooting/references/community-search.md +51 -0
- package/src/resources/submodules/appium-skills/skills/appium-troubleshooting/references/uiautomator2-locators.md +34 -0
- package/src/resources/submodules/appium-skills/skills/appium-troubleshooting/references/uiautomator2-session-startup.md +53 -0
- package/src/resources/submodules/appium-skills/skills/appium-troubleshooting/references/xcuitest-element-lookup.md +23 -0
- package/src/resources/submodules/appium-skills/skills/appium-troubleshooting/references/xcuitest-locators.md +16 -0
- package/src/resources/submodules/appium-skills/skills/appium-troubleshooting/references/xcuitest-troubleshooting.md +52 -0
- package/src/resources/submodules/appium-skills/skills/environment-setup-android/SKILL.md +346 -0
- package/src/resources/submodules/appium-skills/skills/environment-setup-bundletool/SKILL.md +91 -0
- package/src/resources/submodules/appium-skills/skills/environment-setup-chromium/SKILL.md +260 -0
- package/src/resources/submodules/appium-skills/skills/environment-setup-espresso/SKILL.md +216 -0
- package/src/resources/submodules/appium-skills/skills/environment-setup-ffmpeg/SKILL.md +91 -0
- package/src/resources/submodules/appium-skills/skills/environment-setup-node/SKILL.md +128 -0
- package/src/resources/submodules/appium-skills/skills/environment-setup-uiautomator2/SKILL.md +225 -0
- package/src/resources/submodules/appium-skills/skills/environment-setup-xcuitest/SKILL.md +153 -0
- package/src/resources/submodules/appium-skills/skills/xcuitest-real-device-config/SKILL.md +488 -0
- package/src/resources/submodules/appium-uiautomator2-driver/CHANGELOG.md +1506 -0
- package/src/resources/submodules/appium-uiautomator2-driver/README.md +2253 -0
- package/src/resources/submodules/appium-uiautomator2-driver/docs/actions.md +72 -0
- package/src/resources/submodules/appium-uiautomator2-driver/docs/activity-startup.md +47 -0
- package/src/resources/submodules/appium-uiautomator2-driver/docs/android-appbundle.md +69 -0
- package/src/resources/submodules/appium-uiautomator2-driver/docs/android-mobile-gestures.md +352 -0
- package/src/resources/submodules/appium-uiautomator2-driver/docs/android-multiwindow.md +872 -0
- package/src/resources/submodules/appium-uiautomator2-driver/docs/architecture.md +34 -0
- package/src/resources/submodules/appium-uiautomator2-driver/docs/bidi.md +50 -0
- package/src/resources/submodules/appium-uiautomator2-driver/docs/capability-sets.md +136 -0
- package/src/resources/submodules/appium-uiautomator2-driver/docs/mjpeg.md +111 -0
- package/src/resources/submodules/appium-uiautomator2-driver/docs/scheduled-actions.md +155 -0
- package/src/resources/submodules/appium-uiautomator2-driver/docs/uiautomator-uiselector.md +51 -0
- package/src/resources/submodules/appium-uiautomator2-driver/docs/unlock/main.md +95 -0
- package/src/resources/submodules/appium-uiautomator2-driver/docs/unlock/screen1.png +0 -0
- package/src/resources/submodules/appium-uiautomator2-driver/docs/unlock/screen2.png +0 -0
- package/src/resources/submodules/appium-uiautomator2-driver/test/functional/assets/checkered-squares.png +0 -0
- package/src/resources/submodules/appium-uiautomator2-driver/test/functional/assets/start-button.png +0 -0
- package/src/resources/submodules/appium-uiautomator2-driver/test/functional/assets/stop-button.png +0 -0
- package/src/resources/submodules/appium-xcuitest-driver/.github/ISSUE_TEMPLATE.md +4 -0
- package/src/resources/submodules/appium-xcuitest-driver/CHANGELOG.md +3373 -0
- package/src/resources/submodules/appium-xcuitest-driver/README.md +55 -0
- package/src/resources/submodules/appium-xcuitest-driver/docs/assets/images/appium-logo-white.png +0 -0
- package/src/resources/submodules/appium-xcuitest-driver/docs/assets/images/appium-logo.png +0 -0
- package/src/resources/submodules/appium-xcuitest-driver/docs/assets/images/appium-plus-xctest.png +0 -0
- package/src/resources/submodules/appium-xcuitest-driver/docs/contributing.md +45 -0
- package/src/resources/submodules/appium-xcuitest-driver/docs/endpoints-wda.md +61 -0
- package/src/resources/submodules/appium-xcuitest-driver/docs/endpoints.md +95 -0
- package/src/resources/submodules/appium-xcuitest-driver/docs/getting-started/device-setup.md +81 -0
- package/src/resources/submodules/appium-xcuitest-driver/docs/getting-started/index.md +36 -0
- package/src/resources/submodules/appium-xcuitest-driver/docs/getting-started/installation.md +38 -0
- package/src/resources/submodules/appium-xcuitest-driver/docs/getting-started/provisioning-profile/assets/images/check-prov-prof.png +0 -0
- package/src/resources/submodules/appium-xcuitest-driver/docs/getting-started/provisioning-profile/assets/images/create-new-project.png +0 -0
- package/src/resources/submodules/appium-xcuitest-driver/docs/getting-started/provisioning-profile/assets/images/create-single-page.png +0 -0
- package/src/resources/submodules/appium-xcuitest-driver/docs/getting-started/provisioning-profile/assets/images/no-prov-prof.png +0 -0
- package/src/resources/submodules/appium-xcuitest-driver/docs/getting-started/provisioning-profile/assets/images/project-prov-prof.png +0 -0
- package/src/resources/submodules/appium-xcuitest-driver/docs/getting-started/provisioning-profile/assets/images/set-up-bundle.png +0 -0
- package/src/resources/submodules/appium-xcuitest-driver/docs/getting-started/provisioning-profile/assets/images/untrusted-dev.png +0 -0
- package/src/resources/submodules/appium-xcuitest-driver/docs/getting-started/provisioning-profile/assets/images/xcode-bundle-id.png +0 -0
- package/src/resources/submodules/appium-xcuitest-driver/docs/getting-started/provisioning-profile/assets/images/xcode-config.png +0 -0
- package/src/resources/submodules/appium-xcuitest-driver/docs/getting-started/provisioning-profile/assets/images/xcode-facebook-fail.png +0 -0
- package/src/resources/submodules/appium-xcuitest-driver/docs/getting-started/provisioning-profile/assets/images/xcode-facebook-succeed.png +0 -0
- package/src/resources/submodules/appium-xcuitest-driver/docs/getting-started/provisioning-profile/auto-config.md +54 -0
- package/src/resources/submodules/appium-xcuitest-driver/docs/getting-started/provisioning-profile/basic-manual-config.md +40 -0
- package/src/resources/submodules/appium-xcuitest-driver/docs/getting-started/provisioning-profile/full-manual-config.md +49 -0
- package/src/resources/submodules/appium-xcuitest-driver/docs/getting-started/provisioning-profile/generic-device-config.md +75 -0
- package/src/resources/submodules/appium-xcuitest-driver/docs/getting-started/provisioning-profile/index.md +117 -0
- package/src/resources/submodules/appium-xcuitest-driver/docs/getting-started/system-requirements.md +131 -0
- package/src/resources/submodules/appium-xcuitest-driver/docs/guides/assets/images/ios-xctest-file-movement/keynote.png +0 -0
- package/src/resources/submodules/appium-xcuitest-driver/docs/guides/assets/images/ios-xctest-file-movement/on_my_iphone.png +0 -0
- package/src/resources/submodules/appium-xcuitest-driver/docs/guides/assets/images/ios-xctest-file-movement/top_files.png +0 -0
- package/src/resources/submodules/appium-xcuitest-driver/docs/guides/attach-to-running-wda.md +43 -0
- package/src/resources/submodules/appium-xcuitest-driver/docs/guides/audio-capture.md +78 -0
- package/src/resources/submodules/appium-xcuitest-driver/docs/guides/biometric-auth.md +29 -0
- package/src/resources/submodules/appium-xcuitest-driver/docs/guides/capability-sets.md +169 -0
- package/src/resources/submodules/appium-xcuitest-driver/docs/guides/ci-setup.md +47 -0
- package/src/resources/submodules/appium-xcuitest-driver/docs/guides/clipboard.md +47 -0
- package/src/resources/submodules/appium-xcuitest-driver/docs/guides/file-transfer.md +147 -0
- package/src/resources/submodules/appium-xcuitest-driver/docs/guides/gestures.md +55 -0
- package/src/resources/submodules/appium-xcuitest-driver/docs/guides/hybrid.md +137 -0
- package/src/resources/submodules/appium-xcuitest-driver/docs/guides/input-events.md +67 -0
- package/src/resources/submodules/appium-xcuitest-driver/docs/guides/install-certificate.md +20 -0
- package/src/resources/submodules/appium-xcuitest-driver/docs/guides/mjpeg.md +98 -0
- package/src/resources/submodules/appium-xcuitest-driver/docs/guides/multiple-xcode-versions.md +37 -0
- package/src/resources/submodules/appium-xcuitest-driver/docs/guides/parallel-tests.md +39 -0
- package/src/resources/submodules/appium-xcuitest-driver/docs/guides/remotexpc-tunnels-real-devices.md +148 -0
- package/src/resources/submodules/appium-xcuitest-driver/docs/guides/run-prebuilt-wda.md +147 -0
- package/src/resources/submodules/appium-xcuitest-driver/docs/guides/run-preinstalled-wda.md +177 -0
- package/src/resources/submodules/appium-xcuitest-driver/docs/guides/tvos.md +246 -0
- package/src/resources/submodules/appium-xcuitest-driver/docs/guides/wda-custom-server.md +283 -0
- package/src/resources/submodules/appium-xcuitest-driver/docs/index.md +36 -0
- package/src/resources/submodules/appium-xcuitest-driver/docs/overview.md +137 -0
- package/src/resources/submodules/appium-xcuitest-driver/docs/reference/assets/images/useXctestrunFile.png +0 -0
- package/src/resources/submodules/appium-xcuitest-driver/docs/reference/bidi.md +192 -0
- package/src/resources/submodules/appium-xcuitest-driver/docs/reference/capabilities.md +164 -0
- package/src/resources/submodules/appium-xcuitest-driver/docs/reference/commands.md +468 -0
- package/src/resources/submodules/appium-xcuitest-driver/docs/reference/element-attributes.md +157 -0
- package/src/resources/submodules/appium-xcuitest-driver/docs/reference/env-vars.md +18 -0
- package/src/resources/submodules/appium-xcuitest-driver/docs/reference/execute-methods.md +2269 -0
- package/src/resources/submodules/appium-xcuitest-driver/docs/reference/ios-predicate.md +196 -0
- package/src/resources/submodules/appium-xcuitest-driver/docs/reference/locator-strategies.md +107 -0
- package/src/resources/submodules/appium-xcuitest-driver/docs/reference/scripts.md +555 -0
- package/src/resources/submodules/appium-xcuitest-driver/docs/reference/security-flags.md +28 -0
- package/src/resources/submodules/appium-xcuitest-driver/docs/reference/server-args.md +19 -0
- package/src/resources/submodules/appium-xcuitest-driver/docs/reference/settings.md +467 -0
- package/src/resources/submodules/appium-xcuitest-driver/docs/reference/xpath-extensions.md +167 -0
- package/src/resources/submodules/appium-xcuitest-driver/docs/troubleshooting/element-lookup.md +202 -0
- package/src/resources/submodules/appium-xcuitest-driver/docs/troubleshooting/index.md +204 -0
- package/src/resources/submodules/appium-xcuitest-driver/docs/troubleshooting/wda-slowness.md +206 -0
- package/src/resources/submodules/appium-xcuitest-driver/test/assets/test.png +0 -0
- package/src/resources/submodules.zip +0 -0
|
@@ -0,0 +1,271 @@
|
|
|
1
|
+
---
|
|
2
|
+
title: Session Capabilities
|
|
3
|
+
---
|
|
4
|
+
|
|
5
|
+
Capabilities are the core parameters used to start an Appium session. They describe various
|
|
6
|
+
features that you want your session to have, for example, a certain mobile operating system or a
|
|
7
|
+
certain version of a device. Capabilities are represented as key-value pairs, with values allowed
|
|
8
|
+
to be any valid JSON type, including other objects. Most importantly, they cannot be changed
|
|
9
|
+
during the lifecycle of the session.
|
|
10
|
+
|
|
11
|
+
The capabilities used in Appium follow [the W3C WebDriver specification of the same name](https://w3c.github.io/webdriver/#capabilities).
|
|
12
|
+
The WebDriver spec defines a small set of standard capabilities, including the following:
|
|
13
|
+
|
|
14
|
+
| Capability Name | Type | Description |
|
|
15
|
+
|------------------|----------|------------------------------------------------|
|
|
16
|
+
| `browserName` | `string` | The name of the browser to launch and automate |
|
|
17
|
+
| `browserVersion` | `string` | The specific version of the browser |
|
|
18
|
+
| `platformName` | `string` | The type of platform hosting the browser |
|
|
19
|
+
|
|
20
|
+
While the above capabilities are commonly used by Appium drivers, they are not sufficient for
|
|
21
|
+
describing Appium-specific features, such as the name of the driver to use, or the name of the app
|
|
22
|
+
to launch. In order to achieve this, Appium defines its own [extension capabilities](https://w3c.github.io/webdriver/#dfn-extension-capability).
|
|
23
|
+
|
|
24
|
+
## Common Appium Capabilities
|
|
25
|
+
|
|
26
|
+
According to the WebDriver spec, extension capabilities must include a namespace prefix (signifying
|
|
27
|
+
the vendor introducing the capability), and the namespace must end a colon (`:`). Appium's vendor
|
|
28
|
+
prefix is `appium:`, and so any Appium-specific capabilities must include this prefix. Depending on
|
|
29
|
+
your Appium client, the prefix may be added automatically or in conjunction with certain interfaces,
|
|
30
|
+
but it is always a good practice to explicitly include it for clarity.
|
|
31
|
+
|
|
32
|
+
Here are a few commonly (but not universally!) used Appium-specific capabilities:
|
|
33
|
+
|
|
34
|
+
| Capability Name | Type | Description |
|
|
35
|
+
|-------------------------|----------|-----------------------------------------------------------------|
|
|
36
|
+
| `appium:automationName` | `string` | The name of the Appium driver to use |
|
|
37
|
+
| `appium:udid` | `string` | The unique device identifier of a particular device to automate |
|
|
38
|
+
| `appium:app` | `string` | The path to an installable application |
|
|
39
|
+
|
|
40
|
+
All capabilities recognized by the Appium base driver (inherited by all drivers) can be found in the
|
|
41
|
+
[Capabilities Reference document](../reference/session/caps.md). While this common capability set
|
|
42
|
+
is fairly small, it can be greatly extended by Appium drivers and plugins, who can (and should)
|
|
43
|
+
define their own capabilities. Make sure to reference their documentation to learn more about the
|
|
44
|
+
capabilities they support. You can find a list of known drivers in the [Ecosystem Drivers](../ecosystem/drivers.md) document.
|
|
45
|
+
|
|
46
|
+
Drivers are also able to place more complex constraints on capabilities as a group. For example,
|
|
47
|
+
the XCUITest driver recommends that at least one of `browserName`, `appium:app`, or `appium:bundleId`
|
|
48
|
+
is included in the capabilities, otherwise it will not be able to auto-install or auto-launch any
|
|
49
|
+
application. Each driver will document how it interprets these capabilities and any other
|
|
50
|
+
platform-specific requirements.
|
|
51
|
+
|
|
52
|
+
The way to construct capabilities and start a session will likely differ depending on your Appium
|
|
53
|
+
client. For examples of doing this in each client library, head to the [Ecosystem Clients](../ecosystem/clients.md)
|
|
54
|
+
page and click through to the appropriate client documentation.
|
|
55
|
+
|
|
56
|
+
!!! note
|
|
57
|
+
|
|
58
|
+
Once your capabilities are sent to the server and the session is started, they cannot be
|
|
59
|
+
changed. If a driver supports updating its behaviour during a session, it will use the
|
|
60
|
+
[Settings API](./settings.md) for this purpose.
|
|
61
|
+
|
|
62
|
+
## BiDi Protocol Support
|
|
63
|
+
|
|
64
|
+
In addition to the standard WebDriver protocol (now known as WebDriver Classic), Appium supports the
|
|
65
|
+
[WebDriver BiDi](https://w3c.github.io/webdriver-bidi/) protocol. Support for this protocol is
|
|
66
|
+
opt-in, and requires the use of the standard `webSocketUrl` capability.
|
|
67
|
+
|
|
68
|
+
| Capability Name | Type | Description |
|
|
69
|
+
|-----------------|-----------|--------------------------------------------------|
|
|
70
|
+
| `webSocketUrl` | `boolean` | Whether BiDi protocol is enabled in the session |
|
|
71
|
+
|
|
72
|
+
All BiDi commands supported by the Appium base driver (inherited by all drivers) can be found in the
|
|
73
|
+
[BiDi Protocol API Reference document](../reference/api/bidi.md). Similarly to WebDriver Classic
|
|
74
|
+
commands, individual Appium drivers and plugins can define their own supported standard and custom
|
|
75
|
+
BiDi commands, so make sure to reference their documentation.
|
|
76
|
+
|
|
77
|
+
## Using `appium:options` to Group Capabilities
|
|
78
|
+
|
|
79
|
+
If you use a lot of `appium:` capabilities in your tests, it can get a little repetitive. You can
|
|
80
|
+
combine all capabilities as an object value of a single `appium:options` capability instead, in
|
|
81
|
+
which case you don't need to use prefixes on the capabilities inside the object. For example:
|
|
82
|
+
|
|
83
|
+
```json
|
|
84
|
+
{
|
|
85
|
+
"platformName": "iOS",
|
|
86
|
+
"appium:options": {
|
|
87
|
+
"automationName": "XCUITest",
|
|
88
|
+
"platformVersion": "16.0",
|
|
89
|
+
"app": "/path/to/your.app",
|
|
90
|
+
"deviceName": "iPhone 12",
|
|
91
|
+
"noReset": true
|
|
92
|
+
}
|
|
93
|
+
}
|
|
94
|
+
```
|
|
95
|
+
|
|
96
|
+
Note that constructing a capability value which is itself an object differs by language; refer to
|
|
97
|
+
your client documentation for further examples on how to achieve this.
|
|
98
|
+
|
|
99
|
+
!!! warning
|
|
100
|
+
|
|
101
|
+
If you include the same capabilities both inside and outside of `appium:options`, the values
|
|
102
|
+
inside of `appium:options` take precedence.
|
|
103
|
+
|
|
104
|
+
## Always-Match and First-Match Capabilities
|
|
105
|
+
|
|
106
|
+
The W3C spec allows clients to give the Appium server some flexibility in the kind of session it
|
|
107
|
+
creates in response to a new session request. This is through the concept of "always-match" and
|
|
108
|
+
"first-match" capabilities:
|
|
109
|
+
|
|
110
|
+
- Always-match capabilities consist of a single set of capabilities, every member of which must
|
|
111
|
+
be satisfied by the server in order for the new session request to proceed.
|
|
112
|
+
- First-match capabilities consist of an array of capability sets. Each set is merged with the
|
|
113
|
+
always-match capabilities, and the first set that the server knows how to handle will be the set
|
|
114
|
+
that is used to start the session.
|
|
115
|
+
|
|
116
|
+
!!! note
|
|
117
|
+
|
|
118
|
+
Check out the [spec itself](https://w3c.github.io/webdriver/#processing-capabilities) for
|
|
119
|
+
a more in-depth description of how capabilities are processed.
|
|
120
|
+
|
|
121
|
+
In practice, use of first-match capabilities is not necessary or recommended for use with Appium.
|
|
122
|
+
Instead, we recommend that you define the explicit set of capabilities you want the Appium
|
|
123
|
+
server to handle. These will be encoded as the always-match capabilities, and the array of
|
|
124
|
+
first-match capabilities will be empty.
|
|
125
|
+
|
|
126
|
+
That being said, Appium _does_ understand always-match and first-match capabilities as
|
|
127
|
+
defined in the W3C spec, so if you use these features, Appium will work as expected. The process of
|
|
128
|
+
defining always-match and first-match capabilities is unique to each client library, so refer to
|
|
129
|
+
the documentation for your client library to see examples of how it works.
|
|
130
|
+
|
|
131
|
+
## Special Notes for Cloud Providers
|
|
132
|
+
|
|
133
|
+
!!! warning
|
|
134
|
+
|
|
135
|
+
This section is not intended for end-users of Appium; it is intended for developers building
|
|
136
|
+
Appium-compatible cloud services.
|
|
137
|
+
|
|
138
|
+
When managing an Appium cloud, your users may wish to target various independent versions of Appium
|
|
139
|
+
drivers and plugins. It is of course up to each service provider how they wish to implement the
|
|
140
|
+
discovery, installation, and availability of any official or third party drivers or plugins. But
|
|
141
|
+
the Appium team does provide several suggestions, for consistency across the industry. _These are
|
|
142
|
+
recommendations only,_ and not a standard, but adopting it will help users to navigate the increased
|
|
143
|
+
complexity that working with Appium in a cloud environment may bring.
|
|
144
|
+
|
|
145
|
+
### Suggested capabilities
|
|
146
|
+
|
|
147
|
+
In addition to the standard `platformName`, `appium:deviceName`, `appium:automationName`, and
|
|
148
|
+
`appium:platformVersion`, we recommend adopting the capability `$cloud:appiumOptions`, where the
|
|
149
|
+
label `$cloud` is not meant to be interpreted literally but instead should be replaced by your
|
|
150
|
+
vendor prefix (so for HeadSpin it would be `headspin`, Sauce Labs it would be `sauce`, and
|
|
151
|
+
BrowserStack it would be `browserstack`, to name just a few examples). The `$cloud:appiumOptions`
|
|
152
|
+
capability would itself be a JSON object, with the following internal keys:
|
|
153
|
+
|
|
154
|
+
| <div style="width:10em">Capability</div> | Usage | Example |
|
|
155
|
+
| ---------------------------------------- | ------ | ------- |
|
|
156
|
+
| `version` | The version of the Appium server that is used to host and manage drivers. If omitted, the behavior is left up to the provider, but the recommendation would be to provide the latest official version. | `2.0.0` |
|
|
157
|
+
| `automationVersion` | The version of the driver (as specified by `appium:automationName`) that should be used. | `1.55.2` |
|
|
158
|
+
| `automation` | The name of a custom driver to use (see below for more info). This would override `appium:automationName` and `$cloud:automationVersion`. | `{"name": "@org/custom-driver", "source": "github", "package": "custom-driver"}` |
|
|
159
|
+
| `plugins` | The list of plugins (and potentially versions of plugins) that should be activated (see below for more info). | `["images", "universal-xml"]` |
|
|
160
|
+
|
|
161
|
+
### Basic example
|
|
162
|
+
|
|
163
|
+
Appium extensions (drivers and plugins) have a set of properties that specify where they can be
|
|
164
|
+
installed from. Cloud providers are obviously under no obligation to provide support for
|
|
165
|
+
arbitrarily specified extensions, seeing as these may represent untrusted code running in a managed
|
|
166
|
+
environment. In the case where arbitrary extensions are not supported, the `appium:automationName`,
|
|
167
|
+
`$cloud:automationVersion`, and `$cloud:appiumPlugins` capabilities should be sufficient. See the
|
|
168
|
+
following JSON object representing capabilities for a session:
|
|
169
|
+
|
|
170
|
+
```json
|
|
171
|
+
{
|
|
172
|
+
"platformName": "iOS",
|
|
173
|
+
"appium:platformVersion": "14.4",
|
|
174
|
+
"appium:deviceName": "iPhone 11",
|
|
175
|
+
"appium:app": "Some-App.app.zip",
|
|
176
|
+
"appium:automationName": "XCUITest",
|
|
177
|
+
"$cloud:appiumOptions": {
|
|
178
|
+
"version": "2.0.0",
|
|
179
|
+
"automationVersion": "3.52.0",
|
|
180
|
+
"plugins": ["images"]
|
|
181
|
+
}
|
|
182
|
+
}
|
|
183
|
+
```
|
|
184
|
+
|
|
185
|
+
This set of capabilities requests an Appium 2+ server supporting the XCUITest driver at version
|
|
186
|
+
`3.52.0`, and the `images` plugin active. This set is easy for a cloud provider to verify. The
|
|
187
|
+
cloud provider can obviously do anything it wants in response to these capabilities, including
|
|
188
|
+
downloading Appium and driver and plugin packages on the fly, or erroring out if the versions
|
|
189
|
+
requested are not in a supported set, or if the plugin is not supported, etc...
|
|
190
|
+
|
|
191
|
+
### Basic example with `appium:options`
|
|
192
|
+
|
|
193
|
+
The previous example still looks a bit disorganized, so of course we also recommend that cloud
|
|
194
|
+
providers support the `appium:options` capability as detailed above, which could turn the previous
|
|
195
|
+
set of capabilities into the following:
|
|
196
|
+
|
|
197
|
+
```json
|
|
198
|
+
{
|
|
199
|
+
"platformName": "iOS",
|
|
200
|
+
"appium:options": {
|
|
201
|
+
"platformVersion": "14.4",
|
|
202
|
+
"deviceName": "iPhone 11",
|
|
203
|
+
"app": "Some-App.app.zip",
|
|
204
|
+
"automationName": "XCUITest"
|
|
205
|
+
},
|
|
206
|
+
"$cloud:appiumOptions": {
|
|
207
|
+
"version": "2.0.0",
|
|
208
|
+
"automationVersion": "3.52.0",
|
|
209
|
+
"plugins": ["images"]
|
|
210
|
+
}
|
|
211
|
+
}
|
|
212
|
+
```
|
|
213
|
+
|
|
214
|
+
### Extension objects
|
|
215
|
+
|
|
216
|
+
Some service providers may wish to dynamically allow access to all of the features of the Appium
|
|
217
|
+
2 CLI, including downloading arbitrary drivers and plugins. To represent these extensions, we can
|
|
218
|
+
define special JSON "extension objects", with the following keys:
|
|
219
|
+
|
|
220
|
+
- `name`: the name of the extension. This would be an `npm` package name (if downloading from `npm`),
|
|
221
|
+
or a `git` or GitHub spec (if downloading from a `git` server or GitHub).
|
|
222
|
+
- `version`: the version of the extension, e.g., the `npm` package version or `git` SHA.
|
|
223
|
+
- (optional) `source`: a denotation of where the extension can be downloaded from. It is recommended
|
|
224
|
+
to support the following values: `appium`, `npm`, `git`, `github`. Here, `appium` means "Appium's
|
|
225
|
+
own official list", and should be the default value if this key is not included.
|
|
226
|
+
- (optional) `package`: when downloading extensions from `git` or GitHub, the `npm` package name of
|
|
227
|
+
the extension must also be provided. This is optional for non-`git` sources.
|
|
228
|
+
|
|
229
|
+
Since each session is handled by a single driver, the `$cloud:appiumOptions`/`$automation`
|
|
230
|
+
capability could be used with an extension object value to denote this driver, for example:
|
|
231
|
+
|
|
232
|
+
```json
|
|
233
|
+
{
|
|
234
|
+
"$cloud:appiumOptions": {
|
|
235
|
+
"automation": {
|
|
236
|
+
"name": "git+https://some-git-host.com/custom-driver-project.git",
|
|
237
|
+
"version": "some-git-sha",
|
|
238
|
+
"source": "git",
|
|
239
|
+
"package": "driver-npm-package-name"
|
|
240
|
+
}
|
|
241
|
+
}
|
|
242
|
+
}
|
|
243
|
+
```
|
|
244
|
+
|
|
245
|
+
And since sessions can handle multiple plugins, each value in the list of `$cloud:appiumPlugins`
|
|
246
|
+
could also be an extension object rather than a string, so that specific versions could be
|
|
247
|
+
requested:
|
|
248
|
+
|
|
249
|
+
```json
|
|
250
|
+
{
|
|
251
|
+
"$cloud:appiumOptions": {
|
|
252
|
+
"plugins": [{
|
|
253
|
+
"name": "images",
|
|
254
|
+
"version": "1.1.0"
|
|
255
|
+
}, {
|
|
256
|
+
"name": "my-github-org/my-custom-plugin",
|
|
257
|
+
"version": "a83f2e",
|
|
258
|
+
"source": "github",
|
|
259
|
+
"package": "custom-plugin"
|
|
260
|
+
}]
|
|
261
|
+
}
|
|
262
|
+
}
|
|
263
|
+
```
|
|
264
|
+
|
|
265
|
+
These serve as illustrative examples for the recommendations here. Of course, it is up to the
|
|
266
|
+
service providers to implement the handling of these capabilities at their front end / load
|
|
267
|
+
balancer, to perform any error checking, or to actually run any of the `appium driver` or `appium
|
|
268
|
+
plugin` CLI commands that support the end user's request. This section is merely a suggestion as to
|
|
269
|
+
how service providers might design their user-facing capabilities API in a way which in principle
|
|
270
|
+
supports all of the capabilities that Appium itself would provide to the end user if they were
|
|
271
|
+
running Appium on their own.
|
|
@@ -0,0 +1,98 @@
|
|
|
1
|
+
---
|
|
2
|
+
title: The Appium Config File
|
|
3
|
+
---
|
|
4
|
+
|
|
5
|
+
Instead of passing arguments on the command line to Appium, you may add them to a special config
|
|
6
|
+
file. Appium will read values from this config file when it runs. (Please note that CLI arguments
|
|
7
|
+
have _precedence_ over configuration files; if a value is set in a config file _and_ via CLI
|
|
8
|
+
argument, the CLI argument is preferred.)
|
|
9
|
+
|
|
10
|
+
## Supported Config File Formats
|
|
11
|
+
|
|
12
|
+
You can store your config data in the following kinds of files:
|
|
13
|
+
|
|
14
|
+
- JSON
|
|
15
|
+
- YAML
|
|
16
|
+
- JS (a JavaScript file exporting a JS object)
|
|
17
|
+
- CJS (the same as above; the extension is for common JS)
|
|
18
|
+
|
|
19
|
+
!!! warning
|
|
20
|
+
|
|
21
|
+
Note: Configuration files in ESM format are not currently supported.
|
|
22
|
+
|
|
23
|
+
## Supported Config File Locations
|
|
24
|
+
|
|
25
|
+
Configuration files can be named anything, but the following filenames will be automatically
|
|
26
|
+
discovered and loaded by Appium:
|
|
27
|
+
|
|
28
|
+
- `.appiumrc.json` (recommended)
|
|
29
|
+
- `.appiumrc.yaml`
|
|
30
|
+
- `.appiumrc.yml`
|
|
31
|
+
- `.appiumrc.js`
|
|
32
|
+
- `.appiumrc.cjs`
|
|
33
|
+
- `appium.config.js`
|
|
34
|
+
- `appium.config.cjs`
|
|
35
|
+
- `.appiumrc` (which is considered to be JSON)
|
|
36
|
+
|
|
37
|
+
Further, _if your project uses Node.js,_ you can use store the configuration inside an `appium`
|
|
38
|
+
property in your `package.json` and it will be automatically discovered.
|
|
39
|
+
|
|
40
|
+
### Config File Search
|
|
41
|
+
|
|
42
|
+
Appium will search _up_ the directory tree from the current working directory for one of these
|
|
43
|
+
files. If it reaches the current user's home directory or filesystem root, it will stop looking.
|
|
44
|
+
|
|
45
|
+
To specify a _custom_ location for your config file, use `appium --config /path/to/config/file`.
|
|
46
|
+
|
|
47
|
+
#### Configuration File Format
|
|
48
|
+
|
|
49
|
+
First, you might want to look at some examples:
|
|
50
|
+
|
|
51
|
+
- [Appium Configuration - JSON](https://github.com/appium/appium/blob/master/packages/appium/sample-code/appium.config.sample.json)
|
|
52
|
+
- [Appium Configuration - YAML](https://github.com/appium/appium/blob/master/packages/appium/sample-code/appium.config.sample.yaml)
|
|
53
|
+
- [Appium Configuration - JS](https://github.com/appium/appium/blob/master/packages/appium/sample-code/appium.config.sample.js)
|
|
54
|
+
|
|
55
|
+
A description of the format is available, as well:
|
|
56
|
+
|
|
57
|
+
- [Appium Configuration File JSON Schema](https://github.com/appium/appium/blob/master/packages/schema/lib/appium-config.schema.json)
|
|
58
|
+
- [TypeScript declarations for Appium Configuration](https://github.com/appium/appium/blob/master/packages/types/lib/config.ts)
|
|
59
|
+
|
|
60
|
+
To describe in words, the config file will have a root `server` property, and all arguments are
|
|
61
|
+
child properties. For certain properties which must be supplied on the command-line as
|
|
62
|
+
comma-delimited lists, JSON strings, and/or external filepaths, these instead will be of their
|
|
63
|
+
"native" type. For example, `--use-plugins <value>` needs `<value>` to be comma-delimited string
|
|
64
|
+
or path to a delimited file. However, the config file just wants an array, e.g.,:
|
|
65
|
+
|
|
66
|
+
```json
|
|
67
|
+
{
|
|
68
|
+
"server": {
|
|
69
|
+
"use-plugins": ["my-plugin", "some-other-plugin"]
|
|
70
|
+
}
|
|
71
|
+
}
|
|
72
|
+
```
|
|
73
|
+
|
|
74
|
+
## Configuring extensions (drivers and plugins)
|
|
75
|
+
|
|
76
|
+
For `driver`-and-`plugin`-specific configuration, these live under the `server.driver` and
|
|
77
|
+
`server.plugin` properties, respectively. Each driver or plugin will have its own named property,
|
|
78
|
+
and the values of any specific configuration it provides are under this. For example:
|
|
79
|
+
|
|
80
|
+
```json
|
|
81
|
+
{
|
|
82
|
+
"server": {
|
|
83
|
+
"driver": {
|
|
84
|
+
"xcuitest": {
|
|
85
|
+
"webkit-debug-proxy-port": 5400
|
|
86
|
+
}
|
|
87
|
+
}
|
|
88
|
+
}
|
|
89
|
+
}
|
|
90
|
+
```
|
|
91
|
+
|
|
92
|
+
!!! note
|
|
93
|
+
|
|
94
|
+
The above configuration corresponds to the `--driver-xcuitest-webkit-debug-proxy-port` CLI argument.
|
|
95
|
+
|
|
96
|
+
All properties are case-sensitive and will be in
|
|
97
|
+
[kebab-case](https://en.wikipedia.org/wiki/Naming_convention_(programming)#Delimiter-separated_words).
|
|
98
|
+
For example, `callback-port` is allowed, but `callbackPort` is not.
|
|
@@ -0,0 +1,44 @@
|
|
|
1
|
+
---
|
|
2
|
+
hide:
|
|
3
|
+
- toc
|
|
4
|
+
|
|
5
|
+
title: Managing Contexts
|
|
6
|
+
---
|
|
7
|
+
|
|
8
|
+
A common feature of many app platforms is the ability for developers to embed web content inside of
|
|
9
|
+
the platform-native app frame. This allows developers to leverage web technologies or existing web
|
|
10
|
+
content for some or all of the app functionality. However, the additional complexity of mixing
|
|
11
|
+
"modes" within a single application can make it difficult for automation tools that are designed to
|
|
12
|
+
target the "native" elements and behaviours.
|
|
13
|
+
|
|
14
|
+
Appium provides a set of APIs for working with different app modes, called "contexts", that Appium
|
|
15
|
+
drivers can implement if they support automation commands in these different modes. There are three
|
|
16
|
+
basic commands that Appium has added to the W3C WebDriver spec for this purpose:
|
|
17
|
+
|
|
18
|
+
| Command Name | Method/Route | Params | Description | Returns |
|
|
19
|
+
|-----------------------|-----------------------------|-------------------|-----------------------------------------------|-----------------|
|
|
20
|
+
| `Get Contexts` | `GET /session/:id/contexts` | | Get a list of the available contexts | `array<string>` |
|
|
21
|
+
| `Get Current Context` | `GET /session/:id/context` | | Get the name of the active context | `string` |
|
|
22
|
+
| `Set Context` | `POST /session/:id/context` | `name` (`string`) | Switch into the context with the given `name` | `null` |
|
|
23
|
+
|
|
24
|
+
This API is flexible enough to handle a variety of semantic interpretations on the part of the
|
|
25
|
+
driver. For example, the XCUITest driver includes two kinds of contexts: the native app context and
|
|
26
|
+
any active webviews, as one context per webview. A call to `Get Contexts` will return the list of
|
|
27
|
+
names, which you as a test author can sift through and use to switch into the appropriate context.
|
|
28
|
+
As another example, the [Appium Altunity
|
|
29
|
+
Plugin](https://github.com/headspinio/appium-altunity-plugin) introduces the concept of a `UNITY`
|
|
30
|
+
context, which encapsulates all the plugin's specific behaviour to ensure that when outside of the
|
|
31
|
+
`UNITY` context, the active driver's usual command implementations are used.
|
|
32
|
+
|
|
33
|
+
It is important to note that a call to `Get Contexts` will always contain at least one context,
|
|
34
|
+
conventionally but not necessarily named `NATIVE_APP`. This is the default active context.
|
|
35
|
+
|
|
36
|
+
Depending on the type of context you're in, the operation of the driver might change. The XCUITest
|
|
37
|
+
driver, when targeting a webview context, will not run its typical routines for finding and
|
|
38
|
+
interacting with elements. Instead, it will run a different set of routines appropriate to web
|
|
39
|
+
elements. This might have a variety of consequences, like supporting a different set of locator
|
|
40
|
+
strategies.
|
|
41
|
+
|
|
42
|
+
The command names in the table above are generic references to the commands and not code examples.
|
|
43
|
+
For examples of how to access the Context API in the language-specific client libraries, please
|
|
44
|
+
visit the documentation for a given library.
|
|
@@ -0,0 +1,73 @@
|
|
|
1
|
+
---
|
|
2
|
+
hide:
|
|
3
|
+
- toc
|
|
4
|
+
|
|
5
|
+
title: Retrieving Event Timings
|
|
6
|
+
---
|
|
7
|
+
|
|
8
|
+
Appium comes with the ability to retrieve timing information about startup
|
|
9
|
+
information and command length. This is an advanced feature that is controlled
|
|
10
|
+
by the use of the `appium:eventTimings` capability (set it to `true` to log event
|
|
11
|
+
timings).
|
|
12
|
+
|
|
13
|
+
With this capability turned on, the `POST /session/:id/appium/events` response (i.e.,
|
|
14
|
+
the response to `driver.logs.events` or similar, depending on client) will be
|
|
15
|
+
decorated with an `events` property. This is the structure of that `events`
|
|
16
|
+
property:
|
|
17
|
+
|
|
18
|
+
```
|
|
19
|
+
{
|
|
20
|
+
"<event_type>": [<occurence_timestamp_1>, ...],
|
|
21
|
+
"commands": [
|
|
22
|
+
{
|
|
23
|
+
"cmd": "<command_name>",
|
|
24
|
+
"startTime": <js_timestamp>,
|
|
25
|
+
"endTime": <js_timestamp>
|
|
26
|
+
},
|
|
27
|
+
...
|
|
28
|
+
]
|
|
29
|
+
}
|
|
30
|
+
```
|
|
31
|
+
|
|
32
|
+
In other words, the `events` property has 2 kinds of properties of its own:
|
|
33
|
+
|
|
34
|
+
* Properties which are the names of event types
|
|
35
|
+
* The `commands` property
|
|
36
|
+
|
|
37
|
+
Properties which are names of event types correspond to an array of timestamps
|
|
38
|
+
when that event happened. It's an array because events might happen multiple
|
|
39
|
+
times in the course of a session. Examples of event types include:
|
|
40
|
+
|
|
41
|
+
* `newSessionRequested`
|
|
42
|
+
* `newSessionStarted`
|
|
43
|
+
|
|
44
|
+
(Individual drivers will define their own event types, so we do not have an
|
|
45
|
+
exhaustive list to share here. It's best to actually get one of these responses
|
|
46
|
+
from a real session to inspect the possible event types.)
|
|
47
|
+
|
|
48
|
+
The `commands` property is an array of objects. Each object has the name of the
|
|
49
|
+
Appium-internal command (for example `click`), as well as the time the command
|
|
50
|
+
started processing and the time it finished processing.
|
|
51
|
+
|
|
52
|
+
With this data, you can calculate the time between events, or a strict timeline
|
|
53
|
+
of events, or statistical information about average length of a certain type of
|
|
54
|
+
command, and so on.
|
|
55
|
+
|
|
56
|
+
You can only receive data about events that have happened when you make the
|
|
57
|
+
call to `/session/:id/appium/events`, so the best time to get data about an entire session is
|
|
58
|
+
right before quitting it.
|
|
59
|
+
|
|
60
|
+
The Appium team maintains an event timings parser tool that can be used to
|
|
61
|
+
generate various kinds of reports from event timings output:
|
|
62
|
+
[appium/appium-event-parser](https://github.com/appium/appium-event-parser).
|
|
63
|
+
|
|
64
|
+
!!! note
|
|
65
|
+
|
|
66
|
+
In the past, events were available as a part of `GET /session/:id` response
|
|
67
|
+
|
|
68
|
+
## Add a custom event
|
|
69
|
+
|
|
70
|
+
You can add custom events that will show up in the event timings data. You can send a custom event
|
|
71
|
+
name to the Appium server using the [Log Custom Event API](../reference/api/appium.md#logcustomevent),
|
|
72
|
+
and the server will store the timestamp. The [Get Log Events](../reference/api/appium.md#getlogevents)
|
|
73
|
+
command can be used to retrieve named events' timestamps later on.
|
|
@@ -0,0 +1,122 @@
|
|
|
1
|
+
---
|
|
2
|
+
hide:
|
|
3
|
+
- toc
|
|
4
|
+
|
|
5
|
+
title: Execute Methods
|
|
6
|
+
---
|
|
7
|
+
|
|
8
|
+
Because the scope of commands implemented in Appium drivers is broader than the scope of commands
|
|
9
|
+
defined by the W3C WebDriver spec, Appium needs a way for these "extended" commands to be accessible
|
|
10
|
+
by client libraries. There are two main strategies for this:
|
|
11
|
+
|
|
12
|
+
1. Appium drivers define new W3C-compatible API routes, and Appium clients are updated to include
|
|
13
|
+
support for those new routes.
|
|
14
|
+
2. Appium drivers define so-called "Execute Methods" which provide new functionality by
|
|
15
|
+
overloading the existing `Execute Script` command which is already available in any WebDriver-
|
|
16
|
+
based client library (including all Selenium and Appium clients).
|
|
17
|
+
|
|
18
|
+
There are pros and cons for each strategy, but it is ultimately up to the extension author to
|
|
19
|
+
decide how they wish implement new commands.
|
|
20
|
+
|
|
21
|
+
This guide is designed to specifically help you understand the "Execute Method" strategy. This
|
|
22
|
+
pattern is commonly used in official Appium drivers and other third-party extensions.
|
|
23
|
+
Here's an example of how the `Execute Script` command is designed to work in the world of WebDriver
|
|
24
|
+
and browser automation:
|
|
25
|
+
|
|
26
|
+
=== "JS (WebDriverIO)"
|
|
27
|
+
|
|
28
|
+
```js
|
|
29
|
+
await driver.executeScript('return arguments[0] + arguments[1]', [3, 4])
|
|
30
|
+
```
|
|
31
|
+
|
|
32
|
+
=== "Java"
|
|
33
|
+
|
|
34
|
+
```java
|
|
35
|
+
JavascriptExecutor jsDriver = (JavascriptExecutor) driver;
|
|
36
|
+
jsDriver.executeScript("return arguments[0] + arguments[1]", 3, 4);
|
|
37
|
+
```
|
|
38
|
+
|
|
39
|
+
=== "Python"
|
|
40
|
+
|
|
41
|
+
```py
|
|
42
|
+
driver.execute_script('return arguments[0] + arguments[1]', 3, 4)
|
|
43
|
+
```
|
|
44
|
+
|
|
45
|
+
=== "Ruby"
|
|
46
|
+
|
|
47
|
+
```rb
|
|
48
|
+
driver.execute_script 'return arguments[0] + arguments[1]', 3, 4
|
|
49
|
+
```
|
|
50
|
+
|
|
51
|
+
=== "C#"
|
|
52
|
+
|
|
53
|
+
```dotnet
|
|
54
|
+
((IJavaScriptExecutor)driver).ExecuteScript("return arguments[0] + arguments[1]", 3, 4);
|
|
55
|
+
```
|
|
56
|
+
|
|
57
|
+
What's happening here is that we are defining a snippet of Javascript (technically,
|
|
58
|
+
a function body) to be executed within the web browser. The client can send arguments which are
|
|
59
|
+
serialized, sent over HTTP, and finally provided to the function as parameters. In this example,
|
|
60
|
+
we are essentially defining an addition function. The return value of the `Execute Script` command
|
|
61
|
+
is whatever the return value of the Javascript snippet is! In the case of this example, that value
|
|
62
|
+
would be the number `7` (`3` + `4`).
|
|
63
|
+
|
|
64
|
+
Each client library has its own way of calling the command and providing any arguments to the script
|
|
65
|
+
function, but the function itself—the snippet—is always a string and is the same across all languages.
|
|
66
|
+
|
|
67
|
+
In the world of Appium, we are usually not automating a web browser, which means this command is
|
|
68
|
+
not particularly useful. But it *is* useful as a way to encode the name of an arbitrary command and
|
|
69
|
+
to provide parameters. For example, the [XCUITest
|
|
70
|
+
Driver](https://github.com/appium/appium-xcuitest-driver) has implemented a command that lets a client
|
|
71
|
+
terminate a running application if you know the ID (the `bundleId`) of the app. The way that the
|
|
72
|
+
driver makes this command available is via the Execute Method `mobile: terminateApp`. Instead of
|
|
73
|
+
providing a JavaScript function to the "Execute Script" command, the user provides a _known string_
|
|
74
|
+
as defined by the driver. The only other thing a client needs to know is the set of
|
|
75
|
+
parameters for the method, which are documented by the driver. In this case, we have a parameter
|
|
76
|
+
named `bundleId`, whose value should be a string encoding the ID of the app to terminate. Here is
|
|
77
|
+
how this Execute Method would be called:
|
|
78
|
+
|
|
79
|
+
=== "JS (WebDriverIO)"
|
|
80
|
+
|
|
81
|
+
```js
|
|
82
|
+
await driver.executeScript('mobile: terminateApp', [{bundleId: 'com.my.app'}])
|
|
83
|
+
```
|
|
84
|
+
|
|
85
|
+
=== "Java"
|
|
86
|
+
|
|
87
|
+
```java
|
|
88
|
+
JavascriptExecutor jsDriver = (JavascriptExecutor) driver;
|
|
89
|
+
jsDriver.executeScript("mobile: terminateApp", ImmutableMap.of("bundleId", "com.my.app"));
|
|
90
|
+
```
|
|
91
|
+
|
|
92
|
+
=== "Python"
|
|
93
|
+
|
|
94
|
+
```py
|
|
95
|
+
driver.execute_script('mobile: terminateApp', {'bundleId': 'com.my.app'})
|
|
96
|
+
```
|
|
97
|
+
|
|
98
|
+
=== "Ruby"
|
|
99
|
+
|
|
100
|
+
```rb
|
|
101
|
+
driver.execute_script 'mobile: terminateApp', { bundleId: 'com.my.app' }
|
|
102
|
+
```
|
|
103
|
+
|
|
104
|
+
=== "C#"
|
|
105
|
+
|
|
106
|
+
```dotnet
|
|
107
|
+
((IJavaScriptExecutor)driver).ExecuteScript("mobile: terminateApp",
|
|
108
|
+
new Dictionary<string, string> { { "bundleId", "com.my.app" } });
|
|
109
|
+
|
|
110
|
+
```
|
|
111
|
+
|
|
112
|
+
There are two important differences in using Appium Execute Methods from vanilla Selenium
|
|
113
|
+
Javascript execution:
|
|
114
|
+
|
|
115
|
+
1. The script string is just a command name; it will be provided by the driver documentation
|
|
116
|
+
1. The standard way to provide parameters is as a *single* object with keys representing parameter
|
|
117
|
+
names and values representing parameter values. So in this case, we had to specify both the
|
|
118
|
+
parameter name (`bundleId`) as the key of the parameters object, and the parameter value
|
|
119
|
+
(`com.my.app`) as the value for that key. A driver can define parameters as _required_ or _optional_.
|
|
120
|
+
|
|
121
|
+
Of course, always refer to the documentation for the particular Execute Method in case the author
|
|
122
|
+
has made any alterations to the standard access method.
|