Recording of test execution using ATUTestRecorder

This blog will show how to record test execution using ATUTestRecorder in selenium web driver.

Selenium web driver didn’t provide an inbuilt feature for recording test execution but by using the ATUTestRecorder it can be done. This recorded video helps to identify the issue more easily and can use this video as proof to show activities to stakeholders.

Let’s start integrating ATUTestRecorder in selenium webdriver by following steps:

  • Download ATUTestRecorder.jar and ATUReporter_Selenium_testNG.jar files.
  • Add these downloaded jar files into the build path.
  • Create a new folder in the project to store the recorded videos.
  • Add a new package(e.g. package_ATUTestRecorder) in the project and create a new class (e.g. into that.
  • Open class (\src\package_ATUTestRecorder\ and write below code into that.

package package_ATUTestRecorder;
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.testng.annotations.AfterTest;
import org.testng.annotations.BeforeTest;
import org.testng.annotations.Test;
import atu.testrecorder.ATUTestRecorder;

public class Demo {

WebDriver driver;
ATUTestRecorder recorder;

public void ATURecordersetup() throws Exception {
DateFormat dateFormat = new SimpleDateFormat(“yy-MM-dd HH-mm-ss”);
Date date = new Date();
recorder = new ATUTestRecorder(“Location of video folder”,”RecordedVideo-“+dateFormat.format(date),false);
String Chromepath = “E:\\chromedriver.exe”;
System.setProperty(“”, Chromepath);
driver = new ChromeDriver();
driver.manage().timeouts().implicitlyWait(20, TimeUnit.SECONDS);
public void ScreenResolutions() throws Exception {
driver.manage().window().setSize(new Dimension(500,700));
Thread. sleep(1000);
driver.manage().window().setSize(new Dimension(700,500));
Thread. sleep(1000);
public void Close() throws Exception {

  • Now, run the script and once it’s successfully executed it will create .mov extension video into a specified location.
  • Click to play recorded video into the player.

Related Posts