Road to clear input filed using sikuli java

In this post in am going to explain, how to clear input fields value using sikuli with java. As Sikuli does not provide any function to clear input field.
To clear input fields value, I use sikuli and java Robot class. First I click on input field using sikuli click() function then I use java Robot class to clear input filed. Below is code.

Robot robot = new Robot();

robot.keyPress(KeyEvent.VK_CONTROL);
robot.keyPress(KeyEvent.VK_A);
robot.keyRelease(KeyEvent.VK_CONTROL);
robot.keyPress(KeyEvent.VK_BACK_SLASH);

Using above approach and code,  I clear any input field with sikuli.


No comments:

Post a Comment

Leave your comments, queries, suggestion I will try to provide solution