LDTP
3.5.0
|
getallstates('<window name>'[, '<component name>'])
Will return all the accessibility states of given object information
list | of states will be returned on success, LdtpExecutionError exception on failure |
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/Generic.cs
from ldtp import *
getallstates() # Will return all the accessibility states of given object information Compare all the states based on your requirement, say for example, if interested in checking for VISIBLE state, then:
states = getallstates('*-gedit', 'btnCopy') if state.VISIBLE in states: print 'Object is visible'