Skip to content

Commit 39aee4f

Browse files
authored
Update LocalGridConfiguration.md
1 parent 4969d91 commit 39aee4f

File tree

1 file changed

+23
-25
lines changed

1 file changed

+23
-25
lines changed

docs/LocalGridConfiguration.md

Lines changed: 23 additions & 25 deletions
Original file line numberDiff line numberDiff line change
@@ -32,27 +32,25 @@ com.nordstrom.automation.selenium.plugins.HtmlUnitPlugin
3232

3333
### Declaring Driver Dependencies
3434

35-
In addition to declaring driver plug-ins in the **ServiceLoader** provider configuration file, the Java project itself must declare the dependencies of the corresponding driver(s). These dependencies vary by the version of **Selenium API** you're using, and they're documented in the plug-in classes themselves. For example, here is the Maven dependency for the **Selenium 3** version of **`HtmlUnitPlugin`**:
36-
37-
```xml
38-
<dependency>
39-
<groupId>org.seleniumhq.selenium</groupId>
40-
<artifactId>htmlunit-driver</artifactId>
41-
<version>2.67.0</version>
42-
</dependency>
43-
```
35+
In addition to declaring driver plug-ins in the **ServiceLoader** provider configuration file, the Java project itself must declare the dependencies of the corresponding driver(s). These dependencies vary by the version of **Selenium API** you're using, and they're documented in the plug-in classes themselves. For example, here are the Maven dependency declarations for **`HtmlUnitPlugin`**:
36+
37+
| Selenium 3 | Selenium 4 |
38+
|:---|:---|
39+
| <pre>&lt;dependency&gt;<br/>&nbsp;&nbsp;&lt;groupId&gt;org.seleniumhq.selenium&lt;/groupId&gt;<br/>&nbsp;&nbsp;&lt;artifactId&gt;htmlunit-driver&lt;/artifactId&gt;<br/>&nbsp;&nbsp;&lt;version&gt;2.70.0&lt;/version&gt;<br/>&nbsp;&nbsp;&lt;exclusions&gt;<br/>&nbsp;&nbsp;&nbsp;&nbsp;&lt;exclusion&gt;<br/>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;groupId&gt;org.seleniumhq.selenium&lt;/groupId&gt;<br/>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;artifactId&gt;selenium-support&lt;/artifactId&gt;<br/>&nbsp;&nbsp;&nbsp;&nbsp;&lt;/exclusion&gt;<br/>&nbsp;&nbsp;&lt;/exclusions&gt;<br/>&lt;/dependency&gt;</pre> | <pre>&lt;dependency&gt;<br/>&nbsp;&nbsp;&lt;groupId&gt;com.nordstrom.ui-tools&lt;/groupId&gt;<br/>&nbsp;&nbsp;&lt;artifactId&gt;:htmlunit-remote&lt;/artifactId&gt;<br/>&nbsp;&nbsp;&lt;version&gt;4.33.0&lt;/version&gt;<br/>&lt;/dependency&gt;</pre> |
4440

4541
### Driver Plug-Ins for Desktop Browsers and Appium Engines
4642

4743
Driver plug-ins encapsulate the specific details related to launching **Selenium Grid** nodes that support the corresponding drivers. **Selenium Foundation** provides [driver plug-ins](ConfiguringProjectSettings.md#desktop-browser-support) for all of the major browsers. It also provides plug-ins for all of the major [automation engines](ConfiguringProjectSettings.md#appium-automation-engine-support) of the `Appium` project.
4844

4945
#### Drivers for Desktop Browsers
5046

51-
In addition to specifying browser driver plug-ins in the **ServiceLoader** provider configuration file, you'll need to [install](../README.md#installing-drivers) the corresponding browsers and matching drivers. The process for installing browsers and drivers varies. Just follow the instruction provided by the driver vendor.
47+
Since the release of **Selenium Foundation** [28.0.0](https://github.com/sbabcoc/Selenium-Foundation/releases/tag/v28.0.0), we now use **Selenium Manager** (Selenium 4) and **Web Driver Manager** (Selenium 3) to acquire compatible drivers for the browsers targeted by your tests. If the manager is unable to locate or download a required driver, **DriverExecutableNotFoundException** is thrown.
48+
49+
**NOTE**: This driver acquisition process is bypassed for test classes that implement the [DriverProvider](ConfiguringProjectSettings.md#testing-with-non-default-browser-sessions) interface.
5250

5351
#### Appium-Specific Configuration
5452

55-
In addition to specifying `Appium` driver plug-ins in the **ServiceLoader** provider configuration file, you'll need to [install](http://appium.io/docs/en/about-appium/getting-started) `Appium` and its dependencies. With a conventional installation, **Selenium Foundation** can use your system configuration to locate the components that comprise an `Appium` node. For non-standard installations, **Selenium Foundation** provides [settings](ConfiguringProjectSettings.md#appium-binary-paths) that enable you to supply explicit paths to these items.
53+
The automatic driver installation feature does not include management of Appium [automation engines](ConfiguringProjectSettings.md#appium-automation-engine-support), which must be installed separately, along with Appium's dependencies. With a conventional installation, **Selenium Foundation** can use your system configuration to locate the components that comprise an `Appium` node. For non-standard installations, **Selenium Foundation** provides [settings](ConfiguringProjectSettings.md#appium-binary-paths) that enable you to supply explicit paths to these items.
5654

5755
#### Appium Server Arguments
5856

@@ -62,21 +60,21 @@ In addition to specifying `Appium` driver plug-ins in the **ServiceLoader** prov
6260

6361
Although **Selenium Foundation** doesn't need the Java bindings for `Appium` to launch the Grid node, you'll need to declare this dependency in your Java projects to acquire device-specific drivers like **AndroidDriver** or **IOSDriver**. Here are the Maven artifact coordinates that correspond to each version of the **Selenium API**:
6462

65-
| Selenium 3 |
66-
|:---|
67-
| <pre>&lt;dependency&gt;<br/>&nbsp;&nbsp;&lt;groupId&gt;io.appium&lt;/groupId&gt;<br/>&nbsp;&nbsp;&lt;artifactId&gt;java-client&lt;/artifactId&gt;<br/>&nbsp;&nbsp;&lt;version&gt;7.4.1&lt;/version&gt;<br/>&lt;/dependency&gt;</pre> |
63+
| Selenium 3 | Selenium 4 |
64+
|:---|:---|
65+
| <pre>&lt;dependency&gt;<br/>&nbsp;&nbsp;&lt;groupId&gt;io.appium&lt;/groupId&gt;<br/>&nbsp;&nbsp;&lt;artifactId&gt;java-client&lt;/artifactId&gt;<br/>&nbsp;&nbsp;&lt;version&gt;7.6.0&lt;/version&gt;<br/>&lt;/dependency&gt;</pre> | <pre>&lt;dependency&gt;<br/>&nbsp;&nbsp;&lt;groupId&gt;io.appium&lt;/groupId&gt;<br/>&nbsp;&nbsp;&lt;artifactId&gt;java-client&lt;/artifactId&gt;<br/>&nbsp;&nbsp;&lt;version&gt;9.4.0&lt;/version&gt;<br/>&lt;/dependency&gt;</pre> |
6866

6967
### Additional Local Grid Settings
7068

71-
To enable the `Local Grid` feature to support **Selenium 3**, the core configuration in **`SeleniumConfig`** defines version-specific default values for several settings:
69+
To enable the `Local Grid` feature to support both **Selenium 3** and **Selenium 4**, the core configuration in **`SeleniumConfig`** defines version-specific default values for several settings:
7270

73-
| Setting | Property Name | `s3` Default |
74-
|---|---|---|
75-
| **`GRID_LAUNCHER`** | `selenium.grid.launcher` | org.openqa.grid.selenium.GridLauncherV3 |
76-
| **`LAUNCHER_DEPS`** | `selenium.launcher.deps` | [source](/src/selenium3/java/com/nordstrom/automation/selenium/SeleniumConfig.java#L163) |
77-
| **`HUB_PORT`** | `selenium.hub.port` | 4445 |
78-
| **`HUB_CONFIG`** | `selenium.hub.config` | hubConfig-s3.json |
79-
| **`NODE_CONFIG`** | `selenium.node.config` | nodeConfig-s3.json |
71+
| Setting | Property Name | `s3` Default | `s4` Default |
72+
|---|---|---|---|
73+
| **`GRID_LAUNCHER`** | `selenium.grid.launcher` | org.openqa.grid.selenium.GridLauncherV3 | org.openqa.selenium.grid.Bootstrap |
74+
| **`LAUNCHER_DEPS`** | `selenium.launcher.deps` | [source](/src/selenium3/java/com/nordstrom/automation/selenium/SeleniumConfig.java#L174) | [source](/src/selenium4/java/com/nordstrom/automation/selenium/SeleniumConfig.java#L323) |
75+
| **`HUB_PORT`** | `selenium.hub.port` | 4445 | 4446 |
76+
| **`HUB_CONFIG`** | `selenium.hub.config` | hubConfig-s3.json | hubConfig-s4.json |
77+
| **`NODE_CONFIG`** | `selenium.node.config` | nodeConfig-s3.json | nodeConfig-s4.json |
8078

8179
#### NOTES
8280

@@ -105,7 +103,7 @@ Once the configuration of the `Local Grid` is resolved, **Selenium Foundation**
105103
* ... with the grid launcher class specified by the **`GRID_LAUNCHER`** setting
106104
* ... with dependency contexts specified by the **`LAUNCHER_DEPS`** setting
107105
* ... with the hub configuration specified by the **`HUB_CONFIG`** setting
108-
* ... specifying the IP address returned by `GridUtility.getLocalHost()`
106+
* ... specifying the IP address returned by `HostUtils.getLocalHost()`
109107
* ... listening to the port specified by the **`HUB_PORT`** setting
110108
* Update the values of **`HUB_HOST`** and **`HUB_PORT`** to reflect the grid hub server configuration.
111109
* For each plug-in specified in the **ServiceLoader** [provider configuration file](#serviceloader-provider-configuration-file):
@@ -115,7 +113,7 @@ Once the configuration of the `Local Grid` is resolved, **Selenium Foundation**
115113
* ... with additional dependency contexts specified by the plug-in
116114
* ... propagating the values of System properties specified by the plug-in
117115
* ... with the [assembled driver-specific node configuration](#building-driver-specific-node-configurations)
118-
* ... specifying the IP address returned by `GridUtility.getLocalHost()`
116+
* ... specifying the IP address returned by `HostUtils.getLocalHost()`
119117
* ... listening to the port returned by `PortProber.findFreePort()`
120118
* `for `[**`Appium`**](ConfiguringProjectSettings.md#appium-binary-paths)`plug-in`:
121119
* ... with `Node` executable specified by the **`NODE_BINARY_PATH`** setting
@@ -124,7 +122,7 @@ Once the configuration of the `Local Grid` is resolved, **Selenium Foundation**
124122
* ... searching the global `Node` modules repository if unspecified
125123
* ... with command-line arguments specified by the **`APPIUM_CLI_ARGS`** setting
126124
* ... with the [assembled driver-specific node configuration](#building-driver-specific-node-configurations)
127-
* ... specifying the IP address returned by `GridUtility.getLocalHost()`
125+
* ... specifying the IP address returned by `HostUtils.getLocalHost()`
128126
* ... listening to the port returned by `PortProber.findFreePort()`
129127

130128
> Written with [StackEdit](https://stackedit.io/).

0 commit comments

Comments
 (0)