appium-uiautomator2-driver 2.44.2 → 2.45.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.
- package/CHANGELOG.md +14 -0
- package/README.md +9 -5
- package/build/lib/driver.d.ts +1 -1
- package/build/lib/driver.d.ts.map +1 -1
- package/build/lib/driver.js +9 -9
- package/build/lib/driver.js.map +1 -1
- package/build/lib/execute-method-map.d.ts +1 -1
- package/build/lib/execute-method-map.js +1 -1
- package/build/lib/execute-method-map.js.map +1 -1
- package/build/tsconfig.tsbuildinfo +1 -1
- package/lib/driver.ts +10 -11
- package/lib/execute-method-map.ts +1 -1
- package/npm-shrinkwrap.json +122 -265
- package/package.json +2 -2
package/lib/driver.ts
CHANGED
|
@@ -372,6 +372,16 @@ class AndroidUiautomator2Driver
|
|
|
372
372
|
};
|
|
373
373
|
_.defaults(this.opts, defaultOpts);
|
|
374
374
|
|
|
375
|
+
this.opts.adbPort = this.opts.adbPort || DEFAULT_ADB_PORT;
|
|
376
|
+
// get device udid for this session
|
|
377
|
+
const {udid, emPort} = await this.getDeviceInfoFromCaps();
|
|
378
|
+
this.opts.udid = udid;
|
|
379
|
+
// @ts-expect-error do not put random stuff on opts
|
|
380
|
+
this.opts.emPort = emPort;
|
|
381
|
+
// now that we know our java version and device info, we can create our
|
|
382
|
+
// ADB instance
|
|
383
|
+
this.adb = await this.createADB();
|
|
384
|
+
|
|
375
385
|
if (this.isChromeSession) {
|
|
376
386
|
this.log.info(`We're going to run a Chrome-based session`);
|
|
377
387
|
const {pkg, activity: defaultActivity} = utils.getChromePkg(this.opts.browserName!);
|
|
@@ -405,7 +415,6 @@ class AndroidUiautomator2Driver
|
|
|
405
415
|
'without the target application'
|
|
406
416
|
);
|
|
407
417
|
}
|
|
408
|
-
this.opts.adbPort = this.opts.adbPort || DEFAULT_ADB_PORT;
|
|
409
418
|
|
|
410
419
|
const result = await this.startUiAutomator2Session(startSessionOpts);
|
|
411
420
|
|
|
@@ -659,16 +668,6 @@ class AndroidUiautomator2Driver
|
|
|
659
668
|
async startUiAutomator2Session(
|
|
660
669
|
caps: Uiautomator2StartSessionOpts
|
|
661
670
|
): Promise<Uiautomator2SessionCaps> {
|
|
662
|
-
// get device udid for this session
|
|
663
|
-
const {udid, emPort} = await this.getDeviceInfoFromCaps();
|
|
664
|
-
this.opts.udid = udid;
|
|
665
|
-
// @ts-expect-error do not put random stuff on opts
|
|
666
|
-
this.opts.emPort = emPort;
|
|
667
|
-
|
|
668
|
-
// now that we know our java version and device info, we can create our
|
|
669
|
-
// ADB instance
|
|
670
|
-
this.adb = await this.createADB();
|
|
671
|
-
|
|
672
671
|
const appInfo = await this.performSessionPreExecSetup();
|
|
673
672
|
// set actual device name, udid, platform version, screen size, screen density, model and manufacturer details
|
|
674
673
|
const sessionInfo: Uiautomator2SessionInfo = {
|
|
@@ -278,7 +278,7 @@ export const executeMethodMap = {
|
|
|
278
278
|
command: 'mobileInstallApp',
|
|
279
279
|
params: {
|
|
280
280
|
required: ['appPath'],
|
|
281
|
-
optional: ['timeout', '
|
|
281
|
+
optional: ['timeout', 'allowTestPackages', 'useSdcard', 'grantPermissions', 'replace', 'checkVersion'],
|
|
282
282
|
},
|
|
283
283
|
},
|
|
284
284
|
'mobile: clearApp': {
|