diff --git a/lib/commands/context/helpers.js b/lib/commands/context/helpers.js index 41bb9f22..03195b3d 100644 --- a/lib/commands/context/helpers.js +++ b/lib/commands/context/helpers.js @@ -716,11 +716,12 @@ export async function setupNewChromedriver(opts, curDeviceId, context) { ); } - const chromedriver = new Chromedriver({ - port: String(opts.chromedriverPort), + /** @type {import('appium-chromedriver').ChromedriverOpts} */ + const chromedriverOpts = { + port: _.isNil(opts.chromedriverPort) ? undefined : String(opts.chromedriverPort), executable: opts.chromedriverExecutable, - adb: /** @type {any} */ (this.adb), - cmdArgs: /** @type {string[]} */ (opts.chromedriverArgs), + adb: this.adb, + cmdArgs: /** @type {string[] | undefined} */ (opts.chromedriverArgs), verbose: !!opts.showChromedriverLog, executableDir: opts.chromedriverExecutableDir, mappingPath: opts.chromedriverChromeMappingFile, @@ -731,8 +732,11 @@ export async function setupNewChromedriver(opts, curDeviceId, context) { // @ts-ignore this is ok details, isAutodownloadEnabled: isChromedriverAutodownloadEnabled.bind(this)(), - }); - + }; + if (this.basePath) { + chromedriverOpts.reqBasePath = this.basePath; + } + const chromedriver = new Chromedriver(chromedriverOpts); // make sure there are chromeOptions opts.chromeOptions = opts.chromeOptions || {}; // try out any prefixed chromeOptions, diff --git a/package.json b/package.json index 2cb162af..935cb9df 100644 --- a/package.json +++ b/package.json @@ -51,11 +51,11 @@ "@appium/support": "^6.0.0", "@colors/colors": "^1.6.0", "appium-adb": "^12.12.0", - "appium-chromedriver": "^7.0.0", + "appium-chromedriver": "^7.0.6", "asyncbox": "^3.0.0", "axios": "^1.x", "bluebird": "^3.4.7", - "io.appium.settings": "^5.12.22", + "io.appium.settings": "^5.12.24", "lodash": "^4.17.4", "lru-cache": "^10.0.1", "moment": "^2.24.0",