Skip to content

Commit 133a171

Browse files
committed
Add keyword Select All
1 parent c58f019 commit 133a171

File tree

1 file changed

+8
-0
lines changed

1 file changed

+8
-0
lines changed

src/main/java/javafxlibrary/keywords/Keywords/KeyboardRobot.java

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -222,6 +222,14 @@ public FxRobotInterface writeTo(Object locator, String text) {
222222
}
223223
}
224224

225+
@RobotKeyword("Pushes CTRL/CMD + A key combination to select all.")
226+
public void selectAll() {
227+
if (isMac())
228+
robot.push(KeyCode.META, KeyCode.A);
229+
else
230+
robot.push(KeyCode.CONTROL, KeyCode.A);
231+
}
232+
225233
@RobotKeyword("Sets the time waited between every character when typing\n\n" +
226234
"``milliseconds`` is the time waited between each character in milliseconds.")
227235
@ArgumentNames({ "milliseconds" })

0 commit comments

Comments
 (0)