Selenium 4 Guide

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

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 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 20 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 20 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.

Maximum individual test run time is 2 hours but can be changed upon request.

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. Our recommendation is to set the readTimeout to a larger value than your longest individual test + 10 minutes.

Java Example:
ClientConfig config = ClientConfig.defaultConfig().readTimeout(Duration.ofMinutes(30));
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);