Starting with version 20260303, docker-selenium containers feature a new video recording mode called event-driven, replacing the older legacy mode. In this new setup, there’s no need to stop and restart the video recorder container for each session. Instead, the web driver container signals the video container to start and stop recording while keeping it running the entire time.
The repo https://github.com/javiertuya/selenium-docker-test includes performance tests to measure the overhead introduced by Selenium in a test, such as starting and stopping the driver and the time needed to manage recordings. The results are summarized in this table, in seconds, based on times recorded over 5 executions, excluding the first one:
| Mode |
Time to start |
Time to stop |
Total |
Version |
run |
| Dynamic Grid |
3.9 |
6.2 |
10.1 |
20260202 |
(1) |
| Current (legacy) |
0.6 |
2.0 |
2.6 |
20260202 |
(1) |
| New (event-driven) |
0.4 |
1.3 |
1.7 |
20260505 |
(2) |
To support the new event-driven mode:
- Ensure compatibility between old and new video controller services and APIs.
- On the first run of a video controller instance, before creating the driver, call a new endpoint named “mode.”
- Detect the container’s running mode to maintain legacy compatibility: event-driven mode is active when SE_VIDEO_EVENT_DRIVEN=true or if the endpoint is missing.
- Check logs to confirm the video recorder is ready.
- Skip the start endpoint since the driver begins recording automatically.
- Call the stop endpoint after quitting the driver (unlike legacy mode, which calls it before quitting)
- then check logs to confirm the recorder has finished and
- download the videos.
Starting with version 20260303, docker-selenium containers feature a new video recording mode called event-driven, replacing the older legacy mode. In this new setup, there’s no need to stop and restart the video recorder container for each session. Instead, the web driver container signals the video container to start and stop recording while keeping it running the entire time.
The repo https://github.com/javiertuya/selenium-docker-test includes performance tests to measure the overhead introduced by Selenium in a test, such as starting and stopping the driver and the time needed to manage recordings. The results are summarized in this table, in seconds, based on times recorded over 5 executions, excluding the first one:
To support the new event-driven mode: