appium-xcuitest-driver 8.0.0 → 8.2.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.
- package/CHANGELOG.md +12 -0
- package/build/lib/commands/content-size.d.ts +33 -0
- package/build/lib/commands/content-size.d.ts.map +1 -0
- package/build/lib/commands/content-size.js +67 -0
- package/build/lib/commands/content-size.js.map +1 -0
- package/build/lib/commands/increase-contrast.d.ts +27 -0
- package/build/lib/commands/increase-contrast.d.ts.map +1 -0
- package/build/lib/commands/increase-contrast.js +49 -0
- package/build/lib/commands/increase-contrast.js.map +1 -0
- package/build/lib/commands/index.d.ts +4 -0
- package/build/lib/commands/index.d.ts.map +1 -1
- package/build/lib/commands/index.js +4 -0
- package/build/lib/commands/index.js.map +1 -1
- package/build/lib/commands/recordscreen.d.ts.map +1 -1
- package/build/lib/commands/recordscreen.js +2 -16
- package/build/lib/commands/recordscreen.js.map +1 -1
- package/build/lib/commands/types.d.ts +16 -0
- package/build/lib/commands/types.d.ts.map +1 -1
- package/build/lib/driver.d.ts +33 -0
- package/build/lib/driver.d.ts.map +1 -1
- package/build/lib/driver.js +53 -6
- package/build/lib/driver.js.map +1 -1
- package/build/lib/execute-method-map.d.ts +18 -0
- package/build/lib/execute-method-map.d.ts.map +1 -1
- package/build/lib/execute-method-map.js +18 -0
- package/build/lib/execute-method-map.js.map +1 -1
- package/build/lib/utils.d.ts +5 -2
- package/build/lib/utils.d.ts.map +1 -1
- package/build/lib/utils.js +5 -1
- package/build/lib/utils.js.map +1 -1
- package/lib/commands/content-size.js +70 -0
- package/lib/commands/increase-contrast.js +52 -0
- package/lib/commands/index.js +4 -0
- package/lib/commands/recordscreen.js +2 -20
- package/lib/commands/types.ts +54 -0
- package/lib/driver.js +65 -7
- package/lib/execute-method-map.ts +18 -0
- package/lib/utils.js +5 -1
- package/npm-shrinkwrap.json +63 -39
- package/package.json +3 -3
|
@@ -0,0 +1,70 @@
|
|
|
1
|
+
import _ from 'lodash';
|
|
2
|
+
import {assertSimulator as _assertSimulator} from '../utils';
|
|
3
|
+
import { errors } from 'appium/driver';
|
|
4
|
+
|
|
5
|
+
const assertSimulator = _.partial(_assertSimulator, 'Content size ui command');
|
|
6
|
+
|
|
7
|
+
const CONTENT_SIZE = [
|
|
8
|
+
'extra-small',
|
|
9
|
+
'small',
|
|
10
|
+
'medium',
|
|
11
|
+
'large',
|
|
12
|
+
'extra-large',
|
|
13
|
+
'extra-extra-large',
|
|
14
|
+
'extra-extra-extra-large',
|
|
15
|
+
'accessibility-medium',
|
|
16
|
+
'accessibility-large',
|
|
17
|
+
'accessibility-extra-large',
|
|
18
|
+
'accessibility-extra-extra-large',
|
|
19
|
+
'accessibility-extra-extra-extra-large',
|
|
20
|
+
'increment',
|
|
21
|
+
'decrement'
|
|
22
|
+
];
|
|
23
|
+
|
|
24
|
+
export default {
|
|
25
|
+
/**
|
|
26
|
+
* Sets content size for the given simulator.
|
|
27
|
+
*
|
|
28
|
+
* @since Xcode 15 (but lower xcode could have this command)
|
|
29
|
+
* @param {ContentSizeAction} size - The content size action to set. Acceptable value is
|
|
30
|
+
* extra-small, small, medium, large, extra-large, extra-extra-large,
|
|
31
|
+
* extra-extra-extra-large, accessibility-medium, accessibility-large,
|
|
32
|
+
* accessibility-extra-large, accessibility-extra-extra-large,
|
|
33
|
+
* accessibility-extra-extra-extra-large with Xcode 16.2.
|
|
34
|
+
* @throws {Error} if the current platform does not support content size appearance changes
|
|
35
|
+
* @this {XCUITestDriver}
|
|
36
|
+
*/
|
|
37
|
+
async mobileSetContentSize(size) {
|
|
38
|
+
const simulator = assertSimulator(this);
|
|
39
|
+
|
|
40
|
+
if (!CONTENT_SIZE.includes(_.lowerCase(size))) {
|
|
41
|
+
throw new errors.InvalidArgumentError(
|
|
42
|
+
`The 'size' value is expected to be one of ${CONTENT_SIZE.join(',')}`
|
|
43
|
+
);
|
|
44
|
+
}
|
|
45
|
+
|
|
46
|
+
await simulator.setContentSize(size);
|
|
47
|
+
},
|
|
48
|
+
|
|
49
|
+
/**
|
|
50
|
+
* Retrieves the current content size value from the given simulator.
|
|
51
|
+
*
|
|
52
|
+
* @since Xcode 15 (but lower xcode could have this command)
|
|
53
|
+
* @returns {Promise<ContentSizeResult>} the content size value. Possible return value is
|
|
54
|
+
* extra-small, small, medium, large, extra-large, extra-extra-large,
|
|
55
|
+
* extra-extra-extra-large, accessibility-medium, accessibility-large,
|
|
56
|
+
* accessibility-extra-large, accessibility-extra-extra-large,
|
|
57
|
+
* accessibility-extra-extra-extra-large,
|
|
58
|
+
* unknown or unsupported with Xcode 16.2.
|
|
59
|
+
* @this {XCUITestDriver}
|
|
60
|
+
*/
|
|
61
|
+
async mobileGetContentSize() {
|
|
62
|
+
return /** @type {ContentSizeResult} */ (await assertSimulator(this).getContentSize());
|
|
63
|
+
},
|
|
64
|
+
};
|
|
65
|
+
|
|
66
|
+
/**
|
|
67
|
+
* @typedef {import('../driver').XCUITestDriver} XCUITestDriver
|
|
68
|
+
* @typedef {import('./types').ContentSizeAction} ContentSizeAction
|
|
69
|
+
* @typedef {import('./types').ContentSizeResult} ContentSizeResult
|
|
70
|
+
*/
|
|
@@ -0,0 +1,52 @@
|
|
|
1
|
+
import _ from 'lodash';
|
|
2
|
+
import {assertSimulator as _assertSimulator} from '../utils';
|
|
3
|
+
import { errors } from 'appium/driver';
|
|
4
|
+
|
|
5
|
+
const assertSimulator = _.partial(_assertSimulator, 'Content size ui command');
|
|
6
|
+
|
|
7
|
+
const INCREASE_CONTRAST_CONFIG = [
|
|
8
|
+
'enabled',
|
|
9
|
+
'disabled',
|
|
10
|
+
];
|
|
11
|
+
|
|
12
|
+
export default {
|
|
13
|
+
/**
|
|
14
|
+
* Sets the increase contrast configuration for the given simulator.
|
|
15
|
+
*
|
|
16
|
+
* @since Xcode 15 (but lower xcode could have this command)
|
|
17
|
+
* @param {IncreaseContrastAction} increaseContrast valid increase constrast configuration value.
|
|
18
|
+
* Acceptable value is 'enabled' or 'disabled' with Xcode 16.2.
|
|
19
|
+
* @throws {Error} if the current platform does not support content size appearance changes
|
|
20
|
+
* @this {XCUITestDriver}
|
|
21
|
+
*/
|
|
22
|
+
async mobileSetIncreaseContrast(increaseContrast) {
|
|
23
|
+
const simulator = assertSimulator(this);
|
|
24
|
+
|
|
25
|
+
if (!INCREASE_CONTRAST_CONFIG.includes(_.lowerCase(increaseContrast))) {
|
|
26
|
+
throw new errors.InvalidArgumentError(
|
|
27
|
+
`The 'increaseContrast' value is expected to be one of ${INCREASE_CONTRAST_CONFIG.join(',')}`
|
|
28
|
+
);
|
|
29
|
+
}
|
|
30
|
+
|
|
31
|
+
await simulator.setIncreaseContrast(increaseContrast);
|
|
32
|
+
},
|
|
33
|
+
|
|
34
|
+
/**
|
|
35
|
+
* Retrieves the current increase contrast configuration value from the given simulator.
|
|
36
|
+
*
|
|
37
|
+
* @since Xcode 15 (but lower xcode could have this command)
|
|
38
|
+
* @returns {Promise<IncreaseContrastResult>} the contrast configuration value.
|
|
39
|
+
* Possible return value is 'enabled', 'disabled',
|
|
40
|
+
* 'unsupported' or 'unknown' with Xcode 16.2.
|
|
41
|
+
* @this {XCUITestDriver}
|
|
42
|
+
*/
|
|
43
|
+
async mobileGetIncreaseContrast() {
|
|
44
|
+
return /** @type {IncreaseContrastResult} */ (await assertSimulator(this).getIncreaseContrast());
|
|
45
|
+
},
|
|
46
|
+
};
|
|
47
|
+
|
|
48
|
+
/**
|
|
49
|
+
* @typedef {import('../driver').XCUITestDriver} XCUITestDriver
|
|
50
|
+
* @typedef {import('./types').IncreaseContrastAction} IncreaseContrastAction
|
|
51
|
+
* @typedef {import('./types').IncreaseContrastResult} IncreaseContrastResult
|
|
52
|
+
*/
|
package/lib/commands/index.js
CHANGED
|
@@ -9,6 +9,7 @@ import biometricExtensions from './biometric';
|
|
|
9
9
|
import certificateExtensions from './certificate';
|
|
10
10
|
import clipboardExtensions from './clipboard';
|
|
11
11
|
import conditionExtensions from './condition';
|
|
12
|
+
import contentSizeExtensions from './content-size';
|
|
12
13
|
import contextExtensions from './context';
|
|
13
14
|
import deviceInfoExtensions from './deviceInfo';
|
|
14
15
|
import elementExtensions from './element';
|
|
@@ -18,6 +19,7 @@ import findExtensions from './find';
|
|
|
18
19
|
import generalExtensions from './general';
|
|
19
20
|
import geolocationExtensions from './geolocation';
|
|
20
21
|
import gestureExtensions from './gesture';
|
|
22
|
+
import increaseContrastExtensions from './increase-contrast';
|
|
21
23
|
import iohidExtensions from './iohid';
|
|
22
24
|
import keychainsExtensions from './keychains';
|
|
23
25
|
import keyboardExtensions from './keyboard';
|
|
@@ -55,6 +57,7 @@ export default {
|
|
|
55
57
|
certificateExtensions,
|
|
56
58
|
clipboardExtensions,
|
|
57
59
|
conditionExtensions,
|
|
60
|
+
contentSizeExtensions,
|
|
58
61
|
contextExtensions,
|
|
59
62
|
deviceInfoExtensions,
|
|
60
63
|
elementExtensions,
|
|
@@ -64,6 +67,7 @@ export default {
|
|
|
64
67
|
generalExtensions,
|
|
65
68
|
geolocationExtensions,
|
|
66
69
|
gestureExtensions,
|
|
70
|
+
increaseContrastExtensions,
|
|
67
71
|
iohidExtensions,
|
|
68
72
|
keychainsExtensions,
|
|
69
73
|
keyboardExtensions,
|
|
@@ -1,8 +1,7 @@
|
|
|
1
1
|
import _ from 'lodash';
|
|
2
2
|
import {fs, tempDir, logger, util} from 'appium/support';
|
|
3
3
|
import {SubProcess} from 'teen_process';
|
|
4
|
-
import {encodeBase64OrUpload
|
|
5
|
-
import {DEVICE_CONNECTIONS_FACTORY} from '../device-connections-factory';
|
|
4
|
+
import {encodeBase64OrUpload} from '../utils';
|
|
6
5
|
import {WDA_BASE_URL} from 'appium-webdriveragent';
|
|
7
6
|
import {waitForCondition} from 'asyncbox';
|
|
8
7
|
import url from 'url';
|
|
@@ -14,9 +13,9 @@ import url from 'url';
|
|
|
14
13
|
*/
|
|
15
14
|
const MAX_RECORDING_TIME_SEC = 4200;
|
|
16
15
|
const DEFAULT_RECORDING_TIME_SEC = 60 * 3;
|
|
17
|
-
const DEFAULT_MJPEG_SERVER_PORT = 9100;
|
|
18
16
|
const DEFAULT_FPS = 10;
|
|
19
17
|
const DEFAULT_QUALITY = 'medium';
|
|
18
|
+
const DEFAULT_MJPEG_SERVER_PORT = 9100;
|
|
20
19
|
const DEFAULT_VCODEC = 'mjpeg';
|
|
21
20
|
const MP4_EXT = '.mp4';
|
|
22
21
|
const FFMPEG_BINARY = 'ffmpeg';
|
|
@@ -52,7 +51,6 @@ export class ScreenRecorder {
|
|
|
52
51
|
const {
|
|
53
52
|
remotePort,
|
|
54
53
|
remoteUrl,
|
|
55
|
-
usePortForwarding,
|
|
56
54
|
videoFps,
|
|
57
55
|
videoType,
|
|
58
56
|
videoScale,
|
|
@@ -60,19 +58,6 @@ export class ScreenRecorder {
|
|
|
60
58
|
pixelFormat,
|
|
61
59
|
} = this.opts;
|
|
62
60
|
|
|
63
|
-
try {
|
|
64
|
-
await DEVICE_CONNECTIONS_FACTORY.requestConnection(this.udid, remotePort, {
|
|
65
|
-
devicePort: remotePort,
|
|
66
|
-
usePortForwarding,
|
|
67
|
-
});
|
|
68
|
-
} catch {
|
|
69
|
-
this.log.warn(
|
|
70
|
-
`Cannot forward the local port ${remotePort} to ${remotePort} ` +
|
|
71
|
-
`on the device ${this.udid}. Set the custom value to 'mjpegServerPort' ` +
|
|
72
|
-
`capability if this is an undesired behavior.`,
|
|
73
|
-
);
|
|
74
|
-
}
|
|
75
|
-
|
|
76
61
|
const args = [
|
|
77
62
|
'-f',
|
|
78
63
|
'mjpeg',
|
|
@@ -167,8 +152,6 @@ export class ScreenRecorder {
|
|
|
167
152
|
}
|
|
168
153
|
}
|
|
169
154
|
|
|
170
|
-
DEVICE_CONNECTIONS_FACTORY.releaseConnection(this.udid, this.opts.remotePort);
|
|
171
|
-
|
|
172
155
|
return result;
|
|
173
156
|
}
|
|
174
157
|
|
|
@@ -232,7 +215,6 @@ export default {
|
|
|
232
215
|
const screenRecorder = new ScreenRecorder(this.device.udid, this.log, videoPath, {
|
|
233
216
|
remotePort: this.opts.mjpegServerPort || DEFAULT_MJPEG_SERVER_PORT,
|
|
234
217
|
remoteUrl: wdaBaseUrl,
|
|
235
|
-
usePortForwarding: this.isRealDevice() && isLocalHost(wdaBaseUrl),
|
|
236
218
|
videoType,
|
|
237
219
|
videoFilters,
|
|
238
220
|
videoScale,
|
package/lib/commands/types.ts
CHANGED
|
@@ -337,6 +337,60 @@ export type ButtonName = AnyCase<
|
|
|
337
337
|
*/
|
|
338
338
|
export type Style = 'dark' | 'light' | 'unsupported' | 'unknown';
|
|
339
339
|
|
|
340
|
+
/**
|
|
341
|
+
* Returned in the {@linkcode XCUITest.mobileGetIncreaseContrast mobile: getIncreaseContrast} command response.
|
|
342
|
+
*/
|
|
343
|
+
export type IncreaseContrastResult =
|
|
344
|
+
| 'enabled'
|
|
345
|
+
| 'disabled'
|
|
346
|
+
| 'unsupported'
|
|
347
|
+
| 'unknown';
|
|
348
|
+
|
|
349
|
+
/**
|
|
350
|
+
* Argument in the {@linkcode XCUITest.mobileSetIncreaseContrast mobile: setIncreaseContrast} command.
|
|
351
|
+
*/
|
|
352
|
+
export type IncreaseContrastAction =
|
|
353
|
+
| 'enabled'
|
|
354
|
+
| 'disabled';
|
|
355
|
+
|
|
356
|
+
/**
|
|
357
|
+
* Argument in the {@linkcode XCUITest.mobileSetContentSize mobile: setContentSize} command.
|
|
358
|
+
*/
|
|
359
|
+
export type ContentSizeAction =
|
|
360
|
+
| 'extra-small'
|
|
361
|
+
| 'small'
|
|
362
|
+
| 'medium'
|
|
363
|
+
| 'large'
|
|
364
|
+
| 'extra-large'
|
|
365
|
+
| 'extra-extra-large'
|
|
366
|
+
| 'extra-extra-extra-large'
|
|
367
|
+
| 'accessibility-medium'
|
|
368
|
+
| 'accessibility-large'
|
|
369
|
+
| 'accessibility-extra-large'
|
|
370
|
+
| 'accessibility-extra-extra-large'
|
|
371
|
+
| 'accessibility-extra-extra-extra-large'
|
|
372
|
+
| 'increment'
|
|
373
|
+
| 'decrement';
|
|
374
|
+
|
|
375
|
+
/**
|
|
376
|
+
* Returned in the {@linkcode XCUITest.mobileGetContentSize mobile: getContentSize} command response.
|
|
377
|
+
*/
|
|
378
|
+
export type ContentSizeResult =
|
|
379
|
+
| 'extra-small'
|
|
380
|
+
| 'small'
|
|
381
|
+
| 'medium'
|
|
382
|
+
| 'large'
|
|
383
|
+
| 'extra-large'
|
|
384
|
+
| 'extra-extra-large'
|
|
385
|
+
| 'extra-extra-extra-large'
|
|
386
|
+
| 'accessibility-medium'
|
|
387
|
+
| 'accessibility-large'
|
|
388
|
+
| 'accessibility-extra-large'
|
|
389
|
+
| 'accessibility-extra-extra-large'
|
|
390
|
+
| 'accessibility-extra-extra-extra-large'
|
|
391
|
+
| 'unknown'
|
|
392
|
+
| 'unsupported';
|
|
393
|
+
|
|
340
394
|
export interface ScreenInfo {
|
|
341
395
|
/**
|
|
342
396
|
* Status bar dimensions
|
package/lib/driver.js
CHANGED
|
@@ -103,6 +103,8 @@ const DEFAULT_SETTINGS = {
|
|
|
103
103
|
const SHARED_RESOURCES_GUARD = new AsyncLock();
|
|
104
104
|
const WEB_ELEMENTS_CACHE_SIZE = 500;
|
|
105
105
|
const SUPPORTED_ORIENATIONS = ['LANDSCAPE', 'PORTRAIT'];
|
|
106
|
+
const DEFAULT_MJPEG_SERVER_PORT = 9100;
|
|
107
|
+
|
|
106
108
|
/* eslint-disable no-useless-escape */
|
|
107
109
|
/** @type {import('@appium/types').RouteMatcher[]} */
|
|
108
110
|
const NO_PROXY_NATIVE_LIST = [
|
|
@@ -467,12 +469,8 @@ export class XCUITestDriver extends BaseDriver {
|
|
|
467
469
|
// ensure WDA gets our defaults instead of whatever its own might be
|
|
468
470
|
await this.updateSettings(wdaSettings);
|
|
469
471
|
|
|
470
|
-
|
|
471
|
-
|
|
472
|
-
this.log.info(`Starting MJPEG stream reading URL: '${this.opts.mjpegScreenshotUrl}'`);
|
|
473
|
-
this.mjpegStream = new mjpeg.MJpegStream(this.opts.mjpegScreenshotUrl);
|
|
474
|
-
await this.mjpegStream.start();
|
|
475
|
-
}
|
|
472
|
+
await this.handleMjpegOptions();
|
|
473
|
+
|
|
476
474
|
return /** @type {[string, import('@appium/types').DriverCaps<XCUITestDriverConstraints>]} */ ([
|
|
477
475
|
sessionId,
|
|
478
476
|
caps,
|
|
@@ -484,6 +482,53 @@ export class XCUITestDriver extends BaseDriver {
|
|
|
484
482
|
}
|
|
485
483
|
}
|
|
486
484
|
|
|
485
|
+
/**
|
|
486
|
+
* Handles MJPEG server-related capabilities
|
|
487
|
+
* @returns {Promise<void>}
|
|
488
|
+
*/
|
|
489
|
+
async handleMjpegOptions() {
|
|
490
|
+
await this.allocateMjpegServerPort();
|
|
491
|
+
// turn on mjpeg stream reading if requested
|
|
492
|
+
if (this.opts.mjpegScreenshotUrl) {
|
|
493
|
+
this.log.info(`Starting MJPEG stream reading URL: '${this.opts.mjpegScreenshotUrl}'`);
|
|
494
|
+
this.mjpegStream = new mjpeg.MJpegStream(this.opts.mjpegScreenshotUrl);
|
|
495
|
+
await this.mjpegStream.start();
|
|
496
|
+
}
|
|
497
|
+
}
|
|
498
|
+
|
|
499
|
+
/**
|
|
500
|
+
* Allocates and configures port forwarding for the MJPEG server
|
|
501
|
+
* @returns {Promise<void>}
|
|
502
|
+
* @throws {Error} If port forwarding fails and mjpegServerPort capability value is provided explicitly
|
|
503
|
+
*/
|
|
504
|
+
async allocateMjpegServerPort() {
|
|
505
|
+
const mjpegServerPort = this.opts.mjpegServerPort || DEFAULT_MJPEG_SERVER_PORT;
|
|
506
|
+
this.log.debug(
|
|
507
|
+
`Forwarding MJPEG server port ${mjpegServerPort} to local port ${mjpegServerPort}`,
|
|
508
|
+
);
|
|
509
|
+
try {
|
|
510
|
+
await DEVICE_CONNECTIONS_FACTORY.requestConnection(this.opts.udid, mjpegServerPort, {
|
|
511
|
+
devicePort: mjpegServerPort,
|
|
512
|
+
usePortForwarding: this.isRealDevice(),
|
|
513
|
+
});
|
|
514
|
+
} catch (error) {
|
|
515
|
+
if (_.isUndefined(this.opts.mjpegServerPort)) {
|
|
516
|
+
this.log.warn(
|
|
517
|
+
`Cannot forward the device port ${DEFAULT_MJPEG_SERVER_PORT} to the local port ${DEFAULT_MJPEG_SERVER_PORT}. ` +
|
|
518
|
+
`Certain features, like MJPEG-based screen recording, will be unavailable during this session. ` +
|
|
519
|
+
`Try to customize the value of 'mjpegServerPort' capability as a possible solution`,
|
|
520
|
+
);
|
|
521
|
+
} else {
|
|
522
|
+
this.log.debug(error.stack);
|
|
523
|
+
throw new Error(
|
|
524
|
+
`Cannot ensure MJPEG broadcast functionality by forwarding the local port ${mjpegServerPort} ` +
|
|
525
|
+
`requested by the 'mjpegServerPort' capability to the device port ${mjpegServerPort}. ` +
|
|
526
|
+
`Original error: ${error}`,
|
|
527
|
+
);
|
|
528
|
+
}
|
|
529
|
+
}
|
|
530
|
+
}
|
|
531
|
+
|
|
487
532
|
/**
|
|
488
533
|
* Returns the default URL for Safari browser
|
|
489
534
|
* @returns {string} The default URL
|
|
@@ -1025,7 +1070,6 @@ export class XCUITestDriver extends BaseDriver {
|
|
|
1025
1070
|
await this.wda.quit();
|
|
1026
1071
|
}
|
|
1027
1072
|
}
|
|
1028
|
-
|
|
1029
1073
|
DEVICE_CONNECTIONS_FACTORY.releaseConnection(this.opts.udid);
|
|
1030
1074
|
}
|
|
1031
1075
|
|
|
@@ -1781,6 +1825,20 @@ export class XCUITestDriver extends BaseDriver {
|
|
|
1781
1825
|
mobileSetAppearance = commands.appearanceExtensions.mobileSetAppearance;
|
|
1782
1826
|
mobileGetAppearance = commands.appearanceExtensions.mobileGetAppearance;
|
|
1783
1827
|
|
|
1828
|
+
/*------------+
|
|
1829
|
+
| INCREASE CONTRAST |
|
|
1830
|
+
+------------+*/
|
|
1831
|
+
|
|
1832
|
+
mobileSetIncreaseContrast = commands.increaseContrastExtensions.mobileSetIncreaseContrast;
|
|
1833
|
+
mobileGetIncreaseContrast = commands.increaseContrastExtensions.mobileGetIncreaseContrast;
|
|
1834
|
+
|
|
1835
|
+
/*------------+
|
|
1836
|
+
| CONTENT SIZE |
|
|
1837
|
+
+------------+*/
|
|
1838
|
+
|
|
1839
|
+
mobileSetContentSize = commands.contentSizeExtensions.mobileSetContentSize;
|
|
1840
|
+
mobileGetContentSize = commands.contentSizeExtensions.mobileGetContentSize;
|
|
1841
|
+
|
|
1784
1842
|
/*------------+
|
|
1785
1843
|
| AUDIT |
|
|
1786
1844
|
+------------+*/
|
|
@@ -333,6 +333,24 @@ export const executeMethodMap = {
|
|
|
333
333
|
required: ['style'],
|
|
334
334
|
},
|
|
335
335
|
},
|
|
336
|
+
'mobile: getIncreaseContrast': {
|
|
337
|
+
command: 'mobileGetIncreaseContrast'
|
|
338
|
+
},
|
|
339
|
+
'mobile: setIncreaseContrast': {
|
|
340
|
+
command: 'mobileSetIncreaseContrast',
|
|
341
|
+
params: {
|
|
342
|
+
required: ['increaseContrast'],
|
|
343
|
+
},
|
|
344
|
+
},
|
|
345
|
+
'mobile: contentSize': {
|
|
346
|
+
command: 'mobileGetContentSize'
|
|
347
|
+
},
|
|
348
|
+
'mobile: setContentSize': {
|
|
349
|
+
command: 'mobileSetContentSize',
|
|
350
|
+
params: {
|
|
351
|
+
required: ['size'],
|
|
352
|
+
},
|
|
353
|
+
},
|
|
336
354
|
'mobile: getClipboard': {
|
|
337
355
|
command: 'getClipboard',
|
|
338
356
|
params: {
|
package/lib/utils.js
CHANGED
|
@@ -466,15 +466,18 @@ function requireArgs(argNames, opts = {}) {
|
|
|
466
466
|
}
|
|
467
467
|
|
|
468
468
|
/**
|
|
469
|
-
* Asserts that the given driver is running on a Simulator
|
|
469
|
+
* Asserts that the given driver is running on a Simulator and return
|
|
470
|
+
* the simlator instance.
|
|
470
471
|
*
|
|
471
472
|
* @param {string} action - Description of action
|
|
472
473
|
* @param {import('./driver').XCUITestDriver} driver
|
|
474
|
+
* @returns {Simulator}
|
|
473
475
|
*/
|
|
474
476
|
export function assertSimulator(action, driver) {
|
|
475
477
|
if (!driver.isSimulator()) {
|
|
476
478
|
throw new Error(`${_.upperFirst(action)} can only be performed on Simulator`);
|
|
477
479
|
}
|
|
480
|
+
return /** @type{Simulator} */ (driver.device);
|
|
478
481
|
}
|
|
479
482
|
|
|
480
483
|
/**
|
|
@@ -536,4 +539,5 @@ export {
|
|
|
536
539
|
|
|
537
540
|
/**
|
|
538
541
|
* @typedef {import('appium-xcode').XcodeVersion} XcodeVersion
|
|
542
|
+
* @typedef {import('appium-ios-simulator').Simulator} Simulator
|
|
539
543
|
*/
|
package/npm-shrinkwrap.json
CHANGED
|
@@ -1,18 +1,18 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "appium-xcuitest-driver",
|
|
3
|
-
"version": "8.
|
|
3
|
+
"version": "8.2.0",
|
|
4
4
|
"lockfileVersion": 3,
|
|
5
5
|
"requires": true,
|
|
6
6
|
"packages": {
|
|
7
7
|
"": {
|
|
8
8
|
"name": "appium-xcuitest-driver",
|
|
9
|
-
"version": "8.
|
|
9
|
+
"version": "8.2.0",
|
|
10
10
|
"license": "Apache-2.0",
|
|
11
11
|
"dependencies": {
|
|
12
12
|
"@colors/colors": "^1.6.0",
|
|
13
13
|
"appium-idb": "^1.6.13",
|
|
14
14
|
"appium-ios-device": "^2.8.0",
|
|
15
|
-
"appium-ios-simulator": "^6.
|
|
15
|
+
"appium-ios-simulator": "^6.2.0",
|
|
16
16
|
"appium-remote-debugger": "^12.1.1",
|
|
17
17
|
"appium-webdriveragent": "^9.0.1",
|
|
18
18
|
"appium-xcode": "^5.1.4",
|
|
@@ -25,7 +25,7 @@
|
|
|
25
25
|
"lru-cache": "^10.0.0",
|
|
26
26
|
"moment": "^2.29.4",
|
|
27
27
|
"moment-timezone": "^0.x",
|
|
28
|
-
"node-simctl": "^7.
|
|
28
|
+
"node-simctl": "^7.7.1",
|
|
29
29
|
"portscanner": "^2.2.0",
|
|
30
30
|
"semver": "^7.5.4",
|
|
31
31
|
"source-map-support": "^0.x",
|
|
@@ -112,6 +112,12 @@
|
|
|
112
112
|
"spdy": "4.0.2"
|
|
113
113
|
}
|
|
114
114
|
},
|
|
115
|
+
"node_modules/@appium/base-driver/node_modules/@types/lodash": {
|
|
116
|
+
"version": "4.17.14",
|
|
117
|
+
"resolved": "https://registry.npmjs.org/@types/lodash/-/lodash-4.17.14.tgz",
|
|
118
|
+
"integrity": "sha512-jsxagdikDiDBeIRaPYtArcT8my4tN1og7MtMRquFT3XNA6axxyHDRUemqDz/taRDdOUn0GnGHRCuff4q48sW9A==",
|
|
119
|
+
"license": "MIT"
|
|
120
|
+
},
|
|
115
121
|
"node_modules/@appium/base-driver/node_modules/type-fest": {
|
|
116
122
|
"version": "4.31.0",
|
|
117
123
|
"resolved": "https://registry.npmjs.org/type-fest/-/type-fest-4.31.0.tgz",
|
|
@@ -159,6 +165,18 @@
|
|
|
159
165
|
"npm": ">=8"
|
|
160
166
|
}
|
|
161
167
|
},
|
|
168
|
+
"node_modules/@appium/docutils/node_modules/semver": {
|
|
169
|
+
"version": "7.6.3",
|
|
170
|
+
"resolved": "https://registry.npmjs.org/semver/-/semver-7.6.3.tgz",
|
|
171
|
+
"integrity": "sha512-oVekP1cKtI+CTDvHWYFUcMtsK/00wmAEfyqKfNdARm8u1wNVhSgaX7A8d4UuIlUI5e84iEwOhs7ZPYRmzU9U6A==",
|
|
172
|
+
"license": "ISC",
|
|
173
|
+
"bin": {
|
|
174
|
+
"semver": "bin/semver.js"
|
|
175
|
+
},
|
|
176
|
+
"engines": {
|
|
177
|
+
"node": ">=10"
|
|
178
|
+
}
|
|
179
|
+
},
|
|
162
180
|
"node_modules/@appium/docutils/node_modules/type-fest": {
|
|
163
181
|
"version": "4.31.0",
|
|
164
182
|
"resolved": "https://registry.npmjs.org/type-fest/-/type-fest-4.31.0.tgz",
|
|
@@ -296,6 +314,18 @@
|
|
|
296
314
|
"sharp": "0.33.5"
|
|
297
315
|
}
|
|
298
316
|
},
|
|
317
|
+
"node_modules/@appium/support/node_modules/semver": {
|
|
318
|
+
"version": "7.6.3",
|
|
319
|
+
"resolved": "https://registry.npmjs.org/semver/-/semver-7.6.3.tgz",
|
|
320
|
+
"integrity": "sha512-oVekP1cKtI+CTDvHWYFUcMtsK/00wmAEfyqKfNdARm8u1wNVhSgaX7A8d4UuIlUI5e84iEwOhs7ZPYRmzU9U6A==",
|
|
321
|
+
"license": "ISC",
|
|
322
|
+
"bin": {
|
|
323
|
+
"semver": "bin/semver.js"
|
|
324
|
+
},
|
|
325
|
+
"engines": {
|
|
326
|
+
"node": ">=10"
|
|
327
|
+
}
|
|
328
|
+
},
|
|
299
329
|
"node_modules/@appium/support/node_modules/type-fest": {
|
|
300
330
|
"version": "4.31.0",
|
|
301
331
|
"resolved": "https://registry.npmjs.org/type-fest/-/type-fest-4.31.0.tgz",
|
|
@@ -560,9 +590,9 @@
|
|
|
560
590
|
}
|
|
561
591
|
},
|
|
562
592
|
"node_modules/@types/express-serve-static-core": {
|
|
563
|
-
"version": "5.0.
|
|
564
|
-
"resolved": "https://registry.npmjs.org/@types/express-serve-static-core/-/express-serve-static-core-5.0.
|
|
565
|
-
"integrity": "sha512-
|
|
593
|
+
"version": "5.0.6",
|
|
594
|
+
"resolved": "https://registry.npmjs.org/@types/express-serve-static-core/-/express-serve-static-core-5.0.6.tgz",
|
|
595
|
+
"integrity": "sha512-3xhRnjJPkULekpSzgtoNYYcTWgEZkp4myc+Saevii5JPnHNvHMRlBSHDbs7Bh1iPPoVTERHEZXyhyLbMEsExsA==",
|
|
566
596
|
"license": "MIT",
|
|
567
597
|
"dependencies": {
|
|
568
598
|
"@types/node": "*",
|
|
@@ -614,9 +644,9 @@
|
|
|
614
644
|
"license": "MIT"
|
|
615
645
|
},
|
|
616
646
|
"node_modules/@types/lodash": {
|
|
617
|
-
"version": "4.17.
|
|
618
|
-
"resolved": "https://registry.npmjs.org/@types/lodash/-/lodash-4.17.
|
|
619
|
-
"integrity": "sha512-
|
|
647
|
+
"version": "4.17.15",
|
|
648
|
+
"resolved": "https://registry.npmjs.org/@types/lodash/-/lodash-4.17.15.tgz",
|
|
649
|
+
"integrity": "sha512-w/P33JFeySuhN6JLkysYUK2gEmy9kHHFN7E8ro0tkfmlDOgxBDzWEZ/J8cWA+fHqFevpswDTFZnDx+R9lbL6xw==",
|
|
620
650
|
"license": "MIT"
|
|
621
651
|
},
|
|
622
652
|
"node_modules/@types/method-override": {
|
|
@@ -650,9 +680,9 @@
|
|
|
650
680
|
}
|
|
651
681
|
},
|
|
652
682
|
"node_modules/@types/node": {
|
|
653
|
-
"version": "22.
|
|
654
|
-
"resolved": "https://registry.npmjs.org/@types/node/-/node-22.
|
|
655
|
-
"integrity": "sha512-
|
|
683
|
+
"version": "22.12.0",
|
|
684
|
+
"resolved": "https://registry.npmjs.org/@types/node/-/node-22.12.0.tgz",
|
|
685
|
+
"integrity": "sha512-Fll2FZ1riMjNmlmJOdAyY5pUbkftXslB5DgEzlIuNaiWhXd00FhWxVC/r4yV/4wBb9JfImTu+jiSvXTkJ7F/gA==",
|
|
656
686
|
"license": "MIT",
|
|
657
687
|
"dependencies": {
|
|
658
688
|
"undici-types": "~6.20.0"
|
|
@@ -770,9 +800,9 @@
|
|
|
770
800
|
}
|
|
771
801
|
},
|
|
772
802
|
"node_modules/@xmldom/xmldom": {
|
|
773
|
-
"version": "0.9.
|
|
774
|
-
"resolved": "https://registry.npmjs.org/@xmldom/xmldom/-/xmldom-0.9.
|
|
775
|
-
"integrity": "sha512-
|
|
803
|
+
"version": "0.9.7",
|
|
804
|
+
"resolved": "https://registry.npmjs.org/@xmldom/xmldom/-/xmldom-0.9.7.tgz",
|
|
805
|
+
"integrity": "sha512-syvR8iIJjpTZ/stv7l89UAViwGFh6lbheeOaqSxkYx9YNmIVvPTRH+CT/fpykFtUx5N+8eSMDRvggF9J8GEPzQ==",
|
|
776
806
|
"license": "MIT",
|
|
777
807
|
"engines": {
|
|
778
808
|
"node": ">=14.6"
|
|
@@ -871,9 +901,9 @@
|
|
|
871
901
|
}
|
|
872
902
|
},
|
|
873
903
|
"node_modules/appium-ios-simulator": {
|
|
874
|
-
"version": "6.
|
|
875
|
-
"resolved": "https://registry.npmjs.org/appium-ios-simulator/-/appium-ios-simulator-6.
|
|
876
|
-
"integrity": "sha512-
|
|
904
|
+
"version": "6.2.0",
|
|
905
|
+
"resolved": "https://registry.npmjs.org/appium-ios-simulator/-/appium-ios-simulator-6.2.0.tgz",
|
|
906
|
+
"integrity": "sha512-VpFMKSVQBoRVnp86sXt2nr4qtOGm23sQytCDWGDsQ1povIb3RG5Lyato6IQYAI5VRPesDois3DgOAR70DnnauQ==",
|
|
877
907
|
"license": "Apache-2.0",
|
|
878
908
|
"dependencies": {
|
|
879
909
|
"@appium/support": "^6.0.0",
|
|
@@ -883,7 +913,7 @@
|
|
|
883
913
|
"asyncbox": "^3.0.0",
|
|
884
914
|
"bluebird": "^3.5.1",
|
|
885
915
|
"lodash": "^4.2.1",
|
|
886
|
-
"node-simctl": "^7.
|
|
916
|
+
"node-simctl": "^7.7.1",
|
|
887
917
|
"semver": "^7.0.0",
|
|
888
918
|
"source-map-support": "^0.x",
|
|
889
919
|
"teen_process": "^2.0.0"
|
|
@@ -2601,6 +2631,7 @@
|
|
|
2601
2631
|
"version": "4.4.2",
|
|
2602
2632
|
"resolved": "https://registry.npmjs.org/lodash.get/-/lodash.get-4.4.2.tgz",
|
|
2603
2633
|
"integrity": "sha512-z+Uw/vLuy6gQe8cfaFWD7p0wVv8fJl3mbzXh33RS+0oW2wvUqiRXiQ69gLWSLpgB5/6sU+r6BlQR0MBILadqTQ==",
|
|
2634
|
+
"deprecated": "This package is deprecated. Use the optional chaining (?.) operator instead.",
|
|
2604
2635
|
"license": "MIT"
|
|
2605
2636
|
},
|
|
2606
2637
|
"node_modules/lodash.isfinite": {
|
|
@@ -2781,9 +2812,9 @@
|
|
|
2781
2812
|
}
|
|
2782
2813
|
},
|
|
2783
2814
|
"node_modules/moment-timezone": {
|
|
2784
|
-
"version": "0.5.
|
|
2785
|
-
"resolved": "https://registry.npmjs.org/moment-timezone/-/moment-timezone-0.5.
|
|
2786
|
-
"integrity": "sha512-
|
|
2815
|
+
"version": "0.5.47",
|
|
2816
|
+
"resolved": "https://registry.npmjs.org/moment-timezone/-/moment-timezone-0.5.47.tgz",
|
|
2817
|
+
"integrity": "sha512-UbNt/JAWS0m/NJOebR0QMRHBk0hu03r5dx9GK8Cs0AS3I81yDcOc9k+DytPItgVvBP7J6Mf6U2n3BPAacAV9oA==",
|
|
2787
2818
|
"license": "MIT",
|
|
2788
2819
|
"dependencies": {
|
|
2789
2820
|
"moment": "^2.29.4"
|
|
@@ -2916,9 +2947,9 @@
|
|
|
2916
2947
|
}
|
|
2917
2948
|
},
|
|
2918
2949
|
"node_modules/node-simctl": {
|
|
2919
|
-
"version": "7.
|
|
2920
|
-
"resolved": "https://registry.npmjs.org/node-simctl/-/node-simctl-7.
|
|
2921
|
-
"integrity": "sha512-
|
|
2950
|
+
"version": "7.7.1",
|
|
2951
|
+
"resolved": "https://registry.npmjs.org/node-simctl/-/node-simctl-7.7.1.tgz",
|
|
2952
|
+
"integrity": "sha512-MnCFJTusdKlZC2fmU+xfEpisN6ddNbBIBCH/IU+o4BjBPQWFVPZMSXr5slPX51QX05F1NbuiczTZyr88cJMqVQ==",
|
|
2922
2953
|
"license": "Apache-2.0",
|
|
2923
2954
|
"dependencies": {
|
|
2924
2955
|
"@appium/logger": "^1.3.0",
|
|
@@ -3310,12 +3341,6 @@
|
|
|
3310
3341
|
"url": "https://github.com/sponsors/ljharb"
|
|
3311
3342
|
}
|
|
3312
3343
|
},
|
|
3313
|
-
"node_modules/queue-tick": {
|
|
3314
|
-
"version": "1.0.1",
|
|
3315
|
-
"resolved": "https://registry.npmjs.org/queue-tick/-/queue-tick-1.0.1.tgz",
|
|
3316
|
-
"integrity": "sha512-kJt5qhMxoszgU/62PLP1CJytzd2NKetjSRnyuj31fDd3Rlcz3fzlFdFLD1SItunPwyqEOkca6GbV612BWfaBag==",
|
|
3317
|
-
"license": "MIT"
|
|
3318
|
-
},
|
|
3319
3344
|
"node_modules/range-parser": {
|
|
3320
3345
|
"version": "1.2.1",
|
|
3321
3346
|
"resolved": "https://registry.npmjs.org/range-parser/-/range-parser-1.2.1.tgz",
|
|
@@ -3530,9 +3555,9 @@
|
|
|
3530
3555
|
"optional": true
|
|
3531
3556
|
},
|
|
3532
3557
|
"node_modules/semver": {
|
|
3533
|
-
"version": "7.
|
|
3534
|
-
"resolved": "https://registry.npmjs.org/semver/-/semver-7.
|
|
3535
|
-
"integrity": "sha512-
|
|
3558
|
+
"version": "7.7.0",
|
|
3559
|
+
"resolved": "https://registry.npmjs.org/semver/-/semver-7.7.0.tgz",
|
|
3560
|
+
"integrity": "sha512-DrfFnPzblFmNrIZzg5RzHegbiRWg7KMR7btwi2yjHwx06zsUbO5g613sVwEV7FTwmzJu+Io0lJe2GJ3LxqpvBQ==",
|
|
3536
3561
|
"license": "ISC",
|
|
3537
3562
|
"bin": {
|
|
3538
3563
|
"semver": "bin/semver.js"
|
|
@@ -3958,13 +3983,12 @@
|
|
|
3958
3983
|
}
|
|
3959
3984
|
},
|
|
3960
3985
|
"node_modules/streamx": {
|
|
3961
|
-
"version": "2.
|
|
3962
|
-
"resolved": "https://registry.npmjs.org/streamx/-/streamx-2.
|
|
3963
|
-
"integrity": "sha512-
|
|
3986
|
+
"version": "2.22.0",
|
|
3987
|
+
"resolved": "https://registry.npmjs.org/streamx/-/streamx-2.22.0.tgz",
|
|
3988
|
+
"integrity": "sha512-sLh1evHOzBy/iWRiR6d1zRcLao4gGZr3C1kzNz4fopCOKJb6xD9ub8Mpi9Mr1R6id5o43S+d93fI48UC5uM9aw==",
|
|
3964
3989
|
"license": "MIT",
|
|
3965
3990
|
"dependencies": {
|
|
3966
3991
|
"fast-fifo": "^1.3.2",
|
|
3967
|
-
"queue-tick": "^1.0.1",
|
|
3968
3992
|
"text-decoder": "^1.1.0"
|
|
3969
3993
|
},
|
|
3970
3994
|
"optionalDependencies": {
|