appium-mcp 0.0.1 → 1.1.5

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (589) hide show
  1. package/.github/workflows/ci.yml +37 -0
  2. package/.github/workflows/pr-title.yml +15 -0
  3. package/.github/workflows/publish.yml +31 -0
  4. package/.gitmodules +9 -0
  5. package/.prettierignore +29 -0
  6. package/.prettierrc +10 -0
  7. package/.releaserc +37 -0
  8. package/CHANGELOG.md +43 -0
  9. package/LICENSE +21 -0
  10. package/README.md +153 -0
  11. package/dist/devicemanager/adb-manager.d.ts +71 -0
  12. package/dist/devicemanager/adb-manager.js +140 -0
  13. package/dist/devicemanager/adb-manager.js.map +1 -0
  14. package/dist/devicemanager/ios-manager.d.ts +58 -0
  15. package/dist/devicemanager/ios-manager.js +122 -0
  16. package/dist/devicemanager/ios-manager.js.map +1 -0
  17. package/dist/index.d.ts +2 -0
  18. package/dist/index.js +40 -0
  19. package/dist/index.js.map +1 -0
  20. package/dist/locators/element-filter.d.ts +13 -0
  21. package/dist/locators/element-filter.js +79 -0
  22. package/dist/locators/element-filter.js.map +1 -0
  23. package/dist/locators/generate-all-locators.d.ts +21 -0
  24. package/dist/locators/generate-all-locators.js +72 -0
  25. package/dist/locators/generate-all-locators.js.map +1 -0
  26. package/dist/locators/locator-generation.d.ts +36 -0
  27. package/dist/locators/locator-generation.js +501 -0
  28. package/dist/locators/locator-generation.js.map +1 -0
  29. package/dist/locators/logger.d.ts +5 -0
  30. package/dist/locators/logger.js +9 -0
  31. package/dist/locators/logger.js.map +1 -0
  32. package/dist/locators/source-parsing.d.ts +43 -0
  33. package/dist/locators/source-parsing.js +100 -0
  34. package/dist/locators/source-parsing.js.map +1 -0
  35. package/dist/resources/index.d.ts +1 -0
  36. package/dist/resources/index.js +7 -0
  37. package/dist/resources/index.js.map +1 -0
  38. package/dist/resources/java/template.d.ts +4 -0
  39. package/dist/resources/java/template.js +82 -0
  40. package/dist/resources/java/template.js.map +1 -0
  41. package/dist/schema.d.ts +2 -0
  42. package/dist/schema.js +5 -0
  43. package/dist/schema.js.map +1 -0
  44. package/dist/scripts/simple-index-documentation.d.ts +20 -0
  45. package/dist/scripts/simple-index-documentation.js +77 -0
  46. package/dist/scripts/simple-index-documentation.js.map +1 -0
  47. package/dist/scripts/simple-query-documentation.d.ts +12 -0
  48. package/dist/scripts/simple-query-documentation.js +52 -0
  49. package/dist/scripts/simple-query-documentation.js.map +1 -0
  50. package/dist/server.d.ts +3 -0
  51. package/dist/server.js +37 -0
  52. package/dist/server.js.map +1 -0
  53. package/dist/tests/__mocks__/@appium/support.d.ts +21 -0
  54. package/dist/tests/__mocks__/@appium/support.js +30 -0
  55. package/dist/tests/__mocks__/@appium/support.js.map +1 -0
  56. package/dist/tests/generate-all-locators.test.d.ts +1 -0
  57. package/dist/tests/generate-all-locators.test.js +140 -0
  58. package/dist/tests/generate-all-locators.test.js.map +1 -0
  59. package/dist/tests/test-setup-wda.d.ts +1 -0
  60. package/dist/tests/test-setup-wda.js +202 -0
  61. package/dist/tests/test-setup-wda.js.map +1 -0
  62. package/dist/tools/answer-appium.d.ts +1 -0
  63. package/dist/tools/answer-appium.js +71 -0
  64. package/dist/tools/answer-appium.js.map +1 -0
  65. package/dist/tools/boot-simulator.d.ts +1 -0
  66. package/dist/tools/boot-simulator.js +71 -0
  67. package/dist/tools/boot-simulator.js.map +1 -0
  68. package/dist/tools/create-session.d.ts +1 -0
  69. package/dist/tools/create-session.js +192 -0
  70. package/dist/tools/create-session.js.map +1 -0
  71. package/dist/tools/delete-session.d.ts +1 -0
  72. package/dist/tools/delete-session.js +47 -0
  73. package/dist/tools/delete-session.js.map +1 -0
  74. package/dist/tools/documentation/index.d.ts +28 -0
  75. package/dist/tools/documentation/index.js +63 -0
  76. package/dist/tools/documentation/index.js.map +1 -0
  77. package/dist/tools/documentation/reasoning-rag.d.ts +88 -0
  78. package/dist/tools/documentation/reasoning-rag.js +281 -0
  79. package/dist/tools/documentation/reasoning-rag.js.map +1 -0
  80. package/dist/tools/documentation/sentence-transformers-embeddings.d.ts +34 -0
  81. package/dist/tools/documentation/sentence-transformers-embeddings.js +111 -0
  82. package/dist/tools/documentation/sentence-transformers-embeddings.js.map +1 -0
  83. package/dist/tools/documentation/simple-pdf-indexer.d.ts +45 -0
  84. package/dist/tools/documentation/simple-pdf-indexer.js +402 -0
  85. package/dist/tools/documentation/simple-pdf-indexer.js.map +1 -0
  86. package/dist/tools/documentation/uploads/documents.json +1 -0
  87. package/dist/tools/generate-tests.d.ts +2 -0
  88. package/dist/tools/generate-tests.js +46 -0
  89. package/dist/tools/generate-tests.js.map +1 -0
  90. package/dist/tools/index.d.ts +16 -0
  91. package/dist/tools/index.js +114 -0
  92. package/dist/tools/index.js.map +1 -0
  93. package/dist/tools/install-wda.d.ts +1 -0
  94. package/dist/tools/install-wda.js +219 -0
  95. package/dist/tools/install-wda.js.map +1 -0
  96. package/dist/tools/interactions/activate-app.d.ts +2 -0
  97. package/dist/tools/interactions/activate-app.js +44 -0
  98. package/dist/tools/interactions/activate-app.js.map +1 -0
  99. package/dist/tools/interactions/click.d.ts +2 -0
  100. package/dist/tools/interactions/click.js +45 -0
  101. package/dist/tools/interactions/click.js.map +1 -0
  102. package/dist/tools/interactions/double-tap.d.ts +2 -0
  103. package/dist/tools/interactions/double-tap.js +81 -0
  104. package/dist/tools/interactions/double-tap.js.map +1 -0
  105. package/dist/tools/interactions/find.d.ts +13 -0
  106. package/dist/tools/interactions/find.js +55 -0
  107. package/dist/tools/interactions/find.js.map +1 -0
  108. package/dist/tools/interactions/get-page-source.d.ts +2 -0
  109. package/dist/tools/interactions/get-page-source.js +48 -0
  110. package/dist/tools/interactions/get-page-source.js.map +1 -0
  111. package/dist/tools/interactions/get-text.d.ts +2 -0
  112. package/dist/tools/interactions/get-text.js +45 -0
  113. package/dist/tools/interactions/get-text.js.map +1 -0
  114. package/dist/tools/interactions/install-app.d.ts +2 -0
  115. package/dist/tools/interactions/install-app.js +43 -0
  116. package/dist/tools/interactions/install-app.js.map +1 -0
  117. package/dist/tools/interactions/list-apps.d.ts +2 -0
  118. package/dist/tools/interactions/list-apps.js +59 -0
  119. package/dist/tools/interactions/list-apps.js.map +1 -0
  120. package/dist/tools/interactions/screenshot.d.ts +2 -0
  121. package/dist/tools/interactions/screenshot.js +49 -0
  122. package/dist/tools/interactions/screenshot.js.map +1 -0
  123. package/dist/tools/interactions/set-value.d.ts +2 -0
  124. package/dist/tools/interactions/set-value.js +46 -0
  125. package/dist/tools/interactions/set-value.js.map +1 -0
  126. package/dist/tools/interactions/terminate-app.d.ts +2 -0
  127. package/dist/tools/interactions/terminate-app.js +45 -0
  128. package/dist/tools/interactions/terminate-app.js.map +1 -0
  129. package/dist/tools/interactions/uninstall-app.d.ts +2 -0
  130. package/dist/tools/interactions/uninstall-app.js +45 -0
  131. package/dist/tools/interactions/uninstall-app.js.map +1 -0
  132. package/dist/tools/locators.d.ts +1 -0
  133. package/dist/tools/locators.js +71 -0
  134. package/dist/tools/locators.js.map +1 -0
  135. package/dist/tools/scroll-to-element.d.ts +1 -0
  136. package/dist/tools/scroll-to-element.js +155 -0
  137. package/dist/tools/scroll-to-element.js.map +1 -0
  138. package/dist/tools/scroll.d.ts +1 -0
  139. package/dist/tools/scroll.js +91 -0
  140. package/dist/tools/scroll.js.map +1 -0
  141. package/dist/tools/select-device.d.ts +5 -0
  142. package/dist/tools/select-device.js +222 -0
  143. package/dist/tools/select-device.js.map +1 -0
  144. package/dist/tools/select-platform.d.ts +1 -0
  145. package/dist/tools/select-platform.js +195 -0
  146. package/dist/tools/select-platform.js.map +1 -0
  147. package/dist/tools/session-store.d.ts +7 -0
  148. package/dist/tools/session-store.js +64 -0
  149. package/dist/tools/session-store.js.map +1 -0
  150. package/dist/tools/setup-wda.d.ts +1 -0
  151. package/dist/tools/setup-wda.js +177 -0
  152. package/dist/tools/setup-wda.js.map +1 -0
  153. package/docs/CONTRIBUTING.md +424 -0
  154. package/eslint.config.js +49 -0
  155. package/examples/android-gmail.md +7 -0
  156. package/examples/android-todo-app.md +9 -0
  157. package/jest.config.js +23 -0
  158. package/package.json +71 -6
  159. package/scripts/setup-submodules-sparse.sh +53 -0
  160. package/scripts/update-submodules.sh +14 -0
  161. package/src/devicemanager/adb-manager.ts +164 -0
  162. package/src/devicemanager/ios-manager.ts +145 -0
  163. package/src/index.ts +47 -0
  164. package/src/locators/element-filter.ts +134 -0
  165. package/src/locators/generate-all-locators.ts +149 -0
  166. package/src/locators/locator-generation.ts +657 -0
  167. package/src/locators/logger.ts +11 -0
  168. package/src/locators/source-parsing.ts +149 -0
  169. package/src/resources/caps.json +697 -0
  170. package/src/resources/index.ts +7 -0
  171. package/src/resources/java/template.ts +83 -0
  172. package/src/resources/submodules/appium/.github/PULL_REQUEST_TEMPLATE.md +28 -0
  173. package/src/resources/submodules/appium/CHANGELOG.md +45 -0
  174. package/src/resources/submodules/appium/CONDUCT.md +48 -0
  175. package/src/resources/submodules/appium/GOVERNANCE.md +185 -0
  176. package/src/resources/submodules/appium/IDEAS.md +16 -0
  177. package/src/resources/submodules/appium/README.md +221 -0
  178. package/src/resources/submodules/appium/ROADMAP.md +30 -0
  179. package/src/resources/submodules/appium/SPONSORS.md +3 -0
  180. package/src/resources/submodules/appium/docs/README.md +6 -0
  181. package/src/resources/submodules/appium/docs/payout.md +35 -0
  182. package/src/resources/submodules/appium/packages/appium/CHANGELOG.md +1437 -0
  183. package/src/resources/submodules/appium/packages/appium/README.md +221 -0
  184. package/src/resources/submodules/appium/packages/appium/docs/en/blog/index.md +2 -0
  185. package/src/resources/submodules/appium/packages/appium/docs/en/blog/posts/announcing-appiumconf2024.md +45 -0
  186. package/src/resources/submodules/appium/packages/appium/docs/en/blog/posts/announcing-browserstack-as-strategic-partner.md +46 -0
  187. package/src/resources/submodules/appium/packages/appium/docs/en/blog/posts/announcing-headspin-as-development-partner.md +47 -0
  188. package/src/resources/submodules/appium/packages/appium/docs/en/blog/posts/announcing-lambdatest-as-strategic-partner.md +42 -0
  189. package/src/resources/submodules/appium/packages/appium/docs/en/blog/posts/announcing-sauce-labs-as-strategic-partner.md +36 -0
  190. package/src/resources/submodules/appium/packages/appium/docs/en/blog/posts/announcing-sponsorship-program.md +48 -0
  191. package/src/resources/submodules/appium/packages/appium/docs/en/blog/posts/appium3.md +40 -0
  192. package/src/resources/submodules/appium/packages/appium/docs/en/blog/posts/hello-world.md +15 -0
  193. package/src/resources/submodules/appium/packages/appium/docs/en/contributing/index.md +150 -0
  194. package/src/resources/submodules/appium/packages/appium/docs/en/developing/build-docs.md +86 -0
  195. package/src/resources/submodules/appium/packages/appium/docs/en/developing/build-doctor-checks.md +141 -0
  196. package/src/resources/submodules/appium/packages/appium/docs/en/developing/build-drivers.md +860 -0
  197. package/src/resources/submodules/appium/packages/appium/docs/en/developing/build-plugins.md +514 -0
  198. package/src/resources/submodules/appium/packages/appium/docs/en/developing/config-system.md +451 -0
  199. package/src/resources/submodules/appium/packages/appium/docs/en/developing/index.md +18 -0
  200. package/src/resources/submodules/appium/packages/appium/docs/en/developing/sensitive.md +49 -0
  201. package/src/resources/submodules/appium/packages/appium/docs/en/ecosystem/clients.md +132 -0
  202. package/src/resources/submodules/appium/packages/appium/docs/en/ecosystem/drivers.md +207 -0
  203. package/src/resources/submodules/appium/packages/appium/docs/en/ecosystem/index.md +45 -0
  204. package/src/resources/submodules/appium/packages/appium/docs/en/ecosystem/plugins.md +138 -0
  205. package/src/resources/submodules/appium/packages/appium/docs/en/ecosystem/tools.md +83 -0
  206. package/src/resources/submodules/appium/packages/appium/docs/en/guides/branch-testing.md +57 -0
  207. package/src/resources/submodules/appium/packages/appium/docs/en/guides/caching.md +76 -0
  208. package/src/resources/submodules/appium/packages/appium/docs/en/guides/caps.md +275 -0
  209. package/src/resources/submodules/appium/packages/appium/docs/en/guides/config.md +98 -0
  210. package/src/resources/submodules/appium/packages/appium/docs/en/guides/context.md +44 -0
  211. package/src/resources/submodules/appium/packages/appium/docs/en/guides/event-timing.md +73 -0
  212. package/src/resources/submodules/appium/packages/appium/docs/en/guides/execute-methods.md +122 -0
  213. package/src/resources/submodules/appium/packages/appium/docs/en/guides/grid.md +166 -0
  214. package/src/resources/submodules/appium/packages/appium/docs/en/guides/headers.md +17 -0
  215. package/src/resources/submodules/appium/packages/appium/docs/en/guides/log-filters.md +86 -0
  216. package/src/resources/submodules/appium/packages/appium/docs/en/guides/managing-exts.md +87 -0
  217. package/src/resources/submodules/appium/packages/appium/docs/en/guides/migrating-1-to-2.md +368 -0
  218. package/src/resources/submodules/appium/packages/appium/docs/en/guides/migrating-2-to-3.md +464 -0
  219. package/src/resources/submodules/appium/packages/appium/docs/en/guides/security.md +89 -0
  220. package/src/resources/submodules/appium/packages/appium/docs/en/guides/settings.md +68 -0
  221. package/src/resources/submodules/appium/packages/appium/docs/en/guides/tls.md +42 -0
  222. package/src/resources/submodules/appium/packages/appium/docs/en/index.md +59 -0
  223. package/src/resources/submodules/appium/packages/appium/docs/en/intro/appium.md +202 -0
  224. package/src/resources/submodules/appium/packages/appium/docs/en/intro/clients.md +127 -0
  225. package/src/resources/submodules/appium/packages/appium/docs/en/intro/drivers.md +188 -0
  226. package/src/resources/submodules/appium/packages/appium/docs/en/intro/history.md +196 -0
  227. package/src/resources/submodules/appium/packages/appium/docs/en/intro/index.md +39 -0
  228. package/src/resources/submodules/appium/packages/appium/docs/en/quickstart/index.md +29 -0
  229. package/src/resources/submodules/appium/packages/appium/docs/en/quickstart/install.md +50 -0
  230. package/src/resources/submodules/appium/packages/appium/docs/en/quickstart/next-steps.md +23 -0
  231. package/src/resources/submodules/appium/packages/appium/docs/en/quickstart/requirements.md +29 -0
  232. package/src/resources/submodules/appium/packages/appium/docs/en/quickstart/test-dotnet.md +105 -0
  233. package/src/resources/submodules/appium/packages/appium/docs/en/quickstart/test-java.md +23 -0
  234. package/src/resources/submodules/appium/packages/appium/docs/en/quickstart/test-js.md +75 -0
  235. package/src/resources/submodules/appium/packages/appium/docs/en/quickstart/test-py.md +60 -0
  236. package/src/resources/submodules/appium/packages/appium/docs/en/quickstart/test-rb.md +83 -0
  237. package/src/resources/submodules/appium/packages/appium/docs/en/quickstart/uiauto2-driver.md +144 -0
  238. package/src/resources/submodules/appium/packages/appium/docs/en/reference/api/appium.md +394 -0
  239. package/src/resources/submodules/appium/packages/appium/docs/en/reference/api/bidi.md +70 -0
  240. package/src/resources/submodules/appium/packages/appium/docs/en/reference/api/index.md +30 -0
  241. package/src/resources/submodules/appium/packages/appium/docs/en/reference/api/jsonwp.md +214 -0
  242. package/src/resources/submodules/appium/packages/appium/docs/en/reference/api/mjsonwp.md +151 -0
  243. package/src/resources/submodules/appium/packages/appium/docs/en/reference/api/others.md +671 -0
  244. package/src/resources/submodules/appium/packages/appium/docs/en/reference/api/plugins.md +289 -0
  245. package/src/resources/submodules/appium/packages/appium/docs/en/reference/api/webdriver.md +1114 -0
  246. package/src/resources/submodules/appium/packages/appium/docs/en/reference/cli/env-vars.md +31 -0
  247. package/src/resources/submodules/appium/packages/appium/docs/en/reference/cli/extensions.md +239 -0
  248. package/src/resources/submodules/appium/packages/appium/docs/en/reference/cli/index.md +35 -0
  249. package/src/resources/submodules/appium/packages/appium/docs/en/reference/cli/server.md +76 -0
  250. package/src/resources/submodules/appium/packages/appium/docs/en/reference/cli/setup.md +76 -0
  251. package/src/resources/submodules/appium/packages/appium/docs/en/reference/index.md +25 -0
  252. package/src/resources/submodules/appium/packages/appium/docs/en/resources/index.md +28 -0
  253. package/src/resources/submodules/appium/packages/appium/docs/en/sponsors/index.md +64 -0
  254. package/src/resources/submodules/appium/packages/appium/docs/ja/blog/index.md +2 -0
  255. package/src/resources/submodules/appium/packages/appium/docs/ja/blog/posts/announcing-appiumconf2024.md +45 -0
  256. package/src/resources/submodules/appium/packages/appium/docs/ja/blog/posts/announcing-browserstack-as-strategic-partner.md +46 -0
  257. package/src/resources/submodules/appium/packages/appium/docs/ja/blog/posts/announcing-headspin-as-development-partner.md +47 -0
  258. package/src/resources/submodules/appium/packages/appium/docs/ja/blog/posts/announcing-lambdatest-as-strategic-partner.md +41 -0
  259. package/src/resources/submodules/appium/packages/appium/docs/ja/blog/posts/announcing-sauce-labs-as-strategic-partner.md +36 -0
  260. package/src/resources/submodules/appium/packages/appium/docs/ja/blog/posts/announcing-sponsorship-program.md +48 -0
  261. package/src/resources/submodules/appium/packages/appium/docs/ja/blog/posts/appium3.md +40 -0
  262. package/src/resources/submodules/appium/packages/appium/docs/ja/blog/posts/hello-world.md +15 -0
  263. package/src/resources/submodules/appium/packages/appium/docs/ja/contributing/index.md +158 -0
  264. package/src/resources/submodules/appium/packages/appium/docs/ja/developing/build-docs.md +86 -0
  265. package/src/resources/submodules/appium/packages/appium/docs/ja/developing/build-doctor-checks.md +141 -0
  266. package/src/resources/submodules/appium/packages/appium/docs/ja/developing/build-drivers.md +866 -0
  267. package/src/resources/submodules/appium/packages/appium/docs/ja/developing/build-plugins.md +520 -0
  268. package/src/resources/submodules/appium/packages/appium/docs/ja/developing/config-system.md +468 -0
  269. package/src/resources/submodules/appium/packages/appium/docs/ja/developing/index.md +18 -0
  270. package/src/resources/submodules/appium/packages/appium/docs/ja/developing/sensitive.md +49 -0
  271. package/src/resources/submodules/appium/packages/appium/docs/ja/ecosystem/clients.md +143 -0
  272. package/src/resources/submodules/appium/packages/appium/docs/ja/ecosystem/drivers.md +219 -0
  273. package/src/resources/submodules/appium/packages/appium/docs/ja/ecosystem/index.md +45 -0
  274. package/src/resources/submodules/appium/packages/appium/docs/ja/ecosystem/plugins.md +140 -0
  275. package/src/resources/submodules/appium/packages/appium/docs/ja/ecosystem/tools.md +87 -0
  276. package/src/resources/submodules/appium/packages/appium/docs/ja/guides/branch-testing.md +57 -0
  277. package/src/resources/submodules/appium/packages/appium/docs/ja/guides/caching.md +78 -0
  278. package/src/resources/submodules/appium/packages/appium/docs/ja/guides/caps.md +259 -0
  279. package/src/resources/submodules/appium/packages/appium/docs/ja/guides/config.md +102 -0
  280. package/src/resources/submodules/appium/packages/appium/docs/ja/guides/context.md +44 -0
  281. package/src/resources/submodules/appium/packages/appium/docs/ja/guides/event-timing.md +75 -0
  282. package/src/resources/submodules/appium/packages/appium/docs/ja/guides/execute-methods.md +142 -0
  283. package/src/resources/submodules/appium/packages/appium/docs/ja/guides/grid.md +166 -0
  284. package/src/resources/submodules/appium/packages/appium/docs/ja/guides/headers.md +17 -0
  285. package/src/resources/submodules/appium/packages/appium/docs/ja/guides/log-filters.md +86 -0
  286. package/src/resources/submodules/appium/packages/appium/docs/ja/guides/managing-exts.md +89 -0
  287. package/src/resources/submodules/appium/packages/appium/docs/ja/guides/migrating-1-to-2.md +402 -0
  288. package/src/resources/submodules/appium/packages/appium/docs/ja/guides/migrating-2-to-3.md +458 -0
  289. package/src/resources/submodules/appium/packages/appium/docs/ja/guides/security.md +89 -0
  290. package/src/resources/submodules/appium/packages/appium/docs/ja/guides/settings.md +70 -0
  291. package/src/resources/submodules/appium/packages/appium/docs/ja/guides/tls.md +43 -0
  292. package/src/resources/submodules/appium/packages/appium/docs/ja/index.md +55 -0
  293. package/src/resources/submodules/appium/packages/appium/docs/ja/intro/appium.md +191 -0
  294. package/src/resources/submodules/appium/packages/appium/docs/ja/intro/clients.md +139 -0
  295. package/src/resources/submodules/appium/packages/appium/docs/ja/intro/drivers.md +188 -0
  296. package/src/resources/submodules/appium/packages/appium/docs/ja/intro/history.md +196 -0
  297. package/src/resources/submodules/appium/packages/appium/docs/ja/intro/index.md +39 -0
  298. package/src/resources/submodules/appium/packages/appium/docs/ja/quickstart/index.md +23 -0
  299. package/src/resources/submodules/appium/packages/appium/docs/ja/quickstart/install.md +47 -0
  300. package/src/resources/submodules/appium/packages/appium/docs/ja/quickstart/next-steps.md +19 -0
  301. package/src/resources/submodules/appium/packages/appium/docs/ja/quickstart/requirements.md +29 -0
  302. package/src/resources/submodules/appium/packages/appium/docs/ja/quickstart/test-dotnet.md +107 -0
  303. package/src/resources/submodules/appium/packages/appium/docs/ja/quickstart/test-java.md +23 -0
  304. package/src/resources/submodules/appium/packages/appium/docs/ja/quickstart/test-js.md +77 -0
  305. package/src/resources/submodules/appium/packages/appium/docs/ja/quickstart/test-py.md +63 -0
  306. package/src/resources/submodules/appium/packages/appium/docs/ja/quickstart/test-rb.md +85 -0
  307. package/src/resources/submodules/appium/packages/appium/docs/ja/quickstart/uiauto2-driver.md +148 -0
  308. package/src/resources/submodules/appium/packages/appium/docs/ja/reference/api/appium.md +395 -0
  309. package/src/resources/submodules/appium/packages/appium/docs/ja/reference/api/bidi.md +71 -0
  310. package/src/resources/submodules/appium/packages/appium/docs/ja/reference/api/index.md +30 -0
  311. package/src/resources/submodules/appium/packages/appium/docs/ja/reference/api/jsonwp.md +215 -0
  312. package/src/resources/submodules/appium/packages/appium/docs/ja/reference/api/mjsonwp.md +152 -0
  313. package/src/resources/submodules/appium/packages/appium/docs/ja/reference/api/others.md +672 -0
  314. package/src/resources/submodules/appium/packages/appium/docs/ja/reference/api/plugins.md +291 -0
  315. package/src/resources/submodules/appium/packages/appium/docs/ja/reference/api/webdriver.md +1114 -0
  316. package/src/resources/submodules/appium/packages/appium/docs/ja/reference/cli/env-vars.md +31 -0
  317. package/src/resources/submodules/appium/packages/appium/docs/ja/reference/cli/extensions.md +240 -0
  318. package/src/resources/submodules/appium/packages/appium/docs/ja/reference/cli/index.md +35 -0
  319. package/src/resources/submodules/appium/packages/appium/docs/ja/reference/cli/server.md +76 -0
  320. package/src/resources/submodules/appium/packages/appium/docs/ja/reference/cli/setup.md +78 -0
  321. package/src/resources/submodules/appium/packages/appium/docs/ja/reference/index.md +25 -0
  322. package/src/resources/submodules/appium/packages/appium/docs/ja/resources/index.md +28 -0
  323. package/src/resources/submodules/appium/packages/appium/docs/ja/sponsors/index.md +61 -0
  324. package/src/resources/submodules/appium/packages/appium/docs/overrides/assets/images/appium-logo-horiz-white.png +0 -0
  325. package/src/resources/submodules/appium/packages/appium/docs/overrides/assets/images/appium-logo-horiz.png +0 -0
  326. package/src/resources/submodules/appium/packages/appium/docs/overrides/assets/images/appium-logo-white.png +0 -0
  327. package/src/resources/submodules/appium/packages/appium/docs/overrides/assets/images/appium-logo.png +0 -0
  328. package/src/resources/submodules/appium/packages/appium/docs/overrides/assets/images/sponsor-logo-browserstack-dark.png +0 -0
  329. package/src/resources/submodules/appium/packages/appium/docs/overrides/assets/images/sponsor-logo-browserstack-light.png +0 -0
  330. package/src/resources/submodules/appium/packages/appium/docs/overrides/assets/images/sponsor-logo-lambdatest-dark.png +0 -0
  331. package/src/resources/submodules/appium/packages/appium/docs/overrides/assets/images/sponsor-logo-lambdatest-light.png +0 -0
  332. package/src/resources/submodules/appium/packages/appium/docs/overrides/assets/images/sponsor-logo-sauce.png +0 -0
  333. package/src/resources/submodules/appium/packages/appium/docs/zh/blog/index.md +2 -0
  334. package/src/resources/submodules/appium/packages/appium/docs/zh/blog/posts/announcing-appiumconf2024.md +45 -0
  335. package/src/resources/submodules/appium/packages/appium/docs/zh/blog/posts/announcing-browserstack-as-strategic-partner.md +46 -0
  336. package/src/resources/submodules/appium/packages/appium/docs/zh/blog/posts/announcing-headspin-as-development-partner.md +47 -0
  337. package/src/resources/submodules/appium/packages/appium/docs/zh/blog/posts/announcing-lambdatest-as-strategic-partner.md +41 -0
  338. package/src/resources/submodules/appium/packages/appium/docs/zh/blog/posts/announcing-sauce-labs-as-strategic-partner.md +36 -0
  339. package/src/resources/submodules/appium/packages/appium/docs/zh/blog/posts/announcing-sponsorship-program.md +48 -0
  340. package/src/resources/submodules/appium/packages/appium/docs/zh/blog/posts/appium3.md +40 -0
  341. package/src/resources/submodules/appium/packages/appium/docs/zh/blog/posts/hello-world.md +15 -0
  342. package/src/resources/submodules/appium/packages/appium/docs/zh/contributing/index.md +132 -0
  343. package/src/resources/submodules/appium/packages/appium/docs/zh/developing/build-docs.md +86 -0
  344. package/src/resources/submodules/appium/packages/appium/docs/zh/developing/build-doctor-checks.md +141 -0
  345. package/src/resources/submodules/appium/packages/appium/docs/zh/developing/build-drivers.md +866 -0
  346. package/src/resources/submodules/appium/packages/appium/docs/zh/developing/build-plugins.md +520 -0
  347. package/src/resources/submodules/appium/packages/appium/docs/zh/developing/config-system.md +468 -0
  348. package/src/resources/submodules/appium/packages/appium/docs/zh/developing/index.md +18 -0
  349. package/src/resources/submodules/appium/packages/appium/docs/zh/developing/sensitive.md +49 -0
  350. package/src/resources/submodules/appium/packages/appium/docs/zh/ecosystem/clients.md +143 -0
  351. package/src/resources/submodules/appium/packages/appium/docs/zh/ecosystem/drivers.md +219 -0
  352. package/src/resources/submodules/appium/packages/appium/docs/zh/ecosystem/index.md +45 -0
  353. package/src/resources/submodules/appium/packages/appium/docs/zh/ecosystem/plugins.md +140 -0
  354. package/src/resources/submodules/appium/packages/appium/docs/zh/ecosystem/tools.md +87 -0
  355. package/src/resources/submodules/appium/packages/appium/docs/zh/guides/branch-testing.md +57 -0
  356. package/src/resources/submodules/appium/packages/appium/docs/zh/guides/caching.md +78 -0
  357. package/src/resources/submodules/appium/packages/appium/docs/zh/guides/caps.md +284 -0
  358. package/src/resources/submodules/appium/packages/appium/docs/zh/guides/config.md +102 -0
  359. package/src/resources/submodules/appium/packages/appium/docs/zh/guides/context.md +44 -0
  360. package/src/resources/submodules/appium/packages/appium/docs/zh/guides/event-timing.md +75 -0
  361. package/src/resources/submodules/appium/packages/appium/docs/zh/guides/execute-methods.md +142 -0
  362. package/src/resources/submodules/appium/packages/appium/docs/zh/guides/grid.md +166 -0
  363. package/src/resources/submodules/appium/packages/appium/docs/zh/guides/headers.md +17 -0
  364. package/src/resources/submodules/appium/packages/appium/docs/zh/guides/log-filters.md +86 -0
  365. package/src/resources/submodules/appium/packages/appium/docs/zh/guides/managing-exts.md +89 -0
  366. package/src/resources/submodules/appium/packages/appium/docs/zh/guides/migrating-1-to-2.md +410 -0
  367. package/src/resources/submodules/appium/packages/appium/docs/zh/guides/migrating-2-to-3.md +459 -0
  368. package/src/resources/submodules/appium/packages/appium/docs/zh/guides/security.md +89 -0
  369. package/src/resources/submodules/appium/packages/appium/docs/zh/guides/settings.md +70 -0
  370. package/src/resources/submodules/appium/packages/appium/docs/zh/guides/tls.md +43 -0
  371. package/src/resources/submodules/appium/packages/appium/docs/zh/index.md +54 -0
  372. package/src/resources/submodules/appium/packages/appium/docs/zh/intro/appium.md +200 -0
  373. package/src/resources/submodules/appium/packages/appium/docs/zh/intro/clients.md +139 -0
  374. package/src/resources/submodules/appium/packages/appium/docs/zh/intro/drivers.md +188 -0
  375. package/src/resources/submodules/appium/packages/appium/docs/zh/intro/history.md +196 -0
  376. package/src/resources/submodules/appium/packages/appium/docs/zh/intro/index.md +39 -0
  377. package/src/resources/submodules/appium/packages/appium/docs/zh/quickstart/index.md +23 -0
  378. package/src/resources/submodules/appium/packages/appium/docs/zh/quickstart/install.md +47 -0
  379. package/src/resources/submodules/appium/packages/appium/docs/zh/quickstart/next-steps.md +19 -0
  380. package/src/resources/submodules/appium/packages/appium/docs/zh/quickstart/requirements.md +21 -0
  381. package/src/resources/submodules/appium/packages/appium/docs/zh/quickstart/test-dotnet.md +99 -0
  382. package/src/resources/submodules/appium/packages/appium/docs/zh/quickstart/test-java.md +20 -0
  383. package/src/resources/submodules/appium/packages/appium/docs/zh/quickstart/test-js.md +62 -0
  384. package/src/resources/submodules/appium/packages/appium/docs/zh/quickstart/test-py.md +57 -0
  385. package/src/resources/submodules/appium/packages/appium/docs/zh/quickstart/test-rb.md +80 -0
  386. package/src/resources/submodules/appium/packages/appium/docs/zh/quickstart/uiauto2-driver.md +148 -0
  387. package/src/resources/submodules/appium/packages/appium/docs/zh/reference/api/appium.md +395 -0
  388. package/src/resources/submodules/appium/packages/appium/docs/zh/reference/api/bidi.md +71 -0
  389. package/src/resources/submodules/appium/packages/appium/docs/zh/reference/api/index.md +30 -0
  390. package/src/resources/submodules/appium/packages/appium/docs/zh/reference/api/jsonwp.md +215 -0
  391. package/src/resources/submodules/appium/packages/appium/docs/zh/reference/api/mjsonwp.md +152 -0
  392. package/src/resources/submodules/appium/packages/appium/docs/zh/reference/api/others.md +672 -0
  393. package/src/resources/submodules/appium/packages/appium/docs/zh/reference/api/plugins.md +291 -0
  394. package/src/resources/submodules/appium/packages/appium/docs/zh/reference/api/webdriver.md +1114 -0
  395. package/src/resources/submodules/appium/packages/appium/docs/zh/reference/cli/env-vars.md +31 -0
  396. package/src/resources/submodules/appium/packages/appium/docs/zh/reference/cli/extensions.md +240 -0
  397. package/src/resources/submodules/appium/packages/appium/docs/zh/reference/cli/index.md +35 -0
  398. package/src/resources/submodules/appium/packages/appium/docs/zh/reference/cli/server.md +76 -0
  399. package/src/resources/submodules/appium/packages/appium/docs/zh/reference/cli/setup.md +78 -0
  400. package/src/resources/submodules/appium/packages/appium/docs/zh/reference/index.md +25 -0
  401. package/src/resources/submodules/appium/packages/appium/docs/zh/resources/index.md +28 -0
  402. package/src/resources/submodules/appium/packages/appium/docs/zh/sponsors/index.md +61 -0
  403. package/src/resources/submodules/appium/packages/appium/types/manifest/README.md +30 -0
  404. package/src/resources/submodules/appium/packages/base-driver/CHANGELOG.md +1131 -0
  405. package/src/resources/submodules/appium/packages/base-driver/README.md +15 -0
  406. package/src/resources/submodules/appium/packages/base-driver/docs/mjsonwp/errors.md +82 -0
  407. package/src/resources/submodules/appium/packages/base-driver/docs/mjsonwp/protocol-methods.md +182 -0
  408. package/src/resources/submodules/appium/packages/base-driver/static/appium.png +0 -0
  409. package/src/resources/submodules/appium/packages/base-plugin/CHANGELOG.md +672 -0
  410. package/src/resources/submodules/appium/packages/base-plugin/README.md +15 -0
  411. package/src/resources/submodules/appium/packages/docutils/CHANGELOG.md +948 -0
  412. package/src/resources/submodules/appium/packages/docutils/README.md +27 -0
  413. package/src/resources/submodules/appium/packages/driver-test-support/CHANGELOG.md +717 -0
  414. package/src/resources/submodules/appium/packages/driver-test-support/README.md +112 -0
  415. package/src/resources/submodules/appium/packages/eslint-config-appium-ts/CHANGELOG.md +168 -0
  416. package/src/resources/submodules/appium/packages/eslint-config-appium-ts/README.md +33 -0
  417. package/src/resources/submodules/appium/packages/execute-driver-plugin/CHANGELOG.md +603 -0
  418. package/src/resources/submodules/appium/packages/execute-driver-plugin/README.md +42 -0
  419. package/src/resources/submodules/appium/packages/fake-driver/CHANGELOG.md +545 -0
  420. package/src/resources/submodules/appium/packages/fake-driver/README.md +7 -0
  421. package/src/resources/submodules/appium/packages/fake-driver/lib/screen.png +0 -0
  422. package/src/resources/submodules/appium/packages/fake-plugin/CHANGELOG.md +683 -0
  423. package/src/resources/submodules/appium/packages/fake-plugin/README.md +7 -0
  424. package/src/resources/submodules/appium/packages/images-plugin/CHANGELOG.md +602 -0
  425. package/src/resources/submodules/appium/packages/images-plugin/README.md +27 -0
  426. package/src/resources/submodules/appium/packages/images-plugin/docs/find-by-image.md +65 -0
  427. package/src/resources/submodules/appium/packages/images-plugin/docs/image-comparison.md +203 -0
  428. package/src/resources/submodules/appium/packages/images-plugin/test/fixtures/appstore.png +0 -0
  429. package/src/resources/submodules/appium/packages/images-plugin/test/fixtures/img1.png +0 -0
  430. package/src/resources/submodules/appium/packages/images-plugin/test/fixtures/img2.png +0 -0
  431. package/src/resources/submodules/appium/packages/images-plugin/test/fixtures/img2_part.png +0 -0
  432. package/src/resources/submodules/appium/packages/logger/CHANGELOG.md +162 -0
  433. package/src/resources/submodules/appium/packages/logger/README.md +31 -0
  434. package/src/resources/submodules/appium/packages/opencv/CHANGELOG.md +384 -0
  435. package/src/resources/submodules/appium/packages/opencv/README.md +68 -0
  436. package/src/resources/submodules/appium/packages/opencv/test/e2e/images/appium-diagram.jpg +0 -0
  437. package/src/resources/submodules/appium/packages/opencv/test/e2e/images/cc1.png +0 -0
  438. package/src/resources/submodules/appium/packages/opencv/test/e2e/images/cc2.png +0 -0
  439. package/src/resources/submodules/appium/packages/opencv/test/e2e/images/cc_rotated.png +0 -0
  440. package/src/resources/submodules/appium/packages/opencv/test/e2e/images/findwaldo.jpg +0 -0
  441. package/src/resources/submodules/appium/packages/opencv/test/e2e/images/number5.png +0 -0
  442. package/src/resources/submodules/appium/packages/opencv/test/e2e/images/waldo.jpg +0 -0
  443. package/src/resources/submodules/appium/packages/plugin-test-support/CHANGELOG.md +539 -0
  444. package/src/resources/submodules/appium/packages/plugin-test-support/README.md +49 -0
  445. package/src/resources/submodules/appium/packages/relaxed-caps-plugin/CHANGELOG.md +154 -0
  446. package/src/resources/submodules/appium/packages/relaxed-caps-plugin/README.md +35 -0
  447. package/src/resources/submodules/appium/packages/schema/CHANGELOG.md +271 -0
  448. package/src/resources/submodules/appium/packages/schema/README.md +50 -0
  449. package/src/resources/submodules/appium/packages/storage-plugin/CHANGELOG.md +73 -0
  450. package/src/resources/submodules/appium/packages/storage-plugin/README.md +83 -0
  451. package/src/resources/submodules/appium/packages/strongbox/CHANGELOG.md +94 -0
  452. package/src/resources/submodules/appium/packages/strongbox/README.md +96 -0
  453. package/src/resources/submodules/appium/packages/support/CHANGELOG.md +1054 -0
  454. package/src/resources/submodules/appium/packages/support/README.md +161 -0
  455. package/src/resources/submodules/appium/packages/test-support/CHANGELOG.md +712 -0
  456. package/src/resources/submodules/appium/packages/test-support/README.md +61 -0
  457. package/src/resources/submodules/appium/packages/tsconfig/CHANGELOG.md +131 -0
  458. package/src/resources/submodules/appium/packages/tsconfig/README.md +19 -0
  459. package/src/resources/submodules/appium/packages/types/CHANGELOG.md +793 -0
  460. package/src/resources/submodules/appium/packages/types/README.md +21 -0
  461. package/src/resources/submodules/appium/packages/universal-xml-plugin/CHANGELOG.md +435 -0
  462. package/src/resources/submodules/appium/packages/universal-xml-plugin/README.md +53 -0
  463. package/src/resources/submodules/appium/renovate/README.md +63 -0
  464. package/src/resources/submodules/appium-uiautomator2-driver/CHANGELOG.md +1204 -0
  465. package/src/resources/submodules/appium-uiautomator2-driver/README.md +2077 -0
  466. package/src/resources/submodules/appium-uiautomator2-driver/docs/actions.md +72 -0
  467. package/src/resources/submodules/appium-uiautomator2-driver/docs/activity-startup.md +47 -0
  468. package/src/resources/submodules/appium-uiautomator2-driver/docs/android-appbundle.md +69 -0
  469. package/src/resources/submodules/appium-uiautomator2-driver/docs/android-mobile-gestures.md +352 -0
  470. package/src/resources/submodules/appium-uiautomator2-driver/docs/bidi.md +50 -0
  471. package/src/resources/submodules/appium-uiautomator2-driver/docs/capability-sets.md +136 -0
  472. package/src/resources/submodules/appium-uiautomator2-driver/docs/scheduled-actions.md +155 -0
  473. package/src/resources/submodules/appium-uiautomator2-driver/docs/uiautomator-uiselector.md +51 -0
  474. package/src/resources/submodules/appium-uiautomator2-driver/docs/unlock/main.md +95 -0
  475. package/src/resources/submodules/appium-uiautomator2-driver/docs/unlock/screen1.png +0 -0
  476. package/src/resources/submodules/appium-uiautomator2-driver/docs/unlock/screen2.png +0 -0
  477. package/src/resources/submodules/appium-uiautomator2-driver/test/functional/assets/checkered-squares.png +0 -0
  478. package/src/resources/submodules/appium-uiautomator2-driver/test/functional/assets/start-button.png +0 -0
  479. package/src/resources/submodules/appium-uiautomator2-driver/test/functional/assets/stop-button.png +0 -0
  480. package/src/resources/submodules/appium-xcuitest-driver/.github/ISSUE_TEMPLATE.md +4 -0
  481. package/src/resources/submodules/appium-xcuitest-driver/CHANGELOG.md +2594 -0
  482. package/src/resources/submodules/appium-xcuitest-driver/README.md +55 -0
  483. package/src/resources/submodules/appium-xcuitest-driver/docs/assets/images/appium-logo-white.png +0 -0
  484. package/src/resources/submodules/appium-xcuitest-driver/docs/assets/images/appium-logo.png +0 -0
  485. package/src/resources/submodules/appium-xcuitest-driver/docs/assets/images/appium-plus-xctest.png +0 -0
  486. package/src/resources/submodules/appium-xcuitest-driver/docs/contributing.md +45 -0
  487. package/src/resources/submodules/appium-xcuitest-driver/docs/endpoints-wda.md +61 -0
  488. package/src/resources/submodules/appium-xcuitest-driver/docs/endpoints.md +98 -0
  489. package/src/resources/submodules/appium-xcuitest-driver/docs/guides/assets/images/ios-xctest-file-movement/keynote.png +0 -0
  490. package/src/resources/submodules/appium-xcuitest-driver/docs/guides/assets/images/ios-xctest-file-movement/on_my_iphone.png +0 -0
  491. package/src/resources/submodules/appium-xcuitest-driver/docs/guides/assets/images/ios-xctest-file-movement/top_files.png +0 -0
  492. package/src/resources/submodules/appium-xcuitest-driver/docs/guides/attach-to-running-wda.md +43 -0
  493. package/src/resources/submodules/appium-xcuitest-driver/docs/guides/audio-capture.md +78 -0
  494. package/src/resources/submodules/appium-xcuitest-driver/docs/guides/capability-sets.md +169 -0
  495. package/src/resources/submodules/appium-xcuitest-driver/docs/guides/ci-setup.md +47 -0
  496. package/src/resources/submodules/appium-xcuitest-driver/docs/guides/clipboard.md +47 -0
  497. package/src/resources/submodules/appium-xcuitest-driver/docs/guides/elements-lookup-troubleshooting.md +158 -0
  498. package/src/resources/submodules/appium-xcuitest-driver/docs/guides/file-transfer.md +147 -0
  499. package/src/resources/submodules/appium-xcuitest-driver/docs/guides/gestures.md +52 -0
  500. package/src/resources/submodules/appium-xcuitest-driver/docs/guides/hybrid.md +137 -0
  501. package/src/resources/submodules/appium-xcuitest-driver/docs/guides/input-events.md +67 -0
  502. package/src/resources/submodules/appium-xcuitest-driver/docs/guides/install-certificate.md +19 -0
  503. package/src/resources/submodules/appium-xcuitest-driver/docs/guides/multiple-xcode-versions.md +37 -0
  504. package/src/resources/submodules/appium-xcuitest-driver/docs/guides/parallel-tests.md +39 -0
  505. package/src/resources/submodules/appium-xcuitest-driver/docs/guides/run-prebuilt-wda.md +135 -0
  506. package/src/resources/submodules/appium-xcuitest-driver/docs/guides/run-preinstalled-wda.md +178 -0
  507. package/src/resources/submodules/appium-xcuitest-driver/docs/guides/touch-id.md +33 -0
  508. package/src/resources/submodules/appium-xcuitest-driver/docs/guides/troubleshooting.md +191 -0
  509. package/src/resources/submodules/appium-xcuitest-driver/docs/guides/tvos.md +114 -0
  510. package/src/resources/submodules/appium-xcuitest-driver/docs/guides/wda-custom-server.md +283 -0
  511. package/src/resources/submodules/appium-xcuitest-driver/docs/guides/wda-slowness.md +231 -0
  512. package/src/resources/submodules/appium-xcuitest-driver/docs/index.md +36 -0
  513. package/src/resources/submodules/appium-xcuitest-driver/docs/installation/index.md +137 -0
  514. package/src/resources/submodules/appium-xcuitest-driver/docs/overview.md +19 -0
  515. package/src/resources/submodules/appium-xcuitest-driver/docs/preparation/assets/images/check-prov-prof.png +0 -0
  516. package/src/resources/submodules/appium-xcuitest-driver/docs/preparation/assets/images/create-new-project.png +0 -0
  517. package/src/resources/submodules/appium-xcuitest-driver/docs/preparation/assets/images/create-single-page.png +0 -0
  518. package/src/resources/submodules/appium-xcuitest-driver/docs/preparation/assets/images/no-prov-prof.png +0 -0
  519. package/src/resources/submodules/appium-xcuitest-driver/docs/preparation/assets/images/project-prov-prof.png +0 -0
  520. package/src/resources/submodules/appium-xcuitest-driver/docs/preparation/assets/images/set-up-bundle.png +0 -0
  521. package/src/resources/submodules/appium-xcuitest-driver/docs/preparation/assets/images/untrusted-dev.png +0 -0
  522. package/src/resources/submodules/appium-xcuitest-driver/docs/preparation/assets/images/xcode-bundle-id.png +0 -0
  523. package/src/resources/submodules/appium-xcuitest-driver/docs/preparation/assets/images/xcode-config.png +0 -0
  524. package/src/resources/submodules/appium-xcuitest-driver/docs/preparation/assets/images/xcode-facebook-fail.png +0 -0
  525. package/src/resources/submodules/appium-xcuitest-driver/docs/preparation/assets/images/xcode-facebook-succeed.png +0 -0
  526. package/src/resources/submodules/appium-xcuitest-driver/docs/preparation/index.md +51 -0
  527. package/src/resources/submodules/appium-xcuitest-driver/docs/preparation/prov-profile-basic-auto.md +49 -0
  528. package/src/resources/submodules/appium-xcuitest-driver/docs/preparation/prov-profile-basic-manual.md +40 -0
  529. package/src/resources/submodules/appium-xcuitest-driver/docs/preparation/prov-profile-full-manual.md +50 -0
  530. package/src/resources/submodules/appium-xcuitest-driver/docs/preparation/prov-profile-generic-manual.md +49 -0
  531. package/src/resources/submodules/appium-xcuitest-driver/docs/preparation/real-device-config.md +100 -0
  532. package/src/resources/submodules/appium-xcuitest-driver/docs/reference/assets/images/useXctestrunFile.png +0 -0
  533. package/src/resources/submodules/appium-xcuitest-driver/docs/reference/bidi.md +75 -0
  534. package/src/resources/submodules/appium-xcuitest-driver/docs/reference/capabilities.md +165 -0
  535. package/src/resources/submodules/appium-xcuitest-driver/docs/reference/commands.md +490 -0
  536. package/src/resources/submodules/appium-xcuitest-driver/docs/reference/element-attributes.md +27 -0
  537. package/src/resources/submodules/appium-xcuitest-driver/docs/reference/execute-methods.md +2206 -0
  538. package/src/resources/submodules/appium-xcuitest-driver/docs/reference/ios-predicate.md +196 -0
  539. package/src/resources/submodules/appium-xcuitest-driver/docs/reference/locator-strategies.md +19 -0
  540. package/src/resources/submodules/appium-xcuitest-driver/docs/reference/scripts.md +29 -0
  541. package/src/resources/submodules/appium-xcuitest-driver/docs/reference/security-flags.md +22 -0
  542. package/src/resources/submodules/appium-xcuitest-driver/docs/reference/server-args.md +16 -0
  543. package/src/resources/submodules/appium-xcuitest-driver/docs/reference/settings.md +49 -0
  544. package/src/resources/submodules/appium-xcuitest-driver/test/assets/TestApp-iphonesimulator.app/Default-568h@2x.png +0 -0
  545. package/src/resources/submodules/appium-xcuitest-driver/test/assets/test.png +0 -0
  546. package/src/schema.ts +5 -0
  547. package/src/scripts/simple-index-documentation.ts +93 -0
  548. package/src/scripts/simple-query-documentation.ts +61 -0
  549. package/src/server.ts +40 -0
  550. package/src/tests/README.md +83 -0
  551. package/src/tests/__mocks__/@appium/support.ts +31 -0
  552. package/src/tests/generate-all-locators.test.ts +179 -0
  553. package/src/tests/test-setup-wda.ts +247 -0
  554. package/src/tools/README.md +171 -0
  555. package/src/tools/answer-appium.ts +75 -0
  556. package/src/tools/boot-simulator.ts +87 -0
  557. package/src/tools/create-session.ts +270 -0
  558. package/src/tools/delete-session.ts +46 -0
  559. package/src/tools/documentation/index.ts +97 -0
  560. package/src/tools/documentation/reasoning-rag.ts +434 -0
  561. package/src/tools/documentation/sentence-transformers-embeddings.ts +142 -0
  562. package/src/tools/documentation/simple-pdf-indexer.ts +509 -0
  563. package/src/tools/documentation/uploads/documents.json +1 -0
  564. package/src/tools/generate-tests.ts +50 -0
  565. package/src/tools/index.ts +135 -0
  566. package/src/tools/install-wda.ts +277 -0
  567. package/src/tools/interactions/activate-app.ts +46 -0
  568. package/src/tools/interactions/click.ts +47 -0
  569. package/src/tools/interactions/double-tap.ts +87 -0
  570. package/src/tools/interactions/find.ts +58 -0
  571. package/src/tools/interactions/get-page-source.ts +52 -0
  572. package/src/tools/interactions/get-text.ts +47 -0
  573. package/src/tools/interactions/install-app.ts +45 -0
  574. package/src/tools/interactions/list-apps.ts +65 -0
  575. package/src/tools/interactions/screenshot.ts +56 -0
  576. package/src/tools/interactions/set-value.ts +48 -0
  577. package/src/tools/interactions/terminate-app.ts +47 -0
  578. package/src/tools/interactions/uninstall-app.ts +47 -0
  579. package/src/tools/locators.ts +83 -0
  580. package/src/tools/scroll-to-element.ts +188 -0
  581. package/src/tools/scroll.ts +97 -0
  582. package/src/tools/select-device.ts +298 -0
  583. package/src/tools/select-platform.ts +243 -0
  584. package/src/tools/session-store.ts +72 -0
  585. package/src/tools/setup-wda.ts +218 -0
  586. package/src/types/appium-ios-device.d.ts +8 -0
  587. package/src/types/appium-xcuitest-driver.d.ts +5 -0
  588. package/tsconfig.json +23 -0
  589. package/index.js +0 -0
@@ -0,0 +1,2206 @@
1
+ ---
2
+ title: Execute Methods
3
+ ---
4
+
5
+ In addition to standard W3C APIs, the driver provides many custom command extensions for executing
6
+ platform-specific scenarios. Use the following examples in order to invoke them from your client code:
7
+
8
+ === "Java"
9
+
10
+ ```java
11
+ var result = driver.executeScript("mobile: <methodName>", Map.ofEntries(
12
+ Map.entry("arg1", "value1"),
13
+ Map.entry("arg2", "value2")
14
+ // you may add more pairs if needed or skip providing the map completely
15
+ // if all arguments are defined as optional
16
+ ));
17
+ ```
18
+
19
+ === "JS (WebdriverIO)"
20
+
21
+ ```js
22
+ const result = await driver.executeScript('mobile: <methodName>', [{
23
+ arg1: "value1",
24
+ arg2: "value2",
25
+ }]);
26
+ ```
27
+
28
+ === "Python"
29
+
30
+ ```python
31
+ result = driver.execute_script('mobile: <methodName>', {
32
+ 'arg1': 'value1',
33
+ 'arg2': 'value2',
34
+ })
35
+ ```
36
+
37
+ === "Ruby"
38
+
39
+ ```ruby
40
+ result = @driver.execute_script 'mobile: <methodName>', {
41
+ arg1: 'value1',
42
+ arg2: 'value2',
43
+ }
44
+ ```
45
+
46
+ === "C#"
47
+
48
+ ```csharp
49
+ object result = driver.ExecuteScript("mobile: <methodName>", new Dictionary<string, object>() {
50
+ {"arg1", "value1"},
51
+ {"arg2", "value2"}
52
+ }));
53
+ ```
54
+
55
+ ### mobile: selectPickerWheelValue
56
+
57
+ Performs selection of the next or previous picker wheel value. This might
58
+ be useful if these values are populated dynamically, so you don't know which
59
+ 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.
60
+
61
+ #### Arguments
62
+
63
+ Name | Type | Required | Description | Example
64
+ --- | --- | --- | --- | ---
65
+ 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
66
+ 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
67
+ 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
68
+ 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
69
+ 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
70
+
71
+ ### mobile: sendMemoryWarning
72
+
73
+ Simulates sending of Low Memory warning to the target application.
74
+ It might be useful to verify the
75
+ [didReceiveMemoryWarning](https://developer.apple.com/documentation/uikit/uiviewcontroller/1621409-didreceivememorywarning?language=objc)
76
+ API in the application under test.
77
+ This feature only works on real devices running iOS 17+ with Xcode 15+ SDK.
78
+ The target application must be running while this API is called.
79
+
80
+ #### Arguments
81
+
82
+ Name | Type | Required | Description | Example
83
+ --- | --- | --- | --- | ---
84
+ bundleId | string | yes | Bundle identifier of the app to simulate the warning for | com.great.app
85
+
86
+ ### mobile: alert
87
+
88
+ Tries to apply the given action to the currently visible alert.
89
+
90
+ #### Arguments
91
+
92
+ Name | Type | Required | Description | Example
93
+ --- | --- | --- | --- | ---
94
+ action | string | yes | The actual action to apply. Could be either: `accept`, `dismiss` or `getButtons` | accept
95
+ 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
96
+
97
+ #### Returned Result
98
+
99
+ The list of alert button names if the selected action is `getButtons`
100
+
101
+ ### mobile: setPasteboard
102
+
103
+ Sets the Simulator's pasteboard content to the given value. Does not work for real devices.
104
+
105
+ #### Arguments
106
+
107
+ Name | Type | Required | Description | Example
108
+ --- | --- | --- | --- | ---
109
+ content | string | yes | The content to set | hello
110
+ encoding | string | no | The content's encoding. `utf8` by default | ascii
111
+
112
+ ### mobile: getPasteboard
113
+
114
+ Gets the Simulator's pasteboard content. Does not work for real devices.
115
+
116
+ #### Arguments
117
+
118
+ Name | Type | Required | Description | Example
119
+ --- | --- | --- | --- | ---
120
+ encoding | string | no | The expected encoding of the returned string. `utf8` by default | ascii
121
+
122
+ #### Returned Result
123
+
124
+ The pasteboard content string.
125
+
126
+ ### mobile: source
127
+
128
+ Allows to retrieve the source tree of the current page in different representation formats.
129
+
130
+ #### Arguments
131
+
132
+ Name | Type | Required | Description | Example
133
+ --- | --- | --- | --- | ---
134
+ 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
135
+ 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
136
+
137
+ #### Returned Result
138
+
139
+ The page source tree formatted according to the given format argument.
140
+
141
+ ### mobile: getContexts
142
+
143
+ 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.
144
+
145
+ #### Arguments
146
+
147
+ Name | Type | Required | Description | Example
148
+ --- | --- | --- | --- | ---
149
+ waitForWebviewMs | number | no | Tells Appium for how long (in milliseconds) to wait for web view(s) to appear. `5000`ms by default | 10000
150
+
151
+ #### Returned Result
152
+
153
+ The list of available context objects along with their properties:
154
+
155
+ - id: The identifier of the context. The native context will be 'NATIVE_APP' and the webviews will be 'WEBVIEW_xxx'
156
+ - title: The title associated with the webview content. Could be `null`
157
+ - url: The url associated with the webview content. Could be `null`
158
+
159
+ ### mobile: installApp
160
+
161
+ 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.
162
+
163
+ #### Arguments
164
+
165
+ Name | Type | Required | Description | Example
166
+ --- | --- | --- | --- | ---
167
+ app | string | yes | See the description of the `appium:app` capability | /path/to/my.app
168
+ 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
169
+ **Deprecated** **Not Used since v7.15.0** strategy | string | no | One of possible app installation strategies on real devices. This argument is ignored on simulators. If not provided then the value of `appium:appInstallStrategy` is used. If the latter is also not provided then `serial` is used. See the description of `appium:appInstallStrategy` capability for more details on available values. | parallel
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](../guides/troubleshooting.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
+ XCUITest driver 4.4 and higher does not require [py-ios-device](https://github.com/YueChen-C/py-ios-device).
289
+ XCUITest driver 4.3 requires [py-ios-device](https://github.com/YueChen-C/py-ios-device).
290
+
291
+ #### Arguments
292
+
293
+ Name | Type | Required | Description | Example
294
+ --- | --- | --- | --- | ---
295
+ bundleId | string | yes | The bundle identifier of the application to be terminated | com.mycompany.myapp
296
+
297
+ #### Returned Result
298
+
299
+ Either `true` if the app was successfully killed, otherwise `false`
300
+
301
+ ### mobile: queryAppState
302
+
303
+ 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.
304
+
305
+ #### Arguments
306
+
307
+ Name | Type | Required | Description | Example
308
+ --- | --- | --- | --- | ---
309
+ bundleId | string | yes | The bundle identifier of the application to be queried | com.mycompany.myapp
310
+
311
+ #### Returned Result
312
+
313
+ 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.
314
+
315
+ ### mobile: activateApp
316
+
317
+ 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.
318
+
319
+ #### Arguments
320
+
321
+ Name | Type | Required | Description | Example
322
+ --- | --- | --- | --- | ---
323
+ bundleId | string | yes | The bundle identifier of the application to be activated | com.mycompany.myapp
324
+
325
+ ### mobile: listApps
326
+
327
+ List applications installed on the real device under test. This extension throws an error if called
328
+ for a Simulator device.
329
+ Offload applications will not be in the result.
330
+
331
+ #### Arguments
332
+
333
+ Name | Type | Required | Description | Example
334
+ --- | --- | --- | --- | ---
335
+ applicationType | string | no | The type of applications to list. Either `System` or `User` (the default one) | System
336
+
337
+ #### Returned Result
338
+
339
+ A list of apps, where each item is a map where keys are bundle identifiers and values are maps of platform-specific app properties. Having `UIFileSharingEnabled` set to `true` in the app properties map means this app supports files upload and download into its `documents` container. Read the [File Transfer](../guides/file-transfer.md) guide for more details.
340
+
341
+ ### mobile: clearApp
342
+
343
+ Deletes data files from the data container of an installed app,
344
+ so it could start from the clean state next time it is launched.
345
+ The destination app will be terminated if it is running when this API is invoked.
346
+ Sometimes it might also be necessary to invoke the following APIs
347
+ to fully reset the state of an installed app (make sure the app is not running while
348
+ calling them):
349
+ - [mobile: clearKeychains](#mobile-clearkeychains)
350
+ - [mobile: resetPermission](#mobile-resetpermission)
351
+
352
+ This API might not be 100% reliable for some apps. The only reliable method to fully
353
+ 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.
354
+
355
+ This API only works on simulators. An exception is thrown if executed with real devices.
356
+
357
+ #### Arguments
358
+
359
+ Name | Type | Required | Description | Example
360
+ --- | --- | --- | --- | ---
361
+ bundleId | string | yes | The bundle identifier of the application to be cleared | com.mycompany.myapp
362
+
363
+ #### Returned Result
364
+
365
+ `true` if at least one item has been successfully deleted from the app data container.
366
+
367
+ ### mobile: startPerfRecord
368
+
369
+ Starts performance profiling for the device under test.
370
+ Relaxing security is mandatory for simulators. It can always work for real devices.
371
+ Since XCode 12 the method tries to use `xctrace` tool to record performance stats.
372
+ 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.
373
+ If the recording for the given profile is already running then nothing is done.
374
+
375
+ #### Arguments
376
+
377
+ Name | Type | Required | Description | Example
378
+ --- | --- | --- | --- | ---
379
+ 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`
380
+ 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`
381
+ 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
382
+
383
+ ### mobile: stopPerfRecord
384
+
385
+ 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.
386
+
387
+ #### Arguments
388
+
389
+ Name | Type | Required | Description | Example
390
+ --- | --- | --- | --- | ---
391
+ 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`
392
+ 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
393
+ user | string | no | The name of the user for the remote authentication. Only works if `remotePath` is provided. | myuser
394
+ pass | string | no | The password for the remote authentication. Only works if `remotePath` is provided. | mypassword
395
+ method | string | no | The http multipart upload method name. Only works if `remotePath` is provided. `PUT` by default | POST
396
+ headers | dict | no | Additional headers mapping for multipart http(s) uploads | {'User-Agent': 'Myserver 1.0'}
397
+ 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
398
+ formFields | dict or array | no | Additional form fields for multipart http(s) uploads | {'field2': 'value2'}
399
+
400
+ #### Returned Result
401
+
402
+ 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.
403
+
404
+ ### mobile: installCertificate
405
+
406
+ Installs a custom certificate onto the device. Since Xcode SDK 11.4 Apple has added a dedicated simctl subcommand to quickly handle certificates on Simulator over CLI.
407
+ On real devices the certificate could be installed via CLI if [py-ios-device](https://github.com/YueChen-C/py-ios-device) tool is available on the server machine.
408
+ On simulators before Xcode 11.4 SDK Apple provides no official way to do it via the command line. In such case (and also as a fallback if CLI setup fails) this method tries to wrap the certificate into .mobileconfig format and then deploys the wrapped file to the internal HTTP server, so one can open it via mobile Safari. Then the algorithm goes through the profile installation procedure by clicking the necessary buttons using 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 installed certificate for real devices only if [py-ios-device](https://github.com/YueChen-C/py-ios-device) tool is available on the server machine since driver version 4.19.2.
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 status acknowledgment `{'Status': 'Acknowledged'}` if successfully removed certificate or `None` if unable to remove certificate.
435
+
436
+ ### mobile: listCertificates
437
+
438
+ Lists installed certificates for real devices only if [py-ios-device](https://github.com/YueChen-C/py-ios-device) tool is available on the server machine since driver version 4.10.0.
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 the [BatteryInfo](../../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 press action on the given physical device button. iOS is [pressButton:](https://developer.apple.com/documentation/xctest/xcuidevice/1619052-pressbutton), tvOS is [pressButton:](https://developer.apple.com/documentation/xctest/xcuiremote/1627475-pressbutton) or [pressButton:forDuration:](https://developer.apple.com/documentation/xctest/xcuiremote/1627476-pressbutton).
568
+ [mobile: performIoHidEvent](#mobile-performiohidevent) calls a more universal API to perform press with duration on any supported device.
569
+
570
+ #### Arguments
571
+
572
+ Name | Type | Required | Description | Example
573
+ --- | --- | --- | --- | ---
574
+ name | string | yes | The name of the button to be pressed. Supported button names for iOS-based devices are (case-insensitive): `home`, `volumeup`, `volumedown`. For tvOS-based devices (case-insensitive): `home`, `up`, `down`, `left`, `right`, `menu`, `playpause`, `select` | home
575
+ durationSeconds | number | no | Duration in float seconds for tvOS-based devices since Appium 1.22.0 | 10
576
+
577
+ ### mobile: pushNotification
578
+
579
+ Simulates push notification delivery to Simulator.
580
+ Only application remote push notifications are supported. VoIP, Complication, File Provider,
581
+ and other types are not supported. Check the output of `xcrun simctl help push`
582
+ command for more details.
583
+
584
+ #### Arguments
585
+
586
+ Name | Type | Required | Description | Example
587
+ --- | --- | --- | --- | ---
588
+ bundleId | string | yes | The bundle identifier of the target application | com.apple.Preferences
589
+ 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"} }`
590
+
591
+ ### mobile: expectNotification
592
+
593
+ Blocks until the expected notification is delivered.
594
+ It is a thin wrapper over [XCTNSNotificationExpectation](https://developer.apple.com/documentation/xctest/xctnsnotificationexpectation?language=objc) and
595
+ [XCTDarwinNotificationExpectation](https://developer.apple.com/documentation/xctest/xctdarwinnotificationexpectation?language=objc) entities.
596
+ 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.
597
+
598
+ #### Arguments
599
+
600
+ Name | Type | Required | Description | Example
601
+ --- | --- | --- | --- | ---
602
+ name | string | yes | The name of the notification to expect | com.example.fooAllDone
603
+ 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
604
+ timeoutSeconds | number | no | For how long to wait until the notification is delivered in float seconds. 60 seconds by default | 5.5
605
+
606
+ ### mobile: performIoHidEvent
607
+
608
+ Emulates triggering of the given low-level IO HID device event. Constants for possible events are defined
609
+ in [HID Usage Tables](https://developer.apple.com/documentation/hiddriverkit/hid_usage_tables).
610
+ For example, in order to emulate single press on Home button the extension should be called with the following arguments:
611
+ - page: `0x0C` (`kHIDPage_Consumer`, select the `Customer` page)
612
+ - usage: `0x40` (`kHIDUsage_Csmr_Menu`, the `Csmr` prefix here means this usage is dedicated to the `Customer` page)
613
+ - durationSeconds: `0.005` (The event duration should be 5 milliseconds to be recognized as a single press by iOS)
614
+
615
+ Some popular constants:
616
+
617
+ Name | Value | Description
618
+ --- | --- | ---
619
+ kHIDPage_Consumer | 0x0C | The page containing all usages prefixed with `kHIDUsage_Csmr_`
620
+ kHIDUsage_Csmr_VolumeIncrement | 0xE9 | Volume Up
621
+ kHIDUsage_Csmr_VolumeDecrement | 0xEA | Volume Down
622
+ kHIDUsage_Csmr_Menu | 0x40 | Home
623
+ kHIDUsage_Csmr_Power | 0x30 | Power/Lock
624
+ kHIDUsage_Csmr_Snapshot | 0x65 | Power + Home
625
+
626
+ #### Arguments
627
+
628
+ Name | Type | Required | Description | Example
629
+ --- | --- | --- | --- | ---
630
+ page | int | yes | The event page identifier. Look for constants perfixed with `kHIDPage_` in the table above | 0x0C
631
+ usage | int | yes | The event usage identifier (usages are defined per-page). Look for constants prefixed with `kHIDUsage_` in the table above | 0x40
632
+ durationSeconds | number | yes | The event duration in float seconds. XCTest uses `0.005` for a single press event duration | 2.5
633
+
634
+ ### mobile: enrollBiometric
635
+
636
+ Enrolls biometric authentication on Simulator.
637
+
638
+ #### Arguments
639
+
640
+ Name | Type | Required | Description | Example
641
+ --- | --- | --- | --- | ---
642
+ isEnabled | boolean | no | Whether to enable/disable biometric enrollment. `true` by default. | true
643
+
644
+ ### mobile: sendBiometricMatch
645
+
646
+ Emulates biometric match/non-match event on Simulator. The biometric feature is expected to be already enrolled before executing that.
647
+
648
+ #### Arguments
649
+
650
+ Name | Type | Required | Description | Example
651
+ --- | --- | --- | --- | ---
652
+ type | string | no | The biometric feature name. Either `touchId` or `faceId`. `touchId` by default. | faceId
653
+ match | boolean | no | Whether to simulate biometric match (`true`, the default value) or non-match (`false`). | true
654
+
655
+ ### mobile: isBiometricEnrolled
656
+
657
+ Checks whether biometric is currently enrolled or not on a Simulator device.
658
+
659
+ #### Returned Result
660
+
661
+ Either `true` or `false`
662
+
663
+ ### mobile: clearKeychains
664
+
665
+ Clears keychains on Simulator. An exception is thrown for real devices.
666
+
667
+ ### mobile: getPermission
668
+
669
+ 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.
670
+
671
+ #### Arguments
672
+
673
+ Name | Type | Required | Description | Example
674
+ --- | --- | --- | --- | ---
675
+ bundleId | string | yes | The bundle identifier of the destination app. | com.mycompany.myapp
676
+ 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
677
+
678
+ #### Returned Result
679
+
680
+ Either 'yes', 'no', 'unset' or 'limited'
681
+
682
+ ### mobile: setPermission
683
+
684
+ Set application permission state on Simulator.
685
+
686
+ `location` and `location-always` services are by `xcrun simctl privacy` command since XCUITest driver version 5.11.0.
687
+ The command will kill the `bundleId` application process if it is running.
688
+
689
+ Other services such as `contacts` are processed by [WIX applesimutils](https://github.com/wix/AppleSimulatorUtils), which will not kill the `bundleId` application process.
690
+ [WIX applesimutils](https://github.com/wix/AppleSimulatorUtils) needs to be installed on the host where Appium server is running.
691
+
692
+ #### Arguments
693
+
694
+ Name | Type | Required | Description | Example
695
+ --- | --- | --- | --- | ---
696
+ bundleId | string | yes | The bundle identifier of the destination app. | com.mycompany.myapp
697
+ 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'}
698
+
699
+ ### mobile: resetPermission
700
+
701
+ Resets the given permission for the active application under test. Works for both Simulator and real devices using Xcode SDK 11.4+
702
+
703
+ #### Arguments
704
+
705
+ Name | Type | Required | Description | Example
706
+ --- | --- | --- | --- | ---
707
+ 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
708
+
709
+ ### mobile: getAppearance
710
+
711
+ Get the device's UI appearance style.
712
+
713
+ #### Returned Result
714
+
715
+ An object, with the following entries:
716
+ - style: The device's UI appearance value. This could be one of: `light`, `dark`, `unknown`, `unsupported`
717
+
718
+ ### mobile: setAppearance
719
+
720
+ Set the device's UI appearance style.
721
+
722
+ #### Arguments
723
+
724
+ Name | Type | Required | Description | Example
725
+ --- | --- | --- | --- | ---
726
+ style | string | yes | Either `light` or `dark` | dark
727
+
728
+ ### mobile: getIncreaseContrast
729
+
730
+ Get the device's "increase contrast" accessibility mode.
731
+ This API only works on simulators. An exception is thrown if executed with real devices.
732
+
733
+ #### Returned Result
734
+
735
+ One of below:
736
+
737
+ - `enabled`: Increase Contrast is enabled.
738
+ - `disabled`: Increase Contrast is disabled.
739
+ - `unsupported`: The platform or runtime version does not support the Increase Contrast setting.
740
+ - `unknown`: The current setting is unknown or there was an error detecting it.
741
+
742
+
743
+ ### mobile: setIncreaseContrast
744
+
745
+ Enable or disable the device's "increase contrast" accessibility mode.
746
+ This API only works on simulators. An exception is thrown if executed with real devices.
747
+
748
+ #### Arguments
749
+
750
+ Name | Type | Required | Description | Example
751
+ --- | --- | --- | --- | ---
752
+ increaseContrast | string | yes | Either `enabled` or `disabled` (case insensitive) | 'enabled'
753
+
754
+ ### mobile: contentSize
755
+
756
+ Get the device's content size.
757
+ This API only works on simulators. An exception is thrown if executed with real devices.
758
+
759
+ #### Returned Result
760
+
761
+ One of below:
762
+
763
+ - `extra-small`
764
+ - `small`
765
+ - `medium`
766
+ - `large`
767
+ - `extra-large`
768
+ - `extra-extra-large`
769
+ - `extra-extra-extra-large`
770
+ - `accessibility-medium`
771
+ - `accessibility-large`
772
+ - `accessibility-extra-large`
773
+ - `accessibility-extra-extra-large`
774
+ - `accessibility-extra-extra-extra-large`
775
+ - `unknown`
776
+ - `unsupported`
777
+
778
+ ### mobile: setContentSize
779
+
780
+ Set the device's content size.
781
+ This API only works on simulators. An exception is thrown if executed with real devices.
782
+
783
+ #### Arguments
784
+
785
+ Name | Type | Required | Description | Example
786
+ --- | --- | --- | --- | ---
787
+ size | string | yes | One of the content sizes listed below in case-insensitive. | large
788
+
789
+ - `extra-small`
790
+ - `small`
791
+ - `medium`
792
+ - `large`
793
+ - `extra-large`
794
+ - `extra-extra-large`
795
+ - `extra-extra-extra-large`
796
+ - `accessibility-medium`
797
+ - `accessibility-large`
798
+ - `accessibility-extra-large`
799
+ - `accessibility-extra-extra-large`
800
+ - `accessibility-extra-extra-extra-large`
801
+
802
+ ### mobile: getClipboard
803
+
804
+ Gets the content of the primary clipboard on the device under test.
805
+
806
+ #### Arguments
807
+
808
+ Name | Type | Required | Description | Example
809
+ --- | --- | --- | --- | ---
810
+ contentType | string | no | `plaintext` (default), `image` or `url` | image
811
+
812
+ #### Returned Result
813
+
814
+ The actual clipboard content encoded into base64 string.
815
+ An empty string is returned if the clipboard contains no data.
816
+
817
+ ### mobile: setClipboard
818
+
819
+ Sets the primary clipboard's content on the device under test.
820
+
821
+ #### Arguments
822
+
823
+ Name | Type | Required | Description | Example
824
+ --- | --- | --- | --- | ---
825
+ content| string | yes | The content to be set as base64-encoded string. | QXBwaXVt
826
+ contentType | string | no | `plaintext` (default), `image` or `url` | image
827
+
828
+ ### mobile: siriCommand
829
+
830
+ 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.
831
+
832
+ #### Arguments
833
+
834
+ Name | Type | Required | Description | Example
835
+ --- | --- | --- | --- | ---
836
+ text | string | yes | The actual command that will be passed to Siri service | Hello Siri
837
+
838
+ ### mobile: pullFile
839
+
840
+ Pulls a remote file from the device.
841
+
842
+ #### Arguments
843
+
844
+ Name | Type | Required | Description | Example
845
+ --- | --- | --- | --- | ---
846
+ 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
847
+
848
+ #### Returned Result
849
+
850
+ Base64-encoded string, which represents the content of the remote file.
851
+
852
+ ### mobile: pushFile
853
+
854
+ Pushes a local file to the device.
855
+
856
+ #### Arguments
857
+
858
+ Name | Type | Required | Description | Example
859
+ --- | --- | --- | --- | ---
860
+ 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
861
+ payload | string | yes | Base64-encoded content of the file to be pushed. | QXBwaXVt
862
+
863
+ ### mobile: pullFolder
864
+
865
+ Pulls a remote folder from the device.
866
+
867
+ #### Arguments
868
+
869
+ Name | Type | Required | Description | Example
870
+ --- | --- | --- | --- | ---
871
+ remotePath | string | yes | Same as for [pullFile](#mobile-pullfile) extension, but should be pointing to a remote folder | @com.mycompany.myapp:documents/myfolder/
872
+
873
+ #### Returned Result
874
+
875
+ Base64-encoded string, which represents the zipped content of the remote folder.
876
+
877
+ ### mobile: deleteFile
878
+
879
+ Deletes the given file from the device under test.
880
+
881
+ #### Arguments
882
+
883
+ Name | Type | Required | Description | Example
884
+ --- | --- | --- | --- | ---
885
+ remotePath | string | yes | Same as for [pullFile](#mobile-pullfile) extension | @com.mycompany.myapp:documents/myfile.txt
886
+
887
+ ### mobile: deleteFolder
888
+
889
+ Deletes the given folder from the device under test.
890
+
891
+ #### Arguments
892
+
893
+ Name | Type | Required | Description | Example
894
+ --- | --- | --- | --- | ---
895
+ 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/
896
+
897
+ ### mobile: configureLocalization
898
+
899
+ Change localization settings on the currently booted Simulator.
900
+ The changed settings are only applied for the *newly started* applications/activities.
901
+ Currently running applications will stay unchanged. This means, for example, that the keyboard
902
+ should be hidden and shown again in order to observe the changed layout, and corresponding
903
+ apps must be restarted in order to observe their interface using the newly set locale/language.
904
+ Also this method might leave some system UI alerts untranslated.
905
+ Be careful while setting the actual arguments since their actual values are not strictly checked.
906
+ This could lead to an unexpected behavior if an incorrect/unsupported language or locale abbreviation is provided.
907
+
908
+ #### Arguments
909
+
910
+ Name | Type | Required | Description | Example
911
+ --- | --- | --- | --- | ---
912
+ 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"}`
913
+ 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"}`
914
+ 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"}`
915
+
916
+ #### Returned Result
917
+
918
+ `true` if any of settings has been successfully changed.
919
+
920
+ ### mobile: startAudioRecording
921
+
922
+ 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.
923
+
924
+ #### Arguments
925
+
926
+ Name | Type | Required | Description | Example
927
+ --- | --- | --- | --- | ---
928
+ 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
929
+ audioCodec | string | no | The name of the audio codec. The Advanced Audio Codec (aac) is used by default. | aac
930
+ audioBitrate | string | no | The bitrate of the resulting audio stream. `128k` by default. | 256k
931
+ 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
932
+ audioRate | string or int | no | The sampling rate of the resulting audio stream. 44100 by default | 22050
933
+ timeLimit | string or int | no | The maximum recording time, in seconds. The default value is `180`, the maximum value is `43200` (12 hours). | 60
934
+ 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
935
+
936
+ ### mobile: stopAudioRecording
937
+
938
+ 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.
939
+
940
+ #### Returned Result
941
+
942
+ Base64-encoded content of the recorded media file or an empty string if no audio recording has been started before.
943
+
944
+ ### mobile: startPcap
945
+
946
+ Start mobile device network traffic capture. This extension only works if [py-ios-device](https://github.com/YueChen-C/py-ios-device) utility is installed on the server machine and only supports
947
+ real iOS devices.
948
+
949
+ #### Arguments
950
+
951
+ Name | Type | Required | Description | Example
952
+ --- | --- | --- | --- | ---
953
+ timeLimitSec | string or int | no | The maximum recording time, in seconds. The default value is `180`, the maximum value is `43200` (12 hours). | 60
954
+ forceRestart | boolean | no | Whether to restart traffic capture process forcefully when startPcap is called (`true`) or ignore the call until the current traffic capture is completed (`false`, the default value). | true
955
+
956
+ ### mobile: stopPcap
957
+
958
+ Stops network traffic capture. If no traffic capture process is running then the endpoint will try to get the recently recorded file. If no previously recorded file is found and no active traffic capture processes are running then the method returns an empty string.
959
+
960
+ #### Returned Result
961
+
962
+ Base64-encoded content of the traffic capture file (.pcap) or an empty string if no traffic capture has been started before. Network capture files could be opened in [Wireshark](https://www.wireshark.org/) application.
963
+
964
+ ### mobile: runXCTest
965
+
966
+ Run a native XCTest script. Launches a subprocess that runs the XC Test and blocks until it is completed. Parses the stdout of the process and returns its result as an array. Facebook's [IDB](https://github.com/facebook/idb) tool is required to run such tests.
967
+
968
+ #### Arguments
969
+
970
+ Name | Type | Required | Description | Example
971
+ --- | --- | --- | --- | ---
972
+ testRunnerBundleId | string | yes | Test app bundle | io.appium.XCTesterAppUITests.xctrunner
973
+ appUnderTestBundleId | string | yes | App-under-test bundle | com.mycompany.myapp
974
+ xcTestBundleID | string | yes | xctest bundle id | io.appium.XCTesterAppUITests
975
+ testType | string | no | Test type. Either `ui` (the default one), `app` or `logic` | app
976
+ env | map | no | Environment variables mapping to be passed to the test | {'myvar': 'myvalue'}
977
+ args | array | no | Launch arguments to start the test with (see https://developer.apple.com/documentation/xctest/xcuiapplication/1500477-launcharguments for reference) | ['-arg1', '--arg2']
978
+ timeout | string or int | no | Timeout if session doesn't complete after given time (in milliseconds). `360000`ms by default | 120000
979
+
980
+ #### Returned Result
981
+
982
+ The API calls returns a map with the following entries:
983
+
984
+ - results: The array of test results. Each item in this array conists of the following entries:
985
+ * testName: Name of the test (e.g.: 'XCTesterAppUITests - XCTesterAppUITests.XCTesterAppUITests/testExample')
986
+ * passed: Did the tests pass?
987
+ * crashed: Did the tests crash?
988
+ * status: Test result status (e.g.: 'passed', 'failed', 'crashed')
989
+ * duration: How long did the tests take (in seconds)
990
+ * failureMessage: Failure message (if applicable)
991
+ * location The geolocation of the test (if applicable)
992
+ - code: The exit code of the process. `0` value marks a successful execution.
993
+ - signal: The signal that terminated the process. Could be `null` (e.g.: `SIGTERM`)
994
+
995
+ ### mobile: installXCTestBundle
996
+
997
+ Installs an XCTest bundle to the device under test. Facebook's [IDB](https://github.com/facebook/idb) tool is required to for this API to work.
998
+
999
+ #### Arguments
1000
+
1001
+ Name | Type | Required | Description | Example
1002
+ --- | --- | --- | --- | ---
1003
+ xctestBundle | string | yes | Path to your xctest .app bundle. Could be an URL | /path/to/my/bundle.app
1004
+
1005
+ ### mobile: listXCTestBundles
1006
+
1007
+ List XCTest bundles that are installed on device. Facebook's [IDB](https://github.com/facebook/idb) tool is required to for this API to work.
1008
+
1009
+ #### Returned Result
1010
+
1011
+ Array of XCTest bundles (e.g.: ["XCTesterAppUITests.XCTesterAppUITests/testLaunchPerformance"])
1012
+
1013
+ ### mobile: listXCTestsInTestBundle
1014
+
1015
+ List XCTests in a test bundle. Facebook's [IDB](https://github.com/facebook/idb) tool is required to for this API to work.
1016
+
1017
+ #### Arguments
1018
+
1019
+ Name | Type | Required | Description | Example
1020
+ --- | --- | --- | --- | ---
1021
+ bundle | string | yes | Bundle ID of the XCTest | 'com.bundle.myapp'
1022
+
1023
+ #### Returned Result
1024
+
1025
+ Array of xctests in the test bundle (e.g.: `[ 'XCTesterAppUITests.XCTesterAppUITests/testExample', 'XCTesterAppUITests.XCTesterAppUITests/testLaunchPerformance' ]`)
1026
+
1027
+ ### mobile: viewportRect
1028
+
1029
+ Retrieves the viewport dimensions.
1030
+ The viewport is the device's screen size with status bar size subtracted if the latter is present/visible.
1031
+
1032
+ #### Returned Result
1033
+
1034
+ The response looks like `{"value":{"left":0,"top":96,"width":828,"height":1696}}`.
1035
+
1036
+ `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.
1037
+
1038
+ `width` and `height` are the screen's width and height.
1039
+
1040
+ ### mobile: viewportScreenshot
1041
+
1042
+ Takes a screenshot of the device viewport (see [`mobile: viewportRect`](#mobile-viewportrect))
1043
+
1044
+ !!! warning "Unreliable"
1045
+
1046
+ This method is unreliable. We recommend using `getScreenshot` instead
1047
+
1048
+ #### Returned Result
1049
+
1050
+ Base64-encoded string, which represents the viewport screenshot.
1051
+
1052
+ ### mobile: deviceScreenInfo
1053
+
1054
+ Get information about screen.
1055
+
1056
+ #### Returned Result
1057
+
1058
+ The response looks like `{"value":{"statusBarSize":{"width":414,"height":48},"scale":2}}`
1059
+
1060
+ `statusBarSize` contains status bar dimensions. It is the result of [status bar](https://developer.apple.com/documentation/xctest/xcuielementtypequeryprovider/1500428-statusbars).
1061
+ `scale` is [screen scale](https://developer.apple.com/documentation/uikit/uiscreen/1617836-scale).
1062
+
1063
+ ### mobile: swipe
1064
+
1065
+ This gesture performs a simple "swipe" gesture on the particular screen element or
1066
+ on the application element, which is usually the whole screen. This method does not
1067
+ accept coordinates and simply emulates single swipe with one finger. It might be
1068
+ useful for such cases like album pagination, switching views, etc. More advanced
1069
+ cases may require to call [mobile: dragFromToForDuration](#mobile-dragfromtoforduration),
1070
+ where one can supply coordinates and duration.
1071
+
1072
+ #### Arguments
1073
+
1074
+ Name | Type | Required | Description | Example
1075
+ --- | --- | --- | --- | ---
1076
+ 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
1077
+ direction | Either 'up', 'down', 'left' or 'right' | yes | The direction in which to swipe | up
1078
+ 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
1079
+
1080
+ #### Examples
1081
+
1082
+ === "Java"
1083
+
1084
+ ```java
1085
+ RemoteWebElement e = driver.findElement(AppiumBy.accessibilityId("target element"));
1086
+ driver.executeScript("mobile: swipe", ImmutableMap.of(
1087
+ "velocity": 2500,
1088
+ "direction": "down",
1089
+ "elementId", e.getId()
1090
+ ));
1091
+ ```
1092
+
1093
+ === "JS (WebdriverIO)"
1094
+
1095
+ ```js
1096
+ const e = await $('~target element');
1097
+ await driver.executeScript("mobile: swipe", [{
1098
+ velocity: 2500,
1099
+ direction: "down",
1100
+ elementId: e.elementId
1101
+ }]);
1102
+
1103
+ === "Python"
1104
+
1105
+ ```python
1106
+ e = driver.find_element(by=AppiumBy.ACCESSIBILITY_ID, value='target element')
1107
+ driver.execute_script("mobile: swipe", {
1108
+ "velocity": 2500,
1109
+ "direction": "down",
1110
+ "elementId": e.id
1111
+ })
1112
+ ```
1113
+
1114
+ === "Ruby"
1115
+
1116
+ ```ruby
1117
+ e = driver.find_element :accessibility_id, 'target element'
1118
+ driver.execute_script 'mobile: swipe', {
1119
+ velocity: 2500,
1120
+ direction: 'down',
1121
+ elementId: e.ref
1122
+ }
1123
+ ```
1124
+
1125
+ === "C#"
1126
+
1127
+ ```csharp
1128
+ var e = driver.FindElement(By.AccessibilityId("target element"))
1129
+ driver.ExecuteScript("mobile: swipe", new Dictionary<string, object>() {
1130
+ {"elementId", element.Id},
1131
+ {"direction", "down" },
1132
+ {"velocity", 2500 }
1133
+ });
1134
+ ```
1135
+
1136
+ #### References
1137
+
1138
+ - [swipeDown](https://developer.apple.com/documentation/xctest/xcuielement/1618664-swipedown?language=objc)
1139
+ - [swipeDownWithVelocity:](https://developer.apple.com/documentation/xctest/xcuielement/3551694-swipedownwithvelocity?language=objc)
1140
+ - [swipeUp](https://developer.apple.com/documentation/xctest/xcuielement/1618667-swipeup?language=objc)
1141
+ - [swipeUpWithVelocity:](https://developer.apple.com/documentation/xctest/xcuielement/3551697-swipeupwithvelocity?language=objc)
1142
+ - [swipeLeft](https://developer.apple.com/documentation/xctest/xcuielement/1618668-swipeleft?language=objc)
1143
+ - [swipeLeftWithVelocity:](https://developer.apple.com/documentation/xctest/xcuielement/3551695-swipeleftwithvelocity?language=objc)
1144
+ - [swipeRight](https://developer.apple.com/documentation/xctest/xcuielement/1618674-swiperight?language=objc)
1145
+ - [swipeRightWithVelocity:](https://developer.apple.com/documentation/xctest/xcuielement/3551696-swiperightwithvelocity?language=objc)
1146
+
1147
+ ### mobile: scroll
1148
+
1149
+ Scrolls the element or the whole screen. Different scrolling strategies are supported.
1150
+ Arguments define the chosen strategy: either 'name', 'direction', 'predicateString' or
1151
+ 'toVisible' in that order. All strategies are exclusive and only one strategy
1152
+ can be applied at a single moment of time. Use "mobile: scroll" to emulate precise
1153
+ scrolling in tables or collection views, where it is already known to which element
1154
+ the scrolling should be performed. Although, there is one known limitation there: in case
1155
+ it is necessary to perform too many scroll gestures on parent container to reach the
1156
+ necessary child element (tens of them) then the method call may fail.
1157
+ _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.
1158
+
1159
+ #### Arguments
1160
+
1161
+ Name | Type | Required | Description | Example
1162
+ --- | --- | --- | --- | ---
1163
+ 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
1164
+ 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
1165
+ 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
1166
+ 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"
1167
+ 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
1168
+
1169
+ #### Examples
1170
+
1171
+ === "Java"
1172
+
1173
+ ```java
1174
+ driver.executeScript("mobile: scroll", ImmutableMap.of(
1175
+ "direction", "down"
1176
+ ));
1177
+ ```
1178
+
1179
+ === "JS (WebdriverIO)"
1180
+
1181
+ ```js
1182
+ await driver.executeScript('mobile: scroll', [{
1183
+ direction: 'down'
1184
+ }]);
1185
+
1186
+ === "Python"
1187
+
1188
+ ```python
1189
+ driver.execute_script("mobile: scroll", {
1190
+ "direction": "down"
1191
+ })
1192
+ ```
1193
+
1194
+ === "Ruby"
1195
+
1196
+ ```ruby
1197
+ driver.execute_script 'mobile: scroll', {
1198
+ direction: 'down'
1199
+ }
1200
+ ```
1201
+
1202
+ === "C#"
1203
+
1204
+ ```csharp
1205
+ driver.ExecuteScript("mobile: scroll", new Dictionary<string, object>() {
1206
+ {"direction", "down"}
1207
+ });
1208
+ ```
1209
+
1210
+ ### mobile: pinch
1211
+
1212
+ Performs pinch gesture on the given element or on the application element.
1213
+
1214
+ #### Arguments
1215
+
1216
+ Name | Type | Required | Description | Example
1217
+ --- | --- | --- | --- | ---
1218
+ 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
1219
+ 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
1220
+ velocity | number | yes | The velocity of the pinch in scale factor per second (float value) | 2.2
1221
+
1222
+ #### Examples
1223
+
1224
+ === "Java"
1225
+
1226
+ ```java
1227
+ RemoteWebElement e = driver.findElement(AppiumBy.accessibilityId("target element"));
1228
+ driver.executeScript("mobile: pinch", ImmutableMap.of(
1229
+ "scale", 0.5,
1230
+ "velocity", 1.1,
1231
+ "elementId", e.getId()
1232
+ ));
1233
+ ```
1234
+
1235
+ === "JS (WebdriverIO)"
1236
+
1237
+ ```js
1238
+ const e = await $('~target element');
1239
+ await driver.executeScript('mobile: pinch', [{
1240
+ scale: 0.5,
1241
+ velocity: 1.1,
1242
+ elementId: e.elementId
1243
+ }]);
1244
+
1245
+ === "Python"
1246
+
1247
+ ```python
1248
+ e = driver.find_element(by=AppiumBy.ACCESSIBILITY_ID, value='target element')
1249
+ driver.execute_script("mobile: pinch", {
1250
+ "scale": 0.5,
1251
+ "velocity": 1.1,
1252
+ "elementId": e.id
1253
+ })
1254
+ ```
1255
+
1256
+ === "Ruby"
1257
+
1258
+ ```ruby
1259
+ e = driver.find_element :accessibility_id, 'target element'
1260
+ driver.execute_script 'mobile: pinch', {
1261
+ scale: 0.5,
1262
+ velocity: 1.1,
1263
+ elementId: e.ref
1264
+ }
1265
+ ```
1266
+
1267
+ === "C#"
1268
+
1269
+ ```csharp
1270
+ var e = driver.FindElement(By.AccessibilityId("target element"))
1271
+ driver.ExecuteScript("mobile: pinch", new Dictionary<string, object>() {
1272
+ {"elementId", element.Id},
1273
+ {"scale", 0.5 },
1274
+ {"velocity", 1.1 },
1275
+ });
1276
+ ```
1277
+
1278
+ #### Reference
1279
+
1280
+ [pinchWithScale:velocity:](https://developer.apple.com/documentation/xctest/xcuielement/1618669-pinchwithscale?language=objc)
1281
+
1282
+ ### mobile: doubleTap
1283
+
1284
+ Performs double tap gesture on the given element or on the screen.
1285
+
1286
+ #### Arguments
1287
+
1288
+ Name | Type | Required | Description | Example
1289
+ --- | --- | --- | --- | ---
1290
+ 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
1291
+ x | number | no | Horizontal coordinate offset. | 100
1292
+ y | number | no | Vertical coordinate offset. | 100
1293
+
1294
+ #### Examples
1295
+
1296
+ === "Java"
1297
+
1298
+ ```java
1299
+ RemoteWebElement e = driver.findElement(AppiumBy.accessibilityId("target element"));
1300
+ driver.executeScript("mobile: doubleTap", ImmutableMap.of(
1301
+ "elementId", e.getId()
1302
+ ));
1303
+ ```
1304
+
1305
+ === "JS (WebdriverIO)"
1306
+
1307
+ ```js
1308
+ const e = await $('~target element');
1309
+ await driver.executeScript('mobile: doubleTap', [{
1310
+ elementId: e.elementId
1311
+ }]);
1312
+
1313
+ === "Python"
1314
+
1315
+ ```python
1316
+ e = driver.find_element(by=AppiumBy.ACCESSIBILITY_ID, value='target element')
1317
+ driver.execute_script("mobile: doubleTap", {
1318
+ "elementId": e.id
1319
+ })
1320
+ ```
1321
+
1322
+ === "Ruby"
1323
+
1324
+ ```ruby
1325
+ e = driver.find_element :accessibility_id, 'target element'
1326
+ driver.execute_script 'mobile: doubleTap', {
1327
+ elementId: e.ref
1328
+ }
1329
+ ```
1330
+
1331
+ === "C#"
1332
+
1333
+ ```csharp
1334
+ var e = driver.FindElement(By.AccessibilityId("target element"))
1335
+ driver.ExecuteScript("mobile: doubleTap", new Dictionary<string, object>() {
1336
+ {"elementId", element.Id}
1337
+ });
1338
+ ```
1339
+
1340
+ ### mobile: touchAndHold
1341
+
1342
+ Performs long press gesture on the given element or on the screen.
1343
+
1344
+ #### Arguments
1345
+
1346
+ Name | Type | Required | Description | Example
1347
+ --- | --- | --- | --- | ---
1348
+ 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
1349
+ duration | number | yes | The float duration of press action in seconds | 1.5
1350
+ x | number | no | Horizontal coordinate offset. | 100
1351
+ y | number | no | Vertical coordinate offset. | 100
1352
+
1353
+ #### Examples
1354
+
1355
+ === "Java"
1356
+
1357
+ ```java
1358
+ RemoteWebElement e = driver.findElement(AppiumBy.accessibilityId("target element"));
1359
+ driver.executeScript("mobile: touchAndHold", ImmutableMap.of(
1360
+ "elementId", e.getId(),
1361
+ "duration", 2.0
1362
+ ));
1363
+ ```
1364
+
1365
+ === "JS (WebdriverIO)"
1366
+
1367
+ ```js
1368
+ const e = await $('~target element');
1369
+ await driver.executeScript('mobile: touchAndHold', [{
1370
+ elementId: e.elementId,
1371
+ duration: 2.0
1372
+ }]);
1373
+
1374
+ === "Python"
1375
+
1376
+ ```python
1377
+ e = driver.find_element(by=AppiumBy.ACCESSIBILITY_ID, value='target element')
1378
+ driver.execute_script("mobile: touchAndHold", {
1379
+ "elementId": e.id,
1380
+ "duration": 2.0
1381
+ })
1382
+ ```
1383
+
1384
+ === "Ruby"
1385
+
1386
+ ```ruby
1387
+ e = driver.find_element :accessibility_id, 'target element'
1388
+ driver.execute_script 'mobile: touchAndHold', {
1389
+ elementId: e.ref,
1390
+ duration: 2.0
1391
+ }
1392
+ ```
1393
+
1394
+ === "C#"
1395
+
1396
+ ```csharp
1397
+ var e = driver.FindElement(By.AccessibilityId("target element"))
1398
+ driver.ExecuteScript("mobile: touchAndHold", new Dictionary<string, object>() {
1399
+ {"elementId", element.Id},
1400
+ {"duration", 2.0}
1401
+ });
1402
+ ```
1403
+
1404
+ #### Reference
1405
+
1406
+ [pressForDuration:](https://developer.apple.com/documentation/xctest/xcuielement/1618663-pressforduration?language=objc)
1407
+
1408
+ ### mobile: twoFingerTap
1409
+
1410
+ Performs two finger tap gesture on the given element or on the application element.
1411
+
1412
+ #### Arguments
1413
+
1414
+ Name | Type | Required | Description | Example
1415
+ --- | --- | --- | --- | ---
1416
+ 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
1417
+
1418
+ #### Examples
1419
+
1420
+ === "Java"
1421
+
1422
+ ```java
1423
+ RemoteWebElement e = driver.findElement(AppiumBy.accessibilityId("target element"));
1424
+ driver.executeScript("mobile: twoFingerTap", ImmutableMap.of(
1425
+ "elementId", e.getId()
1426
+ ));
1427
+ ```
1428
+
1429
+ === "JS (WebdriverIO)"
1430
+
1431
+ ```js
1432
+ const e = await $('~target element');
1433
+ await driver.executeScript('mobile: twoFingerTap', [{
1434
+ elementId: e.elementId
1435
+ }]);
1436
+
1437
+ === "Python"
1438
+
1439
+ ```python
1440
+ e = driver.find_element(by=AppiumBy.ACCESSIBILITY_ID, value='target element')
1441
+ driver.execute_script("mobile: twoFingerTap", {
1442
+ "elementId": e.id
1443
+ })
1444
+ ```
1445
+
1446
+ === "Ruby"
1447
+
1448
+ ```ruby
1449
+ e = driver.find_element :accessibility_id, 'target element'
1450
+ driver.execute_script 'mobile: twoFingerTap', {
1451
+ elementId: e.ref
1452
+ }
1453
+ ```
1454
+
1455
+ === "C#"
1456
+
1457
+ ```csharp
1458
+ var e = driver.FindElement(By.AccessibilityId("target element"))
1459
+ driver.ExecuteScript("mobile: twoFingerTap", new Dictionary<string, object>() {
1460
+ {"elementId", element.Id}
1461
+ });
1462
+ ```
1463
+
1464
+ #### Reference
1465
+
1466
+ [twoFingerTap](https://developer.apple.com/documentation/xctest/xcuielement/1618675-twofingertap?language=objc)
1467
+
1468
+ ### mobile: tap
1469
+
1470
+ Performs tap gesture by coordinates on the given element or on the screen.
1471
+
1472
+ #### Arguments
1473
+
1474
+ Name | Type | Required | Description | Example
1475
+ --- | --- | --- | --- | ---
1476
+ 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
1477
+ x | number | yes | Horizontal coordinate offset. | 100
1478
+ y | number | yes | Vertical coordinate offset. | 100
1479
+
1480
+ ### mobile: dragFromToForDuration
1481
+
1482
+ Performs drag and drop gesture by coordinates. This can be done either on an element or
1483
+ on the screen
1484
+
1485
+ #### Arguments
1486
+
1487
+ Name | Type | Required | Description | Example
1488
+ --- | --- | --- | --- | ---
1489
+ 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
1490
+ 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
1491
+ fromX | number | yes | The x coordinate of starting drag point | 100
1492
+ fromY | number | yes | The y coordinate of starting drag point | 100
1493
+ toX | number | yes | The x coordinate of ending drag point | 200
1494
+ toY | number | yes | The y coordinate of ending drag point | 200
1495
+
1496
+ #### Examples
1497
+
1498
+ === "Java"
1499
+
1500
+ ```java
1501
+ RemoteWebElement e = driver.findElement(AppiumBy.accessibilityId("target element"));
1502
+ driver.executeScript("mobile: dragFromToForDuration", ImmutableMap.of(
1503
+ "elementId", e.getId(),
1504
+ "duration", 1.0,
1505
+ "fromX", 100,
1506
+ "fromY", 100,
1507
+ "toX", 200,
1508
+ "toY", 200
1509
+ ));
1510
+ ```
1511
+
1512
+ === "JS (WebdriverIO)"
1513
+
1514
+ ```js
1515
+ const e = await $('~target element');
1516
+ await driver.executeScript('mobile: dragFromToForDuration', [{
1517
+ elementId: e.elementId,
1518
+ duration: 1.0,
1519
+ fromX: 100,
1520
+ fromY: 100,
1521
+ toX: 200,
1522
+ toY: 200
1523
+ }]);
1524
+
1525
+ === "Python"
1526
+
1527
+ ```python
1528
+ e = driver.find_element(by=AppiumBy.ACCESSIBILITY_ID, value='target element')
1529
+ driver.execute_script("mobile: dragFromToForDuration", {
1530
+ "elementId": e.id,
1531
+ "duration": 1.0,
1532
+ "fromX": 100,
1533
+ "fromY": 100,
1534
+ "toX": 200,
1535
+ "toY": 200
1536
+ })
1537
+ ```
1538
+
1539
+ === "Ruby"
1540
+
1541
+ ```ruby
1542
+ e = driver.find_element :accessibility_id, 'target element'
1543
+ driver.execute_script 'mobile: dragFromToForDuration', {
1544
+ elementId: e.ref,
1545
+ duration: 1.0,
1546
+ fromX: 100,
1547
+ fromY: 100,
1548
+ toX: 200,
1549
+ toY: 200
1550
+ }
1551
+ ```
1552
+
1553
+ === "C#"
1554
+
1555
+ ```csharp
1556
+ var e = driver.FindElement(By.AccessibilityId("target element"))
1557
+ driver.ExecuteScript("mobile: dragFromToForDuration", new Dictionary<string, object>() {
1558
+ {"elementId", element.Id},
1559
+ {"duration", 1.0,}
1560
+ {"fromX", 100},
1561
+ {"fromY", 100},
1562
+ {"toX", 200},
1563
+ {"toY", 200}
1564
+ });
1565
+ ```
1566
+
1567
+
1568
+ #### Reference
1569
+
1570
+ [clickForDuration:thenDragToElement:](https://developer.apple.com/documentation/xctest/xcuielement/1500989-clickforduration?language=objc)
1571
+
1572
+ ### mobile: dragFromToWithVelocity
1573
+
1574
+ 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.
1575
+
1576
+ #### Arguments
1577
+
1578
+ Name | Type | Required | Description | Example
1579
+ --- | --- | --- | --- | ---
1580
+ 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
1581
+ 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
1582
+ 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
1583
+ 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
1584
+ 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
1585
+ fromX | number | no | The x coordinate of starting drag point. Must be provided if `fromElementId` is not defined | 100
1586
+ fromY | number | no | The y coordinate of starting drag point. Must be provided if `fromElementId` is not defined | 100
1587
+ toX | number | no | The x coordinate of ending drag point. Must be provided if `fromElementId` is not defined | 200
1588
+ toY | number | no | The y coordinate of ending drag point. Must be provided if `fromElementId` is not defined | 200
1589
+
1590
+ #### References
1591
+
1592
+ [pressForDuration:thenDragToElement:withVelocity:thenHoldForDuration:](https://developer.apple.com/documentation/xctest/xcuielement/3551693-pressforduration?language=objc)
1593
+ [pressForDuration:thenDragToCoordinate:withVelocity:thenHoldForDuration:](https://developer.apple.com/documentation/xctest/xcuicoordinate/3551692-pressforduration?language=objc)
1594
+
1595
+ ### mobile: rotateElement
1596
+
1597
+ Performs [rotate](https://developer.apple.com/documentation/xctest/xcuielement/1618665-rotate?language=objc) gesture on the given element.
1598
+
1599
+ #### Arguments
1600
+
1601
+ Name | Type | Required | Description | Example
1602
+ --- | --- | --- | --- | ---
1603
+ 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
1604
+ rotation | number | yes | The rotation of the gesture in radians | Math.PI
1605
+ velocity | number | yes | The velocity of the rotation gesture in radians per second | Math.PI / 4
1606
+
1607
+ #### Examples
1608
+
1609
+
1610
+ === "Java"
1611
+
1612
+ ```java
1613
+ RemoteWebElement e = driver.findElement(AppiumBy.accessibilityId("target element"));
1614
+ driver.executeScript("mobile: rotateElement", ImmutableMap.of(
1615
+ // rotate clockwise, 90 degrees
1616
+ "rotation", -Math.PI / 2,
1617
+ // in approximately two seconds
1618
+ "velocity", Math.PI / 4,
1619
+ "elementId", e.getId()
1620
+ ));
1621
+ ```
1622
+
1623
+ === "JS (WebdriverIO)"
1624
+
1625
+ ```js
1626
+ const e = await $('~target element');
1627
+ await driver.executeScript('mobile: rotateElement', [{
1628
+ rotation: -Math.PI / 2,
1629
+ velocity: Math.PI / 4,
1630
+ elementId: e.elementId
1631
+ }]);
1632
+ ```
1633
+
1634
+ === "Python"
1635
+
1636
+ ```python
1637
+ e = driver.find_element(by=AppiumBy.ACCESSIBILITY_ID, value='target element')
1638
+ driver.execute_script("mobile: rotateElement", {
1639
+ "rotation": -math.pi / 2,
1640
+ "velocity": math.pi / 4,
1641
+ "elementId": e.id
1642
+ })
1643
+ ```
1644
+
1645
+ === "Ruby"
1646
+
1647
+ ```ruby
1648
+ e = driver.find_element :accessibility_id, 'target element'
1649
+ driver.execute_script 'mobile: rotateElement', {
1650
+ elementId: e.ref,
1651
+ rotation: PI / 2,
1652
+ velocity: PI / 4
1653
+ }
1654
+ ```
1655
+
1656
+ === "C#"
1657
+
1658
+ ```csharp
1659
+ var e = driver.FindElement(By.AccessibilityId("target element"))
1660
+ driver.ExecuteScript("mobile: rotateElement", new Dictionary<string, object>() {
1661
+ {"elementId", element.Id},
1662
+ {"rotation", -Math.PI / 2 },
1663
+ {"velocity", Math.PI / 4 },
1664
+ });
1665
+ ```
1666
+
1667
+
1668
+ #### Reference
1669
+
1670
+ [rotate:withVelocity:](https://developer.apple.com/documentation/xctest/xcuielement/1618665-rotate?language=objc)
1671
+
1672
+ ### mobile: tapWithNumberOfTaps
1673
+
1674
+ Sends one or more taps with one or more touch points since Appium 1.17.1.
1675
+
1676
+ #### Arguments
1677
+
1678
+ Name | Type | Required | Description | Example
1679
+ --- | --- | --- | --- | ---
1680
+ 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
1681
+ numberOfTaps | number | no | The number of taps. 1 by default | 2
1682
+ numberOfTouches | number | no | The number of touch points. 1 by default | 2
1683
+
1684
+ #### Examples
1685
+
1686
+ === "Java"
1687
+
1688
+ ```java
1689
+ RemoteWebElement e = driver.findElement(AppiumBy.accessibilityId("target element"));
1690
+ var result = driver.executeScript("mobile: tapWithNumberOfTaps", Map.of(
1691
+ "elementId", e.getId(),
1692
+ "numberOfTaps", 2,
1693
+ "numberOfTouches", 1,
1694
+ ));
1695
+ ```
1696
+
1697
+ === "JS (WebdriverIO)"
1698
+
1699
+ ```js
1700
+ const e = await $('~target element');
1701
+ await driver.executeScript('mobile: tapWithNumberOfTaps', [{
1702
+ elementId: e.elementId,
1703
+ numberOfTaps: 2,
1704
+ numberOfTouches: 1
1705
+ }]);
1706
+ ```
1707
+
1708
+ === "Python"
1709
+
1710
+ ```python
1711
+ e = driver.find_element(by=AppiumBy.ACCESSIBILITY_ID, value='target element')
1712
+ driver.execute_script("mobile: tapWithNumberOfTaps", {
1713
+ "elementId": e.id,
1714
+ "numberOfTaps": 2,
1715
+ "numberOfTouches": 1
1716
+ })
1717
+ ```
1718
+
1719
+ === "Ruby"
1720
+
1721
+ ```ruby
1722
+ e = driver.find_element :accessibility_id, 'target element'
1723
+ driver.execute_script 'mobile: tapWithNumberOfTaps', {
1724
+ elementId: e.ref,
1725
+ numberOfTaps: 2,
1726
+ numberOfTouches: 1
1727
+ }
1728
+ ```
1729
+
1730
+ === "C#"
1731
+
1732
+ ```csharp
1733
+ var e = driver.FindElement(By.AccessibilityId("target element"))
1734
+ driver.ExecuteScript("mobile: touchAndHold", new Dictionary<string, object>() {
1735
+ {"elementId", element.Id},
1736
+ {"numberOfTaps", 2 },
1737
+ {"numberOfTouches", 1 },
1738
+ });
1739
+ ```
1740
+
1741
+ - numberOfTaps=1, numberOfTouches=1 -> "vanilla" single tap
1742
+ - numberOfTaps=2, numberOfTouches=1 -> double tap
1743
+ - numberOfTaps=3, numberOfTouches=1 -> triple tap
1744
+ - numberOfTaps=2, numberOfTouches=2 -> double tap with two fingers
1745
+
1746
+ #### Reference
1747
+ [tapWithNumberOfTaps:numberOfTouches:](https://developer.apple.com/documentation/xctest/xcuielement/1618671-tapwithnumberoftaps)
1748
+
1749
+ ### mobile: forcePress
1750
+
1751
+ Emulates force press on the given element/coordinates.
1752
+ An error is thrown if the target device does not support force press gesture.
1753
+
1754
+ #### Arguments
1755
+
1756
+ Name | Type | Required | Description | Example
1757
+ --- | --- | --- | --- | ---
1758
+ 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
1759
+ 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
1760
+ 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
1761
+ 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
1762
+ 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
1763
+
1764
+ ### mobile: scrollToElement
1765
+
1766
+ 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.
1767
+ This API uses native XCTest calls, so it performs scrolling pretty fast. The same native call is
1768
+ 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.
1769
+ This extension is available since the driver version 4.7.0.
1770
+
1771
+ #### Arguments
1772
+
1773
+ Name | Type | Required | Description | Example
1774
+ --- | --- | --- | --- | ---
1775
+ 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
1776
+
1777
+ ### mobile: resetLocationService
1778
+
1779
+ Reset the location service on real device since Appium 1.22.0.
1780
+ It could delay a few seconds to reflect the location by the system.
1781
+ It raises an error if the device is simulator or an error occurred during the reset.
1782
+
1783
+ ### mobile: enableConditionInducer
1784
+
1785
+ Important: Device conditions are available for real devices running iOS 13.0 and later.
1786
+
1787
+ 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.
1788
+
1789
+ ```
1790
+ mobile: enableConditionInducer
1791
+ mobile: disableConditionInducer
1792
+ mobile: listConditionInducers
1793
+ ```
1794
+
1795
+ The above three extensions are available since the driver version 4.9.0.
1796
+
1797
+ You can create a condition on a connected device to test your app under adverse conditions, such as poor network connectivity or thermal constraints.
1798
+
1799
+ 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.
1800
+
1801
+ Reference: [Test under adverse device conditions (iOS)](https://help.apple.com/xcode/mac/current/#/dev308429d42)
1802
+
1803
+ Name | Type | Required | Description | Example
1804
+ --- | --- | --- | --- | ---
1805
+ conditionID | string | yes | Get the conditionID parameter through the command `mobile: availableConditionInducer` | SlowNetworkCondition
1806
+ profileID | string | yes | Get the profileID parameter through the command `mobile: availableConditionInducer` | SlowNetwork100PctLoss
1807
+
1808
+ #### Returned Result
1809
+
1810
+ Either `true` or `false`, where `true` means enabling of the condition inducer has been successful
1811
+
1812
+ ### mobile: listConditionInducers
1813
+
1814
+ Get all condition inducer configuration profiles
1815
+
1816
+ #### Returned Result
1817
+
1818
+ The response looks like
1819
+
1820
+ ```
1821
+ [{
1822
+ "profiles": [
1823
+ {
1824
+ "name": "100% packet loss",
1825
+ "identifier": "SlowNetwork100PctLoss", // enableConditionInducer profileID
1826
+ "description": "Name: 100% Loss Scenario
1827
+ Downlink Bandwidth: 0 Mbps
1828
+ Downlink Latency: 0 ms
1829
+ Downlink Packet Loss Ratio: 100%
1830
+ Uplink Bandwidth: 0 Mbps
1831
+ Uplink Latency: 0 ms
1832
+ Uplink Packet Loss Ratio: 100%"
1833
+ },
1834
+ ],
1835
+ "profilesSorted": true,
1836
+ "identifier": "SlowNetworkCondition", // enableConditionInducer conditionID
1837
+ "isDestructive": false,
1838
+ "isInternal": false,
1839
+ "activeProfile": "",
1840
+ "name": "Network Link",
1841
+ "isActive": false
1842
+ }]
1843
+ ```
1844
+
1845
+ ### mobile: disableConditionInducer
1846
+
1847
+ Disable device condition inducer.
1848
+
1849
+ Usually a persistent connection is maintained after enable the condition inducer, and this method is only valid for this connection.
1850
+
1851
+ If the connection is disconnected, condition inducer will be automatically disabled
1852
+
1853
+ #### Returned Result
1854
+
1855
+ Either `true` or `false`, where `true` means disabling of the condition inducer has been successful
1856
+
1857
+ ### mobile: calibrateWebToRealCoordinatesTranslation
1858
+
1859
+ Calibrates web to real coordinates translation.
1860
+ This API can only be called from Safari web context.
1861
+ It must load a custom page to the browser, and then restore
1862
+ the original one, so don't call it if you can potentially
1863
+ lose the current web app state.
1864
+ The outcome of this API is then used if `nativeWebTap` capability/setting is enabled.
1865
+ The returned value could also be used to manually transform web coordinates
1866
+ to real device ones in client scripts.
1867
+
1868
+ It is advised to call this API at least once before changing the device orientation
1869
+ or device screen layout as the recetly received value is cached for the session lifetime
1870
+ and may become obsolete.
1871
+
1872
+ It is advised to enable `nativeWebTapStrict` capability/setting to speed up dynamic coordinates
1873
+ transformation if you use this extension.
1874
+
1875
+ #### Returned Result
1876
+
1877
+ An object with three properties used to properly shift Safari web element coordinates into native context:
1878
+ - `offsetX`: Webview X offset in real coordinates
1879
+ - `offsetY`: Webview Y offset in real coordinates
1880
+ - `pixelRatioX`: Webview X pixel ratio
1881
+ - `pixelRatioY`: Webview Y pixel ratio
1882
+
1883
+ The following formulas are used for coordinates translation:
1884
+ `RealX = offsetX + webviewX * pixelRatioX`
1885
+ `RealY = offsetY + webviewY * pixelRatioY`
1886
+
1887
+ ### mobile: updateSafariPreferences
1888
+
1889
+ Updates preferences of Mobile Safari on Simulator
1890
+
1891
+ #### Arguments
1892
+
1893
+ Name | Type | Required | Description | Example
1894
+ --- | --- | --- | --- | ---
1895
+ 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 }
1896
+
1897
+ ### mobile: deepLink
1898
+
1899
+ Opens the given URL with the default or the given application.
1900
+ This functionality is only available since xcuitest driver version 4.17.
1901
+ Xcode must be at version 14.3+ and iOS must be at version 16.4+.
1902
+
1903
+ #### Arguments
1904
+
1905
+ Name | Type | Required | Description | Example
1906
+ --- | --- | --- | --- | ---
1907
+ url | string | yes | The URL to be opened. This parameter is manadatory. | https://apple.com, myscheme:yolo
1908
+ 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
1909
+
1910
+ ### mobile: getSimulatedLocation
1911
+
1912
+ Retrieves simulated geolocation value.
1913
+ This functionality is only available since xcuitest driver version 4.18.
1914
+ Xcode must be at version 14.3+ and iOS must be at version 16.4+.
1915
+
1916
+ #### Returned Result
1917
+
1918
+ This API returns a map with the following entries:
1919
+
1920
+ Name | Type | Description | Example
1921
+ --- | --- | --- | ---
1922
+ 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
1923
+ 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
1924
+
1925
+ ### mobile: setSimulatedLocation
1926
+
1927
+ Sets simulated geolocation value.
1928
+ This functionality is only available since xcuitest driver version 4.18.
1929
+ Xcode must be at version 14.3+ and iOS must be at version 16.4+.
1930
+
1931
+ It is recommended for iOS 17+ real devices to simulate the device location.
1932
+
1933
+ #### Arguments
1934
+
1935
+ Name | Type | Required | Description | Example
1936
+ --- | --- | --- | --- | ---
1937
+ latitude | number | yes | Measurement of distance north or south of the Equator. | 50.08546
1938
+ longitude | number | yes | Measurement of distance east or west of the prime meridian. | -20.12345
1939
+
1940
+ ### mobile: resetSimulatedLocation
1941
+
1942
+ Resets the previously set simulated geolocation value.
1943
+ This functionality is only available since xcuitest driver version 4.18.
1944
+ Xcode must be at version 14.3+ and iOS must be at version 16.4+.
1945
+
1946
+ > **Warning**
1947
+ > Do not forget to reset the simulated geolocation value after your automated test is finished.
1948
+ > If the value is not reset explicitly then the simulated one will remain until the next device restart.
1949
+
1950
+ ### mobile: getAppStrings
1951
+
1952
+ Retrieves string resources for the given app language. An error is thrown if strings cannot be fetched or no strings exist
1953
+ for the given language abbreviation
1954
+
1955
+ #### Arguments
1956
+
1957
+ Name | Type | Required | Description | Example
1958
+ --- | --- | --- | --- | ---
1959
+ 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
1960
+ stringFile | string | no | Relative path to the corresponding .strings file starting from the corresponding .lproj folder | base/main.strings
1961
+
1962
+ #### Returned Result
1963
+
1964
+ App strings map, where keys are resource identifiers.
1965
+
1966
+ ### mobile: hideKeyboard
1967
+
1968
+ 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.
1969
+
1970
+ #### Arguments
1971
+
1972
+ Name | Type | Required | Description | Example
1973
+ --- | --- | --- | --- | ---
1974
+ keys | string[] | no | One or more keyboard key names used to close/hide it. On tablet's such button is usually called 'done'.
1975
+
1976
+ ### mobile: isKeyboardShown
1977
+
1978
+ Checks if the system on-screen keyboard is visible.
1979
+
1980
+ #### Returned Result
1981
+
1982
+ `true` if the keyboard is visible
1983
+
1984
+ ### mobile: keys
1985
+
1986
+ Send keys to the given element or to the application under test.
1987
+ This API is only supported since Xcode 15/iOS 17.
1988
+ It is not supported on tvOS.
1989
+ The API only works on iPad. On iOS calling it has no effect.
1990
+
1991
+ #### Arguments
1992
+
1993
+ Name | Type | Required | Description | Example
1994
+ --- | --- | --- | --- | ---
1995
+ 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
1996
+ 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'] |
1997
+
1998
+ !!! note
1999
+
2000
+ The `modifierFlags` argument is of `unsigned long` type and defines the bitmask with depressed modifier keys for the given key.
2001
+ XCTest defines the following possible bitmasks for modifier keys:
2002
+
2003
+ <pre>
2004
+ typedef NS_OPTIONS(NSUInteger, XCUIKeyModifierFlags) {
2005
+ XCUIKeyModifierNone = 0,
2006
+ XCUIKeyModifierCapsLock = (1UL << 0),
2007
+ XCUIKeyModifierShift = (1UL << 1),
2008
+ XCUIKeyModifierControl = (1UL << 2),
2009
+ XCUIKeyModifierOption = (1UL << 3),
2010
+ XCUIKeyModifierCommand = (1UL << 4),
2011
+ XCUIKeyModifierFunction = (1UL << 5),
2012
+ // These values align with UIKeyModifierFlags and CGEventFlags.
2013
+ XCUIKeyModifierAlphaShift = XCUIKeyModifierCapsLock,
2014
+ XCUIKeyModifierAlternate = XCUIKeyModifierOption,
2015
+ };
2016
+ </pre>
2017
+
2018
+ So, for example, if you want Ctrl and Shift to be depressed while entering your key then `modifierFlags` should be set to
2019
+ `(1 << 1) | (1 << 2)`, where the first constant defines `XCUIKeyModifierShift` and the seconds
2020
+ one - `XCUIKeyModifierControl`. We apply the [bitwise or](https://www.programiz.com/c-programming/bitwise-operators#or)
2021
+ (`|`) operator between them to raise both bitflags
2022
+ in the resulting value. The [left bitshift](https://www.programiz.com/c-programming/bitwise-operators#left-shift)
2023
+ (`<<`) operator defines the binary bitmask for the given modifier key.
2024
+ You may combine more keys using the same approach.
2025
+
2026
+ ### mobile: lock
2027
+
2028
+ Lock the device (and optionally unlock it after a certain amount of time). Only simple (e.g. without a password) locks are supported.
2029
+
2030
+ #### Arguments
2031
+
2032
+ Name | Type | Required | Description | Example
2033
+ --- | --- | --- | --- | ---
2034
+ 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
2035
+
2036
+ ### mobile: unlock
2037
+
2038
+ Unlocks the previously locked device. Only simple (e.g. without a password) locks are supported.
2039
+
2040
+ ### mobile: isLocked
2041
+
2042
+ Determine whether the device is locked.
2043
+
2044
+ #### Returned Result
2045
+
2046
+ Either `true` or `false`
2047
+
2048
+ ### mobile: shake
2049
+
2050
+ Shakes the device. This functionality is only supported on simulators.
2051
+
2052
+ ### mobile: backgroundApp
2053
+
2054
+ Puts the app to the background and waits the given number of seconds. Then restores the app
2055
+ if necessary. The call is blocking.
2056
+
2057
+ #### Arguments
2058
+
2059
+ Name | Type | Required | Description | Example
2060
+ --- | --- | --- | --- | ---
2061
+ 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
2062
+
2063
+ ### mobile: performAccessibilityAudit
2064
+
2065
+ Performs accessibility audit of the current application according to the given type or multiple types.
2066
+ Wraps the XCTest's [performAccessibilityAuditWithAuditTypes](https://developer.apple.com/documentation/xctest/xcuiapplication/4190847-performaccessibilityauditwithaud?language=objc) API.
2067
+ Only available since Xcode 15/iOS 17.
2068
+
2069
+ #### Arguments
2070
+
2071
+ Name | Type | Required | Description | Example
2072
+ --- | --- | --- | --- | ---
2073
+ 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']
2074
+
2075
+ #### Returned Result
2076
+
2077
+ List of found issues or an empty list. Each list item is a map consisting of the following items:
2078
+
2079
+ Name | Type | Description | Example
2080
+ --- | --- | --- | ---
2081
+ detailedDescription | string | The detailed description of the found accessibility issue. | Some longer issue description
2082
+ compactDescription | string | The compact description of the found accessibility issue. | Some compact issue description
2083
+ 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'
2084
+ element | string | The description of the element this issue was found for. | 'Yes' button
2085
+ 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
2086
+ elementAttributes | dict | JSON object containing various attributes of the element. | See the example below
2087
+
2088
+ ```json
2089
+ "elementAttributes":{
2090
+ "isEnabled":"1",
2091
+ "isVisible":"1",
2092
+ "isAccessible":"0",
2093
+ "frame":"{{129, 65}, {135, 18}}",
2094
+ "isFocused":"0",
2095
+ "rect":{
2096
+ "y":65,
2097
+ "x":129,
2098
+ "width":135,
2099
+ "height":18
2100
+ },
2101
+ "value":"Some Button",
2102
+ "label":"Some Button",
2103
+ "type":"StaticText",
2104
+ "name":"Some Button",
2105
+ "rawIdentifier":null
2106
+ }
2107
+ ```
2108
+
2109
+ ### mobile: startXCTestScreenRecording
2110
+
2111
+ Start a new screen recording via XCTest.
2112
+
2113
+ Since this feature is based on the native implementation provided by Apple
2114
+ it provides the best quality for the least performance penalty in comparison
2115
+ to alternative implementations.
2116
+
2117
+ Even though the feature is available for real devices
2118
+ there is no possibility to delete video files stored on the device yet,
2119
+ which may lead to internal storage overload.
2120
+ That is why it was put under the `xctest_screen_record` security
2121
+ feature flag if executed from a real device test.
2122
+
2123
+ If the screen recording is already running this API is a noop.
2124
+
2125
+ The feature is only available since Xcode 15/iOS 17.
2126
+
2127
+ #### Arguments
2128
+
2129
+ Name | Type | Required | Description | Example
2130
+ --- | --- | --- | --- | ---
2131
+ 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
2132
+
2133
+ #### Returned Result
2134
+
2135
+ The API response consists of the following entries:
2136
+
2137
+ Name | Type | Description | Example
2138
+ --- | --- | --- | ---
2139
+ uuid | string | Unique identifier of the video being recorded | 1D988774-C7E2-4817-829D-3B835DDAA7DF
2140
+ fps | number | FPS value | 24
2141
+ codec | number | The magic for the used codec. Value of zero means h264 video codec is being used | 0
2142
+ startedAt | number | The timestamp when the screen recording has started in float seconds since Unix epoch | 1709826124.123
2143
+
2144
+ ### mobile: getXCTestScreenRecordingInfo
2145
+
2146
+ Retrieves information about the current running screen recording.
2147
+ If no screen recording is running then `null` is returned.
2148
+
2149
+ #### Returned Result
2150
+
2151
+ Same as for [mobile: startXCTestScreenRecording](#mobile-startxctestscreenrecording)
2152
+
2153
+ ### mobile: stopXCTestScreenRecording
2154
+
2155
+ Stops the current XCTest screen recording previously started by the
2156
+ [mobile: startXctestScreenRecording](#mobile-startxctestscreenrecording) API.
2157
+
2158
+ An error is thrown if no screen recording is running.
2159
+
2160
+ The resulting movie is returned as base-64 string or is uploaded to
2161
+ a remote location if corresponding options have been provided.
2162
+
2163
+ The resulting movie is automatically deleted from the local file system **FOR SIMULATORS ONLY**.
2164
+ In order to clean it up from a real device it is necessary to properly
2165
+ shut down XCTest by calling `GET /wda/shutdown` API to the WebDriverAgent server running
2166
+ on the device directly or by doing device factory reset.
2167
+
2168
+ #### Arguments
2169
+
2170
+ Name | Type | Required | Description | Example
2171
+ --- | --- | --- | --- | ---
2172
+ 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
2173
+ user | string | no | The name of the user for the remote authentication. Only works if `remotePath` is provided. | myuser
2174
+ pass | string | no | The password for the remote authentication. Only works if `remotePath` is provided. | mypassword
2175
+ method | string | no | The http multipart upload method name. Only works if `remotePath` is provided. `PUT` by default | POST
2176
+ headers | dict | no | Additional headers mapping for multipart http(s) uploads | {'User-Agent': 'Myserver 1.0'}
2177
+ 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
2178
+ formFields | dict or array | no | Additional form fields for multipart http(s) uploads | {'field2': 'value2'}
2179
+
2180
+ #### Returned Result
2181
+
2182
+ Same as for [mobile: startXCTestScreenRecording](#mobile-startxctestscreenrecording) plus the below entry:
2183
+
2184
+ Name | Type | Description | Example
2185
+ --- | --- | --- | ---
2186
+ 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....`
2187
+
2188
+ ### mobile: simctl
2189
+
2190
+ Runs the given command as a subcommand of `xcrun simctl` against the device under test.
2191
+ Does not work for real devices.
2192
+
2193
+ #### Arguments
2194
+ Name | Type | Required | Description | Example
2195
+ --- | --- | --- | --- | ---
2196
+ command | string | yes | a subcommand for the `simctl`. Available commands are boot, get_app_container, getenv, icloud_sync, install, install_app_data, io, keychain, launch, 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'`
2197
+ 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']`
2198
+ 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`
2199
+
2200
+ #### Returned Result
2201
+
2202
+ Name | Type | Description | Example
2203
+ --- | --- | --- | ---
2204
+ stdout | string | The standard output of the command. | `'/Users/user/Library/Developer/CoreSimulator/Devices/60EB8FDB-92E0-4895-B466-0153C6DE7BAE/data\n'`
2205
+ stderr | string | The standard error of the command. | `''` (an empty string)
2206
+ code | string | The status code of the command. | `0`