← Back to team overview

sikuli-driver team mailing list archive

[Question #295746]: screen() unable to identifying images captured on Mac 10.11

 

New question #295746 on Sikuli:
https://answers.launchpad.net/sikuli/+question/295746

Hi, 
I am currently analyzing some GUI tools and was keen to use Sikuli. I have Mac 10.11. I added the sikulixapi.jar in my Eclipse IDE so that i can automated my project using Java and selenium.
I captured the images on MAC using Grab,Apowersoft mac sreenshot etc…and kept the image (jpg/png) in a separate folder. 
Every time i am getting the error when I run the code.
Exception in thread "main" FindFailed: can not find P(/Users/divyasharma/Desktop/SikuliImages/icon1.png) S: 0.7 in S(0)[0,0 1440x900]
  Line 2189, in file Region.java

	at org.sikuli.script.Region.handleFindFailedShowDialog(Region.java:2189)
	at org.sikuli.script.Region.handleFindFailed(Region.java:2134)
	at org.sikuli.script.Region.wait(Region.java:2546)
	at org.sikuli.script.Region.find(Region.java:2205)
	at org.sikuli.script.Region.getLocationFromTarget(Region.java:3067)
	at org.sikuli.script.Region.click(Region.java:3534)
	at org.sikuli.script.Region.click(Region.java:3519)
	at ClickIcon.main(ClickIcon.java:12)

Below is the snippet that i am trying to run:
public static void main(String[] args) throws FindFailed
	{
	Screen screen = new Screen();
	Pattern pattern = new Pattern("/Users/divyasharma/Desktop/SikuliImages/icon1.png");
	screen.click(pattern);
	System.out.println("I AM DONE");
	}

I wondered if Sikuli cannot be used and using Sikuli IDE, I was successfully able to run the script in Sikuli IDE as it captures its own images and saves it in .sikuli file. I thought of reusing the images but then i cant import .sikuli images in my java file.
Can you please help me where i could be going wrong.

Thanks,
~Divya

-- 
You received this question notification because your team Sikuli Drivers
is an answer contact for Sikuli.