Remove Thread.sleep from how to make a screenshot example
This commit is contained in:
@@ -14,7 +14,6 @@ public class Screenshot {
|
||||
}
|
||||
|
||||
public void getScreenshot(int timeToWait) throws Exception {
|
||||
Thread.sleep(timeToWait);
|
||||
Rectangle rectangle = new Rectangle(Toolkit.getDefaultToolkit().getScreenSize());
|
||||
Robot robot = new Robot();
|
||||
BufferedImage img = robot.createScreenCapture(rectangle);
|
||||
|
||||
Reference in New Issue
Block a user