rendered paste body#To verify a Appointment.from createAppointment import *def verifyAppointment (summary, location, description,\ fromDate, fromTime, toDate, toTime): mailHandle = LdtpDataFileParser (createAppointment.xml) txtsummary = mailHandle.gettagvalue ('summary') txtlocation = mailHandle.gettagvalue ('location') txtdescription = mailHandle.gettagvalue ('description') selectmenuitem ('dlgappointment*','mnuFile;mnuOpenAppointment') waittillguiexist ('dlgappointment*') log ('check if Appointment is added sucessfully, teststart)try: log ('Add New Appointment','teststart') createAppointment (calendar , summary , location , fromTime ,\ toTime, fromDate , toDate , description): log ('Add New Appointment','pass') if gettextvalue ('dlgappointment*', 'txtSummary') != summary: log ('Summary is error','cause') raise LdtpExecutionError (0) if gettextvalue ('dlgappointment*', 'txtLocation') != location: log ('Location is error','cause') raise LdtpExecutionError (0) if gettextvalue ('dlgappointment*', 'txtDescription') != description: log ('Description is error','cause') raise LdtpExecutionError (0)except LdtpExecutionError, msg: log ('Add New Appointment','fail') log ('Add New Appointment','testend') raise LdtpExecutionError (msg)log ('Add New Appointment','testend')verifyAppointment()