Selenium 4 Guide

Some quick bullet points to help you get started running tests on a Selenium 4 grid:

We support deploying a selenium 4 grid starting with version 4.1.4. This means your selenium grid hub/nodes runs on lets say selenium version 4.1.4 but you can still use a different V4 version locally, like Javascript 4.1.1, that your language bindings support, see selenium project release notes for specific language bindings updates.

Selenium 4 supported browsers start with Chrome and Microsoft Edge 99, and Firefox 98 on Windows 10 and Linux, see test environments.

Selenium 4 only supports W3C capabilities so browserVersion (replaces version) and platformName (replaces platform).

Video recording of tests is still disabled by default like in V2/V3. In V4 you enable video recording differently like this (java):

Map gridlasticOptions = new HashMap<>();
gridlasticOptions.put("video", "true");
options.setCapability("gridlastic:options", gridlasticOptions);
The Pre-launch API has changed in V4 and now you can more precisely pre-launch and wait for grid nodes to become available before you start your tests. Pre-launching nodes before your start your tests can help minimize non deterministic test failures.

DevTools support, see selenium grid java DevTools examples. Note: some frameworks do not yet have support for WSS (WebSocket Secure) like C# but you can override the default WSS for your grid in your grid configuration to use WS instead for the DevTools session only. You can still use the https endpoint for your grid hub as normal.

There is a fixed grid queue session request timeout of 10 minutes so do not execute more tests in parallel than you have max grid nodes for your account as they might not be processed within 10 minutes and will just queue up and timeout.

There is a fixed grid session timeout of 15 minutes. After this time the node is freed up for another test.

Use a read timeout when you create the driver. If there are no nodes registered to the grid, Gridlastic autoscaling will launch nodes to satisfy demand but it can take several minutes before the nodes are up and running processing tests.

Java Example:
ClientConfig config = ClientConfig.defaultConfig().readTimeout(Duration.ofMinutes(10));
driver = RemoteWebDriver.builder().address(new URL(hub)).oneOf(options).config(config).build();
An alternative to providing your grid credentials in the hub url is to pass them in as options like in this Java example:
Map gridlasticOptions = new HashMap<>();
gridlasticOptions.put("video", true);
gridlasticOptions.put("gridlasticUser", "USERNAME");
gridlasticOptions.put("gridlasticKey", "ACCESS_KEY");
options.setCapability("gridlastic:options", gridlasticOptions);