==============================
## Introduction
Sikuli Robot Framework Library provide keywords to test UI through [Sikuli](http://www.sikuli.org/).
## Keyword Documentation
[Keywords](http://rainmanwy.github.io/robotframework-SikuliLibrary/doc/SikuliLibrary.html)
## Overview

* This library is implemented with [Robot Framework Remote Library](https://code.google.com/p/robotframework/wiki/RemoteLibrary)
* Sikuli api is encapsulated as Robot keywords, and explored to clients with [jrobotremoteserver](https://github.com/ombre42/jrobotremoteserver)
* Client is implemented with python and use Robot remote library to communicate with server side
* Users could implement their own clients with different languages which support xml rpc
## Differences With Other Similiar Sikuli Libraries
* Robot Remote Library technology is used, different client part program languages are supported
* Do not plan to expose sikuli api to Robot Framework directly. All sikuli api are encapsulated as Keywords.
* Wait functionality is added for each operations
```java
public void click(String image) throws Exception{
wait(image, Double.toString(this.timeout));
try {
screen.click(image);
}
catch (FindFailed e) {
capture();
throw new ScreenOperationException("Click "+image+" failed"+e.getMessage(), e);
}
}
```
* Keyword to handel similiar images issue, could check "click_in" test suite in demo folder to get details
```java
public void clickIn(String areaImage, String targetImage) throws Exception {
wait(areaImage, Double.toString(this.timeout));
Match match = screen.find(areaImage);
System.out.println(areaImage + " is found!");
match.click(targetImage);
capture(match.find(targetImage));
}
```
* Operating images could be shown in robot logs, easy to troubleshooting

## Installation
### Pip installation
*If target OS is Windows, could use pip to install directly
```
pip install robotframework-SikuliLibrary
```
*If target OS is Linux, please download linux version from [pypi](https://pypi.python.org/pypi/robotframework-SikuliLibrary)
### Build With Maven
* Clone this project, and execute maven package command
* One zip file will be created in "target" folder, could unzip this file and add to PYTHONPATH
###Note
* For Linux, there are some dependencies need be installed, please check [sikuli quick start](http://www.sikulix.com/quickstart.html) to get more details.
## Example
### Hello World Example
```
*** Settings ***
Documentation Sikuli Library Demo
Test Setup Add Needed Image Path
Test Teardown Stop Remote Server
Library SikuliLibrary
*** Variables ***
${IMAGE_DIR} ${CURDIR}\\img
*** Test Cases ***
Windows Notpad Hellow World
Open Windows Start Menu
Open Notepad
Input In Notepad
Quit Without Save
*** Keywords ***
Add Needed Image Path
Add Image Path ${IMAGE_DIR}
Open Windows Start Menu
Click windows_start_menu.png
Open Notepad
Input Text search_input.png notepad
Click notepad.png
Double Click notepad_title.png
Input In Notepad
Input Text notepad_workspace.png Hello World
Text Should Exist Hello World
Quit Without Save
Click close.png
Click dont_save.png
```
### Ruby Client Example
```ruby
require "xmlrpc/client"
require "pathname"
client = XMLRPC::Client.new("127.0.0.1", "/", 10000)
client.call("get_keyword_names")
client.call("run_keyword", "addImagePath", [Pathname.new(File.dirname(__FILE__)).realpath.to_s+"/img"])
client.call("run_keyword", "click", ["windows_start_menu.png"])
client.call("run_keyword", "waitUntilScreenContain", ["search_input.png", "5"])
client.call("run_keyword", "input_text", ["search_input.png", "notepad"])
client.call("run_keyword", "click", ["notepad.png"])
client.call("run_keyword", "doubleClick", ["notepad_title.png"])
client.call("run_keyword", "click", ["close.png"])
```
### Click In Example
```
*** Settings ***
Documentation Sikuli Library Click In Example
Test Setup Add Needed Image Path
Test Teardown Stop Remote Server
Library SikuliLibrary
Library OperatingSystem
*** Variables ***
${IMAGE_DIR} ${CURDIR}\\img
*** Test Cases ***
Click In Example
Open Example UI
Click Right OK Button
Click Left OK Button
*** Keywords ***
Add Needed Image Path
Add Image Path ${IMAGE_DIR}
Open Example UI
Run chrome ${CURDIR}\\html\\click_in_demo.html
Click Right OK Button
Click In right_area.png target.png
Click Left OK Button
Click In left_area.png target.png
```
Metadata
Release files for myrobotlibrary 0.0.4
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | Provenance | Actions |
|---|---|---|---|---|
| myrobotlibrary-0.0.4.zip | 172.3 kB | Without provenance | Details for myrobotlibrary-0.0.4.zip |
Release files / myrobotlibrary-0.0.4.zip
| Download URL | myrobotlibrary-0.0.4.zip |
|---|---|
| Size | 172.3 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
ca5a2211b66c6ea8026427e21a26efe3ad484423df84ef7e165fab399dfa851a
|
|
BLAKE2b-256 checksum How to use checksums |
8facdb568c22ad0ddb7ad9bd5b4523f5ce27e1e027240eb7e52a806105da1864
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
Security for myrobotlibrary 0.0.4
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
No provenance found
None of the files in this release were uploaded with provenance metadata.
A note on package security
PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.
To learn more about protecting yourself from malicious actors, visit our package security documentation.