sikuli-driver team mailing list archive
-
sikuli-driver team
-
Mailing list archive
-
Message #41740
Re: [Question #509277]: How to continue the process of specific variable when image is not found.
Question #509277 on Sikuli changed:
https://answers.launchpad.net/sikuli/+question/509277
Status: Open => Answered
RaiMan proposed the following answer:
find() throws FindFailed exception, which needs a different approach
with try/catch to sort out success/fail.
In your case it is easier to use exists() instead:
m = exists("1488336741526.png")
d = 0;
if m:
d = m.getScore()
Debug.user("Image Percentage")
Debug.user(str(d))
if d>0.99:
Debug.user("Slicing Passed")
else:
Debug.user("Slicing Failed")
--
You received this question notification because your team Sikuli Drivers
is an answer contact for Sikuli.