1.

What is the robot class?

Answer»

In some automation scripts, there is a need to use mouse or keyboard actions to interact with OS like Alerts, download pop-up, Print pop-up, etc. and Selenium Webdriver cannot handle these OS pop-ups or applications.

A Robot is a class in Selenium and is used to generate NATIVE system INPUT events for test automation, where you need control over the mouse and keyboard. To handle the OS POPUPS which WebDriver does not handle, the Robot class was introduced.

The MAIN purpose of ow Robot class is to assist automation testing for Java platform implementations. In other words, the Robot class provides control over mouse and keyboard devices.

This class is easy to implement and easily integrate with the automation framework.

Let us see the importance of the Robot class -

  1. Using Robot class you can easily upload a file
  2. Robot class handle the mouse and keyboard functions
  3. pop-ups can be HANDLED easily with Robot class


Discussion

No Comment Found