sikuli-driver team mailing list archive
-
sikuli-driver team
-
Mailing list archive
-
Message #02773
Re: [Question #156247]: How are exception handled when using imported scripts?
Question #156247 on Sikuli changed:
https://answers.launchpad.net/sikuli/+question/156247
Status: Open => Answered
RaiMan proposed the following answer:
--1. There are some people out there, that recommend to use setAutoWaitTimeout() to a higher value (e.g. 10) to catch most situations, where the reference image may take some time to come up (especially with web pages).
I never do this. Normally in your workflow, you know the situations, where it might be necessary to wait for the next image.
In these cases I always use
wait(img, timeout)
exists(img, timeout)
or even
while not exists(img, 0): wait(1)
if I do not know, how long it might take.
--2. This mostly is the problem when using click()'s that lead to changing the screen content. Today we have many animations and other effects (e.g. minimizing a window), that lengthen the time until the next reference image is fully visible. If this is less than 0.5 seconds, humans usually do not recognize it, but Sikuli does.
So the easiest solution is to say in such situations:
click(img); wait(0.5) # should be enough to wait for window to vanish
click(next_img)
--
You received this question notification because you are a member of
Sikuli Drivers, which is an answer contact for Sikuli.