appium-xcuitest-driver 10.3.0 → 10.4.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.md +12 -0
- package/build/lib/commands/active-app-info.d.ts +9 -0
- package/build/lib/commands/active-app-info.d.ts.map +1 -0
- package/build/lib/commands/active-app-info.js +14 -0
- package/build/lib/commands/active-app-info.js.map +1 -0
- package/build/lib/commands/alert.d.ts +42 -45
- package/build/lib/commands/alert.d.ts.map +1 -1
- package/build/lib/commands/alert.js +66 -62
- package/build/lib/commands/alert.js.map +1 -1
- package/build/lib/commands/app-management.d.ts +150 -153
- package/build/lib/commands/app-management.d.ts.map +1 -1
- package/build/lib/commands/app-management.js +300 -286
- package/build/lib/commands/app-management.js.map +1 -1
- package/build/lib/commands/app-strings.d.ts +14 -17
- package/build/lib/commands/app-strings.d.ts.map +1 -1
- package/build/lib/commands/app-strings.js +23 -24
- package/build/lib/commands/app-strings.js.map +1 -1
- package/build/lib/commands/appearance.d.ts +19 -22
- package/build/lib/commands/appearance.d.ts.map +1 -1
- package/build/lib/commands/appearance.js +56 -56
- package/build/lib/commands/appearance.js.map +1 -1
- package/build/lib/commands/audit.d.ts +22 -17
- package/build/lib/commands/audit.d.ts.map +1 -1
- package/build/lib/commands/audit.js +17 -18
- package/build/lib/commands/audit.js.map +1 -1
- package/build/lib/commands/battery.d.ts +11 -14
- package/build/lib/commands/battery.d.ts.map +1 -1
- package/build/lib/commands/battery.js +36 -37
- package/build/lib/commands/battery.js.map +1 -1
- package/build/lib/commands/biometric.d.ts +30 -33
- package/build/lib/commands/biometric.d.ts.map +1 -1
- package/build/lib/commands/biometric.js +42 -41
- package/build/lib/commands/biometric.js.map +1 -1
- package/build/lib/commands/certificate.d.ts +48 -45
- package/build/lib/commands/certificate.d.ts.map +1 -1
- package/build/lib/commands/certificate.js +218 -205
- package/build/lib/commands/certificate.js.map +1 -1
- package/build/lib/commands/clipboard.d.ts +19 -22
- package/build/lib/commands/clipboard.d.ts.map +1 -1
- package/build/lib/commands/clipboard.js +30 -30
- package/build/lib/commands/clipboard.js.map +1 -1
- package/build/lib/commands/condition.d.ts +49 -26
- package/build/lib/commands/condition.d.ts.map +1 -1
- package/build/lib/commands/condition.js +87 -86
- package/build/lib/commands/condition.js.map +1 -1
- package/build/lib/commands/content-size.d.ts +26 -29
- package/build/lib/commands/content-size.d.ts.map +1 -1
- package/build/lib/commands/content-size.js +36 -36
- package/build/lib/commands/content-size.js.map +1 -1
- package/build/lib/commands/context.d.ts +161 -108
- package/build/lib/commands/context.d.ts.map +1 -1
- package/build/lib/commands/context.js +530 -517
- package/build/lib/commands/context.js.map +1 -1
- package/build/lib/commands/deviceInfo.d.ts +9 -12
- package/build/lib/commands/deviceInfo.d.ts.map +1 -1
- package/build/lib/commands/deviceInfo.js +17 -18
- package/build/lib/commands/deviceInfo.js.map +1 -1
- package/build/lib/commands/element.d.ts +102 -105
- package/build/lib/commands/element.d.ts.map +1 -1
- package/build/lib/commands/element.js +337 -323
- package/build/lib/commands/element.js.map +1 -1
- package/build/lib/commands/execute.d.ts +24 -19
- package/build/lib/commands/execute.d.ts.map +1 -1
- package/build/lib/commands/execute.js +63 -62
- package/build/lib/commands/execute.js.map +1 -1
- package/build/lib/commands/file-movement.d.ts +77 -80
- package/build/lib/commands/file-movement.d.ts.map +1 -1
- package/build/lib/commands/file-movement.js +130 -124
- package/build/lib/commands/file-movement.js.map +1 -1
- package/build/lib/commands/find.d.ts +18 -21
- package/build/lib/commands/find.d.ts.map +1 -1
- package/build/lib/commands/find.js +158 -156
- package/build/lib/commands/find.js.map +1 -1
- package/build/lib/commands/general.d.ts +124 -116
- package/build/lib/commands/general.d.ts.map +1 -1
- package/build/lib/commands/general.js +248 -232
- package/build/lib/commands/general.js.map +1 -1
- package/build/lib/commands/geolocation.d.ts +43 -46
- package/build/lib/commands/geolocation.d.ts.map +1 -1
- package/build/lib/commands/geolocation.js +10 -11
- package/build/lib/commands/geolocation.js.map +1 -1
- package/build/lib/commands/gesture.d.ts +273 -276
- package/build/lib/commands/gesture.d.ts.map +1 -1
- package/build/lib/commands/gesture.js +506 -492
- package/build/lib/commands/gesture.js.map +1 -1
- package/build/lib/commands/increase-contrast.d.ts +20 -23
- package/build/lib/commands/increase-contrast.d.ts.map +1 -1
- package/build/lib/commands/increase-contrast.js +30 -30
- package/build/lib/commands/increase-contrast.js.map +1 -1
- package/build/lib/commands/iohid.d.ts +1370 -1373
- package/build/lib/commands/iohid.d.ts.map +1 -1
- package/build/lib/commands/iohid.js +30 -31
- package/build/lib/commands/iohid.js.map +1 -1
- package/build/lib/commands/keyboard.d.ts +29 -32
- package/build/lib/commands/keyboard.d.ts.map +1 -1
- package/build/lib/commands/keyboard.js +53 -51
- package/build/lib/commands/keyboard.js.map +1 -1
- package/build/lib/commands/keychains.d.ts +9 -12
- package/build/lib/commands/keychains.d.ts.map +1 -1
- package/build/lib/commands/keychains.js +13 -14
- package/build/lib/commands/keychains.js.map +1 -1
- package/build/lib/commands/localization.d.ts +16 -19
- package/build/lib/commands/localization.d.ts.map +1 -1
- package/build/lib/commands/localization.js +25 -26
- package/build/lib/commands/localization.js.map +1 -1
- package/build/lib/commands/location.d.ts +36 -39
- package/build/lib/commands/location.d.ts.map +1 -1
- package/build/lib/commands/location.js +99 -98
- package/build/lib/commands/location.js.map +1 -1
- package/build/lib/commands/lock.d.ts +21 -24
- package/build/lib/commands/lock.d.ts.map +1 -1
- package/build/lib/commands/lock.js +39 -38
- package/build/lib/commands/lock.js.map +1 -1
- package/build/lib/commands/log.d.ts +43 -37
- package/build/lib/commands/log.d.ts.map +1 -1
- package/build/lib/commands/log.js +174 -171
- package/build/lib/commands/log.js.map +1 -1
- package/build/lib/commands/memory.d.ts +9 -12
- package/build/lib/commands/memory.d.ts.map +1 -1
- package/build/lib/commands/memory.js +37 -38
- package/build/lib/commands/memory.js.map +1 -1
- package/build/lib/commands/navigation.d.ts +30 -33
- package/build/lib/commands/navigation.d.ts.map +1 -1
- package/build/lib/commands/navigation.js +92 -92
- package/build/lib/commands/navigation.js.map +1 -1
- package/build/lib/commands/notifications.d.ts +26 -29
- package/build/lib/commands/notifications.d.ts.map +1 -1
- package/build/lib/commands/notifications.js +53 -53
- package/build/lib/commands/notifications.js.map +1 -1
- package/build/lib/commands/pasteboard.d.ts +21 -24
- package/build/lib/commands/pasteboard.d.ts.map +1 -1
- package/build/lib/commands/pasteboard.js +37 -37
- package/build/lib/commands/pasteboard.js.map +1 -1
- package/build/lib/commands/pcap.d.ts +39 -26
- package/build/lib/commands/pcap.d.ts.map +1 -1
- package/build/lib/commands/pcap.js +81 -81
- package/build/lib/commands/pcap.js.map +1 -1
- package/build/lib/commands/performance.d.ts +63 -44
- package/build/lib/commands/performance.d.ts.map +1 -1
- package/build/lib/commands/performance.js +105 -105
- package/build/lib/commands/performance.js.map +1 -1
- package/build/lib/commands/permissions.d.ts +33 -36
- package/build/lib/commands/permissions.d.ts.map +1 -1
- package/build/lib/commands/permissions.js +66 -65
- package/build/lib/commands/permissions.js.map +1 -1
- package/build/lib/commands/proxy-helper.d.ts +12 -15
- package/build/lib/commands/proxy-helper.d.ts.map +1 -1
- package/build/lib/commands/proxy-helper.js +53 -54
- package/build/lib/commands/proxy-helper.js.map +1 -1
- package/build/lib/commands/record-audio.d.ts +49 -29
- package/build/lib/commands/record-audio.d.ts.map +1 -1
- package/build/lib/commands/record-audio.js +100 -104
- package/build/lib/commands/record-audio.js.map +1 -1
- package/build/lib/commands/recordscreen.d.ts +54 -18
- package/build/lib/commands/recordscreen.d.ts.map +1 -1
- package/build/lib/commands/recordscreen.js +127 -129
- package/build/lib/commands/recordscreen.js.map +1 -1
- package/build/lib/commands/screenshots.d.ts +14 -17
- package/build/lib/commands/screenshots.d.ts.map +1 -1
- package/build/lib/commands/screenshots.js +108 -107
- package/build/lib/commands/screenshots.js.map +1 -1
- package/build/lib/commands/simctl.d.ts +11 -14
- package/build/lib/commands/simctl.d.ts.map +1 -1
- package/build/lib/commands/simctl.js +23 -26
- package/build/lib/commands/simctl.js.map +1 -1
- package/build/lib/commands/source.d.ts +14 -17
- package/build/lib/commands/source.d.ts.map +1 -1
- package/build/lib/commands/source.js +40 -43
- package/build/lib/commands/source.js.map +1 -1
- package/build/lib/commands/timeouts.d.ts +44 -33
- package/build/lib/commands/timeouts.d.ts.map +1 -1
- package/build/lib/commands/timeouts.js +65 -63
- package/build/lib/commands/timeouts.js.map +1 -1
- package/build/lib/commands/web.d.ts +275 -197
- package/build/lib/commands/web.d.ts.map +1 -1
- package/build/lib/commands/web.js +866 -785
- package/build/lib/commands/web.js.map +1 -1
- package/build/lib/commands/xctest-record-screen.d.ts +63 -66
- package/build/lib/commands/xctest-record-screen.d.ts.map +1 -1
- package/build/lib/commands/xctest-record-screen.js +103 -102
- package/build/lib/commands/xctest-record-screen.js.map +1 -1
- package/build/lib/commands/xctest.d.ts +55 -51
- package/build/lib/commands/xctest.d.ts.map +1 -1
- package/build/lib/commands/xctest.js +116 -117
- package/build/lib/commands/xctest.js.map +1 -1
- package/build/lib/driver.d.ts +277 -1597
- package/build/lib/driver.d.ts.map +1 -1
- package/build/lib/driver.js +318 -235
- package/build/lib/driver.js.map +1 -1
- package/build/lib/execute-method-map.d.ts.map +1 -1
- package/build/lib/execute-method-map.js +9 -0
- package/build/lib/execute-method-map.js.map +1 -1
- package/lib/commands/active-app-info.js +12 -0
- package/lib/commands/alert.js +68 -65
- package/lib/commands/app-management.js +308 -301
- package/lib/commands/app-strings.js +24 -26
- package/lib/commands/appearance.js +54 -56
- package/lib/commands/audit.js +18 -20
- package/lib/commands/battery.js +35 -37
- package/lib/commands/biometric.js +44 -46
- package/lib/commands/certificate.js +226 -215
- package/lib/commands/clipboard.js +30 -32
- package/lib/commands/condition.js +98 -100
- package/lib/commands/content-size.js +36 -38
- package/lib/commands/context.js +495 -490
- package/lib/commands/deviceInfo.js +19 -20
- package/lib/commands/element.js +367 -357
- package/lib/commands/execute.js +72 -72
- package/lib/commands/file-movement.js +132 -134
- package/lib/commands/find.js +160 -159
- package/lib/commands/general.js +238 -231
- package/lib/commands/geolocation.js +6 -14
- package/lib/commands/gesture.js +525 -515
- package/lib/commands/increase-contrast.js +30 -32
- package/lib/commands/iohid.js +32 -34
- package/lib/commands/keyboard.js +49 -51
- package/lib/commands/keychains.js +12 -14
- package/lib/commands/localization.js +24 -26
- package/lib/commands/location.js +102 -104
- package/lib/commands/lock.js +38 -38
- package/lib/commands/log.js +197 -198
- package/lib/commands/memory.js +40 -42
- package/lib/commands/navigation.js +96 -100
- package/lib/commands/notifications.js +57 -59
- package/lib/commands/pasteboard.js +37 -39
- package/lib/commands/pcap.js +84 -86
- package/lib/commands/performance.js +132 -133
- package/lib/commands/permissions.js +67 -69
- package/lib/commands/proxy-helper.js +60 -61
- package/lib/commands/record-audio.js +115 -120
- package/lib/commands/recordscreen.js +145 -149
- package/lib/commands/screenshots.js +116 -116
- package/lib/commands/simctl.js +25 -29
- package/lib/commands/source.js +42 -46
- package/lib/commands/timeouts.js +59 -63
- package/lib/commands/web.js +932 -859
- package/lib/commands/xctest-record-screen.js +103 -105
- package/lib/commands/xctest.js +134 -139
- package/lib/driver.js +286 -235
- package/lib/execute-method-map.ts +9 -0
- package/npm-shrinkwrap.json +8 -8
- package/package.json +1 -1
- package/build/lib/commands/activeAppInfo.d.ts +0 -12
- package/build/lib/commands/activeAppInfo.d.ts.map +0 -1
- package/build/lib/commands/activeAppInfo.js +0 -15
- package/build/lib/commands/activeAppInfo.js.map +0 -1
- package/build/lib/commands/index.d.ts +0 -96
- package/build/lib/commands/index.d.ts.map +0 -1
- package/build/lib/commands/index.js +0 -100
- package/build/lib/commands/index.js.map +0 -1
- package/build/lib/cookies.d.ts +0 -15
- package/build/lib/cookies.d.ts.map +0 -1
- package/build/lib/cookies.js +0 -84
- package/build/lib/cookies.js.map +0 -1
- package/lib/commands/activeAppInfo.js +0 -14
- package/lib/commands/index.js +0 -95
- package/lib/cookies.js +0 -92
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"iohid.d.ts","sourceRoot":"","sources":["../../../lib/commands/iohid.js"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"iohid.d.ts","sourceRoot":"","sources":["../../../lib/commands/iohid.js"],"names":[],"mappings":"AAGA;;;;;;;;;;;;;;;GAeG;AACH,wFALW,YAAY;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;oBAEZ,MAAM,GAAC,MAAM,oBAiBvB;6BAhCyC,aAAa"}
|
|
@@ -1,7 +1,37 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.mobilePerformIoHidEvent = mobilePerformIoHidEvent;
|
|
3
4
|
const driver_1 = require("appium/driver");
|
|
4
5
|
const hid_event_1 = require("./hid-event");
|
|
6
|
+
/**
|
|
7
|
+
* Emulates triggering of the given low-level IO HID device event.
|
|
8
|
+
*
|
|
9
|
+
* Popular constants:
|
|
10
|
+
* - `kHIDPage_Consumer` = `0x0C`
|
|
11
|
+
* - `kHIDUsage_Csmr_VolumeIncrement` = `0xE9` (Volume Up)
|
|
12
|
+
* - `kHIDUsage_Csmr_VolumeDecrement` = `0xEA` (Volume Down)
|
|
13
|
+
* - `kHIDUsage_Csmr_Menu` = `0x40` (Home)
|
|
14
|
+
* - `kHIDUsage_Csmr_Power` = `0x30` (Power)
|
|
15
|
+
* - `kHIDUsage_Csmr_Snapshot` = `0x65` (Power + Home)
|
|
16
|
+
*
|
|
17
|
+
* @param {HIDPageEvent} page - The event page identifier
|
|
18
|
+
* @param {HIDUsageEvent} usage - The event usage identifier (usages are defined per-page)
|
|
19
|
+
* @param {number|string} durationSeconds - The event duration in float seconds (XCTest uses `0.005` for a single press event)
|
|
20
|
+
* @this {import('../driver').XCUITestDriver}
|
|
21
|
+
*/
|
|
22
|
+
async function mobilePerformIoHidEvent(page, usage, durationSeconds) {
|
|
23
|
+
if (!isHIDPageEvent(page)) {
|
|
24
|
+
throw new driver_1.errors.InvalidArgumentError(`'page' argument must be a valid HIDPageEvent identifier`);
|
|
25
|
+
}
|
|
26
|
+
if (!isHIDUsageEvent(usage)) {
|
|
27
|
+
throw new driver_1.errors.InvalidArgumentError(`'usage' must be a valid HIDUsageEvent identifier`);
|
|
28
|
+
}
|
|
29
|
+
const duration = parseFloat(String(durationSeconds));
|
|
30
|
+
if (Number.isNaN(duration)) {
|
|
31
|
+
throw new driver_1.errors.InvalidArgumentError(`'durationSeconds' argument must be a valid number`);
|
|
32
|
+
}
|
|
33
|
+
return await this.proxyCommand('/wda/performIoHidEvent', 'POST', { page, usage, duration });
|
|
34
|
+
}
|
|
5
35
|
/**
|
|
6
36
|
* Type guard for {@linkcode HIDUsageEvent}
|
|
7
37
|
* @param {any} value
|
|
@@ -30,35 +60,4 @@ function isHIDPageEvent(value) {
|
|
|
30
60
|
}
|
|
31
61
|
return value in hid_event_1.HIDPageEvent;
|
|
32
62
|
}
|
|
33
|
-
exports.default = {
|
|
34
|
-
/**
|
|
35
|
-
* Emulates triggering of the given low-level IO HID device event.
|
|
36
|
-
*
|
|
37
|
-
* Popular constants:
|
|
38
|
-
* - `kHIDPage_Consumer` = `0x0C`
|
|
39
|
-
* - `kHIDUsage_Csmr_VolumeIncrement` = `0xE9` (Volume Up)
|
|
40
|
-
* - `kHIDUsage_Csmr_VolumeDecrement` = `0xEA` (Volume Down)
|
|
41
|
-
* - `kHIDUsage_Csmr_Menu` = `0x40` (Home)
|
|
42
|
-
* - `kHIDUsage_Csmr_Power` = `0x30` (Power)
|
|
43
|
-
* - `kHIDUsage_Csmr_Snapshot` = `0x65` (Power + Home)
|
|
44
|
-
*
|
|
45
|
-
* @param {HIDPageEvent} page - The event page identifier
|
|
46
|
-
* @param {HIDUsageEvent} usage - The event usage identifier (usages are defined per-page)
|
|
47
|
-
* @param {number|string} durationSeconds - The event duration in float seconds (XCTest uses `0.005` for a single press event)
|
|
48
|
-
* @this {import('../driver').XCUITestDriver}
|
|
49
|
-
*/
|
|
50
|
-
async mobilePerformIoHidEvent(page, usage, durationSeconds) {
|
|
51
|
-
if (!isHIDPageEvent(page)) {
|
|
52
|
-
throw new driver_1.errors.InvalidArgumentError(`'page' argument must be a valid HIDPageEvent identifier`);
|
|
53
|
-
}
|
|
54
|
-
if (!isHIDUsageEvent(usage)) {
|
|
55
|
-
throw new driver_1.errors.InvalidArgumentError(`'usage' must be a valid HIDUsageEvent identifier`);
|
|
56
|
-
}
|
|
57
|
-
const duration = parseFloat(String(durationSeconds));
|
|
58
|
-
if (Number.isNaN(duration)) {
|
|
59
|
-
throw new driver_1.errors.InvalidArgumentError(`'durationSeconds' argument must be a valid number`);
|
|
60
|
-
}
|
|
61
|
-
return await this.proxyCommand('/wda/performIoHidEvent', 'POST', { page, usage, duration });
|
|
62
|
-
},
|
|
63
|
-
};
|
|
64
63
|
//# sourceMappingURL=iohid.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"iohid.js","sourceRoot":"","sources":["../../../lib/commands/iohid.js"],"names":[],"mappings":";;
|
|
1
|
+
{"version":3,"file":"iohid.js","sourceRoot":"","sources":["../../../lib/commands/iohid.js"],"names":[],"mappings":";;AAmBA,0DAcC;AAjCD,0CAAqC;AACrC,2CAAwD;AAExD;;;;;;;;;;;;;;;GAeG;AACI,KAAK,UAAU,uBAAuB,CAAC,IAAI,EAAE,KAAK,EAAE,eAAe;IACxE,IAAI,CAAC,cAAc,CAAC,IAAI,CAAC,EAAE,CAAC;QAC1B,MAAM,IAAI,eAAM,CAAC,oBAAoB,CACnC,yDAAyD,CAC1D,CAAC;IACJ,CAAC;IACD,IAAI,CAAC,eAAe,CAAC,KAAK,CAAC,EAAE,CAAC;QAC5B,MAAM,IAAI,eAAM,CAAC,oBAAoB,CAAC,kDAAkD,CAAC,CAAC;IAC5F,CAAC;IACD,MAAM,QAAQ,GAAG,UAAU,CAAC,MAAM,CAAC,eAAe,CAAC,CAAC,CAAC;IACrD,IAAI,MAAM,CAAC,KAAK,CAAC,QAAQ,CAAC,EAAE,CAAC;QAC3B,MAAM,IAAI,eAAM,CAAC,oBAAoB,CAAC,mDAAmD,CAAC,CAAC;IAC7F,CAAC;IACD,OAAO,MAAM,IAAI,CAAC,YAAY,CAAC,wBAAwB,EAAE,MAAM,EAAE,EAAC,IAAI,EAAE,KAAK,EAAE,QAAQ,EAAC,CAAC,CAAC;AAC5F,CAAC;AAED;;;;GAIG;AACH,SAAS,eAAe,CAAC,KAAK;IAC5B,IAAI,OAAO,KAAK,KAAK,QAAQ,EAAE,CAAC;QAC9B,KAAK,GAAG,QAAQ,CAAC,KAAK,EAAE,EAAE,CAAC,CAAC;IAC9B,CAAC;IACD,IAAI,MAAM,CAAC,KAAK,CAAC,KAAK,CAAC,IAAI,OAAO,KAAK,KAAK,QAAQ,EAAE,CAAC;QACrD,OAAO,KAAK,CAAC;IACf,CAAC;IACD,OAAO,KAAK,IAAI,yBAAa,CAAC;AAChC,CAAC;AAED;;;;IAII;AACJ,SAAS,cAAc,CAAC,KAAK;IAC3B,IAAI,OAAO,KAAK,KAAK,QAAQ,EAAE,CAAC;QAC9B,KAAK,GAAG,QAAQ,CAAC,KAAK,EAAE,EAAE,CAAC,CAAC;IAC9B,CAAC;IACD,IAAI,MAAM,CAAC,KAAK,CAAC,KAAK,CAAC,IAAI,OAAO,KAAK,KAAK,QAAQ,EAAE,CAAC;QACrD,OAAO,KAAK,CAAC;IACf,CAAC;IACD,OAAO,KAAK,IAAI,wBAAY,CAAC;AAC/B,CAAC"}
|
|
@@ -1,35 +1,32 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
function mobileKeys(this: import("../driver").XCUITestDriver, keys: (Key | string)[], elementId?: string | null): Promise<unknown>;
|
|
31
|
-
}
|
|
32
|
-
export default _default;
|
|
1
|
+
/**
|
|
2
|
+
* @this {XCUITestDriver}
|
|
3
|
+
* @deprecated
|
|
4
|
+
*/
|
|
5
|
+
export function hideKeyboard(this: import("../driver").XCUITestDriver, strategy: any, ...possibleKeys: any[]): Promise<boolean>;
|
|
6
|
+
/**
|
|
7
|
+
* @this {XCUITestDriver}
|
|
8
|
+
* @param {string[]} keys
|
|
9
|
+
*/
|
|
10
|
+
export function mobileHideKeyboard(this: import("../driver").XCUITestDriver, keys?: string[]): Promise<void>;
|
|
11
|
+
/**
|
|
12
|
+
* @this {XCUITestDriver}
|
|
13
|
+
*/
|
|
14
|
+
export function isKeyboardShown(this: import("../driver").XCUITestDriver): Promise<boolean>;
|
|
15
|
+
/**
|
|
16
|
+
* Send keys to the given element or to the application under test.
|
|
17
|
+
* This API is not supported on tvOS
|
|
18
|
+
*
|
|
19
|
+
* @since Xcode 15/iOS 17
|
|
20
|
+
* @this {import('../driver').XCUITestDriver}
|
|
21
|
+
* @param {(Key|string)[]} keys Array of keys to type.
|
|
22
|
+
* Each item could either be a string, that represents a key itself (see
|
|
23
|
+
* https://developer.apple.com/documentation/xctest/xcuielement/1500604-typekey?language=objc
|
|
24
|
+
* and https://developer.apple.com/documentation/xctest/xcuikeyboardkey?language=objc)
|
|
25
|
+
* or a dictionary, if the key should also be entered with modifiers.
|
|
26
|
+
* @param {string?} [elementId=null] uuid of the element to send keys to.
|
|
27
|
+
* If the element is not provided then the keys will be sent to the current application.
|
|
28
|
+
*/
|
|
29
|
+
export function mobileKeys(this: import("../driver").XCUITestDriver, keys: (Key | string)[], elementId?: string | null): Promise<unknown>;
|
|
33
30
|
export type XCUITestDriver = import("../driver").XCUITestDriver;
|
|
34
31
|
export type Key = import("./types").KeyboardKey;
|
|
35
32
|
//# sourceMappingURL=keyboard.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"keyboard.d.ts","sourceRoot":"","sources":["../../../lib/commands/keyboard.js"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"keyboard.d.ts","sourceRoot":"","sources":["../../../lib/commands/keyboard.js"],"names":[],"mappings":"AAEA;;;GAGG;AACH,gIAKC;AAED;;;GAGG;AACH,oFAFW,MAAM,EAAE,iBAOlB;AAED;;GAEG;AACH,4FAOC;AAED;;;;;;;;;;;;;GAaG;AACH,2EARW,CAAC,GAAG,GAAC,MAAM,CAAC,EAAE,cAKd,MAAM,OAAC,oBAMjB;6BAGY,OAAO,WAAW,EAAE,cAAc;kBAIlC,OAAO,SAAS,EAAE,WAAW"}
|
|
@@ -3,59 +3,61 @@ var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
|
3
3
|
return (mod && mod.__esModule) ? mod : { "default": mod };
|
|
4
4
|
};
|
|
5
5
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
6
|
+
exports.hideKeyboard = hideKeyboard;
|
|
7
|
+
exports.mobileHideKeyboard = mobileHideKeyboard;
|
|
8
|
+
exports.isKeyboardShown = isKeyboardShown;
|
|
9
|
+
exports.mobileKeys = mobileKeys;
|
|
6
10
|
const lodash_1 = __importDefault(require("lodash"));
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
11
|
+
/**
|
|
12
|
+
* @this {XCUITestDriver}
|
|
13
|
+
* @deprecated
|
|
14
|
+
*/
|
|
15
|
+
async function hideKeyboard(strategy, ...possibleKeys) {
|
|
16
|
+
// last parameter is the session id
|
|
17
|
+
const keyNames = lodash_1.default.compact(possibleKeys.slice(0, -1)).map((x) => `${x}`);
|
|
18
|
+
await this.mobileHideKeyboard(keyNames);
|
|
19
|
+
return true;
|
|
20
|
+
}
|
|
21
|
+
/**
|
|
22
|
+
* @this {XCUITestDriver}
|
|
23
|
+
* @param {string[]} keys
|
|
24
|
+
*/
|
|
25
|
+
async function mobileHideKeyboard(keys = []) {
|
|
26
|
+
if (!keys.includes('done')) {
|
|
27
|
+
keys.push('done');
|
|
28
|
+
}
|
|
29
|
+
await this.proxyCommand('/wda/keyboard/dismiss', 'POST', { keyNames: keys });
|
|
30
|
+
}
|
|
31
|
+
/**
|
|
32
|
+
* @this {XCUITestDriver}
|
|
33
|
+
*/
|
|
34
|
+
async function isKeyboardShown() {
|
|
35
|
+
try {
|
|
36
|
+
await this.findNativeElementOrElements('class name', 'XCUIElementTypeKeyboard', false);
|
|
16
37
|
return true;
|
|
17
|
-
}
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
/**
|
|
41
|
-
* Send keys to the given element or to the application under test.
|
|
42
|
-
* This API is not supported on tvOS
|
|
43
|
-
*
|
|
44
|
-
* @since Xcode 15/iOS 17
|
|
45
|
-
* @this {import('../driver').XCUITestDriver}
|
|
46
|
-
* @param {(Key|string)[]} keys Array of keys to type.
|
|
47
|
-
* Each item could either be a string, that represents a key itself (see
|
|
48
|
-
* https://developer.apple.com/documentation/xctest/xcuielement/1500604-typekey?language=objc
|
|
49
|
-
* and https://developer.apple.com/documentation/xctest/xcuikeyboardkey?language=objc)
|
|
50
|
-
* or a dictionary, if the key should also be entered with modifiers.
|
|
51
|
-
* @param {string?} [elementId=null] uuid of the element to send keys to.
|
|
52
|
-
* If the element is not provided then the keys will be sent to the current application.
|
|
53
|
-
*/
|
|
54
|
-
async mobileKeys(keys, elementId = null) {
|
|
55
|
-
const url = `/wda/element/${elementId || 0}/keyboardInput`;
|
|
56
|
-
return await this.proxyCommand(url, 'POST', { keys });
|
|
57
|
-
},
|
|
58
|
-
};
|
|
38
|
+
}
|
|
39
|
+
catch {
|
|
40
|
+
return false;
|
|
41
|
+
}
|
|
42
|
+
}
|
|
43
|
+
/**
|
|
44
|
+
* Send keys to the given element or to the application under test.
|
|
45
|
+
* This API is not supported on tvOS
|
|
46
|
+
*
|
|
47
|
+
* @since Xcode 15/iOS 17
|
|
48
|
+
* @this {import('../driver').XCUITestDriver}
|
|
49
|
+
* @param {(Key|string)[]} keys Array of keys to type.
|
|
50
|
+
* Each item could either be a string, that represents a key itself (see
|
|
51
|
+
* https://developer.apple.com/documentation/xctest/xcuielement/1500604-typekey?language=objc
|
|
52
|
+
* and https://developer.apple.com/documentation/xctest/xcuikeyboardkey?language=objc)
|
|
53
|
+
* or a dictionary, if the key should also be entered with modifiers.
|
|
54
|
+
* @param {string?} [elementId=null] uuid of the element to send keys to.
|
|
55
|
+
* If the element is not provided then the keys will be sent to the current application.
|
|
56
|
+
*/
|
|
57
|
+
async function mobileKeys(keys, elementId = null) {
|
|
58
|
+
const url = `/wda/element/${elementId || 0}/keyboardInput`;
|
|
59
|
+
return await this.proxyCommand(url, 'POST', { keys });
|
|
60
|
+
}
|
|
59
61
|
/**
|
|
60
62
|
* @typedef {import('../driver').XCUITestDriver} XCUITestDriver
|
|
61
63
|
*/
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"keyboard.js","sourceRoot":"","sources":["../../../lib/commands/keyboard.js"],"names":[],"mappings":";;;;;
|
|
1
|
+
{"version":3,"file":"keyboard.js","sourceRoot":"","sources":["../../../lib/commands/keyboard.js"],"names":[],"mappings":";;;;;AAMA,oCAKC;AAMD,gDAKC;AAKD,0CAOC;AAgBD,gCAGC;AArDD,oDAAuB;AAEvB;;;GAGG;AACI,KAAK,UAAU,YAAY,CAAC,QAAQ,EAAE,GAAG,YAAY;IAC1D,mCAAmC;IACnC,MAAM,QAAQ,GAAG,gBAAC,CAAC,OAAO,CAAC,YAAY,CAAC,KAAK,CAAC,CAAC,EAAE,CAAC,CAAC,CAAC,CAAC,CAAC,GAAG,CAAC,CAAC,CAAC,EAAE,EAAE,CAAC,GAAG,CAAC,EAAE,CAAC,CAAC;IACzE,MAAM,IAAI,CAAC,kBAAkB,CAAC,QAAQ,CAAC,CAAC;IACxC,OAAO,IAAI,CAAC;AACd,CAAC;AAED;;;GAGG;AACI,KAAK,UAAU,kBAAkB,CAAC,IAAI,GAAG,EAAE;IAChD,IAAI,CAAC,IAAI,CAAC,QAAQ,CAAC,MAAM,CAAC,EAAE,CAAC;QAC3B,IAAI,CAAC,IAAI,CAAC,MAAM,CAAC,CAAC;IACpB,CAAC;IACD,MAAM,IAAI,CAAC,YAAY,CAAC,uBAAuB,EAAE,MAAM,EAAE,EAAC,QAAQ,EAAE,IAAI,EAAC,CAAC,CAAC;AAC7E,CAAC;AAED;;GAEG;AACI,KAAK,UAAU,eAAe;IACnC,IAAI,CAAC;QACH,MAAM,IAAI,CAAC,2BAA2B,CAAC,YAAY,EAAE,yBAAyB,EAAE,KAAK,CAAC,CAAC;QACvF,OAAO,IAAI,CAAC;IACd,CAAC;IAAC,MAAM,CAAC;QACP,OAAO,KAAK,CAAC;IACf,CAAC;AACH,CAAC;AAED;;;;;;;;;;;;;GAaG;AACI,KAAK,UAAU,UAAU,CAAC,IAAI,EAAE,SAAS,GAAG,IAAI;IACrD,MAAM,GAAG,GAAG,gBAAgB,SAAS,IAAI,CAAC,gBAAgB,CAAC;IAC3D,OAAO,MAAM,IAAI,CAAC,YAAY,CAAC,GAAG,EAAE,MAAM,EAAE,EAAE,IAAI,EAAE,CAAC,CAAC;AACxD,CAAC;AAED;;GAEG;AAEH;;GAEG"}
|
|
@@ -1,13 +1,10 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
function mobileClearKeychains(this: import("../driver").XCUITestDriver): Promise<void>;
|
|
11
|
-
}
|
|
12
|
-
export default _default;
|
|
1
|
+
/**
|
|
2
|
+
* Clears keychains on a simulated device.
|
|
3
|
+
*
|
|
4
|
+
* @throws {Error} If current device is not a Simulator or there was an error
|
|
5
|
+
* while clearing keychains.
|
|
6
|
+
* @this {import('../driver').XCUITestDriver}
|
|
7
|
+
* @group Simulator Only
|
|
8
|
+
*/
|
|
9
|
+
export function mobileClearKeychains(this: import("../driver").XCUITestDriver): Promise<void>;
|
|
13
10
|
//# sourceMappingURL=keychains.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"keychains.d.ts","sourceRoot":"","sources":["../../../lib/commands/keychains.js"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"keychains.d.ts","sourceRoot":"","sources":["../../../lib/commands/keychains.js"],"names":[],"mappings":"AAKA;;;;;;;GAOG;AACH,8FAIC"}
|
|
@@ -3,21 +3,20 @@ var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
|
3
3
|
return (mod && mod.__esModule) ? mod : { "default": mod };
|
|
4
4
|
};
|
|
5
5
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
6
|
+
exports.mobileClearKeychains = mobileClearKeychains;
|
|
6
7
|
const lodash_1 = __importDefault(require("lodash"));
|
|
7
8
|
const utils_1 = require("../utils");
|
|
8
9
|
const assertSimulator = lodash_1.default.partial(utils_1.assertSimulator, 'Keychain modification');
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
},
|
|
22
|
-
};
|
|
10
|
+
/**
|
|
11
|
+
* Clears keychains on a simulated device.
|
|
12
|
+
*
|
|
13
|
+
* @throws {Error} If current device is not a Simulator or there was an error
|
|
14
|
+
* while clearing keychains.
|
|
15
|
+
* @this {import('../driver').XCUITestDriver}
|
|
16
|
+
* @group Simulator Only
|
|
17
|
+
*/
|
|
18
|
+
async function mobileClearKeychains() {
|
|
19
|
+
assertSimulator(this);
|
|
20
|
+
await /** @type {import('../driver').Simulator} */ (this.device).clearKeychains();
|
|
21
|
+
}
|
|
23
22
|
//# sourceMappingURL=keychains.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"keychains.js","sourceRoot":"","sources":["../../../lib/commands/keychains.js"],"names":[],"mappings":";;;;;
|
|
1
|
+
{"version":3,"file":"keychains.js","sourceRoot":"","sources":["../../../lib/commands/keychains.js"],"names":[],"mappings":";;;;;AAaA,oDAIC;AAjBD,oDAAuB;AACvB,oCAA6D;AAE7D,MAAM,eAAe,GAAG,gBAAC,CAAC,OAAO,CAAC,uBAAgB,EAAE,uBAAuB,CAAC,CAAC;AAE7E;;;;;;;GAOG;AACI,KAAK,UAAU,oBAAoB;IACxC,eAAe,CAAC,IAAI,CAAC,CAAC;IAEtB,MAAM,4CAA4C,CAAC,CAAC,IAAI,CAAC,MAAM,CAAC,CAAC,cAAc,EAAE,CAAC;AACpF,CAAC"}
|
|
@@ -1,20 +1,17 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
function mobileConfigureLocalization(this: import("../driver").XCUITestDriver, keyboard?: import("./types").KeyboardOptions, language?: import("./types").LanguageOptions, locale?: import("./types").LocaleOptions): Promise<boolean>;
|
|
18
|
-
}
|
|
19
|
-
export default _default;
|
|
1
|
+
/**
|
|
2
|
+
* Change localization settings on the currently booted simulator
|
|
3
|
+
*
|
|
4
|
+
* The changed settings are only applied for _newly started_ applications and activities.
|
|
5
|
+
* Currently running applications will be unchanged. This means, for example, that the keyboard should be hidden and shown again in order to observe the changed layout, and corresponding apps must be restarted in order to observe their interface using the newly set locale/language.
|
|
6
|
+
*
|
|
7
|
+
* The driver performs no strict checking of the arguments (such as locale names). Be aware that an incorrect or invalid string may cause unexpected behavior.
|
|
8
|
+
* @param {import('./types').KeyboardOptions} [keyboard] - Keyboard options
|
|
9
|
+
* @param {import('./types').LanguageOptions} [language] - Language options
|
|
10
|
+
* @param {import('./types').LocaleOptions} [locale] - Locale options
|
|
11
|
+
* @throws {Error} If there was a failure while setting the preferences
|
|
12
|
+
* @returns {Promise<boolean>} `true` if any of settings has been successfully changed
|
|
13
|
+
* @group Simulator Only
|
|
14
|
+
* @this {import('../driver').XCUITestDriver}
|
|
15
|
+
*/
|
|
16
|
+
export function mobileConfigureLocalization(this: import("../driver").XCUITestDriver, keyboard?: import("./types").KeyboardOptions, language?: import("./types").LanguageOptions, locale?: import("./types").LocaleOptions): Promise<boolean>;
|
|
20
17
|
//# sourceMappingURL=localization.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"localization.d.ts","sourceRoot":"","sources":["../../../lib/commands/localization.js"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"localization.d.ts","sourceRoot":"","sources":["../../../lib/commands/localization.js"],"names":[],"mappings":"AAKA;;;;;;;;;;;;;;GAcG;AACH,iGARW,OAAO,SAAS,EAAE,eAAe,aACjC,OAAO,SAAS,EAAE,eAAe,WACjC,OAAO,SAAS,EAAE,aAAa,GAE7B,OAAO,CAAC,OAAO,CAAC,CAa5B"}
|
|
@@ -3,33 +3,32 @@ var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
|
3
3
|
return (mod && mod.__esModule) ? mod : { "default": mod };
|
|
4
4
|
};
|
|
5
5
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
6
|
+
exports.mobileConfigureLocalization = mobileConfigureLocalization;
|
|
6
7
|
const lodash_1 = __importDefault(require("lodash"));
|
|
7
8
|
const utils_1 = require("../utils");
|
|
8
9
|
const assertSimulator = lodash_1.default.partial(utils_1.assertSimulator, 'Localization configuration');
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
},
|
|
34
|
-
};
|
|
10
|
+
/**
|
|
11
|
+
* Change localization settings on the currently booted simulator
|
|
12
|
+
*
|
|
13
|
+
* The changed settings are only applied for _newly started_ applications and activities.
|
|
14
|
+
* Currently running applications will be unchanged. This means, for example, that the keyboard should be hidden and shown again in order to observe the changed layout, and corresponding apps must be restarted in order to observe their interface using the newly set locale/language.
|
|
15
|
+
*
|
|
16
|
+
* The driver performs no strict checking of the arguments (such as locale names). Be aware that an incorrect or invalid string may cause unexpected behavior.
|
|
17
|
+
* @param {import('./types').KeyboardOptions} [keyboard] - Keyboard options
|
|
18
|
+
* @param {import('./types').LanguageOptions} [language] - Language options
|
|
19
|
+
* @param {import('./types').LocaleOptions} [locale] - Locale options
|
|
20
|
+
* @throws {Error} If there was a failure while setting the preferences
|
|
21
|
+
* @returns {Promise<boolean>} `true` if any of settings has been successfully changed
|
|
22
|
+
* @group Simulator Only
|
|
23
|
+
* @this {import('../driver').XCUITestDriver}
|
|
24
|
+
*/
|
|
25
|
+
async function mobileConfigureLocalization(keyboard, language, locale) {
|
|
26
|
+
assertSimulator(this);
|
|
27
|
+
const localizationOptions = { locale, keyboard };
|
|
28
|
+
if (language) {
|
|
29
|
+
// Assign skipSyncUiDialogTranslation: true option in order to avoid shutting down the WDA session
|
|
30
|
+
localizationOptions.language = Object.assign(language, { skipSyncUiDialogTranslation: true });
|
|
31
|
+
}
|
|
32
|
+
return await /** @type {import('../driver').Simulator} */ (this.device).configureLocalization(localizationOptions);
|
|
33
|
+
}
|
|
35
34
|
//# sourceMappingURL=localization.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"localization.js","sourceRoot":"","sources":["../../../lib/commands/localization.js"],"names":[],"mappings":";;;;;
|
|
1
|
+
{"version":3,"file":"localization.js","sourceRoot":"","sources":["../../../lib/commands/localization.js"],"names":[],"mappings":";;;;;AAoBA,kEASC;AA7BD,oDAAuB;AACvB,oCAA6D;AAE7D,MAAM,eAAe,GAAG,gBAAC,CAAC,OAAO,CAAC,uBAAgB,EAAE,4BAA4B,CAAC,CAAC;AAElF;;;;;;;;;;;;;;GAcG;AACI,KAAK,UAAU,2BAA2B,CAAC,QAAQ,EAAE,QAAQ,EAAE,MAAM;IAC1E,eAAe,CAAC,IAAI,CAAC,CAAC;IAEtB,MAAM,mBAAmB,GAAG,EAAC,MAAM,EAAE,QAAQ,EAAC,CAAC;IAC/C,IAAI,QAAQ,EAAE,CAAC;QACb,kGAAkG;QAClG,mBAAmB,CAAC,QAAQ,GAAG,MAAM,CAAC,MAAM,CAAC,QAAQ,EAAE,EAAC,2BAA2B,EAAE,IAAI,EAAC,CAAC,CAAC;IAC9F,CAAC;IACD,OAAO,MAAM,4CAA4C,CAAC,CAAC,IAAI,CAAC,MAAM,CAAC,CAAC,qBAAqB,CAAC,mBAAmB,CAAC,CAAC;AACrH,CAAC"}
|
|
@@ -1,42 +1,39 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
function mobileResetLocationService(this: import("../driver").XCUITestDriver): Promise<void>;
|
|
38
|
-
}
|
|
39
|
-
export default _default;
|
|
1
|
+
/**
|
|
2
|
+
* Returns location of the device under test.
|
|
3
|
+
* The device under test must allow the location services for WDA
|
|
4
|
+
* as 'Always' to get the location data correctly.
|
|
5
|
+
*
|
|
6
|
+
* The 'latitude', 'longitude' and 'altitude' could be zero even
|
|
7
|
+
* if the Location Services are set to 'Always', because the device
|
|
8
|
+
* needs some time to update the location data.
|
|
9
|
+
*
|
|
10
|
+
* For iOS 17, the return value could be the result of
|
|
11
|
+
* "mobile:getSimulatedLocation" if the simulated location has been previously set
|
|
12
|
+
* "mobile:setSimulatedLocation" already.
|
|
13
|
+
*
|
|
14
|
+
* @returns {Promise<import('./types').LocationWithAltitude>}
|
|
15
|
+
* @throws {Error} If the device under test returns an error message.
|
|
16
|
+
* i.e.: tvOS returns unsupported error
|
|
17
|
+
* @this {XCUITestDriver}
|
|
18
|
+
*/
|
|
19
|
+
export function getGeoLocation(this: import("../driver").XCUITestDriver): Promise<import("./types").LocationWithAltitude>;
|
|
20
|
+
/**
|
|
21
|
+
* Set location of the device under test.
|
|
22
|
+
*
|
|
23
|
+
* iOS 17+ real device environment will be via "mobile:setSimulatedLocation" as
|
|
24
|
+
* setting simulated location for XCTest session.
|
|
25
|
+
*
|
|
26
|
+
* @param {Partial<Location>} location
|
|
27
|
+
* @this {XCUITestDriver}
|
|
28
|
+
*/
|
|
29
|
+
export function setGeoLocation(this: import("../driver").XCUITestDriver, location: Partial<Location>): Promise<import("@appium/types").Location>;
|
|
30
|
+
/**
|
|
31
|
+
* Reset the location service on real device.
|
|
32
|
+
* Raises not implemented error for simulator.
|
|
33
|
+
* @throws {Error} If the device is simulator, or 'resetLocation' raises an error.
|
|
34
|
+
* @this {XCUITestDriver}
|
|
35
|
+
*/
|
|
36
|
+
export function mobileResetLocationService(this: import("../driver").XCUITestDriver): Promise<void>;
|
|
40
37
|
export type XCUITestDriver = import("../driver").XCUITestDriver;
|
|
41
38
|
export type WDALocationInfo = import("./types").WDALocationInfo;
|
|
42
39
|
export type Location = import("@appium/types").Location;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"location.d.ts","sourceRoot":"","sources":["../../../lib/commands/location.js"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"location.d.ts","sourceRoot":"","sources":["../../../lib/commands/location.js"],"names":[],"mappings":"AAMA;;;;;;;;;;;;;;;;;GAiBG;AACH,0EALa,OAAO,CAAC,OAAO,SAAS,EAAE,oBAAoB,CAAC,CAyC3D;AAED;;;;;;;;GAQG;AACH,mFAHW,OAAO,CAAC,QAAQ,CAAC,6CAgC3B;AAED;;;;;GAKG;AACH,oGAgBC;6BAGY,OAAO,WAAW,EAAE,cAAc;8BAClC,OAAO,SAAS,EAAE,eAAe;uBACjC,OAAO,eAAe,EAAE,QAAQ"}
|