@appium/mcp-documentation 1.0.2 → 1.0.4

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (417) hide show
  1. package/CHANGELOG.md +15 -0
  2. package/package.json +3 -6
  3. package/src/resources/submodules/appium/.github/PULL_REQUEST_TEMPLATE.md +28 -0
  4. package/src/resources/submodules/appium/.github/copilot-instructions.md +9 -0
  5. package/src/resources/submodules/appium/CHANGELOG.md +45 -0
  6. package/src/resources/submodules/appium/GOVERNANCE.md +189 -0
  7. package/src/resources/submodules/appium/README.md +221 -0
  8. package/src/resources/submodules/appium/ROADMAP.md +30 -0
  9. package/src/resources/submodules/appium/SPONSORS.md +3 -0
  10. package/src/resources/submodules/appium/docs/README.md +6 -0
  11. package/src/resources/submodules/appium/docs/payout.md +35 -0
  12. package/src/resources/submodules/appium/packages/appium/CHANGELOG.md +1547 -0
  13. package/src/resources/submodules/appium/packages/appium/README.md +221 -0
  14. package/src/resources/submodules/appium/packages/appium/docs/en/blog/index.md +2 -0
  15. package/src/resources/submodules/appium/packages/appium/docs/en/blog/posts/announcing-appiumconf2024.md +45 -0
  16. package/src/resources/submodules/appium/packages/appium/docs/en/blog/posts/announcing-browserstack-as-strategic-partner.md +46 -0
  17. package/src/resources/submodules/appium/packages/appium/docs/en/blog/posts/announcing-headspin-as-development-partner.md +47 -0
  18. package/src/resources/submodules/appium/packages/appium/docs/en/blog/posts/announcing-lambdatest-as-development-partner.md +36 -0
  19. package/src/resources/submodules/appium/packages/appium/docs/en/blog/posts/announcing-lambdatest-as-strategic-partner.md +42 -0
  20. package/src/resources/submodules/appium/packages/appium/docs/en/blog/posts/announcing-sauce-labs-as-strategic-partner.md +36 -0
  21. package/src/resources/submodules/appium/packages/appium/docs/en/blog/posts/announcing-sponsorship-program.md +48 -0
  22. package/src/resources/submodules/appium/packages/appium/docs/en/blog/posts/appium3.md +40 -0
  23. package/src/resources/submodules/appium/packages/appium/docs/en/blog/posts/hello-world.md +15 -0
  24. package/src/resources/submodules/appium/packages/appium/docs/en/contributing/index.md +150 -0
  25. package/src/resources/submodules/appium/packages/appium/docs/en/developing/build-docs.md +86 -0
  26. package/src/resources/submodules/appium/packages/appium/docs/en/developing/build-doctor-checks.md +141 -0
  27. package/src/resources/submodules/appium/packages/appium/docs/en/developing/build-drivers.md +1002 -0
  28. package/src/resources/submodules/appium/packages/appium/docs/en/developing/build-plugins.md +523 -0
  29. package/src/resources/submodules/appium/packages/appium/docs/en/developing/config-system.md +451 -0
  30. package/src/resources/submodules/appium/packages/appium/docs/en/developing/index.md +18 -0
  31. package/src/resources/submodules/appium/packages/appium/docs/en/developing/sensitive.md +49 -0
  32. package/src/resources/submodules/appium/packages/appium/docs/en/ecosystem/clients.md +132 -0
  33. package/src/resources/submodules/appium/packages/appium/docs/en/ecosystem/drivers.md +207 -0
  34. package/src/resources/submodules/appium/packages/appium/docs/en/ecosystem/index.md +45 -0
  35. package/src/resources/submodules/appium/packages/appium/docs/en/ecosystem/plugins.md +138 -0
  36. package/src/resources/submodules/appium/packages/appium/docs/en/ecosystem/tools.md +106 -0
  37. package/src/resources/submodules/appium/packages/appium/docs/en/guides/branch-testing.md +57 -0
  38. package/src/resources/submodules/appium/packages/appium/docs/en/guides/caching.md +76 -0
  39. package/src/resources/submodules/appium/packages/appium/docs/en/guides/caps.md +271 -0
  40. package/src/resources/submodules/appium/packages/appium/docs/en/guides/config.md +98 -0
  41. package/src/resources/submodules/appium/packages/appium/docs/en/guides/context.md +44 -0
  42. package/src/resources/submodules/appium/packages/appium/docs/en/guides/event-timing.md +73 -0
  43. package/src/resources/submodules/appium/packages/appium/docs/en/guides/execute-methods.md +122 -0
  44. package/src/resources/submodules/appium/packages/appium/docs/en/guides/grid.md +178 -0
  45. package/src/resources/submodules/appium/packages/appium/docs/en/guides/headers.md +17 -0
  46. package/src/resources/submodules/appium/packages/appium/docs/en/guides/log-filters.md +86 -0
  47. package/src/resources/submodules/appium/packages/appium/docs/en/guides/managing-exts.md +87 -0
  48. package/src/resources/submodules/appium/packages/appium/docs/en/guides/migrating-1-to-2.md +368 -0
  49. package/src/resources/submodules/appium/packages/appium/docs/en/guides/migrating-2-to-3.md +464 -0
  50. package/src/resources/submodules/appium/packages/appium/docs/en/guides/security.md +87 -0
  51. package/src/resources/submodules/appium/packages/appium/docs/en/guides/settings.md +68 -0
  52. package/src/resources/submodules/appium/packages/appium/docs/en/guides/tls.md +42 -0
  53. package/src/resources/submodules/appium/packages/appium/docs/en/index.md +59 -0
  54. package/src/resources/submodules/appium/packages/appium/docs/en/intro/appium.md +202 -0
  55. package/src/resources/submodules/appium/packages/appium/docs/en/intro/clients.md +127 -0
  56. package/src/resources/submodules/appium/packages/appium/docs/en/intro/drivers.md +188 -0
  57. package/src/resources/submodules/appium/packages/appium/docs/en/intro/history.md +196 -0
  58. package/src/resources/submodules/appium/packages/appium/docs/en/intro/index.md +39 -0
  59. package/src/resources/submodules/appium/packages/appium/docs/en/quickstart/index.md +29 -0
  60. package/src/resources/submodules/appium/packages/appium/docs/en/quickstart/install.md +50 -0
  61. package/src/resources/submodules/appium/packages/appium/docs/en/quickstart/next-steps.md +23 -0
  62. package/src/resources/submodules/appium/packages/appium/docs/en/quickstart/requirements.md +29 -0
  63. package/src/resources/submodules/appium/packages/appium/docs/en/quickstart/test-dotnet.md +105 -0
  64. package/src/resources/submodules/appium/packages/appium/docs/en/quickstart/test-java.md +23 -0
  65. package/src/resources/submodules/appium/packages/appium/docs/en/quickstart/test-js.md +75 -0
  66. package/src/resources/submodules/appium/packages/appium/docs/en/quickstart/test-py.md +60 -0
  67. package/src/resources/submodules/appium/packages/appium/docs/en/quickstart/test-rb.md +83 -0
  68. package/src/resources/submodules/appium/packages/appium/docs/en/quickstart/uiauto2-driver.md +144 -0
  69. package/src/resources/submodules/appium/packages/appium/docs/en/reference/api/appium.md +394 -0
  70. package/src/resources/submodules/appium/packages/appium/docs/en/reference/api/bidi.md +70 -0
  71. package/src/resources/submodules/appium/packages/appium/docs/en/reference/api/index.md +30 -0
  72. package/src/resources/submodules/appium/packages/appium/docs/en/reference/api/jsonwp.md +214 -0
  73. package/src/resources/submodules/appium/packages/appium/docs/en/reference/api/mjsonwp.md +151 -0
  74. package/src/resources/submodules/appium/packages/appium/docs/en/reference/api/others.md +736 -0
  75. package/src/resources/submodules/appium/packages/appium/docs/en/reference/api/plugins.md +289 -0
  76. package/src/resources/submodules/appium/packages/appium/docs/en/reference/api/webdriver.md +1114 -0
  77. package/src/resources/submodules/appium/packages/appium/docs/en/reference/cli/env-vars.md +31 -0
  78. package/src/resources/submodules/appium/packages/appium/docs/en/reference/cli/extensions.md +246 -0
  79. package/src/resources/submodules/appium/packages/appium/docs/en/reference/cli/index.md +36 -0
  80. package/src/resources/submodules/appium/packages/appium/docs/en/reference/cli/insecure-features.md +24 -0
  81. package/src/resources/submodules/appium/packages/appium/docs/en/reference/cli/server.md +78 -0
  82. package/src/resources/submodules/appium/packages/appium/docs/en/reference/cli/setup.md +76 -0
  83. package/src/resources/submodules/appium/packages/appium/docs/en/reference/index.md +31 -0
  84. package/src/resources/submodules/appium/packages/appium/docs/en/reference/session/caps.md +56 -0
  85. package/src/resources/submodules/appium/packages/appium/docs/en/reference/session/index.md +23 -0
  86. package/src/resources/submodules/appium/packages/appium/docs/en/resources/index.md +28 -0
  87. package/src/resources/submodules/appium/packages/appium/docs/en/sponsors/index.md +69 -0
  88. package/src/resources/submodules/appium/packages/appium/docs/ja/blog/index.md +2 -0
  89. package/src/resources/submodules/appium/packages/appium/docs/ja/blog/posts/announcing-appiumconf2024.md +45 -0
  90. package/src/resources/submodules/appium/packages/appium/docs/ja/blog/posts/announcing-browserstack-as-strategic-partner.md +46 -0
  91. package/src/resources/submodules/appium/packages/appium/docs/ja/blog/posts/announcing-headspin-as-development-partner.md +47 -0
  92. package/src/resources/submodules/appium/packages/appium/docs/ja/blog/posts/announcing-lambdatest-as-development-partner.md +34 -0
  93. package/src/resources/submodules/appium/packages/appium/docs/ja/blog/posts/announcing-lambdatest-as-strategic-partner.md +41 -0
  94. package/src/resources/submodules/appium/packages/appium/docs/ja/blog/posts/announcing-sauce-labs-as-strategic-partner.md +36 -0
  95. package/src/resources/submodules/appium/packages/appium/docs/ja/blog/posts/announcing-sponsorship-program.md +48 -0
  96. package/src/resources/submodules/appium/packages/appium/docs/ja/blog/posts/appium3.md +40 -0
  97. package/src/resources/submodules/appium/packages/appium/docs/ja/blog/posts/hello-world.md +15 -0
  98. package/src/resources/submodules/appium/packages/appium/docs/ja/contributing/index.md +158 -0
  99. package/src/resources/submodules/appium/packages/appium/docs/ja/developing/build-docs.md +86 -0
  100. package/src/resources/submodules/appium/packages/appium/docs/ja/developing/build-doctor-checks.md +141 -0
  101. package/src/resources/submodules/appium/packages/appium/docs/ja/developing/build-drivers.md +1010 -0
  102. package/src/resources/submodules/appium/packages/appium/docs/ja/developing/build-plugins.md +529 -0
  103. package/src/resources/submodules/appium/packages/appium/docs/ja/developing/config-system.md +468 -0
  104. package/src/resources/submodules/appium/packages/appium/docs/ja/developing/index.md +18 -0
  105. package/src/resources/submodules/appium/packages/appium/docs/ja/developing/sensitive.md +49 -0
  106. package/src/resources/submodules/appium/packages/appium/docs/ja/ecosystem/clients.md +143 -0
  107. package/src/resources/submodules/appium/packages/appium/docs/ja/ecosystem/drivers.md +219 -0
  108. package/src/resources/submodules/appium/packages/appium/docs/ja/ecosystem/index.md +45 -0
  109. package/src/resources/submodules/appium/packages/appium/docs/ja/ecosystem/plugins.md +140 -0
  110. package/src/resources/submodules/appium/packages/appium/docs/ja/ecosystem/tools.md +115 -0
  111. package/src/resources/submodules/appium/packages/appium/docs/ja/guides/branch-testing.md +57 -0
  112. package/src/resources/submodules/appium/packages/appium/docs/ja/guides/caching.md +78 -0
  113. package/src/resources/submodules/appium/packages/appium/docs/ja/guides/caps.md +276 -0
  114. package/src/resources/submodules/appium/packages/appium/docs/ja/guides/config.md +102 -0
  115. package/src/resources/submodules/appium/packages/appium/docs/ja/guides/context.md +44 -0
  116. package/src/resources/submodules/appium/packages/appium/docs/ja/guides/event-timing.md +75 -0
  117. package/src/resources/submodules/appium/packages/appium/docs/ja/guides/execute-methods.md +142 -0
  118. package/src/resources/submodules/appium/packages/appium/docs/ja/guides/grid.md +178 -0
  119. package/src/resources/submodules/appium/packages/appium/docs/ja/guides/headers.md +17 -0
  120. package/src/resources/submodules/appium/packages/appium/docs/ja/guides/log-filters.md +86 -0
  121. package/src/resources/submodules/appium/packages/appium/docs/ja/guides/managing-exts.md +89 -0
  122. package/src/resources/submodules/appium/packages/appium/docs/ja/guides/migrating-1-to-2.md +402 -0
  123. package/src/resources/submodules/appium/packages/appium/docs/ja/guides/migrating-2-to-3.md +458 -0
  124. package/src/resources/submodules/appium/packages/appium/docs/ja/guides/security.md +89 -0
  125. package/src/resources/submodules/appium/packages/appium/docs/ja/guides/settings.md +70 -0
  126. package/src/resources/submodules/appium/packages/appium/docs/ja/guides/tls.md +43 -0
  127. package/src/resources/submodules/appium/packages/appium/docs/ja/index.md +55 -0
  128. package/src/resources/submodules/appium/packages/appium/docs/ja/intro/appium.md +191 -0
  129. package/src/resources/submodules/appium/packages/appium/docs/ja/intro/clients.md +139 -0
  130. package/src/resources/submodules/appium/packages/appium/docs/ja/intro/drivers.md +188 -0
  131. package/src/resources/submodules/appium/packages/appium/docs/ja/intro/history.md +196 -0
  132. package/src/resources/submodules/appium/packages/appium/docs/ja/intro/index.md +39 -0
  133. package/src/resources/submodules/appium/packages/appium/docs/ja/quickstart/index.md +23 -0
  134. package/src/resources/submodules/appium/packages/appium/docs/ja/quickstart/install.md +47 -0
  135. package/src/resources/submodules/appium/packages/appium/docs/ja/quickstart/next-steps.md +19 -0
  136. package/src/resources/submodules/appium/packages/appium/docs/ja/quickstart/requirements.md +29 -0
  137. package/src/resources/submodules/appium/packages/appium/docs/ja/quickstart/test-dotnet.md +107 -0
  138. package/src/resources/submodules/appium/packages/appium/docs/ja/quickstart/test-java.md +23 -0
  139. package/src/resources/submodules/appium/packages/appium/docs/ja/quickstart/test-js.md +77 -0
  140. package/src/resources/submodules/appium/packages/appium/docs/ja/quickstart/test-py.md +63 -0
  141. package/src/resources/submodules/appium/packages/appium/docs/ja/quickstart/test-rb.md +85 -0
  142. package/src/resources/submodules/appium/packages/appium/docs/ja/quickstart/uiauto2-driver.md +148 -0
  143. package/src/resources/submodules/appium/packages/appium/docs/ja/reference/api/appium.md +395 -0
  144. package/src/resources/submodules/appium/packages/appium/docs/ja/reference/api/bidi.md +71 -0
  145. package/src/resources/submodules/appium/packages/appium/docs/ja/reference/api/index.md +30 -0
  146. package/src/resources/submodules/appium/packages/appium/docs/ja/reference/api/jsonwp.md +215 -0
  147. package/src/resources/submodules/appium/packages/appium/docs/ja/reference/api/mjsonwp.md +152 -0
  148. package/src/resources/submodules/appium/packages/appium/docs/ja/reference/api/others.md +737 -0
  149. package/src/resources/submodules/appium/packages/appium/docs/ja/reference/api/plugins.md +291 -0
  150. package/src/resources/submodules/appium/packages/appium/docs/ja/reference/api/webdriver.md +1114 -0
  151. package/src/resources/submodules/appium/packages/appium/docs/ja/reference/cli/env-vars.md +31 -0
  152. package/src/resources/submodules/appium/packages/appium/docs/ja/reference/cli/extensions.md +247 -0
  153. package/src/resources/submodules/appium/packages/appium/docs/ja/reference/cli/index.md +36 -0
  154. package/src/resources/submodules/appium/packages/appium/docs/ja/reference/cli/insecure-features.md +23 -0
  155. package/src/resources/submodules/appium/packages/appium/docs/ja/reference/cli/server.md +78 -0
  156. package/src/resources/submodules/appium/packages/appium/docs/ja/reference/cli/setup.md +78 -0
  157. package/src/resources/submodules/appium/packages/appium/docs/ja/reference/index.md +31 -0
  158. package/src/resources/submodules/appium/packages/appium/docs/ja/reference/session/caps.md +56 -0
  159. package/src/resources/submodules/appium/packages/appium/docs/ja/reference/session/index.md +23 -0
  160. package/src/resources/submodules/appium/packages/appium/docs/ja/resources/index.md +28 -0
  161. package/src/resources/submodules/appium/packages/appium/docs/ja/sponsors/index.md +66 -0
  162. package/src/resources/submodules/appium/packages/appium/docs/overrides/assets/images/appium-logo-horiz-white.png +0 -0
  163. package/src/resources/submodules/appium/packages/appium/docs/overrides/assets/images/appium-logo-horiz.png +0 -0
  164. package/src/resources/submodules/appium/packages/appium/docs/overrides/assets/images/appium-logo-white.png +0 -0
  165. package/src/resources/submodules/appium/packages/appium/docs/overrides/assets/images/appium-logo.png +0 -0
  166. package/src/resources/submodules/appium/packages/appium/docs/overrides/assets/images/sponsor-logo-browserstack-dark.png +0 -0
  167. package/src/resources/submodules/appium/packages/appium/docs/overrides/assets/images/sponsor-logo-browserstack-light.png +0 -0
  168. package/src/resources/submodules/appium/packages/appium/docs/overrides/assets/images/sponsor-logo-lambdatest-dark.png +0 -0
  169. package/src/resources/submodules/appium/packages/appium/docs/overrides/assets/images/sponsor-logo-lambdatest-light.png +0 -0
  170. package/src/resources/submodules/appium/packages/appium/docs/overrides/assets/images/sponsor-logo-sauce.png +0 -0
  171. package/src/resources/submodules/appium/packages/appium/docs/overrides/assets/images/sponsor-logo-testmuai-dark.png +0 -0
  172. package/src/resources/submodules/appium/packages/appium/docs/overrides/assets/images/sponsor-logo-testmuai-light.png +0 -0
  173. package/src/resources/submodules/appium/packages/appium/docs/zh/blog/index.md +2 -0
  174. package/src/resources/submodules/appium/packages/appium/docs/zh/blog/posts/announcing-appiumconf2024.md +45 -0
  175. package/src/resources/submodules/appium/packages/appium/docs/zh/blog/posts/announcing-browserstack-as-strategic-partner.md +46 -0
  176. package/src/resources/submodules/appium/packages/appium/docs/zh/blog/posts/announcing-headspin-as-development-partner.md +47 -0
  177. package/src/resources/submodules/appium/packages/appium/docs/zh/blog/posts/announcing-lambdatest-as-development-partner.md +34 -0
  178. package/src/resources/submodules/appium/packages/appium/docs/zh/blog/posts/announcing-lambdatest-as-strategic-partner.md +41 -0
  179. package/src/resources/submodules/appium/packages/appium/docs/zh/blog/posts/announcing-sauce-labs-as-strategic-partner.md +36 -0
  180. package/src/resources/submodules/appium/packages/appium/docs/zh/blog/posts/announcing-sponsorship-program.md +48 -0
  181. package/src/resources/submodules/appium/packages/appium/docs/zh/blog/posts/appium3.md +40 -0
  182. package/src/resources/submodules/appium/packages/appium/docs/zh/blog/posts/hello-world.md +15 -0
  183. package/src/resources/submodules/appium/packages/appium/docs/zh/contributing/index.md +132 -0
  184. package/src/resources/submodules/appium/packages/appium/docs/zh/developing/build-docs.md +86 -0
  185. package/src/resources/submodules/appium/packages/appium/docs/zh/developing/build-doctor-checks.md +141 -0
  186. package/src/resources/submodules/appium/packages/appium/docs/zh/developing/build-drivers.md +1010 -0
  187. package/src/resources/submodules/appium/packages/appium/docs/zh/developing/build-plugins.md +529 -0
  188. package/src/resources/submodules/appium/packages/appium/docs/zh/developing/config-system.md +468 -0
  189. package/src/resources/submodules/appium/packages/appium/docs/zh/developing/index.md +18 -0
  190. package/src/resources/submodules/appium/packages/appium/docs/zh/developing/sensitive.md +49 -0
  191. package/src/resources/submodules/appium/packages/appium/docs/zh/ecosystem/clients.md +143 -0
  192. package/src/resources/submodules/appium/packages/appium/docs/zh/ecosystem/drivers.md +219 -0
  193. package/src/resources/submodules/appium/packages/appium/docs/zh/ecosystem/index.md +45 -0
  194. package/src/resources/submodules/appium/packages/appium/docs/zh/ecosystem/plugins.md +140 -0
  195. package/src/resources/submodules/appium/packages/appium/docs/zh/ecosystem/tools.md +115 -0
  196. package/src/resources/submodules/appium/packages/appium/docs/zh/guides/branch-testing.md +57 -0
  197. package/src/resources/submodules/appium/packages/appium/docs/zh/guides/caching.md +78 -0
  198. package/src/resources/submodules/appium/packages/appium/docs/zh/guides/caps.md +279 -0
  199. package/src/resources/submodules/appium/packages/appium/docs/zh/guides/config.md +102 -0
  200. package/src/resources/submodules/appium/packages/appium/docs/zh/guides/context.md +44 -0
  201. package/src/resources/submodules/appium/packages/appium/docs/zh/guides/event-timing.md +75 -0
  202. package/src/resources/submodules/appium/packages/appium/docs/zh/guides/execute-methods.md +142 -0
  203. package/src/resources/submodules/appium/packages/appium/docs/zh/guides/grid.md +178 -0
  204. package/src/resources/submodules/appium/packages/appium/docs/zh/guides/headers.md +17 -0
  205. package/src/resources/submodules/appium/packages/appium/docs/zh/guides/log-filters.md +86 -0
  206. package/src/resources/submodules/appium/packages/appium/docs/zh/guides/managing-exts.md +89 -0
  207. package/src/resources/submodules/appium/packages/appium/docs/zh/guides/migrating-1-to-2.md +410 -0
  208. package/src/resources/submodules/appium/packages/appium/docs/zh/guides/migrating-2-to-3.md +459 -0
  209. package/src/resources/submodules/appium/packages/appium/docs/zh/guides/security.md +89 -0
  210. package/src/resources/submodules/appium/packages/appium/docs/zh/guides/settings.md +70 -0
  211. package/src/resources/submodules/appium/packages/appium/docs/zh/guides/tls.md +43 -0
  212. package/src/resources/submodules/appium/packages/appium/docs/zh/index.md +54 -0
  213. package/src/resources/submodules/appium/packages/appium/docs/zh/intro/appium.md +91 -0
  214. package/src/resources/submodules/appium/packages/appium/docs/zh/intro/clients.md +100 -0
  215. package/src/resources/submodules/appium/packages/appium/docs/zh/intro/drivers.md +101 -0
  216. package/src/resources/submodules/appium/packages/appium/docs/zh/intro/history.md +72 -0
  217. package/src/resources/submodules/appium/packages/appium/docs/zh/intro/index.md +36 -0
  218. package/src/resources/submodules/appium/packages/appium/docs/zh/quickstart/index.md +23 -0
  219. package/src/resources/submodules/appium/packages/appium/docs/zh/quickstart/install.md +47 -0
  220. package/src/resources/submodules/appium/packages/appium/docs/zh/quickstart/next-steps.md +19 -0
  221. package/src/resources/submodules/appium/packages/appium/docs/zh/quickstart/requirements.md +21 -0
  222. package/src/resources/submodules/appium/packages/appium/docs/zh/quickstart/test-dotnet.md +99 -0
  223. package/src/resources/submodules/appium/packages/appium/docs/zh/quickstart/test-java.md +20 -0
  224. package/src/resources/submodules/appium/packages/appium/docs/zh/quickstart/test-js.md +62 -0
  225. package/src/resources/submodules/appium/packages/appium/docs/zh/quickstart/test-py.md +57 -0
  226. package/src/resources/submodules/appium/packages/appium/docs/zh/quickstart/test-rb.md +80 -0
  227. package/src/resources/submodules/appium/packages/appium/docs/zh/quickstart/uiauto2-driver.md +119 -0
  228. package/src/resources/submodules/appium/packages/appium/docs/zh/reference/api/appium.md +395 -0
  229. package/src/resources/submodules/appium/packages/appium/docs/zh/reference/api/bidi.md +71 -0
  230. package/src/resources/submodules/appium/packages/appium/docs/zh/reference/api/index.md +30 -0
  231. package/src/resources/submodules/appium/packages/appium/docs/zh/reference/api/jsonwp.md +215 -0
  232. package/src/resources/submodules/appium/packages/appium/docs/zh/reference/api/mjsonwp.md +152 -0
  233. package/src/resources/submodules/appium/packages/appium/docs/zh/reference/api/others.md +737 -0
  234. package/src/resources/submodules/appium/packages/appium/docs/zh/reference/api/plugins.md +291 -0
  235. package/src/resources/submodules/appium/packages/appium/docs/zh/reference/api/webdriver.md +1114 -0
  236. package/src/resources/submodules/appium/packages/appium/docs/zh/reference/cli/env-vars.md +31 -0
  237. package/src/resources/submodules/appium/packages/appium/docs/zh/reference/cli/extensions.md +247 -0
  238. package/src/resources/submodules/appium/packages/appium/docs/zh/reference/cli/index.md +36 -0
  239. package/src/resources/submodules/appium/packages/appium/docs/zh/reference/cli/insecure-features.md +23 -0
  240. package/src/resources/submodules/appium/packages/appium/docs/zh/reference/cli/server.md +78 -0
  241. package/src/resources/submodules/appium/packages/appium/docs/zh/reference/cli/setup.md +78 -0
  242. package/src/resources/submodules/appium/packages/appium/docs/zh/reference/index.md +31 -0
  243. package/src/resources/submodules/appium/packages/appium/docs/zh/reference/session/caps.md +56 -0
  244. package/src/resources/submodules/appium/packages/appium/docs/zh/reference/session/index.md +23 -0
  245. package/src/resources/submodules/appium/packages/appium/docs/zh/resources/index.md +28 -0
  246. package/src/resources/submodules/appium/packages/appium/docs/zh/sponsors/index.md +66 -0
  247. package/src/resources/submodules/appium/packages/appium/types/manifest/README.md +30 -0
  248. package/src/resources/submodules/appium/packages/base-driver/CHANGELOG.md +1244 -0
  249. package/src/resources/submodules/appium/packages/base-driver/README.md +15 -0
  250. package/src/resources/submodules/appium/packages/base-driver/docs/mjsonwp/errors.md +82 -0
  251. package/src/resources/submodules/appium/packages/base-driver/docs/mjsonwp/protocol-methods.md +182 -0
  252. package/src/resources/submodules/appium/packages/base-driver/static/appium.png +0 -0
  253. package/src/resources/submodules/appium/packages/base-plugin/CHANGELOG.md +764 -0
  254. package/src/resources/submodules/appium/packages/base-plugin/README.md +15 -0
  255. package/src/resources/submodules/appium/packages/docutils/CHANGELOG.md +1038 -0
  256. package/src/resources/submodules/appium/packages/docutils/README.md +27 -0
  257. package/src/resources/submodules/appium/packages/driver-test-support/CHANGELOG.md +790 -0
  258. package/src/resources/submodules/appium/packages/driver-test-support/README.md +103 -0
  259. package/src/resources/submodules/appium/packages/eslint-config-appium-ts/CHANGELOG.md +256 -0
  260. package/src/resources/submodules/appium/packages/eslint-config-appium-ts/README.md +47 -0
  261. package/src/resources/submodules/appium/packages/execute-driver-plugin/CHANGELOG.md +671 -0
  262. package/src/resources/submodules/appium/packages/execute-driver-plugin/README.md +55 -0
  263. package/src/resources/submodules/appium/packages/fake-driver/CHANGELOG.md +603 -0
  264. package/src/resources/submodules/appium/packages/fake-driver/README.md +7 -0
  265. package/src/resources/submodules/appium/packages/fake-driver/lib/screen.png +0 -0
  266. package/src/resources/submodules/appium/packages/fake-plugin/CHANGELOG.md +780 -0
  267. package/src/resources/submodules/appium/packages/fake-plugin/README.md +7 -0
  268. package/src/resources/submodules/appium/packages/images-plugin/CHANGELOG.md +691 -0
  269. package/src/resources/submodules/appium/packages/images-plugin/README.md +27 -0
  270. package/src/resources/submodules/appium/packages/images-plugin/docs/find-by-image.md +65 -0
  271. package/src/resources/submodules/appium/packages/images-plugin/docs/image-comparison.md +203 -0
  272. package/src/resources/submodules/appium/packages/images-plugin/test/fixtures/appstore.png +0 -0
  273. package/src/resources/submodules/appium/packages/images-plugin/test/fixtures/img1.png +0 -0
  274. package/src/resources/submodules/appium/packages/images-plugin/test/fixtures/img2.png +0 -0
  275. package/src/resources/submodules/appium/packages/images-plugin/test/fixtures/img2_part.png +0 -0
  276. package/src/resources/submodules/appium/packages/logger/CHANGELOG.md +212 -0
  277. package/src/resources/submodules/appium/packages/logger/README.md +31 -0
  278. package/src/resources/submodules/appium/packages/opencv/CHANGELOG.md +446 -0
  279. package/src/resources/submodules/appium/packages/opencv/README.md +68 -0
  280. package/src/resources/submodules/appium/packages/opencv/test/e2e/images/appium-diagram.jpg +0 -0
  281. package/src/resources/submodules/appium/packages/opencv/test/e2e/images/cc1.png +0 -0
  282. package/src/resources/submodules/appium/packages/opencv/test/e2e/images/cc2.png +0 -0
  283. package/src/resources/submodules/appium/packages/opencv/test/e2e/images/cc_rotated.png +0 -0
  284. package/src/resources/submodules/appium/packages/opencv/test/e2e/images/findwaldo.jpg +0 -0
  285. package/src/resources/submodules/appium/packages/opencv/test/e2e/images/number5.png +0 -0
  286. package/src/resources/submodules/appium/packages/opencv/test/e2e/images/waldo.jpg +0 -0
  287. package/src/resources/submodules/appium/packages/plugin-test-support/CHANGELOG.md +610 -0
  288. package/src/resources/submodules/appium/packages/plugin-test-support/README.md +49 -0
  289. package/src/resources/submodules/appium/packages/relaxed-caps-plugin/CHANGELOG.md +209 -0
  290. package/src/resources/submodules/appium/packages/relaxed-caps-plugin/README.md +35 -0
  291. package/src/resources/submodules/appium/packages/schema/CHANGELOG.md +308 -0
  292. package/src/resources/submodules/appium/packages/schema/README.md +50 -0
  293. package/src/resources/submodules/appium/packages/storage-plugin/CHANGELOG.md +157 -0
  294. package/src/resources/submodules/appium/packages/storage-plugin/README.md +83 -0
  295. package/src/resources/submodules/appium/packages/strongbox/CHANGELOG.md +129 -0
  296. package/src/resources/submodules/appium/packages/strongbox/README.md +110 -0
  297. package/src/resources/submodules/appium/packages/support/CHANGELOG.md +1147 -0
  298. package/src/resources/submodules/appium/packages/support/README.md +161 -0
  299. package/src/resources/submodules/appium/packages/tsconfig/CHANGELOG.md +147 -0
  300. package/src/resources/submodules/appium/packages/tsconfig/README.md +19 -0
  301. package/src/resources/submodules/appium/packages/types/CHANGELOG.md +871 -0
  302. package/src/resources/submodules/appium/packages/types/README.md +21 -0
  303. package/src/resources/submodules/appium/packages/universal-xml-plugin/CHANGELOG.md +502 -0
  304. package/src/resources/submodules/appium/packages/universal-xml-plugin/README.md +53 -0
  305. package/src/resources/submodules/appium/renovate/README.md +55 -0
  306. package/src/resources/submodules/appium-skills/.github/dependabot.yml +11 -0
  307. package/src/resources/submodules/appium-skills/.github/workflows/pr-title.yml +10 -0
  308. package/src/resources/submodules/appium-skills/AGENTS.md +214 -0
  309. package/src/resources/submodules/appium-skills/LICENSE +201 -0
  310. package/src/resources/submodules/appium-skills/README.md +33 -0
  311. package/src/resources/submodules/appium-skills/skills/appium-troubleshooting/SKILL.md +66 -0
  312. package/src/resources/submodules/appium-skills/skills/appium-troubleshooting/references/community-search.md +51 -0
  313. package/src/resources/submodules/appium-skills/skills/appium-troubleshooting/references/uiautomator2-locators.md +34 -0
  314. package/src/resources/submodules/appium-skills/skills/appium-troubleshooting/references/uiautomator2-session-startup.md +53 -0
  315. package/src/resources/submodules/appium-skills/skills/appium-troubleshooting/references/xcuitest-element-lookup.md +23 -0
  316. package/src/resources/submodules/appium-skills/skills/appium-troubleshooting/references/xcuitest-locators.md +16 -0
  317. package/src/resources/submodules/appium-skills/skills/appium-troubleshooting/references/xcuitest-troubleshooting.md +52 -0
  318. package/src/resources/submodules/appium-skills/skills/environment-setup-android/SKILL.md +346 -0
  319. package/src/resources/submodules/appium-skills/skills/environment-setup-bundletool/SKILL.md +91 -0
  320. package/src/resources/submodules/appium-skills/skills/environment-setup-chromium/SKILL.md +260 -0
  321. package/src/resources/submodules/appium-skills/skills/environment-setup-espresso/SKILL.md +216 -0
  322. package/src/resources/submodules/appium-skills/skills/environment-setup-ffmpeg/SKILL.md +91 -0
  323. package/src/resources/submodules/appium-skills/skills/environment-setup-node/SKILL.md +128 -0
  324. package/src/resources/submodules/appium-skills/skills/environment-setup-uiautomator2/SKILL.md +225 -0
  325. package/src/resources/submodules/appium-skills/skills/environment-setup-xcuitest/SKILL.md +153 -0
  326. package/src/resources/submodules/appium-skills/skills/xcuitest-real-device-config/SKILL.md +488 -0
  327. package/src/resources/submodules/appium-uiautomator2-driver/CHANGELOG.md +1506 -0
  328. package/src/resources/submodules/appium-uiautomator2-driver/README.md +2253 -0
  329. package/src/resources/submodules/appium-uiautomator2-driver/docs/actions.md +72 -0
  330. package/src/resources/submodules/appium-uiautomator2-driver/docs/activity-startup.md +47 -0
  331. package/src/resources/submodules/appium-uiautomator2-driver/docs/android-appbundle.md +69 -0
  332. package/src/resources/submodules/appium-uiautomator2-driver/docs/android-mobile-gestures.md +352 -0
  333. package/src/resources/submodules/appium-uiautomator2-driver/docs/android-multiwindow.md +872 -0
  334. package/src/resources/submodules/appium-uiautomator2-driver/docs/architecture.md +34 -0
  335. package/src/resources/submodules/appium-uiautomator2-driver/docs/bidi.md +50 -0
  336. package/src/resources/submodules/appium-uiautomator2-driver/docs/capability-sets.md +136 -0
  337. package/src/resources/submodules/appium-uiautomator2-driver/docs/mjpeg.md +111 -0
  338. package/src/resources/submodules/appium-uiautomator2-driver/docs/scheduled-actions.md +155 -0
  339. package/src/resources/submodules/appium-uiautomator2-driver/docs/uiautomator-uiselector.md +51 -0
  340. package/src/resources/submodules/appium-uiautomator2-driver/docs/unlock/main.md +95 -0
  341. package/src/resources/submodules/appium-uiautomator2-driver/docs/unlock/screen1.png +0 -0
  342. package/src/resources/submodules/appium-uiautomator2-driver/docs/unlock/screen2.png +0 -0
  343. package/src/resources/submodules/appium-uiautomator2-driver/test/functional/assets/checkered-squares.png +0 -0
  344. package/src/resources/submodules/appium-uiautomator2-driver/test/functional/assets/start-button.png +0 -0
  345. package/src/resources/submodules/appium-uiautomator2-driver/test/functional/assets/stop-button.png +0 -0
  346. package/src/resources/submodules/appium-xcuitest-driver/.github/ISSUE_TEMPLATE.md +4 -0
  347. package/src/resources/submodules/appium-xcuitest-driver/CHANGELOG.md +3373 -0
  348. package/src/resources/submodules/appium-xcuitest-driver/README.md +55 -0
  349. package/src/resources/submodules/appium-xcuitest-driver/docs/assets/images/appium-logo-white.png +0 -0
  350. package/src/resources/submodules/appium-xcuitest-driver/docs/assets/images/appium-logo.png +0 -0
  351. package/src/resources/submodules/appium-xcuitest-driver/docs/assets/images/appium-plus-xctest.png +0 -0
  352. package/src/resources/submodules/appium-xcuitest-driver/docs/contributing.md +45 -0
  353. package/src/resources/submodules/appium-xcuitest-driver/docs/endpoints-wda.md +61 -0
  354. package/src/resources/submodules/appium-xcuitest-driver/docs/endpoints.md +95 -0
  355. package/src/resources/submodules/appium-xcuitest-driver/docs/getting-started/device-setup.md +81 -0
  356. package/src/resources/submodules/appium-xcuitest-driver/docs/getting-started/index.md +36 -0
  357. package/src/resources/submodules/appium-xcuitest-driver/docs/getting-started/installation.md +38 -0
  358. package/src/resources/submodules/appium-xcuitest-driver/docs/getting-started/provisioning-profile/assets/images/check-prov-prof.png +0 -0
  359. package/src/resources/submodules/appium-xcuitest-driver/docs/getting-started/provisioning-profile/assets/images/create-new-project.png +0 -0
  360. package/src/resources/submodules/appium-xcuitest-driver/docs/getting-started/provisioning-profile/assets/images/create-single-page.png +0 -0
  361. package/src/resources/submodules/appium-xcuitest-driver/docs/getting-started/provisioning-profile/assets/images/no-prov-prof.png +0 -0
  362. package/src/resources/submodules/appium-xcuitest-driver/docs/getting-started/provisioning-profile/assets/images/project-prov-prof.png +0 -0
  363. package/src/resources/submodules/appium-xcuitest-driver/docs/getting-started/provisioning-profile/assets/images/set-up-bundle.png +0 -0
  364. package/src/resources/submodules/appium-xcuitest-driver/docs/getting-started/provisioning-profile/assets/images/untrusted-dev.png +0 -0
  365. package/src/resources/submodules/appium-xcuitest-driver/docs/getting-started/provisioning-profile/assets/images/xcode-bundle-id.png +0 -0
  366. package/src/resources/submodules/appium-xcuitest-driver/docs/getting-started/provisioning-profile/assets/images/xcode-config.png +0 -0
  367. package/src/resources/submodules/appium-xcuitest-driver/docs/getting-started/provisioning-profile/assets/images/xcode-facebook-fail.png +0 -0
  368. package/src/resources/submodules/appium-xcuitest-driver/docs/getting-started/provisioning-profile/assets/images/xcode-facebook-succeed.png +0 -0
  369. package/src/resources/submodules/appium-xcuitest-driver/docs/getting-started/provisioning-profile/auto-config.md +54 -0
  370. package/src/resources/submodules/appium-xcuitest-driver/docs/getting-started/provisioning-profile/basic-manual-config.md +40 -0
  371. package/src/resources/submodules/appium-xcuitest-driver/docs/getting-started/provisioning-profile/full-manual-config.md +49 -0
  372. package/src/resources/submodules/appium-xcuitest-driver/docs/getting-started/provisioning-profile/generic-device-config.md +75 -0
  373. package/src/resources/submodules/appium-xcuitest-driver/docs/getting-started/provisioning-profile/index.md +117 -0
  374. package/src/resources/submodules/appium-xcuitest-driver/docs/getting-started/system-requirements.md +131 -0
  375. package/src/resources/submodules/appium-xcuitest-driver/docs/guides/assets/images/ios-xctest-file-movement/keynote.png +0 -0
  376. package/src/resources/submodules/appium-xcuitest-driver/docs/guides/assets/images/ios-xctest-file-movement/on_my_iphone.png +0 -0
  377. package/src/resources/submodules/appium-xcuitest-driver/docs/guides/assets/images/ios-xctest-file-movement/top_files.png +0 -0
  378. package/src/resources/submodules/appium-xcuitest-driver/docs/guides/attach-to-running-wda.md +43 -0
  379. package/src/resources/submodules/appium-xcuitest-driver/docs/guides/audio-capture.md +78 -0
  380. package/src/resources/submodules/appium-xcuitest-driver/docs/guides/biometric-auth.md +29 -0
  381. package/src/resources/submodules/appium-xcuitest-driver/docs/guides/capability-sets.md +169 -0
  382. package/src/resources/submodules/appium-xcuitest-driver/docs/guides/ci-setup.md +47 -0
  383. package/src/resources/submodules/appium-xcuitest-driver/docs/guides/clipboard.md +47 -0
  384. package/src/resources/submodules/appium-xcuitest-driver/docs/guides/file-transfer.md +147 -0
  385. package/src/resources/submodules/appium-xcuitest-driver/docs/guides/gestures.md +55 -0
  386. package/src/resources/submodules/appium-xcuitest-driver/docs/guides/hybrid.md +137 -0
  387. package/src/resources/submodules/appium-xcuitest-driver/docs/guides/input-events.md +67 -0
  388. package/src/resources/submodules/appium-xcuitest-driver/docs/guides/install-certificate.md +20 -0
  389. package/src/resources/submodules/appium-xcuitest-driver/docs/guides/mjpeg.md +98 -0
  390. package/src/resources/submodules/appium-xcuitest-driver/docs/guides/multiple-xcode-versions.md +37 -0
  391. package/src/resources/submodules/appium-xcuitest-driver/docs/guides/parallel-tests.md +39 -0
  392. package/src/resources/submodules/appium-xcuitest-driver/docs/guides/remotexpc-tunnels-real-devices.md +148 -0
  393. package/src/resources/submodules/appium-xcuitest-driver/docs/guides/run-prebuilt-wda.md +147 -0
  394. package/src/resources/submodules/appium-xcuitest-driver/docs/guides/run-preinstalled-wda.md +177 -0
  395. package/src/resources/submodules/appium-xcuitest-driver/docs/guides/tvos.md +246 -0
  396. package/src/resources/submodules/appium-xcuitest-driver/docs/guides/wda-custom-server.md +283 -0
  397. package/src/resources/submodules/appium-xcuitest-driver/docs/index.md +36 -0
  398. package/src/resources/submodules/appium-xcuitest-driver/docs/overview.md +137 -0
  399. package/src/resources/submodules/appium-xcuitest-driver/docs/reference/assets/images/useXctestrunFile.png +0 -0
  400. package/src/resources/submodules/appium-xcuitest-driver/docs/reference/bidi.md +192 -0
  401. package/src/resources/submodules/appium-xcuitest-driver/docs/reference/capabilities.md +164 -0
  402. package/src/resources/submodules/appium-xcuitest-driver/docs/reference/commands.md +468 -0
  403. package/src/resources/submodules/appium-xcuitest-driver/docs/reference/element-attributes.md +157 -0
  404. package/src/resources/submodules/appium-xcuitest-driver/docs/reference/env-vars.md +18 -0
  405. package/src/resources/submodules/appium-xcuitest-driver/docs/reference/execute-methods.md +2269 -0
  406. package/src/resources/submodules/appium-xcuitest-driver/docs/reference/ios-predicate.md +196 -0
  407. package/src/resources/submodules/appium-xcuitest-driver/docs/reference/locator-strategies.md +107 -0
  408. package/src/resources/submodules/appium-xcuitest-driver/docs/reference/scripts.md +555 -0
  409. package/src/resources/submodules/appium-xcuitest-driver/docs/reference/security-flags.md +28 -0
  410. package/src/resources/submodules/appium-xcuitest-driver/docs/reference/server-args.md +19 -0
  411. package/src/resources/submodules/appium-xcuitest-driver/docs/reference/settings.md +467 -0
  412. package/src/resources/submodules/appium-xcuitest-driver/docs/reference/xpath-extensions.md +167 -0
  413. package/src/resources/submodules/appium-xcuitest-driver/docs/troubleshooting/element-lookup.md +202 -0
  414. package/src/resources/submodules/appium-xcuitest-driver/docs/troubleshooting/index.md +204 -0
  415. package/src/resources/submodules/appium-xcuitest-driver/docs/troubleshooting/wda-slowness.md +206 -0
  416. package/src/resources/submodules/appium-xcuitest-driver/test/assets/test.png +0 -0
  417. package/src/resources/submodules.zip +0 -0
@@ -0,0 +1,2269 @@
1
+ ---
2
+ title: Execute Methods
3
+ ---
4
+
5
+ In addition to standard W3C APIs, the driver provides many [custom command extensions](https://appium.io/docs/en/latest/guides/execute-methods/)
6
+ for executing platform-specific scenarios. Use the following examples in order to invoke them from
7
+ your client code:
8
+
9
+ === "Java"
10
+
11
+ ```java
12
+ var result = driver.executeScript("mobile: <methodName>", Map.ofEntries(
13
+ Map.entry("arg1", "value1"),
14
+ Map.entry("arg2", "value2")
15
+ // you may add more pairs if needed or skip providing the map completely
16
+ // if all arguments are defined as optional
17
+ ));
18
+ ```
19
+
20
+ === "JS (WebdriverIO)"
21
+
22
+ ```js
23
+ const result = await driver.executeScript('mobile: <methodName>', [{
24
+ arg1: "value1",
25
+ arg2: "value2",
26
+ }]);
27
+ ```
28
+
29
+ === "Python"
30
+
31
+ ```python
32
+ result = driver.execute_script('mobile: <methodName>', {
33
+ 'arg1': 'value1',
34
+ 'arg2': 'value2',
35
+ })
36
+ ```
37
+
38
+ === "Ruby"
39
+
40
+ ```ruby
41
+ result = @driver.execute_script 'mobile: <methodName>', {
42
+ arg1: 'value1',
43
+ arg2: 'value2',
44
+ }
45
+ ```
46
+
47
+ === "C#"
48
+
49
+ ```csharp
50
+ object result = driver.ExecuteScript("mobile: <methodName>", new Dictionary<string, object>() {
51
+ {"arg1", "value1"},
52
+ {"arg2", "value2"}
53
+ }));
54
+ ```
55
+
56
+ ### mobile: selectPickerWheelValue
57
+
58
+ Performs selection of the next or previous picker wheel value. This might
59
+ be useful if these values are populated dynamically, so you don't know which
60
+ one to select or value selection suing `sendKeys` API does not work because of an XCTest bug. The method throws an exception if it fails to change the current picker value.
61
+
62
+ #### Arguments
63
+
64
+ Name | Type | Required | Description | Example
65
+ --- | --- | --- | --- | ---
66
+ elementId (`element` before version 1.22) | string | yes | PickerWheel's internal element id (as hexadecimal hash string) to perform value selection on. The element must be of type XCUIElementTypePickerWheel | abcdef12-1111-2222-3333-444444
67
+ order | string | yes | Either `next` to select the value next to the current one from the target picker wheel or `previous` to select the previous one. | next
68
+ offset | number | no | The value in range [0.01, 0.5]. It defines how far from picker wheel's center the click should happen. The actual distance is calculated by multiplying this value to the actual picker wheel height. Too small offset value may not change the picker wheel value and too high value may cause the wheel to switch two or more values at once. Usually the optimal value is located in range [0.15, 0.3]. `0.2` by default | 0.15
69
+ value | string | no | If provided WDA will try to automatically scroll in the given direction until the actual picker value reaches the expected one or the amount of scrolling attempts is exceeded. | myvalue
70
+ maxAttempts | number | no | The maximum number of scrolling attempts to reach `value` before an error will be thrown. Only makes sense in combination with `value`. 25 by default | 50
71
+
72
+ ### mobile: sendMemoryWarning
73
+
74
+ Simulates sending of Low Memory warning to the target application.
75
+ It might be useful to verify the
76
+ [didReceiveMemoryWarning](https://developer.apple.com/documentation/uikit/uiviewcontroller/1621409-didreceivememorywarning?language=objc)
77
+ API in the application under test.
78
+ This feature only works on real devices running iOS 17+ with Xcode 15+ SDK.
79
+ The target application must be running while this API is called.
80
+
81
+ #### Arguments
82
+
83
+ Name | Type | Required | Description | Example
84
+ --- | --- | --- | --- | ---
85
+ bundleId | string | yes | Bundle identifier of the app to simulate the warning for | com.great.app
86
+
87
+ ### mobile: alert
88
+
89
+ Tries to apply the given action to the currently visible alert.
90
+
91
+ #### Arguments
92
+
93
+ Name | Type | Required | Description | Example
94
+ --- | --- | --- | --- | ---
95
+ action | string | yes | The actual action to apply. Could be either: `accept`, `dismiss` or `getButtons` | accept
96
+ buttonLabel | string | no | The name of the button used to perform the chosen alert action. Only makes sense if the action is `accept` or `dismiss` | Accept
97
+
98
+ #### Returned Result
99
+
100
+ The list of alert button names if the selected action is `getButtons`
101
+
102
+ ### mobile: setPasteboard
103
+
104
+ Sets the Simulator's pasteboard content to the given value. Does not work for real devices.
105
+
106
+ #### Arguments
107
+
108
+ Name | Type | Required | Description | Example
109
+ --- | --- | --- | --- | ---
110
+ content | string | yes | The content to set | hello
111
+ encoding | string | no | The content's encoding. `utf8` by default | ascii
112
+
113
+ ### mobile: getPasteboard
114
+
115
+ Gets the Simulator's pasteboard content. Does not work for real devices.
116
+
117
+ #### Arguments
118
+
119
+ Name | Type | Required | Description | Example
120
+ --- | --- | --- | --- | ---
121
+ encoding | string | no | The expected encoding of the returned string. `utf8` by default | ascii
122
+
123
+ #### Returned Result
124
+
125
+ The pasteboard content string.
126
+
127
+ ### mobile: source
128
+
129
+ Allows to retrieve the source tree of the current page in different representation formats.
130
+
131
+ #### Arguments
132
+
133
+ Name | Type | Required | Description | Example
134
+ --- | --- | --- | --- | ---
135
+ format | string | yes | One of possible page tree source representation formats: `xml` (the default value), `description` and `json`. The `xml` format generates the output similar to what `getPageSource` standard API returns. `description` representation is how XCTest "sees" the page internally and is the same string as [debugDescription](https://developer.apple.com/documentation/xctest/xcuielement/1500909-debugdescription?language=objc) API would return for the root application element. This source representation format is useful for debugging purposes and is the fastest one to fetch. `json` representation is similar to `xml`, but the tree hierarchy there is represented as JSON elements tree rather than as XML nodes. | description
136
+ excludedAttributes | string | no | One or more comma-separated attribute names to be excluded from the XML output, thus only makes sense if `format` is set to `xml`. It might be sometimes helpful to exclude, for example, the `visible` attribute, to significantly speed-up page source retrieval. | visible,accessible
137
+
138
+ #### Returned Result
139
+
140
+ The page source tree formatted according to the given format argument.
141
+
142
+ ### mobile: getContexts
143
+
144
+ Retrieves the list of available contexts including the extended context information, like urls and page names. This is different from the standard `getContexts` API, because the latter only has web view names without any additional information. In situation where multiple web views are available at once the client code would have to connect to each of them in order to detect the one, which needs to be interacted with. Although, this extra effort is not needed with the information provided by this extension.
145
+
146
+ #### Arguments
147
+
148
+ Name | Type | Required | Description | Example
149
+ --- | --- | --- | --- | ---
150
+ waitForWebviewMs | number | no | Tells Appium for how long (in milliseconds) to wait for web view(s) to appear. `5000`ms by default | 10000
151
+
152
+ #### Returned Result
153
+
154
+ The list of available context objects along with their properties:
155
+
156
+ - id: The identifier of the context. The native context will be 'NATIVE_APP' and the webviews will be 'WEBVIEW_xxx'
157
+ - title: The title associated with the webview content. Could be `null`
158
+ - url: The url associated with the webview content. Could be `null`
159
+
160
+ ### mobile: installApp
161
+
162
+ Installs the given application to the device under test. Make sure the application is built for a correct architecture and is signed with a proper developer signature (for real devices) prior to install it.
163
+
164
+ #### Arguments
165
+
166
+ Name | Type | Required | Description | Example
167
+ --- | --- | --- | --- | ---
168
+ app | string | yes | See the description of the `appium:app` capability | /path/to/my.app
169
+ timeoutMs | number | no | The maximum time to wait until app install is finished in milliseconds on real devices. If not provided then the value of `appium:appPushTimeout` capability is used. If the capability is not provided then equals to 240000ms | 500000
170
+ checkVersion | bool | no | If set to `true`, it will make xcuitest driver to verify whether the app version currently installed on the device under test is older than the one, which is provided as `app` value. No app install is going to happen if the candidate app has the same or older version number than the already installed copy of it. The version number used for comparison must be provided as [CFBundleVersion](https://developer.apple.com/documentation/bundleresources/information_property_list/cfbundleversion) [Semantic Versioning](https://semver.org/)-compatible value in the application's `Info.plist`. No validation is performed and the `app` is installed if `checkVersion` was not provided or `false`, which is default behavior. | true
171
+
172
+ ### mobile: isAppInstalled
173
+
174
+ Checks whether the given application is installed on the device under test.
175
+ [Offloaded applications](https://discussions.apple.com/thread/254887240) are handled as not installed.
176
+
177
+ #### Arguments
178
+
179
+ Name | Type | Required | Description | Example
180
+ --- | --- | --- | --- | ---
181
+ bundleId | string | yes | The bundle identifier of the application to be checked | com.mycompany.myapp
182
+
183
+ #### Returned Result
184
+
185
+ Either `true` or `false`
186
+
187
+ ### mobile: removeApp
188
+
189
+ Removes the given application from the device under test.
190
+ [Offloaded application](https://discussions.apple.com/thread/254887240) can also be removed.
191
+
192
+ For real devices, please also check [how to explicitly clear the application local data](../troubleshooting/index.md#leftover-application-data-on-real-devices).
193
+
194
+ #### Arguments
195
+
196
+ Name | Type | Required | Description | Example
197
+ --- | --- | --- | --- | ---
198
+ bundleId | string | yes | The bundle identifier of the application to be removed | com.mycompany.myapp
199
+
200
+ #### Returned Result
201
+
202
+ Either `true` if the application was successfully uninstalled, otherwise `false`
203
+
204
+ ### mobile: launchApp
205
+
206
+ Executes the given application on the device under test. If the application is already running then it would be activated.
207
+ If the application is not installed or cannot be launched then an exception is thrown.
208
+
209
+ It accepts `arguments` and `environment` to start an application with them.
210
+
211
+ As an usage example, `arguments` allow you to enforce language and locale for the application to start with.
212
+ XCTest lets you to start an application process by specifying [Language and Locale IDs](https://developer.apple.com/library/archive/documentation/MacOSX/Conceptual/BPInternational/LanguageandLocaleIDs/LanguageandLocaleIDs.html) via process `arguments` with `-AppleLanguages` and `-AppleLocale`.
213
+ Check the [Testing Specific Languages and Regions part of the Testing Your Internationalized App](https://developer.apple.com/library/archive/documentation/MacOSX/Conceptual/BPInternational/TestingYourInternationalApp/TestingYourInternationalApp.html) for more details.
214
+ Make sure to terminate the application before launching it with `arguments` if it is already running.
215
+
216
+ === "Java"
217
+
218
+ ```java
219
+ driver.executeScript("mobile:launchApp", Map.of(
220
+ "bundleId", "com.apple.Preferences",
221
+ "arguments", Arrays.asList("-AppleLanguages", "(ja)", "-AppleLocale", "ja_JP")
222
+ ));
223
+ ```
224
+
225
+ === "JS (WebdriverIO)"
226
+
227
+ ```js
228
+ await driver.executeScript('mobile:launchApp', [{
229
+ bundleId: 'com.apple.Preferences',
230
+ arguments: ['-AppleLanguages', '(ja)', '-AppleLocale', 'ja_JP']
231
+ }]);
232
+ ```
233
+
234
+ === "Python"
235
+
236
+ ```python
237
+ driver.execute_script("mobile:launchApp", {
238
+ "bundleId": "com.apple.Preferences",
239
+ "arguments": ["-AppleLanguages", "(ja)", "-AppleLocale", "ja_JP"]
240
+ })
241
+ ```
242
+
243
+ === "Ruby"
244
+
245
+ ```ruby
246
+ driver.execute_script "mobile:launchApp", {
247
+ "bundleId": "com.apple.Preferences",
248
+ "arguments": ["-AppleLanguages", "(ja)", "-AppleLocale", "ja_JP"]
249
+ }
250
+ ```
251
+
252
+ === "C#"
253
+
254
+ ```csharp
255
+ driver.ExecuteScript("mobile:launchApp", new Dictionary<string, object>() {
256
+ {"bundleId", "com.apple.Preferences"},
257
+ {"arguments", new List<string>() { "-AppleLanguages", "(ja)", "-AppleLocale", "ja_JP" }}
258
+ });
259
+ ```
260
+
261
+ #### Arguments
262
+
263
+ Name | Type | Required | Description | Example
264
+ --- | --- | --- | --- | ---
265
+ bundleId | string | yes | The bundle identifier of the application to be launched | com.mycompany.myapp
266
+ arguments | string&#124;array | no | One or more command line arguments for the app. If the app is already running then this argument is ignored. | ['-s', '-m']
267
+ environment | dict | no | Environment variables mapping for the app. If the app is already running then this argument is ignored. | {'var': 'value'}
268
+
269
+ ### mobile: terminateApp
270
+
271
+ Terminates the given app on the device under test via [XCTest's terminate](https://developer.apple.com/documentation/xctest/xcuiapplication/1500637-terminate) API. If the app is not installed an exception is thrown. If the app is not running then nothing is done.
272
+
273
+ #### Arguments
274
+
275
+ Name | Type | Required | Description | Example
276
+ --- | --- | --- | --- | ---
277
+ bundleId | string | yes | The bundle identifier of the application to be terminated | com.mycompany.myapp
278
+
279
+ #### Returned Result
280
+
281
+ Either `true` if the app was successfully terminated, otherwise `false`
282
+
283
+ ### mobile: killApp
284
+
285
+ Kill the given app on the real device under test by instruments service.
286
+ If the app is not running or failed to kill, then nothing is done.
287
+
288
+ #### Arguments
289
+
290
+ Name | Type | Required | Description | Example
291
+ --- | --- | --- | --- | ---
292
+ bundleId | string | yes | The bundle identifier of the application to be terminated | com.mycompany.myapp
293
+
294
+ #### Returned Result
295
+
296
+ Either `true` if the app was successfully killed, otherwise `false`
297
+
298
+ ### mobile: queryAppState
299
+
300
+ Queries the state of an installed application from the device under test. An exception will be thrown if the app with given identifier is not installed.
301
+
302
+ #### Arguments
303
+
304
+ Name | Type | Required | Description | Example
305
+ --- | --- | --- | --- | ---
306
+ bundleId | string | yes | The bundle identifier of the application to be queried | com.mycompany.myapp
307
+
308
+ #### Returned Result
309
+
310
+ An integer number is returned, which encodes the application state. Possible values are described in [XCUIApplicationState](https://developer.apple.com/documentation/xctest/xcuiapplicationstate?language=objc) XCTest documentation topic.
311
+
312
+ ### mobile: activateApp
313
+
314
+ Puts the given application to foreground if it is running in the background. An error is thrown if the app is not installed or is not running. Nothing is done if the app is already running in the foreground.
315
+
316
+ #### Arguments
317
+
318
+ Name | Type | Required | Description | Example
319
+ --- | --- | --- | --- | ---
320
+ bundleId | string | yes | The bundle identifier of the application to be activated | com.mycompany.myapp
321
+
322
+ ### mobile: listApps
323
+
324
+ List applications installed on the real device under test. This extension throws an error if called
325
+ for a Simulator device.
326
+ Offload applications will not be in the result.
327
+
328
+ #### Arguments
329
+
330
+ Name | Type | Required | Description | Example
331
+ --- | --- | --- | --- | ---
332
+ applicationType | string | no | The type of applications to list. Either `System` or `User` (the default one) | System
333
+ returnAttributes | array&lt;string&gt; | no | Array of attribute names to return for each app. If not provided, all available attributes are returned. Common attributes include: `CFBundleIdentifier`, `CFBundleName`, `CFBundleDisplayName`, `CFBundleVersion`, `CFBundleShortVersionString`, `UIFileSharingEnabled` | `['CFBundleIdentifier', 'CFBundleName', 'CFBundleVersion']`
334
+
335
+ #### Returned Result
336
+
337
+ A map where keys are bundle identifiers and values are maps of platform-specific app properties. The properties included depend on the `returnAttributes` parameter. Having `UIFileSharingEnabled` set to `true` in the app properties map means this app supports file upload and download into its `documents` container. Read the [File Transfer](../guides/file-transfer.md) guide for more details.
338
+
339
+ ### mobile: clearApp
340
+
341
+ Deletes data files from the data container of an installed app,
342
+ so it could start from the clean state next time it is launched.
343
+ The destination app will be terminated if it is running when this API is invoked.
344
+ Sometimes it might also be necessary to invoke the following APIs
345
+ to fully reset the state of an installed app (make sure the app is not running while
346
+ calling them):
347
+ - [mobile: clearKeychains](#mobile-clearkeychains)
348
+ - [mobile: resetPermission](#mobile-resetpermission)
349
+
350
+ This API might not be 100% reliable for some apps. The only reliable method to fully
351
+ reset an existing app that Apple supports is to [uninstall](#mobile-removeapp) it and then perform a fresh [install](#mobile-installapp) of the same app.
352
+
353
+ This API only works on simulators. An exception is thrown if executed with real devices.
354
+
355
+ #### Arguments
356
+
357
+ Name | Type | Required | Description | Example
358
+ --- | --- | --- | --- | ---
359
+ bundleId | string | yes | The bundle identifier of the application to be cleared | com.mycompany.myapp
360
+
361
+ #### Returned Result
362
+
363
+ `true` if at least one item has been successfully deleted from the app data container.
364
+
365
+ ### mobile: startPerfRecord
366
+
367
+ Starts performance profiling for the device under test.
368
+ Relaxing security is mandatory for simulators. It can always work for real devices.
369
+ Since XCode 12 the method tries to use `xctrace` tool to record performance stats.
370
+ The `instruments` developer utility is used as a fallback for this purpose if `xctrace` is not available. It is possible to record multiple profiles at the same time. Read [Instruments User Guide](https://developer.apple.com/library/content/documentation/DeveloperTools/Conceptual/InstrumentsUserGuide/Recording,Pausing,andStoppingTraces.html) for more details.
371
+ If the recording for the given profile is already running then nothing is done.
372
+
373
+ #### Arguments
374
+
375
+ Name | Type | Required | Description | Example
376
+ --- | --- | --- | --- | ---
377
+ timeout | number | no | The maximum count of milliseconds to record the profiling information. It is recommended to always limit the maximum duration of perf record operation, since the resulting logs are pretty huge and may easily exceed the free space on th local storage volume. `300000`ms by default (5 minutes) | `600000`
378
+ profileName | string | no | The name of existing performance profile to apply. Can also contain the full path to the chosen template on the server file system. Note, that not all profiles are supported on mobile devices. `Activity Monitor` by default. | `Time Profile`
379
+ pid | string or number | no | The ID of the process to measure the performance for. Set it to `current` in order to measure the performance of the process, which belongs to the currently active application. All processes running on the device are measured if pid is unset (the default setting). | current
380
+
381
+ ### mobile: stopPerfRecord
382
+
383
+ Stops the performance recording operation previously started by `mobile: startPerfRecord` call. If the previous call has already been completed due to the timeout then its result is returned immediately. An error is thrown if the performance recording has failed to start and recorded no data.
384
+
385
+ #### Arguments
386
+
387
+ Name | Type | Required | Description | Example
388
+ --- | --- | --- | --- | ---
389
+ profileName | string | no | The name of existing performance profile to stop the recording for. Multiple recorders for different profile names could be executed at the same time. `Activity Monitor` by default. | `Time Profile`
390
+ remotePath | string | no | The path to the remote location, where the resulting zipped .trace file should be uploaded. The following protocols are supported: http/https, ftp Null or empty string value (the default setting) means the content of resulting file should be zipped, encoded as Base64 and passed as the endpoint response value. An exception will be thrown if the generated file is too big to fit into the available process memory. | https://myserver/upload
391
+ user | string | no | The name of the user for the remote authentication. Only works if `remotePath` is provided. | myuser
392
+ pass | string | no | The password for the remote authentication. Only works if `remotePath` is provided. | mypassword
393
+ method | string | no | The http multipart upload method name. Only works if `remotePath` is provided. `PUT` by default | POST
394
+ headers | dict | no | Additional headers mapping for multipart http(s) uploads | {'User-Agent': 'Myserver 1.0'}
395
+ fileFieldName | string | no | The name of the form field, where the file content BLOB should be stored for http(s) uploads. `file` by default | payload
396
+ formFields | dict or array | no | Additional form fields for multipart http(s) uploads | {'field2': 'value2'}
397
+
398
+ #### Returned Result
399
+
400
+ The resulting file in .trace format can be either returned directly as base64-encoded zip archive or uploaded to a remote location (such files could be pretty large), depending on the `remotePath` argument value. Afterwards it is possible to unarchive and open such file with Xcode Developer Tools.
401
+
402
+ ### mobile: installCertificate
403
+
404
+ Installs a custom certificate onto the device.
405
+
406
+ On **real devices** running iOS/tvOS 18+, [`appium-ios-remotexpc`](https://github.com/appium/appium-ios-remotexpc) is required: profile installation goes through RemoteXPC only, and the driver throws if the package cannot be loaded or RemoteXPC setup fails.
407
+
408
+ On **Simulator** only: if the Xcode/SDK version predates 11.4, Apple provides no official CLI path. In that situation (and as a Simulator fallback when simctl-based installation fails) this method wraps the certificate into a .mobileconfig, serves it from the internal HTTP server for mobile Safari to open, and drives the profile installation UI with WebDriverAgent.
409
+
410
+ #### Arguments
411
+
412
+ Name | Type | Required | Description | Example
413
+ --- | --- | --- | --- | ---
414
+ content | string | yes | Base64-encoded content of the public certificate in [PEM](https://knowledge.digicert.com/quovadis/ssl-certificates/ssl-general-topics/what-is-pem-format.html) format | a23234...
415
+ commonName | string | no | Common name of the certificate. If this is not set then the script will try to parse it from the given certificate content. | com.myorg
416
+ isRoot | boolean | no | This option defines where the certificate should be installed to: either Trusted Root Store (`true`, the default option) or the Keychain (`false`). On environments other than Xcode 11.4+ Simulator this option is ignored. | false
417
+
418
+ #### Returned Result
419
+
420
+ The content of the generated .mobileconfig file as base64-encoded string. This config might be useful for debugging purposes. If the certificate has been successfully set via CLI then nothing is returned.
421
+
422
+ ### mobile: removeCertificate
423
+
424
+ Removes an installed certificate profile on real devices running **iOS/tvOS 18+**; **[`appium-ios-remotexpc`](https://github.com/appium/appium-ios-remotexpc) is required**.
425
+
426
+ #### Arguments
427
+
428
+ Name | Type | Required | Description | Example
429
+ --- | --- | --- | --- | ---
430
+ name | string | yes | Name of the profile | com.orgname.profile.mdmprofile
431
+
432
+ #### Returned Result
433
+
434
+ Returns the string `Acknowledged` when the profile is removed successfully.
435
+
436
+ ### mobile: listCertificates
437
+
438
+ Lists installed certificate profiles on real devices running **iOS/tvOS 18+**; **[`appium-ios-remotexpc`](https://github.com/appium/appium-ios-remotexpc) is required**.
439
+
440
+ #### Returned Result
441
+
442
+ Returns map of certificates installed on the real device. The response looks like:
443
+
444
+ ```json
445
+ {
446
+ 'OrderedIdentifiers': ['com.orgname.profile.mdmprofile'],
447
+ 'ProfileManifest': {
448
+ 'com.orgname.profile.mdmprofile': {
449
+ 'Description': 'MDM Profile',
450
+ 'IsActive': True
451
+ }
452
+ },
453
+ 'ProfileMetadata': {
454
+ 'com.orgname.profile.mdmprofile': {
455
+ 'PayloadDescription': 'MDM Profile for testing,
456
+ 'PayloadDisplayName': 'MDM Profile',
457
+ 'PayloadOrganization': 'My Org, Inc.',
458
+ 'PayloadRemovalDisallowed': False,
459
+ 'PayloadUUID': '9ab3fa27-cc45-4c23-a94a-714686397a86',
460
+ 'PayloadVersion': 1
461
+ }
462
+ },
463
+ 'Status': 'Acknowledged'
464
+ }
465
+ ```
466
+
467
+ ### mobile: startLogsBroadcast
468
+
469
+ Starts iOS system logs broadcast websocket on the same host and port where Appium server is running at `/ws/session/:sessionId:/appium/syslog` endpoint. The method will return immediately if the web socket is already listening.
470
+ Each connected webcoket listener will receive syslog lines as soon as they are visible to Appium.
471
+ Read [Using Mobile Execution Commands to Continuously Stream Device Logs with Appium](https://appiumpro.com/editions/55-using-mobile-execution-commands-to-continuously-stream-device-logs-with-appium) Appium Pro article for more details on this feature.
472
+
473
+ Consider using [logs broadcast via BiDi](./bidi.md#logentryadded) over this extension.
474
+
475
+ ### mobile: stopLogsBroadcast
476
+
477
+ Stops the syslog broadcasting wesocket server previously started by `mobile: startLogsBroadcast`. This method will return immediately if no server is running.
478
+
479
+ Consider using [logs broadcast via BiDi](./bidi.md#logentryadded) over this extension.
480
+
481
+ ### mobile: batteryInfo
482
+
483
+ Reads the battery information from the device under test. This endpoint only returns reliable result on real devices.
484
+
485
+ #### Returned Result
486
+
487
+ The returned object always includes at least the following entries:
488
+
489
+ - `level`: Battery level in range [0.0, 1.0], where 1.0 means 100% charge.
490
+ - `state`: Battery state as an integer number. The following values are possible:
491
+ * UIDeviceBatteryStateUnknown = 0
492
+ * UIDeviceBatteryStateUnplugged = 1 // on battery, discharging
493
+ * UIDeviceBatteryStateCharging = 2 // plugged in, less than 100%
494
+ * UIDeviceBatteryStateFull = 3 // plugged in, at 100%
495
+
496
+ On iOS 18 and newer real devices, the returned object may also include many additional advanced battery information fields, such as capacity, health metrics, temperature, and more. For a full list of possible advanced fields, see [`BatteryInfo`](https://github.com/appium/appium-xcuitest-driver/blob/master/lib/commands/advanced-battery-types.ts).
497
+
498
+ The returned object is a superset of the basic battery info, and may look like:
499
+
500
+ ```json
501
+ {
502
+ "level": 0.85,
503
+ "state": 2,
504
+ "advanced": {
505
+ "AbsoluteCapacity": 1234,
506
+ "CycleCount": 456,
507
+ "Temperature": 29.5,
508
+ "...": "other advanced fields"
509
+ }
510
+ }
511
+ ```
512
+
513
+ If advanced fields are not available (e.g., on older iOS versions or simulators), only `level` and `state` will be present.
514
+
515
+ ### mobile: deviceInfo
516
+
517
+ Returns the miscellaneous information about the device under test.
518
+ It includes device information via lockdown in a real device since XCUITest driver 4.2.0.
519
+
520
+ #### Returned Result
521
+
522
+ The returned device information map contains the following entries:
523
+
524
+ Name | Type | Description | Example
525
+ --- | --- | --- | ---
526
+ currentLocale | string | Device locale name. See [autoupdatingCurrentLocale](https://developer.apple.com/documentation/foundation/nslocale/1414388-autoupdatingcurrentlocale) for more details. | ja_EN, zh-Hant_US
527
+ timeZone | string | Device time zone name. See [NSTimeZone](https://developer.apple.com/documentation/foundation/nstimezone?language=objc) documentation for more details. | America/New_York
528
+ name | string | Device name, synonym for model. Prior to iOS 16, user-assigned device name. See [UIDevice.name](https://developer.apple.com/documentation/uikit/uidevice/1620015-name?language=objc) documentation for more details. | iPhone
529
+ model | string | The model of the device. See [UIDevice.model](https://developer.apple.com/documentation/uikit/uidevice/1620044-model?language=objc) documentation for more details. | iPod touch
530
+ uuid | string | Device [identifier for vendor](https://developer.apple.com/documentation/uikit/uidevice/1620059-identifierforvendor?language=objc). Could be equal to `unknown` if cannot be retrieved. | 12345abcd
531
+ userInterfaceIdiom | number | The style of the interface on the current device. Could help to determine the device type (e.g. iPhone vs iPad). See [UIDevice.userInterfaceIdiom](https://developer.apple.com/documentation/uikit/uidevice/1620037-userinterfaceidiom?language=objc) for more details. | 0 (UIUserInterfaceIdiomUnspecified), 1 (UIUserInterfaceIdiomPhone), 2 (UIUserInterfaceIdiomPad), 3 (UIUserInterfaceIdiomTV)
532
+ userInterfaceStyle | string | The device's UI [appearance](https://developer.apple.com/documentation/xctest/xcuidevice/4108227-appearance?language=objc) style. Possible values are: `automatic`, `light`, `dark`, `unknown`. | dark
533
+ isSimulator | number | Whether the device is a simulator (1) or a real device (0) | 1
534
+ thermalState | number | Thermal state of the device. See [NSProcessInfoThermalState](https://developer.apple.com/documentation/foundation/nsprocessinfothermalstate) documentation on possible values. | 0 (NSProcessInfoThermalStateNominal), 1 (NSProcessInfoThermalStateFair), 2 (NSProcessInfoThermalStateSerious), 3 (NSProcessInfoThermalStateCritical)
535
+
536
+ ### mobile: getDeviceTime
537
+
538
+ Returns the actual device time.
539
+
540
+ #### Arguments
541
+
542
+ Name | Type | Required | Description | Example
543
+ --- | --- | --- | --- | ---
544
+ format | string | no | The format specifier string. Read [MomentJS documentation](https://momentjs.com/docs/) to get the full list of supported datetime format specifiers. The default format is `YYYY-MM-DDTHH:mm:ssZ`, which complies to ISO-8601 | `YYYY-MM-DD HH:mm:ss`
545
+
546
+ #### Returned Result
547
+
548
+ The retrieved datetime string formatted according to the given format specfier.
549
+
550
+ ### mobile: activeAppInfo
551
+
552
+ Returns information about the active application.
553
+
554
+ #### Returned Result
555
+
556
+ The API returns a map with the following entries
557
+
558
+ Name | Type | Description | Example
559
+ --- | --- | --- | ---
560
+ pid | number | The process identifier of the active application | 1234
561
+ bundleId | string | The bundle identifier of the active application | com.yolo.myapp
562
+ name | string | The name of the active application, if present | Safari
563
+ processArguments | map | The map containing actual process arguments. Check the description of the [appium:processArguments capability](./capabilities.md#webdriveragent) for more details on its format. Might be empty if no process arguments have been provided on the app startup. | {"args": ["--help"], "env": {"PATH": "/"}}
564
+
565
+ ### mobile: pressButton
566
+
567
+ Emulates a press action on the given physical device button. The iOS implementation is based on
568
+ [pressButton:](https://developer.apple.com/documentation/xctest/xcuidevice/1619052-pressbutton),
569
+ while tvOS can use either [pressButton:](https://developer.apple.com/documentation/xctest/xcuiremote/1627475-pressbutton)
570
+ or [pressButton:forDuration:](https://developer.apple.com/documentation/xctest/xcuiremote/1627476-pressbutton).
571
+ A more universal API can also be used via [`mobile: performIoHidEvent`](#mobile-performiohidevent).
572
+
573
+ The following values are supported on iOS:
574
+
575
+ * `home`
576
+ * `volumeup` (real devices only)
577
+ * `volumedown` (real devices only)
578
+ * `action` (Xcode 15+, iOS 16+ supported devices only)
579
+ * `camera` (Xcode 16+, iOS 16+ supported real devices only)
580
+
581
+ The following values are supported on tvOS:
582
+
583
+ * `home`
584
+ * `up`
585
+ * `down`
586
+ * `left`
587
+ * `right`
588
+ * `menu`
589
+ * `playpause`
590
+ * `select`
591
+ * `pageup` (Xcode 15+)
592
+ * `pagedown` (Xcode 15+)
593
+ * `guide` (Xcode 15+)
594
+ * `fourcolors` (Xcode 16.3+, tvOS 18.1+)
595
+ * `onetwothree` (Xcode 16.3+, tvOS 18.1+)
596
+ * `tvprovider` (Xcode 16.3+, tvOS 18.1+)
597
+
598
+ #### Arguments
599
+
600
+ Name | Type | Required | Description | Example
601
+ --- | --- | --- | --- | ---
602
+ name | string | yes | The name of the button to be pressed. Must match one of the values listed above (case-insensitive) | `home`
603
+ durationSeconds | number | no | (tvOS only) Duration to keep the button pressed for, in float seconds | 10
604
+
605
+ ### mobile: pushNotification
606
+
607
+ Simulates push notification delivery to Simulator.
608
+ Only application remote push notifications are supported. VoIP, Complication, File Provider,
609
+ and other types are not supported. Check the output of `xcrun simctl help push`
610
+ command for more details.
611
+
612
+ #### Arguments
613
+
614
+ Name | Type | Required | Description | Example
615
+ --- | --- | --- | --- | ---
616
+ bundleId | string | yes | The bundle identifier of the target application | com.apple.Preferences
617
+ payload | map | yes | Valid Apple Push Notification values. Read the `Create the JSON Payload` topic of the [official Apple documentation](https://developer.apple.com/documentation/usernotifications/setting_up_a_remote_notification_server/generating_a_remote_notification?language=objc) for more details on the payload creation. | `{"aps": {"alert": {"title": "This is a simulated notification!"}, "badge": 3, "sound": "default"} }`
618
+
619
+ ### mobile: expectNotification
620
+
621
+ Blocks until the expected notification is delivered.
622
+ It is a thin wrapper over [XCTNSNotificationExpectation](https://developer.apple.com/documentation/xctest/xctnsnotificationexpectation?language=objc) and
623
+ [XCTDarwinNotificationExpectation](https://developer.apple.com/documentation/xctest/xctdarwinnotificationexpectation?language=objc) entities.
624
+ The extension call throws [TimeoutError](https://www.selenium.dev/selenium/docs/api/javascript/module/selenium-webdriver/lib/error_exports_TimeoutError.html) if the expected notification has not been delivered within the given timeout.
625
+
626
+ #### Arguments
627
+
628
+ Name | Type | Required | Description | Example
629
+ --- | --- | --- | --- | ---
630
+ name | string | yes | The name of the notification to expect | com.example.fooAllDone
631
+ type | string | no | Which notification type to expect. Either `plain` (the default value) to wait for a notification from the *default* notification center or `darwin` to wait for a system notification. | darwin
632
+ timeoutSeconds | number | no | For how long to wait until the notification is delivered in float seconds. 60 seconds by default | 5.5
633
+
634
+ ### mobile: performIoHidEvent
635
+
636
+ Emulates triggering of the given low-level IO HID device event. Constants for possible events are defined
637
+ in [HID Usage Tables](https://developer.apple.com/documentation/hiddriverkit/hid_usage_tables).
638
+ For example, in order to emulate single press on Home button the extension should be called with the following arguments:
639
+
640
+ - page: `0x0C` (`kHIDPage_Consumer`, select the `Customer` page)
641
+ - usage: `0x40` (`kHIDUsage_Csmr_Menu`, the `Csmr` prefix here means this usage is dedicated to the `Customer` page)
642
+ - durationSeconds: `0.005` (The event duration should be 5 milliseconds to be recognized as a single press by iOS)
643
+
644
+ Some popular constants:
645
+
646
+ Name | Value | Description
647
+ --- | --- | ---
648
+ kHIDPage_Consumer | 0x0C | The page containing all usages prefixed with `kHIDUsage_Csmr_`
649
+ kHIDUsage_Csmr_VolumeIncrement | 0xE9 | Volume Up
650
+ kHIDUsage_Csmr_VolumeDecrement | 0xEA | Volume Down
651
+ kHIDUsage_Csmr_Menu | 0x40 | Home
652
+ kHIDUsage_Csmr_Power | 0x30 | Power/Lock
653
+ kHIDUsage_Csmr_Snapshot | 0x65 | Power + Home
654
+
655
+ #### Arguments
656
+
657
+ Name | Type | Required | Description | Example
658
+ --- | --- | --- | --- | ---
659
+ page | int | yes | The event page identifier. Look for constants perfixed with `kHIDPage_` in the table above | 0x0C
660
+ usage | int | yes | The event usage identifier (usages are defined per-page). Look for constants prefixed with `kHIDUsage_` in the table above | 0x40
661
+ durationSeconds | number | yes | The event duration in float seconds. XCTest uses `0.005` for a single press event duration | 2.5
662
+
663
+ ### mobile: enrollBiometric
664
+
665
+ Enrolls biometric authentication on Simulator.
666
+
667
+ #### Arguments
668
+
669
+ Name | Type | Required | Description | Example
670
+ --- | --- | --- | --- | ---
671
+ isEnabled | boolean | no | Whether to enable/disable biometric enrollment. `true` by default. | true
672
+
673
+ ### mobile: sendBiometricMatch
674
+
675
+ Emulates biometric match/non-match event on Simulator. The biometric feature is expected to be already enrolled before executing that.
676
+
677
+ #### Arguments
678
+
679
+ Name | Type | Required | Description | Example
680
+ --- | --- | --- | --- | ---
681
+ type | string | no | The biometric feature name. Either `touchId` or `faceId`. `touchId` by default. | faceId
682
+ match | boolean | no | Whether to simulate biometric match (`true`, the default value) or non-match (`false`). | true
683
+
684
+ ### mobile: isBiometricEnrolled
685
+
686
+ Checks whether biometric is currently enrolled or not on a Simulator device.
687
+
688
+ #### Returned Result
689
+
690
+ Either `true` or `false`
691
+
692
+ ### mobile: clearKeychains
693
+
694
+ Clears keychains on Simulator. An exception is thrown for real devices.
695
+
696
+ ### mobile: getPermission
697
+
698
+ Gets application permission state on Simulator. This method requires [WIX applesimutils](https://github.com/wix/AppleSimulatorUtils) to be installed on the host where Appium server is running.
699
+
700
+ #### Arguments
701
+
702
+ Name | Type | Required | Description | Example
703
+ --- | --- | --- | --- | ---
704
+ bundleId | string | yes | The bundle identifier of the destination app. | com.mycompany.myapp
705
+ service | string | yes | One of available service names. The following services are supported: `calendar`, `camera`, `contacts`, `homekit`, `microphone`, `photos`, `reminders`, `medialibrary`, `motion`, `health`, `siri`, `speech`. | true
706
+
707
+ #### Returned Result
708
+
709
+ Either 'yes', 'no', 'unset' or 'limited'
710
+
711
+ ### mobile: setPermission
712
+
713
+ Set application permission state on Simulator.
714
+
715
+ `location` and `location-always` services are by `xcrun simctl privacy` command since XCUITest driver version 5.11.0.
716
+ The command will kill the `bundleId` application process if it is running.
717
+
718
+ Other services such as `contacts` are processed by [WIX applesimutils](https://github.com/wix/AppleSimulatorUtils), which will not kill the `bundleId` application process.
719
+ [WIX applesimutils](https://github.com/wix/AppleSimulatorUtils) needs to be installed on the host where Appium server is running.
720
+
721
+ #### Arguments
722
+
723
+ Name | Type | Required | Description | Example
724
+ --- | --- | --- | --- | ---
725
+ bundleId | string | yes | The bundle identifier of the destination app. | com.mycompany.myapp
726
+ access | map | yes | One or more access rules to set. The following keys are supported: `all` (Apply the action to all services), `calendar` (Allow access to calendar), `contacts-limited` (Allow access to basic contact info), `contacts` (Allow access to full contact details), `location` (Allow access to location services when app is in use), `location-always` (Allow access to location services at all times), `photos-add` (Allow adding photos to the photo library), `photos` (Allow full access to the photo library), `media-library` (Allow access to the media library), `microphone` (Allow access to audio input), `motion` (Allow access to motion and fitness data), `reminders` (Allow access to reminders), `siri` (Allow use of the app with Siri.). The following values are supported: `yes` (To grant the permission), `no` (To revoke the permission), `unset` (To reset the permission) | {'all': 'yes'}
727
+
728
+ ### mobile: resetPermission
729
+
730
+ Resets the given permission for the active application under test. Works for both Simulator and real devices using Xcode SDK 11.4+
731
+
732
+ #### Arguments
733
+
734
+ Name | Type | Required | Description | Example
735
+ --- | --- | --- | --- | ---
736
+ service | string or int | yes | One of available service names. The supported service names are: `calendar`, `camera`, `contacts`, `health`, `homekit`, `keyboardnet`, `location`, `medialibrary`, `microphone`, `photos`, `reminders`, `systemroot`, `userdesktop`, `userdocuments`, `userdownloads`, `bluetooth`. This could also be an integer protected resource identifier taken from [XCUIProtectedResource](https://developer.apple.com/documentation/xctest/xcuiprotectedresource?language=objc) | photos
737
+
738
+ ### mobile: getAppearance
739
+
740
+ Get the device's UI appearance style.
741
+
742
+ #### Returned Result
743
+
744
+ An object, with the following entries:
745
+ - style: The device's UI appearance value. This could be one of: `light`, `dark`, `unknown`, `unsupported`
746
+
747
+ ### mobile: setAppearance
748
+
749
+ Set the device's UI appearance style.
750
+
751
+ #### Arguments
752
+
753
+ Name | Type | Required | Description | Example
754
+ --- | --- | --- | --- | ---
755
+ style | string | yes | Either `light` or `dark` | dark
756
+
757
+ ### mobile: getIncreaseContrast
758
+
759
+ Get the device's "increase contrast" accessibility mode.
760
+ This API only works on simulators. An exception is thrown if executed with real devices.
761
+
762
+ #### Returned Result
763
+
764
+ One of below:
765
+
766
+ - `enabled`: Increase Contrast is enabled.
767
+ - `disabled`: Increase Contrast is disabled.
768
+ - `unsupported`: The platform or runtime version does not support the Increase Contrast setting.
769
+ - `unknown`: The current setting is unknown or there was an error detecting it.
770
+
771
+
772
+ ### mobile: setIncreaseContrast
773
+
774
+ Enable or disable the device's "increase contrast" accessibility mode.
775
+ This API only works on simulators. An exception is thrown if executed with real devices.
776
+
777
+ #### Arguments
778
+
779
+ Name | Type | Required | Description | Example
780
+ --- | --- | --- | --- | ---
781
+ increaseContrast | string | yes | Either `enabled` or `disabled` (case insensitive) | 'enabled'
782
+
783
+ ### mobile: contentSize
784
+
785
+ Get the device's content size.
786
+ This API only works on simulators. An exception is thrown if executed with real devices.
787
+
788
+ #### Returned Result
789
+
790
+ One of below:
791
+
792
+ - `extra-small`
793
+ - `small`
794
+ - `medium`
795
+ - `large`
796
+ - `extra-large`
797
+ - `extra-extra-large`
798
+ - `extra-extra-extra-large`
799
+ - `accessibility-medium`
800
+ - `accessibility-large`
801
+ - `accessibility-extra-large`
802
+ - `accessibility-extra-extra-large`
803
+ - `accessibility-extra-extra-extra-large`
804
+ - `unknown`
805
+ - `unsupported`
806
+
807
+ ### mobile: setContentSize
808
+
809
+ Set the device's content size.
810
+ This API only works on simulators. An exception is thrown if executed with real devices.
811
+
812
+ #### Arguments
813
+
814
+ Name | Type | Required | Description | Example
815
+ --- | --- | --- | --- | ---
816
+ size | string | yes | One of the content sizes listed below in case-insensitive. | large
817
+
818
+ - `extra-small`
819
+ - `small`
820
+ - `medium`
821
+ - `large`
822
+ - `extra-large`
823
+ - `extra-extra-large`
824
+ - `extra-extra-extra-large`
825
+ - `accessibility-medium`
826
+ - `accessibility-large`
827
+ - `accessibility-extra-large`
828
+ - `accessibility-extra-extra-large`
829
+ - `accessibility-extra-extra-extra-large`
830
+
831
+ ### mobile: getClipboard
832
+
833
+ Gets the content of the primary clipboard on the device under test.
834
+
835
+ #### Arguments
836
+
837
+ Name | Type | Required | Description | Example
838
+ --- | --- | --- | --- | ---
839
+ contentType | string | no | `plaintext` (default), `image` or `url` | image
840
+
841
+ #### Returned Result
842
+
843
+ The actual clipboard content encoded into base64 string.
844
+ An empty string is returned if the clipboard contains no data.
845
+
846
+ ### mobile: setClipboard
847
+
848
+ Sets the primary clipboard's content on the device under test.
849
+
850
+ #### Arguments
851
+
852
+ Name | Type | Required | Description | Example
853
+ --- | --- | --- | --- | ---
854
+ content| string | yes | The content to be set as base64-encoded string. | QXBwaXVt
855
+ contentType | string | no | `plaintext` (default), `image` or `url` | image
856
+
857
+ ### mobile: siriCommand
858
+
859
+ Presents the Siri UI, if it is not currently active, and accepts a string which is then processed as if it were recognized speech. Check the documentation on [activateWithVoiceRecognitionText](https://developer.apple.com/documentation/xctest/xcuisiriservice/2852140-activatewithvoicerecognitiontext?language=objc) XCTest method for more details.
860
+
861
+ #### Arguments
862
+
863
+ Name | Type | Required | Description | Example
864
+ --- | --- | --- | --- | ---
865
+ text | string | yes | The actual command that will be passed to Siri service | Hello Siri
866
+
867
+ ### mobile: pullFile
868
+
869
+ Pulls a remote file from the device.
870
+
871
+ #### Arguments
872
+
873
+ Name | Type | Required | Description | Example
874
+ --- | --- | --- | --- | ---
875
+ remotePath | string | yes | The path to an existing remote file on the device. See the [File Transfer](../guides/file-transfer.md) guide for accepted formats. If the file with the given name does not exist an exception will be thrown. | @com.mycompany.myapp:documents/myfile.txt
876
+
877
+ #### Returned Result
878
+
879
+ Base64-encoded string, which represents the content of the remote file.
880
+
881
+ ### mobile: pushFile
882
+
883
+ Pushes a local file to the device.
884
+
885
+ #### Arguments
886
+
887
+ Name | Type | Required | Description | Example
888
+ --- | --- | --- | --- | ---
889
+ remotePath | string | yes | The path on the device to where the payload should be written. The value format is similar to the one used in [pullFile](#mobile-pullfile) extension. If the file with the same name already exists then it will be silently overridden. | @com.mycompany.myapp:documents/myfile.txt
890
+ payload | string | yes | Base64-encoded content of the file to be pushed. | QXBwaXVt
891
+
892
+ ### mobile: pullFolder
893
+
894
+ Pulls a remote folder from the device.
895
+
896
+ #### Arguments
897
+
898
+ Name | Type | Required | Description | Example
899
+ --- | --- | --- | --- | ---
900
+ remotePath | string | yes | Same as for [pullFile](#mobile-pullfile) extension, but should be pointing to a remote folder | @com.mycompany.myapp:documents/myfolder/
901
+
902
+ #### Returned Result
903
+
904
+ Base64-encoded string, which represents the zipped content of the remote folder.
905
+
906
+ ### mobile: deleteFile
907
+
908
+ Deletes the given file from the device under test.
909
+
910
+ #### Arguments
911
+
912
+ Name | Type | Required | Description | Example
913
+ --- | --- | --- | --- | ---
914
+ remotePath | string | yes | Same as for [pullFile](#mobile-pullfile) extension | @com.mycompany.myapp:documents/myfile.txt
915
+
916
+ ### mobile: deleteFolder
917
+
918
+ Deletes the given folder from the device under test.
919
+
920
+ #### Arguments
921
+
922
+ Name | Type | Required | Description | Example
923
+ --- | --- | --- | --- | ---
924
+ remotePath | string | yes | Same value as for `mobile: deleteFile` except of the fact it should be pointing to a folder and should end with a single slash `/` | @com.mycompany.myapp:documents/myfolder/
925
+
926
+ ### mobile: configureLocalization
927
+
928
+ Change localization settings on the currently booted Simulator.
929
+ The changed settings are only applied for the *newly started* applications/activities.
930
+ Currently running applications will stay unchanged. This means, for example, that the keyboard
931
+ should be hidden and shown again in order to observe the changed layout, and corresponding
932
+ apps must be restarted in order to observe their interface using the newly set locale/language.
933
+ Also this method might leave some system UI alerts untranslated.
934
+ Be careful while setting the actual arguments since their actual values are not strictly checked.
935
+ This could lead to an unexpected behavior if an incorrect/unsupported language or locale abbreviation is provided.
936
+
937
+ #### Arguments
938
+
939
+ Name | Type | Required | Description | Example
940
+ --- | --- | --- | --- | ---
941
+ keyboard | map | no | On-screen keyboard properties. The `name` key is required and should be set to a valid locale abbreviation. The `layout` key is also required. The `hardware` key is optional and could be omitted or set to `Automated`. You could switch the keyboard layout in system preferences of your booted simulator, run `xcrun simctl spawn booted defaults read .GlobalPreferences.plist`, and inspect the value of `AppleKeyboards` to see possible combinations. | `{"name": "de_CH", "layout": "QWERTZ", "hardware": "Automated"}`
942
+ language | map | no | System language properties. The `name` key is required and should be set to a valid language abbreviation. You could switch the system language in preferences of your booted simulator, run `xcrun simctl spawn booted defaults read .GlobalPreferences.plist`, and inspect the value of `AppleLanguages` to see possible combinations. | `{"name": "zh-Hant-CN"}`
943
+ locale | map | no | System locale properties. The `name` key is required and should be set to a valid language abbreviation. The `calendar`key is optional and could be set to a valid calendar format name. You could switch the system locale/calendar format in preferences of your booted simulator, run `xcrun simctl spawn booted defaults read .GlobalPreferences.plist`, and inspect the value of `AppleLocale` to see possible combinations. | `{"name": "uk_UA", "calendar": "gregorian"}`
944
+
945
+ #### Returned Result
946
+
947
+ `true` if any of settings has been successfully changed.
948
+
949
+ ### mobile: startAudioRecording
950
+
951
+ Records the given hardware audio input into an .mp4 file. You must allow the `audio_record` security feature in order to use this extension. Also it is required that [FFMpeg](https://ffmpeg.org/) is installed on the machibe where Appium server is running.
952
+
953
+ #### Arguments
954
+
955
+ Name | Type | Required | Description | Example
956
+ --- | --- | --- | --- | ---
957
+ audioInput | string or int | yes | The name of the corresponding audio input device to use for the capture. The full list of capture devices could be shown using `ffmpeg -f avfoundation -list_devices true -i ""` Terminal command. | 1
958
+ audioCodec | string | no | The name of the audio codec. The Advanced Audio Codec (aac) is used by default. | aac
959
+ audioBitrate | string | no | The bitrate of the resulting audio stream. `128k` by default. | 256k
960
+ audioChannels | string or int | no | The count of audio channels in the resulting stream. Setting it to `1` will create a single channel (mono) audio stream. `2` By default | 1
961
+ audioRate | string or int | no | The sampling rate of the resulting audio stream. 44100 by default | 22050
962
+ timeLimit | string or int | no | The maximum recording time, in seconds. The default value is `180`, the maximum value is `43200` (12 hours). | 60
963
+ forceRestart | boolean | no | Whether to restart audio capture process forcefully when startRecordingAudio is called (`true`) or ignore the call until the current audio recording is completed (`false`, the default value). | true
964
+
965
+ ### mobile: stopAudioRecording
966
+
967
+ Stops recording of the audio input. If no audio recording process is running then the endpoint will try to get the recently recorded file. If no previously recorded file is found and no active audio recording processes are running then the method returns an empty string.
968
+
969
+ #### Returned Result
970
+
971
+ Base64-encoded content of the recorded media file or an empty string if no audio recording has been started before.
972
+
973
+ ### mobile: startNetworkMonitor
974
+
975
+ Starts streaming DVT networking instrument events from the device. Each sample is published on the WebDriver BiDi bus as **`appium:xcuitest.networkMonitor`** with a `params.event` object (discriminated by `event.type`: interface `0`, new connection `1`, per-flow stats `2`). This is **not** a Wireshark-style PCAP; see [BiDi: networkMonitor](./bidi.md#appiumxcuitestnetworkmonitor) for full examples and field meanings.
976
+
977
+ Requires a **real** device running **iOS/tvOS 18+**, the optional [`appium-ios-remotexpc`](https://github.com/appium/appium-ios-remotexpc) package installed, and a BiDi-capable client subscribed to that method.
978
+
979
+ If a monitor is already running, the call does nothing so the existing stream continues.
980
+
981
+ ### mobile: stopNetworkMonitor
982
+
983
+ Stops DVT network monitoring started with `mobile: startNetworkMonitor` and tears down the underlying Remote XPC / DVT connection.
984
+
985
+ ### mobile: runXCTest
986
+
987
+ Runs a native XCTest suite on the device under test.
988
+
989
+ Supported only on **real devices** running **iOS/tvOS 18+** with the optional [`appium-ios-remotexpc`](https://github.com/appium/appium-ios-remotexpc) package. `ui` and `app` test types run via **RemoteXPC**. **Logic tests** (`testType`: `logic`) are **not supported**. This extension does not run XCTest bundles on simulators.
990
+
991
+ #### Arguments
992
+
993
+ Name | Type | Required | Description | Example
994
+ --- | --- | --- | --- | ---
995
+ testRunnerBundleId | string | yes | Test app bundle | io.appium.XCTesterAppUITests.xctrunner
996
+ appUnderTestBundleId | string | yes | App-under-test bundle | com.mycompany.myapp
997
+ xcTestBundleID | string | yes | xctest bundle id | io.appium.XCTesterAppUITests
998
+ testType | string | no | Test type. Either `ui` (the default one), `app` or `logic` | app
999
+ env | map | no | Environment variables mapping to be passed to the test | {'myvar': 'myvalue'}
1000
+ args | array | no | Launch arguments to start the test with (see https://developer.apple.com/documentation/xctest/xcuiapplication/1500477-launcharguments for reference) | ['-arg1', '--arg2']
1001
+ timeout | string or int | no | Timeout if session doesn't complete after given time (in milliseconds). `360000`ms by default | 120000
1002
+
1003
+ #### Returned Result
1004
+
1005
+ The API call returns a map with the following entries:
1006
+
1007
+ - results: The array of test results. Each item in this array consists of the following entries:
1008
+ * testName: Name of the test (e.g.: 'XCTesterAppUITests - XCTesterAppUITests.XCTesterAppUITests/testExample')
1009
+ * passed: Did the tests pass?
1010
+ * crashed: Did the tests crash?
1011
+ * status: Test result status (e.g.: 'passed', 'failed', 'crashed')
1012
+ * duration: How long did the tests take (in seconds)
1013
+ * failureMessage: Failure message (if applicable)
1014
+ * location The geolocation of the test (if applicable)
1015
+ - code: The exit code of the process. `0` value marks a successful execution.
1016
+ - signal: The signal that terminated the process. Could be `null` (e.g.: `SIGTERM`)
1017
+
1018
+ ### mobile: installXCTestBundle
1019
+
1020
+ Installs an XCTest bundle (`.app` or `.ipa`) on the device under test.
1021
+
1022
+ Supported only on **real devices** running **iOS/tvOS 18+** with `appium-ios-remotexpc`. Bare `.xctest` bundles are not supported—provide a `.app` or `.ipa` instead.
1023
+
1024
+ #### Arguments
1025
+
1026
+ Name | Type | Required | Description | Example
1027
+ --- | --- | --- | --- | ---
1028
+ xctestBundle | string | yes | Path to your xctest .app bundle. Could be an URL | /path/to/my/bundle.app
1029
+
1030
+ ### mobile: listXCTestBundles
1031
+
1032
+ Lists XCTest-related bundles installed on the device.
1033
+
1034
+ Supported only on **real devices** running **iOS/tvOS 18+** with `appium-ios-remotexpc`. Listing uses **RemoteXPC** only.
1035
+
1036
+ #### Returned Result
1037
+
1038
+ Array of XCTest bundles (e.g.: ["XCTesterAppUITests.XCTesterAppUITests/testLaunchPerformance"])
1039
+
1040
+ ### mobile: viewportRect
1041
+
1042
+ Retrieves the viewport dimensions.
1043
+ The viewport is the device's screen size with status bar size subtracted if the latter is present/visible.
1044
+
1045
+ #### Returned Result
1046
+
1047
+ The response looks like `{"value":{"left":0,"top":96,"width":828,"height":1696}}`.
1048
+
1049
+ `left` and `top` are distance from the `left` of the screen and the `top` of the screen. [iOS Drawing Concepts](https://developer.apple.com/library/archive/documentation/2DDrawing/Conceptual/DrawingPrintingiOS/GraphicsDrawingOverview/GraphicsDrawingOverview.html) could help about the relationship of coordinate.
1050
+
1051
+ `width` and `height` are the screen's width and height.
1052
+
1053
+ ### mobile: viewportScreenshot
1054
+
1055
+ Takes a screenshot of the device viewport (see [`mobile: viewportRect`](#mobile-viewportrect))
1056
+
1057
+ !!! warning "Unreliable"
1058
+
1059
+ This method is unreliable. We recommend using `getScreenshot` instead
1060
+
1061
+ #### Returned Result
1062
+
1063
+ Base64-encoded string, which represents the viewport screenshot.
1064
+
1065
+ ### mobile: deviceScreenInfo
1066
+
1067
+ Get information about screen.
1068
+
1069
+ #### Returned Result
1070
+
1071
+ The response looks like `{"value":{"statusBarSize":{"width":414,"height":48},"scale":2}}`
1072
+
1073
+ `statusBarSize` contains status bar dimensions. It is the result of [status bar](https://developer.apple.com/documentation/xctest/xcuielementtypequeryprovider/1500428-statusbars).
1074
+ `scale` is [screen scale](https://developer.apple.com/documentation/uikit/uiscreen/1617836-scale).
1075
+
1076
+ ### mobile: swipe
1077
+
1078
+ This gesture performs a simple "swipe" gesture on the particular screen element or
1079
+ on the application element, which is usually the whole screen. This method does not
1080
+ accept coordinates and simply emulates single swipe with one finger. It might be
1081
+ useful for such cases like album pagination, switching views, etc. More advanced
1082
+ cases may require to call [mobile: dragFromToForDuration](#mobile-dragfromtoforduration),
1083
+ where one can supply coordinates and duration.
1084
+
1085
+ #### Arguments
1086
+
1087
+ Name | Type | Required | Description | Example
1088
+ --- | --- | --- | --- | ---
1089
+ elementId ("element" prior to Appium v 1.22) | string | no | The internal element identifier (as hexadecimal hash string) to swipe on. Application element will be used instead if this argument is not provided | fe50b60b-916d-420b-8728-ee2072ec53eb
1090
+ direction | Either 'up', 'down', 'left' or 'right' | yes | The direction in which to swipe | up
1091
+ velocity | number | no | This argument is optional and is only supported since Appium server version 1.19 and Xcode SDK version 11.4+. The value is measured in pixels per second and same values could behave differently on different devices depending on their display density. Higher values make swipe gesture faster (which usually scrolls larger areas if we apply it to a list) and lower values slow it down. Only values greater than zero have effect. | 250
1092
+
1093
+ #### Examples
1094
+
1095
+ === "Java"
1096
+
1097
+ ```java
1098
+ RemoteWebElement e = driver.findElement(AppiumBy.accessibilityId("target element"));
1099
+ driver.executeScript("mobile: swipe", ImmutableMap.of(
1100
+ "velocity": 2500,
1101
+ "direction": "down",
1102
+ "elementId", e.getId()
1103
+ ));
1104
+ ```
1105
+
1106
+ === "JS (WebdriverIO)"
1107
+
1108
+ ```js
1109
+ const e = await $('~target element');
1110
+ await driver.executeScript("mobile: swipe", [{
1111
+ velocity: 2500,
1112
+ direction: "down",
1113
+ elementId: e.elementId
1114
+ }]);
1115
+
1116
+ === "Python"
1117
+
1118
+ ```python
1119
+ e = driver.find_element(by=AppiumBy.ACCESSIBILITY_ID, value='target element')
1120
+ driver.execute_script("mobile: swipe", {
1121
+ "velocity": 2500,
1122
+ "direction": "down",
1123
+ "elementId": e.id
1124
+ })
1125
+ ```
1126
+
1127
+ === "Ruby"
1128
+
1129
+ ```ruby
1130
+ e = driver.find_element :accessibility_id, 'target element'
1131
+ driver.execute_script 'mobile: swipe', {
1132
+ velocity: 2500,
1133
+ direction: 'down',
1134
+ elementId: e.ref
1135
+ }
1136
+ ```
1137
+
1138
+ === "C#"
1139
+
1140
+ ```csharp
1141
+ var e = driver.FindElement(By.AccessibilityId("target element"))
1142
+ driver.ExecuteScript("mobile: swipe", new Dictionary<string, object>() {
1143
+ {"elementId", element.Id},
1144
+ {"direction", "down" },
1145
+ {"velocity", 2500 }
1146
+ });
1147
+ ```
1148
+
1149
+ #### References
1150
+
1151
+ - [swipeDown](https://developer.apple.com/documentation/xctest/xcuielement/1618664-swipedown?language=objc)
1152
+ - [swipeDownWithVelocity:](https://developer.apple.com/documentation/xctest/xcuielement/3551694-swipedownwithvelocity?language=objc)
1153
+ - [swipeUp](https://developer.apple.com/documentation/xctest/xcuielement/1618667-swipeup?language=objc)
1154
+ - [swipeUpWithVelocity:](https://developer.apple.com/documentation/xctest/xcuielement/3551697-swipeupwithvelocity?language=objc)
1155
+ - [swipeLeft](https://developer.apple.com/documentation/xctest/xcuielement/1618668-swipeleft?language=objc)
1156
+ - [swipeLeftWithVelocity:](https://developer.apple.com/documentation/xctest/xcuielement/3551695-swipeleftwithvelocity?language=objc)
1157
+ - [swipeRight](https://developer.apple.com/documentation/xctest/xcuielement/1618674-swiperight?language=objc)
1158
+ - [swipeRightWithVelocity:](https://developer.apple.com/documentation/xctest/xcuielement/3551696-swiperightwithvelocity?language=objc)
1159
+
1160
+ ### mobile: scroll
1161
+
1162
+ Scrolls the element or the whole screen. Different scrolling strategies are supported.
1163
+ Arguments define the chosen strategy: either 'name', 'direction', 'predicateString' or
1164
+ 'toVisible' in that order. All strategies are exclusive and only one strategy
1165
+ can be applied at a single moment of time. Use "mobile: scroll" to emulate precise
1166
+ scrolling in tables or collection views, where it is already known to which element
1167
+ the scrolling should be performed. Although, there is one known limitation there: in case
1168
+ it is necessary to perform too many scroll gestures on parent container to reach the
1169
+ necessary child element (tens of them) then the method call may fail.
1170
+ _Important_: The implementation of this extension relies on several undocumented XCTest features, which might not always be reliable. Thus it might *not* always work as expected.
1171
+
1172
+ #### Arguments
1173
+
1174
+ Name | Type | Required | Description | Example
1175
+ --- | --- | --- | --- | ---
1176
+ elementId ("element" prior to Appium v 1.22) | string | no | The internal element identifier (as hexadecimal hash string) to scroll on (e.g. the container). The active application element will be used instead if this parameter is not provided. | fe50b60b-916d-420b-8728-ee2072ec53eb
1177
+ name | string | no | The accessibility id of the child element, to which scrolling is performed. The same result can be achieved by setting _predicateString_ argument to 'name == accessibilityId'. Has no effect if _elementId_ is not a container | cell12
1178
+ direction | Either 'up', 'down', 'left' or 'right' | yes | The main difference from [swipe](#mobile-swipe) call with the same argument is that _scroll_ will try to move the current viewport exactly to the next/previous page (the term "page" means the content, which fits into a single device screen) | down
1179
+ distance | number | no | A ratio of the screen height. For example, _1.0_ means scrolling one full screen height. Has no effect if _direction_ is not set. | 0.6
1180
+ predicateString | string | no | The NSPredicate locator of the child element, to which the scrolling should be performed. Has no effect if _elementId_ is not a container | label == "foo"
1181
+ toVisible | boolean | no | If set to _true_ then asks to scroll to the first visible _elementId_ in the parent container. Has no effect if _elementId_ is not set | true
1182
+
1183
+ #### Examples
1184
+
1185
+ === "Java"
1186
+
1187
+ ```java
1188
+ driver.executeScript("mobile: scroll", ImmutableMap.of(
1189
+ "direction", "down"
1190
+ ));
1191
+ ```
1192
+
1193
+ === "JS (WebdriverIO)"
1194
+
1195
+ ```js
1196
+ await driver.executeScript('mobile: scroll', [{
1197
+ direction: 'down'
1198
+ }]);
1199
+
1200
+ === "Python"
1201
+
1202
+ ```python
1203
+ driver.execute_script("mobile: scroll", {
1204
+ "direction": "down"
1205
+ })
1206
+ ```
1207
+
1208
+ === "Ruby"
1209
+
1210
+ ```ruby
1211
+ driver.execute_script 'mobile: scroll', {
1212
+ direction: 'down'
1213
+ }
1214
+ ```
1215
+
1216
+ === "C#"
1217
+
1218
+ ```csharp
1219
+ driver.ExecuteScript("mobile: scroll", new Dictionary<string, object>() {
1220
+ {"direction", "down"}
1221
+ });
1222
+ ```
1223
+
1224
+ ### mobile: pinch
1225
+
1226
+ Performs pinch gesture on the given element or on the application element.
1227
+
1228
+ #### Arguments
1229
+
1230
+ Name | Type | Required | Description | Example
1231
+ --- | --- | --- | --- | ---
1232
+ elementId ("element" prior to Appium v 1.22) | string | no | The internal element identifier (as hexadecimal hash string) to pinch on. The active application element will be used instead if this parameter is not provided. | fe50b60b-916d-420b-8728-ee2072ec53eb
1233
+ scale | number | yes | Pinch scale of type float. Use a scale between 0 and 1 to "pinch close" or zoom out and a scale greater than 1 to "pinch open" or zoom in. | 0.5
1234
+ velocity | number | yes | The velocity of the pinch in scale factor per second (float value) | 2.2
1235
+
1236
+ #### Examples
1237
+
1238
+ === "Java"
1239
+
1240
+ ```java
1241
+ RemoteWebElement e = driver.findElement(AppiumBy.accessibilityId("target element"));
1242
+ driver.executeScript("mobile: pinch", ImmutableMap.of(
1243
+ "scale", 0.5,
1244
+ "velocity", 1.1,
1245
+ "elementId", e.getId()
1246
+ ));
1247
+ ```
1248
+
1249
+ === "JS (WebdriverIO)"
1250
+
1251
+ ```js
1252
+ const e = await $('~target element');
1253
+ await driver.executeScript('mobile: pinch', [{
1254
+ scale: 0.5,
1255
+ velocity: 1.1,
1256
+ elementId: e.elementId
1257
+ }]);
1258
+
1259
+ === "Python"
1260
+
1261
+ ```python
1262
+ e = driver.find_element(by=AppiumBy.ACCESSIBILITY_ID, value='target element')
1263
+ driver.execute_script("mobile: pinch", {
1264
+ "scale": 0.5,
1265
+ "velocity": 1.1,
1266
+ "elementId": e.id
1267
+ })
1268
+ ```
1269
+
1270
+ === "Ruby"
1271
+
1272
+ ```ruby
1273
+ e = driver.find_element :accessibility_id, 'target element'
1274
+ driver.execute_script 'mobile: pinch', {
1275
+ scale: 0.5,
1276
+ velocity: 1.1,
1277
+ elementId: e.ref
1278
+ }
1279
+ ```
1280
+
1281
+ === "C#"
1282
+
1283
+ ```csharp
1284
+ var e = driver.FindElement(By.AccessibilityId("target element"))
1285
+ driver.ExecuteScript("mobile: pinch", new Dictionary<string, object>() {
1286
+ {"elementId", element.Id},
1287
+ {"scale", 0.5 },
1288
+ {"velocity", 1.1 },
1289
+ });
1290
+ ```
1291
+
1292
+ #### Reference
1293
+
1294
+ [pinchWithScale:velocity:](https://developer.apple.com/documentation/xctest/xcuielement/1618669-pinchwithscale?language=objc)
1295
+
1296
+ ### mobile: doubleTap
1297
+
1298
+ Performs double tap gesture on the given element or on the screen.
1299
+
1300
+ #### Arguments
1301
+
1302
+ Name | Type | Required | Description | Example
1303
+ --- | --- | --- | --- | ---
1304
+ elementId ("element" prior to Appium v 1.22) | string | no | The internal element identifier (as hexadecimal hash string) to double tap on. The active application element will be used instead if this parameter is not provided. | fe50b60b-916d-420b-8728-ee2072ec53eb
1305
+ x | number | no | Horizontal coordinate offset. | 100
1306
+ y | number | no | Vertical coordinate offset. | 100
1307
+
1308
+ #### Examples
1309
+
1310
+ === "Java"
1311
+
1312
+ ```java
1313
+ RemoteWebElement e = driver.findElement(AppiumBy.accessibilityId("target element"));
1314
+ driver.executeScript("mobile: doubleTap", ImmutableMap.of(
1315
+ "elementId", e.getId()
1316
+ ));
1317
+ ```
1318
+
1319
+ === "JS (WebdriverIO)"
1320
+
1321
+ ```js
1322
+ const e = await $('~target element');
1323
+ await driver.executeScript('mobile: doubleTap', [{
1324
+ elementId: e.elementId
1325
+ }]);
1326
+
1327
+ === "Python"
1328
+
1329
+ ```python
1330
+ e = driver.find_element(by=AppiumBy.ACCESSIBILITY_ID, value='target element')
1331
+ driver.execute_script("mobile: doubleTap", {
1332
+ "elementId": e.id
1333
+ })
1334
+ ```
1335
+
1336
+ === "Ruby"
1337
+
1338
+ ```ruby
1339
+ e = driver.find_element :accessibility_id, 'target element'
1340
+ driver.execute_script 'mobile: doubleTap', {
1341
+ elementId: e.ref
1342
+ }
1343
+ ```
1344
+
1345
+ === "C#"
1346
+
1347
+ ```csharp
1348
+ var e = driver.FindElement(By.AccessibilityId("target element"))
1349
+ driver.ExecuteScript("mobile: doubleTap", new Dictionary<string, object>() {
1350
+ {"elementId", element.Id}
1351
+ });
1352
+ ```
1353
+
1354
+ ### mobile: touchAndHold
1355
+
1356
+ Performs long press gesture on the given element or on the screen.
1357
+
1358
+ #### Arguments
1359
+
1360
+ Name | Type | Required | Description | Example
1361
+ --- | --- | --- | --- | ---
1362
+ elementId ("element" prior to Appium v 1.22) | string | no | The internal element identifier (as hexadecimal hash string) to long tap on. The active application element will be used instead if this parameter is not provided. | fe50b60b-916d-420b-8728-ee2072ec53eb
1363
+ duration | number | yes | The float duration of press action in seconds | 1.5
1364
+ x | number | no | Horizontal coordinate offset. | 100
1365
+ y | number | no | Vertical coordinate offset. | 100
1366
+
1367
+ #### Examples
1368
+
1369
+ === "Java"
1370
+
1371
+ ```java
1372
+ RemoteWebElement e = driver.findElement(AppiumBy.accessibilityId("target element"));
1373
+ driver.executeScript("mobile: touchAndHold", ImmutableMap.of(
1374
+ "elementId", e.getId(),
1375
+ "duration", 2.0
1376
+ ));
1377
+ ```
1378
+
1379
+ === "JS (WebdriverIO)"
1380
+
1381
+ ```js
1382
+ const e = await $('~target element');
1383
+ await driver.executeScript('mobile: touchAndHold', [{
1384
+ elementId: e.elementId,
1385
+ duration: 2.0
1386
+ }]);
1387
+
1388
+ === "Python"
1389
+
1390
+ ```python
1391
+ e = driver.find_element(by=AppiumBy.ACCESSIBILITY_ID, value='target element')
1392
+ driver.execute_script("mobile: touchAndHold", {
1393
+ "elementId": e.id,
1394
+ "duration": 2.0
1395
+ })
1396
+ ```
1397
+
1398
+ === "Ruby"
1399
+
1400
+ ```ruby
1401
+ e = driver.find_element :accessibility_id, 'target element'
1402
+ driver.execute_script 'mobile: touchAndHold', {
1403
+ elementId: e.ref,
1404
+ duration: 2.0
1405
+ }
1406
+ ```
1407
+
1408
+ === "C#"
1409
+
1410
+ ```csharp
1411
+ var e = driver.FindElement(By.AccessibilityId("target element"))
1412
+ driver.ExecuteScript("mobile: touchAndHold", new Dictionary<string, object>() {
1413
+ {"elementId", element.Id},
1414
+ {"duration", 2.0}
1415
+ });
1416
+ ```
1417
+
1418
+ #### Reference
1419
+
1420
+ [pressForDuration:](https://developer.apple.com/documentation/xctest/xcuielement/1618663-pressforduration?language=objc)
1421
+
1422
+ ### mobile: twoFingerTap
1423
+
1424
+ Performs two finger tap gesture on the given element or on the application element.
1425
+
1426
+ #### Arguments
1427
+
1428
+ Name | Type | Required | Description | Example
1429
+ --- | --- | --- | --- | ---
1430
+ elementId ("element" prior to Appium v 1.22) | string | no | The internal element identifier (as hexadecimal hash string) to tap on. The active application element will be used instead if this parameter is not provided. | fe50b60b-916d-420b-8728-ee2072ec53eb
1431
+
1432
+ #### Examples
1433
+
1434
+ === "Java"
1435
+
1436
+ ```java
1437
+ RemoteWebElement e = driver.findElement(AppiumBy.accessibilityId("target element"));
1438
+ driver.executeScript("mobile: twoFingerTap", ImmutableMap.of(
1439
+ "elementId", e.getId()
1440
+ ));
1441
+ ```
1442
+
1443
+ === "JS (WebdriverIO)"
1444
+
1445
+ ```js
1446
+ const e = await $('~target element');
1447
+ await driver.executeScript('mobile: twoFingerTap', [{
1448
+ elementId: e.elementId
1449
+ }]);
1450
+
1451
+ === "Python"
1452
+
1453
+ ```python
1454
+ e = driver.find_element(by=AppiumBy.ACCESSIBILITY_ID, value='target element')
1455
+ driver.execute_script("mobile: twoFingerTap", {
1456
+ "elementId": e.id
1457
+ })
1458
+ ```
1459
+
1460
+ === "Ruby"
1461
+
1462
+ ```ruby
1463
+ e = driver.find_element :accessibility_id, 'target element'
1464
+ driver.execute_script 'mobile: twoFingerTap', {
1465
+ elementId: e.ref
1466
+ }
1467
+ ```
1468
+
1469
+ === "C#"
1470
+
1471
+ ```csharp
1472
+ var e = driver.FindElement(By.AccessibilityId("target element"))
1473
+ driver.ExecuteScript("mobile: twoFingerTap", new Dictionary<string, object>() {
1474
+ {"elementId", element.Id}
1475
+ });
1476
+ ```
1477
+
1478
+ #### Reference
1479
+
1480
+ [twoFingerTap](https://developer.apple.com/documentation/xctest/xcuielement/1618675-twofingertap?language=objc)
1481
+
1482
+ ### mobile: tap
1483
+
1484
+ Performs tap gesture by coordinates on the given element or on the screen.
1485
+
1486
+ #### Arguments
1487
+
1488
+ Name | Type | Required | Description | Example
1489
+ --- | --- | --- | --- | ---
1490
+ elementId ("element" prior to Appium v 1.22) | string | no | The internal element identifier (as hexadecimal hash string) to tap on. _x_ and _y_ tap coordinates will be calculated relatively to the current element position on the screen if this argument is provided. Otherwise they should be calculated relatively to the active application element. | fe50b60b-916d-420b-8728-ee2072ec53eb
1491
+ x | number | yes | Horizontal coordinate offset. | 100
1492
+ y | number | yes | Vertical coordinate offset. | 100
1493
+
1494
+ ### mobile: dragFromToForDuration
1495
+
1496
+ Performs drag and drop gesture by coordinates. This can be done either on an element or
1497
+ on the screen
1498
+
1499
+ #### Arguments
1500
+
1501
+ Name | Type | Required | Description | Example
1502
+ --- | --- | --- | --- | ---
1503
+ elementId ("element" prior to Appium v 1.22) | string | no | The internal element identifier (as hexadecimal hash string) to perform drag on. All the coordinates will be calculated relatively this this element position on the screen. Absolute screen coordinates are expected if this argument is not set | fe50b60b-916d-420b-8728-ee2072ec53eb
1504
+ duration | number | yes | Float number of seconds in range [0.5, 60]. How long the tap gesture at starting drag point should be before to start dragging | 5.3
1505
+ fromX | number | yes | The x coordinate of starting drag point | 100
1506
+ fromY | number | yes | The y coordinate of starting drag point | 100
1507
+ toX | number | yes | The x coordinate of ending drag point | 200
1508
+ toY | number | yes | The y coordinate of ending drag point | 200
1509
+
1510
+ #### Examples
1511
+
1512
+ === "Java"
1513
+
1514
+ ```java
1515
+ RemoteWebElement e = driver.findElement(AppiumBy.accessibilityId("target element"));
1516
+ driver.executeScript("mobile: dragFromToForDuration", ImmutableMap.of(
1517
+ "elementId", e.getId(),
1518
+ "duration", 1.0,
1519
+ "fromX", 100,
1520
+ "fromY", 100,
1521
+ "toX", 200,
1522
+ "toY", 200
1523
+ ));
1524
+ ```
1525
+
1526
+ === "JS (WebdriverIO)"
1527
+
1528
+ ```js
1529
+ const e = await $('~target element');
1530
+ await driver.executeScript('mobile: dragFromToForDuration', [{
1531
+ elementId: e.elementId,
1532
+ duration: 1.0,
1533
+ fromX: 100,
1534
+ fromY: 100,
1535
+ toX: 200,
1536
+ toY: 200
1537
+ }]);
1538
+
1539
+ === "Python"
1540
+
1541
+ ```python
1542
+ e = driver.find_element(by=AppiumBy.ACCESSIBILITY_ID, value='target element')
1543
+ driver.execute_script("mobile: dragFromToForDuration", {
1544
+ "elementId": e.id,
1545
+ "duration": 1.0,
1546
+ "fromX": 100,
1547
+ "fromY": 100,
1548
+ "toX": 200,
1549
+ "toY": 200
1550
+ })
1551
+ ```
1552
+
1553
+ === "Ruby"
1554
+
1555
+ ```ruby
1556
+ e = driver.find_element :accessibility_id, 'target element'
1557
+ driver.execute_script 'mobile: dragFromToForDuration', {
1558
+ elementId: e.ref,
1559
+ duration: 1.0,
1560
+ fromX: 100,
1561
+ fromY: 100,
1562
+ toX: 200,
1563
+ toY: 200
1564
+ }
1565
+ ```
1566
+
1567
+ === "C#"
1568
+
1569
+ ```csharp
1570
+ var e = driver.FindElement(By.AccessibilityId("target element"))
1571
+ driver.ExecuteScript("mobile: dragFromToForDuration", new Dictionary<string, object>() {
1572
+ {"elementId", element.Id},
1573
+ {"duration", 1.0,}
1574
+ {"fromX", 100},
1575
+ {"fromY", 100},
1576
+ {"toX", 200},
1577
+ {"toY", 200}
1578
+ });
1579
+ ```
1580
+
1581
+
1582
+ #### Reference
1583
+
1584
+ [pressForDuration:thenDragToCoordinate:](https://developer.apple.com/documentation/xcuiautomation/xcuicoordinate/press(forduration:thendragto:)?language=objc)
1585
+
1586
+ ### mobile: dragFromToWithVelocity
1587
+
1588
+ Initiates a press-and-hold gesture, drags to another coordinate or an element with a velocity you specify, and holds for a duration you specify.
1589
+
1590
+ #### Arguments
1591
+
1592
+ Name | Type | Required | Description | Example
1593
+ --- | --- | --- | --- | ---
1594
+ fromElementId | string | no | The internal element identifier (as hexadecimal hash string) to start the drag gesture from. Absolute screen coordinates are expected if this argument is not set | fe50b60b-916d-420b-8728-ee2072ec53eb
1595
+ toElementId | string | no | The internal element identifier (as hexadecimal hash string) to end the drag gesture on. This parameter is mandatory if `fromElementId` is provided | fe50b60b-916d-420b-8728-ee2072ec53eb
1596
+ pressDuration | number | yes | Float number of seconds in range [0, 60]. How long the tap gesture at starting drag point should be before to start dragging | 0.5
1597
+ holdDuration | number | yes | Float number of seconds in range [0, 60]. The duration for which to hold over the other coordinate or the given element after dragging | 0.1
1598
+ velocity | number | yes | The speed at which to move from the initial press position to the other element or coordinate, expressed in pixels per second | 400
1599
+ fromX | number | no | The x coordinate of starting drag point. Must be provided if `fromElementId` is not defined | 100
1600
+ fromY | number | no | The y coordinate of starting drag point. Must be provided if `fromElementId` is not defined | 100
1601
+ toX | number | no | The x coordinate of ending drag point. Must be provided if `fromElementId` is not defined | 200
1602
+ toY | number | no | The y coordinate of ending drag point. Must be provided if `fromElementId` is not defined | 200
1603
+
1604
+ #### References
1605
+
1606
+ [pressForDuration:thenDragToElement:withVelocity:thenHoldForDuration:](https://developer.apple.com/documentation/xctest/xcuielement/3551693-pressforduration?language=objc)
1607
+ [pressForDuration:thenDragToCoordinate:withVelocity:thenHoldForDuration:](https://developer.apple.com/documentation/xctest/xcuicoordinate/3551692-pressforduration?language=objc)
1608
+
1609
+ ### mobile: rotateElement
1610
+
1611
+ Performs [rotate](https://developer.apple.com/documentation/xctest/xcuielement/1618665-rotate?language=objc) gesture on the given element.
1612
+
1613
+ #### Arguments
1614
+
1615
+ Name | Type | Required | Description | Example
1616
+ --- | --- | --- | --- | ---
1617
+ elementId ("element" prior to Appium v 1.22) | string | no | Internal element id (as hexadecimal hash string) to perform rotation on. The active application element will be used instead if this parameter is not provided. | fe50b60b-916d-420b-8728-ee2072ec53eb
1618
+ rotation | number | yes | The rotation of the gesture in radians | Math.PI
1619
+ velocity | number | yes | The velocity of the rotation gesture in radians per second | Math.PI / 4
1620
+
1621
+ #### Examples
1622
+
1623
+
1624
+ === "Java"
1625
+
1626
+ ```java
1627
+ RemoteWebElement e = driver.findElement(AppiumBy.accessibilityId("target element"));
1628
+ driver.executeScript("mobile: rotateElement", ImmutableMap.of(
1629
+ // rotate clockwise, 90 degrees
1630
+ "rotation", -Math.PI / 2,
1631
+ // in approximately two seconds
1632
+ "velocity", Math.PI / 4,
1633
+ "elementId", e.getId()
1634
+ ));
1635
+ ```
1636
+
1637
+ === "JS (WebdriverIO)"
1638
+
1639
+ ```js
1640
+ const e = await $('~target element');
1641
+ await driver.executeScript('mobile: rotateElement', [{
1642
+ rotation: -Math.PI / 2,
1643
+ velocity: Math.PI / 4,
1644
+ elementId: e.elementId
1645
+ }]);
1646
+ ```
1647
+
1648
+ === "Python"
1649
+
1650
+ ```python
1651
+ e = driver.find_element(by=AppiumBy.ACCESSIBILITY_ID, value='target element')
1652
+ driver.execute_script("mobile: rotateElement", {
1653
+ "rotation": -math.pi / 2,
1654
+ "velocity": math.pi / 4,
1655
+ "elementId": e.id
1656
+ })
1657
+ ```
1658
+
1659
+ === "Ruby"
1660
+
1661
+ ```ruby
1662
+ e = driver.find_element :accessibility_id, 'target element'
1663
+ driver.execute_script 'mobile: rotateElement', {
1664
+ elementId: e.ref,
1665
+ rotation: PI / 2,
1666
+ velocity: PI / 4
1667
+ }
1668
+ ```
1669
+
1670
+ === "C#"
1671
+
1672
+ ```csharp
1673
+ var e = driver.FindElement(By.AccessibilityId("target element"))
1674
+ driver.ExecuteScript("mobile: rotateElement", new Dictionary<string, object>() {
1675
+ {"elementId", element.Id},
1676
+ {"rotation", -Math.PI / 2 },
1677
+ {"velocity", Math.PI / 4 },
1678
+ });
1679
+ ```
1680
+
1681
+
1682
+ #### Reference
1683
+
1684
+ [rotate:withVelocity:](https://developer.apple.com/documentation/xctest/xcuielement/1618665-rotate?language=objc)
1685
+
1686
+ ### mobile: tapWithNumberOfTaps
1687
+
1688
+ Sends one or more taps with one or more touch points since Appium 1.17.1.
1689
+
1690
+ #### Arguments
1691
+
1692
+ Name | Type | Required | Description | Example
1693
+ --- | --- | --- | --- | ---
1694
+ elementId ("element" prior to Appium v 1.22) | string | no | The internal element identifier (as hexadecimal hash string) to perform one or more taps. The active application element will be used instead if this parameter is not provided.| fe50b60b-916d-420b-8728-ee2072ec53eb
1695
+ numberOfTaps | number | no | The number of taps. 1 by default | 2
1696
+ numberOfTouches | number | no | The number of touch points. 1 by default | 2
1697
+
1698
+ #### Examples
1699
+
1700
+ === "Java"
1701
+
1702
+ ```java
1703
+ RemoteWebElement e = driver.findElement(AppiumBy.accessibilityId("target element"));
1704
+ var result = driver.executeScript("mobile: tapWithNumberOfTaps", Map.of(
1705
+ "elementId", e.getId(),
1706
+ "numberOfTaps", 2,
1707
+ "numberOfTouches", 1,
1708
+ ));
1709
+ ```
1710
+
1711
+ === "JS (WebdriverIO)"
1712
+
1713
+ ```js
1714
+ const e = await $('~target element');
1715
+ await driver.executeScript('mobile: tapWithNumberOfTaps', [{
1716
+ elementId: e.elementId,
1717
+ numberOfTaps: 2,
1718
+ numberOfTouches: 1
1719
+ }]);
1720
+ ```
1721
+
1722
+ === "Python"
1723
+
1724
+ ```python
1725
+ e = driver.find_element(by=AppiumBy.ACCESSIBILITY_ID, value='target element')
1726
+ driver.execute_script("mobile: tapWithNumberOfTaps", {
1727
+ "elementId": e.id,
1728
+ "numberOfTaps": 2,
1729
+ "numberOfTouches": 1
1730
+ })
1731
+ ```
1732
+
1733
+ === "Ruby"
1734
+
1735
+ ```ruby
1736
+ e = driver.find_element :accessibility_id, 'target element'
1737
+ driver.execute_script 'mobile: tapWithNumberOfTaps', {
1738
+ elementId: e.ref,
1739
+ numberOfTaps: 2,
1740
+ numberOfTouches: 1
1741
+ }
1742
+ ```
1743
+
1744
+ === "C#"
1745
+
1746
+ ```csharp
1747
+ var e = driver.FindElement(By.AccessibilityId("target element"))
1748
+ driver.ExecuteScript("mobile: touchAndHold", new Dictionary<string, object>() {
1749
+ {"elementId", element.Id},
1750
+ {"numberOfTaps", 2 },
1751
+ {"numberOfTouches", 1 },
1752
+ });
1753
+ ```
1754
+
1755
+ - numberOfTaps=1, numberOfTouches=1 -> "vanilla" single tap
1756
+ - numberOfTaps=2, numberOfTouches=1 -> double tap
1757
+ - numberOfTaps=3, numberOfTouches=1 -> triple tap
1758
+ - numberOfTaps=2, numberOfTouches=2 -> double tap with two fingers
1759
+
1760
+ #### Reference
1761
+ [tapWithNumberOfTaps:numberOfTouches:](https://developer.apple.com/documentation/xctest/xcuielement/1618671-tapwithnumberoftaps)
1762
+
1763
+ ### mobile: forcePress
1764
+
1765
+ Emulates force press on the given element/coordinates.
1766
+ An error is thrown if the target device does not support force press gesture.
1767
+
1768
+ #### Arguments
1769
+
1770
+ Name | Type | Required | Description | Example
1771
+ --- | --- | --- | --- | ---
1772
+ elementId | string | no | The internal element identifier (as hexadecimal hash string) to perform one or more taps. It is expected that both x and y are provided if this argument is omitted. If the element identifier is provided without coordinates then the actual element's touch point will be calculated automatically by WebDriverAgent. | fe50b60b-916d-420b-8728-ee2072ec53eb
1773
+ x | number | no | x coordinate of the gesture. It is calculated relatively to the given element (if provided). Otherwise the gesture destination point is calculated relatively to the active application. | 100
1774
+ y | number | no | y coordinate of the gesture. It is calculated relatively to the given element (if provided). Otherwise the gesture destination point is calculated relatively to the active application | 100
1775
+ duration | number | no | The float number of seconds the force press action would take. If duration is provided then it is also expected that a custom pressure value is provided as well. `0.5` by default. | 2.5
1776
+ pressure | number | no | The float number defining how much pressure to apply. If pressure is provided then it is also expected that a custom duration value is provided as well. `1.0` by default | 1.5
1777
+
1778
+ ### mobile: scrollToElement
1779
+
1780
+ Scrolls the current viewport to the given element. It is expected the destination element is inside a scrollable container and is hittable. The scroll direction is detected automatically.
1781
+ This API uses native XCTest calls, so it performs scrolling pretty fast. The same native call is
1782
+ implicitly performed by a vanilla `click` API if the destination element is out of the current viewport. An exception is thrown if the scrolling action cannot be performed.
1783
+ This extension is available since the driver version 4.7.0.
1784
+
1785
+ #### Arguments
1786
+
1787
+ Name | Type | Required | Description | Example
1788
+ --- | --- | --- | --- | ---
1789
+ elementId | string | yes | The internal element identifier (as hexadecimal hash string) to scroll to. The destination element must be located in a scrollable container and must be hittable. If the element is already present in the current viewport then no action is performed. | fe50b60b-916d-420b-8728-ee2072ec53eb
1790
+
1791
+ ### mobile: resetLocationService
1792
+
1793
+ Reset the location service on real device since Appium 1.22.0.
1794
+ It take a few seconds to reflect the new location by the system.
1795
+ The API raises an error if the device is simulator or an
1796
+ unexpected error has occurred on iOS version below 17.
1797
+ On iOS 17+ it is an alias to [mobile: resetSimulatedLocation](#mobile-resetsimulatedlocation).
1798
+
1799
+ ### mobile: enableConditionInducer
1800
+
1801
+ Important: Device conditions are available for real devices running iOS 13.0 and later.
1802
+
1803
+ This API is going to throw an error if it is called while another condition inducer has been already enabled and is not explicitly disabled.
1804
+
1805
+ ```
1806
+ mobile: enableConditionInducer
1807
+ mobile: disableConditionInducer
1808
+ mobile: listConditionInducers
1809
+ ```
1810
+
1811
+ The above three extensions are available since the driver version 4.9.0.
1812
+
1813
+ You can create a condition on a connected device to test your app under adverse conditions, such as poor network connectivity or thermal constraints.
1814
+
1815
+ When you start a device condition, the operating system on the device behaves as if its environment has changed. The device condition remains active until you stop the device condition or disconnect the device. For example, you can start a device condition, run your app, monitor your app's energy usage, and then stop the condition.
1816
+
1817
+ Reference: [Test under adverse device conditions (iOS)](https://help.apple.com/xcode/mac/current/#/dev308429d42)
1818
+
1819
+ Name | Type | Required | Description | Example
1820
+ --- | --- | --- | --- | ---
1821
+ conditionID | string | yes | Get the conditionID parameter through the command `mobile: availableConditionInducer` | SlowNetworkCondition
1822
+ profileID | string | yes | Get the profileID parameter through the command `mobile: availableConditionInducer` | SlowNetwork100PctLoss
1823
+
1824
+ #### Returned Result
1825
+
1826
+ Either `true` or `false`, where `true` means enabling of the condition inducer has been successful
1827
+
1828
+ ### mobile: listConditionInducers
1829
+
1830
+ Get all condition inducer configuration profiles
1831
+
1832
+ #### Returned Result
1833
+
1834
+ The response looks like
1835
+
1836
+ ```
1837
+ [{
1838
+ "profiles": [
1839
+ {
1840
+ "name": "100% packet loss",
1841
+ "identifier": "SlowNetwork100PctLoss", // enableConditionInducer profileID
1842
+ "description": "Name: 100% Loss Scenario
1843
+ Downlink Bandwidth: 0 Mbps
1844
+ Downlink Latency: 0 ms
1845
+ Downlink Packet Loss Ratio: 100%
1846
+ Uplink Bandwidth: 0 Mbps
1847
+ Uplink Latency: 0 ms
1848
+ Uplink Packet Loss Ratio: 100%"
1849
+ },
1850
+ ],
1851
+ "profilesSorted": true,
1852
+ "identifier": "SlowNetworkCondition", // enableConditionInducer conditionID
1853
+ "isDestructive": false,
1854
+ "isInternal": false,
1855
+ "activeProfile": "",
1856
+ "name": "Network Link",
1857
+ "isActive": false
1858
+ }]
1859
+ ```
1860
+
1861
+ ### mobile: disableConditionInducer
1862
+
1863
+ Disable device condition inducer.
1864
+
1865
+ Usually a persistent connection is maintained after enable the condition inducer, and this method is only valid for this connection.
1866
+
1867
+ If the connection is disconnected, condition inducer will be automatically disabled
1868
+
1869
+ #### Returned Result
1870
+
1871
+ Either `true` or `false`, where `true` means disabling of the condition inducer has been successful
1872
+
1873
+ ### mobile: calibrateWebToRealCoordinatesTranslation
1874
+
1875
+ Calibrates web to real coordinates translation.
1876
+ This API can only be called from Safari web context.
1877
+ It must load a custom page to the browser, and then restore
1878
+ the original one, so don't call it if you can potentially
1879
+ lose the current web app state.
1880
+ The outcome of this API is then used if `nativeWebTap` capability/setting is enabled.
1881
+ The returned value could also be used to manually transform web coordinates
1882
+ to real device ones in client scripts.
1883
+
1884
+ It is advised to call this API at least once before changing the device orientation
1885
+ or device screen layout as the recetly received value is cached for the session lifetime
1886
+ and may become obsolete.
1887
+
1888
+ It is advised to enable `nativeWebTapStrict` capability/setting to speed up dynamic coordinates
1889
+ transformation if you use this extension.
1890
+
1891
+ #### Returned Result
1892
+
1893
+ An object with three properties used to properly shift Safari web element coordinates into native context:
1894
+ - `offsetX`: Webview X offset in real coordinates
1895
+ - `offsetY`: Webview Y offset in real coordinates
1896
+ - `pixelRatioX`: Webview X pixel ratio
1897
+ - `pixelRatioY`: Webview Y pixel ratio
1898
+
1899
+ The following formulas are used for coordinates translation:
1900
+ `RealX = offsetX + webviewX * pixelRatioX`
1901
+ `RealY = offsetY + webviewY * pixelRatioY`
1902
+
1903
+ ### mobile: updateSafariPreferences
1904
+
1905
+ Updates preferences of Mobile Safari on Simulator
1906
+
1907
+ #### Arguments
1908
+
1909
+ Name | Type | Required | Description | Example
1910
+ --- | --- | --- | --- | ---
1911
+ preferences | map | yes | An object containing Mobile Safari preferences to be updated. The list of available setting names and their values could be retrieved by changing the corresponding Safari settings under Preferences-&gt;Safari and then inspecting `Library/Preferences/com.apple.mobilesafari.plist` file inside of `com.apple.mobilesafari` app container. The full path to the Mobile Safari's container could be retrieved from `xcrun simctl get_app_container <sim_udid> com.apple.mobilesafari data` command output. Use the `xcrun simctl spawn <sim_udid> defaults read <path_to_plist>` command to print the actual .plist content to the Terminal. | { ShowTabBar: 0, WarnAboutFraudulentWebsites: 0 }
1912
+
1913
+ ### mobile: deepLink
1914
+
1915
+ Opens the given URL with the default or the given application.
1916
+ This functionality is only available since xcuitest driver version 4.17.
1917
+ Xcode must be at version 14.3+ and iOS must be at version 16.4+.
1918
+
1919
+ #### Arguments
1920
+
1921
+ Name | Type | Required | Description | Example
1922
+ --- | --- | --- | --- | ---
1923
+ url | string | yes | The URL to be opened. This parameter is manadatory. | https://apple.com, myscheme:yolo
1924
+ bundleId | string | no | The bundle identifier of an application to open the given url with. If not provided then the default application for the given url scheme is going to be used. | com.myapp.yolo
1925
+
1926
+ ### mobile: getSimulatedLocation
1927
+
1928
+ Retrieves simulated geolocation value.
1929
+ This functionality is only available since xcuitest driver version 4.18.
1930
+ Xcode must be at version 14.3+ and iOS must be at version 16.4+.
1931
+
1932
+ #### Returned Result
1933
+
1934
+ This API returns a map with the following entries:
1935
+
1936
+ Name | Type | Description | Example
1937
+ --- | --- | --- | ---
1938
+ latitude | number | Measurement of distance north or south of the Equator. `null` if [mobile: setSimulatedLocation](#mobile-setsimulatedlocation) has not been called before or the simulated geolocation has been reset by [mobile: resetSimulatedLocation](#mobile-resetsimulatedlocation). | 50.08546
1939
+ longitude | number | Measurement of distance east or west of the prime meridian. `null` if [mobile: setSimulatedLocation](#mobile-setsimulatedlocation) has not been called before or the simulated geolocation has been reset by [mobile: resetSimulatedLocation](#mobile-resetsimulatedlocation). | -20.12345
1940
+
1941
+ ### mobile: setSimulatedLocation
1942
+
1943
+ Sets simulated geolocation value.
1944
+ This functionality is only available since xcuitest driver version 4.18.
1945
+ Xcode must be at version 14.3+ and iOS must be at version 16.4+.
1946
+
1947
+ It is recommended for iOS 17+ real devices to simulate the device location.
1948
+
1949
+ #### Arguments
1950
+
1951
+ Name | Type | Required | Description | Example
1952
+ --- | --- | --- | --- | ---
1953
+ latitude | number | yes | Measurement of distance north or south of the Equator. | 50.08546
1954
+ longitude | number | yes | Measurement of distance east or west of the prime meridian. | -20.12345
1955
+
1956
+ ### mobile: resetSimulatedLocation
1957
+
1958
+ Resets the previously set simulated geolocation value.
1959
+ This functionality is only available since xcuitest driver version 4.18.
1960
+ Xcode must be at version 14.3+ and iOS must be at version 16.4+.
1961
+
1962
+ > **Warning**
1963
+ > Do not forget to reset the simulated geolocation value after your automated test is finished.
1964
+ > If the value is not reset explicitly then the simulated one will remain until the next device restart.
1965
+
1966
+ ### mobile: getAppStrings
1967
+
1968
+ Retrieves string resources for the given app language. An error is thrown if strings cannot be fetched or no strings exist
1969
+ for the given language abbreviation
1970
+
1971
+ #### Arguments
1972
+
1973
+ Name | Type | Required | Description | Example
1974
+ --- | --- | --- | --- | ---
1975
+ language | string | no | The language abbreviation to fetch app strings mapping for. If no language is provided then strings for the 'en language would be returned | fr
1976
+ stringFile | string | no | Relative path to the corresponding .strings file starting from the corresponding .lproj folder | base/main.strings
1977
+
1978
+ #### Returned Result
1979
+
1980
+ App strings map, where keys are resource identifiers.
1981
+
1982
+ ### mobile: hideKeyboard
1983
+
1984
+ Tries to hide the on-screen keyboard. Throws an exception if the keyboard cannot be hidden. On non-tablet devices the keyboard might not have an explicit button to hide it. In such case this API won't work and the only way to close the keyboard would be to simulate the same action an app user would do to close it. For example, swipe from top to bottom or tap the screen somewhere at the area not covered by the keyboard.
1985
+
1986
+ #### Arguments
1987
+
1988
+ Name | Type | Required | Description | Example
1989
+ --- | --- | --- | --- | ---
1990
+ keys | string[] | no | One or more keyboard key names used to close/hide it. On tablet's such button is usually called 'done'.
1991
+
1992
+ ### mobile: isKeyboardShown
1993
+
1994
+ Checks if the system on-screen keyboard is visible.
1995
+
1996
+ #### Returned Result
1997
+
1998
+ `true` if the keyboard is visible
1999
+
2000
+ ### mobile: keys
2001
+
2002
+ Send keys to the given element or to the application under test.
2003
+ This API is only supported since Xcode 15/iOS 17.
2004
+ It is not supported on tvOS.
2005
+ The API only works on iPad. On iOS calling it has no effect.
2006
+
2007
+ #### Arguments
2008
+
2009
+ Name | Type | Required | Description | Example
2010
+ --- | --- | --- | --- | ---
2011
+ elementId | string | no | Unique identifier of the element to send the keys to. If unset then keys are sent to the current application under test. | 21045BC8-013C-43BD-9B1E-4C6DC7AB0744
2012
+ keys | array | yes | Array of keys to type. Each item could either be a string, that represents a key itself (see the official documentation on XCUIElement's [typeKey:modifierFlags: method](https://developer.apple.com/documentation/xctest/xcuielement/1500604-typekey?language=objc) and on [XCUIKeyboardKey constants](https://developer.apple.com/documentation/xctest/xcuikeyboardkey?language=objc)) or a dictionary with `key` and `modifierFlags` entries, if the key should also be entered with modifiers. | ['h', 'i'] or [{key: 'h', modifierFlags: 1 << 1}, {key: 'i', modifierFlags: 1 << 2}] or ['XCUIKeyboardKeyEscape'] |
2013
+
2014
+ !!! note
2015
+
2016
+ The `modifierFlags` argument is of `unsigned long` type and defines the bitmask with depressed modifier keys for the given key.
2017
+ XCTest defines the following possible bitmasks for modifier keys:
2018
+
2019
+ <pre>
2020
+ typedef NS_OPTIONS(NSUInteger, XCUIKeyModifierFlags) {
2021
+ XCUIKeyModifierNone = 0,
2022
+ XCUIKeyModifierCapsLock = (1UL << 0),
2023
+ XCUIKeyModifierShift = (1UL << 1),
2024
+ XCUIKeyModifierControl = (1UL << 2),
2025
+ XCUIKeyModifierOption = (1UL << 3),
2026
+ XCUIKeyModifierCommand = (1UL << 4),
2027
+ XCUIKeyModifierFunction = (1UL << 5),
2028
+ // These values align with UIKeyModifierFlags and CGEventFlags.
2029
+ XCUIKeyModifierAlphaShift = XCUIKeyModifierCapsLock,
2030
+ XCUIKeyModifierAlternate = XCUIKeyModifierOption,
2031
+ };
2032
+ </pre>
2033
+
2034
+ So, for example, if you want Ctrl and Shift to be depressed while entering your key then `modifierFlags` should be set to
2035
+ `(1 << 1) | (1 << 2)`, where the first constant defines `XCUIKeyModifierShift` and the seconds
2036
+ one - `XCUIKeyModifierControl`. We apply the [bitwise or](https://www.programiz.com/c-programming/bitwise-operators#or)
2037
+ (`|`) operator between them to raise both bitflags
2038
+ in the resulting value. The [left bitshift](https://www.programiz.com/c-programming/bitwise-operators#left-shift)
2039
+ (`<<`) operator defines the binary bitmask for the given modifier key.
2040
+ You may combine more keys using the same approach.
2041
+
2042
+ ### mobile: lock
2043
+
2044
+ Lock the device (and optionally unlock it after a certain amount of time). Only simple (e.g. without a password) locks are supported.
2045
+
2046
+ #### Arguments
2047
+
2048
+ Name | Type | Required | Description | Example
2049
+ --- | --- | --- | --- | ---
2050
+ seconds | number|string | no | The number of seconds after which to unlock the device. Set to `0` or leave it empty to require manual unlock (e.g. do not block and automatically unlock afterwards). | 5
2051
+
2052
+ ### mobile: unlock
2053
+
2054
+ Unlocks the previously locked device. Only simple (e.g. without a password) locks are supported.
2055
+
2056
+ ### mobile: isLocked
2057
+
2058
+ Determine whether the device is locked.
2059
+
2060
+ #### Returned Result
2061
+
2062
+ Either `true` or `false`
2063
+
2064
+ ### mobile: shake
2065
+
2066
+ Shakes the device. This functionality is only supported on simulators.
2067
+
2068
+ ### mobile: backgroundApp
2069
+
2070
+ Puts the app to the background and waits the given number of seconds. Then restores the app
2071
+ if necessary. The call is blocking.
2072
+
2073
+ #### Arguments
2074
+
2075
+ Name | Type | Required | Description | Example
2076
+ --- | --- | --- | --- | ---
2077
+ seconds | number | no | The amount of seconds to wait between putting the app to background and restoring it. Any negative value means to not restore the app after putting it to background (the default behavior). | 5
2078
+
2079
+ ### mobile: performAccessibilityAudit
2080
+
2081
+ Performs accessibility audit of the current application according to the given type or multiple types.
2082
+ Wraps the XCTest's [performAccessibilityAuditWithAuditTypes](https://developer.apple.com/documentation/xctest/xcuiapplication/4190847-performaccessibilityauditwithaud?language=objc) API.
2083
+ Only available since Xcode 15/iOS 17.
2084
+
2085
+ #### Arguments
2086
+
2087
+ Name | Type | Required | Description | Example
2088
+ --- | --- | --- | --- | ---
2089
+ auditTypes | string[] | no | One or more type names to perform the audit for. The full list of available names could be found in the official [XCTest API documentation](https://developer.apple.com/documentation/xctest/xcuiaccessibilityaudittype?language=objc). If no type if provided explicitly then `XCUIAccessibilityAuditTypeAll` is assumed. | ['XCUIAccessibilityAuditTypeContrast', 'XCUIAccessibilityAuditTypeElementDetection']
2090
+
2091
+ #### Returned Result
2092
+
2093
+ List of found issues or an empty list. Each list item is a map consisting of the following items:
2094
+
2095
+ Name | Type | Description | Example
2096
+ --- | --- | --- | ---
2097
+ detailedDescription | string | The detailed description of the found accessibility issue. | Some longer issue description
2098
+ compactDescription | string | The compact description of the found accessibility issue. | Some compact issue description
2099
+ auditType | string or number | The name of the audit type this issue belongs to. Could be a number if the type name is unknown. | 'XCUIAccessibilityAuditTypeContrast'
2100
+ element | string | The description of the element this issue was found for. | 'Yes' button
2101
+ elementDescription | string | The debug description of the element this issue was found for. Available since driver version | A long string describing the element itself and its position in the page tree hierarchy
2102
+ elementAttributes | dict | JSON object containing various attributes of the element. | See the example below
2103
+
2104
+ ```json
2105
+ "elementAttributes":{
2106
+ "isEnabled":"1",
2107
+ "isVisible":"1",
2108
+ "isAccessible":"0",
2109
+ "frame":"{{129, 65}, {135, 18}}",
2110
+ "isFocused":"0",
2111
+ "rect":{
2112
+ "y":65,
2113
+ "x":129,
2114
+ "width":135,
2115
+ "height":18
2116
+ },
2117
+ "value":"Some Button",
2118
+ "label":"Some Button",
2119
+ "type":"StaticText",
2120
+ "name":"Some Button",
2121
+ "rawIdentifier":null
2122
+ }
2123
+ ```
2124
+
2125
+ ### mobile: startScreenRecording
2126
+
2127
+ Starts recording the device screen to an MPEG-4 file using **ffmpeg** and the WebDriverAgent **MJPEG** stream. Equivalent to [`startRecordingScreen`](./commands.md#startrecordingscreen) over HTTP. Requires `ffmpeg` on `PATH`. Audio is not recorded.
2128
+
2129
+ #### Arguments
2130
+
2131
+ Pass the same fields as for HTTP [`startRecordingScreen`](./commands.md#startrecordingscreen) `options`, as **top-level** keys on the execute argument object (they are forwarded into one options object server-side). Example:
2132
+
2133
+ ```js
2134
+ await driver.execute('mobile: startScreenRecording', {
2135
+ timeLimit: 120,
2136
+ videoType: 'libx264',
2137
+ videoFps: 10,
2138
+ videoScale: '720:1280',
2139
+ pixelFormat: 'yuv420p',
2140
+ });
2141
+ ```
2142
+
2143
+ See [`startRecordingScreen`](./commands.md#startrecordingscreen) for all supported fields.
2144
+
2145
+ #### Returned Result
2146
+
2147
+ Same as [`startRecordingScreen`](./commands.md#startrecordingscreen): base64-encoded media if a recording was already running and was stopped, otherwise an empty string.
2148
+
2149
+ ### mobile: stopScreenRecording
2150
+
2151
+ Stops MJPEG/ffmpeg screen recording started with `mobile: startScreenRecording`. Equivalent to [`stopRecordingScreen`](./commands.md#stoprecordingscreen) over HTTP.
2152
+
2153
+ #### Arguments
2154
+
2155
+ Same fields as HTTP [`stopRecordingScreen`](./commands.md#stoprecordingscreen) `options`, as top-level keys (often an empty object when returning base64 inline). Example:
2156
+
2157
+ ```js
2158
+ await driver.execute('mobile: stopScreenRecording', {});
2159
+ ```
2160
+
2161
+ See [`stopRecordingScreen`](./commands.md#stoprecordingscreen) for supported fields (e.g. remote upload).
2162
+
2163
+ #### Returned Result
2164
+
2165
+ Same as [`stopRecordingScreen`](./commands.md#stoprecordingscreen): base64-encoded MP4 when returning inline media, or an empty string when uploaded remotely or nothing is available.
2166
+
2167
+ ### mobile: startXCTestScreenRecording
2168
+
2169
+ Start a new screen recording via XCTest.
2170
+
2171
+ Since this feature is based on the native implementation provided by Apple
2172
+ it provides the best quality for the least performance penalty in comparison
2173
+ to alternative implementations.
2174
+
2175
+ Real devices have additional requirements to ensure that the recorded video can be automatically
2176
+ deleted from the device itself:
2177
+
2178
+ - iOS 18+
2179
+ - appium-ios-remotexpc >= 0.44.0
2180
+
2181
+ Devices not meeting these requirements must use the `xctest_screen_record` security flag in order
2182
+ to guard against internal storage overload. Simulators are not affected.
2183
+
2184
+ If the screen recording is already running this API is a noop.
2185
+
2186
+ The feature is only available since Xcode 15/iOS 17.
2187
+
2188
+ #### Arguments
2189
+
2190
+ Name | Type | Required | Description | Example
2191
+ --- | --- | --- | --- | ---
2192
+ fps | number | no | The Frames Per Second value for the resulting video. Providing higher values will create video files that are greater in size, but with smoother transitions. It is highly recommended to keep this value is range 1-60. 24 by default | 60
2193
+
2194
+ #### Returned Result
2195
+
2196
+ The API response consists of the following entries:
2197
+
2198
+ Name | Type | Description | Example
2199
+ --- | --- | --- | ---
2200
+ uuid | string | Unique identifier of the video being recorded | 1D988774-C7E2-4817-829D-3B835DDAA7DF
2201
+ fps | number | FPS value | 24
2202
+ codec | number | The magic for the used codec. Value of zero means h264 video codec is being used | 0
2203
+ startedAt | number | The timestamp when the screen recording has started in float seconds since Unix epoch | 1709826124.123
2204
+
2205
+ ### mobile: getXCTestScreenRecordingInfo
2206
+
2207
+ Retrieves information about the current running screen recording.
2208
+ If no screen recording is running then `null` is returned.
2209
+
2210
+ #### Returned Result
2211
+
2212
+ Same as for [mobile: startXCTestScreenRecording](#mobile-startxctestscreenrecording)
2213
+
2214
+ ### mobile: stopXCTestScreenRecording
2215
+
2216
+ Stops the current XCTest screen recording previously started by the
2217
+ [mobile: startXctestScreenRecording](#mobile-startxctestscreenrecording) API.
2218
+
2219
+ An error is thrown if no screen recording is running.
2220
+
2221
+ The resulting movie is returned as base-64 string or is uploaded to
2222
+ a remote location if corresponding options have been provided.
2223
+
2224
+ The resulting movie is automatically deleted from the local file system **FOR SIMULATORS ONLY** (host temp copy).
2225
+
2226
+ On **real devices**, after a successful pull the driver deletes the attachment via **appium-ios-remotexpc** (`_IDE_deleteAttachmentsWithUUIDs:` on testmanagerd) only when the same deletion support is available as for **start** without `xctest_screen_record`. If the session relied on that insecure feature, device-side delete is skipped. Device-side delete is attempted even when Base64 encoding or remote upload fails (so storage is still reclaimed); the encode/upload error is thrown afterward. If delete fails when encoding/upload already failed, the failure is logged as a warning and the encode/upload error remains the one thrown. If encoding/upload succeeded and delete fails, the command throws the delete error.
2227
+
2228
+ On real devices using iOS 18+, the [`cleanup-videos` driver script](./scripts.md#cleanup-videos)
2229
+ can be used to delete old recording files.
2230
+
2231
+ #### Arguments
2232
+
2233
+ Name | Type | Required | Description | Example
2234
+ --- | --- | --- | --- | ---
2235
+ remotePath | string | no | The path to the remote location, where the resulting .mov file should be uploaded. The following protocols are supported: http/https, ftp Null or empty string value (the default setting) means the content of resulting file should be encoded as Base64 and passed to the endpoint response value. An exception will be thrown if the generated file is too big to fit into the available process memory. | https://myserver/upload
2236
+ user | string | no | The name of the user for the remote authentication. Only works if `remotePath` is provided. | myuser
2237
+ pass | string | no | The password for the remote authentication. Only works if `remotePath` is provided. | mypassword
2238
+ method | string | no | The http multipart upload method name. Only works if `remotePath` is provided. `PUT` by default | POST
2239
+ headers | dict | no | Additional headers mapping for multipart http(s) uploads | {'User-Agent': 'Myserver 1.0'}
2240
+ fileFieldName | string | no | The name of the form field, where the file content BLOB should be stored for http(s) uploads. `file` by default | payload
2241
+ formFields | dict or array | no | Additional form fields for multipart http(s) uploads | {'field2': 'value2'}
2242
+
2243
+ #### Returned Result
2244
+
2245
+ Same as for [mobile: startXCTestScreenRecording](#mobile-startxctestscreenrecording) plus the below entry:
2246
+
2247
+ Name | Type | Description | Example
2248
+ --- | --- | --- | ---
2249
+ payload | string | Base64-encoded content of the recorded media file if `remotePath` parameter is empty/null or an empty string otherwise. The resulting media is expected to a be a valid QuickTime movie (.mov). | `YXBwaXVt....`
2250
+
2251
+ ### mobile: simctl
2252
+
2253
+ Runs the given command as a subcommand of `xcrun simctl` against the device under test.
2254
+ Does not work for real devices.
2255
+
2256
+ #### Arguments
2257
+ Name | Type | Required | Description | Example
2258
+ --- | --- | --- | --- | ---
2259
+ command | string | yes | a subcommand for the `simctl`. Available commands are appinfo, boot, get_app_container, getenv, icloud_sync, install, install_app_data, io, keychain, launch, listapps, location, logverbose, openurl, pbcopy, pbpaste, privacy, push, shutdown, spawn, status_bar, terminate, ui, and uninstall. Please check each usage details with `xcrun simctl help`. | `'getenv'`
2260
+ args | array | no | array of string as arguments for the command after `<device>`. For example `getenv` subcommand accept `simctl getenv <device> <variable name>`. The `<device>` will be filled out automatically. This `args` should be the ` <variable name>` part only. | `['HOME']`
2261
+ timeout | number | no | Command timeout in milliseconds. If the command blocks for longer than this timeout then an exception is going to be thrown. The default timeout is `600000` ms. | `10000`
2262
+
2263
+ #### Returned Result
2264
+
2265
+ Name | Type | Description | Example
2266
+ --- | --- | --- | ---
2267
+ stdout | string | The standard output of the command. | `'/Users/user/Library/Developer/CoreSimulator/Devices/60EB8FDB-92E0-4895-B466-0153C6DE7BAE/data\n'`
2268
+ stderr | string | The standard error of the command. | `''` (an empty string)
2269
+ code | string | The status code of the command. | `0`