Fix Chrome beta support for NodeChrome #578
Merged
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
The Dockerfile says Chrome beta is supported:
But when actually building an image with e.g.
--build-arg CHROME_VERSION=google-chrome-beta=62.0.3202.29-1
, then a coupleof problems appear. Firstly, the version field in
/opt/selenium/config.json
will not be populated, because
/opt/google/chrome/chrome
does not exist.Secondly and even more importantly, the node simply won't work. I assume it's
because
chrome_launcher.sh
tries to execute the nonexistent/opt/google/chrome/chrome
, but I haven't confirmed for sure.This change fixes both of those issues by actually wrapping the existing
executable, instead of replacing it. I have locally tested it by with latest
versions (not specifying any build arguments) and with the latest Chrome beta
version. Both work.
As can be seen from current Chromium source, the wrapping code that was
used in chrome_launcher.sh has changed considerably. This change avoids
duplicating that code here and so makes it impossible for this to get out of
date. In addition, this will work with different Chrome versions which might
have different code in the wrapper.
X
in the preceding checkbox, I verify that I have signed the Contributor License Agreement