0
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;
}
我得到了上面代碼的空指針異常。空指針異常即將到來