IWebDriver Driver = new ChromeDriver();
Screenshot screenshot = ((ITakesScreenshot)Driver).GetScreenshot();
Screenshot – Represents Image of the page
currently loaded in browser.
GetScreenshot() - Gets a
OpenQA.Selenium.Screenshot object representing the image of the page on
ITakesScreenshot - Defines the interface used to
take screen shot images of the screen.
ScreenshotImageFormat – We can save the file in following
formats
· Jpeg
· Png
· Tiff
· Giff
· Bmp
0 comments: