appium-android-driver 8.4.0 → 9.0.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.
@@ -1,467 +0,0 @@
1
- "use strict";
2
- /* eslint-disable @typescript-eslint/no-unused-vars */
3
- var __importDefault = (this && this.__importDefault) || function (mod) {
4
- return (mod && mod.__esModule) ? mod : { "default": mod };
5
- };
6
- Object.defineProperty(exports, "__esModule", { value: true });
7
- exports.truncateDecimals = exports.doPerformMultiAction = exports.performMultiAction = exports.performTouch = exports.doTouchAction = exports.doTouchDrag = exports.doSwipe = exports.touchMove = exports.touchUp = exports.touchDown = exports.touchLongClick = exports.tap = void 0;
8
- const support_1 = require("@appium/support");
9
- const driver_1 = require("appium/driver");
10
- const asyncbox_1 = require("asyncbox");
11
- const bluebird_1 = __importDefault(require("bluebird"));
12
- const lodash_1 = __importDefault(require("lodash"));
13
- /**
14
- * @deprecated
15
- * @this {import('../driver').AndroidDriver}
16
- * @param {string?} [elementId=null]
17
- * @param {number?} [x=null]
18
- * @param {number?} [y=null]
19
- * @param {number} [count=1]
20
- * @returns {Promise<void>}
21
- */
22
- async function tap(elementId = null, x = null, y = null, count = 1) {
23
- throw new driver_1.errors.NotImplementedError('Not implemented');
24
- }
25
- exports.tap = tap;
26
- /**
27
- * @deprecated
28
- * @this {import('../driver').AndroidDriver}
29
- * @param {string} elementId
30
- * @param {number} x
31
- * @param {number} y
32
- * @param {number} duration
33
- * @returns {Promise<void>}
34
- */
35
- async function touchLongClick(elementId, x, y, duration) {
36
- throw new driver_1.errors.NotImplementedError('Not implemented');
37
- }
38
- exports.touchLongClick = touchLongClick;
39
- /**
40
- * @deprecated
41
- * @this {import('../driver').AndroidDriver}
42
- * @param {string} elementId
43
- * @param {number} x
44
- * @param {number} y
45
- * @returns {Promise<void>}
46
- */
47
- async function touchDown(elementId, x, y) {
48
- throw new driver_1.errors.NotImplementedError('Not implemented');
49
- }
50
- exports.touchDown = touchDown;
51
- /**
52
- * @deprecated
53
- * @this {import('../driver').AndroidDriver}
54
- * @param {string} elementId
55
- * @param {number} x
56
- * @param {number} y
57
- * @returns {Promise<void>}
58
- */
59
- async function touchUp(elementId, x, y) {
60
- throw new driver_1.errors.NotImplementedError('Not implemented');
61
- }
62
- exports.touchUp = touchUp;
63
- /**
64
- * @deprecated
65
- * @this {import('../driver').AndroidDriver}
66
- * @param {string} elementId
67
- * @param {number} x
68
- * @param {number} y
69
- * @returns {Promise<void>}
70
- */
71
- async function touchMove(elementId, x, y) {
72
- throw new driver_1.errors.NotImplementedError('Not implemented');
73
- }
74
- exports.touchMove = touchMove;
75
- /**
76
- * @deprecated
77
- * @this {import('../driver').AndroidDriver}
78
- * @param {import('./types').SwipeOpts} opts
79
- * @returns {Promise<void>}
80
- */
81
- async function doSwipe(opts) {
82
- throw new driver_1.errors.NotImplementedError('Not implemented');
83
- }
84
- exports.doSwipe = doSwipe;
85
- /**
86
- * @deprecated
87
- * @this {import('../driver').AndroidDriver}
88
- * @param {import('./types').TouchDragAction} opts
89
- * @returns {Promise<void>}
90
- */
91
- async function doTouchDrag(opts) {
92
- throw new driver_1.errors.NotImplementedError('Not implemented');
93
- }
94
- exports.doTouchDrag = doTouchDrag;
95
- /**
96
- * @deprecated
97
- * @this {import('../driver').AndroidDriver}
98
- * @param {import('./types').TouchActionKind} action
99
- * @param {import('./types').TouchActionOpts} [opts={}]
100
- * @returns {Promise<void>}
101
- */
102
- async function doTouchAction(action, opts = {}) {
103
- const { element, x, y, count, ms, duration } = opts;
104
- // parseTouch precalculates absolute element positions
105
- // so there is no need to pass `element` to the affected gestures
106
- switch (action) {
107
- case 'tap':
108
- return await this.tap('', x, y, count);
109
- case 'press':
110
- return await this.touchDown('', /** @type {number} */ (x), /** @type {number} */ (y));
111
- case 'release':
112
- return await this.touchUp(String(element),
113
- /** @type {number} */ (x),
114
- /** @type {number} */ (y));
115
- case 'moveTo':
116
- return await this.touchMove('', /** @type {number} */ (x), /** @type {number} */ (y));
117
- case 'wait':
118
- return await bluebird_1.default.delay(/** @type {number} */ (ms));
119
- case 'longPress':
120
- return await this.touchLongClick('',
121
- /** @type {number} */ (x),
122
- /** @type {number} */ (y), duration ?? 1000);
123
- case 'cancel':
124
- // TODO: clarify behavior of 'cancel' action and fix this
125
- this.log.warn('Cancel action currently has no effect');
126
- break;
127
- default:
128
- this.log.errorAndThrow(`unknown action ${action}`);
129
- }
130
- }
131
- exports.doTouchAction = doTouchAction;
132
- /**
133
- * @deprecated
134
- * @this {import('../driver').AndroidDriver}
135
- * @param {import('./types').TouchAction[]} gestures
136
- * @returns {Promise<void>}
137
- */
138
- async function performTouch(gestures) {
139
- // press-wait-moveTo-release is `swipe`, so use native method
140
- if (gestures.length === 4 &&
141
- gestures[0].action === 'press' &&
142
- gestures[1].action === 'wait' &&
143
- gestures[2].action === 'moveTo' &&
144
- gestures[3].action === 'release') {
145
- let swipeOpts = await getSwipeOptions.bind(this)(
146
- /** @type {import('./types').SwipeAction} */ (gestures));
147
- return await this.doSwipe(swipeOpts);
148
- }
149
- let actions = /** @type {(import('./types').TouchActionKind|TouchAction)[]} */ (lodash_1.default.map(gestures, 'action'));
150
- if (actions[0] === 'longPress' && actions[1] === 'moveTo' && actions[2] === 'release') {
151
- // some things are special
152
- return await this.doTouchDrag(/** @type {import('./types').TouchDragAction} */ (gestures));
153
- }
154
- else {
155
- if (actions.length === 2) {
156
- // `press` without a wait is too slow and gets interpretted as a `longPress`
157
- if (lodash_1.default.head(actions) === 'press' && lodash_1.default.last(actions) === 'release') {
158
- actions[0] = 'tap';
159
- gestures[0].action = 'tap';
160
- }
161
- // the `longPress` and `tap` methods release on their own
162
- if ((lodash_1.default.head(actions) === 'tap' || lodash_1.default.head(actions) === 'longPress') &&
163
- lodash_1.default.last(actions) === 'release') {
164
- gestures.pop();
165
- actions.pop();
166
- }
167
- }
168
- else {
169
- // longpress followed by anything other than release should become a press and wait
170
- if (actions[0] === 'longPress') {
171
- actions = ['press', 'wait', ...actions.slice(1)];
172
- let press = /** @type {NonReleaseTouchAction} */ (gestures.shift());
173
- press.action = 'press';
174
- /** @type {NonReleaseTouchAction} */
175
- let wait = {
176
- action: 'wait',
177
- options: { ms: press.options.duration || 1000 },
178
- };
179
- delete press.options.duration;
180
- gestures = [press, wait, ...gestures];
181
- }
182
- }
183
- let fixedGestures = await parseTouch.bind(this)(gestures, false);
184
- // fix release action then perform all actions
185
- if (actions[actions.length - 1] === 'release') {
186
- actions[actions.length - 1] = /** @type {TouchAction} */ (await fixRelease.bind(this)(gestures));
187
- }
188
- for (let g of fixedGestures) {
189
- await performGesture.bind(this)(g);
190
- }
191
- }
192
- }
193
- exports.performTouch = performTouch;
194
- /**
195
- * @deprecated
196
- * @this {import('../driver').AndroidDriver}
197
- * @param {import('./types').TouchAction[]} actions
198
- * @param {string} elementId
199
- * @returns {Promise<void>}
200
- */
201
- async function performMultiAction(actions, elementId) {
202
- // Android needs at least two actions to be able to perform a multi pointer gesture
203
- if (actions.length === 1) {
204
- throw new Error('Multi Pointer Gestures need at least two actions. ' +
205
- 'Use Touch Actions for a single action.');
206
- }
207
- const states = await (0, asyncbox_1.asyncmap)(actions, async (action) => await parseTouch.bind(this)(action, true), false);
208
- return await this.doPerformMultiAction(elementId, states);
209
- }
210
- exports.performMultiAction = performMultiAction;
211
- /**
212
- * @deprecated
213
- * @this {import('../driver').AndroidDriver}
214
- * @param {string} elementId
215
- * @param {import('./types').TouchState[]} states
216
- * @returns {Promise<void>}
217
- */
218
- async function doPerformMultiAction(elementId, states) {
219
- throw new driver_1.errors.NotImplementedError('Not implemented');
220
- }
221
- exports.doPerformMultiAction = doPerformMultiAction;
222
- // #region Internal helpers
223
- /**
224
- * @deprecated
225
- * @param {number|null} [val]
226
- * @returns {number}
227
- */
228
- function getCoordDefault(val) {
229
- // going the long way and checking for undefined and null since
230
- // we can't be assured `elId` is a string and not an int. Same
231
- // thing with destElement below.
232
- return support_1.util.hasValue(val) ? val : 0.5;
233
- }
234
- /**
235
- * @deprecated
236
- * @param {number} number
237
- * @param {number} digits
238
- * @returns {number}
239
- */
240
- function truncateDecimals(number, digits) {
241
- const multiplier = Math.pow(10, digits), adjustedNum = number * multiplier, truncatedNum = Math[adjustedNum < 0 ? 'ceil' : 'floor'](adjustedNum);
242
- return truncatedNum / multiplier;
243
- }
244
- exports.truncateDecimals = truncateDecimals;
245
- /**
246
- * @deprecated
247
- * @param {NonReleaseTouchAction} waitGesture
248
- * @returns {number}
249
- */
250
- function getSwipeTouchDuration(waitGesture) {
251
- // the touch action api uses ms, we want seconds
252
- // 0.8 is the default time for the operation
253
- let duration = 0.8;
254
- if (typeof waitGesture.options.ms !== 'undefined' && waitGesture.options.ms) {
255
- duration = waitGesture.options.ms / 1000;
256
- if (duration === 0) {
257
- // set to a very low number, since they wanted it fast
258
- // but below 0.1 becomes 0 steps, which causes errors
259
- duration = 0.1;
260
- }
261
- }
262
- return duration;
263
- }
264
- /**
265
- * @deprecated
266
- * @this {import('../driver').AndroidDriver}
267
- * @param {import('./types').SwipeAction} gestures
268
- * @param {number} [touchCount=1]
269
- * @returns {Promise<import('./types').TouchSwipeOpts>}
270
- */
271
- async function getSwipeOptions(gestures, touchCount = 1) {
272
- let startX = getCoordDefault(gestures[0].options.x), startY = getCoordDefault(gestures[0].options.y), endX = getCoordDefault(gestures[2].options.x), endY = getCoordDefault(gestures[2].options.y), duration = getSwipeTouchDuration(gestures[1]), element = /** @type {string} */ (gestures[0].options.element), destElement = gestures[2].options.element || gestures[0].options.element;
273
- // there's no destination element handling in bootstrap and since it applies to all platforms, we handle it here
274
- if (support_1.util.hasValue(destElement)) {
275
- let locResult = await this.getLocationInView(destElement);
276
- let sizeResult = await this.getSize(destElement);
277
- let offsetX = Math.abs(endX) < 1 && Math.abs(endX) > 0 ? sizeResult.width * endX : endX;
278
- let offsetY = Math.abs(endY) < 1 && Math.abs(endY) > 0 ? sizeResult.height * endY : endY;
279
- endX = locResult.x + offsetX;
280
- endY = locResult.y + offsetY;
281
- // if the target element was provided, the coordinates for the destination need to be relative to it.
282
- if (support_1.util.hasValue(element)) {
283
- let firstElLocation = await this.getLocationInView(element);
284
- endX -= firstElLocation.x;
285
- endY -= firstElLocation.y;
286
- }
287
- }
288
- // clients are responsible to use these options correctly
289
- return { startX, startY, endX, endY, duration, touchCount, element };
290
- }
291
- /**
292
- * @deprecated
293
- * @this {import('../driver').AndroidDriver}
294
- * @param {import('./types').TouchAction[]} gestures
295
- * @param {boolean} [multi]
296
- * @returns {Promise<import('./types').TouchState[]>}
297
- */
298
- async function parseTouch(gestures, multi) {
299
- // because multi-touch releases at the end by default
300
- if (multi && /** @type {TouchAction} */ (lodash_1.default.last(gestures)).action === 'release') {
301
- gestures.pop();
302
- }
303
- let touchStateObjects = await (0, asyncbox_1.asyncmap)(gestures, async (gesture) => {
304
- let options = gesture.options || {};
305
- if (lodash_1.default.includes(['press', 'moveTo', 'tap', 'longPress'], gesture.action)) {
306
- options.offset = false;
307
- let elementId = gesture.options.element;
308
- if (elementId) {
309
- let pos = await this.getLocationInView(elementId);
310
- if (gesture.options.x || gesture.options.y) {
311
- options.x = pos.x + (gesture.options.x || 0);
312
- options.y = pos.y + (gesture.options.y || 0);
313
- }
314
- else {
315
- const { width, height } = await this.getSize(elementId);
316
- options.x = pos.x + width / 2;
317
- options.y = pos.y + height / 2;
318
- }
319
- let touchStateObject = {
320
- action: gesture.action,
321
- options,
322
- timeOffset: 0.005,
323
- };
324
- return touchStateObject;
325
- }
326
- else {
327
- options.x = gesture.options.x || 0;
328
- options.y = gesture.options.y || 0;
329
- let touchStateObject = {
330
- action: gesture.action,
331
- options,
332
- timeOffset: 0.005,
333
- };
334
- return touchStateObject;
335
- }
336
- }
337
- else {
338
- let offset = 0.005;
339
- if (gesture.action === 'wait') {
340
- options = gesture.options;
341
- offset = parseInt(gesture.options.ms, 10) / 1000;
342
- }
343
- let touchStateObject = {
344
- action: gesture.action,
345
- options,
346
- timeOffset: offset,
347
- };
348
- return touchStateObject;
349
- }
350
- }, false);
351
- // we need to change the time (which is now an offset)
352
- // and the position (which may be an offset)
353
- let prevPos = null, time = 0;
354
- for (let state of touchStateObjects) {
355
- if (lodash_1.default.isUndefined(state.options.x) && lodash_1.default.isUndefined(state.options.y) && prevPos !== null) {
356
- // this happens with wait
357
- state.options.x = prevPos.x;
358
- state.options.y = prevPos.y;
359
- }
360
- if (state.options.offset && prevPos) {
361
- // the current position is an offset
362
- state.options.x += prevPos.x;
363
- state.options.y += prevPos.y;
364
- }
365
- delete state.options.offset;
366
- if (!lodash_1.default.isUndefined(state.options.x) && !lodash_1.default.isUndefined(state.options.y)) {
367
- prevPos = state.options;
368
- }
369
- if (multi) {
370
- let timeOffset = state.timeOffset;
371
- time += timeOffset;
372
- state.time = truncateDecimals(time, 3);
373
- // multi gestures require 'touch' rather than 'options'
374
- if (!lodash_1.default.isUndefined(state.options.x) && !lodash_1.default.isUndefined(state.options.y)) {
375
- state.touch = {
376
- x: state.options.x,
377
- y: state.options.y,
378
- };
379
- }
380
- delete state.options;
381
- }
382
- delete state.timeOffset;
383
- }
384
- return touchStateObjects;
385
- }
386
- /**
387
- * @deprecated
388
- * @this {import('../driver').AndroidDriver}
389
- * @param {import('./types').TouchAction[]} gestures
390
- * @returns {Promise<import('./types').ReleaseTouchAction|undefined>}
391
- */
392
- async function fixRelease(gestures) {
393
- let release = /** @type {import('./types').ReleaseTouchAction} */ (lodash_1.default.last(gestures));
394
- // sometimes there are no options
395
- release.options = release.options || {};
396
- // nothing to do if release options are already set
397
- if (release.options.element || (release.options.x && release.options.y)) {
398
- return;
399
- }
400
- // without coordinates, `release` uses the center of the screen, which,
401
- // generally speaking, is not what we want
402
- // therefore: loop backwards and use the last command with an element and/or
403
- // offset coordinates
404
- gestures = lodash_1.default.clone(gestures);
405
- let ref = null;
406
- for (let gesture of /** @type {NonReleaseTouchAction[]} */ (gestures.reverse())) {
407
- let opts = gesture.options;
408
- if (opts.element || (opts.x && opts.y)) {
409
- ref = gesture;
410
- break;
411
- }
412
- }
413
- if (ref) {
414
- let opts = ref.options;
415
- if (opts.element) {
416
- let loc = await this.getLocationInView(opts.element);
417
- if (opts.x && opts.y) {
418
- // this is an offset from the element
419
- release.options = {
420
- x: loc.x + opts.x,
421
- y: loc.y + opts.y,
422
- };
423
- }
424
- else {
425
- // this is the center of the element
426
- let size = await this.getSize(opts.element);
427
- release.options = {
428
- x: loc.x + size.width / 2,
429
- y: loc.y + size.height / 2,
430
- };
431
- }
432
- }
433
- else {
434
- release.options = lodash_1.default.pick(opts, 'x', 'y');
435
- }
436
- }
437
- return release;
438
- }
439
- /**
440
- * @deprecated
441
- * @this {import('../driver').AndroidDriver}
442
- * @param {import('./types').TouchAction} gesture
443
- * @returns {Promise<void>}
444
- */
445
- async function performGesture(gesture) {
446
- try {
447
- return await this.doTouchAction(gesture.action, gesture.options || {});
448
- }
449
- catch (e) {
450
- // sometime the element is not available when releasing, retry without it
451
- if ((0, driver_1.isErrorType)(e, driver_1.errors.NoSuchElementError) &&
452
- gesture.action === 'release' &&
453
- gesture.options?.element) {
454
- delete gesture.options.element;
455
- this.log.debug(`retrying release without element opts: ${gesture.options}.`);
456
- return await this.doTouchAction(gesture.action, gesture.options || {});
457
- }
458
- throw e;
459
- }
460
- }
461
- // #endregion
462
- /**
463
- * @typedef {import('appium-adb').ADB} ADB
464
- * @typedef {import('./types').TouchAction} TouchAction
465
- * @typedef {import('./types').NonReleaseTouchAction} NonReleaseTouchAction
466
- */
467
- //# sourceMappingURL=touch.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"touch.js","sourceRoot":"","sources":["../../../lib/commands/touch.js"],"names":[],"mappings":";AAAA,sDAAsD;;;;;;AAEtD,6CAAqC;AACrC,0CAAkD;AAClD,uCAAkC;AAClC,wDAAyB;AACzB,oDAAuB;AAEvB;;;;;;;;GAQG;AACI,KAAK,UAAU,GAAG,CAAC,SAAS,GAAG,IAAI,EAAE,CAAC,GAAG,IAAI,EAAE,CAAC,GAAG,IAAI,EAAE,KAAK,GAAG,C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