appium-xcuitest-driver 7.7.1 → 7.7.2
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 +7 -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 +4 -0
- package/build/lib/desired-caps.d.ts.map +1 -1
- package/build/lib/desired-caps.js +3 -0
- package/build/lib/desired-caps.js.map +1 -1
- package/build/lib/driver.d.ts +54 -65
- package/build/lib/driver.d.ts.map +1 -1
- package/build/lib/driver.js +47 -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 +3 -0
- package/lib/driver.js +56 -67
- package/lib/types.ts +0 -19
- package/lib/utils.js +4 -1
- package/npm-shrinkwrap.json +2 -2
- package/package.json +1 -1
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,9 @@ export class XCUITestDriver extends BaseDriver<{
|
|
|
366
357
|
readonly skipSyncUiDialogTranslation: {
|
|
367
358
|
readonly isBoolean: true;
|
|
368
359
|
};
|
|
360
|
+
readonly forceSimulatorSoftwareKeyboardPresence: {
|
|
361
|
+
readonly isBoolean: true;
|
|
362
|
+
};
|
|
369
363
|
}, import("@appium/types").StringRecord, import("@appium/types").StringRecord, import("@appium/types").DefaultCreateSessionResult<{
|
|
370
364
|
readonly platformName: {
|
|
371
365
|
readonly presence: true;
|
|
@@ -697,15 +691,15 @@ export class XCUITestDriver extends BaseDriver<{
|
|
|
697
691
|
readonly isBoolean: true;
|
|
698
692
|
};
|
|
699
693
|
readonly shouldTerminateApp: {
|
|
700
|
-
/** @type {string[]} */
|
|
701
694
|
readonly isBoolean: true;
|
|
702
695
|
};
|
|
703
696
|
readonly forceAppLaunch: {
|
|
697
|
+
/** @type {string|null} */
|
|
704
698
|
readonly isBoolean: true;
|
|
705
699
|
};
|
|
706
700
|
readonly useNativeCachingStrategy: {
|
|
707
701
|
readonly isBoolean: true;
|
|
708
|
-
};
|
|
702
|
+
};
|
|
709
703
|
readonly appInstallStrategy: {
|
|
710
704
|
readonly isString: true;
|
|
711
705
|
readonly inclusionCaseInsensitive: readonly ["serial", "parallel", "ios-deploy"];
|
|
@@ -719,6 +713,9 @@ export class XCUITestDriver extends BaseDriver<{
|
|
|
719
713
|
readonly skipSyncUiDialogTranslation: {
|
|
720
714
|
readonly isBoolean: true;
|
|
721
715
|
};
|
|
716
|
+
readonly forceSimulatorSoftwareKeyboardPresence: {
|
|
717
|
+
readonly isBoolean: true;
|
|
718
|
+
};
|
|
722
719
|
}>, void, import("@appium/types").StringRecord> implements ExternalDriver<XCUITestDriverConstraints, FullContext | string> {
|
|
723
720
|
static newMethodMap: {
|
|
724
721
|
readonly '/session/:sessionId/timeouts/async_script': {
|
|
@@ -1111,13 +1108,10 @@ export class XCUITestDriver extends BaseDriver<{
|
|
|
1111
1108
|
};
|
|
1112
1109
|
readonly 'mobile: stopPerfRecord': {
|
|
1113
1110
|
readonly command: "mobileStopPerfRecord";
|
|
1114
|
-
/** @type {string[]} */
|
|
1115
1111
|
readonly params: {
|
|
1116
1112
|
readonly optional: readonly ["remotePath", "user", "pass", "method", "profileName", "headers", "fileFieldName", "formFields"];
|
|
1117
1113
|
};
|
|
1118
|
-
};
|
|
1119
|
-
* @type {import('./types').Page[]|undefined}
|
|
1120
|
-
*/
|
|
1114
|
+
};
|
|
1121
1115
|
readonly 'mobile: installCertificate': {
|
|
1122
1116
|
readonly command: "mobileInstallCertificate";
|
|
1123
1117
|
readonly params: {
|
|
@@ -1126,13 +1120,11 @@ export class XCUITestDriver extends BaseDriver<{
|
|
|
1126
1120
|
};
|
|
1127
1121
|
};
|
|
1128
1122
|
readonly 'mobile: removeCertificate': {
|
|
1129
|
-
/** @type {((logRecord: {message: string}) => void)|null} */
|
|
1130
1123
|
readonly command: "mobileRemoveCertificate";
|
|
1131
1124
|
readonly params: {
|
|
1132
1125
|
readonly required: readonly ["name"];
|
|
1133
1126
|
};
|
|
1134
1127
|
};
|
|
1135
|
-
/** @type {import('./commands/performance').PerfRecorder[]} */
|
|
1136
1128
|
readonly 'mobile: listCertificates': {
|
|
1137
1129
|
readonly command: "mobileListCertificates";
|
|
1138
1130
|
};
|
|
@@ -1142,6 +1134,7 @@ export class XCUITestDriver extends BaseDriver<{
|
|
|
1142
1134
|
readonly 'mobile: stopLogsBroadcast': {
|
|
1143
1135
|
readonly command: "mobileStopLogsBroadcast";
|
|
1144
1136
|
};
|
|
1137
|
+
/** @type {boolean|undefined} */
|
|
1145
1138
|
readonly 'mobile: batteryInfo': {
|
|
1146
1139
|
readonly command: "mobileGetBatteryInfo";
|
|
1147
1140
|
};
|
|
@@ -1157,7 +1150,7 @@ export class XCUITestDriver extends BaseDriver<{
|
|
|
1157
1150
|
readonly 'mobile: getDeviceTime': {
|
|
1158
1151
|
readonly command: "mobileGetDeviceTime";
|
|
1159
1152
|
readonly params: {
|
|
1160
|
-
readonly optional: readonly ["format"];
|
|
1153
|
+
readonly optional: readonly ["format"]; /** @type {XcodeVersion|undefined} */
|
|
1161
1154
|
};
|
|
1162
1155
|
};
|
|
1163
1156
|
readonly 'mobile: activeAppInfo': {
|
|
@@ -1471,6 +1464,10 @@ export class XCUITestDriver extends BaseDriver<{
|
|
|
1471
1464
|
xcodeVersion: XcodeVersion | undefined;
|
|
1472
1465
|
/** @type {import('./commands/pcap').TrafficCapture|null} */
|
|
1473
1466
|
_trafficCapture: import('./commands/pcap').TrafficCapture | null;
|
|
1467
|
+
/** @type {Simulator|RealDevice} */
|
|
1468
|
+
_device: Simulator | RealDevice;
|
|
1469
|
+
/** @type {string|null} */
|
|
1470
|
+
_iosSdkVersion: string | null;
|
|
1474
1471
|
settings: DeviceSettings<{
|
|
1475
1472
|
nativeWebTap: boolean;
|
|
1476
1473
|
nativeWebTapStrict: boolean;
|
|
@@ -1841,15 +1838,15 @@ export class XCUITestDriver extends BaseDriver<{
|
|
|
1841
1838
|
readonly isBoolean: true;
|
|
1842
1839
|
};
|
|
1843
1840
|
readonly shouldTerminateApp: {
|
|
1844
|
-
/** @type {string[]} */
|
|
1845
1841
|
readonly isBoolean: true;
|
|
1846
1842
|
};
|
|
1847
1843
|
readonly forceAppLaunch: {
|
|
1844
|
+
/** @type {string|null} */
|
|
1848
1845
|
readonly isBoolean: true;
|
|
1849
1846
|
};
|
|
1850
1847
|
readonly useNativeCachingStrategy: {
|
|
1851
1848
|
readonly isBoolean: true;
|
|
1852
|
-
};
|
|
1849
|
+
};
|
|
1853
1850
|
readonly appInstallStrategy: {
|
|
1854
1851
|
readonly isString: true;
|
|
1855
1852
|
readonly inclusionCaseInsensitive: readonly ["serial", "parallel", "ios-deploy"];
|
|
@@ -1863,6 +1860,9 @@ export class XCUITestDriver extends BaseDriver<{
|
|
|
1863
1860
|
readonly skipSyncUiDialogTranslation: {
|
|
1864
1861
|
readonly isBoolean: true;
|
|
1865
1862
|
};
|
|
1863
|
+
readonly forceSimulatorSoftwareKeyboardPresence: {
|
|
1864
|
+
readonly isBoolean: true;
|
|
1865
|
+
};
|
|
1866
1866
|
}>]>;
|
|
1867
1867
|
mjpegStream: mjpeg.MJpegStream | undefined;
|
|
1868
1868
|
/**
|
|
@@ -1877,9 +1877,8 @@ export class XCUITestDriver extends BaseDriver<{
|
|
|
1877
1877
|
initSimulator(): Promise<void>;
|
|
1878
1878
|
/**
|
|
1879
1879
|
* Start WebDriverAgentRunner
|
|
1880
|
-
* @param {string} sessionId - The id of the target session to launch WDA with.
|
|
1881
1880
|
*/
|
|
1882
|
-
startWda(
|
|
1881
|
+
startWda(): Promise<void>;
|
|
1883
1882
|
/**
|
|
1884
1883
|
*
|
|
1885
1884
|
* @param {boolean} [enforceSimulatorShutdown=false]
|
|
@@ -1923,59 +1922,29 @@ export class XCUITestDriver extends BaseDriver<{
|
|
|
1923
1922
|
proxyActive(): boolean;
|
|
1924
1923
|
getProxyAvoidList(): import("@appium/types").RouteMatcher[];
|
|
1925
1924
|
canProxy(): boolean;
|
|
1925
|
+
/**
|
|
1926
|
+
* @returns {boolean}
|
|
1927
|
+
*/
|
|
1926
1928
|
isSafari(): boolean;
|
|
1927
1929
|
/**
|
|
1928
|
-
*
|
|
1929
1930
|
* @returns {boolean}
|
|
1930
1931
|
*/
|
|
1931
1932
|
isRealDevice(): boolean;
|
|
1932
|
-
isSimulator(): boolean;
|
|
1933
|
-
validateLocatorStrategy(strategy: any): void;
|
|
1934
1933
|
/**
|
|
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
|
|
1934
|
+
* @returns {boolean}
|
|
1942
1935
|
*/
|
|
1936
|
+
isSimulator(): boolean;
|
|
1943
1937
|
/**
|
|
1944
|
-
* @
|
|
1945
|
-
|
|
1946
|
-
|
|
1947
|
-
* /
|
|
1948
|
-
|
|
1938
|
+
* @param {string} strategy
|
|
1939
|
+
*/
|
|
1940
|
+
validateLocatorStrategy(strategy: string): void;
|
|
1949
1941
|
/**
|
|
1950
1942
|
* Check if the given app can be installed, or should uninstall before installing it.
|
|
1951
1943
|
*
|
|
1952
1944
|
* @param {AutInstallationStateOptions} [opts]
|
|
1953
1945
|
* @returns {Promise<AutInstallationState>}
|
|
1954
1946
|
*/
|
|
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
|
-
}>;
|
|
1947
|
+
checkAutInstallationState(opts?: AutInstallationStateOptions | undefined): Promise<AutInstallationState>;
|
|
1979
1948
|
installAUT(): Promise<void>;
|
|
1980
1949
|
/**
|
|
1981
1950
|
* @param {string|string[]} otherApps
|
|
@@ -2048,7 +2017,7 @@ export class XCUITestDriver extends BaseDriver<{
|
|
|
2048
2017
|
listWebFrames: (this: XCUITestDriver, useUrl?: boolean) => Promise<any>;
|
|
2049
2018
|
mobileGetContexts: (this: XCUITestDriver, waitForWebviewMs?: number) => Promise<import("./commands/types").Context[]>;
|
|
2050
2019
|
onPageChange: (this: XCUITestDriver, pageChangeNotification: import("./commands/types").PageChangeNotification) => Promise<void>;
|
|
2051
|
-
useNewSafari: (this: XCUITestDriver) =>
|
|
2020
|
+
useNewSafari: (this: XCUITestDriver) => boolean;
|
|
2052
2021
|
getCurrentUrl: (this: XCUITestDriver) => any;
|
|
2053
2022
|
getNewRemoteDebugger: (this: XCUITestDriver) => Promise<any>;
|
|
2054
2023
|
getRecentWebviewContextId: (this: XCUITestDriver, titleRegExp: RegExp, urlRegExp: RegExp) => Promise<string | undefined>;
|
|
@@ -3595,9 +3564,29 @@ export class XCUITestDriver extends BaseDriver<{
|
|
|
3595
3564
|
mobileGetXctestScreenRecordingInfo: () => Promise<import("./commands/xctest-record-screen").XcTestScreenRecordingInfo | null>;
|
|
3596
3565
|
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
3566
|
}
|
|
3598
|
-
|
|
3567
|
+
export default XCUITestDriver;
|
|
3568
|
+
export type ExternalDriver<C extends import("@appium/types").Constraints, Ctx = string> = import('@appium/types').ExternalDriver<C, Ctx>;
|
|
3569
|
+
export type AutInstallationStateOptions = Pick<XCUITestDriverOpts, 'enforceAppInstall' | 'fullReset' | 'noReset' | 'bundleId' | 'app'>;
|
|
3570
|
+
export type AutInstallationState = {
|
|
3571
|
+
/**
|
|
3572
|
+
* - If the given app should install, or not need to install.
|
|
3573
|
+
*/
|
|
3574
|
+
install: boolean;
|
|
3575
|
+
/**
|
|
3576
|
+
* - If the installed app should be uninstalled, or not.
|
|
3577
|
+
*/
|
|
3578
|
+
skipUninstall: boolean;
|
|
3579
|
+
};
|
|
3580
|
+
export type XCUITestDriverConstraints = typeof desiredCapConstraints;
|
|
3581
|
+
export type XCUITestDriverOpts = import('@appium/types').DriverOpts<XCUITestDriverConstraints>;
|
|
3582
|
+
export type FullContext = import('./commands/types').FullContext;
|
|
3583
|
+
export type WDACapabilities = import('./types').WDACapabilities;
|
|
3584
|
+
export type XcodeVersion = import('appium-xcode').XcodeVersion;
|
|
3585
|
+
export type Simulator = import('appium-ios-simulator').Simulator;
|
|
3586
|
+
export type RealDevice = import('./real-device').RealDevice;
|
|
3599
3587
|
import { BaseDriver } from 'appium/driver';
|
|
3600
3588
|
import { LRUCache } from 'lru-cache';
|
|
3601
3589
|
import { DeviceSettings } from 'appium/driver';
|
|
3602
3590
|
import { mjpeg } from 'appium/support';
|
|
3591
|
+
import { desiredCapConstraints } from './desired-caps';
|
|
3603
3592
|
//# 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;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;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A4B;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;2BAltEE,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) {
|
|
@@ -1436,9 +1422,7 @@ class XCUITestDriver extends driver_1.BaseDriver {
|
|
|
1436
1422
|
shouldTerminateApp: this.opts.shouldTerminateApp ?? true,
|
|
1437
1423
|
forceAppLaunch: this.opts.forceAppLaunch ?? true,
|
|
1438
1424
|
useNativeCachingStrategy: this.opts.useNativeCachingStrategy ?? true,
|
|
1439
|
-
forceSimulatorSoftwareKeyboardPresence:
|
|
1440
|
-
// @ts-expect-error - do not assign arbitrary properties to `this.opts`
|
|
1441
|
-
this.opts.forceSimulatorSoftwareKeyboardPresence ??
|
|
1425
|
+
forceSimulatorSoftwareKeyboardPresence: this.opts.forceSimulatorSoftwareKeyboardPresence ??
|
|
1442
1426
|
(this.opts.connectHardwareKeyboard === true ? false : true),
|
|
1443
1427
|
});
|
|
1444
1428
|
if (this.opts.autoAcceptAlerts) {
|
|
@@ -1473,26 +1457,31 @@ class XCUITestDriver extends driver_1.BaseDriver {
|
|
|
1473
1457
|
canProxy() {
|
|
1474
1458
|
return true;
|
|
1475
1459
|
}
|
|
1460
|
+
/**
|
|
1461
|
+
* @returns {boolean}
|
|
1462
|
+
*/
|
|
1476
1463
|
isSafari() {
|
|
1477
1464
|
return !!this.safari;
|
|
1478
1465
|
}
|
|
1479
1466
|
/**
|
|
1480
|
-
*
|
|
1481
1467
|
* @returns {boolean}
|
|
1482
1468
|
*/
|
|
1483
1469
|
isRealDevice() {
|
|
1484
|
-
|
|
1485
|
-
return Boolean(this.opts.realDevice);
|
|
1470
|
+
return 'devicectl' in (this.device ?? {});
|
|
1486
1471
|
}
|
|
1472
|
+
/**
|
|
1473
|
+
* @returns {boolean}
|
|
1474
|
+
*/
|
|
1487
1475
|
isSimulator() {
|
|
1488
|
-
|
|
1489
|
-
return !this.opts.realDevice;
|
|
1476
|
+
return 'simctl' in (this.device ?? {});
|
|
1490
1477
|
}
|
|
1478
|
+
/**
|
|
1479
|
+
* @param {string} strategy
|
|
1480
|
+
*/
|
|
1491
1481
|
validateLocatorStrategy(strategy) {
|
|
1492
1482
|
super.validateLocatorStrategy(strategy, this.isWebContext());
|
|
1493
1483
|
}
|
|
1494
1484
|
/**
|
|
1495
|
-
*
|
|
1496
1485
|
* @param {any} caps
|
|
1497
1486
|
* @returns {caps is import('@appium/types').DriverCaps<XCUITestDriverConstraints>}
|
|
1498
1487
|
*/
|
|
@@ -1595,21 +1584,6 @@ class XCUITestDriver extends driver_1.BaseDriver {
|
|
|
1595
1584
|
// finally, return true since the superclass check passed, as did this
|
|
1596
1585
|
return true;
|
|
1597
1586
|
}
|
|
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
1587
|
/**
|
|
1614
1588
|
* Check if the given app can be installed, or should uninstall before installing it.
|
|
1615
1589
|
*
|
|
@@ -1617,9 +1591,8 @@ class XCUITestDriver extends driver_1.BaseDriver {
|
|
|
1617
1591
|
* @returns {Promise<AutInstallationState>}
|
|
1618
1592
|
*/
|
|
1619
1593
|
async checkAutInstallationState(opts) {
|
|
1620
|
-
|
|
1621
|
-
const
|
|
1622
|
-
const wasAppInstalled = await device.isAppInstalled(bundleId);
|
|
1594
|
+
const { enforceAppInstall, fullReset, noReset, bundleId, app } = opts ?? this.opts;
|
|
1595
|
+
const wasAppInstalled = await this.device.isAppInstalled(bundleId);
|
|
1623
1596
|
if (wasAppInstalled) {
|
|
1624
1597
|
this.log.info(`App '${bundleId}' is already installed`);
|
|
1625
1598
|
if (noReset) {
|
|
@@ -1649,8 +1622,8 @@ class XCUITestDriver extends driver_1.BaseDriver {
|
|
|
1649
1622
|
};
|
|
1650
1623
|
}
|
|
1651
1624
|
const appBundleVersion = this.isRealDevice()
|
|
1652
|
-
? (await device.fetchAppInfo(bundleId))?.CFBundleVersion
|
|
1653
|
-
: BUNDLE_VERSION_PATTERN.exec(await device.simctl.appInfo(bundleId))?.[1];
|
|
1625
|
+
? (await /** @type {RealDevice} */ (this.device).fetchAppInfo(bundleId))?.CFBundleVersion
|
|
1626
|
+
: BUNDLE_VERSION_PATTERN.exec(await /** @type {Simulator} */ (this.device).simctl.appInfo(bundleId))?.[1];
|
|
1654
1627
|
this.log.debug(`CFBundleVersion from installed app info: ${appBundleVersion}`);
|
|
1655
1628
|
if (!appBundleVersion) {
|
|
1656
1629
|
return {
|
|
@@ -1836,6 +1809,14 @@ exports.default = XCUITestDriver;
|
|
|
1836
1809
|
* @template [Ctx=string]
|
|
1837
1810
|
* @typedef {import('@appium/types').ExternalDriver<C, Ctx>} ExternalDriver
|
|
1838
1811
|
*/
|
|
1812
|
+
/**
|
|
1813
|
+
* @typedef {Pick<XCUITestDriverOpts, 'enforceAppInstall' | 'fullReset' | 'noReset' | 'bundleId' | 'app'>} AutInstallationStateOptions
|
|
1814
|
+
*/
|
|
1815
|
+
/**
|
|
1816
|
+
* @typedef {Object} AutInstallationState
|
|
1817
|
+
* @property {boolean} install - If the given app should install, or not need to install.
|
|
1818
|
+
* @property {boolean} skipUninstall - If the installed app should be uninstalled, or not.
|
|
1819
|
+
*/
|
|
1839
1820
|
/**
|
|
1840
1821
|
* @typedef {typeof desiredCapConstraints} XCUITestDriverConstraints
|
|
1841
1822
|
* @typedef {import('@appium/types').DriverOpts<XCUITestDriverConstraints>} XCUITestDriverOpts
|
|
@@ -1844,5 +1825,5 @@ exports.default = XCUITestDriver;
|
|
|
1844
1825
|
* @typedef {import('appium-xcode').XcodeVersion} XcodeVersion
|
|
1845
1826
|
* @typedef {import('appium-ios-simulator').Simulator} Simulator
|
|
1846
1827
|
* @typedef {import('./real-device').RealDevice} RealDevice
|
|
1847
|
-
*/
|
|
1828
|
+
*/
|
|
1848
1829
|
//# sourceMappingURL=driver.js.map
|