Add Installer::Chrome for automatic Chrome for Testing installation#5
Merged
Conversation
fea5dab to
45585f5
Compare
badce47 to
2d815e0
Compare
fef5b97 to
0c7798d
Compare
…ss all bridges. - Add Async::WebDriver::Installer::Chrome for automatic Chrome for Testing installation and management. Installer::Chrome.install(version) resolves the version via the Chrome for Testing JSON API, caches binaries under ~/.local/state/async-webdriver/ (XDG $XDG_STATE_HOME), and returns an Installation with browser_path and driver_path attributes. Version specifiers: :stable, :beta, :dev, :canary (channels), "148" (latest patch for major), or "148.0.7778.56" (exact version). The Installer:: namespace is structured to accommodate Installer::Firefox and other browsers in the future without structural changes. - Add Bridge::Chrome.for(version) as a convenience shorthand that installs if needed and returns a fully configured Chrome bridge. - Add Bridge::Chrome.install(version) for explicit pre-downloading in CI setup steps or bake tasks, before entering the Async reactor. - Rename path: to driver_path: and binary: to browser_path: on Bridge::Chrome, and rename path: to driver_path: on Bridge::Firefox and Bridge::Safari, for clarity and cross-bridge consistency. - Fix Bridge::Chrome#start, Bridge::Firefox#start, and Bridge::Safari#start not forwarding the bridge's own options (including :driver_path) to the Driver process — custom driver paths were silently ignored.
… calls.
- install(:stable) hits the API, downloads if needed, then creates/updates
a symlink at {state}/{platform}/stable -> {version}/.
- find(:stable) resolves the symlink locally — no network request.
- Chrome.for(:stable) calls find first; only falls through to install if
the symlink doesn't exist yet.
e3efa41 to
2452bc3
Compare
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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.
Summary
Adds automatic browser installation and management for Chrome for Testing, eliminating the need to manually download Chrome or chromedriver before running tests.
New API
Version specifiers
:stable,:beta,:dev,:canary"148""148.0.7778.56"Structure
The
Installer::namespace is designed to accommodateInstaller::Firefoxand others in the future without structural changes.Bug fix
Bridge::Chrome#startwas not forwarding@options(including:path) to theDriver, so setting a custom chromedriver path on the bridge had no effect on the actual process. Fixed by merging@optionsinstart.Installation details
~/.local/state/async-webdriver/{platform}/{version}/(XDG$XDG_STATE_HOME-compliant)async-http(already a dependency)unzip/tar(standard on macOS and Linux)com.apple.quarantine) are removed automatically after extraction