File tree 2 files changed +16
-4
lines changed
2 files changed +16
-4
lines changed Original file line number Diff line number Diff line change @@ -68,7 +68,9 @@ export class GeckoDriver extends BaseDriver {
68
68
/** @type {import('@appium/types').StringRecord | null } */
69
69
let response = null ;
70
70
try {
71
- response = await this . gecko . start ( formatCapsForServer ( caps ) ) ;
71
+ response = await this . gecko . start ( formatCapsForServer ( caps ) , {
72
+ reqBasePath : this . basePath ,
73
+ } ) ;
72
74
} catch ( e ) {
73
75
await this . deleteSession ( ) ;
74
76
throw e ;
Original file line number Diff line number Diff line change @@ -194,18 +194,23 @@ export class GeckoDriverServer {
194
194
/**
195
195
*
196
196
* @param {import('@appium/types').StringRecord } geckoCaps
197
+ * @param {SessionOptions } [opts={}]
197
198
* @returns {Promise<import('@appium/types').StringRecord> }
198
199
*/
199
- async start ( geckoCaps ) {
200
+ async start ( geckoCaps , opts = { } ) {
200
201
await this . process . init ( ) ;
201
202
202
- this . proxy = new GeckoProxy ( {
203
+ const proxyOpts = {
203
204
server : GECKO_SERVER_HOST ,
204
205
port : this . process . port ,
205
206
log : this . log ,
206
207
base : '' ,
207
208
keepAlive : true ,
208
- } ) ;
209
+ } ;
210
+ if ( opts . reqBasePath ) {
211
+ proxyOpts . reqBasePath = opts . reqBasePath ;
212
+ }
213
+ this . proxy = new GeckoProxy ( proxyOpts ) ;
209
214
this . proxy . didProcessExit = false ;
210
215
this . process ?. proc ?. on ( 'exit' , ( ) => {
211
216
if ( this . proxy ) {
@@ -277,3 +282,8 @@ export class GeckoDriverServer {
277
282
}
278
283
279
284
export default GeckoDriverServer ;
285
+
286
+ /**
287
+ * @typedef {Object } SessionOptions
288
+ * @property {string } [reqBasePath]
289
+ */
You can’t perform that action at this time.
0 commit comments