sikuli-driver team mailing list archive
-
sikuli-driver team
-
Mailing list archive
-
Message #11368
Re: [Question #201377]: i use exist(img, 0) and wait loop to wait a img, but it dose not work
Question #201377 on Sikuli changed:
https://answers.launchpad.net/sikuli/+question/201377
sangzh posted a new comment:
I have traced the code, the function exits when the result is isMatch, so the code has not problem.
The problem is that: after the image is found, the following will click the image, but it dose not click the image.
I think the reason is that there is a delay after the image is found, and the image dose not display when excute the click. So add wait(1) before break the function, then it can work well.
the code is:
def waitFor(img):
weWait=30
while weWait > 0:
result = exists(img,0)
if result:
wait(1)
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.