-1
當我打開.jpeg文件時,它是空白的。使用硒腳本的空白屏幕截圖
public static void main(String[] args) throws Exception {
System.setProperty("webdriver.chrome.driver","C:\\Users\\allan\\workspace\\Login\\chromedriver.exe");
WebDriver driver = new ChromeDriver();
File scrFile = ((TakesScreenshot)driver).getScreenshotAs(OutputType.FILE);
FileUtils.copyFile(scrFile, new File("C:\\screenshots\\screenshot.jpeg"));
driver.get("https://www.facebook.com/");
}