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 _______________________________________________ LDTP-dev mailing list LDTP-dev@lists.freedesktop.org http://lists.freedesktop.org/mailman/listinfo/ldtp-dev