Capture video for a test case after running | Selenium C# Forum
10% Off Discount Avail now

Capture video for a test case after running

S
SYED MOHAMMAD SHARIF Post on 15/07/2019

Hi Team,

 

Can u send the code to capture a video for a test case in selenium c#.

F
Franz Kriesten Reply on 16/07/2019

public void Videorecording()

{

   ScreenCaptureJob scj = new ScreenCaptureJob();

   scj.OutputScreenCaptureFileName = @"D:\Selenium\Test.avi";

   scj.Start();

   IWebDriver diver = new FirefoxDriver();

   driver.Url = "http://google.com";

   Thread.Sleep(2000);

   scj.Stop();

   driver.Quit();

}

 

Hopefully this code is helpfull.

G

Instructor

gunjan Reply on 16/07/2019

Is it working now?