Tell us what methods of Robot Class do you know?
Submitted by: MuhammadSome 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)
Submitted by: Muhammad
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)
Submitted by: Muhammad
Read Online Automation Job Interview Questions And Answers
Top Automation Questions
☺ | What is Selenium? |
☺ | Tell me does the Selenium have any limitations? |
☺ | Tell me what is an Absolute XPath? |
☺ | Explain me what the WebDriver supported Mobile Testing Drivers do you know? |
☺ | Tell us what is the alternate way to click on login button? |
Top Testing Categories
☺ | Manual Testing Interview Questions. |
☺ | Rational TestSuite Interview Questions. |
☺ | QTP Interview Questions. |
☺ | Database Testing Interview Questions. |
☺ | Software QA Interview Questions. |