我正在尝试获取浏览器警报的屏幕截图。
我尝试使用Robot类
BufferedImage image = new Robot().createScreenCapture(new Rectangle(Toolkit.getDefaultToolkit().getScreenSize()));
ImageIO.write(image, "png", new File("c:\\localdev\\bla.png"));
The problem is i am running code on remote machine and Robot class captures screenshot of part of my local machine which is currently in focus.