sikuli-driver team mailing list archive
-
sikuli-driver team
-
Mailing list archive
-
Message #12824
[Question #207285]: image comparison fails
New question #207285 on Sikuli:
https://answers.launchpad.net/sikuli/+question/207285
Hi,
I'm struggling with sikulis image matching possibilities. I'm testing if a website loaded correctly. The test fails if a blank page shows up.
1) First approach:
Look into screen region and test if blank_page.png (1021x672 pixel) exists.
#screen region // screen size ipad
screenRegion = Region(1,43,1020,804)
#create match object
imageBlank = Pattern("blank_page.png")
if screenRegion.exists(imageBlank):
print "debug: blank screen, website failed to load correctly"
else:
print "ok"
2) Second approach:
Make a screenshot of the website and test if it's blank.
screenRegion = Region(1,43,1020,804)
imageScreenRaw = capture(screenRegion)
#match object
imageScreen = exists(imageScreenRaw)
#region from screenshot
imageScreenRegion = Region(imageScreen)
imageBlank = Pattern("blank_page.png")
if imageScreenRegion.exists(imageBlank):
print "debug: blank screen, website failed to load correctly"
else:
print "ok"
The blank screen differs a 100% from the region or captured sreenshot, but both test approaches fail unfortunately. What's wrong? Does it matter if I test against a 10x10 blank png or a 1021x672 pixel?
Any help on this issue is highly appreciated. Thanks in advance for sharing your experience.
regards
--
You received this question notification because you are a member of
Sikuli Drivers, which is an answer contact for Sikuli.