appium-espresso-driver 3.5.4 → 4.0.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (64) hide show
  1. package/CHANGELOG.md +43 -0
  2. package/build/lib/commands/app-management.d.ts +5 -39
  3. package/build/lib/commands/app-management.d.ts.map +1 -1
  4. package/build/lib/commands/app-management.js +5 -30
  5. package/build/lib/commands/app-management.js.map +1 -1
  6. package/build/lib/commands/clipboard.d.ts +6 -26
  7. package/build/lib/commands/clipboard.d.ts.map +1 -1
  8. package/build/lib/commands/clipboard.js +6 -11
  9. package/build/lib/commands/clipboard.js.map +1 -1
  10. package/build/lib/commands/context.d.ts +5 -1
  11. package/build/lib/commands/context.d.ts.map +1 -1
  12. package/build/lib/commands/context.js +10 -4
  13. package/build/lib/commands/context.js.map +1 -1
  14. package/build/lib/commands/element.d.ts +56 -20
  15. package/build/lib/commands/element.d.ts.map +1 -1
  16. package/build/lib/commands/element.js +70 -56
  17. package/build/lib/commands/element.js.map +1 -1
  18. package/build/lib/commands/idling-resources.d.ts +18 -23
  19. package/build/lib/commands/idling-resources.d.ts.map +1 -1
  20. package/build/lib/commands/idling-resources.js +24 -14
  21. package/build/lib/commands/idling-resources.js.map +1 -1
  22. package/build/lib/commands/misc.d.ts +25 -38
  23. package/build/lib/commands/misc.d.ts.map +1 -1
  24. package/build/lib/commands/misc.js +33 -28
  25. package/build/lib/commands/misc.js.map +1 -1
  26. package/build/lib/commands/screenshot.d.ts +4 -16
  27. package/build/lib/commands/screenshot.d.ts.map +1 -1
  28. package/build/lib/commands/screenshot.js +4 -9
  29. package/build/lib/commands/screenshot.js.map +1 -1
  30. package/build/lib/commands/services.d.ts +14 -39
  31. package/build/lib/commands/services.d.ts.map +1 -1
  32. package/build/lib/commands/services.js +16 -21
  33. package/build/lib/commands/services.js.map +1 -1
  34. package/build/lib/driver.d.ts +502 -3
  35. package/build/lib/driver.d.ts.map +1 -1
  36. package/build/lib/driver.js +9 -3
  37. package/build/lib/driver.js.map +1 -1
  38. package/build/lib/execute-method-map.d.ts +503 -0
  39. package/build/lib/execute-method-map.d.ts.map +1 -0
  40. package/build/lib/execute-method-map.js +230 -0
  41. package/build/lib/execute-method-map.js.map +1 -0
  42. package/build/lib/utils.d.ts +0 -7
  43. package/build/lib/utils.d.ts.map +1 -1
  44. package/build/lib/utils.js +0 -19
  45. package/build/lib/utils.js.map +1 -1
  46. package/espresso-server/library/src/main/java/io/appium/espressoserver/lib/helpers/Version.kt +1 -1
  47. package/lib/commands/app-management.js +11 -38
  48. package/lib/commands/clipboard.js +6 -16
  49. package/lib/commands/context.js +14 -5
  50. package/lib/commands/element.js +102 -64
  51. package/lib/commands/idling-resources.js +24 -17
  52. package/lib/commands/misc.js +47 -28
  53. package/lib/commands/screenshot.js +4 -10
  54. package/lib/commands/services.js +16 -25
  55. package/lib/driver.ts +22 -17
  56. package/lib/execute-method-map.ts +243 -0
  57. package/lib/utils.js +0 -19
  58. package/npm-shrinkwrap.json +52 -46
  59. package/package.json +3 -3
  60. package/build/lib/commands/execute.d.ts +0 -7
  61. package/build/lib/commands/execute.d.ts.map +0 -1
  62. package/build/lib/commands/execute.js +0 -41
  63. package/build/lib/commands/execute.js.map +0 -1
  64. package/lib/commands/execute.js +0 -51
package/CHANGELOG.md CHANGED
@@ -1,3 +1,46 @@
1
+ ## [4.0.0](https://github.com/appium/appium-espresso-driver/compare/v3.6.0...v4.0.0) (2025-02-01)
2
+
3
+ ### ⚠ BREAKING CHANGES
4
+
5
+ * The following methods and properties were **removed**:
6
+ - mobileCommandsMapping
7
+ - mobileBackgroundApp
8
+ * The following methods signatures were **changed**:
9
+ - mobileSwipe
10
+ - mobileScrollToPage
11
+ - mobileClickAction
12
+ - mobileNavigateTo
13
+ - mobileIsToastVisible
14
+ - mobileOpenDrawer
15
+ - mobileCloseDrawer
16
+ - mobileSetDate
17
+ - mobileSetTime
18
+ - mobileBackdoor
19
+ - mobileFlashElement
20
+ - mobileUiautomator
21
+ - mobileWebAtoms
22
+ - mobileDismissAutofill
23
+ - mobileRegisterIdlingResources
24
+ - mobileUnregisterIdlingResources
25
+ - mobilePressKey
26
+ - mobileSetClipboard
27
+ - mobileStartService
28
+ - mobileStopService
29
+ - mobileStartActivity
30
+ - mobileScreenshots
31
+
32
+ Based on https://github.com/appium/appium-android-driver/pull/982
33
+
34
+ ### Features
35
+
36
+ * Add support of executeMethodMap ([#1042](https://github.com/appium/appium-espresso-driver/issues/1042)) ([00a38a2](https://github.com/appium/appium-espresso-driver/commit/00a38a2c095ed7aadb8fc7a277e148b8f723616e))
37
+
38
+ ## [3.6.0](https://github.com/appium/appium-espresso-driver/compare/v3.5.4...v3.6.0) (2025-01-24)
39
+
40
+ ### Features
41
+
42
+ * bump appium-adb to handle screenState=SCREEN_STATE_OFF as locked ([#1041](https://github.com/appium/appium-espresso-driver/issues/1041)) ([3a988d6](https://github.com/appium/appium-espresso-driver/commit/3a988d6082320c0b9f013ad8c9c3326d598ee611))
43
+
1
44
  ## [3.5.4](https://github.com/appium/appium-espresso-driver/compare/v3.5.3...v3.5.4) (2025-01-16)
2
45
 
3
46
  ### Miscellaneous Chores
@@ -1,36 +1,15 @@
1
- /**
2
- * @typedef {Object} BackgroundAppOptions
3
- * @property {number} [seconds] The amount of seconds to wait between putting the app to background and restoring it.
4
- * Any negative value means to not restore the app after putting it to the background (the default behavior).
5
- */
6
- /**
7
- * Puts the app under test to the background
8
- * and then restores it (if needed). The call is blocking is the
9
- * app needs to be restored afterwards.
10
- *
11
- * @this {import('../driver').EspressoDriver}
12
- * @param {BackgroundAppOptions} [opts={}]
13
- */
14
- export function mobileBackgroundApp(this: import("../driver").EspressoDriver, opts?: BackgroundAppOptions): Promise<string | true>;
15
- /**
16
- * @overload
17
- * @typedef {Object} StartActivityOptions
18
- * @property {string} appActivity
19
- * @property {string} [locale]
20
- * @property {string} [optionalIntentArguments]
21
- * @property {string} [optionalActivityArguments]
22
- */
23
- export function mobileStartActivity(): any;
24
1
  /**
25
2
  * Starts the given activity with intent options, activity options and locale.
26
3
  * Activity could only be executed in scope of the current app package.
27
4
  *
28
5
  * @this {import('../driver').EspressoDriver}
29
- * @overload
30
- * @param {StartActivityOptions} opts
6
+ * @param {string} appActivity
7
+ * @param {string} [locale]
8
+ * @param {string} [optionalIntentArguments]
9
+ * @param {string} [optionalActivityArguments]
31
10
  * @returns {Promise<string>}
32
11
  */
33
- export function mobileStartActivity(opts: StartActivityOptions): Promise<string>;
12
+ export function mobileStartActivity(this: import("../driver").EspressoDriver, appActivity: string, locale?: string, optionalIntentArguments?: string, optionalActivityArguments?: string): Promise<string>;
34
13
  /**
35
14
  *
36
15
  * @this {import('../driver').EspressoDriver}
@@ -40,17 +19,4 @@ export function mobileStartActivity(opts: StartActivityOptions): Promise<string>
40
19
  * @param {string} appWaitActivity
41
20
  */
42
21
  export function startActivity(this: import("../driver").EspressoDriver, appPackage: string, appActivity: string, appWaitPackage: string, appWaitActivity: string): Promise<void>;
43
- export type BackgroundAppOptions = {
44
- /**
45
- * The amount of seconds to wait between putting the app to background and restoring it.
46
- * Any negative value means to not restore the app after putting it to the background (the default behavior).
47
- */
48
- seconds?: number | undefined;
49
- };
50
- export type StartActivityOptions = {
51
- appActivity: string;
52
- locale?: string | undefined;
53
- optionalIntentArguments?: string | undefined;
54
- optionalActivityArguments?: string | undefined;
55
- };
56
22
  //# 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":"AAEA;;;;GAIG;AAEH;;;;;;;GAOG;AACH,qFAFW,oBAAoB,0BAK9B;;;;;;;;;AAGE,2CACA;;;;;;;;;;AAYA,0CACQ,oBAAoB,GAClB,OAAO,CAAC,MAAM,CAAC,CAC3B;AAkBD;;;;;;;GAOG;AACH,oFALW,MAAM,eACN,MAAM,kBACN,MAAM,mBACN,MAAM,iBAiBhB;;;;;;;;;iBAvDa,MAAM"}
1
+ {"version":3,"file":"app-management.d.ts","sourceRoot":"","sources":["../../../lib/commands/app-management.js"],"names":[],"mappings":"AAEA;;;;;;;;;;GAUG;AACH,2FANW,MAAM,WACN,MAAM,4BACN,MAAM,8BACN,MAAM,GACJ,OAAO,CAAC,MAAM,CAAC,CAgB3B;AAED;;;;;;;GAOG;AACH,oFALW,MAAM,eACN,MAAM,kBACN,MAAM,mBACN,MAAM,iBAiBhB"}
@@ -1,46 +1,21 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.mobileBackgroundApp = mobileBackgroundApp;
4
3
  exports.mobileStartActivity = mobileStartActivity;
5
4
  exports.startActivity = startActivity;
6
5
  const utils_1 = require("../utils");
7
- /**
8
- * @typedef {Object} BackgroundAppOptions
9
- * @property {number} [seconds] The amount of seconds to wait between putting the app to background and restoring it.
10
- * Any negative value means to not restore the app after putting it to the background (the default behavior).
11
- */
12
- /**
13
- * Puts the app under test to the background
14
- * and then restores it (if needed). The call is blocking is the
15
- * app needs to be restored afterwards.
16
- *
17
- * @this {import('../driver').EspressoDriver}
18
- * @param {BackgroundAppOptions} [opts={}]
19
- */
20
- async function mobileBackgroundApp(opts = {}) {
21
- const { seconds = -1 } = opts;
22
- return await this.background(seconds);
23
- }
24
- /**
25
- * @overload
26
- * @typedef {Object} StartActivityOptions
27
- * @property {string} appActivity
28
- * @property {string} [locale]
29
- * @property {string} [optionalIntentArguments]
30
- * @property {string} [optionalActivityArguments]
31
- */
32
6
  /**
33
7
  * Starts the given activity with intent options, activity options and locale.
34
8
  * Activity could only be executed in scope of the current app package.
35
9
  *
36
10
  * @this {import('../driver').EspressoDriver}
37
- * @overload
38
- * @param {StartActivityOptions} opts
11
+ * @param {string} appActivity
12
+ * @param {string} [locale]
13
+ * @param {string} [optionalIntentArguments]
14
+ * @param {string} [optionalActivityArguments]
39
15
  * @returns {Promise<string>}
40
16
  */
41
- async function mobileStartActivity(opts) {
17
+ async function mobileStartActivity(appActivity, locale, optionalIntentArguments, optionalActivityArguments) {
42
18
  const appPackage = this.caps.appPackage;
43
- const { appActivity, locale, optionalIntentArguments, optionalActivityArguments } = (0, utils_1.requireOptions)(opts, ['appActivity']);
44
19
  return /** @type {string} */ (await this.espresso.jwproxy.command(`/appium/device/start_activity`, 'POST', {
45
20
  appPackage,
46
21
  appActivity,
@@ -1 +1 @@
1
- {"version":3,"file":"app-management.js","sourceRoot":"","sources":["../../../lib/commands/app-management.js"],"names":[],"mappings":";;AAgBA,kDAGC;AAoBD,kDAeC;AAUD,sCAeC;AA/ED,oCAA+D;AAE/D;;;;GAIG;AAEH;;;;;;;GAOG;AACI,KAAK,UAAU,mBAAmB,CAAE,IAAI,GAAG,EAAE;IAClD,MAAM,EAAC,OAAO,GAAG,CAAC,CAAC,EAAC,GAAG,IAAI,CAAC;IAC5B,OAAO,MAAM,IAAI,CAAC,UAAU,CAAC,OAAO,CAAC,CAAC;AACxC,CAAC;AAED;;;;;;;GAOG;AAEH;;;;;;;;GAQG;AACI,KAAK,UAAU,mBAAmB,CAAE,IAAI;IAC7C,MAAM,UAAU,GAAG,IAAI,CAAC,IAAI,CAAC,UAAU,CAAC;IACxC,MAAM,EACJ,WAAW,EACX,MAAM,EACN,uBAAuB,EACvB,yBAAyB,EAC1B,GAAG,IAAA,sBAAc,EAAC,IAAI,EAAE,CAAC,aAAa,CAAC,CAAC,CAAC;IAC1C,OAAO,qBAAqB,CAAC,CAAC,MAAM,IAAI,CAAC,QAAQ,CAAC,OAAO,CAAC,OAAO,CAAC,+BAA+B,EAAE,MAAM,EAAE;QACzG,UAAU;QACV,WAAW;QACX,MAAM;QACN,uBAAuB;QACvB,yBAAyB;KAC1B,CAAC,CAAC,CAAC;AACN,CAAC;AAED;;;;;;;GAOG;AACI,KAAK,UAAU,aAAa,CACjC,UAAU,EAAE,WAAW,EAAE,cAAc,EAAE,eAAe;IAExD,yFAAyF;IACzF,2CAA2C;IAC3C,MAAM,GAAG,GAAG,qBAAqB,CAAC,CAAC,UAAU,IAAI,IAAI,CAAC,IAAI,CAAC,UAAU,CAAC,CAAC;IACvE,MAAM,UAAU,GAAG,qBAAqB,CAAC,CAAC,cAAc,IAAI,GAAG,CAAC,CAAC;IACjE,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;AAAA,CAAC"}
1
+ {"version":3,"file":"app-management.js","sourceRoot":"","sources":["../../../lib/commands/app-management.js"],"names":[],"mappings":";;AAaA,kDAcC;AAUD,sCAeC;AApDD,oCAA+C;AAE/C;;;;;;;;;;GAUG;AACI,KAAK,UAAU,mBAAmB,CACvC,WAAW,EACX,MAAM,EACN,uBAAuB,EACvB,yBAAyB;IAEzB,MAAM,UAAU,GAAG,IAAI,CAAC,IAAI,CAAC,UAAU,CAAC;IACxC,OAAO,qBAAqB,CAAC,CAAC,MAAM,IAAI,CAAC,QAAQ,CAAC,OAAO,CAAC,OAAO,CAAC,+BAA+B,EAAE,MAAM,EAAE;QACzG,UAAU;QACV,WAAW;QACX,MAAM;QACN,uBAAuB;QACvB,yBAAyB;KAC1B,CAAC,CAAC,CAAC;AACN,CAAC;AAED;;;;;;;GAOG;AACI,KAAK,UAAU,aAAa,CACjC,UAAU,EAAE,WAAW,EAAE,cAAc,EAAE,eAAe;IAExD,yFAAyF;IACzF,2CAA2C;IAC3C,MAAM,GAAG,GAAG,qBAAqB,CAAC,CAAC,UAAU,IAAI,IAAI,CAAC,IAAI,CAAC,UAAU,CAAC,CAAC;IACvE,MAAM,UAAU,GAAG,qBAAqB,CAAC,CAAC,cAAc,IAAI,GAAG,CAAC,CAAC;IACjE,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;AAAA,CAAC"}
@@ -1,38 +1,18 @@
1
1
  /**
2
- * @this {import('../driver').EspressoDriver}
2
+ * @this {EspressoDriver}
3
3
  * @returns {Promise<string>} Base64-encoded content of the clipboard
4
4
  * or an empty string if the clipboard is empty.
5
5
  */
6
6
  export function getClipboard(this: import("../driver").EspressoDriver): Promise<string>;
7
7
  /**
8
- * @typedef {Object} SetClipboardOptions
9
- * @property {string} content Base64-encoded clipboard payload
10
- * @property {'plaintext'} [contentType] Only a single
8
+ * @this {EspressoDriver}
9
+ * @param {string} content Base64-encoded clipboard payload
10
+ * @param {'plaintext'} [contentType] Only a single
11
11
  * content type is supported, which is 'plaintext'
12
- * @property {string} [label] Optinal label to identify the current
12
+ * @param {string} [label] Optinal label to identify the current
13
13
  * clipboard payload
14
- */
15
- /**
16
- * @this {EspressoDriver}
17
- * @param {SetClipboardOptions} opts
18
14
  * @returns {Promise<void>}
19
15
  */
20
- export function mobileSetClipboard(this: import("../driver").EspressoDriver, opts: SetClipboardOptions): Promise<void>;
21
- export type SetClipboardOptions = {
22
- /**
23
- * Base64-encoded clipboard payload
24
- */
25
- content: string;
26
- /**
27
- * Only a single
28
- * content type is supported, which is 'plaintext'
29
- */
30
- contentType?: "plaintext" | undefined;
31
- /**
32
- * Optinal label to identify the current
33
- * clipboard payload
34
- */
35
- label?: string | undefined;
36
- };
16
+ export function mobileSetClipboard(this: import("../driver").EspressoDriver, content: string, contentType?: "plaintext", label?: string): Promise<void>;
37
17
  export type EspressoDriver = import("../driver").EspressoDriver;
38
18
  //# sourceMappingURL=clipboard.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"clipboard.d.ts","sourceRoot":"","sources":["../../../lib/commands/clipboard.js"],"names":[],"mappings":"AAAA;;;;GAIG;AACH,wEAHa,OAAO,CAAC,MAAM,CAAC,CAO3B;AAED;;;;;;;GAOG;AAEH;;;;GAIG;AACH,mFAHW,mBAAmB,GACjB,OAAO,CAAC,IAAI,CAAC,CAazB;;;;;aAvBa,MAAM;;;;;;;;;;;;6BA0BP,OAAO,WAAW,EAAE,cAAc"}
1
+ {"version":3,"file":"clipboard.d.ts","sourceRoot":"","sources":["../../../lib/commands/clipboard.js"],"names":[],"mappings":"AAAA;;;;GAIG;AACH,wEAHa,OAAO,CAAC,MAAM,CAAC,CAO3B;AAED;;;;;;;;GAQG;AACH,sFAPW,MAAM,gBACN,WAAW,UAEX,MAAM,GAEJ,OAAO,CAAC,IAAI,CAAC,CAQzB;6BAGY,OAAO,WAAW,EAAE,cAAc"}
@@ -3,7 +3,7 @@ Object.defineProperty(exports, "__esModule", { value: true });
3
3
  exports.getClipboard = getClipboard;
4
4
  exports.mobileSetClipboard = mobileSetClipboard;
5
5
  /**
6
- * @this {import('../driver').EspressoDriver}
6
+ * @this {EspressoDriver}
7
7
  * @returns {Promise<string>} Base64-encoded content of the clipboard
8
8
  * or an empty string if the clipboard is empty.
9
9
  */
@@ -13,20 +13,15 @@ async function getClipboard() {
13
13
  : (await this.settingsApp.getClipboard()));
14
14
  }
15
15
  /**
16
- * @typedef {Object} SetClipboardOptions
17
- * @property {string} content Base64-encoded clipboard payload
18
- * @property {'plaintext'} [contentType] Only a single
16
+ * @this {EspressoDriver}
17
+ * @param {string} content Base64-encoded clipboard payload
18
+ * @param {'plaintext'} [contentType] Only a single
19
19
  * content type is supported, which is 'plaintext'
20
- * @property {string} [label] Optinal label to identify the current
20
+ * @param {string} [label] Optinal label to identify the current
21
21
  * clipboard payload
22
- */
23
- /**
24
- * @this {EspressoDriver}
25
- * @param {SetClipboardOptions} opts
26
22
  * @returns {Promise<void>}
27
23
  */
28
- async function mobileSetClipboard(opts) {
29
- const { content, contentType, label, } = opts;
24
+ async function mobileSetClipboard(content, contentType, label) {
30
25
  await this.espresso.jwproxy.command('/appium/device/set_clipboard', 'POST', { content, contentType, label });
31
26
  }
32
27
  /**
@@ -1 +1 @@
1
- {"version":3,"file":"clipboard.js","sourceRoot":"","sources":["../../../lib/commands/clipboard.js"],"names":[],"mappings":";;AAKA,oCAIC;AAgBD,gDAWC;AApCD;;;;GAIG;AACI,KAAK,UAAU,YAAY;IAChC,OAAO,qBAAqB,CAAC,CAAC,CAAC,MAAM,IAAI,CAAC,GAAG,CAAC,WAAW,EAAE,GAAG,EAAE,CAAC;QAC/D,CAAC,CAAC,CAAC,MAAM,IAAI,CAAC,QAAQ,CAAC,OAAO,CAAC,OAAO,CAAC,8BAA8B,EAAE,MAAM,EAAE,EAAE,CAAC,CAAC;QACnF,CAAC,CAAC,CAAC,MAAM,IAAI,CAAC,WAAW,CAAC,YAAY,EAAE,CAAC,CAAC,CAAC;AAC/C,CAAC;AAED;;;;;;;GAOG;AAEH;;;;GAIG;AACI,KAAK,UAAU,kBAAkB,CAAC,IAAI;IAC3C,MAAM,EACJ,OAAO,EACP,WAAW,EACX,KAAK,GACN,GAAG,IAAI,CAAC;IACT,MAAM,IAAI,CAAC,QAAQ,CAAC,OAAO,CAAC,OAAO,CACjC,8BAA8B,EAC9B,MAAM,EACN,EAAC,OAAO,EAAE,WAAW,EAAE,KAAK,EAAC,CAC9B,CAAC;AACJ,CAAC;AAED;;GAEG"}
1
+ {"version":3,"file":"clipboard.js","sourceRoot":"","sources":["../../../lib/commands/clipboard.js"],"names":[],"mappings":";;AAKA,oCAIC;AAWD,gDAMC;AA1BD;;;;GAIG;AACI,KAAK,UAAU,YAAY;IAChC,OAAO,qBAAqB,CAAC,CAAC,CAAC,MAAM,IAAI,CAAC,GAAG,CAAC,WAAW,EAAE,GAAG,EAAE,CAAC;QAC/D,CAAC,CAAC,CAAC,MAAM,IAAI,CAAC,QAAQ,CAAC,OAAO,CAAC,OAAO,CAAC,8BAA8B,EAAE,MAAM,EAAE,EAAE,CAAC,CAAC;QACnF,CAAC,CAAC,CAAC,MAAM,IAAI,CAAC,WAAW,CAAC,YAAY,EAAE,CAAC,CAAC,CAAC;AAC/C,CAAC;AAED;;;;;;;;GAQG;AACI,KAAK,UAAU,kBAAkB,CAAC,OAAO,EAAE,WAAW,EAAE,KAAK;IAClE,MAAM,IAAI,CAAC,QAAQ,CAAC,OAAO,CAAC,OAAO,CACjC,8BAA8B,EAC9B,MAAM,EACN,EAAC,OAAO,EAAE,WAAW,EAAE,KAAK,EAAC,CAC9B,CAAC;AACJ,CAAC;AAED;;GAEG"}
@@ -25,6 +25,10 @@ export class suspendChromedriverProxy {
25
25
  * ]
26
26
  * }
27
27
  * @this {import('../driver').EspressoDriver}
28
+ * @see https://github.com/appium/appium-espresso-driver?tab=readme-ov-file#mobile-webatoms
29
+ * @param {string} webviewEl
30
+ * @param {boolean} forceJavascriptEnabled
31
+ * @param {import('@appium/types').StringRecord[]} methodChain
28
32
  */
29
- export function mobileWebAtoms(this: import("../driver").EspressoDriver, opts?: {}): Promise<unknown>;
33
+ export function mobileWebAtoms(this: import("../driver").EspressoDriver, webviewEl: string, forceJavascriptEnabled: boolean, methodChain: import("@appium/types").StringRecord[]): Promise<unknown>;
30
34
  //# sourceMappingURL=context.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"context.d.ts","sourceRoot":"","sources":["../../../lib/commands/context.js"],"names":[],"mappings":"AAEA;;;;;GAKG;AACH,oFAFa,IAAI,CAOhB;;IAJC,kBAA6B;IAC7B,iBAAgE;IAChE,kBAAkE;IAClE,wBAA0B;;AAG5B;;;;;;;;;;;;;;GAcG;AACH,sGAGC"}
1
+ {"version":3,"file":"context.d.ts","sourceRoot":"","sources":["../../../lib/commands/context.js"],"names":[],"mappings":"AAAA;;;;;GAKG;AACH,oFAFa,IAAI,CAOhB;;IAJC,kBAA6B;IAC7B,iBAAgE;IAChE,kBAAkE;IAClE,wBAA0B;;AAG5B;;;;;;;;;;;;;;;;;;GAkBG;AACH,oFAJW,MAAM,0BACN,OAAO,eACP,OAAO,eAAe,EAAE,YAAY,EAAE,oBAYhD"}
@@ -2,7 +2,6 @@
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
3
  exports.suspendChromedriverProxy = suspendChromedriverProxy;
4
4
  exports.mobileWebAtoms = mobileWebAtoms;
5
- const utils_1 = require("../utils");
6
5
  /**
7
6
  * Stop proxying to any Chromedriver and redirect to Espresso
8
7
  *
@@ -29,9 +28,16 @@ function suspendChromedriverProxy() {
29
28
  * ]
30
29
  * }
31
30
  * @this {import('../driver').EspressoDriver}
31
+ * @see https://github.com/appium/appium-espresso-driver?tab=readme-ov-file#mobile-webatoms
32
+ * @param {string} webviewEl
33
+ * @param {boolean} forceJavascriptEnabled
34
+ * @param {import('@appium/types').StringRecord[]} methodChain
32
35
  */
33
- async function mobileWebAtoms(opts = {}) {
34
- opts = (0, utils_1.requireOptions)(opts, ['methodChain']);
35
- return await this.espresso.jwproxy.command(`/appium/execute_mobile/web_atoms`, 'POST', opts);
36
+ async function mobileWebAtoms(webviewEl, forceJavascriptEnabled, methodChain) {
37
+ return await this.espresso.jwproxy.command(`/appium/execute_mobile/web_atoms`, 'POST', {
38
+ webviewEl,
39
+ forceJavascriptEnabled,
40
+ methodChain,
41
+ });
36
42
  }
37
43
  //# sourceMappingURL=context.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"context.js","sourceRoot":"","sources":["../../../lib/commands/context.js"],"names":[],"mappings":";;AAQA,4DAKC;AAiBD,wCAGC;AAjCD,oCAA0C;AAE1C;;;;;GAKG;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;;;;;;;;;;;;;;GAcG;AACI,KAAK,UAAU,cAAc,CAAE,IAAI,GAAG,EAAE;IAC7C,IAAI,GAAG,IAAA,sBAAc,EAAC,IAAI,EAAE,CAAC,aAAa,CAAC,CAAC,CAAC;IAC7C,OAAO,MAAM,IAAI,CAAC,QAAQ,CAAC,OAAO,CAAC,OAAO,CAAC,kCAAkC,EAAE,MAAM,EAAE,IAAI,CAAC,CAAC;AAC/F,CAAC"}
1
+ {"version":3,"file":"context.js","sourceRoot":"","sources":["../../../lib/commands/context.js"],"names":[],"mappings":";;AAMA,4DAKC;AAqBD,wCAUC;AA1CD;;;;;GAKG;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,CAClC,SAAS,EACT,sBAAsB,EACtB,WAAW;IAEX,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"}
@@ -2,57 +2,93 @@
2
2
  * Flash the element with given id.
3
3
  * durationMillis and repeatCount are optional
4
4
  * @this {import('../driver').EspressoDriver}
5
+ * @see https://github.com/appium/appium-espresso-driver?tab=readme-ov-file#mobile-flashelement
6
+ * @param {string} elementId
7
+ * @param {number} durationMillis
8
+ * @param {number} repeatCount
5
9
  */
6
- export function mobileFlashElement(this: import("../driver").EspressoDriver, opts?: {}): Promise<unknown>;
10
+ export function mobileFlashElement(this: import("../driver").EspressoDriver, elementId: string, durationMillis: number, repeatCount: number): Promise<unknown>;
7
11
  /**
8
12
  * @this {import('../driver').EspressoDriver}
13
+ * @see https://github.com/appium/appium-espresso-driver?tab=readme-ov-file#mobile-dismissautofill
14
+ * @param {string} elementId
9
15
  */
10
- export function mobileDismissAutofill(this: import("../driver").EspressoDriver, opts?: {}): Promise<void>;
16
+ export function mobileDismissAutofill(this: import("../driver").EspressoDriver, elementId: string): Promise<void>;
11
17
  /**
12
18
  * @this {import('../driver').EspressoDriver}
19
+ * @see https://github.com/appium/appium-espresso-driver?tab=readme-ov-file#mobile-swipe
20
+ * @param {string} elementId
21
+ * @param {string} [direction]
22
+ * @param {string} [swiper]
23
+ * @param {string} [startCoordinates]
24
+ * @param {string} [endCoordinates]
25
+ * @param {string} [precisionDescriber]
13
26
  */
14
- export function mobileSwipe(this: import("../driver").EspressoDriver, opts?: {}): Promise<unknown>;
27
+ export function mobileSwipe(this: import("../driver").EspressoDriver, elementId: string, direction?: string, swiper?: string, startCoordinates?: string, endCoordinates?: string, precisionDescriber?: string): Promise<unknown>;
15
28
  /**
16
29
  * @this {import('../driver').EspressoDriver}
30
+ * @see https://github.com/appium/appium-espresso-driver?tab=readme-ov-file#mobile-opendrawer
31
+ * @param {string} elementId
32
+ * @param {number} [gravity]
17
33
  */
18
- export function mobileOpenDrawer(this: import("../driver").EspressoDriver, opts?: {}): Promise<unknown>;
34
+ export function mobileOpenDrawer(this: import("../driver").EspressoDriver, elementId: string, gravity?: number): Promise<unknown>;
19
35
  /**
20
36
  * @this {import('../driver').EspressoDriver}
37
+ * @see https://github.com/appium/appium-espresso-driver?tab=readme-ov-file#mobile-closedrawer
38
+ * @param {string} elementId
39
+ * @param {number} [gravity]
21
40
  */
22
- export function mobileCloseDrawer(this: import("../driver").EspressoDriver, opts?: {}): Promise<unknown>;
41
+ export function mobileCloseDrawer(this: import("../driver").EspressoDriver, elementId: string, gravity?: number): Promise<unknown>;
23
42
  /**
24
43
  * @this {import('../driver').EspressoDriver}
44
+ * @see https://github.com/appium/appium-espresso-driver?tab=readme-ov-file#mobile-setdate
45
+ * @param {string} elementId
46
+ * @param {number} year
47
+ * @param {number} monthOfYear
48
+ * @param {number} dayOfMonth
25
49
  */
26
- export function mobileSetDate(this: import("../driver").EspressoDriver, opts?: {}): Promise<unknown>;
50
+ export function mobileSetDate(this: import("../driver").EspressoDriver, elementId: string, year: number, monthOfYear: number, dayOfMonth: number): Promise<unknown>;
27
51
  /**
28
52
  * @this {import('../driver').EspressoDriver}
53
+ * @see https://github.com/appium/appium-espresso-driver?tab=readme-ov-file#mobile-settime
54
+ * @param {string} elementId
55
+ * @param {number} hours
56
+ * @param {number} minutes
29
57
  */
30
- export function mobileSetTime(this: import("../driver").EspressoDriver, opts?: {}): Promise<unknown>;
58
+ export function mobileSetTime(this: import("../driver").EspressoDriver, elementId: string, hours: number, minutes: number): Promise<unknown>;
31
59
  /**
32
60
  * @this {import('../driver').EspressoDriver}
61
+ * @see https://github.com/appium/appium-espresso-driver?tab=readme-ov-file#mobile-navigateto
62
+ * @param {string} elementId
63
+ * @param {number | string} menuItemId
33
64
  */
34
- export function mobileNavigateTo(this: import("../driver").EspressoDriver, opts?: {}): Promise<unknown>;
65
+ export function mobileNavigateTo(this: import("../driver").EspressoDriver, elementId: string, menuItemId: number | string): Promise<unknown>;
35
66
  /**
36
67
  * Perform a 'GeneralClickAction' (https://developer.android.com/reference/androidx/test/espresso/action/GeneralClickAction)
37
- * @this {import('../driver').EspressoDriver}
38
- */
39
- export function mobileClickAction(this: import("../driver").EspressoDriver, opts?: {}): Promise<unknown>;
40
- /**
41
68
  *
69
+ * @see https://github.com/appium/appium-espresso-driver?tab=readme-ov-file#mobile-clickaction
42
70
  * @this {import('../driver').EspressoDriver}
71
+ * @param {string} elementId
72
+ * @param {string} [tapper]
73
+ * @param {string} [coordinatesProvider]
74
+ * @param {string} [precisionDescriber]
75
+ * @param {number} [inputDevice]
76
+ * @param {number} [buttonState]
43
77
  */
44
- export function mobileScrollToPage(this: import("../driver").EspressoDriver, opts?: {}): Promise<unknown>;
78
+ export function mobileClickAction(this: import("../driver").EspressoDriver, elementId: string, tapper?: string, coordinatesProvider?: string, precisionDescriber?: string, inputDevice?: number, buttonState?: number): Promise<unknown>;
45
79
  /**
46
- * @typedef {Object} PerformEditorActionOpts
47
- * @property {string|number} action
80
+ * @this {import('../driver').EspressoDriver}
81
+ * @see https://github.com/appium/appium-espresso-driver?tab=readme-ov-file#mobile-scrolltopage
82
+ * @param {string} elementId
83
+ * @param {string} [scrollTo]
84
+ * @param {number} [scrollToPage]
85
+ * @param {boolean} [smoothScroll=false]
48
86
  */
87
+ export function mobileScrollToPage(this: import("../driver").EspressoDriver, elementId: string, scrollTo?: string, scrollToPage?: number, smoothScroll?: boolean): Promise<unknown>;
49
88
  /**
50
89
  * @this {import('../driver').EspressoDriver}
51
- * @param {PerformEditorActionOpts} opts
90
+ * @param {string|number} action
52
91
  * @returns {Promise<void>}
53
92
  */
54
- export function mobilePerformEditorAction(this: import("../driver").EspressoDriver, opts: PerformEditorActionOpts): Promise<void>;
55
- export type PerformEditorActionOpts = {
56
- action: string | number;
57
- };
93
+ export function mobilePerformEditorAction(this: import("../driver").EspressoDriver, action: string | number): Promise<void>;
58
94
  //# sourceMappingURL=element.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"element.d.ts","sourceRoot":"","sources":["../../../lib/commands/element.js"],"names":[],"mappings":"AAKA;;;;GAIG;AACH,0GASC;AAED;;GAEG;AACH,0GAMC;AAED;;GAEG;AACH,mGAeC;AAGD;;GAEG;AACH,wGAOC;AAED;;GAEG;AACH,yGAOC;AAED;;GAEG;AACH,qGAYC;AAED;;GAEG;AACH,qGASC;AAED;;GAEG;AACH,wGAaC;AAED;;;GAGG;AACH,yGAUC;AAED;;;GAGG;AACH,0GAyBC;AAED;;;GAGG;AAEH;;;;GAIG;AACH,0FAHW,uBAAuB,GACrB,OAAO,CAAC,IAAI,CAAC,CAKzB;;YAXa,MAAM,GAAC,MAAM"}
1
+ {"version":3,"file":"element.d.ts","sourceRoot":"","sources":["../../../lib/commands/element.js"],"names":[],"mappings":"AAIA;;;;;;;;GAQG;AACH,wFAJW,MAAM,kBACN,MAAM,eACN,MAAM,oBAchB;AAED;;;;GAIG;AACH,2FAFW,MAAM,iBAQhB;AAED;;;;;;;;;GASG;AACH,iFAPW,MAAM,cACN,MAAM,WACN,MAAM,qBACN,MAAM,mBACN,MAAM,uBACN,MAAM,oBAsBhB;AAGD;;;;;GAKG;AACH,sFAHW,MAAM,YACN,MAAM,oBAQhB;AAED;;;;;GAKG;AACH,uFAHW,MAAM,YACN,MAAM,oBAQhB;AAED;;;;;;;GAOG;AACH,mFALW,MAAM,QACN,MAAM,eACN,MAAM,cACN,MAAM,oBAgBhB;AAED;;;;;;GAMG;AACH,mFAJW,MAAM,SACN,MAAM,WACN,MAAM,oBAchB;AAED;;;;;GAKG;AACH,sFAHW,MAAM,cACN,MAAM,GAAG,MAAM,oBAczB;AAED;;;;;;;;;;;GAWG;AACH,uFAPW,MAAM,WACN,MAAM,wBACN,MAAM,uBACN,MAAM,gBACN,MAAM,gBACN,MAAM,oBAgBhB;AAED;;;;;;;GAOG;AACH,wFALW,MAAM,aACN,MAAM,iBACN,MAAM,iBACN,OAAO,oBA+BjB;AAED;;;;GAIG;AACH,4FAHW,MAAM,GAAC,MAAM,GACX,OAAO,CAAC,IAAI,CAAC,CAIzB"}