Merge pull request #1725 from KwokRoot/v5-dev

Update RobotUtil.java
This commit is contained in:
Golden Looly
2021-07-26 18:23:04 +08:00
committed by GitHub

View File

@@ -31,6 +31,13 @@ public class RobotUtil {
} }
} }
/**
* 获取 Robot 实例
*/
public static Robot getRobot() {
return ROBOT;
}
/** /**
* 设置默认的延迟时间<br> * 设置默认的延迟时间<br>
* 当按键执行完后的等待时间也可以用ThreadUtil.sleep方法代替 * 当按键执行完后的等待时间也可以用ThreadUtil.sleep方法代替
@@ -198,7 +205,7 @@ public class RobotUtil {
/** /**
* 等待指定毫秒数 * 等待指定毫秒数
*/ */
private static void delay() { public static void delay() {
if (delay > 0) { if (delay > 0) {
ROBOT.delay(delay); ROBOT.delay(delay);
} }