appium-uiautomator2-driver 2.32.0 → 2.32.2

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 (41) hide show
  1. package/CHANGELOG.md +14 -0
  2. package/build/lib/commands/actions.js +10 -10
  3. package/build/lib/commands/actions.js.map +1 -1
  4. package/build/lib/commands/alert.js +3 -3
  5. package/build/lib/commands/alert.js.map +1 -1
  6. package/build/lib/commands/app-strings.d.ts.map +1 -1
  7. package/build/lib/commands/app-strings.js +3 -4
  8. package/build/lib/commands/app-strings.js.map +1 -1
  9. package/build/lib/commands/element.js +19 -19
  10. package/build/lib/commands/element.js.map +1 -1
  11. package/build/lib/commands/general.d.ts.map +1 -1
  12. package/build/lib/commands/general.js +17 -19
  13. package/build/lib/commands/general.js.map +1 -1
  14. package/build/lib/commands/gestures.js +11 -11
  15. package/build/lib/commands/gestures.js.map +1 -1
  16. package/build/lib/commands/touch.js +3 -3
  17. package/build/lib/commands/touch.js.map +1 -1
  18. package/build/lib/constraints.d.ts +0 -3
  19. package/build/lib/constraints.d.ts.map +1 -1
  20. package/build/lib/constraints.js +0 -3
  21. package/build/lib/constraints.js.map +1 -1
  22. package/build/lib/driver.d.ts +2 -4
  23. package/build/lib/driver.d.ts.map +1 -1
  24. package/build/lib/driver.js +36 -84
  25. package/build/lib/driver.js.map +1 -1
  26. package/build/lib/types.d.ts +7 -9
  27. package/build/lib/types.d.ts.map +1 -1
  28. package/build/lib/uiautomator2.d.ts +1 -1
  29. package/build/tsconfig.tsbuildinfo +1 -1
  30. package/lib/commands/actions.js +10 -10
  31. package/lib/commands/alert.js +3 -3
  32. package/lib/commands/app-strings.js +3 -4
  33. package/lib/commands/element.js +19 -19
  34. package/lib/commands/general.js +17 -18
  35. package/lib/commands/gestures.js +11 -11
  36. package/lib/commands/touch.js +3 -3
  37. package/lib/constraints.ts +0 -3
  38. package/lib/driver.ts +44 -99
  39. package/lib/types.ts +7 -11
  40. package/npm-shrinkwrap.json +24 -24
  41. package/package.json +3 -3
@@ -8,7 +8,7 @@ import {mixin} from './mixins';
8
8
  */
9
9
  const ActionsMixin = {
10
10
  async pressKeyCode(keycode, metastate, flags) {
11
- await /** @type {UiAutomator2Server} */ (this.uiautomator2).jwproxy.command(
11
+ await this.uiautomator2.jwproxy.command(
12
12
  '/appium/device/press_keycode',
13
13
  'POST',
14
14
  {
@@ -20,7 +20,7 @@ const ActionsMixin = {
20
20
  },
21
21
 
22
22
  async longPressKeyCode(keycode, metastate, flags) {
23
- await /** @type {UiAutomator2Server} */ (this.uiautomator2).jwproxy.command(
23
+ await this.uiautomator2.jwproxy.command(
24
24
  '/appium/device/long_press_keycode',
25
25
  'POST',
26
26
  {
@@ -32,7 +32,7 @@ const ActionsMixin = {
32
32
  },
33
33
 
34
34
  async doSwipe(swipeOpts) {
35
- await /** @type {UiAutomator2Server} */ (this.uiautomator2).jwproxy.command(
35
+ await this.uiautomator2.jwproxy.command(
36
36
  `/touch/perform`,
37
37
  'POST',
38
38
  swipeOpts
@@ -40,7 +40,7 @@ const ActionsMixin = {
40
40
  },
41
41
 
42
42
  async doDrag(dragOpts) {
43
- await /** @type {UiAutomator2Server} */ (this.uiautomator2).jwproxy.command(
43
+ await this.uiautomator2.jwproxy.command(
44
44
  `/touch/drag`,
45
45
  'POST',
46
46
  dragOpts
@@ -49,7 +49,7 @@ const ActionsMixin = {
49
49
 
50
50
  async getOrientation() {
51
51
  return /** @type {import('@appium/types').Orientation} */ (
52
- await /** @type {UiAutomator2Server} */ (this.uiautomator2).jwproxy.command(
52
+ await this.uiautomator2.jwproxy.command(
53
53
  `/orientation`,
54
54
  'GET',
55
55
  {}
@@ -59,7 +59,7 @@ const ActionsMixin = {
59
59
 
60
60
  async setOrientation(orientation) {
61
61
  orientation = /** @type {import('@appium/types').Orientation} */ (orientation.toUpperCase());
62
- await /** @type {UiAutomator2Server} */ (this.uiautomator2).jwproxy.command(
62
+ await this.uiautomator2.jwproxy.command(
63
63
  `/orientation`,
64
64
  'POST',
65
65
  {orientation}
@@ -69,7 +69,7 @@ const ActionsMixin = {
69
69
  async mobilePressKey(opts) {
70
70
  const {keycode, metastate, flags, isLongPress = false} = opts;
71
71
 
72
- await /** @type {UiAutomator2Server} */ (this.uiautomator2).jwproxy.command(
72
+ await this.uiautomator2.jwproxy.command(
73
73
  `/appium/device/${isLongPress ? 'long_' : ''}press_keycode`,
74
74
  'POST',
75
75
  {
@@ -85,7 +85,7 @@ const ActionsMixin = {
85
85
  * @param {Record<string, any>} opts
86
86
  */
87
87
  async mobileScheduleAction(opts = {}) {
88
- return await /** @type {UiAutomator2Server} */ (this.uiautomator2).jwproxy.command(
88
+ return await this.uiautomator2.jwproxy.command(
89
89
  '/appium/schedule_action',
90
90
  'POST',
91
91
  opts
@@ -97,7 +97,7 @@ const ActionsMixin = {
97
97
  */
98
98
  async mobileGetActionHistory(opts) {
99
99
  return /** @type {import('./types').ActionResult} */ (
100
- await /** @type {UiAutomator2Server} */ (this.uiautomator2).jwproxy.command(
100
+ await this.uiautomator2.jwproxy.command(
101
101
  '/appium/action_history',
102
102
  'POST',
103
103
  opts ?? {}
@@ -109,7 +109,7 @@ const ActionsMixin = {
109
109
  * @see https://github.com/appium/appium-uiautomator2-driver/blob/master/docs/scheduled-actions.md#mobile-unscheduleaction
110
110
  */
111
111
  async mobileUnscheduleAction(opts) {
112
- return await /** @type {UiAutomator2Server} */ (this.uiautomator2).jwproxy.command(
112
+ return await this.uiautomator2.jwproxy.command(
113
113
  '/appium/unschedule_action',
114
114
  'POST',
115
115
  opts ?? {}
@@ -9,7 +9,7 @@ import {mixin} from './mixins';
9
9
  const AlertMixin = {
10
10
  async getAlertText() {
11
11
  return String(
12
- await /** @type {UiAutomator2Server} */ (this.uiautomator2).jwproxy.command(
12
+ await this.uiautomator2.jwproxy.command(
13
13
  '/alert/text',
14
14
  'GET',
15
15
  {}
@@ -17,7 +17,7 @@ const AlertMixin = {
17
17
  );
18
18
  },
19
19
  async mobileAcceptAlert(opts = {}) {
20
- await /** @type {UiAutomator2Server} */ (this.uiautomator2).jwproxy.command(
20
+ await this.uiautomator2.jwproxy.command(
21
21
  '/alert/accept',
22
22
  'POST',
23
23
  opts
@@ -27,7 +27,7 @@ const AlertMixin = {
27
27
  await this.mobileAcceptAlert();
28
28
  },
29
29
  async mobileDismissAlert(opts = {}) {
30
- await /** @type {UiAutomator2Server} */ (this.uiautomator2).jwproxy.command(
30
+ await this.uiautomator2.jwproxy.command(
31
31
  '/alert/dismiss',
32
32
  'POST',
33
33
  opts
@@ -10,9 +10,8 @@ import {fs, tempDir} from 'appium/support';
10
10
  */
11
11
  const AppStringsMixin = {
12
12
  async getStrings(language) {
13
- const adb = /** @type {ADB} */ (this.adb);
14
13
  if (!language) {
15
- language = await adb.getDeviceLanguage();
14
+ language = await this.adb.getDeviceLanguage();
16
15
  this.log.info(`No language specified, returning strings for: ${language}`);
17
16
  }
18
17
 
@@ -45,7 +44,7 @@ const AppStringsMixin = {
45
44
  try {
46
45
  if (!app) {
47
46
  try {
48
- app = await adb.pullApk(/** @type {string} */ (this.opts.appPackage), tmpRoot);
47
+ app = await this.adb.pullApk(/** @type {string} */ (this.opts.appPackage), tmpRoot);
49
48
  } catch (err) {
50
49
  this.log.errorAndThrow(
51
50
  `Failed to pull an apk from '${this.opts.appPackage}'. Original error: ${
@@ -62,7 +61,7 @@ const AppStringsMixin = {
62
61
  }
63
62
 
64
63
  try {
65
- const {apkStrings} = await adb.extractStringsFromApk(app, language, tmpRoot);
64
+ const {apkStrings} = await this.adb.extractStringsFromApk(app, language, tmpRoot);
66
65
  this.apkStrings[language] = apkStrings;
67
66
  return preprocessStringsMap(apkStrings);
68
67
  } catch (err) {
@@ -22,7 +22,7 @@ function toBool(s) {
22
22
  const ElementMixin = {
23
23
  async active() {
24
24
  return /** @type {import('@appium/types').Element} */ (
25
- await /** @type {UiAutomator2Server} */ (this.uiautomator2).jwproxy.command(
25
+ await this.uiautomator2.jwproxy.command(
26
26
  '/element/active',
27
27
  'GET'
28
28
  )
@@ -30,7 +30,7 @@ const ElementMixin = {
30
30
  },
31
31
  async getAttribute(attribute, elementId) {
32
32
  return String(
33
- await /** @type {UiAutomator2Server} */ (this.uiautomator2).jwproxy.command(
33
+ await this.uiautomator2.jwproxy.command(
34
34
  `/element/${elementId}/attribute/${attribute}`,
35
35
  'GET',
36
36
  {}
@@ -48,7 +48,7 @@ const ElementMixin = {
48
48
  },
49
49
  async getName(elementId) {
50
50
  return /** @type {string} */ (
51
- await /** @type {UiAutomator2Server} */ (this.uiautomator2).jwproxy.command(
51
+ await this.uiautomator2.jwproxy.command(
52
52
  `/element/${elementId}/name`,
53
53
  'GET',
54
54
  {}
@@ -57,7 +57,7 @@ const ElementMixin = {
57
57
  },
58
58
  async getLocation(elementId) {
59
59
  return /** @type {import('@appium/types').Position} */ (
60
- await /** @type {UiAutomator2Server} */ (this.uiautomator2).jwproxy.command(
60
+ await this.uiautomator2.jwproxy.command(
61
61
  `/element/${elementId}/location`,
62
62
  'GET',
63
63
  {}
@@ -66,7 +66,7 @@ const ElementMixin = {
66
66
  },
67
67
  async getSize(elementId) {
68
68
  return /** @type {import('@appium/types').Size} */ (
69
- await /** @type {UiAutomator2Server} */ (this.uiautomator2).jwproxy.command(
69
+ await this.uiautomator2.jwproxy.command(
70
70
  `/element/${elementId}/size`,
71
71
  'GET',
72
72
  {}
@@ -75,7 +75,7 @@ const ElementMixin = {
75
75
  },
76
76
  async touchLongClick(element, x, y, duration) {
77
77
  let params = {element, x, y, duration};
78
- await /** @type {UiAutomator2Server} */ (this.uiautomator2).jwproxy.command(
78
+ await this.uiautomator2.jwproxy.command(
79
79
  `/touch/longclick`,
80
80
  'POST',
81
81
  {params}
@@ -83,7 +83,7 @@ const ElementMixin = {
83
83
  },
84
84
  async touchDown(element, x, y) {
85
85
  let params = {element, x, y};
86
- await /** @type {UiAutomator2Server} */ (this.uiautomator2).jwproxy.command(
86
+ await this.uiautomator2.jwproxy.command(
87
87
  `/touch/down`,
88
88
  'POST',
89
89
  {params}
@@ -91,7 +91,7 @@ const ElementMixin = {
91
91
  },
92
92
  async touchUp(element, x, y) {
93
93
  let params = {element, x, y};
94
- await /** @type {UiAutomator2Server} */ (this.uiautomator2).jwproxy.command(
94
+ await this.uiautomator2.jwproxy.command(
95
95
  `/touch/up`,
96
96
  'POST',
97
97
  {params}
@@ -99,21 +99,21 @@ const ElementMixin = {
99
99
  },
100
100
  async touchMove(element, x, y) {
101
101
  let params = {element, x, y};
102
- await /** @type {UiAutomator2Server} */ (this.uiautomator2).jwproxy.command(
102
+ await this.uiautomator2.jwproxy.command(
103
103
  `/touch/move`,
104
104
  'POST',
105
105
  {params}
106
106
  );
107
107
  },
108
108
  async doSetElementValue(params) {
109
- await /** @type {UiAutomator2Server} */ (this.uiautomator2).jwproxy.command(
109
+ await this.uiautomator2.jwproxy.command(
110
110
  `/element/${params.elementId}/value`,
111
111
  'POST',
112
112
  params
113
113
  );
114
114
  },
115
115
  async setValueImmediate(keys, elementId) {
116
- await /** @type {UiAutomator2Server} */ (this.uiautomator2).jwproxy.command(
116
+ await this.uiautomator2.jwproxy.command(
117
117
  `/element/${elementId}/value`,
118
118
  'POST',
119
119
  {
@@ -125,7 +125,7 @@ const ElementMixin = {
125
125
  },
126
126
  async getText(elementId) {
127
127
  return String(
128
- await /** @type {UiAutomator2Server} */ (this.uiautomator2).jwproxy.command(
128
+ await this.uiautomator2.jwproxy.command(
129
129
  `/element/${elementId}/text`,
130
130
  'GET',
131
131
  {}
@@ -133,7 +133,7 @@ const ElementMixin = {
133
133
  );
134
134
  },
135
135
  async click(element) {
136
- await /** @type {UiAutomator2Server} */ (this.uiautomator2).jwproxy.command(
136
+ await this.uiautomator2.jwproxy.command(
137
137
  `/element/${element}/click`,
138
138
  'POST',
139
139
  {element}
@@ -141,7 +141,7 @@ const ElementMixin = {
141
141
  },
142
142
  async getElementScreenshot(element) {
143
143
  return String(
144
- await /** @type {UiAutomator2Server} */ (this.uiautomator2).jwproxy.command(
144
+ await this.uiautomator2.jwproxy.command(
145
145
  `/element/${element}/screenshot`,
146
146
  'GET',
147
147
  {}
@@ -159,12 +159,12 @@ const ElementMixin = {
159
159
  if (util.hasValue(elementId) && !areCoordinatesDefined) {
160
160
  // we are either tapping on the default location of the element
161
161
  // or an offset from the top left corner
162
- await /** @type {UiAutomator2Server} */ (this.uiautomator2).jwproxy.command(
162
+ await this.uiautomator2.jwproxy.command(
163
163
  `/element/${elementId}/click`,
164
164
  'POST'
165
165
  );
166
166
  } else {
167
- await /** @type {UiAutomator2Server} */ (this.uiautomator2).jwproxy.command(
167
+ await this.uiautomator2.jwproxy.command(
168
168
  `/appium/tap`,
169
169
  'POST',
170
170
  {
@@ -178,7 +178,7 @@ const ElementMixin = {
178
178
  },
179
179
 
180
180
  async clear(elementId) {
181
- await /** @type {UiAutomator2Server} */ (this.uiautomator2).jwproxy.command(
181
+ await this.uiautomator2.jwproxy.command(
182
182
  `/element/${elementId}/clear`,
183
183
  'POST',
184
184
  {
@@ -208,7 +208,7 @@ const ElementMixin = {
208
208
  );
209
209
  }
210
210
  return /** @type {import('@appium/types').Rect} */ (
211
- await /** @type {UiAutomator2Server} */ (this.uiautomator2).jwproxy.command(
211
+ await this.uiautomator2.jwproxy.command(
212
212
  `/element/${elementId}/rect`,
213
213
  'GET'
214
214
  )
@@ -223,7 +223,7 @@ const ElementMixin = {
223
223
  */
224
224
  async mobileReplaceElementValue(opts) {
225
225
  const {elementId, text} = requireArgs(['elementId', 'text'], opts);
226
- await /** @type {UiAutomator2Server} */ (this.uiautomator2).jwproxy.command(
226
+ await this.uiautomator2.jwproxy.command(
227
227
  `/element/${elementId}/value`,
228
228
  'POST',
229
229
  {
@@ -55,7 +55,7 @@ function toExecuteMethodName(script) {
55
55
  const GeneralMixin = {
56
56
  async getPageSource() {
57
57
  return String(
58
- await /** @type {UiAutomator2Server} */ (this.uiautomator2).jwproxy.command(
58
+ await this.uiautomator2.jwproxy.command(
59
59
  '/source',
60
60
  'GET',
61
61
  {}
@@ -64,20 +64,19 @@ const GeneralMixin = {
64
64
  },
65
65
 
66
66
  async getClipboard() {
67
- const adb = /** @type {ADB} */ (this.adb);
68
67
  return String(
69
- (await adb.getApiLevel()) < 29
70
- ? await /** @type {UiAutomator2Server} */ (this.uiautomator2).jwproxy.command(
68
+ (await this.adb.getApiLevel()) < 29
69
+ ? await this.uiautomator2.jwproxy.command(
71
70
  '/appium/device/get_clipboard',
72
71
  'POST',
73
72
  {}
74
73
  )
75
- : await adb.getClipboard()
74
+ : await this.adb.getClipboard()
76
75
  );
77
76
  },
78
77
 
79
78
  async doSendKeys(params) {
80
- await /** @type {UiAutomator2Server} */ (this.uiautomator2).jwproxy.command(
79
+ await this.uiautomator2.jwproxy.command(
81
80
  '/keys',
82
81
  'POST',
83
82
  params
@@ -86,16 +85,16 @@ const GeneralMixin = {
86
85
 
87
86
  async keyevent(keycode, metastate) {
88
87
  this.log.debug(`Ignoring metastate ${metastate}`);
89
- await /** @type {ADB} */ (this.adb).keyevent(keycode);
88
+ await this.adb.keyevent(keycode);
90
89
  },
91
90
 
92
91
  async back() {
93
- await /** @type {ADB} */ (this.adb).keyevent(4);
92
+ await this.adb.keyevent(4);
94
93
  },
95
94
 
96
95
  async getDisplayDensity() {
97
96
  return /** @type {number} */ (
98
- await /** @type {UiAutomator2Server} */ (this.uiautomator2).jwproxy.command(
97
+ await this.uiautomator2.jwproxy.command(
99
98
  '/appium/device/display_density',
100
99
  'GET',
101
100
  {}
@@ -105,7 +104,7 @@ const GeneralMixin = {
105
104
 
106
105
  async getWindowSize() {
107
106
  return /** @type {import('@appium/types').Size} */ (
108
- await /** @type {UiAutomator2Server} */ (this.uiautomator2).jwproxy.command(
107
+ await this.uiautomator2.jwproxy.command(
109
108
  '/window/current/size',
110
109
  'GET',
111
110
  {}
@@ -191,7 +190,7 @@ const GeneralMixin = {
191
190
  },
192
191
 
193
192
  async setUrl(url) {
194
- await /** @type {ADB} */ (this.adb).startUri(url, /** @type {string} */ (this.opts.appPackage));
193
+ await this.adb.startUri(url, /** @type {string} */ (this.opts.appPackage));
195
194
  },
196
195
 
197
196
  /**
@@ -199,11 +198,11 @@ const GeneralMixin = {
199
198
  */
200
199
  async mobileDeepLink(opts) {
201
200
  const {url, package: pkg, waitForLaunch} = opts;
202
- return await /** @type {ADB} */ (this.adb).startUri(url, pkg, {waitForLaunch});
201
+ return await this.adb.startUri(url, pkg, {waitForLaunch});
203
202
  },
204
203
 
205
204
  async openNotifications() {
206
- await /** @type {UiAutomator2Server} */ (this.uiautomator2).jwproxy.command(
205
+ await this.uiautomator2.jwproxy.command(
207
206
  '/appium/device/open_notifications',
208
207
  'POST',
209
208
  {}
@@ -213,11 +212,11 @@ const GeneralMixin = {
213
212
  // Stop proxying to any Chromedriver and redirect to uiautomator2
214
213
  suspendChromedriverProxy() {
215
214
  this.chromedriver = undefined;
216
- this.proxyReqRes = /** @type {UiAutomator2Server} */ (this.uiautomator2).proxyReqRes.bind(
215
+ this.proxyReqRes = this.uiautomator2.proxyReqRes.bind(
217
216
  this.uiautomator2
218
217
  );
219
218
  this.proxyCommand = /** @type {typeof this.proxyCommand} */ (
220
- /** @type {UiAutomator2Server} */ (this.uiautomator2).proxyCommand.bind(this.uiautomator2)
219
+ this.uiautomator2.proxyCommand.bind(this.uiautomator2)
221
220
  );
222
221
  this.jwpProxyActive = true;
223
222
  },
@@ -228,7 +227,7 @@ const GeneralMixin = {
228
227
  */
229
228
  async mobileGetDeviceInfo() {
230
229
  return /** @type {StringRecord} */ (
231
- await /** @type {UiAutomator2Server} */ (this.uiautomator2).jwproxy.command(
230
+ await this.uiautomator2.jwproxy.command(
232
231
  '/appium/device/info',
233
232
  'GET'
234
233
  )
@@ -249,7 +248,7 @@ const GeneralMixin = {
249
248
  this.log.errorAndThrow(`The 'text' argument is mandatory`);
250
249
  throw new Error(); // unreachable
251
250
  }
252
- return await /** @type {ADB} */ (this.adb).typeUnicode(String(text));
251
+ return await this.adb.typeUnicode(String(text));
253
252
  },
254
253
 
255
254
  /**
@@ -264,7 +263,7 @@ const GeneralMixin = {
264
263
  const apks = await B.all(
265
264
  opts.apks.map((app) => this.helpers.configureApp(app, [APK_EXTENSION]))
266
265
  );
267
- await /** @type {ADB} */ (this.adb).installMultipleApks(apks, opts.options);
266
+ await this.adb.installMultipleApks(apks, opts.options);
268
267
  },
269
268
 
270
269
  /**
@@ -49,7 +49,7 @@ const GesturesMixin = {
49
49
  */
50
50
  async mobileClickGesture(opts = {}) {
51
51
  const {elementId, x, y} = opts;
52
- await /** @type {UiAutomator2Server} */ (this.uiautomator2).jwproxy.command(
52
+ await this.uiautomator2.jwproxy.command(
53
53
  '/appium/gestures/click',
54
54
  'POST',
55
55
  {
@@ -66,7 +66,7 @@ const GesturesMixin = {
66
66
  */
67
67
  async mobileLongClickGesture(opts = {}) {
68
68
  const {elementId, x, y, duration} = opts;
69
- await /** @type {UiAutomator2Server} */ (this.uiautomator2).jwproxy.command(
69
+ await this.uiautomator2.jwproxy.command(
70
70
  '/appium/gestures/long_click',
71
71
  'POST',
72
72
  {
@@ -84,7 +84,7 @@ const GesturesMixin = {
84
84
  */
85
85
  async mobileDoubleClickGesture(opts = {}) {
86
86
  const {elementId, x, y} = opts;
87
- await /** @type {UiAutomator2Server} */ (this.uiautomator2).jwproxy.command(
87
+ await this.uiautomator2.jwproxy.command(
88
88
  '/appium/gestures/double_click',
89
89
  'POST',
90
90
  {
@@ -101,7 +101,7 @@ const GesturesMixin = {
101
101
  */
102
102
  async mobileDragGesture(opts) {
103
103
  const {elementId, startX, startY, endX, endY, speed} = opts;
104
- await /** @type {UiAutomator2Server} */ (this.uiautomator2).jwproxy.command(
104
+ await this.uiautomator2.jwproxy.command(
105
105
  '/appium/gestures/drag',
106
106
  'POST',
107
107
  {
@@ -122,7 +122,7 @@ const GesturesMixin = {
122
122
  async mobileFlingGesture(opts) {
123
123
  const {elementId, left, top, width, height, direction, speed} = opts;
124
124
  return /** @type {boolean} */ (
125
- await /** @type {UiAutomator2Server} */ (this.uiautomator2).jwproxy.command(
125
+ await this.uiautomator2.jwproxy.command(
126
126
  '/appium/gestures/fling',
127
127
  'POST',
128
128
  {
@@ -142,7 +142,7 @@ const GesturesMixin = {
142
142
  */
143
143
  async mobilePinchCloseGesture(opts) {
144
144
  const {elementId, left, top, width, height, percent, speed} = opts;
145
- await /** @type {UiAutomator2Server} */ (this.uiautomator2).jwproxy.command(
145
+ await this.uiautomator2.jwproxy.command(
146
146
  '/appium/gestures/pinch_close',
147
147
  'POST',
148
148
  {
@@ -161,7 +161,7 @@ const GesturesMixin = {
161
161
  */
162
162
  async mobilePinchOpenGesture(opts) {
163
163
  const {elementId, left, top, width, height, percent, speed} = opts;
164
- await /** @type {UiAutomator2Server} */ (this.uiautomator2).jwproxy.command(
164
+ await this.uiautomator2.jwproxy.command(
165
165
  '/appium/gestures/pinch_open',
166
166
  'POST',
167
167
  {
@@ -180,7 +180,7 @@ const GesturesMixin = {
180
180
  */
181
181
  async mobileSwipeGesture(opts) {
182
182
  const {elementId, left, top, width, height, direction, percent, speed} = opts;
183
- await /** @type {UiAutomator2Server} */ (this.uiautomator2).jwproxy.command(
183
+ await this.uiautomator2.jwproxy.command(
184
184
  '/appium/gestures/swipe',
185
185
  'POST',
186
186
  {
@@ -202,7 +202,7 @@ const GesturesMixin = {
202
202
  async mobileScrollGesture(opts) {
203
203
  const {elementId, left, top, width, height, direction, percent, speed} = opts;
204
204
  return /** @type {boolean} */ (
205
- await /** @type {UiAutomator2Server} */ (this.uiautomator2).jwproxy.command(
205
+ await this.uiautomator2.jwproxy.command(
206
206
  '/appium/gestures/scroll',
207
207
  'POST',
208
208
  {
@@ -233,7 +233,7 @@ const GesturesMixin = {
233
233
  `Both elementId and elementToId arguments must be provided`
234
234
  );
235
235
  }
236
- await /** @type {UiAutomator2Server} */ (this.uiautomator2).jwproxy.command(
236
+ await this.uiautomator2.jwproxy.command(
237
237
  `/appium/element/${util.unwrapElement(elementId)}/scroll_to/${util.unwrapElement(
238
238
  elementToId
239
239
  )}`,
@@ -265,7 +265,7 @@ const GesturesMixin = {
265
265
  `Both strategy and selector arguments must be provided`
266
266
  );
267
267
  }
268
- await /** @type {UiAutomator2Server} */ (this.uiautomator2).jwproxy.command(
268
+ await this.uiautomator2.jwproxy.command(
269
269
  '/touch/scroll',
270
270
  'POST',
271
271
  {
@@ -15,7 +15,7 @@ const TouchMixin = {
15
15
  actions: states,
16
16
  };
17
17
 
18
- await /** @type {UiAutomator2Server} */ (this.uiautomator2).jwproxy.command(
18
+ await this.uiautomator2.jwproxy.command(
19
19
  '/touch/multi/perform',
20
20
  'POST',
21
21
  opts
@@ -24,7 +24,7 @@ const TouchMixin = {
24
24
  opts = {
25
25
  actions: states,
26
26
  };
27
- await /** @type {UiAutomator2Server} */ (this.uiautomator2).jwproxy.command(
27
+ await this.uiautomator2.jwproxy.command(
28
28
  '/touch/multi/perform',
29
29
  'POST',
30
30
  opts
@@ -49,7 +49,7 @@ const TouchMixin = {
49
49
  )
50
50
  );
51
51
  this.log.debug(`Preprocessed actions: ${JSON.stringify(preprocessedActions, null, ' ')}`);
52
- await /** @type {UiAutomator2Server} */ (this.uiautomator2).jwproxy.command(
52
+ await this.uiautomator2.jwproxy.command(
53
53
  '/actions',
54
54
  'POST',
55
55
  {
@@ -26,9 +26,6 @@ const UIAUTOMATOR2_CONSTRAINTS = {
26
26
  skipServerInstallation: {
27
27
  isBoolean: true,
28
28
  },
29
- androidCoverageEndIntent: {
30
- isString: true,
31
- },
32
29
  disableSuppressAccessibilityService: {
33
30
  isBoolean: true,
34
31
  },