Quick Start to SikuliX (Sikuli Script)


What is SikuliX?

SikuliX automates anything you see on the screen of your desktop computer running Windows, Mac or some Linux/Unix. It uses image recognition powered by OpenCV to identify and control GUI components. You can both automate desktop or web applications regardless of any technology. It is useful when there is no easy access to a GUI’s internal or source code.

Sikuli was an open-source research project at the User Interface Design Group at MIT.

For more information, please visit http://www.sikulix.com/

How to Install Sikuli?

First you should install JAVA JRE 7 or 8. Then, go to http://www.sikulix.com/ and click to button under Get it section.

sikulix

Then, it redirects you to Launchpad.net website (https://launchpad.net/sikuli/sikulix/1.1.0) and on that site click to sikulixsetup-1.1.0.jar

sikulix

Then, you should save SikuliX setup .jar file into a folder. I prefer to create a SikuliX folder under C drive and save in under this folder.

sikulix

Then, double click to sikulixsetup-1.1.0.jar file. You will see below window and select checkbox-1 and click “Setup Now”.

sikulix

Then, Silulix-Setup: question popup will appear and click “Yes”.

sikulix

Then, you will install Jython version 2.7.0

sikulix

Then, you will see below screens and finally SikuliX will be installed.

sikulix

sikulix

Then, you will click OK button in below popup.

sikulix

Then you will see below warning screen. It tells us Setup have ended successfully.

sikulix

Also, we can open SikuliX-1.1.0-SetupLog.txt file and check status of installation.

sikulix

Finally, our folder structure will be like that.

sikulix

When you click sikulix.jar, Sikulix will start.

sikulix

sikulix

How to Use SikuliX?

I will show you a very basic example that shows you how to use SikuliX. When you open SikuliX IDE, on the right pane, you can see three sections. Find, Mouse Actions and Keyboard Actions. These are the main functionalities and I listed their explanation on below picture.

sikuliX

In below example, I will open Chrome browser and go to www.swtestacademy.com and then when it is open, I will prompt a popup that says “Congrats! You opened swtestacademy.com”.

sikulix

Test Result:

sikulix_17

Reference Tutorials and Documentations

Documentations

http://sikulix-2014.readthedocs.org/en/latest/index.html

http://doc.sikuli.org/tutorials/index.html

http://www.slideshare.net/vgod/practical-sikuli-using-screenshots-for-gui-automation-and-testing

Video Tutorial Series

1- Intro & Setup: https://www.youtube.com/watch?v=VdCOg1bCmGo

2- The Basics: https://www.youtube.com/watch?v=I-UYoezac4Q

3- Conditional Automation: https://www.youtube.com/watch?v=vuqfDdPlI88

4- Conditional Looping: https://www.youtube.com/watch?v=Bb513yh6RGE

5- Game Example: https://www.youtube.com/watch?v=xTTIikzxFfc

javafx

Database Operations in JavaFX

By Onur Baskirt / Apr 1, 2016 / 56 Comments
Before started this section, please check the first article and learn How to Start JAVAFX! http://www.swtestacademy.com/getting-started-with-javafx/ At first, part of JavaFX tutorial series, we created a sample JavaFX project, designed the draft version of the UI and set up an...
extentreports

How to Write Smart XPath Locators

By Onur Baskirt / Sep 24, 2017 / 5 Comments
Hi all, in this tutorial, I will describe you how to write smart and non-brittle XPath locators. When we write our test scripts, we generally prefer to use id, name, class, etc. these kinds of locators. However, sometimes we could not...
extentreports

How to Write Effective CSS Locators

By Onur Baskirt / Oct 1, 2017 / 0 Comments
Hi all, in this tutorial, I will describe you how to write effective CSS locators to interrogate web elements for your automation projects. As a rule of thumb, your interrogation strategy should be in below order: First try to use...
rest assured

REST API Testing with Rest Assured

By Onur Baskirt / Mar 8, 2016 / 32 Comments
Outline In this post, I will explain what is API and API testing, what is the difference between SOAP and REST services, and how to test REST APIs with Rest Assured Library. What is API? API stands for Application Programming...
javafx

Getting Started with JavaFX

By Onur Baskirt / Mar 25, 2016 / 0 Comments
When I started to work in my current position, one of my task is to do manual operations for campaign products  every week. After the second week, I thought that I have to automate this task using a GUI based...
extentreports

Selenium-1: Quick Start to Automation with Selenium WebDriver & JAVA & JUnit & Maven & IntelliJ

By Onur Baskirt / Sep 8, 2015 / 26 Comments
Outline Selenium Webdriver is the most popular open source web test automation framework across the wide range of browsers and platforms. In this tutorial, you will learn how to do web test automation with Selenium Webdriver and the related tools....
extentreports

Selenium-11: Execute JavaScript with JavascriptExecutor

By Onur Baskirt / Jan 27, 2016 / 15 Comments
Outline Sometimes we cannot handle some conditions or problems with Webdriver, web controls don't react well against selenium commands. In this kind of situations, we use Javascript. It is useful for custom synchronizations, hide or show the web elements, change...
page object model

Page Object Model with C#

By Ege Aksoz / Jun 18, 2017 / 8 Comments
In the previous tutorial, we’ve taken the initial steps and entered the world of automated testing. We also wrote our first automated test. From this point on, since we are not just going to write one test, we need to...
extentreports

How to Select a Date From DatePicker Using Selenium

By Onur Baskirt / Aug 13, 2016 / 6 Comments
When you need to automate a airway, hotel, or similar websites you need to deal with Datepickers and some times it is a little bit cumbersome to select a specific date on the Datepicker or calendar.  In this post, I...

Getting Started with RobotFramework on Windows

By Onur Baskirt / Apr 25, 2016 / 12 Comments
What is RobotFramework? RobotFramework is a GENERIC test automation framework for acceptance testing and acceptance test-driven development (ATTD). What it means that you can do web, mobile, desktop and other test automation activities with related test libraries. These libraries can...
By | 2017-10-22T02:36:45+00:00 February 17th, 2016|Sikulix, Test Automation|2 Comments

About the Author:

Onur Baskirt
Onur Baskirt is a senior IT professional with 10+ years of experience. He worked at Bahçesehir University, ST Microelectronics, Huawei and Ericsson as research assistant, design verification engineer and software test leader. Also, he worked as software test leader and software operations manager at Turkey's biggest technology retailer, Teknosa. Now, he is working as Head of Software Testing and Manager of two Development Teams at Kariyer.net. His current research areas are technical software testing, programming, and computer science. Formerly, he has several research works and papers on digital chip design & verification. His hobbies are sport, dancing, traveling, and nutrition. You can find detailed information about him on his linked-in page.

2 Comments

  1. Mehmet September 2, 2016 at 3:37 pm - Reply

    pratik ve güzel bir anlatım olmuş teşekkürler.

    • Onur Baskirt
      Onur Baskirt September 2, 2016 at 8:09 pm - Reply

      Ben teşekkür ederim Mehmet. Makaleyi beğendiğine çok sevindim. Faydası olduysa ne mutlu.

Leave A Comment