Class SikuliActions

java.lang.Object
com.shaft.gui.element.SikuliActions

public class SikuliActions extends Object
SHAFT action facade for SikuliX image-based desktop automation.
  • Constructor Details

    • SikuliActions

      public SikuliActions()
      Creates SikuliX actions for the current desktop screen.
    • SikuliActions

      public SikuliActions(org.sikuli.script.App applicationWindow)
      Creates SikuliX actions scoped to a specific desktop application window.
      Parameters:
      applicationWindow - SikuliX application window handle
  • Method Details

    • type

      public SikuliActions type(String pathToTargetElementImage, String text)
      Clears existing text from the target image region, then types the supplied text.
      Parameters:
      pathToTargetElementImage - path to the target element reference image
      text - text to type
      Returns:
      self reference for chaining
    • type

      public SikuliActions type(byte[] targetElement, String text)
      Clears existing text from the target image region, then types the supplied text.
      Parameters:
      targetElement - target element reference image bytes
      text - text to type
      Returns:
      self reference for chaining
    • typeAppend

      public SikuliActions typeAppend(String pathToTargetElementImage, String text)
      Appends text into the target image region.
      Parameters:
      pathToTargetElementImage - path to the target element reference image
      text - text to append
      Returns:
      self reference for chaining
    • typeAppend

      public SikuliActions typeAppend(byte[] targetElement, String text)
      Appends text into the target image region.
      Parameters:
      targetElement - target element reference image bytes
      text - text to append
      Returns:
      self reference for chaining
    • typeSecure

      public SikuliActions typeSecure(String pathToTargetElementImage, String text)
      Clears existing text from the target image region, types sensitive text, and masks it in reports.
      Parameters:
      pathToTargetElementImage - path to the target element reference image
      text - sensitive text to type
      Returns:
      self reference for chaining
    • typeSecure

      public SikuliActions typeSecure(byte[] targetElement, String text)
      Clears existing text from the target image region, types sensitive text, and masks it in reports.
      Parameters:
      targetElement - target element reference image bytes
      text - sensitive text to type
      Returns:
      self reference for chaining
    • click

      public SikuliActions click(String pathToTargetElementImage)
      Clicks the target image region.
      Parameters:
      pathToTargetElementImage - path to the target element reference image
      Returns:
      self reference for chaining
    • click

      public SikuliActions click(byte[] targetElement)
      Clicks the target image region.
      Parameters:
      targetElement - target element reference image bytes
      Returns:
      self reference for chaining
    • getText

      public String getText(String pathToTargetElementImage)
      Reads text from the target image region.
      Parameters:
      pathToTargetElementImage - path to the target element reference image
      Returns:
      detected text
    • getText

      public String getText(byte[] targetElement)
      Reads text from the target image region.
      Parameters:
      targetElement - target element reference image bytes
      Returns:
      detected text
    • hover

      public SikuliActions hover(String pathToTargetElementImage)
      Moves the mouse pointer over the target image region.
      Parameters:
      pathToTargetElementImage - path to the target element reference image
      Returns:
      self reference for chaining
    • hover

      public SikuliActions hover(byte[] targetElement)
      Moves the mouse pointer over the target image region.
      Parameters:
      targetElement - target element reference image bytes
      Returns:
      self reference for chaining
    • doubleClick

      public SikuliActions doubleClick(String pathToTargetElementImage)
      Double-clicks the target image region.
      Parameters:
      pathToTargetElementImage - path to the target element reference image
      Returns:
      self reference for chaining
    • doubleClick

      public SikuliActions doubleClick(byte[] targetElement)
      Double-clicks the target image region.
      Parameters:
      targetElement - target element reference image bytes
      Returns:
      self reference for chaining
    • rightClick

      public SikuliActions rightClick(String pathToTargetElementImage)
      Right-clicks the target image region.
      Parameters:
      pathToTargetElementImage - path to the target element reference image
      Returns:
      self reference for chaining
    • rightClick

      public SikuliActions rightClick(byte[] targetElement)
      Right-clicks the target image region.
      Parameters:
      targetElement - target element reference image bytes
      Returns:
      self reference for chaining
    • dragAndDrop

      public SikuliActions dragAndDrop(String pathToDraggableElementImage, String pathToTargetElementImage)
      Drags one image region and drops it on another image region.
      Parameters:
      pathToDraggableElementImage - path to the draggable element reference image
      pathToTargetElementImage - path to the drop target reference image
      Returns:
      self reference for chaining
    • dragAndDrop

      public SikuliActions dragAndDrop(byte[] draggableElement, byte[] targetElement)
      Drags one image region and drops it on another image region.
      Parameters:
      draggableElement - draggable element reference image bytes
      targetElement - drop target reference image bytes
      Returns:
      self reference for chaining