sikuli-driver team mailing list archive
-
sikuli-driver team
-
Mailing list archive
-
Message #37213
Re: [Question #288553]: Taking a printscreen if an error occurs
Question #288553 on Sikuli changed:
https://answers.launchpad.net/sikuli/+question/288553
Status: Open => Answered
masuo proposed the following answer:
documet says.
By default, if the visual object (image or text) cannot be found, Sikuli will stop the script by raising an Exception FindFailed. This follows the standards of the Python language, so that you could handle such exceptions using try: ... except: ....
http://sikulix-2014.readthedocs.org/en/latest/region.html?highlight=try
[example:]
try:
find("image.png")
except:
type(Key.PRINTSCREEN)
--
You received this question notification because your team Sikuli Drivers
is an answer contact for Sikuli.