C TakeScreenshot 扩展
public static Screenshot TakeScreenshot(this IWebDriver _driver)
{
return ((ITakesScreenshot)_driver).GetScreenshot();
}
用法示例:
driver.TakeScreenshot().SaveAsFile(@"/Test/Test.png",ImageFormat.Png);
public static Screenshot TakeScreenshot(this IWebDriver _driver)
{
return ((ITakesScreenshot)_driver).GetScreenshot();
}
用法示例:
driver.TakeScreenshot().SaveAsFile(@"/Test/Test.png",ImageFormat.Png);