[LDTP-Dev] How to use the array returned by getallstates()
Nagappan A
nalagappan at vmware.com
Thu Sep 24 19:28:54 PDT 2009
Hi Scott,
You can check with:
1. hasstate('window', 'object', state.ENABLED)
2. getallstates, from return value of it you can check:
enabled = False
for currentState in states:
if state.ENABLED == currentState:
print 'Enabled'
enabled = True
break
In case of menu state.SENSITIVE will be checked.
Thanks
Nagappan
Wang Qi, Scott wrote:
> Hi, Nagappan,
>
> It seems ldtp.getallstates() return an array of integer. I look in the
> online doc about how to use the index. Seems there is no information
> on it.
>
> Also, how to tell if a mnu is enabled or not? Seems button' state can
> be get by calling stateenabled (). But stateenabled() will always
> return 0 for mnu?
>
> Thanks
> Scott Wang
>
>
--
Linux Desktop Testing Project - http://ldtp.freedesktop.org
http://nagappanal.blogspot.com
More information about the LDTP-dev
mailing list