LDTP
3.5.0
|
guiexist('<window name>'[, <object name>])
If the given window name exist, this function returns 1. If window doesnot exist, then this function returns 0.
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 and 0 on no existing window |
With respect to gedit Open dialog
from ldtp import *
guiexist('dlgOpenFile...')
guiexist('dlgOpenFile...', 'btnOpen') # Returns 1, If window exist and also the object exist
guiexist('dlgOpenFile...', 'btnabc') # Returns 0