Skip to content
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

Merged
merged 6 commits into from
Jul 2, 2019

Conversation

mykola-mokhnach
Copy link
Contributor

Based on appium/appium-chromedriver#131

Please do not merge until the above PR is published

lib/commands/context.js Outdated Show resolved Hide resolved
@@ -329,6 +332,18 @@ async function getChromedriverPort (portSpec) {
return foundPort;
}

helpers.isChromedriverAutodownloadEnabled = function isChromedriverAutodownloadEnabled () {
Copy link
Member

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

@@ -353,6 +368,7 @@ helpers.setupNewChromedriver = async function setupNewChromedriver (opts, curDev
bundleId: opts.chromeBundleId,
useSystemExecutable: opts.chromedriverUseSystemExecutable,
disableBuildCheck: opts.chromedriverDisableBuildCheck,
isAutodownloadEnabled: this.isChromedriverAutodownloadEnabled(),
Copy link
Member

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?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Gotcha. Thanks for explaining

@@ -329,6 +332,18 @@ async function getChromedriverPort (portSpec) {
return foundPort;
}

helpers.isChromedriverAutodownloadEnabled = function isChromedriverAutodownloadEnabled () {
try {
this.ensureFeatureEnabled(CHROMEDRIVER_AUTODOWNLOAD_FEATURE);
Copy link
Member

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...

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants