About Scripts
#
What is a SikuliX script?It's a script that automates GUI interaction using image patterns to direct keyboard/mouse events. The core of SikuliX Script is a Java library that consists of two parts: java.awt.Robot, which delivers keyboard and mouse events to appropriate locations, and a C++ engine based on OpenCV, which searches given image patterns on the screen.
Example in Python language
In the IDE as standard the “foobar.png” are shown as thumbnails of the images (other options available).
To write, execute and debug SikuliX scripts you should know about the features of SikuliX and have at least a basic knowledge about the used scripting language.
A good starting point is to use the SikuliX IDE, to get used to the SikuliX features.
#
SikuliX folder structureA SikuliX script (.sikuli) is the directory that contains a Python source file (.py) representing the automation workflow or the test cases and all the image files (.png) used by the source file. All images used in a Sikuli script are simply a path to the .png
file in the .sikuli
bundle.
By default the SikuliX script folder/directory gets the same name as the script, when saving it from the IDE. It is mandatory, that the contained scriptfile has the same name as the folder, this is guaranteed when saving using the SikuliX IDE.
note
On Mac the folder is seen as a package/bundle, which at the top level in Finder hides the content.
The folder and its content for the above example (in IDE we named it myscript)