appium-adb 12.0.0 → 12.0.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 +15 -0
- package/build/lib/tools/apk-utils.d.ts +23 -7
- package/build/lib/tools/apk-utils.d.ts.map +1 -1
- package/build/lib/tools/apk-utils.js +17 -9
- package/build/lib/tools/apk-utils.js.map +1 -1
- package/lib/tools/apk-utils.js +23 -9
- package/package.json +2 -2
- package/build/lib/tools/settings-client-commands.d.ts +0 -333
- package/build/lib/tools/settings-client-commands.d.ts.map +0 -1
- package/build/lib/tools/settings-client-commands.js +0 -655
- package/build/lib/tools/settings-client-commands.js.map +0 -1
- package/build/lib/tools/utf7.d.ts +0 -26
- package/build/lib/tools/utf7.d.ts.map +0 -1
- package/build/lib/tools/utf7.js +0 -144
- package/build/lib/tools/utf7.js.map +0 -1
|
@@ -1,333 +0,0 @@
|
|
|
1
|
-
export default commands;
|
|
2
|
-
export type SettingsAppStartupOptions = {
|
|
3
|
-
/**
|
|
4
|
-
* The maximum number of milliseconds
|
|
5
|
-
* to wait until the app has started
|
|
6
|
-
*/
|
|
7
|
-
timeout?: number | undefined;
|
|
8
|
-
/**
|
|
9
|
-
* Whether to restore
|
|
10
|
-
* the activity which was the current one before Settings startup
|
|
11
|
-
*/
|
|
12
|
-
shouldRestoreCurrentApp?: boolean | undefined;
|
|
13
|
-
};
|
|
14
|
-
export type Location = {
|
|
15
|
-
/**
|
|
16
|
-
* - Valid longitude value.
|
|
17
|
-
*/
|
|
18
|
-
longitude: number | string;
|
|
19
|
-
/**
|
|
20
|
-
* - Valid latitude value.
|
|
21
|
-
*/
|
|
22
|
-
latitude: number | string;
|
|
23
|
-
/**
|
|
24
|
-
* - Valid altitude value.
|
|
25
|
-
*/
|
|
26
|
-
altitude?: string | number | null | undefined;
|
|
27
|
-
/**
|
|
28
|
-
* - Number of satellites being tracked (1-12).
|
|
29
|
-
* This value is ignored on real devices.
|
|
30
|
-
*/
|
|
31
|
-
satellites?: string | number | null | undefined;
|
|
32
|
-
/**
|
|
33
|
-
* - Valid speed value.
|
|
34
|
-
* Should be greater than 0.0 meters/second for real devices or 0.0 knots
|
|
35
|
-
* for emulators.
|
|
36
|
-
*/
|
|
37
|
-
speed?: string | number | null | undefined;
|
|
38
|
-
};
|
|
39
|
-
export type SmsListOptions = {
|
|
40
|
-
/**
|
|
41
|
-
* - The maximum count of recent messages
|
|
42
|
-
* to retrieve
|
|
43
|
-
*/
|
|
44
|
-
max?: number | undefined;
|
|
45
|
-
};
|
|
46
|
-
export type SmsListResult = {
|
|
47
|
-
items: SmsListResultItem[];
|
|
48
|
-
total: number;
|
|
49
|
-
};
|
|
50
|
-
export type SmsListResultItem = {
|
|
51
|
-
id: string;
|
|
52
|
-
address: string;
|
|
53
|
-
person: string | null;
|
|
54
|
-
date: string;
|
|
55
|
-
read: string;
|
|
56
|
-
status: string;
|
|
57
|
-
type: string;
|
|
58
|
-
subject: string | null;
|
|
59
|
-
body: string;
|
|
60
|
-
serviceCenter: string | null;
|
|
61
|
-
};
|
|
62
|
-
export type SettingsClientCommands = typeof commands;
|
|
63
|
-
declare namespace commands {
|
|
64
|
-
/**
|
|
65
|
-
* @typedef {Object} SettingsAppStartupOptions
|
|
66
|
-
* @property {number} [timeout=5000] The maximum number of milliseconds
|
|
67
|
-
* to wait until the app has started
|
|
68
|
-
* @property {boolean} [shouldRestoreCurrentApp=false] Whether to restore
|
|
69
|
-
* the activity which was the current one before Settings startup
|
|
70
|
-
*/
|
|
71
|
-
/**
|
|
72
|
-
* Ensures that Appium Settings helper application is running
|
|
73
|
-
* and starts it if necessary
|
|
74
|
-
*
|
|
75
|
-
* @this {import('../adb.js').ADB}
|
|
76
|
-
* @param {SettingsAppStartupOptions} [opts={}]
|
|
77
|
-
* @throws {Error} If Appium Settings has failed to start
|
|
78
|
-
* @returns {Promise<import('../adb.js').ADB>} self instance for chaining
|
|
79
|
-
*/
|
|
80
|
-
function requireRunningSettingsApp(this: import("../adb.js").ADB, opts?: SettingsAppStartupOptions | undefined): Promise<import("../adb.js").ADB>;
|
|
81
|
-
/**
|
|
82
|
-
* Change the state of WiFi on the device under test.
|
|
83
|
-
*
|
|
84
|
-
* @this {import('../adb.js').ADB}
|
|
85
|
-
* @param {boolean} on - True to enable and false to disable it.
|
|
86
|
-
* @param {boolean} [isEmulator=false] - Set it to true if the device under test
|
|
87
|
-
* is an emulator rather than a real device.
|
|
88
|
-
*/
|
|
89
|
-
function setWifiState(this: import("../adb.js").ADB, on: boolean, isEmulator?: boolean | undefined): Promise<void>;
|
|
90
|
-
/**
|
|
91
|
-
* Change the state of Data transfer on the device under test.
|
|
92
|
-
*
|
|
93
|
-
* @this {import('../adb.js').ADB}
|
|
94
|
-
* @param {boolean} on - True to enable and false to disable it.
|
|
95
|
-
* @param {boolean} [isEmulator=false] - Set it to true if the device under test
|
|
96
|
-
* is an emulator rather than a real device.
|
|
97
|
-
*/
|
|
98
|
-
function setDataState(this: import("../adb.js").ADB, on: boolean, isEmulator?: boolean | undefined): Promise<void>;
|
|
99
|
-
/**
|
|
100
|
-
* Change the state of animation on the device under test.
|
|
101
|
-
* Animation on the device is controlled by the following global properties:
|
|
102
|
-
* [ANIMATOR_DURATION_SCALE]{@link https://developer.android.com/reference/android/provider/Settings.Global.html#ANIMATOR_DURATION_SCALE},
|
|
103
|
-
* [TRANSITION_ANIMATION_SCALE]{@link https://developer.android.com/reference/android/provider/Settings.Global.html#TRANSITION_ANIMATION_SCALE},
|
|
104
|
-
* [WINDOW_ANIMATION_SCALE]{@link https://developer.android.com/reference/android/provider/Settings.Global.html#WINDOW_ANIMATION_SCALE}.
|
|
105
|
-
* This method sets all this properties to 0.0 to disable (1.0 to enable) animation.
|
|
106
|
-
*
|
|
107
|
-
* Turning off animation might be useful to improve stability
|
|
108
|
-
* and reduce tests execution time.
|
|
109
|
-
*
|
|
110
|
-
* @this {import('../adb.js').ADB}
|
|
111
|
-
* @param {boolean} on - True to enable and false to disable it.
|
|
112
|
-
*/
|
|
113
|
-
function setAnimationState(this: import("../adb.js").ADB, on: boolean): Promise<void>;
|
|
114
|
-
/**
|
|
115
|
-
* Change the locale on the device under test. Don't need to reboot the device after changing the locale.
|
|
116
|
-
* This method sets an arbitrary locale following:
|
|
117
|
-
* https://developer.android.com/reference/java/util/Locale.html
|
|
118
|
-
* https://developer.android.com/reference/java/util/Locale.html#Locale(java.lang.String,%20java.lang.String)
|
|
119
|
-
*
|
|
120
|
-
* @this {import('../adb.js').ADB}
|
|
121
|
-
* @param {string} language - Language. e.g. en, ja
|
|
122
|
-
* @param {string} country - Country. e.g. US, JP
|
|
123
|
-
* @param {string?} [script=null] - Script. e.g. Hans in `zh-Hans-CN`
|
|
124
|
-
*/
|
|
125
|
-
function setDeviceSysLocaleViaSettingApp(this: import("../adb.js").ADB, language: string, country: string, script?: string | null | undefined): Promise<void>;
|
|
126
|
-
/**
|
|
127
|
-
* @typedef {Object} Location
|
|
128
|
-
* @property {number|string} longitude - Valid longitude value.
|
|
129
|
-
* @property {number|string} latitude - Valid latitude value.
|
|
130
|
-
* @property {?number|string} [altitude] - Valid altitude value.
|
|
131
|
-
* @property {?number|string} [satellites=12] - Number of satellites being tracked (1-12).
|
|
132
|
-
* This value is ignored on real devices.
|
|
133
|
-
* @property {?number|string} [speed] - Valid speed value.
|
|
134
|
-
* Should be greater than 0.0 meters/second for real devices or 0.0 knots
|
|
135
|
-
* for emulators.
|
|
136
|
-
*/
|
|
137
|
-
/**
|
|
138
|
-
* Emulate geolocation coordinates on the device under test.
|
|
139
|
-
*
|
|
140
|
-
* @this {import('../adb.js').ADB}
|
|
141
|
-
* @param {Location} location - Location object. The `altitude` value is ignored
|
|
142
|
-
* while mocking the position.
|
|
143
|
-
* @param {boolean} [isEmulator=false] - Set it to true if the device under test
|
|
144
|
-
* is an emulator rather than a real device.
|
|
145
|
-
*/
|
|
146
|
-
function setGeoLocation(this: import("../adb.js").ADB, location: Location, isEmulator?: boolean | undefined): Promise<void>;
|
|
147
|
-
/**
|
|
148
|
-
* Get the current cached GPS location from the device under test.
|
|
149
|
-
*
|
|
150
|
-
* @this {import('../adb.js').ADB}
|
|
151
|
-
* @returns {Promise<Location>} The current location
|
|
152
|
-
* @throws {Error} If the current location cannot be retrieved
|
|
153
|
-
*/
|
|
154
|
-
function getGeoLocation(this: import("../adb.js").ADB): Promise<Location>;
|
|
155
|
-
/**
|
|
156
|
-
* Sends an async request to refresh the GPS cache.
|
|
157
|
-
* This feature only works if the device under test has
|
|
158
|
-
* Google Play Services installed. In case the vanilla
|
|
159
|
-
* LocationManager is used the device API level must be at
|
|
160
|
-
* version 30 (Android R) or higher.
|
|
161
|
-
*
|
|
162
|
-
* @this {import('../adb.js').ADB}
|
|
163
|
-
* @param {number} timeoutMs The maximum number of milliseconds
|
|
164
|
-
* to block until GPS cache is refreshed. Providing zero or a negative
|
|
165
|
-
* value to it skips waiting completely.
|
|
166
|
-
*
|
|
167
|
-
* @throws {Error} If the GPS cache cannot be refreshed.
|
|
168
|
-
*/
|
|
169
|
-
function refreshGeoLocationCache(this: import("../adb.js").ADB, timeoutMs?: number): Promise<void>;
|
|
170
|
-
/**
|
|
171
|
-
* Performs the given editor action on the focused input field.
|
|
172
|
-
* This method requires Appium Settings helper to be installed on the device.
|
|
173
|
-
* No exception is thrown if there was a failure while performing the action.
|
|
174
|
-
* You must investigate the logcat output if something did not work as expected.
|
|
175
|
-
*
|
|
176
|
-
* @this {import('../adb.js').ADB}
|
|
177
|
-
* @param {string|number} action - Either action code or name. The following action
|
|
178
|
-
* names are supported: `normal, unspecified, none,
|
|
179
|
-
* go, search, send, next, done, previous`
|
|
180
|
-
*/
|
|
181
|
-
function performEditorAction(this: import("../adb.js").ADB, action: string | number): Promise<void>;
|
|
182
|
-
/**
|
|
183
|
-
* Retrieves the text content of the device's clipboard.
|
|
184
|
-
* The method works for Android below and above 29.
|
|
185
|
-
* It temorarily enforces the IME setting in order to workaround
|
|
186
|
-
* security limitations if needed.
|
|
187
|
-
* This method only works if Appium Settings v. 2.15+ is installed
|
|
188
|
-
* on the device under test
|
|
189
|
-
*
|
|
190
|
-
* @this {import('../adb.js').ADB}
|
|
191
|
-
* @returns {Promise<string>} The actual content of the main clipboard as
|
|
192
|
-
* base64-encoded string or an empty string if the clipboard is empty
|
|
193
|
-
* @throws {Error} If there was a problem while getting the
|
|
194
|
-
* clipboard contant
|
|
195
|
-
*/
|
|
196
|
-
function getClipboard(this: import("../adb.js").ADB): Promise<string>;
|
|
197
|
-
/**
|
|
198
|
-
* Retrieves Android notifications via Appium Settings helper.
|
|
199
|
-
* Appium Settings app itself must be *manually* granted to access notifications
|
|
200
|
-
* under device Settings in order to make this feature working.
|
|
201
|
-
* Appium Settings helper keeps all the active notifications plus
|
|
202
|
-
* notifications that appeared while it was running in the internal buffer,
|
|
203
|
-
* but no more than 100 items altogether. Newly appeared notifications
|
|
204
|
-
* are always added to the head of the notifications array.
|
|
205
|
-
* The `isRemoved` flag is set to `true` for notifications that have been removed.
|
|
206
|
-
*
|
|
207
|
-
* See https://developer.android.com/reference/android/service/notification/StatusBarNotification
|
|
208
|
-
* and https://developer.android.com/reference/android/app/Notification.html
|
|
209
|
-
* for more information on available notification properties and their values.
|
|
210
|
-
*
|
|
211
|
-
* @this {import('../adb.js').ADB}
|
|
212
|
-
* @returns {Promise<import('@appium/types').StringRecord>} The example output is:
|
|
213
|
-
* ```json
|
|
214
|
-
* {
|
|
215
|
-
* "statusBarNotifications":[
|
|
216
|
-
* {
|
|
217
|
-
* "isGroup":false,
|
|
218
|
-
* "packageName":"io.appium.settings",
|
|
219
|
-
* "isClearable":false,
|
|
220
|
-
* "isOngoing":true,
|
|
221
|
-
* "id":1,
|
|
222
|
-
* "tag":null,
|
|
223
|
-
* "notification":{
|
|
224
|
-
* "title":null,
|
|
225
|
-
* "bigTitle":"Appium Settings",
|
|
226
|
-
* "text":null,
|
|
227
|
-
* "bigText":"Keep this service running, so Appium for Android can properly interact with several system APIs",
|
|
228
|
-
* "tickerText":null,
|
|
229
|
-
* "subText":null,
|
|
230
|
-
* "infoText":null,
|
|
231
|
-
* "template":"android.app.Notification$BigTextStyle"
|
|
232
|
-
* },
|
|
233
|
-
* "userHandle":0,
|
|
234
|
-
* "groupKey":"0|io.appium.settings|1|null|10133",
|
|
235
|
-
* "overrideGroupKey":null,
|
|
236
|
-
* "postTime":1576853518850,
|
|
237
|
-
* "key":"0|io.appium.settings|1|null|10133",
|
|
238
|
-
* "isRemoved":false
|
|
239
|
-
* }
|
|
240
|
-
* ]
|
|
241
|
-
* }
|
|
242
|
-
* ```
|
|
243
|
-
* @throws {Error} If there was an error while getting the notifications list
|
|
244
|
-
*/
|
|
245
|
-
function getNotifications(this: import("../adb.js").ADB): Promise<import("@appium/types").StringRecord<any>>;
|
|
246
|
-
/**
|
|
247
|
-
* @typedef {Object} SmsListOptions
|
|
248
|
-
* @property {number} [max=100] - The maximum count of recent messages
|
|
249
|
-
* to retrieve
|
|
250
|
-
*/
|
|
251
|
-
/**
|
|
252
|
-
* @typedef SmsListResult
|
|
253
|
-
* @property {SmsListResultItem[]} items
|
|
254
|
-
* @property {number} total
|
|
255
|
-
*/
|
|
256
|
-
/**
|
|
257
|
-
* @privateRemarks XXX: WAG
|
|
258
|
-
* @typedef SmsListResultItem
|
|
259
|
-
* @property {string} id
|
|
260
|
-
* @property {string} address
|
|
261
|
-
* @property {string|null} person
|
|
262
|
-
* @property {string} date
|
|
263
|
-
* @property {string} read
|
|
264
|
-
* @property {string} status
|
|
265
|
-
* @property {string} type
|
|
266
|
-
* @property {string|null} subject
|
|
267
|
-
* @property {string} body
|
|
268
|
-
* @property {string|null} serviceCenter
|
|
269
|
-
*/
|
|
270
|
-
/**
|
|
271
|
-
* Retrieves the list of the most recent SMS
|
|
272
|
-
* properties list via Appium Settings helper.
|
|
273
|
-
* Messages are sorted by date in descending order.
|
|
274
|
-
*
|
|
275
|
-
* @this {import('../adb.js').ADB}
|
|
276
|
-
* @param {SmsListOptions} opts
|
|
277
|
-
* @returns {Promise<SmsListResult>} The example output is:
|
|
278
|
-
* ```json
|
|
279
|
-
* {
|
|
280
|
-
* "items":[
|
|
281
|
-
* {
|
|
282
|
-
* "id":"2",
|
|
283
|
-
* "address":"+123456789",
|
|
284
|
-
* "person":null,
|
|
285
|
-
* "date":"1581936422203",
|
|
286
|
-
* "read":"0",
|
|
287
|
-
* "status":"-1",
|
|
288
|
-
* "type":"1",
|
|
289
|
-
* "subject":null,
|
|
290
|
-
* "body":"\"text message2\"",
|
|
291
|
-
* "serviceCenter":null
|
|
292
|
-
* },
|
|
293
|
-
* {
|
|
294
|
-
* "id":"1",
|
|
295
|
-
* "address":"+123456789",
|
|
296
|
-
* "person":null,
|
|
297
|
-
* "date":"1581936382740",
|
|
298
|
-
* "read":"0",
|
|
299
|
-
* "status":"-1",
|
|
300
|
-
* "type":"1",
|
|
301
|
-
* "subject":null,
|
|
302
|
-
* "body":"\"text message\"",
|
|
303
|
-
* "serviceCenter":null
|
|
304
|
-
* }
|
|
305
|
-
* ],
|
|
306
|
-
* "total":2
|
|
307
|
-
* }
|
|
308
|
-
* ```
|
|
309
|
-
* @throws {Error} If there was an error while getting the SMS list
|
|
310
|
-
*/
|
|
311
|
-
function getSmsList(this: import("../adb.js").ADB, opts?: SmsListOptions): Promise<SmsListResult>;
|
|
312
|
-
/**
|
|
313
|
-
* Types the given Unicode string.
|
|
314
|
-
* It is expected that the focus is already put
|
|
315
|
-
* to the destination input field before this method is called.
|
|
316
|
-
*
|
|
317
|
-
* @this {import('../adb.js').ADB}
|
|
318
|
-
* @param {string} text The string to type
|
|
319
|
-
* @returns {Promise<boolean>} `true` if the input text has been successfully sent to adb
|
|
320
|
-
*/
|
|
321
|
-
function typeUnicode(this: import("../adb.js").ADB, text: string): Promise<boolean>;
|
|
322
|
-
/**
|
|
323
|
-
* Performs recursive media scan at the given destination.
|
|
324
|
-
* All successfully scanned items are being added to the device's
|
|
325
|
-
* media library.
|
|
326
|
-
*
|
|
327
|
-
* @this {import('../adb.js').ADB}
|
|
328
|
-
* @param {string} destination File/folder path on the remote device.
|
|
329
|
-
* @throws {Error} If there was an unexpected error by scanning.
|
|
330
|
-
*/
|
|
331
|
-
function scanMedia(this: import("../adb.js").ADB, destination: string): Promise<void>;
|
|
332
|
-
}
|
|
333
|
-
//# sourceMappingURL=settings-client-commands.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"settings-client-commands.d.ts","sourceRoot":"","sources":["../../../lib/tools/settings-client-commands.js"],"names":[],"mappings":";;;;;;;;;;;;;;;;;eAgOc,MAAM,GAAC,MAAM;;;;cACb,MAAM,GAAC,MAAM;;;;;;;;;;;;;;;;;;;;;;;;;WAsUb,iBAAiB,EAAE;WACnB,MAAM;;;QAMN,MAAM;aACN,MAAM;YACN,MAAM,GAAC,IAAI;UACX,MAAM;UACN,MAAM;YACN,MAAM;UACN,MAAM;aACN,MAAM,GAAC,IAAI;UACX,MAAM;mBACN,MAAM,GAAC,IAAI;;qCAsHZ,eAAe;;IAloB5B;;;;;;OAMG;IAEH;;;;;;;;OAQG;IACH,kJA0CC;IAED;;;;;;;OAOG;IACH,mHAyBC;IAED;;;;;;;OAOG;IACH,mHAsBC;IAED;;;;;;;;;;;;;OAaG;IACH,sFAOC;IAED;;;;;;;;;;OAUG;IACH,8JAcC;IAGD;;;;;;;;;;OAUG;IAEH;;;;;;;;OAQG;IACH,4HA+DC;IAED;;;;;;OAMG;IACH,0EA2BC;IAED;;;;;;;;;;;;;OAaG;IACH,mGAyDC;IAED;;;;;;;;;;OAUG;IACH,oGAIC;IAED;;;;;;;;;;;;;OAaG;IACH,sEAwBC;IAED;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;OA+CG;IACH,6GAmBC;IAED;;;;OAIG;IAEH;;;;OAIG;IAEH;;;;;;;;;;;;;OAaG;IAEH;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;OAwCG;IACH,kGAoBC;IAED;;;;;;;;OAQG;IACH,oFAcC;IAED;;;;;;;;OAQG;IACH,sFAaC"}
|