← Back to team overview

sikuli-driver team mailing list archive

Re: [Question #239439]: Sikuli - Java Api - find not working using Java BufferedImages --- fixed in version 1.1.0

 

Question #239439 on Sikuli changed:
https://answers.launchpad.net/sikuli/+question/239439

Rohan posted a new comment:
I insisted because thats the only way i was aware of :) I wasnt aware of
ImageLocator. May be I am missing the documentation url?


So in current version the following code should work ?

public class AppTest10 {

  private static void log(String msg, Object... args) {
    System.out.println(String.format("[user] " + msg, args));
  }

  public static void main(String[] args) throws FindFailed {
    Screen s = new Screen();
    String pathImg = new File(System.getProperty("user.dir"), "images").getAbsolutePath();
    ImageLocator.addImagePath(pathImg);
    log(Arrays.toString(ImageLocator.getImagePath()));
    log("" + s.find("some-image.png"));
  }
}

-- 
You received this question notification because you are a member of
Sikuli Drivers, which is an answer contact for Sikuli.