File tree Expand file tree Collapse file tree 2 files changed +6
-1
lines changed Expand file tree Collapse file tree 2 files changed +6
-1
lines changed Original file line number Diff line number Diff line change @@ -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
Original file line number Diff line number Diff line change @@ -61,7 +61,7 @@ class UiAutomator2Server {
61
61
* @param {UiAutomator2ServerOptions } opts
62
62
*/
63
63
constructor ( log , opts ) {
64
- for ( let req of REQD_PARAMS ) {
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
*/
You can’t perform that action at this time.
0 commit comments