appium-android-driver 7.8.3 → 8.0.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 +25 -0
- package/build/lib/commands/app-management.d.ts +129 -5
- package/build/lib/commands/app-management.d.ts.map +1 -1
- package/build/lib/commands/app-management.js +433 -128
- package/build/lib/commands/app-management.js.map +1 -1
- package/build/lib/commands/appearance.d.ts +17 -4
- package/build/lib/commands/appearance.d.ts.map +1 -1
- package/build/lib/commands/appearance.js +32 -33
- package/build/lib/commands/appearance.js.map +1 -1
- package/build/lib/commands/context/cache.d.ts +19 -0
- package/build/lib/commands/context/cache.d.ts.map +1 -0
- package/build/lib/commands/context/cache.js +32 -0
- package/build/lib/commands/context/cache.js.map +1 -0
- package/build/lib/commands/context/exports.d.ts +141 -0
- package/build/lib/commands/context/exports.d.ts.map +1 -0
- package/build/lib/commands/context/exports.js +351 -0
- package/build/lib/commands/context/exports.js.map +1 -0
- package/build/lib/commands/context/helpers.d.ts +98 -0
- package/build/lib/commands/context/helpers.d.ts.map +1 -0
- package/build/lib/commands/context/helpers.js +715 -0
- package/build/lib/commands/context/helpers.js.map +1 -0
- package/build/lib/commands/device/common.d.ts +23 -0
- package/build/lib/commands/device/common.d.ts.map +1 -0
- package/build/lib/commands/device/common.js +230 -0
- package/build/lib/commands/device/common.js.map +1 -0
- package/build/lib/commands/device/emulator-actions.d.ts +114 -0
- package/build/lib/commands/device/emulator-actions.d.ts.map +1 -0
- package/build/lib/commands/device/emulator-actions.js +197 -0
- package/build/lib/commands/device/emulator-actions.js.map +1 -0
- package/build/lib/commands/device/emulator-console.d.ts +7 -0
- package/build/lib/commands/device/emulator-console.d.ts.map +1 -0
- package/build/lib/commands/device/emulator-console.js +24 -0
- package/build/lib/commands/device/emulator-console.js.map +1 -0
- package/build/lib/commands/device/utils.d.ts +50 -0
- package/build/lib/commands/device/utils.d.ts.map +1 -0
- package/build/lib/commands/device/utils.js +238 -0
- package/build/lib/commands/device/utils.js.map +1 -0
- package/build/lib/commands/deviceidle.d.ts +8 -5
- package/build/lib/commands/deviceidle.d.ts.map +1 -1
- package/build/lib/commands/deviceidle.js +31 -37
- package/build/lib/commands/deviceidle.js.map +1 -1
- package/build/lib/commands/element.d.ts +99 -5
- package/build/lib/commands/element.d.ts.map +1 -1
- package/build/lib/commands/element.js +152 -116
- package/build/lib/commands/element.js.map +1 -1
- package/build/lib/commands/execute.d.ts +12 -4
- package/build/lib/commands/execute.d.ts.map +1 -1
- package/build/lib/commands/execute.js +83 -78
- package/build/lib/commands/execute.js.map +1 -1
- package/build/lib/commands/file-actions.d.ts +42 -5
- package/build/lib/commands/file-actions.d.ts.map +1 -1
- package/build/lib/commands/file-actions.js +230 -194
- package/build/lib/commands/file-actions.js.map +1 -1
- package/build/lib/commands/find.d.ts +5 -4
- package/build/lib/commands/find.d.ts.map +1 -1
- package/build/lib/commands/find.js +7 -10
- package/build/lib/commands/find.js.map +1 -1
- package/build/lib/commands/geolocation.d.ts +45 -0
- package/build/lib/commands/geolocation.d.ts.map +1 -0
- package/build/lib/commands/geolocation.js +182 -0
- package/build/lib/commands/geolocation.js.map +1 -0
- package/build/lib/commands/ime.d.ts +25 -5
- package/build/lib/commands/ime.d.ts.map +1 -1
- package/build/lib/commands/ime.js +59 -42
- package/build/lib/commands/ime.js.map +1 -1
- package/build/lib/commands/intent.d.ts +56 -5
- package/build/lib/commands/intent.d.ts.map +1 -1
- package/build/lib/commands/intent.js +135 -83
- package/build/lib/commands/intent.js.map +1 -1
- package/build/lib/commands/keyboard.d.ts +58 -4
- package/build/lib/commands/keyboard.d.ts.map +1 -1
- package/build/lib/commands/keyboard.js +119 -17
- package/build/lib/commands/keyboard.js.map +1 -1
- package/build/lib/commands/lock/exports.d.ts +301 -0
- package/build/lib/commands/lock/exports.d.ts.map +1 -0
- package/build/lib/commands/lock/exports.js +121 -0
- package/build/lib/commands/lock/exports.js.map +1 -0
- package/build/lib/commands/lock/helpers.d.ts +349 -0
- package/build/lib/commands/lock/helpers.d.ts.map +1 -0
- package/build/lib/commands/lock/helpers.js +375 -0
- package/build/lib/commands/lock/helpers.js.map +1 -0
- package/build/lib/commands/log.d.ts +59 -5
- package/build/lib/commands/log.d.ts.map +1 -1
- package/build/lib/commands/log.js +150 -140
- package/build/lib/commands/log.js.map +1 -1
- package/build/lib/commands/media-projection.d.ts +16 -5
- package/build/lib/commands/media-projection.d.ts.map +1 -1
- package/build/lib/commands/media-projection.js +69 -58
- package/build/lib/commands/media-projection.js.map +1 -1
- package/build/lib/commands/memory.d.ts +9 -5
- package/build/lib/commands/memory.d.ts.map +1 -1
- package/build/lib/commands/memory.js +19 -24
- package/build/lib/commands/memory.js.map +1 -1
- package/build/lib/commands/misc.d.ts +42 -0
- package/build/lib/commands/misc.d.ts.map +1 -0
- package/build/lib/commands/misc.js +100 -0
- package/build/lib/commands/misc.js.map +1 -0
- package/build/lib/commands/network.d.ts +61 -5
- package/build/lib/commands/network.d.ts.map +1 -1
- package/build/lib/commands/network.js +196 -189
- package/build/lib/commands/network.js.map +1 -1
- package/build/lib/commands/performance.d.ts +67 -27
- package/build/lib/commands/performance.d.ts.map +1 -1
- package/build/lib/commands/performance.js +105 -80
- package/build/lib/commands/performance.js.map +1 -1
- package/build/lib/commands/permissions.d.ts +12 -6
- package/build/lib/commands/permissions.d.ts.map +1 -1
- package/build/lib/commands/permissions.js +65 -62
- package/build/lib/commands/permissions.js.map +1 -1
- package/build/lib/commands/recordscreen.d.ts +44 -5
- package/build/lib/commands/recordscreen.d.ts.map +1 -1
- package/build/lib/commands/recordscreen.js +131 -126
- package/build/lib/commands/recordscreen.js.map +1 -1
- package/build/lib/commands/resources.d.ts +16 -0
- package/build/lib/commands/resources.d.ts.map +1 -0
- package/build/lib/commands/resources.js +91 -0
- package/build/lib/commands/resources.js.map +1 -0
- package/build/lib/commands/shell.d.ts +8 -5
- package/build/lib/commands/shell.d.ts.map +1 -1
- package/build/lib/commands/shell.js +29 -33
- package/build/lib/commands/shell.js.map +1 -1
- package/build/lib/commands/streamscreen.d.ts +34 -6
- package/build/lib/commands/streamscreen.d.ts.map +1 -1
- package/build/lib/commands/streamscreen.js +166 -162
- package/build/lib/commands/streamscreen.js.map +1 -1
- package/build/lib/commands/system-bars.d.ts +18 -13
- package/build/lib/commands/system-bars.d.ts.map +1 -1
- package/build/lib/commands/system-bars.js +68 -64
- package/build/lib/commands/system-bars.js.map +1 -1
- package/build/lib/commands/time.d.ts +14 -0
- package/build/lib/commands/time.d.ts.map +1 -0
- package/build/lib/commands/time.js +39 -0
- package/build/lib/commands/time.js.map +1 -0
- package/build/lib/commands/touch.d.ts +99 -6
- package/build/lib/commands/touch.d.ts.map +1 -1
- package/build/lib/commands/touch.js +399 -280
- package/build/lib/commands/touch.js.map +1 -1
- package/build/lib/commands/types.d.ts +110 -2
- package/build/lib/commands/types.d.ts.map +1 -1
- package/build/lib/doctor/checks.d.ts.map +1 -1
- package/build/lib/doctor/checks.js +4 -4
- package/build/lib/doctor/checks.js.map +1 -1
- package/build/lib/driver.d.ts +224 -27
- package/build/lib/driver.d.ts.map +1 -1
- package/build/lib/driver.js +232 -7
- package/build/lib/driver.js.map +1 -1
- package/build/lib/index.d.ts +1 -4
- package/build/lib/index.d.ts.map +1 -1
- package/build/lib/index.js +1 -13
- package/build/lib/index.js.map +1 -1
- package/build/lib/logger.js.map +1 -1
- package/build/lib/method-map.d.ts +0 -23
- package/build/lib/method-map.d.ts.map +1 -1
- package/build/lib/method-map.js +0 -11
- package/build/lib/method-map.js.map +1 -1
- package/build/lib/utils.d.ts +12 -0
- package/build/lib/utils.d.ts.map +1 -1
- package/build/lib/utils.js +38 -2
- package/build/lib/utils.js.map +1 -1
- package/lib/commands/app-management.js +470 -145
- package/lib/commands/appearance.js +29 -36
- package/lib/commands/context/cache.js +29 -0
- package/lib/commands/context/exports.js +379 -0
- package/lib/commands/context/helpers.js +802 -0
- package/lib/commands/device/common.js +264 -0
- package/lib/commands/device/emulator-actions.js +194 -0
- package/lib/commands/device/emulator-console.js +24 -0
- package/lib/commands/device/utils.js +285 -0
- package/lib/commands/deviceidle.js +31 -44
- package/lib/commands/element.js +149 -142
- package/lib/commands/execute.js +86 -87
- package/lib/commands/file-actions.js +249 -222
- package/lib/commands/find.ts +13 -19
- package/lib/commands/geolocation.js +179 -0
- package/lib/commands/ime.js +53 -45
- package/lib/commands/intent.js +149 -91
- package/lib/commands/keyboard.js +114 -17
- package/lib/commands/lock/exports.js +139 -0
- package/lib/commands/lock/helpers.js +379 -0
- package/lib/commands/log.js +170 -166
- package/lib/commands/media-projection.js +75 -70
- package/lib/commands/memory.js +17 -29
- package/lib/commands/misc.js +94 -0
- package/lib/commands/network.js +209 -223
- package/lib/commands/performance.js +88 -73
- package/lib/commands/permissions.js +83 -84
- package/lib/commands/recordscreen.js +171 -170
- package/lib/commands/resources.js +96 -0
- package/lib/commands/shell.js +28 -42
- package/lib/commands/streamscreen.js +207 -206
- package/lib/commands/system-bars.js +76 -77
- package/lib/commands/time.js +36 -0
- package/lib/commands/touch.js +442 -346
- package/lib/commands/types.ts +123 -2
- package/lib/doctor/checks.js +24 -16
- package/lib/driver.ts +454 -12
- package/lib/index.ts +1 -13
- package/lib/logger.js +1 -1
- package/lib/method-map.js +0 -11
- package/lib/utils.js +40 -3
- package/package.json +1 -1
- package/build/lib/commands/actions.d.ts +0 -8
- package/build/lib/commands/actions.d.ts.map +0 -1
- package/build/lib/commands/actions.js +0 -207
- package/build/lib/commands/actions.js.map +0 -1
- package/build/lib/commands/alert.d.ts +0 -8
- package/build/lib/commands/alert.d.ts.map +0 -1
- package/build/lib/commands/alert.js +0 -29
- package/build/lib/commands/alert.js.map +0 -1
- package/build/lib/commands/context.d.ts +0 -10
- package/build/lib/commands/context.d.ts.map +0 -1
- package/build/lib/commands/context.js +0 -431
- package/build/lib/commands/context.js.map +0 -1
- package/build/lib/commands/emu-console.d.ts +0 -7
- package/build/lib/commands/emu-console.d.ts.map +0 -1
- package/build/lib/commands/emu-console.js +0 -27
- package/build/lib/commands/emu-console.js.map +0 -1
- package/build/lib/commands/general.d.ts +0 -9
- package/build/lib/commands/general.d.ts.map +0 -1
- package/build/lib/commands/general.js +0 -293
- package/build/lib/commands/general.js.map +0 -1
- package/build/lib/commands/index.d.ts +0 -28
- package/build/lib/commands/index.d.ts.map +0 -1
- package/build/lib/commands/index.js +0 -57
- package/build/lib/commands/index.js.map +0 -1
- package/build/lib/commands/mixins.d.ts +0 -747
- package/build/lib/commands/mixins.d.ts.map +0 -1
- package/build/lib/commands/mixins.js +0 -19
- package/build/lib/commands/mixins.js.map +0 -1
- package/build/lib/helpers/android.d.ts +0 -163
- package/build/lib/helpers/android.d.ts.map +0 -1
- package/build/lib/helpers/android.js +0 -818
- package/build/lib/helpers/android.js.map +0 -1
- package/build/lib/helpers/index.d.ts +0 -7
- package/build/lib/helpers/index.d.ts.map +0 -1
- package/build/lib/helpers/index.js +0 -29
- package/build/lib/helpers/index.js.map +0 -1
- package/build/lib/helpers/types.d.ts +0 -122
- package/build/lib/helpers/types.d.ts.map +0 -1
- package/build/lib/helpers/types.js +0 -3
- package/build/lib/helpers/types.js.map +0 -1
- package/build/lib/helpers/unlock.d.ts +0 -32
- package/build/lib/helpers/unlock.d.ts.map +0 -1
- package/build/lib/helpers/unlock.js +0 -273
- package/build/lib/helpers/unlock.js.map +0 -1
- package/build/lib/helpers/webview.d.ts +0 -74
- package/build/lib/helpers/webview.d.ts.map +0 -1
- package/build/lib/helpers/webview.js +0 -448
- package/build/lib/helpers/webview.js.map +0 -1
- package/lib/commands/actions.js +0 -244
- package/lib/commands/alert.js +0 -34
- package/lib/commands/context.js +0 -507
- package/lib/commands/emu-console.js +0 -31
- package/lib/commands/general.js +0 -343
- package/lib/commands/index.ts +0 -54
- package/lib/commands/mixins.ts +0 -976
- package/lib/helpers/android.ts +0 -1153
- package/lib/helpers/index.ts +0 -6
- package/lib/helpers/types.ts +0 -136
- package/lib/helpers/unlock.ts +0 -329
- package/lib/helpers/webview.ts +0 -610
|
@@ -1,125 +1,161 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
/* eslint-disable @typescript-eslint/no-unused-vars */
|
|
3
3
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
4
|
-
|
|
5
|
-
const asyncbox_1 = require("asyncbox");
|
|
4
|
+
exports.getLocationInView = exports.setValueImmediate = exports.replaceValue = exports.setValue = exports.doSetElementValue = exports.setElementValue = exports.elementSelected = exports.elementEnabled = exports.elementDisplayed = exports.getName = exports.getSize = exports.getLocation = exports.getText = exports.click = exports.getAttribute = void 0;
|
|
6
5
|
const driver_1 = require("appium/driver");
|
|
7
6
|
/**
|
|
8
|
-
* @
|
|
9
|
-
* @
|
|
7
|
+
* @this {import('../driver').AndroidDriver}
|
|
8
|
+
* @param {string} attribute
|
|
9
|
+
* @param {string} elementId
|
|
10
|
+
* @returns {Promise<string?>}
|
|
10
11
|
*/
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
async getName(elementId) {
|
|
16
|
-
return await this.getAttribute('className', elementId);
|
|
17
|
-
},
|
|
18
|
-
async elementDisplayed(elementId) {
|
|
19
|
-
return (await this.getAttribute('displayed', elementId)) === 'true';
|
|
20
|
-
},
|
|
21
|
-
async elementEnabled(elementId) {
|
|
22
|
-
return (await this.getAttribute('enabled', elementId)) === 'true';
|
|
23
|
-
},
|
|
24
|
-
async elementSelected(elementId) {
|
|
25
|
-
return (await this.getAttribute('selected', elementId)) === 'true';
|
|
26
|
-
},
|
|
27
|
-
async setElementValue(keys, elementId, replace = false) {
|
|
28
|
-
const text = keys instanceof Array ? keys.join('') : keys;
|
|
29
|
-
return await this.doSetElementValue({
|
|
30
|
-
elementId,
|
|
31
|
-
text: String(text),
|
|
32
|
-
replace,
|
|
33
|
-
});
|
|
34
|
-
},
|
|
35
|
-
/**
|
|
36
|
-
* Reason for isolating doSetElementValue from setElementValue is for reusing setElementValue
|
|
37
|
-
* across android-drivers (like appium-uiautomator2-driver) and to avoid code duplication.
|
|
38
|
-
* Other android-drivers (like appium-uiautomator2-driver) need to override doSetElementValue
|
|
39
|
-
* to facilitate setElementValue.
|
|
40
|
-
*/
|
|
41
|
-
async doSetElementValue(params) {
|
|
42
|
-
throw new driver_1.errors.NotImplementedError('Not implemented');
|
|
43
|
-
},
|
|
44
|
-
async setValue(keys, elementId) {
|
|
45
|
-
return await this.setElementValue(keys, elementId, false);
|
|
46
|
-
},
|
|
47
|
-
async replaceValue(keys, elementId) {
|
|
48
|
-
return await this.setElementValue(keys, elementId, true);
|
|
49
|
-
},
|
|
50
|
-
async setValueImmediate(keys, elementId) {
|
|
51
|
-
let text = keys;
|
|
52
|
-
if (keys instanceof Array) {
|
|
53
|
-
text = keys.join('');
|
|
54
|
-
}
|
|
55
|
-
// first, make sure we are focused on the element
|
|
56
|
-
await this.click(elementId);
|
|
57
|
-
// then send through adb
|
|
58
|
-
await this.adb.inputText(/** @type {string} */ (text));
|
|
59
|
-
},
|
|
60
|
-
async getText(elementId) {
|
|
61
|
-
throw new driver_1.errors.NotImplementedError('Not implemented');
|
|
62
|
-
},
|
|
63
|
-
async clear(elementId) {
|
|
64
|
-
let text = (await this.getText(elementId)) || '';
|
|
65
|
-
let length = text.length;
|
|
66
|
-
if (length === 0) {
|
|
67
|
-
// if length is zero there are two possibilities:
|
|
68
|
-
// 1. there is nothing in the text field
|
|
69
|
-
// 2. it is a password field
|
|
70
|
-
// since there is little overhead to the adb call, delete 100 elements
|
|
71
|
-
// if we get zero, just in case it is #2
|
|
72
|
-
length = 100;
|
|
73
|
-
}
|
|
74
|
-
await this.click(elementId);
|
|
75
|
-
this.log.debug(`Sending up to ${length} clear characters to device`);
|
|
76
|
-
await (0, asyncbox_1.retryInterval)(5, 500, async () => {
|
|
77
|
-
let remainingLength = length;
|
|
78
|
-
while (remainingLength > 0) {
|
|
79
|
-
let lengthToSend = remainingLength < 50 ? remainingLength : 50;
|
|
80
|
-
this.log.debug(`Sending ${lengthToSend} clear characters to device`);
|
|
81
|
-
await this.adb.clearTextField(lengthToSend);
|
|
82
|
-
remainingLength -= lengthToSend;
|
|
83
|
-
}
|
|
84
|
-
});
|
|
85
|
-
},
|
|
86
|
-
async click(elementId) {
|
|
87
|
-
throw new driver_1.errors.NotImplementedError('Not implemented');
|
|
88
|
-
},
|
|
89
|
-
async getLocation(elementId) {
|
|
90
|
-
throw new driver_1.errors.NotImplementedError('Not implemented');
|
|
91
|
-
},
|
|
92
|
-
async getLocationInView(elementId) {
|
|
93
|
-
return await this.getLocation(elementId);
|
|
94
|
-
},
|
|
95
|
-
async getSize(elementId) {
|
|
96
|
-
throw new driver_1.errors.NotImplementedError('Not implemented');
|
|
97
|
-
},
|
|
98
|
-
async getElementRect(elementId) {
|
|
99
|
-
throw new driver_1.errors.NotImplementedError('Not implemented');
|
|
100
|
-
},
|
|
101
|
-
async touchLongClick(elementId, x, y, duration) {
|
|
102
|
-
throw new driver_1.errors.NotImplementedError('Not implemented');
|
|
103
|
-
},
|
|
104
|
-
async touchDown(elementId, x, y) {
|
|
105
|
-
throw new driver_1.errors.NotImplementedError('Not implemented');
|
|
106
|
-
},
|
|
107
|
-
async touchUp(elementId, x, y) {
|
|
108
|
-
throw new driver_1.errors.NotImplementedError('Not implemented');
|
|
109
|
-
},
|
|
110
|
-
async touchMove(elementId, x, y) {
|
|
111
|
-
throw new driver_1.errors.NotImplementedError('Not implemented');
|
|
112
|
-
},
|
|
113
|
-
async complexTap(tapCount, touchCount, duration, x, y) {
|
|
114
|
-
throw new driver_1.errors.NotImplementedError('Not implemented');
|
|
115
|
-
},
|
|
116
|
-
async tap(elementId = null, x = null, y = null, count = 1) {
|
|
117
|
-
throw new driver_1.errors.NotImplementedError('Not implemented');
|
|
118
|
-
},
|
|
119
|
-
};
|
|
120
|
-
(0, mixins_1.mixin)(ElementMixin);
|
|
121
|
-
exports.default = ElementMixin;
|
|
12
|
+
async function getAttribute(attribute, elementId) {
|
|
13
|
+
throw new driver_1.errors.NotImplementedError('Not implemented');
|
|
14
|
+
}
|
|
15
|
+
exports.getAttribute = getAttribute;
|
|
122
16
|
/**
|
|
123
|
-
* @
|
|
17
|
+
* @this {import('../driver').AndroidDriver}
|
|
18
|
+
* @param {string} elementId
|
|
19
|
+
* @returns {Promise<void>}
|
|
124
20
|
*/
|
|
21
|
+
async function click(elementId) {
|
|
22
|
+
throw new driver_1.errors.NotImplementedError('Not implemented');
|
|
23
|
+
}
|
|
24
|
+
exports.click = click;
|
|
25
|
+
/**
|
|
26
|
+
* @this {import('../driver').AndroidDriver}
|
|
27
|
+
* @param {string} elementId
|
|
28
|
+
* @returns {Promise<string>}
|
|
29
|
+
*/
|
|
30
|
+
async function getText(elementId) {
|
|
31
|
+
throw new driver_1.errors.NotImplementedError('Not implemented');
|
|
32
|
+
}
|
|
33
|
+
exports.getText = getText;
|
|
34
|
+
/**
|
|
35
|
+
* @this {import('../driver').AndroidDriver}
|
|
36
|
+
* @param {string} elementId
|
|
37
|
+
* @returns {Promise<import('@appium/types').Position>}
|
|
38
|
+
*/
|
|
39
|
+
async function getLocation(elementId) {
|
|
40
|
+
throw new driver_1.errors.NotImplementedError('Not implemented');
|
|
41
|
+
}
|
|
42
|
+
exports.getLocation = getLocation;
|
|
43
|
+
/**
|
|
44
|
+
* @this {import('../driver').AndroidDriver}
|
|
45
|
+
* @param {string} elementId
|
|
46
|
+
* @returns {Promise<import('@appium/types').Size>}
|
|
47
|
+
*/
|
|
48
|
+
async function getSize(elementId) {
|
|
49
|
+
throw new driver_1.errors.NotImplementedError('Not implemented');
|
|
50
|
+
}
|
|
51
|
+
exports.getSize = getSize;
|
|
52
|
+
/**
|
|
53
|
+
* @this {import('../driver').AndroidDriver}
|
|
54
|
+
* @param {string} elementId
|
|
55
|
+
* @returns {Promise<string>}
|
|
56
|
+
*/
|
|
57
|
+
async function getName(elementId) {
|
|
58
|
+
return /** @type {string} */ (await this.getAttribute('className', elementId));
|
|
59
|
+
}
|
|
60
|
+
exports.getName = getName;
|
|
61
|
+
/**
|
|
62
|
+
* @this {import('../driver').AndroidDriver}
|
|
63
|
+
* @param {string} elementId
|
|
64
|
+
* @returns {Promise<boolean>}
|
|
65
|
+
*/
|
|
66
|
+
async function elementDisplayed(elementId) {
|
|
67
|
+
return (await this.getAttribute('displayed', elementId)) === 'true';
|
|
68
|
+
}
|
|
69
|
+
exports.elementDisplayed = elementDisplayed;
|
|
70
|
+
/**
|
|
71
|
+
* @this {import('../driver').AndroidDriver}
|
|
72
|
+
* @param {string} elementId
|
|
73
|
+
* @returns {Promise<boolean>}
|
|
74
|
+
*/
|
|
75
|
+
async function elementEnabled(elementId) {
|
|
76
|
+
return (await this.getAttribute('enabled', elementId)) === 'true';
|
|
77
|
+
}
|
|
78
|
+
exports.elementEnabled = elementEnabled;
|
|
79
|
+
/**
|
|
80
|
+
* @this {import('../driver').AndroidDriver}
|
|
81
|
+
* @param {string} elementId
|
|
82
|
+
* @returns {Promise<boolean>}
|
|
83
|
+
*/
|
|
84
|
+
async function elementSelected(elementId) {
|
|
85
|
+
return (await this.getAttribute('selected', elementId)) === 'true';
|
|
86
|
+
}
|
|
87
|
+
exports.elementSelected = elementSelected;
|
|
88
|
+
/**
|
|
89
|
+
* @this {import('../driver').AndroidDriver}
|
|
90
|
+
* @param {string|string[]} keys
|
|
91
|
+
* @param {string} elementId
|
|
92
|
+
* @param {boolean} [replace=false]
|
|
93
|
+
* @returns {Promise<void>}
|
|
94
|
+
*/
|
|
95
|
+
async function setElementValue(keys, elementId, replace = false) {
|
|
96
|
+
const text = keys instanceof Array ? keys.join('') : keys;
|
|
97
|
+
return await this.doSetElementValue({
|
|
98
|
+
elementId,
|
|
99
|
+
text: String(text),
|
|
100
|
+
replace,
|
|
101
|
+
});
|
|
102
|
+
}
|
|
103
|
+
exports.setElementValue = setElementValue;
|
|
104
|
+
/**
|
|
105
|
+
* Reason for isolating doSetElementValue from setElementValue is for reusing setElementValue
|
|
106
|
+
* across android-drivers (like appium-uiautomator2-driver) and to avoid code duplication.
|
|
107
|
+
* Other android-drivers (like appium-uiautomator2-driver) need to override doSetElementValue
|
|
108
|
+
* to facilitate setElementValue.
|
|
109
|
+
*
|
|
110
|
+
* @this {import('../driver').AndroidDriver}
|
|
111
|
+
* @param {import('./types').DoSetElementValueOpts} params
|
|
112
|
+
* @returns {Promise<void>}
|
|
113
|
+
*/
|
|
114
|
+
async function doSetElementValue(params) {
|
|
115
|
+
throw new driver_1.errors.NotImplementedError('Not implemented');
|
|
116
|
+
}
|
|
117
|
+
exports.doSetElementValue = doSetElementValue;
|
|
118
|
+
/**
|
|
119
|
+
* @this {import('../driver').AndroidDriver}
|
|
120
|
+
* @param {string|string[]} keys
|
|
121
|
+
* @param {string} elementId
|
|
122
|
+
* @returns {Promise<void>}
|
|
123
|
+
*/
|
|
124
|
+
async function setValue(keys, elementId) {
|
|
125
|
+
return await this.setElementValue(keys, elementId, false);
|
|
126
|
+
}
|
|
127
|
+
exports.setValue = setValue;
|
|
128
|
+
/**
|
|
129
|
+
* @this {import('../driver').AndroidDriver}
|
|
130
|
+
* @param {string|string[]} keys
|
|
131
|
+
* @param {string} elementId
|
|
132
|
+
* @returns {Promise<void>}
|
|
133
|
+
*/
|
|
134
|
+
async function replaceValue(keys, elementId) {
|
|
135
|
+
return await this.setElementValue(keys, elementId, true);
|
|
136
|
+
}
|
|
137
|
+
exports.replaceValue = replaceValue;
|
|
138
|
+
/**
|
|
139
|
+
* @this {import('../driver').AndroidDriver}
|
|
140
|
+
* @param {string|string[]} keys
|
|
141
|
+
* @param {string} elementId
|
|
142
|
+
* @returns {Promise<void>}
|
|
143
|
+
*/
|
|
144
|
+
async function setValueImmediate(keys, elementId) {
|
|
145
|
+
const text = Array.isArray(keys) ? keys.join('') : keys;
|
|
146
|
+
// first, make sure we are focused on the element
|
|
147
|
+
await this.click(elementId);
|
|
148
|
+
// then send through adb
|
|
149
|
+
await this.adb.inputText(/** @type {string} */ (text));
|
|
150
|
+
}
|
|
151
|
+
exports.setValueImmediate = setValueImmediate;
|
|
152
|
+
/**
|
|
153
|
+
* @this {import('../driver').AndroidDriver}
|
|
154
|
+
* @param {string} elementId
|
|
155
|
+
* @returns {Promise<import('@appium/types').Position>}
|
|
156
|
+
*/
|
|
157
|
+
async function getLocationInView(elementId) {
|
|
158
|
+
return await this.getLocation(elementId);
|
|
159
|
+
}
|
|
160
|
+
exports.getLocationInView = getLocationInView;
|
|
125
161
|
//# sourceMappingURL=element.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"element.js","sourceRoot":"","sources":["../../../lib/commands/element.js"],"names":[],"mappings":";AAAA,sDAAsD
|
|
1
|
+
{"version":3,"file":"element.js","sourceRoot":"","sources":["../../../lib/commands/element.js"],"names":[],"mappings":";AAAA,sDAAsD;;;AAEtD,0CAAqC;AAErC;;;;;GAKG;AACI,KAAK,UAAU,YAAY,CAAC,SAAS,EAAE,SAAS;IACrD,MAAM,IAAI,eAAM,CAAC,mBAAmB,CAAC,iBAAiB,CAAC,CAAC;AAC1D,CAAC;AAFD,oCAEC;AAED;;;;GAIG;AACI,KAAK,UAAU,KAAK,CAAC,SAAS;IACnC,MAAM,IAAI,eAAM,CAAC,mBAAmB,CAAC,iBAAiB,CAAC,CAAC;AAC1D,CAAC;AAFD,sBAEC;AAED;;;;GAIG;AACI,KAAK,UAAU,OAAO,CAAC,SAAS;IACrC,MAAM,IAAI,eAAM,CAAC,mBAAmB,CAAC,iBAAiB,CAAC,CAAC;AAC1D,CAAC;AAFD,0BAEC;AAED;;;;GAIG;AACI,KAAK,UAAU,WAAW,CAAC,SAAS;IACzC,MAAM,IAAI,eAAM,CAAC,mBAAmB,CAAC,iBAAiB,CAAC,CAAC;AAC1D,CAAC;AAFD,kCAEC;AAED;;;;GAIG;AACI,KAAK,UAAU,OAAO,CAAC,SAAS;IACrC,MAAM,IAAI,eAAM,CAAC,mBAAmB,CAAC,iBAAiB,CAAC,CAAC;AAC1D,CAAC;AAFD,0BAEC;AAED;;;;GAIG;AACI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C,IAAI,EAAE,SAAS;IAC5C,OAAO,MAAM,IAAI,CAAC,eAAe,CAAC,IAAI,EAAE,SAAS,EAAE,KAAK,CAAC,CAAC;AAC5D,CAAC;AAFD,4BAEC;AAED;;;;;GAKG;AACI,KAAK,UAAU,YAAY,CAAC,IAAI,EAAE,SAAS;IAChD,OAAO,MAAM,IAAI,CAAC,eAAe,CAAC,IAAI,EAAE,SAAS,EAAE,IAAI,CAAC,CAAC;AAC3D,CAAC;AAFD,oCAEC;AAED;;;;;GAKG;AACI,KAAK,UAAU,iBAAiB,CAAC,IAAI,EAAE,SAAS;IACrD,MAAM,IAAI,GAAG,KAAK,CAAC,OAAO,CAAC,IAAI,CAAC,CAAC,CAAC,CAAC,IAAI,CAAC,IAAI,CAAC,EAAE,CAAC,CAAC,CAAC,CAAC,IAAI,CAAC;IACxD,iDAAiD;IACjD,MAAM,IAAI,CAAC,KAAK,CAAC,SAAS,CAAC,CAAC;IAC5B,wBAAwB;IACxB,MAAM,IAAI,CAAC,GAAG,CAAC,SAAS,CAAC,qBAAqB,CAAC,CAAC,IAAI,CAAC,CAAC,CAAC;AACzD,CAAC;AAND,8CAMC;AAED;;;;GAIG;AACI,KAAK,UAAU,iBAAiB,CAAC,SAAS;IAC/C,OAAO,MAAM,IAAI,CAAC,WAAW,CAAC,SAAS,CAAC,CAAC;AAC3C,CAAC;AAFD,8CAEC"}
|
|
@@ -1,7 +1,15 @@
|
|
|
1
|
-
export default ExecuteMixin;
|
|
2
1
|
/**
|
|
3
|
-
* @
|
|
4
|
-
* @
|
|
2
|
+
* @this {import('../driver').AndroidDriver}
|
|
3
|
+
* @param {string} script
|
|
4
|
+
* @param {any[]} [args]
|
|
5
|
+
* @returns {Promise<any>}
|
|
5
6
|
*/
|
|
6
|
-
|
|
7
|
+
export function execute(this: import("../driver").AndroidDriver, script: string, args?: any[] | undefined): Promise<any>;
|
|
8
|
+
/**
|
|
9
|
+
* @this {import('../driver').AndroidDriver}
|
|
10
|
+
* @param {string} mobileCommand
|
|
11
|
+
* @param {import('@appium/types').StringRecord} [opts={}]
|
|
12
|
+
* @returns {Promise<any>}
|
|
13
|
+
*/
|
|
14
|
+
export function executeMobile(this: import("../driver").AndroidDriver, mobileCommand: string, opts?: import("@appium/types").StringRecord<any> | undefined): Promise<any>;
|
|
7
15
|
//# sourceMappingURL=execute.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"execute.d.ts","sourceRoot":"","sources":["../../../lib/commands/execute.js"],"names":[],"mappings":";
|
|
1
|
+
{"version":3,"file":"execute.d.ts","sourceRoot":"","sources":["../../../lib/commands/execute.js"],"names":[],"mappings":"AAGA;;;;;GAKG;AACH,yEAJW,MAAM,6BAEJ,QAAQ,GAAG,CAAC,CAyBxB;AAED;;;;;GAKG;AACH,sFAJW,MAAM,iEAEJ,QAAQ,GAAG,CAAC,CA2ExB"}
|
|
@@ -1,88 +1,93 @@
|
|
|
1
1
|
"use strict";
|
|
2
|
-
// @ts-check
|
|
3
2
|
var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
4
3
|
return (mod && mod.__esModule) ? mod : { "default": mod };
|
|
5
4
|
};
|
|
6
5
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
6
|
+
exports.executeMobile = exports.execute = void 0;
|
|
7
7
|
const lodash_1 = __importDefault(require("lodash"));
|
|
8
8
|
const driver_1 = require("appium/driver");
|
|
9
|
-
const mixins_1 = require("./mixins");
|
|
10
9
|
/**
|
|
11
|
-
* @
|
|
12
|
-
* @
|
|
10
|
+
* @this {import('../driver').AndroidDriver}
|
|
11
|
+
* @param {string} script
|
|
12
|
+
* @param {any[]} [args]
|
|
13
|
+
* @returns {Promise<any>}
|
|
13
14
|
*/
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
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
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
}
|
|
85
|
-
|
|
86
|
-
(
|
|
87
|
-
|
|
15
|
+
async function execute(script, args) {
|
|
16
|
+
if (script.match(/^mobile:/)) {
|
|
17
|
+
this.log.info(`Executing native command '${script}'`);
|
|
18
|
+
script = script.replace(/^mobile:/, '').trim();
|
|
19
|
+
return await this.executeMobile(script, lodash_1.default.isArray(args) ? /** @type {import('@appium/types').StringRecord} */ (args[0]) : args);
|
|
20
|
+
}
|
|
21
|
+
if (!this.isWebContext()) {
|
|
22
|
+
throw new driver_1.errors.NotImplementedError();
|
|
23
|
+
}
|
|
24
|
+
const endpoint =
|
|
25
|
+
/** @type {import('appium-chromedriver').Chromedriver} */ (this.chromedriver).jwproxy
|
|
26
|
+
.downstreamProtocol === driver_1.PROTOCOLS.MJSONWP
|
|
27
|
+
? '/execute'
|
|
28
|
+
: '/execute/sync';
|
|
29
|
+
return await /** @type {import('appium-chromedriver').Chromedriver} */ (this.chromedriver).jwproxy.command(endpoint, 'POST', {
|
|
30
|
+
script,
|
|
31
|
+
args,
|
|
32
|
+
});
|
|
33
|
+
}
|
|
34
|
+
exports.execute = execute;
|
|
35
|
+
/**
|
|
36
|
+
* @this {import('../driver').AndroidDriver}
|
|
37
|
+
* @param {string} mobileCommand
|
|
38
|
+
* @param {import('@appium/types').StringRecord} [opts={}]
|
|
39
|
+
* @returns {Promise<any>}
|
|
40
|
+
*/
|
|
41
|
+
async function executeMobile(mobileCommand, opts = {}) {
|
|
42
|
+
const mobileCommandsMapping = {
|
|
43
|
+
shell: 'mobileShell',
|
|
44
|
+
execEmuConsoleCommand: 'mobileExecEmuConsoleCommand',
|
|
45
|
+
startLogsBroadcast: 'mobileStartLogsBroadcast',
|
|
46
|
+
stopLogsBroadcast: 'mobileStopLogsBroadcast',
|
|
47
|
+
changePermissions: 'mobileChangePermissions',
|
|
48
|
+
getPermissions: 'mobileGetPermissions',
|
|
49
|
+
performEditorAction: 'mobilePerformEditorAction',
|
|
50
|
+
sensorSet: 'sensorSet',
|
|
51
|
+
getDeviceTime: 'mobileGetDeviceTime',
|
|
52
|
+
startScreenStreaming: 'mobileStartScreenStreaming',
|
|
53
|
+
stopScreenStreaming: 'mobileStopScreenStreaming',
|
|
54
|
+
getNotifications: 'mobileGetNotifications',
|
|
55
|
+
listSms: 'mobileListSms',
|
|
56
|
+
pushFile: 'mobilePushFile',
|
|
57
|
+
pullFile: 'mobilePullFile',
|
|
58
|
+
pullFolder: 'mobilePullFolder',
|
|
59
|
+
deleteFile: 'mobileDeleteFile',
|
|
60
|
+
isAppInstalled: 'mobileIsAppInstalled',
|
|
61
|
+
queryAppState: 'mobileQueryAppState',
|
|
62
|
+
activateApp: 'mobileActivateApp',
|
|
63
|
+
removeApp: 'mobileRemoveApp',
|
|
64
|
+
terminateApp: 'mobileTerminateApp',
|
|
65
|
+
installApp: 'mobileInstallApp',
|
|
66
|
+
clearApp: 'mobileClearApp',
|
|
67
|
+
startService: 'mobileStartService',
|
|
68
|
+
stopService: 'mobileStopService',
|
|
69
|
+
startActivity: 'mobileStartActivity',
|
|
70
|
+
broadcast: 'mobileBroadcast',
|
|
71
|
+
getContexts: 'mobileGetContexts',
|
|
72
|
+
lock: 'mobileLock',
|
|
73
|
+
unlock: 'mobileUnlock',
|
|
74
|
+
refreshGpsCache: 'mobileRefreshGpsCache',
|
|
75
|
+
startMediaProjectionRecording: 'mobileStartMediaProjectionRecording',
|
|
76
|
+
isMediaProjectionRecordingRunning: 'mobileIsMediaProjectionRecordingRunning',
|
|
77
|
+
stopMediaProjectionRecording: 'mobileStopMediaProjectionRecording',
|
|
78
|
+
getConnectivity: 'mobileGetConnectivity',
|
|
79
|
+
setConnectivity: 'mobileSetConnectivity',
|
|
80
|
+
hideKeyboard: 'hideKeyboard',
|
|
81
|
+
isKeyboardShown: 'isKeyboardShown',
|
|
82
|
+
deviceidle: 'mobileDeviceidle',
|
|
83
|
+
setUiMode: 'mobileSetUiMode',
|
|
84
|
+
getUiMode: 'mobileGetUiMode',
|
|
85
|
+
};
|
|
86
|
+
if (!lodash_1.default.has(mobileCommandsMapping, mobileCommand)) {
|
|
87
|
+
throw new driver_1.errors.UnknownCommandError(`Unknown mobile command "${mobileCommand}". ` +
|
|
88
|
+
`Only ${lodash_1.default.keys(mobileCommandsMapping)} commands are supported.`);
|
|
89
|
+
}
|
|
90
|
+
return await this[mobileCommandsMapping[mobileCommand]](opts);
|
|
91
|
+
}
|
|
92
|
+
exports.executeMobile = executeMobile;
|
|
88
93
|
//# sourceMappingURL=execute.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"execute.js","sourceRoot":"","sources":["../../../lib/commands/execute.js"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"execute.js","sourceRoot":"","sources":["../../../lib/commands/execute.js"],"names":[],"mappings":";;;;;;AAAA,oDAAuB;AACvB,0CAAgD;AAEhD;;;;;GAKG;AACI,K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AAa,CAAC,CAAC,CAAC,IAAI,CAAC,CAAC;AAChE,CAAC;AAzED,sCAyEC"}
|
|
@@ -1,8 +1,45 @@
|
|
|
1
|
-
export default FileActionsMixin;
|
|
2
|
-
export type ADB = import('appium-adb').ADB;
|
|
3
1
|
/**
|
|
4
|
-
* @
|
|
5
|
-
* @
|
|
2
|
+
* @this {import('../driver').AndroidDriver}
|
|
3
|
+
* @param {string} remotePath
|
|
4
|
+
* @returns {Promise<string>}
|
|
5
|
+
*/
|
|
6
|
+
export function pullFile(this: import("../driver").AndroidDriver, remotePath: string): Promise<string>;
|
|
7
|
+
/**
|
|
8
|
+
* @this {import('../driver').AndroidDriver}
|
|
9
|
+
* @param {import('./types').PullFileOpts} opts
|
|
10
|
+
* @returns {Promise<string>}
|
|
11
|
+
*/
|
|
12
|
+
export function mobilePullFile(this: import("../driver").AndroidDriver, opts: import('./types').PullFileOpts): Promise<string>;
|
|
13
|
+
/**
|
|
14
|
+
* @this {import('../driver').AndroidDriver}
|
|
15
|
+
* @param {string} remotePath
|
|
16
|
+
* @param {string} base64Data
|
|
17
|
+
* @returns {Promise<void>}
|
|
18
|
+
*/
|
|
19
|
+
export function pushFile(this: import("../driver").AndroidDriver, remotePath: string, base64Data: string): Promise<void>;
|
|
20
|
+
/**
|
|
21
|
+
* @this {import('../driver').AndroidDriver}
|
|
22
|
+
* @param {import('./types').PushFileOpts} opts
|
|
23
|
+
* @returns {Promise<void>}
|
|
6
24
|
*/
|
|
7
|
-
|
|
25
|
+
export function mobilePushFile(this: import("../driver").AndroidDriver, opts: import('./types').PushFileOpts): Promise<void>;
|
|
26
|
+
/**
|
|
27
|
+
* @this {import('../driver').AndroidDriver}
|
|
28
|
+
* @param {string} remotePath
|
|
29
|
+
* @returns {Promise<string>}
|
|
30
|
+
*/
|
|
31
|
+
export function pullFolder(this: import("../driver").AndroidDriver, remotePath: string): Promise<string>;
|
|
32
|
+
/**
|
|
33
|
+
* @this {import('../driver').AndroidDriver}
|
|
34
|
+
* @param {import('./types').PullFolderOpts} opts
|
|
35
|
+
* @returns {Promise<string>}
|
|
36
|
+
*/
|
|
37
|
+
export function mobilePullFolder(this: import("../driver").AndroidDriver, opts: import('./types').PullFolderOpts): Promise<string>;
|
|
38
|
+
/**
|
|
39
|
+
* @this {import('../driver').AndroidDriver}
|
|
40
|
+
* @param {import('./types').DeleteFileOpts} opts
|
|
41
|
+
* @returns {Promise<boolean>}
|
|
42
|
+
*/
|
|
43
|
+
export function mobileDeleteFile(this: import("../driver").AndroidDriver, opts: import('./types').DeleteFileOpts): Promise<boolean>;
|
|
44
|
+
export type ADB = import('appium-adb').ADB;
|
|
8
45
|
//# sourceMappingURL=file-actions.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"file-actions.d.ts","sourceRoot":"","sources":["../../../lib/commands/file-actions.js"],"names":[],"mappings":";
|
|
1
|
+
{"version":3,"file":"file-actions.d.ts","sourceRoot":"","sources":["../../../lib/commands/file-actions.js"],"names":[],"mappings":"AAWA;;;;GAIG;AACH,8EAHW,MAAM,GACJ,QAAQ,MAAM,CAAC,CA2C3B;AAED;;;;GAIG;AACH,8EAHW,OAAO,SAAS,EAAE,YAAY,GAC5B,QAAQ,MAAM,CAAC,CAK3B;AAED;;;;;GAKG;AACH,8EAJW,MAAM,cACN,MAAM,GACJ,QAAQ,IAAI,CAAC,CA+DzB;AAED;;;;GAIG;AACH,8EAHW,OAAO,SAAS,EAAE,YAAY,GAC5B,QAAQ,IAAI,CAAC,CAKzB;AAED;;;;GAIG;AACH,gFAHW,MAAM,GACJ,QAAQ,MAAM,CAAC,CAc3B;AAED;;;;GAIG;AACH,gFAHW,OAAO,SAAS,EAAE,cAAc,GAC9B,QAAQ,MAAM,CAAC,CAK3B;AAED;;;;GAIG;AACH,gFAHW,OAAO,SAAS,EAAE,cAAc,GAC9B,QAAQ,OAAO,CAAC,CAW5B;kBAiLY,OAAO,YAAY,EAAE,GAAG"}
|