LDTP
3.5.0
|
hasstate('<window name>', '<object name>', <object SPI state>[, <guitimeout>])
Checks the SPI state of the given object.
1 | on success, 0 on failure |
Refer: Linux: http://cgit.freedesktop.org/ldtp/ldtp2/tree/ldtpd/core.py Linux: http://cgit.freedesktop.org/ldtp/ldtp2/tree/ldtp/__init__.py
Mac: https://github.com/ldtp/pyatom/blob/master/atomac/ldtpd/core.py
Windows: https://github.com/ldtp/cobra/blob/master/Ldtpd/Generic.cs
With respect to gedit window, first tab
from ldtp import *
hasstate('*-gedit', 'txt0', state.FOCUSABLE)
hasstate('*-gedit', 'txt0', state.FOCUSABLE, 10)