appium-uiautomator2-driver 4.0.0 → 4.0.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/README.md +19 -1
- package/build/lib/driver.d.ts.map +1 -1
- package/build/lib/driver.js +1 -0
- package/build/lib/driver.js.map +1 -1
- package/build/lib/uiautomator2.d.ts +1 -0
- package/build/lib/uiautomator2.d.ts.map +1 -1
- package/build/lib/uiautomator2.js +5 -1
- package/build/lib/uiautomator2.js.map +1 -1
- package/build/tsconfig.tsbuildinfo +1 -1
- package/lib/driver.ts +1 -0
- package/lib/uiautomator2.js +5 -1
- package/npm-shrinkwrap.json +126 -497
- package/package.json +2 -2
package/lib/driver.ts
CHANGED
|
@@ -701,6 +701,7 @@ class AndroidUiautomator2Driver
|
|
|
701
701
|
disableWindowAnimation: !!this.opts.disableWindowAnimation,
|
|
702
702
|
disableSuppressAccessibilityService: this.opts.disableSuppressAccessibilityService,
|
|
703
703
|
readTimeout: this.opts.uiautomator2ServerReadTimeout,
|
|
704
|
+
basePath: this.basePath,
|
|
704
705
|
};
|
|
705
706
|
// now that we have package and activity, we can create an instance of
|
|
706
707
|
// uiautomator2 with the appropriate options
|
package/lib/uiautomator2.js
CHANGED
|
@@ -61,7 +61,7 @@ class UiAutomator2Server {
|
|
|
61
61
|
* @param {UiAutomator2ServerOptions} opts
|
|
62
62
|
*/
|
|
63
63
|
constructor (log, opts) {
|
|
64
|
-
for (
|
|
64
|
+
for (const req of REQD_PARAMS) {
|
|
65
65
|
if (!opts || !util.hasValue(opts[req])) {
|
|
66
66
|
throw new Error(`Option '${req}' is required!`);
|
|
67
67
|
}
|
|
@@ -75,6 +75,9 @@ class UiAutomator2Server {
|
|
|
75
75
|
port: this.systemPort,
|
|
76
76
|
keepAlive: true,
|
|
77
77
|
};
|
|
78
|
+
if (opts.basePath) {
|
|
79
|
+
proxyOpts.reqBasePath = opts.basePath;
|
|
80
|
+
}
|
|
78
81
|
if (opts.readTimeout && opts.readTimeout > 0) {
|
|
79
82
|
proxyOpts.timeout = opts.readTimeout;
|
|
80
83
|
}
|
|
@@ -453,4 +456,5 @@ export default UiAutomator2Server;
|
|
|
453
456
|
* @property {number} [readTimeout]
|
|
454
457
|
* @property {boolean} [disableSuppressAccessibilityService]
|
|
455
458
|
* @property {string} [apk]
|
|
459
|
+
* @property {string} [basePath]
|
|
456
460
|
*/
|