Answers

Question and Answer:

  Home  Automation

⟩ Tell us what methods of Robot Class do you know?

Some commonly and popularly used methods of Robot Class during web automation:

keyPress(): method with press down arrow key of Keyboard

Example:

keyPress(KeyEvent.VK_DOWN)

keyRelease(): method with release down arrow key of Keyboard:

Example:

robot.keyRelease(KeyEvent.VK_DOWN)

mouseRelease() method will release the right click of your mouse

Example:

mouseRelease(InputEvent.BUTTON3_DOWN_MASK)

mouseMove() method will move mouse pointer to the specified X and Y coordinates.

Example:

robot.mouseMove(point.getX(), point.getY())

mousePress() method will press the right click of your mouse.

Example :

robot.mousePress(InputEvent.BUTTON3_DOWN_MASK)

 132 views

More Questions for you: