3

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

just-boris
  • 8,201
  • 5
  • 41
  • 77
vania-pooh
  • 2,588
  • 3
  • 20
  • 39

1 Answers1

3

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.

vania-pooh
  • 2,588
  • 3
  • 20
  • 39