appium-xcuitest-driver 10.13.3 → 10.14.0

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.
@@ -1 +1 @@
1
- {"version":3,"file":"execute-method-map.js","sourceRoot":"","sources":["../../lib/execute-method-map.ts"],"names":[],"mappings":";;;AAGa,QAAA,gBAAgB,GAAG;IAC9B,aAAa,EAAE;QACb,OAAO,EAAE,WAAW;QACpB,MAAM,EAAE,EAAC,QAAQ,EAAE,CAAC,GAAG,EAAE,GAAG,CAAC,EAAE,QAAQ,EAAE,CAAC,WAAW,CAAC,EAAC;KACxD;IACD,gBAAgB,EAAE;QAChB,OAAO,EAAE,cAAc;QACvB,MAAM,EAAE;YACN,QAAQ,EAAE,CAAC,MAAM,EAAE,WAAW,EAAE,iBAAiB,EAAE,WAAW,EAAE,UAAU,EAAE,WAAW,CAAC;SACzF;KACF;IACD,gCAAgC,EAAE;QAChC,OAAO,EAAE,8BAA8B;QACvC,MAAM,EAAE;YACN,QAAQ,EAAE,CAAC,WAAW,EAAE,OAAO,CAAC;YAChC,QAAQ,EAAE,CAAC,QAAQ,CAAC;SACrB;KACF;IACD,2BAA2B,EAAE;QAC3B,OAAO,EAAE,yBAAyB;QAClC,MAAM,EAAE;YACN,QAAQ,EAAE,CAAC,UAAU,CAAC;SACvB;KACF;IACD,+FAA+F;IAC/F,gGAAgG;IAChG,6FAA6F;IAC7F,+FAA+F;IAC/F,eAAe,EAAE;QACf,OAAO,EAAE,aAAa;QACtB,MAAM,EAAE;YACN,QAAQ,EAAE,CAAC,WAAW,CAAC;YACvB,QAAQ,EAAE,CAAC,UAAU,EAAE,WAAW,CAAC;SACpC;KACF;IACD,oGAAoG;IACpG,eAAe,EAAE;QACf,OAAO,EAAE,aAAa;QACtB,MAAM,EAAE;YACN,QAAQ,EAAE,CAAC,OAAO,EAAE,UAAU,CAAC;YAC/B,QAAQ,EAAE,CAAC,WAAW,CAAC;SACxB;KACF;IACD,+FAA+F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,QAAQ,EAAE,CAAC,YAAY,CAAC;YACxB,QAAQ,EAAE;gBACR,WAAW;gBACX,YAAY;gBACZ,cAAc;gBACd,eAAe;gBACf,WAAW;gBACX,cAAc;aACf;SACF;KACF;IACD,4BAA4B,EAAE;QAC5B,4EAA4E;QAC5E,OAAO,EAAE,oBAAoB;KAC9B;IACD,sBAAsB,EAAE;QACtB,OAAO,EAAE,oBAAoB;QAC7B,MAAM,EAAE;YACN,QAAQ,EAAE,CAAC,MAAM,CAAC;SACnB;KACF;IACD,yBAAyB,EAAE;QACzB,OAAO,EAAE,iBAAiB;KAC3B;IACD,cAAc,EAAE;QACd,OAAO,EAAE,MAAM;QACf,MAAM,EAAE;YACN,QAAQ,EAAE,CAAC,SAAS,CAAC;SACtB;KACF;IACD,gBAAgB,EAAE;QAChB,OAAO,EAAE,QAAQ;KAClB;IACD,kBAAkB,EAAE;QAClB,OAAO,EAAE,UAAU;KACpB;IACD,uBAAuB,EAAE;QACvB,OAAO,EAAE,YAAY;QACrB,MAAM,EAAE,EAAC,QAAQ,EAAE,CAAC,SAAS,CAAC,EAAC;KAChC;IACD,gBAAgB,EAAE;QAChB,OAAO,EAAE,cAAc;QACvB,MAAM,EAAE;YACN,QAAQ,EAAE,CAAC,SAAS,CAAC;YACrB,QAAQ,EAAE,CAAC,MAAM,EAAE,SAAS,CAAC;SAC9B;KACF;CACkD,CAAC"}
1
+ {"version":3,"file":"execute-method-map.js","sourceRoot":"","sources":["../../lib/execute-method-map.ts"],"names":[],"mappings":";;;AAGa,QAAA,gBAAgB,GAAG;IAC9B,aAAa,EAAE;QACb,OAAO,EAAE,WAAW;QACpB,MAAM,EAAE,EAAC,QAAQ,EAAE,CAAC,GAAG,EAAE,GAAG,CAAC,EAAE,QAAQ,EAAE,CAAC,WAAW,CAAC,EAAC;KACxD;IACD,gBAAgB,EAAE;QAChB,OAAO,EAAE,cAAc;QACvB,MAAM,EAAE;YACN,QAAQ,EAAE,CAAC,MAAM,EAAE,WAAW,EAA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,QAAQ;KAClB;IACD,kBAAkB,EAAE;QAClB,OAAO,EAAE,UAAU;KACpB;IACD,uBAAuB,EAAE;QACvB,OAAO,EAAE,YAAY;QACrB,MAAM,EAAE,EAAC,QAAQ,EAAE,CAAC,SAAS,CAAC,EAAC;KAChC;IACD,gBAAgB,EAAE;QAChB,OAAO,EAAE,cAAc;QACvB,MAAM,EAAE;YACN,QAAQ,EAAE,CAAC,SAAS,CAAC;YACrB,QAAQ,EAAE,CAAC,MAAM,EAAE,SAAS,CAAC;SAC9B;KACF;CACkD,CAAC"}
@@ -3,13 +3,22 @@ import {errors} from 'appium/driver';
3
3
  import moment from 'moment-timezone';
4
4
  import {utilities} from 'appium-ios-device';
5
5
  import {exec} from 'teen_process';
6
+ import type {XCUITestDriver} from '../driver';
7
+ import type {Viewport, ScreenInfo, ButtonName} from './types';
8
+ import type {Size, Rect} from '@appium/types';
9
+ import type {Simulator} from 'appium-ios-simulator';
6
10
 
7
11
  const MOMENT_FORMAT_ISO8601 = 'YYYY-MM-DDTHH:mm:ssZ';
8
12
 
9
13
  /**
10
- * @this {XCUITestDriver}
14
+ * Gets the currently active element.
15
+ *
16
+ * In web context, returns the active element from the DOM.
17
+ * In native context, returns the active element from the current view.
18
+ *
19
+ * @returns The active element
11
20
  */
12
- export async function active() {
21
+ export async function active(this: XCUITestDriver): Promise<any> {
13
22
  if (this.isWebContext()) {
14
23
  return this.cacheWebElements(await this.executeAtom('active_element', []));
15
24
  }
@@ -17,31 +26,29 @@ export async function active() {
17
26
  }
18
27
 
19
28
  /**
20
- * Trigger a touch/fingerprint match or match failure
29
+ * Trigger a touch/fingerprint match or match failure.
21
30
  *
22
- * @param {boolean} match - whether the match should be a success or failure
23
- * @this {XCUITestDriver}
31
+ * @param match - Whether the match should be a success or failure
24
32
  */
25
- export async function touchId(match = true) {
33
+ export async function touchId(this: XCUITestDriver, match = true): Promise<void> {
26
34
  await this.mobileSendBiometricMatch('touchId', match);
27
35
  }
28
- /**
29
- * Toggle whether the device is enrolled in the touch ID program
30
- *
31
- * @param {boolean} isEnabled - whether to enable or disable the touch ID program
32
- *
33
- * @this {XCUITestDriver}
34
- */
35
- export async function toggleEnrollTouchId(isEnabled = true) {
36
+
37
+ /**
38
+ * Toggle whether the device is enrolled in the touch ID program.
39
+ *
40
+ * @param isEnabled - Whether to enable or disable the touch ID program
41
+ */
42
+ export async function toggleEnrollTouchId(this: XCUITestDriver, isEnabled = true): Promise<void> {
36
43
  await this.mobileEnrollBiometric(isEnabled);
37
44
  }
38
45
 
39
46
  /**
40
- * Get the window size
41
- * @this {XCUITestDriver}
42
- * @returns {Promise<import('@appium/types').Size>}
47
+ * Get the window size.
48
+ *
49
+ * @returns The window size (width and height)
43
50
  */
44
- export async function getWindowSize() {
51
+ export async function getWindowSize(this: XCUITestDriver): Promise<Size> {
45
52
  const {width, height} = await this.getWindowRect();
46
53
  return {width, height};
47
54
  }
@@ -49,11 +56,13 @@ export async function getWindowSize() {
49
56
  /**
50
57
  * Retrieves the actual device time.
51
58
  *
52
- * @param {string} format - The format specifier string. Read the [MomentJS documentation](https://momentjs.com/docs/) to get the full list of supported datetime format specifiers. The default format is `YYYY-MM-DDTHH:mm:ssZ`, which complies to ISO-8601.
53
- * @returns {Promise<string>} Formatted datetime string or the raw command output (if formatting fails)
54
- * @this {XCUITestDriver}
59
+ * @param format - The format specifier string. Read the [MomentJS documentation](https://momentjs.com/docs/) to get the full list of supported datetime format specifiers. The default format is `YYYY-MM-DDTHH:mm:ssZ`, which complies to ISO-8601.
60
+ * @returns Formatted datetime string or the raw command output (if formatting fails)
55
61
  */
56
- export async function getDeviceTime(format = MOMENT_FORMAT_ISO8601) {
62
+ export async function getDeviceTime(
63
+ this: XCUITestDriver,
64
+ format = MOMENT_FORMAT_ISO8601,
65
+ ): Promise<string> {
57
66
  this.log.info('Attempting to capture iOS device date and time');
58
67
  if (!this.isRealDevice()) {
59
68
  this.log.info('On simulator. Assuming device time is the same as host time');
@@ -94,22 +103,29 @@ export async function getDeviceTime(format = MOMENT_FORMAT_ISO8601) {
94
103
  }
95
104
 
96
105
  /**
97
- * Retrieves the current device time
106
+ * Retrieves the current device time.
98
107
  *
99
- * @param {string} format - See {@linkcode getDeviceTime.format}
100
- * @returns {Promise<string>} Formatted datetime string or the raw command output if formatting fails
101
- * @this {XCUITestDriver}
108
+ * This is a wrapper around {@linkcode getDeviceTime}.
109
+ *
110
+ * @param format - See {@linkcode getDeviceTime.format}
111
+ * @returns Formatted datetime string or the raw command output if formatting fails
102
112
  */
103
- export async function mobileGetDeviceTime(format = MOMENT_FORMAT_ISO8601) {
113
+ export async function mobileGetDeviceTime(
114
+ this: XCUITestDriver,
115
+ format = MOMENT_FORMAT_ISO8601,
116
+ ): Promise<string> {
104
117
  return await this.getDeviceTime(format);
105
118
  }
106
119
 
107
120
  /**
108
- * For W3C
109
- * @this {XCUITestDriver}
110
- * @return {Promise<import('@appium/types').Rect>}
121
+ * Gets the window rectangle (position and size).
122
+ *
123
+ * For W3C compatibility. In web context, returns the browser window dimensions.
124
+ * In native context, returns the device window dimensions.
125
+ *
126
+ * @returns The window rectangle
111
127
  */
112
- export async function getWindowRect() {
128
+ export async function getWindowRect(this: XCUITestDriver): Promise<Rect> {
113
129
  if (this.isWebContext()) {
114
130
  const script = 'return {' +
115
131
  'x: window.screenX || 0,' +
@@ -120,22 +136,29 @@ export async function getWindowRect() {
120
136
  return await this.executeAtom('execute_script', [script]);
121
137
  }
122
138
 
123
- return /** @type {import('@appium/types').Rect} */ (
124
- await this.proxyCommand('/window/rect', 'GET')
125
- );
139
+ return (await this.proxyCommand('/window/rect', 'GET')) as Rect;
126
140
  }
127
141
 
128
142
  /**
129
- * @this {XCUITestDriver}
143
+ * Removes/uninstalls the given application from the device under test.
144
+ *
145
+ * This is a wrapper around {@linkcode mobileRemoveApp mobile: removeApp}.
146
+ *
147
+ * @param bundleId - The bundle identifier of the application to be removed
148
+ * @returns `true` if the application has been removed successfully; `false` otherwise
130
149
  */
131
- export async function removeApp(bundleId) {
150
+ export async function removeApp(this: XCUITestDriver, bundleId: string): Promise<boolean> {
132
151
  return await this.mobileRemoveApp(bundleId);
133
152
  }
134
153
 
135
154
  /**
136
- * @this {XCUITestDriver}
155
+ * Launches the app.
156
+ *
157
+ * @deprecated This API has been deprecated and is not supported anymore.
158
+ * Consider using corresponding 'mobile:' extensions to manage the state of the app under test.
159
+ * @throws {Error} Always throws an error indicating the API is deprecated
137
160
  */
138
- export async function launchApp() {
161
+ export async function launchApp(this: XCUITestDriver): Promise<void> {
139
162
  throw new Error(
140
163
  `The launchApp API has been deprecated and is not supported anymore. ` +
141
164
  `Consider using corresponding 'mobile:' extensions to manage the state of the app under test.`,
@@ -143,9 +166,13 @@ export async function launchApp() {
143
166
  }
144
167
 
145
168
  /**
146
- * @this {XCUITestDriver}
169
+ * Closes the app.
170
+ *
171
+ * @deprecated This API has been deprecated and is not supported anymore.
172
+ * Consider using corresponding 'mobile:' extensions to manage the state of the app under test.
173
+ * @throws {Error} Always throws an error indicating the API is deprecated
147
174
  */
148
- export async function closeApp() {
175
+ export async function closeApp(this: XCUITestDriver): Promise<void> {
149
176
  throw new Error(
150
177
  `The closeApp API has been deprecated and is not supported anymore. ` +
151
178
  `Consider using corresponding 'mobile:' extensions to manage the state of the app under test.`,
@@ -153,11 +180,15 @@ export async function closeApp() {
153
180
  }
154
181
 
155
182
  /**
156
- * @this {XCUITestDriver}
157
- * @param {string} url
158
- * @returns {Promise<void>}
183
+ * Sets the URL for the current session.
184
+ *
185
+ * In web context, navigates to the URL using the remote debugger.
186
+ * In native context on real devices, uses the proxy command.
187
+ * In native context on simulators, uses simctl to open the URL.
188
+ *
189
+ * @param url - The URL to navigate to
159
190
  */
160
- export async function setUrl(url) {
191
+ export async function setUrl(this: XCUITestDriver, url: string): Promise<void> {
161
192
  this.log.debug(`Attempting to set url '${url}'`);
162
193
 
163
194
  if (this.isWebContext()) {
@@ -171,7 +202,7 @@ export async function setUrl(url) {
171
202
  if (this.isRealDevice()) {
172
203
  await this.proxyCommand('/url', 'POST', {url});
173
204
  } else {
174
- await /** @type {import('appium-ios-simulator').Simulator} */ (this.device).simctl.openUrl(url);
205
+ await (this.device as Simulator).simctl.openUrl(url);
175
206
  }
176
207
  }
177
208
 
@@ -179,10 +210,10 @@ export async function setUrl(url) {
179
210
  * Retrieves the viewport dimensions.
180
211
  *
181
212
  * The viewport is the device's screen size with status bar size subtracted if the latter is present/visible.
182
- * @returns {Promise<import('./types').Viewport>}
183
- * @this {XCUITestDriver}
213
+ *
214
+ * @returns The viewport rectangle
184
215
  */
185
- export async function getViewportRect() {
216
+ export async function getViewportRect(this: XCUITestDriver): Promise<Viewport> {
186
217
  const scale = await this.getDevicePixelRatio();
187
218
  // status bar height comes in unscaled, so scale it
188
219
  const statusBarHeight = Math.trunc((await this.getStatusBarHeight()) * scale);
@@ -202,26 +233,29 @@ export async function getViewportRect() {
202
233
  * Get information about the screen.
203
234
  *
204
235
  * @privateRemarks memoized in constructor
205
- * @this {XCUITestDriver}
206
- * @returns {Promise<ScreenInfo>}
236
+ * @returns Screen information including dimensions, scale, and status bar size
207
237
  */
208
- export async function getScreenInfo() {
209
- return /** @type {ScreenInfo} */ (await this.proxyCommand('/wda/screen', 'GET'));
238
+ export async function getScreenInfo(this: XCUITestDriver): Promise<ScreenInfo> {
239
+ return (await this.proxyCommand('/wda/screen', 'GET')) as ScreenInfo;
210
240
  }
211
241
 
212
242
  /**
213
- * @this {XCUITestDriver}
243
+ * Gets the status bar height.
244
+ *
245
+ * @returns The height of the status bar in logical pixels
214
246
  */
215
- export async function getStatusBarHeight() {
247
+ export async function getStatusBarHeight(this: XCUITestDriver): Promise<number> {
216
248
  const {statusBarSize} = await this.getScreenInfo();
217
249
  return statusBarSize.height;
218
250
  }
219
251
 
220
252
  /**
221
- * memoized in constructor
222
- * @this {XCUITestDriver}
253
+ * Gets the device pixel ratio.
254
+ *
255
+ * @privateRemarks memoized in constructor
256
+ * @returns The device pixel ratio (scale factor)
223
257
  */
224
- export async function getDevicePixelRatio() {
258
+ export async function getDevicePixelRatio(this: XCUITestDriver): Promise<number> {
225
259
  const {scale} = await this.getScreenInfo();
226
260
  return scale;
227
261
  }
@@ -236,11 +270,14 @@ export async function getDevicePixelRatio() {
236
270
  *
237
271
  * Use {@linkcode mobilePerformIoHidEvent} to call a more universal API to perform a button press with duration on any supported device.
238
272
  *
239
- * @param {import('./types').ButtonName} name - The name of the button to be pressed.
240
- * @param {number} [durationSeconds] - The duration of the button press in seconds (float).
241
- * @this {XCUITestDriver}
273
+ * @param name - The name of the button to be pressed
274
+ * @param durationSeconds - The duration of the button press in seconds (float)
242
275
  */
243
- export async function mobilePressButton(name, durationSeconds) {
276
+ export async function mobilePressButton(
277
+ this: XCUITestDriver,
278
+ name: ButtonName,
279
+ durationSeconds?: number,
280
+ ): Promise<void> {
244
281
  if (!name) {
245
282
  throw new errors.InvalidArgumentError('Button name is mandatory');
246
283
  }
@@ -254,25 +291,13 @@ export async function mobilePressButton(name, durationSeconds) {
254
291
  * Process a string as speech and send it to Siri.
255
292
  *
256
293
  * Presents the Siri UI, if it is not currently active, and accepts a string which is then processed as if it were recognized speech. See [the documentation of `activateWithVoiceRecognitionText`](https://developer.apple.com/documentation/xctest/xcuisiriservice/2852140-activatewithvoicerecognitiontext?language=objc) for more details.
257
-
258
- * @param {string} text - Text to be sent to Siri
259
- * @returns {Promise<void>}
260
- * @this {XCUITestDriver}
294
+ *
295
+ * @param text - Text to be sent to Siri
261
296
  */
262
- export async function mobileSiriCommand(text) {
297
+ export async function mobileSiriCommand(this: XCUITestDriver, text: string): Promise<void> {
263
298
  if (!text) {
264
299
  throw new errors.InvalidArgumentError('"text" argument is mandatory');
265
300
  }
266
301
  await this.proxyCommand('/wda/siri/activate', 'POST', {text});
267
302
  }
268
303
 
269
- /**
270
- * @typedef {Object} PressButtonOptions
271
- * @property {string} name - The name of the button to be pressed.
272
- * @property {number} [durationSeconds] - Duration in float seconds.
273
- */
274
-
275
- /**
276
- * @typedef {import('../driver').XCUITestDriver} XCUITestDriver
277
- * @typedef {import('./types').ScreenInfo} ScreenInfo
278
- */
@@ -11,22 +11,33 @@ import { toLogEntry } from '../device/log/helpers';
11
11
  import { NATIVE_WIN } from '../utils';
12
12
  import { BIDI_EVENT_NAME } from './bidi/constants';
13
13
  import { makeLogEntryAddedEvent } from './bidi/models';
14
+ import type {XCUITestDriver} from '../driver';
15
+ import type {LogEntry, LogListener} from './types';
16
+ import type {LogDefRecord, AppiumServer, WSServer} from '@appium/types';
17
+ import type {Simulator} from 'appium-ios-simulator';
18
+ import type {EventEmitter} from 'node:events';
14
19
 
15
20
  /**
16
21
  * Determines the websocket endpoint based on the `sessionId`
17
- * @param {string} sessionId
18
- * @returns {string}
19
22
  */
20
- const WEBSOCKET_ENDPOINT = (sessionId) =>
23
+ const WEBSOCKET_ENDPOINT = (sessionId: string): string =>
21
24
  `${DEFAULT_WS_PATHNAME_PREFIX}/session/${sessionId}/appium/device/syslog`;
22
25
  const COLOR_CODE_PATTERN = /\u001b\[(\d+(;\d+)*)?m/g; // eslint-disable-line no-control-regex
23
26
  const GET_SERVER_LOGS_FEATURE = 'get_server_logs';
24
27
 
28
+ type XCUITestDriverLogTypes = keyof typeof SUPPORTED_LOG_TYPES;
29
+
30
+ interface BiDiListenerProperties {
31
+ type: string;
32
+ srcEventName?: string;
33
+ context?: string;
34
+ entryTransformer?: (x: any) => LogEntry;
35
+ }
36
+
25
37
  /**
26
- * @type {import('@appium/types').LogDefRecord}
27
38
  * @privateRemarks The return types for these getters should be specified
28
39
  */
29
- const SUPPORTED_LOG_TYPES = {
40
+ const SUPPORTED_LOG_TYPES: LogDefRecord = {
30
41
  syslog: {
31
42
  description: 'System Logs - Device logs for iOS applications on real devices and simulators',
32
43
  getter: async (self) => await self.extractLogs('syslog', self.logs),
@@ -49,9 +60,6 @@ const SUPPORTED_LOG_TYPES = {
49
60
  },
50
61
  server: {
51
62
  description: 'Appium server logs',
52
- /**
53
- * @returns {import('./types').LogEntry[]}
54
- */
55
63
  getter: (self) => {
56
64
  self.assertFeatureEnabled(GET_SERVER_LOGS_FEATURE);
57
65
  return self.log.unwrap().record.map(nativeLogEntryToSeleniumEntry);
@@ -59,7 +67,7 @@ const SUPPORTED_LOG_TYPES = {
59
67
  },
60
68
  };
61
69
 
62
- const LOG_NAMES_TO_CAPABILITY_NAMES_MAP = {
70
+ const LOG_NAMES_TO_CAPABILITY_NAMES_MAP: Record<string, string> = {
63
71
  safariConsole: 'showSafariConsoleLog',
64
72
  safariNetwork: 'showSafariNetworkLog',
65
73
  enablePerformanceLogging: 'enablePerformanceLogging',
@@ -68,12 +76,18 @@ const LOG_NAMES_TO_CAPABILITY_NAMES_MAP = {
68
76
  export const supportedLogTypes = SUPPORTED_LOG_TYPES;
69
77
 
70
78
  /**
79
+ * Extracts logs of the specified type from the logs container.
71
80
  *
72
- * @param {XCUITestDriverLogTypes} logType
73
- * @param {Partial<Record<XCUITestDriverLogTypes,{getLogs(): Promise<any>}>>} [logsContainer]
74
- * @this {XCUITestDriver}
81
+ * @param logType - The type of log to extract
82
+ * @param logsContainer - Container holding log objects
83
+ * @returns The extracted logs
84
+ * @throws {Error} If logs are not available or the log type is not found
75
85
  */
76
- export async function extractLogs(logType, logsContainer = {}) {
86
+ export async function extractLogs(
87
+ this: XCUITestDriver,
88
+ logType: XCUITestDriverLogTypes,
89
+ logsContainer: Partial<Record<XCUITestDriverLogTypes, {getLogs(): Promise<any>}>> = {},
90
+ ): Promise<any> {
77
91
  // make sure that we have logs at all
78
92
  // otherwise it's not been initialized
79
93
  if (_.isEmpty(logsContainer)) {
@@ -97,9 +111,14 @@ export async function extractLogs(logType, logsContainer = {}) {
97
111
  }
98
112
 
99
113
  /**
100
- * @this {XCUITestDriver}
114
+ * Starts capturing iOS system logs.
115
+ *
116
+ * Initializes and starts capturing syslog and crashlog. Optionally starts Safari console and network logs
117
+ * if the corresponding capabilities are enabled.
118
+ *
119
+ * @returns `true` if syslog capture started successfully; `false` otherwise
101
120
  */
102
- export async function startLogCapture() {
121
+ export async function startLogCapture(this: XCUITestDriver): Promise<boolean> {
103
122
  this.logs = this.logs || {};
104
123
  if (!_.isUndefined(this.logs.syslog) && this.logs.syslog.isCapturing) {
105
124
  this.log.warn('Trying to start iOS log capture but it has already started!');
@@ -109,7 +128,7 @@ export async function startLogCapture() {
109
128
  if (_.isUndefined(this.logs.syslog)) {
110
129
  [this.logs.crashlog,] = assignBiDiLogListener.bind(this)(
111
130
  new IOSCrashLog({
112
- sim: /** @type {import('appium-ios-simulator').Simulator} */ (this.device),
131
+ sim: this.device as Simulator,
113
132
  udid: this.isRealDevice() ? this.opts.udid : undefined,
114
133
  log: this.log,
115
134
  }), {
@@ -119,12 +138,12 @@ export async function startLogCapture() {
119
138
  [this.logs.syslog,] = assignBiDiLogListener.bind(this)(
120
139
  this.isRealDevice()
121
140
  ? new IOSDeviceLog({
122
- udid: /** @type {string} */ (this.opts.udid),
141
+ udid: this.opts.udid as string,
123
142
  showLogs: this.opts.showIOSLog,
124
143
  log: this.log,
125
144
  })
126
145
  : new IOSSimulatorLog({
127
- sim: /** @type {import('appium-ios-simulator').Simulator} */ (this.device),
146
+ sim: this.device as Simulator,
128
147
  showLogs: this.opts.showIOSLog,
129
148
  iosSimulatorLogsPredicate: this.opts.iosSimulatorLogsPredicate,
130
149
  simulatorLogLevel: this.opts.simulatorLogLevel,
@@ -167,14 +186,13 @@ export async function startLogCapture() {
167
186
  }
168
187
 
169
188
  let didStartSyslog = false;
170
- /** @type {Promise[]} */
171
- const promises = [
189
+ const promises: Promise<any>[] = [
172
190
  (async () => {
173
191
  try {
174
192
  await this.logs.syslog?.startCapture();
175
193
  didStartSyslog = true;
176
194
  this.eventEmitter.emit('syslogStarted', this.logs.syslog);
177
- } catch (err) {
195
+ } catch (err: any) {
178
196
  this.log.debug(err.stack);
179
197
  this.log.warn(`Continuing without capturing device logs: ${err.message}`);
180
198
  }
@@ -189,22 +207,18 @@ export async function startLogCapture() {
189
207
  /**
190
208
  * Starts an iOS system logs broadcast websocket.
191
209
  *
192
- * The websocket listens on the same host and port as Appium. The endpoint created is `/ws/session/:sessionId:/appium/syslog`.
210
+ * The websocket listens on the same host and port as Appium. The endpoint created is `/ws/session/:sessionId:/appium/syslog`.
193
211
  *
194
212
  * If the websocket is already running, this command does nothing.
195
213
  *
196
- * Each connected webcoket listener will receive syslog lines as soon as they are visible to Appium.
214
+ * Each connected websocket listener will receive syslog lines as soon as they are visible to Appium.
197
215
  * @see https://appiumpro.com/editions/55-using-mobile-execution-commands-to-continuously-stream-device-logs-with-appium
198
- * @returns {Promise<void>}
199
- * @this {XCUITestDriver}
200
216
  */
201
- export async function mobileStartLogsBroadcast() {
202
- const pathname = WEBSOCKET_ENDPOINT(/** @type {string} */ (this.sessionId));
217
+ export async function mobileStartLogsBroadcast(this: XCUITestDriver): Promise<void> {
218
+ const pathname = WEBSOCKET_ENDPOINT(this.sessionId as string);
203
219
  if (
204
220
  !_.isEmpty(
205
- await /** @type {import('@appium/types').AppiumServer} */ (
206
- this.server
207
- ).getWebSocketHandlers(pathname),
221
+ await (this.server as AppiumServer).getWebSocketHandlers(pathname),
208
222
  )
209
223
  ) {
210
224
  this.log.debug(
@@ -229,7 +243,7 @@ export async function mobileStartLogsBroadcast() {
229
243
  }
230
244
 
231
245
  if (_.isEmpty(this._syslogWebsocketListener)) {
232
- this._syslogWebsocketListener = (logRecord) => {
246
+ this._syslogWebsocketListener = (logRecord: {message: string}) => {
233
247
  if (ws?.readyState === WebSocket.OPEN) {
234
248
  ws.send(logRecord.message);
235
249
  }
@@ -237,7 +251,7 @@ export async function mobileStartLogsBroadcast() {
237
251
  }
238
252
  this.logs.syslog?.on('output', this._syslogWebsocketListener);
239
253
 
240
- ws.on('close', (code, reason) => {
254
+ ws.on('close', (code: number, reason: Buffer) => {
241
255
  if (!_.isEmpty(this._syslogWebsocketListener)) {
242
256
  this.logs.syslog?.removeListener('output', this._syslogWebsocketListener);
243
257
  this._syslogWebsocketListener = null;
@@ -253,45 +267,49 @@ export async function mobileStartLogsBroadcast() {
253
267
  this.log.debug(closeMsg);
254
268
  });
255
269
  });
256
- await /** @type {AppiumServer} */ (this.server).addWebSocketHandler(
270
+ await (this.server as AppiumServer).addWebSocketHandler(
257
271
  pathname,
258
- /** @type {import('@appium/types').WSServer} */ (wss),
272
+ wss as WSServer,
259
273
  );
260
274
  }
261
275
 
262
276
  /**
263
- * Stops the syslog broadcasting wesocket server previously started by `mobile: startLogsBroadcast`.
277
+ * Stops the syslog broadcasting websocket server previously started by `mobile: startLogsBroadcast`.
278
+ *
264
279
  * If no websocket server is running, this command does nothing.
265
- * @this {XCUITestDriver}
266
- * @returns {Promise<void>}
267
280
  */
268
- export async function mobileStopLogsBroadcast() {
269
- const pathname = WEBSOCKET_ENDPOINT(/** @type {string} */ (this.sessionId));
270
- if (_.isEmpty(await /** @type {AppiumServer} */ (this.server).getWebSocketHandlers(pathname))) {
281
+ export async function mobileStopLogsBroadcast(this: XCUITestDriver): Promise<void> {
282
+ const pathname = WEBSOCKET_ENDPOINT(this.sessionId as string);
283
+ if (_.isEmpty(await (this.server as AppiumServer).getWebSocketHandlers(pathname))) {
271
284
  return;
272
285
  }
273
286
 
274
287
  this.log.debug('Stopping the system logs broadcasting web socket server');
275
- await /** @type {AppiumServer} */ (this.server).removeWebSocketHandler(pathname);
288
+ await (this.server as AppiumServer).removeWebSocketHandler(pathname);
276
289
  }
277
290
 
278
291
  /**
292
+ * Assigns a BiDi log listener to the given log emitter.
293
+ *
279
294
  * https://w3c.github.io/webdriver-bidi/#event-log-entryAdded
280
295
  *
281
- * @template {import('node:events').EventEmitter} EE
282
- * @this {XCUITestDriver}
283
- * @param {EE} logEmitter
284
- * @param {BiDiListenerProperties} properties
285
- * @returns {[EE, import('./types').LogListener]}
296
+ * @template EE extends EventEmitter
297
+ * @param logEmitter - The event emitter to attach the listener to
298
+ * @param properties - Configuration for the BiDi listener
299
+ * @returns A tuple containing the log emitter and the listener function
286
300
  */
287
- export function assignBiDiLogListener (logEmitter, properties) {
301
+ export function assignBiDiLogListener<EE extends EventEmitter>(
302
+ this: XCUITestDriver,
303
+ logEmitter: EE,
304
+ properties: BiDiListenerProperties,
305
+ ): [EE, LogListener] {
288
306
  const {
289
307
  type,
290
308
  context = NATIVE_WIN,
291
309
  srcEventName = 'output',
292
310
  entryTransformer,
293
311
  } = properties;
294
- const listener = (/** @type {import('./types').LogEntry} */ logEntry) => {
312
+ const listener: LogListener = (logEntry: LogEntry) => {
295
313
  const finalEntry = entryTransformer ? entryTransformer(logEntry) : logEntry;
296
314
  this.eventEmitter.emit(BIDI_EVENT_NAME, makeLogEntryAddedEvent(finalEntry, context, type));
297
315
  };
@@ -299,29 +317,11 @@ export function assignBiDiLogListener (logEmitter, properties) {
299
317
  return [logEmitter, listener];
300
318
  }
301
319
 
302
- /**
303
- *
304
- * @param {Object} x
305
- * @returns {import('./types').LogEntry}
306
- */
307
- function nativeLogEntryToSeleniumEntry (x) {
320
+ function nativeLogEntryToSeleniumEntry(x: any): LogEntry {
308
321
  const msg = _.isEmpty(x.prefix) ? x.message : `[${x.prefix}] ${x.message}`;
309
322
  return toLogEntry(
310
323
  _.replace(msg, COLOR_CODE_PATTERN, ''),
311
- /** @type {any} */ (x).timestamp ?? Date.now()
324
+ x.timestamp ?? Date.now()
312
325
  );
313
326
  }
314
327
 
315
- /**
316
- * @typedef {import('../driver').XCUITestDriver} XCUITestDriver
317
- * @typedef {keyof typeof SUPPORTED_LOG_TYPES} XCUITestDriverLogTypes
318
- * @typedef {import('@appium/types').AppiumServer} AppiumServer
319
- */
320
-
321
- /**
322
- * @typedef {Object} BiDiListenerProperties
323
- * @property {string} type
324
- * @property {string} [srcEventName='output']
325
- * @property {string} [context=NATIVE_WIN]
326
- * @property {(x: Object) => import('./types').LogEntry} [entryTransformer]
327
- */