Class ElementMouseActions


  • public class ElementMouseActions
    extends Object
    • Method Summary

      All Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      void dragAndDrop​(BasePoint basePoint, int x, int y, int dx, int dy)
      Drags and drops the mouse from the starting point (Base point of element bounding rectangle + x, y coordinates) with the given distance.
      void mouseClick​(BasePoint basePoint, int x, int y)
      Click the mouse on the point (Base point of element bounding rectangle + x, y coordinates).
      void mouseDoubleClick​(BasePoint basePoint, int x, int y)
      Double click the mouse on the point (Base point of element bounding rectangle + x, y coordinates).
      void mouseMove​(BasePoint basePoint, int x, int y)
      Move the mouse to the point (Base point of element bounding rectangle + x, y coordinates).
      void mouseRightClick​(BasePoint basePoint, int x, int y)
      Right click the mouse on the point (Base point of element bounding rectangle + x, y coordinates).
      void smoothDragAndDrop​(BasePoint basePoint, int x, int y, int dx, int dy, int duration)
      Drags and drops the mouse from the starting point (Base point of element bounding rectangle + x, y coordinates) with the given distance and within the specified time.
    • Constructor Detail

      • ElementMouseActions

        public ElementMouseActions​(DesktopElement desktopElement)
    • Method Detail

      • dragAndDrop

        public void dragAndDrop​(BasePoint basePoint,
                                int x,
                                int y,
                                int dx,
                                int dy)
        Drags and drops the mouse from the starting point (Base point of element bounding rectangle + x, y coordinates) with the given distance.
        Parameters:
        basePoint - BasePoint of element bounding rectangle.
        x - X Coordinate relative to base point of element bounding rectangle.
        y - Y Coordinate relative to base point of element bounding rectangle.
        dx - The x distance to drag and drop, + for right, - for left.
        dy - The y distance to drag and drop, + for down, - for up.
      • smoothDragAndDrop

        public void smoothDragAndDrop​(BasePoint basePoint,
                                      int x,
                                      int y,
                                      int dx,
                                      int dy,
                                      int duration)
        Drags and drops the mouse from the starting point (Base point of element bounding rectangle + x, y coordinates) with the given distance and within the specified time.
        Parameters:
        basePoint - BasePoint of element bounding rectangle.
        x - X Coordinate relative to base point of element bounding rectangle.
        y - Y Coordinate relative to base point of element bounding rectangle.
        dx - The x distance to drag and drop, + for right, - for left.
        dy - The y distance to drag and drop, + for down, - for up.
        duration - Execution time in milliseconds.
      • mouseMove

        public void mouseMove​(BasePoint basePoint,
                              int x,
                              int y)
        Move the mouse to the point (Base point of element bounding rectangle + x, y coordinates).
        Parameters:
        basePoint - BasePoint of element bounding rectangle.
        x - X Coordinate relative to base point of element bounding rectangle.
        y - Y Coordinate relative to base point of element bounding rectangle.
      • mouseClick

        public void mouseClick​(BasePoint basePoint,
                               int x,
                               int y)
        Click the mouse on the point (Base point of element bounding rectangle + x, y coordinates).
        Parameters:
        basePoint - BasePoint of element bounding rectangle.
        x - X Coordinate relative to base point of element bounding rectangle.
        y - Y Coordinate relative to base point of element bounding rectangle.
      • mouseRightClick

        public void mouseRightClick​(BasePoint basePoint,
                                    int x,
                                    int y)
        Right click the mouse on the point (Base point of element bounding rectangle + x, y coordinates).
        Parameters:
        basePoint - BasePoint of element bounding rectangle.
        x - X Coordinate relative to base point of element bounding rectangle.
        y - Y Coordinate relative to base point of element bounding rectangle.
      • mouseDoubleClick

        public void mouseDoubleClick​(BasePoint basePoint,
                                     int x,
                                     int y)
        Double click the mouse on the point (Base point of element bounding rectangle + x, y coordinates).
        Parameters:
        basePoint - BasePoint of element bounding rectangle.
        x - X Coordinate relative to base point of element bounding rectangle.
        y - Y Coordinate relative to base point of element bounding rectangle.