from menu_reorganization import * #from evoutils.menu_reorganization import * from contact import * def selectMailPane(): """Selects the Mail Pane in Evolution""" log ('Open Evolution Mail Pane','teststart') setcontext ('Evolution - Mail','Evolution - Mail') #code to find the present window and revert back to the Mail Pane if guiexist('frmEvolution-Mail')!=1: log ('Present Window now Mail pane','info') setcontext ('Evolution - Mail','Evolution - Mail') if guiexist('frmEvolution-Mail')!=1: log ('Present Window now Mail pane','info') setcontext ('Evolution - Mail','Evolution - Calendars') if guiexist('frmEvolution-Mail')!=1: log ('Present Window now Calendars pane','info') setcontext ('Evolution - Mail','Evolution - Memos') if guiexist('frmEvolution-Mail')!=1: log ('Present Window now Memos pane','info') setcontext ('Evolution - Mail','Evolution - Tasks') log ('Present Window has to be Taskspane','info') time.sleep (1) try: click ('frmEvolution-*','tbtnMail') time.sleep(3) waittillguiexist ('frmEvolution-*') except: log ('error selecting Mail pane','error') log ('Open Evolution Mail Pane','testend') raise LdtpExecutionError(0) log ('Open Evolution Mail Pane','testend') try: log('creation of a folder','teststart') #selectMailPane() selectPanel('Mail') data_object = LdtpDataFileParser (datafilename) #Extracting imput data from xml file Folder_name = data_object.gettagvalue ('folder_name')[0] location = data_object.gettagvalue ('location')[0] log('User data read','info') selectmenuitem('frmEvolution-*','mnuFile;mnuNew;mnuMailFolder') if create_folder(Folder_name, location) == 1: log('Folder created','info') #log('Folder created','pass') #log('creation of a folder','testend') else: log('Folder not created','error') #log('Folder created','fail') #log('creation of a folder','testend') except: log('cannot create a folder','error') #log('creation of a folder','testend') raise LdtpExecutionError(0)