← Back to team overview

sikuli-driver team mailing list archive

Re: [Question #196878]: how to run the FOR loop in second time

 

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

    Status: Open => Answered

RaiMan proposed the following answer:
Yes this might well be, but at time of click() (second time) it is not
yet visible for Sikuli.

I guess the problem is as follows:

At the end of the loop, you have:
exists("1336727557660.png")

this waits 3 seconds for the image, but simply returns with no error,
when it is not seen.

Since this is the same image as with the click, you should increase the waiting time:
exists("1336727557660.png", 10)

But why don't you use
wait("1336727557660.png", 10)

it is the same as exists(), but stops the script with an FindFailed
exception. This gives you a chance, to debug your problem.

A useful usage of exists:

if not exists("1336727557660.png", 10):
     popup("I had to wait 10 seconds and nothing happened")
     exit()

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