Sikuli is a tool available for Linux, Windows and Mac OS X which automates tasks using images: you take a screenshot of what you want to click, right click, hover, drag and drop and so on and Sikuli performs those actions automatically, when you need it, either by using the GUI or running it via command line.

It can be useful for running repetitive tasks automatically, running some actions remotely via the command line and so on.

sikuli 1.0.0 Ubuntu

Sikuli supports the following actions:
  • find: find, findAll, wait, waitVanish, exists;
  • mouse actions: click, doucle click, right click, hover, drag and drop;
  • keyboard actions: type text, click on component to gain focus and type text, paste, click on component to gain focus and then paste;
  • event observation: on appear, on vanish, on change and observe.
See the documentation for how to create automated tasks using Sikuli.


Sikuli 1.0.0


After more than a year, Sikuli 1.0.0 has been released - here are the most important changes:
  • revised the main window;
  • new options: no command bar, vertical split (left code, right messages), no HTML creation, do not delete unused images, image path for IDE to store images;
  • improved Preview (displayed when clicking on a screenshot);
  • improved dirty-handling (when the script is edited but not saved): Sikuli is now aware of changes in Preview, there's an option to autosave before run, etc.;
  • the auto update feature is now be aware of beta versions;
  • better error handling;
  • totally revised the debug interface;
  • revised the command line usage to allow running Sikuli scripts;
  • command line: totally revised the ImagePath feature and the usage of ImageLocator;
  • other changes and many bug fixes.

Below you can watch a quick video I've recorded, demoing the latest Sikuli 1.0.0 in Ubuntu 13.04:


(direct video link)


In Unity, when using Sikuli to take a screenshot, the launcher and panel show up twice, that's a known issue and there's no fix for it yet. Also, since Sikuli may sometimes have issues when trying to take delayed screenshots which you might need for things like opening Dash or the GNOME Shell Activities and so on, I suggest taking screenshots using an external tool such as Shutter and then simply insert them into Sikuli ("Insert image" button on the toolbar).

There's another known issue for version 1.0.0 which has just been discovered: for new, "untitled" projects, the images are not saved to disk so you must firstly save the project and then insert/take screenshots. This will probably be fixed soon though.



How run Sikuli in Ubuntu



1. To use Sikuli on Linux, you need to install the following dependencies: libopencv-core 2.4, libopencv-highgui 2.4, libopencv-imgproc 2.4, libpng15 (though libpng12 seems to work too), tesseract 3 and liblept. You can install these in Ubuntu 13.04 or 13.10 using the following command:
sudo apt-get install libopencv-highgui2.4 libopencv-imgproc2.4 libopencv-core2.4 libpng12-0 libtesseract3 liblept3

Ubuntu 12.10 and possibly 12.04 too, 32bit only: The Sikuli dependencies (OpenCV 2.4, etc.) aren't available for older Ubuntu versions but for Ubuntu 12.10 32bit (according to the Sikuli wiki, they are built for Ubuntu 12.10 but may work on older Ubuntu versions), you can download the required .so files from HERE (look for the download link at the bottom), extract and copy them into /usr/local/lib/

2. You'll also need Java: install either OpenJDK7 using Ubuntu Software Center or see our installation guides for Oracle Java 7 or Java 6.

3. Once you've completed the steps above, download Sikuli from Launchpad - you'll need to download Sikuli-IDE:
  • "Sikuli-IDE-1.0.0-Lnx64.zip" for 64bit
  • "Sikuli-IDE-1.0.0-Lnx32.zip" for 32bit

4. Then, extract it and make the two scrips inside the extracted folder executable: sikuli-ide (the user interface) and sikuli-script (which can be used to run Sikuli scripts via command line). You can make these scripts executable via the file manager - for instance, in Nautilus, right click them, select "Propreties" and on the "Permissions" tab, check the "Allow executing file as program" box -, or via the command line (assuming you've extracted Sikuli in your home folder):
chmod +x ~/Sikuli-IDE*/{sikuli-ide,sikuli-script}

5. And finally, run Sikuli by double clicking the "sikuli-ide" file and selecting "Run", or from a terminal (once again, assuming you've extracted Sikuli in your home directory):
~/Sikuli-IDE*/sikuli-ide

If you want to run a Sikuli project from the command line, use:
~/Sikuli-IDE*/sikuli-script -r /path/to/project.sikuli


Download Sikuli for Linux, Windows or Mac OS X.

If you encounter bugs, report them @ Launchpad.

0 comments:

Post a Comment

 
Top