summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorprashmohan <prashmohan>2005-12-20 08:56:34 +0000
committerprashmohan <prashmohan>2005-12-20 08:56:34 +0000
commitdd1ea13d525ebda5fa3b567d7215d6a6c3ebad9d (patch)
tree5cac9a7145f260e87e0525de1536866aadbfc661
parentab5cdde084d7c40db01e86106f687553c41681d4 (diff)
commited with test cases done by Prashanth Mohan and Venkateswaran S
-rw-r--r--evolution/Assigned_Task_modify.py117
-rw-r--r--evolution/Assigned_Task_modify.xml7
-rw-r--r--evolution/IMAGES/bgimage.pngbin0 -> 47858 bytes
-rw-r--r--evolution/IMAGES/cur_image.pngbin0 -> 41151 bytes
-rw-r--r--evolution/IMAGES/cur_mail.pngbin0 -> 41219 bytes
-rw-r--r--evolution/IMAGES/gnome-background-image.pngbin0 -> 97678 bytes
-rw-r--r--evolution/IMAGES/ref_bgimage.pngbin0 -> 45274 bytes
-rw-r--r--evolution/IMAGES/ref_composewindow.pngbin0 -> 40764 bytes
-rw-r--r--evolution/IMAGES/ref_fonts.pngbin0 -> 42669 bytes
-rw-r--r--evolution/IMAGES/ref_lists.pngbin0 -> 48415 bytes
-rw-r--r--evolution/IMAGES/ref_text_formatting.pngbin0 -> 42645 bytes
-rw-r--r--evolution/IMAGES/ref_theme.pngbin0 -> 51254 bytes
-rw-r--r--evolution/IMAGES/test_fields.pngbin0 -> 40627 bytes
-rw-r--r--evolution/New_assigned_task.py142
-rw-r--r--evolution/New_assigned_task.xml16
-rw-r--r--evolution/_evo_.xml160
-rw-r--r--evolution/addcontact.py28
-rw-r--r--evolution/addcontact.xml13
-rw-r--r--evolution/addcontactlist.py79
-rw-r--r--evolution/addcontactlist.xml6
-rw-r--r--evolution/addmeeting.py437
-rw-r--r--evolution/addnewsign.py41
-rw-r--r--evolution/addnewsign.xml5
-rw-r--r--evolution/addtoreplytofield.py40
-rw-r--r--evolution/addtoreplytofield.xml6
-rw-r--r--evolution/all-day-event.py83
-rw-r--r--evolution/all-day-event.xml13
-rw-r--r--evolution/apply_filter.py90
-rw-r--r--evolution/apply_filter.xml12
-rw-r--r--evolution/applyfilter.xml5
-rw-r--r--evolution/applyfilterwhenoffline.py43
-rw-r--r--evolution/applyfilterwhenoffline.xml5
-rw-r--r--evolution/appointment-with-attachment.py91
-rw-r--r--evolution/appointment-with-attachment.xml14
-rw-r--r--evolution/backgroundimage.py45
-rw-r--r--evolution/backgroundimage.xml6
-rw-r--r--evolution/calendar.py357
-rw-r--r--evolution/change-view.py116
-rw-r--r--evolution/change-view.xml9
-rw-r--r--evolution/change_status.py146
-rw-r--r--evolution/change_status.xml12
-rw-r--r--evolution/changelanginspellcheck.py27
-rw-r--r--evolution/checkaddbookrdonly.py38
-rw-r--r--evolution/checkheaders.py39
-rw-r--r--evolution/checkheaders.xml4
-rw-r--r--evolution/chk_file_new.py232
-rw-r--r--evolution/closecomposewindow.py45
-rw-r--r--evolution/closecomposewindow.xml4
-rw-r--r--evolution/compose-mail-withouthtml.py48
-rwxr-xr-xevolution/compose_mail.py91
-rw-r--r--evolution/composerprefs.py566
-rw-r--r--evolution/contact.py528
-rw-r--r--evolution/contactlist.xml24
-rw-r--r--evolution/contactmeet.xml68
-rw-r--r--evolution/contacts.xml48
-rw-r--r--evolution/copy-to.py41
-rw-r--r--evolution/copy-to.xml5
-rw-r--r--evolution/copymessagewhenoffline.py43
-rw-r--r--evolution/cr_task_list.py93
-rw-r--r--evolution/cr_task_list.xml7
-rw-r--r--evolution/create-appointment.py105
-rw-r--r--evolution/create-appointment.xml13
-rw-r--r--evolution/create-folder.py80
-rw-r--r--evolution/create-folder.xml5
-rw-r--r--evolution/create-meeting-recur.xml21
-rw-r--r--evolution/create-meeting.xml20
-rw-r--r--evolution/create-recursive-app.py95
-rw-r--r--evolution/create-recursive-app.xml18
-rw-r--r--evolution/create_filter.py177
-rw-r--r--evolution/create_filter.xml11
-rw-r--r--evolution/createaddrbook.py58
-rw-r--r--evolution/createaddrbook.xml4
-rw-r--r--evolution/createmeeting.py31
-rw-r--r--evolution/createrecurmeet.py30
-rw-r--r--evolution/del-non-sys-folder.py36
-rw-r--r--evolution/del-non-sys-folder.xml4
-rw-r--r--evolution/del_assigned_task.py85
-rw-r--r--evolution/del_assigned_task.xml4
-rw-r--r--evolution/del_task.py87
-rw-r--r--evolution/del_task.xml4
-rw-r--r--evolution/deletecontact.py33
-rw-r--r--evolution/deletecontact.xml4
-rw-r--r--evolution/deletecontactlist.py34
-rw-r--r--evolution/deletecontactlist.xml4
-rw-r--r--evolution/deletefolder.xml9
-rw-r--r--evolution/deletemailaccount.py48
-rw-r--r--evolution/deletemailaccount.xml4
-rw-r--r--evolution/deletemeetingall.xml6
-rw-r--r--evolution/deletemeetingone.xml6
-rw-r--r--evolution/deletemessagewhenoffline.py42
-rw-r--r--evolution/deletemessagewhenoffline.xml5
-rw-r--r--evolution/deletesingleinstmeeting.py47
-rw-r--r--evolution/editsign.py45
-rw-r--r--evolution/editsign.xml5
-rw-r--r--evolution/emptysubjectline.py41
-rw-r--r--evolution/emptysubjectline.xml4
-rw-r--r--evolution/enabledisablemailaccount.py51
-rw-r--r--evolution/enabledisablemailaccount.xml4
-rw-r--r--evolution/evo-testing.xml255
-rw-r--r--evolution/evoutils/calendar.py282
-rw-r--r--evolution/evoutils/menu_reorganization.py380
-rw-r--r--evolution/expunge.py54
-rw-r--r--evolution/findandreplace.py49
-rw-r--r--evolution/findandreplace.xml11
-rw-r--r--evolution/first.xml20
-rw-r--r--evolution/fldr.xml12
-rw-r--r--evolution/fltr_from_msg.py151
-rw-r--r--evolution/fltr_from_msg.xml8
-rw-r--r--evolution/folderopswhenoffline.py50
-rw-r--r--evolution/folderopswhenoffline.xml10
-rw-r--r--evolution/fonts.py42
-rw-r--r--evolution/fonts_formatting.py45
-rw-r--r--evolution/fonts_formatting.xml5
-rw-r--r--evolution/fonts_test.py45
-rw-r--r--evolution/fonts_test.xml5
-rw-r--r--evolution/formatinhtml.py27
-rw-r--r--evolution/forwardstyle.py42
-rw-r--r--evolution/forwardstyle.xml5
-rw-r--r--evolution/gooffline.py29
-rw-r--r--evolution/goonline.py27
-rw-r--r--evolution/htmlformattingcheck.py32
-rw-r--r--evolution/imap-log.xml21
-rw-r--r--evolution/lists.py41
-rw-r--r--evolution/lists_test.py43
-rw-r--r--evolution/lists_test.xml5
-rw-r--r--evolution/log.xml423
-rw-r--r--evolution/mail.xml183
-rw-r--r--evolution/mailaccounts.py218
-rw-r--r--evolution/mailprefs.py117
-rw-r--r--evolution/mailtests.py783
-rw-r--r--evolution/mailtoadd.py71
-rw-r--r--evolution/mailtoadd.xml4
-rw-r--r--evolution/makedefault.py46
-rw-r--r--evolution/makedefault.xml4
-rw-r--r--evolution/mark_read.py36
-rw-r--r--evolution/mark_read.xml4
-rw-r--r--evolution/meeting.xml23
-rw-r--r--evolution/menu_reorganization.py407
-rw-r--r--evolution/modify-appointment.py106
-rw-r--r--evolution/modify-appointment.xml15
-rw-r--r--evolution/modify-meeting-recur.xml21
-rw-r--r--evolution/modify-meeting.xml21
-rw-r--r--evolution/modify_task.py123
-rw-r--r--evolution/modify_task.xml8
-rw-r--r--evolution/modifyallinstmeet.py27
-rw-r--r--evolution/modifycontact.py133
-rw-r--r--evolution/modifycontact.xml8
-rw-r--r--evolution/modifycontactlist.py106
-rw-r--r--evolution/modifycontactlist.xml7
-rw-r--r--evolution/modifycontactwhenoffline.py58
-rw-r--r--evolution/modifycontactwhenoffline.xml5
-rw-r--r--evolution/modifymeeting.py123
-rw-r--r--evolution/modifythisinstmeet.py3
-rw-r--r--evolution/move-to.py41
-rw-r--r--evolution/move-to.xml5
-rw-r--r--evolution/movemessage.xml6
-rw-r--r--evolution/movemessagewhenoffline.py43
-rw-r--r--evolution/movemessagewhenoffline.xml6
-rw-r--r--evolution/new_task.py131
-rw-r--r--evolution/new_task.xml12
-rw-r--r--evolution/newaddrbook.xml4
-rw-r--r--evolution/newmail.py37
-rw-r--r--evolution/newmsg_fromsent.py88
-rw-r--r--evolution/newmsg_fromsent.xml8
-rw-r--r--evolution/nonrecurmeet.xml22
-rw-r--r--evolution/offline.py435
-rw-r--r--evolution/onlybcc.py41
-rw-r--r--evolution/open_newwin.py45
-rw-r--r--evolution/openmsg_window.py86
-rw-r--r--evolution/openmsg_window.xml5
-rwxr-xr-xevolution/print.py89
-rw-r--r--evolution/print.xml6
-rw-r--r--evolution/print_preview.py73
-rw-r--r--evolution/print_preview.xml6
-rw-r--r--evolution/promptwhenexpunging.py41
-rw-r--r--evolution/promptwhenexpunging.xml4
-rw-r--r--evolution/rec-all-day-event.py102
-rw-r--r--evolution/rec-all-day-event.xml18
-rw-r--r--evolution/recursive-app-with-attachment.py110
-rw-r--r--evolution/recursive-app-with-attachment.xml19
-rw-r--r--evolution/redirect-mail.py103
-rw-r--r--evolution/redirect-mail.xml6
-rw-r--r--evolution/removesign.py41
-rw-r--r--evolution/rename_folder.py38
-rw-r--r--evolution/rename_folder.xml5
-rw-r--r--evolution/reply_toall.py108
-rw-r--r--evolution/reply_toall.xml7
-rw-r--r--evolution/replyto.py43
-rw-r--r--evolution/replyto.xml5
-rw-r--r--evolution/restartevo.py28
-rw-r--r--evolution/save_msg.py90
-rw-r--r--evolution/save_msg.xml6
-rw-r--r--evolution/saveattachments.xml6
-rw-r--r--evolution/saveattachmentswhenoffline.py43
-rw-r--r--evolution/saveattachmentswhenoffline.xml6
-rw-r--r--evolution/savemail.py54
-rw-r--r--evolution/savemail.xml8
-rw-r--r--evolution/searchcontact.py68
-rw-r--r--evolution/searchcontact.xml4
-rw-r--r--evolution/select_all.py39
-rw-r--r--evolution/select_all.xml4
-rw-r--r--evolution/sendmailwhenoffline.py33
-rw-r--r--evolution/spellcheck.py48
-rw-r--r--evolution/spellcheck.xml6
-rw-r--r--evolution/template.py44
-rw-r--r--evolution/template.xml6
-rw-r--r--evolution/textformatting.py45
-rw-r--r--evolution/textformatting.xml7
-rw-r--r--evolution/traverse-mail.py117
-rw-r--r--evolution/traverse-mail.xml6
-rw-r--r--evolution/undoredo.py47
-rw-r--r--evolution/verify_readonly_tasklist.py75
-rw-r--r--evolution/verify_readonly_tasklist.xml6
-rw-r--r--evolution/work_offline.py61
214 files changed, 12850 insertions, 0 deletions
diff --git a/evolution/Assigned_Task_modify.py b/evolution/Assigned_Task_modify.py
new file mode 100644
index 0000000..3a4b820
--- /dev/null
+++ b/evolution/Assigned_Task_modify.py
@@ -0,0 +1,117 @@
+#!/usr/bin/env python
+#
+# Linux Desktop Testing Project http://www.gnomebangalore.org/ldtp
+#
+# Author:
+# Venkateswaran S <wenkat.s@gmail.com>
+#
+# Copyright 2004 Novell, Inc.
+#
+# This test script is free software; you can redistribute it and/or
+# modify it under the terms of the GNU Library General Public
+# License as published by the Free Software Foundation; either
+# version 2 of the License, or (at your option) any later version.
+#
+# This library is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+# Library General Public License for more details.
+#
+# You should have received a copy of the GNU Library General Public
+# License along with this library; if not, write to the
+# Free Software Foundation, Inc., 59 Temple Place - Suite 330,
+# Boston, MA 02111-1307, USA.
+#
+# This script will create a new task.
+
+from ldtp import *
+from ldtputils import *
+#from evoutils.Task import getrowindex
+def getrowindex(subject):
+ try:
+ noofchild=getrowcount ('frmEvolution-Tasks','tblTaskTable')
+ for ind in range (noofchild):
+ if getcellvalue('frmEvolution-Tasks','tblTaskTable',ind,2) == subject:
+ return ind
+ if ind == noofchild-1:
+ log ('Message not present','cause')
+ raise LdtpExecutionError (0)
+ except:
+ log ('Unable to get index of message','error')
+ raise LdtpExecutionError (0)
+
+def modify_task(Due_date, Progress, Summary, old_Summary):
+
+ """ Routine to modify a task """
+
+ # read the row index from the user and delete that particular task.
+ try:
+ log('Modify an assigned task','teststart')
+ remap('evolution','frmEvolution-Tasks')
+ selectrow ('frmEvolution-Tasks', 'tblTaskTable', old_Summary[0])
+ selectmenuitem('frmEvolution-Tasks', 'mnuFile;mnuOpenTask')
+ setcontext('Assigned Task - No summary','Assigned Task - ' + old_Summary[0])
+ waittillguiexist('frmAssignedTask-Nosummary')
+ remap('evolution','frmAssignedTask-Nosummary')
+ log('The window opened' ,'info')
+
+ except:
+ log('unable to read the data','error')
+ log('Modify an assigned task','testend')
+ undoremap('evolution','frmEvolution-Tasks')
+ raise LdtpExecutionError(0)
+
+ # Modifies the task according to users wish.
+ try:
+ settextvalue ('frmAssignedTask-Nosummary', 'txtTextDateEntry',Due_date[0])
+ settextvalue ('frmAssignedTask-Nosummary', 'txtSummary',Summary[0])
+ setcontext('Assigned Task - No summary','Assigned Task - ' + Summary[0])
+ log('User data Loaded','info')
+ time.sleep(2)
+ if stateenabled ('frmAssignedTask-Nosummary','btnSave')==1:
+ click('frmAssignedTask-Nosummary','btnSave')
+ log('The required task list has been modified','info')
+ else:
+ log('The Task is not modified because of no change in summary','info')
+ click('frmAssignedTask-Nosummary','btnClose')
+ time.sleep(2)
+
+ if guiexist('dlgEvolutionQuery'):
+ click('dlgEvolutionQuery','btnDon\'tSend')
+ log('Task has been modified successfully','info')
+ print 'The Assigned task has been modifed'
+
+ except:
+ log('Unable to load the user data','error')
+ log('Modify an assigned task','testend')
+ undoremap('evolution','frmEvolution-Tasks')
+ raise LdtpExecutionError(0)
+
+ #Change the Progress of the task.
+ try:
+
+ Row_no = getrowindex(Summary[0])
+ if Progress[0] == 'complete':
+ checkrow ('frmEvolution-Tasks', 'tblTaskTable', Row_no, 1)
+ elif Progress[0] == 'Not started':
+ uncheckrow ('frmEvolution-Tasks', 'tblTaskTable', Row_no, 1)
+ log('progress of the task has been modified','info')
+ print 'The Progress has been modified'
+ except:
+ log('unable to change the progress of the task','error')
+ log('Modify an assigned task','testend')
+ undoremap('evolution','frmEvolution-Tasks')
+ raise LdtpExecutionError(0)
+
+ log('modify an assigned task','testend')
+
+
+# Reading the values from the data xml.
+
+data_object = LdtpDataFileParser (datafilename)
+Due_date = data_object.gettagvalue ('due_date')
+Progress = data_object.gettagvalue ('progress')
+Summary = data_object.gettagvalue ('summary')
+old_Summary = data_object.gettagvalue ('old_summary')
+# Calling the function
+modify_task(Due_date, Progress, Summary, old_Summary)
diff --git a/evolution/Assigned_Task_modify.xml b/evolution/Assigned_Task_modify.xml
new file mode 100644
index 0000000..f11b492
--- /dev/null
+++ b/evolution/Assigned_Task_modify.xml
@@ -0,0 +1,7 @@
+<?xml version="1.0"?>
+<data>
+ <old_summary>This is just a summary for assigned task</old_summary>
+ <due_date>10/10/2005</due_date>
+ <progress>complete</progress>
+ <summary>This is the modified summary</summary>
+</data>
diff --git a/evolution/IMAGES/bgimage.png b/evolution/IMAGES/bgimage.png
new file mode 100644
index 0000000..e066743
--- /dev/null
+++ b/evolution/IMAGES/bgimage.png
Binary files differ
diff --git a/evolution/IMAGES/cur_image.png b/evolution/IMAGES/cur_image.png
new file mode 100644
index 0000000..8199596
--- /dev/null
+++ b/evolution/IMAGES/cur_image.png
Binary files differ
diff --git a/evolution/IMAGES/cur_mail.png b/evolution/IMAGES/cur_mail.png
new file mode 100644
index 0000000..7ce737c
--- /dev/null
+++ b/evolution/IMAGES/cur_mail.png
Binary files differ
diff --git a/evolution/IMAGES/gnome-background-image.png b/evolution/IMAGES/gnome-background-image.png
new file mode 100644
index 0000000..d02f6af
--- /dev/null
+++ b/evolution/IMAGES/gnome-background-image.png
Binary files differ
diff --git a/evolution/IMAGES/ref_bgimage.png b/evolution/IMAGES/ref_bgimage.png
new file mode 100644
index 0000000..2d1661a
--- /dev/null
+++ b/evolution/IMAGES/ref_bgimage.png
Binary files differ
diff --git a/evolution/IMAGES/ref_composewindow.png b/evolution/IMAGES/ref_composewindow.png
new file mode 100644
index 0000000..ca526aa
--- /dev/null
+++ b/evolution/IMAGES/ref_composewindow.png
Binary files differ
diff --git a/evolution/IMAGES/ref_fonts.png b/evolution/IMAGES/ref_fonts.png
new file mode 100644
index 0000000..05ca302
--- /dev/null
+++ b/evolution/IMAGES/ref_fonts.png
Binary files differ
diff --git a/evolution/IMAGES/ref_lists.png b/evolution/IMAGES/ref_lists.png
new file mode 100644
index 0000000..54c262f
--- /dev/null
+++ b/evolution/IMAGES/ref_lists.png
Binary files differ
diff --git a/evolution/IMAGES/ref_text_formatting.png b/evolution/IMAGES/ref_text_formatting.png
new file mode 100644
index 0000000..b0d1bec
--- /dev/null
+++ b/evolution/IMAGES/ref_text_formatting.png
Binary files differ
diff --git a/evolution/IMAGES/ref_theme.png b/evolution/IMAGES/ref_theme.png
new file mode 100644
index 0000000..ea1e750
--- /dev/null
+++ b/evolution/IMAGES/ref_theme.png
Binary files differ
diff --git a/evolution/IMAGES/test_fields.png b/evolution/IMAGES/test_fields.png
new file mode 100644
index 0000000..c15b368
--- /dev/null
+++ b/evolution/IMAGES/test_fields.png
Binary files differ
diff --git a/evolution/New_assigned_task.py b/evolution/New_assigned_task.py
new file mode 100644
index 0000000..22e5109
--- /dev/null
+++ b/evolution/New_assigned_task.py
@@ -0,0 +1,142 @@
+#
+# Linux Desktop Testing Project http://www.gnomebangalore.org/ldtp
+#
+# Author:
+# Venkateswaran S <wenkat.s@gmail.com>
+#
+# Copyright 2004 Novell, Inc.
+#
+# This test script is free software; you can redistribute it and/or
+# modify it under the terms of the GNU Library General Public
+# License as published by the Free Software Foundation; either
+# version 2 of the License, or (at your option) any later version.
+#
+# This library is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+# Library General Public License for more details.
+#
+# You should have received a copy of the GNU Library General Public
+# License along with this library; if not, write to the
+# Free Software Foundation, Inc., 59 Temple Place - Suite 330,
+# Boston, MA 02111-1307, USA.
+#
+# This script will create a new assigned task.
+
+#!/usr/bin/env python
+
+from ldtp import *
+from ldtputils import *
+
+def addattendees(attendee,email,addrbook):
+ log ('Add Attendees','teststart')
+ try:
+ click ('frmAssignedTask-Nosummary','btnAttendees')
+ waittillguiexist ('dlgRequiredParticipants')
+ time.sleep (1)
+ comboselect ('dlgRequiredParticipants','cboAddressBook',addrbook)
+ remap ('evolution','dlgRequiredParticipants')
+ attendee=attendee[0].split (':')
+ email=email[0].split (':')
+ if len(attendee)!=len(email):
+ log ('Mismatch in Attendee name and email','error')
+ raise LdtpExecutionError (0)
+ for ind in range(len(attendee)):
+ try:
+ att=attendee[ind] + ' <'+ email[ind] + '>'
+ print att,"Inside for loop"
+ if gettablerowindex('dlgRequiredParticipants','tblRequiredParticipants',att)==-1:
+ print "inside if"
+ selectrow ('dlgRequiredParticipants','tblContacts',att)
+ print "row selected"
+ click ('dlgRequiredParticipants', 'btnAdd1')
+ time.sleep (1)
+ except:
+ log ('User not found','cause')
+ raise LdtpExceptionError(0)
+ click ('dlgRequiredParticipants', 'btnClose')
+ undoremap ('evolution','dlgRequiredParticipants')
+ except:
+ log ('Attendee Addition failed','error')
+ log ('Add Attendees','testend')
+ raise LdtpExecutionError (0)
+ log ('Add Attendees','testend')
+
+def read_new_taskdata():
+
+ try:
+ log('read user data','teststart')
+ data_object = LdtpDataFileParser (datafilename)
+ Email = data_object.gettagvalue ('email')
+ Organizer = data_object.gettagvalue ('organizer')
+ Attendees = data_object.gettagvalue ('Attendees')
+ Att_emails = data_object.gettagvalue ('Att_emails')
+ addr_book = data_object.gettagvalue ('addr_book')
+ Group = data_object.gettagvalue ('group')
+ Summary = data_object.gettagvalue ('summary')
+ Desc = data_object.gettagvalue ('Desc')
+ Start_date = data_object.gettagvalue ('start_date')
+ Start_time = data_object.gettagvalue ('start_time')
+ End_date = data_object.gettagvalue ('due_date')
+ End_time = data_object.gettagvalue ('due_time')
+ Time_zone = data_object.gettagvalue ('time_zone')
+ log('User data read successfull','info')
+ log('read user data','testend')
+ return [Email, Organizer, Attendees, Att_emails, addr_book, Group, Summary, Desc, Start_date, Start_time, End_date, End_time, Time_zone]
+
+ except:
+ log('Unable to read the user data or data file missing','error')
+ log('read user data','testend')
+ raise LDTPexecutionerror(0)
+
+ log('read user data','testend')
+
+def new_task():
+
+ """ Routine to add a new task """
+ #Verify: This script fails to set the group combo box.
+
+ try:
+ log('Create new assigned task','teststart')
+ Email, Organizer, Attendees, Att_emails, addr_book, Group, Summary, Desc, Start_date, Start_time, End_date, End_time, Time_zone = read_new_taskdata()
+
+ selectmenuitem('frmEvolution-Tasks','mnuFile;mnuNew;mnuAssignedTask')
+ waittillguiexist('frmAssignedTask-Nosummary')
+ log('Dlgbox new assigned task appeared','info')
+ settextvalue ('frmAssignedTask-Nosummary', 'txtSummary', Summary[0])
+ setcontext('Assigned Task - No summary','Assigned Task - ' + Summary[0])
+ time.sleep(3)
+ settextvalue ('frmAssignedTask-Nosummary', 'txtDescription', Desc[0])
+ settextvalue ('frmAssignedTask-Nosummary', 'txtTextDateEntry1',Start_date[0])
+ settextvalue ('frmAssignedTask-Nosummary', 'txtTextDateEntry',End_date[0])
+ settextvalue ('frmAssignedTask-Nosummary', 'txt5',Start_time[0])
+ settextvalue ('frmAssignedTask-Nosummary', 'txt3',End_time[0])
+ settextvalue ('frmAssignedTask-Nosummary', 'txt7',Organizer[0]+ ' <'+Email[0]+'>')
+ comboselect ('frmAssignedTask-Nosummary', 'cboPersonal', Group[0])
+ time.sleep(2)
+ addattendees(Attendees,Att_emails,addr_book[0])
+ time.sleep(2)
+ log('User data Loaded','info')
+
+ except:
+ log('Unable to enter the values','error')
+ log('Create a new assigned task','testend')
+ raise LdtpExecutionError(0)
+
+# Click Save and then exit.
+ try:
+ click('frmAssignedTask-Nosummary','btnSave')
+ time.sleep(3)
+ if guiexist('dlgEvolutionQuery') == 1:
+ remap('evolution','dlgEvolutionQuery')
+ click('dlgEvolutionQuery','btnDon\'tSend')
+ undoremap('evolution','dlgEvolutionQuery')
+ log('Assigned Task Creation Completed','info')
+ print 'Task has been created'
+ except:
+ log('Unable to save the task')
+ log('Create a new assigned task','testend')
+ raise LdtpExecutionError(0)
+
+ log('Create a new assigned task','testend')
+new_task()
diff --git a/evolution/New_assigned_task.xml b/evolution/New_assigned_task.xml
new file mode 100644
index 0000000..512ec8a
--- /dev/null
+++ b/evolution/New_assigned_task.xml
@@ -0,0 +1,16 @@
+<?xml version="1.0"?>
+<data>
+ <organizer>venkateswaran</organizer>
+ <email>wenkat.s@gmail.com</email>
+ <group>Personal</group>
+ <Attendees>venkat:ashwin</Attendees>
+ <Att_emails>wenkat.s@gmail.com:wenkat.s@gmail.com</Att_emails>
+ <addr_book>Personal</addr_book>
+ <summary>This is just a summary for assigned task</summary>
+ <start_date>12/12/2005</start_date>
+ <start_time>12:00 AM</start_time>
+ <due_date>12/20/2005</due_date>
+ <due_time>11:00 AM</due_time>
+ <time_zone>Asia/Calcutta</time_zone>
+ <Desc>This is a sample description</Desc>
+</data>
diff --git a/evolution/_evo_.xml b/evolution/_evo_.xml
new file mode 100644
index 0000000..5a20930
--- /dev/null
+++ b/evolution/_evo_.xml
@@ -0,0 +1,160 @@
+<?xml version="1.0"?>
+<ldtp>
+ <logfileoverwrite>1</logfileoverwrite>
+ <logfile>log.xml</logfile>
+ <appmapfile>evolution.map</appmapfile>
+ <group>
+ <script>
+ <name>new_task.py</name>
+ <data>new_task.xml</data>
+ </script>
+ <script>
+ <name>modify_task.py</name>
+ <data>modify_task.xml</data>
+ </script>
+ <script>
+ <name>del_task.py</name>
+ <data>del_task.xml</data>
+ </script>
+ <script>
+ <name>New_assigned_task.py</name>
+ <data>New_assigned_task.xml</data>
+ </script>
+ <script>
+ <name>Assigned_Task_modify.py</name>
+ <data>Assigned_Task_modify.xml</data>
+ </script>
+ <script>
+ <name>del_assigned_task.py</name>
+ <data>del_assigned_task.xml</data>
+ </script>
+ <script>
+ <name>cr_task_list.py</name>
+ <data>cr_task_list.xml</data>
+ </script>
+ <script>
+ <name>verify_readonly_tasklist.py</name>
+ <data>verify_readonly_tasklist.xml</data>
+ </script>
+ </group>
+ <group>
+ <script>
+ <name>create-appointment.py</name>
+ <data>create-appointment.xml</data>
+ </script>
+ <script>
+ <name>appointment-with-attachment.py</name>
+ <data>appointment-with-attachment.xml</data>
+ </script>
+ <script>
+ <name>create-recursive-app.py</name>
+ <data>create-recursive-app.xml</data>
+ </script>
+ <script>
+ <name>recursive-app-with-attachment.py</name>
+ <data>recursive-app-with-attachment.xml</data>
+ </script>
+ <script>
+ <name>all-day-event.py</name>
+ <data>all-day-event.xml</data>
+ </script>
+ <script>
+ <name>rec-all-day-event.py</name>
+ <data>rec-all-day-event.xml</data>
+ </script>
+ <script>
+ <name>modify-appointment.py</name>
+ <data>modify-appointment.xml</data>
+ </script>
+ </group>
+ <group>
+ <script>
+ <name>create-folder.py</name>
+ <data>create-folder.xml</data>
+ </script>
+ <script>
+ <name>copy-to.py</name>
+ <data>copy-to.xml</data>
+ </script>
+ <script>
+ <name>move-to.py</name>
+ <data>move-to.xml</data>
+ </script>
+ <script>
+ <name>select_all.py</name>
+ <data>select_all.xml</data>
+ </script>
+ <script>
+ <name>mark_read.py</name>
+ <data>mark_read.xml</data>
+ </script>
+ <script>
+ <name>expunge.py</name>
+ </script>
+ <script>
+ <name>rename_folder.py</name>
+ <data>rename_folder.xml</data>
+ </script>
+ <script>
+ <name>del-non-sys-folder.py</name>
+ <data>del-non-sys-folder.xml</data>
+ </script>
+ </group>
+ <group>
+ <script>
+ <name>change-view.py</name>
+ <data>change-view.xml</data>
+ </script>
+ </group>
+ <group>
+ <script>
+ <name>change_status.py</name>
+ <data>change_status.xml</data>
+ </script>
+ </group>
+ <group>
+ <script>
+ <name>openmsg_window.py</name>
+ <data>openmsg_window.xml</data>
+ </script>
+ <script>
+ <name>traverse-mail.py</name>
+ <data>traverse-mail.xml</data>
+ </script>
+ <script>
+ <name>reply_toall.py</name>
+ <data>reply_toall.xml</data>
+ </script>
+ <script>
+ <name>redirect-mail.py</name>
+ <data>redirect-mail.xml</data>
+ </script>
+ </group>
+ <group>
+ <script>
+ <name>chk_file_new.py</name>
+ </script>
+ <script>
+ <name>save_msg.py</name>
+ <data>save_msg.xml</data>
+ </script>
+ <script>
+ <name>work_offline.py</name>
+ <data>work_offline.xml</data>
+ </script>
+ </group>
+ <group>
+ <script>
+ <name>print_preview.py</name>
+ <data>print_preview.xml</data>
+ </script>
+ <script>
+ <name>print.py</name>
+ <data>print.xml</data>
+ </script>
+ <script>
+ <name>newmsg_fromsent.py</name>
+ <data>newmsg_fromsent.xml</data>
+ </script>
+ </group>
+</ldtp>
diff --git a/evolution/addcontact.py b/evolution/addcontact.py
new file mode 100644
index 0000000..ba95ec5
--- /dev/null
+++ b/evolution/addcontact.py
@@ -0,0 +1,28 @@
+#!/usr/bin/env python
+#
+# Linux Desktop Testing Project http://www.gnomebangalore.org/ldtp
+#
+# Author:
+# Prashanth Mohan <prashmohan@gmail.com>
+#
+# Copyright 2004 Novell, Inc.
+#
+# This test script is free software; you can redistribute it and/or
+# modify it under the terms of the GNU Library General Public
+# License as published by the Free Software Foundation; either
+# version 2 of the License, or (at your option) any later version.
+#
+# This library is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+# Library General Public License for more details.
+#
+# You should have received a copy of the GNU Library General Public
+# License along with this library; if not, write to the
+# Free Software Foundation, Inc., 59 Temple Place - Suite 330,
+# Boston, MA 02111-1307, USA.
+#
+
+from contact import addcontact,getcontactvals
+
+addcontact (*getcontactvals(datafilename))
diff --git a/evolution/addcontact.xml b/evolution/addcontact.xml
new file mode 100644
index 0000000..2f8aaeb
--- /dev/null
+++ b/evolution/addcontact.xml
@@ -0,0 +1,13 @@
+<?xml version="1.0"?>
+<data>
+ <AddrBook>Personal</AddrBook>
+ <FullName>Test Name</FullName>
+ <NickName>Nick</NickName>
+ <WorkEmail>work@work.com</WorkEmail>
+ <HomeEmail>home@home.com</HomeEmail>
+ <BusinessPhone>11111111</BusinessPhone>
+ <Notes>more Notes</Notes>
+ <HomeAddress>Home add</HomeAddress>
+ <WorkAddress>Work add</WorkAddress>
+ <OtherAddress>Other add</OtherAddress>
+</data>
diff --git a/evolution/addcontactlist.py b/evolution/addcontactlist.py
new file mode 100644
index 0000000..764f0ba
--- /dev/null
+++ b/evolution/addcontactlist.py
@@ -0,0 +1,79 @@
+#!/usr/bin/env python
+#
+# Linux Desktop Testing Project http://www.gnomebangalore.org/ldtp
+#
+# Author:
+# Prashanth Mohan <prashmohan@gmail.com>
+#
+# Copyright 2004 Novell, Inc.
+#
+# This test script is free software; you can redistribute it and/or
+# modify it under the terms of the GNU Library General Public
+# License as published by the Free Software Foundation; either
+# version 2 of the License, or (at your option) any later version.
+#
+# This library is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+# Library General Public License for more details.
+#
+# You should have received a copy of the GNU Library General Public
+# License along with this library; if not, write to the
+# Free Software Foundation, Inc., 59 Temple Place - Suite 330,
+# Boston, MA 02111-1307, USA.
+#
+
+from ldtp import *
+from ldtputils import *
+from contact import *
+
+def addnewlist(datafilename):
+ """Function to add a new Contact List"""
+ log ('Add New List','teststart')
+ try:
+ ListName,EmailAddresses=getcontactlistvals(datafilename)
+ selectContactPane()
+ selectmenuitem ('frmEvolution-Contacts','mnuFile;mnuNew;mnuContactList')
+ waittillguiexist ('dlgContactListEditor')
+ time.sleep (2)
+ settextvalue ('dlgContactListEditor','txtListname',ListName[0])
+ setcontext ('Contact List Editor',ListName[0])
+ for val in range(len (EmailAddresses)):
+ settextvalue ('dlgContactListEditor','txtTypeanemailaddressordragacontactintothelistbelow',EmailAddresses[val])
+ click ('dlgContactListEditor','btnAdd')
+ time.sleep (1)
+ if guiexist ('dlgEvolutionQuery')==1:
+ click ('dlgEvolutionQuery','btnCancel')
+ time.sleep (1)
+ click ('dlgContactListEditor','btnOK')
+ time.sleep (5)
+ if guiexist ('dlgDuplicateContactDetected')==1:
+ log ('contact already exists','info')
+ click ('dlgDuplicateContactDetected','btnAdd')
+ time.sleep(2)
+ verifyaddnewlist (ListName,EmailAddresses)
+ except:
+ log ('Failed during add new list','error')
+ log ('Add New List','testend')
+ raise LdtpExecutionError(0)
+ log ('Add New List','testend')
+
+
+def verifyaddnewlist(ListName,EmailAddresses):
+ log ('checking if List added successfully','teststart')
+ try:
+ selectcontact (ListName[0])
+ selectmenuitem ('frmEvolution-Contacts','mnuFile;mnuOpen')
+ waittillguiexist ('dlgContactListEditor')
+ for val in range (len(EmailAddresses)):
+ if (gettablerowindex ('dlgContactListEditor','tbl0',EmailAddresses[val])) == -1:
+ raise LdtpExecutionError(0)
+ click ('dlgContactListEditor','btnCancel')
+ except:
+ log ('Contact List Addition failed during Verification','error')
+ log ('checking if List added successfully','testend')
+ raise LdtpExecutionError(0)
+ log ('checking if List added successfully','testend')
+
+
+addnewlist (datafilename)
diff --git a/evolution/addcontactlist.xml b/evolution/addcontactlist.xml
new file mode 100644
index 0000000..016e7a2
--- /dev/null
+++ b/evolution/addcontactlist.xml
@@ -0,0 +1,6 @@
+<?xml version="1.0"?>
+<data>
+ <ListName>Test List</ListName>
+ <Email1>asda@asd.com</Email1>
+ <Email2>asdp@aspdfja.com</Email2>
+</data>
diff --git a/evolution/addmeeting.py b/evolution/addmeeting.py
new file mode 100644
index 0000000..2e7e270
--- /dev/null
+++ b/evolution/addmeeting.py
@@ -0,0 +1,437 @@
+#!/usr/bin/env python
+#
+# Linux Desktop Testing Project http://www.gnomebangalore.org/ldtp
+#
+# Author:
+# Prashanth Mohan <prashmohan@gmail.com>
+#
+# Copyright 2004 Novell, Inc.
+#
+# This test script is free software; you can redistribute it and/or
+# modify it under the terms of the GNU Library General Public
+# License as published by the Free Software Foundation; either
+# version 2 of the License, or (at your option) any later version.
+#
+# This library is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+# Library General Public License for more details.
+#
+# You should have received a copy of the GNU Library General Public
+# License along with this library; if not, write to the
+# Free Software Foundation, Inc., 59 Temple Place - Suite 330,
+# Boston, MA 02111-1307, USA.
+#
+
+from ldtp import *
+from ldtputils import *
+from contact import *
+#from calendar import *
+
+def addmeeting(datafilename,recur):
+ log ('Add New Meeting','teststart')
+ try:
+ addrbook,summary,location,description,from_date,to_date,from_time,to_time,calendar,classification,categories,exception,attendee,email,duration,dur_value,dur_day,count,for_type,no_of_times=getmeetingdata (datafilename)
+ #selectCalendarPane()
+ time.sleep (3)
+ selectmenuitem ('frmEvolution-Calendars','mnuFile;mnuNew;mnuMeeting')
+ waittillguiexist ('frmMeeting-Nosummary')
+ time.sleep (1)
+ try:
+ definemeeting (summary,location,description,from_date,to_date,from_time,to_time,calendar,classification,categories)
+ except:
+ log ('Could not add main values for meeting','error')
+ raise LdtpExecutionError(0)
+ addattendees (attendee,email,addrbook)
+ time.sleep (2)
+ try:
+ if recur==1 or len(exception)>0:
+ click ('frmMeeting-Nosummary','btnRecurrence')
+ waittillguiexist ('dlgRecurrence')
+ print 'dlgRecurrence',duration[0],dur_value[0],dur_day[0],count[0],for_type[0],no_of_times[0],exception[0]
+ time.sleep (4)
+ insert_recurrence ('dlgRecurrence',duration[0],dur_value[0],dur_day[0],count[0],for_type[0],no_of_times[0],exception[0])
+ except:
+ raise LdtpExecutionError(0)
+ click ('frmMeeting-Nosummary','btnSave')
+ releasecontext()
+ waittillguiexist ('dlgEvolutionQuery')
+ remap ('evolution','dlgEvolutionQuery')
+ click ('dlgEvolutionQuery','btnDon\'tSend')
+ undoremap ('evolution','dlgEvolutionQuery')
+ time.sleep (3)
+ except:
+ log ('Could not add New meeting','error')
+ log ('Add New Meeting','testend')
+ raise LdtpExecutionError (0)
+ try:
+ verifymeeting(summary,location,description,from_date,to_date,from_time,to_time,calendar,classification,categories,exception,attendee,email,duration,dur_value,dur_day,count,for_type,no_of_times)
+ except:
+ raise LdtpExecutionError (0)
+ log ('Add New Meeting','testend')
+
+
+def getmeetingdata(datafilename):
+ log ('Getting Values for New Meeting','teststart')
+ try:
+ data_object = LdtpDataFileParser (datafilename)
+ addrbook = data_object.gettagvalue ('addrbook')
+ summary = data_object.gettagvalue ('summary')
+ location = data_object.gettagvalue ('location')
+ description = data_object.gettagvalue ('description')
+ from_date = data_object.gettagvalue ('from_date')
+ to_date = data_object.gettagvalue ('to_date')
+ from_time = data_object.gettagvalue ('from_time')
+ to_time = data_object.gettagvalue ('to_time')
+ calendar = data_object.gettagvalue ('calendar')
+ classification = data_object.gettagvalue ('classification')
+ categories = data_object.gettagvalue ('categories')
+ exception = data_object.gettagvalue ('exception')
+ attendee = data_object.gettagvalue ('attendee')
+ email = data_object.gettagvalue ('email')
+ duration = data_object.gettagvalue ('duration')
+ dur_value = data_object.gettagvalue ('durvalue')
+ dur_day = data_object.gettagvalue ('durday')
+ count = data_object.gettagvalue ('count')
+ for_type = data_object.gettagvalue ('fortype')
+ no_of_times = data_object.gettagvalue ('nooftimes')
+ except:
+ log ('Error While getting Values','error')
+ log ('Getting Values for New Meeting','testend')
+ raise LdtpExecutionError(0)
+ log ('Getting Values for New Meeting','testend')
+ print addrbook,summary,location,description,from_date,to_date,from_time,to_time,calendar,classification,categories,exception,attendee,email,duration,dur_value,dur_day,count,for_type,no_of_times
+ return addrbook,summary,location,description,from_date,to_date,from_time,to_time,calendar,classification,categories,exception,attendee,email,duration,dur_value,dur_day,count,for_type,no_of_times
+
+
+def addattendees(attendee,email,addrbook):
+ log ('Add Attendees','teststart')
+ try:
+ click ('frmMeeting-Nosummary','btnAttendees')
+ waittillguiexist ('dlgRequiredParticipants')
+ time.sleep (1)
+ comboselect ('dlgRequiredParticipants','cboAddressBook',addrbook[0])
+ remap ('evolution','dlgRequiredParticipants')
+ attendee=attendee[0].split (':')
+ email=email[0].split (':')
+ if len(attendee)!=len(email):
+ log ('Mismatch in Attendee name and email','error')
+ raise LdtpExecutionError (0)
+ for ind in range(len(attendee)):
+ try:
+ att=parsename(attendee[ind],email[ind])
+ print att,"Inside for loop"
+ if gettablerowindex ('dlgRequiredParticipants','tblRequiredParticipants',att)==-1:
+ print "inside if"
+ selectrow ('dlgRequiredParticipants','tblContacts',att)
+ print "row selected"
+ click ('dlgRequiredParticipants', 'btnAdd1')
+ time.sleep (1)
+ except:
+ log ('User not found','cause')
+ raise LdtpExceptionError(0)
+ click ('dlgRequiredParticipants', 'btnClose')
+ undoremap ('evolution','dlgRequiredParticipants')
+ except:
+ log ('Attendee Addition failed','error')
+ log ('Add Attendees','testend')
+ raise LdtpExecutionError (0)
+ log ('Add Attendees','testend')
+
+
+def verimeetattendees(attendee,email):
+ try:
+ click ('frmMeeting-Nosummary','btnAttendees')
+ waittillguiexist ('dlgRequiredParticipants')
+ remap ('evolution','dlgRequiredParticipants')
+ attendee=attendee.split (' ')
+ email=email.split (' ')
+ for ind in len(attendee):
+ att=parsename(attendee[ind],email[ind])
+ if gettablerowindex ('dlgRequiredParticipants','tblRequiredParticipants',att)==-1:
+ log ('User Not found','cause')
+ raise LdtpExceptionError(0)
+ click ('dlgRequiredParticipants', 'btnClose')
+ undoremap ('evolution','dlgRequiredParticipants')
+ except:
+ raise LdtpExecutionError (0)
+
+
+def parsename (attendee,email):
+ name=attendee
+ name=name+' <'+email+'>'
+ return name
+
+
+def selectmeeting(fromdate,summary):
+ log ('Selecting a Meeting','teststart')
+ try:
+ date=fromdate.split('/')
+ fromdate=date[1]+'/'+date[0]+'/'+date[2]
+ print fromdate
+ selectdate (fromdate)
+ time.sleep (2)
+ except:
+ log ('Unable to select date','error')
+ log ('Selecting a Meeting','testend')
+ raise LdtpExecutionError(0)
+ try:
+ remap ('evolution','frmEvolution-Calendars')
+ #objects=getobjectlist('frmEvolution-Calendars')
+ activatewin ('frmEvolution-Calendars')
+ selectevent ('frmEvolution-Calendars','calDayView',summary)
+ selectevent ('frmEvolution-Calendars','calDayView',summary)
+ undoremap ('evolution','frmEvolution-Calendars')
+ time.sleep (3)
+ except:
+ log ('Unable to select event','error')
+ log ('Selecting a Meeting','testend')
+ log ('Selecting a Meeting','testend')
+
+
+def verifymeeting(summary,location,description,from_date,to_date,from_time,to_time,calendar,classification,categories,exception,attendee,email,duration,dur_value,dur_day,count,for_type,no_of_times):
+ log ('Verify Added Meeting','teststart')
+ try:
+ selectmeeting (from_date[0],summary[0])
+ time.sleep (2)
+ selectmenuitem ('frmEvolution-Calendars','mnuFile;mnuOpenAppointment')
+ setcontext ('Meeting - No summary','Meeting - '+summary[0])
+ time.sleep (3)
+ waittillguiexist ('frmMeeting-Nosummary')
+ verimeetmainwindow(summary,location,description,from_date,to_date,from_time,to_time,calendar,classification,categories)
+ # added attendees are not in the right side text boxes. Un comment when bug removed
+ #verimeetattendees (attendee,email)
+ selectmenuitem ('frmMeeting-Nosummary','mnuFile;mnuClose')
+ except:
+ log ('Meeting not Verified','error')
+ log ('Verify Added Meeting','testend')
+ raise LdtpExecutionError (0)
+ log ('Verify Added Meeting','testend')
+
+
+def verimeetmainwindow(summary,location,description,from_date,to_date,from_time,to_time,calendar,classification,categories):
+ try:
+# if verifysettext ('frmMeeting-Nosummary','cboCalendar',calendar[0])==0:
+# log ('Calendar not set properly','cause')
+# raise LdtpExecutionError(0)
+ print summary,location,description,from_date,to_date,from_time,to_time,calendar,classification,categories
+ if verifysettext ('frmMeeting-Nosummary','txtSummary',summary[0])==0:
+ log ('Summary not set properly','cause')
+ raise LdtpExecutionError(0)
+ print location[0]
+ if len(location)>0 and verifysettext ('frmMeeting-Nosummary','txtLocation',location[0])==0:
+ log ('Location not set properly','cause')
+ raise LdtpExecutionError(0)
+ #if verifysettext ('frmMeeting-Nosummary','txtDescription',description[0])==0:
+ #log ('Description not set properly','cause')
+ #raise LdtpExecutionError(0)
+ if len(from_date)>0 and verifysettext ('frmMeeting-Nosummary','txtTextDateEntry',from_date[0])==0:
+ log ('From Date not set properly','cause')
+ raise LdtpExecutionError(0)
+ if len(to_date)>0 and verifysettext ('frmMeeting-Nosummary','txtTextDateEntry1',to_date[0])==0:
+ log ('To-Date not set properly','cause')
+ raise LdtpExecutionError(0)
+ if len(from_time)>0 and verifysettext ('frmMeeting-Nosummary','txt3',from_time[0])==0:
+ log ('From-Time not set properly','cause')
+ raise LdtpExectionError(0)
+ if len(to_time)>0 and verifysettext ('frmMeeting-Nosummary','txt5',to_time[0])==0:
+ log ('To-Time not set properly','cause')
+ raise LdtpExecutionError(0)
+ remap ('evolution','frmMeeting-Nosummary')
+ if len(categories)>0 and verifysettext ('frmMeeting-Nosummary','txt0',categories[0])==0:
+ log ('Categories not set properly','cause')
+ raise LdtpExecutionError(0)
+ undoremap ('evolution','frmMeeting-Nosummary')
+ except:
+ raise LdtpExecutionError(0)
+
+
+def definemeeting(summary,location,description,from_date,to_date,from_time,to_time,calendar,classification,categories):
+ log ('Define meeting values','teststart')
+ try:
+ time.sleep (2)
+ try:
+ uncheck ('frmMeeting-Nosummary','mnuAlldayEvent')
+ comboselect ('frmMeeting-Nosummary','cboCalendar',calendar[0])
+ except:
+ log ('Calendar not present','cause')
+ raise LdtpExecutionError(0)
+ settextvalue ('frmMeeting-Nosummary','txtSummary',summary[0])
+ setcontext ('Meeting - No summary','Meeting - '+summary[0])
+ print "Setting Sumary Over"
+ if len(location)>0:
+ settextvalue ('frmMeeting-Nosummary','txtLocation',location[0])
+ print "Setting Location Over"
+ if len (description)>0:
+ settextvalue ('frmMeeting-Nosummary','txtDescription',description[0])
+ print "Setting Desc Over"
+ if len(from_date)>0:
+ settextvalue ('frmMeeting-Nosummary','txtTextDateEntry',from_date[0])
+ print "Setting from date Over"
+ if len (to_date)>0:
+ settextvalue ('frmMeeting-Nosummary','txtTextDateEntry1',to_date[0])
+ print "Setting TO DATE Over"
+ if len(from_time)>0:
+ settextvalue ('frmMeeting-Nosummary','txt3',from_time[0])
+ print "Setting from time Over"
+ if len(to_time)>0:
+ settextvalue ('frmMeeting-Nosummary','txt5',to_time[0])
+ print "Setting to time Over"
+ try:
+ selectmenuitem ('frmMeeting-Nosummary','mnuOptions;mnuClassification;mnu'+classification[0])
+ except:
+ log ('Classification incorrectly specified','cause')
+ raise LdtpExecutionError(0)
+ if len (categories)>0:
+ check ('frmMeeting-Nosummary','mnuCategories')
+ remap ('evolution','frmMeeting-Nosummary')
+ settextvalue ('frmMeeting-Nosummary','txt0',categories[0])
+ undoremap ('evolution','frmMeeting-Nosummary')
+ print "Setting Categories Over"
+ except:
+ log ('Define Meeting values failed','error')
+ log ('Define meeting values','testend')
+ raise LdtpExecutionError(0)
+ log ('Define meeting values','testend')
+
+
+def selectdate (new_date):
+ log ('Selecting the Date','teststart')
+ try:
+ selectmenuitem ('frmEvolution-Calendars','mnuView;mnuSelectDate')
+ if waittillguiexist ('dlgSelectDate') == 0:
+ log ('Select date dialog is not open', 'cause')
+ raise LdtpExecutionError (0)
+ time.sleep (2)
+ date_components = new_date.split ('/')
+ month = int (date_components[1])
+ mnt=month
+ if month < 0 or month > 12:
+ log ('Given month is invalid', 'cause')
+ raise LdtpExecutionError (0)
+ if month==1:
+ month='January'
+ elif month==2:
+ month='February'
+ elif month==3:
+ month='March'
+ elif month==4:
+ month='April'
+ elif month==5:
+ month='May'
+ elif month==6:
+ month='June'
+ elif month==7:
+ month='July'
+ elif month==8:
+ month='August'
+ elif month==9:
+ month='September'
+ elif month==10:
+ month='October'
+ elif month==11:
+ month='November'
+ else:
+ month='December'
+ comboselect ('dlgSelectDate', 'cboDecember', month)
+ day = int (date_components[0])
+ if day < 1 or day > 31:
+ log ('Given date is invalid', 'cause')
+ raise LdtpExecutionError (0)
+ year = date_components[2]
+ if int (year) < 1111 or int (year) > 9999:
+ log ('Given year is invalid', 'cause')
+ raise LdtpExecutionError (0)
+ setvalue ('dlgSelectDate', 'sbtn0', year)
+ time.sleep (3)
+ selectcalendardate ('dlgSelectDate', 'calviewCalendar', day, mnt, int (year))
+ except LdtpExecutionError, msg:
+ log ('Unable to select given date', 'cause')
+ log ('Selecting the Date','testend')
+ raise LdtpExecutionError (0)
+ log ('Selecting the Date','testend')
+
+
+def insert_recurrence (windowname,duration,dur_value,dur_day,count,for_type,no_of_times,exception):
+ try:
+ flag = 0
+ if waittillguiexist (windowname) == 0:
+ log ('Window: ' + windowname + ' Is not open', 'cause')
+ raise LdtpExecutionError (0)
+ else:
+ activatewin ('dlgRecurrence')
+ if stateenabled (windowname, 'btnAdd') == 1:
+ log ('Add button is enabled by default!!', 'warning')
+ flag = 1
+ check (windowname, 'chkThisappointmentrecurs')
+ time.sleep (2)
+ if verifycheck (windowname, 'chkThisappointmentrecurs') == 0:
+ log ('Verification of checkbox failed!!', 'cause')
+ raise LdtpExecutionError (0)
+ if stateenabled (windowname, 'btnAdd') == 0:
+ log ('Add button is not enabled', 'cause')
+ raise LdtpExecutionError (0)
+ else:
+ setvalue (windowname, 'sbtn0', count)
+ time.sleep(2)
+ remap ('evolution',windowname)
+ comboselect (windowname,'cboday(s)',duration)
+ undoremap ('evolution',windowname)
+ remap ('evolution',windowname)
+ time.sleep (2)
+
+ if duration == 'day(s)':
+ pass
+ elif duration == 'month(s)':
+ comboselect(windowname,'cbo1st',dur_value)
+ comboselect(windowname,'cboday',dur_day)
+ elif duration == 'week(s)':
+ # those toggle buttons are not recognized in the appmap. so leaving as it is.
+ pass
+ elif duration == 'year(s)':
+ pass
+
+ time.sleep(2)
+ comboselect (windowname,'cbofor',for_type)
+ undoremap ('evolution',windowname)
+ remap ('evolution',windowname)
+ time.sleep(2)
+ print no_of_times
+ if for_type == 'for':
+ setvalue(windowname,'sbtn1',str(no_of_times))
+ time.sleep(2)
+ elif for_type == 'until':
+ settextvalue(windowname,'txtTextDateEntry',str(no_of_times))
+ time.sleep(2)
+ elif for_type == 'forever':
+ pass
+ undoremap ('evolution',windowname)
+ remap ('evolution',windowname)
+ time.sleep(3)
+
+ exception=exception.split(' ')
+ if len(exception) > 0:
+ for i in range (len (exception)):
+ click (windowname, 'btnAdd')
+ time.sleep (2)
+ if waittillguiexist ('dlgAddexception') == 0:
+ log ('Failed to open exception add dialog', 'cause')
+ raise LdtpExecutionError (0)
+ else:
+ settextvalue ('dlgAddexception', 'txtTextDateEntry', exception[i])
+ click ('dlgAddexception', 'btnOK')
+ if waittillguinotexist ('dlgAddexception') == 0:
+ log ('Failed to close exception add dialog', 'cause')
+ raise LdtpExecutionError (0)
+
+ time.sleep(3)
+ undoremap ('evolution',windowname)
+ remap('evolution',windowname)
+ click(windowname, 'btnClose')
+ log ('Recurrence details set successfully','info')
+ undoremap ('evolution',windowname)
+ return flag
+ except ldtp.error,msg:
+ print "Problem in inserting recurrence tab details " + str (msg)
+ log ('Error in insertng recurrence tab details', 'error')
+ return 0
diff --git a/evolution/addnewsign.py b/evolution/addnewsign.py
new file mode 100644
index 0000000..242b5cd
--- /dev/null
+++ b/evolution/addnewsign.py
@@ -0,0 +1,41 @@
+#!/usr/bin/env python
+#
+# Linux Desktop Testing Project http://www.gnomebangalore.org/ldtp
+#
+# Author:
+# Prashanth Mohan <prashmohan@gmail.com>
+#
+# Copyright 2004 Novell, Inc.
+#
+# This test script is free software; you can redistribute it and/or
+# modify it under the terms of the GNU Library General Public
+# License as published by the Free Software Foundation; either
+# version 2 of the License, or (at your option) any later version.
+#
+# This library is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+# Library General Public License for more details.
+#
+# You should have received a copy of the GNU Library General Public
+# License along with this library; if not, write to the
+# Free Software Foundation, Inc., 59 Temple Place - Suite 330,
+# Boston, MA 02111-1307, USA.
+#
+from composerprefs import *
+
+try:
+ try:
+ data_object = LdtpDataFileParser (datafilename)
+ text=data_object.gettagvalue ('text')
+ name=data_object.gettagvalue ('name')
+ except:
+ log ('Error while reading values for add signature test','cause')
+ raise LdtpExecutionError (0)
+ try:
+ addnewsignature (name[0],text[0])
+ except:
+ log ('add signature test failed','error')
+ raise LdtpExecutionError (0)
+except:
+ raise LdtpExecutionError (0)
diff --git a/evolution/addnewsign.xml b/evolution/addnewsign.xml
new file mode 100644
index 0000000..85529f9
--- /dev/null
+++ b/evolution/addnewsign.xml
@@ -0,0 +1,5 @@
+<?xml version="1.0"?>
+<data>
+ <name>Signature</name>
+ <text>Test Signature</text>
+</data>
diff --git a/evolution/addtoreplytofield.py b/evolution/addtoreplytofield.py
new file mode 100644
index 0000000..1eb31a1
--- /dev/null
+++ b/evolution/addtoreplytofield.py
@@ -0,0 +1,40 @@
+#!/usr/bin/env python
+#
+# Linux Desktop Testing Project http://www.gnomebangalore.org/ldtp
+#
+# Author:
+# Prashanth Mohan <prashmohan@gmail.com>
+#
+# Copyright 2004 Novell, Inc.
+#
+# This test script is free software; you can redistribute it and/or
+# modify it under the terms of the GNU Library General Public
+# License as published by the Free Software Foundation; either
+# version 2 of the License, or (at your option) any later version.
+#
+# This library is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+# Library General Public License for more details.
+#
+# You should have received a copy of the GNU Library General Public
+# License along with this library; if not, write to the
+# Free Software Foundation, Inc., 59 Temple Place - Suite 330,
+# Boston, MA 02111-1307, USA.
+#
+
+from mailtests import *
+
+try:
+ data_object = LdtpDataFileParser (datafilename)
+ replyto=data_object.gettagvalue ('replyto')
+ to=data_object.gettagvalue ('to')
+except:
+ log ('Could not read values for replyto test','cause')
+ raise LdtpExecutionError (0)
+
+try:
+ add_to_replytofield(replyto[0],to[0])
+except:
+ log ('replyto test failed','error')
+ raise LdtpExecutionError (0)
diff --git a/evolution/addtoreplytofield.xml b/evolution/addtoreplytofield.xml
new file mode 100644
index 0000000..ebb3781
--- /dev/null
+++ b/evolution/addtoreplytofield.xml
@@ -0,0 +1,6 @@
+<?xml version="1.0"?>
+<data>
+<to>prashmohan@gmail.com</to>
+<replyto>prashmohan@gmail.com</replyto>
+</data>
+
diff --git a/evolution/all-day-event.py b/evolution/all-day-event.py
new file mode 100644
index 0000000..73595a0
--- /dev/null
+++ b/evolution/all-day-event.py
@@ -0,0 +1,83 @@
+#
+# Linux Desktop Testing Project http://www.gnomebangalore.org/ldtp
+#
+# Author:
+# Venkateswaran S <wenkat.s@gmail.com>
+#
+# Copyright 2004 Novell, Inc.
+#
+# This test script is free software; you can redistribute it and/or
+# modify it under the terms of the GNU Library General Public
+# License as published by the Free Software Foundation; either
+# version 2 of the License, or (at your option) any later version.
+#
+# This library is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+# Library General Public License for more details.
+#
+# You should have received a copy of the GNU Library General Public
+# License along with this library; if not, write to the
+# Free Software Foundation, Inc., 59 Temple Place - Suite 330,
+# Boston, MA 02111-1307, USA.
+#
+
+#To create an Appointment
+from evoutils.calendar import *
+from ldtputils import *
+
+def read_data():
+ #Initialising XML parser with data file
+ data_object = LdtpDataFileParser (datafilename)
+
+ #Extracting imput data from xml file
+ summary = data_object.gettagvalue ('summary')[0]
+ location = data_object.gettagvalue ('location')[0]
+ description = data_object.gettagvalue ('description')[0]
+ from_date = data_object.gettagvalue ('from_date')[0]
+ to_date = data_object.gettagvalue ('to_date')[0]
+ calendar = data_object.gettagvalue ('calendar')[0]
+ return summary, location, description, from_date, to_date, calendar
+
+def create_appoinment():
+ log ('Create Appointment', 'teststart')
+ try:
+ windowname = 'frmAppointment-Nosummary'
+ flag = 0
+ more_items_todo = 'yes'
+ summary, location, description, from_date, to_date, calendar = read_data()
+
+ selectmenuitem ('frmEvolution-Calendars', 'mnuView;mnuWindow;mnuCalendars')
+ time.sleep (2)
+ selectmenuitem ('frmEvolution-Calendars', 'mnuFile;mnuFile;mnuAppointment')
+ time.sleep (2)
+
+ if guiexist (windowname) == 0:
+ log ('Failed to open new appointment window', 'cause')
+ raise LdtpExecutionError (0)
+ else:
+
+ try:
+ click(windowname,'tbtnAlldayEvent')
+ from_time=0
+ to_time=0
+ except:
+ print 'unable to click the button (All Day event)'
+ log ('Create Appointment', 'testend')
+ raise LdtpExecutionError (0)
+# print windowname, summary, location, description, from_date, from_time, to_date, to_time, calendar, more_items_todo
+ i = insert_appointment (windowname, summary, location, description, from_date, from_time, to_date, to_time, calendar, more_items_todo)
+
+ if i == 1:
+ flag = 1
+ time.sleep (2)
+ click(windowname,'btnSave')
+
+ except:
+ log('unable to Create a new appoinment','error')
+ log ('Create Appointment', 'testend')
+ raise LdtpExecutionError (0)
+ log ('All day Appointment created','info')
+ log ('Create Appointment', 'testend')
+
+create_appoinment()
diff --git a/evolution/all-day-event.xml b/evolution/all-day-event.xml
new file mode 100644
index 0000000..5eb1fd4
--- /dev/null
+++ b/evolution/all-day-event.xml
@@ -0,0 +1,13 @@
+<?xml version="1.0"?>
+<data>
+ <summary>All Day event</summary>
+ <location>Conference room</location>
+ <description>A new appointment for testing appointment creation</description>
+ <classification>Confidential</classification>
+ <calendar>Personal</calendar>
+ <categories>Business</categories>
+ <from_date>12/12/2005</from_date>
+ <to_date>12/20/2005</to_date>
+ <from_time>11:00 AM</from_time>
+ <to_time>11:00 AM</to_time>
+</data>
diff --git a/evolution/apply_filter.py b/evolution/apply_filter.py
new file mode 100644
index 0000000..88ff93f
--- /dev/null
+++ b/evolution/apply_filter.py
@@ -0,0 +1,90 @@
+#
+# Linux Desktop Testing Project http://www.gnomebangalore.org/ldtp
+#
+# Author:
+# Venkateswaran S <wenkat.s@gmail.com>
+#
+# Copyright 2004 Novell, Inc.
+#
+# This test script is free software; you can redistribute it and/or
+# modify it under the terms of the GNU Library General Public
+# License as published by the Free Software Foundation; either
+# version 2 of the License, or (at your option) any later version.
+#
+# This library is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+# Library General Public License for more details.
+#
+# You should have received a copy of the GNU Library General Public
+# License along with this library; if not, write to the
+# Free Software Foundation, Inc., 59 Temple Place - Suite 330,
+# Boston, MA 02111-1307, USA.
+#
+
+#To create a filter.
+from ldtp import *
+from ldtputils import *
+from create_filter import create_filter
+
+def verify_filter(rule_name):
+ windowname = 'dlgFilters'
+ selectmenuitem('frmEvolution-Mail','mnuEdit;mnuMessageFilters')
+ waittillguiexist(windowname)
+ if gettablerowindex (windowname,'tblFilterRules',rule_name) == -1:
+ print 'rule not found in the table filter rules'
+ click(windowname,'btnCancel')
+ return 0
+ else:
+ print 'rule name found'
+ click(windowname,'btnOK')
+ return 1
+
+def read_data():
+
+ data_object = LdtpDataFileParser (datafilename)
+
+ #Extracting imput data from xml file
+ filter_on = data_object.gettagvalue ('filter_on')[0]
+ rule_name = data_object.gettagvalue ('rule_name')[0]
+ if_components = data_object.gettagvalue ('if_components')[0]
+ if_properties = data_object.gettagvalue ('if_properties')[0]
+ if_values = data_object.gettagvalue ('if_values')[0]
+ then_actions = data_object.gettagvalue ('then_actions')[0]
+ then_values = data_object.gettagvalue ('then_values')[0]
+ execute_action = data_object.gettagvalue ('execute_action')[0]
+ fldr = data_object.gettagvalue ('fldr')[0]
+ print fldr, filter_on, rule_name, if_components, if_properties, if_values, then_actions, then_values, execute_action
+ return fldr, filter_on, rule_name, if_components, if_properties, if_values, then_actions, then_values, execute_action
+
+def apply_filter(fldr,filter_on, rule_name, if_components, if_properties, if_values, then_actions, then_values, execute_action):
+ try:
+ log('Create and apply filter','teststart')
+ if create_filter(filter_on, rule_name, if_components, if_properties, if_values, then_actions, then_values, execute_action) == 1:
+ log('Filter created successfully','info')
+ else:
+ log('Failure in creating a filter','error')
+
+ if selectrowpartialmatch('frmEvolution-Mail','ttblMailFolderTree',fldr) == 1:
+ log('fldr selected','info')
+ else:
+ log('Unable to select the given folder','error')
+ remap('evolution','frmEvolution-Mail')
+ # Note 0 has been hard coded, the apply filter has to apply to all the files in the folder.
+ # so the idea is to select a random msg, and apply filters.
+ if selectrowindex ('frmEvolution-Mail', 'ttblMessageList', 0) == 1:
+ if selectmenuitem('frmEvolution-Mail','mnuMessage;mnuApplyFilters') == 1:
+ print 'Filter has been created and applied to '+fldr
+ log('Filter applied','info')
+ else:
+ print 'Unable to apply the filter'
+ else:
+ print 'No messages in '+fldr
+ raise LdtpExecutionError (0)
+ except:
+ log('Unable to apply the filter','error')
+ raise LdtpExecutionError (0)
+ log('Create and apply filter','testend')
+
+fldr,filter_on, rule_name, if_components, if_properties, if_values, then_actions, then_values, execute_action = read_data()
+apply_filter(fldr,filter_on, rule_name, if_components, if_properties, if_values, then_actions, then_values, execute_action)
diff --git a/evolution/apply_filter.xml b/evolution/apply_filter.xml
new file mode 100644
index 0000000..95616b2
--- /dev/null
+++ b/evolution/apply_filter.xml
@@ -0,0 +1,12 @@
+<?xml version="1.0"?>
+<data>
+ <filter_on>Subject</filter_on>
+ <rule_name>Sample111</rule_name>
+ <if_components>Sender:Subject:Message Body</if_components>
+ <if_properties>is:contains:contains</if_properties>
+ <if_values>Welcolution!:Prashanth Mohan:asdf</if_values>
+ <then_actions>Move to Folder:Copy to Folder:Copy to Folder</then_actions>
+ <then_values>venkat:filter:filter1</then_values>
+ <execute_action>if all criteria are met</execute_action>
+ <fldr>Inbox</fldr>
+</data>
diff --git a/evolution/applyfilter.xml b/evolution/applyfilter.xml
new file mode 100644
index 0000000..ce45b84
--- /dev/null
+++ b/evolution/applyfilter.xml
@@ -0,0 +1,5 @@
+<?xml version="1.0"?>
+<data>
+ <folder>Inbox</folder>
+ <subject>asd</subject>
+</data>
diff --git a/evolution/applyfilterwhenoffline.py b/evolution/applyfilterwhenoffline.py
new file mode 100644
index 0000000..3213ef7
--- /dev/null
+++ b/evolution/applyfilterwhenoffline.py
@@ -0,0 +1,43 @@
+#!/usr/bin/env python
+#
+# Linux Desktop Testing Project http://www.gnomebangalore.org/ldtp
+#
+# Author:
+# Prashanth Mohan <prashmohan@gmail.com>
+#
+# Copyright 2004 Novell, Inc.
+#
+# This test script is free software; you can redistribute it and/or
+# modify it under the terms of the GNU Library General Public
+# License as published by the Free Software Foundation; either
+# version 2 of the License, or (at your option) any later version.
+#
+# This library is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+# Library General Public License for more details.
+#
+# You should have received a copy of the GNU Library General Public
+# License along with this library; if not, write to the
+# Free Software Foundation, Inc., 59 Temple Place - Suite 330,
+# Boston, MA 02111-1307, USA.
+#
+
+from offline import *
+
+try:
+ try:
+ data_object = LdtpDataFileParser (datafilename)
+ folder = data_object.gettagvalue ('folder')
+ subject = data_object.gettagvalue ('subject')
+ except:
+ log ('Error while reading values for apply test','cause')
+ raise LdtpExecutionError (0)
+ try:
+ go_offline ()
+ apply_filter(folder[0],subject[0])
+ except:
+ log ('apply filter when offline test failed','error')
+ raise LdtpExecutionError (0)
+except:
+ raise LdtpExecutionError (0)
diff --git a/evolution/applyfilterwhenoffline.xml b/evolution/applyfilterwhenoffline.xml
new file mode 100644
index 0000000..ce45b84
--- /dev/null
+++ b/evolution/applyfilterwhenoffline.xml
@@ -0,0 +1,5 @@
+<?xml version="1.0"?>
+<data>
+ <folder>Inbox</folder>
+ <subject>asd</subject>
+</data>
diff --git a/evolution/appointment-with-attachment.py b/evolution/appointment-with-attachment.py
new file mode 100644
index 0000000..975918b
--- /dev/null
+++ b/evolution/appointment-with-attachment.py
@@ -0,0 +1,91 @@
+#
+# Linux Desktop Testing Project http://www.gnomebangalore.org/ldtp
+#
+# Author:
+# Venkateswaran S <wenkat.s@gmail.com>
+#
+# Copyright 2004 Novell, Inc.
+#
+# This test script is free software; you can redistribute it and/or
+# modify it under the terms of the GNU Library General Public
+# License as published by the Free Software Foundation; either
+# version 2 of the License, or (at your option) any later version.
+#
+# This library is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+# Library General Public License for more details.
+#
+# You should have received a copy of the GNU Library General Public
+# License along with this library; if not, write to the
+# Free Software Foundation, Inc., 59 Temple Place - Suite 330,
+# Boston, MA 02111-1307, USA.
+#
+
+# To create an appoinment with attachment.
+
+#from create-appointment import *
+from evoutils.calendar import *
+from ldtp import *
+from ldtputils import *
+
+def read_data():
+ #Initialising XML parser with data file
+ data_object = LdtpDataFileParser (datafilename)
+
+ #Extracting imput data from xml file
+ summary = data_object.gettagvalue ('summary')[0]
+ location = data_object.gettagvalue ('location')[0]
+ description = data_object.gettagvalue ('description')[0]
+ from_date = data_object.gettagvalue ('from_date')[0]
+ to_date = data_object.gettagvalue ('to_date')[0]
+ from_time = data_object.gettagvalue ('from_time')[0]
+ to_time = data_object.gettagvalue ('to_time')[0]
+ calendar = data_object.gettagvalue ('calendar')[0]
+ filename = data_object.gettagvalue ('filename')[0]
+ return filename, summary, location, description, from_date, to_date, from_time, to_time, calendar
+
+def appointment_withattachment():
+
+ try:
+ log('Create appoinment with attachment','teststart')
+ windowname = 'frmAppointment-Nosummary'
+ filename, summary, location, description, from_date, to_date, from_time, to_time, calendar = read_data()
+ more_items_todo = 'yes'
+
+ selectmenuitem ('frmEvolution-Calendars', 'mnuFile;mnuFile;mnuAppointment')
+ time.sleep (2)
+
+ if guiexist (windowname) == 0:
+ log ('Failed to open new appointment window', 'cause')
+ log('Create appoinment with attachment','testend')
+ raise LdtpExecutionError (0)
+ else:
+ i = insert_appointment (windowname, summary, location, description, from_date, from_time, to_date, to_time, calendar, more_items_todo)
+
+ if i == 1:
+ flag = 1
+ else:
+ try:
+ click(windowname,'btnAttachments')
+ waittillguiexist('dlgAttachfile(s)')
+ time.sleep(3)
+ selectrow ('dlgAttachfile(s)', 'tblFiles', filename)
+ time.sleep(2)
+ click('dlgAttachfile(s)','btnOpen')
+ except:
+ print 'unable to select the file'
+ log('Create appoinment with attachment','testend')
+ raise LdtpExecutionError (0)
+
+ if click(windowname, 'btnSave') == 0:
+ log('Unable to click the Save button','cause')
+ log('Create appoinment with attachment','testend')
+ else:
+ log('Appoinment with attachment created','testend')
+ except:
+ log('unable to create the appoinment with attachment','error')
+ log('Create appoinment with attachment','testend')
+ raise LdtpExecutionError (0)
+
+appointment_withattachment()
diff --git a/evolution/appointment-with-attachment.xml b/evolution/appointment-with-attachment.xml
new file mode 100644
index 0000000..cf7681c
--- /dev/null
+++ b/evolution/appointment-with-attachment.xml
@@ -0,0 +1,14 @@
+<?xml version="1.0"?>
+<data>
+ <filename>sample.txt</filename>
+ <summary>Appointment with attachment</summary>
+ <location>Conference room</location>
+ <description>A new appointment for testing appointment creation</description>
+ <classification>Confidential</classification>
+ <calendar>Personal</calendar>
+ <categories>Business</categories>
+ <from_date>12/12/2005</from_date>
+ <to_date>12/20/2005</to_date>
+ <from_time>11:00 AM</from_time>
+ <to_time>11:00 AM</to_time>
+</data>
diff --git a/evolution/backgroundimage.py b/evolution/backgroundimage.py
new file mode 100644
index 0000000..be193d8
--- /dev/null
+++ b/evolution/backgroundimage.py
@@ -0,0 +1,45 @@
+#!/usr/bin/env python
+#
+# Linux Desktop Testing Project http://www.gnomebangalore.org/ldtp
+#
+# Author:
+# Prashanth Mohan <prashmohan@gmail.com>
+#
+# Copyright 2004 Novell, Inc.
+#
+# This test script is free software; you can redistribute it and/or
+# modify it under the terms of the GNU Library General Public
+# License as published by the Free Software Foundation; either
+# version 2 of the License, or (at your option) any later version.
+#
+# This library is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+# Library General Public License for more details.
+#
+# You should have received a copy of the GNU Library General Public
+# License along with this library; if not, write to the
+# Free Software Foundation, Inc., 59 Temple Place - Suite 330,
+# Boston, MA 02111-1307, USA.
+#
+from mailtests import *
+
+try:
+ try:
+ data_object = LdtpDataFileParser (datafilename)
+ to=data_object.gettagvalue ('to')
+ bgimage=data_object.gettagvalue ('bgimage')
+ ref_image=data_object.gettagvalue ('ref_image')
+ except:
+ log ('Error while reading values for background image test','cause')
+ raise LdtpExecutionError (0)
+ try:
+ # backgound image should be present in the home folder
+ background_image_test (to[0],bgimage[0],ref_image)
+ except:
+ log ('background image test failed','error')
+ raise LdtpExecutionError (0)
+except:
+ raise LdtpExecutionError (0)
+
+
diff --git a/evolution/backgroundimage.xml b/evolution/backgroundimage.xml
new file mode 100644
index 0000000..3ee7519
--- /dev/null
+++ b/evolution/backgroundimage.xml
@@ -0,0 +1,6 @@
+<?xml version="1.0"?>
+<data>
+ <to>prashmohan@gmail.com</to>
+ <bgimage>gnome-background-image.png</bgimage>
+ <ref_image>IMAGES/ref_bgimage.png</ref_image>
+</data>
diff --git a/evolution/calendar.py b/evolution/calendar.py
new file mode 100644
index 0000000..1cdac5d
--- /dev/null
+++ b/evolution/calendar.py
@@ -0,0 +1,357 @@
+#!/usr/bin/python
+#
+# Linux Desktop Testing Project http://www.gnomebangalore.org/ldtp
+#
+# Author:
+# Premkumar <jpremkumar@novell.com>
+#
+# Copyright 2004 Novell, Inc.
+#
+# This library is free software; you can redistribute it and/or
+# modify it under the terms of the GNU Library General Public
+# License as published by the Free Software Foundation; either
+# version 2 of the License, or (at your option) any later version.
+#
+# This library is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+# Library General Public License for more details.
+#
+# You should have received a copy of the GNU Library General Public
+# License along with this library; if not, write to the
+# Free Software Foundation, Inc., 59 Temple Place - Suite 330,
+# Boston, MA 02111-1307, USA.
+#
+
+from ldtp import *
+from ldtputils import *
+from evoutils.mail import *
+
+#To insert values into an Appointment tab
+def insert_appointment (windowname, ptlistname, summary, location, description, from_date, from_time, to_date, to_time, calendar, classification, categories):
+ try:
+ flag = 0
+ selecttab (windowname, ptlistname, 'Appointment')
+ time.sleep (2)
+ settextvalue (windowname, 'txtSummary', summary)
+ if windowname == 'dlgMeeting-Nosummary':
+ setcontext ('Meeting - No summary', 'Meeting - ' + summary)
+ else:
+ setcontext ('Appointment - No summary', 'Appointment - ' + summary)
+ time.sleep (2)
+ if setandverify (windowname, 'txtLocation', location) == 0:
+ log ('Failed to set value in location field', 'cause')
+ raise LdtpExecutionError (0)
+
+ if classification != gettextvalue (windowname, 'cboClassification'):
+ comboselect (windowname, 'cboClassification', classification)
+ if verifyselect (windowname, 'cboClassification', classification) == 0:
+ log ('Verification of Classification combo box failed!!', 'warning')
+ flag = 1
+
+ click (windowname, 'btnCategories')
+ time.sleep (3)
+ if guiexist ('dlgCategories') == 0:
+ log ('Failed to open categories dialog', 'cause')
+ raise LdtpExecutionError (0)
+ else:
+ select_catagory (categories)
+
+ if setandverify (windowname, 'txtDescription', description) == 0:
+ log ('Failed to set value in Event description field', 'cause')
+ raise LdtpExecutionError (0)
+ if from_date != '0':
+ if setandverify (windowname, 'txtStarttime', from_date) == 0:
+ log ('Failed to set value in From date entry', 'cause')
+ raise LdtpExecutionError (0)
+ if from_time != '0':
+ if setandverify (windowname, 'txt9', from_time) == 0:
+ log ('Failed to set value in From time entry', 'cause')
+ raise LdtpExecutionError (0)
+ if to_date != '0':
+ if setandverify (windowname, 'txtEndtime', to_date) == 0:
+ log ('Failed to set value in To date entry', 'cause')
+ raise LdtpExecutionError (0)
+ if to_time != '0':
+ if setandverify (windowname, 'txt7', to_time) == 0:
+ log ('Failed to set value in From time entry', 'cause')
+ raise LdtpExecutionError (0)
+ print '****************' + str (flag) + '**************'
+ return flag
+ except error,msg:
+ print "Problem in inserting appointment tab details " + str (msg)
+ log('errorinappointmenttab','error')
+ return 0
+
+def getrecentrowindex (windowname, tablename, column, summary):
+ totalcount = getrowcount (windowname, tablename)
+ if totalcount != 0:
+ for i in range (totalcount-1, -1, -1):
+ cur_summary = getcellvalue (windowname, tablename, i, column)
+ print cur_summary + ' == ' + summary
+ if summary == cur_summary:
+ return i
+ return -1
+
+#Add participants to Meeting from Required Participants popup
+def add_participant (windowname, participant):
+ try:
+ if waittillguiexist (windowname) == 0:
+ log ('Window: ' + windowname + ' Is not open', 'cause')
+ raise LdtpExecutionError (0)
+
+ settextvalue (windowname, txtSearch, participant)
+ selectrow (windowname, tblContacts, 0)
+ if stateenabled (windowname, 'btnAdd') == 1:
+ click (windowname , 'btnAdd')
+ else:
+ log ('Add Button is in disabled state no contact found!!', 'warning')
+
+ click (windowname , 'btnClose')
+ time.sleep (3)
+ if waittillguinotexist (windowname) == 0:
+ log ('Failed to close Meeting dialog' ,'cause')
+ raise LdtpExecutionError (0)
+
+ time.sleep (2)
+ return 1
+
+ except error,msg:
+ print "Problem in adding participant " + str (msg)
+ log('errorinrequiredparticipant','error')
+ return 0
+
+
+
+#Select categories from categories popup
+def select_catagory (catagory):
+ try:
+ if guiexist ('dlgCategories') == 0:
+ log ('Failed to open categories dialog', 'cause')
+ raise LdtpExecutionError (0)
+ else:
+ index = gettablerowindex ('dlgCategories', 'tbl0', catagory)
+ checkrow ('dlgCategories', 'tbl0', index)
+ time.sleep (2)
+ if verifysettext ('dlgCategories', 'txtItem(s)belongtothesecategories', catagory) == 0:
+ #TODO: Make sure to close all the open windows before raising exception
+ log ('Failed to select given category', 'cause')
+ raise LdtpExecutionError (0)
+ else:
+ click ('dlgCategories', 'btnOK')
+ time.sleep (1)
+ if waittillguinotexist ('dlgCategories') == 0:
+ log ('Failed to close Category dialog', 'cause')
+ raise LdtpExecutionError (0)
+ else:
+ return 1
+ except error,msg:
+ print "Problem in selecting catagory" + str (msg)
+ log('errorinselectcatagory','error')
+ return 0
+
+
+#Verifyf the fields in appointment tab
+def verifyappointmenttab (windowname, ptlistname, summary, location, description, from_date, from_time, to_date, to_time, calendar, classification, categories):
+ try:
+ if windowname == 'dlgMeeting-Nosummary':
+ setcontext ('Meeting - No summary', 'Meeting - ' + summary)
+ if guiexist ('dlgMeeting-Nosummary') == 0:
+ log ('Failed to open meeting dialog', 'cause')
+ raise LdtpExecutionError (0)
+ else:
+ setcontext ('Appointment - No summary', 'Appointment - ' + summary)
+ if guiexist ('dlgAppointment-Nosummary') == 0:
+ log ('Failed to open appointment dialog', 'cause')
+ raise LdtpExecutionError (0)
+
+ time.sleep (2)
+ if verifysettext (windowname, 'txtSummary', summary) == 0:
+ log ('In appointment tab summary field is not set to ' + summary, cause)
+ raise LdtpExecutionError (0)
+
+ if verifysettext (windowname, 'txtLocation', location) == 0:
+ log ('In appointment tab location field is not set to ' + location, cause)
+ raise LdtpExecutionError (0)
+
+ if verifysettext (windowname, 'txtDescription', description) == 0:
+ log ('In appointment tab description field is not set to ' + description, cause)
+ raise LdtpExecutionError (0)
+
+ if from_date:
+ if verifysettext (windowname, 'txtStarttime', from_date) == 0:
+ log ('In appointment tab From date is not set to ' + from_date, 'cause')
+ raise LdtpExecutionError (0)
+
+ if from_time:
+ if verifysettext (windowname, 'txt9', from_time) == 0:
+ log ('In appointment tab From time is not set to ' + from_time, 'cause')
+ raise LdtpExecutionError (0)
+
+ if to_date:
+ if verifysettext (windowname, 'txtEndtime', to_date) == 0:
+ log ('In appointment tab To date is not set to' + to_date, 'cause')
+ raise LdtpExecutionError (0)
+
+ if to_time:
+ if verifysettext (windowname, 'txt7', to_time) == 0:
+ log ('In appointment tab From time is not set to ' + to_time, 'cause')
+ raise LdtpExecutionError (0)
+
+ print '****************' + str (flag) + '**************'
+ return flag
+
+ except error,msg:
+ log ('Verification of Appointment tab fields failed ' + str (msg), 'error')
+ return 0
+
+
+def selectdate (new_date):
+ print "inside select date"
+ log ('Selecting the Date','teststart')
+ try:
+ selectmenuitem ('frmEvolution-Calendars','mnuView;mnuSelectDate')
+ if waittillguiexist ('dlgSelectDate') == 0:
+ log ('Select date dialog is not open', 'cause')
+ raise LdtpExecutionError (0)
+ time.sleep (2)
+ date_components = new_date.split ('/')
+ month = int (date_components[1])
+ mnt=month
+ if month < 0 or month > 12:
+ log ('Given month is invalid', 'cause')
+ raise LdtpExecutionError (0)
+ print month
+ time.sleep (5)
+ if month==1:
+ month='January'
+ elif month==2:
+ month='February'
+ elif month==3:
+ month='March'
+ elif month==4:
+ month='April'
+ elif month==5:
+ month='May'
+ elif month==6:
+ month='June'
+ elif month==7:
+ month='July'
+ elif month==8:
+ month='August'
+ elif month==9:
+ month='September'
+ elif month==10:
+ month='October'
+ elif month==11:
+ month='November'
+ else:
+ month='December'
+ comboselect ('dlgSelectDate', 'cboDecember', month)
+
+ day = int (date_components[0])
+ if day < 1 or day > 31:
+ log ('Given date is invalid', 'cause')
+ raise LdtpExecutionError (0)
+ year = date_components[2]
+ if int (year) < 1111 or int (year) > 9999:
+ log ('Given year is invalid', 'cause')
+ raise LdtpExecutionError (0)
+ setvalue ('dlgSelectDate', 'sbtn0', year)
+ time.sleep (3)
+ selectcalendardate ('dlgSelectDate', 'calviewCalendar', day, mnt, int (year))
+ except LdtpExecutionError, msg:
+ log ('Unable to select given date', 'cause')
+ log ('Selecting the Date','testend')
+ raise LdtpExecutionError (0)
+ log ('Selecting the Date','testend')
+
+
+def insert_recurrence (windowname,duration,dur_value,dur_day,count,for_type,no_of_times,exception):
+ try:
+ print "inside"
+ time.sleep (4)
+
+ flag = 0
+ if waittillguiexist (windowname) == 0:
+ log ('Window: ' + windowname + ' Is not open', 'cause')
+
+ if stateenabled (windowname, 'btnAdd') == 1:
+ log ('Add button is enabled by default!!', 'warning')
+ flag = 1
+ check (windowname, 'chkThisappointmentrecurs')
+ time.sleep (2)
+ if verifycheck (windowname, 'chkThisappointmentrecurs') == 0:
+ log ('Verification of checkbox failed!!', 'cause')
+ raise LdtpExecutionError (0)
+ if stateenabled (windowname, 'btnAdd') == 0:
+ log ('Add button is not enabled', 'cause')
+ raise LdtpExecutionError (0)
+ else:
+ print count
+ time.sleep (5)
+ setvalue (windowname, 'sbtn0', count)
+ time.sleep(2)
+ remap ('evolution',windowname)
+ comboselect (windowname,'cboday(s)',duration)
+ undoremap ('evolution',windowname)
+ remap ('evolution',windowname)
+ time.sleep (2)
+
+ if duration == 'day(s)':
+ pass
+ elif duration == 'month(s)':
+ comboselect(windowname,'cbo1st',dur_value)
+ comboselect(windowname,'cboday',dur_day)
+ elif duration == 'week(s)':
+ # those toggle buttons are not recognized in the appmap. so leaving as it is.
+ pass
+ elif duration == 'year(s)':
+ pass
+
+ time.sleep(2)
+ comboselect (windowname,'cbofor',for_type)
+ undoremap ('evolution',windowname)
+ remap ('evolution',windowname)
+ time.sleep(2)
+ print no_of_times
+ if for_type == 'for':
+ setvalue(windowname,'sbtn1',str(no_of_times))
+ time.sleep(2)
+ elif for_type == 'until':
+ settextvalue(windowname,'txtTextDateEntry',str(no_of_times))
+ time.sleep(2)
+ elif for_type == 'forever':
+ pass
+ undoremap ('evolution',windowname)
+ remap ('evolution',windowname)
+ time.sleep(3)
+
+ exception=exception.split(' ')
+ if len(exception) > 0:
+ for i in range (len (exception)):
+ click (windowname, 'btnAdd')
+ time.sleep (2)
+ if waittillguiexist ('dlgAddexception') == 0:
+ log ('Failed to open exception add dialog', 'cause')
+ raise LdtpExecutionError (0)
+ else:
+ settextvalue ('dlgAddexception', 'txtTextDateEntry', exception[i])
+ click ('dlgAddexception', 'btnOK')
+ if waittillguinotexist ('dlgAddexception') == 0:
+ log ('Failed to close exception add dialog', 'cause')
+ raise LdtpExecutionError (0)
+
+ time.sleep(3)
+ undoremap ('evolution',windowname)
+ remap('evolution',windowname)
+ click(windowname, 'btnClose')
+ log ('Recurrence details set successfully','info')
+ undoremap ('evolution',windowname)
+ return flag
+ except ldtp.error,msg:
+ print "Problem in inserting recurrence tab details " + str (msg)
+ log ('Error in insertng recurrence tab details', 'error')
+ return 0
+
+
diff --git a/evolution/change-view.py b/evolution/change-view.py
new file mode 100644
index 0000000..7e21ec3
--- /dev/null
+++ b/evolution/change-view.py
@@ -0,0 +1,116 @@
+#
+# Linux Desktop Testing Project http://www.gnomebangalore.org/ldtp
+#
+# Author:
+# Venkateswaran S <wenkat.s@gmail.com>
+#
+# Copyright 2004 Novell, Inc.
+#
+# This test script is free software; you can redistribute it and/or
+# modify it under the terms of the GNU Library General Public
+# License as published by the Free Software Foundation; either
+# version 2 of the License, or (at your option) any later version.
+#
+# This library is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+# Library General Public License for more details.
+#
+# You should have received a copy of the GNU Library General Public
+# License along with this library; if not, write to the
+# Free Software Foundation, Inc., 59 Temple Place - Suite 330,
+# Boston, MA 02111-1307, USA.
+#
+
+#To change the properties of the folders
+
+from ldtp import *
+from ldtputils import *
+
+def addcontacts(attendee,email,addrbook):
+ log ('Add Attendees','teststart')
+ try:
+
+ windowname = 'dlgSelectContactsfromAddressBook'
+ comboselect (windowname,'cboAddressBook',addrbook)
+ remap ('evolution',windowname)
+ attendee=attendee[0].split (':')
+ email=email[0].split (':')
+ if len(attendee)!=len(email):
+ log ('Mismatch in contacts name and email','error')
+ raise LdtpExecutionError (0)
+ for ind in range(len(attendee)):
+ try:
+ att=attendee[ind] + ' <'+ email[ind] + '>'
+ selectrow (windowname,'tblContacts',att)
+ time.sleep(2)
+ click (windowname, 'btnAdd')
+ time.sleep (1)
+ except:
+ log ('User not found','cause')
+ raise LdtpExceptionError(0)
+ click (windowname, 'btnClose')
+ undoremap ('evolution',windowname)
+ except:
+ log ('Attendee Addition failed','error')
+ log ('Add Attendees','testend')
+ raise LdtpExecutionError (0)
+ log ('Add Attendees','testend')
+
+
+def read_data():
+
+ data_object = LdtpDataFileParser (datafilename)
+
+ #Extracting imput data from xml file
+ read_msg_body_data = data_object.gettagvalue ('read_msg_body_data')[0]
+ fldr = data_object.gettagvalue ('fldr')[0]
+ share_type = data_object.gettagvalue ('share_type')[0]
+ addr_book = data_object.gettagvalue ('addr_book')[0]
+ contacts = data_object.gettagvalue ('contacts')
+ emails = data_object.gettagvalue ('emails')
+ #print read_msg_body_data, fldr, share_type, addr_book, contacts, emails
+ return read_msg_body_data, fldr, share_type, addr_book, contacts, emails
+
+
+log('Change Properties','teststart')
+try:
+ read_msg_body_data, fldr, share_type, addr_book, contacts, emails = read_data()
+ windowname = 'dlgFolderProperties'
+ remap('evolution','frmEvolution-Mail')
+ if selectrow ('frmEvolution-Mail','ttblMailFolderTree',fldr) == 1:
+ time.sleep (3)
+ selectmenuitem('frmEvolution-Mail','mnuFolder;mnuProperties')
+ time.sleep(3)
+ waittillguiexist (windowname)
+
+ if read_msg_body_data == 'uncheck':
+ uncheck (windowname, 'chkCopyfoldercontentlocallyforofflineoperation')
+ elif read_msg_body_data == 'check':
+ check (windowname, 'chkCopyfoldercontentlocallyforofflineoperation')
+ else:
+ print 'Data not relevant'
+ log('Check box status not set properly')
+
+ if selecttab (windowname,'ptl0','Sharing') == 1:
+ if share_type == 'shared_with':
+ click (windowname, 'rbtnSharedWith')
+ time.sleep(2)
+ click(windowname,'btnContacts')
+ waittillguiexist('dlgSelectContactsfromAddressBook')
+ time.sleep(2)
+ addcontacts(contacts,emails,addr_book)
+ time.sleep(3)
+ click(windowname,'btnAdd')
+ time.sleep(3)
+ click(windowname,'btnOK')
+ else:
+ print 'Unable to select the specified folder'
+
+except:
+ print 'Unable to modify the properties'
+ log('Unable to modify the properties of the folder'+fldr,'error')
+ log('Change Properties','testend')
+ raise LdtpExecutionError (0)
+log('Change Properties','testend')
+
diff --git a/evolution/change-view.xml b/evolution/change-view.xml
new file mode 100644
index 0000000..5bb91aa
--- /dev/null
+++ b/evolution/change-view.xml
@@ -0,0 +1,9 @@
+<?xml version="1.0"?>
+<data>
+ <read_msg_body_data>check</read_msg_body_data>
+ <fldr>abacd</fldr>
+ <share_type>shared_with</share_type>
+ <addr_book>Personal</addr_book>
+ <contacts>ashwin:venkat</contacts>
+ <emails>wenkat.s@gmail.com:wenkat.s@gmail.com</emails>
+</data>
diff --git a/evolution/change_status.py b/evolution/change_status.py
new file mode 100644
index 0000000..e6fda71
--- /dev/null
+++ b/evolution/change_status.py
@@ -0,0 +1,146 @@
+#
+# Linux Desktop Testing Project http://www.gnomebangalore.org/ldtp
+#
+# Author:
+# Venkateswaran S <wenkat.s@gmail.com>
+#
+# Copyright 2004 Novell, Inc.
+#
+# This test script is free software; you can redistribute it and/or
+# modify it under the terms of the GNU Library General Public
+# License as published by the Free Software Foundation; either
+# version 2 of the License, or (at your option) any later version.
+#
+# This library is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+# Library General Public License for more details.
+#
+# You should have received a copy of the GNU Library General Public
+# License along with this library; if not, write to the
+# Free Software Foundation, Inc., 59 Temple Place - Suite 330,
+# Boston, MA 02111-1307, USA.
+#
+
+# Change status of a mail.
+
+from ldtp import *
+from ldtputils import *
+
+def getrowindex(subject):
+ try:
+ noofchild=getrowcount ('frmEvolution-Mail','ttblMessageList')
+ for ind in range (noofchild):
+ if getcellvalue('frmEvolution-Mail','ttblMessageList',ind,4) == subject:
+ return ind
+ if ind == noofchild-1:
+ log ('Message not present','cause')
+ raise LdtpExecutionError (0)
+ except:
+ log ('Unable to get index of message','error')
+ raise LdtpExecutionError (0)
+
+def insert_followup_details (follow_up_flag, due_date, time, progress):
+ try:
+ print 'inside'
+ log('Insert Follow up details','teststart')
+ windowname = 'dlgFlagtoFollowUp'
+ waittillguiexist (windowname)
+ settextvalue (windowname,'txtFlag',follow_up_flag)
+ settextvalue (windowname,'txtTextDateEntry',due_date)
+ settextvalue (windowname,'txt1',time)
+ if progress == 'completed':
+ check(windowname,'chkCompleted')
+ elif progress == 'not started':
+ uncheck(windowname,'chkCompleted')
+# time.sleep (3)
+ click(windowname,'btnOK')
+ log('Inserted the followup details')
+ print 'Follow up details entered'
+ except:
+ log('Unable to enter the given details','error')
+ print 'Unable to enter the follow up details'
+ log('Insert Follow up details','testend')
+
+
+def read_data():
+
+ data_object = LdtpDataFileParser (datafilename)
+
+ #Extracting imput data from xml file
+ fldr = data_object.gettagvalue ('fldr')[0]
+ subject = data_object.gettagvalue ('subject')[0]
+ status = data_object.gettagvalue ('status')[0]
+ importance = data_object.gettagvalue ('importance')[0]
+ junk_status = data_object.gettagvalue ('junk_status')[0]
+ follow_up_flag = data_object.gettagvalue ('follow_up_flag')[0]
+ due_date = data_object.gettagvalue ('due_date')[0]
+ time = data_object.gettagvalue ('time')[0]
+ progress = data_object.gettagvalue ('progress')[0]
+ print fldr, subject, status, importance, junk_status, follow_up_flag, due_date, time, progress
+ return fldr, subject, status, importance, junk_status, follow_up_flag, due_date, time, progress
+
+def change_status(fldr, subject, status, importance, junk_status, follow_up_flag, due_date, time, progress):
+ try:
+ log('Change status of mails','teststart')
+ windowname = 'dlgFlagtoFollowUp'
+ remap('evolution','frmEvolution-Mail')
+ if selectrowpartialmatch ('frmEvolution-Mail','ttblMailFolderTree',fldr) == 1:
+# time.sleep(2)
+ log('Folder identified','info')
+ Row_index = getrowindex(subject)
+ print Row_index
+ # 0,2 are the colmn no.s denote the status, importance of the mails.
+ cur_status = getcellvalue('frmEvolution-Mail','ttblMessageList',int(Row_index),0)
+ cur_importance = getcellvalue('frmEvolution-Mail','ttblMessageList',int(Row_index),2)
+ if selectrowindex('frmEvolution-Mail','ttblMessageList',int(Row_index)) == 1:
+ print status,cur_status
+ if status == 'read' and int(cur_status) == 0:
+ selectmenuitem('frmEvolution-Mail','mnuMessage;mnuMarkas;mnuRead')
+ print 'Mail marked as read'
+ log('Mail marked as read','info')
+ elif status == 'read' and int(cur_status) == 1:
+ print 'Mail Already read, no modifications are made'
+ log('Mail Already read, no modifications are made','info')
+ elif status == 'unread' and int(cur_status) == 1:
+ selectmenuitem('frmEvolution-Mail','mnuMessage;mnuMarkas;mnuUnread')
+ print 'Status changed to unread'
+ log('Status changed to unread','info')
+ elif status == 'unread' and int(cur_status) == 0:
+ print 'Mail not read, hence no modifications done'
+ log('Mail not read, hence no modifications done','info')
+
+ if importance == 'important' and cur_importance == '1':
+ print 'The mail is already marked as important'
+ log('The mail is already important','info')
+ elif importance == 'important' and cur_importance == '0':
+ selectmenuitem('frmEvolution-Mail','mnuMessage;mnuMarkas;mnuImportant')
+ print 'Mail has been marked as important'
+ log('Mail has been marked as important','info')
+ elif importance == 'unimportant' and cur_importance == '0':
+ print 'The mail is already marked as unimportant'
+ log('The mail is already unimportant','info')
+ elif importance == 'unimportant' and cur_importance == '1':
+ selectmenuitem('frmEvolution-Mail','mnuMessage;mnuMarkas;mnuUnimportant')
+ print 'Mail has been marked as unimportant'
+ log('Mail has been marked as unimportant','info')
+
+ selectmenuitem('frmEvolution-Mail','mnuMessage;mnuMarkas;mnuFollowUp')
+# time.sleep(3)
+ insert_followup_details(follow_up_flag, due_date, time, progress)
+ print 'The status has been modified'
+ else:
+ print 'Verify the given row index'
+ log('Verify the row index specified','error')
+ else:
+ print 'Check the folder name specified'
+ log('Check the folder name specified','error')
+ except:
+ print 'Unable to change the status of the message'
+ log('Unable to change the status of the message','error')
+ log('Change status of mails','testend')
+ raise LdtpExecutionError (0)
+ log('Change status of mails','testend')
+
+fldr, subject, status, importance, junk_status, follow_up_flag, due_date, time, progress = read_data()
+change_status(fldr, subject, status, importance, junk_status, follow_up_flag, due_date, time, progress)
diff --git a/evolution/change_status.xml b/evolution/change_status.xml
new file mode 100644
index 0000000..11cb3d6
--- /dev/null
+++ b/evolution/change_status.xml
@@ -0,0 +1,12 @@
+<?xml version="1.0"?>
+<data>
+ <fldr>Inbox</fldr>
+ <subject>Welcome to Evolution!</subject>
+ <status>unread</status>
+ <importance>important</importance>
+ <junk_status>junk</junk_status>
+ <follow_up_flag>Call</follow_up_flag>
+ <due_date>12/15/2005</due_date>
+ <time>11:00 AM</time>
+ <progress>completed</progress>
+</data>
diff --git a/evolution/changelanginspellcheck.py b/evolution/changelanginspellcheck.py
new file mode 100644
index 0000000..875d737
--- /dev/null
+++ b/evolution/changelanginspellcheck.py
@@ -0,0 +1,27 @@
+#!/usr/bin/env python
+#
+# Linux Desktop Testing Project http://www.gnomebangalore.org/ldtp
+#
+# Author:
+# Prashanth Mohan <prashmohan@gmail.com>
+#
+# Copyright 2004 Novell, Inc.
+#
+# This test script is free software; you can redistribute it and/or
+# modify it under the terms of the GNU Library General Public
+# License as published by the Free Software Foundation; either
+# version 2 of the License, or (at your option) any later version.
+#
+# This library is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+# Library General Public License for more details.
+#
+# You should have received a copy of the GNU Library General Public
+# License along with this library; if not, write to the
+# Free Software Foundation, Inc., 59 Temple Place - Suite 330,
+# Boston, MA 02111-1307, USA.
+#
+from composerprefs import *
+
+changelanginspellcheck()
diff --git a/evolution/checkaddbookrdonly.py b/evolution/checkaddbookrdonly.py
new file mode 100644
index 0000000..8d247a7
--- /dev/null
+++ b/evolution/checkaddbookrdonly.py
@@ -0,0 +1,38 @@
+#!/usr/bin/env python
+#
+# Linux Desktop Testing Project http://www.gnomebangalore.org/ldtp
+#
+# Author:
+# Prashanth Mohan <prashmohan@gmail.com>
+#
+# Copyright 2004 Novell, Inc.
+#
+# This test script is free software; you can redistribute it and/or
+# modify it under the terms of the GNU Library General Public
+# License as published by the Free Software Foundation; either
+# version 2 of the License, or (at your option) any later version.
+#
+# This library is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+# Library General Public License for more details.
+#
+# You should have received a copy of the GNU Library General Public
+# License along with this library; if not, write to the
+# Free Software Foundation, Inc., 59 Temple Place - Suite 330,
+# Boston, MA 02111-1307, USA.
+#
+
+from contact import addcontact,getcontactvals
+
+log ('Contact addition disabled on offline server address book','teststart')
+
+flag=1
+try:
+ addcontact (getcontactvals(datafilename))
+except:
+ log ('Contact addition disabled on offline server address book','testend')
+ flag=0
+if flag==1:
+ log ('Contact Addition is enabled','error')
+ log ('Contact addition disabled on offline server address book','testend')
diff --git a/evolution/checkheaders.py b/evolution/checkheaders.py
new file mode 100644
index 0000000..d0a9645
--- /dev/null
+++ b/evolution/checkheaders.py
@@ -0,0 +1,39 @@
+#!/usr/bin/env python
+#
+# Linux Desktop Testing Project http://www.gnomebangalore.org/ldtp
+#
+# Author:
+# Prashanth Mohan <prashmohan@gmail.com>
+#
+# Copyright 2004 Novell, Inc.
+#
+# This test script is free software; you can redistribute it and/or
+# modify it under the terms of the GNU Library General Public
+# License as published by the Free Software Foundation; either
+# version 2 of the License, or (at your option) any later version.
+#
+# This library is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+# Library General Public License for more details.
+#
+# You should have received a copy of the GNU Library General Public
+# License along with this library; if not, write to the
+# Free Software Foundation, Inc., 59 Temple Place - Suite 330,
+# Boston, MA 02111-1307, USA.
+#
+
+
+from mailtests import *
+
+try:
+ data_object = LdtpDataFileParser (datafilename)
+ ref_image=data_object.gettagvalue ('ref_image')
+except:
+ log ('Could not read values for show/hide headers test','cause')
+ raise LdtpExecutionError (0)
+try:
+ checkheaders (ref_image[0])
+except:
+ log ('show headers test failed','error')
+ raise LdtpExecutionError (0)
diff --git a/evolution/checkheaders.xml b/evolution/checkheaders.xml
new file mode 100644
index 0000000..710c849
--- /dev/null
+++ b/evolution/checkheaders.xml
@@ -0,0 +1,4 @@
+<?xml version="1.0"?>
+<data>
+ <ref_image>IMAGES/test_fields.png</ref_image>
+</data>
diff --git a/evolution/chk_file_new.py b/evolution/chk_file_new.py
new file mode 100644
index 0000000..346e93f
--- /dev/null
+++ b/evolution/chk_file_new.py
@@ -0,0 +1,232 @@
+#!/usr/bin/env python
+#
+# Linux Desktop Testing Project http://www.gnomebangalore.org/ldtp
+#
+# Author:
+# Venkateswaran S <wenkat.s@gmail.com>
+#
+# Copyright 2004 Novell, Inc.
+#
+# This test script is free software; you can redistribute it and/or
+# modify it under the terms of the GNU Library General Public
+# License as published by the Free Software Foundation; either
+# version 2 of the License, or (at your option) any later version.
+#
+# This library is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+# Library General Public License for more details.
+#
+# You should have received a copy of the GNU Library General Public
+# License along with this library; if not, write to the
+# Free Software Foundation, Inc., 59 Temple Place - Suite 330,
+# Boston, MA 02111-1307, USA.
+#
+# to verify all the items in the mnuFile;mnuNew
+
+from ldtp import *
+from ldtputils import *
+
+new_items = ['Mail Message','Mail Folder','All Day Appointment','Appointment','Assigned Task','Contact','Contact List','Meeting','Memo','Task','Address Book','Calendar','Memo List','Task List','New Window']
+
+def chk_new_items():
+
+ try:
+ log('Verify all items in the mnuNew','teststart')
+ noofitems = 15
+ new_items = ['Mail Message','Mail Folder','All Day Appointment','Appointment','Assigned Task','Contact','Contact List','Meeting','Memo','Task','Address Book','Calendar','Memo List','Task List','New Window']
+ for i in range(0, noofitems-1):
+
+ mnuitem,windowname = assign_var(i)
+ if selectmenuitem('frmEvolution-Mail','mnuFile;mnuNew;mnu'+mnuitem) == 1:
+ time.sleep(3)
+ close_win(i,windowname)
+ except:
+ print 'Must be problem with ' + new_items[i]
+ log('Must be problem with ' + new_items[i] , 'cause')
+ print 'Some windows failed to open in menu file;new'
+ log('Verify all items in the mnuNew','testend')
+ raise LdtpExecutionError (0)
+ log('Verify all items in the mnuNew','testend')
+
+def assign_var(i):
+
+ if new_items[i] == 'Mail Message':
+ mnuitem = 'MailMessage'
+ windowname = 'frmComposeamessage'
+ elif new_items[i] == 'Mail Folder':
+ mnuitem = 'MailFolder'
+ windowname = 'dlgCreatefolder'
+ elif new_items[i] == 'All Day Appointment':
+ mnuitem = 'AllDayAppointment'
+ windowname = 'frmAppointment-Nosummary'
+ elif new_items[i] == 'Appointment':
+ mnuitem = 'Appointment'
+ windowname = 'frmAppointment-Nosummary'
+ elif new_items[i] == 'Assigned Task':
+ mnuitem = 'AssignedTask'
+ windowname = 'frmAssignedTask-Nosummary'
+ elif new_items[i] == 'Contact':
+ mnuitem = 'Contact'
+ windowname = 'dlgContactEditor'
+ elif new_items[i] == 'Contact List':
+ mnuitem = 'ContactList'
+ windowname = 'dlgContactListEditor'
+ elif new_items[i] == 'Meeting':
+ mnuitem = 'Meeting'
+ windowname = 'frmMeeting-Nosummary'
+ elif new_items[i] == 'Memo':
+ mnuitem = 'Memo'
+ windowname = 'frmJournalentry-Nosummary'
+ elif new_items[i] == 'Task':
+ mnuitem = 'Task'
+ windowname = 'frmTask-Nosummary'
+ elif new_items[i] == 'Address Book':
+ mnuitem = 'AddressBook'
+ windowname = 'dlgNewAddressBook'
+ elif new_items[i] == 'Calendar':
+ mnuitem = 'Calendar'
+ windowname = 'dlgTaskListProperties'
+ setcontext('Task List Properties','New Calendar')
+ elif new_items[i] == 'Memo List':
+ mnuitem = 'Memolist'
+ windowname = 'dlgTaskListProperties'
+ elif new_items[i] == 'Task List':
+ mnuitem = 'Tasklist'
+ windowname = 'dlgTaskListProperties'
+ return mnuitem,windowname
+
+def close_win(i,windowname):
+
+ if new_items[i] == 'Mail Message':
+ if waittillguiexist(windowname) == 1:
+ print new_items[i] + ' Working'
+ log(new_items[i] + ' Working','info')
+ selectmenuitem(windowname,'mnuFile;mnuClose')
+ else:
+ print new_items[i] + ' Not Working'
+ log(new_items[i] + 'Not Working','info')
+ raise LdtpExecutionError (0)
+ elif new_items[i] == 'Mail Folder':
+ if waittillguiexist(windowname) == 1:
+ print new_items[i] + ' Working'
+ log(new_items[i] + ' Working','info')
+ click(windowname,'btnCancel')
+ else:
+ print new_items[i] + ' Not Working'
+ log(new_items[i] + 'Not Working','info')
+ raise LdtpExecutionError (0)
+ elif new_items[i] == 'All Day Appointment':
+ if waittillguiexist(windowname) == 1:
+ print new_items[i] + ' Working'
+ log(new_items[i] + ' Working','info')
+ click(windowname,'btnClose')
+ else:
+ print new_items[i] + ' Not Working'
+ log(new_items[i] + 'Not Working','info')
+ raise LdtpExecutionError (0)
+ elif new_items[i] == 'Appointment':
+ if waittillguiexist(windowname) == 1:
+ print new_items[i] + ' Working'
+ log(new_items[i] + ' Working','info')
+ click(windowname,'btnClose')
+ else:
+ print new_items[i] + ' Not Working'
+ log(new_items[i] + 'Not Working','info')
+ raise LdtpExecutionError (0)
+ elif new_items[i] == 'Assigned Task':
+ if waittillguiexist(windowname) == 1:
+ print new_items[i] + ' Working'
+ log(new_items[i] + ' Working','info')
+ click(windowname,'btnClose')
+ else:
+ print new_items[i] + ' Not Working'
+ log(new_items[i] + 'Not Working','info')
+ raise LdtpExecutionError (0)
+ elif new_items[i] == 'Contact':
+ if waittillguiexist(windowname) == 1:
+ print new_items[i] + ' Working'
+ log(new_items[i] + ' Working','info')
+ click(windowname,'btnCancel')
+ else:
+ print new_items[i] + ' Not Working'
+ log(new_items[i] + 'Not Working','info')
+ raise LdtpExecutionError (0)
+ elif new_items[i] == 'Contact List':
+ if waittillguiexist(windowname) == 1:
+ print new_items[i] + ' Working'
+ log(new_items[i] + ' Working','info')
+ click(windowname,'btnCancel')
+ else:
+ print new_items[i] + ' Not Working'
+ log(new_items[i] + 'Not Working','info')
+ raise LdtpExecutionError (0)
+ elif new_items[i] == 'Meeting':
+ if waittillguiexist(windowname) == 1:
+ print new_items[i] + ' Working'
+ log(new_items[i] + ' Working','info')
+ click(windowname,'btnClose')
+ else:
+ print new_items[i] + ' Not Working'
+ log(new_items[i] + 'Not Working','info')
+ raise LdtpExecutionError (0)
+ elif new_items[i] == 'Memo':
+ if waittillguiexist(windowname) == 1:
+ print new_items[i] + ' Working'
+ log(new_items[i] + ' Working','info')
+ click(windowname,'btnClose')
+ else:
+ print new_items[i] + ' Not Working'
+ log(new_items[i] + 'Not Working','info')
+ raise LdtpExecutionError (0)
+ elif new_items[i] == 'Task':
+ if waittillguiexist(windowname) == 1:
+ print new_items[i] + ' Working'
+ log(new_items[i] + ' Working','info')
+ click(windowname,'btnClose')
+ else:
+ print new_items[i] + ' Not Working'
+ log(new_items[i] + 'Not Working','info')
+ raise LdtpExecutionError (0)
+ elif new_items[i] == 'Address Book':
+ if waittillguiexist(windowname) == 1:
+ print new_items[i] + ' Working'
+ log(new_items[i] + ' Working','info')
+ click(windowname,'btnCancel')
+ else:
+ print new_items[i] + ' Not Working'
+ log(new_items[i] + 'Not Working','info')
+ raise LdtpExecutionError (0)
+ elif new_items[i] == 'Calendar':
+ setcontext('Task List Properties','New Calendar')
+ if waittillguiexist(windowname) == 1:
+ print new_items[i] + ' Working'
+ log(new_items[i] + ' Working','info')
+ click(windowname,'btnCancel')
+ else:
+ print new_items[i] + ' Not Working'
+ log(new_items[i] + 'Not Working','info')
+ raise LdtpExecutionError (0)
+ releasecontext()
+ elif new_items[i] == 'Memo List':
+ setcontext('Task List Properties','New Memo List')
+ if waittillguiexist(windowname) == 1:
+ print new_items[i] + ' Working'
+ log(new_items[i] + ' Working','info')
+ click(windowname,'btnCancel')
+ else:
+ print new_items[i] + ' Not Working'
+ log(new_items[i] + 'Not Working','info')
+ raise LdtpExecutionError (0)
+ releasecontext()
+ elif new_items[i] == 'Task List':
+ if waittillguiexist(windowname) == 1:
+ print new_items[i] + ' Working'
+ log(new_items[i] + ' Working','info')
+ click(windowname,'btnCancel')
+ else:
+ print new_items[i] + ' Not Working'
+ log(new_items[i] + 'Not Working','info')
+ raise LdtpExecutionError (0)
+
+chk_new_items()
diff --git a/evolution/closecomposewindow.py b/evolution/closecomposewindow.py
new file mode 100644
index 0000000..d4d563c
--- /dev/null
+++ b/evolution/closecomposewindow.py
@@ -0,0 +1,45 @@
+#!/usr/bin/env python
+#
+# Linux Desktop Testing Project http://www.gnomebangalore.org/ldtp
+#
+# Author:
+# Prashanth Mohan <prashmohan@gmail.com>
+#
+# Copyright 2004 Novell, Inc.
+#
+# This test script is free software; you can redistribute it and/or
+# modify it under the terms of the GNU Library General Public
+# License as published by the Free Software Foundation; either
+# version 2 of the License, or (at your option) any later version.
+#
+# This library is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+# Library General Public License for more details.
+#
+# You should have received a copy of the GNU Library General Public
+# License along with this library; if not, write to the
+# Free Software Foundation, Inc., 59 Temple Place - Suite 330,
+# Boston, MA 02111-1307, USA.
+#
+
+
+from mailtests import *
+
+try:
+ data_object = LdtpDataFileParser (datafilename)
+ state=data_object.gettagvalue ('state')
+except:
+ log ('Could not read values for close compose window test','cause')
+ raise LdtpExecutionError (0)
+try:
+ time.sleep (3)
+ selectmenuitem ('frmEvolution-Mail','mnuFile;mnuNew;mnuMailMessage')
+ waittillguiexist ('frmComposeamessage')
+ settextvalue ('frmComposeamessage','txt6','abc')
+ closecomposewindow (int(state[0]))
+except:
+ log ('Close compose window failed','error')
+ raise LdtpExecutionError (0)
+
+
diff --git a/evolution/closecomposewindow.xml b/evolution/closecomposewindow.xml
new file mode 100644
index 0000000..53743af
--- /dev/null
+++ b/evolution/closecomposewindow.xml
@@ -0,0 +1,4 @@
+<?xml version="1.0"?>
+<data>
+ <state>2</state>
+</data>
diff --git a/evolution/compose-mail-withouthtml.py b/evolution/compose-mail-withouthtml.py
new file mode 100644
index 0000000..e8f7479
--- /dev/null
+++ b/evolution/compose-mail-withouthtml.py
@@ -0,0 +1,48 @@
+#!/usr/bin/env python
+
+from evoutils.mail import *
+from evoutils.composemail import *
+from evoutils.mailpreferences import *
+
+
+def send_HTML_to_HTMLrecepient(datafilename):
+ log ('Send HTML mail to a recepient who wants HTML mails','teststart')
+ try:
+ to, subject, body, cc, attachment, sentitemsfolder, refimg = read_maildata (datafilename)
+ if get_HTML_pref(to[0])==1:
+ composemail (to, subject, body, cc, attachment, sentitemsfolder, refimg,['HTML'])
+ else:
+ log ('User does not want HTML mail','cause')
+ raise LdtpExecutionError(0)
+ except:
+ log ('Sending HTML mail to HTML recepient failed','error')
+ log ('Send HTML mail to a recepient who wants HTML mails','testend')
+ raise LdtpExecutionError(0)
+ log ('Send HTML mail to a recepient who wants HTML mails','testend')
+
+
+def send_HTML_to_NonHTMLrecepient(datafilename):
+ log ('Send HTML mail to a recepient who does not want HTML mails','teststart')
+ try:
+ to, subject, body, cc, attachment, sentitemsfolder, refimg = read_maildata (datafilename)
+ if get_HTML_pref(to[0])==0:
+ composemail (to, subject, body, cc, attachment, sentitemsfolder, refimg,['HTML'])
+ else:
+ log ('User wants HTML mail','cause')
+ raise LdtpExecutionError(0)
+ except:
+ log ('Sending HTML mail to NonHTML recepient failed','error')
+ log ('Send HTML mail to a recepient who does not want HTML mails','testend')
+ raise LdtpExecutionError(0)
+ log ('Send HTML mail to a recepient who does not want HTML mails','testend')
+
+def send_plaintext(datafile):
+ log ('Send Plain Text Mail','teststart')
+ try:
+ to, subject, body, cc, attachment, sentitemsfolder, refimg = read_maildata (datafilename)
+ composemail (to, subject, body, cc, attachment, sentitemsfolder, refimg,['Plain Text'])
+ except:
+ log ('Could not send plain text mail','error')
+ log ('Send Plain Text Mail','testend')
+ raise LdtpExecutionError (0)
+ log ('Send Plain Text Mail','testend')
diff --git a/evolution/compose_mail.py b/evolution/compose_mail.py
new file mode 100755
index 0000000..387e951
--- /dev/null
+++ b/evolution/compose_mail.py
@@ -0,0 +1,91 @@
+#
+# Linux Desktop Testing Project http://www.gnomebangalore.org/ldtp
+#
+# Authors:
+# Khasim Shaheed <khasim.shaheed@gmail.com>
+#
+# Copyright 2004 Novell, Inc.
+#
+# This library is free software; you can redistribute it and/or
+# modify it under the terms of the GNU Library General Public
+# License as published by the Free Software Foundation; either
+# version 2 of the License, or (at your option) any later version.
+#
+# This library is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+# Library General Public License for more details.
+#
+# You should have received a copy of the GNU Library General Public
+# License along with this library; if not, write to the
+# Free Software Foundation, Inc., 59 Temple Place - Suite 330,
+# Boston, MA 02111-1307, USA.
+#
+
+# Compose a new mail through File menu
+from evoutils.mail import *
+from evoutils.composemail import *
+from evoutils.mailpreferences import *
+from contact import *
+
+# Section to compose a new mail through File menu
+def compose_mail (to, subject, body, cc, bcc, attachment, sentitemsfolder, refimg):
+ try:
+ #selectMailPane()
+ if sentitemsfolder:
+ sent_folder = sentitemsfolder[0]
+ else:
+ sent_folder = 'Sent'
+
+ #remap ('evolution','frmEvolution-Mail')
+ selectrowpartialmatch ('frmEvolution-Mail', 'ttblMailFolderTree', sent_folder)
+ time.sleep (2)
+ #undoremap ('evolution','frmEvolution-Mail')
+ #remap ('evolution','frmEvolution-Mail')
+ sent_mail_count = getrowcount ('frmEvolution-Mail', 'ttblMessageList')
+ #undoremap ('evolution','frmEvolution-Mail')
+ compose (to, subject, body, cc,bcc, attachment)
+ sendmail (subject)
+ click ('frmEvolution-Mail', 'btnSend/Receive')
+ waittillguinotexist ('dlgSend&ReceiveMail')
+ #remap ('evolution','frmEvolution-Mail')
+ if verifymailwithimage (sent_folder, sent_mail_count, refimg) == 1:
+ log ('Compose new message', 'pass')
+ else:
+ log ('Compose new message', 'fail')
+
+ ## check if To and CC are empty with only BCC field having values
+ if len (to)==0 and len (cc)==0:
+ sub=getcellvalue ('frmEvolution-Mail','ttblMessageList',sent_mail_count,4)
+ if body[0].startswith (sub)==1:
+ log ('Message without To and cc contains first line of message as subject','pass')
+ else:
+ log ('Message without To and cc contains first line of message as subject','fail')
+
+ ## check if attachment is received properly
+# selectitem () not implemented properly in LDTP. uncomment following lines whe resolved
+# if len (attachment)>0:
+# setcontext ('Readonlyframe', subject)
+# selectmenuitem ('frmEvolution-Mail', 'mnuMessage;mnuOpeninNewWindow')
+# time.sleep (1)
+# if waittillguiexist ('frmReadonly') == 0:
+# log ('Readonlyframe failed to open', 'cause')
+# raise LdtpExecutionError (0)
+
+# activatewin (subject)
+# time.sleep (1)
+# try:
+# for x in attachment[0]:
+# selectitem ('frmReadonly','paneAttachmentBar',x)
+# releasecontext()
+# except:
+# log ('attachments not received properly','error')
+# raise LdtpExecutionError (0)
+
+ #undoremap ('evolution','frmEvolution-Mail')
+
+ except ldtp.error, msg:
+ log ('Compose new message failed ' + str (msg), 'cause')
+ log ('Compose message failed', 'fail')
+ raise LdtpExecutionError (0)
+
diff --git a/evolution/composerprefs.py b/evolution/composerprefs.py
new file mode 100644
index 0000000..0b7c553
--- /dev/null
+++ b/evolution/composerprefs.py
@@ -0,0 +1,566 @@
+#!/usr/bin/env python
+#
+# Linux Desktop Testing Project http://www.gnomebangalore.org/ldtp
+#
+# Author:
+# Prashanth Mohan <prashmohan@gmail.com>
+#
+# Copyright 2004 Novell, Inc.
+#
+# This test script is free software; you can redistribute it and/or
+# modify it under the terms of the GNU Library General Public
+# License as published by the Free Software Foundation; either
+# version 2 of the License, or (at your option) any later version.
+#
+# This library is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+# Library General Public License for more details.
+#
+# You should have received a copy of the GNU Library General Public
+# License along with this library; if not, write to the
+# Free Software Foundation, Inc., 59 Temple Place - Suite 330,
+# Boston, MA 02111-1307, USA.
+#
+
+from ldtp import *
+from ldtputils import *
+from mailtests import closecomposewindow
+from contact import *
+from evoutils.mail import *
+
+def addnewsignature(name,text):
+ log ('Add New Signature','teststart')
+ try:
+ #selectMailPane()
+ try:
+ selectmenuitem ('frmEvolution-Mail','mnuEdit;mnuPreferences')
+ window_id='dlgEvolutionSettings'
+ waittillguiexist (window_id)
+ time.sleep (1)
+ selecttab ('dlgEvolutionSettings', 'ptl0', 'Composer Preferences')
+ time.sleep (1)
+ #remap ('evolution',window_id)
+ selecttab ('dlgEvolutionSettings', 'ptl2','Signatures')
+ #undoremap ('evolution',window_id)
+ time.sleep (1)
+ #remap ('evolution',window_id)
+ click (window_id,'btnAdd2')
+ waittillguiexist ('frmEditsignature')
+ time.sleep (1)
+ except:
+ log ('Unable to open Edit Signature window','cause')
+ raise LdtpExecutionError (0)
+ fillinsignaturevalues(name,text)
+ time.sleep (2)
+ #verification code
+ #verifysignature (name,text)
+ num=getrowcount (window_id,'tblSignatures')
+ flag=0
+ for x in range (num):
+ if getcellvalue (window_id,'tblSignatures',x,0) == name:
+ flag=1
+ break
+ if flag==1:
+ log ('Signature added successfully','info')
+ else:
+ log ('Signature not added succcessfully','cause')
+ raise LdtpExecutionError (0)
+ # except:
+ #undoremap ('evolution',window_id)
+ except:
+ log ('Add New Signature failed','error')
+ log ('Add New Signature','testend')
+ raise LdtpExecutionError (0)
+ log ('Add New Signature','testend')
+
+
+def fillinsignaturevalues (name,text):
+ try:
+ window_id='frmEditsignature'
+ settextvalue (window_id,'txt0',name)
+ settextvalue (window_id,'txt1',text)
+ time.sleep (1)
+ click (window_id,'btnSaveandClose')
+ waittillguinotexist (window_id)
+ except:
+ log ('Unable to fill in values for signature','cause')
+ raise LdtpExecutionError (0)
+
+def verifysignature (name,text):
+ window_id='dlgEvolutionSettings'
+ try:
+ selectrow (window_id,'tblSignatures',name)
+ except:
+ log ('Signature not added','cause')
+ raise LdtpExecutionError (0)
+ try:
+ time.sleep (1)
+ click (window_id,'btnEdit2')
+ waittillguiexist ('frmEditsignature')
+ if verifysettext ('frmEditSignature','txt0',name) ==0:
+ log ('Name not set properly','cause')
+ raise LdtpExecutionError (0)
+ if verifysettext ('frmEditSignature','txt1',text) == 0:
+ log ('text not set properly','cause')
+ raise LdtpExecutionError (0)
+ except:
+ log ('Signature not set properly','error')
+ raise LdtpExecutionError (0)
+
+
+def edit_signature (name,text,newname=''):
+ log ('Edit Signature','teststart')
+ try:
+ #selectMailPane()
+ try:
+ selectmenuitem ('frmEvolution-Mail','mnuEdit;mnuPreferences')
+ window_id='dlgEvolutionSettings'
+ waittillguiexist (window_id)
+ time.sleep (1)
+ selecttab ('dlgEvolutionSettings', 'ptl0', 'Composer Preferences')
+ time.sleep (1)
+ remap ('evolution',window_id)
+ selecttab ('dlgEvolutionSettings', 'ptl2','Signatures')
+ undoremap ('evolution',window_id)
+ time.sleep (1)
+ remap ('evolution',window_id)
+ try:
+ selectrow ('dlgEvolutionSettings','tblSignatures',name)
+ except:
+ log ('signature not present','cause')
+ raise LdtpExecutionError (0)
+ click (window_id,'btnEdit2')
+ waittillguiexist ('frmEditsignature')
+ time.sleep (1)
+ except:
+ log ('Unable to open Edit Signature window','cause')
+ raise LdtpExecutionError (0)
+ if newname !='':
+ name=newname
+ fillinsignaturevalues(name,text)
+
+ verifysignature (name,text)
+ except:
+ log ('Edit Signature failed','error')
+ log ('Edit Signature','testend')
+ raise LdtpExecutionError (0)
+ undoremap ('evolution',window_id)
+ log ('Edit Signature','testend')
+
+
+def removesignature(name):
+ log ('Remove Signature','teststart')
+ try:
+ #selectMailPane()
+ try:
+ selectmenuitem ('frmEvolution-Mail','mnuEdit;mnuPreferences')
+ window_id='dlgEvolutionSettings'
+ waittillguiexist (window_id)
+ time.sleep (1)
+ selecttab (window_id, 'ptl0', 'Composer Preferences')
+ time.sleep (1)
+ remap ('evolution',window_id)
+ selecttab (window_id, 'ptl2','Signatures')
+ undoremap ('evolution',window_id)
+ time.sleep (1)
+ remap ('evolution',window_id)
+ try:
+ selectrow (window_id,'tblSignatures',name)
+ except:
+ log ('signature not present','cause')
+ raise LdtpExecutionError (0)
+ time.sleep (1)
+ click (window_id,'btnRemove2')
+ except:
+ log ('Unable to remove signature','cause')
+ raise LdtpExecutionError (0)
+
+ try:
+ #verification
+ num=getrowcount (window_id,'tblSignatures')
+ flag=0
+ for x in range (num):
+ if getcellvalue (window_id,'tblSignatures',x,0) == name:
+ flag=1
+ break
+ if flag==1:
+ log ('Signature not removed','cause')
+ raise LdtpExecutionError (0)
+ else:
+ log ('Signature removed succcessfully','cause')
+ except:
+ log ('Remove signature verification failed','error')
+ raise LdtpExecutionError (0)
+ except:
+ log ('Remove signature failed','error')
+ log ('Remove Signature','testend')
+ raise LdtpExecutionError (0)
+ undoremap ('evolution',window_id)
+ log ('Remove Signature','testend')
+
+def format_in_HTML ():
+ log ('format messages in HTML','teststart')
+ try:
+ to='abc@abc.com'
+ text='aaaa'
+ #selectMailPane()
+ try:
+ selectmenuitem ('frmEvolution-Mail','mnuEdit;mnuPreferences')
+ window_id='dlgEvolutionSettings'
+ waittillguiexist (window_id)
+ time.sleep (1)
+ selecttab (window_id, 'ptl0', 'Composer Preferences')
+ time.sleep (1)
+ remap ('evolution',window_id)
+ #selecttab (window_id, 'ptl2','General')
+ check (window_id,'chkFormatmessagesinHTML')
+ time.sleep (1)
+ if verifycheck (window_id,'chkFormatmessagesinHTML')==0:
+ log ('Checkbox not checked','cause')
+ raise LdtpExecutionError (0)
+ except:
+ log ('Unable to select HTML formatting','error')
+ raise LdtpExecutionError (0)
+
+ click (window_id,'btnClose')
+ undoremap ('evolution',window_id)
+ #verification
+
+ try:
+ selectmenuitem ('frmEvolution-Mail','mnuFile;mnuNew;mnuMailMessage')
+ waittillguiexist ('frmComposeamessage')
+ settextvalue ('frmComposeamessage','txtTo',to)
+ settextvalue ('frmComposeamessage','txt6',text)
+ settextvalue ('frmComposeamessage','txtSubject','Test for HTML formatting')
+ setcontext ('Compose a message','Test for HTML formatting')
+ click ('frmComposeamessage','btnSend')
+ time.sleep (2)
+ if guiexist ('dlgEvolutionQuery') != 1:
+ log ('Warning for HTML formatting did not come up','cause')
+ raise LdtpExecutionError (0)
+ remap ('evolution','dlgEvolutionQuery')
+ click ('dlgEvolutionQuery','btnCancel')
+ closecomposewindow (0)
+ except:
+ log ('Verification Failed','error')
+ raise LdtpExecutionError (0)
+
+ #undo setting HTML formatting
+ try:
+
+ selectmenuitem ('frmEvolution-Mail','mnuEdit;mnuPreferences')
+ window_id='dlgEvolutionSettings'
+ waittillguiexist (window_id)
+ time.sleep (1)
+ selecttab (window_id, 'ptl0', 'Composer Preferences')
+ time.sleep (1)
+ remap ('evolution',window_id)
+ #selecttab (window_id, 'ptl2','General')
+ uncheck (window_id,'chkFormatmessagesinHTML')
+ except:
+ log ('Unable to unselect HTML formatting','error')
+ raise LdtpExecutionError (0)
+
+ click (window_id,'btnClose')
+ undoremap ('evolution',window_id)
+ except:
+ log ('setting default HTML formatting failed','error')
+ log ('format messages in HTML','testend')
+ raise LdtpExecutionError (0)
+ log ('format messages in HTML','testend')
+
+
+def changelanginspellcheck():
+ log ('Enable languages in Composer preferences for spell check','teststart')
+ try:
+ time.sleep (3)
+ #selectMailPane()
+ try:
+ selectmenuitem ('frmEvolution-Mail','mnuEdit;mnuPreferences')
+ window_id='dlgEvolutionSettings'
+ waittillguiexist (window_id)
+ time.sleep (1)
+ selecttab (window_id, 'ptl0', 'Composer Preferences')
+ time.sleep (1)
+ remap ('evolution',window_id)
+ selecttab (window_id, 'ptl2','Spell Checking')
+ noofrows=getrowcount ('dlgEvolutionSettings','tblLanguages')
+ langs = []
+ for x in range (noofrows):
+ checkrow ('dlgEvolutionSettings','tblLanguages',x,0)
+ langs.append (getcellvalue ('dlgEvolutionSettings','tblLanguages',x,1))
+ click ('dlgEvolutionSettings','btnClose')
+ except:
+ log ('Unable to select languages','cause')
+ raise LdtpExecutionError (0)
+
+ #verification
+ try:
+ selectmenuitem ('frmEvolution-Mail','mnuFile;mnuNew;mnuMailMessage')
+ waittillguiexist ('frmComposeamessage')
+ settextvalue ('frmComposeamessage','txt6','\nHelo ande wlcme')
+ selectmenuitem ('frmComposeamessage','mnuEdit;mnuSpellCheckDocument')
+ waittillguiexist ('dlgSpellchecker')
+ for lang in langs:
+ try:
+ comboselect ('dlgSpellchecker','cboAddtodictionary',lang)
+ time.sleep (1)
+ except:
+ log ('Unable to select Language which was enabled','cause')
+ raise LdtpExecutionError (0)
+ time.sleep (2)
+ click ('dlgSpellchecker','btnClose')
+ time.sleep (2)
+ closecomposewindow (0)
+ except:
+ log ('verification for select languages failed','error')
+ raise LdtpExecutionError (0)
+ except:
+ log ('Unable to select languages for spell checking','error')
+ log ('Enable languages in Composer preferences for spell check','testend')
+ raise LdtpExecutionError (0)
+ log ('Enable languages in Composer preferences for spell check','testend')
+
+
+def forwardstyle(fldr,subject):
+ log ('Changing forward styles','teststart')
+ try:
+ #selectMailPane()
+ try:
+ selectmenuitem ('frmEvolution-Mail','mnuEdit;mnuPreferences')
+ window_id='dlgEvolutionSettings'
+ waittillguiexist (window_id)
+ time.sleep (1)
+ selecttab (window_id, 'ptl0', 'Composer Preferences')
+ time.sleep (1)
+ remap ('evolution',window_id)
+ for combo in getobjectlist (window_id):
+ if combo in ['cboQuoted','cboAttachment','cboInline']:
+ break
+
+ comboselect (window_id,combo,'Attachment')
+ click (window_id,'btnClose')
+ time.sleep (2)
+ selectrowpartialmatch ('frmEvolution-Mail','ttblMailFolderTree',fldr)
+ time.sleep (2)
+ selectrow ('frmEvolution-Mail','ttblMessageList',subject)
+ setcontext ('Readonlyframe',subject)
+ selectmenuitem ('frmEvolution-Mail','mnuMessage;mnuOpeninNewWindow')
+ waittillguiexist ('frmReadonly')
+ time.sleep (2)
+ text = getsentmailtext ()
+ selectmenuitem ('frmReadonly','mnuFile;mnuClose')
+ waittillguinotexist ('frmReadonly')
+ releasecontext ()
+ click ('frmEvolution-Mail','btnForward')
+ setcontext ('Compose a message','[Fwd: '+subject+']')
+ waittillguiexist ('frmComposeamessage')
+ time.sleep (2)
+ fwdtext=getmailtext ()
+ if fwdtext == '':
+ log ('Forward style - Attachment works fine','info')
+ else:
+ log ('Forward style - Attachment not proper','cause')
+ raise LdtpExecutionError (0)
+
+ selectmenuitem ('frmComposeamessage','mnuFile;mnuClose')
+ waittillguinotexist ('frmComposeamessage')
+ #undoremap ('evolution',window_id)
+ except:
+ log ('Forward style Attachment failed','error')
+ raise LdtpExecutionError (0)
+
+ try:
+ selectmenuitem ('frmEvolution-Mail','mnuEdit;mnuPreferences')
+ window_id='dlgEvolutionSettings'
+ waittillguiexist (window_id)
+ remap ('evolution',window_id)
+ time.sleep (1)
+ selecttab (window_id, 'ptl0', 'Composer Preferences')
+ time.sleep (1)
+ #undoremap ('evolution',window_id)
+ remap ('evolution',window_id)
+ for combo in getobjectlist (window_id):
+ if combo in ['cboQuoted','cboAttachment','cboInline']:
+ break
+
+ comboselect (window_id,combo,'Inline')
+ click (window_id,'btnClose')
+ click ('frmEvolution-Mail','btnForward')
+ waittillguiexist ('frmComposeamessage')
+ time.sleep (2)
+ fwdtext=getmailtext ()
+# if len (fwdtext)<36:
+# if fwdtext == '-------- Forwarded Message --------'):
+# log ('Forward style - Inline works fine','info')
+# else:
+# log ('Forward style - Inline not proper','cause')
+# raise LdtpExecutionError (0)
+# else:
+# if fwdtext[36:]==text:
+# log ('Forward style - Inline works fine','info')
+# else:
+# log ('Forward style - Inline not proper','cause')
+# raise LdtpExecutionError (0)
+ if fwdtext.find (text) == -1:
+ log ('Forward style - Inline not proper','cause')
+ raise LdtpExecutionError (0)
+ else:
+ log ('Forward style - Inline works fine','info')
+ selectmenuitem ('frmComposeamessage','mnuFile;mnuClose')
+ waittillguinotexist ('frmComposeamessage')
+ releasecontext()
+ #undoremap ('evolution',window_id)
+ except:
+ log ('Forward style Inline failed','error')
+ raise LdtpExecutionError (0)
+
+ except:
+ log ('Attachement style selection failed','error')
+ log ('Changing forward styles','testend')
+ raise LdtpExecutionError (0)
+ log ('Changing forward styles','testend')
+
+
+def prompt_for_empty_subject(to):
+ log ('Prompt for empty subject line','teststart')
+ try:
+ #selectMailPane()
+ try:
+ selectmenuitem ('frmEvolution-Mail','mnuEdit;mnuPreferences')
+ window_id='dlgEvolutionSettings'
+ waittillguiexist (window_id)
+ time.sleep (1)
+ selecttab (window_id, 'ptl0', 'Composer Preferences')
+ time.sleep (1)
+ remap ('evolution',window_id)
+ check (window_id,'chkPromptwhensendingmessageswithanemptysubjectline')
+ time.sleep (1)
+ if verifycheck (window_id,'chkPromptwhensendingmessageswithanemptysubjectline') == 0:
+ log ('Unable to check option','cause')
+ raise LdtpExecutionError (0)
+ click (window_id,'btnClose')
+ waittillguinotexist (window_id)
+ undoremap ('evolution',window_id)
+ except:
+ log ('Unable to Enable prompt for empty subject line','cause')
+ raise LdtpExecutionError (0)
+
+ try:
+ selectmenuitem ('frmEvolution-Mail','mnuFile;mnuNew;mnuMailMessage')
+ waittillguiexist ('frmComposeamessage')
+ settextvalue ('frmComposeamessage','txtTo',to)
+ click ('frmComposeamessage','btnSend')
+ if waittillguiexist ('dlgEvolutionQuery') == 0:
+ log ('Prompt did not appear','cause')
+ raise LdtpExecutionError (0)
+ remap ('evolution','dlgEvolutionQuery')
+ time.sleep (1)
+ click ('dlgEvolutionQuery','btnSend')
+ #undoremap ('evolution','dlgEvolutionQuery')
+ except:
+ log ('Prompting for empty subject line failed for verification','cause')
+ raise LdtpExecutionError (0)
+ except:
+ log ('Enabling Empty subject line failed','error')
+ log ('Prompt for empty subject line','testend')
+ raise LdtpExecutionError (0)
+ log ('Prompt for empty subject line','testend')
+
+
+def prompt_for_only_bcc (to):
+ log ('Prompt for only bcc recepients','teststart')
+ try:
+ #selectMailPane()
+ try:
+ selectmenuitem ('frmEvolution-Mail','mnuEdit;mnuPreferences')
+ window_id='dlgEvolutionSettings'
+ waittillguiexist (window_id)
+ time.sleep (1)
+ selecttab (window_id, 'ptl0', 'Composer Preferences')
+ time.sleep (1)
+ remap ('evolution',window_id)
+ check (window_id,'chkPromptwhensendingmessageswithonlyBccrecipientsdefined')
+ time.sleep (1)
+ if verifycheck (window_id,'chkPromptwhensendingmessageswithonlyBccrecipientsdefined') == 0:
+ log ('Unable to check option','cause')
+ raise LdtpExecutionError (0)
+ click (window_id,'btnClose')
+ waittillguinotexist (window_id)
+ undoremap ('evolution',window_id)
+ except:
+ log ('Unable to Enable prompt for only bcc recepients','cause')
+ raise LdtpExecutionError (0)
+
+ try:
+ selectmenuitem ('frmEvolution-Mail','mnuFile;mnuNew;mnuMailMessage')
+ waittillguiexist ('frmComposeamessage')
+ settextvalue ('frmComposeamessage','txtBcc',to)
+ settextvalue ('frmComposeamessage','txtSubject','Test for prompt for only bcc recepients')
+ setcontext ('Compose a message','Test for prompt for only bcc recepients')
+ click ('frmComposeamessage','btnSend')
+ if waittillguiexist ('dlgEvolutionWarning') == 0:
+ log ('Prompt did not appear','cause')
+ raise LdtpExecutionError (0)
+ remap ('evolution','dlgEvolutionWarning')
+ click ('dlgEvolutionWarning','btnSend')
+ undoremap ('evolution','dlgEvolutionWarning')
+ releasecontext ()
+ except:
+ log ('Prompting for only bcc recepients failed for verification','cause')
+ raise LdtpExecutionError (0)
+ except:
+ log ('Enabling prompt for only bcc recepients failed','error')
+ log ('Prompt for only bcc recepients','testend')
+ raise LdtpExecutionError (0)
+
+ log ('Prompt for only bcc recepients','testend')
+
+
+def prompt_when_expunging(fldr):
+ log ('Check for Prompting when expunging','teststart')
+ try:
+ #selectMailPane()
+ try:
+ selectmenuitem ('frmEvolution-Mail','mnuEdit;mnuPreferences')
+ window_id='dlgEvolutionSettings'
+ waittillguiexist (window_id)
+ time.sleep (1)
+ selecttab (window_id, 'ptl0', 'Mail Preferences')
+ time.sleep (1)
+ remap ('evolution',window_id)
+ check (window_id,'chkConfirmwhenexpungingafolder')
+ time.sleep (1)
+ if verifycheck (window_id,'chkConfirmwhenexpungingafolder') == 0:
+ log ('Unable to check checkbox','cause')
+ raise LdtpExecutionError (0)
+ click (window_id,'btnClose')
+ undoremap ('evolution',window_id)
+
+ except:
+ log ('Unable to enable prompting before expunging','cause')
+ raise LdtpExecutionError (0)
+ #verification for prompt
+ try:
+ selectrowpartialmatch ('frmEvolution-Mail','ttblMailFolderTree',fldr)
+ time.sleep (1)
+ selectmenuitem ('frmEvolution-Mail','mnuFolder;mnuExpunge')
+ if waittillguiexist ('dlgEvolutionQuery') == 0:
+ log ('Prompt did not show','cause')
+ raise LdtpExecutionError (0)
+ remap ('evolution','dlgEvolutionQuery')
+ click ('dlgEvolutionQuery','btnExpunge')
+ except:
+ raise LdtpExecutionError (0)
+ #verification for expunging
+
+ if getrowcount ('frmEvolution-Mail','ttblMessageList') != 0:
+ log ('Expunging failed','cause')
+ raise LdtpExecutionError (0)
+
+ except:
+ log ('Enabling prompt while expunging failed','error')
+ log ('Check for Prompting when expunging','testend')
+ raise LdtpExecutionError (0)
+ log ('Check for Prompting when expunging','testend')
diff --git a/evolution/contact.py b/evolution/contact.py
new file mode 100644
index 0000000..7ce880a
--- /dev/null
+++ b/evolution/contact.py
@@ -0,0 +1,528 @@
+#!/usr/bin/env python
+#
+# Linux Desktop Testing Project http://www.gnomebangalore.org/ldtp
+#
+# Author:
+# Prashanth Mohan <prashmohan@gmail.com>
+#
+# Copyright 2004 Novell, Inc.
+#
+# This test script is free software; you can redistribute it and/or
+# modify it under the terms of the GNU Library General Public
+# License as published by the Free Software Foundation; either
+# version 2 of the License, or (at your option) any later version.
+#
+# This library is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+# Library General Public License for more details.
+#
+# You should have received a copy of the GNU Library General Public
+# License along with this library; if not, write to the
+# Free Software Foundation, Inc., 59 Temple Place - Suite 330,
+# Boston, MA 02111-1307, USA.
+#
+
+from ldtp import *
+from ldtputils import *
+
+def deletecontact(name):
+ log ('Deleting a contact','teststart')
+ try:
+ #selectcontact (titleappend(name)[1:])
+ selectmenuitem ('frmEvolution-Contacts','mnuEdit;mnuDelete')
+ waittillguiexist ('dlgQuestion')
+ time.sleep (2)
+ click ('dlgQuestion','btnDelete')
+ except:
+ log ('Deleting Contact Failed','error')
+ log ('Deleting a contact','testend')
+ raise LdtpExecutionError(0)
+ log ('Deleting a contact','testend')
+
+def getcurwindow():
+ if guiexist ('frmEvolution-Mail')==1:
+ print "found"
+ return 'frmEvolution-Mail'
+ elif guiexist ('frmEvolution-Contacts')==1:
+ return 'frmEvolution-Contacts'
+ elif guiexist ('frmEvolution-Calendars')==1:
+ return 'frmEvolution-Calendars'
+ elif guiexist ('frmEvolution-Memos')==1:
+ return 'frmEvolution-Memos'
+ elif guiexist ('frmEvolution-Tasks')==1:
+ return 'frmEvolution-Tasks'
+
+def getcontactvals(datafilename):
+ """ GET INFORMATION FROM XML FILE FOR ADDING CONTACTS"""
+ try:
+ data_object = LdtpDataFileParser (datafilename)
+ AddrBook=data_object.gettagvalue ('AddrBook')
+ FullName=data_object.gettagvalue ('FullName')
+ Nick=data_object.gettagvalue ('NickName')
+ WorkEmail=data_object.gettagvalue ('WorkEmail')
+ HomeMail=data_object.gettagvalue ('HomeEmail')
+ BusPhone=data_object.gettagvalue ('BusinessPhone')
+ Yahoo=data_object.gettagvalue ('Yahoo')
+ HomePage=data_object.gettagvalue ('HomePage')
+ Profession=data_object.gettagvalue ('Profession')
+ Notes=data_object.gettagvalue ('Notes')
+ HomeAdd=data_object.gettagvalue ('HomeAddress')
+ WorkAdd=data_object.gettagvalue ('WorkAddress')
+ OtherAdd=data_object.gettagvalue ('OtherAddress')
+
+ except:
+ log ('Error While reading values from XML file','error')
+ log ('Add New Contact','testend')
+ raise LdtpExecutionError(0)
+
+ return AddrBook,FullName,Nick,WorkEmail,HomeMail,BusPhone,Yahoo,HomePage,Profession,Notes,HomeAdd,WorkAdd,OtherAdd
+
+def selectContactPane():
+ """Selects the Contacts Pane in Evolution"""
+ log ('Open Evolution Contacts Pane','teststart')
+ try:
+ window_id=getcurwindow()
+ click (window_id,'tbtnContacts')
+ waittillguiexist ('frmEvolution-Contacts')
+ except:
+ log ('error selecting Contacts pane','error')
+ log ('Open Evolution Contacts Pane','testend')
+ raise LdtpExecutionError(0)
+
+ log ('Open Evolution Contacts Pane','testend')
+
+def selectMailPane():
+ """Selects the Contacts Pane in Evolution"""
+ log ('Open Evolution Mail Pane','teststart')
+ try:
+ print "b4 getcurinwdow"
+ window_id=getcurwindow()
+ print "after getcurinwdow"
+ click (window_id,'tbtnMail')
+ waittillguiexist ('frmEvolution-Mail')
+ except:
+ log ('error selecting Mail pane','error')
+ log ('Open Evolution Mail Pane','testend')
+ raise LdtpExecutionError(0)
+
+ log ('Open Evolution Mail Pane','testend')
+
+def selectContactPane():
+ """Selects the Contacts Pane in Evolution"""
+ log ('Open Evolution Contacts Pane','teststart')
+ try:
+ window_id=getcurwindow()
+ click (window_id,'tbtnContacts')
+ waittillguiexist ('frmEvolution-Contacts')
+ except:
+ log ('error selecting Contacts pane','error')
+ log ('Open Evolution Contacts Pane','testend')
+ raise LdtpExecutionError(0)
+
+ log ('Open Evolution Contacts Pane','testend')
+
+
+def selectMemoPane():
+ """Selects the Calendars Pane in Evolution"""
+ log ('Open Evolution Memos Pane','teststart')
+ try:
+ window_id=getcurwindow()
+ click (window_id,'tbtnMemos')
+ waittillguiexist ('frmEvolution-Memos')
+ except:
+ log ('error selecting Memos pane','error')
+ log ('Open Evolution Memos Pane','testend')
+ raise LdtpExecutionError(0)
+
+ log ('Open Evolution Memos Pane','testend')
+
+def selectTaskPane():
+ """Selects the Contacts Pane in Evolution"""
+ log ('Open Evolution Tasks Pane','teststart')
+ try:
+ window_id=getcurwindow()
+ click (window_id,'tbtnTasks')
+ waittillguiexist ('frmEvolutions-Tasks')
+ except:
+ log ('error selecting Tasks pane','error')
+ log ('Open Evolution Tasks Pane','testend')
+ raise LdtpExecutionError(0)
+
+ log ('Open Evolution Tasks Pane','testend')
+
+def selectCalendarPane():
+ """Selects the Contacts Pane in Evolution"""
+ log ('Open Evolution Calendars Pane','teststart')
+ try:
+ window_id=getcurwindow()
+ click (window_id,'tbtnCalendars')
+ waittillguiexist ('frmEvolution-Calendars')
+ except:
+ log ('error selecting Calendars pane','error')
+ log ('Open Evolution Calendars Pane','testend')
+ raise LdtpExecutionError(0)
+
+ log ('Open Evolution Calendars Pane','testend')
+
+
+def selectaddrbook (name):
+ log ('Selecting a given Address book','teststart')
+ try:
+ selectContactPane()
+ remap ('evoltion','frmEvolution-Contacts')
+ selectrow ('frmEvolution-Contacts','ttblContactSourceSelector',name)
+ undoremap ('evolution','frmEvolution-Contacts')
+ except:
+ log ('Unable to Select AddressBook','error')
+ log ('Selecting a given Address book','testend')
+ raise LdtpExecutionError (0)
+ log ('Selecting a given Address book','testend')
+
+
+# def selectcontact(name):
+# """Select a particular contact by full name"""
+
+# log ('Selecting Contact','teststart')
+# try:
+# #selectContactPane()
+# time.sleep (10)
+# if gettextvalue ('frmEvolution-Contacts','txtSearchTextEntry')!='':
+# settextvalue ('frmEvolution-Contacts','txtSearchTextEntry','aaa')
+# time.sleep (5)
+# settextvalue ('frmEvolution-Contacts','txtSearchTextEntry',name)
+# click ('frmEvolution-Contacts','btnFindNow')
+# time.sleep(2)
+# remap ('evolution','frmEvolution-Contacts')
+# time.sleep(2)
+# value=2
+# # if 'pnlcurrentaddressbookfolderhas0cards' in getobjextlist('frmEvolution-Contacts') and 'pnlcurrentaddressbookfolderhas0cards1' in getobjectlist('frmEvolution-Contacts'):
+# # print "out in 0"
+# # time.sleep (10)
+# # raise LdtpExecutionError(0)
+# print "out of 0"
+# time.sleep (3)
+# try:
+# print "come into 1"
+# time.sleep (10)
+# selectpanel ('frmEvolution-Contacts','pnlcurrentaddressbookfolderhas1card',1)
+# selectpanel ('frmEvolution-Contacts','pnlcurrentaddressbookfolderhas1card',1)
+# except:
+# while True:
+# try:
+# print value
+# time.sleep (3)
+# selectpanelname ('frmEvolution-Contacts','pnlcurrentaddressbookfolderhas'+str(value)+'cards',value)
+# selectpanel ('frmEvolution-Contacts','pnlcurrentaddressbookfolderhas'+str(value)+'cards',value)
+# break
+# except:
+# value += 1
+# continue
+# undoremap ('evolution','frmEvolution-Contacts')
+# time.sleep (2)
+
+# except:
+# log ('Unable to select Contact','error')
+# log ('Selecting Contact','testend')
+# raise LdtpExecutionError(0)
+
+# log ('Selecting Contact','testend')
+
+
+
+def selectcontact(name):
+ log ('Select Contact','teststart')
+ if guiexist ('frmEvolution-Contacts')!=1:
+ selectContactPane()
+ try:
+ remap ('evolution','frmEvolution-Contacts')
+ for obj in getobjectlist ('frmEvolution-Contacts'):
+ if obj.startswith ('pnlcurrentaddressbook'):
+ panel_name=obj
+ break
+ time.sleep (2)
+ selectpanelname ('frmEvolution-Contacts',panel_name,name)
+ selectpanelname ('frmEvolution-Contacts',panel_name,name)
+ time.sleep (2)
+ except:
+ log ('Select Contact Failed','error')
+ log ('Select Contact','testend')
+ raise LdtpExecutionError(0)
+ log ('Select Contact','testend')
+
+
+def titleappend(name):
+ name=name.split (' ')
+ append=''
+ for x in range(1,len(name)):
+ append=' '+name[x]
+ if len(name)>1:
+ append+=', '
+ append+=name[0]
+ else:
+ append+=' '
+ append+=name[0]
+ return append
+
+def getmodifiedvals(datafilename):
+ """Get Data from an XML file for Contact Modification"""
+ #import sys
+ #try:
+ log ('Get Modified Values','teststart')
+ data_object = LdtpDataFileParser (datafilename)
+ AddrBook=data_object.gettagvalue ('AddrBook')
+ FullName==data_object.gettagvalue ('Name')
+ NewWorkEmail=data_object.gettagvalue ('NewWorkEmail')
+ NewHomeEmail=data_object.gettagvalue ('NewHomeEmail')
+ NewHomeAdd=data_object.gettagvalue ('NewHomeAddress')
+ NewWordAdd=data_object.gettagvalue ('NewWorkAddress')
+ NewOtherAdd=data_object.gettagvalue ('NewOtherAddress')
+ log ('Get Modified Values','testend')
+ return AddrBook,FullName,NewWorkEmail,NewHomeEmail,NewHomeAdd,NewWorkAdd,NewOtherAdd
+# except:
+# log ('error in getting values for contact modification','error')
+# log ('Get Modified Values','testend')
+# print sys.exc_info()
+# raise LdtpExecutionError( log ('Get Modified Values','testend')
+
+
+def getcontactlistvals(datafilename):
+ log ('Get Contact List values','teststart')
+ data_object = LdtpDataFileParser (datafilename)
+ ListName=data_object.gettagvalue ('ListName')
+ EmailAddresses=[]
+ try:
+ indexval=1
+ while True:
+ try:
+ mail=data_object.gettagvalue ('Email'+str(indexval))[0]
+ EmailAddresses.append(mail)
+ if mail=='':
+ break
+ except:
+ break
+ indexval=indexval+1
+ except:
+ log ('error while getting contact list values','error')
+ log ('Get Contact List values','testend')
+ raise LdtpExecutionError(0)
+ log ('Get Contact List values','testend')
+ return ListName,EmailAddresses
+
+
+def getmodlistvals(datafilename):
+ log ('Get Modify Contact List values','teststart')
+ data_object = LdtpDataFileParser (datafilename)
+ ListName=data_object.gettagvalue ('ListName')
+ AddEmailAddresses=[]
+ DelEmailAddresses=[]
+ addmail=''
+ delmail=''
+ try:
+ indexval=1
+ while True:
+ try:
+ addmail=data_object.gettagvalue ('AddEmail'+str(indexval))
+ delmail=data_object.gettagvalue ('DelEmail'+str(indexval))
+ if len(addmail) ==0 and len (delmail)==0:
+ break
+ if len (addmail)>0:
+ AddEmailAddresses.append (addmail[0])
+ if len(delmail)>0:
+ DelEmailAddresses.append (delmail[0])
+ except:
+ log ('Error in Data read','error')
+ break
+ indexval=indexval+1
+ print AddEmailAddresses,DelEmailAddresses
+ time.sleep (5)
+ except:
+ log ('error while getting contact list values','error')
+ log ('Get Contact List values','testend')
+ raise LdtpExecutionError(0)
+ log ('Get Contact List values','testend')
+ return ListName,AddEmailAddresses,DelEmailAddresses
+
+def opencontactlist(ListName):
+ log ('Open Contact List','teststart')
+ try:
+ selectcontact (ListName[0])
+ selectmenuitem ('frmEvolution-Contacts','mnuFile;mnuOpen')
+ setcontext ('Contact List Editor',ListName[0])
+ waittillguiexist ('dlgContactListEditor')
+ except:
+ log ('could not open Contact list','error')
+ log ('Open Contact List','testend')
+ raise LdtpExecutionError(0)
+ log ('Open Contact List','testend')
+
+def deletecontactlist(name):
+ log ('Delete Contact List','teststart')
+ try:
+ deletecontact(name)
+ except:
+ log ('Delete Contact List Failed','error')
+ log ('Delete Contact List','testend')
+ raise LdtpExecutionError(0)
+ log ('Delete Contact List','testend')
+
+def addcontact(AddrBook,FullName,Nick,WorkEmail,HomeMail,BusPhone,Yahoo,HomePage,Profession,Notes,HomeAdd,WorkAdd,OtherAdd):
+ """ Adds a new contact to evolution"""
+ log ('Add New Contact','teststart')
+ #OPEN CONTACT EDITOR
+ try:
+ #=getcontactvals(datafilename)
+ selectContactPane()
+ selectaddrbook (AddrBook[0])
+ selectmenuitem ('frmEvolution-Contacts','mnuNew;mnuFile;mnuContact')
+ waittillguiexist ('dlgContactEditor')
+ except:
+ log ('Could Not select Contacts Button','error')
+ log ('Add New Contact','testend')
+ raise LdtpExecutionError(0)
+
+ #SET VALUES FOR CONTACT TAB
+ try:
+ selecttab ('dlgContactEditor','ptl0','Contact')
+ settextvalue ('dlgContactEditor','txtFullName', FullName[0])
+# name=FullName[0].split(' ')
+# appendtext=''
+# for x in range(1,len(name)):
+# appendtext=' '+name[x]
+# if len(name)>1:
+# appendtext+=', '
+# appendtext+=name[0]
+# else:
+# appendtext+=name[0]
+ setcontext ('Contact Editor','Contact Editor -'+titleappend(FullName[0]))
+ if len(Nick)>0:
+ settextvalue ('dlgContactEditor','txtNickname',Nick[0])
+
+ if len(WorkEmail)>0:
+ settextvalue ('dlgContactEditor','txtWork',WorkEmail[0])
+
+ if len(HomeMail)>0:
+ settextvalue ('dlgContactEditor','txtHome',HomeMail[0])
+
+ if len(BusPhone)>0:
+ settextvalue ('dlgContactEditor','txtBusinessPhone',BusPhone[0])
+ #print "YAHOO[0]",Yahoo[0]
+ if len(Yahoo)>0:
+ print "INSIDE"
+ settextvalue ('dlgContactEditor','txtYahoo',Yahoo[0])
+ except:
+ log ('Error While setting values in 1st tab','error')
+ log ('Add New Contact','testend')
+ raise LdtpExecutionError(0)
+ time.sleep(2)
+
+ #PERSONAL INFORMATION TAB
+ try:
+ if len(HomePage)>0 or len(Profession)>0 or len(Notes)>0:
+ selecttab ('dlgContactEditor','ptl0','Personal Information')
+ time.sleep(1)
+ if len(HomePage)>0:
+ settextvalue ('dlgContactEditor','txtHomePage',HomePage[0])
+ if len(Profession)>0:
+ settextvalue ('dlgContactEditor','txtProfession',Profession[0])
+ if len(Notes)>0:
+ settextvalue ('dlgContactEditor','txtNotes',Notes[0])
+ except:
+ log ('Error While setting values in 2nd tab','error')
+ log ('Add New Contact','testend')
+ raise LdtpExecutionError(0)
+ time.sleep(2)
+ #MAILING ADDRESS TAB
+ try:
+ if len(HomeAdd)>0 or len(WorkAdd)>0 or len(OtherAdd)>0:
+ selecttab ('dlgContactEditor','ptl0','Mailing Address')
+ time.sleep(1)
+ if len(HomeAdd)>0:
+ settextvalue ('dlgContactEditor','txtAddress',HomeAdd[0])
+ if len(WorkAdd)>0:
+ settextvalue ('dlgContactEditor','txtAddress1',WorkAdd[0])
+ if len(OtherAdd)>0:
+ settextvalue ('dlgContactEditor','txtAddress2',OtherAdd[0])
+ except:
+ log ('Error While setting values in 3rd tab','error')
+ log ('Add New Contact','testend')
+ raise LdtpExecutionError(0)
+
+ time.sleep (2)
+ try:
+ click ('dlgContactEditor','btnOK')
+ time.sleep (5)
+ if guiexist ('dlgDuplicateContactDetected')==1:
+ log ('contact already exists','info')
+ click ('dlgDuplicateContactDetected','btnAdd')
+ time.sleep(2)
+ verifyaddedcontact(AddrBook,FullName,Nick,WorkEmail,HomeMail,BusPhone,Yahoo,HomePage,Profession,Notes,HomeAdd,WorkAdd,OtherAdd)
+ time.sleep(2)
+ except:
+ log ('Contact Addition Failed!','error')
+ log ('Add New Contact','testend')
+ raise LdtpExecutionError(0)
+ log ('Add New Contact','testend')
+
+
+def verifyaddedcontact(AddrBook,FullName,Nick,WorkEmail,HomeMail,BusPhone,Yahoo,HomePage,Profession,Notes,HomeAdd,WorkAdd,OtherAdd):
+ log ('Verify Added Contact','teststart')
+ try:
+ selectaddrbook (AddrBook[0])
+ temp=titleappend(FullName[0])[1:]
+# print temp
+# raw_input ("temp")
+ selectcontact(temp)
+ time.sleep (2)
+ selectmenuitem ('frmEvolution-Contacts','mnuFile;mnuOpen')
+ title='dlgContactEditor-'+titleappend(FullName[0]).replace(' ','')
+ setcontext ('Contact Editor','Contact Editor -'+titleappend(FullName[0]))
+ waittillguiexist ('dlgContactEditor')
+ time.sleep(2)
+ if gettextvalue ('dlgContactEditor','txtFullName')!=FullName[0]:
+ log ('Full Name does not match','info')
+ raise LdtpExecutionError(0)
+
+ if len(Nick)>0 and gettextvalue ('dlgContactEditor','txtNickname')!=Nick[0]:
+ log ('Nick Name matches','info')
+ raise LdtpExecutionError(0)
+ if len (WorkEmail)>0 and gettextvalue ('dlgContactEditor','txtWork')!=WorkEmail[0]:
+ log ('Work Email matches','info')
+ raise LdtpExecutionError(0)
+ if len(HomeMail)>0 and gettextvalue ('dlgContactEditor','txtHome')!=HomeMail[0]:
+ log ('Home Email matches','info')
+ raise LdtpExecutionError(0)
+ if len(BusPhone)>0 and gettextvalue ('dlgContactEditor','txtBusinessPhone')!=BusPhone[0]:
+ log ('Business Phone matches','info')
+ raise LdtpExecutionError(0)
+ print "Bus phone over"
+ if len (Yahoo)>0 and gettextvalue ('dlgContactEditor','txtYahoo')!=Yahoo[0]:
+ log ('Yahoo ID matches','info')
+ raise LdtpExecutionError(0)
+ if len(HomePage)>0 and gettextvalue ('dlgContactEditor','txtHomePage')!=HomePage[0]:
+ log ('Home Page matches','info')
+ raise LdtpExecutionError(0)
+ if len( Profession)>0 and gettextvalue ('dlgContactEditor','txtProfession')!=Profession[0]:
+ log ('Profession matches','info')
+ raise LdtpExecutionError(0)
+ if len(Notes)>0 and gettextvalue ('dlgContactEditor','txtNotes')!=Notes[0]:
+ log ('Notes matches','info')
+ raise LdtpExecutionError(0)
+ #homeaddress=gettextvalue ('dlgContactEditor','txtAddress')
+# if len(HomeAdd)>0 and gettextvalue ('dlgContactEditor','txtAddress')!=HomeAdd[0]:
+# #print "Error here","from dialog:"+homeaddress+"a","from xml file:"+HomeAdd[0]
+# log ('Home Address matches','info')
+# raise LdtpExecutionError(0)
+# if len (WorkAdd)>0 and gettextvalue ('dlgContactEditor','txtAddress1')!=WorkAdd[0]:
+# log ('Work Address matches','info')
+# raise LdtpExecutionError(0)
+# if len(OtherAdd)>0 and gettextvalue ('dlgContactEditor','txtAddress2')!=OtherAdd[0]:
+# log ('Other Address matches','info')
+# raise LdtpExecutionError(0)
+ undoremap ('evolution','frmEvolution-Mail')
+ click ('dlgContactEditor','btnCancel')
+ except:
+ log ('Contact has not been added correctly','error')
+ log ('Verify Added Contact','testend')
+ raise LdtpExecutionError(0)
+ log ('Verify Added Contact','testend')
diff --git a/evolution/contactlist.xml b/evolution/contactlist.xml
new file mode 100644
index 0000000..7b2dc58
--- /dev/null
+++ b/evolution/contactlist.xml
@@ -0,0 +1,24 @@
+<?xml version="1.0"?>
+<ldtp>
+ <logfileoverwrite>1</logfileoverwrite>
+ <logfile>evo-testing.xml</logfile>
+ <appmapfile>evolution.map</appmapfile>
+ <group>
+ <script>
+ <name>addcontactlist.py</name>
+ <data>addcontactlist.xml</data>
+ </script>
+ </group>
+ <group>
+ <script>
+ <name>modifycontactlist.py</name>
+ <data>modifycontactlist.xml</data>
+ </script>
+ </group>
+ <group>
+ <script>
+ <name>deletecontactlist.py</name>
+ <data>deletecontactlist.xml</data>
+ </script>
+ </group>
+</ldtp>
diff --git a/evolution/contactmeet.xml b/evolution/contactmeet.xml
new file mode 100644
index 0000000..54dee08
--- /dev/null
+++ b/evolution/contactmeet.xml
@@ -0,0 +1,68 @@
+<?xml version="1.0"?>
+<ldtp>
+ <logfileoverwrite>1</logfileoverwrite>
+ <logfile>evo-testing.xml</logfile>
+ <appmapfile>evolution.map</appmapfile>
+ <group>
+ <script>
+ <name>addcontact.py</name>
+ <data>addcontact.xml</data>
+ </script>
+ <script>
+ <name>modifycontact.py</name>
+ <data>modifycontact.xml</data>
+ </script>
+ </group>
+ <group>
+ <script>
+ <name>deletecontact.py</name>
+ <data>deletecontact.xml</data>
+ </script>
+ </group>
+ <group>
+ <script>
+ <name>addcontactlist.py</name>
+ <data>addcontactlist.xml</data>
+ </script>
+ <script>
+ <name>modifycontactlist.py</name>
+ <data>modifycontactlist.xml</data>
+ </script>
+ <script>
+ <name>deletecontactlist.py</name>
+ <data>deletecontactlist.xml</data>
+ </script>
+ </group>
+ <group>
+ <script>
+ <name>createaddrbook.py</name>
+ <data>createaddrbook.xml</data>
+ </script>
+ </group>
+ <group>
+ <script>
+ <name>createmeeting.py</name>
+ <data>create-meeting.xml</data>
+ </script>
+ <script>
+ <name>createrecurmeet.py</name>
+ <data>create-meeting-recur.xml</data>
+ </script>
+ <script>
+ <name>modifythisinstmeet.py</name>
+ <data>modify-meeting.xml</data>
+ </script>
+ <script>
+ <name>modifyallinstmeet.py</name>
+ <data>modify-meeting-recur.xml</data>
+ </script>
+ <script>
+ <name>deletesingleinstmeeting.py</name>
+ <data>deletemeetingone.xml</data>
+ </script>
+ <script>
+ <name>deletesingleinstmeeting.py</name>
+ <data>deletemeetingall.xml</data>
+ </script>
+ </group>
+</ldtp>
diff --git a/evolution/contacts.xml b/evolution/contacts.xml
new file mode 100644
index 0000000..9f32592
--- /dev/null
+++ b/evolution/contacts.xml
@@ -0,0 +1,48 @@
+<?xml version="1.0"?>
+<ldtp>
+ <logfileoverwrite>1</logfileoverwrite>
+ <logfile>evo-testing.xml</logfile>
+ <appmapfile>evolution.map</appmapfile>
+ <group>
+ <script>
+ <name>addcontact.py</name>
+ <data>addcontact.xml</data>
+ </script>
+ </group>
+ <group>
+ <script>
+ <name>modifycontact.py</name>
+ <data>modifycontact.xml</data>
+ </script>
+ </group>
+ <group>
+ <script>
+ <name>searchcontact.py</name>
+ <data>searchcontact.xml</data>
+ </script>
+ </group>
+ <group>
+ <script>
+ <name>deletecontact.py</name>
+ <data>deletecontact.xml</data>
+ </script>
+ </group>
+ <group>
+ <script>
+ <name>addcontactlist.py</name>
+ <data>addcontactlist.xml</data>
+ </script>
+ </group>
+ <group>
+ <script>
+ <name>modifycontactlist.py</name>
+ <data>modifycontactlist.xml</data>
+ </script>
+ </group>
+ <group>
+ <script>
+ <name>deletecontactlist.py</name>
+ <data>deletecontactlist.xml</data>
+ </script>
+ </group>
+</ldtp>
diff --git a/evolution/copy-to.py b/evolution/copy-to.py
new file mode 100644
index 0000000..db01ad1
--- /dev/null
+++ b/evolution/copy-to.py
@@ -0,0 +1,41 @@
+#
+# Linux Desktop Testing Project http://www.gnomebangalore.org/ldtp
+#
+# Author:
+# Venkateswaran S <wenkat.s@gmail.com>
+#
+# Copyright 2004 Novell, Inc.
+#
+# This test script is free software; you can redistribute it and/or
+# modify it under the terms of the GNU Library General Public
+# License as published by the Free Software Foundation; either
+# version 2 of the License, or (at your option) any later version.
+#
+# This library is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+# Library General Public License for more details.
+#
+# You should have received a copy of the GNU Library General Public
+# License along with this library; if not, write to the
+# Free Software Foundation, Inc., 59 Temple Place - Suite 330,
+# Boston, MA 02111-1307, USA.
+#
+
+# Copy a folder from one location to another.
+
+from menu_reorganization import *
+
+try:
+ data_object = LdtpDataFileParser (datafilename)
+
+ #Extracting imput data from xml file
+ from_fldr = data_object.gettagvalue ('from_fldr')[0]
+ to_fldr = data_object.gettagvalue ('to_fldr')[0]
+ copy_to (from_fldr,to_fldr)
+
+except :
+
+ log('Cannot copy the folder','error')
+ raise LdtpExecutionError (0)
+
diff --git a/evolution/copy-to.xml b/evolution/copy-to.xml
new file mode 100644
index 0000000..360169b
--- /dev/null
+++ b/evolution/copy-to.xml
@@ -0,0 +1,5 @@
+<?xml version="1.0"?>
+<data>
+ <from_fldr>Inbox</from_fldr>
+ <to_fldr>test_copy</to_fldr>
+</data>
diff --git a/evolution/copymessagewhenoffline.py b/evolution/copymessagewhenoffline.py
new file mode 100644
index 0000000..a4cbe9a
--- /dev/null
+++ b/evolution/copymessagewhenoffline.py
@@ -0,0 +1,43 @@
+#!/usr/bin/env python
+#
+# Linux Desktop Testing Project http://www.gnomebangalore.org/ldtp
+#
+# Author:
+# Prashanth Mohan <prashmohan@gmail.com>
+#
+# Copyright 2004 Novell, Inc.
+#
+# This test script is free software; you can redistribute it and/or
+# modify it under the terms of the GNU Library General Public
+# License as published by the Free Software Foundation; either
+# version 2 of the License, or (at your option) any later version.
+#
+# This library is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+# Library General Public License for more details.
+#
+# You should have received a copy of the GNU Library General Public
+# License along with this library; if not, write to the
+# Free Software Foundation, Inc., 59 Temple Place - Suite 330,
+# Boston, MA 02111-1307, USA.
+#
+from offline import *
+
+try:
+ try:
+ data_object = LdtpDataFileParser (datafilename)
+ from_folder = data_object.gettagvalue ('from_folder')
+ to_folder = data_object.gettagvalue ('to_folder')
+ subject = data_object.gettagvalue ('subject')
+ except:
+ log ('Error while reading values for copy message test','cause')
+ raise LdtpExecutionError (0)
+ try:
+ #go_offline ()
+ copymessage (from_folder[0],to_folder[0],subject[0])
+ except:
+ log ('copy message when offline test failed','error')
+ raise LdtpExecutionError (0)
+except:
+ raise LdtpExecutionError (0)
diff --git a/evolution/cr_task_list.py b/evolution/cr_task_list.py
new file mode 100644
index 0000000..f352178
--- /dev/null
+++ b/evolution/cr_task_list.py
@@ -0,0 +1,93 @@
+#!/usr/bin/env python
+#
+# Linux Desktop Testing Project http://www.gnomebangalore.org/ldtp
+#
+# Author:
+# Venkateswaran S <wenkat.s@gmail.com>
+#
+# Copyright 2004 Novell, Inc.
+#
+# This test script is free software; you can redistribute it and/or
+# modify it under the terms of the GNU Library General Public
+# License as published by the Free Software Foundation; either
+# version 2 of the License, or (at your option) any later version.
+#
+# This library is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+# Library General Public License for more details.
+#
+# You should have received a copy of the GNU Library General Public
+# License along with this library; if not, write to the
+# Free Software Foundation, Inc., 59 Temple Place - Suite 330,
+# Boston, MA 02111-1307, USA.
+#
+# This script will create a new task.
+
+from ldtp import *
+from ldtputils import *
+
+def read_data ():
+ data_object = LdtpDataFileParser (datafilename)
+ Type = data_object.gettagvalue ('Type')
+ Name = data_object.gettagvalue ('Name')
+ Color = data_object.gettagvalue ('Color')
+ Default = data_object.gettagvalue ('Default')
+ return Type, Name, Color, Default
+
+def create_tasklist(Type, Name, Color, Default):
+
+ try:
+ log('create a task list','teststart')
+ remap('evolution','frmEvolution-Tasks')
+ selectmenuitem('frmEvolution-Tasks','mnuFile;mnuNew;mnuTasklist')
+ time.sleep(3)
+ waittillguiexist('dlgTaskListProperties')
+ settextvalue ('dlgTaskListProperties', 'txtName', 'bug')
+
+ if Default[0] == 'check':
+ check ('dlgTaskListProperties', 'chkMarkasdefaultfolder')
+ elif Default[0] == 'uncheck':
+ uncheck ('dlgTaskListProperties', 'chkMarkasdefaultfolder')
+ log('The window has been modified','info')
+ except:
+ log('Unable to see the window','error')
+ undoremap('evolution','frmEvolution-Tasks')
+ log('create a task list','testend')
+ raise LdtpExecutionError(0)
+
+ try:
+ click('dlgTaskListProperties','btnColor')
+ waittillguiexist('uknPickacolor')
+ settextvalue ('uknPickacolor', 'txtColorName', Color[0])
+ time.sleep(2)
+ click('uknPickacolor','btnOK')
+ settextvalue ('dlgTaskListProperties', 'txtName', Name[0])
+ time.sleep(3)
+ log('The requested color has been set','info')
+ except:
+ log('Unable to set the requested color','error')
+ undoremap('evolution','frmEvolution-Tasks')
+ log('create a task list','testend')
+ raise LdtpExecutionError(0)
+
+ try:
+ if stateenabled ('dlgTaskListProperties', 'btnOK') == 1:
+ print 'The tasklist has been created'
+ click('dlgTaskListProperties','btnOK')
+ log('The required task list has been created','info')
+ else:
+ print 'The task list already exists'
+ click('dlgTaskListProperties','btnCancel')
+ log('The required task list cannot be created','error')
+ except:
+ log('Unable to create the required task list','error')
+ undoremap('evolution','frmEvolution-Tasks')
+ log('create a task list','testend')
+ raise LdtpExecutionError(0)
+
+ undoremap('evolution','frmEvolution-Tasks')
+ log('create a task list','testend')
+
+Type, Name, Color, Default = read_data()
+create_tasklist(Type, Name, Color, Default)
diff --git a/evolution/cr_task_list.xml b/evolution/cr_task_list.xml
new file mode 100644
index 0000000..f335f6c
--- /dev/null
+++ b/evolution/cr_task_list.xml
@@ -0,0 +1,7 @@
+<?xml version="1.0"?>
+<data>
+ <Type>On This Computer</Type>
+ <Name>ASample</Name>
+ <Color>#F33333</Color>
+ <Default>check</Default>
+</data>
diff --git a/evolution/create-appointment.py b/evolution/create-appointment.py
new file mode 100644
index 0000000..62b226c
--- /dev/null
+++ b/evolution/create-appointment.py
@@ -0,0 +1,105 @@
+#
+# Linux Desktop Testing Project http://www.gnomebangalore.org/ldtp
+#
+# Author:
+# Prem <jpremkumar@novell.com>
+#
+# Copyright 2004 Novell, Inc.
+#
+# This test script is free software; you can redistribute it and/or
+# modify it under the terms of the GNU Library General Public
+# License as published by the Free Software Foundation; either
+# version 2 of the License, or (at your option) any later version.
+#
+# This library is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+# Library General Public License for more details.
+#
+# You should have received a copy of the GNU Library General Public
+# License along with this library; if not, write to the
+# Free Software Foundation, Inc., 59 Temple Place - Suite 330,
+# Boston, MA 02111-1307, USA.
+#
+
+#To create an Appointment
+from evoutils.calendar import *
+from ldtputils import *
+
+#Initialising XML parser with data file
+data_object = LdtpDataFileParser (datafilename)
+
+#Extracting imput data from xml file
+summary = data_object.gettagvalue ('summary')[0]
+location = data_object.gettagvalue ('location')[0]
+description = data_object.gettagvalue ('description')[0]
+from_date = data_object.gettagvalue ('from_date')[0]
+to_date = data_object.gettagvalue ('to_date')[0]
+from_time = data_object.gettagvalue ('from_time')[0]
+to_time = data_object.gettagvalue ('to_time')[0]
+calendar = data_object.gettagvalue ('calendar')[0]
+classification = data_object.gettagvalue ('classification')[0]
+categories = data_object.gettagvalue ('categories')[0]
+#count = data_object.gettagvalue ('count')[0]
+#forever = data_object.gettagvalue ('for')[0]
+#occurences = data_object.gettagvalue ('occurences')[0]
+#exception = data_object.gettagvalue ('exception')
+
+#creation fo appointment
+log ('Appointment Creation', 'teststart')
+
+try:
+ windowname = 'dlgAppointment-Nosummary'
+ ptlistname = 'ptl0'
+ flag = 0
+ selectmenuitem ('frmEvolution-Calendars', 'mnuView;mnuWindow;mnuCalendars')
+ time.sleep (2)
+ selectmenuitem ('frmEvolution-Calendars', 'mnuFile;mnuFile;mnuAppointment')
+ time.sleep (2)
+ if guiexist (windowname) == 0:
+ log ('Failed to open new appointment window', 'cause')
+ raise LdtpExecutionError (0)
+ else:
+ log ('Insertion of Appointment values', 'teststart')
+ i = insert_appointment (windowname, ptlistname, summary, location, description, from_date,
+ from_time, to_date, to_time, calendar, classification, categories)
+ if i == 1:
+ flag = 1
+ log ('Insertion of Appointment values', 'testend')
+ time.sleep (2)
+ if i == 0:
+ log ('Insertion of recurrence values', 'teststart')
+ #i = insert_recurrence (windowname, ptlistname, count, forever, occurences, exception)
+
+ if i == 1:
+ flag = 1
+ log ('Insertion of recurrence values', 'testend')
+ time.sleep (2)
+ if stateenabled (windowname, 'btnOK') == 1:
+ click (windowname , 'btnOK')
+ else:
+ log ('OK Button is in disabled state!!', 'warning')
+ click (windowname , 'btnCancel')
+ time.sleep (3)
+ if waittillguinotexist ('dlgAppointment-Nosummary') == 0:
+ log ('Failed to close appointment dialog' ,'cause')
+ raise LdtpExecutionError (0)
+ time.sleep (2)
+ releasecontext ()
+ if flag == 1:
+ log ('Appointment creation succeeded', 'fail')
+ else:
+ log ('Appointment creation succeeded', 'pass')
+except LdtpExecutionError:
+ releasecontext ()
+ print 'Creation of appointment failed' + str(msg)
+ log ('Creation of appointment failed', 'error')
+ log ('Appointment Creation', 'testend')
+except error, msg:
+ releasecontext ()
+ print 'Creation of appointment failed' + str(msg)
+ log ('Creation of appointment failed', 'error')
+ log ('Appointment Creation', 'testend')
+ raise LdtpExecutionError (0)
+
+log ('Appointment Creation', 'testend')
diff --git a/evolution/create-appointment.xml b/evolution/create-appointment.xml
new file mode 100644
index 0000000..a9283ff
--- /dev/null
+++ b/evolution/create-appointment.xml
@@ -0,0 +1,13 @@
+<?xml version="1.0"?>
+<data>
+ <summary>new summary</summary>
+ <location>Conference room</location>
+ <description>A new appointment for testing appointment creation</description>
+ <classification>Confidential</classification>
+ <calendar>personal</calendar>
+ <categories>Business</categories>
+ <from_date>09/24/2005</from_date>
+ <to_date>09/24/2005</to_date>
+ <from_time>0</from_time>
+ <to_time>0</to_time>
+</data>
diff --git a/evolution/create-folder.py b/evolution/create-folder.py
new file mode 100644
index 0000000..b509c51
--- /dev/null
+++ b/evolution/create-folder.py
@@ -0,0 +1,80 @@
+#
+# Linux Desktop Testing Project http://www.gnomebangalore.org/ldtp
+#
+# Author:
+# Venkateswaran S <wenkat.s@gmail.com>
+#
+# Copyright 2004 Novell, Inc.
+#
+# This test script is free software; you can redistribute it and/or
+# modify it under the terms of the GNU Library General Public
+# License as published by the Free Software Foundation; either
+# version 2 of the License, or (at your option) any later version.
+#
+# This library is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+# Library General Public License for more details.
+#
+# You should have received a copy of the GNU Library General Public
+# License along with this library; if not, write to the
+# Free Software Foundation, Inc., 59 Temple Place - Suite 330,
+# Boston, MA 02111-1307, USA.
+#
+
+#To create a folder.
+from menu_reorganization import *
+#from evoutils.menu_reorganization 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-Mail','tbtnMail')
+ time.sleep(3)
+ waittillguiexist ('frmEvolution-Mail')
+
+ 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()
+ 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-Mail','mnuFolder;mnuNew1')
+ if create_folder(Folder_name, location) == 1:
+ log('Folder created','info')
+ log('creation of a folder','testend')
+ else:
+ log('Folder not created','error')
+ log('creation of a folder','testend')
+except:
+ log('cannot create a folder','error')
+ log('creation of a folder','testend')
+ raise LdtpExecutionError(0)
diff --git a/evolution/create-folder.xml b/evolution/create-folder.xml
new file mode 100644
index 0000000..4e44747
--- /dev/null
+++ b/evolution/create-folder.xml
@@ -0,0 +1,5 @@
+<?xml version="1.0"?>
+<data>
+ <folder_name>sample</folder_name>
+ <location>On</location>
+</data>
diff --git a/evolution/create-meeting-recur.xml b/evolution/create-meeting-recur.xml
new file mode 100644
index 0000000..c29be08
--- /dev/null
+++ b/evolution/create-meeting-recur.xml
@@ -0,0 +1,21 @@
+<?xml version="1.0"?>
+<data>
+ <addrbook>Personal</addrbook>
+ <summary>dddd</summary>
+ <location>Conference room</location>
+ <description>A new appointment for testing appointment creation</description>
+ <classification>Confidential</classification>
+ <calendar>Personal</calendar>
+ <categories>Business</categories>
+ <from_date>10/26/2005</from_date>
+ <to_date>10/29/2005</to_date>
+ <attendee>asd asda</attendee>
+ <email>asd@asdfa.com</email>
+ <exception>10/28/2005</exception>
+ <duration>month(s)</duration>
+ <durvalue>second</durvalue>
+ <durday>Saturday</durday>
+ <count>5</count>
+ <fortype>until</fortype>
+ <nooftimes>12/12/05</nooftimes>
+</data>
diff --git a/evolution/create-meeting.xml b/evolution/create-meeting.xml
new file mode 100644
index 0000000..a41ffdf
--- /dev/null
+++ b/evolution/create-meeting.xml
@@ -0,0 +1,20 @@
+<?xml version="1.0"?>
+<data>
+ <addrbook>Personal</addrbook>
+ <summary>new summary</summary>
+ <location>Conference room</location>
+ <description>A new appointment for testing appointment creation</description>
+ <classification>Confidential</classification>
+ <calendar>Personal</calendar>
+ <categories>Business</categories>
+ <from_date>10/24/2005</from_date>
+ <to_date>10/24/2005</to_date>
+ <attendee>asd asda</attendee>
+ <email>asd@asdfa.com</email>
+ <duration>month(s)</duration>
+ <durvalue>second</durvalue>
+ <durday>Saturday</durday>
+ <count>5</count>
+ <fortype>until</fortype>
+ <nooftimes>12/12/05</nooftimes>
+</data>
diff --git a/evolution/create-recursive-app.py b/evolution/create-recursive-app.py
new file mode 100644
index 0000000..61b1479
--- /dev/null
+++ b/evolution/create-recursive-app.py
@@ -0,0 +1,95 @@
+#
+# Linux Desktop Testing Project http://www.gnomebangalore.org/ldtp
+#
+# Author:
+# Venkateswaran S <wenkat.s@gmail.com>
+#
+# Copyright 2004 Novell, Inc.
+#
+# This test script is free software; you can redistribute it and/or
+# modify it under the terms of the GNU Library General Public
+# License as published by the Free Software Foundation; either
+# version 2 of the License, or (at your option) any later version.
+#
+# This library is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+# Library General Public License for more details.
+#
+# You should have received a copy of the GNU Library General Public
+# License along with this library; if not, write to the
+# Free Software Foundation, Inc., 59 Temple Place - Suite 330,
+# Boston, MA 02111-1307, USA.
+#
+
+# To create an appoinment with attachment.
+
+#from create-appointment import *
+from evoutils.calendar import *
+from ldtp import *
+from ldtputils import *
+
+def read_data():
+ #Initialising XML parser with data file
+ data_object = LdtpDataFileParser (datafilename)
+
+ #Extracting imput data from xml file
+ summary = data_object.gettagvalue ('summary')[0]
+ location = data_object.gettagvalue ('location')[0]
+ description = data_object.gettagvalue ('description')[0]
+ from_date = data_object.gettagvalue ('start_date')[0]
+ to_date = data_object.gettagvalue ('due_date')[0]
+ from_time = data_object.gettagvalue ('start_time')[0]
+ to_time = data_object.gettagvalue ('due_time')[0]
+ calendar = data_object.gettagvalue ('calendar')[0]
+
+ repeat_every = data_object.gettagvalue ('repeat_every')[0]
+ duration = data_object.gettagvalue ('duration')[0]
+ no_of_times = data_object.gettagvalue ('no_of_times')[0]
+ repeat_method = data_object.gettagvalue ('repeat_method')[0]
+ exceptions = data_object.gettagvalue ('exceptions')[0]
+ dur_value = data_object.gettagvalue ('dur_value')[0]
+ dur_day = data_object.gettagvalue ('dur_day')[0]
+ return dur_value, dur_day, repeat_every, duration, no_of_times, repeat_method, exceptions, summary, location, description, from_date, to_date, from_time, to_time, calendar
+
+def appointment_withrecurrence():
+
+ try:
+ log('Create appoinment with attachment','teststart')
+ windowname = 'frmAppointment-Nosummary'
+ dur_value, dur_day, repeat_every, duration, no_of_times, repeat_method, exceptions, summary, location, description, from_date, to_date, from_time, to_time, calendar = read_data()
+
+ time.sleep(5)
+ more_items_todo = 'yes'
+
+ selectmenuitem ('frmEvolution-Calendars', 'mnuFile;mnuFile;mnuAppointment')
+ time.sleep (2)
+
+ if guiexist (windowname) == 0:
+ log ('Failed to open new appointment window', 'cause')
+ log('Create appoinment with attachment','testend')
+ raise LdtpExecutionError (0)
+ else:
+ i = insert_appointment (windowname, summary, location, description, from_date, from_time, to_date, to_time, calendar, more_items_todo)
+ if i == 1:
+ flag = 1
+ else:
+ try:
+ click(windowname,'btnRecurrence')
+ waittillguiexist('dlgRecurrence')
+ insert_recurrence ('dlgRecurrence',duration, dur_value, dur_day, repeat_every, repeat_method, no_of_times, exceptions)
+ log('Recurrence value entered','info')
+ time.sleep(3)
+ click(windowname, 'btnSave')
+ except:
+ print 'unable to create the recursive appoinment'
+ log('Create appoinment with attachment','testend')
+ raise LdtpExecutionError (0)
+
+ except:
+ log('unable to create the recursive appoinment','error')
+ log('Create appoinment with attachment','testend')
+ raise LdtpExecutionError (0)
+ log('Recursive Appointment created','info')
+ log('Create appoinment with attachment','testend')
+appointment_withrecurrence()
diff --git a/evolution/create-recursive-app.xml b/evolution/create-recursive-app.xml
new file mode 100644
index 0000000..4af0442
--- /dev/null
+++ b/evolution/create-recursive-app.xml
@@ -0,0 +1,18 @@
+<?xml version="1.0"?>
+<data>
+ <repeat_every>5</repeat_every>
+ <duration>month(s)</duration>
+ <dur_value>second</dur_value>
+ <dur_day>Saturday</dur_day>
+ <repeat_method>for</repeat_method>
+ <no_of_times>12</no_of_times>
+ <exceptions>12/25/2005 12/26/2005</exceptions>
+ <calendar>Personal</calendar>
+ <summary>Recursive appointment</summary>
+ <location>novell</location>
+ <start_time>3:00 AM</start_time>
+ <start_date>12/05/2005</start_date>
+ <due_date>12/30/2005</due_date>
+ <due_time>3:00 AM</due_time>
+ <description>sample desc</description>
+</data>
diff --git a/evolution/create_filter.py b/evolution/create_filter.py
new file mode 100644
index 0000000..2276c55
--- /dev/null
+++ b/evolution/create_filter.py
@@ -0,0 +1,177 @@
+#
+# Linux Desktop Testing Project http://www.gnomebangalore.org/ldtp
+#
+# Author:
+# Venkateswaran S <wenkat.s@gmail.com>
+#
+# Copyright 2004 Novell, Inc.
+#
+# This test script is free software; you can redistribute it and/or
+# modify it under the terms of the GNU Library General Public
+# License as published by the Free Software Foundation; either
+# version 2 of the License, or (at your option) any later version.
+#
+# This library is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+# Library General Public License for more details.
+#
+# You should have received a copy of the GNU Library General Public
+# License along with this library; if not, write to the
+# Free Software Foundation, Inc., 59 Temple Place - Suite 330,
+# Boston, MA 02111-1307, USA.
+#
+# This script will create a new task.
+
+from ldtp import *
+from ldtputils import *
+
+def verify_filter(rule_name):
+ windowname = 'dlgFilters'
+ selectmenuitem('frmEvolution-Mail','mnuEdit;mnuMessageFilters')
+ waittillguiexist(windowname)
+ if gettablerowindex (windowname,'tblFilterRules',rule_name) == -1:
+ print 'rule not found in the table filter rules'
+ click(windowname,'btnCancel')
+ return 0
+ else:
+ print 'rule name found'
+ click(windowname,'btnOK')
+ return 1
+
+def selectfolder(fldr,dest=''):
+
+ windowname = 'dlgSelectfolder'
+ waittillguiexist(windowname)
+ remap('evolution',windowname)
+ if gettreetablerowindex (windowname, 'ttblMailFolderTree', fldr) == -1:
+ click(windowname,'btnNew')
+ time.sleep(3)
+ waittillguiexist ('dlgCreatefolder')
+ settextvalue('dlgCreatefolder','txtFoldername',fldr)
+ selectrowpartialmatch ('dlgCreatefolder', 'ttblMailFolderTree',dest)
+ log('User Value Entered','info')
+ click('dlgCreatefolder','btnCreate')
+ time.sleep(3)
+ if guiexist('dlgEvolutionError'):
+ click('dlgEvolutionError','btnOK')
+ time.sleep(3)
+ click('dlgCreatefolder','btnCancel')
+ print 'Folder Name already exist'
+ log('Folder Already exists','error')
+ selectrowpartialmatch (windowname, 'ttblMailFolderTree',fldr)
+ log('Dest fldr selected','info')
+ click(windowname,'btnOK')
+ return 1
+ undoremap('evolution',windowname)
+
+def read_data():
+
+ data_object = LdtpDataFileParser (datafilename)
+
+ #Extracting imput data from xml file
+ filter_on = data_object.gettagvalue ('filter_on')[0]
+ rule_name = data_object.gettagvalue ('rule_name')[0]
+ if_components = data_object.gettagvalue ('if_components')[0]
+ if_properties = data_object.gettagvalue ('if_properties')[0]
+ if_values = data_object.gettagvalue ('if_values')[0]
+ then_actions = data_object.gettagvalue ('then_actions')[0]
+ then_values = data_object.gettagvalue ('then_values')[0]
+ execute_action = data_object.gettagvalue ('execute_action')[0]
+ print filter_on, rule_name, if_components, if_properties, if_values, then_actions, then_values, execute_action
+ return filter_on, rule_name, if_components, if_properties, if_values, then_actions, then_values, execute_action
+
+def create_filter(filter_on, rule_name, if_components, if_properties, if_values, then_actions, then_values, execute_action):
+ try:
+ log('Create a filter','teststart')
+ windowname = 'dlgAddFilterRule'
+
+ selectmenuitem('frmEvolution-Mail','mnuMessage;mnuCreateRule;mnuFilteron'+filter_on)
+ waittillguiexist(windowname)
+ if rule_name == '' :
+ print 'Need a valid rule name'
+ log('Rule name not specified','error')
+ else:
+ settextvalue(windowname,'txtRulename',rule_name)
+ log('Rule name has been set','info')
+ if execute_action == '':
+ print 'Execute actions not specified, hence the default has been taken'
+ else:
+ comboselect(windowname,'cboifanycriteriaaremet',execute_action)
+ log('type of execution set','info')
+ if_components = if_components.split(':')
+ if_properties = if_properties.split(':')
+ if_values = if_values.split(':')
+ if len(if_components) == len(if_properties) == len(if_values):
+ comboselect(windowname,'cboSubject',if_components[0])
+ time.sleep(2)
+ remap('evolution',windowname)
+ comboselect(windowname,'cbocontains',if_properties[0])
+ settextvalue(windowname,'txt1',if_values[0])
+ time.sleep(3)
+ length = len(if_components)
+ undoremap('evolution',windowname)
+ for i in range(1,length):
+ time.sleep(1)
+ click(windowname,'btnAdd')
+ time.sleep(3)
+ remap('evolution',windowname)
+ comboselect(windowname,'cboSender',if_components[i])
+ time.sleep(2)
+ undoremap('evolution',windowname)
+ remap('evolution',windowname)
+ comboselect(windowname,'cbocontains',if_properties[i])
+ settextvalue(windowname,'txt1',if_values[i])
+ undoremap('evolution',windowname)
+# time.sleep(2)
+ else:
+ print 'you must enter the values for if clause correctly'
+ log('Unable to create filter, because of unequal length','error')
+ then_actions = then_actions.split(':')
+ then_values = then_values.split(':')
+ if len(then_actions) == len(then_values):
+ length_actions = len(then_actions)
+ for i in range(0,length_actions):
+ time.sleep(2)
+# remap('evolution',windowname)
+ time.sleep(2)
+ comboselect(windowname,'cboMovetoFolder',then_actions[i])
+ if then_actions[i] == 'Move to Folder' or then_actions[i] == 'Copy to Folder':
+ click(windowname,'btn<clickheretoselectafolder>')
+ time.sleep(3)
+ setcontext('Select folder','Select Folder') #if this is fixed remove this line.
+ waittillguiexist('dlgSelectfolder')
+ chk_value = selectfolder(then_values[i])
+ time.sleep(3)
+ elif then_actions[i] == 'Delete' or then_actions[i] == 'Stop Processing' or then_actions[i] == 'Beep':
+ pass # there will be no work to do in these cases.Hence nothin to be set.
+ else:
+ pass # Shud write for all other cases.
+ time.sleep(2)
+ if i < length_actions-1:
+ click(windowname,'btnAdd1')
+# undoremap('evolution',windowname)
+ click(windowname,'btnOK')
+ time.sleep(3)
+ if guiexist('dlgEvolutionError') == 1:
+ print 'The rule name already exist'
+ log('Need to change the name','error')
+ click('dlgEvolutionError','btnOK')
+ time.sleep(1)
+ click(windowname,'btnCancel')
+ else:
+ if verify_filter(rule_name) == 1:
+ print 'The Filter has been created'
+ log('Filter created','info')
+ else:
+ print 'Filter verification failed'
+ log('Filter Verify failed','error')
+ else:
+ print 'you must enter the values for then clause correctly'
+ log('Unable to create filter, because of unequal length in then clause','error')
+ except:
+ print 'Unable to create a filter'
+ click(windowname,'btnCancel')
+ log('Unable to create a filter','error')
+ log('Create a filter','testend')
+
diff --git a/evolution/create_filter.xml b/evolution/create_filter.xml
new file mode 100644
index 0000000..2574f32
--- /dev/null
+++ b/evolution/create_filter.xml
@@ -0,0 +1,11 @@
+<?xml version="1.0"?>
+<data>
+ <filter_on>Subject</filter_on>
+ <rule_name>Sample111</rule_name>
+ <if_components>Sender:Subject:Message Body</if_components>
+ <if_properties>is:contains:contains</if_properties>
+ <if_values>Welcolution!:Prashanth Mohan:asdf</if_values>
+ <then_actions>Move to Folder:Copy to Folder:Copy to Folder</then_actions>
+ <then_values>venkat:filter:filter1</then_values>
+ <execute_action>if all criteria are met</execute_action>
+</data>
diff --git a/evolution/createaddrbook.py b/evolution/createaddrbook.py
new file mode 100644
index 0000000..65e27c4
--- /dev/null
+++ b/evolution/createaddrbook.py
@@ -0,0 +1,58 @@
+#!/usr/bin/env python
+#
+# Linux Desktop Testing Project http://www.gnomebangalore.org/ldtp
+#
+# Author:
+# Prashanth Mohan <prashmohan@gmail.com>
+#
+# Copyright 2004 Novell, Inc.
+#
+# This test script is free software; you can redistribute it and/or
+# modify it under the terms of the GNU Library General Public
+# License as published by the Free Software Foundation; either
+# version 2 of the License, or (at your option) any later version.
+#
+# This library is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+# Library General Public License for more details.
+#
+# You should have received a copy of the GNU Library General Public
+# License along with this library; if not, write to the
+# Free Software Foundation, Inc., 59 Temple Place - Suite 330,
+# Boston, MA 02111-1307, USA.
+#
+
+from ldtp import *
+from ldtputils import *
+from contact import *
+
+def newaddrbook(datafilename):
+
+ log ('Create New Address Book','teststart')
+ try:
+ data_object = LdtpDataFileParser (datafilename)
+ Name=data_object.gettagvalue ('Name')
+ #print Name
+ #time.sleep (10)
+ #selectContactPane()
+ window_id=getcurwindow()
+ selectmenuitem (window_id,'mnuFile;mnuNew;mnuAddressBook')
+ waittillguiexist ('dlgNewAddressBook')
+ time.sleep (3)
+ comboselect ('dlgNewAddressBook','cboType','On This Computer')
+ settextvalue ('dlgNewAddressBook','txtName',Name[0])
+ if stateenabled ('dlgNewAddressBook','btnOK')==0:
+ log ('Address Book Already Exists','info')
+ click ('dlgNewAddressBook','btnCancel')
+ else:
+ click ('dlgNewAddressBook','btnOK')
+ except:
+ log ('Error while creating New Address Book','error')
+ log ('Create New Address Book','testend')
+ raise LdtpExecutionError (0)
+ log ('Create New Address Book','testend')
+
+newaddrbook (datafilename)
+
+
diff --git a/evolution/createaddrbook.xml b/evolution/createaddrbook.xml
new file mode 100644
index 0000000..3d19937
--- /dev/null
+++ b/evolution/createaddrbook.xml
@@ -0,0 +1,4 @@
+<?xml version="1.0"?>
+<data>
+ <Name>test addr book</Name>
+</data> \ No newline at end of file
diff --git a/evolution/createmeeting.py b/evolution/createmeeting.py
new file mode 100644
index 0000000..0ac3b3d
--- /dev/null
+++ b/evolution/createmeeting.py
@@ -0,0 +1,31 @@
+#!/usr/bin/env python
+#
+# Linux Desktop Testing Project http://www.gnomebangalore.org/ldtp
+#
+# Author:
+# Prashanth Mohan <prashmohan@gmail.com>
+#
+# Copyright 2004 Novell, Inc.
+#
+# This test script is free software; you can redistribute it and/or
+# modify it under the terms of the GNU Library General Public
+# License as published by the Free Software Foundation; either
+# version 2 of the License, or (at your option) any later version.
+#
+# This library is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+# Library General Public License for more details.
+#
+# You should have received a copy of the GNU Library General Public
+# License along with this library; if not, write to the
+# Free Software Foundation, Inc., 59 Temple Place - Suite 330,
+# Boston, MA 02111-1307, USA.
+#
+
+
+from addmeeting import *
+
+selectCalendarPane ()
+
+addmeeting (datafilename,0)
diff --git a/evolution/createrecurmeet.py b/evolution/createrecurmeet.py
new file mode 100644
index 0000000..e39976b
--- /dev/null
+++ b/evolution/createrecurmeet.py
@@ -0,0 +1,30 @@
+#!/usr/bin/env python
+#
+# Linux Desktop Testing Project http://www.gnomebangalore.org/ldtp
+#
+# Author:
+# Prashanth Mohan <prashmohan@gmail.com>
+#
+# Copyright 2004 Novell, Inc.
+#
+# This test script is free software; you can redistribute it and/or
+# modify it under the terms of the GNU Library General Public
+# License as published by the Free Software Foundation; either
+# version 2 of the License, or (at your option) any later version.
+#
+# This library is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+# Library General Public License for more details.
+#
+# You should have received a copy of the GNU Library General Public
+# License along with this library; if not, write to the
+# Free Software Foundation, Inc., 59 Temple Place - Suite 330,
+# Boston, MA 02111-1307, USA.
+#
+
+
+from addmeeting import *
+
+
+addmeeting (datafilename,1)
diff --git a/evolution/del-non-sys-folder.py b/evolution/del-non-sys-folder.py
new file mode 100644
index 0000000..e3ee7cb
--- /dev/null
+++ b/evolution/del-non-sys-folder.py
@@ -0,0 +1,36 @@
+#
+# Linux Desktop Testing Project http://www.gnomebangalore.org/ldtp
+#
+# Author:
+# Venkateswaran S <wenkat.s@gmail.com>
+#
+# Copyright 2004 Novell, Inc.
+#
+# This test script is free software; you can redistribute it and/or
+# modify it under the terms of the GNU Library General Public
+# License as published by the Free Software Foundation; either
+# version 2 of the License, or (at your option) any later version.
+#
+# This library is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+# Library General Public License for more details.
+#
+# You should have received a copy of the GNU Library General Public
+# License along with this library; if not, write to the
+# Free Software Foundation, Inc., 59 Temple Place - Suite 330,
+# Boston, MA 02111-1307, USA.
+#
+
+# Delete a non system folder.
+from menu_reorganization import *
+
+data_object = LdtpDataFileParser (datafilename)
+#Extracting imput data from xml file
+
+fldr = data_object.gettagvalue ('folder_name')[0]
+if delete_nonsys_folder(fldr) == 1:
+ print fldr + ' has been Deleted'
+else:
+ print 'Unable to delete'
+
diff --git a/evolution/del-non-sys-folder.xml b/evolution/del-non-sys-folder.xml
new file mode 100644
index 0000000..abacdee
--- /dev/null
+++ b/evolution/del-non-sys-folder.xml
@@ -0,0 +1,4 @@
+<?xml version="1.0"?>
+<data>
+ <folder_name>test</folder_name>
+</data>
diff --git a/evolution/del_assigned_task.py b/evolution/del_assigned_task.py
new file mode 100644
index 0000000..148da30
--- /dev/null
+++ b/evolution/del_assigned_task.py
@@ -0,0 +1,85 @@
+#
+# Linux Desktop Testing Project http://www.gnomebangalore.org/ldtp
+#
+# Author:
+# Venkateswaran S <wenkat.s@gmail.com>
+#
+# Copyright 2004 Novell, Inc.
+#
+# This test script is free software; you can redistribute it and/or
+# modify it under the terms of the GNU Library General Public
+# License as published by the Free Software Foundation; either
+# version 2 of the License, or (at your option) any later version.
+#
+# This library is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+# Library General Public License for more details.
+#
+# You should have received a copy of the GNU Library General Public
+# License along with this library; if not, write to the
+# Free Software Foundation, Inc., 59 Temple Place - Suite 330,
+# Boston, MA 02111-1307, USA.
+#
+# This script will delete a particular task.
+
+
+from ldtp import *
+from ldtputils import *
+#from evoutils.tasks import *
+import string, sys, os, commands, time, filecmp
+
+def read_data ():
+ log('read user data','teststart')
+ try:
+ data_object = LdtpDataFileParser (datafilename)
+ summary = data_object.gettagvalue ('summary')
+ log('User data read successfull','info')
+ log('read user data','testend')
+ return summary
+
+ except:
+ log('Unable to read the user data or data file missing','error')
+ log('read user data','testend')
+ raise LdtpExecutionError(0)
+
+ log('read user data','testend')
+# The takes the tsak summary as input and deletes that task.
+# Note: This doesnt chk whether the selected task is assigned or not.
+
+try:
+ log('Delete a task','teststart')
+ Wrong_index = 'The index you entered exceeded the no of available tasks'
+ waittillguiexist('frmEvolution-Tasks')
+ summary = read_data()
+
+ remap('evolution','frmEvolution-Tasks')
+ no_rows_b4deleting = getrowcount ('frmEvolution-Tasks', 'tblTaskTable')
+
+ if selectrowpartialmatch ('frmEvolution-Tasks', 'tblTaskTable', summary[0]) == 1:
+
+ click('frmEvolution-Tasks', 'btnDelete')
+ waittillguiexist('dlgEvolutionQuery')
+ undoremap('evolution','frmEvolution-Tasks')
+ remap('evolution','dlgEvolutionQuery')
+ time.sleep(3)
+ click('dlgEvolutionQuery','btnDelete')
+ undoremap('evolution','dlgEvolutionQuery')
+ remap('evolution','frmEvolution-Tasks')
+ no_rows_afterdeleting = getrowcount ('frmEvolution-Tasks', 'tblTaskTable')
+ if no_rows_afterdeleting == no_rows_b4deleting -1:
+ print 'The task has been deleted'
+ log('the task has been deleted','info')
+ else:
+ print 'Deletion of task verify failed'
+ log('Deletion of task verify failed','error')
+ else:
+ print 'Unable to select a task with the given summary'
+ log('unable to select the task','error')
+
+except:
+ log('Unable to delete a Task','error')
+ log('Delete a task','testend')
+ raise LdtpExecutionError(0)
+
+log('Delete a task','testend')
diff --git a/evolution/del_assigned_task.xml b/evolution/del_assigned_task.xml
new file mode 100644
index 0000000..09af00d
--- /dev/null
+++ b/evolution/del_assigned_task.xml
@@ -0,0 +1,4 @@
+<?xml version="1.0"?>
+<data>
+ <summary>This is the modified summary</summary>
+</data>
diff --git a/evolution/del_task.py b/evolution/del_task.py
new file mode 100644
index 0000000..23bc3c0
--- /dev/null
+++ b/evolution/del_task.py
@@ -0,0 +1,87 @@
+#
+# Linux Desktop Testing Project http://www.gnomebangalore.org/ldtp
+#
+# Author:
+# Venkateswaran S <wenkat.s@gmail.com>
+#
+# Copyright 2004 Novell, Inc.
+#
+# This test script is free software; you can redistribute it and/or
+# modify it under the terms of the GNU Library General Public
+# License as published by the Free Software Foundation; either
+# version 2 of the License, or (at your option) any later version.
+#
+# This library is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+# Library General Public License for more details.
+#
+# You should have received a copy of the GNU Library General Public
+# License along with this library; if not, write to the
+# Free Software Foundation, Inc., 59 Temple Place - Suite 330,
+# Boston, MA 02111-1307, USA.
+#
+# This script will delete a particular task.
+
+
+from ldtp import *
+from ldtputils import *
+#from evoutils.tasks import *
+import string, sys, os, commands, time, filecmp
+
+def read_data ():
+
+ log('read user data','teststart')
+ try:
+ data_object = LdtpDataFileParser (datafilename)
+ summary = data_object.gettagvalue ('summary')
+ log('User data read successfull','info')
+ log('read user data','testend')
+ return summary
+
+ except:
+ log('Unable to read the user data or data file missing','error')
+ log('read user data','testend')
+ raise LdtpExecutionError(0)
+
+ log('read user data','testend')
+
+# The takes the tsak summary as input and deletes that task.
+# Note: This doesnt chk whether the selected task is assigned or not.
+
+try:
+ log('Delete a task','teststart')
+ Wrong_index = 'The index you entered exceeded the no of available tasks'
+ waittillguiexist('frmEvolution-Tasks')
+ summary = read_data()
+
+ remap('evolution','frmEvolution-Tasks')
+ no_rows_b4deleting = getrowcount ('frmEvolution-Tasks', 'tblTaskTable')
+
+ if selectrowpartialmatch ('frmEvolution-Tasks', 'tblTaskTable', summary[0]) == 1:
+ log('The specified task has been deleted','info')
+ click('frmEvolution-Tasks', 'btnDelete')
+ waittillguiexist('dlgEvolutionQuery')
+ remap('evolution','dlgEvolutionQuery')
+ time.sleep(3)
+ click('dlgEvolutionQuery','btnDelete')
+ undoremap('evolution','dlgEvolutionQuery')
+ remap('evolution','frmEvolution-Tasks')
+ no_rows_afterdeleting = getrowcount ('frmEvolution-Tasks', 'tblTaskTable')
+ if no_rows_afterdeleting == no_rows_b4deleting -1:
+ print 'The task has been deleted'
+ time.sleep(3)
+ log('the task has been deleted','info')
+ else:
+ print 'Deletion of task verify failed'
+ log('Deletion of task verify failed','error')
+ else:
+ print 'Unable to select a task with the given summary'
+ log('unable to select the task','error')
+ undoremap('evolution','frmEvolution-Tasks')
+except:
+ log('Unable to delete a Task','error')
+ log('Delete a task','testend')
+ raise LdtpExecutionError(0)
+
+log('Delete a task','testend')
diff --git a/evolution/del_task.xml b/evolution/del_task.xml
new file mode 100644
index 0000000..09af00d
--- /dev/null
+++ b/evolution/del_task.xml
@@ -0,0 +1,4 @@
+<?xml version="1.0"?>
+<data>
+ <summary>This is the modified summary</summary>
+</data>
diff --git a/evolution/deletecontact.py b/evolution/deletecontact.py
new file mode 100644
index 0000000..75af3d4
--- /dev/null
+++ b/evolution/deletecontact.py
@@ -0,0 +1,33 @@
+#!/usr/bin/env python
+#
+# Linux Desktop Testing Project http://www.gnomebangalore.org/ldtp
+#
+# Author:
+# Prashanth Mohan <prashmohan@gmail.com>
+#
+# Copyright 2004 Novell, Inc.
+#
+# This test script is free software; you can redistribute it and/or
+# modify it under the terms of the GNU Library General Public
+# License as published by the Free Software Foundation; either
+# version 2 of the License, or (at your option) any later version.
+#
+# This library is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+# Library General Public License for more details.
+#
+# You should have received a copy of the GNU Library General Public
+# License along with this library; if not, write to the
+# Free Software Foundation, Inc., 59 Temple Place - Suite 330,
+# Boston, MA 02111-1307, USA.
+#
+
+from ldtp import *
+from ldtputils import *
+
+from contact import deletecontact
+
+data_object = LdtpDataFileParser (datafilename)
+Name=data_object.gettagvalue ('Name')
+deletecontact (Name[0])
diff --git a/evolution/deletecontact.xml b/evolution/deletecontact.xml
new file mode 100644
index 0000000..490023c
--- /dev/null
+++ b/evolution/deletecontact.xml
@@ -0,0 +1,4 @@
+<?xml version="1.0"?>
+<data>
+ <Name>Test Name</Name>
+</data>
diff --git a/evolution/deletecontactlist.py b/evolution/deletecontactlist.py
new file mode 100644
index 0000000..9feef2a
--- /dev/null
+++ b/evolution/deletecontactlist.py
@@ -0,0 +1,34 @@
+#!/usr/bin/env python
+#
+# Linux Desktop Testing Project http://www.gnomebangalore.org/ldtp
+#
+# Author:
+# Prashanth Mohan <prashmohan@gmail.com>
+#
+# Copyright 2004 Novell, Inc.
+#
+# This test script is free software; you can redistribute it and/or
+# modify it under the terms of the GNU Library General Public
+# License as published by the Free Software Foundation; either
+# version 2 of the License, or (at your option) any later version.
+#
+# This library is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+# Library General Public License for more details.
+#
+# You should have received a copy of the GNU Library General Public
+# License along with this library; if not, write to the
+# Free Software Foundation, Inc., 59 Temple Place - Suite 330,
+# Boston, MA 02111-1307, USA.
+#
+
+from ldtp import *
+from ldtputils import *
+from contact import deletecontactlist
+
+data_object = LdtpDataFileParser (datafilename)
+ListName=data_object.gettagvalue ('ListName')
+deletecontactlist (ListName[0])
+
+
diff --git a/evolution/deletecontactlist.xml b/evolution/deletecontactlist.xml
new file mode 100644
index 0000000..6af8bbb
--- /dev/null
+++ b/evolution/deletecontactlist.xml
@@ -0,0 +1,4 @@
+<?xml version="1.0"?>
+<data>
+ <ListName>Test List</ListName>
+</data>
diff --git a/evolution/deletefolder.xml b/evolution/deletefolder.xml
new file mode 100644
index 0000000..8dcbd41
--- /dev/null
+++ b/evolution/deletefolder.xml
@@ -0,0 +1,9 @@
+<?xml version="1.0"?>
+<data>
+ <delfolder>abc</delfolder>
+ <crefolder>345</crefolder>
+ <from_folder>123</from_folder>
+ <to_folder>partha@matrix.net</to_folder>
+ <oldfolder>123</oldfolder>
+ <newfolder>567</newfolder>
+</data>
diff --git a/evolution/deletemailaccount.py b/evolution/deletemailaccount.py
new file mode 100644
index 0000000..394b05f
--- /dev/null
+++ b/evolution/deletemailaccount.py
@@ -0,0 +1,48 @@
+#!/usr/bin/env python
+#
+# Linux Desktop Testing Project http://www.gnomebangalore.org/ldtp
+#
+# Author:
+# Prashanth Mohan <prashmohan@gmail.com>
+#
+# Copyright 2004 Novell, Inc.
+#
+# This test script is free software; you can redistribute it and/or
+# modify it under the terms of the GNU Library General Public
+# License as published by the Free Software Foundation; either
+# version 2 of the License, or (at your option) any later version.
+#
+# This library is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+# Library General Public License for more details.
+#
+# You should have received a copy of the GNU Library General Public
+# License along with this library; if not, write to the
+# Free Software Foundation, Inc., 59 Temple Place - Suite 330,
+# Boston, MA 02111-1307, USA.
+#
+
+
+from mailaccounts import *
+
+try:
+ try:
+ data_object = LdtpDataFileParser (datafilename)
+ account_name=data_object.gettagvalue ('accountname')
+ email=data_object.gettagvalue ('email')
+ except:
+ log ('Error while reading values for delete email account test','cause')
+ raise LdtpExecutionError (0)
+ try:
+ if account_name!=[]:
+ deletemailaccount (account_name[0])
+ elif email!=[]:
+ deletemailaccount (email[0])
+ else:
+ log ('Input data incorrect','cause')
+ except:
+ log ('delete email account test failed','error')
+ raise LdtpExecutionError (0)
+except:
+ raise LdtpExecutionError (0)
diff --git a/evolution/deletemailaccount.xml b/evolution/deletemailaccount.xml
new file mode 100644
index 0000000..c60ce56
--- /dev/null
+++ b/evolution/deletemailaccount.xml
@@ -0,0 +1,4 @@
+<?xml version="1.0"?>
+<data>
+ <accountname>IMAP Account</accountname>
+</data>
diff --git a/evolution/deletemeetingall.xml b/evolution/deletemeetingall.xml
new file mode 100644
index 0000000..3283e66
--- /dev/null
+++ b/evolution/deletemeetingall.xml
@@ -0,0 +1,6 @@
+<?xml version="1.0"?>
+<data>
+ <fromdate>10/24/2005</fromdate>
+ <summary>new summary</summary>
+ <occurance>0</occurance>
+</data>
diff --git a/evolution/deletemeetingone.xml b/evolution/deletemeetingone.xml
new file mode 100644
index 0000000..946fd35
--- /dev/null
+++ b/evolution/deletemeetingone.xml
@@ -0,0 +1,6 @@
+<?xml version="1.0"?>
+<data>
+ <fromdate>10/26/2005</fromdate>
+ <summary>dddd</summary>
+ <occurance>2</occurance>
+</data>
diff --git a/evolution/deletemessagewhenoffline.py b/evolution/deletemessagewhenoffline.py
new file mode 100644
index 0000000..9b8750c
--- /dev/null
+++ b/evolution/deletemessagewhenoffline.py
@@ -0,0 +1,42 @@
+#!/usr/bin/env python
+#
+# Linux Desktop Testing Project http://www.gnomebangalore.org/ldtp
+#
+# Author:
+# Prashanth Mohan <prashmohan@gmail.com>
+#
+# Copyright 2004 Novell, Inc.
+#
+# This test script is free software; you can redistribute it and/or
+# modify it under the terms of the GNU Library General Public
+# License as published by the Free Software Foundation; either
+# version 2 of the License, or (at your option) any later version.
+#
+# This library is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+# Library General Public License for more details.
+#
+# You should have received a copy of the GNU Library General Public
+# License along with this library; if not, write to the
+# Free Software Foundation, Inc., 59 Temple Place - Suite 330,
+# Boston, MA 02111-1307, USA.
+#
+from offline import *
+
+try:
+ try:
+ data_object = LdtpDataFileParser (datafilename)
+ folder = data_object.gettagvalue ('folder')
+ subject = data_object.gettagvalue ('subject')
+ except:
+ log ('Error while reading values for delete message test','cause')
+ raise LdtpExecutionError (0)
+ try:
+ #go_offline ()
+ deletemessage (folder[0],subject[0])
+ except:
+ log ('delete message when offline test failed','error')
+ raise LdtpExecutionError (0)
+except:
+ raise LdtpExecutionError (0)
diff --git a/evolution/deletemessagewhenoffline.xml b/evolution/deletemessagewhenoffline.xml
new file mode 100644
index 0000000..278ea88
--- /dev/null
+++ b/evolution/deletemessagewhenoffline.xml
@@ -0,0 +1,5 @@
+<?xml version="1.0"?>
+<data>
+ <folder>backup</folder>
+ <subject>asd</subject>
+</data>
diff --git a/evolution/deletesingleinstmeeting.py b/evolution/deletesingleinstmeeting.py
new file mode 100644
index 0000000..7761ea5
--- /dev/null
+++ b/evolution/deletesingleinstmeeting.py
@@ -0,0 +1,47 @@
+#!/usr/bin/env python
+#
+# Linux Desktop Testing Project http://www.gnomebangalore.org/ldtp
+#
+# Author:
+# Prashanth Mohan <prashmohan@gmail.com>
+#
+# Copyright 2004 Novell, Inc.
+#
+# This test script is free software; you can redistribute it and/or
+# modify it under the terms of the GNU Library General Public
+# License as published by the Free Software Foundation; either
+# version 2 of the License, or (at your option) any later version.
+#
+# This library is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+# Library General Public License for more details.
+#
+# You should have received a copy of the GNU Library General Public
+# License along with this library; if not, write to the
+# Free Software Foundation, Inc., 59 Temple Place - Suite 330,
+# Boston, MA 02111-1307, USA.
+#
+
+from modifymeeting import *
+
+
+
+try:
+ try:
+ data_object = LdtpDataFileParser (datafilename)
+ fromdate=data_object.gettagvalue ('fromdate')
+ summary=data_object.gettagvalue ('summary')
+ occurance=data_object.gettagvalue ('occurance')
+ except:
+ log ('Error while reading values for delete meeting','cause')
+ raise LdtpExecutionError (0)
+
+ try:
+ deletemeeting (fromdate[0],summary[0],int(occurance[0]))
+ except:
+ log ('Unable to delete meeting','error')
+ raise LdtpExecutionError (0)
+
+except:
+ raise LdtpExecutionError (0)
diff --git a/evolution/editsign.py b/evolution/editsign.py
new file mode 100644
index 0000000..b3aba38
--- /dev/null
+++ b/evolution/editsign.py
@@ -0,0 +1,45 @@
+#!/usr/bin/env python
+#
+# Linux Desktop Testing Project http://www.gnomebangalore.org/ldtp
+#
+# Author:
+# Prashanth Mohan <prashmohan@gmail.com>
+#
+# Copyright 2004 Novell, Inc.
+#
+# This test script is free software; you can redistribute it and/or
+# modify it under the terms of the GNU Library General Public
+# License as published by the Free Software Foundation; either
+# version 2 of the License, or (at your option) any later version.
+#
+# This library is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+# Library General Public License for more details.
+#
+# You should have received a copy of the GNU Library General Public
+# License along with this library; if not, write to the
+# Free Software Foundation, Inc., 59 Temple Place - Suite 330,
+# Boston, MA 02111-1307, USA.
+#
+from composerprefs import *
+
+try:
+ try:
+ data_object = LdtpDataFileParser (datafilename)
+ text=data_object.gettagvalue ('text')
+ name=data_object.gettagvalue ('name')
+ newname=data_object.gettagvalue ('newname')
+ except:
+ log ('Error while reading values for edit signature test','cause')
+ raise LdtpExecutionError (0)
+ try:
+ if len (newname) >0:
+ edit_signature (name[0],text[0],newname[0])
+ else:
+ edit_signature (name[0],text[0])
+ except:
+ log ('edit signature test failed','error')
+ raise LdtpExecutionError (0)
+except:
+ raise LdtpExecutionError (0)
diff --git a/evolution/editsign.xml b/evolution/editsign.xml
new file mode 100644
index 0000000..de0f81b
--- /dev/null
+++ b/evolution/editsign.xml
@@ -0,0 +1,5 @@
+<?xml version="1.0"?>
+<data>
+ <name>Signature</name>
+ <text>edited Signature</text>
+</data>
diff --git a/evolution/emptysubjectline.py b/evolution/emptysubjectline.py
new file mode 100644
index 0000000..54bf2f1
--- /dev/null
+++ b/evolution/emptysubjectline.py
@@ -0,0 +1,41 @@
+#!/usr/bin/env python
+#
+# Linux Desktop Testing Project http://www.gnomebangalore.org/ldtp
+#
+# Author:
+# Prashanth Mohan <prashmohan@gmail.com>
+#
+# Copyright 2004 Novell, Inc.
+#
+# This test script is free software; you can redistribute it and/or
+# modify it under the terms of the GNU Library General Public
+# License as published by the Free Software Foundation; either
+# version 2 of the License, or (at your option) any later version.
+#
+# This library is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+# Library General Public License for more details.
+#
+# You should have received a copy of the GNU Library General Public
+# License along with this library; if not, write to the
+# Free Software Foundation, Inc., 59 Temple Place - Suite 330,
+# Boston, MA 02111-1307, USA.
+#
+
+from composerprefs import *
+
+try:
+ try:
+ data_object = LdtpDataFileParser (datafilename)
+ to = data_object.gettagvalue ('to')
+ except:
+ log ('Error while reading values for empty subject test','cause')
+ raise LdtpExecutionError (0)
+ try:
+ prompt_for_empty_subject (to[0])
+ except:
+ log ('empty subject line test failed','error')
+ raise LdtpExecutionError (0)
+except:
+ raise LdtpExecutionError (0)
diff --git a/evolution/emptysubjectline.xml b/evolution/emptysubjectline.xml
new file mode 100644
index 0000000..9a116cb
--- /dev/null
+++ b/evolution/emptysubjectline.xml
@@ -0,0 +1,4 @@
+<?xml version="1.0"?>
+<data>
+ <to>prashmohan@gmail.com</to>
+</data>
diff --git a/evolution/enabledisablemailaccount.py b/evolution/enabledisablemailaccount.py
new file mode 100644
index 0000000..3ce784b
--- /dev/null
+++ b/evolution/enabledisablemailaccount.py
@@ -0,0 +1,51 @@
+#!/usr/bin/env python
+#
+# Linux Desktop Testing Project http://www.gnomebangalore.org/ldtp
+#
+# Author:
+# Prashanth Mohan <prashmohan@gmail.com>
+#
+# Copyright 2004 Novell, Inc.
+#
+# This test script is free software; you can redistribute it and/or
+# modify it under the terms of the GNU Library General Public
+# License as published by the Free Software Foundation; either
+# version 2 of the License, or (at your option) any later version.
+#
+# This library is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+# Library General Public License for more details.
+#
+# You should have received a copy of the GNU Library General Public
+# License along with this library; if not, write to the
+# Free Software Foundation, Inc., 59 Temple Place - Suite 330,
+# Boston, MA 02111-1307, USA.
+#
+from mailaccounts import *
+
+try:
+ try:
+ data_object = LdtpDataFileParser (datafilename)
+ account_name=data_object.gettagvalue ('accountname')
+ email=data_object.gettagvalue ('email')
+ except:
+ log ('Error while reading values for enable/disable email account test','cause')
+ raise LdtpExecutionError (0)
+ try:
+ time.sleep (3)
+ if account_name!=[]:
+ disablemailaccount (account_name[0])
+ time.sleep (3)
+ enablemailaccount (account_name[0])
+ elif email!=[]:
+ disablemailaccount (email[0])
+ time.sleep (3)
+ enablemailaccount (email[0])
+ else:
+ log ('Input data incorrect','cause')
+ except:
+ log ('enable/disable email account test failed','error')
+ raise LdtpExecutionError (0)
+except:
+ raise LdtpExecutionError (0)
diff --git a/evolution/enabledisablemailaccount.xml b/evolution/enabledisablemailaccount.xml
new file mode 100644
index 0000000..3cd32d7
--- /dev/null
+++ b/evolution/enabledisablemailaccount.xml
@@ -0,0 +1,4 @@
+<?xml version="1.0"?>
+<data>
+ <email>partha@matrix.net</email>
+</data>
diff --git a/evolution/evo-testing.xml b/evolution/evo-testing.xml
new file mode 100644
index 0000000..44ea895
--- /dev/null
+++ b/evolution/evo-testing.xml
@@ -0,0 +1,255 @@
+<?xml version='1.0' encoding='utf-8'?>
+<!-- XML Logging -->
+<ldtp>
+<info>appmap file name evolution.map</info>
+<group name="Executing-group1">
+<script name="addcontact.py">
+<datafilename>addcontact.xml</datafilename>
+<test name="Add-New-Contact">
+<test name="Open-Evolution-Contacts-Pane">
+</test>
+<test name="Selecting-a-given-Address-book">
+<test name="Open-Evolution-Contacts-Pane">
+</test>
+</test>
+<warning>Page tab name already in selected state</warning>
+<debug>Contact Editor</debug>
+<debug>Contact Editor - Name, Test</debug>
+<test name="Verify-Added-Contact">
+<test name="Selecting-a-given-Address-book">
+<test name="Open-Evolution-Contacts-Pane">
+</test>
+</test>
+<test name="Select-Contact">
+</test>
+<debug>Contact Editor</debug>
+<debug>Contact Editor - Name, Test</debug>
+</test>
+</test>
+</script>
+<script name="modifycontact.py">
+<datafilename>modifycontact.xml</datafilename>
+<test name="Contact-Modificaton">
+<test name="Getting-values-for-Contact-Modification">
+</test>
+<test name="Selecting-a-given-Address-book">
+<test name="Open-Evolution-Contacts-Pane">
+<error>Unable to find object name: frmEvolution-Mail in appmap</error>
+</test>
+</test>
+<test name="Select-Contact">
+</test>
+<debug>Contact Editor</debug>
+<debug>Contact Editor - Name, Test</debug>
+<test name="Verify-Modified-Contact">
+<test name="Selecting-a-given-Address-book">
+<test name="Open-Evolution-Contacts-Pane">
+<error>Unable to find object name: frmEvolution-Mail in appmap</error>
+</test>
+</test>
+<test name="Select-Contact">
+</test>
+<debug>Contact Editor</debug>
+<debug>Contact Editor - Name, Test</debug>
+</test>
+</test>
+</script>
+</group>
+<group name="Executing-group2">
+<script name="deletecontact.py">
+<datafilename>deletecontact.xml</datafilename>
+<test name="Deleting-a-contact">
+</test>
+</script>
+</group>
+<group name="Executing-group3">
+<script name="addcontactlist.py">
+<datafilename>addcontactlist.xml</datafilename>
+<test name="Add-New-List">
+<test name="Get-Contact-List-values">
+</test>
+<test name="Open-Evolution-Contacts-Pane">
+<error>Unable to find object name: frmEvolution-Mail in appmap</error>
+</test>
+<debug>Contact List Editor</debug>
+<debug>Test List</debug>
+<test name="checking-if-List-added-successfully">
+<test name="Select-Contact">
+</test>
+</test>
+</test>
+</script>
+<script name="modifycontactlist.py">
+<datafilename>modifycontactlist.xml</datafilename>
+<test name="Modify-Contact-List">
+<test name="Get-Modify-Contact-List-values">
+</test>
+<test name="Open-Contact-List">
+<test name="Select-Contact">
+</test>
+<debug>Contact List Editor</debug>
+<debug>Test List</debug>
+</test>
+<test name="Add-to-Contact-List">
+</test>
+<test name="Remove-from-Contact-List">
+</test>
+<test name="Verification-for-Contact-List-modification">
+<test name="Open-Contact-List">
+<test name="Select-Contact">
+</test>
+<debug>Contact List Editor</debug>
+<debug>Test List</debug>
+</test>
+<debug>Contact List Editor</debug>
+<debug>Test List</debug>
+</test>
+</test>
+</script>
+<script name="deletecontactlist.py">
+<datafilename>deletecontactlist.xml</datafilename>
+<test name="Delete-Contact-List">
+<test name="Deleting-a-contact">
+</test>
+</test>
+</script>
+</group>
+<group name="Executing-group4">
+<script name="createaddrbook.py">
+<datafilename>createaddrbook.xml</datafilename>
+<test name="Create-New-Address-Book">
+<error>Unable to find object name: frmEvolution-Mail in appmap</error>
+</test>
+</script>
+</group>
+<group name="Executing-group5">
+<script name="createmeeting.py">
+<datafilename>create-meeting.xml</datafilename>
+<test name="Open-Evolution-Calendars-Pane">
+<error>Unable to find object name: frmEvolution-Mail in appmap</error>
+</test>
+<test name="Add-New-Meeting">
+<test name="Getting-Values-for-New-Meeting">
+</test>
+<test name="Define-meeting-values">
+<warning>Check Menu Item is not checked</warning>
+<debug>Meeting - No summary</debug>
+<debug>Meeting - new summary</debug>
+<warning>Check Menu Item is already checked</warning>
+</test>
+<test name="Add-Attendees">
+</test>
+<test name="Verify-Added-Meeting">
+<test name="Selecting-a-Meeting">
+<test name="Selecting-the-Date">
+</test>
+</test>
+<debug>Meeting - No summary</debug>
+<debug>Meeting - new summary</debug>
+</test>
+</test>
+</script>
+<script name="createrecurmeet.py">
+<datafilename>create-meeting-recur.xml</datafilename>
+<test name="Add-New-Meeting">
+<test name="Getting-Values-for-New-Meeting">
+</test>
+<test name="Define-meeting-values">
+<warning>Check Menu Item is not checked</warning>
+<debug>Meeting - No summary</debug>
+<debug>Meeting - dddd</debug>
+<warning>Check Menu Item is already checked</warning>
+</test>
+<test name="Add-Attendees">
+</test>
+<info>Recurrence details set successfully</info>
+<test name="Verify-Added-Meeting">
+<test name="Selecting-a-Meeting">
+<test name="Selecting-the-Date">
+</test>
+</test>
+<debug>Meeting - No summary</debug>
+<debug>Meeting - dddd</debug>
+</test>
+</test>
+</script>
+<script name="modifythisinstmeet.py">
+<datafilename>modify-meeting.xml</datafilename>
+<test name="Modify-Meeting">
+<test name="Getting-Values-for-New-Meeting">
+</test>
+<test name="Selecting-a-Meeting">
+<test name="Selecting-the-Date">
+</test>
+</test>
+<debug>Meeting - No summary</debug>
+<debug>Meeting - new summary</debug>
+<test name="Define-meeting-values">
+<warning>Check Menu Item is not checked</warning>
+<debug>Meeting - No summary</debug>
+<debug>Meeting - new summary</debug>
+<warning>Check Menu Item is already checked</warning>
+</test>
+<test name="Add-Attendees">
+</test>
+<test name="Verify-modified-Meeting">
+<test name="Verify-Added-Meeting">
+<test name="Selecting-a-Meeting">
+<test name="Selecting-the-Date">
+</test>
+</test>
+<debug>Meeting - No summary</debug>
+<debug>Meeting - new summary</debug>
+</test>
+</test>
+</script>
+<script name="modifyallinstmeet.py">
+<datafilename>modify-meeting-recur.xml</datafilename>
+<test name="Modify-Meeting">
+<test name="Getting-Values-for-New-Meeting">
+</test>
+<test name="Selecting-a-Meeting">
+<test name="Selecting-the-Date">
+</test>
+</test>
+<debug>Meeting - No summary</debug>
+<debug>Meeting - dddd</debug>
+<test name="Define-meeting-values">
+<warning>Check Menu Item is not checked</warning>
+<debug>Meeting - No summary</debug>
+<debug>Meeting - dddd</debug>
+<warning>Check Menu Item is already checked</warning>
+</test>
+<test name="Add-Attendees">
+</test>
+<test name="Verify-modified-Meeting">
+<test name="Verify-Added-Meeting">
+<test name="Selecting-a-Meeting">
+<test name="Selecting-the-Date">
+</test>
+</test>
+<debug>Meeting - No summary</debug>
+<debug>Meeting - dddd</debug>
+</test>
+</test>
+</script>
+<script name="deletesingleinstmeeting.py">
+<datafilename>deletemeetingone.xml</datafilename>
+<test name="Delete-Meeting/Appointment">
+<test name="Selecting-a-Meeting">
+<test name="Selecting-the-Date">
+</test>
+</test>
+</test>
+</script>
+<script name="deletesingleinstmeeting.py">
+<datafilename>deletemeetingall.xml</datafilename>
+<test name="Delete-Meeting/Appointment">
+<test name="Selecting-a-Meeting">
+<test name="Selecting-the-Date">
+</test>
+</test>
+</test>
+</script>
+</group>
+</ldtp>
diff --git a/evolution/evoutils/calendar.py b/evolution/evoutils/calendar.py
new file mode 100644
index 0000000..86da7b2
--- /dev/null
+++ b/evolution/evoutils/calendar.py
@@ -0,0 +1,282 @@
+#!/usr/bin/python
+#
+# Linux Desktop Testing Project http://www.gnomebangalore.org/ldtp
+#
+# Author:
+# Premkumar <jpremkumar@novell.com>
+# Venkateswaran S <wenkat.s@gmail.com>
+#
+# Copyright 2004 Novell, Inc.
+#
+# This library is free software; you can redistribute it and/or
+# modify it under the terms of the GNU Library General Public
+# License as published by the Free Software Foundation; either
+# version 2 of the License, or (at your option) any later version.
+#
+# This library is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+# Library General Public License for more details.
+#
+# You should have received a copy of the GNU Library General Public
+# License along with this library; if not, write to the
+# Free Software Foundation, Inc., 59 Temple Place - Suite 330,
+# Boston, MA 02111-1307, USA.
+#
+
+from ldtp import *
+from ldtputils import *
+from evoutils.mail import *
+
+def getrecentrowindex (windowname, tablename, column, summary):
+ totalcount = getrowcount (windowname, tablename)
+ if totalcount != 0:
+ for i in range (totalcount-1, -1, -1):
+ cur_summary = getcellvalue (windowname, tablename, i, column)
+ print cur_summary + ' == ' + summary
+ if summary == cur_summary:
+ return i
+ return -1
+
+def selectdate (new_date):
+ try:
+ selectmenuitem ('frmEvolution-Calendars','mnuView;mnuSelectDate')
+ if waittillguiexist ('dlgSelectDate') == 0:
+ log ('Select date dialog is not open', 'cause')
+ raise LdtpExecutionError (0)
+ date_components = new_date.split ('/')
+ month = int (date_components[1])
+ mnt=month
+ if month < 0 or month > 12:
+ log ('Given month is invalid', 'cause')
+ raise LdtpExecutionError (0)
+ if month==1:
+ month='January'
+ elif month==2:
+ month='February'
+ elif month==3:
+ month='March'
+ elif month==4:
+ month='April'
+ elif month==5:
+ month='May'
+ elif month==6:
+ month='June'
+ elif month==7:
+ month='July'
+ elif month==8:
+ month='August'
+ elif month==9:
+ month='September'
+ elif month==10:
+ month='October'
+ elif month==11:
+ month='November'
+ else:
+ month='December'
+
+ comboselect ('dlgSelectDate', 'cboDecember', month)
+ time.sleep (3)
+ day = int (date_components[0])
+ if day < 1 or day > 31:
+ log ('Given date is invalid', 'cause')
+ raise LdtpExecutionError (0)
+ year = date_components[2]
+ if int (year) < 1111 or int (year) > 9999:
+ log ('Given year is invalid', 'cause')
+ raise LdtpExecutionError (0)
+ setvalue ('dlgSelectDate', 'sbtn0', year)
+ time.sleep (3)
+ selectcalendardate ('dlgSelectDate', 'calviewCalendar', day, mnt, int (year))
+
+ except LdtpExecutionError, msg:
+ log ('Unable to select given date', 'cause')
+ raise LdtpExecutionError (0)
+
+def insert_appointment (windowname, summary, location, description, from_date, from_time,
+ to_date, to_time, calendar, more_items_todo):
+ try:
+ flag = 0
+ time.sleep (2)
+ settextvalue (windowname, 'txtSummary', summary)
+ setcontext ('Appointment - No summary', 'Appointment - ' + summary)
+ time.sleep (2)
+ if setandverify (windowname, 'txtLocation', location) == 0:
+ log ('Failed to set value in location field', 'cause')
+ raise LdtpExecutionError (0)
+ else:
+ value = gettextvalue (windowname, 'cboCalendar')
+ print value
+ if calendar != value:
+ comboselect (windowname, 'cboCalendar', calendar)
+ #if verifyselect (windowname, 'cboCalendar', calendar) == 0:
+ # print calendar
+ # time.sleep(3)
+ # log ('Verification of calendar combo box failed!!', 'warning')
+ # flag = 1
+ if from_date != '0':
+ if setandverify (windowname, 'txtTextDateEntry1', from_date) == 0:
+ log ('Failed to set value in From date entry', 'cause')
+ raise LdtpExecutionError (0)
+ if str(from_time) != '0':
+ if setandverify (windowname, 'txt3', from_time) == 0:
+ log ('Failed to set value in From time entry', 'cause')
+ raise LdtpExecutionError (0)
+ if to_date != '0':
+ if setandverify (windowname, 'txtTextDateEntry1', to_date) == 0:
+ log ('Failed to set value in To date entry', 'cause')
+ raise LdtpExecutionError (0)
+ if str(to_time) != '0':
+ if setandverify (windowname, 'txt5', to_time) == 0:
+ log ('Failed to set value in From time entry', 'cause')
+ raise LdtpExecutionError (0)
+ if setandverify (windowname, 'txtDescription', description) == 0:
+ log ('Failed to set value in description field', 'cause')
+ raise LdtpExecutionError (0)
+
+ time.sleep(3)
+ if more_items_todo != 'yes':
+ click(windowname, 'btnSave')
+ return flag
+
+ except error,msg:
+ print "Problem in inserting appointment tab details " + str (msg)
+ log('errorinappointmenttab','error')
+ return 0
+
+
+def insert_recurrence (windowname, duration, dur_value, dur_day, count, for_type, no_of_times, exception):
+ try:
+ flag = 0
+ if waittillguiexist (windowname) == 0:
+ log ('Window: ' + windowname + ' Is not open', 'cause')
+ raise LdtpExecutionError (0)
+ activatewin (windowname)
+ if stateenabled (windowname, 'btnAdd') == 1:
+ log ('Add button is enabled by default!!', 'warning')
+ flag = 1
+ time.sleep (1)
+ check (windowname, 'chkThisappointmentrecurs')
+
+ if verifycheck (windowname, 'chkThisappointmentrecurs') == 0:
+ log ('Verification of checkbox failed!!', 'cause')
+ raise LdtpExecutionError (0)
+ if stateenabled (windowname, 'btnAdd') == 0:
+ log ('Add button is not enabled', 'cause')
+ raise LdtpExecutionError (0)
+ else:
+
+ setvalue (windowname, 'sbtn0', count)
+ time.sleep(2)
+ remap ('evolution',windowname)
+ comboselect (windowname,'cboday(s)',duration)
+ undoremap ('evolution',windowname)
+ remap ('evolution',windowname)
+ time.sleep (2)
+
+ if duration == 'day(s)':
+ pass
+ elif duration == 'month(s)':
+ comboselect(windowname,'cbo1st',dur_value)
+ comboselect(windowname,'cboday',dur_day)
+ elif duration == 'week(s)':
+ # those toggle buttons are not recognized in the appmap. so leaving as it is.
+ pass
+ elif duration == 'year(s)':
+ pass
+
+ time.sleep(2)
+ comboselect (windowname,'cbofor',for_type)
+ undoremap ('evolution',windowname)
+ remap ('evolution',windowname)
+ time.sleep(2)
+ print no_of_times
+ if for_type == 'for':
+ setvalue(windowname,'sbtn1',str(no_of_times))
+ time.sleep(2)
+ elif for_type == 'until':
+ settextvalue(windowname,'txtTextDateEntry',str(no_of_times))
+ time.sleep(2)
+ elif for_type == 'forever':
+ pass
+ undoremap ('evolution',windowname)
+ remap ('evolution',windowname)
+ time.sleep(3)
+
+ exception=exception.split(' ')
+ if len(exception) > 0:
+ for i in range (len (exception)):
+ click (windowname, 'btnAdd')
+ time.sleep (2)
+ if waittillguiexist ('dlgAddexception') == 0:
+ log ('Failed to open exception add dialog', 'cause')
+ raise LdtpExecutionError (0)
+ else:
+ settextvalue ('dlgAddexception', 'txtTextDateEntry', exception[i])
+ click ('dlgAddexception', 'btnOK')
+ if waittillguinotexist ('dlgAddexception') == 0:
+ log ('Failed to close exception add dialog', 'cause')
+ raise LdtpExecutionError (0)
+
+ time.sleep(3)
+ undoremap ('evolution',windowname)
+ remap('evolution',windowname)
+ click(windowname, 'btnClose')
+ log ('Recurrence details set successfully','info')
+ return flag
+ except ldtp.error,msg:
+ print "Problem in inserting recurrence tab details " + str (msg)
+ log ('Error in insertng recurrence tab details', 'error')
+ return 0
+
+def selectcalevent(fromdate,summary):
+
+ log ('Selecting a Cal event','teststart')
+ try:
+ time.sleep(5)
+ date=fromdate.split('/')
+ fromdate=date[1]+'/'+date[0]+'/'+date[2]
+ print fromdate
+ selectdate (fromdate)
+ time.sleep (2)
+ except:
+ log ('Unable to select date','error')
+ log ('Selecting a Cal event','testend')
+ raise LdtpExecutionError (0)
+ try:
+ remap ('evolution','frmEvolution-Calendars')
+ activatewin ('frmEvolution-Calendars')
+ selectevent ('frmEvolution-Calendars','calDayView',summary)
+ undoremap ('evolution','frmEvolution-Calendars')
+ time.sleep (3)
+ except:
+ log ('Unable to select event','error')
+ log ('Selecting a Cal event','testend')
+ raise LdtpExecutionError (0)
+ log ('Selecting a Cal event','testend')
+
+def selectCalendarPane():
+ """Selects the Calendars Pane in Evolution"""
+ log ('Open Evolution Calendars Pane','teststart')
+ try:
+ window_id=getcurwindow()
+ click (window_id,'tbtnCalendars')
+ waittillguiexist ('frmEvolution-Calendars')
+ except:
+ log ('error selecting Calendars pane','error')
+ log ('Open Evolution Calendars Pane','testend')
+ raise LdtpExecutionError(0)
+
+ log ('Open Evolution Calendars Pane','testend')
+
+def getcurwindow():
+ if guiexist ('frmEvolution-Mail')==1:
+ return 'frmEvolution-Mail'
+ elif guiexist ('frmEvolution-Contacts')==1:
+ return 'frmEvolution-Contacts'
+ elif guiexist ('frmEvolution-Calendars')==1:
+ return 'frmEvolution-Calendars'
+ elif guiexist ('frmEvolution-Memos')==1:
+ return 'frmEvolution-Memos'
+ elif guiexist ('frmEvolution-Tasks')==1:
+ return 'frmEvolution-Tasks'
diff --git a/evolution/evoutils/menu_reorganization.py b/evolution/evoutils/menu_reorganization.py
new file mode 100644
index 0000000..abe276d
--- /dev/null
+++ b/evolution/evoutils/menu_reorganization.py
@@ -0,0 +1,380 @@
+#!/usr/bin/env python
+#
+# Linux Desktop Testing Project http://www.gnomebangalore.org/ldtp
+#
+# Author:
+# Venkateswaran S <wenkat.s@gmail.com>
+#
+# Copyright 2004 Novell, Inc.
+#
+# This test script is free software; you can redistribute it and/or
+# modify it under the terms of the GNU Library General Public
+# License as published by the Free Software Foundation; either
+# version 2 of the License, or (at your option) any later version.
+#
+# This library is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+# Library General Public License for more details.
+#
+# You should have received a copy of the GNU Library General Public
+# License along with this library; if not, write to the
+# Free Software Foundation, Inc., 59 Temple Place - Suite 330,
+# Boston, MA 02111-1307, USA.
+#
+from ldtp import *
+from ldtputils import *
+
+def selectfolder(windowname,fldr,dest=''):
+
+ waittillguiexist(windowname)
+ if gettreetablerowindex (windowname, 'ttblMailFolderTree', fldr) == -1:
+ click(windowname,'btnNew')
+ time.sleep(3)
+ waittillguiexist ('dlgCreatefolder')
+ settextvalue('dlgCreatefolder','txtFoldername',fldr)
+ selectrowpartialmatch ('dlgCreatefolder', 'ttblMailFolderTree',dest)
+ log('User Value Entered','info')
+ click('dlgCreatefolder','btnCreate')
+ time.sleep(3)
+ if guiexist('dlgEvolutionError'):
+ click('dlgEvolutionError','btnOK')
+ time.sleep(3)
+ click('dlgCreatefolder','btnCancel')
+ print 'Folder Name already exist'
+ log('Folder Already exists','error')
+ selectrowpartialmatch (windowname, 'ttblMailFolderTree',fldr)
+ log('Required folder selected','info')
+ return 1
+
+
+def verify_folder_exist(Folder_name):
+ try:
+ log('Verify Folder Exists','teststart')
+ time.sleep(3)
+ remap('evolution','frmEvolution-Mail')
+ if selectrowpartialmatch ('frmEvolution-Mail','ttblMailFolderTree',Folder_name) == 1:
+ log('Verify succeeded')
+ undoremap('evolution','frmEvolution-Mail')
+ log('Verify Folder Exists','testend')
+ return 1
+ except:
+ log('verify Failed','error')
+ log('Verify Folder Exists','testend')
+ raise LdtpExecutionError (0)
+ log('Verify Folder Exists','testend')
+
+
+def create_folder(Folder_name, location=''):
+ try:
+ log('Create a new folder','teststart')
+ windowname = 'dlgCreatefolder'
+ time.sleep(3)
+ waittillguiexist (windowname)
+ settextvalue(windowname,'txtFoldername',Folder_name)
+ selectrowpartialmatch ('dlgCreatefolder', 'ttblMailFolderTree',location)
+ log('User Value Entered','info')
+ click(windowname,'btnCreate')
+ time.sleep(3)
+ if guiexist('dlgEvolutionError') == 1:
+ click('dlgEvolutionError','btnOK')
+ time.sleep(3)
+ click(windowname,'btnCancel')
+ print 'Folder Name already exist'
+ log('Folder Already exists','cause')
+ log('Create a new folder','testend')
+ return 0
+ else:
+ print 'Folder created'
+ if verify_folder_exist(Folder_name) != 1:
+ print 'Folder Creatation Verify failed'
+ log('Verification failed','error')
+ log('Create a new folder','testend')
+ return 0
+ else:
+ print 'Folder Creation verified'
+ log('Folder Verified','info')
+ log('Create a new folder','testend')
+ return 1
+ except :
+ log('Cannot create a folder','error')
+ log('Create a new folder','testend')
+ print 'Cannot create a folder'
+ raise LdtpExecutionError (0)
+ log('Create a new folder','testend')
+
+
+def copy_to (from_fldr,to_fldr):
+
+ try:
+ log('Copy a folder','teststart')
+ windowname = 'dlgSelectfolder'
+ remap('evolution','frmEvolution-Mail')
+ if selectrowpartialmatch ('frmEvolution-Mail','ttblMailFolderTree',from_fldr) == 1:
+ log('From folder selected','info')
+ selectmenuitem('frmEvolution-Mail','mnuFolder;mnuCopyFolderTo')
+ time.sleep(3)
+ if selectfolder(windowname,to_fldr) == 1:
+ log('Destionation folder selected')
+ else:
+ log('Unable to get hold of destination folder','error')
+ log('Copy a folder','testend')
+ return 0
+ time.sleep(2)
+ click(windowname,'btnCopy')
+ if guiexist ('dlgEvolutionError') == 1:
+ log ('Evolution is offline','cause')
+ click('dlgEvolutionError','btnOK')
+ log('Copy a folder','testend')
+ raise LdtpExecutionError (0)
+
+ else:
+ print 'Unable to find the source folder'
+ log('Unable to find the source folder','cause')
+ log('Copy a folder','testend')
+ return 0
+ undoremap('evolution','frmEvolution-Mail')
+ print from_fldr+ ' has been copied to '+ to_fldr
+ return 1
+ except :
+
+ log('Cannot copy the folder','error')
+ log('Copy a folder','testend')
+ raise LdtpExecutionError (0)
+ log('Copy a folder','testend')
+
+
+def move_to (from_fldr,to_fldr):
+
+ try:
+ log('move a folder','teststart')
+ windowname = 'dlgSelectfolder'
+ remap('evolution','frmEvolution-Mail')
+ if selectrowpartialmatch ('frmEvolution-Mail','ttblMailFolderTree',from_fldr) == 1:
+ log('From folder selected','info')
+ selectmenuitem('frmEvolution-Mail','mnuFolder;mnuMoveFolderTo')
+ time.sleep(3)
+ if selectfolder(windowname,to_fldr) == 1:
+ log('Destionation folder selected')
+ else:
+ log('Unable to get hold of destination folder','error')
+ log('Move a folder','testend')
+ return 0
+ time.sleep(2)
+ remap('evolution',windowname)
+ click(windowname,'btnMove')
+ time.sleep (1)
+ if guiexist ('dlgEvolutionError') == 1:
+ log ('Evolution is offline','cause')
+ undoremap('evolution',windowname)
+ click('dlgEvolutionError','btnOK')
+ log('Move a folder','testend')
+ raise LdtpExecutionError (0)
+ undoremap('evolution',windowname)
+ else:
+ print 'Unable to find the source folder'
+ log('Unable to find the source folder','cause')
+ log('Move a folder','testend')
+ return 0
+
+ undoremap('evolution',windowname)
+ log('Move a folder','testend')
+ return 1
+ except :
+ log('Cannot copy the folder','error')
+ log('Move a folder','testend')
+ raise LdtpExecutionError (0)
+
+ log('Move a folder','testend')
+
+
+def select_all (fldrname):
+
+ try:
+ log('select all mails in a folder','teststart')
+ remap('evolution','frmEvolution-Mail')
+ if selectrowpartialmatch ('frmEvolution-Mail','ttblMailFolderTree',fldrname) == 1:
+ log('From folder selected','info')
+ time.sleep (3)
+ if selectmenuitem('frmEvolution-Mail','mnuFolder;mnuSelectAllMessages') == 1:
+ print 'All Mails have been selected'
+ log('All items have been selected','info')
+ return 1
+ else:
+ print 'Unable to select all mails'
+ return 0
+ else:
+ print 'Unable to find the folder'
+ log('Unable to find the folder','cause')
+ return 0
+ except :
+ print 'Cannot select all items in the folder'
+ log('Cannot select all the items','error')
+ raise LdtpExecutionError (0)
+
+ log('select all mails in a folder','testend')
+
+
+def mark_all_read(fldrname):
+
+ try:
+ log('Mark all as read','teststart')
+ select_all(fldrname)
+ if selectmenuitem('frmEvolution-Mail','mnuFolder;mnuMarkMessagesasRead') == 1:
+ print 'All messages has been marked read'
+ log('All items have been selected','info')
+ else:
+ print 'Unable to select the mails'
+ log('Unable to select the menu Markas;Read','error')
+ except :
+ print 'Cannot set all items in the folder as read'
+ log('Cannot mark as read','error')
+ raise LdtpExecutionError(0)
+
+ log('Mark all as read','testend')
+
+
+def rename (old_name,new_name):
+
+ try:
+ log('Rename a folder','teststart')
+ windowname = 'dlgRenameFolder'
+ remap('evolution','frmEvolution-Mail')
+ if selectrowpartialmatch ('frmEvolution-Mail','ttblMailFolderTree',old_name) == 1:
+ log('From folder selected','info')
+ selectmenuitem('frmEvolution-Mail','mnuFolder;mnuRename')
+
+ time.sleep(3)
+ waittillguiexist(windowname)
+ settextvalue(windowname,'txt0',new_name)
+ undoremap('evolution','frmEvolution-Mail')
+ click(windowname,'btnOK')
+ time.sleep(3)
+ if guiexist('dlgEvolutionError'):
+ click('dlgEvolutionError','btnOK')
+ time.sleep(3)
+ if guiexist (windowname)==1:
+ click(windowname,'btnCancel')
+ print 'Folder Name already exist'
+ log('Folder Already exists','error')
+ log('Rename a folder','testend')
+ return 0
+ else:
+ log ('Evolution is Offline','cause')
+ log('Rename a folder','testend')
+ return 0
+ else:
+ print 'Rename Sucessfull'
+ log('Rename sucessfull','info')
+ else:
+ print 'Unable to find the folder'
+ log('Unable to find the folder','cause')
+ log('Rename a folder','testend')
+ return 0
+ except :
+ print 'Unable to rename'
+ log('Cannot rename the folder','error')
+ log('Rename a folder','testend')
+ raise LdtpExecutionError (0)
+ log('Rename a folder','testend')
+
+def delete_nonsys_folder (fldr):
+
+ try:
+ log('delete a non system folder','teststart')
+ windowname = 'dlgDelete'
+ defaultname = '\"Inbox/ashwin\"?'
+ sysfolder = ['Inbox','Drafts','Junk','Outbox','Sent','Trash']
+ if fldr in sysfolder:
+ log ('A system folder has been selected','error')
+ print 'You cannot delete a system folder'
+ else:
+ remap('evolution','frmEvolution-Mail')
+ selectrow ('frmEvolution-Mail', 'ttblMailFolderTree', fldr)
+ time.sleep (2)
+ if guiexist ('dlgEvolutionError') == 1:
+ click ('dlgEvolutionError','btnOK')
+ log('delete a non system folder','testend')
+ return 0
+ selectmenuitem('frmEvolution-Mail','mnuFolder;mnuDelete')
+ setcontext ('Delete \"Inbox/ashwin\"?','Delete \"' + fldr + '\"?')
+ time.sleep(3)
+ if waittillguiexist (windowname + defaultname) == 1:
+ click(windowname + defaultname, 'btnDelete')
+ time.sleep(3)
+ if guiexist('dlgEvolutionError') ==1:
+ click('dlgEvolutionError','btnOK')
+ log('The folder has subfolders or evolution is offline','cause')
+ log('delete a non system folder','testend')
+ return 0
+ else:
+ print 'the folder has been deleted'
+ log('the folder has been deleted','info')
+ else:
+ log('unable to find the delete window','error')
+ log('delete a non system folder','testend')
+ raise LdtpExecutionError (0)
+ undoremap('evolution','frmEvolution-Mail')
+ log('delete a non system folder','testend')
+ return 1
+ except :
+ print 'Cannot delete the folder'
+ log('Cannot delete the folder','error')
+ log('delete a non system folder','testend')
+ raise LdtpExecutionError (0)
+
+ log('delete a non system folder','testend')
+
+
+def insert_followup_details (follow_up_flag, due_date, time, progress):
+ try:
+ log('Insert Follow up details','teststart')
+ windowname = 'dlgFlagtoFollowUp'
+ waittillguiexist (windowname)
+ settextvalue (windowname,'txtFlag',follow_up_flag)
+ settextvalue (windowname,'txtTextDateEntry',due_date)
+ settextvalue (windowname,'txt1',time)
+ if progress == 'completed':
+ check(windowname,'chkCompleted')
+ elif progress == 'not started':
+ uncheck(windowname,'chkCompleted')
+ time.sleep (3)
+ click(windowname,'btnOK')
+ log('Inserted the followup details')
+ print 'Follow up details entered'
+ except:
+ log('Unable to enter the given details','error')
+ print 'Unable to enter the follow up details'
+ log('Insert Follow up details','testend')
+
+def expunge():
+ try:
+ log('Expunge mails','teststart')
+ # Assuming that only the mails in the trash can be expunged.
+ fldr = 'Trash'
+ remap('evolution','frmEvolution-Mail')
+ if selectrowpartialmatch ('frmEvolution-Mail', 'ttblMailFolderTree', fldr):
+ log('fldr has been selected','info')
+ time.sleep(2)
+ if selectmenuitem('frmEvolution-Mail','mnuFolder;mnuExpunge') == 1:
+ log('Expunge successfull','info')
+ print 'Mails have been permanently removed'
+ else:
+ log('Expunge not completed','info')
+ print 'Probs in permanently removing the mails'
+ raise LdtpExecutionError (0)
+ else:
+ print fldr+ 'not found'
+ log('Unable to find trash','error')
+ time.sleep (2)
+ if getrowcount ('frmEvolution-Mail','mnuFolder;mnuExpunge') == 0:
+ log ('Expunge Verified','info')
+ else:
+ log ('Expunge Failed during verification','cause')
+ raise LdtpExecutionError (0)
+ except:
+ log('Unable to expunge the mails','error')
+ log('Expunge mails','testend')
+ print 'Unable to expunge'
+ raise LdtpExecutionError (0)
+ log('Expunge mails','testend')
diff --git a/evolution/expunge.py b/evolution/expunge.py
new file mode 100644
index 0000000..0fcf356
--- /dev/null
+++ b/evolution/expunge.py
@@ -0,0 +1,54 @@
+#
+# Linux Desktop Testing Project http://www.gnomebangalore.org/ldtp
+#
+# Author:
+# Venkateswaran S <wenkat.s@gmail.com>
+#
+# Copyright 2004 Novell, Inc.
+#
+# This test script is free software; you can redistribute it and/or
+# modify it under the terms of the GNU Library General Public
+# License as published by the Free Software Foundation; either
+# version 2 of the License, or (at your option) any later version.
+#
+# This library is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+# Library General Public License for more details.
+#
+# You should have received a copy of the GNU Library General Public
+# License along with this library; if not, write to the
+# Free Software Foundation, Inc., 59 Temple Place - Suite 330,
+# Boston, MA 02111-1307, USA.
+#
+
+#To expunge all the mails.
+
+from ldtp import *
+from ldtputils import *
+
+try:
+
+ log('Expunge mails','teststart')
+
+ # Assuming that only the mails in the trash can be expunged.
+ fldr = 'Trash'
+ remap('evolution','frmEvolution-Mail')
+ if selectrowpartialmatch ('frmEvolution-Mail', 'ttblMailFolderTree', fldr):
+ log('fldr has been selected','info')
+ time.sleep(2)
+ if selectmenuitem('frmEvolution-Mail','mnuFolder;mnuExpunge') == 1:
+ log('Expunge successfull','info')
+ print 'All Mails have been permanently removed from trash'
+ else:
+ log('Expunge not completed','info')
+ print 'Probs in permanently removing the mails'
+ else:
+ print fldr+ 'not found'
+ log('Unable to find trash','error')
+except:
+ log('Unable to expunge the mails','error')
+ print 'Unable to expunge'
+ raise LdtpExecutionError (0)
+
+log('Expunge mails','testend')
diff --git a/evolution/findandreplace.py b/evolution/findandreplace.py
new file mode 100644
index 0000000..7e535bc
--- /dev/null
+++ b/evolution/findandreplace.py
@@ -0,0 +1,49 @@
+#!/usr/bin/env python
+#
+# Linux Desktop Testing Project http://www.gnomebangalore.org/ldtp
+#
+# Author:
+# Prashanth Mohan <prashmohan@gmail.com>
+#
+# Copyright 2004 Novell, Inc.
+#
+# This test script is free software; you can redistribute it and/or
+# modify it under the terms of the GNU Library General Public
+# License as published by the Free Software Foundation; either
+# version 2 of the License, or (at your option) any later version.
+#
+# This library is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+# Library General Public License for more details.
+#
+# You should have received a copy of the GNU Library General Public
+# License along with this library; if not, write to the
+# Free Software Foundation, Inc., 59 Temple Place - Suite 330,
+# Boston, MA 02111-1307, USA.
+#
+
+from mailtests import *
+
+
+try:
+ data_object = LdtpDataFileParser (datafilename)
+ replace=data_object.gettagvalue ('replace')
+ with=data_object.gettagvalue ('with')
+ text=data_object.gettagvalue ('text')
+except:
+ log ('Unable to read values for find and replace','cause')
+ raise LdtpExecutionError (0)
+
+try:
+ selectMailPane()
+ window_id='frmEvolution-Mail'
+ selectmenuitem (window_id,'mnuFile;mnuNew;mnuMailMessage')
+ waittillguiexist ('frmComposeamessage')
+ settextvalue ('frmComposeamessage','txt6',text[0])
+except:
+ log ('Unable to set text','cause')
+ raise LdtpExecutionError (0)
+
+find_and_replace_test(replace[0],with[0])
+closecomposewindow (0)
diff --git a/evolution/findandreplace.xml b/evolution/findandreplace.xml
new file mode 100644
index 0000000..0ffad2d
--- /dev/null
+++ b/evolution/findandreplace.xml
@@ -0,0 +1,11 @@
+<?xml version="1.0"?>
+<data>
+ <text>
+Hi Hello and welcome
+Hi Hello and welcome
+Hi Hello and welcome
+Hi Hello and welcome
+Hi Hello and welcome</text>
+ <replace>Hello</replace>
+ <with>asda</with>
+</data>
diff --git a/evolution/first.xml b/evolution/first.xml
new file mode 100644
index 0000000..c4fbdc7
--- /dev/null
+++ b/evolution/first.xml
@@ -0,0 +1,20 @@
+<?xml version="1.0"?>
+<ldtp>
+ <logfileoverwrite>1</logfileoverwrite>
+ <logfile>evo-testing.xml</logfile>
+ <appmapfile>evolution.map</appmapfile>
+ <group>
+ <script>
+ <name>template.py</name>
+ <data>template.xml</data>
+ </script>
+ <script>
+ <name>backgroundimage.py</name>
+ <data>backgroundimage.xml</data>
+ </script>
+ <script>
+ <name>newmail.py</name>
+ <data>compose-mail.xml</data>
+ </script>
+ </group>
+</ldtp>
diff --git a/evolution/fldr.xml b/evolution/fldr.xml
new file mode 100644
index 0000000..1e47d8a
--- /dev/null
+++ b/evolution/fldr.xml
@@ -0,0 +1,12 @@
+<?xml version="1.0"?>
+<ldtp>
+ <logfileoverwrite>1</logfileoverwrite>
+ <logfile>evo-testing.xml</logfile>
+ <appmapfile>evolution.map</appmapfile>
+ <group>
+ <script>
+ <name>folderopswhenoffline.py</name>
+ <data>folderopswhenoffline.xml</data>
+ </script>
+ </group>
+</ldtp> \ No newline at end of file
diff --git a/evolution/fltr_from_msg.py b/evolution/fltr_from_msg.py
new file mode 100644
index 0000000..8deaeb5
--- /dev/null
+++ b/evolution/fltr_from_msg.py
@@ -0,0 +1,151 @@
+#
+# Linux Desktop Testing Project http://www.gnomebangalore.org/ldtp
+#
+# Author:
+# Venkateswaran S <wenkat.s@gmail.com>
+#
+# Copyright 2004 Novell, Inc.
+#
+# This test script is free software; you can redistribute it and/or
+# modify it under the terms of the GNU Library General Public
+# License as published by the Free Software Foundation; either
+# version 2 of the License, or (at your option) any later version.
+#
+# This library is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+# Library General Public License for more details.
+#
+# You should have received a copy of the GNU Library General Public
+# License along with this library; if not, write to the
+# Free Software Foundation, Inc., 59 Temple Place - Suite 330,
+# Boston, MA 02111-1307, USA.
+#
+
+#To create a filter from the existing messages.
+from ldtp import *
+from ldtputils import *
+
+def verify_filter(rule_name):
+ windowname = 'dlgFilters'
+ selectmenuitem('frmEvolution-Mail','mnuEdit;mnuMessageFilters')
+ waittillguiexist(windowname)
+ if gettablerowindex (windowname,'tblFilterRules',rule_name) == -1:
+ print 'rule not found in the table filter rules'
+ click(windowname,'btnCancel')
+ return 0
+ else:
+ print 'rule name found'
+ click(windowname,'btnOK')
+ return 1
+
+def selectfolder(fldr,dest=''):
+
+ windowname = 'dlgSelectfolder'
+ waittillguiexist(windowname)
+ remap('evolution',windowname)
+ if gettreetablerowindex (windowname, 'ttblMailFolderTree', fldr) == -1:
+ click(windowname,'btnNew')
+ time.sleep(3)
+ waittillguiexist ('dlgCreatefolder')
+ settextvalue('dlgCreatefolder','txtFoldername',fldr)
+ selectrowpartialmatch ('dlgCreatefolder', 'ttblMailFolderTree',dest)
+ log('User Value Entered','info')
+ click('dlgCreatefolder','btnCreate')
+ time.sleep(3)
+ if guiexist('dlgEvolutionError'):
+ click('dlgEvolutionError','btnOK')
+ time.sleep(3)
+ click('dlgCreatefolder','btnCancel')
+ print 'Folder Name already exist'
+ log('Folder Already exists','error')
+ selectrowpartialmatch (windowname, 'ttblMailFolderTree',fldr)
+ log('Dest fldr selected','info')
+ click(windowname,'btnOK')
+ return 1
+ undoremap('evolution',windowname)
+
+def read_data():
+
+ data_object = LdtpDataFileParser (datafilename)
+
+ #Extracting imput data from xml file
+ filter_on = data_object.gettagvalue ('filter_on')[0]
+ details = data_object.gettagvalue ('details')[0]
+ fldr = data_object.gettagvalue ('fldr')[0]
+ then_actions = data_object.gettagvalue ('then_actions')[0]
+ then_values = data_object.gettagvalue ('then_values')[0]
+ return fldr, filter_on, details ,then_actions, then_values
+
+def filter_from_msg(fldr,filter_on,details,then_actions,then_values):
+ try:
+ windowname = 'dlgAddFilterRule'
+ log('create a filter from the existing message','teststart')
+ selectrowpartialmatch('frmEvolution-Mail','ttblMailFolderTree',fldr)
+ time.sleep(2)
+ selectrow('frmEvolution-Mail','ttblMessageList',details)
+ selectmenuitem('frmEvolution-Mail','mnuMessage;mnuCreateRule;mnuFilteron'+filter_on)
+ waittillguiexist(windowname)
+ remap('evolution',windowname)
+
+ if verifyselect (windowname, 'cbo' + filter_on, filter_on) == 1 and gettextvalue (windowname,'txt1') == details:
+ log('the details has been correctly entered','info')
+ print 'The details present are correct'
+
+ then_actions = then_actions.split(':')
+ then_values = then_values.split(':')
+ if len(then_actions) == len(then_values):
+ length_actions = len(then_actions)
+ for i in range(0,length_actions):
+ time.sleep(2)
+# remap('evolution',windowname)
+ time.sleep(2)
+ comboselect(windowname,'cboMovetoFolder',then_actions[i])
+ if then_actions[i] == 'Move to Folder' or then_actions[i] == 'Copy to Folder':
+ click(windowname,'btn<clickheretoselectafolder>')
+ time.sleep(3)
+ setcontext('Select folder','Select Folder') #if this is fixed remove this line.
+ waittillguiexist('dlgSelectfolder')
+ chk_value = selectfolder(then_values[i])
+ time.sleep(3)
+ elif then_actions[i] == 'Delete' or then_actions[i] == 'Stop Processing' or then_actions[i] == 'Beep':
+ pass # there will be no work to do in these cases.Hence nothin to be set.
+ else:
+ pass # Shud write for all other cases.
+ time.sleep(2)
+ if i < length_actions-1:
+ click(windowname,'btnAdd1')
+# undoremap('evolution',windowname)
+ rule_name = gettextvalue(windowname,'txtRulename')
+ click(windowname,'btnOK')
+ time.sleep(3)
+ if guiexist('dlgEvolutionError') == 1:
+ print 'The rule name already exist'
+ log('Need to change the name','error')
+ click('dlgEvolutionError','btnOK')
+ time.sleep(1)
+ click(windowname,'btnCancel')
+ else:
+ print 'The Filter has been created'
+ print rule_name,'.5'
+ if verify_filter(rule_name) == 1:
+ print 'filter creatation verified'
+ log('filter creation verified','info')
+ else:
+ print 'filter not created'
+ log('filter not found','error')
+ raise LdtpExecutionError (0)
+ log('Filter created','info')
+
+ else:
+ print 'The details entered automatically might not be correct'
+ log('The details entered automatically might not be correct','error')
+ click(windowname,'btnCancel')
+ except:
+ log('Unable to create a filter from message','error')
+ raise LdtpExecutionError (0)
+ log('create a filter from the existing message','testend')
+
+
+fldr, filter_on, details, then_actions, then_values = read_data()
+filter_from_msg(fldr, filter_on, details, then_actions, then_values)
diff --git a/evolution/fltr_from_msg.xml b/evolution/fltr_from_msg.xml
new file mode 100644
index 0000000..5f6fc75
--- /dev/null
+++ b/evolution/fltr_from_msg.xml
@@ -0,0 +1,8 @@
+<?xml version="1.0"?>
+<data>
+ <filter_on>Sender</filter_on>
+ <details>newsletter@experts-exchange.com</details>
+ <fldr>Inbox</fldr>
+ <then_actions>Move to Folder</then_actions>
+ <then_values>test</then_values>
+</data>
diff --git a/evolution/folderopswhenoffline.py b/evolution/folderopswhenoffline.py
new file mode 100644
index 0000000..940eef1
--- /dev/null
+++ b/evolution/folderopswhenoffline.py
@@ -0,0 +1,50 @@
+#!/usr/bin/env python
+#
+# Linux Desktop Testing Project http://www.gnomebangalore.org/ldtp
+#
+# Author:
+# Prashanth Mohan <prashmohan@gmail.com>
+#
+# Copyright 2004 Novell, Inc.
+#
+# This test script is free software; you can redistribute it and/or
+# modify it under the terms of the GNU Library General Public
+# License as published by the Free Software Foundation; either
+# version 2 of the License, or (at your option) any later version.
+#
+# This library is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+# Library General Public License for more details.
+#
+# You should have received a copy of the GNU Library General Public
+# License along with this library; if not, write to the
+# Free Software Foundation, Inc., 59 Temple Place - Suite 330,
+# Boston, MA 02111-1307, USA.
+#
+from offline import *
+
+try:
+ try:
+ data_object = LdtpDataFileParser (datafilename)
+ delfolder = data_object.gettagvalue ('delfolder')
+ location = data_object.gettagvalue ('location')
+ from_folder = data_object.gettagvalue ('from_folder')
+ to_folder = data_object.gettagvalue ('to_folder')
+ crefolder = data_object.gettagvalue ('crefolder')
+ oldfolder = data_object.gettagvalue ('oldfolder')
+ newfolder = data_object.gettagvalue ('newfolder')
+ except:
+ log ('Error while reading values for folder tests','cause')
+ raise LdtpExecutionError (0)
+ try:
+ create_folder_when_offline (crefolder[0],location[0])
+ delete_folder_when_offline (delfolder[0])
+ move_folder_when_offline (from_folder[0],to_folder[0])
+ copy_folder_when_offline (from_folder[0],to_folder[0])
+ rename_folder_when_offline (oldfolder[0],newfolder[0])
+ except:
+ log ('folder operations when offline test failed','error')
+ raise LdtpExecutionError (0)
+except:
+ raise LdtpExecutionError (0)
diff --git a/evolution/folderopswhenoffline.xml b/evolution/folderopswhenoffline.xml
new file mode 100644
index 0000000..9f9c5e7
--- /dev/null
+++ b/evolution/folderopswhenoffline.xml
@@ -0,0 +1,10 @@
+<?xml version="1.0"?>
+<data>
+ <delfolder>abacd</delfolder>
+ <crefolder>abc</crefolder>
+ <to_folder>backup</to_folder>
+ <from_folder>345</from_folder>
+ <oldfolder>345</oldfolder>
+ <newfolder>567</newfolder>
+ <location>abacd</location>
+</data>
diff --git a/evolution/fonts.py b/evolution/fonts.py
new file mode 100644
index 0000000..0dcbb58
--- /dev/null
+++ b/evolution/fonts.py
@@ -0,0 +1,42 @@
+#!/usr/bin/env python
+#
+# Linux Desktop Testing Project http://www.gnomebangalore.org/ldtp
+#
+# Author:
+# Prashanth Mohan <prashmohan@gmail.com>
+#
+# Copyright 2004 Novell, Inc.
+#
+# This test script is free software; you can redistribute it and/or
+# modify it under the terms of the GNU Library General Public
+# License as published by the Free Software Foundation; either
+# version 2 of the License, or (at your option) any later version.
+#
+# This library is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+# Library General Public License for more details.
+#
+# You should have received a copy of the GNU Library General Public
+# License along with this library; if not, write to the
+# Free Software Foundation, Inc., 59 Temple Place - Suite 330,
+# Boston, MA 02111-1307, USA.
+#
+
+from mailtests import *
+
+
+try:
+ data_object = LdtpDataFileParser (datafilename)
+ to=data_object.gettagvalue ('to')
+ ref_img3=data_object.gettagvalue ('font_ref_image')
+except:
+ log ('Unable to read values for textformatting','cause')
+ raise LdtpExecutionError (0)
+
+
+try:
+ fonts_test(to[0],ref_img3)
+except:
+ log ('Error in Text formatting','cause')
+ raise LdtpExecutionError (0)
diff --git a/evolution/fonts_formatting.py b/evolution/fonts_formatting.py
new file mode 100644
index 0000000..915e455
--- /dev/null
+++ b/evolution/fonts_formatting.py
@@ -0,0 +1,45 @@
+#!/usr/bin/env python
+#
+# Linux Desktop Testing Project http://www.gnomebangalore.org/ldtp
+#
+# Author:
+# Prashanth Mohan <prashmohan@gmail.com>
+#
+# Copyright 2004 Novell, Inc.
+#
+# This test script is free software; you can redistribute it and/or
+# modify it under the terms of the GNU Library General Public
+# License as published by the Free Software Foundation; either
+# version 2 of the License, or (at your option) any later version.
+#
+# This library is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+# Library General Public License for more details.
+#
+# You should have received a copy of the GNU Library General Public
+# License along with this library; if not, write to the
+# Free Software Foundation, Inc., 59 Temple Place - Suite 330,
+# Boston, MA 02111-1307, USA.
+#
+
+
+from mailtests import *
+
+try:
+ try:
+ data_object = LdtpDataFileParser (datafilename)
+ to=data_object.gettagvalue ('to')
+ ref_image=data_object.gettagvalue ('ref_image')
+ except:
+ log ('Error while reading values for fonts formatting test','cause')
+ raise LdtpExecutionError (0)
+ try:
+ text_formatting_test (to[0],ref_image)
+ except:
+ log ('Font formatting test failed','error')
+ raise LdtpExecutionError (0)
+except:
+ raise LdtpExecutionError (0)
+
+
diff --git a/evolution/fonts_formatting.xml b/evolution/fonts_formatting.xml
new file mode 100644
index 0000000..ab8b814
--- /dev/null
+++ b/evolution/fonts_formatting.xml
@@ -0,0 +1,5 @@
+<?xml version="1.0"?>
+<data>
+ <to>prashmohan@gmail.com</to>
+ <ref_image>IMAGES/ref_text_formatting.png</ref_image>
+</data>
diff --git a/evolution/fonts_test.py b/evolution/fonts_test.py
new file mode 100644
index 0000000..0641745
--- /dev/null
+++ b/evolution/fonts_test.py
@@ -0,0 +1,45 @@
+#!/usr/bin/env python
+#
+# Linux Desktop Testing Project http://www.gnomebangalore.org/ldtp
+#
+# Author:
+# Prashanth Mohan <prashmohan@gmail.com>
+#
+# Copyright 2004 Novell, Inc.
+#
+# This test script is free software; you can redistribute it and/or
+# modify it under the terms of the GNU Library General Public
+# License as published by the Free Software Foundation; either
+# version 2 of the License, or (at your option) any later version.
+#
+# This library is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+# Library General Public License for more details.
+#
+# You should have received a copy of the GNU Library General Public
+# License along with this library; if not, write to the
+# Free Software Foundation, Inc., 59 Temple Place - Suite 330,
+# Boston, MA 02111-1307, USA.
+#
+
+
+from mailtests import *
+
+try:
+ try:
+ data_object = LdtpDataFileParser (datafilename)
+ to=data_object.gettagvalue ('to')
+ ref_image=data_object.gettagvalue ('ref_image')
+ except:
+ log ('Error while reading values for fonts test','cause')
+ raise LdtpExecutionError (0)
+ try:
+ fonts_test (to[0],ref_image)
+ except:
+ log ('Font test failed','error')
+ raise LdtpExecutionError (0)
+except:
+ raise LdtpExecutionError (0)
+
+
diff --git a/evolution/fonts_test.xml b/evolution/fonts_test.xml
new file mode 100644
index 0000000..c06f265
--- /dev/null
+++ b/evolution/fonts_test.xml
@@ -0,0 +1,5 @@
+<?xml version="1.0"?>
+<data>
+ <to>prashmohan@gmail.com</to>
+ <ref_image>IMAGES/ref_fonts.png</ref_image>
+</data>
diff --git a/evolution/formatinhtml.py b/evolution/formatinhtml.py
new file mode 100644
index 0000000..d0bfb02
--- /dev/null
+++ b/evolution/formatinhtml.py
@@ -0,0 +1,27 @@
+#!/usr/bin/env python
+#
+# Linux Desktop Testing Project http://www.gnomebangalore.org/ldtp
+#
+# Author:
+# Prashanth Mohan <prashmohan@gmail.com>
+#
+# Copyright 2004 Novell, Inc.
+#
+# This test script is free software; you can redistribute it and/or
+# modify it under the terms of the GNU Library General Public
+# License as published by the Free Software Foundation; either
+# version 2 of the License, or (at your option) any later version.
+#
+# This library is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+# Library General Public License for more details.
+#
+# You should have received a copy of the GNU Library General Public
+# License along with this library; if not, write to the
+# Free Software Foundation, Inc., 59 Temple Place - Suite 330,
+# Boston, MA 02111-1307, USA.
+#
+from composerprefs import *
+
+format_in_HTML ()
diff --git a/evolution/forwardstyle.py b/evolution/forwardstyle.py
new file mode 100644
index 0000000..beadc85
--- /dev/null
+++ b/evolution/forwardstyle.py
@@ -0,0 +1,42 @@
+#!/usr/bin/env python
+#
+# Linux Desktop Testing Project http://www.gnomebangalore.org/ldtp
+#
+# Author:
+# Prashanth Mohan <prashmohan@gmail.com>
+#
+# Copyright 2004 Novell, Inc.
+#
+# This test script is free software; you can redistribute it and/or
+# modify it under the terms of the GNU Library General Public
+# License as published by the Free Software Foundation; either
+# version 2 of the License, or (at your option) any later version.
+#
+# This library is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+# Library General Public License for more details.
+#
+# You should have received a copy of the GNU Library General Public
+# License along with this library; if not, write to the
+# Free Software Foundation, Inc., 59 Temple Place - Suite 330,
+# Boston, MA 02111-1307, USA.
+#
+
+from composerprefs import *
+
+try:
+ try:
+ data_object = LdtpDataFileParser (datafilename)
+ fldr = data_object.gettagvalue ('fldr')
+ subject = data_object.gettagvalue ('subject')
+ except:
+ log ('Error while reading values for forward style test','cause')
+ raise LdtpExecutionError (0)
+ try:
+ forwardstyle(fldr[0],subject[0])
+ except:
+ log ('forward style test failed','error')
+ raise LdtpExecutionError (0)
+except:
+ raise LdtpExecutionError (0)
diff --git a/evolution/forwardstyle.xml b/evolution/forwardstyle.xml
new file mode 100644
index 0000000..591446b
--- /dev/null
+++ b/evolution/forwardstyle.xml
@@ -0,0 +1,5 @@
+<?xml version="1.0"?>
+<data>
+ <fldr>Inbox</fldr>
+ <subject>asd</subject>
+</data>
diff --git a/evolution/gooffline.py b/evolution/gooffline.py
new file mode 100644
index 0000000..141b58c
--- /dev/null
+++ b/evolution/gooffline.py
@@ -0,0 +1,29 @@
+#!/usr/bin/env python
+#
+# Linux Desktop Testing Project http://www.gnomebangalore.org/ldtp
+#
+# Author:
+# Prashanth Mohan <prashmohan@gmail.com>
+#
+# Copyright 2004 Novell, Inc.
+#
+# This test script is free software; you can redistribute it and/or
+# modify it under the terms of the GNU Library General Public
+# License as published by the Free Software Foundation; either
+# version 2 of the License, or (at your option) any later version.
+#
+# This library is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+# Library General Public License for more details.
+#
+# You should have received a copy of the GNU Library General Public
+# License along with this library; if not, write to the
+# Free Software Foundation, Inc., 59 Temple Place - Suite 330,
+# Boston, MA 02111-1307, USA.
+#
+
+
+from evoutils.mail import *
+
+go_offline()
diff --git a/evolution/goonline.py b/evolution/goonline.py
new file mode 100644
index 0000000..bbacce0
--- /dev/null
+++ b/evolution/goonline.py
@@ -0,0 +1,27 @@
+#!/usr/bin/env python
+#
+# Linux Desktop Testing Project http://www.gnomebangalore.org/ldtp
+#
+# Author:
+# Prashanth Mohan <prashmohan@gmail.com>
+#
+# Copyright 2004 Novell, Inc.
+#
+# This test script is free software; you can redistribute it and/or
+# modify it under the terms of the GNU Library General Public
+# License as published by the Free Software Foundation; either
+# version 2 of the License, or (at your option) any later version.
+#
+# This library is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+# Library General Public License for more details.
+#
+# You should have received a copy of the GNU Library General Public
+# License along with this library; if not, write to the
+# Free Software Foundation, Inc., 59 Temple Place - Suite 330,
+# Boston, MA 02111-1307, USA.
+#
+from evoutils.mail import *
+
+go_online ()
diff --git a/evolution/htmlformattingcheck.py b/evolution/htmlformattingcheck.py
new file mode 100644
index 0000000..ac6c09c
--- /dev/null
+++ b/evolution/htmlformattingcheck.py
@@ -0,0 +1,32 @@
+#!/usr/bin/env python
+#
+# Linux Desktop Testing Project http://www.gnomebangalore.org/ldtp
+#
+# Author:
+# Prashanth Mohan <prashmohan@gmail.com>
+#
+# Copyright 2004 Novell, Inc.
+#
+# This test script is free software; you can redistribute it and/or
+# modify it under the terms of the GNU Library General Public
+# License as published by the Free Software Foundation; either
+# version 2 of the License, or (at your option) any later version.
+#
+# This library is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+# Library General Public License for more details.
+#
+# You should have received a copy of the GNU Library General Public
+# License along with this library; if not, write to the
+# Free Software Foundation, Inc., 59 Temple Place - Suite 330,
+# Boston, MA 02111-1307, USA.
+#
+
+from contact import getcurwindow
+
+from mailtests import *
+
+htmlformatting ()
+
+
diff --git a/evolution/imap-log.xml b/evolution/imap-log.xml
new file mode 100644
index 0000000..5905973
--- /dev/null
+++ b/evolution/imap-log.xml
@@ -0,0 +1,21 @@
+<?xml version='1.0' encoding='utf-8'?>
+<!-- XML Logging -->
+<ldtp>
+<info>appmap file name evolution.map</info>
+<group name="Executing-group1">
+<script name="account-setup.py">
+<datafilename>imap-account.xml</datafilename>
+<test name="Account-setup">
+<debug>Evolution Account Assistant</debug>
+<debug>Evolution Setup Assistant</debug>
+<warning>Page tab name already in selected state</warning>
+<info>Executing imap receiving mail configuration</info>
+<info>Executing imap receiving options configuration</info>
+<warning>Check box is not checked</warning>
+<debug>Enter password</debug>
+<debug>Enter Password for IMAP Account</debug>
+<pass>1</pass>
+</test>
+</script>
+</group>
+</ldtp>
diff --git a/evolution/lists.py b/evolution/lists.py
new file mode 100644
index 0000000..d4f379e
--- /dev/null
+++ b/evolution/lists.py
@@ -0,0 +1,41 @@
+#!/usr/bin/env python
+#
+# Linux Desktop Testing Project http://www.gnomebangalore.org/ldtp
+#
+# Author:
+# Prashanth Mohan <prashmohan@gmail.com>
+#
+# Copyright 2004 Novell, Inc.
+#
+# This test script is free software; you can redistribute it and/or
+# modify it under the terms of the GNU Library General Public
+# License as published by the Free Software Foundation; either
+# version 2 of the License, or (at your option) any later version.
+#
+# This library is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+# Library General Public License for more details.
+#
+# You should have received a copy of the GNU Library General Public
+# License along with this library; if not, write to the
+# Free Software Foundation, Inc., 59 Temple Place - Suite 330,
+# Boston, MA 02111-1307, USA.
+#
+from mailtests import *
+
+
+try:
+ data_object = LdtpDataFileParser (datafilename)
+ to=data_object.gettagvalue ('to')
+ ref_img2=data_object.gettagvalue ('list_ref_image')
+except:
+ log ('Unable to read values for textformatting','cause')
+ raise LdtpExecutionError (0)
+
+
+try:
+ lists_test(to[0],ref_img2)
+except:
+ log ('Error in Text formatting','cause')
+ raise LdtpExecutionError (0)
diff --git a/evolution/lists_test.py b/evolution/lists_test.py
new file mode 100644
index 0000000..1611a32
--- /dev/null
+++ b/evolution/lists_test.py
@@ -0,0 +1,43 @@
+#!/usr/bin/env python
+#
+# Linux Desktop Testing Project http://www.gnomebangalore.org/ldtp
+#
+# Author:
+# Prashanth Mohan <prashmohan@gmail.com>
+#
+# Copyright 2004 Novell, Inc.
+#
+# This test script is free software; you can redistribute it and/or
+# modify it under the terms of the GNU Library General Public
+# License as published by the Free Software Foundation; either
+# version 2 of the License, or (at your option) any later version.
+#
+# This library is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+# Library General Public License for more details.
+#
+# You should have received a copy of the GNU Library General Public
+# License along with this library; if not, write to the
+# Free Software Foundation, Inc., 59 Temple Place - Suite 330,
+# Boston, MA 02111-1307, USA.
+#
+from mailtests import *
+
+try:
+ try:
+ data_object = LdtpDataFileParser (datafilename)
+ to=data_object.gettagvalue ('to')
+ ref_image=data_object.gettagvalue ('ref_image')
+ except:
+ log ('Error while reading values for lists test','cause')
+ raise LdtpExecutionError (0)
+ try:
+ lists_test (to[0],ref_image)
+ except:
+ log ('Lists test failed','error')
+ raise LdtpExecutionError (0)
+except:
+ raise LdtpExecutionError (0)
+
+
diff --git a/evolution/lists_test.xml b/evolution/lists_test.xml
new file mode 100644
index 0000000..c481a2a
--- /dev/null
+++ b/evolution/lists_test.xml
@@ -0,0 +1,5 @@
+<?xml version="1.0"?>
+<data>
+ <to>prashmohan@gmail.com</to>
+ <ref_image>IMAGES/ref_lists.png</ref_image>
+</data>
diff --git a/evolution/log.xml b/evolution/log.xml
new file mode 100644
index 0000000..0b5ebca
--- /dev/null
+++ b/evolution/log.xml
@@ -0,0 +1,423 @@
+<?xml version='1.0' encoding='utf-8'?>
+<!-- XML Logging -->
+<ldtp>
+<info>appmap file name evolution.map</info>
+<group name="Executing-group1">
+<script name="new_task.py">
+<datafilename>new_task.xml</datafilename>
+<test name="Open-Evolution-Tasks-Pane">
+<debug>Evolution - Mail</debug>
+<debug>Evolution - Mail</debug>
+</test>
+<test name="Create-New-Task">
+<info>New task window opened</info>
+<debug>Task - No summary</debug>
+<debug>Task - This is just a sample</debug>
+<info>User Details entered</info>
+<info>Task Creation Completed and verified</info>
+</test>
+</script>
+<script name="modify_task.py">
+<datafilename>modify_task.xml</datafilename>
+<test name="Modify-a-task">
+<test name="read-user-data">
+<info>User data read successfull</info>
+</test>
+<debug>Task - No summary</debug>
+<debug>Task - This is just a sample</debug>
+<debug>Task - No summary</debug>
+<debug>Task - This is the modified summary</debug>
+<info>User data Loaded</info>
+<info>The required task list has been modified</info>
+<info>Task has been modified successfully</info>
+<info>progress of the task has been modified</info>
+</test>
+</script>
+<script name="del_task.py">
+<datafilename>del_task.xml</datafilename>
+<test name="Delete-a-task">
+<test name="read-user-data">
+<info>User data read successfull</info>
+</test>
+<info>The specified task has been deleted</info>
+<info>the task has been deleted</info>
+</test>
+</script>
+<script name="New_assigned_task.py">
+<datafilename>New_assigned_task.xml</datafilename>
+<test name="Create-new-assigned-task">
+<test name="read-user-data">
+<info>User data read successfull</info>
+</test>
+<info>Dlgbox new assigned task appeared</info>
+<debug>Assigned Task - No summary</debug>
+<debug>Assigned Task - This is just a summary for assigned task</debug>
+<test name="Add-Attendees">
+<cause>Unable to find venkat <wenkat.s@gmail.com> in table</cause>
+<cause>Unable to find ashwin <wenkat.s@gmail.com> in table</cause>
+</test>
+<info>User data Loaded</info>
+<info>Assigned Task Creation Completed</info>
+</test>
+</script>
+<script name="Assigned_Task_modify.py">
+<datafilename>Assigned_Task_modify.xml</datafilename>
+<test name="Modify-an-assigned-task">
+<debug>Assigned Task - No summary</debug>
+<debug>Assigned Task - This is just a summary for assigned task</debug>
+<info>The window opened</info>
+<debug>Assigned Task - No summary</debug>
+<debug>Assigned Task - This is the modified summary</debug>
+<info>User data Loaded</info>
+<info>The required task list has been modified</info>
+<info>Task has been modified successfully</info>
+<info>progress of the task has been modified</info>
+</test>
+</script>
+<script name="del_assigned_task.py">
+<datafilename>del_assigned_task.xml</datafilename>
+<test name="Delete-a-task">
+<test name="read-user-data">
+<info>User data read successfull</info>
+</test>
+<info>the task has been deleted</info>
+</test>
+</script>
+<script name="cr_task_list.py">
+<datafilename>cr_task_list.xml</datafilename>
+<test name="create-a-task-list">
+<info>The window has been modified</info>
+<info>The requested color has been set</info>
+<info>The required task list has been created</info>
+</test>
+</script>
+<script name="verify_readonly_tasklist.py">
+<datafilename>verify_readonly_tasklist.xml</datafilename>
+<test name="Verify-readonly">
+<cause>Unable to find Task on the server in table</cause>
+<error>Unable to verify</error>
+</test>
+<error>stopping this group execution</error>
+</script>
+</group>
+<group name="Executing-group2">
+<script name="create-appointment.py">
+<datafilename>create-appointment.xml</datafilename>
+<test name="Open-Evolution-Contacts-Pane">
+<debug>Evolution - Mail</debug>
+<debug>Evolution - Mail</debug>
+<info>Present Window now Mail pane</info>
+<debug>Evolution - Mail</debug>
+<debug>Evolution - Contacts</debug>
+<info>Present Window now Contacts pane</info>
+<debug>Evolution - Mail</debug>
+<debug>Evolution - Calendars</debug>
+<info>Present Window now Calendars pane</info>
+<debug>Evolution - Mail</debug>
+<debug>Evolution - Memos</debug>
+<info>Present Window now Memos pane</info>
+<debug>Evolution - Mail</debug>
+<debug>Evolution - Tasks</debug>
+<info>Present Window has to be Taskspane</info>
+</test>
+<test name="Appointment-Creation">
+<debug>Appointment - No summary</debug>
+<debug>Appointment - Ordinary Appointment</debug>
+<info>Entered all the data in their fields</info>
+<info>The user details have been entered in the appointment</info>
+<info>Appointment created</info>
+</test>
+</script>
+<script name="appointment-with-attachment.py">
+<datafilename>appointment-with-attachment.xml</datafilename>
+<test name="Create-appoinment-with-attachment">
+<debug>Appointment - No summary</debug>
+<debug>Appointment - Appointment with attachment</debug>
+<info>Entered all the data in their fields</info>
+</test>
+</script>
+<script name="create-recursive-app.py">
+<datafilename>create-recursive-app.xml</datafilename>
+<test name="Create-appoinment-with-attachment">
+<debug>Appointment - No summary</debug>
+<debug>Appointment - Recursive appointment</debug>
+<info>Entered all the data in their fields</info>
+<test name="Insert-Recurrance">
+<info>Recurrence details set successfully</info>
+</test>
+<info>Recurrence value entered</info>
+<info>Recursive Appointment created</info>
+</test>
+</script>
+<script name="recursive-app-with-attachment.py">
+<datafilename>recursive-app-with-attachment.xml</datafilename>
+<test name="Create-recursive-appoinment-with-attachment">
+<debug>Appointment - No summary</debug>
+<debug>Appointment - Recursive appointment</debug>
+<info>Entered all the data in their fields</info>
+<test name="Insert-Recurrance">
+<info>Recurrence details set successfully</info>
+</test>
+<info>Recursive appointment with attachment created</info>
+</test>
+</script>
+<script name="all-day-event.py">
+<datafilename>all-day-event.xml</datafilename>
+<test name="Create-Appointment">
+<debug>Appointment - No summary</debug>
+<debug>Appointment - All Day event</debug>
+<info>Entered all the data in their fields</info>
+<info>All day Appointment created</info>
+</test>
+</script>
+<script name="rec-all-day-event.py">
+<datafilename>rec-all-day-event.xml</datafilename>
+<test name="Recursive-All-day-event">
+<debug>Appointment - No summary</debug>
+<debug>Appointment - All day recursive</debug>
+<info>Entered all the data in their fields</info>
+<test name="Insert-Recurrance">
+<info>Recurrence details set successfully</info>
+</test>
+<info>Recursive all day event Created</info>
+</test>
+</script>
+<script name="modify-appointment.py">
+<datafilename>modify-appointment.xml</datafilename>
+<test name="Modify-all-instance-of-an-appointment">
+<test name="Modify-Appointment">
+<test name="Selecting-a-Cal-event">
+</test>
+<info>Appointment opened</info>
+<debug>Appointment - No summary</debug>
+<debug>Appointment - Recursive appointment</debug>
+<debug>Appointment - No summary</debug>
+<debug>Appointment - modified summary</debug>
+<info>Entered all the data in their fields</info>
+<info>Appointment modified</info>
+</test>
+</test>
+</script>
+</group>
+<group name="Executing-group3">
+<script name="create-folder.py">
+<datafilename>create-folder.xml</datafilename>
+<test name="creation-of-a-folder">
+<test name="Open-Evolution-Mail-Pane">
+<debug>Evolution - Mail</debug>
+<debug>Evolution - Mail</debug>
+<info>Present Window now Mail pane</info>
+<debug>Evolution - Mail</debug>
+<debug>Evolution - Mail</debug>
+<info>Present Window now Mail pane</info>
+<debug>Evolution - Mail</debug>
+<debug>Evolution - Calendars</debug>
+</test>
+<info>User data read</info>
+<test name="Create-a-new-folder">
+<info>User Value Entered</info>
+<info>Folder created</info>
+<test name="Verify-Folder-Exists">
+<debug>Verify succeeded</debug>
+</test>
+<info>Folder Verified</info>
+</test>
+<info>Folder created</info>
+</test>
+</script>
+<script name="copy-to.py">
+<datafilename>copy-to.xml</datafilename>
+<test name="Copy-a-folder">
+<info>From folder selected</info>
+<test name="Selecting-a-given-folder">
+<cause>Unable to find test_copy in table</cause>
+<info>Required folder selected</info>
+</test>
+<debug>Destionation folder selected</debug>
+<info>folder copied</info>
+</test>
+</script>
+<script name="move-to.py">
+<datafilename>move-to.xml</datafilename>
+<test name="move-a-folder">
+<info>From folder selected</info>
+<test name="Selecting-a-given-folder">
+<cause>Unable to find move_test in table</cause>
+<info>Required folder selected</info>
+</test>
+<debug>Destionation folder selected</debug>
+</test>
+</script>
+<script name="select_all.py">
+<datafilename>select_all.xml</datafilename>
+<test name="select-all-mails-in-a-folder">
+<info>From folder selected</info>
+<info>All items have been selected</info>
+</test>
+<info>All mails selected</info>
+</script>
+<script name="mark_read.py">
+<datafilename>mark_read.xml</datafilename>
+<test name="Mark-all-as-read">
+<test name="select-all-mails-in-a-folder">
+<info>From folder selected</info>
+<info>All items have been selected</info>
+</test>
+<info>All items have been selected</info>
+</test>
+<debug>Unable to select</debug>
+</script>
+<debug>Data file maynot be present</debug>
+<script name="expunge.py">
+<warning>data xml tag missing</warning>
+<test name="Expunge-mails">
+<info>fldr has been selected</info>
+<info>Expunge successfull</info>
+</test>
+</script>
+<script name="rename_folder.py">
+<datafilename>rename_folder.xml</datafilename>
+<test name="Rename-a-folder">
+<info>From folder selected</info>
+<info>Rename sucessfull</info>
+</test>
+<info>Fldr has been renamed</info>
+</script>
+<script name="del-non-sys-folder.py">
+<datafilename>del-non-sys-folder.xml</datafilename>
+<test name="delete-a-non-system-folder">
+<debug>Delete "Inbox/ashwin"?</debug>
+<debug>Delete "test"?</debug>
+<info>the folder has been deleted</info>
+</test>
+</script>
+</group>
+<group name="Executing-group4">
+<script name="change-view.py">
+<datafilename>change-view.xml</datafilename>
+<test name="Change-Properties">
+<cause>Unable to find abacd in table</cause>
+<error>Unable to modify the properties of the folderabacd</error>
+</test>
+<error>stopping this group execution</error>
+</script>
+</group>
+<group name="Executing-group5">
+<script name="change_status.py">
+<datafilename>change_status.xml</datafilename>
+<test name="Change-status-of-mails">
+<info>Folder identified</info>
+<error>Unable to get index of message</error>
+<error>Unable to change the status of the message</error>
+</test>
+<error>stopping this group execution</error>
+</script>
+</group>
+<group name="Executing-group6">
+<script name="openmsg_window.py">
+<datafilename>openmsg_window.xml</datafilename>
+<test name="Open-in-a-new-window">
+<info>Folder identified</info>
+<debug>Welcome to Evolution!</debug>
+<debug>sample</debug>
+<info>Message opened in a new window</info>
+</test>
+</script>
+<script name="traverse-mail.py">
+<datafilename>traverse-mail.xml</datafilename>
+<test name="Traverse-Mail">
+<info>Folder identified</info>
+</test>
+<test name="Traverse-Mail">
+<info>Folder identified</info>
+</test>
+<test name="Traverse-Mail">
+<info>Folder identified</info>
+</test>
+<test name="Traverse-Mail">
+<info>Folder identified</info>
+</test>
+<test name="Traverse-Mail">
+<info>Folder identified</info>
+<error>Less than 1 mail in the specified folder, Unable to traverse</error>
+</test>
+<test name="Traverse-Mail">
+<info>Folder identified</info>
+<error>Less than 1 mail in the specified folder, Unable to traverse</error>
+</test>
+</script>
+<script name="reply_toall.py">
+<datafilename>reply_toall.xml</datafilename>
+<test name="Reply-to-all">
+<info>Folder identified</info>
+<info>Message selected</info>
+<debug>Compose a message</debug>
+<debug>Re: sample</debug>
+<info>Reply to all verified</info>
+</test>
+</script>
+<script name="redirect-mail.py">
+<datafilename>redirect-mail.xml</datafilename>
+<test name="redirect-a-mail">
+<info>Folder identified</info>
+<info>Message selected</info>
+<debug>Compose a message</debug>
+<debug>sample</debug>
+<cause>verify Combo box select action failed</cause>
+<error>Unable to find object name: dlgWarning:ModifiedMessage in appmap</error>
+</test>
+</script>
+</group>
+<group name="Executing-group7">
+<debug>Data file maynot be present</debug>
+<script name="chk_file_new.py">
+<warning>data xml tag missing</warning>
+<test name="Verify-all-items-in-the-mnuNew">
+<info>Mail Message Working</info>
+<info>Mail Folder Working</info>
+<info>All Day Appointment Working</info>
+<info>Appointment Working</info>
+<info>Assigned Task Working</info>
+<info>Contact Working</info>
+<info>Contact List Working</info>
+<info>Meeting Working</info>
+<info>Memo Working</info>
+<info>Task Working</info>
+<info>Address Book Working</info>
+<debug>Task List Properties</debug>
+<debug>New Calendar</debug>
+<debug>Task List Properties</debug>
+<debug>New Calendar</debug>
+<info>Calendar Working</info>
+<debug>Task List Properties</debug>
+<debug>New Memo List</debug>
+<info>Memo List Working</info>
+<info>Task List Working</info>
+</test>
+</script>
+<script name="save_msg.py">
+<datafilename>save_msg.xml</datafilename>
+<test name="Save-a-message">
+<test name="select-mail-in-a-folder">
+<info>Folder selected</info>
+<info>Mail selected</info>
+</test>
+<cause>File Already exists</cause>
+</test>
+</script>
+<script name="work_offline.py">
+<datafilename>work_offline.xml</datafilename>
+<test name="Work-Offline">
+<info>Work offline verified</info>
+</test>
+</script>
+</group>
+<group name="Executing-group8">
+<script name="apply_filter.py">
+<datafilename>apply_filter.xml</datafilename>
+<test name="Create-and-apply-filter">
+<test name="Create-a-filter">
+<info>Rule name has been set</info>
+<info>type of execution set</info>
+<debug>Select folder</debug>
+<debug>Select Folder</debug>
diff --git a/evolution/mail.xml b/evolution/mail.xml
new file mode 100644
index 0000000..27cd2ee
--- /dev/null
+++ b/evolution/mail.xml
@@ -0,0 +1,183 @@
+<?xml version="1.0"?>
+<ldtp>
+ <logfileoverwrite>1</logfileoverwrite>
+ <logfile>evo-testing.xml</logfile>
+ <appmapfile>evolution.map</appmapfile>
+ <group>
+ <script>
+ <name>mailtoadd.py</name>
+ <data>mailtoadd.xml</data>
+ </script>
+ </group>
+ <group>
+ <script>
+ <name>htmlformattingcheck.py</name>
+ <data>asd.xml</data>
+ </script>
+ <script>
+ <name>savemail.py</name>
+ <data>savemail.xml</data>
+ </script>
+ <script>
+ <name>closecomposewindow.py</name>
+ <data>closecomposewindow.xml</data>
+ </script>
+ <script>
+ <name>replyto.py</name>
+ <data>replyto.xml</data>
+ </script>
+ <script>
+ <name>findandreplace.py</name>
+ <data>findandreplace.xml</data>
+ </script>
+ <script>
+ <name>spellcheck.py</name>
+ <data>spellcheck.xml</data>
+ </script>
+ </group>
+ <group>
+ <script>
+ <name>fonts_test.py</name>
+ <data>fonts_test.xml</data>
+ </script>
+ <script>
+ <name>fonts_formatting.py</name>
+ <data>fonts_formatting.xml</data>
+ </script>
+ <script>
+ <name>lists_test.py</name>
+ <data>lists_test.xml</data>
+ </script>
+ <script>
+ <name>template.py</name>
+ <data>template.xml</data>
+ </script>
+ <script>
+ <name>backgroundimage.py</name>
+ <data>backgroundimage.xml</data>
+ </script>
+ <script>
+ <name>newmail.py</name>
+ <data>compose-mail.xml</data>
+ </script>
+ <script>
+ <name>checkheaders.py</name>
+ <data>checkheaders.xml</data>
+ </script>
+ </group>
+ <group>
+ <script>
+ <name>sendmailwhenoffline.py</name>
+ <data>compose-mail.xml</data>
+ </script>
+ <script>
+ <name>gooffline.py</name>
+ <data>fonts_formatting.xml</data>
+ </script>
+ <script>
+ <name>applyfilterwhenoffline.py</name>
+ <data>applyfilterwhenoffline.xml</data>
+ </script>
+ <script>
+ <name>copymessagewhenoffline.py</name>
+ <data>movemessagewhenoffline.xml</data>
+ </script>
+ <script>
+ <name>movemessagewhenoffline.py</name>
+ <data>movemessagewhenoffline.xml</data>
+ </script>
+ <script>
+ <name>deletemessagewhenoffline.py</name>
+ <data>deletemessagewhenoffline.xml</data>
+ </script>
+ <script>
+ <name>saveattachmentswhenoffline.py</name>
+ <data>saveattachmentswhenoffline.xml</data>
+ </script>
+ </group>
+ <group>
+ <script>
+ <name>folderopswhenoffline.py</name>
+ <data>folderopswhenoffline.xml</data>
+ </script>
+ </group>
+ <group>
+ <script>
+ <name>goonline.py</name>
+ </script>
+ </group>
+ <group>
+ <script>
+ <name>account-setup.py</name>
+ <data>imap-account.xml</data>
+ </script>
+ <script>
+ <name>deletemailaccount.py</name>
+ <data>deletemailaccount.xml</data>
+ </script>
+ </group>
+ <group>
+ <script>
+ <name>enabledisablemailaccount.py</name>
+ <data>enabledisablemailaccount.xml</data>
+ </script>
+ </group>
+ <group>
+ <script>
+ <name>makedefault.py</name>
+ <data>makedefault.xml</data>
+ </script>
+ </group>
+ <group>
+ <script>
+ <name>formatinhtml.py</name>
+ </script>
+ <script>
+ <name>changelanginspellcheck.py</name>
+ </script>
+ </group>
+ <group>
+ <script>
+ <name>forwardstyle.py</name>
+ <data>forwardstyle.xml</data>
+ </script>
+ <script>
+ <name>emptysubjectline.py</name>
+ <data>emptysubjectline.xml</data>
+ </script>
+ <script>
+ <name>onlybcc.py</name>
+ <data>emptysubjectline.xml</data>
+ </script>
+ </group>
+ <group>
+ <script>
+ <name>promptwhenexpunging.py</name>
+ <data>promptwhenexpunging.xml</data>
+ </script>
+ </group>
+ <group>
+ <script>
+ <name>addnewsign.py</name>
+ <data>addnewsign.xml</data>
+ </script>
+ </group>
+ <group>
+ <script>
+ <name>editsign.py</name>
+ <data>editsign.xml</data>
+ </script>
+ </group>
+ <group>
+ <script>
+ <name>removesign.py</name>
+ <data>addnewsign.xml</data>
+ </script>
+ </group>
+ <group>
+ <script>
+ <name>restartevo.py</name>
+ <data>makedefault.xml</data>
+ </script>
+ </group>
+</ldtp>
diff --git a/evolution/mailaccounts.py b/evolution/mailaccounts.py
new file mode 100644
index 0000000..089f1c3
--- /dev/null
+++ b/evolution/mailaccounts.py
@@ -0,0 +1,218 @@
+#!/usr/bin/env python
+#
+# Linux Desktop Testing Project http://www.gnomebangalore.org/ldtp
+#
+# Author:
+# Prashanth Mohan <prashmohan@gmail.com>
+#
+# Copyright 2004 Novell, Inc.
+#
+# This test script is free software; you can redistribute it and/or
+# modify it under the terms of the GNU Library General Public
+# License as published by the Free Software Foundation; either
+# version 2 of the License, or (at your option) any later version.
+#
+# This library is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+# Library General Public License for more details.
+#
+# You should have received a copy of the GNU Library General Public
+# License along with this library; if not, write to the
+# Free Software Foundation, Inc., 59 Temple Place - Suite 330,
+# Boston, MA 02111-1307, USA.
+#
+
+
+from ldtp import *
+from ldtputils import *
+from contact import getcurwindow
+
+def deletemailaccount (account_name):
+ log ('Delete E-Mail Account','teststart')
+ try:
+ try:
+ selectmenuitem ('frmEvolution-Mail','mnuEdit;mnuPreferences')
+ waittillguiexist ('dlgEvolutionSettings')
+ if verifyaccountexist (account_name)== -1:
+ raise LdtpExecutionError (0)
+ selectrowpartialmatch ('dlgEvolutionSettings','tblMailAccountsTable',account_name)
+ except:
+ log ('Account not present','cause')
+ raise LdtpExecutionError (0)
+
+ try:
+ click ('dlgEvolutionSettings','btnRemove')
+ waittillguiexist ('dlgDeleteaccount?')
+ click ('dlgDeleteaccount?','btnDelete')
+ except:
+ log ('Unable to delete the account','cause')
+ raise LdtpExecutionError (0)
+ time.sleep (2)
+ if verifyaccountexist (account_name) == -1:
+ log ('Delete Account','pass')
+ else:
+ log ('Delete Account','fail')
+ raise LdtpExecutionError (0)
+ click ('dlgEvolutionSettings','btnClose')
+ except:
+ log ('Unable to delete account','error')
+ log ('Delete E-Mail Account','testend')
+ raise LdtpExecutionError (0)
+ log ('Delete E-Mail Account','testend')
+
+
+def verifyaccountexist (account_name):
+ try:
+ print account_name
+ numofchild=getrowcount ('dlgEvolutionSettings','tblMailAccountsTable')
+ for num in range (numofchild):
+ if getcellvalue ('dlgEvolutionSettings','tblMailAccountsTable',num,1).startswith (account_name):
+ print num
+ return num
+
+ return -1
+ except:
+ log ('Unable to verify if account exists','error')
+ raise LdtpExecutionError (0)
+
+
+def enablemailaccount (account_name):
+ log ('Enable Mail Account','teststart')
+ try:
+ try:
+ selectmenuitem ('frmEvolution-Mail','mnuEdit;mnuPreferences')
+ waittillguiexist ('dlgEvolutionSettings')
+ index=verifyaccountexist (account_name)
+ if index==-1:
+ raise LdtpExecutionError (0)
+ selectrowpartialmatch ('dlgEvolutionSettings','tblMailAccountsTable',account_name)
+ except:
+ log ('Account not present','cause')
+ raise LdtpExecutionError (0)
+
+ try:
+ selectrow ('dlgEvolutionSettings','tblMailAccountsTable',name)
+ time.sleep (2)
+ checkrow ('dlgEvolutionSettings','tblMailAccountsTable',index,0)
+ checkrow ('dlgEvolutionSettings','tblMailAccountsTable',index,0)
+ except:
+ log ('Unable to enable Mail Account','cause')
+ raise LdtpExecutionError (0)
+ time.sleep (2)
+ #verification
+
+ try:
+ selectrowpartialmatch ('frmEvolution-Mail','ttblMailFolderTree',account_name)
+ except:
+ log ('Enable Account','fail')
+ raise LdtpExecutionError (0)
+ log ('Enable Account','pass')
+ click ('dlgEvolutionSettings','btnClose')
+ except:
+ log ('Mail Account not enabled','error')
+ log ('Enable Mail Account','testend')
+ raise LdtpExecutionError (0)
+ log ('Enable Mail Account','testend')
+
+
+def disablemailaccount (account_name):
+ log ('Disable Mail Account','teststart')
+ try:
+ try:
+ selectmenuitem ('frmEvolution-Mail','mnuEdit;mnuPreferences')
+ waittillguiexist ('dlgEvolutionSettings')
+ index=verifyaccountexist (account_name)
+ if index==-1:
+ raise LdtpExecutionError (0)
+ selectrowpartialmatch ('dlgEvolutionSettings','tblMailAccountsTable',account_name)
+ time.sleep (2)
+ except:
+ log ('Account not present','cause')
+ raise LdtpExecutionError (0)
+
+ try:
+ uncheckrow ('dlgEvolutionSettings','tblMailAccountsTable',index,0)
+ uncheckrow ('dlgEvolutionSettings','tblMailAccountsTable',index,0)
+ except:
+ log ('Unable to disable Mail Account','cause')
+ raise LdtpExecutionError (0)
+ time.sleep (2)
+ #verification
+
+ try:
+ print account_name
+ selectrowpartialmatch ('frmEvolution-Mail','ttblMailFolderTree',account_name)
+ except:
+ log ('Disable Account','pass')
+ log ('Disable Mail Account','testend')
+ click ('dlgEvolutionSettings','btnClose')
+ return
+ log ('Disable Account','fail')
+ raise LdtpExecutionError (0)
+ except:
+ log ('Mail Account not Disabled','error')
+ log ('Disable Mail Account','testend')
+ raise LdtpExecutionError (0)
+
+
+def makedefault (account_name):
+ log ('Make Mail account default','teststart')
+ try:
+ time.sleep (3)
+ try:
+ selectmenuitem ('frmEvolution-Mail','mnuEdit;mnuPreferences')
+ waittillguiexist ('dlgEvolutionSettings')
+ index=verifyaccountexist (account_name)
+ if index==-1:
+ raise LdtpExecutionError (0)
+ selectrowpartialmatch ('dlgEvolutionSettings','tblMailAccountsTable',account_name)
+ time.sleep (2)
+ except:
+ log ('Account not present','cause')
+ raise LdtpExecutionError (0)
+
+ try:
+ click ('dlgEvolutionSettings','btnDefault')
+ time.sleep (2)
+ name=getcellvalue ('dlgEvolutionSettings','tblMailAccountsTable',index,1)
+ desired_name=account_name+' '+'[Default]'
+ if name == desired_name:
+ log ('Set Default','pass')
+ else:
+ log ('Set Default','fail')
+ except:
+ log ('Unable to make account as default','error')
+ raise LdtpExecutionError (0)
+ except:
+ log ('Make Account default failed','error')
+ log ('Make Mail account default','testend')
+ raise LdtpExecutionError (0)
+ click ('dlgEvolutionSettings','btnClose')
+ log ('Make Mail account default','testend')
+
+
+
+
+def restartevolution():
+ log ('Restart Evolution','teststart')
+ try:
+ time.sleep (3)
+ window_id = 'frmEvolution-Mail'
+ remap ('evolution',window_id)
+ selectmenuitem (window_id,'mnuFile;mnuQuit')
+ waittillguinotexist (window_id)
+ undoremap ('evolution',window_id)
+ time.sleep (2)
+ launchapp ('evolution',1)
+ time.sleep (2)
+ if guiexist (window_id) == 1:
+ log ('Evolution Restarted successfully','info')
+ else:
+ log ('Evolution window not open','cause')
+ raise LdtpExecutionError (0)
+ except:
+ log ('Restart evolution failed','error')
+ log ('Restart Evolution','testend')
+ raise LdtpExecutionError (0)
+ log ('Restart Evolution','testend')
diff --git a/evolution/mailprefs.py b/evolution/mailprefs.py
new file mode 100644
index 0000000..011eded
--- /dev/null
+++ b/evolution/mailprefs.py
@@ -0,0 +1,117 @@
+#!/usr/bin/env python
+#
+# Linux Desktop Testing Project http://www.gnomebangalore.org/ldtp
+#
+# Author:
+# Prashanth Mohan <prashmohan@gmail.com>
+#
+# Copyright 2004 Novell, Inc.
+#
+# This test script is free software; you can redistribute it and/or
+# modify it under the terms of the GNU Library General Public
+# License as published by the Free Software Foundation; either
+# version 2 of the License, or (at your option) any later version.
+#
+# This library is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+# Library General Public License for more details.
+#
+# You should have received a copy of the GNU Library General Public
+# License along with this library; if not, write to the
+# Free Software Foundation, Inc., 59 Temple Place - Suite 330,
+# Boston, MA 02111-1307, USA.
+#
+
+
+from mailaccounts import restartevolution
+from contact import *
+from evoutils.change_status import *
+
+
+def emptytrashonexit():
+ log ('Empty Trash on Exit','teststart')
+ try:
+ selectMailPane()
+ time.sleep (2)
+ selectmenuitem ('frmEvolution-Mail','mnuEdit;mnuPreferences')
+ window_id='dlgEvolutionSettings'
+ waittillguiexist (window_id)
+ time.sleep (1)
+ selecttab (window_id, 'ptl0', 'Mail Preferences')
+ time.sleep (1)
+ remap ('evolution',window_id)
+ check (window_id,'chkEmptytrashfoldersonexit')
+ time.sleep (1)
+ if verifycheck (window_id,'chkEmptytrashfoldersonexit') == 0:
+ log ('Unable to check option','cause')
+ raise LdtpExecutionError (0)
+ comboselect (window_id,'cboEverytime','Every time')
+ click (window_id,'btnClose')
+ except:
+ log ('Unable to enable empty trash on exit','error')
+ log ('Empty Trash on Exit','testend')
+ raise LdtpExecutionError (0)
+ undoremap ('evolution',window_id)
+
+ #verification
+ try:
+ restartevolution()
+ time.sleep (3)
+ selectrowpartialmatch ('frmEvolution-Mail','ttblMailFolderTree','Trash')
+ msgs_in_trash = getrowcount ('frmEvolution-Mail','ttblMessageList')
+ if msgs_in_trash != 0:
+ log ('trash stil has some messages','cause')
+ raise LdtpExecutionError (0)
+ except:
+ log ('Automatic trash emptying on exit failed','error')
+ log ('Empty Trash on Exit','testend')
+ raise LdtpExecutionError (0)
+ log ('Empty Trash on Exit','testend')
+
+
+
+def mark_msg_as_read (fldr,subject,time='3'):
+ log ('Automatically mark messages as read','teststart')
+ try:
+ selectMailPane()
+ time.sleep (2)
+ selectmenuitem ('frmEvolution-Mail','mnuEdit;mnuPreferences')
+ window_id='dlgEvolutionSettings'
+ waittillguiexist (window_id)
+ time.sleep (1)
+ selecttab (window_id, 'ptl0', 'Mail Preferences')
+ time.sleep (1)
+ remap ('evolution',window_id)
+ check (window_id,'chkMarkmessagesasreadafter')
+ time.sleep (1)
+ if verifycheck (window_id,'chkMarkmessagesasreadafter') == 0:
+ log ('Unable to select option for atuomatically marking messages are read','cause')
+ raise LdtpExecutionError (0)
+ setvalue (window_id,'stbn0',time)
+ time.sleep (1)
+ if verifysetvalue (window_id,'sbtn0',time) == 0:
+ log ('Unable to set value of time before marking unread','cause')
+ raise LdtpExecutionError (0)
+ click (window_id,'btnClose')
+ except:
+ log ('could not enable automatic marking of messages as read','error')
+ log ('Automatically mark messages as read','testend')
+ raise LdtpExecutionError (0)
+
+ try:
+ change_status (fldr,subject,'unread')
+ time.sleep (int(time))
+ Row_index=getrowindex(subject)
+ if getcellvalue('frmEvolution-Mail','ttblMessageList',Row_index,0) == 1:
+ log ('Message did not change to unread status','cause')
+ raise LdtpExecutionError (0)
+ except:
+ log ('verification of automatically marking messages as read failed','error')
+ log ('Automatically mark messages as read','testend')
+ raise LdtpExecutionError (0)
+
+
+
+
+
diff --git a/evolution/mailtests.py b/evolution/mailtests.py
new file mode 100644
index 0000000..7242a41
--- /dev/null
+++ b/evolution/mailtests.py
@@ -0,0 +1,783 @@
+#!/usr/bin/env python
+#
+# Linux Desktop Testing Project http://www.gnomebangalore.org/ldtp
+#
+# Author:
+# Prashanth Mohan <prashmohan@gmail.com>
+#
+# Copyright 2004 Novell, Inc.
+#
+# This test script is free software; you can redistribute it and/or
+# modify it under the terms of the GNU Library General Public
+# License as published by the Free Software Foundation; either
+# version 2 of the License, or (at your option) any later version.
+#
+# This library is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+# Library General Public License for more details.
+#
+# You should have received a copy of the GNU Library General Public
+# License along with this library; if not, write to the
+# Free Software Foundation, Inc., 59 Temple Place - Suite 330,
+# Boston, MA 02111-1307, USA.
+#
+
+from contact import *
+from evoutils.mail import *
+from evoutils.mailpreferences import *
+from evoutils.composemail import *
+from ldtp import *
+from ldtputils import *
+import os
+
+def htmlformatting():
+ log ('Check if formatting elements get disabled when HTML setting is off','teststart')
+ try:
+ selectMailPane()
+ #window_id=getcurwindow()
+ window_id='frmEvolution-Mail'
+ selectmenuitem (window_id,'mnuFile;mnuNew;mnuMailMessage')
+ waittillguiexist ('frmComposeamessage')
+ time.sleep (1)
+ uncheck ('frmComposeamessage','mnuHTML')
+ if verifycheck ('frmComposeamessage','mnuHTML')==0:
+ if stateenabled ('frmComposeamessage','tbtnTypewriter')==1 or stateenabled ('frmComposeamessage','tbtnBold')==1 or stateenabled ('frmComposeamessage','tbtnItalic')==1 or stateenabled ('frmComposeamessage','tbtnStrikeout')==1:
+ log ('text formatting is enabled','cause')
+ raise LdtpExecutionError(0)
+ elif stateenabled ('frmComposeamessage','btnImage') == 1 or stateenabled ('frmComposeamessage','btnRule') == 1 or stateenabled ('frmComposeamessage','btnLink') == 1 or stateenabled ('frmComposeamessage','btnTable') == 1:
+ log ('Inserting Objects is enabled','cause')
+ raise LdtpExecutionError(0)
+# elif stateenabled ('frmComposeamessage','rbtnLeftalign')==1 or stateenabled ('frmComposeamessage','rbtnRightalign')==1 or stateenabled ('frmComposeamessage','rbtnCenter')==1:
+# log ('aligning buttons enabled','cause')
+# raise LdtpExecutionError (0)
+# elif stateenabled ('frmComposeamessage','btnUnindent')==1 or stateenabled ('frmComposeamessage','btnIndent')==1:
+# log ('indentation buttons enabled','cause')
+# raise LdtpExecutionError (0)
+ else:
+ log ('UnChecking HTML menu failed','error')
+ raise LdtpExecutionError (0)
+ selectmenuitem ('frmComposeamessage','mnuFile;mnuClose')
+ except:
+ log ('Menus are enabled when HTML is not selected','error')
+ log ('Check if formatting elements get disabled when HTML setting is off','testend')
+ raise LdtpExecutionError (0)
+ log ('Check if formatting elements get disabled when HTML setting is off','testend')
+
+
+def savemail(savemethod,to, subject=[], body=[], cc=[], bcc=[], attachment=[], draftfolder='Drafts'):
+ log ('Test for saving a mail into Drafts folder','teststart')
+ try:
+ #selectMailPane()
+ remap ('evolution','frmEvolution-Mail')
+ selectrowpartialmatch ('frmEvolution-Mail', 'ttblMailFolderTree', draftfolder)
+ time.sleep (2)
+ undoremap ('evolution','frmEvolution-Mail')
+ remap ('evolution','frmEvolution-Mail')
+ draft_mail_count = getrowcount ('frmEvolution-Mail', 'ttblMessageList')
+ print "Draft count:",draft_mail_count
+ undoremap ('evolution','frmEvolution-Mail')
+ compose (to, subject, body, cc,bcc, attachment)
+ savethismail (savemethod)
+ testsavemail (draft_mail_count,savemethod)
+ except:
+ log ('Saving Mail failed','error')
+ log ('Test for saving a mail into Drafts folder','testend')
+ raise LdtpExecutionError (0)
+ log ('Test for saving a mail into Drafts folder','testend')
+
+
+def testsavemail(draft_count,savemethod):
+ log ('Verification for save mail','teststart')
+ try:
+ if savemethod==0:
+ new_draft_count=getrowcount ('frmEvolution-Mail','ttblMessageList')
+ print "new count:",new_draft_count
+ if new_draft_count>=draft_count+1:
+ log ('Save Mail','pass')
+ else:
+ log ('Save Mail','fail')
+ raise LdtpExecutionError (0)
+ elif savemethod==1:
+ home=os.environ.get('HOME')
+ if os.path.isfile(home+os.sep+'testfile')==True:
+ log ('Save Mail','pass')
+ else:
+ log ('Save Mail','fail')
+ raise LdtpExecutionError (0)
+ except:
+ log ('Save mail could not be verified','error')
+ log ('Verification for save mail','testend')
+ raise LdtpExecutionError (0)
+ log ('Verification for save mail','testend')
+
+
+def sendmailwhenoffline (to=[], subject=[], body=[], cc=[], bcc=[], attachment=[]):
+ log ('Sending mail when evolution is offline','teststart')
+ try:
+ #selectmenuitem ('frmEvolution-Mail','mnuFile;mnuWorkOffline')
+ go_offline()
+ except:
+ log ('Unable to go offline','cause')
+ log ('Sending mail when evolution is offline','testend')
+ raise LdtpExecutionError (0)
+ try:
+ remap ('evolution','frmEvolution-Mail')
+ selectrowpartialmatch ('frmEvolution-Mail', 'ttblMailFolderTree', 'Outbox')
+ time.sleep (2)
+ outbox_mail_count = getrowcount ('frmEvolution-Mail', 'ttblMessageList')
+ selectrowpartialmatch ('frmEvolution-Mail', 'ttblMailFolderTree', 'Sent')
+ time.sleep (2)
+ sent_mail_count = getrowcount ('frmEvolution-Mail', 'ttblMessageList')
+ compose (to, subject, body, cc,bcc, attachment)
+ sendmail (subject)
+ selectrowpartialmatch ('frmEvolution-Mail', 'ttblMailFolderTree', 'Outbox')
+ undoremap ('evolution','frmEvolution-Mail')
+ remap ('evolution','frmEvolution-Mail')
+ new_outbox_mail_count = getrowcount ('frmEvolution-Mail', 'ttblMessageList')
+ if new_outbox_mail_count==outbox_mail_count+1:
+ log ('Message has been put in OutBox Folder','info')
+ else:
+ log ('Message has not been put in OutBox Folder','cause')
+ raise LdtpExecutionError (0)
+ selectmenuitem ('frmEvolution-Mail','mnuFile;mnuWorkOnline')
+ time.sleep (1)
+ try:
+ click ('frmEvolution-Mail', 'btnSend/Receive')
+ waittillguinotexist ('dlgSend&ReceiveMail')
+ time.sleep (5)
+ except:
+ log ('could not send mail','cause')
+ raise LdtpExecutionError (0)
+ selectrowpartialmatch ('frmEvolution-Mail', 'ttblMailFolderTree', 'Sent')
+ undoremap ('evolution','frmEvolution-Mail')
+ remap ('evolution','frmEvolution-Mail')
+ new_sent_mail_count = getrowcount ('frmEvolution-Mail', 'ttblMessageList')
+ if new_sent_mail_count==sent_mail_count+new_outbox_mail_count:
+ log ('Message sent','info')
+ log ('Send Mail while offline Succeeded','info')
+ else:
+ log ('Message send Failed','error')
+ raise LdtpExecutionError (0)
+
+ undoremap ('evolution','frmEvolution-Mail')
+ except:
+ log ('Send Mail while offline failed','error')
+ log ('Sending mail when evolution is offline','testend')
+ raise LdtpExecutionError (0)
+ log ('Sending mail when evolution is offline','testend')
+
+
+def closecomposewindow(state):
+ """ state == 0 --> Discard Message
+ state == 1 --> Cancel Dialog
+ state == 2 --> Save Message"""
+ log ('Close compose window','teststart')
+ try:
+ if guiexist ('frmComposeamessage') == 0:
+ log ('Compose window not open','cause')
+ raise LdtpExecutionError (0)
+ except:
+ log ('Close compose window','testend')
+ raise LdtpExecutionError (0)
+
+ try:
+ selectmenuitem ('frmComposeamessage','mnuFile;mnuClose')
+ time.sleep (2)
+ if guiexist ('dlgWarning')==1:
+ if state==0:
+ click ('dlgWarning','btnDiscardChanges')
+ elif state==1:
+ click ('dlgWarning','btnCancel')
+ elif state==2:
+ click ('dlgWarning','btnSaveMessage')
+ else:
+ log ('Invalid option to choose','cause')
+ raise LdtpExecutionError (0)
+ log ('Warning Window closed successfully','info')
+ else:
+ log ('Warning window did not arise','warning')
+ except:
+ log ('Warning Window did not close successfully','error')
+ log ('Close compose window','fail')
+ log ('Close compose window','testend')
+ raise LdtpExecutionError (0)
+ waittillguinotexist ('frmComposeamessage')
+ time.sleep (2)
+ log ('Close compose window','pass')
+ log ('Close compose window','testend')
+
+
+def checkheaders(ref_image):
+ log ('Check Compose window header boxes','teststart')
+ try:
+ window_id=getcurwindow()
+ selectmenuitem (window_id,'mnuFile;mnuNew;mnuMailMessage')
+ waittillguiexist ('frmComposeamessage')
+ except:
+ log ('could not open Mail Editor','cause')
+ log ('Check Compose window header boxes','testend')
+ raise LdtpExecutionError (0)
+
+ try:
+ check ('frmComposeamessage','mnuFromField')
+ check ('frmComposeamessage','mnuPost-ToField')
+ check ('frmComposeamessage','mnuReply-ToField')
+ check ('frmComposeamessage','mnuCcField')
+ check ('frmComposeamessage','mnuBccField')
+ except:
+ log ('error while selecting fields','cause')
+ log ('Check Compose window header boxes','testend')
+ raise LdtpExecutionError (0)
+
+ try:
+ imagecapture('Compose a message','IMAGES/cur_mail.png')
+ except:
+ log ('Error while capturing image of window','cause')
+ log ('Check Compose window header boxes','testend')
+ raise LdtpExecutionError (0)
+
+ try:
+ if imagecompare (ref_image,'IMAGES/cur_mail.png') < 1.0:
+ log ('Header fields ','pass')
+ else:
+ log ('Header fields ','fail')
+ raise LdtpExecutionError(0)
+ except:
+ log ('Header fields do not match','warning')
+ log ('Check Compose window header boxes','testend')
+ raise LdtpExecutionError (0)
+ selectmenuitem ('frmComposeamessage','mnuFile;mnuClose')
+ log ('Check Compose window header boxes','testend')
+
+
+def add_to_replytofield(replyto,to):
+ log ('Add to reply-to field','teststart')
+ try:
+ #selectMailPane()
+ window_id='frmEvolution-Mail'
+ subject =['test for reply to']
+ body=subject
+ remap ('evolution',window_id)
+ selectrowpartialmatch (window_id,'ttblMailFolderTree','Sent')
+ undoremap ('evolution',window_id)
+ remap ('evolution',window_id)
+ sent_mail_count=getrowcount (window_id,'ttblMessageList')
+ selectmenuitem (window_id,'mnuFile;mnuNew;mnuMailMessage')
+ waittillguiexist ('frmComposeamessage')
+ populate_mail_header ([to],subject,body)
+ check ('frmComposeamessage','mnuReply-ToField')
+ settextvalue ('frmComposeamessage','txtReply-To',replyto)
+ sendmail (subject)
+ click ('frmEvolution-Mail', 'btnSend/Receive')
+ waittillguinotexist ('dlgSend&ReceiveMail')
+ time.sleep (5)
+ #click ('frmComposeamessage','btnSend')
+ releasecontext ()
+ undoremap ('evolution',window_id)
+ remap ('evolution',window_id)
+ new_sent_mail_count=getrowcount (window_id,'ttblMessageList')
+ if new_sent_mail_count!=sent_mail_count+1:
+ log ('Message not sent','cause')
+ raise LdtpExecutionError (0)
+ selectrowindex(window_id,'ttblMessageList',sent_mail_count)
+ selectmenuitem (window_id,'mnuMessage;mnuReply')
+ setcontext ('Compose a message','Re: '+subject[0])
+ waittillguiexist ('frmComposeamessage')
+ if gettextvalue ('frmComposeamessage','txtTo') != replyto:
+ log ('To field does not have replyto address','cause')
+ raise LdtpExecutionError (0)
+ selectmenuitem ('frmComposeamessage','mnuFile;mnuClose')
+ log ('Reply to Field','pass')
+ undoremap ('evolution',window_id)
+ except:
+ log ('Reply to Field','fail')
+ log ('Add to reply-to field','testend')
+ raise LdtpExecutionError (0)
+ log ('Add to reply-to field','testend')
+
+
+def background_image_test (to,bgimage,ref_image):
+ log ('background image','teststart')
+ try:
+ subject=['background image test']
+ body=['background image test']
+ #selectMailPane()
+ window_id='frmEvolution-Mail'
+ time.sleep (2)
+ #remap ('evolution',window_id)
+ selectrowpartialmatch (window_id,'ttblMailFolderTree','Sent')
+ sent_mail_count=getrowcount (window_id,'ttblMessageList')
+ selectmenuitem (window_id,'mnuFile;mnuNew;mnuMailMessage')
+ waittillguiexist ('frmComposeamessage')
+ populate_mail_header ([to],subject,body)
+ insert_bgimage (bgimage)
+ sendmail (subject)
+ click (window_id, 'btnSend/Receive')
+ waittillguinotexist ('dlgSend&ReceiveMail')
+ #remap ('evolution',window_id)
+ new_sent_mail_count=getrowcount (window_id,'ttblMessageList')
+ if new_sent_mail_count < sent_mail_count+1:
+ log ('Could not send mail','cause')
+ raise LdtpExecutiontionError (0)
+ except:
+ log ('Mail was not sent','error')
+ log ('background image','testend')
+ raise LdtpExecutionError (0)
+ try:
+ print "inside"
+ if verifymailwithimage ('Sent',sent_mail_count,ref_image) ==1:
+ log ('Backgroung Image ','pass')
+ else:
+ log ('Background Image ','fail')
+ raise LdtpExecutionError(0)
+ print "outside"
+ #undoremap ('evolution',window_id)
+ except:
+ log ('Background image test did not pass','error')
+ log ('background image','testend')
+ raise LdtpExecutionError (0)
+ log ('background image','testend')
+
+
+def template_test(to,template,ref_image):
+ log ('applying templates','teststart')
+ try:
+ subject=['template test']
+ body=['template test\ntemplate test\ntemplate test\ntemplate test\n']
+ selectMailPane()
+ window_id='frmEvolution-Mail'
+ #remap ('evolution',window_id)
+ selectrowpartialmatch (window_id,'ttblMailFolderTree','Sent')
+ sent_mail_count=getrowcount (window_id,'ttblMessageList')
+ selectmenuitem (window_id,'mnuFile;mnuNew;mnuMailMessage')
+ waittillguiexist ('frmComposeamessage')
+ populate_mail_header ([to],subject,body)
+ apply_template (template)
+ sendmail (subject)
+ click ('frmEvolution-Mail', 'btnSend/Receive')
+ waittillguinotexist ('dlgSend&ReceiveMail')
+ time.sleep (5)
+ releasecontext()
+ #undoremap ('evolution',window_id)
+ #remap ('evolution',window_id)
+ new_sent_mail_count=getrowcount (window_id,'ttblMessageList')
+ if new_sent_mail_count < sent_mail_count+1:
+ log ('Could not send mail','cause')
+ raise LdtpExecutiontionError (0)
+ except:
+ log ('Mail was not sent','error')
+ log ('applying templates','testend')
+ raise LdtpExecutionError (0)
+ try:
+ if verifymailwithimage ('Sent',sent_mail_count,ref_image) ==1:
+ log ('Backgroung Image ','pass')
+ else:
+ log ('Background Image ','fail')
+ raise LdtpExecutionError(0)
+ #undoremap ('evolution',window_id)
+ except:
+ log ('Background image test did not pass','error')
+ log ('applying templates','testend')
+ raise LdtpExecutionError (0)
+ log ('applying templates','testend')
+
+
+def find_and_replace_test(replace,with):
+ log ('Find and replace','teststart')
+ try:
+ #selectMailPane()
+ #window_id='frmEvolution-Mail'
+ #selectmenuitem (window_id,'mnuFile;mnuNew;mnuMailMessage')
+ #waittillguiexist ('frmComposeamessage')
+ text = getmailtext()
+ grabfocus ('frmComposeamessage','txt6')
+ selectmenuitem ('frmComposeamessage','mnuEdit;mnuReplace')
+ waittillguiexist ('dlgReplace')
+ settextvalue ('dlgReplace','txtReplace',replace)
+ settextvalue ('dlgReplace','txtWith',with)
+ click ('dlgReplace','btnFindandReplace')
+ time.sleep (1)
+ if guiexist('dlgReplaceconfirmation')==1:
+ click ('dlgReplaceconfirmation','btnReplaceAll')
+ if getmailtext() == text.replace (replace,with):
+ log ('Find and Replace','pass')
+ else:
+ log ('Find and Replace','fail')
+ raise LdtpExecutionError (0)
+ except:
+ log ('Error in Find and Replace','error')
+ log ('Find and replace','testend')
+ raise LdtpExecutionError (0)
+ log ('Find and replace','testend')
+
+
+def undo_redo_test():
+ log ('Undo and Redo','teststart')
+ try:
+ window_id='frmComposeamessage'
+ numchild=getpanelchildcount(window_id,'pnlPanelcontainingHTML')
+ present_text=getmailtext()
+
+ remap ('evolution',window_id)
+ appendtext (window_id,'txt'+str(6+numchild-1),'addedtext')
+ undoremap ('evolution',window_id)
+ added_text=getmailtext()
+
+ try:
+ selectmenuitem (window_id,'mnuEdit;mnuUndo')
+ except:
+ log ('Undo Button is not active','cause')
+ raise LdtpExecutionError (0)
+
+ undoed_text=getmailtext()
+
+ if undoed_text == present_text:
+ log ('Undo','pass')
+ else:
+ log ('Undo','fail')
+ raise LdtpExecutionError (0)
+
+ try:
+ selectmenuitem (window_id,'mnuEdit;mnuRedo')
+ except:
+ log ('Redo Button is not active','cause')
+ raise LdtpExecutionError (0)
+
+ redoed_text=getmailtext()
+
+ if redoed_text == added_text :
+ log ('Redo','pass')
+ else:
+ log ('Redo','fail')
+ raise LdtpExecutionError (0)
+ selectmenuitem (window_id,'mnuEdit;mnuUndo')
+ except:
+ log ('Undo - Redo test failed','error')
+ log ('Undo and Redo','testend')
+ raise LdtpExecutionError (0)
+ log ('Undo and Redo','testend')
+
+
+def spell_check_test(method):
+ """
+ method == 0 --> Replace
+ method == 1 --> Ignore
+ method == 2 --> Skip
+ method == 3 --> Add to Dict
+ method == 4 --> Close Spell Checker
+ method == 5 --> Back Button"""
+ log ('Spell Check','teststart')
+ try:
+ window_id='dlgSpellchecker'
+ selectmenuitem ('frmComposeamessage','mnuEdit;mnuSpellCheckDocument')
+ time.sleep (2)
+ addwords=[]
+ if guiexist ('dlgInformation')==1:
+ click ('dlgInformation','btnOK')
+ log ('No Spelling mistakes','info')
+ elif guiexist (window_id)==1 and method != 4 and method != 5:
+
+ # do the actual replacement/skipping/ignoring here
+ while guiexist (window_id)==1:
+ remap ('evolution',window_id)
+ obj=getobjectlist(window_id)
+ for objects in obj:
+ if objects.startswith ('tbl'):
+ obj=objects
+ break
+ repl=getrowcount (window_id,obj)
+
+ if method==0:
+ if repl>0:
+ click (window_id,'btnReplace')
+ else:
+ log ('No Sugesstion for this word','info')
+ elif method==1:
+ click (window_id,'btnIgnore')
+ elif method==2:
+ click (window_id,'btnSkip')
+ elif method==3:
+ obj=obj[obj.find('\'')+1:]
+ obj=obj[:obj.find('\'')]
+ addwords.append (obj)
+ click (window_id,'btnAddword')
+ else:
+ log ('Unknown Method given','cause')
+ raise LdtpExecutionError (0)
+
+ time.sleep (1)
+
+ #verification of the above code
+
+ if method == 3:
+ present_text=gettextvalue ('frmComposeamessage','txt6')
+ text=''
+
+ for value in addwords:
+ text+=value
+ text+=' '
+
+ text=text[:-1]
+ settextvalue ('frmComposeamessage','txt6',text)
+
+ #verification for all 3 methods
+
+ selectmenuitem ('frmComposeamessage','mnuEdit;mnuSpellCheckDocument')
+ time.sleep (2)
+
+ if guiexist ('dlgInformation')==1 and method in [0,1,3]:
+ click ('dlgInformation','btnOK')
+ log ('Spell Check','pass')
+ elif guiexist (window_id) == 1 and method == 2:
+ click (window_id,'btnClose')
+ log ('Spell Check','pass')
+ else:
+ log ('Verification of Spell check failed','cause')
+ log ('Spell Check','fail')
+ raise LdtpExecutionError (0)
+
+ if method==3:
+ settextvalue ('frmComposeamessage','txt6',present_text)
+
+ elif guiexist (window_id) == 1 and method == 4:
+ click (window_id,'btnClose')
+ time.sleep (1)
+
+ if guiexist (window_id) == 0:
+ log ('Close button Works','info')
+ else:
+ log ('Close button Failed','cause')
+ raise LdtpExecutionError (0)
+
+ elif guiexist (window_id) == 1 and method == 5:
+ #enter code for back button here
+ remap ('evolution',window_id)
+ obj=getobjectlist(window_id)
+
+ for objects in obj:
+ if objects.startswith ('tbl'):
+ obj=objects
+ break
+
+ obj=obj[obj.find('\'')+1:]
+ obj=obj[:obj.find('\'')]
+ last_word = obj
+ click (window_id,'btnSkip')
+ undoremap ('evolution',window_id)
+ time.sleep (1)
+ if guiexist (window_id) == 0:
+ log ('Only 1 mistyped occurance','cause')
+ raise LdtpExecutionError (0)
+
+ remap ('evolution',window_id)
+
+ try:
+ click (window_id,'btnBack')
+ except:
+ log ('Could not click Back Button','cause')
+ raise LdtpExecutionError (0)
+
+ undoremap ('evolution',window_id)
+ remap ('evolution',window_id)
+ time.sleep (1)
+ obj=getobjectlist(window_id)
+
+ for objects in obj:
+ if objects.startswith ('tbl'):
+ obj=objects
+ break
+
+ obj=obj[obj.find('\'')+1:]
+ obj=obj[:obj.find('\'')]
+ new_word = obj
+ click (window_id,'btnClose')
+ if new_word != last_word:
+ log ('Back does not lead to last misspelt word','cause')
+
+ except:
+ log ('Spell Check','fail')
+ log ('Spell Check','testend')
+ raise LdtpExecutionError (0)
+ log ('Spell Check','pass')
+ log ('Spell Check','testend')
+
+
+def text_formatting_test(to,ref_image):
+ log ('text formatting','teststart')
+ try:
+ subject=['bold,italic,strikethrough test']
+ #selectMailPane()
+ window_id='frmEvolution-Mail'
+ #remap ('evolution',window_id)
+ selectrowpartialmatch (window_id,'ttblMailFolderTree','Sent')
+ sent_mail_count=getrowcount (window_id,'ttblMessageList')
+ selectmenuitem (window_id,'mnuFile;mnuNew;mnuMailMessage')
+ waittillguiexist ('frmComposeamessage')
+ check ('frmComposeamessage','mnuHTML')
+ time.sleep (1)
+ selectmenuitem ('frmComposeamessage','mnuFormat;mnuStyle;mnuBold')
+ settextvalue ('frmComposeamessage','txt6','Hello\n')
+ remap ('evolution','frmComposeamessage')
+ selectmenuitem ('frmComposeamessage','mnuFormat;mnuStyle;mnuItalic')
+ settextvalue ('frmComposeamessage','txt7','Hello\n')
+ undoremap ('evolution','frmComposeamessage')
+ remap ('evolution','frmComposeamessage')
+ selectmenuitem ('frmComposeamessage','mnuFormat;mnuStyle;mnuItalic')
+ settextvalue ('frmComposeamessage','txt8','Hello\n')
+ undoremap ('evolution','frmComposeamessage')
+ remap ('evolution','frmComposeamessage')
+ selectmenuitem ('frmComposeamessage','mnuFormat;mnuStyle;mnuStrikeout')
+ settextvalue ('frmComposeamessage','txt9','Hello\n')
+ undoremap ('evolution','frmComposeamessage')
+ remap ('evolution','frmComposeamessage')
+ settextvalue ('frmComposeamessage','txt10','Hello')
+ selectmenuitem ('frmComposeamessage','mnuFormat;mnuAlignment;mnuCenter')
+ settextvalue ('frmComposeamessage','txt10','Hello\n')
+ undoremap ('evolution','frmComposeamessage')
+ remap ('evolution','frmComposeamessage')
+ settextvalue ('frmComposeamessage','txt11','Hello')
+ selectmenuitem ('frmComposeamessage','mnuFormat;mnuAlignment;mnuRight')
+ settextvalue ('frmComposeamessage','txt11','Hello\n')
+ undoremap ('evolution','frmComposeamessage')
+ populate_mail_header ([to],subject)
+ #undoremap ('evolution',window_id)
+ sendmail (subject)
+ click ('frmEvolution-Mail', 'btnSend/Receive')
+ waittillguinotexist ('dlgSend&ReceiveMail')
+ time.sleep (5)
+ releasecontext()
+ #undoremap ('evolution',window_id)
+ #remap ('evolution',window_id)
+ new_sent_mail_count=getrowcount (window_id,'ttblMessageList')
+ if new_sent_mail_count < sent_mail_count+1:
+ log ('Could not send mail','cause')
+ raise LdtpExecutiontionError (0)
+ except:
+ log ('Mail was not sent','error')
+ log ('text formatting','testend')
+ raise LdtpExecutionError (0)
+ try:
+ if verifymailwithimage ('Sent',sent_mail_count,ref_image) ==1:
+ log ('Text Formatting ','pass')
+ else:
+ log ('Text Formatting ','fail')
+ raise LdtpExecutionError(0)
+ #undoremap ('evolution',window_id)
+ except:
+ log ('Text formatting test did not pass','error')
+ log ('text formatting','testend')
+ raise LdtpExecutionError (0)
+ log ('text formatting','testend')
+
+
+def lists_test(to,ref_image):
+ log ('numbered,alphabetic,bulleted lists','teststart')
+ try:
+ subject=['Compose editor List test']
+ #selectMailPane()
+ window_id='frmEvolution-Mail'
+ selectmenuitem (window_id,'mnuFile;mnuNew;mnuMailMessage')
+ selectrowpartialmatch (window_id,'ttblMailFolderTree','Sent')
+ #remap ('evolution',window_id)
+ sent_mail_count=getrowcount (window_id,'ttblMessageList')
+ waittillguiexist ('frmComposeamessage')
+ check ('frmComposeamessage','mnuHTML')
+ time.sleep (1)
+ selectmenuitem ('frmComposeamessage','mnuFormat;mnuHeading;mnuBulletedList')
+ settextvalue ('frmComposeamessage','txt6','Hello\nHello\nHello\n')
+ remap ('evolution','frmComposeamessage')
+ selectmenuitem ('frmComposeamessage','mnuFormat;mnuHeading;mnuNumberedList')
+ settextvalue ('frmComposeamessage','txt9','Hello\nHello\nHello\n')
+ undoremap ('evolution','frmComposeamessage')
+ remap ('evolution','frmComposeamessage')
+ selectmenuitem ('frmComposeamessage','mnuFormat;mnuHeading;mnuAlphabeticalList')
+ settextvalue ('frmComposeamessage','txt12','Hello\nHello\nHello\n')
+ undoremap ('evolution','frmComposeamessage')
+ remap ('evolution','frmComposeamessage')
+ selectmenuitem ('frmComposeamessage','mnuFormat;mnuHeading;mnuRomanNumeralList')
+ settextvalue ('frmComposeamessage','txt15','Hello\nHello\nHello\n')
+ undoremap ('evolution','frmComposeamessage')
+ populate_mail_header ([to],subject)
+ sendmail (subject)
+ click ('frmEvolution-Mail', 'btnSend/Receive')
+ waittillguinotexist ('dlgSend&ReceiveMail')
+ #remap ('evolution',window_id)
+ time.sleep (5)
+ releasecontext()
+ new_sent_mail_count=getrowcount (window_id,'ttblMessageList')
+ if new_sent_mail_count < sent_mail_count+1:
+ log ('Could not send mail','cause')
+ raise LdtpExecutiontionError (0)
+ except:
+ log ('Mail was not sent','error')
+ log ('numbered,alphabetic,bulleted lists','testend')
+ raise LdtpExecutionError (0)
+ try:
+ if verifymailwithimage ('Sent',sent_mail_count,ref_image) ==1:
+ log ('Text Formatting ','pass')
+ else:
+ log ('Text Formatting ','fail')
+ raise LdtpExecutionError(0)
+ #undoremap ('evolution',window_id)
+ except:
+ log ('Text formatting test did not pass','error')
+ log ('numbered,alphabetic,bulleted lists','testend')
+ raise LdtpExecutionError (0)
+ log ('numbered,alphabetic,bulleted lists','testend')
+
+
+def fonts_test(to,ref_image):
+ log ('Fonts Test','teststart')
+ try:
+ subject=['Compose editor Fonts test']
+ #selectMailPane()
+ window_id='frmEvolution-Mail'
+ selectmenuitem (window_id,'mnuFile;mnuNew;mnuMailMessage')
+ #remap ('evolution',window_id)
+ selectrowpartialmatch (window_id,'ttblMailFolderTree','Sent')
+ #remap ('evolution',window_id)
+ sent_mail_count=getrowcount (window_id,'ttblMessageList')
+ waittillguiexist ('frmComposeamessage')
+ check ('frmComposeamessage','mnuHTML')
+ time.sleep (1)
+ settextvalue ('frmComposeamessage','txt6','Hello\n')
+ remap ('evolution','frmComposeamessage')
+ selectmenuitem ('frmComposeamessage','mnuFormat;mnuFontSize;mnu+1')
+ settextvalue ('frmComposeamessage','txt7','Hello\n')
+ undoremap ('evolution','frmComposeamessage')
+ remap ('evolution','frmComposeamessage')
+ selectmenuitem ('frmComposeamessage','mnuFormat;mnuFontSize;mnu+2')
+ settextvalue ('frmComposeamessage','txt8','Hello\n')
+ undoremap ('evolution','frmComposeamessage')
+ remap ('evolution','frmComposeamessage')
+ selectmenuitem ('frmComposeamessage','mnuFormat;mnuFontSize;mnu+3')
+ settextvalue ('frmComposeamessage','txt9','Hello\n')
+ undoremap ('evolution','frmComposeamessage')
+ populate_mail_header ([to],subject)
+ sendmail (subject)
+ click ('frmEvolution-Mail', 'btnSend/Receive')
+ waittillguinotexist ('dlgSend&ReceiveMail')
+ #remap ('evolution',window_id)
+ time.sleep (5)
+ releasecontext()
+ new_sent_mail_count=getrowcount (window_id,'ttblMessageList')
+ if new_sent_mail_count < sent_mail_count+1:
+ log ('Could not send mail','cause')
+ raise LdtpExecutiontionError (0)
+ except:
+ log ('Mail was not sent','error')
+ log ('Fonts Test','testend')
+ raise LdtpExecutionError (0)
+ try:
+ if verifymailwithimage ('Sent',sent_mail_count,ref_image) ==1:
+ log ('Fonts in compose editor ','pass')
+ else:
+ log ('Fonts in compose editor ','fail')
+ raise LdtpExecutionError(0)
+ #undoremap ('evolution',window_id)
+ except:
+ log ('Fonts in compose editor did not pass','error')
+ log ('Fonts Test','testend')
+ raise LdtpExecutionError (0)
+ log ('Fonts Test','testend')
diff --git a/evolution/mailtoadd.py b/evolution/mailtoadd.py
new file mode 100644
index 0000000..44c263c
--- /dev/null
+++ b/evolution/mailtoadd.py
@@ -0,0 +1,71 @@
+#!/usr/bin/env python
+#
+# Linux Desktop Testing Project http://www.gnomebangalore.org/ldtp
+#
+# Author:
+# Prashanth Mohan <prashmohan@gmail.com>
+#
+# Copyright 2004 Novell, Inc.
+#
+# This test script is free software; you can redistribute it and/or
+# modify it under the terms of the GNU Library General Public
+# License as published by the Free Software Foundation; either
+# version 2 of the License, or (at your option) any later version.
+#
+# This library is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+# Library General Public License for more details.
+#
+# You should have received a copy of the GNU Library General Public
+# License along with this library; if not, write to the
+# Free Software Foundation, Inc., 59 Temple Place - Suite 330,
+# Boston, MA 02111-1307, USA.
+#
+
+from ldtp import *
+from ldtputils import *
+from contact import titleappend
+from evoutils.mail import *
+
+def mailtoaddbook(datafilename):
+ log ('Add Mail Sender to Address Book','teststart')
+ try:
+ data_object = LdtpDataFileParser (datafilename)
+ subject=data_object.gettagvalue ('subject')
+ selectMailPane()
+ time.sleep (2)
+ try:
+ remap ('evolution','frmEvolution-Mail')
+ selectrowpartialmatch ('frmEvolution-Mail','ttblMailFolderTree','Inbox')
+ time.sleep (2)
+ selectrow ('frmEvolution-Mail','ttblMessageList',subject[0])
+ time.sleep (1)
+ row=getrowindex (subject[0])
+ name=getcellvalue ('frmEvolution-Mail','ttblMessageList',row,3)
+ name=name[:name.find('<')]
+ name=name[:-1]
+ except:
+ log ('Row not found in list','error')
+ raise LdtpExecutionError(0)
+ selectmenuitem ('frmEvolution-Mail','mnuMessage;mnuAddSendertoAddressBook')
+ print name
+ time.sleep (5)
+ print name.find(' ')
+ if name.find (' ') >-1:
+ setcontext ('Contact Editor','Contact Editor -'+titleappend(name))
+ else:
+ setcontext ('Contact Editor','Contact Editor - '+name)
+ print 'Contact Editor -'+titleappend(name)
+ if guiexist ('dlgContactQuick-Add')==1:
+ click ('dlgContactQuick-Add','btnOK')
+ elif guiexist ('dlgContactEditor')==1:
+ click ('dlgContactEditor','btnCancel')
+ undoremap ('evolution','frmEvolution-Mail')
+ except:
+ log ('Adding mail sender to Address Book failed','error')
+ log ('Add Mail Sender to Address Book','testend')
+ raise LdtpExecutionError(0)
+ log ('Add Mail Sender to Address Book','testend')
+
+mailtoaddbook (datafilename)
diff --git a/evolution/mailtoadd.xml b/evolution/mailtoadd.xml
new file mode 100644
index 0000000..d1083a1
--- /dev/null
+++ b/evolution/mailtoadd.xml
@@ -0,0 +1,4 @@
+<?xml version="1.0"?>
+<data>
+ <subject>asd</subject>
+</data>
diff --git a/evolution/makedefault.py b/evolution/makedefault.py
new file mode 100644
index 0000000..0a47c66
--- /dev/null
+++ b/evolution/makedefault.py
@@ -0,0 +1,46 @@
+#!/usr/bin/env python
+#
+# Linux Desktop Testing Project http://www.gnomebangalore.org/ldtp
+#
+# Author:
+# Prashanth Mohan <prashmohan@gmail.com>
+#
+# Copyright 2004 Novell, Inc.
+#
+# This test script is free software; you can redistribute it and/or
+# modify it under the terms of the GNU Library General Public
+# License as published by the Free Software Foundation; either
+# version 2 of the License, or (at your option) any later version.
+#
+# This library is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+# Library General Public License for more details.
+#
+# You should have received a copy of the GNU Library General Public
+# License along with this library; if not, write to the
+# Free Software Foundation, Inc., 59 Temple Place - Suite 330,
+# Boston, MA 02111-1307, USA.
+#
+from mailaccounts import *
+
+try:
+ try:
+ data_object = LdtpDataFileParser (datafilename)
+ account_name=data_object.gettagvalue ('accountname')
+ email=data_object.gettagvalue ('email')
+ except:
+ log ('Error while reading values for make email account default test','cause')
+ raise LdtpExecutionError (0)
+ try:
+ if account_name!=[]:
+ makedefault (account_name[0])
+ elif email!=[]:
+ makedefault (email[0])
+ else:
+ log ('Input data incorrect','cause')
+ except:
+ log ('make email account default test failed','error')
+ raise LdtpExecutionError (0)
+except:
+ raise LdtpExecutionError (0)
diff --git a/evolution/makedefault.xml b/evolution/makedefault.xml
new file mode 100644
index 0000000..38f5ca4
--- /dev/null
+++ b/evolution/makedefault.xml
@@ -0,0 +1,4 @@
+<?xml version="1.0"?>
+<data>
+ <email>partha@matrix.net</email>
+</data> \ No newline at end of file
diff --git a/evolution/mark_read.py b/evolution/mark_read.py
new file mode 100644
index 0000000..c970621
--- /dev/null
+++ b/evolution/mark_read.py
@@ -0,0 +1,36 @@
+#
+# Linux Desktop Testing Project http://www.gnomebangalore.org/ldtp
+#
+# Author:
+# Venkateswaran S <wenkat.s@gmail.com>
+#
+# Copyright 2004 Novell, Inc.
+#
+# This test script is free software; you can redistribute it and/or
+# modify it under the terms of the GNU Library General Public
+# License as published by the Free Software Foundation; either
+# version 2 of the License, or (at your option) any later version.
+#
+# This library is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+# Library General Public License for more details.
+#
+# You should have received a copy of the GNU Library General Public
+# License along with this library; if not, write to the
+# Free Software Foundation, Inc., 59 Temple Place - Suite 330,
+# Boston, MA 02111-1307, USA.
+#
+
+# Copy a folder from one location to another.
+
+from menu_reorganization import *
+
+data_object = LdtpDataFileParser (datafilename)
+fldr = data_object.gettagvalue ('fldr')[0]
+
+if mark_all_read(fldr) == 1:
+ log('All mails have been marked','info')
+else:
+ log('Unable to select')
+
diff --git a/evolution/mark_read.xml b/evolution/mark_read.xml
new file mode 100644
index 0000000..58972bf
--- /dev/null
+++ b/evolution/mark_read.xml
@@ -0,0 +1,4 @@
+<?xml version="1.0"?>
+<data>
+ <fldr>Inbox</fldr>
+</data>
diff --git a/evolution/meeting.xml b/evolution/meeting.xml
new file mode 100644
index 0000000..db30ef4
--- /dev/null
+++ b/evolution/meeting.xml
@@ -0,0 +1,23 @@
+<?xml version="1.0"?>
+<data>
+ <addrbook>Personal</addrbook>
+ <summary>summary</summary>
+ <location>location</location>
+ <description>dec</description>
+ <from_date>12/06/2005</from_date>
+ <to_date>12/20/2005</to_date>
+ <from_time>10:00 AM</from_time>
+ <to_time>11:00 AM</to_time>
+ <calendar>Personal</calendar>
+ <classification>Public</classification>
+ <categories>Personal</categories>
+ <exception>12/12/2005</exception>
+ <attendee>asd asda</attendee>
+ <email>asd@asdfa.com</email>
+ <duration>month(s)</duration>
+ <durvalue>1st</durvalue>
+ <durday>Saturday</durday>
+ <count>3</count>
+ <fortype>until</fortype>
+ <nooftimes>12/12/2005</nooftimes>
+</data> \ No newline at end of file
diff --git a/evolution/menu_reorganization.py b/evolution/menu_reorganization.py
new file mode 100644
index 0000000..b3122fd
--- /dev/null
+++ b/evolution/menu_reorganization.py
@@ -0,0 +1,407 @@
+#!/usr/bin/env python
+#
+# Linux Desktop Testing Project http://www.gnomebangalore.org/ldtp
+#
+# Author:
+# Venkateswaran S <wenkat.s@gmail.com>
+#
+# Copyright 2004 Novell, Inc.
+#
+# This test script is free software; you can redistribute it and/or
+# modify it under the terms of the GNU Library General Public
+# License as published by the Free Software Foundation; either
+# version 2 of the License, or (at your option) any later version.
+#
+# This library is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+# Library General Public License for more details.
+#
+# You should have received a copy of the GNU Library General Public
+# License along with this library; if not, write to the
+# Free Software Foundation, Inc., 59 Temple Place - Suite 330,
+# Boston, MA 02111-1307, USA.
+#
+from ldtp import *
+from ldtputils import *
+
+def select_mail(fldr,subject):
+ try:
+ log('select mail in a folder','teststart')
+ remap('evolution','frmEvolution-Mail')
+ if selectrowpartialmatch('frmEvolution-Mail','ttblMailFolderTree',fldr) == 1:
+ log('Folder selected','info')
+ if selectrow('frmEvolution-Mail','ttblMessageList',subject) == 1:
+ log('Mail selected','info')
+ undoremap('evolution','frmEvolution-Mail')
+ log('select mail in a folder','testend')
+ return 1
+ else:
+ log('Unable to select the mail','error')
+ undoremap('evolution','frmEvolution-Mail')
+ log('select mail in a folder','testend')
+ return 0
+ except:
+ log('Folder not found','cause')
+ log('select mail in a folder','testend')
+ raise LdtpExecutionError (0)
+
+def selectfolder(windowname,fldr,dest=''):
+
+ try:
+ log('Selecting a given folder','teststart')
+
+ if waittillguiexist(windowname) == 1:
+ if gettreetablerowindex (windowname, 'ttblMailFolderTree', fldr) == -1:
+ click(windowname,'btnNew')
+ time.sleep(3)
+ waittillguiexist ('dlgCreatefolder')
+ settextvalue('dlgCreatefolder','txtFoldername',fldr)
+ selectrowpartialmatch ('dlgCreatefolder', 'ttblMailFolderTree',dest)
+ click('dlgCreatefolder','btnCreate')
+ time.sleep(2)
+ if guiexist('dlgEvolutionError'):
+ click('dlgEvolutionError','btnOK')
+ time.sleep(2)
+ click('dlgCreatefolder','btnCancel')
+ print 'Folder Name already exist'
+ log('Folder Already exists','error')
+
+ selectrowpartialmatch (windowname, 'ttblMailFolderTree',fldr)
+ log('Required folder selected','info')
+ log('Selecting a given folder','testend')
+ return 1
+ else:
+ log('Unable to find the window','error')
+ log('Selecting a given folder','testend')
+ except:
+ log('Unable to select the folder/create it','error')
+ log('Selecting a given folder','testend')
+
+
+def verify_folder_exist(Folder_name):
+
+ try:
+ log('Verify Folder Exists','teststart')
+ remap('evolution','frmEvolution-Mail')
+ if selectrowpartialmatch ('frmEvolution-Mail','ttblMailFolderTree',Folder_name) == 1:
+ log('Verify succeeded')
+ undoremap('evolution','frmEvolution-Mail')
+ log('Verify Folder Exists','testend')
+ return 1
+ except:
+ log('verify Failed','error')
+ log('Verify Folder Exists','testend')
+ raise LdtpExecutionError (0)
+
+def create_folder(Folder_name, location=''):
+
+ try:
+ log('Create a new folder','teststart')
+ windowname = 'dlgCreatefolder'
+ waittillguiexist (windowname)
+ settextvalue(windowname,'txtFoldername',Folder_name)
+ selectrowpartialmatch ('dlgCreatefolder', 'ttblMailFolderTree',location)
+ log('User Value Entered','info')
+ click(windowname,'btnCreate')
+ time.sleep(3)
+ if guiexist('dlgEvolutionError') == 1:
+ click('dlgEvolutionError','btnOK')
+ time.sleep(3)
+ click(windowname,'btnCancel')
+ print 'Folder Name \''+Folder_name+'\' already exist'
+ log('Folder Already exists','cause')
+ log('Create a new folder','testend')
+ return 0
+ else:
+ log('Folder created','info')
+ print 'Folder with the name \''+Folder_name+'\' created'
+ if verify_folder_exist(Folder_name) != 1:
+ print 'Folder Creatation Verify failed'
+ log('Verification failed','error')
+ log('Create a new folder','testend')
+ return 0
+ else:
+ print 'Folder Creation verified'
+ log('Folder Verified','info')
+ log('Create a new folder','testend')
+ return 1
+ except :
+ log('Cannot create a folder','error')
+ log('Create a new folder','testend')
+ print 'Cannot create a folder'
+ raise LdtpExecutionError (0)
+
+ log('Create a new folder','testend')
+
+def copy_to (from_fldr,to_fldr):
+
+ try:
+ log('Copy a folder','teststart')
+ windowname = 'dlgSelectfolder'
+ remap('evolution','frmEvolution-Mail')
+ if selectrowpartialmatch ('frmEvolution-Mail','ttblMailFolderTree',from_fldr) == 1:
+ log('From folder selected','info')
+ selectmenuitem('frmEvolution-Mail','mnuFolder;mnuCopyFolderTo')
+ time.sleep(3)
+ if selectfolder(windowname,to_fldr) == 1:
+ log('Destionation folder selected')
+ else:
+ log('Unable to get hold of destination folder','error')
+ log('Copy a folder','testend')
+ return 0
+ time.sleep(2)
+ click(windowname,'btnCopy')
+ if guiexist ('dlgEvolutionError') == 1:
+ log ('Evolution is offline','cause')
+ click('dlgEvolutionError','btnOK')
+ log('Copy a folder','testend')
+ raise LdtpExecutionError (0)
+
+ else:
+ print 'Unable to find the source folder'
+ log('Unable to find the source folder','cause')
+ log('Copy a folder','testend')
+ return 0
+ undoremap('evolution','frmEvolution-Mail')
+ print from_fldr+ ' has been copied to '+ to_fldr
+ log('folder copied','info')
+ log('Copy a folder','testend')
+ return 1
+ except :
+
+ log('Cannot copy the folder','error')
+ log('Copy a folder','testend')
+ raise LdtpExecutionError (0)
+
+def move_to (from_fldr,to_fldr):
+
+ try:
+ log('move a folder','teststart')
+ windowname = 'dlgSelectfolder'
+ remap('evolution','frmEvolution-Mail')
+ if selectrowpartialmatch ('frmEvolution-Mail','ttblMailFolderTree',from_fldr) == 1:
+ log('From folder selected','info')
+ selectmenuitem('frmEvolution-Mail','mnuFolder;mnuMoveFolderTo')
+ time.sleep(3)
+ if selectfolder(windowname,to_fldr) == 1:
+ log('Destionation folder selected')
+ else:
+ log('Unable to get hold of destination folder','error')
+ log('Move a folder','testend')
+ return 0
+ time.sleep(2)
+ remap('evolution',windowname)
+ click(windowname,'btnMove')
+ time.sleep (1)
+ if guiexist ('dlgEvolutionError') == 1:
+ log ('Evolution is offline','cause')
+ undoremap('evolution',windowname)
+ click('dlgEvolutionError','btnOK')
+ log('Move a folder','testend')
+ raise LdtpExecutionError (0)
+ undoremap('evolution',windowname)
+ else:
+ print 'Unable to find the source folder'
+ log('Unable to find the source folder','cause')
+ log('Move a folder','testend')
+ return 0
+
+ undoremap('evolution',windowname)
+ log('Move a folder','testend')
+ return 1
+ except :
+ log('Cannot copy the folder','error')
+ log('Move a folder','testend')
+ raise LdtpExecutionError (0)
+
+ log('Move a folder','testend')
+
+
+def select_all (fldrname):
+
+ try:
+ log('select all mails in a folder','teststart')
+ remap('evolution','frmEvolution-Mail')
+ if selectrowpartialmatch ('frmEvolution-Mail','ttblMailFolderTree',fldrname) == 1:
+ log('From folder selected','info')
+ time.sleep (3)
+ if selectmenuitem('frmEvolution-Mail','mnuFolder;mnuSelectAllMessages') == 1:
+ log('All items have been selected','info')
+ log('select all mails in a folder','testend')
+ return 1
+ else:
+ print 'Unable to select all mails'
+ log('select all mails in a folder','testend')
+ return 0
+ else:
+ print 'Unable to find the folder'
+ log('Unable to find the folder','cause')
+ log('select all mails in a folder','testend')
+ return 0
+ except :
+ print 'Cannot select all items in the folder'
+ log('Cannot select all the items','error')
+ raise LdtpExecutionError (0)
+
+
+def mark_all_read(fldrname):
+
+ try:
+ log('Mark all as read','teststart')
+ select_all(fldrname)
+ if selectmenuitem('frmEvolution-Mail','mnuFolder;mnuMarkMessagesasRead') == 1:
+ print 'All messages has been marked read'
+ log('All items have been selected','info')
+ else:
+ print 'Unable to select the mails'
+ log('Unable to select the menu Markas;Read','error')
+ log('Mark all as read','testend')
+ except :
+ print 'Cannot set all items in the folder as read'
+ log('Cannot mark as read','error')
+ log('Mark all as read','testend')
+ raise LdtpExecutionError(0)
+
+
+def rename (old_name,new_name):
+
+ try:
+ log('Rename a folder','teststart')
+ windowname = 'dlgRenameFolder'
+ remap('evolution','frmEvolution-Mail')
+ if selectrowpartialmatch ('frmEvolution-Mail','ttblMailFolderTree',old_name) == 1:
+ log('From folder selected','info')
+ selectmenuitem('frmEvolution-Mail','mnuFolder;mnuRename')
+
+ time.sleep(3)
+ waittillguiexist(windowname)
+ settextvalue(windowname,'txt0',new_name)
+ time.sleep(3)
+ undoremap('evolution','frmEvolution-Mail')
+ click(windowname,'btnOK')
+ time.sleep(3)
+ if guiexist('dlgEvolutionError'):
+ click('dlgEvolutionError','btnOK')
+ time.sleep(3)
+ if guiexist (windowname)==1:
+ click(windowname,'btnCancel')
+ print 'Folder Name already exist'
+ log('Folder Already exists','error')
+ else:
+ log ('Evolution is Offline','cause')
+ else:
+ print '\''+old_name+'\' has been renamed to \''+new_name
+ log('Rename sucessfull','info')
+ log('Rename a folder','testend')
+ return 1
+ else:
+ print 'Unable to find the folder'
+ log('Unable to find the folder','cause')
+ log('Rename a folder','testend')
+ return 0
+ except :
+ print 'Unable to rename'
+ log('Cannot rename the folder','error')
+ log('Rename a folder','testend')
+ raise LdtpExecutionError (0)
+
+ log('Rename a folder','testend')
+ return 0
+def delete_nonsys_folder (fldr):
+
+ try:
+ log('delete a non system folder','teststart')
+ windowname = 'dlgDelete'
+ defaultname = '\"Inbox/ashwin\"?'
+ sysfolder = ['Inbox','Drafts','Junk','Outbox','Sent','Trash']
+ if fldr in sysfolder:
+ log ('A system folder has been selected','error')
+ print 'You cannot delete a system folder'
+ else:
+ remap('evolution','frmEvolution-Mail')
+ selectrow ('frmEvolution-Mail', 'ttblMailFolderTree', fldr)
+ selectmenuitem('frmEvolution-Mail','mnuFolder;mnuDelete')
+ setcontext ('Delete \"Inbox/ashwin\"?','Delete \"' + fldr + '\"?')
+ time.sleep(2)
+ if waittillguiexist (windowname + defaultname) == 1:
+ click(windowname + defaultname, 'btnDelete')
+ time.sleep(2)
+ if guiexist('dlgEvolutionError') ==1:
+ click('dlgEvolutionError','btnOK')
+ log('The folder has subfolders or evolution is offline','cause')
+ log('delete a non system folder','testend')
+ return 0
+ else:
+ print 'the folder has been deleted'
+ log('the folder has been deleted','info')
+ else:
+ log('unable to find the delete window','error')
+ log('delete a non system folder','testend')
+ raise LdtpExecutionError (0)
+ undoremap('evolution','frmEvolution-Mail')
+ log('delete a non system folder','testend')
+ return 1
+ except :
+ print 'Cannot delete the folder'
+ log('Cannot delete the folder','error')
+ log('delete a non system folder','testend')
+ raise LdtpExecutionError (0)
+
+def insert_followup_details (follow_up_flag, due_date, time, progress):
+
+ try:
+ log('Insert Follow up details','teststart')
+ windowname = 'dlgFlagtoFollowUp'
+ waittillguiexist (windowname)
+ settextvalue (windowname,'txtFlag',follow_up_flag)
+ settextvalue (windowname,'txtTextDateEntry',due_date)
+ settextvalue (windowname,'txt1',time)
+ if progress == 'completed':
+ check(windowname,'chkCompleted')
+ elif progress == 'not started':
+ uncheck(windowname,'chkCompleted')
+ time.sleep (3)
+ click(windowname,'btnOK')
+ log('Inserted the followup details')
+ print 'Follow up details entered'
+ log('Insert Follow up details','testend')
+ except:
+ log('Unable to enter the given details','error')
+ log('Insert Follow up details','testend')
+ print 'Unable to enter the follow up details'
+ raise LdtpExecutionError (0)
+
+
+def expunge():
+
+ try:
+ log('Expunge mails','teststart')
+ # Assuming that only the mails in the trash can be expunged.
+ fldr = 'Trash'
+ remap('evolution','frmEvolution-Mail')
+ if selectrowpartialmatch ('frmEvolution-Mail', 'ttblMailFolderTree', fldr):
+ log('fldr has been selected','info')
+ time.sleep(2)
+ if selectmenuitem('frmEvolution-Mail','mnuFolder;mnuExpunge') == 1:
+ log('Expunge successfull','info')
+ print 'Mails have been permanently removed'
+ else:
+ log('Expunge not completed','info')
+ print 'Probs in permanently removing the mails'
+ raise LdtpExecutionError (0)
+ else:
+ print fldr+ 'not found'
+ log('Unable to find trash','error')
+ time.sleep (2)
+ if getrowcount ('frmEvolution-Mail','mnuFolder;mnuExpunge') == 0:
+ log ('Expunge Verified','info')
+ else:
+ log ('Expunge Failed during verification','cause')
+ raise LdtpExecutionError (0)
+ except:
+ log('Unable to expunge the mails','error')
+ log('Expunge mails','testend')
+ print 'Unable to expunge'
+ raise LdtpExecutionError (0)
+ log('Expunge mails','testend')
diff --git a/evolution/modify-appointment.py b/evolution/modify-appointment.py
new file mode 100644
index 0000000..c1a00c9
--- /dev/null
+++ b/evolution/modify-appointment.py
@@ -0,0 +1,106 @@
+#!/usr/bin/python
+#
+# Linux Desktop Testing Project http://www.gnomebangalore.org/ldtp
+#
+# Author:
+# Venkateswaran S <wenkat.s@gmail.com>
+#
+# Copyright 2004 Novell, Inc.
+#
+# This library is free software; you can redistribute it and/or
+# modify it under the terms of the GNU Library General Public
+# License as published by the Free Software Foundation; either
+# version 2 of the License, or (at your option) any later version.
+#
+# This library is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+# Library General Public License for more details.
+#
+# You should have received a copy of the GNU Library General Public
+# License along with this library; if not, write to the
+# Free Software Foundation, Inc., 59 Temple Place - Suite 330,
+# Boston, MA 02111-1307, USA.
+#
+# To modify a current appointment.
+from ldtp import *
+from ldtputils import *
+from evoutils.calendar import *
+
+def read_data():
+ #Initialising XML parser with data file
+ data_object = LdtpDataFileParser (datafilename)
+
+ #Extracting imput data from xml file
+ summary = data_object.gettagvalue ('summary')[0]
+ location = data_object.gettagvalue ('location')[0]
+ description = data_object.gettagvalue ('description')[0]
+ from_date = data_object.gettagvalue ('from_date')[0]
+ to_date = data_object.gettagvalue ('to_date')[0]
+ from_time = data_object.gettagvalue ('from_time')[0]
+ to_time = data_object.gettagvalue ('to_time')[0]
+ calendar = data_object.gettagvalue ('calendar')[0]
+ new_date = data_object.gettagvalue ('date')[0]
+ old_summary = data_object.gettagvalue ('old_summary')[0]
+# print new_date, old_summary, summary, location, description, from_date, to_date, from_time, to_time, calendar
+ return new_date, old_summary, summary, location, description, from_date, to_date, from_time, to_time, calendar
+
+def modifyappointment(occurance,new_date, old_summary, summary, location, description, from_date, to_date, from_time, to_time, calendar):
+
+ log ('Modify Appointment','teststart')
+ try:
+ try:
+
+ windowname = 'frmAppointment-Nosummary'
+ more_items_todo = 'yes'
+ selectcalevent (new_date,old_summary)
+ time.sleep(2)
+ if selectmenuitem('frmEvolution-Calendars','mnuFile;mnuOpenAppointment') == 1:
+ log('Appointment opened','info')
+ else:
+ log('Unable to select the menu File;OpenAppointment','cause')
+ log ('Modify Appointment','testend')
+ raise LdtpExecutionError (0)
+ except:
+ log ('Event not available','cause')
+ log ('Modify Appointment','testend')
+ raise LdtpExecutionError(0)
+ try:
+ setcontext ('Appointment - No summary','Appointment - '+old_summary)
+ waittillguiexist ('frmAppointment-Nosummary')
+ #definemeeting(summary,location,description,from_date,to_date,from_time,to_time,calendar,classification,categories)
+ insert_appointment (windowname, summary, location, description, from_date, from_time, to_date, to_time, calendar, more_items_todo)
+ click(windowname,'btnSave')
+ time.sleep(3)
+ except:
+ log ('Error While modifying values','error')
+ raise LdtpExecutionError (0)
+ if guiexist ('dlgQuestion')==1:
+ remap ('evolution','dlgQuestion')
+ if occurance==0:
+ click ('dlgQuestion','rbtnThisInstanceOnly')
+ elif occurance==1:
+ click ('dlgQuestion','rbtnAllInstances')
+ click ('dlgQuestion','btnOK')
+ undoremap ('evolution','dlgQuestion')
+ releasecontext()
+ time.sleep(3)
+ if guiexist ('dlgEvolutionQuery'):
+ remap ('evolution','dlgEvolutionQuery')
+ click ('dlgEvolutionQuery','btnDon\'tSend')
+ undoremap ('evolution','dlgEvolutionQuery')
+ except:
+ log ('Could not Modify the appointment','error')
+ log ('Modify Appointment','testend')
+ raise LdtpExecutionError (0)
+
+ log('Appointment modified','info')
+ log ('Modify Appointment','testend')
+
+new_date, old_summary, summary, location, description, from_date, to_date, from_time, to_time, calendar = read_data()
+log('Modify all instance of an appointment','teststart')
+modifyappointment(1,new_date, old_summary, summary, location, description, from_date, to_date, from_time, to_time, calendar)
+log('Modify all instance of an appointment','testend')
+log('Modify This instance only','teststart')
+modifyappointment(0,new_date, old_summary, summary, location, description, from_date, to_date, from_time, to_time, calendar)
+log('Modify This instance only','testend')
diff --git a/evolution/modify-appointment.xml b/evolution/modify-appointment.xml
new file mode 100644
index 0000000..c6aa4db
--- /dev/null
+++ b/evolution/modify-appointment.xml
@@ -0,0 +1,15 @@
+<?xml version="1.0"?>
+<data>
+ <summary>modified summary</summary>
+ <location>Conference room</location>
+ <description>A modified appointment for testing appointment creation</description>
+ <classification>Confidential</classification>
+ <calendar>Personal</calendar>
+ <categories>Business</categories>
+ <from_date>12/12/2005</from_date>
+ <to_date>12/27/2005</to_date>
+ <from_time>11:00 AM</from_time>
+ <to_time>11:00 AM</to_time>
+ <date>12/20/2005</date>
+ <old_summary>Recursive appointment</old_summary>
+</data>
diff --git a/evolution/modify-meeting-recur.xml b/evolution/modify-meeting-recur.xml
new file mode 100644
index 0000000..bc8c901
--- /dev/null
+++ b/evolution/modify-meeting-recur.xml
@@ -0,0 +1,21 @@
+<?xml version="1.0"?>
+<data>
+ <addrbook>Personal</addrbook>
+ <summary>dddd</summary>
+ <location>asoihfoas room</location>
+ <description>A newapsdhapioshdasdappointment for testing appointment creation</description>
+ <classification>Confidential</classification>
+ <calendar>Personal</calendar>
+ <categories>Business</categories>
+ <from_date>10/26/2005</from_date>
+ <to_date>10/29/2005</to_date>
+ <attendee>asd asda</attendee>
+ <email>asd@asdfa.com</email>
+ <exception>10/28/2005</exception>
+ <duration>month(s)</duration>
+ <durvalue>second</durvalue>
+ <durday>Saturday</durday>
+ <count>5</count>
+ <fortype>until</fortype>
+ <nooftimes>12/12/05</nooftimes>
+</data>
diff --git a/evolution/modify-meeting.xml b/evolution/modify-meeting.xml
new file mode 100644
index 0000000..72ddc04
--- /dev/null
+++ b/evolution/modify-meeting.xml
@@ -0,0 +1,21 @@
+<?xml version="1.0"?>
+<data>
+ <addrbook>Personal</addrbook>
+ <summary>new summary</summary>
+ <location>apshdpa room</location>
+ <description>asophidoaishd </description>
+ <classification>Confidential</classification>
+ <calendar>Personal</calendar>
+ <categories>Business</categories>
+ <from_date>10/24/2005</from_date>
+ <to_date>10/29/2005</to_date>
+ <attendee>asd asda</attendee>
+ <email>asd@asdfa.com</email>
+ <exception>10/28/2005</exception>
+ <duration>month(s)</duration>
+ <durvalue>second</durvalue>
+ <durday>Saturday</durday>
+ <count>5</count>
+ <fortype>until</fortype>
+ <nooftimes>12/12/05</nooftimes>
+</data>
diff --git a/evolution/modify_task.py b/evolution/modify_task.py
new file mode 100644
index 0000000..31caebb
--- /dev/null
+++ b/evolution/modify_task.py
@@ -0,0 +1,123 @@
+#
+# Linux Desktop Testing Project http://www.gnomebangalore.org/ldtp
+#
+# Author:
+# Venkateswaran S <wenkat.s@gmail.com>
+#
+# Copyright 2004 Novell, Inc.
+#
+# This test script is free software; you can redistribute it and/or
+# modify it under the terms of the GNU Library General Public
+# License as published by the Free Software Foundation; either
+# version 2 of the License, or (at your option) any later version.
+#
+# This library is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+# Library General Public License for more details.
+#
+# You should have received a copy of the GNU Library General Public
+# License along with this library; if not, write to the
+# Free Software Foundation, Inc., 59 Temple Place - Suite 330,
+# Boston, MA 02111-1307, USA.
+#
+# This script will modify a particular task.
+
+from ldtp import *
+from ldtputils import *
+#from evoutils.Task import getrowindex
+def getrowindex(subject):
+ try:
+ noofchild=getrowcount ('frmEvolution-Tasks','tblTaskTable')
+ for ind in range (noofchild):
+ if getcellvalue('frmEvolution-Tasks','tblTaskTable',ind,2) == subject:
+ return ind
+ if ind == noofchild-1:
+ log ('Message not present','cause')
+ raise LdtpExecutionError (0)
+ except:
+ log ('Unable to get index of message','error')
+ raise LdtpExecutionError (0)
+
+def read_data ():
+
+ log('read user data','teststart')
+ try:
+ data_object = LdtpDataFileParser (datafilename)
+ Row_no = data_object.gettagvalue ('row_no')
+ Due_date = data_object.gettagvalue ('due_date')
+ Progress = data_object.gettagvalue ('progress')
+ Summary = data_object.gettagvalue ('summary')
+ old_summary = data_object.gettagvalue ('old_summary')
+ log('User data read successfull','info')
+ log('read user data','testend')
+
+ return Row_no, Due_date, Progress, Summary, old_summary
+ except:
+ log('Unable to read the user data or data file missing','error')
+ log('read user data','testend')
+ raise LdtpExecutionError(0)
+
+
+# The script begins here.
+# Modifying the task , by doubleclicking the task in the table.
+try:
+ log('Modify a task','teststart')
+ waittillguiexist('frmEvolution-Tasks')
+ remap('evolution','frmEvolution-Tasks')
+ Row_no, Due_date, Progress, Summary, old_summary = read_data()
+ selectrow ('frmEvolution-Tasks', 'tblTaskTable', old_summary[0])
+ selectmenuitem('frmEvolution-Tasks', 'mnuFile;mnuOpenTask')
+ time.sleep(2)
+ setcontext('Task - No summary','Task - ' + old_summary[0])
+ waittillguiexist('frmTask-Nosummary')
+ remap('evolution','frmTask-Nosummary')
+
+except:
+ log('Unable to open Task window','error')
+ log('Modify a task','testend')
+ raise LdtpExecutionError(0)
+
+# Modifies the task according to users wish.
+try:
+ settextvalue ('frmTask-Nosummary', 'txtTextDateEntry',Due_date[0])
+ settextvalue ('frmTask-Nosummary', 'txtSummary',Summary[0])
+ setcontext('Task - No summary','Task - ' + Summary[0])
+ log('User data Loaded','info')
+ time.sleep(3)
+ if stateenabled ('frmTask-Nosummary','btnSave')==1:
+ click('frmTask-Nosummary','btnSave')
+ time.sleep(3)
+ log('The required task list has been modified','info')
+ else:
+ log('The Task list already exists','info')
+ click('frmTask-Nosummary','btnClose')
+
+ time.sleep(3)
+ if guiexist('dlgEvolutionQuery'):
+ remap('evolution','dlgEvolutionQuery')
+ click('dlgEvolutionQuery','btnSend')
+ time.sleep(3)
+ undoremap('evolution','dlgEvolutionQuery')
+ log('Task has been modified successfully','info')
+
+except:
+ log('Unable to load the user data','error')
+ log('modify a task','testend')
+ raise LdtpExecutionError(0)
+
+#Change the Progress of the task.
+try:
+ Row_no = getrowindex(Summary[0])
+ if Progress[0] == 'complete':
+ checkrow ('frmEvolution-Tasks', 'tblTaskTable', int(Row_no), 1)
+ elif Progress[0] == 'Not started':
+ uncheckrow ('frmEvolution-Tasks', 'tblTaskTable', int(Row_no), 1)
+ print 'The Task has been modified successfully'
+ log('progress of the task has been modified','info')
+except:
+ log('unable to change the progress of the task','error')
+ log('modify a task','testend')
+ raise LdtpExecutionError(0)
+
+log('Modify a task','testend')
diff --git a/evolution/modify_task.xml b/evolution/modify_task.xml
new file mode 100644
index 0000000..d362d8a
--- /dev/null
+++ b/evolution/modify_task.xml
@@ -0,0 +1,8 @@
+<?xml version="1.0"?>
+<data>
+ <row_no>3</row_no>
+ <old_summary>This is just a sample</old_summary>
+ <due_date>12/15/2005</due_date>
+ <progress>complete</progress>
+ <summary>This is the modified summary</summary>
+</data>
diff --git a/evolution/modifyallinstmeet.py b/evolution/modifyallinstmeet.py
new file mode 100644
index 0000000..a72fa4e
--- /dev/null
+++ b/evolution/modifyallinstmeet.py
@@ -0,0 +1,27 @@
+#!/usr/bin/env python
+#
+# Linux Desktop Testing Project http://www.gnomebangalore.org/ldtp
+#
+# Author:
+# Prashanth Mohan <prashmohan@gmail.com>
+#
+# Copyright 2004 Novell, Inc.
+#
+# This test script is free software; you can redistribute it and/or
+# modify it under the terms of the GNU Library General Public
+# License as published by the Free Software Foundation; either
+# version 2 of the License, or (at your option) any later version.
+#
+# This library is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+# Library General Public License for more details.
+#
+# You should have received a copy of the GNU Library General Public
+# License along with this library; if not, write to the
+# Free Software Foundation, Inc., 59 Temple Place - Suite 330,
+# Boston, MA 02111-1307, USA.
+#
+from modifymeeting import *
+
+modifymeeting (datafilename,1)
diff --git a/evolution/modifycontact.py b/evolution/modifycontact.py
new file mode 100644
index 0000000..f7f72ed
--- /dev/null
+++ b/evolution/modifycontact.py
@@ -0,0 +1,133 @@
+#!/usr/bin/env python
+#
+# Linux Desktop Testing Project http://www.gnomebangalore.org/ldtp
+#
+# Author:
+# Prashanth Mohan <prashmohan@gmail.com>
+#
+# Copyright 2004 Novell, Inc.
+#
+# This test script is free software; you can redistribute it and/or
+# modify it under the terms of the GNU Library General Public
+# License as published by the Free Software Foundation; either
+# version 2 of the License, or (at your option) any later version.
+#
+# This library is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+# Library General Public License for more details.
+#
+# You should have received a copy of the GNU Library General Public
+# License along with this library; if not, write to the
+# Free Software Foundation, Inc., 59 Temple Place - Suite 330,
+# Boston, MA 02111-1307, USA.
+#
+
+from ldtp import *
+from ldtputils import *
+from contact import *
+
+def modifycontact(datafilename):
+ log('Contact Modificaton','teststart')
+
+ try:
+ AddrBook,Name,NewWorkEmail,NewHomeEmail,NewHomeAdd,NewWorkAdd,NewOtherAdd=getmodifiedvals(datafilename)
+# print AddrBook,Name,NewWorkEmail,NewHomeEmail,NewHomeAdd,NewWorkAdd,NewOtherAdd
+ if AddrBook != []:
+ selectaddrbook (AddrBook[0])
+ time.sleep (2)
+ selectcontact (titleappend(Name[0])[1:])
+ time.sleep (2)
+ selectmenuitem ('frmEvolution-Contacts','mnuFile;mnuOpen')
+ setcontext ('Contact Editor','Contact Editor -'+titleappend(Name[0]))
+ waittillguiexist ('dlgContactEditor')
+ if len (NewWorkEmail)>0:
+ settextvalue ('dlgContactEditor','txtWork',NewWorkEmail[0])
+ time.sleep (1)
+ if len (NewHomeEmail)>0:
+ settextvalue ('dlgContactEditor','txtHome',NewHomeEmail[0])
+ time.sleep (1)
+ if len(NewHomeAdd)>0:
+ settextvalue ('dlgContactEditor','txtAddress',NewHomeAdd[0])
+ time.sleep (1)
+ if len(NewWorkAdd)>0:
+ settextvalue ('dlgContactEditor','txtAddress1',NewWorkAdd[0])
+ time.sleep (1)
+ if len(NewOtherAdd)>0:
+ settextvalue ('dlgContactEditor','txtAddress2',NewOtherAdd[0])
+ time.sleep (1)
+ click ('dlgContactEditor','btnOK')
+ time.sleep (3)
+ if guiexist ('dlgDuplicateContactDetected')==1:
+ click ('dlgDuplicateContactDetected','btnAdd')
+ verifymodifications(AddrBook,Name,NewWorkEmail,NewHomeEmail,NewHomeAdd,NewWorkAdd,NewOtherAdd)
+ except:
+ log ('Error While Modifying values','error')
+ log('Contact Modificaton','testend')
+ raise LdtpExecutionError(0)
+ log('Contact Modificaton','testend')
+
+
+def getmodifiedvals(datafilename):
+ log ('Getting values for Contact Modification','teststart')
+ try:
+ data_object = LdtpDataFileParser (datafilename)
+ AddrBook=data_object.gettagvalue ('AddrBook')
+ Name=data_object.gettagvalue ('Name')
+ NewWorkEmail=data_object.gettagvalue ('WorkEmail')
+ NewHomeEmail=data_object.gettagvalue ('HomeEmail')
+ NewHomeAdd=data_object.gettagvalue ('HomeAddress')
+ NewWorkAdd=data_object.gettagvalue ('WorkAddress')
+ NewOtherAdd=data_object.gettagvalue ('OtherAddress')
+ except:
+ log ('data read failed','error')
+ log ('Getting values for Contact Modification','testend')
+ raise LdtpExecutionError(0)
+ log ('Getting values for Contact Modification','testend')
+ return AddrBook,Name,NewWorkEmail,NewHomeEmail,NewHomeAdd,NewWorkAdd,NewOtherAdd
+
+
+def verifymodifications(AddrBook,FullName,WorkEmail,HomeMail,HomeAdd,WorkAdd,OtherAdd):
+ log ('Verify Modified Contact','teststart')
+ try:
+ selectaddrbook(AddrBook[0])
+ selectcontact(titleappend(FullName[0])[1:])
+ time.sleep (2)
+ selectmenuitem ('frmEvolution-Contacts','mnuFile;mnuOpen')
+ title='dlgContactEditor-'+titleappend(FullName[0]).replace(' ','')
+ setcontext ('Contact Editor','Contact Editor -'+titleappend(FullName[0]))
+ waittillguiexist ('dlgContactEditor')
+ time.sleep(2)
+# print gettextvalue ('dlgContactEditor','txtFullName')
+# print FullName[0]
+# print "full name"
+ if gettextvalue ('dlgContactEditor','txtFullName')!=FullName[0]:
+ log ('Full Name does not match','info')
+ raise LdtpExecutionError(0)
+# print "Full Name over"
+ if len (WorkEmail)>0 and gettextvalue ('dlgContactEditor','txtWork')!=WorkEmail[0]:
+ log ('Work Email matches','info')
+ raise LdtpExecutionError(0)
+ if len(HomeMail)>0 and gettextvalue ('dlgContactEditor','txtHome')!=HomeMail[0]:
+ log ('Home Email matches','info')
+ raise LdtpExecutionError(0)
+## BUG IN EVOLUTION ##
+## evo 2.5.2 stores an extra new line char at the end of the address fields
+## uncommment the following lines when bug fixed
+# if len(HomeAdd)>0 and gettextvalue ('dlgContactEditor','txtAddress')!=HomeAdd[0]:
+# log ('Home Address matches','info')
+# raise LdtpExecutionError(0)
+# if len (WorkAdd)>0 and gettextvalue ('dlgContactEditor','txtAddress1')!=WorkAdd[0]:
+# log ('Work Address matches','info')
+# raise LdtpExecutionError(0)
+# if len(OtherAdd)>0 and gettextvalue ('dlgContactEditor','txtAddress2')!=OtherAdd[0]:
+# log ('Other Address matches','info')
+# raise LdtpExecutionError(0)
+ click ('dlgContactEditor','btnCancel')
+ except:
+ log ('Contact has not been modified correctly','error')
+ log ('Verify Modified Contact','testend')
+ raise LdtpExecutionError(0)
+ log ('Verify Modified Contact','testend')
+
+modifycontact(datafilename)
diff --git a/evolution/modifycontact.xml b/evolution/modifycontact.xml
new file mode 100644
index 0000000..4c3010c
--- /dev/null
+++ b/evolution/modifycontact.xml
@@ -0,0 +1,8 @@
+<?xml version="1.0"?>
+<data>
+ <AddrBook>Personal</AddrBook>
+ <Name>Test Name</Name>
+ <WorkEmail>work1@work1.com</WorkEmail>
+ <WorkAddress>work1</WorkAddress>
+ <OtherAddress>other1</OtherAddress>
+</data>
diff --git a/evolution/modifycontactlist.py b/evolution/modifycontactlist.py
new file mode 100644
index 0000000..d0486a5
--- /dev/null
+++ b/evolution/modifycontactlist.py
@@ -0,0 +1,106 @@
+#!/usr/bin/env python
+#
+# Linux Desktop Testing Project http://www.gnomebangalore.org/ldtp
+#
+# Author:
+# Prashanth Mohan <prashmohan@gmail.com>
+#
+# Copyright 2004 Novell, Inc.
+#
+# This test script is free software; you can redistribute it and/or
+# modify it under the terms of the GNU Library General Public
+# License as published by the Free Software Foundation; either
+# version 2 of the License, or (at your option) any later version.
+#
+# This library is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+# Library General Public License for more details.
+#
+# You should have received a copy of the GNU Library General Public
+# License along with this library; if not, write to the
+# Free Software Foundation, Inc., 59 Temple Place - Suite 330,
+# Boston, MA 02111-1307, USA.
+#
+
+from ldtp import *
+from ldtputils import *
+from contact import *
+
+def modcontactlist(datafilename):
+ log ('Modify Contact List','teststart')
+ try:
+ ListName,AddEmailAddresses,DelEmailAddresses=getmodlistvals(datafilename)
+ opencontactlist(ListName)
+ addtocontactlist (AddEmailAddresses)
+ delfromcontactlist (DelEmailAddresses)
+ click ('dlgContactListEditor','btnOK')
+ time.sleep (2)
+ verifymodifylist(ListName,AddEmailAddresses,DelEmailAddresses)
+ except:
+ log ('Unable to modify Contact List','error')
+ log ('Modify Contact List','testend')
+ raise LdtpExecutionError(0)
+ log ('Modify Contact List','testend')
+
+
+def addtocontactlist(addList):
+ log ('Add to Contact List','teststart')
+# print addList
+ try:
+ for val in range(len (addList)):
+ settextvalue ('dlgContactListEditor','txtTypeanemailaddressordragacontactintothelistbelow',addList[val])
+ print 'set the list value'
+ click ('dlgContactListEditor','btnAdd')
+ time.sleep (1)
+ if guiexist ('dlgEvolutionQuery')==1:
+ click ('dlgEvolutionQuery','btnCancel')
+ time.sleep (1)
+ except:
+ log ('error while adding contacts to contact list','error')
+ log ('Add to Contact List','testend')
+ raise LdtpExecutionError(0)
+ log ('Add to Contact List','testend')
+
+def delfromcontactlist (remList):
+ log ('Remove from Contact List','teststart')
+ try:
+ for val in range(len(remList)):
+ try:
+ selectrow ('dlgContactListEditor','tbl0',remList[val])
+ except:
+ log (remList[val]+' not in List','error')
+ time.sleep (1)
+ click ('dlgContactListEditor','btnRemove')
+ time.sleep (1)
+ except:
+ log ('Contact could not be deleted from contact list','error')
+ log ('Remove from Contact List','testend')
+ raise LdtpExecutionError(0)
+ log ('Remove from Contact List','testend')
+
+def verifymodifylist(ListName,InEmail,OutEmail):
+ log ('Verification for Contact List modification','teststart')
+ try:
+ opencontactlist(ListName)
+ setcontext ('Contact List Editor',ListName[0])
+ waittillguiexist ('dlgContactListEditor')
+ for value in InEmail:
+ if (gettablerowindex ('dlgContactListEditor','tbl0',value)) == -1:
+ raise LdtpExecutionError(0)
+
+# print "values in inemail perfect"
+# raw_input ("input")
+# for value in OutEmail:
+# if (gettablerowindex ('dlgContactListEditor','tbl0',EmailAddresses[val])) != -1:
+# raise LdtpExecutionError(0)
+ click ('dlgContactListEditor','btnCancel')
+ except:
+ log ('Contact List Modification has failed verification','error')
+ log ('Verification for Contact List modification','testend')
+ raise LdtpExecutionError(0)
+ click ('dlgContactListEditor','btnOK')
+ releasecontext()
+ log ('Verification for Contact List modification','testend')
+
+modcontactlist (datafilename)
diff --git a/evolution/modifycontactlist.xml b/evolution/modifycontactlist.xml
new file mode 100644
index 0000000..19c336b
--- /dev/null
+++ b/evolution/modifycontactlist.xml
@@ -0,0 +1,7 @@
+<?xml version="1.0"?>
+<data>
+ <ListName>Test List</ListName>
+ <AddEmail1>asodha@sodfh.com</AddEmail1>
+ <AddEmail2>aspdapsjdpa@pasihfdpa.com</AddEmail2>
+ <DelEmail1>asda@asd.com</DelEmail1>
+</data>
diff --git a/evolution/modifycontactwhenoffline.py b/evolution/modifycontactwhenoffline.py
new file mode 100644
index 0000000..15ccc70
--- /dev/null
+++ b/evolution/modifycontactwhenoffline.py
@@ -0,0 +1,58 @@
+#!/usr/bin/env python
+#
+# Linux Desktop Testing Project http://www.gnomebangalore.org/ldtp
+#
+# Author:
+# Prashanth Mohan <prashmohan@gmail.com>
+#
+# Copyright 2004 Novell, Inc.
+#
+# This test script is free software; you can redistribute it and/or
+# modify it under the terms of the GNU Library General Public
+# License as published by the Free Software Foundation; either
+# version 2 of the License, or (at your option) any later version.
+#
+# This library is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+# Library General Public License for more details.
+#
+# You should have received a copy of the GNU Library General Public
+# License along with this library; if not, write to the
+# Free Software Foundation, Inc., 59 Temple Place - Suite 330,
+# Boston, MA 02111-1307, USA.
+#
+
+from contact import *
+from evoutils.mail import go_offline
+
+log ('Modify contact when server is offline','teststart')
+data_object = LdtpDataFileParser (datafilename)
+AddrBook=data_object.gettagvalue ('AddrBook')
+name=data_object.gettagvalue ('name')
+
+try:
+ #go_offline ()
+ selectContactPane()
+ selectaddrbook (AddrBook[0])
+ selectcontact (titleappen(name[0])[1:])
+ selectmenuitem ('frmEvolution-Contacts','mnuFile;mnuOpen')
+ setcontext ('Contact Editor','Contact Editor -'+titleappend (name[0]))
+ waittillguiexist ('dlgContactEditor')
+except:
+ log ('Unable to open contact','cause')
+ log ('Modify contact when server is offline','testend')
+ raise LdtpExecutionError (0)
+
+try:
+ if gettextstate ('dlgContactEditor','txtFullName')==0:
+ log ('Text box is disabled','info')
+ else:
+ log ('Text box is editable','cause')
+ raise LdtpExecutionError (0)
+except:
+ log ('Modify contact when server is offline','testend')
+ raise LdtpExecutionError (0)
+log ('Modify contact when server is offline','testend')
+
+
diff --git a/evolution/modifycontactwhenoffline.xml b/evolution/modifycontactwhenoffline.xml
new file mode 100644
index 0000000..58b0265
--- /dev/null
+++ b/evolution/modifycontactwhenoffline.xml
@@ -0,0 +1,5 @@
+<?xml version="1.0"?>
+<data>
+ <AddrBook>Frequent Contacts</AddrBook>
+ <name>chen</name>
+</data>
diff --git a/evolution/modifymeeting.py b/evolution/modifymeeting.py
new file mode 100644
index 0000000..2cd3ba8
--- /dev/null
+++ b/evolution/modifymeeting.py
@@ -0,0 +1,123 @@
+#!/usr/bin/env python
+#
+# Linux Desktop Testing Project http://www.gnomebangalore.org/ldtp
+#
+# Author:
+# Prashanth Mohan <prashmohan@gmail.com>
+#
+# Copyright 2004 Novell, Inc.
+#
+# This test script is free software; you can redistribute it and/or
+# modify it under the terms of the GNU Library General Public
+# License as published by the Free Software Foundation; either
+# version 2 of the License, or (at your option) any later version.
+#
+# This library is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+# Library General Public License for more details.
+#
+# You should have received a copy of the GNU Library General Public
+# License along with this library; if not, write to the
+# Free Software Foundation, Inc., 59 Temple Place - Suite 330,
+# Boston, MA 02111-1307, USA.
+#
+
+from addmeeting import *
+
+def modifymeeting(datafilename,occurance=0):
+ log ('Modify Meeting','teststart')
+ try:
+ addrbook,summary,location,description,from_date,to_date,from_time,to_time,calendar,classification,categories,exception,attendee,email,duration,dur_value,dur_day,count,for_type,no_of_times=getmeetingdata (datafilename)
+ print addrbook,summary,location,description,from_date,to_date,from_time,to_time,calendar,classification,categories,exception,attendee,email,duration,dur_value,dur_day,count,for_type,no_of_times
+# raw_input ('modfify meeting values')
+ #selectCalendarPane()
+ try:
+ selectmeeting (from_date[0],summary[0])
+ selectmenuitem ('frmEvolution-Calendars','mnuFile;mnuOpenAppointment')
+ except:
+ log ('Event not available','cause')
+ raise LdtpExecutionError(0)
+ try:
+ setcontext ('Meeting - No summary','Meeting - '+summary[0])
+ waittillguiexist ('frmMeeting-Nosummary')
+ definemeeting (summary,location,description,from_date,to_date,from_time,to_time,calendar,classification,categories)
+ except:
+ log ('Error While modifying values','error')
+ raise LdtpExecutionError (0)
+ try:
+ if len(attendee)>0:
+ addattendees (attendee,email,addrbook)
+ time.sleep (1)
+ except:
+ log ('error adding attendees','cause')
+ raise LdtpExecutionError(0)
+# uncomment if recurrence setting should also be changed
+# try:
+# if recur==1 or len(exception)>0:
+# #click ('frmMeeting-Nosummary','btnRecurrence')
+# selectmenuitem ('frmMeeting-Nosummary','mnuOptions;mnuRecurrence')
+# waittillguiexist ('dlgRecurrence')
+# insert_recurrence ('dlgRecurrence',duration[0],dur_value[0],dur_day[0],count[0],for_type[0],no_of_times[0],exception[0])
+# except:
+# log ('error during recurrence','cause')
+# raise LdtpExecutionError(0)
+ click ('frmMeeting-Nosummary','btnSave')
+ time.sleep (3)
+ if guiexist ('dlgQuestion')==1:
+ remap ('evolution','dlgQuestion')
+ if occurance==0:
+ click ('dlgQuestion','rbtnThisInstanceOnly')
+ elif occurance==1:
+ click ('dlgQuestion','rbtnAllInstances')
+ click ('dlgQuestion','btnOK')
+ undoremap ('evolution','dlgQuestion')
+ releasecontext()
+ waittillguiexist ('dlgEvolutionQuery')
+ remap ('evolution','dlgEvolutionQuery')
+ click ('dlgEvolutionQuery','btnDon\'tSend')
+ undoremap ('evolution','dlgEvolutionQuery')
+ waittillguinotexist ('dlgEvolutionQuery')
+ except:
+ log ('Could not Modify New meeting','error')
+ log ('Modify Meeting','testend')
+ raise LdtpExecutionError (0)
+ try:
+ log ('Verify modified Meeting','teststart')
+ verifymeeting (summary,location,description,from_date,to_date,from_time,to_time,calendar,classification,categories,exception,attendee,email,duration,dur_value,dur_day,count,for_type,no_of_times)
+ #verifymeeting (addrbook,summary,location,description,from_date,to_date,from_time,to_time,calendar,classification,categories,exception,attendee,email,duration,dur_value,dur_day,count,for_type,no_of_times)
+ except:
+ log ('Modify meeting verify failed','error')
+ log ('Modify Meeting','testend')
+ raise LdtpExecutionError (0)
+ log ('Modify Meeting','testend')
+
+def deletemeeting(fromdate,summary,occurance=0):
+ """ occurance == 0 Non recursive
+ occurance == 1 if only this instance
+ occurance == 2 for all instances"""
+ log ('Delete Meeting/Appointment','teststart')
+ try:
+ selectmeeting (fromdate,summary)
+ time.sleep (2)
+ if occurance == 0:
+ selectmenuitem ('frmEvolution-Calendars','mnuEdit;mnuDelete')
+ elif occurance == 1:
+ selectmenuitem ('frmEvolution-Calendars','mnuEdit;mnuDeletethisOccurrence')
+ else:
+ selectmenuitem ('frmEvolution-Calendars','mnuEdit;mnuDeleteAllOccurrences')
+ waittillguiexist ('dlgEvolutionQuery')
+ remap ('evolution','dlgEvolutionQuery')
+ click ('dlgEvolutionQuery','btnDelete')
+ undoremap ('evolution','dlgEvolutionQuery')
+ time.sleep (3)
+ waittillguiexist ('dlgEvolutionQuery')
+ remap ('evolution','dlgEvolutionQuery')
+ click ('dlgEvolutionQuery','btnDon\'tSend')
+ undoremap ('evolution','dlgEvolutionQuery')
+ waittillguinotexist ('dlgEvolutionQuery')
+ except:
+ log ('Delete Meeting/Appointment Failed','error')
+ log ('Delete Meeting/Appointment','testend')
+ raise LdtpExecutionError(0)
+ log ('Delete Meeting/Appointment','testend')
diff --git a/evolution/modifythisinstmeet.py b/evolution/modifythisinstmeet.py
new file mode 100644
index 0000000..696903c
--- /dev/null
+++ b/evolution/modifythisinstmeet.py
@@ -0,0 +1,3 @@
+from modifymeeting import *
+
+modifymeeting (datafilename,0)
diff --git a/evolution/move-to.py b/evolution/move-to.py
new file mode 100644
index 0000000..d7c8700
--- /dev/null
+++ b/evolution/move-to.py
@@ -0,0 +1,41 @@
+#
+# Linux Desktop Testing Project http://www.gnomebangalore.org/ldtp
+#
+# Author:
+# Venkateswaran S <wenkat.s@gmail.com>
+#
+# Copyright 2004 Novell, Inc.
+#
+# This test script is free software; you can redistribute it and/or
+# modify it under the terms of the GNU Library General Public
+# License as published by the Free Software Foundation; either
+# version 2 of the License, or (at your option) any later version.
+#
+# This library is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+# Library General Public License for more details.
+#
+# You should have received a copy of the GNU Library General Public
+# License along with this library; if not, write to the
+# Free Software Foundation, Inc., 59 Temple Place - Suite 330,
+# Boston, MA 02111-1307, USA.
+#
+
+# Move a folder from one location to another.
+
+from menu_reorganization import *
+
+try:
+ data_object = LdtpDataFileParser (datafilename)
+
+ #Extracting imput data from xml file
+ from_fldr = data_object.gettagvalue ('from_fldr')[0]
+ to_fldr = data_object.gettagvalue ('to_fldr')[0]
+ if move_to (from_fldr,to_fldr) == 1:
+ print '\''+from_fldr+'\' has been moved to \''+to_fldr
+ else:
+ print 'Cannot move the folder'
+except:
+ log('cannot move the folder','error')
+ raise LdtpExecutionError(0)
diff --git a/evolution/move-to.xml b/evolution/move-to.xml
new file mode 100644
index 0000000..3e56edf
--- /dev/null
+++ b/evolution/move-to.xml
@@ -0,0 +1,5 @@
+<?xml version="1.0"?>
+<data>
+ <from_fldr>sample</from_fldr>
+ <to_fldr>move_test</to_fldr>
+</data>
diff --git a/evolution/movemessage.xml b/evolution/movemessage.xml
new file mode 100644
index 0000000..9931a56
--- /dev/null
+++ b/evolution/movemessage.xml
@@ -0,0 +1,6 @@
+<?xml version="1.0"?>
+<data>
+ <fromfolder>Inbox</fromfolder>
+ <tofolder>backup</tofolder>
+ <subject>asd</subject>
+</data>
diff --git a/evolution/movemessagewhenoffline.py b/evolution/movemessagewhenoffline.py
new file mode 100644
index 0000000..5d16e59
--- /dev/null
+++ b/evolution/movemessagewhenoffline.py
@@ -0,0 +1,43 @@
+#!/usr/bin/env python
+#
+# Linux Desktop Testing Project http://www.gnomebangalore.org/ldtp
+#
+# Author:
+# Prashanth Mohan <prashmohan@gmail.com>
+#
+# Copyright 2004 Novell, Inc.
+#
+# This test script is free software; you can redistribute it and/or
+# modify it under the terms of the GNU Library General Public
+# License as published by the Free Software Foundation; either
+# version 2 of the License, or (at your option) any later version.
+#
+# This library is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+# Library General Public License for more details.
+#
+# You should have received a copy of the GNU Library General Public
+# License along with this library; if not, write to the
+# Free Software Foundation, Inc., 59 Temple Place - Suite 330,
+# Boston, MA 02111-1307, USA.
+#
+from offline import *
+
+try:
+ try:
+ data_object = LdtpDataFileParser (datafilename)
+ from_folder = data_object.gettagvalue ('from_folder')
+ to_folder = data_object.gettagvalue ('to_folder')
+ subject = data_object.gettagvalue ('subject')
+ except:
+ log ('Error while reading values for move message test','cause')
+ raise LdtpExecutionError (0)
+ try:
+ #go_offline ()
+ movemessage (from_folder[0],to_folder[0],subject[0])
+ except:
+ log ('movemessage when offline test failed','error')
+ raise LdtpExecutionError (0)
+except:
+ raise LdtpExecutionError (0)
diff --git a/evolution/movemessagewhenoffline.xml b/evolution/movemessagewhenoffline.xml
new file mode 100644
index 0000000..7d6722e
--- /dev/null
+++ b/evolution/movemessagewhenoffline.xml
@@ -0,0 +1,6 @@
+<?xml version="1.0"?>
+<data>
+ <from_folder>Inbox</from_folder>
+ <to_folder>backup</to_folder>
+ <subject>asd</subject>
+</data>
diff --git a/evolution/new_task.py b/evolution/new_task.py
new file mode 100644
index 0000000..3b29251
--- /dev/null
+++ b/evolution/new_task.py
@@ -0,0 +1,131 @@
+#
+# Linux Desktop Testing Project http://www.gnomebangalore.org/ldtp
+#
+# Author:
+# Venkateswaran S <wenkat.s@gmail.com>
+#
+# Copyright 2004 Novell, Inc.
+#
+# This test script is free software; you can redistribute it and/or
+# modify it under the terms of the GNU Library General Public
+# License as published by the Free Software Foundation; either
+# version 2 of the License, or (at your option) any later version.
+#
+# This library is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+# Library General Public License for more details.
+#
+# You should have received a copy of the GNU Library General Public
+# License along with this library; if not, write to the
+# Free Software Foundation, Inc., 59 Temple Place - Suite 330,
+# Boston, MA 02111-1307, USA.
+#
+# This script will create a new task.
+
+
+from ldtp import *
+from ldtputils import *
+import string, sys, os, commands, time, filecmp
+
+def selectTasksPane():
+ """Selects the Tasks Pane in Evolution"""
+ log ('Open Evolution Tasks Pane','teststart')
+ setcontext ('Evolution - Mail','Evolution - Mail')
+ #code to find the present window and revert back to the Tasks Pane
+ if guiexist('frmEvolution-Mail')!=1:
+ log ('Present Window now Mail pane','info')
+ setcontext ('Evolution - Mail','Evolution - Contacts')
+ if guiexist('frmEvolution-Mail')!=1:
+ log ('Present Window now Tasks 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-Mail','tbtnTasks')
+ time.sleep(3)
+ waittillguiexist ('frmEvolution-Tasks')
+
+ except:
+ log ('error selecting Tasks pane','error')
+ log ('Open Evolution Tasks Pane','testend')
+ raise LdtpExecutionError(0)
+
+ log ('Open Evolution Tasks Pane','testend')
+
+def create_task(Group, Summary, Desc, Start_date, Start_time, End_date, End_time, Time_zone, Categories):
+ log('Create New Task','teststart')
+ try:
+ remap('evolution','frmEvolution-Tasks')
+ no_rows_b4creat = getrowcount ('frmEvolution-Tasks', 'tblTaskTable')
+ click('frmEvolution-Tasks','btnNew')
+ if waittillguiexist('frmTask-Nosummary'):
+ log('New task window opened','info')
+ else:
+ log('Unable to open the new task window','error')
+ comboselect ('frmTask-Nosummary', 'cboPersonal', Group[0])
+ time.sleep(3)
+ settextvalue ('frmTask-Nosummary', 'txtSummary', Summary[0])
+ setcontext('Task - No summary','Task - '+Summary[0])
+ settextvalue ('frmTask-Nosummary', 'txtDescription', Desc[0])
+ settextvalue ('frmTask-Nosummary', 'txtTextDateEntry1',Start_date[0])
+ settextvalue ('frmTask-Nosummary', 'txtTextDateEntry',End_date[0])
+ settextvalue ('frmTask-Nosummary', 'txt5',Start_time[0])
+ settextvalue ('frmTask-Nosummary', 'txt3',End_time[0])
+ settextvalue ('frmTask-Nosummary', 'txt7',Time_zone[0])
+ settextvalue ('frmTask-Nosummary', 'txt1',Categories[0])
+ time.sleep(2)
+ log('User Details entered','info')
+ except:
+ print 'Error in entering the values'
+ releasecontext()
+ log('Error in entering the values','error')
+ log('Create New Task','testend')
+ raise LdtpExecutionError(0)
+
+ try:
+ click('frmTask-Nosummary','btnSave')
+ time.sleep(3)
+ no_rows_aftercreat = getrowcount ('frmEvolution-Tasks', 'tblTaskTable')
+ if no_rows_aftercreat == no_rows_b4creat + 1:
+ if selectrow('frmEvolution-Tasks','tblTaskTable',Summary[0]) == 1:
+ log('Task Creation Completed and verified','info')
+ print 'Task Creation completed and verified.'
+ else:
+ raise LdtpExecutionError(0)
+ except:
+ print 'Unable to verify the task :'+Summary[0]
+ log('Unable to save the task')
+ log('Create New Task','testend')
+ releasecontext()
+ raise LdtpExecutionError(0)
+
+ undoremap('evolution','frmEvolution-Tasks')
+ releasecontext()
+ log('Create New Task','testend')
+
+
+# Read the data from the xml file.
+
+data_object = LdtpDataFileParser (datafilename)
+Group = data_object.gettagvalue ('group')
+Summary = data_object.gettagvalue ('summary')
+Desc = data_object.gettagvalue ('desc')
+Start_date = data_object.gettagvalue ('start_date')
+Start_time = data_object.gettagvalue ('start_time')
+End_date = data_object.gettagvalue ('end_date')
+End_time = data_object.gettagvalue ('end_time')
+Time_zone = data_object.gettagvalue ('time_zone')
+Categories = data_object.gettagvalue ('Categories')
+
+# Call the function
+
+selectTasksPane()
+create_task(Group, Summary, Desc, Start_date, Start_time, End_date, End_time, Time_zone, Categories)
+
diff --git a/evolution/new_task.xml b/evolution/new_task.xml
new file mode 100644
index 0000000..6f84346
--- /dev/null
+++ b/evolution/new_task.xml
@@ -0,0 +1,12 @@
+<?xml version="1.0"?>
+<data>
+ <summary>This is just a sample</summary>
+ <desc>This is the sample description about the task.</desc>
+ <start_date>12/20/2005</start_date>
+ <start_time>1:00 AM</start_time>
+ <end_date>12/22/2005</end_date>
+ <end_time>1:00 AM</end_time>
+ <time_zone>Asia/Calcutta</time_zone>
+ <group>Personal</group>
+ <Categories>Holiday</Categories>
+</data>
diff --git a/evolution/newaddrbook.xml b/evolution/newaddrbook.xml
new file mode 100644
index 0000000..46bfd1e
--- /dev/null
+++ b/evolution/newaddrbook.xml
@@ -0,0 +1,4 @@
+<?xml version="1.0"?>
+<data>
+ <Name>1234</Name>
+</data>
diff --git a/evolution/newmail.py b/evolution/newmail.py
new file mode 100644
index 0000000..371c9ff
--- /dev/null
+++ b/evolution/newmail.py
@@ -0,0 +1,37 @@
+#!/usr/bin/env python
+#
+# Linux Desktop Testing Project http://www.gnomebangalore.org/ldtp
+#
+# Author:
+# Prashanth Mohan <prashmohan@gmail.com>
+#
+# Copyright 2004 Novell, Inc.
+#
+# This test script is free software; you can redistribute it and/or
+# modify it under the terms of the GNU Library General Public
+# License as published by the Free Software Foundation; either
+# version 2 of the License, or (at your option) any later version.
+#
+# This library is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+# Library General Public License for more details.
+#
+# You should have received a copy of the GNU Library General Public
+# License along with this library; if not, write to the
+# Free Software Foundation, Inc., 59 Temple Place - Suite 330,
+# Boston, MA 02111-1307, USA.
+#
+
+from compose_mail import *
+
+# Reading Input from File
+try:
+ to, subject, body, cc,bcc, attachment, sentitemsfolder, refimg = read_maildata (datafilename)
+except:
+ log ('could not read data for compose mail','error')
+ raise LdtpExecutionError (0)
+# Call the functions
+compose_mail (to, subject, body, cc, bcc, attachment, sentitemsfolder, refimg)
+
+
diff --git a/evolution/newmsg_fromsent.py b/evolution/newmsg_fromsent.py
new file mode 100644
index 0000000..2aca7fa
--- /dev/null
+++ b/evolution/newmsg_fromsent.py
@@ -0,0 +1,88 @@
+#
+# Linux Desktop Testing Project http://www.gnomebangalore.org/ldtp
+#
+# Author:
+# Venkateswaran S <wenkat.s@gmail.com>
+#
+# Copyright 2004 Novell, Inc.
+#
+# This test script is free software; you can redistribute it and/or
+# modify it under the terms of the GNU Library General Public
+# License as published by the Free Software Foundation; either
+# version 2 of the License, or (at your option) any later version.
+#
+# This library is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+# Library General Public License for more details.
+#
+# You should have received a copy of the GNU Library General Public
+# License along with this library; if not, write to the
+# Free Software Foundation, Inc., 59 Temple Place - Suite 330,
+# Boston, MA 02111-1307, USA.
+#
+
+# Create a new mail from the sent messages.
+
+from ldtp import *
+from ldtputils import *
+
+def read_data():
+
+ data_object = LdtpDataFileParser (datafilename)
+
+ #Extracting imput data from xml file
+ Row_index = data_object.gettagvalue ('Row_index')[0]
+ summary_to_append = data_object.gettagvalue ('summary_to_append')[0]
+ subject = data_object.gettagvalue ('subject')[0]
+ to = data_object.gettagvalue ('to')[0]
+ return Row_index, summary_to_append, subject, to
+
+def create_fromsent():
+ try:
+ log('create a message from sent mails','teststart')
+ windowname = 'frmComposeamessage'
+ fldr = 'Sent'
+ Row_index, summary_to_append, subject, to = read_data()
+ remap('evolution','frmEvolution-Mail')
+ if selectrowpartialmatch ('frmEvolution-Mail','ttblMailFolderTree',fldr) == 1:
+ time.sleep(3)
+ log('Folder identified','info')
+ print Row_index
+ selectrowindex('frmEvolution-Mail','ttblMessageList',int(Row_index))
+ summary = getcellvalue('frmEvolution-Mail','ttblMessageList',int(Row_index),4)
+ selectmenuitem('frmEvolution-Mail','mnuMessage;mnuEditasNewMessage')
+ time.sleep(3)
+ setcontext('Compose a message',summary)
+ if waittillguiexist(windowname) == 1:
+ print 'here'
+ panel_ct = getpanelchildcount(windowname,'pnlPanelcontainingHTML')
+ print panel_ct
+ if appendtext (windowname, 'txt'+str(6+panel_ct-1), summary_to_append) == 1:
+ print '1'
+ time.sleep(3)
+ settextvalue(windowname,'txtSubject',subject)
+ setcontext('Compose a message',subject)
+ settextvalue(windowname,'txtTo',to)
+ click(windowname,'btnSend')
+ log('The message has been modified and sent','info')
+ else:
+ print 'Unable to modify the existing messsage'
+ log('Unable to edit the existing message','error')
+ undoremap('evolution','frmEvolution-Mail')
+ log('Message created from an existing mail','info')
+ print 'Message created from an exixting mail'
+ else:
+ print 'Unable to open the window'
+ log('Unable to open the window','error')
+ else:
+ log('The folder cannot be identified','error')
+ print 'Folder not found'
+
+ except:
+ log('Unable to edit as a new message','error')
+ print 'Unable to edit as a new message'
+
+ log('create a message from sent mails','testend')
+
+create_fromsent()
diff --git a/evolution/newmsg_fromsent.xml b/evolution/newmsg_fromsent.xml
new file mode 100644
index 0000000..666bcb5
--- /dev/null
+++ b/evolution/newmsg_fromsent.xml
@@ -0,0 +1,8 @@
+<?xml version="1.0"?>
+<data>
+ <fldr>Sent</fldr>
+ <Row_index>0</Row_index>
+ <subject>sample</subject>
+ <to>wenkat.s@gmail.com</to>
+ <summary_to_append>This is the modified one.</summary_to_append>
+</data>
diff --git a/evolution/nonrecurmeet.xml b/evolution/nonrecurmeet.xml
new file mode 100644
index 0000000..c3fe36f
--- /dev/null
+++ b/evolution/nonrecurmeet.xml
@@ -0,0 +1,22 @@
+<?xml version="1.0"?>
+<data>
+ <addrbook>Personal</addrbook>
+ <summary>test summary</summary>
+ <location>test location</location>
+ <description>test dec</description>
+ <from_date>12/05/2005</from_date>
+ <to_date>12/20/2005</to_date>
+ <from_time>10:00 AM</from_time>
+ <to_time>11:00 AM</to_time>
+ <calendar>Personal</calendar>
+ <classification>Public</classification>
+ <categories>Personal</categories>
+ <attendee>asd asda</attendee>
+ <email>asd@asdfa.com</email>
+ <duration>month(s)</duration>
+ <durvalue>1st</durvalue>
+ <durday>Saturday</durday>
+ <count>3</count>
+ <fortype>until</fortype>
+ <nooftimes>12/12/2005</nooftimes>
+</data>
diff --git a/evolution/offline.py b/evolution/offline.py
new file mode 100644
index 0000000..93d0e36
--- /dev/null
+++ b/evolution/offline.py
@@ -0,0 +1,435 @@
+#!/usr/bin/env python
+#
+# Linux Desktop Testing Project http://www.gnomebangalore.org/ldtp
+#
+# Author:
+# Prashanth Mohan <prashmohan@gmail.com>
+#
+# Copyright 2004 Novell, Inc.
+#
+# This test script is free software; you can redistribute it and/or
+# modify it under the terms of the GNU Library General Public
+# License as published by the Free Software Foundation; either
+# version 2 of the License, or (at your option) any later version.
+#
+# This library is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+# Library General Public License for more details.
+#
+# You should have received a copy of the GNU Library General Public
+# License along with this library; if not, write to the
+# Free Software Foundation, Inc., 59 Temple Place - Suite 330,
+# Boston, MA 02111-1307, USA.
+#
+
+
+
+from contact import *
+from evoutils.mail import *
+from evoutils.mailpreferences import *
+from evoutils.composemail import *
+from evoutils.change_status import *
+from evoutils.change_properties import *
+from evoutils.menu_reorganization import *
+
+
+def apply_filter(folder,subject):
+ log ('Apply Filter','teststart')
+ try:
+ #selectMailPane()
+ window_id='frmEvolution-Mail'
+ remap ('evolution',window_id)
+ try:
+ selectrowpartialmatch (window_id,'ttblMailFolderTree',folder)
+ except:
+ log ('Folder not available','cause')
+ raise LdtpExecutionError (0)
+ time.sleep (2)
+ try:
+ selectrow (window_id,'ttblMessageList',subject)
+ except:
+ log ('Message not available','cause')
+ raise LdtpExecutionError (0)
+
+ selectmenuitem (window_id,'mnuMessage;mnuApplyFilters')
+ time.sleep (2)
+ undoremap ('evolution',window_id)
+ except:
+ log ('Apply Filter failed','error')
+ log ('Apply Filter','testend')
+ raise LdtpExecutionError (0)
+ log ('Apply Filter','testend')
+
+
+def movemessage (from_folder,to_folder,subject):
+ log ('Move Message','teststart')
+ try:
+ #selectMailPane()
+ window_id='frmEvolution-Mail'
+ time.sleep (3)
+ #remap ('evolution','frmEvolution-Mail')
+ try:
+ selectrowpartialmatch (window_id,'ttblMailFolderTree',to_folder)
+ except:
+ log ('To Folder not available','cause')
+ raise LdtpExecutionError (0)
+ time.sleep (2)
+ print "To folder reached"
+ initial_dest_count=getrowcount (window_id,'ttblMessageList')
+ print initial_dest_count
+ try:
+ selectrowpartialmatch (window_id,'ttblMailFolderTree',from_folder)
+ except:
+ log ('From Folder not available','cause')
+ raise LdtpExecutionError (0)
+ time.sleep (2)
+ print "from folder reached"
+ initial_src_count=getrowcount (window_id,'ttblMessageList')
+ print initial_src_count
+ time.sleep (2)
+ try:
+ selectrow (window_id,'ttblMessageList',subject)
+ except:
+ log ('Message not available','cause')
+ raise LdtpExecutionError (0)
+ time.sleep (1)
+ try:
+ selectmenuitem (window_id,'mnuMessage;mnuMovetoFolder')
+ waittillguiexist ('dlgSelectfolder')
+ selectrowpartialmatch ('dlgSelectfolder','ttblMailFolderTree',to_folder)
+ except:
+ log ('To Folder not available','cause')
+ time.sleep (1)
+ if stateenabled ('dlgSelectfolder','btnMove')!=1:
+ log ('Move button not enabled','cause')
+ raise LdtpExecutionError (0)
+
+ click ('dlgSelectfolder','btnMove')
+ time.sleep (3)
+ #verification starts here
+ new_src_count=getrowcount (window_id,'ttblMessageList')
+ print new_src_count
+
+ if new_src_count != initial_src_count-1:
+ log ('Message still in source folder','cause')
+ raise LdtpExecutionError (0)
+
+ selectrowpartialmatch (window_id,'ttblMailFolderTree',to_folder)
+ time.sleep (1)
+ new_dest_count=getrowcount (window_id,'ttblMessageList')
+ print new_dest_count
+
+ if new_dest_count!=initial_dest_count+1:
+ log ('Message not added to Destination folder','cause')
+ raise LdtpExecutionError (0)
+ except:
+ log ('Moving a Message failed','error')
+ log ('Move Message','testend')
+ raise LdtpExecutionError (0)
+ #undoremap ('evolution','frmEvolution-Mail')
+ log ('Moving a Message succeeded','info')
+ log ('Move Message','testend')
+
+
+
+def copymessage (from_folder,to_folder,subject):
+ log ('Copy Message','teststart')
+ try:
+ #selectMailPane()
+ #remap ('evolution','frmEvolution-Mail')
+ window_id='frmEvolution-Mail'
+ try:
+ selectrowpartialmatch (window_id,'ttblMailFolderTree',to_folder)
+ except:
+ log ('To Folder not available','cause')
+ raise LdtpExecutionError (0)
+ time.sleep (1)
+ initial_dest_count=getrowcount (window_id,'ttblMessageList')
+
+ try:
+ selectrowpartialmatch (window_id,'ttblMailFolderTree',from_folder)
+ except:
+ log ('From Folder not available','cause')
+ raise LdtpExecutionError (0)
+ time.sleep (1)
+ initial_src_count=getrowcount (window_id,'ttblMessageList')
+
+ try:
+ selectrow (window_id,'ttblMessageList',subject)
+ except:
+ log ('Message not available','cause')
+ raise LdtpExecutionError (0)
+ time.sleep (1)
+ try:
+ selectmenuitem (window_id,'mnuMessage;mnuCopytoFolder')
+ time.sleep (1)
+ waittillguiexist ('dlgSelectfolder')
+ remap ('evolution','dlgSelectfolder')
+ selectrowpartialmatch ('dlgSelectfolder','ttblMailFolderTree',to_folder)
+ except:
+ log ('To Folder not available','cause')
+ time.sleep (1)
+ if stateenabled ('dlgSelectfolder','btnCopy')!=1:
+ log ('Move button not enabled','cause')
+ raise LdtpExecutionError (0)
+
+ click ('dlgSelectfolder','btnCopy')
+ time.sleep (3)
+ undoremap ('evolution','dlgSelectfolder')
+ #verification
+ new_src_count=getrowcount (window_id,'ttblMessageList')
+ if new_src_count != initial_src_count:
+ log ('Message not in source folder','cause')
+ raise LdtpExecutionError (0)
+
+ selectrowpartialmatch (window_id,'ttblMailFolderTree',to_folder)
+ time.sleep (3)
+ new_dest_count=getrowcount (window_id,'ttblMessageList')
+ print initial_dest_count, new_dest_count
+# raw_input ("abc")
+ if new_dest_count!=initial_dest_count+1:
+ log ('Message not added to Destination folder','cause')
+ raise LdtpExecutionError (0)
+ except:
+ log ('Copying a message failed','error')
+ log ('Copy Message','testend')
+ raise LdtpExecutionError (0)
+ #undoremap ('evolution','frmEvolution-Mail')
+ log ('Copying a message succeeded','info')
+ log ('Copy Message','testend')
+
+
+def deletemessage(folder,subject):
+ log ('Delete Message','teststart')
+ try:
+ #selectMailPane()
+ #remap ('evolution','frmEvolution-Mail')
+ window_id='frmEvolution-Mail'
+ time.sleep (2)
+ try:
+ selectrowpartialmatch (window_id,'ttblMailFolderTree',folder)
+ except:
+ log ('Folder not available','cause')
+ raise LdtpExecutionError (0)
+ time.sleep (2)
+ initial_count=getrowcount (window_id,'ttblMessageList')
+ time.sleep (2)
+ try:
+ selectrow (window_id,'ttblMessageList',subject)
+ except:
+ log ('Message not available','cause')
+ raise LdtpExecutionError (0)
+ time.sleep (2)
+
+ try:
+ selectmenuitem (window_id,'mnuEdit;mnuDeleteMessage')
+ time.sleep (1)
+ except:
+ log ('Unable to select Delete message','cause')
+ raise LdtpExecutionError (0)
+
+ #verification
+ new_count=getrowcount (window_id,'ttblMessageList')
+
+ if new_count != initial_count-1:
+ log ('Folder still has mail','cause')
+ raise LdtpExecutionError (0)
+ except:
+ log ('Unable to delete message','error')
+ log ('Delete Message','testend')
+ raise LdtpExecutionError (0)
+ #undoremap ('evolution','frmEvolution-Mail')
+ log ('Delete Message successful','info')
+ log ('Delete Message','testend')
+
+
+def saveattachments(folder,subject,save_location):
+ log ('Save Attachments','teststart')
+ try:
+ #selectMailPane()
+ #remap ('evolution','frmEvolution-Mail')
+ window_id='frmEvolution-Mail'
+ try:
+ selectrowpartialmatch (window_id,'ttblMailFolderTree',folder)
+ except:
+ log ('Folder not available','cause')
+ raise LdtpExecutionError (0)
+ time.sleep (2)
+ try:
+ selectrow (window_id,'ttblMessageList',subject)
+ time.sleep (2)
+ selectmenuitem (window_id,'mnuMessage;mnuOpeninNewWindow')
+ setcontext ('Readonlyframe',subject)
+ waittillguiexist ('frmReadonly')
+ remap ('evolution','frmReadonly')
+ time.sleep (3)
+ except:
+ log ('Message not available','cause')
+ raise LdtpExecutionError (0)
+
+ try:
+ click ('frmReadonly','btnSaveAll')
+ waittillguiexist ('dlgSelectfoldertosaveallattachments')
+ except:
+ log ('Message does not have attachments','cause')
+ raise LdtpExecutionError (0)
+ time.sleep (2)
+ try:
+ save_location=save_location.split ('/')
+ for fldr in save_location:
+ doubleclickrow ('dlgSelectfoldertosaveallattachments','tblFiles',fldr)
+ time.sleep (1)
+ if stateenabled ('dlgSelectfoldertosaveallattachments','btnSave')==0:
+ log ('Unable to Save in this folder','cause')
+ raise LdtpExecutionError (0)
+
+ click ('dlgSelectfoldertosaveallattachments','btnSave')
+ except:
+ log ('Unable to find destination folder','cause')
+ raise LdtpExecutionError (0)
+ selectmenuitem ('frmReadonly','mnuFile;mnuClose')
+ undoremap ('evolution','frmReadonly')
+ releasecontext()
+ except:
+ log ('Unable to Save attachments','error')
+ log ('Save Attachments','testend')
+ raise LdtpExecutionError (0)
+ #undoremap ('evolution','frmEvolution-Mail')
+ log ('All attachments saved','info')
+ log ('Save Attachments','testend')
+
+
+def delete_folder_when_offline(folder):
+ log ('Delete folder while offline','teststart')
+ try:
+ go_offline ()
+ #selectMailPane ()
+ if delete_nonsys_folder(folder) == 0:
+ log ('Delete folder not permitted while offline','info')
+ #log ('Delete folder while offline','testend')
+ #return
+ else:
+ log ('Delete folder allowed while offline','cause')
+ log ('Delete folder while offline','testend')
+ raise LdtpExecutionError (0)
+
+ except:
+ log ('Delete folder while offline','testend')
+ raise LdtpExecutionError (0)
+ log ('Delete folder while offline','testend')
+
+def move_folder_when_offline (from_fldr,to_fldr):
+ log ('Move folder while offline','teststart')
+ try:
+ go_offline ()
+ #selectMailPane()
+ except:
+ log ('unable to select Mailpane','error')
+ raise LdtpExecutionError (0)
+ try:
+ move_to (from_fldr,to_fldr)
+ except:
+ log ('Move folder not permitted while offline','info')
+ log ('Move folder while offline','testend')
+ return
+
+ log ('Move folder permitted while offline','cause')
+ log ('Move folder while offline','testend')
+ raise LdtpExecutionError (0)
+
+
+def copy_folder_when_offline (from_fldr,to_fldr):
+ log ('Copy folder while offline','teststart')
+ try:
+ go_offline ()
+ #selectMailPane()
+ except:
+ log ('unable to select Mailpane','error')
+ log ('Copy folder while offline','testend')
+ raise LdtpExecutionError (0)
+ try:
+
+ copy_to (from_fldr, to_fldr)
+ except:
+ log ('Copy folder not permitted while offline','info')
+ log ('Copy folder while offline','testend')
+ return
+
+ log ('Copy folder permitted while offline','cause')
+ log ('Copy folder while offline','testend')
+ raise LdtpExecutionError (0)
+
+
+def create_folder_when_offline (fldr,location=''):
+ log ('create folder while offline','teststart')
+ try:
+ go_offline ()
+ selectmenuitem ('frmEvolution-Mail','mnuFile;mnuNew;mnuMailFolder')
+ #selectMailPane()
+ except:
+ log ('unable to select Mailpane','error')
+ log ('create folder while offline','testend')
+ raise LdtpExecutionError (0)
+ if create_folder (fldr,location) != 0:
+ log ('Create folder permitted while offline','cause')
+ log ('create folder while offline','testend')
+ raise LdtpExecutionError (0)
+
+ log ('Create folder not permitted while offline','info')
+ log ('create folder while offline','testend')
+
+
+def rename_folder_when_offline (old_name,new_name):
+ log ('Rename folder while offline','teststart')
+ try:
+ go_offline ()
+ #selectMailPane()
+ except:
+ log ('unable to select Mailpane','error')
+ log ('Rename folder while offline','testend')
+ raise LdtpExecutionError (0)
+ try:
+ rename (old_name,new_name)
+ except:
+ log ('Rename not permitted while offline','info')
+ log ('Rename folder while offline','testend')
+ return
+
+ log ('Rename permitted while offline','cause')
+ log ('Rename folder while offline','testend')
+ raise LdtpExecutionError (0)
+
+
+# def expunging_when_offline ():
+# log ('Expunging while offline','teststart')
+# try:
+# go_offline ()
+# #selectMailPane()
+# except:
+# log ('unable to select Mailpane','error')
+# log ('Expunging while offline','testend')
+# raise LdtpExecutionError (0)
+# try:
+# expunge()
+# except:
+# log ('Expunge not permitted while offline','info')
+# log ('Expunging while offline','testend')
+# return
+
+# log ('Expunge allowed while offline','cause')
+# log ('Expunging while offline','testend')
+# raise LdtpExecutionError (0)
+
+
+def marking_messages_when_offline(fldr, subject, status='', importance='', junk_status=0, follow_up_flag='', due_date='', time='', progres=''):
+ log ('Marking messages when offline','teststart')
+ try:
+ go_offline()
+ change_status(fldr, subject, status, importance, junk_status, follow_up_flag, due_date, time, progres)
+ except:
+ log ('Change status failed while offline','error')
+ log ('Marking messages when offline','testend')
+ raise LdtpExecutionError (0)
+ log ('Marking messages when offline','testend')
+
diff --git a/evolution/onlybcc.py b/evolution/onlybcc.py
new file mode 100644
index 0000000..50e4258
--- /dev/null
+++ b/evolution/onlybcc.py
@@ -0,0 +1,41 @@
+#!/usr/bin/env python
+#
+# Linux Desktop Testing Project http://www.gnomebangalore.org/ldtp
+#
+# Author:
+# Prashanth Mohan <prashmohan@gmail.com>
+#
+# Copyright 2004 Novell, Inc.
+#
+# This test script is free software; you can redistribute it and/or
+# modify it under the terms of the GNU Library General Public
+# License as published by the Free Software Foundation; either
+# version 2 of the License, or (at your option) any later version.
+#
+# This library is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+# Library General Public License for more details.
+#
+# You should have received a copy of the GNU Library General Public
+# License along with this library; if not, write to the
+# Free Software Foundation, Inc., 59 Temple Place - Suite 330,
+# Boston, MA 02111-1307, USA.
+#
+
+from composerprefs import *
+
+try:
+ try:
+ data_object = LdtpDataFileParser (datafilename)
+ to = data_object.gettagvalue ('to')
+ except:
+ log ('Error while reading values for only bcc recepients test','cause')
+ raise LdtpExecutionError (0)
+ try:
+ prompt_for_only_bcc (to[0])
+ except:
+ log ('only bcc recepients test failed','error')
+ raise LdtpExecutionError (0)
+except:
+ raise LdtpExecutionError (0)
diff --git a/evolution/open_newwin.py b/evolution/open_newwin.py
new file mode 100644
index 0000000..e848d16
--- /dev/null
+++ b/evolution/open_newwin.py
@@ -0,0 +1,45 @@
+#!/usr/bin/env python
+#
+# Linux Desktop Testing Project http://www.gnomebangalore.org/ldtp
+#
+# Author:
+# Venkateswaran S <wenkat.s@gmail.com>
+#
+# Copyright 2004 Novell, Inc.
+#
+# This test script is free software; you can redistribute it and/or
+# modify it under the terms of the GNU Library General Public
+# License as published by the Free Software Foundation; either
+# version 2 of the License, or (at your option) any later version.
+#
+# This library is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+# Library General Public License for more details.
+#
+# You should have received a copy of the GNU Library General Public
+# License along with this library; if not, write to the
+# Free Software Foundation, Inc., 59 Temple Place - Suite 330,
+# Boston, MA 02111-1307, USA.
+#
+# To open a new window.
+
+from ldtp import *
+from ldtputils import *
+
+def open_new_window():
+
+ try:
+ log('open new window','teststart')
+ if selectmenuitem('frmEvolution-Mail','mnuFile;mnuNewWindow') == 1:
+ log('Selected new window in the menu','info')
+ else:
+ print 'Unable to select the menu item'
+ log('Unable ot select the menu item','cause')
+ except:
+
+ print 'Unable to select the menu item'
+ log('Unable ot select the menu item','cause')
+ raise LdtpExecutionError (0)
+
+open_new_window()
diff --git a/evolution/openmsg_window.py b/evolution/openmsg_window.py
new file mode 100644
index 0000000..c37cd39
--- /dev/null
+++ b/evolution/openmsg_window.py
@@ -0,0 +1,86 @@
+#
+# Linux Desktop Testing Project http://www.gnomebangalore.org/ldtp
+#
+# Author:
+# Venkateswaran S <wenkat.s@gmail.com>
+#
+# Copyright 2004 Novell, Inc.
+#
+# This test script is free software; you can redistribute it and/or
+# modify it under the terms of the GNU Library General Public
+# License as published by the Free Software Foundation; either
+# version 2 of the License, or (at your option) any later version.
+#
+# This library is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+# Library General Public License for more details.
+#
+# You should have received a copy of the GNU Library General Public
+# License along with this library; if not, write to the
+# Free Software Foundation, Inc., 59 Temple Place - Suite 330,
+# Boston, MA 02111-1307, USA.
+#
+
+# Open a message in a new window.
+
+from ldtp import *
+from ldtputils import *
+
+def getrowindex(subject):
+ try:
+ noofchild=getrowcount ('frmEvolution-Mail','ttblMessageList')
+ for ind in range (noofchild):
+ if getcellvalue('frmEvolution-Mail','ttblMessageList',ind,4) == subject:
+ return ind
+ if ind == noofchild-1:
+ log ('Message not present','cause')
+ raise LdtpExecutionError (0)
+ except:
+ log ('Unable to get index of message','error')
+ raise LdtpExecutionError (0)
+
+def read_data():
+
+ data_object = LdtpDataFileParser (datafilename)
+
+ #Extracting imput data from xml file
+ fldr = data_object.gettagvalue ('fldr')[0]
+# Row_index = data_object.gettagvalue ('Row_index')[0]
+ subject = data_object.gettagvalue ('subject')[0]
+ return fldr, subject
+
+def openmsg(fldr, subject):
+ try:
+ log('Open in a new window','teststart')
+ windowname = 'frmWelcometoEvolution!'
+ remap('evolution','frmEvolution-Mail')
+ if selectrowpartialmatch('frmEvolution-Mail','ttblMailFolderTree',fldr) == 1:
+ time.sleep(2)
+ log('Folder identified','info')
+ selectrow('frmEvolution-Mail','ttblMessageList',subject)
+ Row_index = getrowindex(subject)
+ selectrowindex('frmEvolution-Mail','ttblMessageList',int(Row_index))
+ selectmenuitem('frmEvolution-Mail','mnuMessage;mnuOpeninNewWindow')
+ time.sleep(3)
+ setcontext('Welcome to Evolution!',subject)
+ if waittillguiexist(windowname) == 1:
+ log('Message opened in a new window','info')
+ print 'the selected message has been opened in a new window'
+ time.sleep(3)
+ selectmenuitem(windowname,'mnuFile;mnuClose')
+ else:
+ print 'Verification failed'
+ log('verify failed','error')
+ undoremap('evolution','frmEvolution-Mail')
+ else:
+ log('The folder cannot be identified','error')
+
+ except:
+ log('Unable to open the message in a new window','error')
+ print 'Unable to open the message in a new window'
+
+ log('Open in a new window','testend')
+
+fldr, subject = read_data()
+openmsg(fldr, subject)
diff --git a/evolution/openmsg_window.xml b/evolution/openmsg_window.xml
new file mode 100644
index 0000000..56f6d62
--- /dev/null
+++ b/evolution/openmsg_window.xml
@@ -0,0 +1,5 @@
+<?xml version="1.0"?>
+<data>
+ <fldr>Inbox</fldr>
+ <subject>sample</subject>
+</data>
diff --git a/evolution/print.py b/evolution/print.py
new file mode 100755
index 0000000..7f73e3a
--- /dev/null
+++ b/evolution/print.py
@@ -0,0 +1,89 @@
+#!/usr/bin/env python
+#
+# Linux Desktop Testing Project http://www.gnomebangalore.org/ldtp
+#
+# Author:
+# Venkateswaran S <wenkat.s@gmail.com>
+#
+# Copyright 2004 Novell, Inc.
+#
+# This test script is free software; you can redistribute it and/or
+# modify it under the terms of the GNU Library General Public
+# License as published by the Free Software Foundation; either
+# version 2 of the License, or (at your option) any later version.
+#
+# This library is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+# Library General Public License for more details.
+#
+# You should have received a copy of the GNU Library General Public
+# License along with this library; if not, write to the
+# Free Software Foundation, Inc., 59 Temple Place - Suite 330,
+# Boston, MA 02111-1307, USA.
+#
+# To print a message.
+# Note Actually it clicks the cancel btn instead of print button.
+
+from menu_reorganization import *
+
+def print_msg(fldr, subject, printer):
+
+ try:
+ log('Print a message','teststart')
+ windowname = 'dlgPrintMessage'
+ if select_mail (fldr,subject) == 1:
+ remap('evolution','frmEvolution-Mail')
+ selectmenuitem('frmEvolution-Mail','mnuFile;mnuPrint')
+ if waittillguiexist(windowname) == 1:
+ time.sleep(3)
+ if selectrow(windowname,'tbl0',printer):
+ print 'Printing message : '+fldr+' -> '+subject
+
+ log('The print window has emerged, hence verified','info')
+ remap('evolution',windowname)
+ time.sleep(3)
+ click(windowname,'btnCancel')
+# click(windowname,'btnPrint')
+ undoremap('evolution',windowname)
+ else:
+ log('Unable to find the print window','cause')
+ log('Print a message','testend')
+ undoremap('evolution','frmEvolution-Mail')
+ raise LdtpExecutionError (0)
+ else:
+ log('Unable to find the print window','cause')
+ log('Print a message','testend')
+ undoremap('evolution','frmEvolution-Mail')
+ raise LdtpExecutionError (0)
+ else:
+ log('Unable to find the fldr/mail','cause')
+ log('Print a message','testend')
+ undoremap('evolution','frmEvolution-Mail')
+ raise LdtpExecutionError (0)
+ undoremap('evolution','frmEvolution-Mail')
+ except:
+ log('Unable to print the message','error')
+ log('Print a message','testend')
+ undoremap('evolution','frmEvolution-Mail')
+ raise LdtpExecutionError (0)
+
+# Read data from xml file.
+data_object = LdtpDataFileParser (datafilename)
+fldr = data_object.gettagvalue ('fldr')[0]
+subject = data_object.gettagvalue ('subject')[0]
+printer = data_object.gettagvalue ('printer')[0]
+
+# Call the function
+if fldr and subject and printer:
+ print_msg(fldr, subject, printer)
+else:
+ if not (fldr):
+ log ('fldr not provided in data xml file', 'error')
+ if not (subject):
+ log ('subject not provided in data xml file', 'error')
+ if not (printer):
+ log ('printer not provided in data xml file', 'error')
+
+ log ('print message', 'fail')
+
diff --git a/evolution/print.xml b/evolution/print.xml
new file mode 100644
index 0000000..11612df
--- /dev/null
+++ b/evolution/print.xml
@@ -0,0 +1,6 @@
+<?xml version="1.0"?>
+<data>
+ <fldr>Inbox</fldr>
+ <subject>sample</subject>
+ <printer>Create a PDF document</printer>
+</data>
diff --git a/evolution/print_preview.py b/evolution/print_preview.py
new file mode 100644
index 0000000..8f61c76
--- /dev/null
+++ b/evolution/print_preview.py
@@ -0,0 +1,73 @@
+#!/usr/bin/env python
+#
+# Linux Desktop Testing Project http://www.gnomebangalore.org/ldtp
+#
+# Author:
+# Venkateswaran S <wenkat.s@gmail.com>
+#
+# Copyright 2004 Novell, Inc.
+#
+# This test script is free software; you can redistribute it and/or
+# modify it under the terms of the GNU Library General Public
+# License as published by the Free Software Foundation; either
+# version 2 of the License, or (at your option) any later version.
+#
+# This library is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+# Library General Public License for more details.
+#
+# You should have received a copy of the GNU Library General Public
+# License along with this library; if not, write to the
+# Free Software Foundation, Inc., 59 Temple Place - Suite 330,
+# Boston, MA 02111-1307, USA.
+#
+# To Preview the message before printing.
+
+from menu_reorganization import *
+
+def print_preview(fldr, subject):
+
+ try:
+ log('Print preview','teststart')
+ windowname = 'frmPrintPreview'
+ if select_mail (fldr,subject) == 1:
+ remap('evolution','frmEvolution-Mail')
+ selectmenuitem('frmEvolution-Mail','mnuFile;mnuPrintPreview')
+ if waittillguiexist(windowname) == 1:
+ time.sleep(3)
+ print 'Previewing message : '+fldr+' -> '+subject
+ log('The print Preview window has emerged, hence verified','info')
+ remap('evolution',windowname)
+ click(windowname,'btnclose')
+ undoremap('evolution',windowname)
+ else:
+ log('Unable to find the print preview window','cause')
+ log('Print preview','testend')
+ undoremap('evolution','frmEvolution-Mail')
+ else:
+ log('Unable to find the fldr/mail','cause')
+ log('Print preview','testend')
+ undoremap('evolution','frmEvolution-Mail')
+ undoremap('evolution','frmEvolution-Mail')
+ except:
+ log('Unable to preview the message','error')
+ log('Print preview','testend')
+ undoremap('evolution','frmEvolution-Mail')
+
+ log('Print preview','testend')
+# Read data from xml file.
+data_object = LdtpDataFileParser (datafilename)
+fldr = data_object.gettagvalue ('fldr')[0]
+subject = data_object.gettagvalue ('subject')[0]
+
+# Call the function
+
+if fldr and subject:
+ print_preview(fldr, subject)
+else:
+ if not (fldr):
+ log ('fldr not provided in data xml file', 'error')
+ if not (subject):
+ log ('subject not provided in data xml file', 'error')
+ log ('print preview', 'fail')
diff --git a/evolution/print_preview.xml b/evolution/print_preview.xml
new file mode 100644
index 0000000..9ec4ce1
--- /dev/null
+++ b/evolution/print_preview.xml
@@ -0,0 +1,6 @@
+<?xml version="1.0"?>
+<data>
+ <fldr>Inbox</fldr>
+ <subject>sample</subject>
+ <file_name>savemsg1.txt</file_name>
+</data>
diff --git a/evolution/promptwhenexpunging.py b/evolution/promptwhenexpunging.py
new file mode 100644
index 0000000..3cac60c
--- /dev/null
+++ b/evolution/promptwhenexpunging.py
@@ -0,0 +1,41 @@
+#!/usr/bin/env python
+#
+# Linux Desktop Testing Project http://www.gnomebangalore.org/ldtp
+#
+# Author:
+# Prashanth Mohan <prashmohan@gmail.com>
+#
+# Copyright 2004 Novell, Inc.
+#
+# This test script is free software; you can redistribute it and/or
+# modify it under the terms of the GNU Library General Public
+# License as published by the Free Software Foundation; either
+# version 2 of the License, or (at your option) any later version.
+#
+# This library is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+# Library General Public License for more details.
+#
+# You should have received a copy of the GNU Library General Public
+# License along with this library; if not, write to the
+# Free Software Foundation, Inc., 59 Temple Place - Suite 330,
+# Boston, MA 02111-1307, USA.
+#
+
+from composerprefs import *
+
+try:
+ try:
+ data_object = LdtpDataFileParser (datafilename)
+ fldr = data_object.gettagvalue ('fldr')
+ except:
+ log ('Error while reading values for only expunging test','cause')
+ raise LdtpExecutionError (0)
+ try:
+ prompt_when_expunging (fldr[0])
+ except:
+ log ('expunging test failed','error')
+ raise LdtpExecutionError (0)
+except:
+ raise LdtpExecutionError (0)
diff --git a/evolution/promptwhenexpunging.xml b/evolution/promptwhenexpunging.xml
new file mode 100644
index 0000000..c9ffa78
--- /dev/null
+++ b/evolution/promptwhenexpunging.xml
@@ -0,0 +1,4 @@
+<?xml version="1.0"?>
+<data>
+ <fldr>backup</fldr>
+</data>
diff --git a/evolution/rec-all-day-event.py b/evolution/rec-all-day-event.py
new file mode 100644
index 0000000..b97b262
--- /dev/null
+++ b/evolution/rec-all-day-event.py
@@ -0,0 +1,102 @@
+#
+# Linux Desktop Testing Project http://www.gnomebangalore.org/ldtp
+#
+# Author:
+# Venkateswaran S <wenkat.s@gmail.com>
+#
+# Copyright 2004 Novell, Inc.
+#
+# This test script is free software; you can redistribute it and/or
+# modify it under the terms of the GNU Library General Public
+# License as published by the Free Software Foundation; either
+# version 2 of the License, or (at your option) any later version.
+#
+# This library is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+# Library General Public License for more details.
+#
+# You should have received a copy of the GNU Library General Public
+# License along with this library; if not, write to the
+# Free Software Foundation, Inc., 59 Temple Place - Suite 330,
+# Boston, MA 02111-1307, USA.
+#
+
+# To create an appoinment with attachment.
+
+#from create-appointment import *
+from evoutils.calendar import *
+from ldtp import *
+from ldtputils import *
+
+def read_data():
+ #Initialising XML parser with data file
+ data_object = LdtpDataFileParser (datafilename)
+
+ #Extracting imput data from xml file
+ summary = data_object.gettagvalue ('summary')[0]
+ location = data_object.gettagvalue ('location')[0]
+ description = data_object.gettagvalue ('description')[0]
+ from_date = data_object.gettagvalue ('start_date')[0]
+ to_date = data_object.gettagvalue ('due_date')[0]
+ from_time = data_object.gettagvalue ('start_time')[0]
+ to_time = data_object.gettagvalue ('due_time')[0]
+ calendar = data_object.gettagvalue ('calendar')[0]
+
+ repeat_every = data_object.gettagvalue ('repeat_every')[0]
+ duration = data_object.gettagvalue ('duration')[0]
+ no_of_times = data_object.gettagvalue ('no_of_times')[0]
+ repeat_method = data_object.gettagvalue ('repeat_method')[0]
+ exceptions = data_object.gettagvalue ('exceptions')[0]
+ dur_value = data_object.gettagvalue ('dur_value')[0]
+ dur_day = data_object.gettagvalue ('dur_day')[0]
+ return dur_value, dur_day, repeat_every, duration, no_of_times, repeat_method, exceptions, summary, location, description, from_date, to_date, from_time, to_time, calendar
+
+def appointment_withrecurrence():
+
+ try:
+ log('Recursive All day event','teststart')
+ windowname = 'frmAppointment-Nosummary'
+ dur_value, dur_day, repeat_every, duration, no_of_times, repeat_method, exceptions, summary, location, description, from_date, to_date, from_time, to_time, calendar = read_data()
+
+ time.sleep(5)
+ more_items_todo = 'yes'
+ selectmenuitem ('frmEvolution-Calendars', 'mnuFile;mnuFile;mnuAppointment')
+ time.sleep (2)
+
+ if guiexist (windowname) == 0:
+ log ('Failed to open new appointment window', 'cause')
+ raise LdtpExecutionError (0)
+ else:
+ try:
+ click(windowname,'tbtnAlldayEvent')
+ from_time=0
+ to_time=0
+ except:
+ print 'unable to click the button (All Day event)'
+ log('Recursive All day event','testend')
+ raise LdtpExecutionError (0)
+
+ i = insert_appointment (windowname, summary, location, description, from_date, from_time, to_date, to_time, calendar, more_items_todo)
+
+ if i == 1:
+ flag = 1
+ else:
+ try:
+ click(windowname,'btnRecurrence')
+ waittillguiexist('dlgRecurrence')
+ insert_recurrence ('dlgRecurrence',duration, dur_value, dur_day, repeat_every, repeat_method, no_of_times, exceptions)
+ time.sleep(3)
+ click(windowname, 'btnSave')
+ except:
+ print 'unable to create the recursive appoinment'
+ log('Recursive All day event','testend')
+ raise LdtpExecutionError (0)
+
+ except:
+ log('unable to create the recursive appoinment','error')
+ log('Recursive All day event','testend')
+ raise LdtpExecutionError (0)
+ log('Recursive all day event Created','info')
+ log('Create appoinment with attachment','testend')
+appointment_withrecurrence()
diff --git a/evolution/rec-all-day-event.xml b/evolution/rec-all-day-event.xml
new file mode 100644
index 0000000..6113407
--- /dev/null
+++ b/evolution/rec-all-day-event.xml
@@ -0,0 +1,18 @@
+<?xml version="1.0"?>
+<data>
+ <repeat_every>5</repeat_every>
+ <duration>month(s)</duration>
+ <dur_value>second</dur_value>
+ <dur_day>Saturday</dur_day>
+ <repeat_method>for</repeat_method>
+ <no_of_times>12</no_of_times>
+ <exceptions>12/25/2005 12/26/2005</exceptions>
+ <calendar>Personal</calendar>
+ <summary>All day recursive</summary>
+ <location>novell</location>
+ <start_time>0</start_time>
+ <start_date>12/05/2005</start_date>
+ <due_date>12/30/2005</due_date>
+ <due_time>0</due_time>
+ <description>sample desc</description>
+</data>
diff --git a/evolution/recursive-app-with-attachment.py b/evolution/recursive-app-with-attachment.py
new file mode 100644
index 0000000..49f3579
--- /dev/null
+++ b/evolution/recursive-app-with-attachment.py
@@ -0,0 +1,110 @@
+#
+# Linux Desktop Testing Project http://www.gnomebangalore.org/ldtp
+#
+# Author:
+# Venkateswaran S <wenkat.s@gmail.com>
+#
+# Copyright 2004 Novell, Inc.
+#
+# This test script is free software; you can redistribute it and/or
+# modify it under the terms of the GNU Library General Public
+# License as published by the Free Software Foundation; either
+# version 2 of the License, or (at your option) any later version.
+#
+# This library is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+# Library General Public License for more details.
+#
+# You should have received a copy of the GNU Library General Public
+# License along with this library; if not, write to the
+# Free Software Foundation, Inc., 59 Temple Place - Suite 330,
+# Boston, MA 02111-1307, USA.
+#
+
+# To create an appoinment with attachment.
+
+#from create-appointment import *
+from evoutils.calendar import *
+from ldtp import *
+from ldtputils import *
+
+def read_data():
+
+ #Initialising XML parser with data file
+ data_object = LdtpDataFileParser (datafilename)
+ #Extracting imput data from xml file
+ summary = data_object.gettagvalue ('summary')[0]
+ location = data_object.gettagvalue ('location')[0]
+ description = data_object.gettagvalue ('description')[0]
+ from_date = data_object.gettagvalue ('from_date')[0]
+ to_date = data_object.gettagvalue ('to_date')[0]
+ from_time = data_object.gettagvalue ('from_time')[0]
+ to_time = data_object.gettagvalue ('to_time')[0]
+ calendar = data_object.gettagvalue ('calendar')[0]
+ filename = data_object.gettagvalue ('filename')[0]
+ repeat_every = data_object.gettagvalue ('repeat_every')[0]
+ duration = data_object.gettagvalue ('duration')[0]
+ dur_value = data_object.gettagvalue ('dur_value')[0]
+ dur_day = data_object.gettagvalue ('dur_day')[0]
+ repeat_method = data_object.gettagvalue ('repeat_method')[0]
+ no_of_times = data_object.gettagvalue ('no_of_times')[0]
+ exceptions = data_object.gettagvalue ('exceptions')[0]
+# print '1', repeat_every, duration, no_of_times, repeat_method, exceptions, dur_value, dur_day, filename
+# print '2', summary, location, description, from_date, to_date, from_time, to_time, calendar
+ return repeat_every, duration, no_of_times, repeat_method, exceptions, dur_value, dur_day, filename, summary, location, description, from_date, to_date, from_time, to_time, calendar
+
+def appointment_withattachment():
+
+ try:
+ log('Create recursive appoinment with attachment','teststart')
+ windowname = 'frmAppointment-Nosummary'
+ repeat_every, duration, no_of_times, repeat_method, exceptions, dur_value, dur_day, filename, summary, location, description, from_date, to_date, from_time, to_time, calendar = read_data()
+
+ more_items_todo = 'yes'
+ selectmenuitem ('frmEvolution-Calendars', 'mnuFile;mnuFile;mnuAppointment')
+ time.sleep (2)
+
+ if guiexist (windowname) == 0:
+ log ('Failed to open new appointment window', 'cause')
+ log('Create recursive appoinment with attachment','testend')
+ raise LdtpExecutionError (0)
+ else:
+ i = insert_appointment (windowname, summary, location, description, from_date, from_time, to_date, to_time, calendar, more_items_todo)
+
+ if i == 1:
+ flag = 1
+ else:
+ try:
+ click(windowname,'btnRecurrence')
+ waittillguiexist('dlgRecurrence')
+ insert_recurrence ('dlgRecurrence',duration, dur_value, dur_day, repeat_every, repeat_method, no_of_times, exceptions)
+ time.sleep(3)
+ except:
+ log('Failure in adding recurance data','error')
+ print 'Failure in adding recurance data'
+ log('Create recursive appoinment with attachment','testend')
+ raise LdtpExecutionError (0)
+
+ try:
+ click(windowname,'btnAttachments')
+ waittillguiexist('dlgAttachfile(s)')
+ time.sleep(3)
+ selectrow ('dlgAttachfile(s)', 'tblFiles', filename)
+ time.sleep(1)
+ click('dlgAttachfile(s)','btnOpen')
+ except:
+ print 'unable to attach the file'
+ log('Unable to attach the file','error')
+ log('Create recursive appoinment with attachment','testend')
+ raise LdtpExecutionError (0)
+
+ click(windowname, 'btnSave')
+
+ except:
+ log('unable to create the recursive appoinment with attachment','error')
+ log('Create recursive appoinment with attachment','testend')
+ raise LdtpExecutionError (0)
+ log('Recursive appointment with attachment created','info')
+ log('Create recursive appoinment with attachment','testend')
+appointment_withattachment()
diff --git a/evolution/recursive-app-with-attachment.xml b/evolution/recursive-app-with-attachment.xml
new file mode 100644
index 0000000..e226407
--- /dev/null
+++ b/evolution/recursive-app-with-attachment.xml
@@ -0,0 +1,19 @@
+<?xml version="1.0"?>
+<data>
+ <summary>Recursive appointment</summary>
+ <location>ceg</location>
+ <description>sample desc</description>
+ <from_date>12/24/2005</from_date>
+ <to_date>12/28/2005</to_date>
+ <from_time>11:00 AM</from_time>
+ <to_time>12:00 AM</to_time>
+ <calendar>Personal</calendar>
+ <filename>sample.txt</filename>
+ <repeat_every>3</repeat_every>
+ <duration>month(s)</duration>
+ <no_of_times>12/30/2005</no_of_times>
+ <repeat_method>until</repeat_method>
+ <exceptions>12/25/2005 12/27/2005</exceptions>
+ <dur_value>third</dur_value>
+ <dur_day>Saturday</dur_day>
+</data>
diff --git a/evolution/redirect-mail.py b/evolution/redirect-mail.py
new file mode 100644
index 0000000..862f09e
--- /dev/null
+++ b/evolution/redirect-mail.py
@@ -0,0 +1,103 @@
+#
+# Linux Desktop Testing Project http://www.gnomebangalore.org/ldtp
+#
+# Author:
+# Venkateswaran S <wenkat.s@gmail.com>
+#
+# Copyright 2004 Novell, Inc.
+#
+# This test script is free software; you can redistribute it and/or
+# modify it under the terms of the GNU Library General Public
+# License as published by the Free Software Foundation; either
+# version 2 of the License, or (at your option) any later version.
+#
+# This library is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+# Library General Public License for more details.
+#
+# You should have received a copy of the GNU Library General Public
+# License along with this library; if not, write to the
+# Free Software Foundation, Inc., 59 Temple Place - Suite 330,
+# Boston, MA 02111-1307, USA.
+#
+
+# Redirect a mail.
+
+from ldtp import *
+from ldtputils import *
+
+def getrowindex(subject):
+ try:
+ noofchild=getrowcount ('frmEvolution-Mail','ttblMessageList')
+ for ind in range (noofchild):
+ if getcellvalue('frmEvolution-Mail','ttblMessageList',ind,4) == subject:
+ return ind
+ if ind == noofchild-1:
+ log ('Message not present','cause')
+ raise LdtpExecutionError (0)
+ except:
+ log ('Unable to get index of message','error')
+ raise LdtpExecutionError (0)
+
+def read_data():
+
+ data_object = LdtpDataFileParser (datafilename)
+
+ #Extracting imput data from xml file
+ fldr = data_object.gettagvalue ('fldr')[0]
+ subject = data_object.gettagvalue ('subject')[0]
+ redirect_to = data_object.gettagvalue ('redirect_to')[0]
+ return fldr, subject, redirect_to
+
+def redirect(fldr, subject, redirect_to):
+ try:
+ log('redirect a mail','teststart')
+ windowname = 'frmComposeamessage'
+ remap('evolution','frmEvolution-Mail')
+ if selectrowpartialmatch ('frmEvolution-Mail','ttblMailFolderTree',fldr) == 1:
+ time.sleep(2)
+ log('Folder identified','info')
+ Row_index = getrowindex(subject)
+ if selectrowindex('frmEvolution-Mail','ttblMessageList',int(Row_index)) == 1:
+ log('Message selected','info')
+
+ from_id = getcellvalue('frmEvolution-Mail','ttblMessageList',int(Row_index),3)
+ selectmenuitem('frmEvolution-Mail','mnuMessage;mnuRedirect')
+ time.sleep(2)
+ setcontext('Compose a message',subject)
+ if waittillguiexist(windowname) == 1:
+ print 'Redirect Window opened, hence verified'
+
+# if settextvalue(windowname,'txtTo',redirect_to) == 1:
+ if verifyselect (windowname, 'cboFrom', from_id) == 1:
+ print 'From name set correctly'
+ log('From name verified','info')
+ print 'Redirect a mail verified'
+ log('Redirect verified','info')
+ else:
+ print 'From is set wrongly'
+ selectmenuitem(windowname,'mnuFile;mnuClose')
+ time.sleep(3)
+ if guiexist('dlgWarning:ModifiedMessage'):
+ click('dlgWarning:ModifiedMessage','btnDiscardChanges')
+
+ else:
+ print 'Reply window not found'
+ log('Reply to all verify failed','error')
+ else:
+ print 'Unable to select the menu item \"Reply\"'
+ log('Unable to find the menu item','error')
+ else:
+ print 'Unable to find the folder'
+ log('Unable to find the folder','error')
+ undoremap('evolution','frmEvolution-Mail')
+ log('Reply to all','testend')
+ except:
+ log('Unable to reply','error')
+ print 'Unable to reply'
+ log('Reply to all','testend')
+ raise LdtpExecutionError (0)
+
+fldr, subject, redirect_to = read_data()
+redirect(fldr, subject, redirect_to)
diff --git a/evolution/redirect-mail.xml b/evolution/redirect-mail.xml
new file mode 100644
index 0000000..c5a4eef
--- /dev/null
+++ b/evolution/redirect-mail.xml
@@ -0,0 +1,6 @@
+<?xml version="1.0"?>
+<data>
+ <fldr>Inbox</fldr>
+ <subject>sample</subject>
+ <redirect_to>wenkat.s@gmail.com</redirect_to>
+</data>
diff --git a/evolution/removesign.py b/evolution/removesign.py
new file mode 100644
index 0000000..8b55e62
--- /dev/null
+++ b/evolution/removesign.py
@@ -0,0 +1,41 @@
+#!/usr/bin/env python
+#
+# Linux Desktop Testing Project http://www.gnomebangalore.org/ldtp
+#
+# Author:
+# Prashanth Mohan <prashmohan@gmail.com>
+#
+# Copyright 2004 Novell, Inc.
+#
+# This test script is free software; you can redistribute it and/or
+# modify it under the terms of the GNU Library General Public
+# License as published by the Free Software Foundation; either
+# version 2 of the License, or (at your option) any later version.
+#
+# This library is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+# Library General Public License for more details.
+#
+# You should have received a copy of the GNU Library General Public
+# License along with this library; if not, write to the
+# Free Software Foundation, Inc., 59 Temple Place - Suite 330,
+# Boston, MA 02111-1307, USA.
+#
+
+from composerprefs import *
+
+try:
+ try:
+ data_object = LdtpDataFileParser (datafilename)
+ name=data_object.gettagvalue ('name')
+ except:
+ log ('Error while reading values for remove signature test','cause')
+ raise LdtpExecutionError (0)
+ try:
+ removesignature (name[0])
+ except:
+ log ('remove signature test failed','error')
+ raise LdtpExecutionError (0)
+except:
+ raise LdtpExecutionError (0)
diff --git a/evolution/rename_folder.py b/evolution/rename_folder.py
new file mode 100644
index 0000000..7140a0a
--- /dev/null
+++ b/evolution/rename_folder.py
@@ -0,0 +1,38 @@
+#
+# Linux Desktop Testing Project http://www.gnomebangalore.org/ldtp
+#
+# Author:
+# Venkateswaran S <wenkat.s@gmail.com>
+#
+# Copyright 2004 Novell, Inc.
+#
+# This test script is free software; you can redistribute it and/or
+# modify it under the terms of the GNU Library General Public
+# License as published by the Free Software Foundation; either
+# version 2 of the License, or (at your option) any later version.
+#
+# This library is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+# Library General Public License for more details.
+#
+# You should have received a copy of the GNU Library General Public
+# License along with this library; if not, write to the
+# Free Software Foundation, Inc., 59 Temple Place - Suite 330,
+# Boston, MA 02111-1307, USA.
+#
+
+#To rename a folder.
+
+from menu_reorganization import *
+
+data_object = LdtpDataFileParser (datafilename)
+#Extracting imput data from xml file
+
+old_name = data_object.gettagvalue ('old_name')[0]
+new_name = data_object.gettagvalue ('new_name')[0]
+if rename(old_name,new_name) == 1:
+ print old_name + ' has been renamed as '+new_name
+ log('Fldr has been renamed','info')
+else:
+ log('probs in renaming the fldr','info')
diff --git a/evolution/rename_folder.xml b/evolution/rename_folder.xml
new file mode 100644
index 0000000..1a431c5
--- /dev/null
+++ b/evolution/rename_folder.xml
@@ -0,0 +1,5 @@
+<?xml version="1.0"?>
+<data>
+ <old_name>test_copy</old_name>
+ <new_name>test</new_name>
+</data>
diff --git a/evolution/reply_toall.py b/evolution/reply_toall.py
new file mode 100644
index 0000000..2e1ce38
--- /dev/null
+++ b/evolution/reply_toall.py
@@ -0,0 +1,108 @@
+#
+# Linux Desktop Testing Project http://www.gnomebangalore.org/ldtp
+#
+# Author:
+# Venkateswaran S <wenkat.s@gmail.com>
+#
+# Copyright 2004 Novell, Inc.
+#
+# This test script is free software; you can redistribute it and/or
+# modify it under the terms of the GNU Library General Public
+# License as published by the Free Software Foundation; either
+# version 2 of the License, or (at your option) any later version.
+#
+# This library is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+# Library General Public License for more details.
+#
+# You should have received a copy of the GNU Library General Public
+# License along with this library; if not, write to the
+# Free Software Foundation, Inc., 59 Temple Place - Suite 330,
+# Boston, MA 02111-1307, USA.
+#
+
+# Reply to all.
+
+from ldtp import *
+from ldtputils import *
+
+def getrowindex(subject):
+ try:
+ noofchild=getrowcount ('frmEvolution-Mail','ttblMessageList')
+ for ind in range (noofchild):
+ if getcellvalue('frmEvolution-Mail','ttblMessageList',ind,4) == subject:
+ return ind
+ if ind == noofchild-1:
+ log ('Message not present','cause')
+ raise LdtpExecutionError (0)
+ except:
+ log ('Unable to get index of message','error')
+ raise LdtpExecutionError (0)
+
+def read_data():
+
+ data_object = LdtpDataFileParser (datafilename)
+
+ #Extracting imput data from xml file
+ fldr = data_object.gettagvalue ('fldr')[0]
+ subject = data_object.gettagvalue ('subject')[0]
+ expected_to_emails = data_object.gettagvalue ('expected_to_emails')[0]
+ expected_to_names = data_object.gettagvalue ('expected_to_names')[0]
+ return fldr, subject, expected_to_names, expected_to_emails
+
+def reply_toall(fldr, subject, expected_to_names, expected_to_emails):
+ try:
+ log('Reply to all','teststart')
+ windowname = 'frmComposeamessage'
+ remap('evolution','frmEvolution-Mail')
+ print fldr,subject
+ if selectrowpartialmatch ('frmEvolution-Mail','ttblMailFolderTree',fldr) == 1:
+ time.sleep(2)
+ log('Folder identified','info')
+ Row_index = getrowindex(subject)
+ if selectrowindex('frmEvolution-Mail','ttblMessageList',int(Row_index)) == 1:
+ log('Message selected','info')
+ selectmenuitem('frmEvolution-Mail','mnuMessage;mnuReply')
+ time.sleep(2)
+ setcontext('Compose a message','Re: '+subject)
+ if waittillguiexist(windowname) == 1:
+ expected_to_names = expected_to_names.split(',')
+ expected_to_emails = expected_to_emails.split(',')
+ to = ''
+ if len(expected_to_emails) == len(expected_to_names):
+ for i in range(0,len(expected_to_emails)):
+ to = to + str(expected_to_names[i]) + ' <' + str(expected_to_emails[i]) + '>, '
+ to = to[:-2]
+ print to,'to'
+ cur_to = gettextvalue(windowname,'txtCc')
+ print cur_to,'cur_to'
+ if cur_to == to:
+ print 'Reply to all working correctly'
+ else:
+ print 'Probs in to text box'
+ else:
+ print 'Enter data correctly'
+
+ print 'Reply Window opened, hence verified'
+ time.sleep(3)
+ selectmenuitem(windowname,'mnuFile;mnuClose')
+ log('Reply to all verified','info')
+ else:
+ print 'Reply window not found'
+ log('Reply to all verify failed','error')
+ else:
+ print 'Unable to select the menu item \"Reply\"'
+ log('Unable to find the menu item','error')
+ else:
+ print 'Unable to find the folder'
+ log('Unable to find the folder','error')
+ undoremap('evolution','frmEvolution-Mail')
+ log('Reply to all','testend')
+ except:
+ log('Unable to reply','error')
+ print 'Unable to reply'
+ raise LdtpExecutionError (0)
+
+fldr, subject, expected_to_names, expected_to_emails = read_data()
+reply_toall(fldr, subject, expected_to_names, expected_to_emails)
diff --git a/evolution/reply_toall.xml b/evolution/reply_toall.xml
new file mode 100644
index 0000000..295da88
--- /dev/null
+++ b/evolution/reply_toall.xml
@@ -0,0 +1,7 @@
+<?xml version="1.0"?>
+<data>
+ <fldr>Inbox</fldr>
+ <subject>sample</subject>
+ <expected_to_names>Prashanth Mohan</expected_to_names>
+ <expected_to_emails>prash086@myrealbox.com</expected_to_emails>
+</data>
diff --git a/evolution/replyto.py b/evolution/replyto.py
new file mode 100644
index 0000000..dad5a7a
--- /dev/null
+++ b/evolution/replyto.py
@@ -0,0 +1,43 @@
+#!/usr/bin/env python
+#
+# Linux Desktop Testing Project http://www.gnomebangalore.org/ldtp
+#
+# Author:
+# Prashanth Mohan <prashmohan@gmail.com>
+#
+# Copyright 2004 Novell, Inc.
+#
+# This test script is free software; you can redistribute it and/or
+# modify it under the terms of the GNU Library General Public
+# License as published by the Free Software Foundation; either
+# version 2 of the License, or (at your option) any later version.
+#
+# This library is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+# Library General Public License for more details.
+#
+# You should have received a copy of the GNU Library General Public
+# License along with this library; if not, write to the
+# Free Software Foundation, Inc., 59 Temple Place - Suite 330,
+# Boston, MA 02111-1307, USA.
+#
+from mailtests import *
+
+try:
+ try:
+ data_object = LdtpDataFileParser (datafilename)
+ to=data_object.gettagvalue ('to')
+ replyto=data_object.gettagvalue ('replyto')
+ except:
+ log ('Error while reading values for reply to test','cause')
+ raise LdtpExecutionError (0)
+ try:
+ add_to_replytofield (replyto[0],to[0])
+ except:
+ log ('reply to test failed','error')
+ raise LdtpExecutionError (0)
+except:
+ raise LdtpExecutionError (0)
+
+
diff --git a/evolution/replyto.xml b/evolution/replyto.xml
new file mode 100644
index 0000000..84d09de
--- /dev/null
+++ b/evolution/replyto.xml
@@ -0,0 +1,5 @@
+<?xml version="1.0"?>
+<data>
+ <to>prashmohan@gmail.com</to>
+ <replyto>prashmohan@gmail.com</replyto>
+</data>
diff --git a/evolution/restartevo.py b/evolution/restartevo.py
new file mode 100644
index 0000000..2fd9b8a
--- /dev/null
+++ b/evolution/restartevo.py
@@ -0,0 +1,28 @@
+#!/usr/bin/env python
+#
+# Linux Desktop Testing Project http://www.gnomebangalore.org/ldtp
+#
+# Author:
+# Prashanth Mohan <prashmohan@gmail.com>
+#
+# Copyright 2004 Novell, Inc.
+#
+# This test script is free software; you can redistribute it and/or
+# modify it under the terms of the GNU Library General Public
+# License as published by the Free Software Foundation; either
+# version 2 of the License, or (at your option) any later version.
+#
+# This library is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+# Library General Public License for more details.
+#
+# You should have received a copy of the GNU Library General Public
+# License along with this library; if not, write to the
+# Free Software Foundation, Inc., 59 Temple Place - Suite 330,
+# Boston, MA 02111-1307, USA.
+#
+
+from mailaccounts import *
+
+restartevolution()
diff --git a/evolution/save_msg.py b/evolution/save_msg.py
new file mode 100644
index 0000000..f420cdc
--- /dev/null
+++ b/evolution/save_msg.py
@@ -0,0 +1,90 @@
+#!/usr/bin/env python
+#
+# Linux Desktop Testing Project http://www.gnomebangalore.org/ldtp
+#
+# Author:
+# Venkateswaran S <wenkat.s@gmail.com>
+#
+# Copyright 2004 Novell, Inc.
+#
+# This test script is free software; you can redistribute it and/or
+# modify it under the terms of the GNU Library General Public
+# License as published by the Free Software Foundation; either
+# version 2 of the License, or (at your option) any later version.
+#
+# This library is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+# Library General Public License for more details.
+#
+# You should have received a copy of the GNU Library General Public
+# License along with this library; if not, write to the
+# Free Software Foundation, Inc., 59 Temple Place - Suite 330,
+# Boston, MA 02111-1307, USA.
+#
+# To save a mail message in home folder.
+
+from menu_reorganization import *
+
+def save_msg(fldr, subject, file_name):
+
+ try:
+ log('Save a message','teststart')
+ windowname = 'dlgSaveMessage'
+ if select_mail (fldr,subject) == 1:
+ selectmenuitem('frmEvolution-Mail','mnuFile;mnuSaveMessage')
+ if waittillguiexist(windowname) == 1:
+ settextvalue(windowname,'txtName',file_name)
+ time.sleep(3)
+ click(windowname,'btnSave')
+ time.sleep(3)
+ if guiexist('dlgOverwritefile?') == 1:
+ log('File Already exists','cause')
+ print 'File already exist'
+ click('dlgOverwritefile?','btnCancel')
+ print 'Cancelling...the job.'
+ time.sleep(2)
+ click(windowname,'btnCancel')
+ else:
+ log('The file has been saved','info')
+ path = os.environ.get('HOME')
+ full_path = path + '/' + file_name
+ if os.path.isfile(full_path):
+ log('The exixtance od file has been verified','info')
+ print 'The file has been saved :'+ full_path
+ else:
+ print 'file is not actually present, verify failed'
+ log('The exixtance od file has not been verified','error')
+ raise LdtpExecutionError (0)
+
+ else:
+ log('Unable to find the window \'Save Message\'','cause')
+ log('Save a message','testend')
+ raise LdtpExecutionError (0)
+ else:
+ log('Unable to select the fldr/mail','cause')
+ log('Save a message','testend')
+ raise LdtpExecutionError (0)
+ except:
+ log('Unable to save the message','error')
+ log('Save a message','testend')
+ raise LdtpExecutionError (0)
+ log('Save a message','testend')
+
+# Read data from xml file.
+data_object = LdtpDataFileParser (datafilename)
+fldr = data_object.gettagvalue ('fldr')[0]
+subject = data_object.gettagvalue ('subject')[0]
+file_name = data_object.gettagvalue ('file_name')[0]
+
+# Call the function
+if fldr and subject and file_name:
+ save_msg(fldr, subject, file_name)
+else:
+ if not (fldr):
+ log ('fldr not provided in data xml file', 'error')
+ if not (subject):
+ log ('subject not provided in data xml file', 'error')
+ if not (file_name):
+ log ('file_name not provided in data xml file', 'error')
+ log ('save message', 'fail')
diff --git a/evolution/save_msg.xml b/evolution/save_msg.xml
new file mode 100644
index 0000000..9ec4ce1
--- /dev/null
+++ b/evolution/save_msg.xml
@@ -0,0 +1,6 @@
+<?xml version="1.0"?>
+<data>
+ <fldr>Inbox</fldr>
+ <subject>sample</subject>
+ <file_name>savemsg1.txt</file_name>
+</data>
diff --git a/evolution/saveattachments.xml b/evolution/saveattachments.xml
new file mode 100644
index 0000000..057b025
--- /dev/null
+++ b/evolution/saveattachments.xml
@@ -0,0 +1,6 @@
+<?xml version="1.0"?>
+<data>
+ <folder>backup</folder>
+ <subject>save attachments</subject>
+ <save_location>Desktop</save_location>
+</data>
diff --git a/evolution/saveattachmentswhenoffline.py b/evolution/saveattachmentswhenoffline.py
new file mode 100644
index 0000000..c8d703c
--- /dev/null
+++ b/evolution/saveattachmentswhenoffline.py
@@ -0,0 +1,43 @@
+#!/usr/bin/env python
+#
+# Linux Desktop Testing Project http://www.gnomebangalore.org/ldtp
+#
+# Author:
+# Prashanth Mohan <prashmohan@gmail.com>
+#
+# Copyright 2004 Novell, Inc.
+#
+# This test script is free software; you can redistribute it and/or
+# modify it under the terms of the GNU Library General Public
+# License as published by the Free Software Foundation; either
+# version 2 of the License, or (at your option) any later version.
+#
+# This library is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+# Library General Public License for more details.
+#
+# You should have received a copy of the GNU Library General Public
+# License along with this library; if not, write to the
+# Free Software Foundation, Inc., 59 Temple Place - Suite 330,
+# Boston, MA 02111-1307, USA.
+#
+from offline import *
+
+try:
+ try:
+ data_object = LdtpDataFileParser (datafilename)
+ folder = data_object.gettagvalue ('folder')
+ subject = data_object.gettagvalue ('subject')
+ save_location = data_object.gettagvalue ('save_location')
+ except:
+ log ('Error while reading values for save attachments test','cause')
+ raise LdtpExecutionError (0)
+ try:
+ #go_offline ()
+ saveattachments (folder[0],subject[0],save_location[0])
+ except:
+ log ('save attachments when offline test failed','error')
+ raise LdtpExecutionError (0)
+except:
+ raise LdtpExecutionError (0)
diff --git a/evolution/saveattachmentswhenoffline.xml b/evolution/saveattachmentswhenoffline.xml
new file mode 100644
index 0000000..8a52a92
--- /dev/null
+++ b/evolution/saveattachmentswhenoffline.xml
@@ -0,0 +1,6 @@
+<?xml version="1.0"?>
+<data>
+ <folder>Inbox</folder>
+ <subject>smtp mail failed</subject>
+ <save_location>Desktop</save_location>
+</data>
diff --git a/evolution/savemail.py b/evolution/savemail.py
new file mode 100644
index 0000000..73b2322
--- /dev/null
+++ b/evolution/savemail.py
@@ -0,0 +1,54 @@
+#!/usr/bin/env python
+#
+# Linux Desktop Testing Project http://www.gnomebangalore.org/ldtp
+#
+# Author:
+# Prashanth Mohan <prashmohan@gmail.com>
+#
+# Copyright 2004 Novell, Inc.
+#
+# This test script is free software; you can redistribute it and/or
+# modify it under the terms of the GNU Library General Public
+# License as published by the Free Software Foundation; either
+# version 2 of the License, or (at your option) any later version.
+#
+# This library is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+# Library General Public License for more details.
+#
+# You should have received a copy of the GNU Library General Public
+# License along with this library; if not, write to the
+# Free Software Foundation, Inc., 59 Temple Place - Suite 330,
+# Boston, MA 02111-1307, USA.
+#
+from mailtests import *
+
+try:
+ try:
+ data_object = LdtpDataFileParser (datafilename)
+ savemethod=data_object.gettagvalue ('savemethod')
+ to=data_object.gettagvalue ('to')
+ subject=data_object.gettagvalue ('subject')
+ body=data_object.gettagvalue ('body')
+ cc=data_object.gettagvalue ('cc')
+ bcc=data_object.gettagvalue ('bcc')
+ attachment=data_object.gettagvalue ('attachment')
+ draftfolder=data_object.gettagvalue ('draftfolder')
+ except:
+ log ('Error while reading values for saving mail test','cause')
+ raise LdtpExecutionError (0)
+ print "input over"
+
+ print savemethod,to,subject,body,cc, bcc, attachment, draftfolder
+ try:
+ savemail(int(savemethod[0]),to,subject,body,cc, bcc, attachment, draftfolder[0])
+ #savemail(int(savemethod[0]),to)
+ except:
+ log ('Save mail failed','error')
+ raise LdtpExecutionError (0)
+except:
+ raise LdtpExecutionError (0)
+
+
+
diff --git a/evolution/savemail.xml b/evolution/savemail.xml
new file mode 100644
index 0000000..3caf80a
--- /dev/null
+++ b/evolution/savemail.xml
@@ -0,0 +1,8 @@
+<?xml version="1.0"?>
+<data>
+ <savemethod>1</savemethod>
+ <to>prashmohan@gmail.com</to>
+ <subject>test subject</subject>
+ <body>test body</body>
+ <draftfolder>Drafts</draftfolder>
+</data>
diff --git a/evolution/searchcontact.py b/evolution/searchcontact.py
new file mode 100644
index 0000000..16d8d2f
--- /dev/null
+++ b/evolution/searchcontact.py
@@ -0,0 +1,68 @@
+#!/usr/bin/env python
+#
+# Linux Desktop Testing Project http://www.gnomebangalore.org/ldtp
+#
+# Author:
+# Prashanth Mohan <prashmohan@gmail.com>
+#
+# Copyright 2004 Novell, Inc.
+#
+# This test script is free software; you can redistribute it and/or
+# modify it under the terms of the GNU Library General Public
+# License as published by the Free Software Foundation; either
+# version 2 of the License, or (at your option) any later version.
+#
+# This library is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+# Library General Public License for more details.
+#
+# You should have received a copy of the GNU Library General Public
+# License along with this library; if not, write to the
+# Free Software Foundation, Inc., 59 Temple Place - Suite 330,
+# Boston, MA 02111-1307, USA.
+#
+
+from ldtp import *
+from ldtputils import *
+from contact import *
+
+def basicsearch(name):
+ log ('searching for a name from the toolbar','teststart')
+ try:
+ #print name
+ selectContactPane()
+
+ if gettextvalue ('frmEvolution-Contacts','txtSearchTextEntry')!='':
+ settextvalue ('frmEvolution-Contacts','txtSearchTextEntry','')
+ settextvalue ('frmEvolution-Contacts','txtSearchTextEntry',name)
+ settextvalue ('frmEvolution-Contacts','txtSearchTextEntry',name)
+ time.sleep (2)
+ click ('frmEvolution-Contacts','btnFindNow')
+ except:
+ log ('Error while searching through the Toolbar','error')
+ log ('searching for a name from the toolbar','testend')
+ raise LdtpExecutionError(0)
+ log ('searching for a name from the toolbar','testend')
+
+def verifybasicsearch (name):
+ log ('Verifying Basic Search Results','teststart')
+ try:
+ selectpanel ('frmEvolution-Contacts','pnlcurrentaddressbookfolderhas1card',1)
+ selectpanel ('frmEvolution-Contacts','pnlcurrentaddressbookfolderhas1card',1)
+ selectmenuitem ('frmEvolution-Contacts','mnuFile;mnuOpen')
+ appendtext=titleappend(name)
+ time.sleep (1)
+ setcontext ('Contact Editor','Contact Editor -'+appendtext)
+ waittillguiexist ('dlgContactEditor')
+ if gettextvalue ('dlgContactEditor','txtFullName').find(name)==-1:
+ raise LdtpExecutionError(0)
+ click ('dlgContactEditor','btnCancel')
+ except:
+ log ('Basic Search did not provide correct results')
+ log ('Verifying Basic Search Results','testend')
+ log ('Verifying Basic Search Results','testend')
+
+data_object = LdtpDataFileParser (datafilename)
+Name=data_object.gettagvalue ('Name')
+basicsearch (Name[0])
diff --git a/evolution/searchcontact.xml b/evolution/searchcontact.xml
new file mode 100644
index 0000000..490023c
--- /dev/null
+++ b/evolution/searchcontact.xml
@@ -0,0 +1,4 @@
+<?xml version="1.0"?>
+<data>
+ <Name>Test Name</Name>
+</data>
diff --git a/evolution/select_all.py b/evolution/select_all.py
new file mode 100644
index 0000000..7056556
--- /dev/null
+++ b/evolution/select_all.py
@@ -0,0 +1,39 @@
+#
+# Linux Desktop Testing Project http://www.gnomebangalore.org/ldtp
+#
+# Author:
+# Venkateswaran S <wenkat.s@gmail.com>
+#
+# Copyright 2004 Novell, Inc.
+#
+# This test script is free software; you can redistribute it and/or
+# modify it under the terms of the GNU Library General Public
+# License as published by the Free Software Foundation; either
+# version 2 of the License, or (at your option) any later version.
+#
+# This library is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+# Library General Public License for more details.
+#
+# You should have received a copy of the GNU Library General Public
+# License along with this library; if not, write to the
+# Free Software Foundation, Inc., 59 Temple Place - Suite 330,
+# Boston, MA 02111-1307, USA.
+#
+
+# Copy a folder from one location to another.
+
+from menu_reorganization import *
+
+data_object = LdtpDataFileParser (datafilename)
+
+#Extracting imput data from xml file
+fldr = data_object.gettagvalue ('fldr')[0]
+
+if select_all(fldr) == 1:
+ print 'All Mails in '+fldr+' has been selected'
+ log('All mails selected','info')
+else:
+ log('Unable to select','error')
+
diff --git a/evolution/select_all.xml b/evolution/select_all.xml
new file mode 100644
index 0000000..58972bf
--- /dev/null
+++ b/evolution/select_all.xml
@@ -0,0 +1,4 @@
+<?xml version="1.0"?>
+<data>
+ <fldr>Inbox</fldr>
+</data>
diff --git a/evolution/sendmailwhenoffline.py b/evolution/sendmailwhenoffline.py
new file mode 100644
index 0000000..aa6a352
--- /dev/null
+++ b/evolution/sendmailwhenoffline.py
@@ -0,0 +1,33 @@
+#!/usr/bin/env python
+#
+# Linux Desktop Testing Project http://www.gnomebangalore.org/ldtp
+#
+# Author:
+# Prashanth Mohan <prashmohan@gmail.com>
+#
+# Copyright 2004 Novell, Inc.
+#
+# This test script is free software; you can redistribute it and/or
+# modify it under the terms of the GNU Library General Public
+# License as published by the Free Software Foundation; either
+# version 2 of the License, or (at your option) any later version.
+#
+# This library is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+# Library General Public License for more details.
+#
+# You should have received a copy of the GNU Library General Public
+# License along with this library; if not, write to the
+# Free Software Foundation, Inc., 59 Temple Place - Suite 330,
+# Boston, MA 02111-1307, USA.
+#
+
+
+from mailtests import *
+from evoutils.composemail import *
+
+to, subject, body, cc,bcc, attachment, sentitemsfolder, refimg = read_maildata (datafilename)
+
+sendmailwhenoffline (to, subject, body, cc, bcc, attachment)
+
diff --git a/evolution/spellcheck.py b/evolution/spellcheck.py
new file mode 100644
index 0000000..c9afcdb
--- /dev/null
+++ b/evolution/spellcheck.py
@@ -0,0 +1,48 @@
+#!/usr/bin/env python
+#
+# Linux Desktop Testing Project http://www.gnomebangalore.org/ldtp
+#
+# Author:
+# Prashanth Mohan <prashmohan@gmail.com>
+#
+# Copyright 2004 Novell, Inc.
+#
+# This test script is free software; you can redistribute it and/or
+# modify it under the terms of the GNU Library General Public
+# License as published by the Free Software Foundation; either
+# version 2 of the License, or (at your option) any later version.
+#
+# This library is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+# Library General Public License for more details.
+#
+# You should have received a copy of the GNU Library General Public
+# License along with this library; if not, write to the
+# Free Software Foundation, Inc., 59 Temple Place - Suite 330,
+# Boston, MA 02111-1307, USA.
+#
+
+from mailtests import *
+
+
+try:
+ data_object = LdtpDataFileParser (datafilename)
+ text=data_object.gettagvalue ('text')
+ method=data_object.gettagvalue ('method')
+except:
+ log ('Unable to read values for Spell check','cause')
+ raise LdtpExecutionError (0)
+
+try:
+ selectMailPane()
+ window_id='frmEvolution-Mail'
+ selectmenuitem (window_id,'mnuFile;mnuNew;mnuMailMessage')
+ waittillguiexist ('frmComposeamessage')
+ settextvalue ('frmComposeamessage','txt6',text[0])
+except:
+ log ('Unable to set text','cause')
+ raise LdtpExecutionError (0)
+
+spell_check_test(int(method[0]))
+closecomposewindow(0)
diff --git a/evolution/spellcheck.xml b/evolution/spellcheck.xml
new file mode 100644
index 0000000..31c7284
--- /dev/null
+++ b/evolution/spellcheck.xml
@@ -0,0 +1,6 @@
+<?xml version="1.0"?>
+<data>
+ <text>
+Helo and welcme to Kan Banga Crorepati</text>
+<method>0</method>
+</data>
diff --git a/evolution/template.py b/evolution/template.py
new file mode 100644
index 0000000..5a7ea58
--- /dev/null
+++ b/evolution/template.py
@@ -0,0 +1,44 @@
+#!/usr/bin/env python
+#
+# Linux Desktop Testing Project http://www.gnomebangalore.org/ldtp
+#
+# Author:
+# Prashanth Mohan <prashmohan@gmail.com>
+#
+# Copyright 2004 Novell, Inc.
+#
+# This test script is free software; you can redistribute it and/or
+# modify it under the terms of the GNU Library General Public
+# License as published by the Free Software Foundation; either
+# version 2 of the License, or (at your option) any later version.
+#
+# This library is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+# Library General Public License for more details.
+#
+# You should have received a copy of the GNU Library General Public
+# License along with this library; if not, write to the
+# Free Software Foundation, Inc., 59 Temple Place - Suite 330,
+# Boston, MA 02111-1307, USA.
+#
+from mailtests import *
+
+try:
+ try:
+ data_object = LdtpDataFileParser (datafilename)
+ to=data_object.gettagvalue ('to')
+ template=data_object.gettagvalue ('template')
+ ref_image=data_object.gettagvalue ('ref_image')
+ except:
+ log ('Error while reading values for template test','cause')
+ raise LdtpExecutionError (0)
+ try:
+ template_test (to[0],template[0],ref_image)
+ except:
+ log ('template test failed','error')
+ raise LdtpExecutionError (0)
+except:
+ raise LdtpExecutionError (0)
+
+
diff --git a/evolution/template.xml b/evolution/template.xml
new file mode 100644
index 0000000..20b2726
--- /dev/null
+++ b/evolution/template.xml
@@ -0,0 +1,6 @@
+<?xml version="1.0"?>
+<data>
+ <to>prashmohan@gmail.com</to>
+ <template>Draft</template>
+ <ref_image>IMAGES/ref_theme.png</ref_image>
+</data>
diff --git a/evolution/textformatting.py b/evolution/textformatting.py
new file mode 100644
index 0000000..49973a4
--- /dev/null
+++ b/evolution/textformatting.py
@@ -0,0 +1,45 @@
+#!/usr/bin/env python
+#
+# Linux Desktop Testing Project http://www.gnomebangalore.org/ldtp
+#
+# Author:
+# Prashanth Mohan <prashmohan@gmail.com>
+#
+# Copyright 2004 Novell, Inc.
+#
+# This test script is free software; you can redistribute it and/or
+# modify it under the terms of the GNU Library General Public
+# License as published by the Free Software Foundation; either
+# version 2 of the License, or (at your option) any later version.
+#
+# This library is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+# Library General Public License for more details.
+#
+# You should have received a copy of the GNU Library General Public
+# License along with this library; if not, write to the
+# Free Software Foundation, Inc., 59 Temple Place - Suite 330,
+# Boston, MA 02111-1307, USA.
+#
+from mailtests import *
+
+
+try:
+ data_object = LdtpDataFileParser (datafilename)
+ to=data_object.gettagvalue ('to')
+ ref_img1=data_object.gettagvalue ('text_ref_image')
+ ref_image=data_object.gettagvalue ('list_ref_image')
+ print to,ref_img1,ref_image
+ time.sleep (5)
+except:
+ log ('Unable to read values for textformatting','cause')
+ raise LdtpExecutionError (0)
+
+try:
+ text_formatting_test(to[0],ref_img1)
+ lists_test (to[0],ref_image)
+except:
+ log ('Error in Text formatting','cause')
+ raise LdtpExecutionError (0)
+
diff --git a/evolution/textformatting.xml b/evolution/textformatting.xml
new file mode 100644
index 0000000..f85a866
--- /dev/null
+++ b/evolution/textformatting.xml
@@ -0,0 +1,7 @@
+<?xml version="1.0"?>
+<data>
+ <to>prashmohan@gmail.com</to>
+ <text_ref_image>IMAGES/ref_text_formatting.png</text_ref_image>
+ <list_ref_image>IMAGES/ref_lists.png</list_ref_image>
+ <font_ref_image>IMAGES/ref_fonts.png</font_ref_image>
+</data>
diff --git a/evolution/traverse-mail.py b/evolution/traverse-mail.py
new file mode 100644
index 0000000..d9fe25d
--- /dev/null
+++ b/evolution/traverse-mail.py
@@ -0,0 +1,117 @@
+#
+# Linux Desktop Testing Project http://www.gnomebangalore.org/ldtp
+#
+# Author:
+# Venkateswaran S <wenkat.s@gmail.com>
+#
+# Copyright 2004 Novell, Inc.
+#
+# This test script is free software; you can redistribute it and/or
+# modify it under the terms of the GNU Library General Public
+# License as published by the Free Software Foundation; either
+# version 2 of the License, or (at your option) any later version.
+#
+# This library is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+# Library General Public License for more details.
+#
+# You should have received a copy of the GNU Library General Public
+# License along with this library; if not, write to the
+# Free Software Foundation, Inc., 59 Temple Place - Suite 330,
+# Boston, MA 02111-1307, USA.
+#
+
+# Traverse Through the mails
+
+from ldtp import *
+from ldtputils import *
+
+def getrowct_based_properties(property_val):
+ try:
+ ct = 0
+ colmn = 4
+ noofchild = getrowcount ('frmEvolution-Mail','ttblMessageList')
+ if property_val == 'Important':
+ colmn = 2
+ elif property_val == 'Unread':
+ colmn = 0
+ else:
+ ct = noofchild - 1
+
+ for ind in range (noofchild):
+ if getcellvalue('frmEvolution-Mail','ttblMessageList',ind,colmn) == '1':
+ ct = ct + 1
+ if colmn == 0:
+ ct = noofchild - ct
+ return ct
+ except:
+ log ('Unable to get index of message','error')
+ raise LdtpExecutionError (0)
+
+def read_data():
+
+ data_object = LdtpDataFileParser (datafilename)
+
+ #Extracting imput data from xml file
+ fldr = data_object.gettagvalue ('fldr')[0]
+ subject = data_object.gettagvalue ('subject')[0]
+ traverse_method = data_object.gettagvalue ('traverse_method')[0]
+ return fldr, subject, traverse_method
+
+def Traverse(fldr, subject, traverse_method):
+ try:
+ log('Traverse Mail','teststart')
+ windowname = 'frmWelcometoEvolution!'
+ remap('evolution','frmEvolution-Mail')
+ if selectrowpartialmatch ('frmEvolution-Mail','ttblMailFolderTree',fldr) == 1:
+ time.sleep(3)
+ log('Folder identified','info')
+ selectrow('frmEvolution-Mail','ttblMessageList',subject)
+ if traverse_method == 'NextUnread' or traverse_method == 'PreviousUnread':
+ property_val = 'Unread'
+ elif traverse_method == 'NextImportant' or traverse_method == 'PreviousImportant':
+ property_val = 'Important'
+ else:
+ property_val = ''
+ row_ct = getrowct_based_properties(property_val)
+ if row_ct >= 2:
+ row_ct = 2
+ elif row_ct <= 1:
+ print 'Less than 1 mail in the specified folder, Unable to traverse'
+ log('Less than 1 mail in the specified folder, Unable to traverse','error')
+
+ for i in range(0,row_ct): # Find another method to stop the execution.
+
+ if traverse_method == 'Next' or traverse_method == 'Previous' \
+ or traverse_method == 'NextUnread' or traverse_method == 'PreviousUnread' \
+ or traverse_method == 'NextImportant' or traverse_method == 'PreviousImportant' \
+ or traverse_method == 'NextThread':
+ if selectmenuitem('frmEvolution-Mail','mnuMessage;mnuGoTo;mnu'+traverse_method+'Message') == 1:
+ time.sleep(3)
+# summary = getcellvalue('frmEvolution-Mail','ttblMessageList',int(i),4)
+ else:
+ print 'End of messages'
+ log('end of messages','error')
+ else:
+ print 'Traverse method unknown'
+ log('unknown traverse method','error')
+ else:
+ log('Unable to find a message with the given subject ','error')
+ print 'Verify your subject'
+ except:
+ log('Unable to traverse through the message list','error')
+ print 'Unable to traverse through the message list'
+ log('Traverse Mails','testend')
+ raise LdtpExecutionError (0)
+
+ log('Traverse Mails','testend')
+
+fldr, subject, traverse_method = read_data()
+Traverse(fldr, subject, 'Next')
+Traverse(fldr, subject, 'Previous')
+Traverse(fldr, subject, 'NextImportant')
+Traverse(fldr, subject, 'PreviousImportant')
+Traverse(fldr, subject, 'NextUnread')
+Traverse(fldr, subject, 'PreviousUnread')
+
diff --git a/evolution/traverse-mail.xml b/evolution/traverse-mail.xml
new file mode 100644
index 0000000..0cfbf69
--- /dev/null
+++ b/evolution/traverse-mail.xml
@@ -0,0 +1,6 @@
+<?xml version="1.0"?>
+<data>
+ <fldr>Inbox</fldr>
+ <subject>sample</subject>
+ <traverse_method>NextImportant</traverse_method>
+</data>
diff --git a/evolution/undoredo.py b/evolution/undoredo.py
new file mode 100644
index 0000000..cb0e1e8
--- /dev/null
+++ b/evolution/undoredo.py
@@ -0,0 +1,47 @@
+#!/usr/bin/env python
+#
+# Linux Desktop Testing Project http://www.gnomebangalore.org/ldtp
+#
+# Author:
+# Prashanth Mohan <prashmohan@gmail.com>
+#
+# Copyright 2004 Novell, Inc.
+#
+# This test script is free software; you can redistribute it and/or
+# modify it under the terms of the GNU Library General Public
+# License as published by the Free Software Foundation; either
+# version 2 of the License, or (at your option) any later version.
+#
+# This library is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+# Library General Public License for more details.
+#
+# You should have received a copy of the GNU Library General Public
+# License along with this library; if not, write to the
+# Free Software Foundation, Inc., 59 Temple Place - Suite 330,
+# Boston, MA 02111-1307, USA.
+#
+from mailtests import *
+
+try:
+ data_object = LdtpDataFileParser (datafilename)
+ text=data_object.gettagvalue ('text')
+except:
+ log ('Unable to read values for find and replace','cause')
+ raise LdtpExecutionError (0)
+
+try:
+ #selectMailPane()
+ print "UNDO REDO TEST"
+ time.sleep (5)
+ window_id='frmEvolution-Mail'
+ selectmenuitem (window_id,'mnuFile;mnuNew;mnuMailMessage')
+ waittillguiexist ('frmComposeamessage')
+ settextvalue ('frmComposeamessage','txt6',text[0])
+except:
+ log ('Unable to set text','cause')
+ raise LdtpExecutionError (0)
+
+undo_redo_test()
+closecomposewindow (0)
diff --git a/evolution/verify_readonly_tasklist.py b/evolution/verify_readonly_tasklist.py
new file mode 100644
index 0000000..6080580
--- /dev/null
+++ b/evolution/verify_readonly_tasklist.py
@@ -0,0 +1,75 @@
+#
+# Linux Desktop Testing Project http://www.gnomebangalore.org/ldtp
+#
+# Author:
+# Venkateswaran S <wenkat.s@gmail.com>
+#
+# Copyright 2004 Novell, Inc.
+#
+# This test script is free software; you can redistribute it and/or
+# modify it under the terms of the GNU Library General Public
+# License as published by the Free Software Foundation; either
+# version 2 of the License, or (at your option) any later version.
+#
+# This library is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+# Library General Public License for more details.
+#
+# You should have received a copy of the GNU Library General Public
+# License along with this library; if not, write to the
+# Free Software Foundation, Inc., 59 Temple Place - Suite 330,
+# Boston, MA 02111-1307, USA.
+#
+# verify the Tasks in the server is readonly (while working offline)
+
+from ldtp import *
+from ldtputils import *
+
+def read_data():
+ #Initialising XML parser with data file
+ data_object = LdtpDataFileParser (datafilename)
+
+ #Extracting imput data from xml file
+ summary = data_object.gettagvalue ('summary')[0]
+ return summary
+
+def verify_readonly():
+
+ try:
+ log('Verify readonly','teststart')
+ summary = read_data()
+ windowname = 'frmTask-Nosummary'
+ remap('evolution','frmEvolution-Tasks')
+ selectmenuitem('frmEvolution-Tasks','mnuFile;mnuWorkOffline')
+
+ selectrowpartialmatch ('frmEvolution-Tasks', 'tblTaskTable', summary)
+ selectmenuitem('frmEvolution-Tasks','mnuFile;mnuOpenTask')
+ time.sleep(3)
+ setcontext('Task - No summary','Task - ' + summary)
+ waittillguiexist(windowname)
+ time.sleep(3)
+ print 'here'
+ if settextvalue (windowname, 'txtDescription', summary+'.') == 0:
+ print 'Verify Success'
+ log('Verify Success','info')
+ else:
+ print 'Verify failed'
+ log('Verify Failed','error')
+ click(windowname,'btnClose')
+ undoremap('evolution','frmEvolution-Tasks')
+ remap('evolution','frmEvolution-Tasks')
+ selectmenuitem('frmEvolution-Tasks','mnuFile;mnuWorkOnline')
+ undoremap('evolution','frmEvolution-Tasks')
+ time.sleep(3)
+ except:
+ print 'Unable to verify'
+ log('Unable to verify','error')
+ undoremap('evolution','frmEvolution-Tasks')
+ remap('evolution','frmEvolution-Tasks')
+ selectmenuitem('frmEvolution-Tasks','mnuFile;mnuWorkOnline')
+ log('verify readonly','testend')
+ raise LdtpExecutionError (0)
+ log('verify readonly','testend')
+
+verify_readonly()
diff --git a/evolution/verify_readonly_tasklist.xml b/evolution/verify_readonly_tasklist.xml
new file mode 100644
index 0000000..4df6b07
--- /dev/null
+++ b/evolution/verify_readonly_tasklist.xml
@@ -0,0 +1,6 @@
+<?xml version="1.0"?>
+<data>
+ <fldr_name>Tasks</fldr_name>
+ <date>12/07/2005</date>
+ <summary>Task on the server</summary>
+</data>
diff --git a/evolution/work_offline.py b/evolution/work_offline.py
new file mode 100644
index 0000000..2db252e
--- /dev/null
+++ b/evolution/work_offline.py
@@ -0,0 +1,61 @@
+#!/usr/bin/env python
+#
+# Linux Desktop Testing Project http://www.gnomebangalore.org/ldtp
+#
+# Author:
+# Venkateswaran S <wenkat.s@gmail.com>
+#
+# Copyright 2004 Novell, Inc.
+#
+# This test script is free software; you can redistribute it and/or
+# modify it under the terms of the GNU Library General Public
+# License as published by the Free Software Foundation; either
+# version 2 of the License, or (at your option) any later version.
+#
+# This library is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+# Library General Public License for more details.
+#
+# You should have received a copy of the GNU Library General Public
+# License along with this library; if not, write to the
+# Free Software Foundation, Inc., 59 Temple Place - Suite 330,
+# Boston, MA 02111-1307, USA.
+#
+# To print a message.
+# Note Actually it clicks the cancel btn instead of print button.
+
+from ldtp import *
+from ldtputils import *
+
+def work_offline():
+ try:
+ log('Work Offline','teststart')
+ remap('evolution','frmEvolution-Mail')
+ if doesmenuitemexist ('frmEvolution-Mail', 'mnuFile;mnuWorkOffline') == 1:
+ if selectmenuitem('frmEvolution-Mail','mnuFile;mnuWorkOffline') == 1:
+ time.sleep(3)
+ undoremap('evolution','frmEvolution-Mail')
+ remap('evolution','frmEvolution-Mail')
+ if doesmenuitemexist ('frmEvolution-Mail', 'mnuFile;mnuWorkOnline') == 1:
+ print 'Work Offline in the File menu works fine'
+ log('Work offline verified','info')
+ selectmenuitem('frmEvolution-Mail','mnuFile;mnuWorkOnline')
+ else:
+ print 'Unable to see the work online in the file menu after selecting woek offline'
+ log('Unable to see the work online in the file menu after selecting woek offline','cause')
+ else:
+ print 'Unable to select the work offline item in the file menu'
+ log('Unable to select the work offline item in the file menu','cause')
+ else:
+ print 'Already working offline/ evolution-mail is not opened'
+ log('Already working offline/ evolution-mail is not opened','cause')
+ undoremap('evolution','frmEvolution-Mail')
+ log('Work Offline','testend')
+ except:
+ log('Unable to go offline','error')
+ log('Work Offline','testend')
+ undoremap('evolution','frmEvolution-Mail')
+ raise LdtpExecutionError (0)
+
+work_offline()