Comment 1 for bug 966536

Revision history for this message
Pranav (pranav-avhad2009) wrote :

Hello RaiMan,

I want to highlight specific region from the image , I have written below code.
Its highlighting somewhere else and not the expected region from the image.

Please guide me in case of I have missed anything in below code.

public static Boolean isImageRegionPresent(String imageRegion) {

  String bigfilePath = Constants.configFolder + "Runtime.png";
  Finder f;
  Boolean result = false;
  try {
   f = new Finder(bigfilePath);

   f.find(new Pattern(imageRegion));

   if (f.hasNext()) {

    Match m = f.next();
    m.highlight(1);
    result = true;
   } else {
    Log.info("Expected Image region is NOT present.");
    result = false;

   }

  } catch (IOException e) {
   // TODO Auto-generated catch block

   result = false;
   e.printStackTrace();
  }

  return result;
 }