def click (windowName, componentName): """click on radio button / check box / push button/ combo box/ radio menu item/ toggle button/ radio button. INPUT: click ('', '') OUTPUT: Clicks the component_name.""" if not (type (windowName) == type (componentName) == types.StringType): raise SyntaxError try: _requestId = str (random.randint (0, sys.maxint)) _message = generatexml ('click', _requestId, windowName, componentName) sendpacket (_message) _responseStatus, _responseData = getresponse (_requestId) if _responseStatus[0] != 0: raise LdtpExecutionError ('click failed') return 1 except LdtpExecutionError, msg: raise LdtpExecutionError (str (msg))