Selenium 4 Guide
Some quick bullet points to help you get started running tests on a Selenium 4 grid:
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:
Map gridlasticOptions = new HashMap<>();
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
. We only have Java examples at this moment.
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.
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.