I already know how to use java.awt.Robot
to type a single character using keyPress
, as seen below. How can I simply enter a whole pre-defined String
value at once into a textbox?
robot.keyPress(KeyEvent.VK_1);
robot.keyPress(KeyEvent.VK_1);
robot.keyPress(KeyEvent.VK_1);
// instead, enter String x = "111"
See Question&Answers more detail:
os 与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…