appium-espresso-driver 6.3.3 → 6.3.4

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 CHANGED
@@ -1,3 +1,9 @@
1
+ ## [6.3.4](https://github.com/appium/appium-espresso-driver/compare/v6.3.3...v6.3.4) (2026-01-17)
2
+
3
+ ### Miscellaneous Chores
4
+
5
+ * 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))
6
+
1
7
  ## [6.3.3](https://github.com/appium/appium-espresso-driver/compare/v6.3.2...v6.3.3) (2026-01-16)
2
8
 
3
9
  ### Miscellaneous Chores
@@ -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 {string} elementId
7
- * @param {number} durationMillis
8
- * @param {number} repeatCount
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: import("../driver").EspressoDriver, elementId: string, durationMillis: number, repeatCount: number): Promise<any>;
11
+ export declare function mobileFlashElement(this: EspressoDriver, elementId: string, durationMillis?: number, repeatCount?: number): Promise<any>;
11
12
  /**
12
- * @this {import('../driver').EspressoDriver}
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 {string} elementId
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: import("../driver").EspressoDriver, elementId: string): Promise<void>;
18
+ export declare function mobileDismissAutofill(this: EspressoDriver, elementId: string): Promise<void>;
17
19
  /**
18
- * @this {import('../driver').EspressoDriver}
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 {string} elementId
21
- * @param {string} [direction]
22
- * @param {string} [swiper]
23
- * @param {string} [startCoordinates]
24
- * @param {string} [endCoordinates]
25
- * @param {string} [precisionDescriber]
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: import("../driver").EspressoDriver, elementId: string, direction?: string, swiper?: string, startCoordinates?: string, endCoordinates?: string, precisionDescriber?: string): Promise<any>;
30
+ export declare function mobileSwipe(this: EspressoDriver, elementId: string, direction?: string, swiper?: string, startCoordinates?: string, endCoordinates?: string, precisionDescriber?: string): Promise<any>;
28
31
  /**
29
- * @this {import('../driver').EspressoDriver}
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 {string} elementId
32
- * @param {number} [gravity]
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: import("../driver").EspressoDriver, elementId: string, gravity?: number): Promise<any>;
38
+ export declare function mobileOpenDrawer(this: EspressoDriver, elementId: string, gravity?: number): Promise<any>;
35
39
  /**
36
- * @this {import('../driver').EspressoDriver}
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 {string} elementId
39
- * @param {number} [gravity]
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: import("../driver").EspressoDriver, elementId: string, gravity?: number): Promise<any>;
46
+ export declare function mobileCloseDrawer(this: EspressoDriver, elementId: string, gravity?: number): Promise<any>;
42
47
  /**
43
- * @this {import('../driver').EspressoDriver}
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 {string} elementId
46
- * @param {number} year
47
- * @param {number} monthOfYear
48
- * @param {number} dayOfMonth
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: import("../driver").EspressoDriver, elementId: string, year: number, monthOfYear: number, dayOfMonth: number): Promise<any>;
56
+ export declare function mobileSetDate(this: EspressoDriver, elementId: string, year: number, monthOfYear: number, dayOfMonth: number): Promise<any>;
51
57
  /**
52
- * @this {import('../driver').EspressoDriver}
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 {string} elementId
55
- * @param {number} hours
56
- * @param {number} minutes
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: import("../driver").EspressoDriver, elementId: string, hours: number, minutes: number): Promise<any>;
65
+ export declare function mobileSetTime(this: EspressoDriver, elementId: string, hours: number, minutes: number): Promise<any>;
59
66
  /**
60
- * @this {import('../driver').EspressoDriver}
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 {string} elementId
63
- * @param {number | string} menuItemId
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: import("../driver").EspressoDriver, elementId: string, menuItemId: number | string): Promise<any>;
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
- * @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]
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: import("../driver").EspressoDriver, elementId: string, tapper?: string, coordinatesProvider?: string, precisionDescriber?: string, inputDevice?: number, buttonState?: number): Promise<any>;
87
+ export declare function mobileClickAction(this: EspressoDriver, elementId: string, tapper?: string, coordinatesProvider?: string, precisionDescriber?: string, inputDevice?: number, buttonState?: number): Promise<any>;
79
88
  /**
80
- * @this {import('../driver').EspressoDriver}
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 {string} elementId
83
- * @param {string} [scrollTo]
84
- * @param {number} [scrollToPage]
85
- * @param {boolean} [smoothScroll=false]
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: import("../driver").EspressoDriver, elementId: string, scrollTo?: string, scrollToPage?: number, smoothScroll?: boolean): Promise<any>;
98
+ export declare function mobileScrollToPage(this: EspressoDriver, elementId: string, scrollTo?: string, scrollToPage?: number, smoothScroll?: boolean): Promise<any>;
88
99
  /**
89
- * @this {import('../driver').EspressoDriver}
90
- * @param {string|number} action
91
- * @returns {Promise<void>}
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: import("../driver").EspressoDriver, action: string | number): Promise<void>;
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.js"],"names":[],"mappings":"AAIA;;;;;;;;GAQG;AACH,wFAJW,MAAM,kBACN,MAAM,eACN,MAAM,gBAchB;AAED;;;;GAIG;AACH,2FAFW,MAAM,iBAQhB;AAED;;;;;;;;;GASG;AACH,iFAPW,MAAM,cACN,MAAM,WACN,MAAM,qBACN,MAAM,mBACN,MAAM,uBACN,MAAM,gBAsBhB;AAGD;;;;;GAKG;AACH,sFAHW,MAAM,YACN,MAAM,gBAQhB;AAED;;;;;GAKG;AACH,uFAHW,MAAM,YACN,MAAM,gBAQhB;AAED;;;;;;;GAOG;AACH,mFALW,MAAM,QACN,MAAM,eACN,MAAM,cACN,MAAM,gBAgBhB;AAED;;;;;;GAMG;AACH,mFAJW,MAAM,SACN,MAAM,WACN,MAAM,gBAchB;AAED;;;;;GAKG;AACH,sFAHW,MAAM,cACN,MAAM,GAAG,MAAM,gBAczB;AAED;;;;;;;;;;;GAWG;AACH,uFAPW,MAAM,WACN,MAAM,wBACN,MAAM,uBACN,MAAM,gBACN,MAAM,gBACN,MAAM,gBAgBhB;AAED;;;;;;;GAOG;AACH,wFALW,MAAM,aACN,MAAM,iBACN,MAAM,iBACN,OAAO,gBA+BjB;AAED;;;;GAIG;AACH,4FAHW,MAAM,GAAC,MAAM,GACX,OAAO,CAAC,IAAI,CAAC,CAIzB"}
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,cAA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AAsB,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"}
@@ -20,11 +20,11 @@ const support_1 = require("appium/support");
20
20
  /**
21
21
  * Flash the element with given id.
22
22
  * durationMillis and repeatCount are optional
23
- * @this {import('../driver').EspressoDriver}
24
23
  * @see https://github.com/appium/appium-espresso-driver?tab=readme-ov-file#mobile-flashelement
25
- * @param {string} elementId
26
- * @param {number} durationMillis
27
- * @param {number} repeatCount
24
+ * @param elementId - The ID of the element to flash
25
+ * @param durationMillis - Optional duration in milliseconds for each flash
26
+ * @param repeatCount - Optional number of times to repeat the flash
27
+ * @returns Promise that resolves when the flash command is executed
28
28
  */
29
29
  async function mobileFlashElement(elementId, durationMillis, repeatCount) {
30
30
  return await this.espresso.jwproxy.command(`/appium/execute_mobile/${elementId}/flash`, 'POST', {
@@ -33,22 +33,24 @@ async function mobileFlashElement(elementId, durationMillis, repeatCount) {
33
33
  });
34
34
  }
35
35
  /**
36
- * @this {import('../driver').EspressoDriver}
36
+ * Dismisses the autofill UI for the given element.
37
37
  * @see https://github.com/appium/appium-espresso-driver?tab=readme-ov-file#mobile-dismissautofill
38
- * @param {string} elementId
38
+ * @param elementId - The ID of the element for which to dismiss autofill
39
+ * @returns Promise that resolves when the autofill is dismissed
39
40
  */
40
41
  async function mobileDismissAutofill(elementId) {
41
42
  await this.espresso.jwproxy.command(`/session/:sessionId/appium/execute_mobile/${elementId}/dismiss_autofill`, 'POST', {});
42
43
  }
43
44
  /**
44
- * @this {import('../driver').EspressoDriver}
45
+ * Performs a swipe gesture on the given element.
45
46
  * @see https://github.com/appium/appium-espresso-driver?tab=readme-ov-file#mobile-swipe
46
- * @param {string} elementId
47
- * @param {string} [direction]
48
- * @param {string} [swiper]
49
- * @param {string} [startCoordinates]
50
- * @param {string} [endCoordinates]
51
- * @param {string} [precisionDescriber]
47
+ * @param elementId - The ID of the element to swipe
48
+ * @param direction - Optional swipe direction (e.g., 'up', 'down', 'left', 'right')
49
+ * @param swiper - Optional swiper configuration
50
+ * @param startCoordinates - Optional starting coordinates for the swipe
51
+ * @param endCoordinates - Optional ending coordinates for the swipe
52
+ * @param precisionDescriber - Optional precision describer for the swipe action
53
+ * @returns Promise that resolves when the swipe is completed
52
54
  */
53
55
  async function mobileSwipe(elementId, direction, swiper, startCoordinates, endCoordinates, precisionDescriber) {
54
56
  return await this.espresso.jwproxy.command(`/appium/execute_mobile/${elementId}/swipe`, 'POST', {
@@ -61,30 +63,33 @@ async function mobileSwipe(elementId, direction, swiper, startCoordinates, endCo
61
63
  });
62
64
  }
63
65
  /**
64
- * @this {import('../driver').EspressoDriver}
66
+ * Opens a drawer element (e.g., Navigation Drawer) with the specified gravity.
65
67
  * @see https://github.com/appium/appium-espresso-driver?tab=readme-ov-file#mobile-opendrawer
66
- * @param {string} elementId
67
- * @param {number} [gravity]
68
+ * @param elementId - The ID of the drawer element to open
69
+ * @param gravity - Optional gravity value for drawer positioning (e.g., Gravity.START, Gravity.END)
70
+ * @returns Promise that resolves when the drawer is opened
68
71
  */
69
72
  async function mobileOpenDrawer(elementId, gravity) {
70
73
  return await this.espresso.jwproxy.command(`/appium/execute_mobile/${elementId}/open_drawer`, 'POST', { gravity });
71
74
  }
72
75
  /**
73
- * @this {import('../driver').EspressoDriver}
76
+ * Closes a drawer element (e.g., Navigation Drawer) with the specified gravity.
74
77
  * @see https://github.com/appium/appium-espresso-driver?tab=readme-ov-file#mobile-closedrawer
75
- * @param {string} elementId
76
- * @param {number} [gravity]
78
+ * @param elementId - The ID of the drawer element to close
79
+ * @param gravity - Optional gravity value for drawer positioning (e.g., Gravity.START, Gravity.END)
80
+ * @returns Promise that resolves when the drawer is closed
77
81
  */
78
82
  async function mobileCloseDrawer(elementId, gravity) {
79
83
  return await this.espresso.jwproxy.command(`/appium/execute_mobile/${elementId}/close_drawer`, 'POST', { gravity });
80
84
  }
81
85
  /**
82
- * @this {import('../driver').EspressoDriver}
86
+ * Sets the date on a date picker element.
83
87
  * @see https://github.com/appium/appium-espresso-driver?tab=readme-ov-file#mobile-setdate
84
- * @param {string} elementId
85
- * @param {number} year
86
- * @param {number} monthOfYear
87
- * @param {number} dayOfMonth
88
+ * @param elementId - The ID of the date picker element
89
+ * @param year - The year to set (e.g., 2024)
90
+ * @param monthOfYear - The month to set (0-11, where 0 is January)
91
+ * @param dayOfMonth - The day of the month to set (1-31)
92
+ * @returns Promise that resolves when the date is set
88
93
  */
89
94
  async function mobileSetDate(elementId, year, monthOfYear, dayOfMonth) {
90
95
  return await this.espresso.jwproxy.command(`/appium/execute_mobile/${elementId}/set_date`, 'POST', {
@@ -94,11 +99,12 @@ async function mobileSetDate(elementId, year, monthOfYear, dayOfMonth) {
94
99
  });
95
100
  }
96
101
  /**
97
- * @this {import('../driver').EspressoDriver}
102
+ * Sets the time on a time picker element.
98
103
  * @see https://github.com/appium/appium-espresso-driver?tab=readme-ov-file#mobile-settime
99
- * @param {string} elementId
100
- * @param {number} hours
101
- * @param {number} minutes
104
+ * @param elementId - The ID of the time picker element
105
+ * @param hours - The hour to set (0-23)
106
+ * @param minutes - The minute to set (0-59)
107
+ * @returns Promise that resolves when the time is set
102
108
  */
103
109
  async function mobileSetTime(elementId, hours, minutes) {
104
110
  return await this.espresso.jwproxy.command(`/appium/execute_mobile/${elementId}/set_time`, 'POST', {
@@ -107,10 +113,12 @@ async function mobileSetTime(elementId, hours, minutes) {
107
113
  });
108
114
  }
109
115
  /**
110
- * @this {import('../driver').EspressoDriver}
116
+ * Navigates to a menu item in a navigation element (e.g., BottomNavigationView).
111
117
  * @see https://github.com/appium/appium-espresso-driver?tab=readme-ov-file#mobile-navigateto
112
- * @param {string} elementId
113
- * @param {number | string} menuItemId
118
+ * @param elementId - The ID of the navigation element
119
+ * @param menuItemId - The ID of the menu item to navigate to (must be a non-negative number)
120
+ * @returns Promise that resolves when navigation is completed
121
+ * @throws {errors.InvalidArgumentError} If menuItemId is not a non-negative number
114
122
  */
115
123
  async function mobileNavigateTo(elementId, menuItemId) {
116
124
  const menuItemIdAsNumber = parseInt(`${menuItemId}`, 10);
@@ -123,13 +131,13 @@ async function mobileNavigateTo(elementId, menuItemId) {
123
131
  * Perform a 'GeneralClickAction' (https://developer.android.com/reference/androidx/test/espresso/action/GeneralClickAction)
124
132
  *
125
133
  * @see https://github.com/appium/appium-espresso-driver?tab=readme-ov-file#mobile-clickaction
126
- * @this {import('../driver').EspressoDriver}
127
- * @param {string} elementId
128
- * @param {string} [tapper]
129
- * @param {string} [coordinatesProvider]
130
- * @param {string} [precisionDescriber]
131
- * @param {number} [inputDevice]
132
- * @param {number} [buttonState]
134
+ * @param elementId - The ID of the element to perform the click action on
135
+ * @param tapper - Optional tapper configuration for the click action
136
+ * @param coordinatesProvider - Optional coordinates provider for the click position
137
+ * @param precisionDescriber - Optional precision describer for the click action
138
+ * @param inputDevice - Optional input device identifier
139
+ * @param buttonState - Optional button state for the click action
140
+ * @returns Promise that resolves when the click action is performed
133
141
  */
134
142
  async function mobileClickAction(elementId, tapper, coordinatesProvider, precisionDescriber, inputDevice, buttonState) {
135
143
  return await this.espresso.jwproxy.command(`/appium/execute_mobile/${elementId}/click_action`, 'POST', {
@@ -137,12 +145,14 @@ async function mobileClickAction(elementId, tapper, coordinatesProvider, precisi
137
145
  });
138
146
  }
139
147
  /**
140
- * @this {import('../driver').EspressoDriver}
148
+ * Scrolls to a specific page in a ViewPager or similar scrollable element.
141
149
  * @see https://github.com/appium/appium-espresso-driver?tab=readme-ov-file#mobile-scrolltopage
142
- * @param {string} elementId
143
- * @param {string} [scrollTo]
144
- * @param {number} [scrollToPage]
145
- * @param {boolean} [smoothScroll=false]
150
+ * @param elementId - The ID of the scrollable element (e.g., ViewPager)
151
+ * @param scrollTo - Optional direction to scroll: 'first', 'last', 'left', or 'right'
152
+ * @param scrollToPage - Optional page index to scroll to (must be non-negative)
153
+ * @param smoothScroll - Optional flag to enable smooth scrolling (default: false)
154
+ * @returns Promise that resolves when scrolling is completed
155
+ * @throws {errors.InvalidArgumentError} If scrollTo is not one of the valid values or scrollToPage is negative
146
156
  */
147
157
  async function mobileScrollToPage(elementId, scrollTo, scrollToPage, smoothScroll) {
148
158
  const scrollToTypes = ['first', 'last', 'left', 'right'];
@@ -162,9 +172,9 @@ async function mobileScrollToPage(elementId, scrollTo, scrollToPage, smoothScrol
162
172
  });
163
173
  }
164
174
  /**
165
- * @this {import('../driver').EspressoDriver}
166
- * @param {string|number} action
167
- * @returns {Promise<void>}
175
+ * Performs an editor action (e.g., IME action like DONE, SEARCH, NEXT) on the current input field.
176
+ * @param action - The editor action to perform (can be a string or numeric action code)
177
+ * @returns Promise that resolves when the editor action is performed
168
178
  */
169
179
  async function mobilePerformEditorAction(action) {
170
180
  await this.espresso.jwproxy.command('/appium/device/perform_editor_action', 'POST', { action });
@@ -1 +1 @@
1
- {"version":3,"file":"element.js","sourceRoot":"","sources":["../../../lib/commands/element.js"],"names":[],"mappings":";;;;;AAaA,gDAYC;AAOD,sDAMC;AAYD,kCAoBC;AASD,4CAMC;AAQD,8CAMC;AAUD,sCAcC;AASD,sCAYC;AAQD,4CAYC;AAcD,8CAcC;AAUD,gDA6BC;AAOD,8DAEC;AAhPD,oDAAuB;AACvB,0CAAuC;AACvC,4CAAsC;AAEtC;;;;;;;;GAQG;AACI,KAAK,UAAU,kBAAkB,CACtC,SAAS,EACT,cAAc,EACd,WAAW;IAEX,OAAO,MAAM,IAAI,CAAC,QAAQ,CAAC,OAAO,CAAC,OAAO,CACxC,0BAA0B,SAAS,QAAQ,EAC3C,MAAM,EAAE;QACN,cAAc;QACd,WAAW;KAC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,kBAAkB,CAEtC,SAAiB,EACjB,QAAiB,EACjB,YAAqB,EACrB,YAAsB;IAEtB,MAAM,aAAa,GAAG,CAAC,OAAO,EAAE,MAAM,EAAE,MAAM,EAAE,OAAO,CAAC,CAAC;IACzD,IAAI,QAAQ,IAAI,CAAC,gBAAC,CAAC,QAAQ,CAAC,aAAa,EAAE,QAAQ,CAAC,EAAE,CAAC;QACrD,MAAM,IAAI,eAAM,CAAC,oBAAoB,CACnC,8BAA8B,aAAa,CAAC,IAAI,CAAC,IAAI,CAAC,YAAY,QAAQ,GAAG,CAC9E,CAAC;IACJ,CAAC;IACD,IAAI,CAAC,YAAY,IAAI,CAAC,CAAC,GAAG,CAAC,EAAE,CAAC;QAC5B,MAAM,IAAI,eAAM,CAAC,oBAAoB,CACnC,yDAAyD,YAAY,GAAG,CACzE,CAAC;IACJ,CAAC;IACD,IAAI,cAAI,CAAC,QAAQ,CAAC,QAAQ,CAAC,IAAI,cAAI,CAAC,QAAQ,CAAC,YAAY,CAAC,EAAE,CAAC;QAC3D,IAAI,CAAC,GAAG,CAAC,IAAI,CAAC,6EAA6E,CAAC,CAAC;IAC/F,CAAC;IAED,OAAO,MAAM,IAAI,CAAC,QAAQ,CAAC,OAAO,CAAC,OAAO,CACxC,0BAA0B,SAAS,iBAAiB,EACpD,MAAM,EAAE;QACN,QAAQ;QACR,YAAY;QACZ,YAAY;KACb,CACF,CAAC;AACJ,CAAC;AAED;;;;GAIG;AACI,KAAK,UAAU,yBAAyB,CAAwB,MAAuB;IAC5F,MAAM,IAAI,CAAC,QAAQ,CAAC,OAAO,CAAC,OAAO,CAAC,sCAAsC,EAAE,MAAM,EAAE,EAAC,MAAM,EAAC,CAAC,CAAC;AAChG,CAAC"}
@@ -1,33 +1,38 @@
1
+ import type { StringRecord } from '@appium/types';
2
+ import type { EspressoDriver } from '../driver';
3
+ import type { DeviceInfo } from '../types';
1
4
  /**
2
5
  * Emulates key press event.
3
6
  *
4
- * @this {import('../driver').EspressoDriver}
5
- * @param {number} keycode A valid Android key code. See https://developer.android.com/reference/android/view/KeyEvent
7
+ * @param keycode A valid Android key code. See https://developer.android.com/reference/android/view/KeyEvent
6
8
  * for the list of available key codes
7
- * @param {number} [metastate] An integer in which each bit set to 1 represents a pressed meta key. See
9
+ * @param metastate An integer in which each bit set to 1 represents a pressed meta key. See
8
10
  * https://developer.android.com/reference/android/view/KeyEvent for more details.
9
- * @param {number} [flags] Flags for the particular key event. See
11
+ * @param flags Flags for the particular key event. See
10
12
  * https://developer.android.com/reference/android/view/KeyEvent for more details.
11
- * @param {boolean} [isLongPress=false] Whether to emulate long key press
13
+ * @param isLongPress Whether to emulate long key press
12
14
  */
13
- export function mobilePressKey(this: import("../driver").EspressoDriver, keycode: number, metastate?: number, flags?: number, isLongPress?: boolean): Promise<void>;
15
+ export declare function mobilePressKey(this: EspressoDriver, keycode: number, metastate?: number, flags?: number, isLongPress?: boolean): Promise<void>;
14
16
  /**
15
- * @this {import('../driver').EspressoDriver}
16
- * @returns {Promise<import('../types').DeviceInfo>}
17
+ * Retrieves information about the connected Android device.
18
+ * @returns Promise that resolves to device information including API version, platform version, manufacturer,
19
+ * model, display size, and density
17
20
  */
18
- export function mobileGetDeviceInfo(this: import("../driver").EspressoDriver): Promise<import("../types").DeviceInfo>;
21
+ export declare function mobileGetDeviceInfo(this: EspressoDriver): Promise<DeviceInfo>;
19
22
  /**
20
- * @this {import('../driver').EspressoDriver}
23
+ * Checks if a toast message with the given text is currently visible on the screen.
21
24
  * @see https://github.com/appium/appium-espresso-driver?tab=readme-ov-file#mobile-istoastvisible
22
- * @param {string} text
23
- * @param {boolean} [isRegexp]
25
+ * @param text - The text to search for in the toast message
26
+ * @param isRegexp - Optional flag indicating if the text should be treated as a regular expression
27
+ * @returns Promise that resolves to true if the toast is visible, false otherwise
28
+ * @throws {errors.InvalidArgumentError} If text is not provided
24
29
  */
25
- export function mobileIsToastVisible(this: import("../driver").EspressoDriver, text: string, isRegexp?: boolean): Promise<any>;
30
+ export declare function mobileIsToastVisible(this: EspressoDriver, text: string, isRegexp?: boolean): Promise<any>;
26
31
  /**
27
- * @this {import('../driver').EspressoDriver}
28
- * @returns {Promise<number>}
32
+ * Gets the display density (DPI) of the connected Android device.
33
+ * @returns Promise that resolves to the display density value
29
34
  */
30
- export function getDisplayDensity(this: import("../driver").EspressoDriver): Promise<number>;
35
+ export declare function getDisplayDensity(this: EspressoDriver): Promise<number>;
31
36
  /**
32
37
  * API to invoke methods defined in Android app.
33
38
  *
@@ -66,15 +71,17 @@ export function getDisplayDensity(this: import("../driver").EspressoDriver): Pro
66
71
  *
67
72
  * @throws {Error} if target is not 'activity' or 'application'
68
73
  * @throws {Error} if a method is not found with given argument types
69
- * @this {import('../driver').EspressoDriver}
70
74
  * @see https://github.com/appium/appium-espresso-driver?tab=readme-ov-file#mobile-backdoor
71
- * @param {string} target
72
- * @param {import('@appium/types').StringRecord[]} methods
73
- * @param {string} [elementId]
74
- * @return {Promise<any>} the result of the last method in the invocation chain.
75
+ * @param target - The target object to invoke methods on: 'activity', 'application', or 'element'
76
+ * @param methods - Array of method definitions to invoke in sequence. Each method can have a name and optional args array
77
+ * @param elementId - Required if target is 'element', the ID of the element to invoke methods on
78
+ * @returns Promise that resolves to the result of the last method in the invocation chain.
75
79
  * If method return type is void, then "<VOID>" will be returned
80
+ * @throws {errors.InvalidArgumentError} If target is 'element' but elementId is not provided
81
+ * @throws {Error} If target is not 'activity', 'application', or 'element'
82
+ * @throws {Error} If a method is not found with the given argument types
76
83
  */
77
- export function mobileBackdoor(this: import("../driver").EspressoDriver, target: string, methods: import("@appium/types").StringRecord[], elementId?: string): Promise<any>;
84
+ export declare function mobileBackdoor(this: EspressoDriver, target: string, methods: StringRecord[], elementId?: string): Promise<any>;
78
85
  /**
79
86
  * Execute UiAutomator2 commands to drive out of app areas.
80
87
  * strategy can be one of: "clazz", "res", "text", "textContains", "textEndsWith", "textStartsWith",
@@ -84,44 +91,37 @@ export function mobileBackdoor(this: import("../driver").EspressoDriver, target:
84
91
  * "getResourceName", "getVisibleBounds", "getVisibleCenter", "getApplicationPackage",
85
92
  * "getChildCount", "clear", "isCheckable", "isChecked", "isClickable", "isEnabled",
86
93
  * "isFocusable", "isFocused", "isLongClickable", "isScrollable", "isSelected"
87
- * @this {import('../driver').EspressoDriver}
88
94
  * @see https://github.com/appium/appium-espresso-driver?tab=readme-ov-file#mobile-uiautomator
89
- * @param {string} strategy
90
- * @param {string} locator
91
- * @param {string} action
92
- * @param {number} [index]
95
+ * @param strategy - The locator strategy to use (e.g., "clazz", "res", "text", "desc", "pkg", etc.)
96
+ * @param locator - The locator value to match elements
97
+ * @param action - The action to perform on the matched element
98
+ * @param index - Optional zero-based index if multiple elements match the locator
99
+ * @returns Promise that resolves to the result of the action (varies by action type)
93
100
  */
94
- export function mobileUiautomator(this: import("../driver").EspressoDriver, strategy: string, locator: string, action: string, index?: number): Promise<any>;
101
+ export declare function mobileUiautomator(this: EspressoDriver, strategy: string, locator: string, action: string, index?: number): Promise<any>;
95
102
  /**
96
103
  * Execute UiAutomator2 command to return the UI dump when AUT is in background.
97
- * @this {import('../driver').EspressoDriver}
98
104
  * @throws {Error} if uiautomator view dump is unsuccessful
99
105
  * @returns {Promise<string>} uiautomator DOM xml as string
100
106
  */
101
- export function mobileUiautomatorPageSource(this: import("../driver").EspressoDriver): Promise<string>;
107
+ export declare function mobileUiautomatorPageSource(this: EspressoDriver): Promise<string>;
102
108
  /**
103
- * @typedef {Object} SettingsOptions
104
- * @property {!string|number|boolean} Object Settings parameters that is available in
109
+ * Settings parameters that is available in
105
110
  * https://github.com/appium/appium-espresso-driver#settings-api or enabled plugins.
106
111
  */
112
+ export interface SettingsOptions {
113
+ [key: string]: string | number | boolean;
114
+ }
107
115
  /**
108
116
  * Apply the given settings to the espresso driver and the espresso server.
109
117
  * Errors by the espresso server will be printed as log, but it does not return an error message.
110
- * @param {SettingsOptions} settings
111
- * @this {import('../driver').EspressoDriver}
118
+ * @param settings - Settings object containing key-value pairs of settings to apply
119
+ * @returns Promise that resolves when settings are updated
112
120
  */
113
- export function updateSettings(this: import("../driver").EspressoDriver, settings: SettingsOptions): Promise<void>;
121
+ export declare function updateSettings(this: EspressoDriver, settings: SettingsOptions): Promise<void>;
114
122
  /**
115
- * @this {import('../driver').EspressoDriver}
123
+ * Retrieves the current settings from both the driver and the espresso server.
124
+ * @returns Promise that resolves to a merged object containing all current settings from both driver and server
116
125
  */
117
- export function getSettings(this: import("../driver").EspressoDriver): Promise<{
118
- [x: string]: any;
119
- }>;
120
- export type SettingsOptions = {
121
- /**
122
- * Settings parameters that is available in
123
- * https://github.com/appium/appium-espresso-driver#settings-api or enabled plugins.
124
- */
125
- Object: string | number | boolean;
126
- };
126
+ export declare function getSettings(this: EspressoDriver): Promise<Record<string, any>>;
127
127
  //# sourceMappingURL=misc.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"misc.d.ts","sourceRoot":"","sources":["../../../lib/commands/misc.js"],"names":[],"mappings":"AAGA;;;;;;;;;;;GAWG;AACH,kFARW,MAAM,cAEN,MAAM,UAEN,MAAM,gBAEN,OAAO,iBAWjB;AAED;;;GAGG;AACH,+EAFa,OAAO,CAAC,OAAO,UAAU,EAAE,UAAU,CAAC,CAIlD;AAED;;;;;GAKG;AACH,qFAHW,MAAM,aACN,OAAO,gBAUjB;AAED;;;GAGG;AACH,6EAFa,OAAO,CAAC,MAAM,CAAC,CAM3B;AACD;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GA6CG;AACH,iFANW,MAAM,WACN,OAAO,eAAe,EAAE,YAAY,EAAE,cACtC,MAAM,GACL,OAAO,CAAC,GAAG,CAAC,CAcvB;AAED;;;;;;;;;;;;;;;GAeG;AACH,sFALW,MAAM,WACN,MAAM,UACN,MAAM,UACN,MAAM,gBAWhB;AAED;;;;;GAKG;AACH,uFAFa,OAAO,CAAC,MAAM,CAAC,CAM3B;AAED;;;;GAIG;AAEH;;;;;GAKG;AACH,mFAHW,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