Test Script Execution Recording using Selenium Webdriver

Knoldus Inc.
Knoldus - Technical Insights
1 min readSep 28, 2017

Everyone has known how to take the screenshot in selenium web driver but when we ask how to take a video recording of the test script in web driver, people have no idea. So here I describe how to capture test script video in selenium web driver.

When the execution time of your script is too long so you can record your script and then you can analyze the script.

For the recording the script you have to download ATUTestRecorder jar file and include in your project.

So here I am writing the code of recording script.

[code language=”text”]

import org.openqa.selenium.WebDriver;

import org.openqa.selenium.WebDriver;

import org.openqa.selenium.chrome.ChromeDriver;
import atu.testrecorder.ATUTestRecorder;
public class SeleniumRecord

{

public static void main(String args[]) throws Exception
{
ATUTestRecorder OBJ = new ATUTestRecorder(“/home/manoj/Desktop/recording”,”RECORDINGVIEO-”,false);
OBJ.start();
System.setProperty(“webdriver.chrome.driver”, “/home/manoj/Downloads/chromedriver”);
WebDriver driver = new ChromeDriver();
driver.manage().window().maximize();
driver.get(“http://www.gmail.com");
Thread.sleep(2000);
driver.close();
OBJ.stop();;
}
[/code]
For recording, I am creating a folder recording and we already define the path of this folder in ATURecorder constructor.
After executing the test script, the script was recorded and you can check in your folder. here I am attaching the screenshot of the video.

videorecording

Feel free to ask me any question.

Thanks.

--

--

Knoldus Inc.
Knoldus - Technical Insights

Group of smart Engineers with a Product mindset who partner with your business to drive competitive advantage | www.knoldus.com