appium-uiautomator2-driver 3.5.6 → 3.6.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 +12 -0
- package/README.md +32 -6
- package/build/lib/commands/actions.d.ts +3 -3
- package/build/lib/commands/actions.d.ts.map +1 -1
- package/build/lib/commands/actions.js +5 -6
- package/build/lib/commands/actions.js.map +1 -1
- package/build/lib/commands/alert.d.ts +1 -1
- package/build/lib/commands/alert.d.ts.map +1 -1
- package/build/lib/commands/alert.js +5 -6
- package/build/lib/commands/alert.js.map +1 -1
- package/build/lib/commands/app-management.d.ts +3 -3
- package/build/lib/commands/app-management.d.ts.map +1 -1
- package/build/lib/commands/app-management.js +2 -3
- package/build/lib/commands/app-management.js.map +1 -1
- package/build/lib/commands/app-strings.d.ts +3 -3
- package/build/lib/commands/app-strings.d.ts.map +1 -1
- package/build/lib/commands/app-strings.js +1 -2
- package/build/lib/commands/app-strings.js.map +1 -1
- package/build/lib/commands/battery.d.ts +3 -3
- package/build/lib/commands/battery.d.ts.map +1 -1
- package/build/lib/commands/battery.js +1 -2
- package/build/lib/commands/battery.js.map +1 -1
- package/build/lib/commands/element.d.ts +7 -7
- package/build/lib/commands/element.d.ts.map +1 -1
- package/build/lib/commands/element.js +16 -17
- package/build/lib/commands/element.js.map +1 -1
- package/build/lib/commands/execute.d.ts +2 -2
- package/build/lib/commands/execute.d.ts.map +1 -1
- package/build/lib/commands/execute.js +2 -3
- package/build/lib/commands/execute.js.map +1 -1
- package/build/lib/commands/find.d.ts +3 -3
- package/build/lib/commands/find.d.ts.map +1 -1
- package/build/lib/commands/find.js +1 -2
- package/build/lib/commands/find.js.map +1 -1
- package/build/lib/commands/gestures.d.ts +9 -9
- package/build/lib/commands/gestures.d.ts.map +1 -1
- package/build/lib/commands/gestures.js +11 -12
- package/build/lib/commands/gestures.js.map +1 -1
- package/build/lib/commands/keyboard.d.ts +4 -4
- package/build/lib/commands/keyboard.d.ts.map +1 -1
- package/build/lib/commands/keyboard.js +6 -7
- package/build/lib/commands/keyboard.js.map +1 -1
- package/build/lib/commands/misc.d.ts +5 -5
- package/build/lib/commands/misc.d.ts.map +1 -1
- package/build/lib/commands/misc.js +7 -8
- package/build/lib/commands/misc.js.map +1 -1
- package/build/lib/commands/navigation.d.ts +2 -2
- package/build/lib/commands/navigation.d.ts.map +1 -1
- package/build/lib/commands/navigation.js +3 -4
- package/build/lib/commands/navigation.js.map +1 -1
- package/build/lib/commands/screenshot.d.ts +2 -2
- package/build/lib/commands/screenshot.d.ts.map +1 -1
- package/build/lib/commands/screenshot.js +4 -5
- package/build/lib/commands/screenshot.js.map +1 -1
- package/build/lib/commands/viewport.d.ts +5 -5
- package/build/lib/commands/viewport.d.ts.map +1 -1
- package/build/lib/commands/viewport.js +7 -8
- package/build/lib/commands/viewport.js.map +1 -1
- package/build/lib/constraints.d.ts +3 -0
- package/build/lib/constraints.d.ts.map +1 -1
- package/build/lib/css-converter.d.ts +4 -4
- package/build/lib/driver.d.ts.map +1 -1
- package/build/lib/helpers.d.ts +1 -1
- package/build/lib/helpers.d.ts.map +1 -1
- package/build/lib/helpers.js +2 -3
- package/build/lib/helpers.js.map +1 -1
- package/build/lib/uiautomator2.d.ts +39 -2
- package/build/lib/uiautomator2.d.ts.map +1 -1
- package/build/lib/uiautomator2.js +43 -7
- package/build/lib/uiautomator2.js.map +1 -1
- package/build/tsconfig.tsbuildinfo +1 -1
- package/lib/uiautomator2.js +47 -7
- package/npm-shrinkwrap.json +49 -31
- package/package.json +2 -2
package/CHANGELOG.md
CHANGED
|
@@ -1,3 +1,15 @@
|
|
|
1
|
+
## [3.6.0](https://github.com/appium/appium-uiautomator2-driver/compare/v3.5.7...v3.6.0) (2024-06-22)
|
|
2
|
+
|
|
3
|
+
### Features
|
|
4
|
+
|
|
5
|
+
* Document injectedImageProperties capability ([#798](https://github.com/appium/appium-uiautomator2-driver/issues/798)) ([48e3255](https://github.com/appium/appium-uiautomator2-driver/commit/48e3255eff9c3c0a6cd075f2a279ed1937664844))
|
|
6
|
+
|
|
7
|
+
## [3.5.7](https://github.com/appium/appium-uiautomator2-driver/compare/v3.5.6...v3.5.7) (2024-06-22)
|
|
8
|
+
|
|
9
|
+
### Bug Fixes
|
|
10
|
+
|
|
11
|
+
* uninstall installed uia2 servers if they were greater than on-going session ([#796](https://github.com/appium/appium-uiautomator2-driver/issues/796)) ([62b9056](https://github.com/appium/appium-uiautomator2-driver/commit/62b9056f4002d42d16a469709e03f43af6aec5a5))
|
|
12
|
+
|
|
1
13
|
## [3.5.6](https://github.com/appium/appium-uiautomator2-driver/compare/v3.5.5...v3.5.6) (2024-06-18)
|
|
2
14
|
|
|
3
15
|
### Miscellaneous Chores
|
package/README.md
CHANGED
|
@@ -127,6 +127,7 @@ appium:avdEnv | Mapping of emulator [environment variables](https://developer.an
|
|
|
127
127
|
appium:networkSpeed | Sets the desired network speed limit for the emulator. It is only applied if the emulator is not running before the test starts. See emulator [command line arguments](https://developer.android.com/studio/run/emulator-commandline) description for more details.
|
|
128
128
|
appium:gpsEnabled | Sets whether to enable (`true`) or disable (`false`) GPS service in the Emulator. Unset by default, which means to not change the current value
|
|
129
129
|
appium:isHeadless | If set to `true` then emulator starts in headless mode (e.g. no UI is shown). It is only applied if the emulator is not running before the test starts. `false` by default.
|
|
130
|
+
appium:injectedImageProperties | Allows adjusting of injected image properties, like size, position or rotation. The image itself is expected to be injected by [mobile: injectEmulatorCameraImage](#mobile-injectemulatorcameraimage) extension. It is also mandatory to provide this capability if you are going to use the injection feature on a newly created/resetted emulator as it __enforces emulator restart__, so it could properly reload the modified image properties. The value itself is a map, where possible keys are `size`, `position` and `rotation`. All of them are optional. If any of values is not provided then the following defaults are used: `{size: {scaleX: 1, scaleY: 1}, position: {0, 0, -1.5}, rotation: {0, 0, 0}}`. The `size` value contains scale multipliers for X and Y axes. The `position` contains normalized coefficients for X/Y/Z axes, where `0` means it should be centered in the viewport. Values in the `rotation` are measured in degrees respectively for X, Y and Z axis. The capability is available since the driver version 3.6.0.
|
|
130
131
|
|
|
131
132
|
### App Signing
|
|
132
133
|
|
|
@@ -1489,10 +1490,8 @@ level | 'COMPLETE' or 'MODERATE' or 'BACKGROUND' or 'UI_HIDDEN' or 'RUNNING_CRIT
|
|
|
1489
1490
|
### mobile: injectEmulatorCameraImage
|
|
1490
1491
|
|
|
1491
1492
|
Simulates an image injection into the VirtualScene emulator camera background.
|
|
1492
|
-
|
|
1493
|
-
|
|
1494
|
-
for the first time as it modifies global emulator's virtual scene settings.
|
|
1495
|
-
All the further calls should seamlessly change the foreground picture to the supplied one.
|
|
1493
|
+
Calls to this extension should seamlessly change the foreground picture
|
|
1494
|
+
in the VirtualScene emulator camera view to the supplied one.
|
|
1496
1495
|
This extension could, for example, be useful if you need to verify QR codes scanning
|
|
1497
1496
|
by the application under test.
|
|
1498
1497
|
Available since driver version 3.2.0
|
|
@@ -1503,6 +1502,33 @@ Name | Type | Required | Description | Example
|
|
|
1503
1502
|
--- | --- | --- | --- | ---
|
|
1504
1503
|
payload | string | yes | A valid base64-encoded .PNG image payload. Other image formats are not supported. This image will be shown on the virtual scene foreground as soon as you open a camera client app. | iVBORw0KGgoAAAANSUh...
|
|
1505
1504
|
|
|
1505
|
+
#### Required Preconditions
|
|
1506
|
+
|
|
1507
|
+
This feature only works on Android emulators.
|
|
1508
|
+
It is mandatory to provide a value (it could also be an empty map to use defaults) to
|
|
1509
|
+
the [appium:injectedImageProperties capability](#emulator-android-virtual-device)
|
|
1510
|
+
in order to prepare the emulator for image injection if this extension is used
|
|
1511
|
+
on a newly created or resetted device.
|
|
1512
|
+
There is also a possiblity to perform a manual configuration of the necessary preconditions
|
|
1513
|
+
if you don't want to restart the emulator on session startup. For that replace the content
|
|
1514
|
+
of the `Toren1BD.posters` file located in `$ANDROID_HOME/emulator/resources` folder with the
|
|
1515
|
+
following text:
|
|
1516
|
+
```
|
|
1517
|
+
poster wall
|
|
1518
|
+
size 2 2
|
|
1519
|
+
position -0.807 0.320 5.316
|
|
1520
|
+
rotation 0 -150 0
|
|
1521
|
+
default poster.png
|
|
1522
|
+
|
|
1523
|
+
poster table
|
|
1524
|
+
size 1 1
|
|
1525
|
+
position 0 0 -1.5
|
|
1526
|
+
rotation 0 0 0
|
|
1527
|
+
```
|
|
1528
|
+
Save the changed file and re(start) the emulator to pick up the changes.
|
|
1529
|
+
You may also customize values for different image properties under `poster table` in the above
|
|
1530
|
+
text snippet.
|
|
1531
|
+
|
|
1506
1532
|
### mobile: bluetooth
|
|
1507
1533
|
|
|
1508
1534
|
Allows to control the bluetooth adapter in the device under test.
|
|
@@ -1796,10 +1822,10 @@ It is worth to try out this idea if `chrome://inspect` or [mobile: getContexts](
|
|
|
1796
1822
|
# Ruby
|
|
1797
1823
|
# Change the context to WebView (Attach to a chromedriver session)
|
|
1798
1824
|
driver.set_context('WEBVIEW_XYZ')
|
|
1799
|
-
|
|
1825
|
+
|
|
1800
1826
|
# Get available tabs/windows in the chrome instance
|
|
1801
1827
|
driver.window_handles
|
|
1802
|
-
|
|
1828
|
+
|
|
1803
1829
|
# Change the tab/window in the "chrome" instance
|
|
1804
1830
|
driver.switch_to.window('a window_handle name')
|
|
1805
1831
|
|
|
@@ -11,7 +11,7 @@ export function mobileScheduleAction(this: import("../driver").AndroidUiautomato
|
|
|
11
11
|
* @param {import('./types').ActionArgs} [opts={}]
|
|
12
12
|
* @returns {Promise<import('./types').ActionResult>}
|
|
13
13
|
*/
|
|
14
|
-
export function mobileGetActionHistory(this: import("../driver").AndroidUiautomator2Driver, opts?: import("./types").ActionArgs | undefined): Promise<import(
|
|
14
|
+
export function mobileGetActionHistory(this: import("../driver").AndroidUiautomator2Driver, opts?: import("./types").ActionArgs | undefined): Promise<import("./types").ActionResult>;
|
|
15
15
|
/**
|
|
16
16
|
* @this {AndroidUiautomator2Driver}
|
|
17
17
|
* @see https://github.com/appium/appium-uiautomator2-driver/blob/master/docs/scheduled-actions.md#mobile-unscheduleaction
|
|
@@ -24,11 +24,11 @@ export function mobileUnscheduleAction(this: import("../driver").AndroidUiautoma
|
|
|
24
24
|
* @param {import('@appium/types').StringRecord[]} actions
|
|
25
25
|
* @returns {Promise<void>}
|
|
26
26
|
*/
|
|
27
|
-
export function performActions(this: import("../driver").AndroidUiautomator2Driver, actions: import(
|
|
27
|
+
export function performActions(this: import("../driver").AndroidUiautomator2Driver, actions: import("@appium/types").StringRecord[]): Promise<void>;
|
|
28
28
|
/**
|
|
29
29
|
* @this {AndroidUiautomator2Driver}
|
|
30
30
|
* @returns {Promise<void>}
|
|
31
31
|
*/
|
|
32
32
|
export function releaseActions(this: import("../driver").AndroidUiautomator2Driver): Promise<void>;
|
|
33
|
-
export type AndroidUiautomator2Driver = import(
|
|
33
|
+
export type AndroidUiautomator2Driver = import("../driver").AndroidUiautomator2Driver;
|
|
34
34
|
//# sourceMappingURL=actions.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"actions.d.ts","sourceRoot":"","sources":["../../../lib/commands/actions.js"],"names":[],"mappings":"AAAA;;;;;GAKG;AACH,mIAFa,
|
|
1
|
+
{"version":3,"file":"actions.d.ts","sourceRoot":"","sources":["../../../lib/commands/actions.js"],"names":[],"mappings":"AAAA;;;;;GAKG;AACH,mIAFa,OAAO,CAAC,GAAG,CAAC,CAQxB;AAED;;;;;GAKG;AACH,8IAFa,OAAO,CAAC,OAAO,SAAS,EAAE,YAAY,CAAC,CAUnD;AAED;;;;;GAKG;AACH,8IAFa,OAAO,CAAC,GAAG,CAAC,CAQxB;AAED;;;;GAIG;AACH,6FAHW,OAAO,eAAe,EAAE,YAAY,EAAE,GACpC,OAAO,CAAC,IAAI,CAAC,CAyBzB;AAED;;;GAGG;AAEH,qFAHa,OAAO,CAAC,IAAI,CAAC,CAKzB;wCAGY,OAAO,WAAW,EAAE,yBAAyB"}
|
|
@@ -1,6 +1,10 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.
|
|
3
|
+
exports.mobileScheduleAction = mobileScheduleAction;
|
|
4
|
+
exports.mobileGetActionHistory = mobileGetActionHistory;
|
|
5
|
+
exports.mobileUnscheduleAction = mobileUnscheduleAction;
|
|
6
|
+
exports.performActions = performActions;
|
|
7
|
+
exports.releaseActions = releaseActions;
|
|
4
8
|
/**
|
|
5
9
|
* See https://github.com/appium/appium-uiautomator2-driver/blob/master/docs/scheduled-actions.md#mobile-scheduleaction
|
|
6
10
|
* @this {AndroidUiautomator2Driver}
|
|
@@ -10,7 +14,6 @@ exports.releaseActions = exports.performActions = exports.mobileUnscheduleAction
|
|
|
10
14
|
async function mobileScheduleAction(opts = {}) {
|
|
11
15
|
return await this.uiautomator2.jwproxy.command('/appium/schedule_action', 'POST', opts);
|
|
12
16
|
}
|
|
13
|
-
exports.mobileScheduleAction = mobileScheduleAction;
|
|
14
17
|
/**
|
|
15
18
|
* @see https://github.com/appium/appium-uiautomator2-driver/blob/master/docs/scheduled-actions.md#mobile-getactionhistory
|
|
16
19
|
* @this {AndroidUiautomator2Driver}
|
|
@@ -20,7 +23,6 @@ exports.mobileScheduleAction = mobileScheduleAction;
|
|
|
20
23
|
async function mobileGetActionHistory(opts) {
|
|
21
24
|
return /** @type {import('./types').ActionResult} */ (await this.uiautomator2.jwproxy.command('/appium/action_history', 'POST', opts ?? {}));
|
|
22
25
|
}
|
|
23
|
-
exports.mobileGetActionHistory = mobileGetActionHistory;
|
|
24
26
|
/**
|
|
25
27
|
* @this {AndroidUiautomator2Driver}
|
|
26
28
|
* @see https://github.com/appium/appium-uiautomator2-driver/blob/master/docs/scheduled-actions.md#mobile-unscheduleaction
|
|
@@ -30,7 +32,6 @@ exports.mobileGetActionHistory = mobileGetActionHistory;
|
|
|
30
32
|
async function mobileUnscheduleAction(opts) {
|
|
31
33
|
return await this.uiautomator2.jwproxy.command('/appium/unschedule_action', 'POST', opts ?? {});
|
|
32
34
|
}
|
|
33
|
-
exports.mobileUnscheduleAction = mobileUnscheduleAction;
|
|
34
35
|
/**
|
|
35
36
|
* @this {AndroidUiautomator2Driver}
|
|
36
37
|
* @param {import('@appium/types').StringRecord[]} actions
|
|
@@ -50,7 +51,6 @@ async function performActions(actions) {
|
|
|
50
51
|
actions: preprocessedActions,
|
|
51
52
|
});
|
|
52
53
|
}
|
|
53
|
-
exports.performActions = performActions;
|
|
54
54
|
/**
|
|
55
55
|
* @this {AndroidUiautomator2Driver}
|
|
56
56
|
* @returns {Promise<void>}
|
|
@@ -59,7 +59,6 @@ exports.performActions = performActions;
|
|
|
59
59
|
async function releaseActions() {
|
|
60
60
|
this.log.info('On this platform, releaseActions is a no-op');
|
|
61
61
|
}
|
|
62
|
-
exports.releaseActions = releaseActions;
|
|
63
62
|
/**
|
|
64
63
|
* @typedef {import('../driver').AndroidUiautomator2Driver} AndroidUiautomator2Driver
|
|
65
64
|
*/
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"actions.js","sourceRoot":"","sources":["../../../lib/commands/actions.js"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"actions.js","sourceRoot":"","sources":["../../../lib/commands/actions.js"],"names":[],"mappings":";;AAMA,oDAMC;AAQD,wDAQC;AAQD,wDAMC;AAOD,wCAuBC;AAOD,wCAEC;AAjFD;;;;;GAKG;AACI,KAAK,UAAU,oBAAoB,CAAC,IAAI,GAAG,EAAE;IAClD,OAAO,MAAM,IAAI,CAAC,YAAY,CAAC,OAAO,CAAC,OAAO,CAC5C,yBAAyB,EACzB,MAAM,EACN,IAAI,CACL,CAAC;AACJ,CAAC;AAED;;;;;GAKG;AACI,KAAK,UAAU,sBAAsB,CAAC,IAAI;IAC/C,OAAO,6CAA6C,CAAC,CACnD,MAAM,IAAI,CAAC,YAAY,CAAC,OAAO,CAAC,OAAO,CACrC,wBAAwB,EACxB,MAAM,EACN,IAAI,IAAI,EAAE,CACX,CACF,CAAC;AACJ,CAAC;AAED;;;;;GAKG;AACI,KAAK,UAAU,sBAAsB,CAAC,IAAI;IAC/C,OAAO,MAAM,IAAI,CAAC,YAAY,CAAC,OAAO,CAAC,OAAO,CAC5C,2BAA2B,EAC3B,MAAM,EACN,IAAI,IAAI,EAAE,CACX,CAAC;AACJ,CAAC;AAED;;;;GAIG;AACI,KAAK,UAAU,cAAc,CAAC,OAAO;IAC1C,+EAA+E;IAC/E,MAAM,mBAAmB,GAAG,OAAO,CAAC,GAAG,CAAC,CAAC,MAAM,EAAE,EAAE,CACjD,MAAM,CAAC,MAAM,CACX,EAAE,EACF,MAAM,EACN,MAAM,CAAC,IAAI,KAAK,SAAS;QACvB,CAAC,CAAC;YACE,UAAU,EAAE;gBACV,WAAW,EAAE,OAAO;aACrB;SACF;QACH,CAAC,CAAC,EAAE,CACP,CACF,CAAC;IACF,IAAI,CAAC,GAAG,CAAC,KAAK,CAAC,yBAAyB,IAAI,CAAC,SAAS,CAAC,mBAAmB,EAAE,IAAI,EAAE,IAAI,CAAC,EAAE,CAAC,CAAC;IAC3F,MAAM,IAAI,CAAC,YAAY,CAAC,OAAO,CAAC,OAAO,CACrC,UAAU,EACV,MAAM,EACN;QACE,OAAO,EAAE,mBAAmB;KAC7B,CACF,CAAC;AACJ,CAAC;AAED;;;GAGG;AACH,yCAAyC;AAClC,KAAK,UAAU,cAAc;IAClC,IAAI,CAAC,GAAG,CAAC,IAAI,CAAC,6CAA6C,CAAC,CAAC;AAC/D,CAAC;AAED;;GAEG"}
|
|
@@ -25,5 +25,5 @@ export function mobileDismissAlert(this: import("../driver").AndroidUiautomator2
|
|
|
25
25
|
* @returns {Promise<void>}
|
|
26
26
|
*/
|
|
27
27
|
export function postDismissAlert(this: import("../driver").AndroidUiautomator2Driver): Promise<void>;
|
|
28
|
-
export type AndroidUiautomator2Driver = import(
|
|
28
|
+
export type AndroidUiautomator2Driver = import("../driver").AndroidUiautomator2Driver;
|
|
29
29
|
//# sourceMappingURL=alert.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"alert.d.ts","sourceRoot":"","sources":["../../../lib/commands/alert.js"],"names":[],"mappings":"AAAA;;;GAGG;AACH,mFAFa,
|
|
1
|
+
{"version":3,"file":"alert.d.ts","sourceRoot":"","sources":["../../../lib/commands/alert.js"],"names":[],"mappings":"AAAA;;;GAGG;AACH,mFAFa,OAAO,CAAC,MAAM,CAAC,CAU3B;AAED;;;;GAIG;AACH,iJAFa,OAAO,CAAC,IAAI,CAAC,CAQzB;AAED;;;GAGG;AACH,sFAFa,OAAO,CAAC,IAAI,CAAC,CAIzB;AAED;;;;GAIG;AACH,mJAFa,OAAO,CAAC,IAAI,CAAC,CAQzB;AAED;;;GAGG;AACH,uFAFa,OAAO,CAAC,IAAI,CAAC,CAIzB;wCAGY,OAAO,WAAW,EAAE,yBAAyB"}
|
|
@@ -1,6 +1,10 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.
|
|
3
|
+
exports.getAlertText = getAlertText;
|
|
4
|
+
exports.mobileAcceptAlert = mobileAcceptAlert;
|
|
5
|
+
exports.postAcceptAlert = postAcceptAlert;
|
|
6
|
+
exports.mobileDismissAlert = mobileDismissAlert;
|
|
7
|
+
exports.postDismissAlert = postDismissAlert;
|
|
4
8
|
/**
|
|
5
9
|
* @this {AndroidUiautomator2Driver}
|
|
6
10
|
* @returns {Promise<string>}
|
|
@@ -8,7 +12,6 @@ exports.postDismissAlert = exports.mobileDismissAlert = exports.postAcceptAlert
|
|
|
8
12
|
async function getAlertText() {
|
|
9
13
|
return String(await this.uiautomator2.jwproxy.command('/alert/text', 'GET', {}));
|
|
10
14
|
}
|
|
11
|
-
exports.getAlertText = getAlertText;
|
|
12
15
|
/**
|
|
13
16
|
* @this {AndroidUiautomator2Driver}
|
|
14
17
|
* @param {import('./types').AcceptAlertOptions} [opts={}]
|
|
@@ -17,7 +20,6 @@ exports.getAlertText = getAlertText;
|
|
|
17
20
|
async function mobileAcceptAlert(opts = {}) {
|
|
18
21
|
await this.uiautomator2.jwproxy.command('/alert/accept', 'POST', opts);
|
|
19
22
|
}
|
|
20
|
-
exports.mobileAcceptAlert = mobileAcceptAlert;
|
|
21
23
|
/**
|
|
22
24
|
* @this {AndroidUiautomator2Driver}
|
|
23
25
|
* @returns {Promise<void>}
|
|
@@ -25,7 +27,6 @@ exports.mobileAcceptAlert = mobileAcceptAlert;
|
|
|
25
27
|
async function postAcceptAlert() {
|
|
26
28
|
await this.mobileAcceptAlert();
|
|
27
29
|
}
|
|
28
|
-
exports.postAcceptAlert = postAcceptAlert;
|
|
29
30
|
/**
|
|
30
31
|
* @this {AndroidUiautomator2Driver}
|
|
31
32
|
* @param {import('./types').DismissAlertOptions} [opts={}]
|
|
@@ -34,7 +35,6 @@ exports.postAcceptAlert = postAcceptAlert;
|
|
|
34
35
|
async function mobileDismissAlert(opts = {}) {
|
|
35
36
|
await this.uiautomator2.jwproxy.command('/alert/dismiss', 'POST', opts);
|
|
36
37
|
}
|
|
37
|
-
exports.mobileDismissAlert = mobileDismissAlert;
|
|
38
38
|
/**
|
|
39
39
|
* @this {AndroidUiautomator2Driver}
|
|
40
40
|
* @returns {Promise<void>}
|
|
@@ -42,7 +42,6 @@ exports.mobileDismissAlert = mobileDismissAlert;
|
|
|
42
42
|
async function postDismissAlert() {
|
|
43
43
|
await this.mobileDismissAlert();
|
|
44
44
|
}
|
|
45
|
-
exports.postDismissAlert = postDismissAlert;
|
|
46
45
|
/**
|
|
47
46
|
* @typedef {import('../driver').AndroidUiautomator2Driver} AndroidUiautomator2Driver
|
|
48
47
|
*/
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"alert.js","sourceRoot":"","sources":["../../../lib/commands/alert.js"],"names":[],"mappings":";;;
|
|
1
|
+
{"version":3,"file":"alert.js","sourceRoot":"","sources":["../../../lib/commands/alert.js"],"names":[],"mappings":";;AAIA,oCAQC;AAOD,8CAMC;AAMD,0CAEC;AAOD,gDAMC;AAMD,4CAEC;AAtDD;;;GAGG;AACI,KAAK,UAAU,YAAY;IAChC,OAAO,MAAM,CACX,MAAM,IAAI,CAAC,YAAY,CAAC,OAAO,CAAC,OAAO,CACrC,aAAa,EACb,KAAK,EACL,EAAE,CACH,CACF,CAAC;AACJ,CAAC;AAED;;;;GAIG;AACI,KAAK,UAAU,iBAAiB,CAAC,IAAI,GAAG,EAAE;IAC/C,MAAM,IAAI,CAAC,YAAY,CAAC,OAAO,CAAC,OAAO,CACrC,eAAe,EACf,MAAM,EACN,IAAI,CACL,CAAC;AACJ,CAAC;AAED;;;GAGG;AACI,KAAK,UAAU,eAAe;IACnC,MAAM,IAAI,CAAC,iBAAiB,EAAE,CAAC;AACjC,CAAC;AAED;;;;GAIG;AACI,KAAK,UAAU,kBAAkB,CAAC,IAAI,GAAG,EAAE;IAChD,MAAM,IAAI,CAAC,YAAY,CAAC,OAAO,CAAC,OAAO,CACrC,gBAAgB,EAChB,MAAM,EACN,IAAI,CACL,CAAC;AACJ,CAAC;AAED;;;GAGG;AACI,KAAK,UAAU,gBAAgB;IACpC,MAAM,IAAI,CAAC,kBAAkB,EAAE,CAAC;AAClC,CAAC;AAED;;GAEG"}
|
|
@@ -5,7 +5,7 @@
|
|
|
5
5
|
* @throws {Error} if an error occured while installing the given APKs.
|
|
6
6
|
* @returns {Promise<void>}
|
|
7
7
|
*/
|
|
8
|
-
export function mobileInstallMultipleApks(this: import("../driver").AndroidUiautomator2Driver, opts: import(
|
|
8
|
+
export function mobileInstallMultipleApks(this: import("../driver").AndroidUiautomator2Driver, opts: import("./types").InstallMultipleApksOptions): Promise<void>;
|
|
9
9
|
/**
|
|
10
10
|
* Puts the app to background and waits the given number of seconds Then restores the app
|
|
11
11
|
* if necessary. The call is blocking.
|
|
@@ -14,6 +14,6 @@ export function mobileInstallMultipleApks(this: import("../driver").AndroidUiaut
|
|
|
14
14
|
* @returns {Promise<void>}
|
|
15
15
|
*/
|
|
16
16
|
export function mobileBackgroundApp(this: import("../driver").AndroidUiautomator2Driver, opts?: import("./types").BackgroundAppOptions | undefined): Promise<void>;
|
|
17
|
-
export type AndroidUiautomator2Driver = import(
|
|
18
|
-
export type StringRecord<T = any> = import(
|
|
17
|
+
export type AndroidUiautomator2Driver = import("../driver").AndroidUiautomator2Driver;
|
|
18
|
+
export type StringRecord<T = any> = import("@appium/types").StringRecord<T>;
|
|
19
19
|
//# sourceMappingURL=app-management.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"app-management.d.ts","sourceRoot":"","sources":["../../../lib/commands/app-management.js"],"names":[],"mappings":"AAKA;;;;;;GAMG;AACH,qGAJW,OAAO,SAAS,EAAE,0BAA0B,GAE1C,
|
|
1
|
+
{"version":3,"file":"app-management.d.ts","sourceRoot":"","sources":["../../../lib/commands/app-management.js"],"names":[],"mappings":"AAKA;;;;;;GAMG;AACH,qGAJW,OAAO,SAAS,EAAE,0BAA0B,GAE1C,OAAO,CAAC,IAAI,CAAC,CAUzB;AAED;;;;;;GAMG;AACH,qJAFa,OAAO,CAAC,IAAI,CAAC,CAKzB;wCAGY,OAAO,WAAW,EAAE,yBAAyB;yBAI5C,CAAC,UACF,OAAO,eAAe,EAAE,YAAY,CAAC,CAAC,CAAC"}
|
|
@@ -3,7 +3,8 @@ 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.
|
|
6
|
+
exports.mobileInstallMultipleApks = mobileInstallMultipleApks;
|
|
7
|
+
exports.mobileBackgroundApp = mobileBackgroundApp;
|
|
7
8
|
const lodash_1 = __importDefault(require("lodash"));
|
|
8
9
|
const bluebird_1 = __importDefault(require("bluebird"));
|
|
9
10
|
const driver_1 = require("appium/driver");
|
|
@@ -22,7 +23,6 @@ async function mobileInstallMultipleApks(opts) {
|
|
|
22
23
|
const apks = await bluebird_1.default.all(opts.apks.map((app) => this.helpers.configureApp(app, [extensions_1.APK_EXTENSION])));
|
|
23
24
|
await this.adb.installMultipleApks(apks, opts.options);
|
|
24
25
|
}
|
|
25
|
-
exports.mobileInstallMultipleApks = mobileInstallMultipleApks;
|
|
26
26
|
/**
|
|
27
27
|
* Puts the app to background and waits the given number of seconds Then restores the app
|
|
28
28
|
* if necessary. The call is blocking.
|
|
@@ -34,7 +34,6 @@ async function mobileBackgroundApp(opts = {}) {
|
|
|
34
34
|
const { seconds = -1 } = opts;
|
|
35
35
|
await this.background(seconds);
|
|
36
36
|
}
|
|
37
|
-
exports.mobileBackgroundApp = mobileBackgroundApp;
|
|
38
37
|
/**
|
|
39
38
|
* @typedef {import('../driver').AndroidUiautomator2Driver} AndroidUiautomator2Driver
|
|
40
39
|
*/
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"app-management.js","sourceRoot":"","sources":["../../../lib/commands/app-management.js"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"app-management.js","sourceRoot":"","sources":["../../../lib/commands/app-management.js"],"names":[],"mappings":";;;;;AAYA,8DAQC;AASD,kDAGC;AAhCD,oDAAuB;AACvB,wDAAyB;AACzB,0CAAqC;AACrC,8CAA4C;AAE5C;;;;;;GAMG;AACI,KAAK,UAAU,yBAAyB,CAAC,IAAI;IAClD,IAAI,CAAC,gBAAC,CAAC,OAAO,CAAC,IAAI,CAAC,IAAI,CAAC,IAAI,gBAAC,CAAC,OAAO,CAAC,IAAI,CAAC,IAAI,CAAC,EAAE,CAAC;QAClD,MAAM,IAAI,eAAM,CAAC,oBAAoB,CAAC,8BAA8B,CAAC,CAAC;IACxE,CAAC;IACD,MAAM,IAAI,GAAG,MAAM,kBAAC,CAAC,GAAG,CACtB,IAAI,CAAC,IAAI,CAAC,GAAG,CAAC,CAAC,GAAG,EAAE,EAAE,CAAC,IAAI,CAAC,OAAO,CAAC,YAAY,CAAC,GAAG,EAAE,CAAC,0BAAa,CAAC,CAAC,CAAC,CACxE,CAAC;IACF,MAAM,IAAI,CAAC,GAAG,CAAC,mBAAmB,CAAC,IAAI,EAAE,IAAI,CAAC,OAAO,CAAC,CAAC;AACzD,CAAC;AAED;;;;;;GAMG;AACI,KAAK,UAAU,mBAAmB,CAAC,IAAI,GAAG,EAAE;IACjD,MAAM,EAAC,OAAO,GAAG,CAAC,CAAC,EAAC,GAAG,IAAI,CAAC;IAC5B,MAAM,IAAI,CAAC,UAAU,CAAC,OAAO,CAAC,CAAC;AACjC,CAAC;AAED;;GAEG;AAEH;;;GAGG"}
|
|
@@ -6,7 +6,7 @@
|
|
|
6
6
|
* @returns {Promise<StringRecord>}
|
|
7
7
|
*/
|
|
8
8
|
export function mobileGetAppStrings(this: import("../driver").AndroidUiautomator2Driver, opts?: import("./types").GetAppStringsOptions | undefined): Promise<StringRecord>;
|
|
9
|
-
export type ADB = import(
|
|
10
|
-
export type StringRecord = import(
|
|
11
|
-
export type AndroidUiautomator2Driver = import(
|
|
9
|
+
export type ADB = import("appium-adb").ADB;
|
|
10
|
+
export type StringRecord = import("@appium/types").StringRecord;
|
|
11
|
+
export type AndroidUiautomator2Driver = import("../driver").AndroidUiautomator2Driver;
|
|
12
12
|
//# sourceMappingURL=app-strings.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"app-strings.d.ts","sourceRoot":"","sources":["../../../lib/commands/app-strings.js"],"names":[],"mappings":"AAAA;;;;;;GAMG;AACH,qJAFa,
|
|
1
|
+
{"version":3,"file":"app-strings.d.ts","sourceRoot":"","sources":["../../../lib/commands/app-strings.js"],"names":[],"mappings":"AAAA;;;;;;GAMG;AACH,qJAFa,OAAO,CAAC,YAAY,CAAC,CAIjC;kBAGY,OAAO,YAAY,EAAE,GAAG;2BACxB,OAAO,eAAe,EAAE,YAAY;wCACpC,OAAO,WAAW,EAAE,yBAAyB"}
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.mobileGetAppStrings =
|
|
3
|
+
exports.mobileGetAppStrings = mobileGetAppStrings;
|
|
4
4
|
/**
|
|
5
5
|
* Retrives app strings from its resources for the given language
|
|
6
6
|
* or the default device language.
|
|
@@ -11,7 +11,6 @@ exports.mobileGetAppStrings = void 0;
|
|
|
11
11
|
async function mobileGetAppStrings(opts) {
|
|
12
12
|
return await this.getStrings(opts?.language);
|
|
13
13
|
}
|
|
14
|
-
exports.mobileGetAppStrings = mobileGetAppStrings;
|
|
15
14
|
/**
|
|
16
15
|
* @typedef {import('appium-adb').ADB} ADB
|
|
17
16
|
* @typedef {import('@appium/types').StringRecord} StringRecord
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"app-strings.js","sourceRoot":"","sources":["../../../lib/commands/app-strings.js"],"names":[],"mappings":"
|
|
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"}
|
|
@@ -3,7 +3,7 @@
|
|
|
3
3
|
* @this {AndroidUiautomator2Driver}
|
|
4
4
|
* @returns {Promise<import('./types').BatteryInfo>} The actual battery info
|
|
5
5
|
*/
|
|
6
|
-
export function mobileGetBatteryInfo(this: import("../driver").AndroidUiautomator2Driver): Promise<import(
|
|
7
|
-
export type BatteryInfo = import(
|
|
8
|
-
export type AndroidUiautomator2Driver = import(
|
|
6
|
+
export function mobileGetBatteryInfo(this: import("../driver").AndroidUiautomator2Driver): Promise<import("./types").BatteryInfo>;
|
|
7
|
+
export type BatteryInfo = import("./types").BatteryInfo;
|
|
8
|
+
export type AndroidUiautomator2Driver = import("../driver").AndroidUiautomator2Driver;
|
|
9
9
|
//# sourceMappingURL=battery.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"battery.d.ts","sourceRoot":"","sources":["../../../lib/commands/battery.js"],"names":[],"mappings":"AACA;;;;GAIG;AACH,2FAFa,
|
|
1
|
+
{"version":3,"file":"battery.d.ts","sourceRoot":"","sources":["../../../lib/commands/battery.js"],"names":[],"mappings":"AACA;;;;GAIG;AACH,2FAFa,OAAO,CAAC,OAAO,SAAS,EAAE,WAAW,CAAC,CAalD;0BAGY,OAAO,SAAS,EAAE,WAAW;wCAC7B,OAAO,WAAW,EAAE,yBAAyB"}
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.mobileGetBatteryInfo =
|
|
3
|
+
exports.mobileGetBatteryInfo = mobileGetBatteryInfo;
|
|
4
4
|
/**
|
|
5
5
|
* Reads the battery information from the device under test.
|
|
6
6
|
* @this {AndroidUiautomator2Driver}
|
|
@@ -14,7 +14,6 @@ async function mobileGetBatteryInfo() {
|
|
|
14
14
|
delete batteryInfo.status;
|
|
15
15
|
return /** @type {BatteryInfo} */ (batteryInfo);
|
|
16
16
|
}
|
|
17
|
-
exports.mobileGetBatteryInfo = mobileGetBatteryInfo;
|
|
18
17
|
/**
|
|
19
18
|
* @typedef {import('./types').BatteryInfo} BatteryInfo
|
|
20
19
|
* @typedef {import('../driver').AndroidUiautomator2Driver} AndroidUiautomator2Driver
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"battery.js","sourceRoot":"","sources":["../../../lib/commands/battery.js"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"battery.js","sourceRoot":"","sources":["../../../lib/commands/battery.js"],"names":[],"mappings":";;AAMA,oDAWC;AAhBD;;;;GAIG;AACI,KAAK,UAAU,oBAAoB;IACxC,MAAM,MAAM,GAAG,uEAAuE,CAAC,CACrF,MAAM,2DAA2D,CAAC,CAChE,IAAI,CAAC,YAAY,CAClB,CAAC,OAAO,CAAC,OAAO,CAAC,6BAA6B,EAAE,KAAK,EAAE,EAAE,CAAC,CAC5D,CAAC;IACF,MAAM,WAAW,GAAG,kBAAkB,CAAC,CAAC,MAAM,CAAC,CAAC;IAChD,kCAAkC;IAClC,WAAW,CAAC,KAAK,GAAG,MAAM,CAAC,MAAM,CAAC;IAClC,OAAO,WAAW,CAAC,MAAM,CAAC;IAC1B,OAAO,0BAA0B,CAAC,CAAC,WAAW,CAAC,CAAC;AAClD,CAAC;AAED;;;GAGG"}
|
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
* @this {AndroidUiautomator2Driver}
|
|
3
3
|
* @returns {Promise<import('@appium/types').Element>}
|
|
4
4
|
*/
|
|
5
|
-
export function active(this: import("../driver").AndroidUiautomator2Driver): Promise<import(
|
|
5
|
+
export function active(this: import("../driver").AndroidUiautomator2Driver): Promise<import("@appium/types").Element>;
|
|
6
6
|
/**
|
|
7
7
|
* @this {AndroidUiautomator2Driver}
|
|
8
8
|
* @param {string} attribute
|
|
@@ -39,19 +39,19 @@ export function getName(this: import("../driver").AndroidUiautomator2Driver, ele
|
|
|
39
39
|
* @param {string} elementId
|
|
40
40
|
* @returns {Promise<import('@appium/types').Position>}
|
|
41
41
|
*/
|
|
42
|
-
export function getLocation(this: import("../driver").AndroidUiautomator2Driver, elementId: string): Promise<import(
|
|
42
|
+
export function getLocation(this: import("../driver").AndroidUiautomator2Driver, elementId: string): Promise<import("@appium/types").Position>;
|
|
43
43
|
/**
|
|
44
44
|
* @this {AndroidUiautomator2Driver}
|
|
45
45
|
* @param {string} elementId
|
|
46
46
|
* @returns {Promise<import('@appium/types').Size>}
|
|
47
47
|
*/
|
|
48
|
-
export function getSize(this: import("../driver").AndroidUiautomator2Driver, elementId: string): Promise<import(
|
|
48
|
+
export function getSize(this: import("../driver").AndroidUiautomator2Driver, elementId: string): Promise<import("@appium/types").Size>;
|
|
49
49
|
/**
|
|
50
50
|
* @this {AndroidUiautomator2Driver}
|
|
51
51
|
* @param {import('appium-android-driver').DoSetElementValueOpts} params
|
|
52
52
|
* @returns {Promise<void>}
|
|
53
53
|
*/
|
|
54
|
-
export function doSetElementValue(this: import("../driver").AndroidUiautomator2Driver, params: import(
|
|
54
|
+
export function doSetElementValue(this: import("../driver").AndroidUiautomator2Driver, params: import("appium-android-driver").DoSetElementValueOpts): Promise<void>;
|
|
55
55
|
/**
|
|
56
56
|
* @this {AndroidUiautomator2Driver}
|
|
57
57
|
* @param {string|string[]} keys
|
|
@@ -88,7 +88,7 @@ export function clear(this: import("../driver").AndroidUiautomator2Driver, eleme
|
|
|
88
88
|
* @param {string} elementId
|
|
89
89
|
* @returns {Promise<import('@appium/types').Rect>}
|
|
90
90
|
*/
|
|
91
|
-
export function getElementRect(this: import("../driver").AndroidUiautomator2Driver, elementId: string): Promise<import(
|
|
91
|
+
export function getElementRect(this: import("../driver").AndroidUiautomator2Driver, elementId: string): Promise<import("@appium/types").Rect>;
|
|
92
92
|
/**
|
|
93
93
|
* Sends text to the given element by replacing its previous content
|
|
94
94
|
* @this {AndroidUiautomator2Driver}
|
|
@@ -96,6 +96,6 @@ export function getElementRect(this: import("../driver").AndroidUiautomator2Driv
|
|
|
96
96
|
* @throws {Error} If there was a faulre while setting the text
|
|
97
97
|
* @returns {Promise<void>}
|
|
98
98
|
*/
|
|
99
|
-
export function mobileReplaceElementValue(this: import("../driver").AndroidUiautomator2Driver, opts: import(
|
|
100
|
-
export type AndroidUiautomator2Driver = import(
|
|
99
|
+
export function mobileReplaceElementValue(this: import("../driver").AndroidUiautomator2Driver, opts: import("./types").ReplaceValueOptions): Promise<void>;
|
|
100
|
+
export type AndroidUiautomator2Driver = import("../driver").AndroidUiautomator2Driver;
|
|
101
101
|
//# sourceMappingURL=element.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"element.d.ts","sourceRoot":"","sources":["../../../lib/commands/element.js"],"names":[],"mappings":"AAKA;;;GAGG;AACH,6EAFa,
|
|
1
|
+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CAAC,CA4BjD;AAED;;;;;;GAMG;AACH,qGAJW,OAAO,SAAS,EAAE,mBAAmB,GAEnC,OAAO,CAAC,IAAI,CAAC,CAYzB;wCAeY,OAAO,WAAW,EAAE,yBAAyB"}
|
|
@@ -3,7 +3,22 @@ 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.
|
|
6
|
+
exports.active = active;
|
|
7
|
+
exports.getAttribute = getAttribute;
|
|
8
|
+
exports.elementDisplayed = elementDisplayed;
|
|
9
|
+
exports.elementEnabled = elementEnabled;
|
|
10
|
+
exports.elementSelected = elementSelected;
|
|
11
|
+
exports.getName = getName;
|
|
12
|
+
exports.getLocation = getLocation;
|
|
13
|
+
exports.getSize = getSize;
|
|
14
|
+
exports.doSetElementValue = doSetElementValue;
|
|
15
|
+
exports.setValueImmediate = setValueImmediate;
|
|
16
|
+
exports.getText = getText;
|
|
17
|
+
exports.click = click;
|
|
18
|
+
exports.getElementScreenshot = getElementScreenshot;
|
|
19
|
+
exports.clear = clear;
|
|
20
|
+
exports.getElementRect = getElementRect;
|
|
21
|
+
exports.mobileReplaceElementValue = mobileReplaceElementValue;
|
|
7
22
|
const bluebird_1 = __importDefault(require("bluebird"));
|
|
8
23
|
const lodash_1 = __importDefault(require("lodash"));
|
|
9
24
|
const driver_1 = require("appium/driver");
|
|
@@ -15,7 +30,6 @@ const appium_android_driver_1 = require("appium-android-driver");
|
|
|
15
30
|
async function active() {
|
|
16
31
|
return /** @type {import('@appium/types').Element} */ (await this.uiautomator2.jwproxy.command('/element/active', 'GET'));
|
|
17
32
|
}
|
|
18
|
-
exports.active = active;
|
|
19
33
|
/**
|
|
20
34
|
* @this {AndroidUiautomator2Driver}
|
|
21
35
|
* @param {string} attribute
|
|
@@ -25,7 +39,6 @@ exports.active = active;
|
|
|
25
39
|
async function getAttribute(attribute, elementId) {
|
|
26
40
|
return String(await this.uiautomator2.jwproxy.command(`/element/${elementId}/attribute/${attribute}`, 'GET', {}));
|
|
27
41
|
}
|
|
28
|
-
exports.getAttribute = getAttribute;
|
|
29
42
|
/**
|
|
30
43
|
* @this {AndroidUiautomator2Driver}
|
|
31
44
|
* @param {string} elementId
|
|
@@ -34,7 +47,6 @@ exports.getAttribute = getAttribute;
|
|
|
34
47
|
async function elementDisplayed(elementId) {
|
|
35
48
|
return toBool(await this.getAttribute('displayed', elementId));
|
|
36
49
|
}
|
|
37
|
-
exports.elementDisplayed = elementDisplayed;
|
|
38
50
|
/**
|
|
39
51
|
* @this {AndroidUiautomator2Driver}
|
|
40
52
|
* @param {string} elementId
|
|
@@ -43,7 +55,6 @@ exports.elementDisplayed = elementDisplayed;
|
|
|
43
55
|
async function elementEnabled(elementId) {
|
|
44
56
|
return toBool(await this.getAttribute('enabled', elementId));
|
|
45
57
|
}
|
|
46
|
-
exports.elementEnabled = elementEnabled;
|
|
47
58
|
/**
|
|
48
59
|
* @this {AndroidUiautomator2Driver}
|
|
49
60
|
* @param {string} elementId
|
|
@@ -52,7 +63,6 @@ exports.elementEnabled = elementEnabled;
|
|
|
52
63
|
async function elementSelected(elementId) {
|
|
53
64
|
return toBool(await this.getAttribute('selected', elementId));
|
|
54
65
|
}
|
|
55
|
-
exports.elementSelected = elementSelected;
|
|
56
66
|
/**
|
|
57
67
|
* @this {AndroidUiautomator2Driver}
|
|
58
68
|
* @param {string} elementId
|
|
@@ -61,7 +71,6 @@ exports.elementSelected = elementSelected;
|
|
|
61
71
|
async function getName(elementId) {
|
|
62
72
|
return /** @type {string} */ (await this.uiautomator2.jwproxy.command(`/element/${elementId}/name`, 'GET', {}));
|
|
63
73
|
}
|
|
64
|
-
exports.getName = getName;
|
|
65
74
|
/**
|
|
66
75
|
* @this {AndroidUiautomator2Driver}
|
|
67
76
|
* @param {string} elementId
|
|
@@ -70,7 +79,6 @@ exports.getName = getName;
|
|
|
70
79
|
async function getLocation(elementId) {
|
|
71
80
|
return /** @type {import('@appium/types').Position} */ (await this.uiautomator2.jwproxy.command(`/element/${elementId}/location`, 'GET', {}));
|
|
72
81
|
}
|
|
73
|
-
exports.getLocation = getLocation;
|
|
74
82
|
/**
|
|
75
83
|
* @this {AndroidUiautomator2Driver}
|
|
76
84
|
* @param {string} elementId
|
|
@@ -79,7 +87,6 @@ exports.getLocation = getLocation;
|
|
|
79
87
|
async function getSize(elementId) {
|
|
80
88
|
return /** @type {import('@appium/types').Size} */ (await this.uiautomator2.jwproxy.command(`/element/${elementId}/size`, 'GET', {}));
|
|
81
89
|
}
|
|
82
|
-
exports.getSize = getSize;
|
|
83
90
|
/**
|
|
84
91
|
* @this {AndroidUiautomator2Driver}
|
|
85
92
|
* @param {import('appium-android-driver').DoSetElementValueOpts} params
|
|
@@ -88,7 +95,6 @@ exports.getSize = getSize;
|
|
|
88
95
|
async function doSetElementValue(params) {
|
|
89
96
|
await this.uiautomator2.jwproxy.command(`/element/${params.elementId}/value`, 'POST', params);
|
|
90
97
|
}
|
|
91
|
-
exports.doSetElementValue = doSetElementValue;
|
|
92
98
|
/**
|
|
93
99
|
* @this {AndroidUiautomator2Driver}
|
|
94
100
|
* @param {string|string[]} keys
|
|
@@ -102,7 +108,6 @@ async function setValueImmediate(keys, elementId) {
|
|
|
102
108
|
replace: false,
|
|
103
109
|
});
|
|
104
110
|
}
|
|
105
|
-
exports.setValueImmediate = setValueImmediate;
|
|
106
111
|
/**
|
|
107
112
|
* @this {AndroidUiautomator2Driver}
|
|
108
113
|
* @param {string} elementId
|
|
@@ -111,7 +116,6 @@ exports.setValueImmediate = setValueImmediate;
|
|
|
111
116
|
async function getText(elementId) {
|
|
112
117
|
return String(await this.uiautomator2.jwproxy.command(`/element/${elementId}/text`, 'GET', {}));
|
|
113
118
|
}
|
|
114
|
-
exports.getText = getText;
|
|
115
119
|
/**
|
|
116
120
|
* @this {AndroidUiautomator2Driver}
|
|
117
121
|
* @param {string} element
|
|
@@ -120,7 +124,6 @@ exports.getText = getText;
|
|
|
120
124
|
async function click(element) {
|
|
121
125
|
await this.uiautomator2.jwproxy.command(`/element/${element}/click`, 'POST', { element });
|
|
122
126
|
}
|
|
123
|
-
exports.click = click;
|
|
124
127
|
/**
|
|
125
128
|
* @this {AndroidUiautomator2Driver}
|
|
126
129
|
* @param {string} element
|
|
@@ -129,7 +132,6 @@ exports.click = click;
|
|
|
129
132
|
async function getElementScreenshot(element) {
|
|
130
133
|
return String(await this.uiautomator2.jwproxy.command(`/element/${element}/screenshot`, 'GET', {}));
|
|
131
134
|
}
|
|
132
|
-
exports.getElementScreenshot = getElementScreenshot;
|
|
133
135
|
/**
|
|
134
136
|
* @this {AndroidUiautomator2Driver}
|
|
135
137
|
* @param {string} elementId
|
|
@@ -140,7 +142,6 @@ async function clear(elementId) {
|
|
|
140
142
|
elementId,
|
|
141
143
|
});
|
|
142
144
|
}
|
|
143
|
-
exports.clear = clear;
|
|
144
145
|
/**
|
|
145
146
|
* @this {AndroidUiautomator2Driver}
|
|
146
147
|
* @param {string} elementId
|
|
@@ -162,7 +163,6 @@ async function getElementRect(elementId) {
|
|
|
162
163
|
}
|
|
163
164
|
return /** @type {import('@appium/types').Rect} */ (await this.uiautomator2.jwproxy.command(`/element/${elementId}/rect`, 'GET'));
|
|
164
165
|
}
|
|
165
|
-
exports.getElementRect = getElementRect;
|
|
166
166
|
/**
|
|
167
167
|
* Sends text to the given element by replacing its previous content
|
|
168
168
|
* @this {AndroidUiautomator2Driver}
|
|
@@ -177,7 +177,6 @@ async function mobileReplaceElementValue(opts) {
|
|
|
177
177
|
replace: true,
|
|
178
178
|
});
|
|
179
179
|
}
|
|
180
|
-
exports.mobileReplaceElementValue = mobileReplaceElementValue;
|
|
181
180
|
// #region Internal Helpers
|
|
182
181
|
/**
|
|
183
182
|
* @param {any} s
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"element.js","sourceRoot":"","sources":["../../../lib/commands/element.js"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"element.js","sourceRoot":"","sources":["../../../lib/commands/element.js"],"names":[],"mappings":";;;;;AASA,wBAOC;AAQD,oCAQC;AAOD,4CAEC;AAOD,wCAEC;AAOD,0CAEC;AAOD,0BAQC;AAOD,kCAQC;AAOD,0BAQC;AAOD,8CAMC;AAQD,8CAUC;AAOD,0BAQC;AAOD,sBAMC;AAOD,oDAQC;AAOD,sBAQC;AAOD,wCA0BC;AASD,8DAUC;AArPD,wDAAyB;AACzB,oDAAuB;AACvB,0CAAwC;AACxC,iEAA4C;AAE5C;;;GAGG;AACI,KAAK,UAAU,MAAM;IAC1B,OAAO,8CAA8C,CAAC,CACpD,MAAM,IAAI,CAAC,YAAY,CAAC,OAAO,CAAC,OAAO,CACrC,iBAAiB,EACjB,KAAK,CACN,CACF,CAAC;AACJ,CAAC;AAED;;;;;GAKG;AACI,KAAK,UAAU,YAAY,CAAC,SAAS,EAAE,SAAS;IACrD,OAAO,MAAM,CACX,MAAM,IAAI,CAAC,YAAY,CAAC,OAAO,CAAC,OAAO,CACrC,YAAY,SAAS,cAAc,SAAS,EAAE,EAC9C,KAAK,EACL,EAAE,CACH,CACF,CAAC;AACJ,CAAC;AAED;;;;GAIG;AACI,KAAK,UAAU,gBAAgB,CAAC,SAAS;IAC9C,OAAO,MAAM,CAAC,MAAM,IAAI,CAAC,YAAY,CAAC,WAAW,EAAE,SAAS,CAAC,CAAC,CAAC;AACjE,CAAC;AAED;;;;GAIG;AACI,KAAK,UAAU,cAAc,CAAC,SAAS;IAC5C,OAAO,MAAM,CAAC,MAAM,IAAI,CAAC,YAAY,CAAC,SAAS,EAAE,SAAS,CAAC,CAAC,CAAC;AAC/D,CAAC;AAED;;;;GAIG;AACI,KAAK,UAAU,eAAe,CAAC,SAAS;IAC7C,OAAO,MAAM,CAAC,MAAM,IAAI,CAAC,YAAY,CAAC,UAAU,EAAE,SAAS,CAAC,CAAC,CAAC;AAChE,CAAC;AAED;;;;GAIG;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