← Back to team overview

sikuli-driver team mailing list archive

Re: [Question #195343]: Trapping error for Region.wait ?

 

Question #195343 on Sikuli changed:
https://answers.launchpad.net/sikuli/+question/195343

j posted a new comment:
alternatives to RaiMan's suggestion:

1.
setThrowException(False) # you won't have any find failed exceptions any more

if NextEpisodeRegion.wait("logo.png",8) != None:
    # code if image was found
else:
    # code if image was not found

2.
try:
    NextEpisodeRegion.wait("logo.png",8):
    # code if image was found
except:
    # code if image was not found

-- 
You received this question notification because you are a member of
Sikuli Drivers, which is an answer contact for Sikuli.