|
| 1 | +--- |
| 2 | +title: "Selenium Manager (Beta)" |
| 3 | +linkTitle: "Selenium Manager" |
| 4 | +weight: 11 |
| 5 | +description: > |
| 6 | + The Selenium Manager is a binary generated with Rust that manages driver installation. |
| 7 | +--- |
| 8 | + |
| 9 | +## Applicability |
| 10 | + |
| 11 | +***Selenium bindings use this tool by default, so you do not need to download it or |
| 12 | +add anything to your code or do anything else to use it.*** |
| 13 | + |
| 14 | +If, however, you need to access drivers with `curl` or a REST client, |
| 15 | +use one of the unofficial Selenium implementations, |
| 16 | +have special network requirements, or just want to better |
| 17 | +understand what the tool is doing, please continue reading. |
| 18 | + |
| 19 | +## Usage |
| 20 | + |
| 21 | +The Selenium bindings use the Manager automatically so long as the following conditions are met: |
| 22 | +* The driver location isn't specified in a `Service` class |
| 23 | +* A 3rd party driver manager is not installed |
| 24 | +* No drivers exist in directories included in the `PATH` Environment Variable |
| 25 | + |
| 26 | +To use it with Selenium Grid: |
| 27 | +* Start the grid with this additional argument: `--selenium-manager true` |
| 28 | + |
| 29 | +## Status |
| 30 | + |
| 31 | +This tool is still in beta, and Selenium is slowly adding support for its features. |
| 32 | +The current implementation is a "fall-back" option, which means it should only get used |
| 33 | +if the code execution would otherwise fail. So long as you specify the location of the |
| 34 | +driver in the appropriate [Service class]({{< ref "webdriver/drivers/service.md" >}}) |
| 35 | +(or using System Properties in Java), the Selenium Manager will not be used. |
| 36 | + |
| 37 | +### History |
| 38 | + |
| 39 | +The first implementation of Selenium Manager was released in Selenium 4.6. We |
| 40 | +made an announcement about it [on our blog](https://www.selenium.dev/blog/2022/introducing-selenium-manager/). |
| 41 | + |
| 42 | +* Selenium 4.7 added support for IE Driver and improved error logging |
| 43 | +* Selenium 4.8 added support for beta and development versions of browsers |
| 44 | +* Selenium 4.9 added support for locating drivers based on provided location of browser binary |
| 45 | + |
| 46 | +### Future |
| 47 | + |
| 48 | +We are tracking the various features as a [GitHub Project](https://github.com/orgs/SeleniumHQ/projects/5/views/1). |
| 49 | +The major features we are looking to support: |
| 50 | +* Proxies |
| 51 | +* Warning/fixing problems with drivers on `PATH` |
| 52 | +* Browser downloads based on `browserVersion` provided in capabilities |
| 53 | + |
| 54 | +## Configuration |
| 55 | + |
| 56 | +Specific values can be overridden by specifying environment variables or by using a config file |
| 57 | +located by default at `~/.cache/selenium/selenium-manager-config.toml`. |
| 58 | + |
| 59 | +| CLI | Env Variable | Config File | |
| 60 | +|----------------------------------|----------------------------------------------------|-----------------------------------------------------| |
| 61 | +| --browser chrome | SE_BROWSER=chrome | browser = "chrome" | |
| 62 | +| --driver chromedriver | SE_DRIVER=chromedriver | driver = "chromedriver" | |
| 63 | +| --browser-version 106 | SE_BROWSER_VERSION=106 | browser-version = "106" | |
| 64 | +| --driver-version 106.05249.61 | SE_DRIVER_VERSION=106.0.5249.61 | driver-version = "106.0.5249.61" | |
| 65 | +| --browser-path /path/to/chromium | SE_BROWSER_PATH=/path/to/chromium | browser-path = "/path/to/chromium" | |
| 66 | +| | SE_OS=macos | os = "macos" | |
| 67 | +| | SE_ARCH=x64 | arch = "x64" | |
| 68 | +| --proxy user@pass:myproxy:8080 | SE_PROXY=user@pass:myproxy:8080 | proxy = "user@pass:myproxy:8080" | |
| 69 | +| --browser-ttl 0 | SE_BROWSER_TTL=0 | browser-ttl = 0 | |
| 70 | +| --driver-ttl 86400 | SE_DRIVER_TTL=86400 | driver-ttl = 86400 | |
| 71 | +| | SE_DRIVER_MIRROR=http://my-chromedriver-mirror.net | driver-mirror = "http://my-chromedriver-mirror.net" | |
| 72 | +| --clear-cache | | | |
| 73 | +| --clear-metadata | | | |
| 74 | +| | SE_CACHE_PATH=/my/custom/cache | cache-path = "/my/custom/cache" | |
| 75 | +| --debug | SE_DEBUG=true | debug true | |
| 76 | +| --trace | SE_TRACE=true | | |
| 77 | + |
| 78 | +## Development |
| 79 | + |
| 80 | +Selenium Manager is written in Rust and compiled into binaries using GitHub Actions. |
0 commit comments