Package org.testfx.robot.impl
Class WriteRobotImpl
java.lang.Object
org.testfx.robot.impl.WriteRobotImpl
- All Implemented Interfaces:
WriteRobot
-
Field Summary
FieldsModifier and TypeFieldDescriptionprivate final BaseRobot
private static final int
private final SleepRobot
private final WindowFinder
-
Constructor Summary
ConstructorsConstructorDescriptionWriteRobotImpl
(BaseRobot baseRobot, SleepRobot sleepRobot, WindowFinder windowFinder) -
Method Summary
Modifier and TypeMethodDescriptionprivate javafx.scene.input.KeyCode
determineKeyCode
(char character) private javafx.stage.Window
private void
typeCharacterInScene
(char character, javafx.scene.Scene scene) void
write
(char character) Writes a given text character.void
Writes the given text characters one after the other.void
Writes the given text characters one after the other, sleeping forsleepMillis
milliseconds after each typed character.
-
Field Details
-
SLEEP_AFTER_CHARACTER_IN_MILLIS
private static final int SLEEP_AFTER_CHARACTER_IN_MILLIS -
baseRobot
-
sleepRobot
-
windowFinder
-
-
Constructor Details
-
WriteRobotImpl
-
-
Method Details
-
write
public void write(char character) Description copied from interface:WriteRobot
Writes a given text character.- Specified by:
write
in interfaceWriteRobot
- Parameters:
character
- the text character to write
-
write
Description copied from interface:WriteRobot
Writes the given text characters one after the other.- Specified by:
write
in interfaceWriteRobot
- Parameters:
text
- the text characters to write
-
write
Description copied from interface:WriteRobot
Writes the given text characters one after the other, sleeping forsleepMillis
milliseconds after each typed character.- Specified by:
write
in interfaceWriteRobot
- Parameters:
text
- the text characters to writesleepMillis
- the milliseconds to sleep for after each character
-
fetchTargetWindow
private javafx.stage.Window fetchTargetWindow() -
typeCharacterInScene
private void typeCharacterInScene(char character, javafx.scene.Scene scene) -
determineKeyCode
private javafx.scene.input.KeyCode determineKeyCode(char character)
-