← Back to team overview

sikuli-driver team mailing list archive

[Question #674127]: wait(pattern, timeout) not matching large pngs

 

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

I'm trying to create some test automation for a plotting utility. Basically, I'd like Sikuli to drive the UI of the app to produce some charts, and I'd then like it to match the charts to some expected screen shots to verify that they are rendered correctly.

For small pngs, like buttons and menu items, things work well, but for large pngs I am having a hard time matching. 

One example is a plot 1469x372 on a 1920x1080 display. I have just taken a fresh screen shot from the app, saved as a PNG, but when I use wait(myPattern, 10) to try to verify that the plot is actually displayed, I get FindFailed. This is all using the Java API.

So far, I had been trying this with three plots in three tabs of the application. I had taken screen shots from one version of the app and verified functionality; then switched to a different version and tried again. 

With the new version, the first plot image matched, but the second one failed. The png opened in a viewer looked identical to me when lined up next to the application itself, but it would consistently fail with the new version... so I took another screen shot and tried to match that, and it succeeded... OK... 

The third plot also failed to match against the new version, so I added a loop and tried reducing similarity until I got a match. I got a match at similiarity 0.68.  OK. However, when I deliberately altered the plot by multiplying its values by 1.2, I still got a match at 0.68., so that's no good.

Then I took a fresh screen shot of the new version's 3rd chart and tried to match that with exact(). It failed to match. Then I tried to match it with default (0.70). That failed. Then I tried my loop... I got no match, even down to 0.01, it still failed to match. And yet it is a screen shot of the exact same version with the exact same chart and exact same data.

Is there a problem using PNG? Should I use some other format for the pattern files?

This is on OSX, BTW, with a Java 1.8 Swing app.



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