I'm using Selenoid live browser screen functionality to debug my tests. What is the recommended way to capture browser screen video?
1 Answers
UPD2: released in Selenoid 1.4.0.
UPD1: currently working on native video recording feature in Selenoid. Should be available starting from release 1.4.0.
Selenoid supports showing video via VNC. What you need to do is just grab it from respective port. Here is one possible way to record video from VNC.
Requirements:
- Selenoid must be running in as a binary (not as Docker container) otherwise the mapped ports are
null
. - Docker APIs should be exposed to the outside world. (http://www.virtuallyghetto.com/2014/07/quick-tip-how-to-enable-docker-remote-api.html)
How to do that. One possible solution is to use vnc2flv script.
Download the script:
$ wget https://pypi.python.org/packages/1e/8e/40c71faa24e19dab555eeb25d6c07efbc503e98b0344f0b4c3131f59947f/vnc2flv-20100207.tar.gz\#md5\=8492e46496e187b49fe5569b5639804e
Unpack the archive:
$ tar zxf vnc2flv-20100207.tar.gz
Install the script:
$ python setup.py install --prefix=/usr/local
Record the video: get Docker container ID via Selenoid
/status
and then find with Docker commands which port is mapped to the container port5900
(the VNC port). Then type:flvrec.py -P <filename_for_password_file> -o <output_video_filename> <hub_host> <the_vnc_port>
, e.g.flvrec.py -P password.txt -o /tmp/selenoid_videos/gimme_love.flv 172.31.11.135 32774
.Saved video file can be found in
/tmp/selenoid_videos/gimme_love.flv
.

- 2,933
- 4
- 24
- 42