Commit 3f7bf30 1 parent 4c224d8 commit 3f7bf30 Copy full SHA for 3f7bf30
File tree 2 files changed +13
-4
lines changed
2 files changed +13
-4
lines changed Original file line number Diff line number Diff line change @@ -559,6 +559,7 @@ export class EspressoDriver extends AndroidDriver implements ExternalDriver<
559
559
keyAlias : this . opts . keyAlias ,
560
560
keyPassword : this . opts . keyPassword ,
561
561
disableSuppressAccessibilityService : this . opts . disableSuppressAccessibilityService ,
562
+ reqBasePath : this . basePath ,
562
563
} ) ;
563
564
this . proxyReqRes = this . espresso . proxyReqRes . bind ( this . espresso ) ;
564
565
this . proxyCommand = this . espresso . proxyCommand . bind ( this . espresso ) ;
Original file line number Diff line number Diff line change @@ -62,21 +62,29 @@ class EspressoRunner {
62
62
/**@type {boolean } */
63
63
forceEspressoRebuild ;
64
64
65
+ /**
66
+ *
67
+ * @param {import('@appium/types').AppiumLogger } log
68
+ * @param {import('@appium/types').StringRecord } opts
69
+ */
65
70
constructor ( log , opts = { } ) {
66
- for ( let req of REQUIRED_PARAMS ) {
71
+ for ( const req of REQUIRED_PARAMS ) {
67
72
if ( ! opts || ! util . hasValue ( opts [ req ] ) ) {
68
73
throw new Error ( `Option '${ req } ' is required!` ) ;
69
74
}
70
75
this [ req ] = opts [ req ] ;
71
76
}
72
77
this . log = log ;
73
- this . jwproxy = new EspressoProxy ( {
78
+ const proxyOpts = {
74
79
log,
75
80
server : this . host ,
76
81
port : this . systemPort ,
77
- base : '' ,
78
82
keepAlive : true ,
79
- } ) ;
83
+ } ;
84
+ if ( opts . reqBasePath ) {
85
+ proxyOpts . reqBasePath = opts . reqBasePath ;
86
+ }
87
+ this . jwproxy = new EspressoProxy ( proxyOpts ) ;
80
88
this . proxyReqRes = this . jwproxy . proxyReqRes . bind ( this . jwproxy ) ;
81
89
this . proxyCommand = this . jwproxy . command . bind ( this . jwproxy ) ;
82
90
this . jwproxy . instrumentationState = {
You can’t perform that action at this time.
0 commit comments