sikuli-driver team mailing list archive
-
sikuli-driver team
-
Mailing list archive
-
Message #32952
[Question #268160]: Failed to find image pattern using Finder
New question #268160 on Sikuli:
https://answers.launchpad.net/sikuli/+question/268160
I'm trying to compare two screenshots captured using selenium webdriver. I'm using Nightly SikuliX 1.1.0.
I tried using Finder.find method but every time it fails.
The Java code is as below:
String masterSetFilePath = String.format("%s%s.png", masterFolder, testCaseName);
String currentSetFilePath = String.format("%s%s.png", currentFolder, testCaseName);
Pattern masterPattern = new Pattern(masterSetFilePath);
Finder finder = new Finder(currentSetFilePath);
finder.findAll(masterPattern);
if(finder.hasNext())
{
org.testng.Assert.assertTrue(true, "Pattern Found");
}
else
{
throw new AssertionError("Test Case Failed during image comparison - Test Case Name " + testCaseName);
}
It always go to else.
Also tried giving similar to find method
finder.find(masterPattern.similar((float) 0.9));
--
You received this question notification because you are a member of
Sikuli Drivers, which is an answer contact for Sikuli.