Skip to content

Commit

Permalink
Update how Selenium Manager is described (#1390)[deploy site]
Browse files Browse the repository at this point in the history
* Update how Selenium Manager is described

[deploy site]

* fix links

---------

Co-authored-by: Sri Harsha <12621691+harsha509@users.noreply.github.com>
  • Loading branch information
titusfortner and harsha509 committed May 26, 2023
1 parent 13abc32 commit d0124a4
Show file tree
Hide file tree
Showing 36 changed files with 1,412 additions and 937 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -49,12 +49,12 @@ ecosystem emerged. Such as: [WebDriverManager](https://bonigarcia.dev/webdriverm
[WebDriverManager.Net](https://github.com/rosolko/WebDriverManager.Net) for C#.

All these projects served as an
[inspiration]({{< ref "../../documentation/webdriver/getting_started/install_drivers.md#2-driver-management-software" >}})
[inspiration]({{< ref "../../documentation/webdriver/troubleshooting/errors/driver_location.md#driver-management-libraries" >}})
and as a clear sign that the community needed this feature to be
built-in Selenium. In addition, a [survey](https://www.selenium.dev/blog/2021/selenium-survey-results/)
done on January 2021 showed that most Selenium users want to get rid of the driver management
problem. Plus, the fact that the
[driver installation](https://www.selenium.dev/documentation/webdriver/getting_started/install_drivers/) page is
[driver installation](https://www.selenium.dev/documentation/webdriver/troubleshooting/errors/driver_location/) page is
by far the most visited one in the Selenium documentation.

### Selenium Manager in detail
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -16,8 +16,8 @@ aliases: [
* Java 11 or higher installed
* Browser(s) installed
* Browser driver(s)
* If using Selenium 4.6, Selenium Manager will configure the drivers for Chrome, Firefox, and Edge [if they are not found on the `PATH`]({{< ref "../webdriver/getting_started/install_drivers.md#1-selenium-manager-beta" >}}).
* [Installed and on the `PATH`]({{< ref "../webdriver/getting_started/install_drivers.md#3-the-path-environment-variable" >}})
* [Selenium Manager]({{< ref "../selenium_manager/" >}}) will configure the drivers automatically if you add `--selenium-manager true`.
* [Installed and on the `PATH`]({{< ref "../webdriver/troubleshooting/errors/driver_location.md#use-the-path-environment-variable" >}})
* Download the Selenium Server jar file from the [latest release](https://github.com/SeleniumHQ/selenium/releases/latest)
1. Start the Grid
* `java -jar selenium-server-<version>.jar standalone`
Expand Down Expand Up @@ -47,7 +47,7 @@ single machine.
**Standalone** is also the easiest mode to spin up a Selenium Grid. By default, the server
will listen for `RemoteWebDriver` requests on [http://localhost:4444](http://localhost:4444).
By default, the server will detect the available drivers that it can use from the System
[`PATH`]({{< ref "../webdriver/getting_started/install_drivers.md#3-the-path-environment-variable" >}}).
[`PATH`]({{< ref "../webdriver/troubleshooting/errors/driver_location.md#use-the-path-environment-variable" >}}).

```shell
java -jar selenium-server-<version>.jar standalone
Expand Down Expand Up @@ -84,7 +84,7 @@ By default, the server will listen for `RemoteWebDriver` requests on [http://loc
#### Node

During startup time, the **Node** will detect the available drivers that it can use from the System
[`PATH`]({{< ref "../webdriver/getting_started/install_drivers.md#3-the-path-environment-variable" >}}).
[`PATH`]({{< ref "../webdriver/troubleshooting/errors/driver_location.md#use-the-path-environment-variable" >}}).

The command below assumes the **Node** is running on the same machine where the **Hub** is running.
```shell
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -18,8 +18,8 @@ aliases: [
- Java 11 もしくはそれ以上がインストールされていること
- ブラウザーがインストールされていること
- ブラウザードライバー
- Selenium 4.6 を使用していれば、Chrome, Firefox, Edge ドライバーが [`PATH` から見つからない場合]({{< ref "../webdriver/getting_started/install_drivers.md#1-selenium-manager-beta" >}}) Selenium Manager がドライバーを設定します。
- [`PATH` が通っているインストール済みのもの]({{< ref "../webdriver/getting_started/install_drivers.md#3-the-path-environment-variable" >}})
- [Selenium Manager]({{< ref "../selenium_manager/" >}}) will configure the drivers automatically if you add `--selenium-manager true`.
- [`PATH` が通っているインストール済みのもの]({{< ref "../webdriver/troubleshooting/errors/driver_location.md#use-the-path-environment-variable" >}})
- [最新の](https://github.com/SeleniumHQ/selenium/releases/latest) Selenium Server jar ファイルをダウンロードしていること

1. Grid の起動
Expand Down Expand Up @@ -47,7 +47,7 @@ Grid は 6 つの異なる[コンポーネント]({{< ref "components.md" >}})

**スタンドアロン**は Selenium Grid を起動する最も簡単な方法でもあります。
デフォルトではサーバーは[http://localhost:4444](http://localhost:4444)`RemoteWebDriver` リクエストをリッスンします。
サーバーはデフォルトでシステム[パス]({{< ref "../webdriver/getting_started/install_drivers.md#3-the-path-environment-variable" >}})上の利用可能なドライバーを検出します。
サーバーはデフォルトでシステム[パス]({{< ref "../webdriver/troubleshooting/errors/driver_location.md#use-the-path-environment-variable" >}})上の利用可能なドライバーを検出します。

```shell
java -jar selenium-server-<version>.jar standalone
Expand Down Expand Up @@ -83,7 +83,7 @@ java -jar selenium-server-<version>.jar hub

#### ノード

**ノード**は起動時にシステムの[パス]({{< ref "../webdriver/getting_started/install_drivers.md#3-the-path-environment-variable" >}})
**ノード**は起動時にシステムの[パス]({{< ref "../webdriver/troubleshooting/errors/driver_location.md#use-the-path-environment-variable" >}})
が通っている利用可能なドライバーを検出します。

次のコマンドは**ノード****ハブ**と同じマシン上で動作していることを前提としています。
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,8 @@ aliases: [
* Java 11 ou superior instalado
* Navegador(es) instalados
* Drivers do(s) navegador(es)
* Se usar o Selenium 4.6, o Selenium Manager irá configurar os navegadores Chrome, Firefox e Edge [se não forem encontrados no `PATH`]({{< ref "../webdriver/getting_started/install_drivers.md#1-gerenciador-selenium-smallbetasmall" >}}).
* [Selenium Manager]({{< ref "../selenium_manager/" >}}) will configure the drivers automatically if you add `--selenium-manager true`.
* [Installed and on the `PATH`]({{< ref "../webdriver/troubleshooting/errors/driver_location.md#use-the-path-environment-variable" >}})
* Obter o ficheiro Selenium Server Jar a partir da [última release](https://github.com/SeleniumHQ/selenium/releases/latest)
1. Iniciar a Grid
* `java -jar selenium-server-<version>.jar standalone`
Expand Down Expand Up @@ -45,7 +46,7 @@ comando, num único processo. **Standalone** só funcionará numa única máquin
**Standalone** é também a forma mais simples de colocar uma Selenium Grid em funcionamento.
Por omissão, o servidor irá escutar por pedidos `RemoteWebDriver` em [http://localhost:4444](http://localhost:4444).
O servidor irá também detectar os drivers disponíveis no
[`PATH`]({{< ref "../webdriver/getting_started/install_drivers.md#3-a-variável-de-ambiente--path" >}}).
[`PATH`]({{< ref "../webdriver/troubleshooting/errors/driver_location.md#3-a-variável-de-ambiente--path" >}}).

```shell
java -jar selenium-server-<version>.jar standalone
Expand Down Expand Up @@ -81,7 +82,7 @@ Por omissão, o servidor irá estar à escuta por pedidos de sessão `RemoteWebD
#### Node

Ao iniciar, o **Node** irá detectar os drivers disponíveis através do
[`PATH`]({{< ref "../webdriver/getting_started/install_drivers.md#3-a-variável-de-ambiente--path" >}}).
[`PATH`]({{< ref "../webdriver/troubleshooting/errors/driver_location.md#3-a-variável-de-ambiente--path" >}}).

O comando exemplo seguinte assume que o **Node** está a executar na mesma máquina onde o **Hub** está em execução.
```shell
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -26,8 +26,8 @@ aliases: [
* 需要安装 Java 11 或更高版本
* 需要安装浏览器
* 需要安装浏览器驱动程序
* 如果使用 Selenium 4.6,Selenium Manager 将为 Chrome、Firefox 和 Edge 配置驱动程序[(如果它们在 PATH 上找不到)]({{< ref "../webdriver/getting_started/install_drivers.md#1-selenium-manager-smallbetasmall" >}}).
* [需要已经安装并配置了 PATH 环境变量]({{< ref "../webdriver/getting_started/install_drivers.md#3-path-环境变量" >}})
* [Selenium Manager]({{< ref "../selenium_manager/" >}}) will configure the drivers automatically if you add `--selenium-manager true`.
* [需要已经安装并配置了 PATH 环境变量]({{< ref "../webdriver/troubleshooting/errors/driver_location.md#3-path-环境变量" >}})
*[最新的发布版本](https://github.com/SeleniumHQ/selenium/releases/latest)下载 Selenium Server jar 文件
1. 启动 Grid
* `java -jar selenium-server-<version>.jar standalone`
Expand All @@ -49,7 +49,7 @@ Grid由六个不同的[组件]({{< ref "components.md" >}})组成,这使您可

**Standalone** 可以将所有 Grid [组件]({{< ref "components.md" >}}) 无缝地整合成一个单独的实体。在 **Standalone** 模式下运行 Grid,只需一个命令即可获得一个完整的 Grid,并在一个进程中运行。**Standalone** 只能在一台机器上运行。

**Standalone** 模式也是最容易启动 Selenium Grid 的模式。默认情况下,服务器将在 [http://localhost:4444](http://localhost:4444) 上监听 `RemoteWebDriver` 请求,并且服务器将从系统 [PATH]({{< ref "../webdriver/getting_started/install_drivers.md#3-path-环境变量" >}}) 中检测可以使用的驱动程序。
**Standalone** 模式也是最容易启动 Selenium Grid 的模式。默认情况下,服务器将在 [http://localhost:4444](http://localhost:4444) 上监听 `RemoteWebDriver` 请求,并且服务器将从系统 [PATH]({{< ref "../webdriver/troubleshooting/errors/driver_location.md#3-path-环境变量" >}}) 中检测可以使用的驱动程序。

```shell
java -jar selenium-server-<version>.jar standalone
Expand Down Expand Up @@ -83,7 +83,7 @@ java -jar selenium-server-<version>.jar hub

#### Node

在启动时,**Node**将从系统的[`PATH`]({{< ref "../webdriver/getting_started/install_drivers.md#3-path-环境变量" >}})中检测可用的驱动程序。
在启动时,**Node**将从系统的[`PATH`]({{< ref "../webdriver/troubleshooting/errors/driver_location.md#3-path-环境变量" >}})中检测可用的驱动程序。

以下命令假设**Node**正在运行的机器与**Hub**在同一台机器上。

Expand Down
80 changes: 80 additions & 0 deletions website_and_docs/content/documentation/selenium_manager.en.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,80 @@
---
title: "Selenium Manager (Beta)"
linkTitle: "Selenium Manager"
weight: 11
description: >
The Selenium Manager is a binary generated with Rust that manages driver installation.
---

## Applicability

***Selenium bindings use this tool by default, so you do not need to download it or
add anything to your code or do anything else to use it.***

If, however, you need to access drivers with `curl` or a REST client,
use one of the unofficial Selenium implementations,
have special network requirements, or just want to better
understand what the tool is doing, please continue reading.

## Usage

The Selenium bindings use the Manager automatically so long as the following conditions are met:
* The driver location isn't specified in a `Service` class
* A 3rd party driver manager is not installed
* No drivers exist in directories included in the `PATH` Environment Variable

To use it with Selenium Grid:
* Start the grid with this additional argument: `--selenium-manager true`

## Status

This tool is still in beta, and Selenium is slowly adding support for its features.
The current implementation is a "fall-back" option, which means it should only get used
if the code execution would otherwise fail. So long as you specify the location of the
driver in the appropriate [Service class]({{< ref "webdriver/drivers/service.md" >}})
(or using System Properties in Java), the Selenium Manager will not be used.

### History

The first implementation of Selenium Manager was released in Selenium 4.6. We
made an announcement about it [on our blog](https://www.selenium.dev/blog/2022/introducing-selenium-manager/).

* Selenium 4.7 added support for IE Driver and improved error logging
* Selenium 4.8 added support for beta and development versions of browsers
* Selenium 4.9 added support for locating drivers based on provided location of browser binary

### Future

We are tracking the various features as a [GitHub Project](https://github.com/orgs/SeleniumHQ/projects/5/views/1).
The major features we are looking to support:
* Proxies
* Warning/fixing problems with drivers on `PATH`
* Browser downloads based on `browserVersion` provided in capabilities

## Configuration

Specific values can be overridden by specifying environment variables or by using a config file
located by default at `~/.cache/selenium/selenium-manager-config.toml`.

| CLI | Env Variable | Config File |
|----------------------------------|----------------------------------------------------|-----------------------------------------------------|
| --browser chrome | SE_BROWSER=chrome | browser = "chrome" |
| --driver chromedriver | SE_DRIVER=chromedriver | driver = "chromedriver" |
| --browser-version 106 | SE_BROWSER_VERSION=106 | browser-version = "106" |
| --driver-version 106.05249.61 | SE_DRIVER_VERSION=106.0.5249.61 | driver-version = "106.0.5249.61" |
| --browser-path /path/to/chromium | SE_BROWSER_PATH=/path/to/chromium | browser-path = "/path/to/chromium" |
| | SE_OS=macos | os = "macos" |
| | SE_ARCH=x64 | arch = "x64" |
| --proxy user@pass:myproxy:8080 | SE_PROXY=user@pass:myproxy:8080 | proxy = "user@pass:myproxy:8080" |
| --browser-ttl 0 | SE_BROWSER_TTL=0 | browser-ttl = 0 |
| --driver-ttl 86400 | SE_DRIVER_TTL=86400 | driver-ttl = 86400 |
| | SE_DRIVER_MIRROR=http://my-chromedriver-mirror.net | driver-mirror = "http://my-chromedriver-mirror.net" |
| --clear-cache | | |
| --clear-metadata | | |
| | SE_CACHE_PATH=/my/custom/cache | cache-path = "/my/custom/cache" |
| --debug | SE_DEBUG=true | debug true |
| --trace | SE_TRACE=true | |

## Development

Selenium Manager is written in Rust and compiled into binaries using GitHub Actions.
Loading

0 comments on commit d0124a4

Please sign in to comment.