sikuli-driver team mailing list archive
-
sikuli-driver team
-
Mailing list archive
-
Message #29906
Re: [Question #259939]: How to have calculate time delay automatically while navigating from one screen to another in sikuli?
Question #259939 on Sikuli changed:
https://answers.launchpad.net/sikuli/+question/259939
Status: Open => Answered
RaiMan proposed the following answer:
If I understand right:
You want to be sure, that the next "screen" is fully visible, before continuing the workflow.
If this is true:
The usual way is to use
wait(image, time)
where image is an image on the new screen, whose availability signals: screen is ready
and time is the maximum time in seconds it takes the new screen to get fully available under all possible circumstances.
This is ok, since in the moment, image is detected, the wait function will come back and the workflow continues.
So to say, it is the opposite of waitVanish().
example:
click(someButton) # to trigger the changing of the screen
wait(keyVisualOnNewScreen, 30) # wait max 30 seconds before giving up with FindFailed
click(someButtonOnNewScreen) # now someButtonOnNewScreen should be visible
or shorter if possible:
click(someButton) # to trigger the changing of the screen
click(wait(someButtonOnNewScreen, 30)) # if someButtonOnNewScreen is the image to wait for
--
You received this question notification because you are a member of
Sikuli Drivers, which is an answer contact for Sikuli.