Selenium combined with the latest version of Sikuli use

Source: Internet
Author: User
Tags sikuli

Sikuli installation, to the official website download Sikuli-setup.jar, address: http://www.sikuli.org/download.html

In the Java environment on the machine directly double-click the jar file (my Windows environment), to install, installation prompts to install;

When the installation is complete, a Sikuli-java.jar file is generated. This is for use in Eclipse, described later;




1. Run Sikuli IDE, enter the Setup.jar directory, will generate a Runide.cmd file, double-click to run, you can;

Can click,doubleclick,type a screenshot;


2. Run in Eclipse, put the Sikuli-java.jar file into build path;

Screen s=new screen ();

String imgpath= "c:\\";
S.type (imgpath+ "Passwd.png", "Firewall1");

This allows you to manipulate the image, such as Click,type, to view the API.

Automatically generate log in console, as follows:

[Log] CLICK on L (927,354) @S (0) [0,0 1280x1024]
[Log] TYPE "Firewall1"

The machine needs to be restarted after the first installation.


This can be selenium can not handle some of the situation combined with Sikuli to deal with, such as selenium is unable to locate Taobao login password input box, or in the selenium need to deal with some Windows interface or Flash interface, This will be more flexible when combined with Sikuli.


Sikuli Advantages:

1. Graphic programming, simple and easy to use

2. Can be used on WINDOWS,LINUX,MAC platform

3. Open source, easy to automate Flash or Windows applications;


Sikuli is based on screenshots of automation, so that if the import of better operating systems, replacement screen resolution, color, etc. can lead to unrecognized;

Sikuli Disadvantages:

1. Cross-platform has a certain degree of difficulty, compatibility is not very good;

2. The overhead of too much screenshots;

3.sikuli IDE is not suitable for complex automation programs, virtual rely on Java/python to invoke API implementation;


Sikuli Practical Use

1.Sikuli can be used to automate flash objects or flash sites.

2. It can be applied to automated windows-based applications. We can automate what we see on the screen.

3. It provides a simple API that all methods can be accessed using screen class objects.

4. It can be simply integrated with selenium and all other tools.

5. Using Sikuli we can automate desktop applications.

6. Most automated test tools do not support Flash Object Automation (such as selenium). Sikuli provides a wide range of support for automating Flash objects.

7. It uses a powerful "visual matching" mechanism to automate desktop and flash objects.

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.