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.

Selenium 4 Firefox do not support using browserVersion "latest", use exact version instead. No need to specify binary location.

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();
You can select the session activity timeout when you configure your grid (Selenium Grid Timeout, 1-15 minutes). We recommend a shorter timeout value unless you have tests that waits for long periods of time for a condition to be met, like waiting for an email notificatin. Upon timeout the node will be freed up for another test.