sikuli-driver team mailing list archive
-
sikuli-driver team
-
Mailing list archive
-
Message #55311
Re: [Question #691528]: Perform action on image when it appears dynamically without using sleep
Question #691528 on Sikuli changed:
https://answers.launchpad.net/sikuli/+question/691528
Status: Open => Answered
RaiMan proposed the following answer:
Generally: wait() and exists() internally repeat the search until the
image is found or the standard (3 seconds) / given wait time is
exceeded.
So the correct approach in your case:
wait(imageOrPattern, wait-time)
or
exists(imageOrPattern, wait-time)
The only difference between both:
- wait throws findFailed if not found within wait-time
- exits returns null if not found within wait-time
In any case all find methods return immediately, when the image is
found.
So the wait-time in your case should simply be a value a bit larger than
the largest delay you expect.
--
You received this question notification because your team Sikuli Drivers
is an answer contact for Sikuli.