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
public void TakeScreenshot(string saveLocation) { var location = GetPath() + _name + "\\" + saveLocation + ".png"; var ssdriver = _driver as ITakesScreenshot; var screenshot = ssdriver.GetScreenshot(); screenshot.SaveAsFile(location, ImageFormat.Png); }
This code will help you to take screen shot