appium-espresso-driver 6.3.3 → 6.3.5
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 +7 -4
- package/build/lib/commands/actions.d.ts.map +1 -1
- package/build/lib/commands/actions.js +4 -3
- package/build/lib/commands/actions.js.map +1 -1
- package/build/lib/commands/app-management.d.ts +15 -13
- package/build/lib/commands/app-management.d.ts.map +1 -1
- package/build/lib/commands/app-management.js +22 -15
- package/build/lib/commands/app-management.js.map +1 -1
- package/build/lib/commands/clipboard.d.ts +10 -12
- package/build/lib/commands/clipboard.d.ts.map +1 -1
- package/build/lib/commands/clipboard.js +9 -14
- package/build/lib/commands/clipboard.js.map +1 -1
- package/build/lib/commands/context.d.ts +9 -14
- package/build/lib/commands/context.d.ts.map +1 -1
- package/build/lib/commands/context.js +5 -6
- package/build/lib/commands/context.js.map +1 -1
- package/build/lib/commands/element.d.ts +68 -57
- package/build/lib/commands/element.d.ts.map +1 -1
- package/build/lib/commands/element.js +56 -46
- package/build/lib/commands/element.js.map +1 -1
- package/build/lib/commands/idling-resources.d.ts +11 -15
- package/build/lib/commands/idling-resources.d.ts.map +1 -1
- package/build/lib/commands/idling-resources.js +7 -11
- package/build/lib/commands/idling-resources.js.map +1 -1
- package/build/lib/commands/misc.d.ts +46 -46
- package/build/lib/commands/misc.d.ts.map +1 -1
- package/build/lib/commands/misc.js +34 -35
- package/build/lib/commands/misc.js.map +1 -1
- package/build/lib/commands/screenshot.d.ts +10 -27
- package/build/lib/commands/screenshot.d.ts.map +1 -1
- package/build/lib/commands/screenshot.js +16 -21
- package/build/lib/commands/screenshot.js.map +1 -1
- package/build/lib/commands/services.d.ts +11 -12
- package/build/lib/commands/services.d.ts.map +1 -1
- package/build/lib/commands/services.js +10 -12
- package/build/lib/commands/services.js.map +1 -1
- package/build/lib/commands/types.d.ts +17 -0
- package/build/lib/commands/types.d.ts.map +1 -0
- package/build/lib/commands/types.js +3 -0
- package/build/lib/commands/types.js.map +1 -0
- package/espresso-server/library/src/main/java/io/appium/espressoserver/lib/helpers/Version.kt +1 -1
- package/lib/commands/{actions.js → actions.ts} +11 -4
- package/lib/commands/app-management.ts +67 -0
- package/lib/commands/clipboard.ts +32 -0
- package/lib/commands/{context.js → context.ts} +14 -11
- package/lib/commands/element.ts +258 -0
- package/lib/commands/{idling-resources.js → idling-resources.ts} +19 -16
- package/lib/commands/{misc.js → misc.ts} +68 -58
- package/lib/commands/{screenshot.js → screenshot.ts} +25 -28
- package/lib/commands/services.ts +49 -0
- package/lib/commands/types.ts +16 -0
- package/npm-shrinkwrap.json +5 -5
- package/package.json +1 -1
- package/lib/commands/app-management.js +0 -53
- package/lib/commands/clipboard.js +0 -31
- package/lib/commands/element.js +0 -241
- package/lib/commands/services.js +0 -40
package/CHANGELOG.md
CHANGED
|
@@ -1,3 +1,15 @@
|
|
|
1
|
+
## [6.3.5](https://github.com/appium/appium-espresso-driver/compare/v6.3.4...v6.3.5) (2026-01-17)
|
|
2
|
+
|
|
3
|
+
### Miscellaneous Chores
|
|
4
|
+
|
|
5
|
+
* Migrate the rest of commands to typescript ([#1125](https://github.com/appium/appium-espresso-driver/issues/1125)) ([83edd51](https://github.com/appium/appium-espresso-driver/commit/83edd51b1639a560a735b17518aa29c217e826bc))
|
|
6
|
+
|
|
7
|
+
## [6.3.4](https://github.com/appium/appium-espresso-driver/compare/v6.3.3...v6.3.4) (2026-01-17)
|
|
8
|
+
|
|
9
|
+
### Miscellaneous Chores
|
|
10
|
+
|
|
11
|
+
* Migrate various commands to typescript (part 1) ([#1124](https://github.com/appium/appium-espresso-driver/issues/1124)) ([ed66c3b](https://github.com/appium/appium-espresso-driver/commit/ed66c3bcec7bf19dd6eceb69080ccbfd56771705))
|
|
12
|
+
|
|
1
13
|
## [6.3.3](https://github.com/appium/appium-espresso-driver/compare/v6.3.2...v6.3.3) (2026-01-16)
|
|
2
14
|
|
|
3
15
|
### Miscellaneous Chores
|
|
@@ -1,7 +1,10 @@
|
|
|
1
|
+
import type { EspressoDriver } from '../driver';
|
|
2
|
+
import type { StringRecord } from '@appium/types';
|
|
1
3
|
/**
|
|
2
|
-
*
|
|
3
|
-
*
|
|
4
|
-
* @
|
|
4
|
+
* Performs a sequence of W3C actions (e.g., pointer, key, wheel actions).
|
|
5
|
+
* Automatically converts pointer actions to touch type for mobile compatibility.
|
|
6
|
+
* @param actions - Array of action objects following the W3C Actions protocol
|
|
7
|
+
* @returns Promise that resolves when all actions are performed
|
|
5
8
|
*/
|
|
6
|
-
export function performActions(this:
|
|
9
|
+
export declare function performActions(this: EspressoDriver, actions: StringRecord[]): Promise<void>;
|
|
7
10
|
//# 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,EAAE,cAAc,EAAE,MAAM,WAAW,CAAC;AAChD,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,eAAe,CAAC;AAElD;;;;;GAKG;AACH,wBAAsB,cAAc,CAClC,IAAI,EAAE,cAAc,EACpB,OAAO,EAAE,YAAY,EAAE,GACtB,OAAO,CAAC,IAAI,CAAC,CASf"}
|
|
@@ -2,9 +2,10 @@
|
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
3
|
exports.performActions = performActions;
|
|
4
4
|
/**
|
|
5
|
-
*
|
|
6
|
-
*
|
|
7
|
-
* @
|
|
5
|
+
* Performs a sequence of W3C actions (e.g., pointer, key, wheel actions).
|
|
6
|
+
* Automatically converts pointer actions to touch type for mobile compatibility.
|
|
7
|
+
* @param actions - Array of action objects following the W3C Actions protocol
|
|
8
|
+
* @returns Promise that resolves when all actions are performed
|
|
8
9
|
*/
|
|
9
10
|
async function performActions(actions) {
|
|
10
11
|
this.log.debug(`Received the following W3C actions: ${JSON.stringify(actions, null, ' ')}`);
|
|
@@ -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":";;AASA,wCAYC;AAlBD;;;;;GAKG;AACI,KAAK,UAAU,cAAc,CAElC,OAAuB;IAEvB,IAAI,CAAC,GAAG,CAAC,KAAK,CAAC,uCAAuC,IAAI,CAAC,SAAS,CAAC,OAAO,EAAE,IAAI,EAAE,IAAI,CAAC,EAAE,CAAC,CAAC;IAC7F,6EAA6E;IAC7E,MAAM,mBAAmB,GAAG,OAAO,CAAC,GAAG,CAAC,CAAC,MAAM,EAAE,EAAE,CAAC,CAAC;QACnD,GAAG,MAAM;QACT,GAAG,CAAC,MAAM,CAAC,IAAI,KAAK,SAAS,CAAC,CAAC,CAAC,EAAC,UAAU,EAAE,EAAC,WAAW,EAAE,OAAO,EAAC,EAAC,CAAC,CAAC,CAAC,EAAE,CAAC;KAC3E,CAAC,CAAC,CAAC;IACJ,IAAI,CAAC,GAAG,CAAC,KAAK,CAAC,yBAAyB,IAAI,CAAC,SAAS,CAAC,mBAAmB,EAAE,IAAI,EAAE,IAAI,CAAC,EAAE,CAAC,CAAC;IAC3F,MAAM,IAAI,CAAC,QAAQ,CAAC,OAAO,CAAC,OAAO,CAAC,UAAU,EAAE,MAAM,EAAE,EAAC,OAAO,EAAE,mBAAmB,EAAC,CAAC,CAAC;AAC1F,CAAC"}
|
|
@@ -1,22 +1,24 @@
|
|
|
1
|
+
import type { EspressoDriver } from '../driver';
|
|
1
2
|
/**
|
|
2
3
|
* Starts the given activity with intent options, activity options and locale.
|
|
3
4
|
* Activity could only be executed in scope of the current app package.
|
|
4
5
|
*
|
|
5
|
-
* @
|
|
6
|
-
* @param
|
|
7
|
-
* @param
|
|
8
|
-
* @param
|
|
9
|
-
* @
|
|
10
|
-
* @returns {Promise<string>}
|
|
6
|
+
* @param appActivity - The activity name to start
|
|
7
|
+
* @param locale - Optional locale string (e.g., 'en_US', 'fr_FR')
|
|
8
|
+
* @param optionalIntentArguments - Optional intent arguments as a string
|
|
9
|
+
* @param optionalActivityArguments - Optional activity arguments as a string
|
|
10
|
+
* @returns Promise that resolves to a string when the activity is started
|
|
11
11
|
*/
|
|
12
|
-
export function mobileStartActivity(this:
|
|
12
|
+
export declare function mobileStartActivity(this: EspressoDriver, appActivity: string, locale?: string, optionalIntentArguments?: string, optionalActivityArguments?: string): Promise<string>;
|
|
13
13
|
/**
|
|
14
|
+
* Starts an activity with the given package and activity names.
|
|
15
|
+
* Waits for the activity to be ready before returning.
|
|
14
16
|
*
|
|
15
|
-
* @
|
|
16
|
-
* @param
|
|
17
|
-
* @param
|
|
18
|
-
* @param
|
|
19
|
-
* @
|
|
17
|
+
* @param appPackage - The package name of the app to start
|
|
18
|
+
* @param appActivity - The activity name to start
|
|
19
|
+
* @param appWaitPackage - Optional package name to wait for (defaults to appPackage)
|
|
20
|
+
* @param appWaitActivity - Optional activity name to wait for (defaults to appActivity)
|
|
21
|
+
* @returns Promise that resolves when the activity is started and ready
|
|
20
22
|
*/
|
|
21
|
-
export function startActivity(this:
|
|
23
|
+
export declare function startActivity(this: EspressoDriver, appPackage?: string, appActivity?: string, appWaitPackage?: string, appWaitActivity?: string): Promise<void>;
|
|
22
24
|
//# 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":"AAAA,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,WAAW,CAAC;AAIhD;;;;;;;;;GASG;AACH,wBAAsB,mBAAmB,CACvC,IAAI,EAAE,cAAc,EACpB,WAAW,EAAE,MAAM,EACnB,MAAM,CAAC,EAAE,MAAM,EACf,uBAAuB,CAAC,EAAE,MAAM,EAChC,yBAAyB,CAAC,EAAE,MAAM,GACjC,OAAO,CAAC,MAAM,CAAC,CASjB;AAED;;;;;;;;;GASG;AACH,wBAAsB,aAAa,CACjC,IAAI,EAAE,cAAc,EACpB,UAAU,CAAC,EAAE,MAAM,EACnB,WAAW,CAAC,EAAE,MAAM,EACpB,cAAc,CAAC,EAAE,MAAM,EACvB,eAAe,CAAC,EAAE,MAAM,GACvB,OAAO,CAAC,IAAI,CAAC,CAmBf"}
|
|
@@ -2,21 +2,21 @@
|
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
3
|
exports.mobileStartActivity = mobileStartActivity;
|
|
4
4
|
exports.startActivity = startActivity;
|
|
5
|
+
const driver_1 = require("appium/driver");
|
|
5
6
|
const utils_1 = require("../utils");
|
|
6
7
|
/**
|
|
7
8
|
* Starts the given activity with intent options, activity options and locale.
|
|
8
9
|
* Activity could only be executed in scope of the current app package.
|
|
9
10
|
*
|
|
10
|
-
* @
|
|
11
|
-
* @param
|
|
12
|
-
* @param
|
|
13
|
-
* @param
|
|
14
|
-
* @
|
|
15
|
-
* @returns {Promise<string>}
|
|
11
|
+
* @param appActivity - The activity name to start
|
|
12
|
+
* @param locale - Optional locale string (e.g., 'en_US', 'fr_FR')
|
|
13
|
+
* @param optionalIntentArguments - Optional intent arguments as a string
|
|
14
|
+
* @param optionalActivityArguments - Optional activity arguments as a string
|
|
15
|
+
* @returns Promise that resolves to a string when the activity is started
|
|
16
16
|
*/
|
|
17
17
|
async function mobileStartActivity(appActivity, locale, optionalIntentArguments, optionalActivityArguments) {
|
|
18
18
|
const appPackage = this.caps.appPackage;
|
|
19
|
-
return
|
|
19
|
+
return (await this.espresso.jwproxy.command(`/appium/device/start_activity`, 'POST', {
|
|
20
20
|
appPackage,
|
|
21
21
|
appActivity,
|
|
22
22
|
locale,
|
|
@@ -25,18 +25,26 @@ async function mobileStartActivity(appActivity, locale, optionalIntentArguments,
|
|
|
25
25
|
}));
|
|
26
26
|
}
|
|
27
27
|
/**
|
|
28
|
+
* Starts an activity with the given package and activity names.
|
|
29
|
+
* Waits for the activity to be ready before returning.
|
|
28
30
|
*
|
|
29
|
-
* @
|
|
30
|
-
* @param
|
|
31
|
-
* @param
|
|
32
|
-
* @param
|
|
33
|
-
* @
|
|
31
|
+
* @param appPackage - The package name of the app to start
|
|
32
|
+
* @param appActivity - The activity name to start
|
|
33
|
+
* @param appWaitPackage - Optional package name to wait for (defaults to appPackage)
|
|
34
|
+
* @param appWaitActivity - Optional activity name to wait for (defaults to appActivity)
|
|
35
|
+
* @returns Promise that resolves when the activity is started and ready
|
|
34
36
|
*/
|
|
35
37
|
async function startActivity(appPackage, appActivity, appWaitPackage, appWaitActivity) {
|
|
36
38
|
// intentAction, intentCategory, intentFlags, optionalIntentArguments, dontStopAppOnReset
|
|
37
39
|
// parameters are not supported by Espresso
|
|
38
|
-
const pkg =
|
|
39
|
-
|
|
40
|
+
const pkg = appPackage || this.caps.appPackage;
|
|
41
|
+
if (!pkg) {
|
|
42
|
+
throw new driver_1.errors.InvalidArgumentError('appPackage is required');
|
|
43
|
+
}
|
|
44
|
+
const appWaitPkg = appWaitPackage || pkg;
|
|
45
|
+
if (!appActivity) {
|
|
46
|
+
throw new driver_1.errors.InvalidArgumentError('appActivity is required');
|
|
47
|
+
}
|
|
40
48
|
const appAct = (0, utils_1.qualifyActivityName)(appActivity, pkg);
|
|
41
49
|
const appWaitAct = (0, utils_1.qualifyActivityName)(appWaitActivity || appAct, appWaitPkg);
|
|
42
50
|
this.log.debug(`Starting activity '${appActivity}' for package '${appPackage}'`);
|
|
@@ -46,5 +54,4 @@ async function startActivity(appPackage, appActivity, appWaitPackage, appWaitAct
|
|
|
46
54
|
});
|
|
47
55
|
await this.adb.waitForActivity(appWaitPkg, appWaitAct);
|
|
48
56
|
}
|
|
49
|
-
;
|
|
50
57
|
//# 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":";;AAcA,kDAeC;AAYD,sCAyBC;AAjED,0CAAuC;AACvC,oCAA+C;AAE/C;;;;;;;;;GASG;AACI,KAAK,UAAU,mBAAmB,CAEvC,WAAmB,EACnB,MAAe,EACf,uBAAgC,EAChC,yBAAkC;IAElC,MAAM,UAAU,GAAG,IAAI,CAAC,IAAI,CAAC,UAAU,CAAC;IACxC,OAAO,CAAC,MAAM,IAAI,CAAC,QAAQ,CAAC,OAAO,CAAC,OAAO,CAAC,+BAA+B,EAAE,MAAM,EAAE;QACnF,UAAU;QACV,WAAW;QACX,MAAM;QACN,uBAAuB;QACvB,yBAAyB;KAC1B,CAAC,CAAW,CAAC;AAChB,CAAC;AAED;;;;;;;;;GASG;AACI,KAAK,UAAU,aAAa,CAEjC,UAAmB,EACnB,WAAoB,EACpB,cAAuB,EACvB,eAAwB;IAExB,yFAAyF;IACzF,2CAA2C;IAC3C,MAAM,GAAG,GAAG,UAAU,IAAI,IAAI,CAAC,IAAI,CAAC,UAAU,CAAC;IAC/C,IAAI,CAAC,GAAG,EAAE,CAAC;QACT,MAAM,IAAI,eAAM,CAAC,oBAAoB,CAAC,wBAAwB,CAAC,CAAC;IAClE,CAAC;IACD,MAAM,UAAU,GAAG,cAAc,IAAI,GAAG,CAAC;IACzC,IAAI,CAAC,WAAW,EAAE,CAAC;QACjB,MAAM,IAAI,eAAM,CAAC,oBAAoB,CAAC,yBAAyB,CAAC,CAAC;IACnE,CAAC;IACD,MAAM,MAAM,GAAG,IAAA,2BAAmB,EAAC,WAAW,EAAE,GAAG,CAAC,CAAC;IACrD,MAAM,UAAU,GAAG,IAAA,2BAAmB,EAAC,eAAe,IAAI,MAAM,EAAE,UAAU,CAAC,CAAC;IAC9E,IAAI,CAAC,GAAG,CAAC,KAAK,CAAC,sBAAsB,WAAW,kBAAkB,UAAU,GAAG,CAAC,CAAC;IACjF,MAAM,IAAI,CAAC,QAAQ,CAAC,OAAO,CAAC,OAAO,CAAC,+BAA+B,EAAE,MAAM,EAAE;QAC3E,UAAU,EAAE,GAAG;QACf,WAAW,EAAE,MAAM;KACpB,CAAC,CAAC;IACH,MAAM,IAAI,CAAC,GAAG,CAAC,eAAe,CAAC,UAAU,EAAE,UAAU,CAAC,CAAC;AACzD,CAAC"}
|
|
@@ -1,18 +1,16 @@
|
|
|
1
|
+
import type { EspressoDriver } from '../driver';
|
|
1
2
|
/**
|
|
2
|
-
*
|
|
3
|
-
* @returns
|
|
3
|
+
* Gets the clipboard content from the device.
|
|
4
|
+
* @returns Promise that resolves to base64-encoded content of the clipboard
|
|
4
5
|
* or an empty string if the clipboard is empty.
|
|
5
6
|
*/
|
|
6
|
-
export function getClipboard(this:
|
|
7
|
+
export declare function getClipboard(this: EspressoDriver): Promise<string>;
|
|
7
8
|
/**
|
|
8
|
-
*
|
|
9
|
-
* @param
|
|
10
|
-
* @param
|
|
11
|
-
*
|
|
12
|
-
* @
|
|
13
|
-
* clipboard payload
|
|
14
|
-
* @returns {Promise<void>}
|
|
9
|
+
* Sets the clipboard content on the device.
|
|
10
|
+
* @param content - Base64-encoded clipboard payload
|
|
11
|
+
* @param contentType - Only a single content type is supported, which is 'plaintext'
|
|
12
|
+
* @param label - Optional label to identify the current clipboard payload
|
|
13
|
+
* @returns Promise that resolves when the clipboard is set
|
|
15
14
|
*/
|
|
16
|
-
export function mobileSetClipboard(this:
|
|
17
|
-
export type EspressoDriver = import("../driver").EspressoDriver;
|
|
15
|
+
export declare function mobileSetClipboard(this: EspressoDriver, content: string, contentType?: 'plaintext', label?: string): Promise<void>;
|
|
18
16
|
//# 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,EAAE,cAAc,EAAE,MAAM,WAAW,CAAC;AAEhD;;;;GAIG;AACH,wBAAsB,YAAY,CAAE,IAAI,EAAE,cAAc,GAAG,OAAO,CAAC,MAAM,CAAC,CAIzE;AAED;;;;;;GAMG;AACH,wBAAsB,kBAAkB,CACtC,IAAI,EAAE,cAAc,EACpB,OAAO,EAAE,MAAM,EACf,WAAW,CAAC,EAAE,WAAW,EACzB,KAAK,CAAC,EAAE,MAAM,GACb,OAAO,CAAC,IAAI,CAAC,CAMf"}
|
|
@@ -3,28 +3,23 @@ Object.defineProperty(exports, "__esModule", { value: true });
|
|
|
3
3
|
exports.getClipboard = getClipboard;
|
|
4
4
|
exports.mobileSetClipboard = mobileSetClipboard;
|
|
5
5
|
/**
|
|
6
|
-
*
|
|
7
|
-
* @returns
|
|
6
|
+
* Gets the clipboard content from the device.
|
|
7
|
+
* @returns Promise that resolves to base64-encoded content of the clipboard
|
|
8
8
|
* or an empty string if the clipboard is empty.
|
|
9
9
|
*/
|
|
10
10
|
async function getClipboard() {
|
|
11
|
-
return
|
|
11
|
+
return await this.adb.getApiLevel() < 29
|
|
12
12
|
? (await this.espresso.jwproxy.command('/appium/device/get_clipboard', 'POST', {}))
|
|
13
|
-
:
|
|
13
|
+
: await this.settingsApp.getClipboard();
|
|
14
14
|
}
|
|
15
15
|
/**
|
|
16
|
-
*
|
|
17
|
-
* @param
|
|
18
|
-
* @param
|
|
19
|
-
*
|
|
20
|
-
* @
|
|
21
|
-
* clipboard payload
|
|
22
|
-
* @returns {Promise<void>}
|
|
16
|
+
* Sets the clipboard content on the device.
|
|
17
|
+
* @param content - Base64-encoded clipboard payload
|
|
18
|
+
* @param contentType - Only a single content type is supported, which is 'plaintext'
|
|
19
|
+
* @param label - Optional label to identify the current clipboard payload
|
|
20
|
+
* @returns Promise that resolves when the clipboard is set
|
|
23
21
|
*/
|
|
24
22
|
async function mobileSetClipboard(content, contentType, label) {
|
|
25
23
|
await this.espresso.jwproxy.command('/appium/device/set_clipboard', 'POST', { content, contentType, label });
|
|
26
24
|
}
|
|
27
|
-
/**
|
|
28
|
-
* @typedef {import('../driver').EspressoDriver} EspressoDriver
|
|
29
|
-
*/
|
|
30
25
|
//# 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":";;AAOA,oCAIC;AASD,gDAWC;AA7BD;;;;GAIG;AACI,KAAK,UAAU,YAAY;IAChC,OAAO,MAAM,IAAI,CAAC,GAAG,CAAC,WAAW,EAAE,GAAG,EAAE;QACtC,CAAC,CAAC,CAAC,MAAM,IAAI,CAAC,QAAQ,CAAC,OAAO,CAAC,OAAO,CAAC,8BAA8B,EAAE,MAAM,EAAE,EAAE,CAAC,CAAW;QAC7F,CAAC,CAAC,MAAM,IAAI,CAAC,WAAW,CAAC,YAAY,EAAE,CAAC;AAC5C,CAAC;AAED;;;;;;GAMG;AACI,KAAK,UAAU,kBAAkB,CAEtC,OAAe,EACf,WAAyB,EACzB,KAAc;IAEd,MAAM,IAAI,CAAC,QAAQ,CAAC,OAAO,CAAC,OAAO,CACjC,8BAA8B,EAC9B,MAAM,EACN,EAAC,OAAO,EAAE,WAAW,EAAE,KAAK,EAAC,CAC9B,CAAC;AACJ,CAAC"}
|
|
@@ -1,16 +1,11 @@
|
|
|
1
|
+
import type { EspressoDriver } from '../driver';
|
|
2
|
+
import type { StringRecord } from '@appium/types';
|
|
1
3
|
/**
|
|
2
4
|
* Stop proxying to any Chromedriver and redirect to Espresso
|
|
3
5
|
*
|
|
4
|
-
* @
|
|
5
|
-
* @returns {void}
|
|
6
|
+
* @returns void
|
|
6
7
|
*/
|
|
7
|
-
export function suspendChromedriverProxy(this:
|
|
8
|
-
export class suspendChromedriverProxy {
|
|
9
|
-
chromedriver: any;
|
|
10
|
-
proxyReqRes: any;
|
|
11
|
-
proxyCommand: any;
|
|
12
|
-
jwpProxyActive: boolean;
|
|
13
|
-
}
|
|
8
|
+
export declare function suspendChromedriverProxy(this: EspressoDriver): void;
|
|
14
9
|
/**
|
|
15
10
|
* Runs a chain of Espresso web atoms (see https://developer.android.com/training/testing/espresso/web for reference)
|
|
16
11
|
*
|
|
@@ -24,11 +19,11 @@ export class suspendChromedriverProxy {
|
|
|
24
19
|
* ...
|
|
25
20
|
* ]
|
|
26
21
|
* }
|
|
27
|
-
* @this {import('../driver').EspressoDriver}
|
|
28
22
|
* @see https://github.com/appium/appium-espresso-driver?tab=readme-ov-file#mobile-webatoms
|
|
29
|
-
* @param
|
|
30
|
-
* @param
|
|
31
|
-
* @param
|
|
23
|
+
* @param webviewEl - Optional webview element ID to operate on
|
|
24
|
+
* @param forceJavascriptEnabled - If webview disables javascript, webatoms won't work, this forces it
|
|
25
|
+
* @param methodChain - Array of method chain objects, each containing a name and atom with name and args
|
|
26
|
+
* @returns Promise that resolves to the result of executing the web atoms
|
|
32
27
|
*/
|
|
33
|
-
export function mobileWebAtoms(this:
|
|
28
|
+
export declare function mobileWebAtoms(this: EspressoDriver, webviewEl?: string, forceJavascriptEnabled?: boolean, methodChain?: StringRecord[]): Promise<any>;
|
|
34
29
|
//# sourceMappingURL=context.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"context.d.ts","sourceRoot":"","sources":["../../../lib/commands/context.
|
|
1
|
+
{"version":3,"file":"context.d.ts","sourceRoot":"","sources":["../../../lib/commands/context.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,WAAW,CAAC;AAChD,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,eAAe,CAAC;AAElD;;;;GAIG;AACH,wBAAgB,wBAAwB,CAAE,IAAI,EAAE,cAAc,GAAG,IAAI,CAKpE;AAED;;;;;;;;;;;;;;;;;;GAkBG;AACH,wBAAsB,cAAc,CAClC,IAAI,EAAE,cAAc,EACpB,SAAS,CAAC,EAAE,MAAM,EAClB,sBAAsB,CAAC,EAAE,OAAO,EAChC,WAAW,CAAC,EAAE,YAAY,EAAE,GAC3B,OAAO,CAAC,GAAG,CAAC,CAMd"}
|
|
@@ -5,8 +5,7 @@ exports.mobileWebAtoms = mobileWebAtoms;
|
|
|
5
5
|
/**
|
|
6
6
|
* Stop proxying to any Chromedriver and redirect to Espresso
|
|
7
7
|
*
|
|
8
|
-
* @
|
|
9
|
-
* @returns {void}
|
|
8
|
+
* @returns void
|
|
10
9
|
*/
|
|
11
10
|
function suspendChromedriverProxy() {
|
|
12
11
|
this.chromedriver = undefined;
|
|
@@ -27,11 +26,11 @@ function suspendChromedriverProxy() {
|
|
|
27
26
|
* ...
|
|
28
27
|
* ]
|
|
29
28
|
* }
|
|
30
|
-
* @this {import('../driver').EspressoDriver}
|
|
31
29
|
* @see https://github.com/appium/appium-espresso-driver?tab=readme-ov-file#mobile-webatoms
|
|
32
|
-
* @param
|
|
33
|
-
* @param
|
|
34
|
-
* @param
|
|
30
|
+
* @param webviewEl - Optional webview element ID to operate on
|
|
31
|
+
* @param forceJavascriptEnabled - If webview disables javascript, webatoms won't work, this forces it
|
|
32
|
+
* @param methodChain - Array of method chain objects, each containing a name and atom with name and args
|
|
33
|
+
* @returns Promise that resolves to the result of executing the web atoms
|
|
35
34
|
*/
|
|
36
35
|
async function mobileWebAtoms(webviewEl, forceJavascriptEnabled, methodChain) {
|
|
37
36
|
return await this.espresso.jwproxy.command(`/appium/execute_mobile/web_atoms`, 'POST', {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"context.js","sourceRoot":"","sources":["../../../lib/commands/context.
|
|
1
|
+
{"version":3,"file":"context.js","sourceRoot":"","sources":["../../../lib/commands/context.ts"],"names":[],"mappings":";;AAQA,4DAKC;AAqBD,wCAWC;AA1CD;;;;GAIG;AACH,SAAgB,wBAAwB;IACtC,IAAI,CAAC,YAAY,GAAG,SAAS,CAAC;IAC9B,IAAI,CAAC,WAAW,GAAG,IAAI,CAAC,QAAQ,CAAC,WAAW,CAAC,IAAI,CAAC,IAAI,CAAC,QAAQ,CAAC,CAAC;IACjE,IAAI,CAAC,YAAY,GAAG,IAAI,CAAC,QAAQ,CAAC,YAAY,CAAC,IAAI,CAAC,IAAI,CAAC,QAAQ,CAAC,CAAC;IACnE,IAAI,CAAC,cAAc,GAAG,IAAI,CAAC;AAC7B,CAAC;AAED;;;;;;;;;;;;;;;;;;GAkBG;AACI,KAAK,UAAU,cAAc,CAElC,SAAkB,EAClB,sBAAgC,EAChC,WAA4B;IAE5B,OAAO,MAAM,IAAI,CAAC,QAAQ,CAAC,OAAO,CAAC,OAAO,CAAC,kCAAkC,EAAE,MAAM,EAAE;QACrF,SAAS;QACT,sBAAsB;QACtB,WAAW;KACZ,CAAC,CAAC;AACL,CAAC"}
|
|
@@ -1,94 +1,105 @@
|
|
|
1
|
+
import type { EspressoDriver } from '../driver';
|
|
1
2
|
/**
|
|
2
3
|
* Flash the element with given id.
|
|
3
4
|
* durationMillis and repeatCount are optional
|
|
4
|
-
* @this {import('../driver').EspressoDriver}
|
|
5
5
|
* @see https://github.com/appium/appium-espresso-driver?tab=readme-ov-file#mobile-flashelement
|
|
6
|
-
* @param
|
|
7
|
-
* @param
|
|
8
|
-
* @param
|
|
6
|
+
* @param elementId - The ID of the element to flash
|
|
7
|
+
* @param durationMillis - Optional duration in milliseconds for each flash
|
|
8
|
+
* @param repeatCount - Optional number of times to repeat the flash
|
|
9
|
+
* @returns Promise that resolves when the flash command is executed
|
|
9
10
|
*/
|
|
10
|
-
export function mobileFlashElement(this:
|
|
11
|
+
export declare function mobileFlashElement(this: EspressoDriver, elementId: string, durationMillis?: number, repeatCount?: number): Promise<any>;
|
|
11
12
|
/**
|
|
12
|
-
*
|
|
13
|
+
* Dismisses the autofill UI for the given element.
|
|
13
14
|
* @see https://github.com/appium/appium-espresso-driver?tab=readme-ov-file#mobile-dismissautofill
|
|
14
|
-
* @param
|
|
15
|
+
* @param elementId - The ID of the element for which to dismiss autofill
|
|
16
|
+
* @returns Promise that resolves when the autofill is dismissed
|
|
15
17
|
*/
|
|
16
|
-
export function mobileDismissAutofill(this:
|
|
18
|
+
export declare function mobileDismissAutofill(this: EspressoDriver, elementId: string): Promise<void>;
|
|
17
19
|
/**
|
|
18
|
-
*
|
|
20
|
+
* Performs a swipe gesture on the given element.
|
|
19
21
|
* @see https://github.com/appium/appium-espresso-driver?tab=readme-ov-file#mobile-swipe
|
|
20
|
-
* @param
|
|
21
|
-
* @param
|
|
22
|
-
* @param
|
|
23
|
-
* @param
|
|
24
|
-
* @param
|
|
25
|
-
* @param
|
|
22
|
+
* @param elementId - The ID of the element to swipe
|
|
23
|
+
* @param direction - Optional swipe direction (e.g., 'up', 'down', 'left', 'right')
|
|
24
|
+
* @param swiper - Optional swiper configuration
|
|
25
|
+
* @param startCoordinates - Optional starting coordinates for the swipe
|
|
26
|
+
* @param endCoordinates - Optional ending coordinates for the swipe
|
|
27
|
+
* @param precisionDescriber - Optional precision describer for the swipe action
|
|
28
|
+
* @returns Promise that resolves when the swipe is completed
|
|
26
29
|
*/
|
|
27
|
-
export function mobileSwipe(this:
|
|
30
|
+
export declare function mobileSwipe(this: EspressoDriver, elementId: string, direction?: string, swiper?: string, startCoordinates?: string, endCoordinates?: string, precisionDescriber?: string): Promise<any>;
|
|
28
31
|
/**
|
|
29
|
-
*
|
|
32
|
+
* Opens a drawer element (e.g., Navigation Drawer) with the specified gravity.
|
|
30
33
|
* @see https://github.com/appium/appium-espresso-driver?tab=readme-ov-file#mobile-opendrawer
|
|
31
|
-
* @param
|
|
32
|
-
* @param
|
|
34
|
+
* @param elementId - The ID of the drawer element to open
|
|
35
|
+
* @param gravity - Optional gravity value for drawer positioning (e.g., Gravity.START, Gravity.END)
|
|
36
|
+
* @returns Promise that resolves when the drawer is opened
|
|
33
37
|
*/
|
|
34
|
-
export function mobileOpenDrawer(this:
|
|
38
|
+
export declare function mobileOpenDrawer(this: EspressoDriver, elementId: string, gravity?: number): Promise<any>;
|
|
35
39
|
/**
|
|
36
|
-
*
|
|
40
|
+
* Closes a drawer element (e.g., Navigation Drawer) with the specified gravity.
|
|
37
41
|
* @see https://github.com/appium/appium-espresso-driver?tab=readme-ov-file#mobile-closedrawer
|
|
38
|
-
* @param
|
|
39
|
-
* @param
|
|
42
|
+
* @param elementId - The ID of the drawer element to close
|
|
43
|
+
* @param gravity - Optional gravity value for drawer positioning (e.g., Gravity.START, Gravity.END)
|
|
44
|
+
* @returns Promise that resolves when the drawer is closed
|
|
40
45
|
*/
|
|
41
|
-
export function mobileCloseDrawer(this:
|
|
46
|
+
export declare function mobileCloseDrawer(this: EspressoDriver, elementId: string, gravity?: number): Promise<any>;
|
|
42
47
|
/**
|
|
43
|
-
*
|
|
48
|
+
* Sets the date on a date picker element.
|
|
44
49
|
* @see https://github.com/appium/appium-espresso-driver?tab=readme-ov-file#mobile-setdate
|
|
45
|
-
* @param
|
|
46
|
-
* @param
|
|
47
|
-
* @param
|
|
48
|
-
* @param
|
|
50
|
+
* @param elementId - The ID of the date picker element
|
|
51
|
+
* @param year - The year to set (e.g., 2024)
|
|
52
|
+
* @param monthOfYear - The month to set (0-11, where 0 is January)
|
|
53
|
+
* @param dayOfMonth - The day of the month to set (1-31)
|
|
54
|
+
* @returns Promise that resolves when the date is set
|
|
49
55
|
*/
|
|
50
|
-
export function mobileSetDate(this:
|
|
56
|
+
export declare function mobileSetDate(this: EspressoDriver, elementId: string, year: number, monthOfYear: number, dayOfMonth: number): Promise<any>;
|
|
51
57
|
/**
|
|
52
|
-
*
|
|
58
|
+
* Sets the time on a time picker element.
|
|
53
59
|
* @see https://github.com/appium/appium-espresso-driver?tab=readme-ov-file#mobile-settime
|
|
54
|
-
* @param
|
|
55
|
-
* @param
|
|
56
|
-
* @param
|
|
60
|
+
* @param elementId - The ID of the time picker element
|
|
61
|
+
* @param hours - The hour to set (0-23)
|
|
62
|
+
* @param minutes - The minute to set (0-59)
|
|
63
|
+
* @returns Promise that resolves when the time is set
|
|
57
64
|
*/
|
|
58
|
-
export function mobileSetTime(this:
|
|
65
|
+
export declare function mobileSetTime(this: EspressoDriver, elementId: string, hours: number, minutes: number): Promise<any>;
|
|
59
66
|
/**
|
|
60
|
-
*
|
|
67
|
+
* Navigates to a menu item in a navigation element (e.g., BottomNavigationView).
|
|
61
68
|
* @see https://github.com/appium/appium-espresso-driver?tab=readme-ov-file#mobile-navigateto
|
|
62
|
-
* @param
|
|
63
|
-
* @param
|
|
69
|
+
* @param elementId - The ID of the navigation element
|
|
70
|
+
* @param menuItemId - The ID of the menu item to navigate to (must be a non-negative number)
|
|
71
|
+
* @returns Promise that resolves when navigation is completed
|
|
72
|
+
* @throws {errors.InvalidArgumentError} If menuItemId is not a non-negative number
|
|
64
73
|
*/
|
|
65
|
-
export function mobileNavigateTo(this:
|
|
74
|
+
export declare function mobileNavigateTo(this: EspressoDriver, elementId: string, menuItemId: number | string): Promise<any>;
|
|
66
75
|
/**
|
|
67
76
|
* Perform a 'GeneralClickAction' (https://developer.android.com/reference/androidx/test/espresso/action/GeneralClickAction)
|
|
68
77
|
*
|
|
69
78
|
* @see https://github.com/appium/appium-espresso-driver?tab=readme-ov-file#mobile-clickaction
|
|
70
|
-
* @
|
|
71
|
-
* @param
|
|
72
|
-
* @param
|
|
73
|
-
* @param
|
|
74
|
-
* @param
|
|
75
|
-
* @param
|
|
76
|
-
* @
|
|
79
|
+
* @param elementId - The ID of the element to perform the click action on
|
|
80
|
+
* @param tapper - Optional tapper configuration for the click action
|
|
81
|
+
* @param coordinatesProvider - Optional coordinates provider for the click position
|
|
82
|
+
* @param precisionDescriber - Optional precision describer for the click action
|
|
83
|
+
* @param inputDevice - Optional input device identifier
|
|
84
|
+
* @param buttonState - Optional button state for the click action
|
|
85
|
+
* @returns Promise that resolves when the click action is performed
|
|
77
86
|
*/
|
|
78
|
-
export function mobileClickAction(this:
|
|
87
|
+
export declare function mobileClickAction(this: EspressoDriver, elementId: string, tapper?: string, coordinatesProvider?: string, precisionDescriber?: string, inputDevice?: number, buttonState?: number): Promise<any>;
|
|
79
88
|
/**
|
|
80
|
-
*
|
|
89
|
+
* Scrolls to a specific page in a ViewPager or similar scrollable element.
|
|
81
90
|
* @see https://github.com/appium/appium-espresso-driver?tab=readme-ov-file#mobile-scrolltopage
|
|
82
|
-
* @param
|
|
83
|
-
* @param
|
|
84
|
-
* @param
|
|
85
|
-
* @param
|
|
91
|
+
* @param elementId - The ID of the scrollable element (e.g., ViewPager)
|
|
92
|
+
* @param scrollTo - Optional direction to scroll: 'first', 'last', 'left', or 'right'
|
|
93
|
+
* @param scrollToPage - Optional page index to scroll to (must be non-negative)
|
|
94
|
+
* @param smoothScroll - Optional flag to enable smooth scrolling (default: false)
|
|
95
|
+
* @returns Promise that resolves when scrolling is completed
|
|
96
|
+
* @throws {errors.InvalidArgumentError} If scrollTo is not one of the valid values or scrollToPage is negative
|
|
86
97
|
*/
|
|
87
|
-
export function mobileScrollToPage(this:
|
|
98
|
+
export declare function mobileScrollToPage(this: EspressoDriver, elementId: string, scrollTo?: string, scrollToPage?: number, smoothScroll?: boolean): Promise<any>;
|
|
88
99
|
/**
|
|
89
|
-
*
|
|
90
|
-
* @param
|
|
91
|
-
* @returns
|
|
100
|
+
* Performs an editor action (e.g., IME action like DONE, SEARCH, NEXT) on the current input field.
|
|
101
|
+
* @param action - The editor action to perform (can be a string or numeric action code)
|
|
102
|
+
* @returns Promise that resolves when the editor action is performed
|
|
92
103
|
*/
|
|
93
|
-
export function mobilePerformEditorAction(this:
|
|
104
|
+
export declare function mobilePerformEditorAction(this: EspressoDriver, action: string | number): Promise<void>;
|
|
94
105
|
//# sourceMappingURL=element.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"element.d.ts","sourceRoot":"","sources":["../../../lib/commands/element.
|
|
1
|
+
{"version":3,"file":"element.d.ts","sourceRoot":"","sources":["../../../lib/commands/element.ts"],"names":[],"mappings":"AAGA,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,WAAW,CAAC;AAEhD;;;;;;;;GAQG;AACH,wBAAsB,kBAAkB,CACtC,IAAI,EAAE,cAAc,EACpB,SAAS,EAAE,MAAM,EACjB,cAAc,CAAC,EAAE,MAAM,EACvB,WAAW,CAAC,EAAE,MAAM,GACnB,OAAO,CAAC,GAAG,CAAC,CAQd;AAED;;;;;GAKG;AACH,wBAAsB,qBAAqB,CAAE,IAAI,EAAE,cAAc,EAAE,SAAS,EAAE,MAAM,GAAG,OAAO,CAAC,IAAI,CAAC,CAMnG;AAED;;;;;;;;;;GAUG;AACH,wBAAsB,WAAW,CAC/B,IAAI,EAAE,cAAc,EACpB,SAAS,EAAE,MAAM,EACjB,SAAS,CAAC,EAAE,MAAM,EAClB,MAAM,CAAC,EAAE,MAAM,EACf,gBAAgB,CAAC,EAAE,MAAM,EACzB,cAAc,CAAC,EAAE,MAAM,EACvB,kBAAkB,CAAC,EAAE,MAAM,GAC1B,OAAO,CAAC,GAAG,CAAC,CAad;AAGD;;;;;;GAMG;AACH,wBAAsB,gBAAgB,CAAE,IAAI,EAAE,cAAc,EAAE,SAAS,EAAE,MAAM,EAAE,OAAO,CAAC,EAAE,MAAM,GAAG,OAAO,CAAC,GAAG,CAAC,CAM/G;AAED;;;;;;GAMG;AACH,wBAAsB,iBAAiB,CAAE,IAAI,EAAE,cAAc,EAAE,SAAS,EAAE,MAAM,EAAE,OAAO,CAAC,EAAE,MAAM,GAAG,OAAO,CAAC,GAAG,CAAC,CAMhH;AAED;;;;;;;;GAQG;AACH,wBAAsB,aAAa,CACjC,IAAI,EAAE,cAAc,EACpB,SAAS,EAAE,MAAM,EACjB,IAAI,EAAE,MAAM,EACZ,WAAW,EAAE,MAAM,EACnB,UAAU,EAAE,MAAM,GACjB,OAAO,CAAC,GAAG,CAAC,CASd;AAED;;;;;;;GAOG;AACH,wBAAsB,aAAa,CACjC,IAAI,EAAE,cAAc,EACpB,SAAS,EAAE,MAAM,EACjB,KAAK,EAAE,MAAM,EACb,OAAO,EAAE,MAAM,GACd,OAAO,CAAC,GAAG,CAAC,CAQd;AAED;;;;;;;GAOG;AACH,wBAAsB,gBAAgB,CAAE,IAAI,EAAE,cAAc,EAAE,SAAS,EAAE,MAAM,EAAE,UAAU,EAAE,MAAM,GAAG,MAAM,GAAG,OAAO,CAAC,GAAG,CAAC,CAY1H;AAED;;;;;;;;;;;GAWG;AACH,wBAAsB,iBAAiB,CACrC,IAAI,EAAE,cAAc,EACpB,SAAS,EAAE,MAAM,EACjB,MAAM,CAAC,EAAE,MAAM,EACf,mBAAmB,CAAC,EAAE,MAAM,EAC5B,kBAAkB,CAAC,EAAE,MAAM,EAC3B,WAAW,CAAC,EAAE,MAAM,EACpB,WAAW,CAAC,EAAE,MAAM,GACnB,OAAO,CAAC,GAAG,CAAC,CAOd;AAED;;;;;;;;;GASG;AACH,wBAAsB,kBAAkB,CACtC,IAAI,EAAE,cAAc,EACpB,SAAS,EAAE,MAAM,EACjB,QAAQ,CAAC,EAAE,MAAM,EACjB,YAAY,CAAC,EAAE,MAAM,EACrB,YAAY,CAAC,EAAE,OAAO,GACrB,OAAO,CAAC,GAAG,CAAC,CAwBd;AAED;;;;GAIG;AACH,wBAAsB,yBAAyB,CAAE,IAAI,EAAE,cAAc,EAAE,MAAM,EAAE,MAAM,GAAG,MAAM,GAAG,OAAO,CAAC,IAAI,CAAC,CAE7G"}
|