i have used PhantomJS
to take screenshot in java and all is perfect but i got this Asynchronous Sessions clean-up phase starting NOW
in my console
this error is killing me and i cant found any solutions pls help :/
this is the code :
public class Screenshot {
private PhantomJSDriver driver;
public void screen () throws IOException {
DesiredCapabilities caps = new DesiredCapabilities();
caps.setJavascriptEnabled(true);
caps.setCapability(PhantomJSDriverService.PHANTOMJS_EXECUTABLE_PATH_PROPERTY, "D:\\phantomjs-2.1.1-windows\\bin\\phantomjs.exe");
this.driver = new PhantomJSDriver(caps);
driver.get("http://127.0.0.1:18383/webpfe/map2.jsf");
driver.manage().window().setSize(new Dimension(1200,800));
File source = ((TakesScreenshot)driver).getScreenshotAs(OutputType.FILE);
FileUtils.copyFile(source, new File ("d:\\test.png"),true);