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

@mykola-mokhnach mykola-mokhnach commented Jun 30, 2019

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

@umutuzgur umutuzgur Jun 30, 2019

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

@umutuzgur umutuzgur Jun 30, 2019

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

@mykola-mokhnach mykola-mokhnach Jun 30, 2019

Choose a reason for hiding this comment

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

Copy link
Member

@umutuzgur umutuzgur Jul 1, 2019

Choose a reason for hiding this comment

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

Gotcha. Thanks for explaining

jlipps
jlipps approved these changes Jul 1, 2019
@@ -329,6 +332,18 @@ async function getChromedriverPort (portSpec) {
return foundPort;
}

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

@jlipps jlipps Jul 1, 2019

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

@mykola-mokhnach mykola-mokhnach merged commit acfcd03 into appium:master Jul 2, 2019
1 of 2 checks passed
@mykola-mokhnach mykola-mokhnach deleted the auto_download branch Jul 2, 2019
KazuCocoa added a commit to appium/appium that referenced this issue Jul 3, 2019
KazuCocoa added a commit to appium/appium that referenced this issue Sep 7, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Linked issues

Successfully merging this pull request may close these issues.

None yet

3 participants