← Back to team overview

sikuli-driver team mailing list archive

Re: [Question #272575]: How to use setFindFailedResponse(PROMPT)

 

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

    Status: Open => Answered

RaiMan proposed the following answer:
setFindFailedResponse(PROMPT) works as follows:
- if an image is not found, instead of crashing with a FindFailed exception, it produces a popup (always on top), that gives you a chance, to manually arrange the screen, so that the image should be found now.
- then you press Retry and you script should continue successfully.

more info:
http://sikulix-2014.readthedocs.org/en/latest/region.html#exception-findfailed

This only makes sense, if you want to do the corrective actions
manually.

if you want to script
I want it to search for a image then do a slide action 

the you have to use other constructs:

while not exists(someImage, 0):
    # your corrective actions
    wait(0.5) # give the GUI some time
click() # would click on the now found someImg

-- 
You received this question notification because your team Sikuli Drivers
is an answer contact for Sikuli.