1. Download the latest version of Sikuli via this link.

2. Import the downloaded .jar file of Sikuli to Katalon Studio from the Library Management

Important note!
Currently, Katalon internally uses JNA (Java Native Access) version 4, while Sikuli uses JNA version 5.

We should download new files of JNA including jna and jna-platform in version 5 to replace the current ones. You can download those files from the links below


If we don’t replace those files, we will face the error message below when performing the Sikuli action:
Reason:
java.lang.NoSuchMethodError: com.sun.jna.Native.load(Ljava/lang/String;Ljava/lang/Class;Ljava/util/Map;)Lcom/sun/jna/Library;
3. After that, import the Sikuli classes you needed into the script:
import org.sikuli.script.Key
import org.sikuli.script.Screen
import org.sikuli.script.FindFailed
import org.sikuli.script.ImagePath
Using the ImagePath method, you can tell Sikuli where your images are (which I grabbed using the Windows Snipping tool):
ImagePath.add(System.getProperty("user.dir") + "\\Screenshots\\Sikuli");
And finally a few lines of code. For example:
Screen s = new Screen()
s.find( "Windows.png" )
s.click( "Windows.png" )
Comments
0 comments
Please sign in to leave a comment.