AllTest.HelloWorld.TakeScreenshot C# (CSharp) Method

TakeScreenshot() public method

public TakeScreenshot ( IWebDriver driver, string path ) : void
driver IWebDriver
path string
return void
        public void TakeScreenshot(IWebDriver driver, string path)
        {
            ITakesScreenshot screenshotDriver = driver as ITakesScreenshot;
            Screenshot screenshot = screenshotDriver.GetScreenshot();
            screenshot.SaveAsFile(path, System.Drawing.Imaging.ImageFormat.Png);
            screenshot.ToString();
        }
        [Test]