appium-android-driver 6.0.1 → 7.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 (88) hide show
  1. package/CHANGELOG.md +11 -0
  2. package/README.md +3 -105
  3. package/build/lib/commands/actions.d.ts +0 -1
  4. package/build/lib/commands/actions.d.ts.map +1 -1
  5. package/build/lib/commands/actions.js +14 -139
  6. package/build/lib/commands/actions.js.map +1 -1
  7. package/build/lib/commands/context.d.ts.map +1 -1
  8. package/build/lib/commands/context.js +0 -1
  9. package/build/lib/commands/context.js.map +1 -1
  10. package/build/lib/commands/element.d.ts +0 -1
  11. package/build/lib/commands/element.d.ts.map +1 -1
  12. package/build/lib/commands/element.js +14 -48
  13. package/build/lib/commands/element.js.map +1 -1
  14. package/build/lib/commands/execute.d.ts.map +1 -1
  15. package/build/lib/commands/execute.js +0 -1
  16. package/build/lib/commands/execute.js.map +1 -1
  17. package/build/lib/commands/find.d.ts.map +1 -1
  18. package/build/lib/commands/find.js +1 -1
  19. package/build/lib/commands/find.js.map +1 -1
  20. package/build/lib/commands/general.d.ts +0 -1
  21. package/build/lib/commands/general.d.ts.map +1 -1
  22. package/build/lib/commands/general.js +6 -11
  23. package/build/lib/commands/general.js.map +1 -1
  24. package/build/lib/commands/index.d.ts +23 -23
  25. package/build/lib/commands/mixins.d.ts +2 -6
  26. package/build/lib/commands/mixins.d.ts.map +1 -1
  27. package/build/lib/commands/mixins.js.map +1 -1
  28. package/build/lib/commands/network.d.ts.map +1 -1
  29. package/build/lib/commands/network.js +27 -55
  30. package/build/lib/commands/network.js.map +1 -1
  31. package/build/lib/commands/performance.d.ts +4 -4
  32. package/build/lib/commands/performance.d.ts.map +1 -1
  33. package/build/lib/commands/performance.js +0 -4
  34. package/build/lib/commands/performance.js.map +1 -1
  35. package/build/lib/commands/touch.d.ts +0 -1
  36. package/build/lib/commands/touch.d.ts.map +1 -1
  37. package/build/lib/commands/touch.js +1 -15
  38. package/build/lib/commands/touch.js.map +1 -1
  39. package/build/lib/constraints.d.ts +0 -9
  40. package/build/lib/constraints.d.ts.map +1 -1
  41. package/build/lib/constraints.js +0 -9
  42. package/build/lib/constraints.js.map +1 -1
  43. package/build/lib/driver.d.ts +2 -50
  44. package/build/lib/driver.d.ts.map +1 -1
  45. package/build/lib/driver.js +1 -476
  46. package/build/lib/driver.js.map +1 -1
  47. package/build/lib/helpers/android.d.ts +0 -2
  48. package/build/lib/helpers/android.d.ts.map +1 -1
  49. package/build/lib/helpers/android.js +0 -2
  50. package/build/lib/helpers/android.js.map +1 -1
  51. package/build/lib/helpers/webview.js.map +1 -1
  52. package/build/lib/stubs.d.ts +0 -1
  53. package/build/lib/stubs.d.ts.map +1 -1
  54. package/build/lib/stubs.js +0 -1
  55. package/build/lib/stubs.js.map +1 -1
  56. package/build/lib/utils.d.ts +3 -4
  57. package/build/lib/utils.d.ts.map +1 -1
  58. package/build/lib/utils.js +3 -4
  59. package/build/lib/utils.js.map +1 -1
  60. package/lib/commands/actions.js +15 -163
  61. package/lib/commands/context.js +0 -1
  62. package/lib/commands/element.js +14 -68
  63. package/lib/commands/execute.js +0 -1
  64. package/lib/commands/find.ts +1 -2
  65. package/lib/commands/general.js +6 -11
  66. package/lib/commands/mixins.ts +0 -6
  67. package/lib/commands/network.js +28 -61
  68. package/lib/commands/performance.js +0 -4
  69. package/lib/commands/touch.js +1 -20
  70. package/lib/constraints.ts +0 -9
  71. package/lib/driver.ts +7 -595
  72. package/lib/helpers/android.ts +0 -4
  73. package/lib/helpers/webview.ts +1 -1
  74. package/lib/stubs.ts +0 -1
  75. package/lib/utils.js +4 -5
  76. package/package.json +1 -4
  77. package/bootstrap/README.md +0 -19
  78. package/bootstrap/bin/AppiumBootstrap.jar +0 -0
  79. package/build/lib/bootstrap.d.ts +0 -29
  80. package/build/lib/bootstrap.d.ts.map +0 -1
  81. package/build/lib/bootstrap.js +0 -213
  82. package/build/lib/bootstrap.js.map +0 -1
  83. package/build/lib/uiautomator.d.ts +0 -24
  84. package/build/lib/uiautomator.d.ts.map +0 -1
  85. package/build/lib/uiautomator.js +0 -102
  86. package/build/lib/uiautomator.js.map +0 -1
  87. package/lib/bootstrap.js +0 -227
  88. package/lib/uiautomator.js +0 -109
@@ -5,36 +5,11 @@ var __importDefault = (this && this.__importDefault) || function (mod) {
5
5
  };
6
6
  Object.defineProperty(exports, "__esModule", { value: true });
7
7
  exports.AndroidDriver = exports.androidCommands = void 0;
8
- const support_1 = require("@appium/support");
9
- const appium_adb_1 = require("appium-adb");
10
- const driver_1 = require("appium/driver");
11
- const asyncbox_1 = require("asyncbox");
12
- const bluebird_1 = __importDefault(require("bluebird"));
13
8
  const lodash_1 = __importDefault(require("lodash"));
14
- const shared_preferences_builder_1 = require("shared-preferences-builder");
9
+ const driver_1 = require("appium/driver");
15
10
  const constraints_1 = __importDefault(require("./constraints"));
16
11
  const helpers_1 = require("./helpers");
17
12
  const method_map_1 = require("./method-map");
18
- const APP_EXTENSION = '.apk';
19
- const DEVICE_PORT = 4724;
20
- /**
21
- * This is a set of methods and paths that we never want to proxy to
22
- * Chromedriver
23
- **/
24
- const NO_PROXY = [
25
- ['POST', new RegExp('^/session/[^/]+/context')],
26
- ['GET', new RegExp('^/session/[^/]+/context')],
27
- ['POST', new RegExp('^/session/[^/]+/appium')],
28
- ['GET', new RegExp('^/session/[^/]+/appium')],
29
- ['POST', new RegExp('^/session/[^/]+/touch/perform')],
30
- ['POST', new RegExp('^/session/[^/]+/touch/multi/perform')],
31
- ['POST', new RegExp('^/session/[^/]+/orientation')],
32
- ['GET', new RegExp('^/session/[^/]+/orientation')],
33
- ['POST', new RegExp('^/session/[^/]+/execute')],
34
- ['POST', new RegExp('^/session/[^/]+/execute/sync')],
35
- ['GET', new RegExp('^/session/[^/]+/network_connection')],
36
- ['POST', new RegExp('^/session/[^/]+/network_connection')],
37
- ];
38
13
  class AndroidDriver extends driver_1.BaseDriver {
39
14
  constructor(opts = {}, shouldValidateCaps = true) {
40
15
  super(opts, shouldValidateCaps);
@@ -48,467 +23,17 @@ class AndroidDriver extends driver_1.BaseDriver {
48
23
  this.desiredCapConstraints = lodash_1.default.cloneDeep(constraints_1.default);
49
24
  this.sessionChromedrivers = {};
50
25
  this.jwpProxyActive = false;
51
- this.jwpProxyAvoid = lodash_1.default.clone(NO_PROXY);
52
- this.settings = new driver_1.DeviceSettings({ ignoreUnimportantViews: false }, this.onSettingsUpdate.bind(this));
53
26
  this.apkStrings = {};
54
27
  this.unlocker = helpers_1.helpers.unlocker;
55
28
  this.curContext = this.defaultContextName();
56
29
  this.opts = opts;
57
30
  }
58
- async createSession(w3cCaps1, w3cCaps2, w3cCaps3, driverData) {
59
- // the whole createSession flow is surrounded in a try-catch statement
60
- // if creating a session fails at any point, we teardown everything we
61
- // set up before throwing the error.
62
- try {
63
- const [sessionId, caps] = (await super.createSession(w3cCaps1, w3cCaps2, w3cCaps3, driverData));
64
- const serverDetails = {
65
- platform: 'LINUX',
66
- webStorageEnabled: false,
67
- takesScreenshot: true,
68
- javascriptEnabled: true,
69
- databaseEnabled: false,
70
- networkConnectionEnabled: true,
71
- locationContextEnabled: false,
72
- warnings: {},
73
- desired: this.caps,
74
- };
75
- this.caps = Object.assign(serverDetails, this.caps);
76
- // assigning defaults
77
- const defaultOpts = {
78
- action: 'android.intent.action.MAIN',
79
- category: 'android.intent.category.LAUNCHER',
80
- flags: '0x10200000',
81
- disableAndroidWatchers: false,
82
- tmpDir: await support_1.tempDir.staticDir(),
83
- fullReset: false,
84
- autoLaunch: true,
85
- adbPort: appium_adb_1.DEFAULT_ADB_PORT,
86
- bootstrapPort: DEVICE_PORT,
87
- androidInstallTimeout: 90000,
88
- };
89
- this.opts = { ...defaultOpts, ...this.opts };
90
- this.useUnlockHelperApp = lodash_1.default.isUndefined(this.caps.unlockType);
91
- if (this.isChromeSession) {
92
- helpers_1.helpers.adjustBrowserSessionCaps(this.opts);
93
- }
94
- if (this.opts.nativeWebScreenshot) {
95
- this.jwpProxyAvoid.push(['GET', new RegExp('^/session/[^/]+/screenshot')]);
96
- }
97
- // @ts-expect-error do not put arbitrary properties on opts
98
- if (this.opts.reboot) {
99
- this.setAvdFromCapabilities(caps);
100
- }
101
- // get device udid for this session
102
- const { udid, emPort } = await helpers_1.helpers.getDeviceInfoFromCaps(this.opts);
103
- this.opts.udid = udid;
104
- // @ts-expect-error do not put arbitrary properties on opts
105
- this.opts.emPort = emPort;
106
- // set up an instance of ADB
107
- this.adb = await helpers_1.helpers.createADB({
108
- udid: this.opts.udid,
109
- // @ts-expect-error: unknown
110
- emPort: this.opts.emPort,
111
- adbPort: this.opts.adbPort,
112
- suppressKillServer: this.opts.suppressKillServer,
113
- remoteAdbHost: this.opts.remoteAdbHost,
114
- clearDeviceLogsOnStart: this.opts.clearDeviceLogsOnStart,
115
- adbExecTimeout: this.opts.adbExecTimeout,
116
- allowOfflineDevices: this.opts.allowOfflineDevices,
117
- });
118
- if ((await this.adb.getApiLevel()) >= 23) {
119
- this.log.warn("Consider setting 'automationName' capability to " +
120
- "'uiautomator2' on Android >= 6, since UIAutomator framework " +
121
- 'is not maintained anymore by the OS vendor.');
122
- }
123
- // @ts-expect-error no arbitrary props on opts
124
- if (this.helpers.isPackageOrBundle(this.opts.app)) {
125
- // user provided package instead of app for 'app' capability, massage options
126
- this.opts.appPackage = this.opts.app;
127
- // @ts-expect-error no arbitrary props on opts
128
- this.opts.app = null;
129
- }
130
- if (this.opts.app) {
131
- // find and copy, or download and unzip an app url or path
132
- this.opts.app = await this.helpers.configureApp(this.opts.app, APP_EXTENSION);
133
- await this.checkAppPresent();
134
- }
135
- else if (this.appOnDevice) {
136
- // the app isn't an actual app file but rather something we want to
137
- // assume is on the device and just launch via the appPackage
138
- this.log.info(`App file was not listed, instead we're going to run ` +
139
- `${this.opts.appPackage} directly on the device`);
140
- await this.checkPackagePresent();
141
- }
142
- // Some cloud services using appium launch the avd themselves, so we ensure netspeed
143
- // is set for emulators by calling adb.networkSpeed before running the app
144
- if (support_1.util.hasValue(this.opts.networkSpeed)) {
145
- if (!this.isEmulator()) {
146
- this.log.warn('Sorry, networkSpeed capability is only available for emulators');
147
- }
148
- else {
149
- const networkSpeed = (0, helpers_1.ensureNetworkSpeed)(this.adb, this.opts.networkSpeed);
150
- await this.adb.networkSpeed(networkSpeed);
151
- }
152
- }
153
- // check if we have to enable/disable gps before running the application
154
- if (support_1.util.hasValue(this.opts.gpsEnabled)) {
155
- if (this.isEmulator()) {
156
- this.log.info(`Trying to ${this.opts.gpsEnabled ? 'enable' : 'disable'} gps location provider`);
157
- await this.adb.toggleGPSLocationProvider(this.opts.gpsEnabled);
158
- }
159
- else {
160
- this.log.warn('Sorry! gpsEnabled capability is only available for emulators');
161
- }
162
- }
163
- await this.startAndroidSession(this.opts);
164
- return [sessionId, this.caps];
165
- }
166
- catch (e) {
167
- // ignoring delete session exception if any and throw the real error
168
- // that happened while creating the session.
169
- try {
170
- await this.deleteSession();
171
- }
172
- catch (ign) { }
173
- throw e;
174
- }
175
- }
176
31
  isEmulator() {
177
32
  return helpers_1.helpers.isEmulator(this.adb, this.opts);
178
33
  }
179
- setAvdFromCapabilities(caps) {
180
- if (this.opts.avd) {
181
- this.log.info('avd name defined, ignoring device name and platform version');
182
- }
183
- else {
184
- if (!caps.deviceName) {
185
- this.log.errorAndThrow('avd or deviceName should be specified when reboot option is enables');
186
- throw new Error(); // unreachable
187
- }
188
- if (!caps.platformVersion) {
189
- this.log.errorAndThrow('avd or platformVersion should be specified when reboot option is enabled');
190
- throw new Error(); // unreachable
191
- }
192
- const avdDevice = caps.deviceName.replace(/[^a-zA-Z0-9_.]/g, '-');
193
- this.opts.avd = `${avdDevice}__${caps.platformVersion}`;
194
- }
195
- }
196
- get appOnDevice() {
197
- return (
198
- // @ts-expect-error no arbitrary props on opts
199
- this.helpers.isPackageOrBundle(this.opts.app) ||
200
- // @ts-expect-error no arbitrary props on opts
201
- (!this.opts.app && this.helpers.isPackageOrBundle(this.opts.appPackage)));
202
- }
203
34
  get isChromeSession() {
204
35
  return helpers_1.helpers.isChromeBrowser(String(this.opts.browserName));
205
36
  }
206
- async onSettingsUpdate(key, value) {
207
- if (key === 'ignoreUnimportantViews') {
208
- await this.setCompressedLayoutHierarchy(value);
209
- }
210
- }
211
- // eslint-disable-next-line @typescript-eslint/no-unused-vars
212
- async startAndroidSession(opts) {
213
- this.log.info(`Starting Android session`);
214
- // set up the device to run on (real or emulator, etc)
215
- this.defaultIME = (await helpers_1.helpers.initDevice(this.adb, this.opts));
216
- // set actual device name, udid, platform version, screen size, model and manufacturer details.
217
- this.caps.deviceName = this.adb.curDeviceId;
218
- // @ts-expect-error do not put arbitrary properties on caps
219
- this.caps.deviceUDID = this.opts.udid;
220
- this.caps.platformVersion = await this.adb.getPlatformVersion();
221
- // @ts-expect-error do not put arbitrary properties on caps
222
- this.caps.deviceScreenSize = await this.adb.getScreenSize();
223
- // @ts-expect-error do not put arbitrary properties on caps
224
- this.caps.deviceModel = await this.adb.getModel();
225
- // @ts-expect-error do not put arbitrary properties on caps
226
- this.caps.deviceManufacturer = await this.adb.getManufacturer();
227
- if (this.opts.disableWindowAnimation) {
228
- if (await this.adb.isAnimationOn()) {
229
- if ((await this.adb.getApiLevel()) >= 28) {
230
- // API level 28 is Android P
231
- // Don't forget to reset the relaxing in delete session
232
- this.log.warn('Relaxing hidden api policy to manage animation scale');
233
- await this.adb.setHiddenApiPolicy('1', !!this.opts.ignoreHiddenApiPolicyError);
234
- }
235
- this.log.info('Disabling window animation as it is requested by "disableWindowAnimation" capability');
236
- await this.adb.setAnimationState(false);
237
- this._wasWindowAnimationDisabled = true;
238
- }
239
- else {
240
- this.log.info('Window animation is already disabled');
241
- }
242
- }
243
- // set up app under test
244
- await this.initAUT();
245
- // start UiAutomator
246
- const bootstrap = (this.bootstrap = new helpers_1.helpers.bootstrap(this.adb, this.opts.bootstrapPort,
247
- // @ts-expect-error do not put arbitrary properties on opts
248
- this.opts.websocket));
249
- await bootstrap.start(this.opts.appPackage, this.opts.disableAndroidWatchers, this.opts.acceptSslCerts);
250
- // handling unexpected shutdown
251
- (async () => {
252
- try {
253
- await bootstrap.onUnexpectedShutdown;
254
- }
255
- catch (err) {
256
- if (!bootstrap.ignoreUnexpectedShutdown) {
257
- await this.startUnexpectedShutdown(err);
258
- }
259
- }
260
- })();
261
- if (this.opts.skipUnlock) {
262
- this.log.info('Skipping lockscreen check');
263
- }
264
- else {
265
- this.log.info('Checking for lockscreen presence. ' +
266
- `This could be skipped by setting the 'appium:skipUnlock' capability to true.`);
267
- await helpers_1.helpers.unlock(this, this.adb, this.caps);
268
- }
269
- // Set CompressedLayoutHierarchy on the device based on current settings object
270
- // this has to happen _after_ bootstrap is initialized
271
- if (this.opts.ignoreUnimportantViews) {
272
- await this.settings.update({
273
- ignoreUnimportantViews: this.opts.ignoreUnimportantViews,
274
- });
275
- }
276
- if (this.isChromeSession) {
277
- // start a chromedriver session and proxy to it
278
- await this.startChromeSession();
279
- }
280
- else {
281
- if (this.opts.autoLaunch) {
282
- // start app
283
- await this.startAUT();
284
- }
285
- }
286
- if (support_1.util.hasValue(this.opts.orientation)) {
287
- this.log.debug(`Setting initial orientation to '${this.opts.orientation}'`);
288
- // @ts-expect-error no arbitrary props on opts
289
- await this.setOrientation(this.opts.orientation);
290
- }
291
- await this.initAutoWebview();
292
- }
293
- async initAutoWebview() {
294
- if (this.opts.autoWebview) {
295
- const viewName = this.defaultWebviewName();
296
- const timeout = this.opts.autoWebviewTimeout || 2000;
297
- this.log.info(`Setting auto webview to context '${viewName}' with timeout ${timeout}ms`);
298
- // try every 500ms until timeout is over
299
- await (0, asyncbox_1.retryInterval)(timeout / 500, 500, async () => {
300
- await this.setContext(viewName);
301
- });
302
- }
303
- }
304
- async initAUT() {
305
- // populate appPackage, appActivity, appWaitPackage, appWaitActivity,
306
- // and the device being used
307
- // in the opts and caps (so it gets back to the user on session creation)
308
- const launchInfo = await helpers_1.helpers.getLaunchInfo(this.adb, this.opts);
309
- Object.assign(this.opts, launchInfo);
310
- Object.assign(this.caps, launchInfo);
311
- // Uninstall any uninstallOtherPackages which were specified in caps
312
- if (this.opts.uninstallOtherPackages) {
313
- helpers_1.helpers.validateDesiredCaps(this.opts);
314
- // Only SETTINGS_HELPER_PKG_ID package is used by UIA1
315
- await helpers_1.helpers.uninstallOtherPackages(this.adb, helpers_1.helpers.parseArray(this.opts.uninstallOtherPackages), [helpers_1.SETTINGS_HELPER_PKG_ID]);
316
- }
317
- // Install any "otherApps" that were specified in caps
318
- if (this.opts.otherApps) {
319
- /** @type {string[]} */
320
- let otherApps;
321
- try {
322
- otherApps = helpers_1.helpers.parseArray(this.opts.otherApps);
323
- }
324
- catch (e) {
325
- this.log.errorAndThrow(`Could not parse "otherApps" capability: ${e.message}`);
326
- return; // unreachable
327
- }
328
- otherApps = await bluebird_1.default.all(otherApps.map((app) => this.helpers.configureApp(app, APP_EXTENSION)));
329
- await helpers_1.helpers.installOtherApks(otherApps, this.adb, this.opts);
330
- }
331
- // install app
332
- if (!this.opts.app) {
333
- if (this.opts.fullReset) {
334
- this.log.errorAndThrow('Full reset requires an app capability, use fastReset if app is not provided');
335
- }
336
- this.log.debug('No app capability. Assuming it is already on the device');
337
- if (this.opts.fastReset) {
338
- await helpers_1.helpers.resetApp(this.adb, this.opts);
339
- }
340
- return;
341
- }
342
- if (!this.opts.skipUninstall) {
343
- await this.adb.uninstallApk(this.opts.appPackage);
344
- }
345
- await helpers_1.helpers.installApk(this.adb, this.opts);
346
- const apkStringsForLanguage = await helpers_1.helpers.pushStrings(this.opts.language, this.adb, this.opts);
347
- if (this.opts.language) {
348
- this.apkStrings[this.opts.language] = apkStringsForLanguage;
349
- }
350
- // This must run after installing the apk, otherwise it would cause the
351
- // install to fail. And before running the app.
352
- if (!lodash_1.default.isUndefined(this.opts.sharedPreferences)) {
353
- await this.setSharedPreferences(this.opts);
354
- }
355
- }
356
- async checkAppPresent() {
357
- this.log.debug('Checking whether app is actually present');
358
- // @ts-expect-error do not put arbitrary properties on opts
359
- if (!(await support_1.fs.exists(this.opts.app))) {
360
- this.log.errorAndThrow(`Could not find app apk at ${this.opts.app}`);
361
- }
362
- }
363
- async checkPackagePresent() {
364
- this.log.debug('Checking whether package is present on the device');
365
- if (!(await this.adb.shell(['pm', 'list', 'packages', String(this.opts.appPackage)]))) {
366
- this.log.errorAndThrow(`Could not find package ${this.opts.appPackage} on the device`);
367
- }
368
- }
369
- /**
370
- * Set CompressedLayoutHierarchy on the device
371
- * @privateRemarks FIXME: unknown param type
372
- */
373
- async setCompressedLayoutHierarchy(compress) {
374
- await this.bootstrap.sendAction('compressedLayoutHierarchy', { compressLayout: compress });
375
- }
376
- async deleteSession() {
377
- this.log.debug('Shutting down Android driver');
378
- try {
379
- if (!lodash_1.default.isEmpty(this._screenRecordingProperties)) {
380
- await this.stopRecordingScreen();
381
- }
382
- }
383
- catch (ign) { }
384
- await helpers_1.helpers.removeAllSessionWebSocketHandlers(this.server, this.sessionId);
385
- await this.mobileStopScreenStreaming();
386
- await super.deleteSession();
387
- if (this.bootstrap) {
388
- // certain cleanup we only care to do if the bootstrap was ever run
389
- await this.stopChromedriverProxies();
390
- if (this.opts.unicodeKeyboard && this.opts.resetKeyboard && this.defaultIME) {
391
- this.log.debug(`Resetting IME to ${this.defaultIME}`);
392
- await this.adb?.setIME(this.defaultIME);
393
- }
394
- if (!this.isChromeSession && !this.opts.dontStopAppOnReset) {
395
- await this.adb?.forceStop(this.opts.appPackage);
396
- }
397
- await this.adb?.goToHome();
398
- if (this.opts.fullReset && !this.opts.skipUninstall && !this.appOnDevice) {
399
- await this.adb?.uninstallApk(this.opts.appPackage);
400
- }
401
- await this.bootstrap.shutdown();
402
- this.bootstrap = undefined;
403
- }
404
- else {
405
- this.log.debug("Called deleteSession but bootstrap wasn't active");
406
- }
407
- // some cleanup we want to do regardless, in case we are shutting down
408
- // mid-startup
409
- await this.adb?.stopLogcat();
410
- if (this.useUnlockHelperApp) {
411
- await this.adb?.forceStop('io.appium.unlock');
412
- }
413
- if (this._wasWindowAnimationDisabled) {
414
- this.log.info('Restoring window animation state');
415
- await this.adb?.setAnimationState(true);
416
- // This was necessary to change animation scale over Android P. We must reset the policy for the security.
417
- if (this.adb && (await this.adb.getApiLevel()) >= 28) {
418
- this.log.info('Restoring hidden api policy to the device default configuration');
419
- await this.adb?.setDefaultHiddenApiPolicy(!!this.opts.ignoreHiddenApiPolicyError);
420
- }
421
- }
422
- // @ts-expect-error do not put arbitrary properties on opts
423
- if (this.opts.reboot) {
424
- // @ts-expect-error do not put arbitrary properties on opts
425
- const avdName = this.opts.avd.replace('@', '');
426
- this.log.debug(`closing emulator '${avdName}'`);
427
- await this.adb?.killEmulator(avdName);
428
- }
429
- }
430
- /**
431
- *
432
- * @param {AndroidDriverOpts} [opts]
433
- */
434
- // eslint-disable-next-line @typescript-eslint/no-unused-vars
435
- async setSharedPreferences(opts) {
436
- const sharedPrefs = this.opts.sharedPreferences;
437
- this.log.info('Trying to set shared preferences');
438
- const name = sharedPrefs.name;
439
- if (lodash_1.default.isUndefined(name)) {
440
- this.log.warn(`Skipping setting Shared preferences, name is undefined: ${JSON.stringify(sharedPrefs)}`);
441
- return false;
442
- }
443
- const remotePath = `/data/data/${this.opts.appPackage}/shared_prefs`;
444
- const remoteFile = `${remotePath}/${name}.xml`;
445
- const localPath = `/tmp/${name}.xml`;
446
- const builder = this.getPrefsBuilder();
447
- builder.build(sharedPrefs.prefs);
448
- this.log.info(`Creating temporary shared preferences: ${localPath}`);
449
- builder.toFile(localPath);
450
- this.log.info(`Creating shared_prefs remote folder: ${remotePath}`);
451
- await this.adb.shell(['mkdir', '-p', remotePath]);
452
- this.log.info(`Pushing shared_prefs to ${remoteFile}`);
453
- await this.adb.push(localPath, remoteFile);
454
- try {
455
- this.log.info(`Trying to remove shared preferences temporary file`);
456
- if (await support_1.fs.exists(localPath)) {
457
- await support_1.fs.unlink(localPath);
458
- }
459
- }
460
- catch (e) {
461
- this.log.warn(`Error trying to remove temporary file ${localPath}`);
462
- }
463
- return true;
464
- }
465
- getPrefsBuilder() {
466
- /* Add this method to create a new SharedPrefsBuilder instead of
467
- * directly creating the object on setSharedPreferences for testing purposes
468
- */
469
- return new shared_preferences_builder_1.SharedPrefsBuilder();
470
- }
471
- /**
472
- *
473
- * @param {any} caps
474
- * @returns {caps is AndroidDriverCaps}
475
- */
476
- validateDesiredCaps(caps) {
477
- if (!super.validateDesiredCaps(caps)) {
478
- return false;
479
- }
480
- if ((!caps.browserName || !helpers_1.helpers.isChromeBrowser(caps.browserName)) &&
481
- !caps.app &&
482
- !caps.appPackage) {
483
- this.log.errorAndThrow('The desired capabilities must include either an app, appPackage or browserName');
484
- }
485
- return helpers_1.helpers.validateDesiredCaps(caps);
486
- }
487
- /**
488
- *
489
- * @param {string} sessionId
490
- */
491
- proxyActive(sessionId) {
492
- super.proxyActive(sessionId);
493
- return this.jwpProxyActive;
494
- }
495
- /**
496
- *
497
- * @param {string} sessionId
498
- */
499
- getProxyAvoidList(sessionId) {
500
- super.getProxyAvoidList(sessionId);
501
- return this.jwpProxyAvoid;
502
- }
503
- /**
504
- *
505
- * @param {string} sessionId
506
- */
507
- canProxy(sessionId) {
508
- super.canProxy(sessionId);
509
- // this will change depending on ChromeDriver status
510
- return lodash_1.default.isFunction(this.proxyReqRes);
511
- }
512
37
  }
513
38
  exports.AndroidDriver = AndroidDriver;
514
39
  AndroidDriver.newMethodMap = method_map_1.newMethodMap;
@@ -1 +1 @@
1
- {"version":3,"file":"driver.js","sourceRoot":"","sources":["../../lib/driver.ts"],"names":[],"mappings":";AAAA,6DAA6D;;;;;;AAE7D,6CAAkD;AAYlD,2CAAiD;AAEjD,0CAAyD;AACzD,uCAAuC;AACvC,wDAAyB;AACzB,oDAAuB;AACvB,2EAA8D;AAE9D,gEAAmF;AACnF,uCAA8E;AAC9E,6CAA0C;AAE1C,MAAM,aAAa,GAAG,MAAM,CAAC;AAC7B,MAAM,WAAW,GAAG,IAAI,CAAC;AAEzB;;;IAGI;AACJ,MAAM,QAAQ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QAAQ,OAAmB"}
1
+ {"version":3,"file":"driver.js","sourceRoot":"","sources":["../../lib/driver.ts"],"names":[],"mappings":";AAAA,6DAA6D;;;;;;AAW7D,oDAAuB;AAGvB,0CAAyC;AACzC,gEAAmF;AACnF,uCAAkC;AAClC,6CAA0C;AAO1C,MAAM,aACJ,SAAQ,mBAAkD;IAgC1D,YAAY,OAAoB,EAAiB,EAAE,kBAAkB,GAAG,IAAI;QAC1E,KAAK,CAAC,IAAI,EAAE,kBAAkB,CAAC,CAAC;QAEhC,IAAI,CAAC,iBAAiB,GAAG;YACvB,OAAO;YACP,IAAI;YACJ,YAAY;YACZ,kBAAkB;YAClB,sBAAsB;SACvB,CAAC;QACF,IAAI,CAAC,qBAAqB,GAAG,gBAAC,CAAC,SAAS,CAAC,qBAA0B,CAAC,CAAC;QACrE,IAAI,CAAC,oBAAoB,GAAG,EAAE,CAAC;QAC/B,IAAI,CAAC,cAAc,GAAG,KAAK,CAAC;QAC5B,IAAI,CAAC,UAAU,GAAG,EAAE,CAAC;QACrB,IAAI,CAAC,QAAQ,GAAG,iBAAO,CAAC,QAAQ,CAAC;QAEjC,IAAI,CAAC,UAAU,GAAG,IAAI,CAAC,kBAAkB,EAAE,CAAC;QAC5C,IAAI,CAAC,IAAI,GAAG,IAAyB,CAAC;IACxC,CAAC;IAED,UAAU;QACR,OAAO,iBAAO,CAAC,UAAU,CAAC,IAAI,CAAC,GAAG,EAAE,IAAI,CAAC,IAAI,CAAC,CAAC;IACjD,CAAC;IAED,IAAI,eAAe;QACjB,OAAO,iBAAO,CAAC,eAAe,CAAC,MAAM,CAAC,IAAI,CAAC,IAAI,CAAC,WAAW,CAAC,CAAC,CAAC;IAChE,CAAC;;AAIK,sCAAa;AA3DZ,0BAAY,GAAG,yBAAY,CAAC;AA0DrC,uCAAuD;AAA/C,2GAAA,QAAQ,OAAmB"}
@@ -1,7 +1,6 @@
1
1
  import type { AppiumServer, StringRecord } from '@appium/types';
2
2
  import { ADB } from 'appium-adb';
3
3
  import type { SetRequired, ValueOf } from 'type-fest';
4
- import Bootstrap from '../bootstrap';
5
4
  import type { AndroidDriver, AndroidDriverCaps, AndroidDriverOpts } from '../driver';
6
5
  import type { ADBDeviceInfo, ADBLaunchInfo } from './types';
7
6
  import Unlocker from './unlock';
@@ -154,7 +153,6 @@ interface AndroidHelpers {
154
153
  * @returns `true` if the device is an Android emulator
155
154
  */
156
155
  isEmulator(adb?: ADB, opts?: AndroidDriverOpts): boolean;
157
- bootstrap: typeof Bootstrap;
158
156
  unlocker: typeof Unlocker;
159
157
  }
160
158
  declare const AndroidHelpers: AndroidHelpers;
@@ -1 +1 @@
1
- {"version":3,"file":"android.d.ts","sourceRoot":"","sources":["../../../lib/helpers/android.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAC,YAAY,EAAE,YAAY,EAAC,MAAM,eAAe,CAAC;AAC9D,OAAO,EAAC,GAAG,EAAC,MAAM,YAAY,CAAC;AAQ/B,OAAO,KAAK,EAAC,WAAW,EAAE,OAAO,EAAC,MAAM,WAAW,CAAC;AACpD,OAAO,SAAS,MAAM,cAAc,CAAC;AAErC,OAAO,KAAK,EAAC,aAAa,EAAE,iBAAiB,EAAE,iBAAiB,EAAC,MAAM,WAAW,CAAC;AAEnF,OAAO,KAAK,EAAC,aAAa,EAAE,aAAa,EAAC,MAAM,SAAS,CAAC;AAC1D,OAAO,QAMN,MAAM,UAAU,CAAC;AAQlB,QAAA,MAAM,+BAA+B;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CA6B3B,CAAC;AACX,QAAA,MAAM,sBAAsB,uBAAuB,CAAC;AAKpD,QAAA,MAAM,SAAS;;;;;CAKL,CAAC;AAEX,iBAAS,kBAAkB,CAAC,GAAG,EAAE,GAAG,EAAE,YAAY,EAAE,MAAM,UASzD;AAED,iBAAS,cAAc,CAAC,GAAG,EAAE,GAAG,EAAE,IAAI,EAAE,iBAAiB,GAAG,MAAM,EAAE,CAiBnE;AAeD,UAAU,cAAc;IACtB,aA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,eAAe,CAAC,OAAO,CAAC,EAAE,MAAM,GAAG,OAAO,CAAC;IAC3C,YAAY,CAAC,OAAO,EAAE,MAAM,GAAG,OAAO,CAAC,OAAO,+BAA+B,CAAC,CAAC;IAC/E,iCAAiC,CAC/B,MAAM,CAAC,EAAE,YAAY,EACrB,SAAS,CAAC,EAAE,MAAM,GAAG,IAAI,GACxB,OAAO,CAAC,IAAI,CAAC,CAAC;IACjB,UAAU,CAAC,GAAG,EAAE,MAAM,GAAG,MAAM,EAAE,GAAG,MAAM,EAAE,CAAC;IAE7C;;;;;;OAMG;IACH,mBAAmB,CAAC,IAAI,EAAE,iBAAiB,GAAG,OAAO,CAAC;IAEtD;;;;;;;;;OASG;IACH,wBAAwB,CAAC,IAAI,EAAE,iBAAiB,GAAG,iBAAiB,CAAC;IAErE;;;;;;OAMG;IACH,UAAU,CAAC,GAAG,CAAC,EAAE,GAAG,EAAE,IAAI,CAAC,EAAE,iBAAiB,GAAG,OAAO,CAAC;IACzD,QAAQ,EAAE,OAAO,QAAQ,CAAC;CAC3B;AAED,QAAA,MAAM,cAAc,EAAE,cAu2BrB,CAAC;AAEF,eAAO,MAAM,OAAO,gBAAiB,CAAC;AACtC,OAAO,EAAC,SAAS,EAAE,sBAAsB,EAAE,kBAAkB,EAAE,cAAc,EAAC,CAAC;AAC/E,eAAe,cAAc,CAAC"}
@@ -36,7 +36,6 @@ const lodash_1 = __importDefault(require("lodash"));
36
36
  const node_os_1 = require("node:os");
37
37
  const node_path_1 = __importDefault(require("node:path"));
38
38
  const semver_1 = __importDefault(require("semver"));
39
- const bootstrap_1 = __importDefault(require("../bootstrap"));
40
39
  const logger_1 = __importDefault(require("../logger"));
41
40
  const unlock_1 = __importStar(require("./unlock"));
42
41
  const MOCK_APP_IDS_STORE = '/data/local/tmp/mock_apps.json';
@@ -811,7 +810,6 @@ const AndroidHelpers = {
811
810
  const possibleNames = [opts?.udid, adb?.curDeviceId];
812
811
  return !!opts?.avd || possibleNames.some((x) => EMULATOR_PATTERN.test(String(x)));
813
812
  },
814
- bootstrap: bootstrap_1.default,
815
813
  unlocker: unlock_1.default,
816
814
  };
817
815
  exports.helpers = AndroidHelpers;