Can Sikuli provide a way to control the delay between 2 actions?

Asked by Landy

I use type(Key.ENTER) to dismiss the child window, then use type(Key.ENTER) again to dismiss the father window.
But both child and father window need a delay to disappear completely.
I want to add wait(3) between the two actions.

I don't want to add many wait(xxx) in the code. Is there a way to control the delay between actions? I know there are settings for delay of drag and drop, or mouse move. Thanks.

Question information

Language:
English Edit question
Status:
Solved
For:
SikuliX Edit question
Assignee:
No assignee Edit question
Solved by:
Tsung-Hsiang Chang
Solved:
Last query:
Last reply:
Revision history for this message
Best Tsung-Hsiang Chang (vgod) said :
#1

There is no general delay control between actions.
You may want to use waitVanish([window/titlebar image]), which is much better than wait(time).

Revision history for this message
Tsung-Hsiang Chang (vgod) said :
#2

Btw, there should be a better and more general way to deal with this synchronization problem. Ideas are welcome.

Revision history for this message
Landy (landy-zhu) said :
#3

Thank you, Tsung-Hsiang, I'll try waitVanish().

Revision history for this message
Landy (landy-zhu) said :
#4

Thanks Tsung-Hsiang Chang, that solved my question.