def enterstring(self, window_name, object_name='<STR_LIT>', data='<STR_LIT>'):
if not object_name and not data:<EOL><INDENT>return self.generatekeyevent(window_name)<EOL><DEDENT>else:<EOL><INDENT>object_handle = self._get_object_handle(window_name, object_name)<EOL>if not object_handle.AXEnabled:<EOL><INDENT>raise LdtpServerException(u"<STR_LIT>" % object_name)<EOL><DEDENT>self._grabfocus(object_handle)<EOL>object_handle.sendKeys(data)<EOL>return <NUM_LIT:1><EOL><DEDENT>
Type string sequence.

@param window_name: Window name to focus on, either full name,
LDTP's name convention, or a Unix glob.
@type window_name: string
@param object_name: Object name to focus on, either full name,
LDTP's name convention, or a Unix glob. 
@type object_name: string
@param data: data to type.
@type data: string

@return: 1 on success.
@rtype: integer