rendered paste body#To create a Appointment.from ldtp import *def createAppointment (calendar, summary, location, fromTime ,\ toTime, fromDate, toDate, description): dataobject.gettagvalue(summary, location, description) if summary != [] and location != [] and description != [] : settextvalue ('dlgAppointment *', 'txtsummary', summary [0]) settextvalue ('dlgAppointment *', 'txtlocation', location [0]) settextvalue ('dlgAppointment *', 'txtdescription', description [0]) insertAppointment ('dlgappointment*', summary, location, description,\ fromDate, fromTime, toDate, toTime, calendar) click ('dlgAppointment*','btnSave') try: verifyAppointment ('dlgAppointment*', summary, location, description,\ fromDate, fromTime, toDate, toTime) except: log ('Verification of Appointment failed','cause') selectmenuitem ('dlgAppointment*','mnuFile;mnuClose') raise LdtpExecutionError (0) except LdtpExecutionError,msg: raise LdtpExecutionError (0)