Skip to content

Commit

Permalink
fix: Pass reqBasePath option to chromedriver (#985)
Browse files Browse the repository at this point in the history
  • Loading branch information
mykola-mokhnach authored Feb 22, 2025
1 parent d203117 commit d59cb28
Show file tree
Hide file tree
Showing 2 changed files with 12 additions and 8 deletions.
16 changes: 10 additions & 6 deletions lib/commands/context/helpers.js
Original file line number Diff line number Diff line change
Expand Up @@ -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,
Expand All @@ -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,
Expand Down
4 changes: 2 additions & 2 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -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",
Expand Down

0 comments on commit d59cb28

Please # to comment.