Skip to content

Commit fa1ee12

Browse files
authored
[rust] Simplify SM readme (#12623)
1 parent 327785f commit fa1ee12

File tree

1 file changed

+2
-81
lines changed

1 file changed

+2
-81
lines changed

rust/README.md

Lines changed: 2 additions & 81 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
# Selenium Manager
22

3-
Selenium Manager is a standalone tool that automatically manages the browser infrastructure required by Selenium (i.e., browsers and drivers). In other words, it implements the concept of the so-called _batteries included_ concept in Selenium.
3+
Selenium Manager is a command-line tool implemented in Rust that provides automated driver and browser management for Selenium. For details about its features, visit the [Selenium Manager documentation page](https://www.selenium.dev/documentation/selenium_manager/).
44

55
## Rust installation
66
Selenium Manager has been implemented as a CLI (Command-Line Interface) tool using [Rust](https://www.rust-lang.org/). Therefore, to run it from the source code, you need to [install Rust and Cargo](https://doc.rust-lang.org/cargo/getting-started/installation.html). On Linux and macOS systems, this is done as follows:
@@ -16,95 +16,16 @@ Selenium Manager can be executed using Cargo as follows:
1616

1717
```
1818
$ cargo run -- --help
19-
selenium-manager 1.0.0-M4
20-
Selenium Manager is a CLI tool that automatically manages the browser/driver infrastructure required by Selenium.
21-
22-
Usage: selenium-manager [OPTIONS]
23-
Options:
24-
--browser <BROWSER>
25-
Browser name (chrome, firefox, edge, iexplorer, safari, or safaritp)
26-
--driver <DRIVER>
27-
Driver name (chromedriver, geckodriver, msedgedriver, IEDriverServer, or safaridriver)
28-
--grid [<GRID_VERSION>]
29-
Selenium Grid. If version is not provided, the latest version is downloaded
30-
--driver-version <DRIVER_VERSION>
31-
Driver version (e.g., 106.0.5249.61, 0.31.0, etc.)
32-
--browser-version <BROWSER_VERSION>
33-
Major browser version (e.g., 105, 106, etc. Also: beta, dev, canary -or nightly- is accepted)
34-
--browser-path <BROWSER_PATH>
35-
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")
36-
--output <OUTPUT>
37-
Output type: LOGGER (using INFO, WARN, etc.), JSON (custom JSON notation), or SHELL (Unix-like) [default: LOGGER]
38-
--os <OS>
39-
Operating system (i.e., windows, linux, or macos)
40-
--arch <ARCH>
41-
System architecture (i.e., x32, x64, or arm64)
42-
--proxy <PROXY>
43-
HTTP proxy for network connection (e.g., https://myproxy.net:8080)
44-
--timeout <TIMEOUT>
45-
Timeout for network requests (in seconds) [default: 300]
46-
--ttl <TTL>
47-
TTL (time-to-live) for discovered versions (online) of drivers and browsers [default: 3600]
48-
--cache-path <CACHE_PATH>
49-
Local folder used to store downloaded assets (drivers and browsers), local metadata, and configuration file [default: ~/.cache/selenium]
50-
--clear-cache
51-
Clear cache folder (~/.cache/selenium)
52-
--clear-metadata
53-
Clear metadata file (~/.cache/selenium/selenium-manager.json)
54-
--debug
55-
Display DEBUG messages
56-
--trace
57-
Display TRACE messages
58-
--offline
59-
Offline mode (i.e., disabling network requests and downloads)
60-
--force-browser-download
61-
Force to download browser. Currently Chrome for Testing (CfT) is supported
62-
--avoid-browser-download
63-
Avoid to download browser (even when browser-version is specified)
64-
-h, --help
65-
Print help
66-
-V, --version
67-
Print version
6819
```
6920

7021
For instance, the command required to manage chromedriver is the following:
7122

7223
```
7324
$ cargo run -- --browser chrome
74-
INFO /home/boni/.cache/selenium/chromedriver/linux64/106.0.5249.61/chromedriver
75-
```
76-
If everything is correct, the last line contains the path to the driver (which will be used in the bindings). To get `DEBUG` traces, we can use:
77-
78-
```
79-
$ cargo run -- --browser chrome --debug
80-
DEBUG Clearing cache at: /home/boni/.cache/selenium
81-
DEBUG Using shell command to find out chrome version
82-
DEBUG Running sh command: "google-chrome --version"
83-
DEBUG Output { status: ExitStatus(unix_wait_status(0)), stdout: "Google Chrome 106.0.5249.91 \n", stderr: "" }
84-
DEBUG The version of chrome is 106.0.5249.91
85-
DEBUG Detected browser: chrome 106
86-
DEBUG Reading chromedriver version from https://chromedriver.storage.googleapis.com/LATEST_RELEASE_106
87-
DEBUG starting new connection: https://chromedriver.storage.googleapis.com/
88-
DEBUG Required driver: chromedriver 106.0.5249.61
89-
DEBUG starting new connection: https://chromedriver.storage.googleapis.com/
90-
DEBUG File extracted to /home/boni/.cache/selenium/chromedriver/linux64/106.0.5249.61/chromedriver (13158208 bytes)
91-
INFO /home/boni/.cache/selenium/chromedriver/linux64/106.0.5249.61/chromedriver
9225
```
9326

9427
Alternatively, you can replace `cargo run` with `bazel run //rust:selenium-manager`, for example `bazel run //rust:selenium-manager -- --browser chrome --debug`
9528

9629
### Windows ARM
9730

98-
There are issues when building on Windows ARM64. To workaround, use `cargo` with `--config Cargo.aarch64-pc-windows-msvc.toml` flag.
99-
100-
## Roadmap
101-
The implementation of Selenium Manager has been planned to be incremental. In the beginning, it should be a component that each Selenium language binding can optionally use to manage the local browser infrastructure. In the mid-term, and as long as it becomes more stable and complete, it could be used as the default tool for automated browser and driver management. All in all, the milestone we propose are the following:
102-
103-
| **Milestone** | **Description** |
104-
|-----------------------------------------|---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|
105-
| M1: Driver management | <ul><li>Beta version of the Selenium Manager.</li> <li>Focused on driver management for Chrome, Firefox, and Edge.</li> <li>Selenium Manager compiled for Windows, Linux, and macOS (in GH Actions).</li> <li>Available in Selenium binding languages (Java, JavaScript, Python, Ruby, and C#).</li> <li>Used as a fallback for language bindings, when the driver is not found.</li> <li>Selenium Manager binaries bundled within the binding languages.</li></ul> |
106-
| M2: Driver management for IEDriver | <ul><li>Include driver support for IExplorer.</li> <li>Allow Selenium Manager to be used as a Rust lib crate.</li> <li>Support for browser beta/canary/dev versions (for Chrome, Firefox, Edge).</li> <li>Enhance error handling in Rust logic.</li> </ul> |
107-
| M3: Rich configuration | <ul><li>Proxy support in Selenium Manager.</li> <li>Extra configuration capabilities from binding languages to Selenium Manager (e.g., force to use a given driver version, etc.).</li></ul> |
108-
| M4: Browser management: Chrome/Chromium | <ul><li>Analyze how to make browser management for Chrome (or Chromium, if Chrome is not possible).</li> <li>Implement this feature in Windows, Linux, and macOS.</li></ul> |
109-
| M5: Browser management: Firefox | <ul><li>Analyze how to make browser management for Firefox.</li> <li>Implement this feature in Windows, Linux, and macOS.</li></ul> |
110-
| M6: Browser management: Edge | <ul><li>Analyze how to make browser management for Edge.</li> <li>Implement this feature in Windows, Linux, and macOS.</li></ul> |
31+
There are issues when building on Windows ARM64. To workaround, use `cargo` with `--config Cargo.aarch64-pc-windows-msvc.toml` flag.

0 commit comments

Comments
 (0)