### COMPLETE CODE :::: from ldtp import * log('Gedit-Launch','teststart') try: initappmap('gnome-panel.map') selectmenuitem('frmTop*Panel','mnuApplications;mnuAccessories;mnuTextEditor') time.sleep(3) if guiexist('frmUnsavedDocument1-gedit') == 1: print 'succ 1' log('Gedit started successfully','info') else: log('Gedit cannot be launched','error') raise LdtpExecutionError(0) time.sleep(3) log('Closing gedit..','info') if closeappwindow('*gedit') == 1: print 'succ 2' log('Successfully exited gedit','info') else: log('Cannot exit gedit','error') raise LdtpExecutionError(0) log('Gedit-Launch','testend') except: log('Gedit-Launch','fail') raise LdtpExecutionError(0) log('Gedit-Launch','testend') #### LDTP WINDOW OUTPUT (Not complete, but enough) Data read 186, packet-len = 186, bytes read = 186, data: selectmenuitem34643843frmTop*PanelmnuApplications;mnuAccessories;mnuTextEditorPO1 PACKET LENGTH: 0 Received packet [selectmenuitem34643843frmTop*PanelmnuApplications;mnuAccessories;mnuTextEditorPO] through 15 Node: ACTION action_name: selectmenuitem Node: ID request_id: 34643843 Node: CONTEXT Window name: frmTop*Panel Node: COMPONENT Component name: mnuApplications;mnuAccessories;mnuTextEditor Command: selectmenuitem Get command id: selectmenuitem Search key based on regular expression Search key based on regular expression Property: parent - Value: gnome-panel app_name: gnome-panel Property: label - Value: Top Expanded Edge Panel window_name: Top Expanded Edge Panel Appname: gnome-panel Accessible application name: metacity Accessible application name: nautilus Accessible application name: update-notifier Accessible application name: gnome-terminal Accessible application name: gnome-panel Application: gnome-panel - Role: application Child count: 2 Context: Top Expanded Edge Panel Child_name: Bottom Expanded Edge Panel Context: Top Expanded Edge Panel Child_name: Top Expanded Edge Panel Matched - Context: Top Expanded Edge Panel Child_name: Top Expanded Edge Panel Window: frmTop*Panel - Object: mnuApplications Property: child_index - Value: 0 Property: parent - Value: mbr0 Parent name: mbr0 - Context name: frmTop*Panel Property: mbr0 - Value: Property: child_index - Value: 0 Property: parent - Value: pnlTopExpandedEdgePanel Parent name: pnlTopExpandedEdgePanel - Context name: frmTop*Panel Property: pnlTopExpandedEdgePanel - Value: Property: child_index - Value: 0 Property: parent - Value: pnl1 Parent name: pnl1 - Context name: frmTop*Panel Property: pnl1 - Value: Property: child_index - Value: 0 Property: parent - Value: pnl0 Parent name: pnl0 - Context name: frmTop*Panel Property: pnl0 - Value: Property: child_index - Value: 0 Property: parent - Value: frmTopExpandedEdgePanel Parent name: frmTopExpandedEdgePanel - Context name: frmTop*Panel Property: label - Value: Applications Label: Applications - Applications Object matches Search key based on regular expression Search key based on regular expression Property: parent - Value: gnome-panel app_name: gnome-panel Property: label - Value: Top Expanded Edge Panel window_name: Top Expanded Edge Panel Child count: 2 Context: Top Expanded Edge Panel Child_name: Bottom Expanded Edge Panel Context: Top Expanded Edge Panel Child_name: Top Expanded Edge Panel Matched - Context: Top Expanded Edge Panel Child_name: Top Expanded Edge Panel Window: frmTop*Panel - Object: mnuAccessories Property: child_index - Value: 0 Property: parent - Value: mnuApplications Parent name: mnuApplications - Context name: frmTop*Panel Property: mnuApplications - Value: Property: child_index - Value: 0 Property: parent - Value: mbr0 Parent name: mbr0 - Context name: frmTop*Panel Property: mbr0 - Value: Property: child_index - Value: 0 Property: parent - Value: pnlTopExpandedEdgePanel Parent name: pnlTopExpandedEdgePanel - Context name: frmTop*Panel Property: pnlTopExpandedEdgePanel - Value: Property: child_index - Value: 0 Property: parent - Value: pnl1 Parent name: pnl1 - Context name: frmTop*Panel Property: pnl1 - Value: Property: child_index - Value: 0 Property: parent - Value: pnl0 Parent name: pnl0 - Context name: frmTop*Panel Property: pnl0 - Value: Property: child_index - Value: 0 Property: parent - Value: frmTopExpandedEdgePanel Parent name: frmTopExpandedEdgePanel - Context name: frmTop*Panel Property: label - Value: _Accessories Label: _Accessories - Accessories Before: _Accessories - After: Accessories Object matches Search key based on regular expression Search key based on regular expression Property: parent - Value: gnome-panel app_name: gnome-panel Property: label - Value: Top Expanded Edge Panel window_name: Top Expanded Edge Panel Child count: 2 Context: Top Expanded Edge Panel Child_name: Bottom Expanded Edge Panel Context: Top Expanded Edge Panel Child_name: Top Expanded Edge Panel Matched - Context: Top Expanded Edge Panel Child_name: Top Expanded Edge Panel Window: frmTop*Panel - Object: mnuTextEditor Property: child_index - Value: 5 Property: parent - Value: mnuAccessories Parent name: mnuAccessories - Context name: frmTop*Panel Property: mnuAccessories - Value: Property: child_index - Value: 0 Property: parent - Value: mnuApplications Parent name: mnuApplications - Context name: frmTop*Panel Property: mnuApplications - Value: Property: child_index - Value: 0 Property: parent - Value: mbr0 Parent name: mbr0 - Context name: frmTop*Panel Property: mbr0 - Value: Property: child_index - Value: 0 Property: parent - Value: pnlTopExpandedEdgePanel Parent name: pnlTopExpandedEdgePanel - Context name: frmTop*Panel Property: pnlTopExpandedEdgePanel - Value: Property: child_index - Value: 0 Property: parent - Value: pnl1 Parent name: pnl1 - Context name: frmTop*Panel Property: pnl1 - Value: Property: child_index - Value: 0 Property: parent - Value: pnl0 Parent name: pnl0 - Context name: frmTop*Panel Property: pnl0 - Value: Property: child_index - Value: 0 Property: parent - Value: frmTopExpandedEdgePanel Parent name: frmTopExpandedEdgePanel - Context name: frmTop*Panel Property: label - Value: _Text Editor Label: _Text Editor - Text Editor Before: _Text Editor - After: Text Editor Object matches State check count: 1 - Control type: 34 Total action count: 1 Name: click, Description: resp_len = 100 Sending.. 131 Response packet: 346438430Successfully completed -->0135 0135 Msg: Bytes sent: 135 Client packet len: 127 i = 0 Data read 127, packet-len = 127, bytes read = 127, data: guiexist293324201frmUnsavedDocument1-geditguiexist293324201frmUnsavedDocument1-geditObject definition frmUnsavedDocument1-gedit not found in appmap Search window name: frmUnsavedDocument1-gedit - Bottom Expanded Edge Panel - frmBottomExpandedEdgePanel Search window name: frmUnsavedDocument1-gedit - Top Expanded Edge Panel - frmTopExpandedEdgePanel Window frmUnsavedDocument1-gedit not openUnable to update context: frmUnsavedDocument1-gedit in appmap Unable to update context: frmUnsavedDocument1-gedit in appmap *** glibc detected *** double free or corruption (!prev): 0x080a28f0 *** Aborted