#To create a folder. from menu_reorganization import * #from evoutils.menu_reorganization import * from contact import * def selectMailPane(): ""Selects the Mail Pane in Evolution""" msg='Open Evolution Mail Pane' log (msg,'teststart') setcontext ('Evolution - Mail','Evolution - Mail') #code to find the present window and revert back to the Mail Pane if guiexist('frm*Evolution-Mail')!=1: msg='Present Window Mail Pane' log (msg,'info') setcontext ('Evolution - Mail','Evolution - Mail') if guiexist('frm*Evolution-Mail')!=1: msg='Present Window now Mail pane' log (msg,'info') setcontext ('Evolution - Mail','Evolution - Calendars') if guiexist('frm*Evolution-Mail')!=1: msg='Present Window now Calendars pane' log (msg,'info') setcontext ('Evolution - Mail','Evolution - Memos') if guiexist('frm*Evolution-Mail')!=1: msg='Present Window now Memos pane' log (msg,'info') setcontext ('Evolution - Mail','Evolution - Tasks') msg='Present Window has to be Taskspane' log (msg,'info') time.sleep (1) try: click ('frm*Evolution','tbtnMail') time.sleep(3) waittillguiexist ('frm*Evolution') except: msg='error selecting Mail pane' log (msg,'error') msg='Open Evolution Mail Pane' log (msg,'testend') raise LdtpExecutionError(msg) msg='Open Evolution Mail Pane' log (msg,'testend') try: msg='creation of a folder' log(msg,'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] msg='User data read' log(msg,'info') selectmenuitem('frm*Evolution','mnuFile;mnuNew;mnuMailFolder') if create_folder(Folder_name, location) == 1: msg='Folder created' log(msg,'info') #log('Folder created','pass') #log('creation of a folder','testend') else: msg='Folder not created' log(msg,'error') #log('Folder created','fail') #log('creation of a folder','testend') except: msg='cannot create a folder' log(msg,'error') #log('creation of a folder','testend') raise LdtpExecutionError(msg)