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
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 isImageRegionPr esent(String imageRegion) {
String bigfilePath = Constants. configFolder + "Runtime.png"; bigfilePath) ;
Finder f;
Boolean result = false;
try {
f = new Finder(
f.find(new Pattern( imageRegion) );
if (f.hasNext()) {
Match m = f.next(); info("Expected Image region is NOT present.");
m.highlight(1);
result = true;
} else {
Log.
result = false;
}
} catch (IOException e) {
// TODO Auto-generated catch block
result = false; Trace() ;
e.printStack
}
return result;
}