Sonntag, 5. Juni 2011

Sikuli – GUI Test Automation with Java Robot API and Images

The Sikuli project provides a simple tool for automate and test graphical user interfaces (GUI) using images (screenshots). The idea is to find an element on the screen by a screenshot and not by XPath or ID. The tool can be used for all GUIs also web applications. It’s a nice idea below you can see a simple example.

The SIKULI project is based on the Java VM and also provides an API for writing the automation in Java here a JUnit sample test.

For real world web testing it is not the right tool I think, because it depends on the style of the elements. When the button style changed you need a new screenshot of the button. But it is a nice tool for simple automation tasks. Have also a look at screen casts on the project homepage.

- Project Home -
- How to use Sikuli Script in your JAVA programs -


  1. I have abaisc doubt in the above sample code, how do you take the screen shot and how do you select the target area (region) in the screen shot.

  2. created the screenshots for the test steps via the sikuli recorder UI see the screen above... but you could also use any tool to create the screenshots manuel, e.g. on Mac OSX use Shift + Apple + 4

  3. Now sikuli can run directly on Android.
    Search AnkuLua on goole play.