sikuli-driver team mailing list archive
-
sikuli-driver team
-
Mailing list archive
-
Message #03846
Re: [Question #163911]: how to compare with two uncertain area
Question #163911 on Sikuli changed:
https://answers.launchpad.net/sikuli/+question/163911
Status: Open => Answered
RaiMan proposed the following answer:
ok, here you are.
In parts it is pseudo code, that has to be adapted to your needs (#!).
switchApp("the-window-containing-the-flash") #!
flashReg = the-screen-area-containing-the-image #!
refImg = capture(flashReg) # this is a temp file name now
ab = App("the-browser-window") #!
ab.focus()
checkWin = ab.window() # the search area
if checkWin.exists(refImg):
print "the same"
else:
print "different"
--- if you want to save the screenshots:
# once at the beginning of your script
import shutil
import os.path
imageDir = "path-to-some-existing-directory" #!
# later in your script:
imgFile = capture(some-region) #!
shutil.move(imgFile, os.path.join(imageDir, "you-name-it.png")) #!
--
You received this question notification because you are a member of
Sikuli Drivers, which is an answer contact for Sikuli.