Best way to take screenshots of tests in Selenium 2?

后端 未结 13 2170
别跟我提以往
别跟我提以往 2020-11-28 04:29

I need a way to take screenshots of my functional tests. Right now I\'m using Selenium 2 with C# bindings. I pretty much want to take a screenshot at the end of the test to

13条回答
  •  没有蜡笔的小新
    2020-11-28 04:51

            ScreenCaptureJob scj;
            scj = new ScreenCaptureJob();
            // Specify the path & file name in which you want to save         
            scj.OutputScreenCaptureFileName = @"C:\Users\jpavankumar\Desktop\Screencaptuere\ScreenRecording4.wmv";
            // Start the Screen Capture Job
            scj.Start(); scj.Stop();
    

    Try this code out here ... hope it will be useful to you .... !

提交回复
热议问题