appium-uiautomator2-driver 6.7.6 → 6.7.8
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/build/lib/commands/actions.d.ts +26 -29
- package/build/lib/commands/actions.d.ts.map +1 -1
- package/build/lib/commands/actions.js +19 -27
- package/build/lib/commands/actions.js.map +1 -1
- package/build/lib/commands/alert.d.ts +14 -22
- package/build/lib/commands/alert.d.ts.map +1 -1
- package/build/lib/commands/alert.js +8 -19
- package/build/lib/commands/alert.js.map +1 -1
- package/build/lib/commands/app-management.d.ts +7 -10
- package/build/lib/commands/app-management.d.ts.map +1 -1
- package/build/lib/commands/app-management.js +4 -14
- package/build/lib/commands/app-management.js.map +1 -1
- package/build/lib/commands/battery.d.ts +4 -5
- package/build/lib/commands/battery.d.ts.map +1 -1
- package/build/lib/commands/battery.js +4 -9
- package/build/lib/commands/battery.js.map +1 -1
- package/build/lib/commands/clipboard.d.ts +9 -13
- package/build/lib/commands/clipboard.d.ts.map +1 -1
- package/build/lib/commands/clipboard.js +7 -14
- package/build/lib/commands/clipboard.js.map +1 -1
- package/build/lib/commands/element.d.ts +29 -0
- package/build/lib/commands/element.d.ts.map +1 -1
- package/build/lib/commands/element.js +29 -0
- package/build/lib/commands/element.js.map +1 -1
- package/build/lib/commands/find.d.ts +13 -9
- package/build/lib/commands/find.d.ts.map +1 -1
- package/build/lib/commands/find.js +4 -16
- package/build/lib/commands/find.js.map +1 -1
- package/build/lib/commands/gestures.d.ts +63 -0
- package/build/lib/commands/gestures.d.ts.map +1 -1
- package/build/lib/commands/gestures.js +63 -0
- package/build/lib/commands/gestures.js.map +1 -1
- package/build/lib/commands/keyboard.d.ts +30 -41
- package/build/lib/commands/keyboard.d.ts.map +1 -1
- package/build/lib/commands/keyboard.js +22 -37
- package/build/lib/commands/keyboard.js.map +1 -1
- package/build/lib/commands/misc.d.ts +4 -0
- package/build/lib/commands/misc.d.ts.map +1 -1
- package/build/lib/commands/misc.js +4 -0
- package/build/lib/commands/misc.js.map +1 -1
- package/build/lib/commands/navigation.d.ts +11 -16
- package/build/lib/commands/navigation.d.ts.map +1 -1
- package/build/lib/commands/navigation.js +9 -17
- package/build/lib/commands/navigation.js.map +1 -1
- package/build/lib/commands/viewport.d.ts +23 -22
- package/build/lib/commands/viewport.d.ts.map +1 -1
- package/build/lib/commands/viewport.js +17 -24
- package/build/lib/commands/viewport.js.map +1 -1
- package/build/lib/doctor/optional-checks.d.ts +4 -4
- package/build/lib/doctor/optional-checks.d.ts.map +1 -1
- package/build/lib/doctor/optional-checks.js.map +1 -1
- package/build/lib/doctor/required-checks.d.ts +5 -21
- package/build/lib/doctor/required-checks.d.ts.map +1 -1
- package/build/lib/doctor/required-checks.js.map +1 -1
- package/build/lib/index.d.ts +4 -0
- package/build/lib/index.d.ts.map +1 -0
- package/build/{index.js → lib/index.js} +1 -1
- package/build/lib/index.js.map +1 -0
- package/build/tsconfig.tsbuildinfo +1 -1
- package/lib/commands/actions.ts +95 -0
- package/lib/commands/alert.ts +46 -0
- package/lib/commands/app-management.ts +25 -0
- package/lib/commands/battery.ts +19 -0
- package/lib/commands/clipboard.ts +29 -0
- package/lib/commands/element.ts +29 -0
- package/lib/commands/find.ts +48 -0
- package/lib/commands/gestures.ts +63 -0
- package/lib/commands/keyboard.ts +102 -0
- package/lib/commands/misc.ts +4 -0
- package/lib/commands/navigation.ts +32 -0
- package/lib/commands/viewport.ts +78 -0
- package/lib/doctor/optional-checks.ts +7 -0
- package/lib/doctor/required-checks.ts +8 -0
- package/{index.js → lib/index.ts} +2 -1
- package/npm-shrinkwrap.json +2 -2
- package/package.json +3 -7
- package/build/index.d.ts +0 -4
- package/build/index.d.ts.map +0 -1
- package/build/index.js.map +0 -1
- package/lib/commands/actions.js +0 -107
- package/lib/commands/alert.js +0 -63
- package/lib/commands/app-management.js +0 -32
- package/lib/commands/battery.js +0 -23
- package/lib/commands/clipboard.js +0 -37
- package/lib/commands/find.js +0 -47
- package/lib/commands/keyboard.js +0 -108
- package/lib/commands/navigation.js +0 -33
- package/lib/commands/viewport.js +0 -100
- package/lib/doctor/optional-checks.js +0 -5
- package/lib/doctor/required-checks.js +0 -6
package/CHANGELOG.md
CHANGED
|
@@ -1,3 +1,15 @@
|
|
|
1
|
+
## [6.7.8](https://github.com/appium/appium-uiautomator2-driver/compare/v6.7.7...v6.7.8) (2025-12-25)
|
|
2
|
+
|
|
3
|
+
### Miscellaneous Chores
|
|
4
|
+
|
|
5
|
+
* Migrate index to typescript ([#972](https://github.com/appium/appium-uiautomator2-driver/issues/972)) ([381fadd](https://github.com/appium/appium-uiautomator2-driver/commit/381fadd7b3e53ad7fa9bd16e8e60d563ebfc8c24))
|
|
6
|
+
|
|
7
|
+
## [6.7.7](https://github.com/appium/appium-uiautomator2-driver/compare/v6.7.6...v6.7.7) (2025-12-24)
|
|
8
|
+
|
|
9
|
+
### Miscellaneous Chores
|
|
10
|
+
|
|
11
|
+
* Migrate the rest of command modules to typescript ([#971](https://github.com/appium/appium-uiautomator2-driver/issues/971)) ([1e7606c](https://github.com/appium/appium-uiautomator2-driver/commit/1e7606ccc41b19ace7b7ced898329f84a4774280))
|
|
12
|
+
|
|
1
13
|
## [6.7.6](https://github.com/appium/appium-uiautomator2-driver/compare/v6.7.5...v6.7.6) (2025-12-23)
|
|
2
14
|
|
|
3
15
|
### Miscellaneous Chores
|
|
@@ -1,40 +1,37 @@
|
|
|
1
|
+
import type { StringRecord } from '@appium/types';
|
|
2
|
+
import type { AndroidUiautomator2Driver } from '../driver';
|
|
3
|
+
import type { ActionResult } from './types';
|
|
1
4
|
/**
|
|
2
|
-
*
|
|
3
|
-
* @
|
|
4
|
-
* @param
|
|
5
|
-
* @param
|
|
6
|
-
* @param
|
|
7
|
-
* @param
|
|
8
|
-
* @param
|
|
9
|
-
* @param
|
|
10
|
-
* @
|
|
11
|
-
* @returns {Promise<any>}
|
|
5
|
+
* Schedules a recurring action to be performed at specified intervals.
|
|
6
|
+
* @param name - Unique name for the scheduled action.
|
|
7
|
+
* @param steps - Array of action steps to be executed.
|
|
8
|
+
* @param maxPass - Maximum number of successful executions before stopping.
|
|
9
|
+
* @param maxFail - Maximum number of failed executions before stopping.
|
|
10
|
+
* @param times - Total number of times to execute the action.
|
|
11
|
+
* @param intervalMs - Interval in milliseconds between action executions.
|
|
12
|
+
* @param maxHistoryItems - Maximum number of history items to keep.
|
|
13
|
+
* @returns The result of scheduling the action.
|
|
12
14
|
*/
|
|
13
|
-
export function mobileScheduleAction(this:
|
|
15
|
+
export declare function mobileScheduleAction(this: AndroidUiautomator2Driver, name: string, steps: StringRecord[], maxPass?: number, maxFail?: number, times?: number, intervalMs?: number, maxHistoryItems?: number): Promise<any>;
|
|
14
16
|
/**
|
|
15
|
-
*
|
|
16
|
-
* @
|
|
17
|
-
* @
|
|
18
|
-
* @returns {Promise<import('./types').ActionResult>}
|
|
17
|
+
* Gets the execution history for a scheduled action.
|
|
18
|
+
* @param name - Name of the scheduled action.
|
|
19
|
+
* @returns The action execution history containing repeats and step results.
|
|
19
20
|
*/
|
|
20
|
-
export function mobileGetActionHistory(this:
|
|
21
|
+
export declare function mobileGetActionHistory(this: AndroidUiautomator2Driver, name: string): Promise<ActionResult>;
|
|
21
22
|
/**
|
|
22
|
-
*
|
|
23
|
-
* @
|
|
24
|
-
* @
|
|
25
|
-
* @returns {Promise<any>}
|
|
23
|
+
* Unschedules a previously scheduled action.
|
|
24
|
+
* @param name - Name of the scheduled action to unschedule.
|
|
25
|
+
* @returns The result of unscheduling the action.
|
|
26
26
|
*/
|
|
27
|
-
export function mobileUnscheduleAction(this:
|
|
27
|
+
export declare function mobileUnscheduleAction(this: AndroidUiautomator2Driver, name: string): Promise<any>;
|
|
28
28
|
/**
|
|
29
|
-
*
|
|
30
|
-
* @param
|
|
31
|
-
* @returns {Promise<void>}
|
|
29
|
+
* Performs a sequence of actions.
|
|
30
|
+
* @param actions - Array of action objects to perform. Pointer actions are automatically converted to touch type.
|
|
32
31
|
*/
|
|
33
|
-
export function performActions(this:
|
|
32
|
+
export declare function performActions(this: AndroidUiautomator2Driver, actions: StringRecord[]): Promise<void>;
|
|
34
33
|
/**
|
|
35
|
-
*
|
|
36
|
-
* @returns {Promise<void>}
|
|
34
|
+
* Releases all currently pressed keys and buttons.
|
|
37
35
|
*/
|
|
38
|
-
export function releaseActions(this:
|
|
39
|
-
export type AndroidUiautomator2Driver = import("../driver").AndroidUiautomator2Driver;
|
|
36
|
+
export declare function releaseActions(this: AndroidUiautomator2Driver): Promise<void>;
|
|
40
37
|
//# sourceMappingURL=actions.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"actions.d.ts","sourceRoot":"","sources":["../../../lib/commands/actions.
|
|
1
|
+
{"version":3,"file":"actions.d.ts","sourceRoot":"","sources":["../../../lib/commands/actions.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAC,YAAY,EAAC,MAAM,eAAe,CAAC;AAChD,OAAO,KAAK,EAAC,yBAAyB,EAAC,MAAM,WAAW,CAAC;AACzD,OAAO,KAAK,EAAC,YAAY,EAAC,MAAM,SAAS,CAAC;AAE1C;;;;;;;;;;GAUG;AACH,wBAAsB,oBAAoB,CACxC,IAAI,EAAE,yBAAyB,EAC/B,IAAI,EAAE,MAAM,EACZ,KAAK,EAAE,YAAY,EAAE,EACrB,OAAO,CAAC,EAAE,MAAM,EAChB,OAAO,CAAC,EAAE,MAAM,EAChB,KAAK,CAAC,EAAE,MAAM,EACd,UAAU,CAAC,EAAE,MAAM,EACnB,eAAe,CAAC,EAAE,MAAM,GACvB,OAAO,CAAC,GAAG,CAAC,CAUd;AAED;;;;GAIG;AACH,wBAAsB,sBAAsB,CAC1C,IAAI,EAAE,yBAAyB,EAC/B,IAAI,EAAE,MAAM,GACX,OAAO,CAAC,YAAY,CAAC,CAEvB;AAED;;;;GAIG;AACH,wBAAsB,sBAAsB,CAC1C,IAAI,EAAE,yBAAyB,EAC/B,IAAI,EAAE,MAAM,GACX,OAAO,CAAC,GAAG,CAAC,CAEd;AAED;;;GAGG;AACH,wBAAsB,cAAc,CAClC,IAAI,EAAE,yBAAyB,EAC/B,OAAO,EAAE,YAAY,EAAE,GACtB,OAAO,CAAC,IAAI,CAAC,CAmBf;AAED;;GAEG;AACH,wBAAsB,cAAc,CAAC,IAAI,EAAE,yBAAyB,GAAG,OAAO,CAAC,IAAI,CAAC,CAEnF"}
|
|
@@ -6,16 +6,15 @@ exports.mobileUnscheduleAction = mobileUnscheduleAction;
|
|
|
6
6
|
exports.performActions = performActions;
|
|
7
7
|
exports.releaseActions = releaseActions;
|
|
8
8
|
/**
|
|
9
|
-
*
|
|
10
|
-
* @
|
|
11
|
-
* @param
|
|
12
|
-
* @param
|
|
13
|
-
* @param
|
|
14
|
-
* @param
|
|
15
|
-
* @param
|
|
16
|
-
* @param
|
|
17
|
-
* @
|
|
18
|
-
* @returns {Promise<any>}
|
|
9
|
+
* Schedules a recurring action to be performed at specified intervals.
|
|
10
|
+
* @param name - Unique name for the scheduled action.
|
|
11
|
+
* @param steps - Array of action steps to be executed.
|
|
12
|
+
* @param maxPass - Maximum number of successful executions before stopping.
|
|
13
|
+
* @param maxFail - Maximum number of failed executions before stopping.
|
|
14
|
+
* @param times - Total number of times to execute the action.
|
|
15
|
+
* @param intervalMs - Interval in milliseconds between action executions.
|
|
16
|
+
* @param maxHistoryItems - Maximum number of history items to keep.
|
|
17
|
+
* @returns The result of scheduling the action.
|
|
19
18
|
*/
|
|
20
19
|
async function mobileScheduleAction(name, steps, maxPass, maxFail, times, intervalMs, maxHistoryItems) {
|
|
21
20
|
return await this.uiautomator2.jwproxy.command('/appium/schedule_action', 'POST', {
|
|
@@ -29,27 +28,24 @@ async function mobileScheduleAction(name, steps, maxPass, maxFail, times, interv
|
|
|
29
28
|
});
|
|
30
29
|
}
|
|
31
30
|
/**
|
|
32
|
-
*
|
|
33
|
-
* @
|
|
34
|
-
* @
|
|
35
|
-
* @returns {Promise<import('./types').ActionResult>}
|
|
31
|
+
* Gets the execution history for a scheduled action.
|
|
32
|
+
* @param name - Name of the scheduled action.
|
|
33
|
+
* @returns The action execution history containing repeats and step results.
|
|
36
34
|
*/
|
|
37
35
|
async function mobileGetActionHistory(name) {
|
|
38
|
-
return
|
|
36
|
+
return (await this.uiautomator2.jwproxy.command('/appium/action_history', 'POST', { name }));
|
|
39
37
|
}
|
|
40
38
|
/**
|
|
41
|
-
*
|
|
42
|
-
* @
|
|
43
|
-
* @
|
|
44
|
-
* @returns {Promise<any>}
|
|
39
|
+
* Unschedules a previously scheduled action.
|
|
40
|
+
* @param name - Name of the scheduled action to unschedule.
|
|
41
|
+
* @returns The result of unscheduling the action.
|
|
45
42
|
*/
|
|
46
43
|
async function mobileUnscheduleAction(name) {
|
|
47
44
|
return await this.uiautomator2.jwproxy.command('/appium/unschedule_action', 'POST', { name });
|
|
48
45
|
}
|
|
49
46
|
/**
|
|
50
|
-
*
|
|
51
|
-
* @param
|
|
52
|
-
* @returns {Promise<void>}
|
|
47
|
+
* Performs a sequence of actions.
|
|
48
|
+
* @param actions - Array of action objects to perform. Pointer actions are automatically converted to touch type.
|
|
53
49
|
*/
|
|
54
50
|
async function performActions(actions) {
|
|
55
51
|
// This is mandatory, since Selenium API uses MOUSE as the default pointer type
|
|
@@ -66,13 +62,9 @@ async function performActions(actions) {
|
|
|
66
62
|
});
|
|
67
63
|
}
|
|
68
64
|
/**
|
|
69
|
-
*
|
|
70
|
-
* @returns {Promise<void>}
|
|
65
|
+
* Releases all currently pressed keys and buttons.
|
|
71
66
|
*/
|
|
72
67
|
async function releaseActions() {
|
|
73
68
|
this.log.info('On this platform, releaseActions is a no-op');
|
|
74
69
|
}
|
|
75
|
-
/**
|
|
76
|
-
* @typedef {import('../driver').AndroidUiautomator2Driver} AndroidUiautomator2Driver
|
|
77
|
-
*/
|
|
78
70
|
//# sourceMappingURL=actions.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"actions.js","sourceRoot":"","sources":["../../../lib/commands/actions.
|
|
1
|
+
{"version":3,"file":"actions.js","sourceRoot":"","sources":["../../../lib/commands/actions.ts"],"names":[],"mappings":";;AAeA,oDAmBC;AAOD,wDAKC;AAOD,wDAKC;AAMD,wCAsBC;AAKD,wCAEC;AAzFD;;;;;;;;;;GAUG;AACI,KAAK,UAAU,oBAAoB,CAExC,IAAY,EACZ,KAAqB,EACrB,OAAgB,EAChB,OAAgB,EAChB,KAAc,EACd,UAAmB,EACnB,eAAwB;IAExB,OAAO,MAAM,IAAI,CAAC,YAAY,CAAC,OAAO,CAAC,OAAO,CAAC,yBAAyB,EAAE,MAAM,EAAE;QAChF,IAAI;QACJ,KAAK;QACL,OAAO;QACP,OAAO;QACP,KAAK;QACL,UAAU;QACV,eAAe;KAChB,CAAC,CAAC;AACL,CAAC;AAED;;;;GAIG;AACI,KAAK,UAAU,sBAAsB,CAE1C,IAAY;IAEZ,OAAO,CAAC,MAAM,IAAI,CAAC,YAAY,CAAC,OAAO,CAAC,OAAO,CAAC,wBAAwB,EAAE,MAAM,EAAE,EAAC,IAAI,EAAC,CAAC,CAAiB,CAAC;AAC7G,CAAC;AAED;;;;GAIG;AACI,KAAK,UAAU,sBAAsB,CAE1C,IAAY;IAEZ,OAAO,MAAM,IAAI,CAAC,YAAY,CAAC,OAAO,CAAC,OAAO,CAAC,2BAA2B,EAAE,MAAM,EAAE,EAAC,IAAI,EAAC,CAAC,CAAC;AAC9F,CAAC;AAED;;;GAGG;AACI,KAAK,UAAU,cAAc,CAElC,OAAuB;IAEvB,+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,CAAC,UAAU,EAAE,MAAM,EAAE;QAC1D,OAAO,EAAE,mBAAmB;KAC7B,CAAC,CAAC;AACL,CAAC;AAED;;GAEG;AACI,KAAK,UAAU,cAAc;IAClC,IAAI,CAAC,GAAG,CAAC,IAAI,CAAC,6CAA6C,CAAC,CAAC;AAC/D,CAAC"}
|
|
@@ -1,33 +1,25 @@
|
|
|
1
|
+
import type { AndroidUiautomator2Driver } from '../driver';
|
|
1
2
|
/**
|
|
2
|
-
*
|
|
3
|
-
* @returns
|
|
3
|
+
* Gets the text of the currently displayed alert.
|
|
4
|
+
* @returns The alert text as a string.
|
|
4
5
|
*/
|
|
5
|
-
export function getAlertText(this:
|
|
6
|
+
export declare function getAlertText(this: AndroidUiautomator2Driver): Promise<string>;
|
|
6
7
|
/**
|
|
7
|
-
*
|
|
8
|
-
* @param
|
|
9
|
-
* If the name is not provided
|
|
10
|
-
* then the script will try to detect the button automatically.
|
|
11
|
-
* @returns {Promise<void>}
|
|
8
|
+
* Accepts the currently displayed alert.
|
|
9
|
+
* @param buttonLabel - Optional label of the button to click. If not provided, the button will be detected automatically.
|
|
12
10
|
*/
|
|
13
|
-
export function mobileAcceptAlert(this:
|
|
11
|
+
export declare function mobileAcceptAlert(this: AndroidUiautomator2Driver, buttonLabel?: string): Promise<void>;
|
|
14
12
|
/**
|
|
15
|
-
*
|
|
16
|
-
* @returns {Promise<void>}
|
|
13
|
+
* Accepts the currently displayed alert (W3C endpoint).
|
|
17
14
|
*/
|
|
18
|
-
export function postAcceptAlert(this:
|
|
15
|
+
export declare function postAcceptAlert(this: AndroidUiautomator2Driver): Promise<void>;
|
|
19
16
|
/**
|
|
20
|
-
*
|
|
21
|
-
* @param
|
|
22
|
-
* If the name is not provided
|
|
23
|
-
* then the script will try to detect the button automatically.
|
|
24
|
-
* @returns {Promise<void>}
|
|
17
|
+
* Dismisses the currently displayed alert.
|
|
18
|
+
* @param buttonLabel - Optional label of the button to click. If not provided, the button will be detected automatically.
|
|
25
19
|
*/
|
|
26
|
-
export function mobileDismissAlert(this:
|
|
20
|
+
export declare function mobileDismissAlert(this: AndroidUiautomator2Driver, buttonLabel?: string): Promise<void>;
|
|
27
21
|
/**
|
|
28
|
-
*
|
|
29
|
-
* @returns {Promise<void>}
|
|
22
|
+
* Dismisses the currently displayed alert (W3C endpoint).
|
|
30
23
|
*/
|
|
31
|
-
export function postDismissAlert(this:
|
|
32
|
-
export type AndroidUiautomator2Driver = import("../driver").AndroidUiautomator2Driver;
|
|
24
|
+
export declare function postDismissAlert(this: AndroidUiautomator2Driver): Promise<void>;
|
|
33
25
|
//# sourceMappingURL=alert.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"alert.d.ts","sourceRoot":"","sources":["../../../lib/commands/alert.
|
|
1
|
+
{"version":3,"file":"alert.d.ts","sourceRoot":"","sources":["../../../lib/commands/alert.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAC,yBAAyB,EAAC,MAAM,WAAW,CAAC;AAEzD;;;GAGG;AACH,wBAAsB,YAAY,CAAC,IAAI,EAAE,yBAAyB,GAAG,OAAO,CAAC,MAAM,CAAC,CAEnF;AAED;;;GAGG;AACH,wBAAsB,iBAAiB,CACrC,IAAI,EAAE,yBAAyB,EAC/B,WAAW,CAAC,EAAE,MAAM,GACnB,OAAO,CAAC,IAAI,CAAC,CAEf;AAED;;GAEG;AACH,wBAAsB,eAAe,CAAC,IAAI,EAAE,yBAAyB,GAAG,OAAO,CAAC,IAAI,CAAC,CAEpF;AAED;;;GAGG;AACH,wBAAsB,kBAAkB,CACtC,IAAI,EAAE,yBAAyB,EAC/B,WAAW,CAAC,EAAE,MAAM,GACnB,OAAO,CAAC,IAAI,CAAC,CAEf;AAED;;GAEG;AACH,wBAAsB,gBAAgB,CAAC,IAAI,EAAE,yBAAyB,GAAG,OAAO,CAAC,IAAI,CAAC,CAErF"}
|
|
@@ -6,47 +6,36 @@ exports.postAcceptAlert = postAcceptAlert;
|
|
|
6
6
|
exports.mobileDismissAlert = mobileDismissAlert;
|
|
7
7
|
exports.postDismissAlert = postDismissAlert;
|
|
8
8
|
/**
|
|
9
|
-
*
|
|
10
|
-
* @returns
|
|
9
|
+
* Gets the text of the currently displayed alert.
|
|
10
|
+
* @returns The alert text as a string.
|
|
11
11
|
*/
|
|
12
12
|
async function getAlertText() {
|
|
13
13
|
return String(await this.uiautomator2.jwproxy.command('/alert/text', 'GET', {}));
|
|
14
14
|
}
|
|
15
15
|
/**
|
|
16
|
-
*
|
|
17
|
-
* @param
|
|
18
|
-
* If the name is not provided
|
|
19
|
-
* then the script will try to detect the button automatically.
|
|
20
|
-
* @returns {Promise<void>}
|
|
16
|
+
* Accepts the currently displayed alert.
|
|
17
|
+
* @param buttonLabel - Optional label of the button to click. If not provided, the button will be detected automatically.
|
|
21
18
|
*/
|
|
22
19
|
async function mobileAcceptAlert(buttonLabel) {
|
|
23
20
|
await this.uiautomator2.jwproxy.command('/alert/accept', 'POST', { buttonLabel });
|
|
24
21
|
}
|
|
25
22
|
/**
|
|
26
|
-
*
|
|
27
|
-
* @returns {Promise<void>}
|
|
23
|
+
* Accepts the currently displayed alert (W3C endpoint).
|
|
28
24
|
*/
|
|
29
25
|
async function postAcceptAlert() {
|
|
30
26
|
await this.mobileAcceptAlert();
|
|
31
27
|
}
|
|
32
28
|
/**
|
|
33
|
-
*
|
|
34
|
-
* @param
|
|
35
|
-
* If the name is not provided
|
|
36
|
-
* then the script will try to detect the button automatically.
|
|
37
|
-
* @returns {Promise<void>}
|
|
29
|
+
* Dismisses the currently displayed alert.
|
|
30
|
+
* @param buttonLabel - Optional label of the button to click. If not provided, the button will be detected automatically.
|
|
38
31
|
*/
|
|
39
32
|
async function mobileDismissAlert(buttonLabel) {
|
|
40
33
|
await this.uiautomator2.jwproxy.command('/alert/dismiss', 'POST', { buttonLabel });
|
|
41
34
|
}
|
|
42
35
|
/**
|
|
43
|
-
*
|
|
44
|
-
* @returns {Promise<void>}
|
|
36
|
+
* Dismisses the currently displayed alert (W3C endpoint).
|
|
45
37
|
*/
|
|
46
38
|
async function postDismissAlert() {
|
|
47
39
|
await this.mobileDismissAlert();
|
|
48
40
|
}
|
|
49
|
-
/**
|
|
50
|
-
* @typedef {import('../driver').AndroidUiautomator2Driver} AndroidUiautomator2Driver
|
|
51
|
-
*/
|
|
52
41
|
//# sourceMappingURL=alert.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"alert.js","sourceRoot":"","sources":["../../../lib/commands/alert.
|
|
1
|
+
{"version":3,"file":"alert.js","sourceRoot":"","sources":["../../../lib/commands/alert.ts"],"names":[],"mappings":";;AAMA,oCAEC;AAMD,8CAKC;AAKD,0CAEC;AAMD,gDAKC;AAKD,4CAEC;AA1CD;;;GAGG;AACI,KAAK,UAAU,YAAY;IAChC,OAAO,MAAM,CAAC,MAAM,IAAI,CAAC,YAAY,CAAC,OAAO,CAAC,OAAO,CAAC,aAAa,EAAE,KAAK,EAAE,EAAE,CAAC,CAAC,CAAC;AACnF,CAAC;AAED;;;GAGG;AACI,KAAK,UAAU,iBAAiB,CAErC,WAAoB;IAEpB,MAAM,IAAI,CAAC,YAAY,CAAC,OAAO,CAAC,OAAO,CAAC,eAAe,EAAE,MAAM,EAAE,EAAC,WAAW,EAAC,CAAC,CAAC;AAClF,CAAC;AAED;;GAEG;AACI,KAAK,UAAU,eAAe;IACnC,MAAM,IAAI,CAAC,iBAAiB,EAAE,CAAC;AACjC,CAAC;AAED;;;GAGG;AACI,KAAK,UAAU,kBAAkB,CAEtC,WAAoB;IAEpB,MAAM,IAAI,CAAC,YAAY,CAAC,OAAO,CAAC,OAAO,CAAC,gBAAgB,EAAE,MAAM,EAAE,EAAC,WAAW,EAAC,CAAC,CAAC;AACnF,CAAC;AAED;;GAEG;AACI,KAAK,UAAU,gBAAgB;IACpC,MAAM,IAAI,CAAC,kBAAkB,EAAE,CAAC;AAClC,CAAC"}
|
|
@@ -1,13 +1,10 @@
|
|
|
1
|
+
import type { AndroidUiautomator2Driver } from '../driver';
|
|
2
|
+
import type { InstallOptions } from './types';
|
|
1
3
|
/**
|
|
2
|
-
*
|
|
3
|
-
* @
|
|
4
|
-
* @param
|
|
5
|
-
*
|
|
6
|
-
* @param {import('./types').InstallOptions} [options] Installation options.
|
|
7
|
-
* @throws {Error} if an error occured while installing the given APKs.
|
|
8
|
-
* @returns {Promise<void>}
|
|
4
|
+
* Installs multiple APKs with `install-multiple` option.
|
|
5
|
+
* @param apks - Array of APK file paths or URLs to install.
|
|
6
|
+
* @param options - Optional installation options (allowTestPackages, useSdcard, grantPermissions, etc.).
|
|
7
|
+
* @throws {errors.InvalidArgumentError} If the apks array is empty or invalid.
|
|
9
8
|
*/
|
|
10
|
-
export function mobileInstallMultipleApks(this:
|
|
11
|
-
export type AndroidUiautomator2Driver = import("../driver").AndroidUiautomator2Driver;
|
|
12
|
-
export type StringRecord<T = any> = import("@appium/types").StringRecord<T>;
|
|
9
|
+
export declare function mobileInstallMultipleApks(this: AndroidUiautomator2Driver, apks: string[], options?: InstallOptions): Promise<void>;
|
|
13
10
|
//# sourceMappingURL=app-management.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"app-management.d.ts","sourceRoot":"","sources":["../../../lib/commands/app-management.
|
|
1
|
+
{"version":3,"file":"app-management.d.ts","sourceRoot":"","sources":["../../../lib/commands/app-management.ts"],"names":[],"mappings":"AAIA,OAAO,KAAK,EAAC,yBAAyB,EAAC,MAAM,WAAW,CAAC;AACzD,OAAO,KAAK,EAAC,cAAc,EAAC,MAAM,SAAS,CAAC;AAE5C;;;;;GAKG;AACH,wBAAsB,yBAAyB,CAC7C,IAAI,EAAE,yBAAyB,EAC/B,IAAI,EAAE,MAAM,EAAE,EACd,OAAO,CAAC,EAAE,cAAc,GACvB,OAAO,CAAC,IAAI,CAAC,CAMf"}
|
|
@@ -9,13 +9,10 @@ const bluebird_1 = __importDefault(require("bluebird"));
|
|
|
9
9
|
const driver_1 = require("appium/driver");
|
|
10
10
|
const extensions_1 = require("../extensions");
|
|
11
11
|
/**
|
|
12
|
-
*
|
|
13
|
-
* @
|
|
14
|
-
* @param
|
|
15
|
-
*
|
|
16
|
-
* @param {import('./types').InstallOptions} [options] Installation options.
|
|
17
|
-
* @throws {Error} if an error occured while installing the given APKs.
|
|
18
|
-
* @returns {Promise<void>}
|
|
12
|
+
* Installs multiple APKs with `install-multiple` option.
|
|
13
|
+
* @param apks - Array of APK file paths or URLs to install.
|
|
14
|
+
* @param options - Optional installation options (allowTestPackages, useSdcard, grantPermissions, etc.).
|
|
15
|
+
* @throws {errors.InvalidArgumentError} If the apks array is empty or invalid.
|
|
19
16
|
*/
|
|
20
17
|
async function mobileInstallMultipleApks(apks, options) {
|
|
21
18
|
if (!lodash_1.default.isArray(apks) || lodash_1.default.isEmpty(apks)) {
|
|
@@ -24,11 +21,4 @@ async function mobileInstallMultipleApks(apks, options) {
|
|
|
24
21
|
const configuredApks = await bluebird_1.default.all(apks.map((app) => this.helpers.configureApp(app, [extensions_1.APK_EXTENSION])));
|
|
25
22
|
await this.adb.installMultipleApks(configuredApks, options);
|
|
26
23
|
}
|
|
27
|
-
/**
|
|
28
|
-
* @typedef {import('../driver').AndroidUiautomator2Driver} AndroidUiautomator2Driver
|
|
29
|
-
*/
|
|
30
|
-
/**
|
|
31
|
-
* @template [T=any]
|
|
32
|
-
* @typedef {import('@appium/types').StringRecord<T>} StringRecord
|
|
33
|
-
*/
|
|
34
24
|
//# sourceMappingURL=app-management.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"app-management.js","sourceRoot":"","sources":["../../../lib/commands/app-management.
|
|
1
|
+
{"version":3,"file":"app-management.js","sourceRoot":"","sources":["../../../lib/commands/app-management.ts"],"names":[],"mappings":";;;;;AAaA,8DAUC;AAvBD,oDAAuB;AACvB,wDAAyB;AACzB,0CAAqC;AACrC,8CAA4C;AAI5C;;;;;GAKG;AACI,KAAK,UAAU,yBAAyB,CAE7C,IAAc,EACd,OAAwB;IAExB,IAAI,CAAC,gBAAC,CAAC,OAAO,CAAC,IAAI,CAAC,IAAI,gBAAC,CAAC,OAAO,CAAC,IAAI,CAAC,EAAE,CAAC;QACxC,MAAM,IAAI,eAAM,CAAC,oBAAoB,CAAC,8BAA8B,CAAC,CAAC;IACxE,CAAC;IACD,MAAM,cAAc,GAAG,MAAM,kBAAC,CAAC,GAAG,CAAC,IAAI,CAAC,GAAG,CAAC,CAAC,GAAG,EAAE,EAAE,CAAC,IAAI,CAAC,OAAO,CAAC,YAAY,CAAC,GAAG,EAAE,CAAC,0BAAa,CAAC,CAAC,CAAC,CAAC,CAAC;IACvG,MAAM,IAAI,CAAC,GAAG,CAAC,mBAAmB,CAAC,cAAc,EAAE,OAAO,CAAC,CAAC;AAC9D,CAAC"}
|
|
@@ -1,9 +1,8 @@
|
|
|
1
|
+
import type { AndroidUiautomator2Driver } from '../driver';
|
|
2
|
+
import type { BatteryInfo } from './types';
|
|
1
3
|
/**
|
|
2
4
|
* Reads the battery information from the device under test.
|
|
3
|
-
* @
|
|
4
|
-
* @returns {Promise<import('./types').BatteryInfo>} The actual battery info
|
|
5
|
+
* @returns Battery information including level (0.0-1.0) and state (charging, discharging, etc.).
|
|
5
6
|
*/
|
|
6
|
-
export function mobileGetBatteryInfo(this:
|
|
7
|
-
export type BatteryInfo = import("./types").BatteryInfo;
|
|
8
|
-
export type AndroidUiautomator2Driver = import("../driver").AndroidUiautomator2Driver;
|
|
7
|
+
export declare function mobileGetBatteryInfo(this: AndroidUiautomator2Driver): Promise<BatteryInfo>;
|
|
9
8
|
//# sourceMappingURL=battery.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"battery.d.ts","sourceRoot":"","sources":["../../../lib/commands/battery.
|
|
1
|
+
{"version":3,"file":"battery.d.ts","sourceRoot":"","sources":["../../../lib/commands/battery.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAC,yBAAyB,EAAC,MAAM,WAAW,CAAC;AACzD,OAAO,KAAK,EAAC,WAAW,EAAC,MAAM,SAAS,CAAC;AAEzC;;;GAGG;AACH,wBAAsB,oBAAoB,CAAC,IAAI,EAAE,yBAAyB,GAAG,OAAO,CAAC,WAAW,CAAC,CAUhG"}
|
|
@@ -3,19 +3,14 @@ Object.defineProperty(exports, "__esModule", { value: true });
|
|
|
3
3
|
exports.mobileGetBatteryInfo = mobileGetBatteryInfo;
|
|
4
4
|
/**
|
|
5
5
|
* Reads the battery information from the device under test.
|
|
6
|
-
* @
|
|
7
|
-
* @returns {Promise<import('./types').BatteryInfo>} The actual battery info
|
|
6
|
+
* @returns Battery information including level (0.0-1.0) and state (charging, discharging, etc.).
|
|
8
7
|
*/
|
|
9
8
|
async function mobileGetBatteryInfo() {
|
|
10
|
-
const result =
|
|
11
|
-
const batteryInfo =
|
|
9
|
+
const result = (await this.uiautomator2.jwproxy.command('/appium/device/battery_info', 'GET', {}));
|
|
10
|
+
const batteryInfo = result;
|
|
12
11
|
// Give it the same name as in iOS
|
|
13
12
|
batteryInfo.state = result.status;
|
|
14
13
|
delete batteryInfo.status;
|
|
15
|
-
return
|
|
14
|
+
return batteryInfo;
|
|
16
15
|
}
|
|
17
|
-
/**
|
|
18
|
-
* @typedef {import('./types').BatteryInfo} BatteryInfo
|
|
19
|
-
* @typedef {import('../driver').AndroidUiautomator2Driver} AndroidUiautomator2Driver
|
|
20
|
-
*/
|
|
21
16
|
//# sourceMappingURL=battery.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"battery.js","sourceRoot":"","sources":["../../../lib/commands/battery.
|
|
1
|
+
{"version":3,"file":"battery.js","sourceRoot":"","sources":["../../../lib/commands/battery.ts"],"names":[],"mappings":";;AAOA,oDAUC;AAdD;;;GAGG;AACI,KAAK,UAAU,oBAAoB;IACxC,MAAM,MAAM,GAAG,CAAC,MAAM,IAAI,CAAC,YAAY,CAAC,OAAO,CAAC,OAAO,CAAC,6BAA6B,EAAE,KAAK,EAAE,EAAE,CAAC,CAGhG,CAAC;IACF,MAAM,WAAW,GAAG,MAAa,CAAC;IAClC,kCAAkC;IAClC,WAAW,CAAC,KAAK,GAAG,MAAM,CAAC,MAAM,CAAC;IAClC,OAAO,WAAW,CAAC,MAAM,CAAC;IAC1B,OAAO,WAA0B,CAAC;AACpC,CAAC"}
|
|
@@ -1,18 +1,14 @@
|
|
|
1
|
+
import type { AndroidUiautomator2Driver } from '../driver';
|
|
1
2
|
/**
|
|
2
|
-
*
|
|
3
|
-
* @returns
|
|
4
|
-
* or an empty string if the clipboard is empty.
|
|
3
|
+
* Gets the clipboard content as a base64-encoded string.
|
|
4
|
+
* @returns Base64-encoded clipboard content, or an empty string if the clipboard is empty.
|
|
5
5
|
*/
|
|
6
|
-
export function getClipboard(this:
|
|
6
|
+
export declare function getClipboard(this: AndroidUiautomator2Driver): Promise<string>;
|
|
7
7
|
/**
|
|
8
|
-
*
|
|
9
|
-
* @param
|
|
10
|
-
* @param
|
|
11
|
-
*
|
|
12
|
-
* @param {string} [label] Optinal label to identify the current
|
|
13
|
-
* clipboard payload
|
|
14
|
-
* @returns {Promise<void>}
|
|
8
|
+
* Sets the clipboard content.
|
|
9
|
+
* @param content - Base64-encoded clipboard payload.
|
|
10
|
+
* @param contentType - Content type. Only 'plaintext' is supported. Defaults to 'plaintext'.
|
|
11
|
+
* @param label - Optional label to identify the current clipboard payload.
|
|
15
12
|
*/
|
|
16
|
-
export function setClipboard(this:
|
|
17
|
-
export type AndroidUiautomator2Driver = import("../driver").AndroidUiautomator2Driver;
|
|
13
|
+
export declare function setClipboard(this: AndroidUiautomator2Driver, content: string, contentType?: 'plaintext', label?: string): Promise<void>;
|
|
18
14
|
//# sourceMappingURL=clipboard.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"clipboard.d.ts","sourceRoot":"","sources":["../../../lib/commands/clipboard.
|
|
1
|
+
{"version":3,"file":"clipboard.d.ts","sourceRoot":"","sources":["../../../lib/commands/clipboard.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAC,yBAAyB,EAAC,MAAM,WAAW,CAAC;AAEzD;;;GAGG;AACH,wBAAsB,YAAY,CAAC,IAAI,EAAE,yBAAyB,GAAG,OAAO,CAAC,MAAM,CAAC,CAMnF;AAED;;;;;GAKG;AACH,wBAAsB,YAAY,CAChC,IAAI,EAAE,yBAAyB,EAC/B,OAAO,EAAE,MAAM,EACf,WAAW,GAAE,WAAyB,EACtC,KAAK,CAAC,EAAE,MAAM,GACb,OAAO,CAAC,IAAI,CAAC,CAEf"}
|
|
@@ -3,9 +3,8 @@ Object.defineProperty(exports, "__esModule", { value: true });
|
|
|
3
3
|
exports.getClipboard = getClipboard;
|
|
4
4
|
exports.setClipboard = setClipboard;
|
|
5
5
|
/**
|
|
6
|
-
*
|
|
7
|
-
* @returns
|
|
8
|
-
* or an empty string if the clipboard is empty.
|
|
6
|
+
* Gets the clipboard content as a base64-encoded string.
|
|
7
|
+
* @returns Base64-encoded clipboard content, or an empty string if the clipboard is empty.
|
|
9
8
|
*/
|
|
10
9
|
async function getClipboard() {
|
|
11
10
|
return String((await this.adb.getApiLevel()) < 29
|
|
@@ -13,18 +12,12 @@ async function getClipboard() {
|
|
|
13
12
|
: await this.settingsApp.getClipboard());
|
|
14
13
|
}
|
|
15
14
|
/**
|
|
16
|
-
*
|
|
17
|
-
* @param
|
|
18
|
-
* @param
|
|
19
|
-
*
|
|
20
|
-
* @param {string} [label] Optinal label to identify the current
|
|
21
|
-
* clipboard payload
|
|
22
|
-
* @returns {Promise<void>}
|
|
15
|
+
* Sets the clipboard content.
|
|
16
|
+
* @param content - Base64-encoded clipboard payload.
|
|
17
|
+
* @param contentType - Content type. Only 'plaintext' is supported. Defaults to 'plaintext'.
|
|
18
|
+
* @param label - Optional label to identify the current clipboard payload.
|
|
23
19
|
*/
|
|
24
|
-
async function setClipboard(content, contentType, label) {
|
|
20
|
+
async function setClipboard(content, contentType = 'plaintext', label) {
|
|
25
21
|
await this.uiautomator2.jwproxy.command('/appium/device/set_clipboard', 'POST', { content, contentType, label });
|
|
26
22
|
}
|
|
27
|
-
/**
|
|
28
|
-
* @typedef {import('../driver').AndroidUiautomator2Driver} AndroidUiautomator2Driver
|
|
29
|
-
*/
|
|
30
23
|
//# sourceMappingURL=clipboard.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"clipboard.js","sourceRoot":"","sources":["../../../lib/commands/clipboard.
|
|
1
|
+
{"version":3,"file":"clipboard.js","sourceRoot":"","sources":["../../../lib/commands/clipboard.ts"],"names":[],"mappings":";;AAMA,oCAMC;AAQD,oCAOC;AAzBD;;;GAGG;AACI,KAAK,UAAU,YAAY;IAChC,OAAO,MAAM,CACX,CAAC,MAAM,IAAI,CAAC,GAAG,CAAC,WAAW,EAAE,CAAC,GAAG,EAAE;QACjC,CAAC,CAAC,MAAM,IAAI,CAAC,YAAY,CAAC,OAAO,CAAC,OAAO,CAAC,8BAA8B,EAAE,MAAM,EAAE,EAAE,CAAC;QACrF,CAAC,CAAC,MAAM,IAAI,CAAC,WAAW,CAAC,YAAY,EAAE,CAC1C,CAAC;AACJ,CAAC;AAED;;;;;GAKG;AACI,KAAK,UAAU,YAAY,CAEhC,OAAe,EACf,cAA2B,WAAW,EACtC,KAAc;IAEd,MAAM,IAAI,CAAC,YAAY,CAAC,OAAO,CAAC,OAAO,CAAC,8BAA8B,EAAE,MAAM,EAAE,EAAC,OAAO,EAAE,WAAW,EAAE,KAAK,EAAC,CAAC,CAAC;AACjH,CAAC"}
|
|
@@ -3,66 +3,95 @@ import type { Element as AppiumElement, Position, Rect, Size } from '@appium/typ
|
|
|
3
3
|
import type { AndroidUiautomator2Driver } from '../driver';
|
|
4
4
|
/**
|
|
5
5
|
* Gets the currently active element.
|
|
6
|
+
* @returns The currently active element.
|
|
6
7
|
*/
|
|
7
8
|
export declare function active(this: AndroidUiautomator2Driver): Promise<AppiumElement>;
|
|
8
9
|
/**
|
|
9
10
|
* Gets an element attribute value.
|
|
11
|
+
* @param attribute - Name of the attribute to retrieve.
|
|
12
|
+
* @param elementId - ID of the element.
|
|
13
|
+
* @returns The attribute value as a string.
|
|
10
14
|
*/
|
|
11
15
|
export declare function getAttribute(this: AndroidUiautomator2Driver, attribute: string, elementId: string): Promise<string>;
|
|
12
16
|
/**
|
|
13
17
|
* Returns whether the element is displayed.
|
|
18
|
+
* @param elementId - ID of the element.
|
|
19
|
+
* @returns True if the element is displayed, false otherwise.
|
|
14
20
|
*/
|
|
15
21
|
export declare function elementDisplayed(this: AndroidUiautomator2Driver, elementId: string): Promise<boolean>;
|
|
16
22
|
/**
|
|
17
23
|
* Returns whether the element is enabled.
|
|
24
|
+
* @param elementId - ID of the element.
|
|
25
|
+
* @returns True if the element is enabled, false otherwise.
|
|
18
26
|
*/
|
|
19
27
|
export declare function elementEnabled(this: AndroidUiautomator2Driver, elementId: string): Promise<boolean>;
|
|
20
28
|
/**
|
|
21
29
|
* Returns whether the element is selected.
|
|
30
|
+
* @param elementId - ID of the element.
|
|
31
|
+
* @returns True if the element is selected, false otherwise.
|
|
22
32
|
*/
|
|
23
33
|
export declare function elementSelected(this: AndroidUiautomator2Driver, elementId: string): Promise<boolean>;
|
|
24
34
|
/**
|
|
25
35
|
* Gets the element tag name.
|
|
36
|
+
* @param elementId - ID of the element.
|
|
37
|
+
* @returns The element tag name.
|
|
26
38
|
*/
|
|
27
39
|
export declare function getName(this: AndroidUiautomator2Driver, elementId: string): Promise<string>;
|
|
28
40
|
/**
|
|
29
41
|
* Gets the element location.
|
|
42
|
+
* @param elementId - ID of the element.
|
|
43
|
+
* @returns The element position coordinates (x, y).
|
|
30
44
|
*/
|
|
31
45
|
export declare function getLocation(this: AndroidUiautomator2Driver, elementId: string): Promise<Position>;
|
|
32
46
|
/**
|
|
33
47
|
* Gets the element size.
|
|
48
|
+
* @param elementId - ID of the element.
|
|
49
|
+
* @returns The element size (width, height).
|
|
34
50
|
*/
|
|
35
51
|
export declare function getSize(this: AndroidUiautomator2Driver, elementId: string): Promise<Size>;
|
|
36
52
|
/**
|
|
37
53
|
* Sets the value of an element using the upstream driver API.
|
|
54
|
+
* @param params - Options containing the element ID and value to set.
|
|
38
55
|
*/
|
|
39
56
|
export declare function doSetElementValue(this: AndroidUiautomator2Driver, params: DoSetElementValueOpts): Promise<void>;
|
|
40
57
|
/**
|
|
41
58
|
* Sends text to an element without replacement.
|
|
59
|
+
* @param keys - Text to send, either as a string or array of strings (which will be joined).
|
|
60
|
+
* @param elementId - ID of the element.
|
|
42
61
|
*/
|
|
43
62
|
export declare function setValueImmediate(this: AndroidUiautomator2Driver, keys: string | string[], elementId: string): Promise<void>;
|
|
44
63
|
/**
|
|
45
64
|
* Gets the element text.
|
|
65
|
+
* @param elementId - ID of the element.
|
|
66
|
+
* @returns The element text content.
|
|
46
67
|
*/
|
|
47
68
|
export declare function getText(this: AndroidUiautomator2Driver, elementId: string): Promise<string>;
|
|
48
69
|
/**
|
|
49
70
|
* Clicks the given element.
|
|
71
|
+
* @param element - ID of the element to click.
|
|
50
72
|
*/
|
|
51
73
|
export declare function click(this: AndroidUiautomator2Driver, element: string): Promise<void>;
|
|
52
74
|
/**
|
|
53
75
|
* Takes a screenshot of the element.
|
|
76
|
+
* @param element - ID of the element.
|
|
77
|
+
* @returns Base64-encoded PNG screenshot of the element.
|
|
54
78
|
*/
|
|
55
79
|
export declare function getElementScreenshot(this: AndroidUiautomator2Driver, element: string): Promise<string>;
|
|
56
80
|
/**
|
|
57
81
|
* Clears the element text.
|
|
82
|
+
* @param elementId - ID of the element to clear.
|
|
58
83
|
*/
|
|
59
84
|
export declare function clear(this: AndroidUiautomator2Driver, elementId: string): Promise<void>;
|
|
60
85
|
/**
|
|
61
86
|
* Gets the element rectangle.
|
|
87
|
+
* @param elementId - ID of the element.
|
|
88
|
+
* @returns The element rectangle (x, y, width, height).
|
|
62
89
|
*/
|
|
63
90
|
export declare function getElementRect(this: AndroidUiautomator2Driver, elementId: string): Promise<Rect>;
|
|
64
91
|
/**
|
|
65
92
|
* Replaces the element text.
|
|
93
|
+
* @param elementId - ID of the element.
|
|
94
|
+
* @param text - Text to replace the current element value with.
|
|
66
95
|
*/
|
|
67
96
|
export declare function mobileReplaceElementValue(this: AndroidUiautomator2Driver, elementId: string, text: string): Promise<void>;
|
|
68
97
|
//# sourceMappingURL=element.d.ts.map
|