Skip to main content

Robot Framework SiluliX library powered by SikuliX Java library and JPype Python module.

Project description

robotframework-sikulixlibrary

The all new, modern, SikuliX Robot Framework library for Python 3.x, based on JPype Python module.

JPype is a Python module to provide full access to Java from within Python, and this library is a wrapper to SikuliX that is exposing Java functions as Robot Framework keywords. While in the past the only approach to use Sikuli functionality within Robot Framework was through Remote Server with XML RPC interface, the aim of this library is to replace that approach and make it a lot easier to use SikuliX within Robot Framework projects with a simple Library statement (i.e. no need to start remote server and so on).

Also with this implementation is very easy to extend the library with new custom keywords, for example with the purpose to create migration classes to help migrate from current Sikuli libraries or other image recognition alternatives. For practical examples check migrate folder.

See keyword documentation.

Installation instructions

  1. Python 3.5 or newer, as supported by JPype
  2. JPype 1.2 or newer and JPype project dependencies as explained on project page: https://github.com/jpype-project/jpype
    • Install Java 8 or newer
    • While not mentioned on JPype page, on a new Windows 10 machine also Visual C++ Redistributable 2015 and newer are needed (e.g. vc_redist.x64.exe)
  3. SikuliX as a standalone jar from project page: https://raiman.github.io/SikuliX1/downloads.html
    • Put jar file in any local directory (e.g. C:\sikulix\sikulix.jar)
    • Recommended to use environment variable SIKULI_HOME that point to sikulix local directory
  4. pip install robotframework-sikulixlibrary

Examples

Testing with Robot Framework

*** Settings ***
Library   SikuliXLibrary

*** Test Cases ***
Example Test
    imagePath add   ${my_path}
    settings set    MinSimilarity  ${0.9}
    app open        C:/Windows/System32/notepad.exe
    region wait     iNotepad.PNG
    region paste    Welcome!

Testing with Python.

from SikuliXLibrary import *
lib = SikuliXLibrary()
lib.imagePath_add('my_path')
lib.settings_set('MinSimilarity', float(0.9))
lib.app_open("C:\\Windows\\System32\\notepad.exe")
lib.region_wait('iNotepad')
lib.region_paste('Welcome!)

Testing

Git clone and execute runtest.bat to run all *.robot files from within test directory, or run individual robot files.

Additionally, debugging with Robot Editor - RED (https://github.com/nokia/RED) is also possible with this library, for both Robot Framework and Pyton code.

Supported Operating Systems

  1. Windows 10

    • supported, tested
  2. OSX

  3. Linux

    • untested

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

robotframework-sikulixlibrary-1.0.1.tar.gz (14.9 kB view hashes)

Uploaded Source

Built Distribution

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page