sikuli-driver team mailing list archive
-
sikuli-driver team
-
Mailing list archive
-
Message #39881
[Question #354077]: image missing exception
New question #354077 on Sikuli:
https://answers.launchpad.net/sikuli/+question/354077
Using the IDE in windows7., using this python script:
try:
wait("myimage.png", 1)
print "ok"
except FindFailed:
print "nok"
if myimage.png exists as a file and is found on the screen the output is "ok"
if myimage.png exists as a file and is not found on the screen the output is "nok"
if myimage.png doesn' t exist as a file, the output is
[error] Image: could not be loaded: file:/D:/sikulix/scripts/myscript.sikuli/myimage.png
[error] RunTimeIDE: Wait: Abort: Jython traceback - current first: Sikuli (62) myscript (3)
[error] RunTimeIDE: ImageMissing: myimage.png
I thought it would raised the exception FindFailed if the image is missing.
What do I do wrong?
How can I handle the fact the image is missing without the script to just terminate?
--
You received this question notification because your team Sikuli Drivers
is an answer contact for Sikuli.