Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Selenoid: recording video of a running session

I'm using Selenoid live browser screen functionality to debug my tests. What is the recommended way to capture browser screen video?

like image 844
vania-pooh Avatar asked Jan 02 '26 02:01

vania-pooh


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:

  1. Selenoid must be running in as a binary (not as Docker container) otherwise the mapped ports are null.
  2. 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.

  1. Download the script: $ wget https://pypi.python.org/packages/1e/8e/40c71faa24e19dab555eeb25d6c07efbc503e98b0344f0b4c3131f59947f/vnc2flv-20100207.tar.gz\#md5\=8492e46496e187b49fe5569b5639804e

  2. Unpack the archive: $ tar zxf vnc2flv-20100207.tar.gz

  3. Install the script: $ python setup.py install --prefix=/usr/local

  4. Record the video: get Docker container ID via Selenoid /status and then find with Docker commands which port is mapped to the container port 5900 (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.

  5. Saved video file can be found in /tmp/selenoid_videos/gimme_love.flv.

like image 51
vania-pooh Avatar answered Jan 03 '26 22:01

vania-pooh



Donate For Us

If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!