Delivered by FeedBurner

How To Record Selenium WebDriver Test Execution Video

If you can record full video for your selenium test execution automatically then It can be great feature for you. I think many of you are already aware about HOW TO CAPTURE SCREENSHOT of web page during test execution In selenium. Very only few people will be aware
about video recording of screen for selenium script. Webdriver do not have any built In facility to record video but we need to use some external services to record video.

Why video recording of selenium test?
Supposing you have a selenium script which takes 1 or more hours to complete the execution. So If you can record full test execution screen video then It will helps you to debug Issue more easily If any Issue arise In between. Also you can use recorded videos as a proof to show test execution activities to your client or manager.

Steps to record video for webdriver test execution

We will use ATU Test Recorder to record selenium test execution videos.

Step 1 : Download ATUTestRecorder jar file

  1. Download Location : You can download It from THIS PAGE. Click on link.
  2. Alternate Download Location : You can download It from THIS LOCATION too.
Both above links will provide you "" file to download. Download It and extract It. Thrre will be "ATUTestRecorder_2.1.jar" file In extracted folder.

Step 2 : Add "ATUTestRecorder_2.1.jar" In your project's build path

Add "ATUTestRecorder_2.1.jar" file In your project's build path. You can refer "Adding jar Files In Project's Build Path" section on THIS PAGE If you don't know how to add It.

Step 3 : Create folder to store recorded videos.
You need to create folder "ScriptVideos" In your D: drive. We will use this folder to store recorded videos.

Now we are ready to record videos for test execution.

Steps 4 : Create and run test

Create and run bellow given test In eclipse. As you see In bellow given script, video recording will be started In beginning because code to start video recording Is Inside @BeforeTest method. Video recording will stop at end of test because code to stop recording Is Inside @AfterTest annotation method.

package Testing_Pack;

import java.text.DateFormat;
import java.text.SimpleDateFormat;
import java.util.Date;
import java.util.concurrent.TimeUnit;
import org.openqa.selenium.Dimension;
import org.openqa.selenium.WebDriver;
import org.openqa.selenium.firefox.FirefoxDriver;
import org.testng.annotations.AfterTest;
import org.testng.annotations.BeforeTest;
import org.testng.annotations.Test;
import atu.testrecorder.ATUTestRecorder;

public class RecordTest {
 WebDriver driver;
 ATUTestRecorder recorder;

 public void setup() throws Exception {
  DateFormat dateFormat = new SimpleDateFormat("yy-MM-dd HH-mm-ss");
  Date date = new Date();
  //Created object of ATUTestRecorder
  //Provide path to store videos and file name format.
  recorder = new ATUTestRecorder("D:\\ScriptVideos\\","TestVideo-"+dateFormat.format(date),false);
  //To start video recording.
  driver = new FirefoxDriver();
  driver.manage().timeouts().implicitlyWait(10, TimeUnit.SECONDS);

 public void getScrollStatus() throws Exception {  
  driver.manage().window().setSize(new Dimension(400,768));
  driver.manage().window().setSize(new Dimension(400,400));
  driver.manage().window().setSize(new Dimension(1024,400));      
 public void Close() throws Exception {
  //To stop video recording.

At the end of test execution, Go to "D:\ScriptVideos" folder. There will be created .mov file. You can play It to see recorded video.


  1. This is a great posting! Will this work with Cucumber Java's Before and After hooks when running webdriver scenarios from Eclipse?

    Thank you!


  2. This is working like a charm. Thank you very much for this code.

  3. will this work with perl and how should I configure it.


  4. Hi,
    Iam getting Error in the path place
    ATUTestRecorder recorder = new ATUTestRecorder("D:\\D Drive\\SeleniumPractice\\","TestVideo-",+dateFormat.format(date),false);

    +dateFormat.format(date);+operator is undefined for the string.Please let me know what mistake i did

    1. sorround with try catch or add throws declaration.

  5. Hi Arvind,

    The 2 videos (*.mov) are saved with above 18 mb and 5mb, but when i tried to play them in VLC , its just blank black screen, not able to play them in windows media player. please need your help .

  6. Hi Arvind,

    The 2 videos (*.mov) are saved with above 18 mb and 5mb, but when i tried to play them in VLC , its just blank black screen, not able to play them in windows media player.

  7. Superb This is something new to me in Selenium Thanks a ton. really works very fine.

  8. It works well
    Just note that you're missing code line in //Created object of ATUTestRecorder
    you are Not object creation

  9. Hi All -

    Checked above video captures and it work well. However, have a concern, this works similar to monte recorder i.e. of windows recording, but what if we need to record on webdriver browser, if so this will be recorded even on remote/virtual machines.

    This current given above solutions shows black screen when executed over remote/virtual machines.

    Looking forward.


  10. hi,
    it couldnt play on windows media player.....
    please give me solution on that

  11. Did anyone got success to record the video on VMs remote machine