appium-uiautomator2-driver 6.1.0 → 6.1.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.
- package/CHANGELOG.md +12 -0
- package/build/lib/constraints.d.ts +1 -1
- package/build/lib/driver.d.ts.map +1 -1
- package/build/lib/driver.js +1 -5
- package/build/lib/driver.js.map +1 -1
- package/build/lib/uiautomator2.d.ts +49 -83
- package/build/lib/uiautomator2.d.ts.map +1 -1
- package/build/lib/uiautomator2.js +150 -190
- package/build/lib/uiautomator2.js.map +1 -1
- package/build/tsconfig.tsbuildinfo +1 -1
- package/lib/driver.ts +4 -9
- package/lib/{uiautomator2.js → uiautomator2.ts} +291 -261
- package/npm-shrinkwrap.json +130 -161
- package/package.json +2 -2
package/lib/driver.ts
CHANGED
|
@@ -38,6 +38,7 @@ import type {
|
|
|
38
38
|
EmptyObject,
|
|
39
39
|
} from './types';
|
|
40
40
|
import {SERVER_PACKAGE_ID, SERVER_TEST_PACKAGE_ID, UiAutomator2Server} from './uiautomator2';
|
|
41
|
+
import type {UiAutomator2ServerOptions} from './uiautomator2';
|
|
41
42
|
import {
|
|
42
43
|
mobileGetActionHistory,
|
|
43
44
|
mobileScheduleAction,
|
|
@@ -688,14 +689,10 @@ class AndroidUiautomator2Driver
|
|
|
688
689
|
}
|
|
689
690
|
|
|
690
691
|
async initUiAutomator2Server() {
|
|
691
|
-
|
|
692
|
-
|
|
693
|
-
// @ts-expect-error FIXME: maybe `address` instead of `host`?
|
|
694
|
-
host: this.opts.remoteAdbHost || this.opts.host || LOCALHOST_IP4,
|
|
692
|
+
const uiautomator2Opts: UiAutomator2ServerOptions = {
|
|
693
|
+
host: this.opts.remoteAdbHost || LOCALHOST_IP4,
|
|
695
694
|
systemPort: this.systemPort as number,
|
|
696
|
-
devicePort: DEVICE_PORT,
|
|
697
695
|
adb: this.adb,
|
|
698
|
-
tmpDir: this.opts.tmpDir as string,
|
|
699
696
|
disableWindowAnimation: !!this.opts.disableWindowAnimation,
|
|
700
697
|
disableSuppressAccessibilityService: this.opts.disableSuppressAccessibilityService,
|
|
701
698
|
readTimeout: this.opts.uiautomator2ServerReadTimeout,
|
|
@@ -705,9 +702,7 @@ class AndroidUiautomator2Driver
|
|
|
705
702
|
// uiautomator2 with the appropriate options
|
|
706
703
|
this.uiautomator2 = new UiAutomator2Server(this.log, uiautomator2Opts);
|
|
707
704
|
this.proxyReqRes = this.uiautomator2.proxyReqRes.bind(this.uiautomator2);
|
|
708
|
-
this.proxyCommand = this.uiautomator2.proxyCommand.bind(
|
|
709
|
-
this.uiautomator2
|
|
710
|
-
) as typeof this.proxyCommand;
|
|
705
|
+
this.proxyCommand = this.uiautomator2.proxyCommand.bind(this.uiautomator2);
|
|
711
706
|
|
|
712
707
|
if (this.opts.skipServerInstallation) {
|
|
713
708
|
this.log.info(`'skipServerInstallation' is set. Skipping UIAutomator2 server installation.`);
|