Sikuli - Automation
How to automate desktop application using sikuli automation tool
To configure sikuli , below are the required Files
1) Java
2) Sikuli jar file
Below URL is for sikuli jar file you can download from below link
https://launchpad.net/sikuli/+download
After download the jar file
Create a folder and copy the jar file into created folder
Now double click on the jar file
A setup window will be open
Click on the pack2 and click on setup now
After that a setup question window will be display click on yes to setup sikuli on your system
Click yes to install the sikuli on your system Or No to install a fresh copy on your system.
Wait until setup complete.
After setup complete add the jar file into Eclipse.
After all the setup completed open snipping tool which is located in your system
To find the snipping tool
Click on start on your system
click on run
type snipping tool
you will find a snippint tool on you search field click it
Click on New button
When click on New it will display a + symbol on your screen
Create a folder for Images and save the file in created folder location
Now open the eclipse
Create a project and create a file
Copy the below code for test execution of sikuli
package com.bird.test;
import org.sikuli.script.FindFailed;
import org.sikuli.script.Pattern;
import org.sikuli.script.Screen;
public class sikuliexp {
public static void main(String[] args) throws InterruptedException, FindFailed {
Screen scr= new Screen();
Pattern ptr=new Pattern("I:\\sikuli_files\\filenameimage.PNG");
Pattern ptr1=new Pattern("I:\\sikuli_files\\openimage.PNG");
scr.type(ptr,"abcd");
Thread.sleep(1000);
//scr.wait(100);
scr.doubleClick(ptr1);
}
}
Comments
Post a Comment