Beispiel #1
0
 /**
  * Drag the mouse from the current position to a certain other position.
  *
  * @param x the x coordinate to drag to
  * @param y the y coordinate to drag to
  */
 public void dragMouse(final int x, final int y) {
   pressMouse(getX(), getY(), true);
   sleepNoException(random(300, 500));
   windMouse(getX(), getY(), x, y);
   sleepNoException(random(300, 500));
   releaseMouse(x, y, true);
 }
Beispiel #2
0
 public void clickMouse(final boolean left) {
   if (!present) return; // Cant click off the canvas
   pressMouse(getX(), getY(), left);
   sleepNoException(random(50, 100));
   releaseMouse(getX(), getY(), left);
 }