appium-xcuitest-driver 10.14.5 → 10.14.7

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 (280) hide show
  1. package/CHANGELOG.md +12 -0
  2. package/build/lib/commands/active-app-info.d.ts +4 -3
  3. package/build/lib/commands/active-app-info.d.ts.map +1 -1
  4. package/build/lib/commands/active-app-info.js +2 -3
  5. package/build/lib/commands/active-app-info.js.map +1 -1
  6. package/build/lib/commands/app-strings.d.ts +6 -7
  7. package/build/lib/commands/app-strings.d.ts.map +1 -1
  8. package/build/lib/commands/app-strings.js +3 -8
  9. package/build/lib/commands/app-strings.js.map +1 -1
  10. package/build/lib/commands/audit.d.ts +5 -33
  11. package/build/lib/commands/audit.d.ts.map +1 -1
  12. package/build/lib/commands/audit.js +3 -16
  13. package/build/lib/commands/audit.js.map +1 -1
  14. package/build/lib/commands/device-info.d.ts +13 -0
  15. package/build/lib/commands/device-info.d.ts.map +1 -0
  16. package/build/lib/commands/{deviceInfo.js → device-info.js} +3 -8
  17. package/build/lib/commands/device-info.js.map +1 -0
  18. package/build/lib/commands/keychains.d.ts +2 -2
  19. package/build/lib/commands/keychains.d.ts.map +1 -1
  20. package/build/lib/commands/keychains.js +1 -4
  21. package/build/lib/commands/keychains.js.map +1 -1
  22. package/build/lib/commands/localization.d.ts +7 -6
  23. package/build/lib/commands/localization.d.ts.map +1 -1
  24. package/build/lib/commands/localization.js +7 -8
  25. package/build/lib/commands/localization.js.map +1 -1
  26. package/build/lib/commands/types.d.ts +22 -0
  27. package/build/lib/commands/types.d.ts.map +1 -1
  28. package/build/lib/driver.d.ts +1 -1
  29. package/build/lib/driver.d.ts.map +1 -1
  30. package/build/lib/driver.js +1 -1
  31. package/build/lib/driver.js.map +1 -1
  32. package/build/lib/index.d.ts +5 -0
  33. package/build/lib/index.d.ts.map +1 -0
  34. package/build/{index.js → lib/index.js} +2 -2
  35. package/build/lib/index.js.map +1 -0
  36. package/build/test/functional/basic/alert-e2e-specs.d.ts +2 -0
  37. package/build/test/functional/basic/alert-e2e-specs.d.ts.map +1 -0
  38. package/build/test/functional/basic/alert-e2e-specs.js +129 -0
  39. package/build/test/functional/basic/alert-e2e-specs.js.map +1 -0
  40. package/build/test/functional/basic/basic-e2e-specs.d.ts +2 -0
  41. package/build/test/functional/basic/basic-e2e-specs.d.ts.map +1 -0
  42. package/build/test/functional/basic/basic-e2e-specs.js +268 -0
  43. package/build/test/functional/basic/basic-e2e-specs.js.map +1 -0
  44. package/build/test/functional/basic/element-e2e-specs.d.ts +2 -0
  45. package/build/test/functional/basic/element-e2e-specs.d.ts.map +1 -0
  46. package/build/test/functional/basic/element-e2e-specs.js +354 -0
  47. package/build/test/functional/basic/element-e2e-specs.js.map +1 -0
  48. package/build/test/functional/basic/find-e2e-specs.d.ts +2 -0
  49. package/build/test/functional/basic/find-e2e-specs.d.ts.map +1 -0
  50. package/build/test/functional/basic/find-e2e-specs.js +434 -0
  51. package/build/test/functional/basic/find-e2e-specs.js.map +1 -0
  52. package/build/test/functional/basic/gesture-e2e-specs.d.ts +2 -0
  53. package/build/test/functional/basic/gesture-e2e-specs.d.ts.map +1 -0
  54. package/build/test/functional/basic/gesture-e2e-specs.js +211 -0
  55. package/build/test/functional/basic/gesture-e2e-specs.js.map +1 -0
  56. package/build/test/functional/desired.d.ts +26 -0
  57. package/build/test/functional/desired.d.ts.map +1 -0
  58. package/build/test/functional/desired.js +124 -0
  59. package/build/test/functional/desired.js.map +1 -0
  60. package/build/test/functional/device/accessibility-e2e-specs.d.ts +2 -0
  61. package/build/test/functional/device/accessibility-e2e-specs.d.ts.map +1 -0
  62. package/build/test/functional/device/accessibility-e2e-specs.js +117 -0
  63. package/build/test/functional/device/accessibility-e2e-specs.js.map +1 -0
  64. package/build/test/functional/device/file-movement-e2e-specs.d.ts +2 -0
  65. package/build/test/functional/device/file-movement-e2e-specs.d.ts.map +1 -0
  66. package/build/test/functional/device/file-movement-e2e-specs.js +141 -0
  67. package/build/test/functional/device/file-movement-e2e-specs.js.map +1 -0
  68. package/build/test/functional/device/otherApps-e2e-specs.d.ts +2 -0
  69. package/build/test/functional/device/otherApps-e2e-specs.d.ts.map +1 -0
  70. package/build/test/functional/device/otherApps-e2e-specs.js +66 -0
  71. package/build/test/functional/device/otherApps-e2e-specs.js.map +1 -0
  72. package/build/test/functional/device/passwords-e2e-specs.d.ts +2 -0
  73. package/build/test/functional/device/passwords-e2e-specs.d.ts.map +1 -0
  74. package/build/test/functional/device/passwords-e2e-specs.js +91 -0
  75. package/build/test/functional/device/passwords-e2e-specs.js.map +1 -0
  76. package/build/test/functional/device/performance-e2e-specs.d.ts +2 -0
  77. package/build/test/functional/device/performance-e2e-specs.d.ts.map +1 -0
  78. package/build/test/functional/device/performance-e2e-specs.js +72 -0
  79. package/build/test/functional/device/performance-e2e-specs.js.map +1 -0
  80. package/build/test/functional/driver/driver-e2e-specs.d.ts +2 -0
  81. package/build/test/functional/driver/driver-e2e-specs.d.ts.map +1 -0
  82. package/build/test/functional/driver/driver-e2e-specs.js +296 -0
  83. package/build/test/functional/driver/driver-e2e-specs.js.map +1 -0
  84. package/build/test/functional/helpers/element.d.ts +4 -0
  85. package/build/test/functional/helpers/element.d.ts.map +1 -0
  86. package/build/test/functional/helpers/element.js +8 -0
  87. package/build/test/functional/helpers/element.js.map +1 -0
  88. package/build/test/functional/helpers/ports.d.ts +6 -0
  89. package/build/test/functional/helpers/ports.d.ts.map +1 -0
  90. package/build/test/functional/helpers/ports.js +29 -0
  91. package/build/test/functional/helpers/ports.js.map +1 -0
  92. package/build/test/functional/helpers/session.d.ts +7 -0
  93. package/build/test/functional/helpers/session.d.ts.map +1 -0
  94. package/build/test/functional/helpers/session.js +39 -0
  95. package/build/test/functional/helpers/session.js.map +1 -0
  96. package/build/test/functional/helpers/simulator.d.ts +12 -0
  97. package/build/test/functional/helpers/simulator.d.ts.map +1 -0
  98. package/build/test/functional/helpers/simulator.js +51 -0
  99. package/build/test/functional/helpers/simulator.js.map +1 -0
  100. package/build/test/functional/long/typing-stress-e2e-specs.d.ts +2 -0
  101. package/build/test/functional/long/typing-stress-e2e-specs.d.ts.map +1 -0
  102. package/build/test/functional/long/typing-stress-e2e-specs.js +84 -0
  103. package/build/test/functional/long/typing-stress-e2e-specs.js.map +1 -0
  104. package/build/test/functional/tv/tvos-e2e-specs.d.ts +2 -0
  105. package/build/test/functional/tv/tvos-e2e-specs.d.ts.map +1 -0
  106. package/build/test/functional/tv/tvos-e2e-specs.js +83 -0
  107. package/build/test/functional/tv/tvos-e2e-specs.js.map +1 -0
  108. package/build/test/functional/web/helpers.d.ts +28 -0
  109. package/build/test/functional/web/helpers.d.ts.map +1 -0
  110. package/build/test/functional/web/helpers.js +137 -0
  111. package/build/test/functional/web/helpers.js.map +1 -0
  112. package/build/test/functional/web/safari-alerts-e2e-specs.d.ts +2 -0
  113. package/build/test/functional/web/safari-alerts-e2e-specs.d.ts.map +1 -0
  114. package/build/test/functional/web/safari-alerts-e2e-specs.js +109 -0
  115. package/build/test/functional/web/safari-alerts-e2e-specs.js.map +1 -0
  116. package/build/test/functional/web/safari-basic-e2e-specs.d.ts +2 -0
  117. package/build/test/functional/web/safari-basic-e2e-specs.d.ts.map +1 -0
  118. package/build/test/functional/web/safari-basic-e2e-specs.js +425 -0
  119. package/build/test/functional/web/safari-basic-e2e-specs.js.map +1 -0
  120. package/build/test/functional/web/safari-execute-e2e-specs.d.ts +2 -0
  121. package/build/test/functional/web/safari-execute-e2e-specs.d.ts.map +1 -0
  122. package/build/test/functional/web/safari-execute-e2e-specs.js +167 -0
  123. package/build/test/functional/web/safari-execute-e2e-specs.js.map +1 -0
  124. package/build/test/functional/web/safari-nativewebtap-e2e-specs.d.ts +2 -0
  125. package/build/test/functional/web/safari-nativewebtap-e2e-specs.d.ts.map +1 -0
  126. package/build/test/functional/web/safari-nativewebtap-e2e-specs.js +323 -0
  127. package/build/test/functional/web/safari-nativewebtap-e2e-specs.js.map +1 -0
  128. package/build/test/functional/web/safari-ssl-e2e-specs.d.ts +2 -0
  129. package/build/test/functional/web/safari-ssl-e2e-specs.d.ts.map +1 -0
  130. package/build/test/functional/web/safari-ssl-e2e-specs.js +131 -0
  131. package/build/test/functional/web/safari-ssl-e2e-specs.js.map +1 -0
  132. package/build/test/functional/web/safari-window-e2e-specs.d.ts +2 -0
  133. package/build/test/functional/web/safari-window-e2e-specs.d.ts.map +1 -0
  134. package/build/test/functional/web/safari-window-e2e-specs.js +263 -0
  135. package/build/test/functional/web/safari-window-e2e-specs.js.map +1 -0
  136. package/build/test/setup.d.ts +19 -0
  137. package/build/test/setup.d.ts.map +1 -0
  138. package/build/test/setup.js +117 -0
  139. package/build/test/setup.js.map +1 -0
  140. package/build/test/unit/app-infos-cache-specs.d.ts +2 -0
  141. package/build/test/unit/app-infos-cache-specs.d.ts.map +1 -0
  142. package/build/test/unit/app-infos-cache-specs.js +101 -0
  143. package/build/test/unit/app-infos-cache-specs.js.map +1 -0
  144. package/build/test/unit/app-utils-specs.d.ts +2 -0
  145. package/build/test/unit/app-utils-specs.d.ts.map +1 -0
  146. package/build/test/unit/app-utils-specs.js +131 -0
  147. package/build/test/unit/app-utils-specs.js.map +1 -0
  148. package/build/test/unit/commands/activeAppInfo-specs.d.ts +2 -0
  149. package/build/test/unit/commands/activeAppInfo-specs.d.ts.map +1 -0
  150. package/build/test/unit/commands/activeAppInfo-specs.js +74 -0
  151. package/build/test/unit/commands/activeAppInfo-specs.js.map +1 -0
  152. package/build/test/unit/commands/alert-specs.d.ts +2 -0
  153. package/build/test/unit/commands/alert-specs.d.ts.map +1 -0
  154. package/build/test/unit/commands/alert-specs.js +111 -0
  155. package/build/test/unit/commands/alert-specs.js.map +1 -0
  156. package/build/test/unit/commands/context-specs.d.ts +2 -0
  157. package/build/test/unit/commands/context-specs.d.ts.map +1 -0
  158. package/build/test/unit/commands/context-specs.js +119 -0
  159. package/build/test/unit/commands/context-specs.js.map +1 -0
  160. package/build/test/unit/commands/deviceinfo-specs.d.ts +2 -0
  161. package/build/test/unit/commands/deviceinfo-specs.d.ts.map +1 -0
  162. package/build/test/unit/commands/deviceinfo-specs.js +67 -0
  163. package/build/test/unit/commands/deviceinfo-specs.js.map +1 -0
  164. package/build/test/unit/commands/element-specs.d.ts +2 -0
  165. package/build/test/unit/commands/element-specs.d.ts.map +1 -0
  166. package/build/test/unit/commands/element-specs.js +419 -0
  167. package/build/test/unit/commands/element-specs.js.map +1 -0
  168. package/build/test/unit/commands/file-movement-specs.d.ts +2 -0
  169. package/build/test/unit/commands/file-movement-specs.d.ts.map +1 -0
  170. package/build/test/unit/commands/file-movement-specs.js +81 -0
  171. package/build/test/unit/commands/file-movement-specs.js.map +1 -0
  172. package/build/test/unit/commands/find-specs.d.ts +2 -0
  173. package/build/test/unit/commands/find-specs.d.ts.map +1 -0
  174. package/build/test/unit/commands/find-specs.js +106 -0
  175. package/build/test/unit/commands/find-specs.js.map +1 -0
  176. package/build/test/unit/commands/general-specs.d.ts +2 -0
  177. package/build/test/unit/commands/general-specs.d.ts.map +1 -0
  178. package/build/test/unit/commands/general-specs.js +154 -0
  179. package/build/test/unit/commands/general-specs.js.map +1 -0
  180. package/build/test/unit/commands/gesture-specs.d.ts +2 -0
  181. package/build/test/unit/commands/gesture-specs.d.ts.map +1 -0
  182. package/build/test/unit/commands/gesture-specs.js +263 -0
  183. package/build/test/unit/commands/gesture-specs.js.map +1 -0
  184. package/build/test/unit/commands/location-specs.d.ts +2 -0
  185. package/build/test/unit/commands/location-specs.d.ts.map +1 -0
  186. package/build/test/unit/commands/location-specs.js +141 -0
  187. package/build/test/unit/commands/location-specs.js.map +1 -0
  188. package/build/test/unit/commands/pasteboard-specs.d.ts +2 -0
  189. package/build/test/unit/commands/pasteboard-specs.d.ts.map +1 -0
  190. package/build/test/unit/commands/pasteboard-specs.js +65 -0
  191. package/build/test/unit/commands/pasteboard-specs.js.map +1 -0
  192. package/build/test/unit/commands/proxy-helper-specs.d.ts +2 -0
  193. package/build/test/unit/commands/proxy-helper-specs.d.ts.map +1 -0
  194. package/build/test/unit/commands/proxy-helper-specs.js +88 -0
  195. package/build/test/unit/commands/proxy-helper-specs.js.map +1 -0
  196. package/build/test/unit/commands/screenshots-specs.d.ts +2 -0
  197. package/build/test/unit/commands/screenshots-specs.d.ts.map +1 -0
  198. package/build/test/unit/commands/screenshots-specs.js +71 -0
  199. package/build/test/unit/commands/screenshots-specs.js.map +1 -0
  200. package/build/test/unit/commands/session-specs.d.ts +2 -0
  201. package/build/test/unit/commands/session-specs.d.ts.map +1 -0
  202. package/build/test/unit/commands/session-specs.js +49 -0
  203. package/build/test/unit/commands/session-specs.js.map +1 -0
  204. package/build/test/unit/commands/simctl-specs.d.ts +2 -0
  205. package/build/test/unit/commands/simctl-specs.d.ts.map +1 -0
  206. package/build/test/unit/commands/simctl-specs.js +54 -0
  207. package/build/test/unit/commands/simctl-specs.js.map +1 -0
  208. package/build/test/unit/commands/source-specs.d.ts +2 -0
  209. package/build/test/unit/commands/source-specs.d.ts.map +1 -0
  210. package/build/test/unit/commands/source-specs.js +55 -0
  211. package/build/test/unit/commands/source-specs.js.map +1 -0
  212. package/build/test/unit/commands/ssl-certificate-specs.d.ts +2 -0
  213. package/build/test/unit/commands/ssl-certificate-specs.d.ts.map +1 -0
  214. package/build/test/unit/commands/ssl-certificate-specs.js +16 -0
  215. package/build/test/unit/commands/ssl-certificate-specs.js.map +1 -0
  216. package/build/test/unit/commands/xctest-specs.d.ts +2 -0
  217. package/build/test/unit/commands/xctest-specs.d.ts.map +1 -0
  218. package/build/test/unit/commands/xctest-specs.js +116 -0
  219. package/build/test/unit/commands/xctest-specs.js.map +1 -0
  220. package/build/test/unit/css-converter-specs.d.ts +2 -0
  221. package/build/test/unit/css-converter-specs.d.ts.map +1 -0
  222. package/build/test/unit/css-converter-specs.js +99 -0
  223. package/build/test/unit/css-converter-specs.js.map +1 -0
  224. package/build/test/unit/device-connections-factory-specs.d.ts +2 -0
  225. package/build/test/unit/device-connections-factory-specs.d.ts.map +1 -0
  226. package/build/test/unit/device-connections-factory-specs.js +88 -0
  227. package/build/test/unit/device-connections-factory-specs.js.map +1 -0
  228. package/build/test/unit/driver-specs.d.ts +2 -0
  229. package/build/test/unit/driver-specs.d.ts.map +1 -0
  230. package/build/test/unit/driver-specs.js +358 -0
  231. package/build/test/unit/driver-specs.js.map +1 -0
  232. package/build/test/unit/helpers.d.ts +2 -0
  233. package/build/test/unit/helpers.d.ts.map +1 -0
  234. package/build/test/unit/helpers.js +5 -0
  235. package/build/test/unit/helpers.js.map +1 -0
  236. package/build/test/unit/language-specs.d.ts +2 -0
  237. package/build/test/unit/language-specs.d.ts.map +1 -0
  238. package/build/test/unit/language-specs.js +159 -0
  239. package/build/test/unit/language-specs.js.map +1 -0
  240. package/build/test/unit/logs-helpers-specs.d.ts +2 -0
  241. package/build/test/unit/logs-helpers-specs.d.ts.map +1 -0
  242. package/build/test/unit/logs-helpers-specs.js +71 -0
  243. package/build/test/unit/logs-helpers-specs.js.map +1 -0
  244. package/build/test/unit/processargs-specs.d.ts +2 -0
  245. package/build/test/unit/processargs-specs.d.ts.map +1 -0
  246. package/build/test/unit/processargs-specs.js +87 -0
  247. package/build/test/unit/processargs-specs.js.map +1 -0
  248. package/build/test/unit/real-device-management-specs.d.ts +2 -0
  249. package/build/test/unit/real-device-management-specs.d.ts.map +1 -0
  250. package/build/test/unit/real-device-management-specs.js +151 -0
  251. package/build/test/unit/real-device-management-specs.js.map +1 -0
  252. package/build/test/unit/simulator-management-specs.d.ts +2 -0
  253. package/build/test/unit/simulator-management-specs.d.ts.map +1 -0
  254. package/build/test/unit/simulator-management-specs.js +143 -0
  255. package/build/test/unit/simulator-management-specs.js.map +1 -0
  256. package/build/test/unit/utils-specs.d.ts +2 -0
  257. package/build/test/unit/utils-specs.d.ts.map +1 -0
  258. package/build/test/unit/utils-specs.js +132 -0
  259. package/build/test/unit/utils-specs.js.map +1 -0
  260. package/build/tsconfig.tsbuildinfo +1 -0
  261. package/lib/commands/active-app-info.ts +15 -0
  262. package/lib/commands/{app-strings.js → app-strings.ts} +10 -9
  263. package/lib/commands/audit.ts +25 -0
  264. package/lib/commands/device-info.ts +24 -0
  265. package/lib/commands/keychains.ts +16 -0
  266. package/lib/commands/{localization.js → localization.ts} +22 -12
  267. package/lib/commands/types.ts +23 -0
  268. package/lib/driver.ts +1 -1
  269. package/lib/index.ts +5 -0
  270. package/npm-shrinkwrap.json +5 -5
  271. package/package.json +4 -7
  272. package/build/index.d.ts +0 -5
  273. package/build/lib/commands/deviceInfo.d.ts +0 -12
  274. package/build/lib/commands/deviceInfo.d.ts.map +0 -1
  275. package/build/lib/commands/deviceInfo.js.map +0 -1
  276. package/index.js +0 -7
  277. package/lib/commands/active-app-info.js +0 -12
  278. package/lib/commands/audit.js +0 -31
  279. package/lib/commands/deviceInfo.js +0 -27
  280. package/lib/commands/keychains.js +0 -17
@@ -0,0 +1,15 @@
1
+ import type {XCUITestDriver} from '../driver';
2
+ import type {ActiveAppInfo} from './types';
3
+
4
+ /**
5
+ * Returns information about the active application.
6
+ *
7
+ * @returns Active app information
8
+ * @throws {Error} if an error raised by command
9
+ */
10
+ export async function mobileGetActiveAppInfo(
11
+ this: XCUITestDriver,
12
+ ): Promise<ActiveAppInfo> {
13
+ return await this.proxyCommand<unknown, ActiveAppInfo>('/wda/activeAppInfo', 'GET');
14
+ }
15
+
@@ -1,19 +1,23 @@
1
1
  import {parseLocalizableStrings} from '../app-utils';
2
+ import type {XCUITestDriver} from '../driver';
3
+ import type {StringRecord} from '@appium/types';
2
4
 
3
5
  /**
4
6
  * Return the language-specific strings for an app
5
7
  *
6
- * @param {string} language - The language abbreviation to fetch app strings mapping for.
8
+ * @param language - The language abbreviation to fetch app strings mapping for.
7
9
  * If no language is provided then strings for the 'en language would be returned
8
- * @param {string|null} [stringFile=null] - Relative path to the corresponding .strings
10
+ * @param stringFile - Relative path to the corresponding .strings
9
11
  * file starting from the corresponding .lproj folder, e.g., `base/main.strings`. If omitted,
10
12
  * then Appium will make its best guess where the file is.
11
13
  *
12
- * @returns {Promise<import('@appium/types').StringRecord<string>>} A record of localized keys to localized text
13
- *
14
- * @this {XCUITestDriver}
14
+ * @returns A record of localized keys to localized text
15
15
  */
16
- export async function getStrings(language, stringFile = null) {
16
+ export async function getStrings(
17
+ this: XCUITestDriver,
18
+ language: string,
19
+ stringFile: string | null = null,
20
+ ): Promise<StringRecord<string>> {
17
21
  this.log.debug(`Gettings strings for language '${language}' and string file '${stringFile}'`);
18
22
  return await parseLocalizableStrings.bind(this)(
19
23
  {
@@ -25,6 +29,3 @@ export async function getStrings(language, stringFile = null) {
25
29
  );
26
30
  }
27
31
 
28
- /**
29
- * @typedef {import('../driver').XCUITestDriver} XCUITestDriver
30
- */
@@ -0,0 +1,25 @@
1
+ import type {XCUITestDriver} from '../driver';
2
+ import type {AccessibilityAuditItem} from './types';
3
+
4
+ /**
5
+ * Performs accessibility audit of the current application according to the given type or multiple types.
6
+ *
7
+ * @since Xcode 15/iOS 17
8
+ * @param auditTypes - One or more type names to perform the audit for.
9
+ * The full list of available names could be found at
10
+ * https://developer.apple.com/documentation/xctest/xcuiaccessibilityaudittype?language=objc
11
+ * If no type if provided explicitly then XCUIAccessibilityAuditTypeAll is assumed.
12
+ *
13
+ * @returns List of found issues or an empty list
14
+ */
15
+ export async function mobilePerformAccessibilityAudit(
16
+ this: XCUITestDriver,
17
+ auditTypes?: string[],
18
+ ): Promise<AccessibilityAuditItem[]> {
19
+ return await this.proxyCommand<{auditTypes?: string[]}, AccessibilityAuditItem[]>(
20
+ '/wda/performAccessibilityAudit',
21
+ 'POST',
22
+ {auditTypes},
23
+ );
24
+ }
25
+
@@ -0,0 +1,24 @@
1
+ import {utilities} from 'appium-ios-device';
2
+ import type {XCUITestDriver} from '../driver';
3
+ import type {DeviceInfo, LockdownInfo} from './types';
4
+
5
+ /**
6
+ * Returns the miscellaneous information about the device under test.
7
+ *
8
+ * Since XCUITest driver v4.2.0, this includes device information via lockdown in a real device.
9
+ *
10
+ * @returns The response of `/wda/device/info'`
11
+ */
12
+ export async function mobileGetDeviceInfo(
13
+ this: XCUITestDriver,
14
+ ): Promise<DeviceInfo | (DeviceInfo & {lockdownInfo: LockdownInfo})> {
15
+ const infoByWda = await this.proxyCommand<unknown, DeviceInfo>('/wda/device/info', 'GET');
16
+
17
+ if (this.isRealDevice()) {
18
+ const lockdownInfo = await utilities.getDeviceInfo(this.device.udid);
19
+ return {...infoByWda, ...{lockdownInfo}};
20
+ }
21
+
22
+ return infoByWda;
23
+ }
24
+
@@ -0,0 +1,16 @@
1
+ import {assertSimulator} from '../utils';
2
+ import type {XCUITestDriver} from '../driver';
3
+
4
+ /**
5
+ * Clears keychains on a simulated device.
6
+ *
7
+ * @throws {Error} If current device is not a Simulator or there was an error
8
+ * while clearing keychains.
9
+ * @group Simulator Only
10
+ */
11
+ export async function mobileClearKeychains(
12
+ this: XCUITestDriver,
13
+ ): Promise<void> {
14
+ await assertSimulator.call(this, 'Keychain modification').clearKeychains();
15
+ }
16
+
@@ -1,6 +1,6 @@
1
- import {assertSimulator as _assertSimulator} from '../utils';
2
-
3
- const assertSimulator = (driver) => _assertSimulator.call(driver, 'Localization configuration');
1
+ import {assertSimulator} from '../utils';
2
+ import type {XCUITestDriver} from '../driver';
3
+ import type {KeyboardOptions, LanguageOptions, LocaleOptions} from './types';
4
4
 
5
5
  /**
6
6
  * Change localization settings on the currently booted simulator
@@ -9,21 +9,31 @@ const assertSimulator = (driver) => _assertSimulator.call(driver, 'Localization
9
9
  * Currently running applications will be unchanged. This means, for example, that the keyboard should be hidden and shown again in order to observe the changed layout, and corresponding apps must be restarted in order to observe their interface using the newly set locale/language.
10
10
  *
11
11
  * The driver performs no strict checking of the arguments (such as locale names). Be aware that an incorrect or invalid string may cause unexpected behavior.
12
- * @param {import('./types').KeyboardOptions} [keyboard] - Keyboard options
13
- * @param {import('./types').LanguageOptions} [language] - Language options
14
- * @param {import('./types').LocaleOptions} [locale] - Locale options
12
+ * @param keyboard - Keyboard options
13
+ * @param language - Language options
14
+ * @param locale - Locale options
15
15
  * @throws {Error} If there was a failure while setting the preferences
16
- * @returns {Promise<boolean>} `true` if any of settings has been successfully changed
16
+ * @returns `true` if any of settings has been successfully changed
17
17
  * @group Simulator Only
18
- * @this {import('../driver').XCUITestDriver}
19
18
  */
20
- export async function mobileConfigureLocalization(keyboard, language, locale) {
21
- assertSimulator(this);
19
+ export async function mobileConfigureLocalization(
20
+ this: XCUITestDriver,
21
+ keyboard?: KeyboardOptions,
22
+ language?: LanguageOptions,
23
+ locale?: LocaleOptions,
24
+ ): Promise<boolean> {
25
+ ;
22
26
 
23
- const localizationOptions = {locale, keyboard};
27
+ const localizationOptions: {
28
+ locale?: LocaleOptions;
29
+ keyboard?: KeyboardOptions;
30
+ language?: LanguageOptions & {skipSyncUiDialogTranslation?: boolean};
31
+ } = {locale, keyboard};
24
32
  if (language) {
25
33
  // Assign skipSyncUiDialogTranslation: true option in order to avoid shutting down the WDA session
26
34
  localizationOptions.language = Object.assign(language, {skipSyncUiDialogTranslation: true});
27
35
  }
28
- return await /** @type {import('appium-ios-simulator').Simulator} */ (this.device).configureLocalization(localizationOptions);
36
+ return await assertSimulator.call(this, 'Localization configuration')
37
+ .configureLocalization(localizationOptions);
29
38
  }
39
+
@@ -334,6 +334,29 @@ export interface ProcessArguments {
334
334
  args: string[];
335
335
  }
336
336
 
337
+ /**
338
+ * Accessibility audit item returned by the audit command.
339
+ */
340
+ export interface AccessibilityAuditItem {
341
+ /**
342
+ * The detailed description of the found accessibility issue.
343
+ */
344
+ detailedDescription: string;
345
+ /**
346
+ * The compact description of the found accessibility issue.
347
+ */
348
+ compactDescription: string;
349
+ /**
350
+ * The name of the audit type this issue belongs to. Could be
351
+ * a number if the type name is unknown.
352
+ */
353
+ auditType: string | number;
354
+ /**
355
+ * The description of the element this issue was found for.
356
+ */
357
+ element: string;
358
+ }
359
+
337
360
  /**
338
361
  * Pressable button names; used by the {@linkcode XCUITest.mobilePressButton mobile: pressButton} command.
339
362
  */
package/lib/driver.ts CHANGED
@@ -41,7 +41,7 @@ import * as clipboardCommands from './commands/clipboard';
41
41
  import * as conditionCommands from './commands/condition';
42
42
  import * as contentSizeCommands from './commands/content-size';
43
43
  import * as contextCommands from './commands/context';
44
- import * as deviceInfoCommands from './commands/deviceInfo';
44
+ import * as deviceInfoCommands from './commands/device-info';
45
45
  import * as elementCommands from './commands/element';
46
46
  import * as executeCommands from './commands/execute';
47
47
  import * as fileMovementCommands from './commands/file-movement';
package/lib/index.ts ADDED
@@ -0,0 +1,5 @@
1
+ import {XCUITestDriver} from './driver';
2
+
3
+ export {XCUITestDriver};
4
+ export * as doctor from './doctor/checks';
5
+ export default XCUITestDriver;
@@ -1,12 +1,12 @@
1
1
  {
2
2
  "name": "appium-xcuitest-driver",
3
- "version": "10.14.5",
3
+ "version": "10.14.7",
4
4
  "lockfileVersion": 3,
5
5
  "requires": true,
6
6
  "packages": {
7
7
  "": {
8
8
  "name": "appium-xcuitest-driver",
9
- "version": "10.14.5",
9
+ "version": "10.14.7",
10
10
  "license": "Apache-2.0",
11
11
  "dependencies": {
12
12
  "@appium/strongbox": "^1.0.0-rc.1",
@@ -692,9 +692,9 @@
692
692
  }
693
693
  },
694
694
  "node_modules/appium-ios-remotexpc": {
695
- "version": "0.24.2",
696
- "resolved": "https://registry.npmjs.org/appium-ios-remotexpc/-/appium-ios-remotexpc-0.24.2.tgz",
697
- "integrity": "sha512-bZBVG5eo/TC9PJJIu/kpGy5YprMn9vcVMKCarNM8rTTtNNUgOE80LPJ5e1UxWj2AnIAXyoJochN996mmiaWvnA==",
695
+ "version": "0.25.0",
696
+ "resolved": "https://registry.npmjs.org/appium-ios-remotexpc/-/appium-ios-remotexpc-0.25.0.tgz",
697
+ "integrity": "sha512-inc/mZc3Dz7mtBj/CWC+m3NlWB2a14aZ4Ug6onM/7vI80N3YRsOyaSfYk1HCLwacstvDJhjEoA6bqi5LMtVwYA==",
698
698
  "license": "Apache-2.0",
699
699
  "optional": true,
700
700
  "dependencies": {
package/package.json CHANGED
@@ -8,7 +8,7 @@
8
8
  "xcuitest",
9
9
  "xctest"
10
10
  ],
11
- "version": "10.14.5",
11
+ "version": "10.14.7",
12
12
  "author": "Appium Contributors",
13
13
  "license": "Apache-2.0",
14
14
  "repository": {
@@ -61,24 +61,21 @@
61
61
  ]
62
62
  }
63
63
  },
64
- "main": "./build/index.js",
64
+ "main": "./build/lib/index.js",
65
65
  "bin": {},
66
66
  "directories": {
67
67
  "lib": "lib"
68
68
  },
69
69
  "files": [
70
- "index.js",
71
70
  "lib",
72
71
  "scripts",
73
- "build/index.js",
74
- "build/index.d.ts",
75
- "build/lib",
72
+ "build",
76
73
  "!.DS_Store",
77
74
  "CHANGELOG.md",
78
75
  "LICENSE",
79
76
  "npm-shrinkwrap.json"
80
77
  ],
81
- "types": "./build/index.d.ts",
78
+ "types": "./build/lib/index.d.ts",
82
79
  "dependencies": {
83
80
  "@appium/strongbox": "^1.0.0-rc.1",
84
81
  "@colors/colors": "^1.6.0",
package/build/index.d.ts DELETED
@@ -1,5 +0,0 @@
1
- export { XCUITestDriver };
2
- export * as doctor from "./lib/doctor/checks";
3
- export default XCUITestDriver;
4
- import { XCUITestDriver } from './lib/driver';
5
- //# sourceMappingURL=index.d.ts.map
@@ -1,12 +0,0 @@
1
- /**
2
- * Returns the miscellaneous information about the device under test.
3
- *
4
- * Since XCUITest driver v4.2.0, this includes device information via lockdown in a real device.
5
- *
6
- * @returns {Promise<DeviceInfo | (DeviceInfo & LockdownInfo)>} The response of `/wda/device/info'`
7
- * @this {import('../driver').XCUITestDriver}
8
- */
9
- export function mobileGetDeviceInfo(this: import("../driver").XCUITestDriver): Promise<DeviceInfo | (DeviceInfo & LockdownInfo)>;
10
- export type DeviceInfo = import("./types").DeviceInfo;
11
- export type LockdownInfo = import("./types").LockdownInfo;
12
- //# sourceMappingURL=deviceInfo.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"deviceInfo.d.ts","sourceRoot":"","sources":["../../../lib/commands/deviceInfo.js"],"names":[],"mappings":"AAEA;;;;;;;GAOG;AACH,+EAHa,OAAO,CAAC,UAAU,GAAG,CAAC,UAAU,GAAG,YAAY,CAAC,CAAC,CAc7D;yBAGY,OAAO,SAAS,EAAE,UAAU;2BAC5B,OAAO,SAAS,EAAE,YAAY"}
@@ -1 +0,0 @@
1
- {"version":3,"file":"deviceInfo.js","sourceRoot":"","sources":["../../../lib/commands/deviceInfo.js"],"names":[],"mappings":";;AAUA,kDAWC;AArBD,yDAA4C;AAE5C;;;;;;;GAOG;AACI,KAAK,UAAU,mBAAmB;IACvC,MAAM,SAAS,GAAG,2CAA2C,CAAC,CAC5D,MAAM,IAAI,CAAC,YAAY,CAAC,kBAAkB,EAAE,KAAK,CAAC,CACnD,CAAC;IAEF,IAAI,IAAI,CAAC,YAAY,EAAE,EAAE,CAAC;QACxB,MAAM,YAAY,GAAG,MAAM,6BAAS,CAAC,aAAa,CAAC,IAAI,CAAC,MAAM,CAAC,IAAI,CAAC,CAAC;QACrE,OAAO,EAAC,GAAG,SAAS,EAAE,GAAG,EAAC,YAAY,EAAC,EAAC,CAAC;IAC3C,CAAC;IAED,OAAO,SAAS,CAAC;AACnB,CAAC;AAED;;;GAGG"}
package/index.js DELETED
@@ -1,7 +0,0 @@
1
- import {XCUITestDriver} from './lib/driver';
2
-
3
- export {XCUITestDriver};
4
-
5
- export * as doctor from './lib/doctor/checks';
6
-
7
- export default XCUITestDriver;
@@ -1,12 +0,0 @@
1
- /**
2
- * Returns information about the active application.
3
- *
4
- * @returns {Promise<import('./types').ActiveAppInfo>} Active app information
5
- * @throws {Error} if an error raised by command
6
- * @this {import('../driver').XCUITestDriver}
7
- */
8
- export async function mobileGetActiveAppInfo() {
9
- return /** @type {import('./types').ActiveAppInfo} */ (
10
- await this.proxyCommand('/wda/activeAppInfo', 'GET')
11
- );
12
- }
@@ -1,31 +0,0 @@
1
- /**
2
- * @typedef {Object} AccessibilityAuditItem
3
- * @property {string} detailedDescription The detailed description of the found accessibility issue.
4
- * @property {string} compactDescription The compact description of the found accessibility issue.
5
- * @property {string|number} auditType The name of the audit type this issue belongs to. Could be
6
- * a number if the type name is unknown.
7
- * @property {string} element The description of the element this issue was found for.
8
- */
9
-
10
- /**
11
- * Performs accessibility audit of the current application according to the given type or multiple types.
12
- *
13
- * @since Xcode 15/iOS 17
14
- * @param {string[]?} auditTypes - One or more type names to perform the audit for.
15
- * The full list of available names could be found at
16
- * https://developer.apple.com/documentation/xctest/xcuiaccessibilityaudittype?language=objc
17
- * If no type if provided explicitly then XCUIAccessibilityAuditTypeAll is assumed.
18
- *
19
- * @returns {Promise<AccessibilityAuditItem[]>} List of found issues or an empty list
20
- *
21
- * @this {XCUITestDriver}
22
- */
23
- export async function mobilePerformAccessibilityAudit(auditTypes) {
24
- return /** @type {AccessibilityAuditItem[]} */ (
25
- await this.proxyCommand('/wda/performAccessibilityAudit', 'POST', {auditTypes})
26
- );
27
- }
28
-
29
- /**
30
- * @typedef {import('../driver').XCUITestDriver} XCUITestDriver
31
- */
@@ -1,27 +0,0 @@
1
- import {utilities} from 'appium-ios-device';
2
-
3
- /**
4
- * Returns the miscellaneous information about the device under test.
5
- *
6
- * Since XCUITest driver v4.2.0, this includes device information via lockdown in a real device.
7
- *
8
- * @returns {Promise<DeviceInfo | (DeviceInfo & LockdownInfo)>} The response of `/wda/device/info'`
9
- * @this {import('../driver').XCUITestDriver}
10
- */
11
- export async function mobileGetDeviceInfo() {
12
- const infoByWda = /** @type {import('./types').DeviceInfo} */ (
13
- await this.proxyCommand('/wda/device/info', 'GET')
14
- );
15
-
16
- if (this.isRealDevice()) {
17
- const lockdownInfo = await utilities.getDeviceInfo(this.device.udid);
18
- return {...infoByWda, ...{lockdownInfo}};
19
- }
20
-
21
- return infoByWda;
22
- }
23
-
24
- /**
25
- * @typedef {import('./types').DeviceInfo} DeviceInfo
26
- * @typedef {import('./types').LockdownInfo} LockdownInfo
27
- */
@@ -1,17 +0,0 @@
1
- import {assertSimulator as _assertSimulator} from '../utils';
2
-
3
- const assertSimulator = (driver) => _assertSimulator.call(driver, 'Keychain modification');
4
-
5
- /**
6
- * Clears keychains on a simulated device.
7
- *
8
- * @throws {Error} If current device is not a Simulator or there was an error
9
- * while clearing keychains.
10
- * @this {import('../driver').XCUITestDriver}
11
- * @group Simulator Only
12
- */
13
- export async function mobileClearKeychains() {
14
- assertSimulator(this);
15
-
16
- await /** @type {import('appium-ios-simulator').Simulator} */ (this.device).clearKeychains();
17
- }