@limrun/appium-xcuitest-driver 10.11.0-lim.3 → 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 (285) 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 +4 -5
  194. package/build/lib/device/simulator-management.js.map +1 -1
  195. package/build/lib/device-log/ios-crash-log.d.ts +1 -1
  196. package/build/lib/device-log/ios-crash-log.d.ts.map +1 -1
  197. package/build/lib/device-log/ios-simulator-log.d.ts +1 -1
  198. package/build/lib/device-log/ios-simulator-log.d.ts.map +1 -1
  199. package/build/lib/doctor/optional-checks.d.ts +0 -9
  200. package/build/lib/doctor/optional-checks.d.ts.map +1 -1
  201. package/build/lib/doctor/optional-checks.js +1 -30
  202. package/build/lib/doctor/optional-checks.js.map +1 -1
  203. package/build/lib/driver.d.ts +11 -3
  204. package/build/lib/driver.d.ts.map +1 -1
  205. package/build/lib/driver.js +36 -12
  206. package/build/lib/driver.js.map +1 -1
  207. package/build/lib/execute-method-map.d.ts.map +1 -1
  208. package/build/lib/execute-method-map.js +0 -9
  209. package/build/lib/execute-method-map.js.map +1 -1
  210. package/build/lib/simulator-management.js +3 -3
  211. package/build/lib/simulator-management.js.map +1 -1
  212. package/lib/commands/active-app-info.ts +15 -0
  213. package/lib/commands/alert.ts +98 -0
  214. package/lib/commands/app-management.ts +414 -0
  215. package/lib/commands/{app-strings.js → app-strings.ts} +10 -9
  216. package/lib/commands/appearance.ts +70 -0
  217. package/lib/commands/audit.ts +25 -0
  218. package/lib/commands/{battery.js → battery.ts} +10 -12
  219. package/lib/commands/biometric.ts +52 -0
  220. package/lib/commands/{certificate.js → certificate.ts} +55 -50
  221. package/lib/commands/clipboard.ts +37 -0
  222. package/lib/commands/{condition.js → condition.ts} +21 -77
  223. package/lib/commands/content-size.ts +67 -0
  224. package/lib/commands/{context.js → context.ts} +174 -146
  225. package/lib/commands/device-info.ts +24 -0
  226. package/lib/commands/element.ts +419 -0
  227. package/lib/commands/{execute.js → execute.ts} +42 -38
  228. package/lib/commands/{file-movement.js → file-movement.ts} +212 -235
  229. package/lib/commands/find.ts +277 -0
  230. package/lib/commands/{general.js → general.ts} +102 -77
  231. package/lib/commands/geolocation.ts +55 -0
  232. package/lib/commands/{gesture.js → gesture.ts} +225 -183
  233. package/lib/commands/increase-contrast.ts +49 -0
  234. package/lib/commands/{iohid.js → iohid.ts} +15 -13
  235. package/lib/commands/keyboard.ts +70 -0
  236. package/lib/commands/keychains.ts +16 -0
  237. package/lib/commands/{localization.js → localization.ts} +22 -12
  238. package/lib/commands/{location.js → location.ts} +19 -22
  239. package/lib/commands/lock.ts +43 -0
  240. package/lib/commands/{log.js → log.ts} +68 -68
  241. package/lib/commands/{memory.js → memory.ts} +9 -9
  242. package/lib/commands/{navigation.js → navigation.ts} +42 -39
  243. package/lib/commands/{notifications.js → notifications.ts} +22 -14
  244. package/lib/commands/pasteboard.ts +44 -0
  245. package/lib/commands/{pcap.js → pcap.ts} +28 -28
  246. package/lib/commands/{performance.js → performance.ts} +133 -114
  247. package/lib/commands/permissions.ts +90 -0
  248. package/lib/commands/{proxy-helper.js → proxy-helper.ts} +26 -26
  249. package/lib/commands/{record-audio.js → record-audio.ts} +35 -33
  250. package/lib/commands/{recordscreen.js → recordscreen.ts} +78 -50
  251. package/lib/commands/{screenshots.js → screenshots.ts} +27 -21
  252. package/lib/commands/simctl.ts +82 -0
  253. package/lib/commands/{source.js → source.ts} +23 -20
  254. package/lib/commands/timeouts.ts +95 -0
  255. package/lib/commands/types.ts +86 -0
  256. package/lib/commands/{web.js → web.ts} +314 -264
  257. package/lib/commands/{xctest-record-screen.js → xctest-record-screen.ts} +54 -71
  258. package/lib/commands/{xctest.js → xctest.ts} +78 -71
  259. package/lib/desired-caps.ts +1 -1
  260. package/lib/device/log/ios-simulator-log.ts +2 -0
  261. package/lib/device/simulator-management.ts +3 -6
  262. package/lib/doctor/optional-checks.ts +0 -33
  263. package/lib/driver.ts +38 -13
  264. package/lib/execute-method-map.ts +0 -9
  265. package/package.json +6 -5
  266. package/lib/commands/active-app-info.js +0 -12
  267. package/lib/commands/alert.js +0 -88
  268. package/lib/commands/app-management.js +0 -346
  269. package/lib/commands/appearance.js +0 -71
  270. package/lib/commands/audit.js +0 -31
  271. package/lib/commands/biometric.js +0 -52
  272. package/lib/commands/clipboard.js +0 -35
  273. package/lib/commands/content-size.js +0 -68
  274. package/lib/commands/deviceInfo.js +0 -27
  275. package/lib/commands/element.js +0 -423
  276. package/lib/commands/find.js +0 -205
  277. package/lib/commands/geolocation.js +0 -56
  278. package/lib/commands/increase-contrast.js +0 -50
  279. package/lib/commands/keyboard.js +0 -62
  280. package/lib/commands/keychains.js +0 -17
  281. package/lib/commands/lock.js +0 -46
  282. package/lib/commands/pasteboard.js +0 -43
  283. package/lib/commands/permissions.js +0 -85
  284. package/lib/commands/simctl.js +0 -71
  285. package/lib/commands/timeouts.js +0 -68
@@ -2,6 +2,11 @@ import _ from 'lodash';
2
2
  import {fs, util} from 'appium/support';
3
3
  import {encodeBase64OrUpload} from '../utils';
4
4
  import path from 'node:path';
5
+ import type {XCUITestDriver} from '../driver';
6
+ import type {Simulator} from 'appium-ios-simulator';
7
+ import type {RealDevice} from '../device/real-device-management';
8
+ import type {HTTPHeaders} from '@appium/types';
9
+ import type {XcTestScreenRecordingInfo, XcTestScreenRecording} from './types';
5
10
 
6
11
  const MOV_EXT = '.mov';
7
12
  const FEATURE_NAME = 'xctest_screen_record';
@@ -10,30 +15,9 @@ const DOMAIN_TYPE = 'appDataContainer';
10
15
  const USERNAME = 'mobile';
11
16
  const SUBDIRECTORY = 'Attachments';
12
17
 
13
- /**
14
- * @typedef {Object} XcTestScreenRecordingInfo
15
- * @property {string} uuid Unique identifier of the video being recorded
16
- * @property {number} fps FPS value
17
- * @property {number} codec Video codec, where 0 is h264
18
- * @property {number} startedAt The timestamp when the screen recording has started in float Unix seconds
19
- */
20
-
21
- /**
22
- * @typedef {Object} XcTestScreenRecordingType
23
- * @property {string} payload Base64-encoded content of the recorded media
24
- * file if `remotePath` parameter is empty or null or an empty string otherwise.
25
- * The media is expected to a be a valid QuickTime movie (.mov).
26
- * @typedef {XcTestScreenRecordingInfo & XcTestScreenRecordingType} XcTestScreenRecording
27
- */
28
-
29
- /**
30
- * @this {XCUITestDriver}
31
- * @param {string} uuid Unique identifier of the video being recorded
32
- * @returns {Promise<string>} The full path to the screen recording movie
33
- */
34
- async function retrieveRecodingFromSimulator(uuid) {
35
- const device = /** @type {import('appium-ios-simulator').Simulator} */ (this.device);
36
- const dataRoot = /** @type {string} */ (device.getDir());
18
+ async function retrieveRecodingFromSimulator(this: XCUITestDriver, uuid: string): Promise<string> {
19
+ const device = this.device as Simulator;
20
+ const dataRoot = device.getDir();
37
21
  // On Simulators the path looks like
38
22
  // $HOME/Library/Developer/CoreSimulator/Devices/F8E1968A-8443-4A9A-AB86-27C54C36A2F6/data/Containers/Data/InternalDaemon/4E3FE8DF-AD0A-41DA-B6EC-C35E5798C219/Attachments/A044DAF7-4A58-4CD5-95C3-29B4FE80C377
39
23
  const internalDaemonRoot = path.resolve(dataRoot, 'Containers', 'Data', 'InternalDaemon');
@@ -52,13 +36,8 @@ async function retrieveRecodingFromSimulator(uuid) {
52
36
  return videoPath;
53
37
  }
54
38
 
55
- /**
56
- * @this {XCUITestDriver}
57
- * @param {string} uuid Unique identifier of the video being recorded
58
- * @returns {Promise<string>} The full path to the screen recording movie
59
- */
60
- async function retrieveRecodingFromRealDevice(uuid) {
61
- const device = /** @type {import('../device/real-device-management').RealDevice} */ (this.device);
39
+ async function retrieveRecodingFromRealDevice(this: XCUITestDriver, uuid: string): Promise<string> {
40
+ const device = this.device as RealDevice;
62
41
 
63
42
  const fileNames = await device.devicectl.listFiles(DOMAIN_TYPE, DOMAIN_IDENTIFIER, {
64
43
  username: USERNAME,
@@ -69,7 +48,10 @@ async function retrieveRecodingFromRealDevice(uuid) {
69
48
  `Unable to locate XCTest screen recording identified by '${uuid}' for the device ${this.opts.udid}`
70
49
  );
71
50
  }
72
- const videoPath = path.join(/** @type {string} */ (this.opts.tmpDir), `${uuid}${MOV_EXT}`);
51
+ if (!this.opts.tmpDir) {
52
+ throw new Error('tmpDir is not set in driver options');
53
+ }
54
+ const videoPath = path.join(this.opts.tmpDir, `${uuid}${MOV_EXT}`);
73
55
  await device.devicectl.pullFile(`${SUBDIRECTORY}/${uuid}`, videoPath, {
74
56
  username: USERNAME,
75
57
  domainIdentifier: DOMAIN_IDENTIFIER,
@@ -80,15 +62,10 @@ async function retrieveRecodingFromRealDevice(uuid) {
80
62
  return videoPath;
81
63
  }
82
64
 
83
- /**
84
- * @this {XCUITestDriver}
85
- * @param {string} uuid Unique identifier of the video being recorded
86
- * @returns {Promise<string>} The full path to the screen recording movie
87
- */
88
- async function retrieveXcTestScreenRecording(uuid) {
65
+ async function retrieveXcTestScreenRecording(this: XCUITestDriver, uuid: string): Promise<string> {
89
66
  return this.isRealDevice()
90
- ? await retrieveRecodingFromRealDevice.bind(this)(uuid)
91
- : await retrieveRecodingFromSimulator.bind(this)(uuid);
67
+ ? await retrieveRecodingFromRealDevice.call(this, uuid)
68
+ : await retrieveRecodingFromSimulator.call(this, uuid);
92
69
  }
93
70
 
94
71
  /**
@@ -102,14 +79,16 @@ async function retrieveXcTestScreenRecording(uuid) {
102
79
  * If the recording is already running this API is a noop.
103
80
  *
104
81
  * @since Xcode 15/iOS 17
105
- * @param {number} [fps] FPS value
106
- * @param {number} [codec] Video codec, where 0 is h264, 1 is HEVC
107
- * @returns {Promise<XcTestScreenRecordingInfo>} The information
108
- * about a newly created or a running the screen recording.
82
+ * @param fps - FPS value
83
+ * @param codec - Video codec, where 0 is h264, 1 is HEVC
84
+ * @returns The information about a newly created or a running the screen recording.
109
85
  * @throws {Error} If screen recording has failed to start.
110
- * @this {XCUITestDriver}
111
86
  */
112
- export async function mobileStartXctestScreenRecording(fps, codec) {
87
+ export async function mobileStartXctestScreenRecording(
88
+ this: XCUITestDriver,
89
+ fps?: number,
90
+ codec?: number,
91
+ ): Promise<XcTestScreenRecordingInfo> {
113
92
  if (this.isRealDevice()) {
114
93
  // This feature might be used to abuse real devices as there is no
115
94
  // reliable way (yet) to cleanup video recordings stored there
@@ -117,16 +96,14 @@ export async function mobileStartXctestScreenRecording(fps, codec) {
117
96
  this.assertFeatureEnabled(FEATURE_NAME);
118
97
  }
119
98
 
120
- const opts = {};
99
+ const opts: {codec?: number; fps?: number} = {};
121
100
  if (_.isInteger(codec)) {
122
101
  opts.codec = codec;
123
102
  }
124
103
  if (_.isInteger(fps)) {
125
104
  opts.fps = fps;
126
105
  }
127
- const response = /** @type {XcTestScreenRecordingInfo} */ (
128
- await this.proxyCommand('/wda/video/start', 'POST', opts)
129
- );
106
+ const response = await this.proxyCommand('/wda/video/start', 'POST', opts) as XcTestScreenRecordingInfo;
130
107
  this.log.info(`Started a new screen recording: ${JSON.stringify(response)}`);
131
108
  return response;
132
109
  }
@@ -134,13 +111,11 @@ export async function mobileStartXctestScreenRecording(fps, codec) {
134
111
  /**
135
112
  * Retrieves information about the current running screen recording.
136
113
  * If no screen recording is running then `null` is returned.
137
- *
138
- * @returns {Promise<XcTestScreenRecordingInfo?>}
139
114
  */
140
- export async function mobileGetXctestScreenRecordingInfo() {
141
- return /** @type {XcTestScreenRecordingInfo?} */ (
142
- await this.proxyCommand('/wda/video', 'GET')
143
- );
115
+ export async function mobileGetXctestScreenRecordingInfo(
116
+ this: XCUITestDriver,
117
+ ): Promise<XcTestScreenRecordingInfo | null> {
118
+ return (await this.proxyCommand('/wda/video', 'GET')) as XcTestScreenRecordingInfo | null;
144
119
  }
145
120
 
146
121
  /**
@@ -157,29 +132,37 @@ export async function mobileGetXctestScreenRecordingInfo() {
157
132
  * on the device directly or by doing factory reset.
158
133
  *
159
134
  * @since Xcode 15/iOS 17
160
- * @param {string} [remotePath] The path to the remote location, where the resulting video should be
135
+ * @param remotePath - The path to the remote location, where the resulting video should be
161
136
  * uploaded.
162
137
  * The following protocols are supported: `http`, `https`, `ftp`. Null or empty
163
138
  * string value (the default setting) means the content of resulting file
164
139
  * should be encoded as Base64 and passed as the endpoint response value. An
165
140
  * exception will be thrown if the generated media file is too big to fit into
166
141
  * the available process memory.
167
- * @param {string} [user] The name of the user for the remote authentication.
142
+ * @param user - The name of the user for the remote authentication.
168
143
  * Only works if `remotePath` is provided.
169
- * @param {string} [pass] The password for the remote authentication.
144
+ * @param pass - The password for the remote authentication.
170
145
  * Only works if `remotePath` is provided.
171
- * @param {import('@appium/types').HTTPHeaders} [headers] Additional headers mapping for multipart http(s) uploads
172
- * @param {string} [fileFieldName] The name of the form field where the file content BLOB should be stored for
146
+ * @param headers - Additional headers mapping for multipart http(s) uploads
147
+ * @param fileFieldName - The name of the form field where the file content BLOB should be stored for
173
148
  * http(s) uploads
174
- * @param {Record<string, any> | [string, any][]} [formFields] Additional form fields for multipart http(s) uploads
175
- * @param {'PUT' | 'POST' | 'PATCH'} [method='PUT'] The http multipart upload method name.
149
+ * @param formFields - Additional form fields for multipart http(s) uploads
150
+ * @param method - The http multipart upload method name.
176
151
  * Only works if `remotePath` is provided.
177
- * @returns {Promise<XcTestScreenRecording>}
152
+ * @returns The resulting movie with base64-encoded content or empty string if uploaded remotely.
178
153
  * @throws {Error} If there was an error while retrieving the video
179
154
  * file or the file content cannot be uploaded to the remote location.
180
- * @this {XCUITestDriver}
181
155
  */
182
- export async function mobileStopXctestScreenRecording(remotePath, user, pass, headers, fileFieldName, formFields, method) {
156
+ export async function mobileStopXctestScreenRecording(
157
+ this: XCUITestDriver,
158
+ remotePath?: string,
159
+ user?: string,
160
+ pass?: string,
161
+ headers?: HTTPHeaders,
162
+ fileFieldName?: string,
163
+ formFields?: Record<string, any> | [string, any][],
164
+ method: 'PUT' | 'POST' | 'PATCH' = 'PUT',
165
+ ): Promise<XcTestScreenRecording> {
183
166
  const screenRecordingInfo = await this.mobileGetXctestScreenRecordingInfo();
184
167
  if (!screenRecordingInfo) {
185
168
  throw new Error('There is no active screen recording. Did you start one beforehand?');
@@ -187,8 +170,11 @@ export async function mobileStopXctestScreenRecording(remotePath, user, pass, he
187
170
 
188
171
  this.log.debug(`Stopping the active screen recording: ${JSON.stringify(screenRecordingInfo)}`);
189
172
  await this.proxyCommand('/wda/video/stop', 'POST', {});
190
- const videoPath = await retrieveXcTestScreenRecording.bind(this)(screenRecordingInfo.uuid);
191
- const result = /** @type {XcTestScreenRecording} */ (screenRecordingInfo);
173
+ const videoPath = await retrieveXcTestScreenRecording.call(this, screenRecordingInfo.uuid);
174
+ const result: XcTestScreenRecording = {
175
+ ...screenRecordingInfo,
176
+ payload: '', // Will be set below
177
+ };
192
178
  try {
193
179
  result.payload = await encodeBase64OrUpload(videoPath, remotePath, {
194
180
  user, pass, headers, fileFieldName, formFields, method
@@ -199,6 +185,3 @@ export async function mobileStopXctestScreenRecording(remotePath, user, pass, he
199
185
  return result;
200
186
  }
201
187
 
202
- /**
203
- * @typedef {import('../driver').XCUITestDriver} XCUITestDriver
204
- */
@@ -2,34 +2,42 @@ import B from 'bluebird';
2
2
  import {logger} from 'appium/support';
3
3
  import _ from 'lodash';
4
4
  import {errors} from 'appium/driver';
5
+ import type {XCUITestDriver} from '../driver';
6
+ import type {XCTestResult, RunXCTestResult} from './types';
7
+ import type {StringRecord} from '@appium/types';
8
+ import type IDB from 'appium-idb';
5
9
 
6
10
  const XCTEST_TIMEOUT = 360000; // 60 minute timeout
7
11
 
8
12
  const xctestLog = logger.getLogger('XCTest');
9
13
 
10
14
  /**
11
- * Asserts that IDB is present and that launchWithIDB was used
15
+ * Asserts that IDB is present and that launchWithIDB was used.
12
16
  *
13
- * @param {XCUITestDriver['opts']} opts Opts object from the driver instance
17
+ * @param opts - Opts object from the driver instance
18
+ * @returns The IDB instance
19
+ * @throws {Error} If IDB is not available or launchWithIDB is not enabled
14
20
  */
15
- export function assertIDB(opts) {
16
- if (!this.device?.idb || !opts.launchWithIDB) {
21
+ export function assertIDB(this: XCUITestDriver, opts: XCUITestDriver['opts']): IDB {
22
+ const device = this.device as any;
23
+ if (!device?.idb || !opts.launchWithIDB) {
17
24
  throw new Error(
18
25
  `To use XCTest runner, IDB (https://github.com/facebook/idb) must be installed ` +
19
26
  `and sessions must be run with the "launchWithIDB" capability`,
20
27
  );
21
28
  }
22
- return this.device.idb;
29
+ return device.idb;
23
30
  }
24
31
 
25
32
  /**
26
- * Parse the stdout of XC test log
27
- * @param {string} stdout A line of standard out from `idb xctest run ...`
28
- * @returns {XCTestResult[]|string[]} results The final output of the XCTest run
33
+ * Parse the stdout of XC test log.
34
+ *
35
+ * @param stdout - A line of standard out from `idb xctest run ...`
36
+ * @returns The final output of the XCTest run
29
37
  */
30
- export function parseXCTestStdout(stdout) {
38
+ export function parseXCTestStdout(stdout: string): XCTestResult[] | string[] {
31
39
  // Parses a 'key' into JSON format
32
- function parseKey(name) {
40
+ function parseKey(name: string): string {
33
41
  const words = name.split(' ');
34
42
  let out = '';
35
43
  for (const word of words) {
@@ -39,7 +47,7 @@ export function parseXCTestStdout(stdout) {
39
47
  }
40
48
 
41
49
  // Parses a 'value' into JSON format
42
- function parseValue(value) {
50
+ function parseValue(value: string): any {
43
51
  value = value || '';
44
52
  switch (value.toLowerCase()) {
45
53
  case 'true':
@@ -51,7 +59,7 @@ export function parseXCTestStdout(stdout) {
51
59
  default:
52
60
  break;
53
61
  }
54
- if (!isNaN(value)) {
62
+ if (!isNaN(Number(value))) {
55
63
  if (!_.isString(value)) {
56
64
  return 0;
57
65
  } else if (value.indexOf('.') > 0) {
@@ -73,16 +81,14 @@ export function parseXCTestStdout(stdout) {
73
81
  return [lines[0]];
74
82
  }
75
83
 
76
- /** @type {XCTestResult[]} */
77
- const results = [];
84
+ const results: XCTestResult[] = [];
78
85
  for (const line of lines) {
79
86
  // The properties are split up by pipes and each property
80
87
  // has the format "Some Key : Some Value"
81
88
  const properties = line.split('|');
82
89
 
83
90
  // Parse each property
84
- /** @type {XCTestResult} */
85
- const output = /** @type {any} */ ({});
91
+ const output: any = {};
86
92
  let entryIndex = 0;
87
93
  for (const prop of properties) {
88
94
  if (entryIndex === 0) {
@@ -94,7 +100,7 @@ export function parseXCTestStdout(stdout) {
94
100
  // e.g. Location /path/to/XCTesterAppUITests/XCTesterAppUITests.swift:36
95
101
  output.location = prop.substring(prop.indexOf('Location') + 8).trim();
96
102
  } else {
97
- let [key, value] = prop.split(':');
103
+ const [key, value] = prop.split(':');
98
104
  output[parseKey(key.trim())] = parseValue(value ? value.trim() : '');
99
105
  }
100
106
  entryIndex++;
@@ -123,12 +129,13 @@ export function parseXCTestStdout(stdout) {
123
129
  }
124
130
 
125
131
  /**
126
- * @typedef {Error} XCUITestError
127
- *
128
- * @property {number} code Subprocess exit code
129
- * @property {string} signal The signal (SIG*) that caused the process to fail
130
- * @property {XCTestResult[]} results The output of the failed test (if there is output)
132
+ * Error thrown when XCTest subprocess returns non-zero exit code.
131
133
  */
134
+ export interface XCUITestError extends Error {
135
+ code: number;
136
+ signal?: string;
137
+ result?: XCTestResult[];
138
+ }
132
139
 
133
140
  /**
134
141
  * Run a native XCTest script.
@@ -137,36 +144,36 @@ export function parseXCTestStdout(stdout) {
137
144
  *
138
145
  * **Facebook's [IDB](https://github.com/facebook/idb) tool is required** to run such tests; see [the idb docs](https://fbidb.io/docs/test-execution/) for reference.
139
146
  *
140
- * @param {string} testRunnerBundleId - Test app bundle (e.g.: `io.appium.XCTesterAppUITests.xctrunner`)
141
- * @param {string} appUnderTestBundleId - App-under-test bundle
142
- * @param {string} xcTestBundleId - XCTest bundle ID
143
- * @param {string[]} args - Launch arguments to start the test with (see [reference documentation](https://developer.apple.com/documentation/xctest/xcuiapplication/1500477-launcharguments))
144
- * @param {'app'|'ui'|'logic'} testType - XC test type
145
- * @param {import('@appium/types').StringRecord} [env] - Environment variables passed to test
146
- * @param {number} timeout - Timeout (in ms) for session completion.
147
+ * @param testRunnerBundleId - Test app bundle (e.g.: `io.appium.XCTesterAppUITests.xctrunner`)
148
+ * @param appUnderTestBundleId - App-under-test bundle
149
+ * @param xcTestBundleId - XCTest bundle ID
150
+ * @param args - Launch arguments to start the test with (see [reference documentation](https://developer.apple.com/documentation/xctest/xcuiapplication/1500477-launcharguments))
151
+ * @param testType - XC test type
152
+ * @param env - Environment variables passed to test
153
+ * @param timeout - Timeout (in ms) for session completion
154
+ * @returns The array of test results
147
155
  * @throws {XCUITestError} Error thrown if subprocess returns non-zero exit code
148
- * @returns {Promise<import('./types').RunXCTestResult>} The array of test results
149
- * @this {XCUITestDriver}
150
156
  */
151
157
  export async function mobileRunXCTest(
152
- testRunnerBundleId,
153
- appUnderTestBundleId,
154
- xcTestBundleId,
155
- args = [],
156
- testType = 'ui',
157
- env,
158
+ this: XCUITestDriver,
159
+ testRunnerBundleId: string,
160
+ appUnderTestBundleId: string,
161
+ xcTestBundleId: string,
162
+ args: string[] = [],
163
+ testType: 'app' | 'ui' | 'logic' = 'ui',
164
+ env?: StringRecord,
158
165
  timeout = XCTEST_TIMEOUT,
159
- ) {
160
- const subproc = await assertIDB(this.opts).runXCUITest(
166
+ ): Promise<RunXCTestResult> {
167
+ const subproc = await assertIDB.call(this, this.opts).runXCUITest(
161
168
  testRunnerBundleId,
162
169
  appUnderTestBundleId,
163
170
  xcTestBundleId,
164
171
  {env, args, testType},
165
172
  );
166
173
  return await new B((resolve, reject) => {
167
- let mostRecentLogObject = null;
168
- let xctestTimeout;
169
- let lastErrorMessage = null;
174
+ let mostRecentLogObject: XCTestResult[] | string[] | null = null;
175
+ let xctestTimeout: NodeJS.Timeout | undefined;
176
+ let lastErrorMessage: string | null = null;
170
177
  if (timeout > 0) {
171
178
  xctestTimeout = setTimeout(
172
179
  () =>
@@ -179,11 +186,11 @@ export async function mobileRunXCTest(
179
186
  );
180
187
  }
181
188
 
182
- subproc.on('output', (stdout, stderr) => {
189
+ subproc.on('output', (stdout: string, stderr: string) => {
183
190
  if (stdout) {
184
191
  try {
185
192
  mostRecentLogObject = parseXCTestStdout(stdout);
186
- } catch (err) {
193
+ } catch (err: any) {
187
194
  // Fails if log parsing fails.
188
195
  // This is in case IDB changes the way that logs are formatted and
189
196
  // it breaks 'parseXCTestStdout'. If that happens we still want the process
@@ -202,23 +209,25 @@ export async function mobileRunXCTest(
202
209
  }
203
210
  });
204
211
 
205
- subproc.on('exit', (code, signal) => {
206
- clearTimeout(xctestTimeout);
212
+ subproc.on('exit', (code: number | null, signal: string | null) => {
213
+ if (xctestTimeout) {
214
+ clearTimeout(xctestTimeout);
215
+ }
207
216
  if (code !== 0) {
208
- const err = /** @type {any} */ (new Error(lastErrorMessage || mostRecentLogObject));
209
- err.code = code;
217
+ const err = new Error(lastErrorMessage || String(mostRecentLogObject)) as XCUITestError;
218
+ err.code = code ?? -1;
210
219
  if (signal != null) {
211
220
  err.signal = signal;
212
221
  }
213
222
  if (mostRecentLogObject) {
214
- err.result = mostRecentLogObject;
223
+ err.result = mostRecentLogObject as XCTestResult[];
215
224
  }
216
225
  return reject(err);
217
226
  }
218
227
  resolve({
219
- code,
220
- signal,
221
- results: mostRecentLogObject,
228
+ code: code ?? 0,
229
+ signal: signal ?? null,
230
+ results: mostRecentLogObject as XCTestResult[],
222
231
  passed: true,
223
232
  });
224
233
  });
@@ -230,11 +239,12 @@ export async function mobileRunXCTest(
230
239
  *
231
240
  * **Facebook's [IDB](https://github.com/facebook/idb) tool is required** for this command to work.
232
241
  *
233
- * @param {string} xctestApp - Path of the XCTest app (URL or filename with extension `.app`)
234
- * @returns {Promise<void>}
235
- * @this {XCUITestDriver}
242
+ * @param xctestApp - Path of the XCTest app (URL or filename with extension `.app`)
236
243
  */
237
- export async function mobileInstallXCTestBundle(xctestApp) {
244
+ export async function mobileInstallXCTestBundle(
245
+ this: XCUITestDriver,
246
+ xctestApp: string,
247
+ ): Promise<void> {
238
248
  if (!_.isString(xctestApp)) {
239
249
  throw new errors.InvalidArgumentError(
240
250
  `'xctestApp' is a required parameter for 'installXCTestBundle' and ` +
@@ -242,7 +252,7 @@ export async function mobileInstallXCTestBundle(xctestApp) {
242
252
  );
243
253
  }
244
254
  xctestLog.info(`Installing bundle '${xctestApp}'`);
245
- const idb = assertIDB(this.opts);
255
+ const idb = assertIDB.call(this, this.opts);
246
256
  const res = await this.helpers.configureApp(xctestApp, '.xctest');
247
257
  await idb.installXCTestBundle(res);
248
258
  }
@@ -252,34 +262,31 @@ export async function mobileInstallXCTestBundle(xctestApp) {
252
262
  *
253
263
  * **Facebook's [IDB](https://github.com/facebook/idb) tool is required** for this command to work.
254
264
  *
255
- * @returns {Promise<string[]>} List of XCTest bundles (e.g.: `XCTesterAppUITests.XCTesterAppUITests/testLaunchPerformance`)
256
- * @this {XCUITestDriver}
265
+ * @returns List of XCTest bundles (e.g.: `XCTesterAppUITests.XCTesterAppUITests/testLaunchPerformance`)
257
266
  */
258
- export async function mobileListXCTestBundles() {
259
- return await assertIDB(this.opts).listXCTestBundles();
267
+ export async function mobileListXCTestBundles(this: XCUITestDriver): Promise<string[]> {
268
+ return await assertIDB.call(this, this.opts).listXCTestBundles();
260
269
  }
261
270
 
262
271
  /**
263
- * List XCTests in a test bundle
272
+ * List XCTests in a test bundle.
264
273
  *
265
274
  * **Facebook's [IDB](https://github.com/facebook/idb) tool is required** for this command to work.
266
- * @param {string} bundle - Bundle ID of the XCTest
267
275
  *
268
- * @returns {Promise<string[]>} The list of xctests in the test bundle (e.g., `['XCTesterAppUITests.XCTesterAppUITests/testExample', 'XCTesterAppUITests.XCTesterAppUITests/testLaunchPerformance']`)
269
- * @this {XCUITestDriver}
276
+ * @param bundle - Bundle ID of the XCTest
277
+ * @returns The list of xctests in the test bundle (e.g., `['XCTesterAppUITests.XCTesterAppUITests/testExample', 'XCTesterAppUITests.XCTesterAppUITests/testLaunchPerformance']`)
270
278
  */
271
- export async function mobileListXCTestsInTestBundle(bundle) {
279
+ export async function mobileListXCTestsInTestBundle(
280
+ this: XCUITestDriver,
281
+ bundle: string,
282
+ ): Promise<string[]> {
272
283
  if (!_.isString(bundle)) {
273
284
  throw new errors.InvalidArgumentError(
274
285
  `'bundle' is a required parameter for 'listXCTestsInTestBundle' and ` +
275
286
  `must be a string. Found '${bundle}'`,
276
287
  );
277
288
  }
278
- const idb = assertIDB(this.opts);
289
+ const idb = assertIDB.call(this, this.opts);
279
290
  return await idb.listXCTestsInTestBundle(bundle);
280
291
  }
281
292
 
282
- /**
283
- * @typedef {import('../driver').XCUITestDriver} XCUITestDriver
284
- * @typedef {import('./types').XCTestResult} XCTestResult
285
- */
@@ -408,7 +408,7 @@ export const desiredCapConstraints = {
408
408
  // Useful when WDA is behind a gateway that requires authentication headers
409
409
  wdaRequestHeaders: {
410
410
  isObject: true,
411
- }
411
+ },
412
412
  } as const satisfies Constraints;
413
413
 
414
414
  export type XCUITestDriverConstraints = typeof desiredCapConstraints;
@@ -172,6 +172,8 @@ export class IOSSimulatorLog extends LineConsumingLog {
172
172
  this.onOutput(line, ...(streamName === 'stderr' ? ['STDERR'] : []));
173
173
  });
174
174
  }
175
+ // We immediately start anyway so this is commented out.
176
+ //
175
177
  // const startDetector = (stdout: string, stderr: string) => {
176
178
  // if (EXECVP_ERROR_PATTERN.test(stderr)) {
177
179
  // throw new Error('iOS log capture process failed to start');
@@ -18,7 +18,7 @@ const APPIUM_SIM_PREFIX = 'appiumTest';
18
18
  export async function createSim(this: XCUITestDriver): Promise<Simulator> {
19
19
  const {simulatorDevicesSetPath: devicesSetPath, deviceName, platformVersion} = this.opts;
20
20
  const platform = normalizePlatformName(this.opts.platformName);
21
- const simctl = new Simctl({devicesSetPath});
21
+ const simctl = new Simctl({devicesSetPath, limClient: this.limClient});
22
22
  if (!deviceName) {
23
23
  let deviceNames: string[] = [];
24
24
  try {
@@ -64,8 +64,6 @@ export async function getExistingSim(this: XCUITestDriver): Promise<Simulator |
64
64
  udid,
65
65
  simulatorDevicesSetPath: devicesSetPath,
66
66
  platformName,
67
- limInstanceApiUrl,
68
- limInstanceToken,
69
67
  } = this.opts;
70
68
 
71
69
  const platform = normalizePlatformName(platformName);
@@ -76,11 +74,9 @@ export async function getExistingSim(this: XCUITestDriver): Promise<Simulator |
76
74
  devicesSetPath,
77
75
  // @ts-ignore This is ok
78
76
  logger: this.log,
79
- limInstanceApiUrl,
80
- limInstanceToken,
81
77
  });
82
78
 
83
- const simctl = new Simctl({devicesSetPath, limInstanceApiUrl, limInstanceToken});
79
+ const simctl = new Simctl({devicesSetPath, limClient: this.limClient});
84
80
  let devicesMap: Record<string, any[]> | undefined;
85
81
  if (udid && _.toLower(udid) !== UDID_AUTO) {
86
82
  this.log.debug(`Looking for an existing Simulator with UDID '${udid}'`);
@@ -249,6 +245,7 @@ export async function shutdownOtherSimulators(this: XCUITestDriver): Promise<voi
249
245
  const device = this.device as Simulator;
250
246
  const simctl = new Simctl({
251
247
  devicesSetPath: device.devicesSetPath,
248
+ limClient: this.limClient,
252
249
  });
253
250
  const allDevices = _.flatMap(_.values(await simctl.getDevices()));
254
251
  const otherBootedDevices = allDevices
@@ -4,39 +4,6 @@ import type {IDoctorCheck, AppiumLogger, DoctorCheckResult} from '@appium/types'
4
4
  import '@colors/colors';
5
5
  import {exec} from 'teen_process';
6
6
 
7
- export class OptionalIdbCommandCheck implements IDoctorCheck {
8
- log!: AppiumLogger;
9
- static readonly IDB_README_URL = 'https://git.io/JnxQc';
10
-
11
- async diagnose(): Promise<DoctorCheckResult> {
12
- const fbIdbPath = await resolveExecutablePath('idb');
13
- const fbCompanionIdbPath = await resolveExecutablePath('idb_companion');
14
- if (fbIdbPath && fbCompanionIdbPath) {
15
- return doctor.okOptional('idb and idb_companion are installed');
16
- }
17
-
18
- if (!fbIdbPath && fbCompanionIdbPath) {
19
- return doctor.nokOptional('idb is not installed');
20
- } else if (fbIdbPath && !fbCompanionIdbPath) {
21
- return doctor.nokOptional('idb_companion is not installed');
22
- }
23
- return doctor.nokOptional('idb and idb_companion are not installed');
24
- }
25
-
26
- async fix(): Promise<string> {
27
- return `Why ${'idb'.bold} is needed and how to install it: ${OptionalIdbCommandCheck.IDB_README_URL}`;
28
- }
29
-
30
- hasAutofix(): boolean {
31
- return false;
32
- }
33
-
34
- isOptional(): boolean {
35
- return true;
36
- }
37
- }
38
- export const optionalIdbCheck = new OptionalIdbCommandCheck();
39
-
40
7
  export class OptionalSimulatorCheck implements IDoctorCheck {
41
8
  log!: AppiumLogger;
42
9
  static readonly SUPPORTED_SIMULATOR_PLATFORMS: SimulatorPlatform[] = [