@limrun/appium-xcuitest-driver 10.11.0-lim.4 → 10.14.6-lim.1

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 (279) hide show
  1. package/CHANGELOG.md +94 -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/alert.d.ts +26 -31
  7. package/build/lib/commands/alert.d.ts.map +1 -1
  8. package/build/lib/commands/alert.js +20 -29
  9. package/build/lib/commands/alert.js.map +1 -1
  10. package/build/lib/commands/app-management.d.ts +99 -76
  11. package/build/lib/commands/app-management.d.ts.map +1 -1
  12. package/build/lib/commands/app-management.js +83 -73
  13. package/build/lib/commands/app-management.js.map +1 -1
  14. package/build/lib/commands/app-strings.d.ts +6 -7
  15. package/build/lib/commands/app-strings.d.ts.map +1 -1
  16. package/build/lib/commands/app-strings.js +3 -8
  17. package/build/lib/commands/app-strings.js.map +1 -1
  18. package/build/lib/commands/appearance.d.ts +7 -9
  19. package/build/lib/commands/appearance.d.ts.map +1 -1
  20. package/build/lib/commands/appearance.js +13 -19
  21. package/build/lib/commands/appearance.js.map +1 -1
  22. package/build/lib/commands/audit.d.ts +5 -33
  23. package/build/lib/commands/audit.d.ts.map +1 -1
  24. package/build/lib/commands/audit.js +3 -16
  25. package/build/lib/commands/audit.js.map +1 -1
  26. package/build/lib/commands/battery.d.ts +4 -4
  27. package/build/lib/commands/battery.d.ts.map +1 -1
  28. package/build/lib/commands/battery.js +3 -7
  29. package/build/lib/commands/battery.js.map +1 -1
  30. package/build/lib/commands/biometric.d.ts +12 -14
  31. package/build/lib/commands/biometric.d.ts.map +1 -1
  32. package/build/lib/commands/biometric.js +10 -19
  33. package/build/lib/commands/biometric.js.map +1 -1
  34. package/build/lib/commands/certificate.d.ts +14 -19
  35. package/build/lib/commands/certificate.d.ts.map +1 -1
  36. package/build/lib/commands/certificate.js +24 -31
  37. package/build/lib/commands/certificate.js.map +1 -1
  38. package/build/lib/commands/clipboard.d.ts +9 -11
  39. package/build/lib/commands/clipboard.d.ts.map +1 -1
  40. package/build/lib/commands/clipboard.js +8 -13
  41. package/build/lib/commands/clipboard.js.map +1 -1
  42. package/build/lib/commands/condition.d.ts +9 -72
  43. package/build/lib/commands/condition.d.ts.map +1 -1
  44. package/build/lib/commands/condition.js +5 -66
  45. package/build/lib/commands/condition.js.map +1 -1
  46. package/build/lib/commands/content-size.d.ts +16 -19
  47. package/build/lib/commands/content-size.d.ts.map +1 -1
  48. package/build/lib/commands/content-size.js +14 -22
  49. package/build/lib/commands/content-size.js.map +1 -1
  50. package/build/lib/commands/context.d.ts +130 -161
  51. package/build/lib/commands/context.d.ts.map +1 -1
  52. package/build/lib/commands/context.js +123 -108
  53. package/build/lib/commands/context.js.map +1 -1
  54. package/build/lib/commands/device-info.d.ts +13 -0
  55. package/build/lib/commands/device-info.d.ts.map +1 -0
  56. package/build/lib/commands/device-info.js +20 -0
  57. package/build/lib/commands/device-info.js.map +1 -0
  58. package/build/lib/commands/element.d.ts +83 -67
  59. package/build/lib/commands/element.d.ts.map +1 -1
  60. package/build/lib/commands/element.js +111 -134
  61. package/build/lib/commands/element.js.map +1 -1
  62. package/build/lib/commands/execute.d.ts +10 -22
  63. package/build/lib/commands/execute.d.ts.map +1 -1
  64. package/build/lib/commands/execute.js +13 -29
  65. package/build/lib/commands/execute.js.map +1 -1
  66. package/build/lib/commands/file-movement.d.ts +31 -42
  67. package/build/lib/commands/file-movement.d.ts.map +1 -1
  68. package/build/lib/commands/file-movement.js +146 -205
  69. package/build/lib/commands/file-movement.js.map +1 -1
  70. package/build/lib/commands/find.d.ts +20 -12
  71. package/build/lib/commands/find.d.ts.map +1 -1
  72. package/build/lib/commands/find.js +27 -65
  73. package/build/lib/commands/find.js.map +1 -1
  74. package/build/lib/commands/general.d.ts +84 -80
  75. package/build/lib/commands/general.d.ts.map +1 -1
  76. package/build/lib/commands/general.js +67 -54
  77. package/build/lib/commands/general.js.map +1 -1
  78. package/build/lib/commands/geolocation.d.ts +16 -36
  79. package/build/lib/commands/geolocation.d.ts.map +1 -1
  80. package/build/lib/commands/geolocation.js +8 -25
  81. package/build/lib/commands/geolocation.js.map +1 -1
  82. package/build/lib/commands/gesture.d.ts +103 -119
  83. package/build/lib/commands/gesture.d.ts.map +1 -1
  84. package/build/lib/commands/gesture.js +98 -138
  85. package/build/lib/commands/gesture.js.map +1 -1
  86. package/build/lib/commands/increase-contrast.d.ts +10 -13
  87. package/build/lib/commands/increase-contrast.d.ts.map +1 -1
  88. package/build/lib/commands/increase-contrast.js +8 -16
  89. package/build/lib/commands/increase-contrast.js.map +1 -1
  90. package/build/lib/commands/iohid.d.ts +6 -1359
  91. package/build/lib/commands/iohid.d.ts.map +1 -1
  92. package/build/lib/commands/iohid.js +5 -10
  93. package/build/lib/commands/iohid.js.map +1 -1
  94. package/build/lib/commands/keyboard.d.ts +16 -13
  95. package/build/lib/commands/keyboard.d.ts.map +1 -1
  96. package/build/lib/commands/keyboard.js +14 -18
  97. package/build/lib/commands/keyboard.js.map +1 -1
  98. package/build/lib/commands/keychains.d.ts +2 -2
  99. package/build/lib/commands/keychains.d.ts.map +1 -1
  100. package/build/lib/commands/keychains.js +1 -4
  101. package/build/lib/commands/keychains.js.map +1 -1
  102. package/build/lib/commands/localization.d.ts +7 -6
  103. package/build/lib/commands/localization.d.ts.map +1 -1
  104. package/build/lib/commands/localization.js +7 -8
  105. package/build/lib/commands/localization.js.map +1 -1
  106. package/build/lib/commands/location.d.ts +8 -11
  107. package/build/lib/commands/location.d.ts.map +1 -1
  108. package/build/lib/commands/location.js +7 -15
  109. package/build/lib/commands/location.js.map +1 -1
  110. package/build/lib/commands/lock.d.ts +6 -10
  111. package/build/lib/commands/lock.d.ts.map +1 -1
  112. package/build/lib/commands/lock.js +3 -10
  113. package/build/lib/commands/lock.js.map +1 -1
  114. package/build/lib/commands/log.d.ts +42 -44
  115. package/build/lib/commands/log.d.ts.map +1 -1
  116. package/build/lib/commands/log.js +32 -53
  117. package/build/lib/commands/log.js.map +1 -1
  118. package/build/lib/commands/memory.d.ts +4 -5
  119. package/build/lib/commands/memory.d.ts.map +1 -1
  120. package/build/lib/commands/memory.js +3 -8
  121. package/build/lib/commands/memory.js.map +1 -1
  122. package/build/lib/commands/navigation.d.ts +14 -26
  123. package/build/lib/commands/navigation.d.ts.map +1 -1
  124. package/build/lib/commands/navigation.js +22 -32
  125. package/build/lib/commands/navigation.js.map +1 -1
  126. package/build/lib/commands/notifications.d.ts +10 -10
  127. package/build/lib/commands/notifications.d.ts.map +1 -1
  128. package/build/lib/commands/notifications.js +8 -12
  129. package/build/lib/commands/notifications.js.map +1 -1
  130. package/build/lib/commands/pasteboard.d.ts +9 -10
  131. package/build/lib/commands/pasteboard.d.ts.map +1 -1
  132. package/build/lib/commands/pasteboard.js +8 -13
  133. package/build/lib/commands/pasteboard.js.map +1 -1
  134. package/build/lib/commands/pcap.d.ts +18 -38
  135. package/build/lib/commands/pcap.d.ts.map +1 -1
  136. package/build/lib/commands/pcap.js +9 -14
  137. package/build/lib/commands/pcap.js.map +1 -1
  138. package/build/lib/commands/performance.d.ts +36 -55
  139. package/build/lib/commands/performance.d.ts.map +1 -1
  140. package/build/lib/commands/performance.js +93 -86
  141. package/build/lib/commands/performance.js.map +1 -1
  142. package/build/lib/commands/permissions.d.ts +15 -17
  143. package/build/lib/commands/permissions.d.ts.map +1 -1
  144. package/build/lib/commands/permissions.js +12 -18
  145. package/build/lib/commands/permissions.js.map +1 -1
  146. package/build/lib/commands/proxy-helper.d.ts +11 -11
  147. package/build/lib/commands/proxy-helper.d.ts.map +1 -1
  148. package/build/lib/commands/proxy-helper.js +15 -24
  149. package/build/lib/commands/proxy-helper.js.map +1 -1
  150. package/build/lib/commands/record-audio.d.ts +25 -52
  151. package/build/lib/commands/record-audio.d.ts.map +1 -1
  152. package/build/lib/commands/record-audio.js +17 -19
  153. package/build/lib/commands/record-audio.js.map +1 -1
  154. package/build/lib/commands/recordscreen.d.ts +31 -62
  155. package/build/lib/commands/recordscreen.d.ts.map +1 -1
  156. package/build/lib/commands/recordscreen.js +29 -28
  157. package/build/lib/commands/recordscreen.js.map +1 -1
  158. package/build/lib/commands/screenshots.d.ts +15 -9
  159. package/build/lib/commands/screenshots.d.ts.map +1 -1
  160. package/build/lib/commands/screenshots.js +16 -16
  161. package/build/lib/commands/screenshots.js.map +1 -1
  162. package/build/lib/commands/simctl.d.ts +16 -22
  163. package/build/lib/commands/simctl.d.ts.map +1 -1
  164. package/build/lib/commands/simctl.js +13 -17
  165. package/build/lib/commands/simctl.js.map +1 -1
  166. package/build/lib/commands/source.d.ts +10 -8
  167. package/build/lib/commands/source.d.ts.map +1 -1
  168. package/build/lib/commands/source.js +11 -14
  169. package/build/lib/commands/source.js.map +1 -1
  170. package/build/lib/commands/timeouts.d.ts +25 -32
  171. package/build/lib/commands/timeouts.d.ts.map +1 -1
  172. package/build/lib/commands/timeouts.js +19 -15
  173. package/build/lib/commands/timeouts.js.map +1 -1
  174. package/build/lib/commands/types.d.ts +80 -0
  175. package/build/lib/commands/types.d.ts.map +1 -1
  176. package/build/lib/commands/web.d.ts +199 -202
  177. package/build/lib/commands/web.d.ts.map +1 -1
  178. package/build/lib/commands/web.js +216 -175
  179. package/build/lib/commands/web.js.map +1 -1
  180. package/build/lib/commands/xctest-record-screen.d.ts +17 -47
  181. package/build/lib/commands/xctest-record-screen.d.ts.map +1 -1
  182. package/build/lib/commands/xctest-record-screen.js +28 -59
  183. package/build/lib/commands/xctest-record-screen.js.map +1 -1
  184. package/build/lib/commands/xctest.d.ts +37 -37
  185. package/build/lib/commands/xctest.d.ts.map +1 -1
  186. package/build/lib/commands/xctest.js +38 -50
  187. package/build/lib/commands/xctest.js.map +1 -1
  188. package/build/lib/desired-caps.js +1 -1
  189. package/build/lib/device/log/ios-simulator-log.d.ts.map +1 -1
  190. package/build/lib/device/log/ios-simulator-log.js +2 -0
  191. package/build/lib/device/log/ios-simulator-log.js.map +1 -1
  192. package/build/lib/device/simulator-management.d.ts.map +1 -1
  193. package/build/lib/device/simulator-management.js +0 -2
  194. package/build/lib/device/simulator-management.js.map +1 -1
  195. package/build/lib/doctor/optional-checks.d.ts +0 -9
  196. package/build/lib/doctor/optional-checks.d.ts.map +1 -1
  197. package/build/lib/doctor/optional-checks.js +1 -30
  198. package/build/lib/doctor/optional-checks.js.map +1 -1
  199. package/build/lib/driver.d.ts +6 -5
  200. package/build/lib/driver.d.ts.map +1 -1
  201. package/build/lib/driver.js +16 -14
  202. package/build/lib/driver.js.map +1 -1
  203. package/build/lib/execute-method-map.d.ts.map +1 -1
  204. package/build/lib/execute-method-map.js +0 -9
  205. package/build/lib/execute-method-map.js.map +1 -1
  206. package/lib/commands/active-app-info.ts +15 -0
  207. package/lib/commands/alert.ts +98 -0
  208. package/lib/commands/app-management.ts +414 -0
  209. package/lib/commands/{app-strings.js → app-strings.ts} +10 -9
  210. package/lib/commands/appearance.ts +70 -0
  211. package/lib/commands/audit.ts +25 -0
  212. package/lib/commands/{battery.js → battery.ts} +10 -12
  213. package/lib/commands/biometric.ts +52 -0
  214. package/lib/commands/{certificate.js → certificate.ts} +55 -50
  215. package/lib/commands/clipboard.ts +37 -0
  216. package/lib/commands/{condition.js → condition.ts} +21 -77
  217. package/lib/commands/content-size.ts +67 -0
  218. package/lib/commands/{context.js → context.ts} +174 -146
  219. package/lib/commands/device-info.ts +24 -0
  220. package/lib/commands/element.ts +419 -0
  221. package/lib/commands/{execute.js → execute.ts} +42 -38
  222. package/lib/commands/{file-movement.js → file-movement.ts} +212 -235
  223. package/lib/commands/find.ts +277 -0
  224. package/lib/commands/{general.js → general.ts} +102 -77
  225. package/lib/commands/geolocation.ts +55 -0
  226. package/lib/commands/{gesture.js → gesture.ts} +225 -183
  227. package/lib/commands/increase-contrast.ts +49 -0
  228. package/lib/commands/{iohid.js → iohid.ts} +15 -13
  229. package/lib/commands/keyboard.ts +70 -0
  230. package/lib/commands/keychains.ts +16 -0
  231. package/lib/commands/{localization.js → localization.ts} +22 -12
  232. package/lib/commands/{location.js → location.ts} +19 -22
  233. package/lib/commands/lock.ts +43 -0
  234. package/lib/commands/{log.js → log.ts} +68 -68
  235. package/lib/commands/{memory.js → memory.ts} +9 -9
  236. package/lib/commands/{navigation.js → navigation.ts} +42 -39
  237. package/lib/commands/{notifications.js → notifications.ts} +22 -14
  238. package/lib/commands/pasteboard.ts +44 -0
  239. package/lib/commands/{pcap.js → pcap.ts} +28 -28
  240. package/lib/commands/{performance.js → performance.ts} +133 -114
  241. package/lib/commands/permissions.ts +90 -0
  242. package/lib/commands/{proxy-helper.js → proxy-helper.ts} +26 -26
  243. package/lib/commands/{record-audio.js → record-audio.ts} +35 -33
  244. package/lib/commands/{recordscreen.js → recordscreen.ts} +78 -50
  245. package/lib/commands/{screenshots.js → screenshots.ts} +27 -21
  246. package/lib/commands/simctl.ts +82 -0
  247. package/lib/commands/{source.js → source.ts} +23 -20
  248. package/lib/commands/timeouts.ts +95 -0
  249. package/lib/commands/types.ts +86 -0
  250. package/lib/commands/{web.js → web.ts} +314 -264
  251. package/lib/commands/{xctest-record-screen.js → xctest-record-screen.ts} +54 -71
  252. package/lib/commands/{xctest.js → xctest.ts} +78 -71
  253. package/lib/desired-caps.ts +1 -1
  254. package/lib/device/log/ios-simulator-log.ts +2 -0
  255. package/lib/device/simulator-management.ts +0 -2
  256. package/lib/doctor/optional-checks.ts +0 -33
  257. package/lib/driver.ts +19 -17
  258. package/lib/execute-method-map.ts +0 -9
  259. package/package.json +6 -6
  260. package/lib/commands/active-app-info.js +0 -12
  261. package/lib/commands/alert.js +0 -88
  262. package/lib/commands/app-management.js +0 -346
  263. package/lib/commands/appearance.js +0 -71
  264. package/lib/commands/audit.js +0 -31
  265. package/lib/commands/biometric.js +0 -52
  266. package/lib/commands/clipboard.js +0 -35
  267. package/lib/commands/content-size.js +0 -68
  268. package/lib/commands/deviceInfo.js +0 -27
  269. package/lib/commands/element.js +0 -423
  270. package/lib/commands/find.js +0 -205
  271. package/lib/commands/geolocation.js +0 -56
  272. package/lib/commands/increase-contrast.js +0 -50
  273. package/lib/commands/keyboard.js +0 -62
  274. package/lib/commands/keychains.js +0 -17
  275. package/lib/commands/lock.js +0 -46
  276. package/lib/commands/pasteboard.js +0 -43
  277. package/lib/commands/permissions.js +0 -85
  278. package/lib/commands/simctl.js +0 -71
  279. package/lib/commands/timeouts.js +0 -68
@@ -1,12 +1,12 @@
1
+ import type { XCUITestDriver } from '../driver';
2
+ import type { Condition } from './types';
1
3
  /**
2
4
  * Get all available ConditionInducer configuration information, which can be used with
3
5
  * {@linkcode XCUITestDriver.enableConditionInducer}
4
- * @returns {Promise<Condition[]>}
5
6
  * @since 4.9.0
6
7
  * @see {@link https://help.apple.com/xcode/mac/current/#/dev308429d42}
7
- * @this {XCUITestDriver}
8
8
  */
9
- export function listConditionInducers(this: import("../driver").XCUITestDriver): Promise<Condition[]>;
9
+ export declare function listConditionInducers(this: XCUITestDriver): Promise<Condition[]>;
10
10
  /**
11
11
  * Enable a "condition inducer". You can create a condition on a connected device to test your app under adverse conditions,
12
12
  * such as poor network connectivity or thermal constraints. When you start a device condition,
@@ -18,39 +18,14 @@ export function listConditionInducers(this: import("../driver").XCUITestDriver):
18
18
  * (Note: the socket needs to remain connected during operation)
19
19
  * (Note: Device conditions are available only for real devices running iOS 13.0 and later.)
20
20
  *
21
- * @param {string} conditionID - Determine which condition IDs are available with the {@linkcode XCUITestDriver.listConditionInducers} command
22
- * @param {string} profileID - Determine which profile IDs are available with the {@linkcode XCUITestDriver.listConditionInducers} command
23
- * @returns {Promise<boolean>} `true` if enabling the condition succeeded
21
+ * @param conditionID - Determine which condition IDs are available with the {@linkcode XCUITestDriver.listConditionInducers} command
22
+ * @param profileID - Determine which profile IDs are available with the {@linkcode XCUITestDriver.listConditionInducers} command
23
+ * @returns `true` if enabling the condition succeeded
24
24
  * @throws {Error} If you try to start another Condition and the previous Condition has not stopped
25
25
  * @since 4.9.0
26
26
  * @see {@link https://help.apple.com/xcode/mac/current/#/dev308429d42}
27
- * @this {XCUITestDriver}
28
27
  */
29
- export function enableConditionInducer(this: import("../driver").XCUITestDriver, conditionID: string, profileID: string): Promise<boolean>;
30
- export class enableConditionInducer {
31
- /**
32
- * Enable a "condition inducer". You can create a condition on a connected device to test your app under adverse conditions,
33
- * such as poor network connectivity or thermal constraints. When you start a device condition,
34
- * the operating system on the device behaves as if its environment has changed. The device
35
- * condition remains active until you stop the device condition or disconnect the device. For
36
- * example, you can start a device condition, run your app, monitor your app's energy usage, and
37
- * then stop the condition.
38
- *
39
- * (Note: the socket needs to remain connected during operation)
40
- * (Note: Device conditions are available only for real devices running iOS 13.0 and later.)
41
- *
42
- * @param {string} conditionID - Determine which condition IDs are available with the {@linkcode XCUITestDriver.listConditionInducers} command
43
- * @param {string} profileID - Determine which profile IDs are available with the {@linkcode XCUITestDriver.listConditionInducers} command
44
- * @returns {Promise<boolean>} `true` if enabling the condition succeeded
45
- * @throws {Error} If you try to start another Condition and the previous Condition has not stopped
46
- * @since 4.9.0
47
- * @see {@link https://help.apple.com/xcode/mac/current/#/dev308429d42}
48
- * @this {XCUITestDriver}
49
- */
50
- constructor(this: import("../driver").XCUITestDriver, conditionID: string, profileID: string);
51
- _remoteXPCConditionInducerConnection: import("appium-ios-remotexpc", { with: { "resolution-mode": "import" } }).DVTServiceWithConnection | undefined;
52
- _conditionInducerService: any;
53
- }
28
+ export declare function enableConditionInducer(this: XCUITestDriver, conditionID: string, profileID: string): Promise<boolean>;
54
29
  /**
55
30
  * Disable a condition inducer enabled with {@linkcode XCUITestDriver.enableConditionInducer} Usually
56
31
  * a persistent connection is maintained after the condition inducer is enabled, and this method
@@ -58,47 +33,9 @@ export class enableConditionInducer {
58
33
  * condition inducer will be automatically disabled
59
34
  *
60
35
  * (Note: this is also automatically called upon session cleanup)
61
- * @returns {Promise<boolean>} `true` if disable the condition succeeded
36
+ * @returns `true` if disable the condition succeeded
62
37
  * @since 4.9.0
63
38
  * @see {@link https://help.apple.com/xcode/mac/current/#/dev308429d42}
64
- * @this {XCUITestDriver}
65
39
  */
66
- export function disableConditionInducer(this: import("../driver").XCUITestDriver): Promise<boolean>;
67
- export class disableConditionInducer {
68
- _conditionInducerService: any;
69
- }
70
- export type DVTServiceWithConnection = import("appium-ios-remotexpc", { with: { "resolution-mode": "import" } }).DVTServiceWithConnection;
71
- export type Profile = {
72
- name: string;
73
- /**
74
- * the property is profileID used in {@linkcode XCUITestDriver.enableConditionInducer}
75
- */
76
- identifier: string;
77
- /**
78
- * Configuration details
79
- */
80
- description: string;
81
- };
82
- /**
83
- * We can use the returned data to determine whether the Condition is enabled and the currently enabled configuration information
84
- */
85
- export type Condition = {
86
- profiles: Profile[];
87
- /**
88
- * the property is conditionID used in {@linkcode XCUITestDriver.enableConditionInducer}
89
- */
90
- identifier: string;
91
- profilesSorted: boolean;
92
- isDestructive: boolean;
93
- isInternal: boolean;
94
- /**
95
- * `true` if this condition identifier is enabled
96
- */
97
- isActive: boolean;
98
- /**
99
- * enabled profiles identifier
100
- */
101
- activeProfile: string;
102
- };
103
- export type XCUITestDriver = import("../driver").XCUITestDriver;
40
+ export declare function disableConditionInducer(this: XCUITestDriver): Promise<boolean>;
104
41
  //# sourceMappingURL=condition.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"condition.d.ts","sourceRoot":"","sources":["../../../lib/commands/condition.js"],"names":[],"mappings":"AAIA;;;;;;;GAOG;AACH,iFALa,OAAO,CAAC,SAAS,EAAE,CAAC,CAgChC;AAED;;;;;;;;;;;;;;;;;;GAkBG;AACH,8FARW,MAAM,aACN,MAAM,GACJ,OAAO,CAAC,OAAO,CAAC,CAgD5B;;IA7DD;;;;;;;;;;;;;;;;;;OAkBG;IACH,mEARW,MAAM,aACN,MAAM,EAiDhB;IA9BK,qJAAyD;IAiB7D,8BAAuF;;AAezF;;;;;;;;;;;GAWG;AACH,mFALa,OAAO,CAAC,OAAO,CAAC,CA+C5B;;IAHK,8BAAoC;;uCAoC7B,OAAO,sBAAsB,EAAS,UAAC,iBAAiB,EAAE,QAAQ,IAAC,EAAG,wBAAwB;;UAK7F,MAAM;;;;gBACN,MAAM;;;;iBACN,MAAM;;;;;;cAMN,OAAO,EAAE;;;;gBACT,MAAM;oBACN,OAAO;mBACP,OAAO;gBACP,OAAO;;;;cACP,OAAO;;;;mBACP,MAAM;;6BA0BP,OAAO,WAAW,EAAE,cAAc"}
1
+ {"version":3,"file":"condition.d.ts","sourceRoot":"","sources":["../../../lib/commands/condition.ts"],"names":[],"mappings":"AAGA,OAAO,KAAK,EAAC,cAAc,EAAC,MAAM,WAAW,CAAC;AAE9C,OAAO,KAAK,EAAC,SAAS,EAAC,MAAM,SAAS,CAAC;AAEvC;;;;;GAKG;AACH,wBAAsB,qBAAqB,CAAC,IAAI,EAAE,cAAc,GAAG,OAAO,CAAC,SAAS,EAAE,CAAC,CA2BtF;AAED;;;;;;;;;;;;;;;;;GAiBG;AACH,wBAAsB,sBAAsB,CAC1C,IAAI,EAAE,cAAc,EACpB,WAAW,EAAE,MAAM,EACnB,SAAS,EAAE,MAAM,GAChB,OAAO,CAAC,OAAO,CAAC,CA0ClB;AAED;;;;;;;;;;GAUG;AACH,wBAAsB,uBAAuB,CAAC,IAAI,EAAE,cAAc,GAAG,OAAO,CAAC,OAAO,CAAC,CA0CpF"}
@@ -12,10 +12,8 @@ const utils_1 = require("../utils");
12
12
  /**
13
13
  * Get all available ConditionInducer configuration information, which can be used with
14
14
  * {@linkcode XCUITestDriver.enableConditionInducer}
15
- * @returns {Promise<Condition[]>}
16
15
  * @since 4.9.0
17
16
  * @see {@link https://help.apple.com/xcode/mac/current/#/dev308429d42}
18
- * @this {XCUITestDriver}
19
17
  */
20
18
  async function listConditionInducers() {
21
19
  requireConditionInducerCompatibleDevice.call(this);
@@ -23,7 +21,7 @@ async function listConditionInducers() {
23
21
  const dvtConnection = await startRemoteXPC(this.device.udid);
24
22
  try {
25
23
  const result = await dvtConnection.conditionInducer.list();
26
- return /** @type {Condition[]} */ (result);
24
+ return result;
27
25
  }
28
26
  catch (err) {
29
27
  this.log.error(`Failed to list condition inducers via RemoteXPC: ${err.message}`);
@@ -54,13 +52,12 @@ async function listConditionInducers() {
54
52
  * (Note: the socket needs to remain connected during operation)
55
53
  * (Note: Device conditions are available only for real devices running iOS 13.0 and later.)
56
54
  *
57
- * @param {string} conditionID - Determine which condition IDs are available with the {@linkcode XCUITestDriver.listConditionInducers} command
58
- * @param {string} profileID - Determine which profile IDs are available with the {@linkcode XCUITestDriver.listConditionInducers} command
59
- * @returns {Promise<boolean>} `true` if enabling the condition succeeded
55
+ * @param conditionID - Determine which condition IDs are available with the {@linkcode XCUITestDriver.listConditionInducers} command
56
+ * @param profileID - Determine which profile IDs are available with the {@linkcode XCUITestDriver.listConditionInducers} command
57
+ * @returns `true` if enabling the condition succeeded
60
58
  * @throws {Error} If you try to start another Condition and the previous Condition has not stopped
61
59
  * @since 4.9.0
62
60
  * @see {@link https://help.apple.com/xcode/mac/current/#/dev308429d42}
63
- * @this {XCUITestDriver}
64
61
  */
65
62
  async function enableConditionInducer(conditionID, profileID) {
66
63
  requireConditionInducerCompatibleDevice.call(this);
@@ -99,10 +96,9 @@ async function enableConditionInducer(conditionID, profileID) {
99
96
  * condition inducer will be automatically disabled
100
97
  *
101
98
  * (Note: this is also automatically called upon session cleanup)
102
- * @returns {Promise<boolean>} `true` if disable the condition succeeded
99
+ * @returns `true` if disable the condition succeeded
103
100
  * @since 4.9.0
104
101
  * @see {@link https://help.apple.com/xcode/mac/current/#/dev308429d42}
105
- * @this {XCUITestDriver}
106
102
  */
107
103
  async function disableConditionInducer() {
108
104
  requireConditionInducerCompatibleDevice.call(this);
@@ -144,76 +140,19 @@ async function disableConditionInducer() {
144
140
  }
145
141
  }
146
142
  }
147
- /**
148
- * @this {XCUITestDriver}
149
- * @returns {void}
150
- */
151
143
  function requireConditionInducerCompatibleDevice() {
152
144
  if (this.isSimulator()) {
153
145
  throw this.log.errorWithException('Condition inducer only works on real devices');
154
146
  }
155
147
  }
156
- /**
157
- * @param {string} udid
158
- * @returns {Promise<DVTServiceWithConnection>}
159
- */
160
148
  async function startRemoteXPC(udid) {
161
149
  const { Services } = await import('appium-ios-remotexpc');
162
150
  return Services.startDVTService(udid);
163
151
  }
164
- /**
165
- * @this {XCUITestDriver}
166
- * @returns {Promise<void>}
167
- */
168
152
  async function closeRemoteXPC() {
169
153
  if (this._remoteXPCConditionInducerConnection) {
170
154
  await this._remoteXPCConditionInducerConnection.remoteXPC.close();
171
155
  this._remoteXPCConditionInducerConnection = null;
172
156
  }
173
157
  }
174
- /**
175
- * @typedef {import('appium-ios-remotexpc', {with: {'resolution-mode': 'import'}}).DVTServiceWithConnection} DVTServiceWithConnection
176
- */
177
- /**
178
- * @typedef {Object} Profile
179
- * @property {string} name
180
- * @property {string} identifier the property is profileID used in {@linkcode XCUITestDriver.enableConditionInducer}
181
- * @property {string} description Configuration details
182
- */
183
- /**
184
- * We can use the returned data to determine whether the Condition is enabled and the currently enabled configuration information
185
- * @typedef {Object} Condition
186
- * @property {Profile[]} profiles
187
- * @property {string} identifier the property is conditionID used in {@linkcode XCUITestDriver.enableConditionInducer}
188
- * @property {boolean} profilesSorted
189
- * @property {boolean} isDestructive
190
- * @property {boolean} isInternal
191
- * @property {boolean} isActive `true` if this condition identifier is enabled
192
- * @property {string} activeProfile enabled profiles identifier
193
- * @example {
194
- * "profiles": [
195
- * {
196
- * "name": "100% packet loss",
197
- * "identifier": "SlowNetwork100PctLoss", // MobileEnableConditionInducer profileID
198
- * "description": "Name: 100% Loss Scenario\n
199
- * Downlink Bandwidth: 0 Mbps\n
200
- * Downlink Latency:0 ms\n
201
- * Downlink Packet Loss Ratio: 100%\n
202
- * Uplink Bandwidth: 0 Mbps\n
203
- * Uplink Latency: 0 ms\n
204
- * Uplink Packet Loss Ratio: 100%"
205
- * }
206
- * ],
207
- * "profilesSorted": true,
208
- * "identifier": "SlowNetworkCondition", // MobileEnableConditionInducer conditionID
209
- * "isDestructive": false,
210
- * "isInternal": false,
211
- * "activeProfile": "",
212
- * "name": "Network Link",
213
- * "isActive": false
214
- * }
215
- */
216
- /**
217
- * @typedef {import('../driver').XCUITestDriver} XCUITestDriver
218
- */
219
158
  //# sourceMappingURL=condition.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"condition.js","sourceRoot":"","sources":["../../../lib/commands/condition.js"],"names":[],"mappings":";;;;;AAYA,sDA2BC;AAqBD,wDA0CC;AAcD,0DA0CC;AA9JD,yDAA+D;AAC/D,oDAAuB;AACvB,oCAA0C;AAE1C;;;;;;;GAOG;AACI,KAAK,UAAU,qBAAqB;IACzC,uCAAuC,CAAC,IAAI,CAAC,IAAI,CAAC,CAAC;IAEnD,IAAI,IAAA,sBAAc,EAAC,IAAI,CAAC,IAAI,CAAC,EAAE,CAAC;QAC9B,MAAM,aAAa,GAAG,MAAM,cAAc,CAAC,IAAI,CAAC,MAAM,CAAC,IAAI,CAAC,CAAC;QAC7D,IAAI,CAAC;YACH,MAAM,MAAM,GAAG,MAAM,aAAa,CAAC,gBAAgB,CAAC,IAAI,EAAE,CAAC;YAC3D,OAAO,0BAA0B,CAAC,CAAC,MAAM,CAAC,CAAC;QAC7C,CAAC;QAAC,OAAO,GAAG,EAAE,CAAC;YACb,IAAI,CAAC,GAAG,CAAC,KAAK,CAAC,oDAAoD,GAAG,CAAC,OAAO,EAAE,CAAC,CAAC;YAClF,MAAM,GAAG,CAAC;QACZ,CAAC;gBAAS,CAAC;YACT,IAAI,CAAC,GAAG,CAAC,IAAI,CAAC,2CAA2C,IAAI,CAAC,MAAM,CAAC,IAAI,EAAE,CAAC,CAAC;YAC7E,MAAM,aAAa,CAAC,SAAS,CAAC,KAAK,EAAE,CAAC;QACxC,CAAC;IACH,CAAC;IAED,MAAM,uBAAuB,GAAG,MAAM,4BAAQ,CAAC,sBAAsB,CA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wBAAwB,CAAC,KAAK,EAAE,CAAC;YACtC,IAAI,CAAC,wBAAwB,GAAG,IAAI,CAAC;QACvC,CAAC;IACH,CAAC;AACH,CAAC;AAED,SAAS,uCAAuC;IAC9C,IAAI,IAAI,CAAC,WAAW,EAAE,EAAE,CAAC;QACvB,MAAM,IAAI,CAAC,GAAG,CAAC,kBAAkB,CAAC,8CAA8C,CAAC,CAAC;IACpF,CAAC;AACH,CAAC;AAED,KAAK,UAAU,cAAc,CAAC,IAAY;IACxC,MAAM,EAAC,QAAQ,EAAC,GAAG,MAAM,MAAM,CAAC,sBAAsB,CAAC,CAAC;IACxD,OAAO,QAAQ,CAAC,eAAe,CAAC,IAAI,CAAC,CAAC;AACxC,CAAC;AAED,KAAK,UAAU,cAAc;IAC3B,IAAI,IAAI,CAAC,oCAAoC,EAAE,CAAC;QAC9C,MAAM,IAAI,CAAC,oCAAoC,CAAC,SAAS,CAAC,KAAK,EAAE,CAAC;QAClE,IAAI,CAAC,oCAAoC,GAAG,IAAI,CAAC;IACnD,CAAC;AACH,CAAC"}
@@ -1,30 +1,27 @@
1
+ import type { XCUITestDriver } from '../driver';
2
+ import type { ContentSizeAction, ContentSizeResult } from './types';
1
3
  /**
2
4
  * Sets content size for the given simulator.
3
5
  *
4
6
  * @since Xcode 15 (but lower xcode could have this command)
5
- * @param {ContentSizeAction} size - The content size action to set. Acceptable value is
6
- * extra-small, small, medium, large, extra-large, extra-extra-large,
7
- * extra-extra-extra-large, accessibility-medium, accessibility-large,
8
- * accessibility-extra-large, accessibility-extra-extra-large,
9
- * accessibility-extra-extra-extra-large with Xcode 16.2.
10
- * @throws {Error} if the current platform does not support content size appearance changes
11
- * @this {XCUITestDriver}
7
+ * @param size - The content size action to set. Acceptable value is
8
+ * extra-small, small, medium, large, extra-large, extra-extra-large,
9
+ * extra-extra-extra-large, accessibility-medium, accessibility-large,
10
+ * accessibility-extra-large, accessibility-extra-extra-large,
11
+ * accessibility-extra-extra-extra-large with Xcode 16.2.
12
+ * @throws If the current platform does not support content size appearance changes
12
13
  */
13
- export function mobileSetContentSize(this: import("../driver").XCUITestDriver, size: ContentSizeAction): Promise<void>;
14
+ export declare function mobileSetContentSize(this: XCUITestDriver, size: ContentSizeAction): Promise<void>;
14
15
  /**
15
16
  * Retrieves the current content size value from the given simulator.
16
17
  *
17
18
  * @since Xcode 15 (but lower xcode could have this command)
18
- * @returns {Promise<ContentSizeResult>} the content size value. Possible return value is
19
- * extra-small, small, medium, large, extra-large, extra-extra-large,
20
- * extra-extra-extra-large, accessibility-medium, accessibility-large,
21
- * accessibility-extra-large, accessibility-extra-extra-large,
22
- * accessibility-extra-extra-extra-large,
23
- * unknown or unsupported with Xcode 16.2.
24
- * @this {XCUITestDriver}
19
+ * @returns The content size value. Possible return value is
20
+ * extra-small, small, medium, large, extra-large, extra-extra-large,
21
+ * extra-extra-extra-large, accessibility-medium, accessibility-large,
22
+ * accessibility-extra-large, accessibility-extra-extra-large,
23
+ * accessibility-extra-extra-extra-large,
24
+ * unknown or unsupported with Xcode 16.2.
25
25
  */
26
- export function mobileGetContentSize(this: import("../driver").XCUITestDriver): Promise<ContentSizeResult>;
27
- export type XCUITestDriver = import("../driver").XCUITestDriver;
28
- export type ContentSizeAction = import("./types").ContentSizeAction;
29
- export type ContentSizeResult = import("./types").ContentSizeResult;
26
+ export declare function mobileGetContentSize(this: XCUITestDriver): Promise<ContentSizeResult>;
30
27
  //# sourceMappingURL=content-size.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"content-size.d.ts","sourceRoot":"","sources":["../../../lib/commands/content-size.js"],"names":[],"mappings":"AAuBA;;;;;;;;;;;GAWG;AACH,qFARW,iBAAiB,iBAkB3B;AAED;;;;;;;;;;;GAWG;AACH,gFARa,OAAO,CAAC,iBAAiB,CAAC,CAUtC;6BAGY,OAAO,WAAW,EAAE,cAAc;gCAClC,OAAO,SAAS,EAAE,iBAAiB;gCACnC,OAAO,SAAS,EAAE,iBAAiB"}
1
+ {"version":3,"file":"content-size.d.ts","sourceRoot":"","sources":["../../../lib/commands/content-size.ts"],"names":[],"mappings":"AAGA,OAAO,KAAK,EAAC,cAAc,EAAC,MAAM,WAAW,CAAC;AAC9C,OAAO,KAAK,EAAC,iBAAiB,EAAE,iBAAiB,EAAC,MAAM,SAAS,CAAC;AAsBlE;;;;;;;;;;GAUG;AACH,wBAAsB,oBAAoB,CACxC,IAAI,EAAE,cAAc,EACpB,IAAI,EAAE,iBAAiB,GACtB,OAAO,CAAC,IAAI,CAAC,CAQf;AAED;;;;;;;;;;GAUG;AACH,wBAAsB,oBAAoB,CACxC,IAAI,EAAE,cAAc,GACnB,OAAO,CAAC,iBAAiB,CAAC,CAE5B"}
@@ -29,39 +29,31 @@ const CONTENT_SIZE = [
29
29
  * Sets content size for the given simulator.
30
30
  *
31
31
  * @since Xcode 15 (but lower xcode could have this command)
32
- * @param {ContentSizeAction} size - The content size action to set. Acceptable value is
33
- * extra-small, small, medium, large, extra-large, extra-extra-large,
34
- * extra-extra-extra-large, accessibility-medium, accessibility-large,
35
- * accessibility-extra-large, accessibility-extra-extra-large,
36
- * accessibility-extra-extra-extra-large with Xcode 16.2.
37
- * @throws {Error} if the current platform does not support content size appearance changes
38
- * @this {XCUITestDriver}
32
+ * @param size - The content size action to set. Acceptable value is
33
+ * extra-small, small, medium, large, extra-large, extra-extra-large,
34
+ * extra-extra-extra-large, accessibility-medium, accessibility-large,
35
+ * accessibility-extra-large, accessibility-extra-extra-large,
36
+ * accessibility-extra-extra-extra-large with Xcode 16.2.
37
+ * @throws If the current platform does not support content size appearance changes
39
38
  */
40
39
  async function mobileSetContentSize(size) {
41
- const simulator = assertSimulator(this);
42
40
  if (!CONTENT_SIZE.includes(lodash_1.default.lowerCase(size))) {
43
41
  throw new driver_1.errors.InvalidArgumentError(`The 'size' value is expected to be one of ${CONTENT_SIZE.join(',')}`);
44
42
  }
45
- await simulator.setContentSize(size);
43
+ await assertSimulator(this).setContentSize(size);
46
44
  }
47
45
  /**
48
46
  * Retrieves the current content size value from the given simulator.
49
47
  *
50
48
  * @since Xcode 15 (but lower xcode could have this command)
51
- * @returns {Promise<ContentSizeResult>} the content size value. Possible return value is
52
- * extra-small, small, medium, large, extra-large, extra-extra-large,
53
- * extra-extra-extra-large, accessibility-medium, accessibility-large,
54
- * accessibility-extra-large, accessibility-extra-extra-large,
55
- * accessibility-extra-extra-extra-large,
56
- * unknown or unsupported with Xcode 16.2.
57
- * @this {XCUITestDriver}
49
+ * @returns The content size value. Possible return value is
50
+ * extra-small, small, medium, large, extra-large, extra-extra-large,
51
+ * extra-extra-extra-large, accessibility-medium, accessibility-large,
52
+ * accessibility-extra-large, accessibility-extra-extra-large,
53
+ * accessibility-extra-extra-extra-large,
54
+ * unknown or unsupported with Xcode 16.2.
58
55
  */
59
56
  async function mobileGetContentSize() {
60
- return /** @type {ContentSizeResult} */ (await assertSimulator(this).getContentSize());
57
+ return await assertSimulator(this).getContentSize();
61
58
  }
62
- /**
63
- * @typedef {import('../driver').XCUITestDriver} XCUITestDriver
64
- * @typedef {import('./types').ContentSizeAction} ContentSizeAction
65
- * @typedef {import('./types').ContentSizeResult} ContentSizeResult
66
- */
67
59
  //# sourceMappingURL=content-size.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"content-size.js","sourceRoot":"","sources":["../../../lib/commands/content-size.js"],"names":[],"mappings":";;;;;AAmCA,oDAUC;AAcD,oDAEC;AA7DD,oDAAuB;AACvB,oCAA6D;AAC7D,0CAAuC;AAEvC,MAAM,eAAe,GAAG,CAAC,MAAM,EAAE,EAAE,CAAC,uBAAgB,CAAC,IAAI,CAAC,MAAM,EAAE,yBAAyB,CAAC,CAAC;AAE7F,MAAM,YAAY,GAAG;IACjB,aAAa;IACb,OAAO;IACP,QAAQ;IACR,OAAO;IACP,aAAa;IACb,mBAAmB;IACnB,yBAAyB;IACzB,sBAAsB;IACtB,qBAAqB;IACrB,2BAA2B;IAC3B,iCAAiC;IACjC,uCAAuC;IACvC,WAAW;IACX,WAAW;CACd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,IAAI,eAAM,CAAC,oBAAoB,CACnC,6CAA6C,YAAY,CAAC,IAAI,CAAC,GAAG,CAAC,EAAE,CACtE,CAAC;IACJ,CAAC;IAED,MAAM,eAAe,CAAC,IAAI,CAAC,CAAC,cAAc,CAAC,IAAI,CAAC,CAAC;AACnD,CAAC;AAED;;;;;;;;;;GAUG;AACI,KAAK,UAAU,oBAAoB;IAGxC,OAAO,MAAM,eAAe,CAAC,IAAI,CAAC,CAAC,cAAc,EAAuB,CAAC;AAC3E,CAAC"}