Class SikuliActions
java.lang.Object
com.shaft.gui.element.SikuliActions
SHAFT action facade for SikuliX image-based desktop automation.
-
Constructor Summary
ConstructorsConstructorDescriptionCreates SikuliX actions for the current desktop screen.SikuliActions(org.sikuli.script.App applicationWindow) Creates SikuliX actions scoped to a specific desktop application window. -
Method Summary
Modifier and TypeMethodDescriptionclick(byte[] targetElement) Clicks the target image region.Clicks the target image region.doubleClick(byte[] targetElement) Double-clicks the target image region.doubleClick(String pathToTargetElementImage) Double-clicks the target image region.dragAndDrop(byte[] draggableElement, byte[] targetElement) Drags one image region and drops it on another image region.dragAndDrop(String pathToDraggableElementImage, String pathToTargetElementImage) Drags one image region and drops it on another image region.getText(byte[] targetElement) Reads text from the target image region.Reads text from the target image region.hover(byte[] targetElement) Moves the mouse pointer over the target image region.Moves the mouse pointer over the target image region.rightClick(byte[] targetElement) Right-clicks the target image region.rightClick(String pathToTargetElementImage) Right-clicks the target image region.Clears existing text from the target image region, then types the supplied text.Clears existing text from the target image region, then types the supplied text.typeAppend(byte[] targetElement, String text) Appends text into the target image region.typeAppend(String pathToTargetElementImage, String text) Appends text into the target image region.typeSecure(byte[] targetElement, String text) Clears existing text from the target image region, types sensitive text, and masks it in reports.typeSecure(String pathToTargetElementImage, String text) Clears existing text from the target image region, types sensitive text, and masks it in reports.
-
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
Clears existing text from the target image region, then types the supplied text.- Parameters:
pathToTargetElementImage- path to the target element reference imagetext- text to type- Returns:
- self reference for chaining
-
type
Clears existing text from the target image region, then types the supplied text.- Parameters:
targetElement- target element reference image bytestext- text to type- Returns:
- self reference for chaining
-
typeAppend
Appends text into the target image region.- Parameters:
pathToTargetElementImage- path to the target element reference imagetext- text to append- Returns:
- self reference for chaining
-
typeAppend
Appends text into the target image region.- Parameters:
targetElement- target element reference image bytestext- text to append- Returns:
- self reference for chaining
-
typeSecure
Clears existing text from the target image region, types sensitive text, and masks it in reports.- Parameters:
pathToTargetElementImage- path to the target element reference imagetext- sensitive text to type- Returns:
- self reference for chaining
-
typeSecure
Clears existing text from the target image region, types sensitive text, and masks it in reports.- Parameters:
targetElement- target element reference image bytestext- sensitive text to type- Returns:
- self reference for chaining
-
click
Clicks the target image region.- Parameters:
pathToTargetElementImage- path to the target element reference image- Returns:
- self reference for chaining
-
click
Clicks the target image region.- Parameters:
targetElement- target element reference image bytes- Returns:
- self reference for chaining
-
getText
-
getText
Reads text from the target image region.- Parameters:
targetElement- target element reference image bytes- Returns:
- detected text
-
hover
Moves the mouse pointer over the target image region.- Parameters:
pathToTargetElementImage- path to the target element reference image- Returns:
- self reference for chaining
-
hover
Moves the mouse pointer over the target image region.- Parameters:
targetElement- target element reference image bytes- Returns:
- self reference for chaining
-
doubleClick
Double-clicks the target image region.- Parameters:
pathToTargetElementImage- path to the target element reference image- Returns:
- self reference for chaining
-
doubleClick
Double-clicks the target image region.- Parameters:
targetElement- target element reference image bytes- Returns:
- self reference for chaining
-
rightClick
Right-clicks the target image region.- Parameters:
pathToTargetElementImage- path to the target element reference image- Returns:
- self reference for chaining
-
rightClick
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 imagepathToTargetElementImage- path to the drop target reference image- Returns:
- self reference for chaining
-
dragAndDrop
Drags one image region and drops it on another image region.- Parameters:
draggableElement- draggable element reference image bytestargetElement- drop target reference image bytes- Returns:
- self reference for chaining
-