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 support for downloading the chromedriver after installation #332

Closed
wants to merge 4 commits into from

Conversation

niehusst
Copy link

@niehusst niehusst commented Nov 6, 2021

This is the same code changes as #278 (all substantial code changes are thanks to @r3pwn) but without any of the refactoring that made it seem like a bigger PR than it actually was. Hopefully, this will be easier to review.

Using the .download async function, we can now do things like

await chromedriver.download();

before any tests get run.

Additionally, some options are supported.
We can pass in download_version or cdn_url like such:

await chromedriver.download({cdn_url: "http://localhost", download_version: "84"});

download_version is able to be passed in as the full version of chrome ("84.0.4147.105") or just the major version ("84")

I believe this is the functionality requested by @HaimBendanan in issue #256

install.js Outdated Show resolved Hide resolved
Copy link
Owner

@giggio giggio left a comment

Choose a reason for hiding this comment

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

Hi, @niehusst! Thanks for the PR, it is much easier to review now.
I think we can improve it a bit. I think there is a bit of feature envy going on in the chromedriver.js file, it is using a lot of things from install.js.
I'd prefer that the installation functions be moved into chromedriver.js, and install.js would then use those functions, and continued to be a install only script, not used in the module itself.
This would also eliminate a bit of code duplication that is showing up at the current iteration.

@niehusst
Copy link
Author

niehusst commented Nov 9, 2021

Good idea @giggio. Hopefully this little refactor cleans things up a bit without making the PR too convoluted.

@niehusst
Copy link
Author

niehusst commented Nov 9, 2021

The CI build has failed, but the error logs aren't the most helpful, so I'm not really sure what the problem is. Some of the failures look like they're git permissions related, and others seem to have stalled during what looks like environment setup? Lmk if you can make any more sense of the errors.

@niehusst niehusst requested a review from giggio November 14, 2021 04:08
@stale
Copy link

stale bot commented Nov 21, 2021

This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions.

@stale stale bot added the wontfix label Nov 21, 2021
@niehusst
Copy link
Author

@giggio did you ever get a chance to look at this again?

@stale stale bot closed this Nov 30, 2021
@github-actions
Copy link

github-actions bot commented Dec 8, 2021

This pull request has been automatically locked since there has not been any recent activity after it was closed. Please open a new issue for related bugs.

@github-actions github-actions bot locked as resolved and limited conversation to collaborators Dec 8, 2021
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants