Skip to content

Commit

Permalink
[rust] Download latest version of Chrome for Testing (#11676) (#12353)
Browse files Browse the repository at this point in the history
* [rust] Download latest version of Chrome for Testing (#11676)

* [rust] Fix differences about CfT binaries in macOS

* [rust] Refactor function to request latest browser version from CfT

* [rust] Update checksum in cargo lock file

* [rust] Return browser path also when browser is local

* [rust] Check browser in PATH

* [rust] Set default TTL_browsers to 3600s (1 hour), like new TTL_drivers

* [rust] Improve error handling for unavailable driver

* [rust] Force operating system to Windows in for IExplorer

* [rust] Improve path escaping in Linux and macOS for browser discovery

* [rust] Return always browser path in results

---------

Co-authored-by: Diego Molina <diemol@users.noreply.github.com>
  • Loading branch information
bonigarcia and diemol committed Jul 24, 2023
1 parent 9772e55 commit 3afa319
Show file tree
Hide file tree
Showing 20 changed files with 701 additions and 325 deletions.
10 changes: 5 additions & 5 deletions rust/Cargo.Bazel.lock
@@ -1,5 +1,5 @@
{
"checksum": "e324d731a7a745741843d13e869e9d16f097a4e797b827d05d06dcbd0a5cb7b0",
"checksum": "0a20f0fe60fda64d9bb35f8a482f95239754a053b83e53e92d2a259eab911369",
"crates": {
"addr2line 0.19.0": {
"name": "addr2line",
Expand Down Expand Up @@ -7075,9 +7075,9 @@
},
"license": "Apache-2.0/ISC/MIT"
},
"selenium-manager 1.0.0-M3": {
"selenium-manager 1.0.0-M4": {
"name": "selenium-manager",
"version": "1.0.0-M3",
"version": "1.0.0-M4",
"repository": null,
"targets": [
{
Expand Down Expand Up @@ -7182,7 +7182,7 @@
"selects": {}
},
"edition": "2021",
"version": "1.0.0-M3"
"version": "1.0.0-M4"
},
"license": "Apache-2.0"
},
Expand Down Expand Up @@ -11822,7 +11822,7 @@
},
"binary_crates": [],
"workspace_members": {
"selenium-manager 1.0.0-M3": "rust"
"selenium-manager 1.0.0-M4": "rust"
},
"conditions": {
"aarch64-apple-darwin": [
Expand Down
2 changes: 1 addition & 1 deletion rust/Cargo.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion rust/Cargo.toml
@@ -1,6 +1,6 @@
[package]
name = "selenium-manager"
version = "1.0.0-M3"
version = "1.0.0-M4"
edition = "2021"
authors = ["Selenium <selenium-developers@googlegroups.com"]
license = "Apache-2.0"
Expand Down
10 changes: 6 additions & 4 deletions rust/README.md
Expand Up @@ -16,7 +16,7 @@ Selenium Manager can be executed using Cargo as follows:

```
$ cargo run -- --help
selenium-manager 1.0.0-M3
selenium-manager 1.0.0-M4
Selenium Manager is a CLI tool that automatically manages the browser/driver infrastructure required by Selenium.
Usage: selenium-manager [OPTIONS]
Expand All @@ -32,17 +32,17 @@ Options:
--browser-version <BROWSER_VERSION>
Major browser version (e.g., 105, 106, etc. Also: beta, dev, canary -or nightly- is accepted)
--browser-path <BROWSER_PATH>
Browser path (absolute) for browser version detection (e.g., /usr/bin/google-chrome, "/Applications/Google\ Chrome.app/Contents/MacOS/Google\ Chrome", "C:\Program Files\Google\Chrome\Application\chrome.exe")
Browser path (absolute) for browser version detection (e.g., /usr/bin/google-chrome, "/Applications/Google Chrome.app/Contents/MacOS/Google Chrome", "C:\Program Files\Google\Chrome\Application\chrome.exe")
--output <OUTPUT>
Output type: LOGGER (using INFO, WARN, etc.), JSON (custom JSON notation), or SHELL (Unix-like) [default: LOGGER]
--proxy <PROXY>
HTTP proxy for network connection (e.g., https://myproxy.net:8080)
--timeout <TIMEOUT>
Timeout for network requests (in seconds) [default: 180]
Timeout for network requests (in seconds) [default: 300]
--driver-ttl <DRIVER_TTL>
Driver TTL (time-to-live) [default: 3600]
--browser-ttl <BROWSER_TTL>
Browser TTL (time-to-live) [default: 0]
Browser TTL (time-to-live) [default: 3600]
--clear-cache
Clear cache folder (~/.cache/selenium)
--clear-metadata
Expand All @@ -53,6 +53,8 @@ Options:
Display TRACE messages
--offline
Offline mode (i.e., disabling network requests and downloads)
--force-browser-download
Force to download browser. Currently Chrome for Testing (CfT) is supported
-h, --help
Print help
-V, --version
Expand Down

0 comments on commit 3afa319

Please sign in to comment.