1
from ldtplibutils import *
6
def isCheckBoxEnabled (self, accessible):
7
# FIXME: Implement wait_till_object_state_contains
10
def click (self, accessible):
11
if self.isCheckBoxEnabled (accessible) == False:
12
return LdtpErrorCode.INVALID_OBJECT_STATE
13
_component = accessible.queryComponent ()
16
_flag = _component.grabFocus ()
18
print 'Grab focus %s' % _flag
20
_action = accessible.queryAction ()
23
# FIXME: Do action based on event, instead of 0
24
_flag = _action.doAction (0)
27
return LdtpErrorCode.SUCCESS
29
return LdtpErrorCode.CLICK_FAILED
31
def checkBoxMain (cctxt, cmd):
32
checkBoxInst = CheckBox ()
33
if cmd == command.CLICK:
34
status = checkBoxInst.click (cctxt.guiHandle.handle)
37
elif cmd == command.GRABFOCUS:
38
status = grabFocus (cctxt.guiHandle.handle)
43
return LdtpErrorCode.COMMAND_NOT_IMPLEMENTED