Posts

Showing posts with the label " Robot Class in Java"

Robot Class in Java

Robot Class in Java       The Robot class in the Java AWT package is used to generate native system input events for the purposes of test automation, self-running demos, and other applications where control of the mouse and keyboard is needed. The primary purpose of Robot is to facilitate automated testing of Java platform implementations. In simple terms, the class provides control over the mouse and keyboard devices.        We can handle input,output,and basic operation of maouse events with the help of Java Robot class.. example of robot class... // Java program to working of Robot class //This program is for Windoes. It opens notepad and types a message. import java.awt.AWTException; import java.awt.Robot; import java.awt.event.KeyEvent; import java.io.*; public class RobotInJava {      public static void main(String[] args) throws IOException,  ...