New question #201377 on Sikuli:
https://answers.launchpad.net/sikuli/+question/201377

I want to wait for image to occur,and the time is not sure, so I define a 
function to loop wait for the image, if image occurs, then break the loop. but 
when wait time is longer than 5-6s, the code below the function will be 
excuted, it never wait for 30s,why? thank you very much!
the follow is the code:
def waitFor(img):
    weWait=30
    while weWait > 0:
        result = exists(img,0)
        if result:
            break
        wait(1)
        weWait-=1
    if not result:
        print "image did not appear"
        exit(1)

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

_______________________________________________
Mailing list: https://launchpad.net/~sikuli-driver
Post to     : [email protected]
Unsubscribe : https://launchpad.net/~sikuli-driver
More help   : https://help.launchpad.net/ListHelp

Reply via email to