LDTP
3.5.0
|
waittillguiexist('<window name>'[, '<component name>'[, guiTimeOut][, <'state'>]])
If the given window name exist, this function returns 1. If window doesnot exist, then this function returns 0. Difference between guiexist and waitguiexist is, waitguiexist waits for maximum 30 seconds. Still the window doesn't appear, then 0 is returned. We can set the environment variable 'GUI_TIMEOUT' to change the default waiting time. We can wait for component also and its an optional argument. The default value of guiTimeOut is None and it can be changed either by environment variable or by passing an integer argument > 0. This timeout will be for this specific window and it will not affect the global default time out settings. If you want to change the global default time out settings use guitimeout or objtimeout function appropriately.
Window name can be clubbed with glob patterns(* or ?)
If window label contains space or new line characters, they will be stripped.
Example
'Unsaved Document 1
gedit', will be represented as 'UnsavedDocument1gedit'
Refer:
Linux: http://cgit.freedesktop.org/ldtp/ldtp2/tree/ldtpd/core.py
Mac: https://github.com/ldtp/pyatom/blob/master/atomac/ldtpd/core.py
Windows: https://github.com/ldtp/cobra/blob/master/Ldtpd/Utils.cs
1 | on success, 0 otherwise |
This function will be useful, when some event is fired and after that if a new window is expected, we can use this function to wait for window to appear.