Video recording the Selenium Automation scripts 

Its been a long time since I have posted an article, been very busy with work. So, here is an article about video recording the automation scripts that you running.

I have used a third part library called “” to record the testing. This is done when there are issues. The recorded video is attached to the Jira ticket for the developer to see the steps and also know the issue.

Here are the libraries you need import.

import org.monte.screenrecorder.ScreenRecorder;
import static;
import static;
import static;
import static;
import static;
import static;
import static;
import static;
import static*;</code>

//Here is the method to start the recording
public void startRecording() throws Exception {
        GraphicsConfiguration gc = GraphicsEnvironment
        this.screenRecorder = new ScreenRecorder(gc,
                new Format(MediaTypeKey, MediaType.FILE, MimeTypeKey, MIME_AVI),
                new Format(MediaTypeKey, MediaType.VIDEO, EncodingKey, ENCODING_AVI_TECHSMITH_SCREEN_CAPTURE,
                        CompressorNameKey, ENCODING_AVI_TECHSMITH_SCREEN_CAPTURE,
                        DepthKey, 24, FrameRateKey, Rational.valueOf(15),
                        QualityKey, 1.0f,
                        KeyFrameIntervalKey, 15 * 60),
                new Format(MediaTypeKey, MediaType.VIDEO, EncodingKey, "black",
                        FrameRateKey, Rational.valueOf(30)),


//Here is the method to stop the recording
  public void stopRecording() throws Exception {
        if (record.equalsIgnoreCase("Yes")) {

For the video to work make sure you use both the startRecording and stopRecording methods.

Useful links:

Author: Pavandeep Puddupakkam on May 24, 2013
Category: Java, WebDriver
Tags: , ,
Selenium Webdriver Forum -The Online Community for Selenium Webdriver and Selenium RC Users and Professionals
2 responses to “Video recording the Selenium Automation scripts”
  1. Uma says:

    Hello, Monte recorder is works fine in my machine, when i had put the code in Jenkins server, if the machine where the job is running is not logged in, the recorded video is just black, Thanks in advance for the help

  2. Pavandeep Puddupakkam says:

    You can add the external jar file MonteScreenRecorder.jar from

    In intellij you can add the external jar file as under.

    File -> Project Structure (ctrl + shift + alt + s ) -> Module -> Dependencies -> add… -> Project Library -> Attach Jar

Leave a Reply

Last articles