【发布时间】:2017-11-13 21:54:38
【问题描述】:
public static WebDriver getscreenshot(String path) throws Exception
{
WebDriver driver = null;
TakesScreenshot ts = (TakesScreenshot)driver;
File scrFile = ts.getScreenshotAs(OutputType.FILE);
FileUtils.copyFile(scrFile, new File(path));
return driver;
}
我收到上述代码的空指针异常。
【问题讨论】: