Sikuli is an automated testing tool where one can automate the workflow of the application by using image of an element of UI and searching the image with the help of image detection algorithm. I have already discussed about Sikuli in my previous post. Here I will explain on how Sikuli can be installed and run and what are the pre-requisites we need.
Requirement :
Sikuli can be installed at the following OS and platforms.
- Windows Xp/7/8 both 32 bit and 64 bit
- Mac OS 10.6+
- Linux 32 bit or 64 bit
Pre-Requisite :
Java JRE 6 or JRE 7 preferably the latest version.
Step 1: Install the pre-Requisite
- Download Java if it is not installed in the PC. Latest Java (JRE) can be downloaded from this link. Note that only JRE 6 or 7 supports Sikuli. Sikuli works well with Windows 7 32 bit OS.
- After going to Java download page click on “Accept License Agreement” button.
- After clicking License agreement button, it shows the Thank you message.
- Now click on appropriate Java installer for the machine. In my case, I have selected on “Windows x86 Offline” for my Windows 7 32 bit machine.
- After downloading, double click on the installer “jre-7-windows-i586.exe”.
- Click on Run button.
- Click on Install button.
- Installation will start.
- Java runtime will be successfully installed. Click on Close button.
- To verify that Java is working properly, go to the link : https://www.java.com/en/download/installed.jsp
- Click on “Agree and Continue” button
- Sometimes a pop up can be appeared.
- Click on Run button
- A message shows that Java is installed properly.
Step 2 : Download Sikuli
Latest and stable version of Sikuli is 1.0.1. Version SikuliX 1.1.0 is final under development.
- Go to the page : http://www.sikuli.org/download.html
- Click on the link “sikuli-setup.jar”
- A page is displayed with the link https://launchpad.net/sikuli/+download
- click on “sikuli-setup.jar” link.
- Sometimes an alert message is shown as I am using chrome browser. click on “Keep” button.
- Download will start.
Step 3 : Install Sikuli
- After Finishing download go to the download folder and copy the installer file and paste to a location when you install the file. In my case file location “C:\Sikuli\”
- Double click on the installer
- An instruction dialog is displayed that instructs to go to the File location and run the file named “runSetup.cmd” and click on OK button.
- Go to the installer file location : “C:\Sikuli\”. Following files are displayed.
- Double click on the file “runSetup.cmd” to run.
- A command prompt is displayed. After that a dialog box is displayed with the text “Please read Carefully before proceedings!!”. Click on Ok button.
- SikuliX-Setup window is displayed.
- There are six options displayed on this window.
Option 1 :
If you choose this option you will be able to use sikuli IDE (discuss on other posts) and run the Sikuli scripts through command line. Using Sikuli jars you can implement sikuli script with the help of Java or Java aware scripting language and gets supports from Eclipse or NetBeans IDE. Clicking rightmost “…” button will display a dialog showing the details of choosing this option. Click OK button will close this dialog.
Option 2 :
If you choose this option, you can only be able to run the script through command line. Clicking rightmost “…” button will display a dialog showing the details of choosing this option. Click OK button will close this dialog. If Option 1 is selected with this option then you need to run setup again only selecting this option. So the primary objective of this package to run Sikuli script on command line and no need Sikuli IDE.
Option 3 :
If you want to develop and run script in Jython language using Eclipse IDE then you can choose this option. Clicking rightmost “…” button will display a dialog showing the details of choosing this option. Click OK button will close this dialog. Note that you can choose Option 1 or 2 with this option.
Option 4 :
If you want to develop sikuli script in Java or Jython using Eclipse/NetBeans or other IDE and you do not need option 1 or 2 you can use this option. Clicking rightmost “…” button will display a dialog showing the details of choosing this option. Click OK button will close this dialog.
Option 5 :
If you want to Tesseract based OCR features you can this option. It is recommended not to use this option if you are new to Sikuli or using Sikuli for the first time. Clicking rightmost “…” button will display a dialog showing the details of choosing this option. Click OK button will close this dialog.
Option 6 :
To run the packages (containing Sikuli script) on all supported platforms (Windows, Mac and Linux), you can choose this option. Clicking rightmost “…” button will display a dialog showing the details of choosing this option. Click OK button will close this dialog.
- In my case I have selected Option 1, 2 and 4. Click on Setup Now button.
- A confirmation dialog is displayed to ask about downloading some of the packages. Click on Yes button.
- Downloading starts…
- Some yellow color status text is displayed during installation.
- A status dialog is displayed after installation that it is installed successfully. Click OK button to close the dialog.
- If you go back to the Sikuli installation folder (In my case “C:\Sikuli”), you see some additional files are added and a “libs” folder.
Step 4 : Run Sikuli IDE
- In Sikuli installation folder, double click on the file named “runIDE.cmd”.
- Sikuli IDE is displayed and we can develop and run script using this IDE.
In our future posts, we will show how we can develop script in Sikuli IDE and run it.
Happy Scripting by capturing UI image using Sikuli….!!!