-
-
Notifications
You must be signed in to change notification settings - Fork 210
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Add server feature to enable automated Chromedriver downloads #548
Conversation
@@ -329,6 +332,18 @@ async function getChromedriverPort (portSpec) { | |||
return foundPort; | |||
} | |||
|
|||
helpers.isChromedriverAutodownloadEnabled = function isChromedriverAutodownloadEnabled () { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think it should be isChromedriverAutoDownloadEnabled
but it doesn't matter. I just wanted to comment in case it was a typo
lib/commands/context.js
Outdated
@@ -353,6 +368,7 @@ helpers.setupNewChromedriver = async function setupNewChromedriver (opts, curDev | |||
bundleId: opts.chromeBundleId, | |||
useSystemExecutable: opts.chromedriverUseSystemExecutable, | |||
disableBuildCheck: opts.chromedriverDisableBuildCheck, | |||
isAutodownloadEnabled: this.isChromedriverAutodownloadEnabled(), |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I actually have a concern now. How should this feature work when mappingPath
and executableDir
are set? Should we set isAutodownloadEnabled
to false
if they are passed?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Gotcha. Thanks for explaining
lib/commands/context.js
Outdated
@@ -329,6 +332,18 @@ async function getChromedriverPort (portSpec) { | |||
return foundPort; | |||
} | |||
|
|||
helpers.isChromedriverAutodownloadEnabled = function isChromedriverAutodownloadEnabled () { | |||
try { | |||
this.ensureFeatureEnabled(CHROMEDRIVER_AUTODOWNLOAD_FEATURE); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
you can use isFeatureEnabled
if you just want the boolean value instead of using try/catch...
Based on appium/appium-chromedriver#131
Please do not merge until the above PR is published