← Back to team overview

sikuli-driver team mailing list archive

Re: [Question #162030]: is there any "OnError" method in sikuli?

 

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

    Status: Open => Answered

RaiMan proposed the following answer:
recommended:
--- the extra hover() is not needed
--- click(getLastMatch)) avoids additional find operation (faster!)

if exists(img):
    click(getLastMatch()) # clicks the already found image
else:
    something else

Since we are talking Python: mind indentation/dedentation (tab/shift-
tab)

faq 1501 and faq 1607 might be helpful.

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