Find centralized, trusted content and collaborate around the technologies you use most.
Teams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
我正在尝试使用 Phantomjs 进行网页自动化。由于它是浏览器较少的执行,有什么方法可以让我的测试运行的屏幕截图,可能来自内存
试过这段代码,它工作。:)
File scrFile = ((TakesScreenshot)driver).getScreenshotAs(OutputType.FILE); FileUtils.copyFile(scrFile, new File("./screenshot/snap.png"));