hasstate ('<window name>', '<object name>', <object SPI state-1>[, ..., <object SPI state-n>])
Checks the SPI state of the given object.
| 1 | on success, 0 on failure |
Refer: http://cgit.freedesktop.org/ldtp/ldtp/tree/src/client-handler.c http://cgit.freedesktop.org/ldtp/ldtp/tree/python/ldtp.py
With respect to gedit window, first tab
from ldtp import *
hasstate ('*-gedit', 'txt0', state.FOCUSABLE)
hasstate ('*-gedit', 'txt0', state.FOCUSABLE, state.VISIBLE)