Skip to main content

SikuliX desktop automation

io.github.shafthq:shaft-sikulix adds optional SikuliX image matching for desktop workflows that cannot be reached through DOM or Appium locators.

Add the module

<dependencyManagement>
<dependencies>
<dependency>
<groupId>io.github.shafthq</groupId>
<artifactId>shaft-bom</artifactId>
<version>${shaft.version}</version>
<type>pom</type>
<scope>import</scope>
</dependency>
</dependencies>
</dependencyManagement>

<dependencies>
<dependency>
<groupId>io.github.shafthq</groupId>
<artifactId>shaft-engine</artifactId>
</dependency>
<dependency>
<groupId>io.github.shafthq</groupId>
<artifactId>shaft-sikulix</artifactId>
</dependency>
</dependencies>

Use image actions

new SHAFT.GUI.SikuliX().element()
.click("src/test/resources/images/save-button.png")
.type("src/test/resources/images/name-field.png", "SHAFT");

Attach actions to an already open application window when the match should be scoped to that desktop app:

SHAFT.GUI.SikuliX calculator = SHAFT.GUI.SikuliX.getInstance("Calculator");
calculator.element()
.click("src/test/resources/images/one.png")
.click("src/test/resources/images/plus.png");
calculator.quit();

If shaft-sikulix is missing, SHAFT.GUI.SikuliX reports the missing optional dependency and tells you to add it instead of surfacing a generic class loading error.

Use shaft-engine alone for Appium-backed Windows desktop sessions. Add shaft-sikulix only for image matching.