@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,15 +1,17 @@
1
+ import type { XCUITestDriver } from '../driver';
2
+ import type { PushPayload, NotificationType } from './types';
1
3
  /**
2
4
  * Simulates push notification delivery to a simulated device.
3
5
  *
4
6
  * **Only "remote" push notifications are supported.** VoIP, Complication, File Provider, and other types are unsupported.
5
7
  *
6
8
  * Supported in Xcode SDK 11.4+.
7
- * @param {string} bundleId - The bundle identifier of the target application
8
- * @param {import('./types').PushPayload} payload - Valid push payload.
9
+ *
10
+ * @param bundleId - The bundle identifier of the target application
11
+ * @param payload - Valid push payload.
9
12
  * @group Simulator Only
10
- * @this {XCUITestDriver}
11
13
  */
12
- export function mobilePushNotification(this: import("../driver").XCUITestDriver, bundleId: string, payload: import("./types").PushPayload): Promise<void>;
14
+ export declare function mobilePushNotification(this: XCUITestDriver, bundleId: string, payload: PushPayload): Promise<void>;
13
15
  /**
14
16
  * Blocks until the expected notification is delivered.
15
17
  *
@@ -17,12 +19,10 @@ export function mobilePushNotification(this: import("../driver").XCUITestDriver,
17
19
  * [`XCTNSNotificationExpectation`](https://developer.apple.com/documentation/xctest/xctnsnotificationexpectation?language=objc) and
18
20
  * [`XCTDarwinNotificationExpectation`](https://developer.apple.com/documentation/xctest/xctdarwinnotificationexpectation?language=objc) entities.
19
21
  *
20
- * @param {string} name - The name of the notification to expect
21
- * @param {import('./types').NotificationType} type - Which notification type to expect.
22
- * @param {number} timeoutSeconds - For how long to wait until the notification is delivered (in float seconds).
22
+ * @param name - The name of the notification to expect
23
+ * @param type - Which notification type to expect.
24
+ * @param timeoutSeconds - For how long to wait until the notification is delivered (in float seconds).
23
25
  * @throws A [`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.
24
- * @this {XCUITestDriver}
25
26
  */
26
- export function mobileExpectNotification(this: import("../driver").XCUITestDriver, name: string, type?: import("./types").NotificationType, timeoutSeconds?: number): Promise<unknown>;
27
- export type XCUITestDriver = import("../driver").XCUITestDriver;
27
+ export declare function mobileExpectNotification(this: XCUITestDriver, name: string, type?: NotificationType, timeoutSeconds?: number): Promise<void>;
28
28
  //# sourceMappingURL=notifications.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"notifications.d.ts","sourceRoot":"","sources":["../../../lib/commands/notifications.js"],"names":[],"mappings":"AAGA;;;;;;;;;;GAUG;AACH,2FALW,MAAM,WACN,OAAO,SAAS,EAAE,WAAW,iBA8BvC;AAED;;;;;;;;;;;;GAYG;AACH,yFANW,MAAM,SACN,OAAO,SAAS,EAAE,gBAAgB,mBAClC,MAAM,oBAUhB;6BAGY,OAAO,WAAW,EAAE,cAAc"}
1
+ {"version":3,"file":"notifications.d.ts","sourceRoot":"","sources":["../../../lib/commands/notifications.ts"],"names":[],"mappings":"AAEA,OAAO,KAAK,EAAC,cAAc,EAAC,MAAM,WAAW,CAAC;AAC9C,OAAO,KAAK,EAAC,WAAW,EAAE,gBAAgB,EAAC,MAAM,SAAS,CAAC;AAG3D;;;;;;;;;;GAUG;AACH,wBAAsB,sBAAsB,CAC1C,IAAI,EAAE,cAAc,EACpB,QAAQ,EAAE,MAAM,EAChB,OAAO,EAAE,WAAW,GACnB,OAAO,CAAC,IAAI,CAAC,CA0Bf;AAED;;;;;;;;;;;GAWG;AACH,wBAAsB,wBAAwB,CAC5C,IAAI,EAAE,cAAc,EACpB,IAAI,EAAE,MAAM,EACZ,IAAI,GAAE,gBAA0B,EAChC,cAAc,GAAE,MAAW,GAC1B,OAAO,CAAC,IAAI,CAAC,CAMf"}
@@ -13,10 +13,10 @@ const lodash_1 = __importDefault(require("lodash"));
13
13
  * **Only "remote" push notifications are supported.** VoIP, Complication, File Provider, and other types are unsupported.
14
14
  *
15
15
  * Supported in Xcode SDK 11.4+.
16
- * @param {string} bundleId - The bundle identifier of the target application
17
- * @param {import('./types').PushPayload} payload - Valid push payload.
16
+ *
17
+ * @param bundleId - The bundle identifier of the target application
18
+ * @param payload - Valid push payload.
18
19
  * @group Simulator Only
19
- * @this {XCUITestDriver}
20
20
  */
21
21
  async function mobilePushNotification(bundleId, payload) {
22
22
  if (!this.isSimulator()) {
@@ -33,7 +33,7 @@ async function mobilePushNotification(bundleId, payload) {
33
33
  throw new driver_1.errors.InvalidArgumentError(`The 'payload.aps' value must be a valid dictionary. ` +
34
34
  `Got ${JSON.stringify(payload.aps)} instead`);
35
35
  }
36
- return await /** @type {import('appium-ios-simulator').Simulator} */ (this.device).pushNotification({
36
+ await this.device.pushNotification({
37
37
  ...payload,
38
38
  'Simulator Target Bundle': bundleId,
39
39
  });
@@ -45,20 +45,16 @@ async function mobilePushNotification(bundleId, payload) {
45
45
  * [`XCTNSNotificationExpectation`](https://developer.apple.com/documentation/xctest/xctnsnotificationexpectation?language=objc) and
46
46
  * [`XCTDarwinNotificationExpectation`](https://developer.apple.com/documentation/xctest/xctdarwinnotificationexpectation?language=objc) entities.
47
47
  *
48
- * @param {string} name - The name of the notification to expect
49
- * @param {import('./types').NotificationType} type - Which notification type to expect.
50
- * @param {number} timeoutSeconds - For how long to wait until the notification is delivered (in float seconds).
48
+ * @param name - The name of the notification to expect
49
+ * @param type - Which notification type to expect.
50
+ * @param timeoutSeconds - For how long to wait until the notification is delivered (in float seconds).
51
51
  * @throws A [`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.
52
- * @this {XCUITestDriver}
53
52
  */
54
53
  async function mobileExpectNotification(name, type = 'plain', timeoutSeconds = 60) {
55
- return await this.proxyCommand('/wda/expectNotification', 'POST', {
54
+ await this.proxyCommand('/wda/expectNotification', 'POST', {
56
55
  name,
57
56
  type,
58
57
  timeout: timeoutSeconds,
59
58
  });
60
59
  }
61
- /**
62
- * @typedef {import('../driver').XCUITestDriver} XCUITestDriver
63
- */
64
60
  //# sourceMappingURL=notifications.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"notifications.js","sourceRoot":"","sources":["../../../lib/commands/notifications.js"],"names":[],"mappings":";;;;;AAcA,wDA0BC;AAeD,4DAMC;AA7DD,0CAAqC;AACrC,oDAAuB;AAEvB;;;;;;;;;;GAUG;AACI,KAAK,UAAU,sBAAsB,CAAC,QAAQ,EAAE,OAAO;IAC5D,IAAI,CAAC,IAAI,CAAC,WAAW,EAAE,EAAE,CAAC;QACxB,MAAM,IAAI,KAAK,CAAC,wCAAwC,CAAC,CAAC;IAC5D,CAAC;IAED,IAAI,CAAC,QAAQ,EAAE,CAAC;QACd,MAAM,IAAI,eAAM,CAAC,oBAAoB,CACnC,8DAA8D,CAC/D,CAAC;IACJ,CAAC;IACD,IAAI,CAAC,gBAAC,CAAC,aAAa,CAAC,OAAO,CAAC,EAAE,CAAC;QAC9B,MAAM,IAAI,eAAM,CAAC,oBAAoB,CACnC,2DAA2D;YACzD,OAAO,IAAI,CAAC,SAAS,CAAC,OAAO,CAAC,UAAU,CAC3C,CAAC;IACJ,CAAC;IACD,IAAI,CAAC,gBAAC,CAAC,aAAa,CAAC,OAAO,CAAC,GAAG,CAAC,EAAE,CAAC;QAClC,MAAM,IAAI,eAAM,CAAC,oBAAoB,CACnC,sDAAsD;YACpD,OAAO,IAAI,CAAC,SAAS,CAAC,OAAO,CAAC,GAAG,CAAC,UAAU,CAC/C,CAAC;IACJ,CAAC;IACD,OAAO,MAAM,uDAAuD,CAAC,CAAC,IAAI,CAAC,MAAM,CAAC,CAAC,gBAAgB,CAAC;Q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MAAoB,CAAC,gBAAgB,CAAC;QAChD,GAAG,OAAO;QACV,yBAAyB,EAAE,QAAQ;KACpC,CAAC,CAAC;AACL,CAAC;AAED;;;;;;;;;;;GAWG;AACI,KAAK,UAAU,wBAAwB,CAE5C,IAAY,EACZ,OAAyB,OAAO,EAChC,iBAAyB,EAAE;IAE3B,MAAM,IAAI,CAAC,YAAY,CAAC,yBAAyB,EAAE,MAAM,EAAE;QACzD,IAAI;QACJ,IAAI;QACJ,OAAO,EAAE,cAAc;KACxB,CAAC,CAAC;AACL,CAAC"}
@@ -1,23 +1,22 @@
1
+ import type { XCUITestDriver } from '../driver';
1
2
  /**
2
3
  * Sets the Simulator's pasteboard content to the given value.
3
4
  *
4
5
  * Does not work for real devices.
5
- * @param {string} content - The content to set
6
- * @param {string} encoding - The content's encoding
6
+ *
7
+ * @param content - The content to set
8
+ * @param encoding - The content's encoding
7
9
  * @group Simulator Only
8
- * @returns {Promise<void>}
9
- * @this {XCUITestDriver}
10
10
  */
11
- export function mobileSetPasteboard(this: import("../driver").XCUITestDriver, content: string, encoding?: string): Promise<void>;
11
+ export declare function mobileSetPasteboard(this: XCUITestDriver, content: string, encoding?: BufferEncoding): Promise<void>;
12
12
  /**
13
13
  * Gets the Simulator's pasteboard content.
14
14
  *
15
15
  * Does not work for real devices.
16
- * @param {BufferEncoding} encoding - Expected encoding of returned string
16
+ *
17
+ * @param encoding - Expected encoding of returned string
17
18
  * @group Simulator Only
18
- * @this {XCUITestDriver}
19
- * @returns {Promise<string>} The pasteboard content string
19
+ * @returns The pasteboard content string
20
20
  */
21
- export function mobileGetPasteboard(this: import("../driver").XCUITestDriver, encoding?: BufferEncoding): Promise<string>;
22
- export type XCUITestDriver = import("../driver").XCUITestDriver;
21
+ export declare function mobileGetPasteboard(this: XCUITestDriver, encoding?: BufferEncoding): Promise<string>;
23
22
  //# sourceMappingURL=pasteboard.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"pasteboard.d.ts","sourceRoot":"","sources":["../../../lib/commands/pasteboard.js"],"names":[],"mappings":"AAGA;;;;;;;;;GASG;AACH,uFANW,MAAM,aACN,MAAM,GAEJ,OAAO,CAAC,IAAI,CAAC,CAYzB;AAED;;;;;;;;GAQG;AACH,yFALW,cAAc,GAGZ,OAAO,CAAC,MAAM,CAAC,CAO3B;6BAGY,OAAO,WAAW,EAAE,cAAc"}
1
+ {"version":3,"file":"pasteboard.d.ts","sourceRoot":"","sources":["../../../lib/commands/pasteboard.ts"],"names":[],"mappings":"AAEA,OAAO,KAAK,EAAC,cAAc,EAAC,MAAM,WAAW,CAAC;AAG9C;;;;;;;;GAQG;AACH,wBAAsB,mBAAmB,CACvC,IAAI,EAAE,cAAc,EACpB,OAAO,EAAE,MAAM,EACf,QAAQ,GAAE,cAAuB,GAChC,OAAO,CAAC,IAAI,CAAC,CAOf;AAED;;;;;;;;GAQG;AACH,wBAAsB,mBAAmB,CACvC,IAAI,EAAE,cAAc,EACpB,QAAQ,GAAE,cAAuB,GAChC,OAAO,CAAC,MAAM,CAAC,CAGjB"}
@@ -11,11 +11,10 @@ const utils_1 = require("../utils");
11
11
  * Sets the Simulator's pasteboard content to the given value.
12
12
  *
13
13
  * Does not work for real devices.
14
- * @param {string} content - The content to set
15
- * @param {string} encoding - The content's encoding
14
+ *
15
+ * @param content - The content to set
16
+ * @param encoding - The content's encoding
16
17
  * @group Simulator Only
17
- * @returns {Promise<void>}
18
- * @this {XCUITestDriver}
19
18
  */
20
19
  async function mobileSetPasteboard(content, encoding = 'utf8') {
21
20
  utils_1.assertSimulator.call(this, 'Setting pasteboard content');
@@ -23,23 +22,19 @@ async function mobileSetPasteboard(content, encoding = 'utf8') {
23
22
  // can be empty string
24
23
  throw new Error('Pasteboard content is mandatory to set');
25
24
  }
26
- return await /** @type {import('appium-ios-simulator').Simulator} */ (this.device).simctl.setPasteboard(content, /** @type {BufferEncoding} */ (encoding));
25
+ await this.device.simctl.setPasteboard(content, encoding);
27
26
  }
28
27
  /**
29
28
  * Gets the Simulator's pasteboard content.
30
29
  *
31
30
  * Does not work for real devices.
32
- * @param {BufferEncoding} encoding - Expected encoding of returned string
31
+ *
32
+ * @param encoding - Expected encoding of returned string
33
33
  * @group Simulator Only
34
- * @this {XCUITestDriver}
35
- * @returns {Promise<string>} The pasteboard content string
34
+ * @returns The pasteboard content string
36
35
  */
37
36
  async function mobileGetPasteboard(encoding = 'utf8') {
38
37
  utils_1.assertSimulator.call(this, 'Getting pasteboard content');
39
- return await /** @type {import('appium-ios-simulator').Simulator} */ (this.device).simctl.getPasteboard(
40
- /** @type {BufferEncoding} */ (encoding));
38
+ return await this.device.simctl.getPasteboard(encoding);
41
39
  }
42
- /**
43
- * @typedef {import('../driver').XCUITestDriver} XCUITestDriver
44
- */
45
40
  //# sourceMappingURL=pasteboard.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"pasteboard.js","sourceRoot":"","sources":["../../../lib/commands/pasteboard.js"],"names":[],"mappings":";;;;;AAaA,kDASC;AAWD,kDAKC;AAtCD,oDAAuB;AACvB,oCAA2C;AAE3C;;;;;;;;;GASG;AACI,KAAK,UAAU,mBAAmB,CAAC,OAAO,EAAE,QAAQ,GAAG,MAAM;IAClE,uBAAe,CAAC,IAAI,CAAC,IAAI,EAAE,4BAA4B,CAAC,CAAC;IACzD,IAAI,CAAC,gBAAC,CAAC,QAAQ,CAAC,OAAO,CAAC,EAAE,CAAC;QACzB,sBAAsB;QACtB,MAAM,IAAI,KAAK,CAAC,wCAAwC,CAAC,CAAC;IAC5D,CAAC;IACD,OAAO,MAAM,uDAAuD,CAAC,CAAC,IAAI,CAAC,MAAM,CAAC,CAAC,MAAM,CAAC,aAAa,CACrG,OAAO,EAAE,6BAA6B,CAAC,CAAC,QAAQ,CAAC,CAClD,CAAC;AACJ,CAAC;AAED;;;;;;;;GAQG;AACI,KAAK,UAAU,mBAAmB,CAAC,QAAQ,GAAG,MAAM;IACzD,uBAAe,CAAC,IAAI,CAAC,IAAI,EAAE,4BAA4B,CAAC,CAAC;IACzD,OAAO,MAAM,uDAAuD,CAAC,CAAC,IAAI,CAAC,MAAM,CAAC,CAAC,MAAM,CAAC,aAAa;IACrG,6BAA6B,CAAC,CAAC,QAAQ,CAAC,CACzC,CAAC;AACJ,CAAC;AAED;;GAEG"}
1
+ {"version":3,"file":"pasteboard.js","sourceRoot":"","sources":["../../../lib/commands/pasteboard.ts"],"names":[],"mappings":";;;;;AAcA,kDAWC;AAWD,kDAMC;AA1CD,oDAAuB;AACvB,oCAA2C;AAI3C;;;;;;;;GAQG;AACI,KAAK,UAAU,mBAAmB,CAEvC,OAAe,EACf,WAA2B,MAAM;IAEjC,uBAAe,CAAC,IAAI,CAAC,IAAI,EAAE,4BAA4B,CAAC,CAAC;IACzD,IAAI,CAAC,gBAAC,CAAC,QAAQ,CAAC,OAAO,CAAC,EAAE,CAAC;QACzB,sBAAsB;QACtB,MAAM,IAAI,KAAK,CAAC,wCAAwC,CAAC,CAAC;IAC5D,CAAC;IACD,MAAO,IAAI,CAAC,MAAoB,CAAC,MAAM,CAAC,aAAa,CAAC,OAAO,EAAE,QAAQ,CAAC,CAAC;AAC3E,CAAC;AAED;;;;;;;;GAQG;AACI,KAAK,UAAU,mBAAmB,CAEvC,WAA2B,MAAM;IAEjC,uBAAe,CAAC,IAAI,CAAC,IAAI,EAAE,4BAA4B,CAAC,CAAC;IACzD,OAAO,MAAO,IAAI,CAAC,MAAoB,CAAC,MAAM,CAAC,aAAa,CAAC,QAAQ,CAAC,CAAC;AACzE,CAAC"}
@@ -1,26 +1,24 @@
1
+ import type { XCUITestDriver } from '../driver';
2
+ export declare class TrafficCapture {
3
+ private mainProcess;
4
+ private readonly udid;
5
+ private readonly log;
6
+ private readonly resultPath;
7
+ constructor(udid: string, log: any, resultPath: string);
8
+ start(timeoutSeconds: number): Promise<void>;
9
+ isCapturing(): boolean;
10
+ interrupt(force?: boolean): Promise<boolean>;
11
+ finish(): Promise<string>;
12
+ cleanup(): Promise<void>;
13
+ }
1
14
  /**
2
15
  * Records the given network traffic capture into a .pcap file.
3
16
  *
4
- * @param {number} timeLimitSec - The maximum recording time, in seconds. The maximum value is `43200` (12 hours).
5
- * @param {boolean} forceRestart - 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).
17
+ * @param timeLimitSec - The maximum recording time, in seconds. The maximum value is `43200` (12 hours).
18
+ * @param forceRestart - 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).
6
19
  * @throws {Error} If network traffic capture has failed to start.
7
- * @returns {Promise<void>}
8
- * @this {XCUITestDriver}
9
20
  */
10
- export function mobileStartPcap(this: import("../driver").XCUITestDriver, timeLimitSec?: number, forceRestart?: boolean): Promise<void>;
11
- export class mobileStartPcap {
12
- /**
13
- * Records the given network traffic capture into a .pcap file.
14
- *
15
- * @param {number} timeLimitSec - The maximum recording time, in seconds. The maximum value is `43200` (12 hours).
16
- * @param {boolean} forceRestart - 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).
17
- * @throws {Error} If network traffic capture has failed to start.
18
- * @returns {Promise<void>}
19
- * @this {XCUITestDriver}
20
- */
21
- constructor(this: import("../driver").XCUITestDriver, timeLimitSec?: number, forceRestart?: boolean);
22
- _trafficCapture: TrafficCapture;
23
- }
21
+ export declare function mobileStartPcap(this: XCUITestDriver, timeLimitSec?: number, forceRestart?: boolean): Promise<void>;
24
22
  /**
25
23
  * Stops network traffic capture.
26
24
  *
@@ -29,26 +27,8 @@ export class mobileStartPcap {
29
27
  * If no previously recorded file is found and no active traffic capture processes are running, then the method returns an empty string.
30
28
  *
31
29
  * @remarks Network capture files can be viewed in [Wireshark](https://www.wireshark.org/) and other similar applications.
32
- * @returns {Promise<string>} Base64-encoded content of the recorded pcap file or an empty string if no traffic capture has been started before.
30
+ * @returns Base64-encoded content of the recorded pcap file or an empty string if no traffic capture has been started before.
33
31
  * @throws {Error} If there was an error while getting the capture file.
34
- * @this {XCUITestDriver}
35
32
  */
36
- export function mobileStopPcap(this: import("../driver").XCUITestDriver): Promise<string>;
37
- export class mobileStopPcap {
38
- _trafficCapture: any;
39
- }
40
- export class TrafficCapture {
41
- constructor(udid: any, log: any, resultPath: any);
42
- /** @type {import('teen_process').SubProcess|null} */
43
- mainProcess: any | null;
44
- udid: any;
45
- log: any;
46
- resultPath: any;
47
- start(timeoutSeconds: any): Promise<void>;
48
- isCapturing(): boolean;
49
- interrupt(force?: boolean): Promise<boolean>;
50
- finish(): Promise<any>;
51
- cleanup(): Promise<void>;
52
- }
53
- export type XCUITestDriver = import("../driver").XCUITestDriver;
33
+ export declare function mobileStopPcap(this: XCUITestDriver): Promise<string>;
54
34
  //# sourceMappingURL=pcap.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"pcap.d.ts","sourceRoot":"","sources":["../../../lib/commands/pcap.js"],"names":[],"mappings":"AAyEA;;;;;;;;GAQG;AACH,yFANW,MAAM,iBACN,OAAO,GAEL,OAAO,CAAC,IAAI,CAAC,CAgDzB;;IAtDD;;;;;;;;OAQG;IACH,qEANW,MAAM,iBACN,OAAO,EAkDjB;IAzBG,gCAA2B;;AA2B/B;;;;;;;;;;;GAWG;AACH,0EAJa,OAAO,CAAC,MAAM,CAAC,CA0B3B;;IAJG,qBAA2B;;AAvJ/B;IAGE,kDAKC;IAPD,qDAAqD;IACrD,aADW,GAAiC,GAAC,IAAI,CACrC;IAEV,UAAgB;IAChB,SAAc;IACd,gBAA4B;IAI9B,0CAmBC;IAED,uBAEC;IAED,6CAgBC;IAED,uBAGC;IAED,yBAIC;CACF;6BA+FY,OAAO,WAAW,EAAE,cAAc"}
1
+ {"version":3,"file":"pcap.d.ts","sourceRoot":"","sources":["../../../lib/commands/pcap.ts"],"names":[],"mappings":"AAIA,OAAO,KAAK,EAAC,cAAc,EAAC,MAAM,WAAW,CAAC;AAM9C,qBAAa,cAAc;IACzB,OAAO,CAAC,WAAW,CAA2B;IAC9C,OAAO,CAAC,QAAQ,CAAC,IAAI,CAAS;IAC9B,OAAO,CAAC,QAAQ,CAAC,GAAG,CAAM;IAC1B,OAAO,CAAC,QAAQ,CAAC,UAAU,CAAS;gBAExB,IAAI,EAAE,MAAM,EAAE,GAAG,EAAE,GAAG,EAAE,UAAU,EAAE,MAAM;IAMhD,KAAK,CAAC,cAAc,EAAE,MAAM,GAAG,OAAO,CAAC,IAAI,CAAC;IAmBlD,WAAW,IAAI,OAAO;IAIhB,SAAS,CAAC,KAAK,UAAQ,GAAG,OAAO,CAAC,OAAO,CAAC;IAkB1C,MAAM,IAAI,OAAO,CAAC,MAAM,CAAC;IAKzB,OAAO,IAAI,OAAO,CAAC,IAAI,CAAC;CAK/B;AAED;;;;;;GAMG;AACH,wBAAsB,eAAe,CACnC,IAAI,EAAE,cAAc,EACpB,YAAY,SAAM,EAClB,YAAY,UAAQ,GACnB,OAAO,CAAC,IAAI,CAAC,CA6Cf;AAED;;;;;;;;;;GAUG;AACH,wBAAsB,cAAc,CAAC,IAAI,EAAE,cAAc,GAAG,OAAO,CAAC,MAAM,CAAC,CAsB1E"}
@@ -10,19 +10,20 @@ const driver_1 = require("appium/driver");
10
10
  const MAX_CAPTURE_TIME_SEC = 60 * 60 * 12;
11
11
  const DEFAULT_EXT = '.pcap';
12
12
  class TrafficCapture {
13
- /** @type {import('teen_process').SubProcess|null} */
14
- mainProcess;
13
+ mainProcess = null;
14
+ udid;
15
+ log;
16
+ resultPath;
15
17
  constructor(udid, log, resultPath) {
16
18
  this.udid = udid;
17
19
  this.log = log;
18
20
  this.resultPath = resultPath;
19
- this.mainProcess = null;
20
21
  }
21
22
  async start(timeoutSeconds) {
22
- this.mainProcess = /** @type {import('teen_process').SubProcess} */ (await new py_ios_device_client_1.Pyidevice({
23
+ this.mainProcess = await new py_ios_device_client_1.Pyidevice({
23
24
  udid: this.udid,
24
25
  log: this.log,
25
- }).collectPcap(this.resultPath));
26
+ }).collectPcap(this.resultPath);
26
27
  this.mainProcess.on('line-stderr', (line) => this.log.info(`[Pcap] ${line}`));
27
28
  this.log.info(`Starting network traffic capture session on the device '${this.udid}'. ` +
28
29
  `Will timeout in ${timeoutSeconds}s`);
@@ -64,11 +65,9 @@ exports.TrafficCapture = TrafficCapture;
64
65
  /**
65
66
  * Records the given network traffic capture into a .pcap file.
66
67
  *
67
- * @param {number} timeLimitSec - The maximum recording time, in seconds. The maximum value is `43200` (12 hours).
68
- * @param {boolean} forceRestart - 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).
68
+ * @param timeLimitSec - The maximum recording time, in seconds. The maximum value is `43200` (12 hours).
69
+ * @param forceRestart - 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).
69
70
  * @throws {Error} If network traffic capture has failed to start.
70
- * @returns {Promise<void>}
71
- * @this {XCUITestDriver}
72
71
  */
73
72
  async function mobileStartPcap(timeLimitSec = 180, forceRestart = false) {
74
73
  if (this.isSimulator()) {
@@ -118,9 +117,8 @@ async function mobileStartPcap(timeLimitSec = 180, forceRestart = false) {
118
117
  * If no previously recorded file is found and no active traffic capture processes are running, then the method returns an empty string.
119
118
  *
120
119
  * @remarks Network capture files can be viewed in [Wireshark](https://www.wireshark.org/) and other similar applications.
121
- * @returns {Promise<string>} Base64-encoded content of the recorded pcap file or an empty string if no traffic capture has been started before.
120
+ * @returns Base64-encoded content of the recorded pcap file or an empty string if no traffic capture has been started before.
122
121
  * @throws {Error} If there was an error while getting the capture file.
123
- * @this {XCUITestDriver}
124
122
  */
125
123
  async function mobileStopPcap() {
126
124
  if (!this._trafficCapture) {
@@ -143,7 +141,4 @@ async function mobileStopPcap() {
143
141
  }
144
142
  return await (0, utils_1.encodeBase64OrUpload)(resultPath);
145
143
  }
146
- /**
147
- * @typedef {import('../driver').XCUITestDriver} XCUITestDriver
148
- */
149
144
  //# sourceMappingURL=pcap.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"pcap.js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CAAC"}
@@ -1,3 +1,5 @@
1
+ import type { XCUITestDriver } from '../driver';
2
+ import type { Method } from 'axios';
1
3
  /**
2
4
  * Starts performance profiling for the device under test.
3
5
  *
@@ -11,34 +13,11 @@
11
13
  *
12
14
  * Read [Recording, Pausing, and Stopping Traces](https://developer.apple.com/library/content/documentation/DeveloperTools/Conceptual/InstrumentsUserGuide/Recording,Pausing,andStoppingTraces.html) for more details.
13
15
  *
14
- * @param {number} timeout - The maximum count of milliseconds to record the profiling information.
15
- * @param {string} profileName - The name of existing performance profile to apply. Can also contain the full path to the chosen template on the server file system. Note: not all profiles are supported on mobile devices.
16
- * @param {number|'current'} [pid] - 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).
17
- * @this {XCUITestDriver}
16
+ * @param timeout - The maximum count of milliseconds to record the profiling information.
17
+ * @param profileName - The name of existing performance profile to apply. Can also contain the full path to the chosen template on the server file system. Note: not all profiles are supported on mobile devices.
18
+ * @param pid - 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).
18
19
  */
19
- export function mobileStartPerfRecord(this: import("../driver").XCUITestDriver, timeout?: number, profileName?: string, pid?: number | "current"): Promise<void>;
20
- export class mobileStartPerfRecord {
21
- /**
22
- * Starts performance profiling for the device under test.
23
- *
24
- * Relaxing security is mandatory for simulators. It can always work for real devices.
25
- *
26
- * Since XCode 12 the method tries to use `xctrace` tool to record performance stats.
27
- *
28
- * The `instruments` developer utility is used as a fallback for this purpose if `xctrace` is not available.
29
- *
30
- * It is possible to record multiple profiles at the same time.
31
- *
32
- * Read [Recording, Pausing, and Stopping Traces](https://developer.apple.com/library/content/documentation/DeveloperTools/Conceptual/InstrumentsUserGuide/Recording,Pausing,andStoppingTraces.html) for more details.
33
- *
34
- * @param {number} timeout - The maximum count of milliseconds to record the profiling information.
35
- * @param {string} profileName - The name of existing performance profile to apply. Can also contain the full path to the chosen template on the server file system. Note: not all profiles are supported on mobile devices.
36
- * @param {number|'current'} [pid] - 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).
37
- * @this {XCUITestDriver}
38
- */
39
- constructor(this: import("../driver").XCUITestDriver, timeout?: number, profileName?: string, pid?: number | "current");
40
- _perfRecorders: PerfRecorder[] | undefined;
41
- }
20
+ export declare function mobileStartPerfRecord(this: XCUITestDriver, timeout?: number, profileName?: string, pid?: number | 'current'): Promise<void>;
42
21
  /**
43
22
  * Stops performance recording operation previously started by {@linkcode XCUITestDriver.mobileStartPerfRecord mobile: startPerfRecord}.
44
23
  *
@@ -46,40 +25,42 @@ export class mobileStartPerfRecord {
46
25
  *
47
26
  * The resulting file in `.trace` format can be either returned directly as base64-encoded zip archive or uploaded to a remote location (such files can be pretty large). Afterwards it is possible to unarchive and open such files with Xcode Dev Tools.
48
27
  *
49
- * @param {string} [remotePath] - 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.
50
- * @param {string} [user] - The name of the user for the remote authentication. Only works if `remotePath` is provided.
51
- * @param {string} [pass] - The password for the remote authentication. Only works if `remotePath` is provided.
52
- * @param {import('axios').Method} [method] - The http multipart upload method name. Only works if `remotePath` is provided. Defaults to `PUT`
53
- * @param {string} profileName - The name of existing performance profile to stop the recording for. Multiple recorders for different profile names could be executed at the same time.
54
- * @param {Record<string,any>} [headers] - Additional headers mapping for multipart http(s) uploads
55
- * @param {string} [fileFieldName] - The name of the form field, where the file content BLOB should be stored for http(s) uploads. Defaults to `file`
56
- * @param {Record<string,any>|([string, any])[]} [formFields] - Additional form fields for multipart http(s) uploads
57
- *
58
- * @returns {Promise<string>} The resulting file in `.trace` format. This file can either be returned directly as base64-encoded `.zip` archive or uploaded to a remote location (note that such files may be large), _depending on the `remotePath` argument value._ Thereafter, the file may be unarchived and opened with Xcode Developer Tools.
28
+ * @param remotePath - 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.
29
+ * @param user - The name of the user for the remote authentication. Only works if `remotePath` is provided.
30
+ * @param pass - The password for the remote authentication. Only works if `remotePath` is provided.
31
+ * @param method - The http multipart upload method name. Only works if `remotePath` is provided. Defaults to `PUT`
32
+ * @param profileName - The name of existing performance profile to stop the recording for. Multiple recorders for different profile names could be executed at the same time.
33
+ * @param headers - Additional headers mapping for multipart http(s) uploads
34
+ * @param fileFieldName - The name of the form field, where the file content BLOB should be stored for http(s) uploads. Defaults to `file`
35
+ * @param formFields - Additional form fields for multipart http(s) uploads
36
+ * @returns The resulting file in `.trace` format. This file can either be returned directly as base64-encoded `.zip` archive or uploaded to a remote location (note that such files may be large), _depending on the `remotePath` argument value._ Thereafter, the file may be unarchived and opened with Xcode Developer Tools.
59
37
  * @throws {Error} If no performance recording with given profile name/device udid combination
60
38
  * has been started before or the resulting .trace file has not been generated properly.
61
- * @this {XCUITestDriver}
62
39
  */
63
- export function mobileStopPerfRecord(this: import("../driver").XCUITestDriver, remotePath?: string, user?: string, pass?: string, method?: import("axios").Method, profileName?: string, headers?: Record<string, any>, fileFieldName?: string, formFields?: Record<string, any> | ([string, any])[]): Promise<string>;
64
- export class PerfRecorder {
65
- constructor(reportRoot: any, udid: any, opts?: {});
66
- /** @type {import('teen_process').SubProcess|null} */
67
- _process: any | null;
68
- _zippedReportPath: string;
69
- _timeout: any;
70
- _profileName: any;
71
- _reportPath: string;
72
- _pid: any;
73
- _udid: any;
74
- _logger: import("@appium/types").AppiumLogger;
75
- _archivePromise: Promise<string> | null;
76
- get profileName(): any;
77
- getOriginalReportPath(): Promise<string>;
40
+ export declare function mobileStopPerfRecord(this: XCUITestDriver, remotePath?: string, user?: string, pass?: string, method?: Method, profileName?: string, headers?: Record<string, any>, fileFieldName?: string, formFields?: Record<string, any> | [string, any][]): Promise<string>;
41
+ export declare class PerfRecorder {
42
+ private _process;
43
+ private _zippedReportPath;
44
+ private readonly _timeout;
45
+ private readonly _profileName;
46
+ private readonly _reportPath;
47
+ private readonly _pid;
48
+ private readonly _udid;
49
+ private readonly _logger;
50
+ private _archivePromise;
51
+ constructor(reportRoot: string, udid: string, opts?: PerfRecorderOptions);
52
+ get profileName(): string;
78
53
  getZippedReportPath(): Promise<string>;
79
54
  isRunning(): boolean;
80
- _enforceTermination(): Promise<string>;
81
55
  start(): Promise<void>;
82
56
  stop(force?: boolean): Promise<string>;
57
+ private getOriginalReportPath;
58
+ private _enforceTermination;
59
+ }
60
+ interface PerfRecorderOptions {
61
+ timeout?: number;
62
+ profileName?: string;
63
+ pid?: number;
83
64
  }
84
- export type XCUITestDriver = import("../driver").XCUITestDriver;
65
+ export {};
85
66
  //# sourceMappingURL=performance.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"performance.d.ts","sourceRoot":"","sources":["../../../lib/commands/performance.js"],"names":[],"mappings":"AAuBA;;;;;;;;;;;;;;;;;GAiBG;AACH,0FALW,MAAM,gBACN,MAAM,QACN,MAAM,GAAC,SAAS,iBA4C1B;;IA3DD;;;;;;;;;;;;;;;;;OAiBG;IACH,gEALW,MAAM,gBACN,MAAM,QACN,MAAM,GAAC,SAAS,EA4C1B;IADC,2CAAgE;;AAGlE;;;;;;;;;;;;;;;;;;;;GAoBG;AACH,4FAdW,MAAM,SACN,MAAM,SACN,MAAM,WACN,OAAO,OAAO,EAAE,MAAM,gBACtB,MAAM,YACN,MAAM,CAAC,MAAM,EAAC,GAAG,CAAC,kBAClB,MAAM,eACN,MAAM,CAAC,MAAM,EAAC,GAAG,CAAC,GAAC,CAAC,CAAC,MAAM,EAAE,GAAG,CAAC,CAAC,EAAE,GAElC,OAAO,CAAC,MAAM,CAAC,CAoD3B;AA2BD;IAGE,mDAeC;IAjBD,qDAAqD;IACrD,UADW,GAAiC,GAAC,IAAI,CACxC;IAGP,0BAA2B;IAC3B,cAAoF;IACpF,kBAA4D;IAC5D,oBAGC;IACD,UAAoB;IACpB,WAAiB;IACjB,8CAEC;IACD,wCAA2B;IAG7B,uBAEC;IAED,yCAEC;IAED,uCAsBC;IAED,qBAEC;IAED,uCAgCC;IAED,uBAiGC;IAED,uCAkBC;CACF;6BAcY,OAAO,WAAW,EAAE,cAAc"}
1
+ {"version":3,"file":"performance.d.ts","sourceRoot":"","sources":["../../../lib/commands/performance.ts"],"names":[],"mappings":"AAOA,OAAO,KAAK,EAAC,cAAc,EAAC,MAAM,WAAW,CAAC;AAE9C,OAAO,KAAK,EAAC,MAAM,EAAC,MAAM,OAAO,CAAC;AAiBlC;;;;;;;;;;;;;;;;GAgBG;AACH,wBAAsB,qBAAqB,CACzC,IAAI,EAAE,cAAc,EACpB,OAAO,SAAqB,EAC5B,WAAW,SAAuB,EAClC,GAAG,CAAC,EAAE,MAAM,GAAG,SAAS,GACvB,OAAO,CAAC,IAAI,CAAC,CAmCf;AAED;;;;;;;;;;;;;;;;;;GAkBG;AACH,wBAAsB,oBAAoB,CACxC,IAAI,EAAE,cAAc,EACpB,UAAU,CAAC,EAAE,MAAM,EACnB,IAAI,CAAC,EAAE,MAAM,EACb,IAAI,CAAC,EAAE,MAAM,EACb,MAAM,CAAC,EAAE,MAAM,EACf,WAAW,SAAuB,EAClC,OAAO,CAAC,EAAE,MAAM,CAAC,MAAM,EAAE,GAAG,CAAC,EAC7B,aAAa,CAAC,EAAE,MAAM,EACtB,UAAU,CAAC,EAAE,MAAM,CAAC,MAAM,EAAE,GAAG,CAAC,GAAG,CAAC,MAAM,EAAE,GAAG,CAAC,EAAE,GACjD,OAAO,CAAC,MAAM,CAAC,CA2CjB;AAED,qBAAa,YAAY;IACvB,OAAO,CAAC,QAAQ,CAAoB;IACpC,OAAO,CA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