var capabilitiesInternet = new OpenQA.Selenium.Remote.DesiredCapabilities();
capabilitiesInternet.SetCapability("ignoreProtectedModeSettings", true);
IWebDriver webDriver = new InternetExplorerDriver(capabilitiesInternet);
webDriver.Navigate().GoToUrl("http://www.google.com");
Screenshot screenshot = ((ITakesScreenshot) webDriver).GetScreenshot();
screenshot.SaveAsFile("d:\\ScreenShot.png",System.Drawing.Imaging.ImageFormat.Png);
No comments:
Post a Comment