Sikuli  image recognition method to identify GUI elements. Sikuli script allows users to automate GUI interaction by using screen shots. Sikuli tool working on image matchmethod. Sikuli take all the element as a image and store in the project. It will trigger the element when it matches the image. We pass the image with parameter.

Sikuli is very useful when we have do not any ID and name because it working on image recognition method. Its very useful when we have stable GUI.

Sikuli is also very useful for window application. We can automate the window application using sikuli. It provides the sikuli script jar file. We can download jar file from sikuli site.

Sikuli easily integrated with selenium webdriver.its open source tool.

First of all download the Sikuli-script jar file and include in your project.

Now we start the sikuli integration with selenium webdriver. So we make a simple application for Gmail login. For making the application We have to take screen-shot of username field, password, signin button.









These are the images which is necessary to implement the sikuli integration.

Now we create a class for implementing the sikuli.

 package sikuli;
import org.openqa.selenium.WebDriver;
import org.openqa.selenium.firefox.FirefoxDriver;

import org.sikuli.script.Pattern;
import org.sikuli.script.Screen;

public class GmailLogin {

public static void main(String[] args)

Screen screen = new Screen();

Pattern img1 = new Pattern("/home/manoj/Desktop/usrnme.png");
Pattern img2 = new Pattern("/home/manoj/Desktop/usrnext.png");
Pattern img3 = new Pattern("/home/manoj/Desktop/password.png");
Pattern img4 = new Pattern("/home/manoj/Desktop/signin.png");

WebDriver driver = new FirefoxDriver();

screen.wait(img1, 10);


Leave a Reply

Fill in your details below or click an icon to log in: Logo

You are commenting using your account. Log Out /  Change )

Google+ photo

You are commenting using your Google+ account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )


Connecting to %s

This site uses Akismet to reduce spam. Learn how your comment data is processed.