appium-xcuitest-driver 7.7.1 → 7.8.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 +14 -0
- package/build/lib/app-utils.d.ts.map +1 -1
- package/build/lib/app-utils.js +1 -2
- package/build/lib/app-utils.js.map +1 -1
- package/build/lib/commands/activeAppInfo.d.ts +1 -1
- package/build/lib/commands/activeAppInfo.d.ts.map +1 -1
- package/build/lib/commands/alert.d.ts +6 -6
- package/build/lib/commands/alert.d.ts.map +1 -1
- package/build/lib/commands/app-management.d.ts +13 -13
- package/build/lib/commands/app-management.d.ts.map +1 -1
- package/build/lib/commands/app-management.js +9 -6
- package/build/lib/commands/app-management.js.map +1 -1
- package/build/lib/commands/app-strings.d.ts +1 -1
- package/build/lib/commands/app-strings.d.ts.map +1 -1
- package/build/lib/commands/appearance.d.ts +2 -2
- package/build/lib/commands/appearance.d.ts.map +1 -1
- package/build/lib/commands/appearance.js +2 -4
- package/build/lib/commands/appearance.js.map +1 -1
- package/build/lib/commands/audit.d.ts +1 -1
- package/build/lib/commands/audit.d.ts.map +1 -1
- package/build/lib/commands/battery.d.ts +1 -1
- package/build/lib/commands/battery.d.ts.map +1 -1
- package/build/lib/commands/biometric.d.ts +3 -3
- package/build/lib/commands/biometric.d.ts.map +1 -1
- package/build/lib/commands/certificate.d.ts +2 -2
- package/build/lib/commands/certificate.d.ts.map +1 -1
- package/build/lib/commands/certificate.js +1 -2
- package/build/lib/commands/certificate.js.map +1 -1
- package/build/lib/commands/clipboard.d.ts +2 -2
- package/build/lib/commands/clipboard.d.ts.map +1 -1
- package/build/lib/commands/condition.d.ts +3 -3
- package/build/lib/commands/condition.d.ts.map +1 -1
- package/build/lib/commands/context.d.ts +20 -20
- package/build/lib/commands/context.d.ts.map +1 -1
- package/build/lib/commands/context.js +1 -2
- package/build/lib/commands/context.js.map +1 -1
- package/build/lib/commands/deviceInfo.d.ts +1 -1
- package/build/lib/commands/deviceInfo.d.ts.map +1 -1
- package/build/lib/commands/element.d.ts +18 -18
- package/build/lib/commands/element.d.ts.map +1 -1
- package/build/lib/commands/file-movement.d.ts +8 -8
- package/build/lib/commands/file-movement.d.ts.map +1 -1
- package/build/lib/commands/find.d.ts +4 -4
- package/build/lib/commands/find.d.ts.map +1 -1
- package/build/lib/commands/general.d.ts +19 -19
- package/build/lib/commands/general.d.ts.map +1 -1
- package/build/lib/commands/geolocation.d.ts +3 -3
- package/build/lib/commands/geolocation.d.ts.map +1 -1
- package/build/lib/commands/gesture.d.ts +19 -19
- package/build/lib/commands/gesture.d.ts.map +1 -1
- package/build/lib/commands/iohid.d.ts +1 -1
- package/build/lib/commands/keyboard.d.ts +4 -4
- package/build/lib/commands/keyboard.d.ts.map +1 -1
- package/build/lib/commands/keychains.d.ts +1 -1
- package/build/lib/commands/keychains.d.ts.map +1 -1
- package/build/lib/commands/localization.d.ts +1 -1
- package/build/lib/commands/localization.d.ts.map +1 -1
- package/build/lib/commands/location.d.ts +3 -3
- package/build/lib/commands/location.d.ts.map +1 -1
- package/build/lib/commands/lock.d.ts +3 -3
- package/build/lib/commands/lock.d.ts.map +1 -1
- package/build/lib/commands/log.d.ts +4 -4
- package/build/lib/commands/log.d.ts.map +1 -1
- package/build/lib/commands/memory.d.ts +1 -1
- package/build/lib/commands/memory.d.ts.map +1 -1
- package/build/lib/commands/memory.js +1 -2
- package/build/lib/commands/memory.js.map +1 -1
- package/build/lib/commands/navigation.d.ts +5 -5
- package/build/lib/commands/navigation.d.ts.map +1 -1
- package/build/lib/commands/notifications.d.ts +2 -2
- package/build/lib/commands/notifications.d.ts.map +1 -1
- package/build/lib/commands/pasteboard.d.ts +2 -2
- package/build/lib/commands/pasteboard.d.ts.map +1 -1
- package/build/lib/commands/pcap.d.ts +2 -2
- package/build/lib/commands/pcap.d.ts.map +1 -1
- package/build/lib/commands/performance.d.ts +2 -2
- package/build/lib/commands/performance.d.ts.map +1 -1
- package/build/lib/commands/permissions.d.ts +3 -3
- package/build/lib/commands/permissions.d.ts.map +1 -1
- package/build/lib/commands/proxy-helper.d.ts +1 -1
- package/build/lib/commands/proxy-helper.d.ts.map +1 -1
- package/build/lib/commands/record-audio.d.ts +2 -2
- package/build/lib/commands/record-audio.d.ts.map +1 -1
- package/build/lib/commands/recordscreen.d.ts +2 -2
- package/build/lib/commands/recordscreen.d.ts.map +1 -1
- package/build/lib/commands/screenshots.d.ts +3 -3
- package/build/lib/commands/screenshots.d.ts.map +1 -1
- package/build/lib/commands/source.d.ts +2 -2
- package/build/lib/commands/source.d.ts.map +1 -1
- package/build/lib/commands/timeouts.d.ts +7 -7
- package/build/lib/commands/timeouts.d.ts.map +1 -1
- package/build/lib/commands/web.d.ts +32 -32
- package/build/lib/commands/web.d.ts.map +1 -1
- package/build/lib/commands/web.js +5 -10
- package/build/lib/commands/web.js.map +1 -1
- package/build/lib/commands/xctest-record-screen.d.ts +2 -2
- package/build/lib/commands/xctest-record-screen.d.ts.map +1 -1
- package/build/lib/commands/xctest.d.ts +4 -4
- package/build/lib/commands/xctest.d.ts.map +1 -1
- package/build/lib/css-converter.d.ts.map +1 -1
- package/build/lib/css-converter.js +5 -15
- package/build/lib/css-converter.js.map +1 -1
- package/build/lib/desired-caps.d.ts +8 -0
- package/build/lib/desired-caps.d.ts.map +1 -1
- package/build/lib/desired-caps.js +6 -0
- package/build/lib/desired-caps.js.map +1 -1
- package/build/lib/driver.d.ts +63 -65
- package/build/lib/driver.d.ts.map +1 -1
- package/build/lib/driver.js +48 -66
- package/build/lib/driver.js.map +1 -1
- package/build/lib/real-device-management.d.ts +4 -4
- package/build/lib/real-device-management.d.ts.map +1 -1
- package/build/lib/simulator-management.d.ts +8 -8
- package/build/lib/simulator-management.d.ts.map +1 -1
- package/build/lib/types.d.ts +0 -18
- package/build/lib/types.d.ts.map +1 -1
- package/build/lib/utils.d.ts +4 -1
- package/build/lib/utils.d.ts.map +1 -1
- package/build/lib/utils.js +4 -1
- package/build/lib/utils.js.map +1 -1
- package/lib/app-utils.js +1 -2
- package/lib/commands/app-management.js +9 -7
- package/lib/commands/appearance.js +2 -4
- package/lib/commands/certificate.js +1 -2
- package/lib/commands/context.js +2 -2
- package/lib/commands/memory.js +1 -2
- package/lib/commands/web.js +3 -7
- package/lib/css-converter.js +17 -15
- package/lib/desired-caps.js +6 -0
- package/lib/driver.js +57 -67
- package/lib/types.ts +0 -19
- package/lib/utils.js +4 -1
- package/npm-shrinkwrap.json +6 -6
- package/package.json +2 -2
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"desired-caps.js","sourceRoot":"","sources":["../../lib/desired-caps.js"],"names":[],"mappings":";;;AAAA,yDAAyD;AACzD,MAAM,iBAAiB,GAAG,KAAK,CAAC;
|
|
1
|
+
{"version":3,"file":"desired-caps.js","sourceRoot":"","sources":["../../lib/desired-caps.js"],"names":[],"mappings":";;;AAAA,yDAAyD;AACzD,MAAM,iBAAiB,GAAG,KAAK,CAAC;AAqXD,8CAAiB;AApXhD,MAAM,kBAAkB,GAAG,MAAM,CAAC;AAoXgB,gDAAkB;AAlXpE,MAAM,qBAAqB,GAAG,oBAAoB,CAAC,CAAC;IAClD,YAAY,EAAE;QACZ,WAAW;QACX,QAAQ,EAAE,IAAI;QACd,QAAQ,EAAE,IAAI;QACd,wBAAwB,EAAE,CAAC,iBAAiB,EAAE,kBAAkB,CAAC;KAClE;IACD,WAAW,EAAE;QACX,QAAQ,EAAE,IAAI;KACf;IACD,GAAG,EAAE;QACH,QAAQ,EAAE,IAAI;KACf;IACD,cAAc,EAAE;QACd,QAAQ,EAAE,IAAI;KACf;IACD,QAAQ,EAAE;QACR,QAAQ,EAAE,IAAI;KACf;IACD,IAAI,EAAE;QACJ,QAAQ,EAAE,IAAI;KACf;IACD,gBAAgB,EAAE;QAChB,SAAS,EAAE,IAAI;KAChB;IACD,iBAAiB,EAAE;QACjB,SAAS,EAAE,IAAI;KAChB;IACD,YAAY,EAAE;QACZ,SAAS,EAAE,IAAI;KAChB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AE,IAAI;KAChB;IACD,kBAAkB,EAAE;QAClB,SAAS,EAAE,IAAI;KAChB;IACD,cAAc,EAAE;QACd,SAAS,EAAE,IAAI;KAChB;IACD,wBAAwB,EAAE;QACxB,SAAS,EAAE,IAAI;KAChB;IACD,kBAAkB,EAAE;QAClB,QAAQ,EAAE,IAAI;QACd,wBAAwB,EAAE,CAAC,QAAQ,EAAE,UAAU,EAAE,YAAY,CAAC;KAC/D;IACD,iBAAiB,EAAE;QACjB,SAAS,EAAE,IAAI;KAChB;IACD,kCAAkC,EAAE;QAClC,SAAS,EAAE,IAAI;KAChB;IACD,2BAA2B,EAAE;QAC3B,SAAS,EAAE,IAAI;KAChB;IACD,sCAAsC,EAAE;QACtC,SAAS,EAAE,IAAI;KAChB;IACD,wBAAwB,EAAE;QACxB,QAAQ,EAAE,IAAI;KACf;CACF,CAAC,CAAC;AAEK,sDAAqB;AAC7B,kBAAe,qBAAqB,CAAC"}
|
package/build/lib/driver.d.ts
CHANGED
|
@@ -1,12 +1,3 @@
|
|
|
1
|
-
export default XCUITestDriver;
|
|
2
|
-
export type ExternalDriver<C extends import("@appium/types").Constraints, Ctx = string> = import('@appium/types').ExternalDriver<C, Ctx>;
|
|
3
|
-
export type XCUITestDriverConstraints = typeof desiredCapConstraints;
|
|
4
|
-
export type XCUITestDriverOpts = import('@appium/types').DriverOpts<XCUITestDriverConstraints>;
|
|
5
|
-
export type FullContext = import('./commands/types').FullContext;
|
|
6
|
-
export type WDACapabilities = import('./types').WDACapabilities;
|
|
7
|
-
export type XcodeVersion = import('appium-xcode').XcodeVersion;
|
|
8
|
-
export type Simulator = import('appium-ios-simulator').Simulator;
|
|
9
|
-
export type RealDevice = import('./real-device').RealDevice;
|
|
10
1
|
/**
|
|
11
2
|
* @implements {ExternalDriver<XCUITestDriverConstraints, FullContext|string>}
|
|
12
3
|
* @extends {BaseDriver<XCUITestDriverConstraints>}
|
|
@@ -344,15 +335,15 @@ export class XCUITestDriver extends BaseDriver<{
|
|
|
344
335
|
readonly isBoolean: true;
|
|
345
336
|
};
|
|
346
337
|
readonly shouldTerminateApp: {
|
|
347
|
-
/** @type {string[]} */
|
|
348
338
|
readonly isBoolean: true;
|
|
349
339
|
};
|
|
350
340
|
readonly forceAppLaunch: {
|
|
341
|
+
/** @type {string|null} */
|
|
351
342
|
readonly isBoolean: true;
|
|
352
343
|
};
|
|
353
344
|
readonly useNativeCachingStrategy: {
|
|
354
345
|
readonly isBoolean: true;
|
|
355
|
-
};
|
|
346
|
+
};
|
|
356
347
|
readonly appInstallStrategy: {
|
|
357
348
|
readonly isString: true;
|
|
358
349
|
readonly inclusionCaseInsensitive: readonly ["serial", "parallel", "ios-deploy"];
|
|
@@ -366,6 +357,12 @@ export class XCUITestDriver extends BaseDriver<{
|
|
|
366
357
|
readonly skipSyncUiDialogTranslation: {
|
|
367
358
|
readonly isBoolean: true;
|
|
368
359
|
};
|
|
360
|
+
readonly forceSimulatorSoftwareKeyboardPresence: {
|
|
361
|
+
readonly isBoolean: true;
|
|
362
|
+
};
|
|
363
|
+
readonly appLaunchStateTimeoutSec: {
|
|
364
|
+
readonly isNumber: true;
|
|
365
|
+
};
|
|
369
366
|
}, import("@appium/types").StringRecord, import("@appium/types").StringRecord, import("@appium/types").DefaultCreateSessionResult<{
|
|
370
367
|
readonly platformName: {
|
|
371
368
|
readonly presence: true;
|
|
@@ -697,15 +694,15 @@ export class XCUITestDriver extends BaseDriver<{
|
|
|
697
694
|
readonly isBoolean: true;
|
|
698
695
|
};
|
|
699
696
|
readonly shouldTerminateApp: {
|
|
700
|
-
/** @type {string[]} */
|
|
701
697
|
readonly isBoolean: true;
|
|
702
698
|
};
|
|
703
699
|
readonly forceAppLaunch: {
|
|
700
|
+
/** @type {string|null} */
|
|
704
701
|
readonly isBoolean: true;
|
|
705
702
|
};
|
|
706
703
|
readonly useNativeCachingStrategy: {
|
|
707
704
|
readonly isBoolean: true;
|
|
708
|
-
};
|
|
705
|
+
};
|
|
709
706
|
readonly appInstallStrategy: {
|
|
710
707
|
readonly isString: true;
|
|
711
708
|
readonly inclusionCaseInsensitive: readonly ["serial", "parallel", "ios-deploy"];
|
|
@@ -719,6 +716,12 @@ export class XCUITestDriver extends BaseDriver<{
|
|
|
719
716
|
readonly skipSyncUiDialogTranslation: {
|
|
720
717
|
readonly isBoolean: true;
|
|
721
718
|
};
|
|
719
|
+
readonly forceSimulatorSoftwareKeyboardPresence: {
|
|
720
|
+
readonly isBoolean: true;
|
|
721
|
+
};
|
|
722
|
+
readonly appLaunchStateTimeoutSec: {
|
|
723
|
+
readonly isNumber: true;
|
|
724
|
+
};
|
|
722
725
|
}>, void, import("@appium/types").StringRecord> implements ExternalDriver<XCUITestDriverConstraints, FullContext | string> {
|
|
723
726
|
static newMethodMap: {
|
|
724
727
|
readonly '/session/:sessionId/timeouts/async_script': {
|
|
@@ -1111,13 +1114,10 @@ export class XCUITestDriver extends BaseDriver<{
|
|
|
1111
1114
|
};
|
|
1112
1115
|
readonly 'mobile: stopPerfRecord': {
|
|
1113
1116
|
readonly command: "mobileStopPerfRecord";
|
|
1114
|
-
/** @type {string[]} */
|
|
1115
1117
|
readonly params: {
|
|
1116
1118
|
readonly optional: readonly ["remotePath", "user", "pass", "method", "profileName", "headers", "fileFieldName", "formFields"];
|
|
1117
1119
|
};
|
|
1118
|
-
};
|
|
1119
|
-
* @type {import('./types').Page[]|undefined}
|
|
1120
|
-
*/
|
|
1120
|
+
};
|
|
1121
1121
|
readonly 'mobile: installCertificate': {
|
|
1122
1122
|
readonly command: "mobileInstallCertificate";
|
|
1123
1123
|
readonly params: {
|
|
@@ -1126,13 +1126,11 @@ export class XCUITestDriver extends BaseDriver<{
|
|
|
1126
1126
|
};
|
|
1127
1127
|
};
|
|
1128
1128
|
readonly 'mobile: removeCertificate': {
|
|
1129
|
-
/** @type {((logRecord: {message: string}) => void)|null} */
|
|
1130
1129
|
readonly command: "mobileRemoveCertificate";
|
|
1131
1130
|
readonly params: {
|
|
1132
1131
|
readonly required: readonly ["name"];
|
|
1133
1132
|
};
|
|
1134
1133
|
};
|
|
1135
|
-
/** @type {import('./commands/performance').PerfRecorder[]} */
|
|
1136
1134
|
readonly 'mobile: listCertificates': {
|
|
1137
1135
|
readonly command: "mobileListCertificates";
|
|
1138
1136
|
};
|
|
@@ -1142,6 +1140,7 @@ export class XCUITestDriver extends BaseDriver<{
|
|
|
1142
1140
|
readonly 'mobile: stopLogsBroadcast': {
|
|
1143
1141
|
readonly command: "mobileStopLogsBroadcast";
|
|
1144
1142
|
};
|
|
1143
|
+
/** @type {boolean|undefined} */
|
|
1145
1144
|
readonly 'mobile: batteryInfo': {
|
|
1146
1145
|
readonly command: "mobileGetBatteryInfo";
|
|
1147
1146
|
};
|
|
@@ -1157,7 +1156,7 @@ export class XCUITestDriver extends BaseDriver<{
|
|
|
1157
1156
|
readonly 'mobile: getDeviceTime': {
|
|
1158
1157
|
readonly command: "mobileGetDeviceTime";
|
|
1159
1158
|
readonly params: {
|
|
1160
|
-
readonly optional: readonly ["format"];
|
|
1159
|
+
readonly optional: readonly ["format"]; /** @type {XcodeVersion|undefined} */
|
|
1161
1160
|
};
|
|
1162
1161
|
};
|
|
1163
1162
|
readonly 'mobile: activeAppInfo': {
|
|
@@ -1471,6 +1470,10 @@ export class XCUITestDriver extends BaseDriver<{
|
|
|
1471
1470
|
xcodeVersion: XcodeVersion | undefined;
|
|
1472
1471
|
/** @type {import('./commands/pcap').TrafficCapture|null} */
|
|
1473
1472
|
_trafficCapture: import('./commands/pcap').TrafficCapture | null;
|
|
1473
|
+
/** @type {Simulator|RealDevice} */
|
|
1474
|
+
_device: Simulator | RealDevice;
|
|
1475
|
+
/** @type {string|null} */
|
|
1476
|
+
_iosSdkVersion: string | null;
|
|
1474
1477
|
settings: DeviceSettings<{
|
|
1475
1478
|
nativeWebTap: boolean;
|
|
1476
1479
|
nativeWebTapStrict: boolean;
|
|
@@ -1841,15 +1844,15 @@ export class XCUITestDriver extends BaseDriver<{
|
|
|
1841
1844
|
readonly isBoolean: true;
|
|
1842
1845
|
};
|
|
1843
1846
|
readonly shouldTerminateApp: {
|
|
1844
|
-
/** @type {string[]} */
|
|
1845
1847
|
readonly isBoolean: true;
|
|
1846
1848
|
};
|
|
1847
1849
|
readonly forceAppLaunch: {
|
|
1850
|
+
/** @type {string|null} */
|
|
1848
1851
|
readonly isBoolean: true;
|
|
1849
1852
|
};
|
|
1850
1853
|
readonly useNativeCachingStrategy: {
|
|
1851
1854
|
readonly isBoolean: true;
|
|
1852
|
-
};
|
|
1855
|
+
};
|
|
1853
1856
|
readonly appInstallStrategy: {
|
|
1854
1857
|
readonly isString: true;
|
|
1855
1858
|
readonly inclusionCaseInsensitive: readonly ["serial", "parallel", "ios-deploy"];
|
|
@@ -1863,6 +1866,12 @@ export class XCUITestDriver extends BaseDriver<{
|
|
|
1863
1866
|
readonly skipSyncUiDialogTranslation: {
|
|
1864
1867
|
readonly isBoolean: true;
|
|
1865
1868
|
};
|
|
1869
|
+
readonly forceSimulatorSoftwareKeyboardPresence: {
|
|
1870
|
+
readonly isBoolean: true;
|
|
1871
|
+
};
|
|
1872
|
+
readonly appLaunchStateTimeoutSec: {
|
|
1873
|
+
readonly isNumber: true;
|
|
1874
|
+
};
|
|
1866
1875
|
}>]>;
|
|
1867
1876
|
mjpegStream: mjpeg.MJpegStream | undefined;
|
|
1868
1877
|
/**
|
|
@@ -1877,9 +1886,8 @@ export class XCUITestDriver extends BaseDriver<{
|
|
|
1877
1886
|
initSimulator(): Promise<void>;
|
|
1878
1887
|
/**
|
|
1879
1888
|
* Start WebDriverAgentRunner
|
|
1880
|
-
* @param {string} sessionId - The id of the target session to launch WDA with.
|
|
1881
1889
|
*/
|
|
1882
|
-
startWda(
|
|
1890
|
+
startWda(): Promise<void>;
|
|
1883
1891
|
/**
|
|
1884
1892
|
*
|
|
1885
1893
|
* @param {boolean} [enforceSimulatorShutdown=false]
|
|
@@ -1923,59 +1931,29 @@ export class XCUITestDriver extends BaseDriver<{
|
|
|
1923
1931
|
proxyActive(): boolean;
|
|
1924
1932
|
getProxyAvoidList(): import("@appium/types").RouteMatcher[];
|
|
1925
1933
|
canProxy(): boolean;
|
|
1934
|
+
/**
|
|
1935
|
+
* @returns {boolean}
|
|
1936
|
+
*/
|
|
1926
1937
|
isSafari(): boolean;
|
|
1927
1938
|
/**
|
|
1928
|
-
*
|
|
1929
1939
|
* @returns {boolean}
|
|
1930
1940
|
*/
|
|
1931
1941
|
isRealDevice(): boolean;
|
|
1932
|
-
isSimulator(): boolean;
|
|
1933
|
-
validateLocatorStrategy(strategy: any): void;
|
|
1934
1942
|
/**
|
|
1935
|
-
* @
|
|
1936
|
-
* @property {Pick<XCUITestDriverOpts, "enforceAppInstall">} enforceAppInstall
|
|
1937
|
-
* @property {Pick<XCUITestDriverOpts, "fullReset">} fullReset
|
|
1938
|
-
* @property {Pick<XCUITestDriverOpts, "noReset">} noReset
|
|
1939
|
-
* @property {Pick<XCUITestDriverOpts, "bundleId">} bundleId
|
|
1940
|
-
* @property {Pick<XCUITestDriverOpts, "app">} app
|
|
1941
|
-
* @property {Object} device - Real device object or simulator object
|
|
1943
|
+
* @returns {boolean}
|
|
1942
1944
|
*/
|
|
1945
|
+
isSimulator(): boolean;
|
|
1943
1946
|
/**
|
|
1944
|
-
* @
|
|
1945
|
-
|
|
1946
|
-
|
|
1947
|
-
* /
|
|
1948
|
-
|
|
1947
|
+
* @param {string} strategy
|
|
1948
|
+
*/
|
|
1949
|
+
validateLocatorStrategy(strategy: string): void;
|
|
1949
1950
|
/**
|
|
1950
1951
|
* Check if the given app can be installed, or should uninstall before installing it.
|
|
1951
1952
|
*
|
|
1952
1953
|
* @param {AutInstallationStateOptions} [opts]
|
|
1953
1954
|
* @returns {Promise<AutInstallationState>}
|
|
1954
1955
|
*/
|
|
1955
|
-
checkAutInstallationState(opts?:
|
|
1956
|
-
enforceAppInstall: Pick<XCUITestDriverOpts, "enforceAppInstall">;
|
|
1957
|
-
fullReset: Pick<XCUITestDriverOpts, "fullReset">;
|
|
1958
|
-
noReset: Pick<XCUITestDriverOpts, "noReset">;
|
|
1959
|
-
bundleId: Pick<XCUITestDriverOpts, "bundleId">;
|
|
1960
|
-
app: Pick<XCUITestDriverOpts, "app">;
|
|
1961
|
-
/**
|
|
1962
|
-
* - Real device object or simulator object
|
|
1963
|
-
*/
|
|
1964
|
-
device: any;
|
|
1965
|
-
} | undefined): Promise<{
|
|
1966
|
-
/**
|
|
1967
|
-
* - If the given app should install, or not need to install.
|
|
1968
|
-
*/
|
|
1969
|
-
install: boolean;
|
|
1970
|
-
/**
|
|
1971
|
-
* - If the installed app should be uninstalled, or not.
|
|
1972
|
-
* /
|
|
1973
|
-
*
|
|
1974
|
-
* /**
|
|
1975
|
-
* Check if the given app can be installed, or should uninstall before installing it.
|
|
1976
|
-
*/
|
|
1977
|
-
skipUninstall: boolean;
|
|
1978
|
-
}>;
|
|
1956
|
+
checkAutInstallationState(opts?: AutInstallationStateOptions | undefined): Promise<AutInstallationState>;
|
|
1979
1957
|
installAUT(): Promise<void>;
|
|
1980
1958
|
/**
|
|
1981
1959
|
* @param {string|string[]} otherApps
|
|
@@ -2048,7 +2026,7 @@ export class XCUITestDriver extends BaseDriver<{
|
|
|
2048
2026
|
listWebFrames: (this: XCUITestDriver, useUrl?: boolean) => Promise<any>;
|
|
2049
2027
|
mobileGetContexts: (this: XCUITestDriver, waitForWebviewMs?: number) => Promise<import("./commands/types").Context[]>;
|
|
2050
2028
|
onPageChange: (this: XCUITestDriver, pageChangeNotification: import("./commands/types").PageChangeNotification) => Promise<void>;
|
|
2051
|
-
useNewSafari: (this: XCUITestDriver) =>
|
|
2029
|
+
useNewSafari: (this: XCUITestDriver) => boolean;
|
|
2052
2030
|
getCurrentUrl: (this: XCUITestDriver) => any;
|
|
2053
2031
|
getNewRemoteDebugger: (this: XCUITestDriver) => Promise<any>;
|
|
2054
2032
|
getRecentWebviewContextId: (this: XCUITestDriver, titleRegExp: RegExp, urlRegExp: RegExp) => Promise<string | undefined>;
|
|
@@ -3595,9 +3573,29 @@ export class XCUITestDriver extends BaseDriver<{
|
|
|
3595
3573
|
mobileGetXctestScreenRecordingInfo: () => Promise<import("./commands/xctest-record-screen").XcTestScreenRecordingInfo | null>;
|
|
3596
3574
|
mobileStopXctestScreenRecording: (this: XCUITestDriver, remotePath?: string | undefined, user?: string | undefined, pass?: string | undefined, headers?: import("@appium/types").HTTPHeaders | undefined, fileFieldName?: string | undefined, formFields?: [string, any][] | Record<string, any> | undefined, method?: "PUT" | "POST" | "PATCH" | undefined) => Promise<import("./commands/xctest-record-screen").XcTestScreenRecording>;
|
|
3597
3575
|
}
|
|
3598
|
-
|
|
3576
|
+
export default XCUITestDriver;
|
|
3577
|
+
export type ExternalDriver<C extends import("@appium/types").Constraints, Ctx = string> = import('@appium/types').ExternalDriver<C, Ctx>;
|
|
3578
|
+
export type AutInstallationStateOptions = Pick<XCUITestDriverOpts, 'enforceAppInstall' | 'fullReset' | 'noReset' | 'bundleId' | 'app'>;
|
|
3579
|
+
export type AutInstallationState = {
|
|
3580
|
+
/**
|
|
3581
|
+
* - If the given app should install, or not need to install.
|
|
3582
|
+
*/
|
|
3583
|
+
install: boolean;
|
|
3584
|
+
/**
|
|
3585
|
+
* - If the installed app should be uninstalled, or not.
|
|
3586
|
+
*/
|
|
3587
|
+
skipUninstall: boolean;
|
|
3588
|
+
};
|
|
3589
|
+
export type XCUITestDriverConstraints = typeof desiredCapConstraints;
|
|
3590
|
+
export type XCUITestDriverOpts = import('@appium/types').DriverOpts<XCUITestDriverConstraints>;
|
|
3591
|
+
export type FullContext = import('./commands/types').FullContext;
|
|
3592
|
+
export type WDACapabilities = import('./types').WDACapabilities;
|
|
3593
|
+
export type XcodeVersion = import('appium-xcode').XcodeVersion;
|
|
3594
|
+
export type Simulator = import('appium-ios-simulator').Simulator;
|
|
3595
|
+
export type RealDevice = import('./real-device').RealDevice;
|
|
3599
3596
|
import { BaseDriver } from 'appium/driver';
|
|
3600
3597
|
import { LRUCache } from 'lru-cache';
|
|
3601
3598
|
import { DeviceSettings } from 'appium/driver';
|
|
3602
3599
|
import { mjpeg } from 'appium/support';
|
|
3600
|
+
import { desiredCapConstraints } from './desired-caps';
|
|
3603
3601
|
//# sourceMappingURL=driver.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"driver.d.ts","sourceRoot":"","sources":["../../lib/driver.js"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"driver.d.ts","sourceRoot":"","sources":["../../lib/driver.js"],"names":[],"mappings":"AAiLA;;;;;GAKG;AACH;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;QAgBE,0BAA0B;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;QAA1B,0BAA0B;;;;;;;;;;;;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C3E,8EAAuD;IACvD,8DAA6D;IAC7D,qFAAiE;IACjE,+DAA+D;IAC/D,qGAA2F;IAC3F,mHAA+E;IAC/E,+DAAmD;IACnD,8GAA+D;IAC/D,0DAAqD;IACrD,2EAAiD;IACjD,uEAAmD;IACnD,sDAAiE;IACjE,qHAAuH;IACvH,+HAAqF;IAKrF,oTAA4D;IAC5D,sFAAgF;IAChF,qEAA4E;IAC5E,2FAAwF;IAKxF,+LAA0G;IAC1G,8HAA8G;IAC9G,yaAAwG;CACzG;;0FAgBY,OAAO,eAAe,EAAE,cAAc,CAAC,CAAC,EAAE,GAAG,CAAC;0CAI9C,KAAK,kBAAkB,EAAE,mBAAmB,GAAG,WAAW,GAAG,SAAS,GAAG,UAAU,GAAG,KAAK,CAAC;;;;;aAK3F,OAAO;;;;mBACP,OAAO;;wCAIR,4BAA4B;iCAC5B,OAAO,eAAe,EAAE,UAAU,CAAC,yBAAyB,CAAC;0BAC7D,OAAO,kBAAkB,EAAE,WAAW;8BACtC,OAAO,SAAS,EAAE,eAAe;2BACjC,OAAO,cAAc,EAAE,YAAY;wBACnC,OAAO,sBAAsB,EAAE,SAAS;yBACxC,OAAO,eAAe,EAAE,UAAU;2BAntEE,eAAe;yBAMzC,WAAW;+BANe,eAAe;sBAC1B,gBAAgB;sCAsBlB,gBAAgB"}
|
package/build/lib/driver.js
CHANGED
|
@@ -558,8 +558,6 @@ class XCUITestDriver extends driver_1.BaseDriver {
|
|
|
558
558
|
resetIos() {
|
|
559
559
|
this.opts = this.opts || {};
|
|
560
560
|
this.wda = null;
|
|
561
|
-
// @ts-expect-error - do not assign arbitrary properties to `this.opts`
|
|
562
|
-
this.opts.device = null;
|
|
563
561
|
this.jwpProxyActive = false;
|
|
564
562
|
this.proxyReqRes = null;
|
|
565
563
|
this.safari = false;
|
|
@@ -614,8 +612,7 @@ class XCUITestDriver extends driver_1.BaseDriver {
|
|
|
614
612
|
* @returns {Simulator|RealDevice}
|
|
615
613
|
*/
|
|
616
614
|
get device() {
|
|
617
|
-
|
|
618
|
-
return this.opts?.device;
|
|
615
|
+
return this._device;
|
|
619
616
|
}
|
|
620
617
|
isXcodebuildNeeded() {
|
|
621
618
|
return !(CAP_NAMES_NO_XCODEBUILD_REQUIRED.some((x) => Boolean(this.opts[x])));
|
|
@@ -623,8 +620,6 @@ class XCUITestDriver extends driver_1.BaseDriver {
|
|
|
623
620
|
async createSession(w3cCaps1, w3cCaps2, w3cCaps3, driverData) {
|
|
624
621
|
try {
|
|
625
622
|
let [sessionId, caps] = await super.createSession(w3cCaps1, w3cCaps2, w3cCaps3, driverData);
|
|
626
|
-
// @ts-expect-error - do not assign arbitrary properties to `this.opts`
|
|
627
|
-
this.opts.sessionId = sessionId;
|
|
628
623
|
// merge cli args to opts, and if we did merge any, revalidate opts to ensure the final set
|
|
629
624
|
// is also consistent
|
|
630
625
|
if (this.mergeCliArgsToOpts()) {
|
|
@@ -652,20 +647,16 @@ class XCUITestDriver extends driver_1.BaseDriver {
|
|
|
652
647
|
elementResponseAttributes: DEFAULT_SETTINGS.elementResponseAttributes,
|
|
653
648
|
shouldUseCompactResponses: DEFAULT_SETTINGS.shouldUseCompactResponses,
|
|
654
649
|
};
|
|
655
|
-
if (lodash_1.default.
|
|
656
|
-
// @ts-expect-error - do not assign arbitrary properties to `this.opts`
|
|
650
|
+
if ('elementResponseAttributes' in this.opts && lodash_1.default.isString(this.opts.elementResponseAttributes)) {
|
|
657
651
|
wdaSettings.elementResponseAttributes = this.opts.elementResponseAttributes;
|
|
658
652
|
}
|
|
659
|
-
if (lodash_1.default.
|
|
660
|
-
// @ts-expect-error - do not assign arbitrary properties to `this.opts`
|
|
653
|
+
if ('shouldUseCompactResponses' in this.opts && lodash_1.default.isBoolean(this.opts.shouldUseCompactResponses)) {
|
|
661
654
|
wdaSettings.shouldUseCompactResponses = this.opts.shouldUseCompactResponses;
|
|
662
655
|
}
|
|
663
|
-
if (lodash_1.default.
|
|
664
|
-
// @ts-expect-error - do not assign arbitrary properties to `this.opts`
|
|
656
|
+
if ('mjpegServerScreenshotQuality' in this.opts && lodash_1.default.isNumber(this.opts.mjpegServerScreenshotQuality)) {
|
|
665
657
|
wdaSettings.mjpegServerScreenshotQuality = this.opts.mjpegServerScreenshotQuality;
|
|
666
658
|
}
|
|
667
|
-
if (lodash_1.default.
|
|
668
|
-
// @ts-expect-error - do not assign arbitrary properties to `this.opts`
|
|
659
|
+
if ('mjpegServerFramerate' in this.opts && lodash_1.default.isNumber(this.opts.mjpegServerFramerate)) {
|
|
669
660
|
wdaSettings.mjpegServerFramerate = this.opts.mjpegServerFramerate;
|
|
670
661
|
}
|
|
671
662
|
if (lodash_1.default.has(this.opts, 'screenshotQuality')) {
|
|
@@ -703,16 +694,11 @@ class XCUITestDriver extends driver_1.BaseDriver {
|
|
|
703
694
|
this.opts.noReset = !!this.opts.noReset;
|
|
704
695
|
this.opts.fullReset = !!this.opts.fullReset;
|
|
705
696
|
await (0, utils_1.printUser)();
|
|
706
|
-
|
|
707
|
-
this.opts.iosSdkVersion = null; // For WDA and xcodebuild
|
|
697
|
+
this._iosSdkVersion = null; // For WDA and xcodebuild
|
|
708
698
|
const { device, udid, realDevice } = await this.determineDevice();
|
|
709
699
|
this.log.info(`Determining device to run tests on: udid: '${udid}', real device: ${realDevice}`);
|
|
710
|
-
|
|
711
|
-
// @ts-expect-error - do not assign arbitrary properties to `this.opts`
|
|
712
|
-
this.opts.device = device;
|
|
700
|
+
this._device = device;
|
|
713
701
|
this.opts.udid = udid;
|
|
714
|
-
// @ts-expect-error - do not assign arbitrary properties to `this.opts`
|
|
715
|
-
this.opts.realDevice = realDevice;
|
|
716
702
|
if (this.opts.simulatorDevicesSetPath) {
|
|
717
703
|
if (realDevice) {
|
|
718
704
|
this.log.info(`The 'simulatorDevicesSetPath' capability is only supported for Simulator devices`);
|
|
@@ -732,8 +718,7 @@ class XCUITestDriver extends driver_1.BaseDriver {
|
|
|
732
718
|
this.log.info(`Normalized platformVersion capability value '${this.opts.platformVersion}' to '${normalizedVersion}'`);
|
|
733
719
|
this.opts.platformVersion = normalizedVersion;
|
|
734
720
|
}
|
|
735
|
-
|
|
736
|
-
if (lodash_1.default.isEmpty(this.xcodeVersion) && (this.isXcodebuildNeeded() || !this.opts.realDevice)) {
|
|
721
|
+
if (lodash_1.default.isEmpty(this.xcodeVersion) && (this.isXcodebuildNeeded() || this.isSimulator())) {
|
|
737
722
|
// no `webDriverAgentUrl`, or on a simulator, so we need an Xcode version
|
|
738
723
|
this.xcodeVersion = await (0, utils_1.getAndCheckXcodeVersion)();
|
|
739
724
|
}
|
|
@@ -760,7 +745,12 @@ class XCUITestDriver extends driver_1.BaseDriver {
|
|
|
760
745
|
}
|
|
761
746
|
await this.runReset();
|
|
762
747
|
this.wda = new appium_webdriveragent_1.WebDriverAgent(
|
|
763
|
-
/** @type {import('appium-xcode').XcodeVersion} */ (this.xcodeVersion),
|
|
748
|
+
/** @type {import('appium-xcode').XcodeVersion} */ (this.xcodeVersion), {
|
|
749
|
+
...this.opts,
|
|
750
|
+
device: this.device,
|
|
751
|
+
realDevice: this.isRealDevice(),
|
|
752
|
+
iosSdkVersion: this._iosSdkVersion,
|
|
753
|
+
}, this.log);
|
|
764
754
|
// Derived data path retrieval is an expensive operation
|
|
765
755
|
// We could start that now in background and get the cached result
|
|
766
756
|
// whenever it is needed
|
|
@@ -816,8 +806,7 @@ class XCUITestDriver extends driver_1.BaseDriver {
|
|
|
816
806
|
await this.device[methodName](this.opts.bundleId);
|
|
817
807
|
}
|
|
818
808
|
}
|
|
819
|
-
|
|
820
|
-
await this.startWda(this.opts.sessionId);
|
|
809
|
+
await this.startWda();
|
|
821
810
|
if (lodash_1.default.isString(this.opts.orientation)) {
|
|
822
811
|
await this.setInitialOrientation(this.opts.orientation);
|
|
823
812
|
this.logEvent('orientationSet');
|
|
@@ -882,9 +871,8 @@ class XCUITestDriver extends driver_1.BaseDriver {
|
|
|
882
871
|
}
|
|
883
872
|
/**
|
|
884
873
|
* Start WebDriverAgentRunner
|
|
885
|
-
* @param {string} sessionId - The id of the target session to launch WDA with.
|
|
886
874
|
*/
|
|
887
|
-
async startWda(
|
|
875
|
+
async startWda() {
|
|
888
876
|
// Don't cleanup the processes if webDriverAgentUrl is set
|
|
889
877
|
if (!support_1.util.hasValue(this.wda.webDriverAgentUrl)) {
|
|
890
878
|
await this.wda.cleanupObsoleteProcesses();
|
|
@@ -966,7 +954,7 @@ class XCUITestDriver extends driver_1.BaseDriver {
|
|
|
966
954
|
if (this.opts.usePreinstalledWDA) {
|
|
967
955
|
await this.preparePreinstalledWda();
|
|
968
956
|
}
|
|
969
|
-
this.cachedWdaStatus = await this.wda.launch(sessionId);
|
|
957
|
+
this.cachedWdaStatus = await this.wda.launch(/** @type {string} */ (this.sessionId));
|
|
970
958
|
}
|
|
971
959
|
catch (err) {
|
|
972
960
|
this.logEvent('wdaStartFailed');
|
|
@@ -1274,14 +1262,12 @@ class XCUITestDriver extends driver_1.BaseDriver {
|
|
|
1274
1262
|
// if we get generic names, translate them
|
|
1275
1263
|
this.opts.deviceName = (0, utils_1.translateDeviceName)(this.opts.platformVersion, this.opts.deviceName);
|
|
1276
1264
|
const setupVersionCaps = async () => {
|
|
1277
|
-
|
|
1278
|
-
|
|
1279
|
-
this.opts.
|
|
1280
|
-
|
|
1281
|
-
if (!this.opts.platformVersion && iosSdkVersion) {
|
|
1282
|
-
this.log.info(`No platformVersion specified. Using the latest version Xcode supports: '${iosSdkVersion}'. ` +
|
|
1265
|
+
this._iosSdkVersion = await (0, utils_1.getAndCheckIosSdkVersion)();
|
|
1266
|
+
this.log.info(`iOS SDK Version set to '${this._iosSdkVersion}'`);
|
|
1267
|
+
if (!this.opts.platformVersion && this._iosSdkVersion) {
|
|
1268
|
+
this.log.info(`No platformVersion specified. Using the latest version Xcode supports: '${this._iosSdkVersion}'. ` +
|
|
1283
1269
|
`This may cause problems if a simulator does not exist for this platform version.`);
|
|
1284
|
-
this.opts.platformVersion = (0, utils_1.normalizePlatformVersion)(
|
|
1270
|
+
this.opts.platformVersion = (0, utils_1.normalizePlatformVersion)(this._iosSdkVersion);
|
|
1285
1271
|
}
|
|
1286
1272
|
};
|
|
1287
1273
|
if (this.opts.udid) {
|
|
@@ -1435,10 +1421,9 @@ class XCUITestDriver extends driver_1.BaseDriver {
|
|
|
1435
1421
|
disableAutomaticScreenshots: this.opts.disableAutomaticScreenshots,
|
|
1436
1422
|
shouldTerminateApp: this.opts.shouldTerminateApp ?? true,
|
|
1437
1423
|
forceAppLaunch: this.opts.forceAppLaunch ?? true,
|
|
1424
|
+
appLaunchStateTimeoutSec: this.opts.appLaunchStateTimeoutSec,
|
|
1438
1425
|
useNativeCachingStrategy: this.opts.useNativeCachingStrategy ?? true,
|
|
1439
|
-
forceSimulatorSoftwareKeyboardPresence:
|
|
1440
|
-
// @ts-expect-error - do not assign arbitrary properties to `this.opts`
|
|
1441
|
-
this.opts.forceSimulatorSoftwareKeyboardPresence ??
|
|
1426
|
+
forceSimulatorSoftwareKeyboardPresence: this.opts.forceSimulatorSoftwareKeyboardPresence ??
|
|
1442
1427
|
(this.opts.connectHardwareKeyboard === true ? false : true),
|
|
1443
1428
|
});
|
|
1444
1429
|
if (this.opts.autoAcceptAlerts) {
|
|
@@ -1473,26 +1458,31 @@ class XCUITestDriver extends driver_1.BaseDriver {
|
|
|
1473
1458
|
canProxy() {
|
|
1474
1459
|
return true;
|
|
1475
1460
|
}
|
|
1461
|
+
/**
|
|
1462
|
+
* @returns {boolean}
|
|
1463
|
+
*/
|
|
1476
1464
|
isSafari() {
|
|
1477
1465
|
return !!this.safari;
|
|
1478
1466
|
}
|
|
1479
1467
|
/**
|
|
1480
|
-
*
|
|
1481
1468
|
* @returns {boolean}
|
|
1482
1469
|
*/
|
|
1483
1470
|
isRealDevice() {
|
|
1484
|
-
|
|
1485
|
-
return Boolean(this.opts.realDevice);
|
|
1471
|
+
return 'devicectl' in (this.device ?? {});
|
|
1486
1472
|
}
|
|
1473
|
+
/**
|
|
1474
|
+
* @returns {boolean}
|
|
1475
|
+
*/
|
|
1487
1476
|
isSimulator() {
|
|
1488
|
-
|
|
1489
|
-
return !this.opts.realDevice;
|
|
1477
|
+
return 'simctl' in (this.device ?? {});
|
|
1490
1478
|
}
|
|
1479
|
+
/**
|
|
1480
|
+
* @param {string} strategy
|
|
1481
|
+
*/
|
|
1491
1482
|
validateLocatorStrategy(strategy) {
|
|
1492
1483
|
super.validateLocatorStrategy(strategy, this.isWebContext());
|
|
1493
1484
|
}
|
|
1494
1485
|
/**
|
|
1495
|
-
*
|
|
1496
1486
|
* @param {any} caps
|
|
1497
1487
|
* @returns {caps is import('@appium/types').DriverCaps<XCUITestDriverConstraints>}
|
|
1498
1488
|
*/
|
|
@@ -1595,21 +1585,6 @@ class XCUITestDriver extends driver_1.BaseDriver {
|
|
|
1595
1585
|
// finally, return true since the superclass check passed, as did this
|
|
1596
1586
|
return true;
|
|
1597
1587
|
}
|
|
1598
|
-
/**
|
|
1599
|
-
* @typedef {Object} AutInstallationStateOptions
|
|
1600
|
-
* @property {Pick<XCUITestDriverOpts, "enforceAppInstall">} enforceAppInstall
|
|
1601
|
-
* @property {Pick<XCUITestDriverOpts, "fullReset">} fullReset
|
|
1602
|
-
* @property {Pick<XCUITestDriverOpts, "noReset">} noReset
|
|
1603
|
-
* @property {Pick<XCUITestDriverOpts, "bundleId">} bundleId
|
|
1604
|
-
* @property {Pick<XCUITestDriverOpts, "app">} app
|
|
1605
|
-
* @property {Object} device - Real device object or simulator object
|
|
1606
|
-
*/
|
|
1607
|
-
/**
|
|
1608
|
-
* @typedef {Object} AutInstallationState
|
|
1609
|
-
* @property {boolean} install - If the given app should install, or not need to install.
|
|
1610
|
-
* @property {boolean} skipUninstall - If the installed app should be uninstalled, or not.
|
|
1611
|
-
* /
|
|
1612
|
-
|
|
1613
1588
|
/**
|
|
1614
1589
|
* Check if the given app can be installed, or should uninstall before installing it.
|
|
1615
1590
|
*
|
|
@@ -1617,9 +1592,8 @@ class XCUITestDriver extends driver_1.BaseDriver {
|
|
|
1617
1592
|
* @returns {Promise<AutInstallationState>}
|
|
1618
1593
|
*/
|
|
1619
1594
|
async checkAutInstallationState(opts) {
|
|
1620
|
-
|
|
1621
|
-
const
|
|
1622
|
-
const wasAppInstalled = await device.isAppInstalled(bundleId);
|
|
1595
|
+
const { enforceAppInstall, fullReset, noReset, bundleId, app } = opts ?? this.opts;
|
|
1596
|
+
const wasAppInstalled = await this.device.isAppInstalled(bundleId);
|
|
1623
1597
|
if (wasAppInstalled) {
|
|
1624
1598
|
this.log.info(`App '${bundleId}' is already installed`);
|
|
1625
1599
|
if (noReset) {
|
|
@@ -1649,8 +1623,8 @@ class XCUITestDriver extends driver_1.BaseDriver {
|
|
|
1649
1623
|
};
|
|
1650
1624
|
}
|
|
1651
1625
|
const appBundleVersion = this.isRealDevice()
|
|
1652
|
-
? (await device.fetchAppInfo(bundleId))?.CFBundleVersion
|
|
1653
|
-
: BUNDLE_VERSION_PATTERN.exec(await device.simctl.appInfo(bundleId))?.[1];
|
|
1626
|
+
? (await /** @type {RealDevice} */ (this.device).fetchAppInfo(bundleId))?.CFBundleVersion
|
|
1627
|
+
: BUNDLE_VERSION_PATTERN.exec(await /** @type {Simulator} */ (this.device).simctl.appInfo(bundleId))?.[1];
|
|
1654
1628
|
this.log.debug(`CFBundleVersion from installed app info: ${appBundleVersion}`);
|
|
1655
1629
|
if (!appBundleVersion) {
|
|
1656
1630
|
return {
|
|
@@ -1836,6 +1810,14 @@ exports.default = XCUITestDriver;
|
|
|
1836
1810
|
* @template [Ctx=string]
|
|
1837
1811
|
* @typedef {import('@appium/types').ExternalDriver<C, Ctx>} ExternalDriver
|
|
1838
1812
|
*/
|
|
1813
|
+
/**
|
|
1814
|
+
* @typedef {Pick<XCUITestDriverOpts, 'enforceAppInstall' | 'fullReset' | 'noReset' | 'bundleId' | 'app'>} AutInstallationStateOptions
|
|
1815
|
+
*/
|
|
1816
|
+
/**
|
|
1817
|
+
* @typedef {Object} AutInstallationState
|
|
1818
|
+
* @property {boolean} install - If the given app should install, or not need to install.
|
|
1819
|
+
* @property {boolean} skipUninstall - If the installed app should be uninstalled, or not.
|
|
1820
|
+
*/
|
|
1839
1821
|
/**
|
|
1840
1822
|
* @typedef {typeof desiredCapConstraints} XCUITestDriverConstraints
|
|
1841
1823
|
* @typedef {import('@appium/types').DriverOpts<XCUITestDriverConstraints>} XCUITestDriverOpts
|
|
@@ -1844,5 +1826,5 @@ exports.default = XCUITestDriver;
|
|
|
1844
1826
|
* @typedef {import('appium-xcode').XcodeVersion} XcodeVersion
|
|
1845
1827
|
* @typedef {import('appium-ios-simulator').Simulator} Simulator
|
|
1846
1828
|
* @typedef {import('./real-device').RealDevice} RealDevice
|
|
1847
|
-
*/
|
|
1829
|
+
*/
|
|
1848
1830
|
//# sourceMappingURL=driver.js.map
|