appium-uiautomator2-driver 5.0.0-rc.1 → 5.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/package.json CHANGED
@@ -7,7 +7,7 @@
7
7
  "automated testing",
8
8
  "android"
9
9
  ],
10
- "version": "5.0.0-rc.1",
10
+ "version": "5.0.0",
11
11
  "bugs": {
12
12
  "url": "https://github.com/appium/appium-uiautomator2-driver/issues"
13
13
  },
@@ -1,12 +0,0 @@
1
- /**
2
- * Retrives app strings from its resources for the given language
3
- * or the default device language.
4
- * @this {AndroidUiautomator2Driver}
5
- * @param {import('./types').GetAppStringsOptions} [opts={}]
6
- * @returns {Promise<StringRecord>}
7
- */
8
- export function mobileGetAppStrings(this: import("../driver").AndroidUiautomator2Driver, opts?: import("./types").GetAppStringsOptions): Promise<StringRecord>;
9
- export type ADB = import("appium-adb").ADB;
10
- export type StringRecord = import("@appium/types").StringRecord;
11
- export type AndroidUiautomator2Driver = import("../driver").AndroidUiautomator2Driver;
12
- //# sourceMappingURL=app-strings.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"app-strings.d.ts","sourceRoot":"","sources":["../../../lib/commands/app-strings.js"],"names":[],"mappings":"AAAA;;;;;;GAMG;AACH,gGAHW,OAAO,SAAS,EAAE,oBAAoB,GACpC,OAAO,CAAC,YAAY,CAAC,CAIjC;kBAGY,OAAO,YAAY,EAAE,GAAG;2BACxB,OAAO,eAAe,EAAE,YAAY;wCACpC,OAAO,WAAW,EAAE,yBAAyB"}
@@ -1,19 +0,0 @@
1
- "use strict";
2
- Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.mobileGetAppStrings = mobileGetAppStrings;
4
- /**
5
- * Retrives app strings from its resources for the given language
6
- * or the default device language.
7
- * @this {AndroidUiautomator2Driver}
8
- * @param {import('./types').GetAppStringsOptions} [opts={}]
9
- * @returns {Promise<StringRecord>}
10
- */
11
- async function mobileGetAppStrings(opts) {
12
- return await this.getStrings(opts?.language);
13
- }
14
- /**
15
- * @typedef {import('appium-adb').ADB} ADB
16
- * @typedef {import('@appium/types').StringRecord} StringRecord
17
- * @typedef {import('../driver').AndroidUiautomator2Driver} AndroidUiautomator2Driver
18
- */
19
- //# sourceMappingURL=app-strings.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"app-strings.js","sourceRoot":"","sources":["../../../lib/commands/app-strings.js"],"names":[],"mappings":";;AAOA,kDAEC;AATD;;;;;;GAMG;AACI,KAAK,UAAU,mBAAmB,CAAC,IAAI;IAC5C,OAAO,MAAM,IAAI,CAAC,UAAU,CAAC,IAAI,EAAE,QAAQ,CAAC,CAAC;AAC/C,CAAC;AAED;;;;GAIG"}
@@ -1,15 +0,0 @@
1
- /**
2
- * @this {AndroidUiautomator2Driver}
3
- * @returns {import('@appium/types').StringRecord<string>}
4
- */
5
- export function mobileCommandsMapping(this: import("../driver").AndroidUiautomator2Driver): import("@appium/types").StringRecord<string>;
6
- /**
7
- * @override
8
- * @this {AndroidUiautomator2Driver}
9
- * @param {string} mobileCommand
10
- * @param {import('@appium/types').StringRecord} [opts={}]
11
- * @returns {Promise<any>}
12
- */
13
- export function executeMobile(this: import("../driver").AndroidUiautomator2Driver, mobileCommand: string, opts?: import("@appium/types").StringRecord): Promise<any>;
14
- export type AndroidUiautomator2Driver = import("../driver").AndroidUiautomator2Driver;
15
- //# sourceMappingURL=execute.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"execute.d.ts","sourceRoot":"","sources":["../../../lib/commands/execute.js"],"names":[],"mappings":"AAGA;;;GAGG;AACH,4FAFa,OAAO,eAAe,EAAE,YAAY,CAAC,MAAM,CAAC,CAkDxD;AAED;;;;;;GAMG;AACH,kGAJW,MAAM,SACN,OAAO,eAAe,EAAE,YAAY,GAClC,OAAO,CAAC,GAAG,CAAC,CAIxB;wCAyBY,OAAO,WAAW,EAAE,yBAAyB"}
@@ -1,83 +0,0 @@
1
- "use strict";
2
- var __importDefault = (this && this.__importDefault) || function (mod) {
3
- return (mod && mod.__esModule) ? mod : { "default": mod };
4
- };
5
- Object.defineProperty(exports, "__esModule", { value: true });
6
- exports.mobileCommandsMapping = mobileCommandsMapping;
7
- exports.executeMobile = executeMobile;
8
- const lodash_1 = __importDefault(require("lodash"));
9
- const appium_android_driver_1 = require("appium-android-driver");
10
- /**
11
- * @this {AndroidUiautomator2Driver}
12
- * @returns {import('@appium/types').StringRecord<string>}
13
- */
14
- function mobileCommandsMapping() {
15
- const commonMapping = new appium_android_driver_1.AndroidDriver().mobileCommandsMapping.call(this);
16
- return {
17
- ...commonMapping,
18
- dragGesture: 'mobileDragGesture',
19
- flingGesture: 'mobileFlingGesture',
20
- doubleClickGesture: 'mobileDoubleClickGesture',
21
- clickGesture: 'mobileClickGesture',
22
- longClickGesture: 'mobileLongClickGesture',
23
- pinchCloseGesture: 'mobilePinchCloseGesture',
24
- pinchOpenGesture: 'mobilePinchOpenGesture',
25
- swipeGesture: 'mobileSwipeGesture',
26
- scrollGesture: 'mobileScrollGesture',
27
- scrollBackTo: 'mobileScrollBackTo',
28
- scroll: 'mobileScroll',
29
- viewportScreenshot: 'mobileViewportScreenshot',
30
- viewportRect: 'mobileViewPortRect',
31
- deepLink: 'mobileDeepLink',
32
- acceptAlert: 'mobileAcceptAlert',
33
- dismissAlert: 'mobileDismissAlert',
34
- batteryInfo: 'mobileGetBatteryInfo',
35
- deviceInfo: 'mobileGetDeviceInfo',
36
- openNotifications: 'openNotifications',
37
- type: 'mobileType',
38
- replaceElementValue: 'mobileReplaceElementValue',
39
- getAppStrings: 'mobileGetAppStrings',
40
- installMultipleApks: 'mobileInstallMultipleApks',
41
- backgroundApp: 'mobileBackgroundApp',
42
- pressKey: 'mobilePressKey',
43
- screenshots: 'mobileScreenshots',
44
- scheduleAction: 'mobileScheduleAction',
45
- getActionHistory: 'mobileGetActionHistory',
46
- unscheduleAction: 'mobileUnscheduleAction',
47
- setClipboard: 'mobileSetClipboard',
48
- getClipboard: 'mobileGetClipboard',
49
- };
50
- }
51
- /**
52
- * @override
53
- * @this {AndroidUiautomator2Driver}
54
- * @param {string} mobileCommand
55
- * @param {import('@appium/types').StringRecord} [opts={}]
56
- * @returns {Promise<any>}
57
- */
58
- async function executeMobile(mobileCommand, opts = {}) {
59
- return await new appium_android_driver_1.AndroidDriver().executeMobile.call(this, mobileCommand, preprocessOptions(opts));
60
- }
61
- // #region Internal Helpers
62
- /**
63
- * Renames the deprecated `element` key to `elementId`. Historically,
64
- * all of the pre-Execute-Method-Map execute methods accepted an `element` _or_ and `elementId` param.
65
- * This assigns the `element` value to `elementId` if `elementId` is not already present.
66
- *
67
- * @param {import('@appium/types').StringRecord} [opts={}]
68
- * @internal
69
- * @returns {import('@appium/types').StringRecord|undefined}
70
- */
71
- function preprocessOptions(opts = {}) {
72
- if (lodash_1.default.isPlainObject(opts) && !('elementId' in opts) && 'element' in opts) {
73
- opts.elementId = opts.element;
74
- delete opts.element;
75
- this.log.debug(`Replaced the obsolete 'element' key with 'elementId'`);
76
- }
77
- return opts;
78
- }
79
- // #endregion
80
- /**
81
- * @typedef {import('../driver').AndroidUiautomator2Driver} AndroidUiautomator2Driver
82
- */
83
- //# sourceMappingURL=execute.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"execute.js","sourceRoot":"","sources":["../../../lib/commands/execute.js"],"names":[],"mappings":";;;;;AAOA,sDAgDC;AASD,sCAEC;AAlED,oDAAuB;AACvB,iEAAoD;AAEpD;;;GAGG;AACH,SAAgB,qBAAqB;IACnC,MAAM,aAAa,GAAG,IAAI,qCAAa,EAAE,CAAC,qBAAqB,CAAC,IAAI,CAAC,IAAI,CAAC,CAAC;IAC3E,OAAO;QACL,GAAG,aAAa;QAChB,WAAW,EAAE,mBAAmB;QAChC,YAAY,EAAE,oBAAoB;QAClC,kBAAkB,EAAE,0BAA0B;QAC9C,YAAY,EAAE,oBAAoB;QAClC,gBAAgB,EAAE,wBAAwB;QAC1C,iBAAiB,EAAE,yBAAyB;QAC5C,gBA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