summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorprashmohan <prashmohan>2006-09-13 17:41:08 +0000
committerprashmohan <prashmohan>2006-09-13 17:41:08 +0000
commite4529b0215edfa62d0651aa4559996f625ed6977 (patch)
treef3958a682da224c9f5a85bf547aee6806cd8cc9c
parentc9fbb07823b2025fb9aa7b4edc76aa6afe352af9 (diff)
Added new scripts for Evolutionevolution-26
-rw-r--r--evolution/Assigned_Task_modify.py173
-rw-r--r--evolution/Assigned_Task_modify.xml17
-rw-r--r--evolution/New_assigned_task.py166
-rw-r--r--evolution/New_assigned_task.xml8
-rw-r--r--evolution/README65
-rw-r--r--evolution/TAGS53
-rw-r--r--evolution/account-setup.py209
-rw-r--r--evolution/addcontact.py19
-rw-r--r--evolution/addcontactlist.py2
-rw-r--r--evolution/addmeeting.py356
-rw-r--r--evolution/addnewsign.py2
-rw-r--r--evolution/addtoreplytofield.py2
-rw-r--r--evolution/advancedsearch.py30
-rw-r--r--evolution/advancedsearch.xml7
-rw-r--r--evolution/all-day-event-recur.py49
-rw-r--r--evolution/all-day-event-recur.xml19
-rw-r--r--evolution/all-day-event.py85
-rw-r--r--evolution/all-day-event.xml8
-rw-r--r--evolution/apply_filter.py29
-rw-r--r--evolution/applyfilterwhenoffline.py2
-rw-r--r--evolution/applyfilterwhenoffline.xml2
-rw-r--r--evolution/appointment-with-attachment.py2
-rw-r--r--evolution/appointment.py330
-rw-r--r--evolution/backgroundimage.py2
-rw-r--r--evolution/cal.xml83
-rw-r--r--evolution/calen.py115
-rw-r--r--evolution/change-view.py2
-rw-r--r--evolution/change_status.py3
-rw-r--r--evolution/changecomponent.py25
-rw-r--r--evolution/changelanginspellcheck.py2
-rw-r--r--evolution/changesentfolder.py25
-rw-r--r--evolution/checkaddbookrdonly.py2
-rw-r--r--evolution/checkheaders.py2
-rw-r--r--evolution/chk_file_new.py2
-rw-r--r--evolution/closecomposewindow.py2
-rw-r--r--evolution/compose-mail-withouthtml.py25
-rw-r--r--evolution/compose-mail.py16
-rwxr-xr-xevolution/compose_mail.py20
-rw-r--r--evolution/composerprefs.py211
-rw-r--r--evolution/contact.py336
-rw-r--r--evolution/contacts.xml7
-rw-r--r--evolution/copy-to.py2
-rw-r--r--evolution/copymail.py6
-rw-r--r--evolution/copymessagewhenoffline.py4
-rw-r--r--evolution/cr_task_list.py53
-rw-r--r--evolution/create-appointment.py90
-rw-r--r--evolution/create-appointment.xml8
-rw-r--r--evolution/create-folder.py2
-rw-r--r--evolution/create-mail-folder.py3
-rw-r--r--evolution/create-meeting-recur.xml10
-rw-r--r--evolution/create-meeting.xml20
-rw-r--r--evolution/create-recursive-app.py87
-rw-r--r--evolution/create-recursive-app.xml26
-rw-r--r--evolution/create-search-folder-from-message.py6
-rwxr-xr-xevolution/create_appointment.py103
-rw-r--r--evolution/create_filter.py5
-rw-r--r--evolution/createaddrbook.py10
-rw-r--r--evolution/createmeeting.py13
-rw-r--r--evolution/createrecurmeet.py14
-rw-r--r--evolution/del-non-sys-folder.py2
-rw-r--r--evolution/del_assigned_task.py3
-rw-r--r--evolution/del_assigned_task.xml2
-rw-r--r--evolution/del_task.py26
-rw-r--r--evolution/del_task.xml2
-rw-r--r--evolution/delete-mail-folder.py2
-rw-r--r--evolution/deleteallinstmeeting.py50
-rw-r--r--evolution/deletecontact.py12
-rw-r--r--evolution/deletecontact.xml2
-rw-r--r--evolution/deletecontactlist.py19
-rw-r--r--evolution/deletecontactlist.xml2
-rw-r--r--evolution/deletemail.py4
-rw-r--r--evolution/deletemailaccount.py2
-rw-r--r--evolution/deletemailaccount.xml2
-rw-r--r--evolution/deletemeeting.py50
-rw-r--r--evolution/deletemeeting.xml5
-rw-r--r--evolution/deletemeetingall.xml5
-rw-r--r--evolution/deletemeetingone.xml4
-rw-r--r--evolution/deletemessagewhenoffline.py2
-rw-r--r--evolution/deletemessagewhenoffline.xml4
-rw-r--r--evolution/deletesingleinstmeeting.py15
-rw-r--r--evolution/editsign.py2
-rw-r--r--evolution/emptysubjectline.py2
-rw-r--r--evolution/enabledisablemailaccount.py3
-rw-r--r--evolution/enabledisablemailaccount.xml2
-rw-r--r--evolution/evo-testing.xml253
-rw-r--r--evolution/evoutils/TAGS62
-rw-r--r--evolution/evoutils/__init__.py205
-rw-r--r--evolution/evoutils/calendar.py225
-rw-r--r--evolution/evoutils/composemail.py66
-rw-r--r--evolution/evoutils/mail.py263
-rw-r--r--evolution/evoutils/mailpreferences.py2
-rw-r--r--evolution/evoutils/menu_reorganization.py152
-rw-r--r--evolution/evoutils/password.py2
-rw-r--r--evolution/expunge.py4
-rw-r--r--evolution/findandreplace.py7
-rw-r--r--evolution/fltr_from_msg.py3
-rw-r--r--evolution/folderopswhenoffline.py4
-rw-r--r--evolution/folderopswhenoffline.xml12
-rw-r--r--evolution/fonts.py2
-rw-r--r--evolution/fonts_formatting.py2
-rw-r--r--evolution/fonts_test.py2
-rw-r--r--evolution/formatinhtml.py7
-rw-r--r--evolution/formatinhtml.xml5
-rw-r--r--evolution/forward-mail.py4
-rw-r--r--evolution/forwardstyle.py2
-rw-r--r--evolution/forwardstyle.xml2
-rw-r--r--evolution/gnome-background-image.pngbin0 -> 97678 bytes
-rw-r--r--evolution/gooffline.py14
-rw-r--r--evolution/goonline.py4
-rw-r--r--evolution/htmlformattingcheck.py4
-rw-r--r--evolution/imap-log.xml22
-rw-r--r--evolution/lists.py2
-rw-r--r--evolution/lists_test.py2
-rw-r--r--evolution/mail.xml173
-rw-r--r--evolution/mailaccounts.py54
-rw-r--r--evolution/mailprefs.py3
-rw-r--r--evolution/mailsearch.py219
-rw-r--r--evolution/mailtests.py321
-rw-r--r--evolution/mailtoadd.py22
-rw-r--r--evolution/mailtoadd.xml2
-rw-r--r--evolution/makedefault.py2
-rw-r--r--evolution/makedefault.xml4
-rw-r--r--evolution/mark_read.py2
-rwxr-xr-xevolution/meeting.py380
-rw-r--r--evolution/menu_reorganization.py107
-rw-r--r--evolution/modify-appointment.py2
-rw-r--r--evolution/modify-meeting.xml17
-rw-r--r--evolution/modify-recur-meeting-all.xml12
-rw-r--r--evolution/modify-recur-meeting.py12
-rw-r--r--evolution/modify-recur-meeting.xml12
-rw-r--r--evolution/modify_task.py120
-rw-r--r--evolution/modify_task.xml14
-rw-r--r--evolution/modifyallinstmeet.py14
-rw-r--r--evolution/modifycontact.py122
-rw-r--r--evolution/modifycontact.xml2
-rw-r--r--evolution/modifycontactlist.py42
-rw-r--r--evolution/modifycontactlist.xml4
-rw-r--r--evolution/modifycontactwhenoffline.py2
-rw-r--r--evolution/modifymeeting.py109
-rw-r--r--evolution/modifythisinstmeet.py37
-rw-r--r--evolution/move-to.py2
-rw-r--r--evolution/movemail.py6
-rw-r--r--evolution/movemessagewhenoffline.py2
-rw-r--r--evolution/movemessagewhenoffline.xml6
-rw-r--r--evolution/new_task.py115
-rw-r--r--evolution/new_task.xml10
-rw-r--r--evolution/newmail.py2
-rw-r--r--evolution/newmsg_fromsent.py3
-rw-r--r--evolution/offline.py204
-rw-r--r--evolution/onlybcc.py2
-rw-r--r--evolution/open_newwin.py2
-rw-r--r--evolution/openmsg_window.py3
-rw-r--r--evolution/pop-account.xml27
-rwxr-xr-xevolution/print.py2
-rw-r--r--evolution/print_preview.py2
-rw-r--r--evolution/promptwhenexpunging.py2
-rw-r--r--evolution/promptwhenexpunging.xml2
-rw-r--r--evolution/rec-all-day-event.py2
-rw-r--r--evolution/recursive-app-with-attachment.py2
-rw-r--r--evolution/redirect-mail.py3
-rw-r--r--evolution/reg-suite.xml47
-rw-r--r--evolution/removesign.py2
-rw-r--r--evolution/rename-mail-folder.py2
-rw-r--r--evolution/rename_folder.py2
-rw-r--r--evolution/reply_toall.py3
-rw-r--r--evolution/replyto.py2
-rw-r--r--evolution/restartevo.py2
-rw-r--r--evolution/save_msg.py2
-rw-r--r--evolution/saveattachmentswhenoffline.py2
-rw-r--r--evolution/saveattachmentswhenoffline.xml4
-rw-r--r--evolution/savedsearch.py4
-rw-r--r--evolution/savemail.py2
-rw-r--r--evolution/search-on-subject-sender.xml2
-rw-r--r--evolution/search.py270
-rw-r--r--evolution/searchcontact.py2
-rw-r--r--evolution/searchfolder.py4
-rw-r--r--evolution/select_all.py2
-rw-r--r--evolution/sendmailwhenoffline.py4
-rw-r--r--evolution/simplesearch.py18
-rw-r--r--evolution/spellcheck.py8
-rw-r--r--evolution/task.py132
-rw-r--r--evolution/task.xml47
-rw-r--r--evolution/temp.xml11
-rw-r--r--evolution/template.py2
-rw-r--r--evolution/test-imap.xml8
-rw-r--r--evolution/test.xml89
-rw-r--r--evolution/test_image.pngbin0 -> 56587 bytes
-rw-r--r--evolution/textformatting.py2
-rw-r--r--evolution/traverse-mail.py3
-rw-r--r--evolution/undoredo.py2
-rw-r--r--evolution/verify_readonly_tasklist.py3
-rw-r--r--evolution/work_offline.py2
192 files changed, 4474 insertions, 2955 deletions
diff --git a/evolution/Assigned_Task_modify.py b/evolution/Assigned_Task_modify.py
index 4dcfdb7..6f90e47 100644
--- a/evolution/Assigned_Task_modify.py
+++ b/evolution/Assigned_Task_modify.py
@@ -1,9 +1,10 @@
#!/usr/bin/env python
#
-# Linux Desktop Testing Project http://www.gnomebangalore.org/ldtp
+# Linux Desktop Testing Project http://ldtp.freedesktop.org
#
# Author:
# Venkateswaran S <wenkat.s@gmail.com>
+# Prashanth Mohan <prashmohan@gmail.com>
#
# Copyright 2004 Novell, Inc.
#
@@ -26,7 +27,8 @@
from ldtp import *
from ldtputils import *
-#from evoutils.Task import getrowindex
+from task import *
+from meeting import addattendees
def getrowindex(subject):
try:
noofchild=getrowcount ('frmEvolution-Tasks','tblTasks')
@@ -40,78 +42,95 @@ def getrowindex(subject):
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', 'tblTasks', old_Summary[0])
- selectmenuitem('frmEvolution-Tasks', 'mnuFile;mnuOpenTask')
- #setcontext('Assigned Task - No summary','Assigned Task - ' + old_Summary[0])
- waittillguiexist('frmAssignedTask-*')
- #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-*', 'txtDate',Due_date[0])
- settextvalue ('frmAssignedTask-*', 'txtSummary',Summary[0])
- #setcontext('Assigned Task - No summary','Assigned Task - ' + Summary[0])
- log('User data Loaded','info')
- time.sleep(2)
- if stateenabled ('frmAssignedTask-*','btnSave')==1:
- click('frmAssignedTask-*','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-*','btnClose')
- time.sleep(2)
-
- if guiexist('dlgEvolutionQuery'):
- click('dlgEvolutionQuery','btnDonotSend')
- 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)
+def modify_task():
+ """ Routine to modify a task """
+
+ # read the row index from the user and delete that particular task.
+ try:
+ log('Modify an assigned task','teststart')
+ Group, Summary, Desc, Start_date, Start_time, \
+ End_date, End_time, Time_zone, Categories, \
+ addr_book, attendee, email = read_assignedtask_data (datafilename)
+
+ selectrow ('frmEvolution-Tasks', 'tblTasks', Summary[0])
+ selectmenuitem('frmEvolution-Tasks', 'mnuFile;mnuOpenTask')
+ waittillguiexist('frmAssignedTask-*')
+ window_id = 'frmAssignedTask-*'
+ log('The window opened' ,'info')
+ except:
+ log('modify an assigned task','fail')
+ log('Modify an assigned task','testend')
+ raise LdtpExecutionError(0)
+
+ # Modifies the task according to users wish.
+ try:
+ fill_task (Group, Summary, Desc, Start_date, Start_time,
+ End_date, End_time, Time_zone, Categories,
+ window_id)
+ print 'Filled in the details'
+ time.sleep(2)
+ addattendees (attendee, email, addr_book, window_id)
+ time.sleep(2)
+ log('User data Loaded','info')
+
+ if stateenabled (window_id,'btnSave')==1:
+ click(window_id,'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(window_id,'btnClose')
+ time.sleep(2)
+
+ if guiexist('dlgEvolutionQuery'):
+ click('dlgEvolutionQuery','btnDonotSend')
+ log('Task has been modified successfully','info')
+ print 'The Assigned task has been modifed'
+
+ if selectrow('frmEvolution-Tasks','tblTasks',Summary[0]) == 1:
+ verify_task (Group, Summary, Desc, Start_date, Start_time,
+ End_date,End_time, Time_zone, Categories, window_id)
+ click (window_id,'btnClose')
+ else:
+ click (window_id,'btnClose')
+ raise LdtpExecutionError (0)
+ except:
+ log('Unable to load the user data','error')
+ log('modify an assigned task','fail')
+ log('Modify an assigned task','testend')
+ raise LdtpExecutionError(0)
+ log('modify an assigned task','pass')
+ log('modify an assigned task','testend')
+
+# #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)
+
+
+
+modify_task()
+
+
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/evolution/Assigned_Task_modify.xml b/evolution/Assigned_Task_modify.xml
index f11b492..576c469 100644
--- a/evolution/Assigned_Task_modify.xml
+++ b/evolution/Assigned_Task_modify.xml
@@ -1,7 +1,16 @@
<?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>
+ <group>Personal</group>
+ <addr_book>Personal</addr_book>
+ <summary>This is just a summary for assigned task</summary>
+ <start_date>12/12/05</start_date>
+ <start_time>01:00 AM</start_time>
+ <attendee1>cray III</attendee1>
+ <email1>cray30@gmail.com</email1>
+ <attendee2>Rave Hanker</attendee2>
+ <email2>ravehanker@gmail.com</email2>
+ <due_date>12/20/05</due_date>
+ <due_time>03:00 AM</due_time>
+ <time_zone>Asia/Calcutta</time_zone>
+ <Desc>new description</Desc>
</data>
diff --git a/evolution/New_assigned_task.py b/evolution/New_assigned_task.py
index 79b4cdf..0e50724 100644
--- a/evolution/New_assigned_task.py
+++ b/evolution/New_assigned_task.py
@@ -1,5 +1,6 @@
+#!/usr/bin/env python
#
-# Linux Desktop Testing Project http://www.gnomebangalore.org/ldtp
+# Linux Desktop Testing Project http://ldtp.freedesktop.org
#
# Author:
# Venkateswaran S <wenkat.s@gmail.com>
@@ -23,121 +24,70 @@
#
# This script will create a new assigned task.
-#!/usr/bin/env python
-
from ldtp import *
from ldtputils import *
+from task import *
+from meeting 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 """
+ try:
+ log('Create new assigned task','teststart')
+ Group, Summary, Desc, Start_date, Start_time, \
+ End_date, End_time, Time_zone, Categories, \
+ addr_book, attendee, email = read_assignedtask_data (datafilename)
+ window_id = 'frmAssignedTask-*'
+
+ selectmenuitem('frmEvolution-Tasks','mnuFile;mnuNew;mnuAssignedTask')
+ waittillguiexist('frmAssignedTask-Nosummary')
+ no_rows_b4creat = getrowcount ('frmEvolution-Tasks', 'tblTasks')
+ fill_task (Group, Summary, Desc, Start_date, Start_time,
+ End_date, End_time, Time_zone, Categories,
+ window_id)
+ print 'Filled in the details'
+ time.sleep(2)
+ addattendees (attendee, email, addr_book, window_id)
+ time.sleep(2)
+ log('User data Loaded','info')
- """ 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', 'txtDate1',Start_date[0])
- settextvalue ('frmAssignedTask-Nosummary', 'txtDate',End_date[0])
- settextvalue ('frmAssignedTask-Nosummary', 'txt8',Start_time[0])
- settextvalue ('frmAssignedTask-Nosummary', 'txt6',End_time[0])
- #settextvalue ('frmAssignedTask-Nosummary', 'txt7',Organizer[0]+ ' <'+Email[0]+'>')
- # Organizer is not text. It's a noname combo. Need file bug
- 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','fail')
+ log('Create a new assigned task','testend')
+ raise LdtpExecutionError(0)
- 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(window_id,'btnSave')
+ time.sleep(3)
+ if guiexist('dlgEvolutionQuery') == 1:
+ click('dlgEvolutionQuery','btnDonotSend')
+ log('Assigned Task Creation Completed','info')
+ print 'Task has been created'
+ except:
+ log('Unable to save the task', 'cause')
+ log('Create a new assigned task','fail')
+ 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)
+ try:
+ no_rows_aftercreat = getrowcount ('frmEvolution-Tasks', 'tblTasks')
+ if no_rows_aftercreat == no_rows_b4creat + 1 \
+ and selectrow('frmEvolution-Tasks','tblTasks',Summary[0]) == 1:
+
+ verify_task (Group, Summary, Desc, Start_date, Start_time,
+ End_date,End_time, Time_zone, Categories, window_id)
+ click (window_id,'btnClose')
+ else:
+ click (window_id,'btnClose')
+ raise LdtpExecutionError (0)
+ except:
+ log ('Verification Failed','cause')
+ log('Create a new assigned task','fail')
+ log('Create a new assigned task','testend')
+ log('Create a new assigned task','pass')
+ log('Create a new assigned task','testend')
- log('Create a new assigned task','testend')
new_task()
diff --git a/evolution/New_assigned_task.xml b/evolution/New_assigned_task.xml
index 512ec8a..0889e3d 100644
--- a/evolution/New_assigned_task.xml
+++ b/evolution/New_assigned_task.xml
@@ -1,15 +1,11 @@
<?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_date>12/12/05</start_date>
<start_time>12:00 AM</start_time>
- <due_date>12/20/2005</due_date>
+ <due_date>12/20/05</due_date>
<due_time>11:00 AM</due_time>
<time_zone>Asia/Calcutta</time_zone>
<Desc>This is a sample description</Desc>
diff --git a/evolution/README b/evolution/README
index 8df05e7..1295bcc 100644
--- a/evolution/README
+++ b/evolution/README
@@ -1,21 +1,46 @@
-Dependency
- - PyLDTP - http://gnomebangalore.org/ldtp/index.php/Main_Page
-
-All these scripts have been tested with Evolution-2.5.1 on SuSE 10.0. The data xml files
-provided for testing IMAP configured account. These scripts will execute following test cases,
- - Compose mail with/without attachment
- - Copy/Delete/Move mail
- - Forward mail mail in different styles (Attachment/Inline/Quoted)
- - Search for mail based on
- - Subject or sender contains
- - Subject contains
- - Sender contains
- - Create/Rename/Delete mail folder
- - Create vfolder from message sender/message subject
- - Creating an user account
-
-Please refer http://gnomebangalore.org/ldtp/index.php/Release_notes_for_Evolution-2.5.1_Sanity_suite
-for more details.
-
-Please do post your comments/queries to "ldtp-dev@lists.freedesktop.org".
+Requirements: Evolution 2.6.2, LDTP (>= 0.5.0)
+
+This directory contains the source code for the automation scripts for
+Evolution 2.6. The following features of Evolution are automated:
+* Mailer
+* AddressBook
+* Calendars
+* Tasks
+
+There are some pre-requisites for running the scripts:
+For Tasks:
+----------
+The ``Personal'' Task list should be present.
+
+
+For Calendars:
+--------------
+Make sure that the attendees that you have put in the
+Data XML files are indeed present in the Contacs Address Book. Currently
+there is a bug () which does not get the main evolution window the
+active status, so it might be necessary for the window to be given the
+focus (i.e. by clicking on the window) manually.
+BUGS :: http://bugzilla.gnome.org/show_bug.cgi?id=347476
+
+
+For AddressBook:
+----------------
+Make sure that you move the scroll bar once through the
+entire window i.e. such that all the contacts come into view at least
+once before you select the contacts through the script. It is unable to
+select it otherwise.
+
+
+For Mailer:
+-----------
+The Reference Images for the Image comparision tests *have* to be remade
+for your environment. They will not under most possibility match with
+your evironment.
+
+The Subject, To, From fields in some of the data fields will need to be
+modified to suit the environment of yours.
+
+Make Sure that you have 1 account configured with a saved password for
+an SMTP server (if it is used). An ``Enter Password'' dialog box will
+not be handled.
diff --git a/evolution/TAGS b/evolution/TAGS
new file mode 100644
index 0000000..e1b3540
--- /dev/null
+++ b/evolution/TAGS
@@ -0,0 +1,53 @@
+
+all-day-event.py,0
+
+appointment.py,129
+def create_appointment 6,81
+def insert_appointment 41,1670
+def verify_appointment 112,4693
+def create_all_day_event 169,7176
+
+appointment-with-attachment.py,63
+def read_data(32,1061
+def appointment_withattachment(48,1779
+
+calen.py,63
+def create_appointment 6,81
+def create_all_day_event 42,1648
+
+create_appointment.py,0
+
+create-appointment.py,0
+
+createmeeting.py,0
+
+createrecurmeet.py,0
+
+create-recursive-app.py,63
+def read_data(32,1061
+def appointment_withrecurrence(55,2199
+
+deletemessagewhenoffline.py,0
+
+deletesingleinstmeeting.py,0
+
+meeting.py,201
+def addmeeting(31,1030
+def getmeetingdata(81,3279
+def addattendees(124,5231
+def verimeetattendees(161,6789
+def verifymeeting(177,7391
+def verimeetmainwindow(209,8914
+def definemeeting(244,10835
+
+modifyallinstmeet.py,0
+
+modify-appointment.py,54
+def read_data(30,1031
+def modifyappointment(48,1929
+
+modifymeeting.py,53
+def modifymeeting(28,958
+def deletemeeting(95,4518
+
+modifythisinstmeet.py,0
diff --git a/evolution/account-setup.py b/evolution/account-setup.py
index 1075ae0..39d216c 100644
--- a/evolution/account-setup.py
+++ b/evolution/account-setup.py
@@ -1,9 +1,10 @@
#!/usr/bin/python
#
-# Linux Desktop Testing Project http://www.gnomebangalore.org/ldtp
+# Linux Desktop Testing Project http://ldtp.freedesktop.org
#
# Author:
# A. Nagappan <anagappan@novell.com>
+# Prashanth Mohan <prashmohan@gmail.com>
#
# Copyright 2004 - 2005, Novell, Inc.
#
@@ -25,24 +26,18 @@
from ldtp import *
from ldtputils import *
+from evoutils import *
from evoutils.password import *
import time
+
class EvolutionAccountSetup:
def create_new_account (self):
"""
Create a new account
This function is applicable only when already some accounts are configured
"""
- window_id = ''
- if guiexist ('frmEvolution-Mail') == 1:
- window_id = 'frmEvolution-Mail'
- elif guiexist ('frmEvolution-Calendars') == 1:
- window_id = 'frmEvolution-Calendars'
- elif guiexist ('frmEvolution-Tasks') == 1:
- window_id = 'frmEvolution-Tasks'
- elif guiexist ('frmEvolution-Contacts') == 1:
- window_id = 'frmEvolution-Contacts'
+ window_id = get_window()
if window_id != '':
selectmenuitem (window_id, 'mnuEdit;mnuPreferences')
else:
@@ -50,10 +45,10 @@ class EvolutionAccountSetup:
raise LdtpExecutionError (0)
# Wait till the gui appears
- waittillguiexist ('dlgEvolutionSettings')
+ waittillguiexist ('dlgEvolutionPreferences')
# Select mail accounts tab
- selecttab ('dlgEvolutionSettings', 'ptl0', 'Mail Accounts')
- click ('dlgEvolutionSettings', 'btnAdd')
+ selecttab ('dlgEvolutionPreferences', 'ptl0', 'Mail Accounts')
+ click ('dlgEvolutionPreferences', 'btnAdd')
def enter_identify_info (self, xmlfilename):
account_setup_xml = LdtpDataFileParser (xmlfilename)
@@ -90,27 +85,27 @@ class EvolutionAccountSetup:
log ('Forward button not enabled', 'error')
raise LdtpExecutionError (0)
- def configure_imap_receiving_mail (self, xmlfilename):
+ def configure_receiving_mail (self, xmlfilename):
receiving_mail_xml = LdtpDataFileParser (xmlfilename)
- server_name = receiving_mail_xml.gettagvalue ('imapserver')
+ server_name = receiving_mail_xml.gettagvalue ('mailserver')
if server_name != []:
settextvalue ('frmEvolutionAccountAssistant', 'txtServer', server_name[0])
else:
log ('Imap server name missing', 'error')
raise LdtpExecutionError (0)
- user_name = receiving_mail_xml.gettagvalue ('imapusername')
+ user_name = receiving_mail_xml.gettagvalue ('username')
if user_name != []:
settextvalue ('frmEvolutionAccountAssistant', 'txtUsername', user_name[0])
else:
log ('Username missing', 'error')
raise LdtpExecutionError (0)
- secure_connection = receiving_mail_xml.gettagvalue ('imapsecureconnection')
+ secure_connection = receiving_mail_xml.gettagvalue ('secureconnection')
if secure_connection != []:
comboselect ('frmEvolutionAccountAssistant', 'cboUseSecureConnection', secure_connection[0])
- password_type = receiving_mail_xml.gettagvalue ('imappasswordtype')
- if password_type != []:
- comboselect ('frmEvolutionAccountAssistant', 'cboPassword', password_type[0])
- remember_password = receiving_mail_xml.gettagvalue ('imaprememberpassword')
+ auth_type = receiving_mail_xml.gettagvalue ('authtype')
+ if auth_type != []:
+ comboselect ('frmEvolutionAccountAssistant', 'cboPassword', auth_type[0])
+ remember_password = receiving_mail_xml.gettagvalue ('rememberpassword')
if remember_password != []:
if remember_password[0] == '1':
check ('frmEvolutionAccountAssistant', 'chkRememberpassword')
@@ -124,6 +119,41 @@ class EvolutionAccountSetup:
log ('Forward button not enabled', 'error')
raise LdtpExecutionError (0)
+ def pop_receiving_options (self, xmlfilename):
+ receiving_options_xml = LdtpDataFileParser (xmlfilename)
+ check_mail = receiving_options_xml.gettagvalue ('checkmail')
+ if check_mail != []:
+ if check_mail[0] == '1':
+ check ('frmEvolutionAccountAssistant', 'chkAutomaticallycheckfornewmailevery')
+ mail_check_interval = receiving_options_xml.gettagvalue ('mailcheckinterval')
+ if mail_check_interval != []:
+ setvalue ('frmEvolutionAccountAssistant', 'sbtn0', mail_check_interval[0])
+ else:
+ uncheck ('frmEvolutionAccountAssistant', 'chkAutomaticallycheckfornewmailevery')
+
+ leave_msg = receiving_options_xml.gettagvalue ('leavemessageonserver')
+ if leave_msg != []:
+ if leave_msg[0] == '1':
+ check ('frmEvolutionAccountAssistant', 'chkLeavemessagesonserver')
+ else:
+ uncheck ('frmEvolutionAccountAssistant', 'chkLeavemessagesonserver')
+
+ time.sleep (1)
+ disable_extn = receiving_options_xml.gettagvalue ('disablesupportforextn')
+ if disable_extn != []:
+ if disable_extn[0] == '1':
+ check ('frmEvolutionAccountAssistant', 'chkDisablesupportforallPOP3extensions')
+ else:
+ uncheck ('frmEvolutionAccountAssistant', 'chkDisablesupportforallPOP3extensions')
+ time.sleep (1)
+ # click forward button to move to next page
+ if stateenabled ('frmEvolutionAccountAssistant', 'btnForward') == 1:
+ click ('frmEvolutionAccountAssistant', 'btnForward')
+ else:
+ log ('Forward button not enabled', 'error')
+ raise LdtpExecutionError (0)
+
+
def imap_receiving_options (self, xmlfilename):
receiving_options_xml = LdtpDataFileParser (xmlfilename)
check_mail = receiving_options_xml.gettagvalue ('checkmail')
@@ -144,9 +174,9 @@ class EvolutionAccountSetup:
use_custom_cmd = receiving_options_xml.gettagvalue ('usecustomcommand')
if use_custom_cmd != []:
if use_custom_cmd[0] == '1':
- check ('frmEvolutionAccountAssistant', 'chkUsecustomtoconnecttoserver')
+ check ('frmEvolutionAccountAssistant', 'chkUsecustomcommandtoconnecttoserver')
else:
- uncheck ('frmEvolutionAccountAssistant', 'chkUsecustomtoconnecttoserver')
+ uncheck ('frmEvolutionAccountAssistant', 'chkUsecustomcommandtoconnecttoserver')
custom_cmd = receiving_options_xml.gettagvalue ('customcommand')
if custom_cmd != []:
settextvalue ('frmEvolutionAccountAssistant', 'txt0', custom_cmd[0])
@@ -219,7 +249,7 @@ class EvolutionAccountSetup:
if secure_connection != []:
comboselect ('frmEvolutionAccountAssistant', 'cboUseSecureConnection1', secure_connection[0])
- password_type = sending_mail_xml.gettagvalue ('stmppasswordtype')
+ password_type = sending_mail_xml.gettagvalue ('stmpauthtype')
if password_type != []:
comboselect ('frmEvolutionAccountAssistant', 'cboType', password_type[0])
@@ -395,7 +425,7 @@ class EvolutionAccountSetup:
raise LdtpExecutionError (0)
# Script execution starts here...
-first_time_acct_setup = False
+#first_time_acct_setup = False
try:
try:
@@ -404,118 +434,117 @@ try:
AcctSetup = EvolutionAccountSetup ()
# First time account setup dialog title name is different
- setcontext ('Evolution Account Assistant', 'Evolution Setup Assistant')
- if guiexist ('frmEvolutionAccountAssistant') == 1:
- #do remap
- remap ('evolution', 'frmEvolutionAccountAssistant')
- first_time_acct_setup = True
- else:
- releasecontext ()
-
- # Needs to be done only when we have already accounts configured
- AcctSetup.create_new_account ()
- time.sleep (1)
+ #setcontext ('Evolution Account Assistant', 'Evolution Setup Assistant')
+
+# if guiexist ('frmEvolutionAccountAssistant') == 1:
+# #do remap
+# #remap ('evolution', 'frmEvolutionAccountAssistant')
+# first_time_acct_setup = True
+# else:
+# # Needs to be done only when we have already accounts configured
+ AcctSetup.create_new_account ()
+ time.sleep (1)
AcctSetup.enter_identify_info (datafilename)
time.sleep (1)
- if first_time_acct_setup == True:
- # Undo remap
- undoremap ('evolution', 'frmEvolutionAccountAssistant')
-
+ remap ('evolution','frmEvolutionAccountAssistant')
recv_type = config_acct_xml.gettagvalue ('recvservertype')
if recv_type != []:
comboselect ('frmEvolutionAccountAssistant', 'cboServerType', recv_type[0])
- if recv_type[0] == 'IMAP':
- time.sleep (2)
- # do remap
- remap ('evolution', 'frmEvolutionAccountAssistant')
- log ('Executing imap receiving mail configuration', 'info')
- AcctSetup.configure_imap_receiving_mail (datafilename)
- time.sleep (1)
+ remap ('evolution','frmEvolutionAccountAssistant')
+ #if recv_type[0] == 'IMAP' or recv_type[0] == 'POP':
+ time.sleep (2)
+ log ('Executing receiving mail configuration', 'info')
+ AcctSetup.configure_receiving_mail (datafilename)
+ time.sleep (1)
+
+ log ('Executing receiving options configuration', 'info')
+ AcctSetup.imap_receiving_options (datafilename)
+ time.sleep (1)
- log ('Executing imap receiving options configuration', 'info')
- AcctSetup.imap_receiving_options (datafilename)
- time.sleep (1)
+ # Undo remap
- # Undo remap
- undoremap ('evolution', 'frmEvolutionAccountAssistant')
- elif recv_type[0] == 'Microsoft Exchange':
- time.sleep (2)
- # do remap
- remap ('evolution', 'frmEvolutionAccountAssistant')
- log ('Executing Microsoft Exchange receiving mail configuration', 'info')
- AcctSetup.configure_exchange_receiving_mail (datafilename)
- time.sleep (1)
+# elif recv_type[0] == 'Microsoft Exchange':
+# time.sleep (2)
+# # do remap
+# remap ('evolution', 'frmEvolutionAccountAssistant')
+# log ('Executing Microsoft Exchange receiving mail configuration', 'info')
+# AcctSetup.configure_exchange_receiving_mail (datafilename)
+# time.sleep (1)
- log ('Executing Microsoft Exchange receiving options configuration', 'info')
- AcctSetup.exchange_receiving_options (datafilename)
- time.sleep (1)
+# log ('Executing Microsoft Exchange receiving options configuration', 'info')
+# AcctSetup.exchange_receiving_options (datafilename)
+# time.sleep (1)
- # Undo remap
- undoremap ('evolution', 'frmEvolutionAccountAssistant')
+# # Undo remap
+# undoremap ('evolution', 'frmEvolutionAccountAssistant')
time.sleep (1)
# do remap
remap ('evolution', 'frmEvolutionAccountAssistant')
-
send_type = config_acct_xml.gettagvalue ('sendservertype')
if send_type != []:
comboselect ('frmEvolutionAccountAssistant', 'cboServerType1', send_type[0])
if send_type[0] == 'SMTP':
AcctSetup.configure_smtp (datafilename)
time.sleep (1)
-
+
AcctSetup.set_account_name (datafilename)
time.sleep (1)
- if first_time_acct_setup == True:
- AcctSetup.select_time_zone (datafilename)
+# if first_time_acct_setup == True:
+# AcctSetup.select_time_zone (datafilename)
AcctSetup.apply_changes ()
+ waittillguinotexist ('frmEvolutionAccountAssistant')
# Undo remap
- undoremap ('evolution', 'frmEvolutionAccountAssistant')
+ #undoremap ('evolution', 'frmEvolutionAccountAssistant')
- if first_time_acct_setup == True:
- releasecontext ()
- else:
- click ('dlgEvolutionSettings', 'btnClose')
+# if first_time_acct_setup == True:
+# releasecontext ()
+# else:
+ click ('dlgEvolutionPreferences', 'btnClose')
+ waittillguinotexist ('dlgEvolutionPreferences')
except error, msg:
log ('' + str (msg), 'error')
try:
time.sleep (1)
click ('frmEvolutionAccountAssistant', 'btnCancel')
- if first_time_acct_setup == True:
- releasecontext ()
- else:
- click ('dlgEvolutionSettings', 'btnClose')
+# if first_time_acct_setup == True:
+# releasecontext ()
+# else:
+ click ('dlgEvolutionPreferences', 'btnClose')
raise LdtpExecutionError (0)
except error, msg:
log ('' + str (msg), 'error')
raise LdtpExecutionError (0)
acct_name = config_acct_xml.gettagvalue ('accountname')
- setcontext ('Enter password','Enter Password for '+acct_name[0])
- if waittillguiexist ('dlgEnterpassword')!=1:
+ click ('frmEvolution-*', 'btnSend/Receive')
+ waittillguiexist ('dlgSend&ReceiveMail')
+ passwd_dlg = '*EnterPasswordfor*'
+ if waittillguiexist (passwd_dlg)!=1:
log ('Password remainder window did not come up','warning')
#raise LdtpExecutionError (0)
else:
password = config_acct_xml.gettagvalue ('password')
if password != []:
- settextvalue ('dlgEnterpassword','txt0',password[0])
- check ('dlgEnterpassword','chkRememberthispassword')
- click ('dlgEnterpassword','btnOK')
+ settextvalue (passwd_dlg,'txt0',password[0])
+ check (passwd_dlg,'chkRememberthispassword')
+ click (passwd_dlg,'btnOK')
else:
- click ('dlgEnterpassword','btnCancel')
+ click (passwd_dlg,'btnCancel')
time.sleep (2)
- if guiexist ('dlgEnterpassword')==1:
- click ('dlgEnterpassword','btnCancel')
- releasecontext()
+ if guiexist (passwd_dlg)==1:
+ click (passwd_dlg,'btnCancel')
+
except LdtpExecutionError:
- if first_time_acct_setup == True:
- releasecontext ()
- else:
- click ('dlgEvolutionSettings', 'btnClose')
+# if first_time_acct_setup == True:
+# releasecontext ()
+# else:
+ click ('dlgEvolutionPreferences', 'btnClose')
+ waittillguinotexist ('dlgEvolutionPreferences')
log ('Account setup', 'fail')
log ('Account setup', 'testend')
raise LdtpExecutionError (0)
diff --git a/evolution/addcontact.py b/evolution/addcontact.py
index beb225a..c08ed13 100644
--- a/evolution/addcontact.py
+++ b/evolution/addcontact.py
@@ -1,6 +1,6 @@
#!/usr/bin/env python
#
-# Linux Desktop Testing Project http://www.gnomebangalore.org/ldtp
+# Linux Desktop Testing Project http://ldtp.freedesktop.org
#
# Author:
# Prashanth Mohan <prashmohan@gmail.com>
@@ -23,7 +23,18 @@
# Boston, MA 02111-1307, USA.
#
-from contact import addcontact,getcontactvals,selectPanel
+from contact import *
-selectPanel ('Contacts')
-addcontact (*getcontactvals(datafilename))
+AddrBook,FullName,Nick,WorkEmail,HomeMail,BusPhone,Yahoo,HomePage,Profession,Notes,HomeAdd,WorkAdd,OtherAdd = getcontactvals(datafilename)
+try:
+ log ('Add New Contact','teststart')
+ opennewcontact (AddrBook)
+ addcontact (AddrBook,FullName,Nick,WorkEmail,HomeMail,\
+ BusPhone,Yahoo,HomePage,Profession,Notes,\
+ HomeAdd,WorkAdd,OtherAdd)
+ log ('Add New Contact','pass')
+except:
+ log ('Add New Contact','fail')
+ log ('Add New Contact','testend')
+ raise LdtpExecutionError (0)
+log ('Add New Contact','testend')
diff --git a/evolution/addcontactlist.py b/evolution/addcontactlist.py
index 764f0ba..ceb0851 100644
--- a/evolution/addcontactlist.py
+++ b/evolution/addcontactlist.py
@@ -1,6 +1,6 @@
#!/usr/bin/env python
#
-# Linux Desktop Testing Project http://www.gnomebangalore.org/ldtp
+# Linux Desktop Testing Project http://ldtp.freedesktop.org
#
# Author:
# Prashanth Mohan <prashmohan@gmail.com>
diff --git a/evolution/addmeeting.py b/evolution/addmeeting.py
index 371921f..9423668 100644
--- a/evolution/addmeeting.py
+++ b/evolution/addmeeting.py
@@ -1,6 +1,6 @@
#!/usr/bin/env python
#
-# Linux Desktop Testing Project http://www.gnomebangalore.org/ldtp
+# Linux Desktop Testing Project http://ldtp.freedesktop.org
#
# Author:
# Prashanth Mohan <prashmohan@gmail.com>
@@ -26,47 +26,55 @@
from ldtp import *
from ldtputils import *
from contact import *
-#from calendar import *
+from evoutils.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()
+ 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
+ selectCalendarPane()
time.sleep (3)
selectmenuitem ('frmEvolution-Calendars','mnuFile;mnuNew;mnuMeeting')
- waittillguiexist ('frmMeeting-Nosummary')
+ windowname = 'frmMeeting-*'
+ waittillguiexist (windowname)
time.sleep (1)
+ menuuncheck (windowname, 'mnuOptions;mnuAllDayEvent')
+ remap ('evolution',windowname)
try:
- definemeeting (summary,location,description,from_date,to_date,from_time,to_time,calendar,classification,categories)
+ 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')
+ selectmenuitem (windowname, 'mnuOptions;mnuRecurrence')
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])
+ insert_recurrence ('dlgRecurrence',duration[0],dur_value[0],
+ dur_day[0],count[0],for_type[0],
+ no_of_times[0],exception)
except:
raise LdtpExecutionError(0)
- click ('frmMeeting-Nosummary','btnSave')
- releasecontext()
- waittillguiexist ('dlgEvolutionQuery')
- #remap ('evolution','dlgEvolutionQuery')
- click ('dlgEvolutionQuery','btnDon\'tSend')
- #undoremap ('evolution','dlgEvolutionQuery')
+ click (windowname,'btnSave')
+ if waittillguiexist ('dlgEvolutionQuery') != 0:
+ click ('dlgEvolutionQuery','btnDonotSend')
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)
+ 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:
+ log ('Verification Failed', 'cause')
+ log ('Add New Meeting','testend')
raise LdtpExecutionError (0)
log ('Add New Meeting','testend')
@@ -87,8 +95,19 @@ def getmeetingdata(datafilename):
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')
+ index = 1
+ attendee = []
+ email = []
+ while True:
+ att = data_object.gettagvalue ('attendee'+str(index))
+ em = data_object.gettagvalue ('email'+str(index))
+
+ if att == [] or em == []:
+ break
+ attendee.append (att[0])
+ email.append (em[0])
+ index += 1
+
duration = data_object.gettagvalue ('duration')
dur_value = data_object.gettagvalue ('durvalue')
dur_day = data_object.gettagvalue ('durday')
@@ -107,23 +126,25 @@ def getmeetingdata(datafilename):
def addattendees(attendee,email,addrbook):
log ('Add Attendees','teststart')
try:
- click ('frmMeeting-Nosummary','btnAttendees')
+ window_id = 'frmMeeting-*'
+ click (window_id,'btnAttendees')
waittillguiexist ('dlgRequiredParticipants')
time.sleep (1)
comboselect ('dlgRequiredParticipants','cboAddressBook',addrbook[0])
- #remap ('evolution','dlgRequiredParticipants')
- attendee=attendee[0].split (':')
- email=email[0].split (':')
+ remap ('evolution','dlgRequiredParticipants')
+ #attendee=attendee[0].split (':')
+ #email=email[0].split (':')
+ print attendee, email
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])
+ att = parsename(attendee[ind],email[ind])
print att,"Inside for loop"
if gettablerowindex ('dlgRequiredParticipants','tblRequiredParticipants',att)==-1:
print "inside if"
- selectrow ('dlgRequiredParticipants','tblContacts',att)
+ selectrowpartialmatch ('dlgRequiredParticipants','tblContacts',att)
print "row selected"
click ('dlgRequiredParticipants', 'btnAdd1')
time.sleep (1)
@@ -143,7 +164,6 @@ 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):
@@ -152,7 +172,6 @@ def verimeetattendees(attendee,email):
log ('User Not found','cause')
raise LdtpExceptionError(0)
click ('dlgRequiredParticipants', 'btnClose')
- #undoremap ('evolution','dlgRequiredParticipants')
except:
raise LdtpExecutionError (0)
@@ -163,48 +182,34 @@ def parsename (attendee,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])
+ try:
+ print from_date
+ print summary
+ except:
+ print 'from_date, summary not available'
+ selectcalevent (from_date[0],summary[0])
time.sleep (2)
selectmenuitem ('frmEvolution-Calendars','mnuFile;mnuOpenAppointment')
- setcontext ('Meeting - No summary','Meeting - '+summary[0])
+ window_id = 'frmMeeting-*'
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
+ waittillguiexist (window_id)
+ verimeetmainwindow(summary,location,description,from_date,to_date,from_time,
+ to_time,calendar,classification,categories)
#verimeetattendees (attendee,email)
- selectmenuitem ('frmMeeting-Nosummary','mnuFile;mnuClose')
+ if duration or dur_value or dur_day or count or for_type or no_of_times:
+ selectmenuitem (window_id,'mnuOptions;mnuRecurrence')
+ waittillguiexist ('dlgRecurrence')
+ verify_recurrence ('dlgRecurrence', duration, dur_value, dur_day, count,
+ for_type, no_of_times, exception)
+ waittillguinotexist ('dlgRecurrence')
+ selectmenuitem (window_id,'mnuFile;mnuClose')
except:
log ('Meeting not Verified','error')
log ('Verify Added Meeting','testend')
+ selectmenuitem (window_id,'mnuFile;mnuClose')
raise LdtpExecutionError (0)
log ('Verify Added Meeting','testend')
@@ -214,34 +219,32 @@ def verimeetmainwindow(summary,location,description,from_date,to_date,from_time,
# 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:
+ window_id = 'frmMeeting-*'
+ if verifysettext (window_id,'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:
+ if len(location)>0 and verifysettext (window_id,'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')
+ if verifysettext (window_id,'txtDescription',description[0])==0:
+ log ('Description 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:
+# 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)
+ if len(categories)>0 and verifysettext (window_id,'txtCategories',categories[0])==0:
log ('Categories not set properly','cause')
raise LdtpExecutionError(0)
- #undoremap ('evolution','frmMeeting-Nosummary')
except:
raise LdtpExecutionError(0)
@@ -250,189 +253,72 @@ def definemeeting(summary,location,description,from_date,to_date,from_time,to_ti
log ('Define meeting values','teststart')
try:
time.sleep (2)
+ window_id = 'frmMeeting-*'
try:
- #uncheck ('frmMeeting-Nosummary','mnuOptions;mnuAllDayEvent')
- comboselect ('frmMeeting-Nosummary','cboCalendar',calendar[0])
+ menuuncheck (window_id,'mnuOptions;mnuAllDayEvent')
+ comboselect (window_id,'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])
+ settextvalue (window_id,'txtSummary',summary[0])
+
print "Setting Sumary Over"
if len(location)>0:
- settextvalue ('frmMeeting-Nosummary','txtLocation',location[0])
+ settextvalue (window_id,'txtLocation',location[0])
print "Setting Location Over"
if len (description)>0:
- settextvalue ('frmMeeting-Nosummary','txtDescription',description[0])
+ settextvalue (window_id,'txtDescription',description[0])
print "Setting Desc Over"
if len(from_date)>0:
- settextvalue ('frmMeeting-Nosummary','txtDate',from_date[0])
+ settextvalue (window_id,'txtDate',from_date[0])
+ time.sleep (2)
+ if guiexist ('*Warning') == 1:
+ log ('Error in input date format','cause')
+ click ('*Warning','btnOK')
+ raise LdtpExecutionError (0)
+
print "Setting from date Over"
if len (to_date)>0:
- settextvalue ('frmMeeting-Nosummary','txtDate1',to_date[0])
+ comboselect (window_id, 'cbofor','until')
+ settextvalue (window_id,'txtDate1',to_date[0])
+ time.sleep (2)
+ if guiexist ('*Warning') == 1:
+ log ('Error in input date format','cause')
+ click ('*Warning','btnOK')
+ raise LdtpExecutionError (0)
+
print "Setting TO DATE Over"
if len(from_time)>0:
- settextvalue ('frmMeeting-Nosummary','txt3',from_time[0])
+ settextvalue (window_id,'txt3',from_time[0])
+ time.sleep (2)
+ if guiexist ('*Warning') == 1:
+ log ('Error in input date format','cause')
+ click ('*Warning','btnOK')
+ raise LdtpExecutionError (0)
+
print "Setting from time Over"
if len(to_time)>0:
- settextvalue ('frmMeeting-Nosummary','txt5',to_time[0])
+ settextvalue (window_id,'txt5',to_time[0])
+ time.sleep (2)
+ if guiexist ('*Warning') == 1:
+ log ('Error in input date format','cause')
+ click ('*Warning','btnOK')
+ raise LdtpExecutionError (0)
+
print "Setting to time Over"
try:
- #selectmenuitem ('frmMeeting-*','mnuOptions;mnuClassification;mnu'+classification[0])
+ selectmenuitem (window_id,'mnuOptions;mnuClassification;mnu'+classification[0])
print "Classification menu is special"
except:
log ('Classification incorrectly specified','cause')
raise LdtpExecutionError(0)
if len (categories)>0:
- check ('frmMeeting-*','mnuCategories')
- #remap ('evolution','frmMeeting-Nosummary')
- #settextvalue ('frmMeeting-Nosummary','txt0',categories[0])
- #undoremap ('evolution','frmMeeting-Nosummary')
+ menucheck (window_id,'mnuEdit;mnuCategories')
+ remap ('evolution',window_id)
+ settextvalue (window_id,'txtCategories',categories[0])
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
index 242b5cd..e0cea40 100644
--- a/evolution/addnewsign.py
+++ b/evolution/addnewsign.py
@@ -1,6 +1,6 @@
#!/usr/bin/env python
#
-# Linux Desktop Testing Project http://www.gnomebangalore.org/ldtp
+# Linux Desktop Testing Project http://ldtp.freedesktop.org
#
# Author:
# Prashanth Mohan <prashmohan@gmail.com>
diff --git a/evolution/addtoreplytofield.py b/evolution/addtoreplytofield.py
index 1eb31a1..38166fb 100644
--- a/evolution/addtoreplytofield.py
+++ b/evolution/addtoreplytofield.py
@@ -1,6 +1,6 @@
#!/usr/bin/env python
#
-# Linux Desktop Testing Project http://www.gnomebangalore.org/ldtp
+# Linux Desktop Testing Project http://ldtp.freedesktop.org
#
# Author:
# Prashanth Mohan <prashmohan@gmail.com>
diff --git a/evolution/advancedsearch.py b/evolution/advancedsearch.py
new file mode 100644
index 0000000..f66010d
--- /dev/null
+++ b/evolution/advancedsearch.py
@@ -0,0 +1,30 @@
+#!/usr/bin/env python
+#
+# Linux Desktop Testing Project http://ldtp.freedesktop.org
+#
+# 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 search import *
+
+data_object = LdtpDataFileParser (datafilename)
+advanced_search (data_object)
+
diff --git a/evolution/advancedsearch.xml b/evolution/advancedsearch.xml
new file mode 100644
index 0000000..e9d2bb5
--- /dev/null
+++ b/evolution/advancedsearch.xml
@@ -0,0 +1,7 @@
+<?xml version="1.0"?>
+<data>
+ <name>Advanced Search 1</name>
+ <field1>Subject</field1>
+ <query1>contains</query1>
+ <value1>Happy</value1>
+</data>
diff --git a/evolution/all-day-event-recur.py b/evolution/all-day-event-recur.py
new file mode 100644
index 0000000..f299740
--- /dev/null
+++ b/evolution/all-day-event-recur.py
@@ -0,0 +1,49 @@
+#
+# Linux Desktop Testing Project http://ldtp.freedesktop.org
+#
+# Author:
+# Venkateswaran S <wenkat.s@gmail.com>
+# 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.
+#
+
+#To create an Appointment
+from evoutils import *
+from appointment import *
+
+try:
+ log ('Create Recursive All Day Event','teststart')
+ selectCalendarPane ()
+ windowname = 'frmAppointment-*'
+ selectmenuitem ('frmEvolution-*', 'mnuFile;mnuNew;mnuAppointment')
+
+ waittillguiexist (windowname)
+ if guiexist (windowname) == 0:
+ log ('Failed to open new appointment window', 'cause')
+ raise LdtpExecutionError (0)
+
+ menucheck (windowname, 'mnuOptions;mnuAllDayEvent')
+
+ create_appointment (datafilename, 'yes')
+except:
+ log ('Create Recursive All Day Event','fail')
+ log ('Create Recursive All Day Event','testend')
+ raise LdtpExecutionError (0)
+log ('Create Recursive All Day Event','pass')
+log ('Create Recursive All Day Event','testend')
diff --git a/evolution/all-day-event-recur.xml b/evolution/all-day-event-recur.xml
new file mode 100644
index 0000000..ff98cb9
--- /dev/null
+++ b/evolution/all-day-event-recur.xml
@@ -0,0 +1,19 @@
+<?xml version="1.0"?>
+<data>
+ <summary>Recursive 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>07/12/06</from_date>
+ <to_date>07/12/06</to_date>
+ <from_time>0</from_time>
+ <to_time>0</to_time>
+ <duration>month(s)</duration>
+ <durvalue>second</durvalue>
+ <durday>Saturday</durday>
+ <fortype>for</fortype>
+ <nooftimes>12</nooftimes>
+ <exception>12/25/05</exception>
+</data>
diff --git a/evolution/all-day-event.py b/evolution/all-day-event.py
index 86ce84b..a766405 100644
--- a/evolution/all-day-event.py
+++ b/evolution/all-day-event.py
@@ -1,8 +1,9 @@
#
-# Linux Desktop Testing Project http://www.gnomebangalore.org/ldtp
+# Linux Desktop Testing Project http://ldtp.freedesktop.org
#
# Author:
# Venkateswaran S <wenkat.s@gmail.com>
+# Prashanth Mohan <prashmohan@gmail.com>
#
# Copyright 2004 Novell, Inc.
#
@@ -23,62 +24,26 @@
#
#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-*'
- 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;mnuNew;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')
-
-selectPanel ('Calendars')
-create_appoinment()
+from evoutils import *
+from appointment import *
+
+try:
+ log ('Create Non Recursive All Day Event','teststart')
+ selectCalendarPane ()
+ windowname = 'frmAppointment-*'
+ selectmenuitem ('frmEvolution-*', 'mnuFile;mnuNew;mnuAppointment')
+
+ waittillguiexist (windowname)
+ if guiexist (windowname) == 0:
+ log ('Failed to open new appointment window', 'cause')
+ raise LdtpExecutionError (0)
+
+ menucheck (windowname, 'mnuOptions;mnuAllDayEvent')
+
+ create_appointment (datafilename, 'no')
+except:
+ log ('Create Non Recursive All Day Event','fail')
+ log ('Create Non Recursive All Day Event','testend')
+ raise LdtpExecutionError (0)
+log ('Create Non Recursive All Day Event','pass')
+log ('Create Non Recursive All Day Event','testend')
diff --git a/evolution/all-day-event.xml b/evolution/all-day-event.xml
index 5eb1fd4..ffe9d7c 100644
--- a/evolution/all-day-event.xml
+++ b/evolution/all-day-event.xml
@@ -6,8 +6,8 @@
<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>
+ <from_date>07/12/06</from_date>
+ <to_date>07/12/06</to_date>
+ <from_time>0</from_time>
+ <to_time>0</to_time>
</data>
diff --git a/evolution/apply_filter.py b/evolution/apply_filter.py
index 88ff93f..b954e1b 100644
--- a/evolution/apply_filter.py
+++ b/evolution/apply_filter.py
@@ -1,5 +1,5 @@
#
-# Linux Desktop Testing Project http://www.gnomebangalore.org/ldtp
+# Linux Desktop Testing Project http://ldtp.freedesktop.org
#
# Author:
# Venkateswaran S <wenkat.s@gmail.com>
@@ -25,20 +25,20 @@
#To create a filter.
from ldtp import *
from ldtputils import *
-from create_filter import create_filter
+from create_filter 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 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():
@@ -66,6 +66,7 @@ def apply_filter(fldr,filter_on, rule_name, if_components, if_properties, if_val
log('Failure in creating a filter','error')
if selectrowpartialmatch('frmEvolution-Mail','ttblMailFolderTree',fldr) == 1:
+ waittillguiexist ('frmEvolution-'+fldr+'*')
log('fldr selected','info')
else:
log('Unable to select the given folder','error')
diff --git a/evolution/applyfilterwhenoffline.py b/evolution/applyfilterwhenoffline.py
index 3213ef7..cab4bea 100644
--- a/evolution/applyfilterwhenoffline.py
+++ b/evolution/applyfilterwhenoffline.py
@@ -1,6 +1,6 @@
#!/usr/bin/env python
#
-# Linux Desktop Testing Project http://www.gnomebangalore.org/ldtp
+# Linux Desktop Testing Project http://ldtp.freedesktop.org
#
# Author:
# Prashanth Mohan <prashmohan@gmail.com>
diff --git a/evolution/applyfilterwhenoffline.xml b/evolution/applyfilterwhenoffline.xml
index ce45b84..e694227 100644
--- a/evolution/applyfilterwhenoffline.xml
+++ b/evolution/applyfilterwhenoffline.xml
@@ -1,5 +1,5 @@
<?xml version="1.0"?>
<data>
<folder>Inbox</folder>
- <subject>asd</subject>
+ <subject>Happy New Year</subject> <!-- Make sure that a message containing the subject is present in the folder specified and that there is a filter associated with this mail's subject -->
</data>
diff --git a/evolution/appointment-with-attachment.py b/evolution/appointment-with-attachment.py
index 50ee2ef..b36cccb 100644
--- a/evolution/appointment-with-attachment.py
+++ b/evolution/appointment-with-attachment.py
@@ -1,5 +1,5 @@
#
-# Linux Desktop Testing Project http://www.gnomebangalore.org/ldtp
+# Linux Desktop Testing Project http://ldtp.freedesktop.org
#
# Author:
# Venkateswaran S <wenkat.s@gmail.com>
diff --git a/evolution/appointment.py b/evolution/appointment.py
new file mode 100644
index 0000000..89913db
--- /dev/null
+++ b/evolution/appointment.py
@@ -0,0 +1,330 @@
+#
+# Linux Desktop Testing Project http://ldtp.freedesktop.org
+#
+# Author:
+# Venkateswaran S <wenkat.s@gmail.com>
+# 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 ldtputils import *
+from evoutils import *
+from evoutils.calendar import *
+
+def create_appointment (datafilename, more_items='no'):
+ try:
+ summary, location, description, from_date, to_date, from_time, to_time, calendar, classification, categories, count, duration, no_of_times, for_type, exception, dur_value, dur_day = get_appointment_data (datafilename)
+
+ windowname = 'frmAppointment-*'
+ insert_appointment (windowname, summary, location, description,
+ from_date, from_time, to_date, to_time,
+ calendar, more_items)
+ if more_items == 'yes':
+ selectmenuitem (windowname, 'mnuOptions;mnuRecurrence')
+ waittillguiexist ('dlgRecurrence')
+ time.sleep (4)
+ insert_recurrence ('*Recurrence', duration, dur_value, dur_day, count, for_type, no_of_times, exception)
+
+ click (windowname,'btnSave')
+ try:
+ print 'starting verify... make sure evolution has focus'
+ verify_appointment (windowname, summary, location, description,
+ from_date, from_time, to_date, to_time, more_items)
+
+ if more_items == 'yes':
+ selectmenuitem (windowname, 'mnuOptions;mnuRecurrence')
+ waittillguiexist ('dlgRecurrence')
+ time.sleep (4)
+ verify_recurrence ('dlgRecurrence', duration, dur_value, dur_day, count,
+ for_type, no_of_times, exception)
+ print 'verify succeeded'
+ selectmenuitem (windowname,'mnuFile;mnuClose')
+ except:
+ log ('Verification of Appointment failed','cause')
+ selectmenuitem (windowname,'mnuFile;mnuClose')
+ raise LdtpExecutionError (0)
+ except LdtpExecutionError,msg:
+ print 'Creation of appointment failed' + str(msg)
+ raise LdtpExecutionError (0)
+
+
+def insert_appointment (windowname, summary, location, description,
+ from_date, from_time, to_date, to_time,
+ calendar, more_items_todo):
+ try:
+ time.sleep (2)
+ setandverify (windowname, 'txtSummary', 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 from_date != '0':
+ if setandverify (windowname, 'txtDate', from_date) == 0:
+ log ('Failed to set value in From date entry', 'cause')
+ raise LdtpExecutionError (0)
+
+ time.sleep (3)
+ if guiexist ('*Warning') == 1:
+ log ('Error in input date format','cause')
+ click ('*Warning','btnOK')
+ raise LdtpExecutionError (0)
+
+ if to_date != '0':
+ try:
+ comboselect (windowname, 'cbofor','until')
+ except:
+ pass
+ if setandverify (windowname, 'txtDate1', to_date) == 0:
+ log ('Failed to set value in To date entry', 'cause')
+ raise LdtpExecutionError (0)
+ time.sleep (1)
+ if guiexist ('*Warning') == 1:
+ log ('Error in input date format','cause')
+ click ('*Warning','btnOK')
+ raise LdtpExecutionError (0)
+ if str(from_time) != '0':
+ if setandverify (windowname, 'txt5', from_time) == 0:
+ log ('Failed to set value in From time entry', 'cause')
+ raise LdtpExecutionError (0)
+ time.sleep (1)
+ if guiexist ('*Warning') == 1:
+ log ('Error in input time format','cause')
+ click ('*Warning','btnOK')
+ raise LdtpExecutionError (0)
+
+ if str(to_time) != '0':
+ if setandverify (windowname, 'txt7', to_time) == 0:
+ log ('Failed to set value in to time entry', 'cause')
+ raise LdtpExecutionError (0)
+ if guiexist ('*Warning') == 1:
+ log ('Error in input time format','cause')
+ click ('*Warning','btnOK')
+ 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')
+ except error,msg:
+ print "Problem in inserting appointment tab details " + str (msg)
+ log('errorinappointmenttab','error')
+ raise LdtpExecutionError (0)
+
+
+def verify_appointment (windowname, summary, location, description,
+ from_date, from_time, to_date, to_time, more_item_to_do='no'):
+ selectcalevent (from_date, summary)
+ remap ('evolution','frmEvolution-Calendars')
+ selectmenuitem ('frmEvolution-Calendars','mnuFile;mnuOpenAppointment')
+ win_name = 'frmAppointment-*'
+ waittillguiexist (win_name)
+ if gettextvalue (win_name, 'txtSummary') != summary:
+ log ('Summary not identical','cause')
+ raise LdtpExecutionError (0)
+
+ if gettextvalue (win_name, 'txtLocation') != location:
+ log ('Location not identical','cause')
+ raise LdtpExecutionError (0)
+
+ if gettextvalue (win_name, 'txtDescription') != description:
+ log ('Description not identical','cause')
+ raise LdtpExecutionError (0)
+
+# if from_date != '0':
+# from_date = from_date.split ('/')
+# year = int ('20'+from_date[2])
+# month = int (from_date[0])
+# day = int (from_date[1])
+# date = datetime.date (year, month, day)
+# weekday = days [date.weekday()]
+# format = weekday + ' ' + from_date[1] + ' ' + months[month-1] + ' ' + str(year)
+# if gettextvalue (win_name,'txtDate').lower() != format.lower():
+# log ('From Date not identical','cause')
+# raise LdtpExecutionError (0)
+
+# if to_date != '0':
+# to_date = to_date.split ('/')
+# year = int ('20'+to_date[2])
+# month = int (to_date[0])
+# day = int (to_date[1])
+# date = datetime.date (year, month, day)
+# weekday = days [date.weekday()]
+# format = weekday + ' ' + to_date[1] + ' ' + months[month-1] + ' ' + str(year)
+# if gettextvalue (win_name,'txtDate1').lower() != format.lower():
+# log ('To Date not identical','cause')
+# raise LdtpExecutionError (0)
+
+ if from_time != '0':
+ if not gettextvalue (win_name,'txt5').startswith (from_time):
+ log ('From time not identical','cause')
+ raise LdtpExecutionError (0)
+
+ if to_time != '0':
+ if not gettextvalue (win_name,'txt7').startswith (to_time):
+ log ('From time not identical','cause')
+ raise LdtpExecutionError (0)
+ if more_item_to_do != 'yes':
+ click (win_name, 'btnClose')
+
+
+def get_appointment_data (datafilename):
+ data_object = LdtpDataFileParser (datafilename)
+ summary = data_object.gettagvalue ('summary')
+ if summary:
+ summary = summary [0]
+
+ location = data_object.gettagvalue ('location')
+ if location:
+ location = location [0]
+
+ description = data_object.gettagvalue ('description')
+ if description:
+ description = description [0]
+
+ from_date = data_object.gettagvalue ('from_date')
+ if from_date:
+ from_date = from_date [0]
+
+ to_date = data_object.gettagvalue ('to_date')
+ if to_date:
+ to_date = to_date [0]
+
+ from_time = data_object.gettagvalue ('from_time')
+ if from_time:
+ from_time = '0'
+
+ to_time = data_object.gettagvalue ('to_time')
+ if to_time:
+ to_time = '0'
+
+ calendar = data_object.gettagvalue ('calendar')
+ if calendar:
+ calendar = calendar [0]
+
+ classification = data_object.gettagvalue ('classification')
+ if classification:
+ classification = classification [0]
+
+ categories = data_object.gettagvalue ('categories')
+ if categories:
+ categories = categories [0]
+
+ count = data_object.gettagvalue ('count')
+ if count:
+ count = count [0]
+
+ duration = data_object.gettagvalue ('duration')
+ if duration:
+ duration = duration[0]
+
+ no_of_times = data_object.gettagvalue ('nooftimes')
+ if no_of_times:
+ no_of_times = no_of_times [0]
+
+ fortype = data_object.gettagvalue ('fortype')
+ if fortype:
+ fortype = fortype [0]
+
+ exception = data_object.gettagvalue ('exception')
+
+ durvalue = data_object.gettagvalue ('durvalue')
+ if durvalue:
+ durvalue = durvalue [0]
+
+ dur_day = data_object.gettagvalue ('durday')
+ if dur_day:
+ dur_day = dur_day [0]
+
+ return summary, location, description, from_date, to_date, from_time, to_time, \
+ calendar, classification, categories, count, duration, no_of_times, \
+ fortype, exception, durvalue, dur_day
+
+def modifyappointment (datafilename, occurance=0):
+ try:
+ try:
+ summary, location, description, from_date, to_date, from_time, to_time, calendar, classification, categories, count, duration, no_of_times, for_type, exception, dur_value, dur_day = get_appointment_data (datafilename)
+ windowname = 'frmAppointment-*'
+ 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')
+ raise LdtpExecutionError (0)
+ except:
+ log ('Event not available','cause')
+ raise LdtpExecutionError(0)
+ try:
+ waittillguiexist (windowname)
+ if duration or no_of_times or for_type or exception or dur_value or dur_day:
+ more_items = 'yes'
+ else:
+ more_items = 'no'
+ insert_appointment (windowname, summary, location, description,
+ from_date, from_time, to_date, to_time,
+ calendar, more_items)
+ if more_items == 'yes':
+ selectmenuitem (windowname, 'mnuOptions;mnuRecurrence')
+ waittillguiexist ('dlgRecurrence')
+ time.sleep (4)
+ insert_recurrence ('*Recurrence', duration, dur_value, dur_day, count, for_type, no_of_times, exception)
+
+ click(windowname,'btnSave')
+ time.sleep(3)
+ except:
+ log ('Error While modifying values','error')
+ raise LdtpExecutionError (0)
+ if occurance != 0 and guiexist ('dlgQuestion') == 1:
+ remap ('evolution','dlgQuestion')
+ if occurance == 1:
+ click ('dlgQuestion','rbtnThisInstanceOnly')
+ elif occurance == 2:
+ click ('dlgQuestion','rbtnAllInstances')
+ click ('dlgQuestion','btnOK')
+ time.sleep(3)
+ ## verification
+ try:
+ print 'starting verify... make sure evolution has focus'
+ verify_appointment (windowname, summary, location, description,
+ from_date, from_time, to_date, to_time, more_items)
+
+ if more_items == 'yes':
+ selectmenuitem (windowname, 'mnuOptions;mnuRecurrence')
+ waittillguiexist ('dlgRecurrence')
+ time.sleep (4)
+ verify_recurrence ('dlgRecurrence', duration, dur_value, dur_day, count,
+ for_type, no_of_times, exception)
+ print 'verify succeeded'
+ selectmenuitem (windowname,'mnuFile;mnuClose')
+ except:
+ log ('Verification Failed','cause')
+ raise LdtpExecutionError (0)
+ except:
+ log ('Could not Modify the appointment','error')
+ raise LdtpExecutionError (0)
+ log('Appointment modified','info')
+
diff --git a/evolution/backgroundimage.py b/evolution/backgroundimage.py
index be193d8..b684f5d 100644
--- a/evolution/backgroundimage.py
+++ b/evolution/backgroundimage.py
@@ -1,6 +1,6 @@
#!/usr/bin/env python
#
-# Linux Desktop Testing Project http://www.gnomebangalore.org/ldtp
+# Linux Desktop Testing Project http://ldtp.freedesktop.org
#
# Author:
# Prashanth Mohan <prashmohan@gmail.com>
diff --git a/evolution/cal.xml b/evolution/cal.xml
new file mode 100644
index 0000000..23172ba
--- /dev/null
+++ b/evolution/cal.xml
@@ -0,0 +1,83 @@
+<?xml version="1.0"?>
+<ldtp>
+ <logfileoverwrite>1</logfileoverwrite>
+ <logfile>evo-testing.xml</logfile>
+ <group>
+ <script>
+ <name>createmeeting.py</name>
+ <data>create-meeting.xml</data>
+ </script>
+ </group>
+ <group>
+ <script>
+ <name>modifymeeting.py</name>
+ <data>modify-meeting.xml</data>
+ </script>
+ </group>
+ <group>
+ <script>
+ <name>deletemeeting.py</name>
+ <data>deletemeeting.xml</data>
+ </script>
+ </group>
+ <group>
+ <script>
+ <name>createrecurmeet.py</name>
+ <data>create-meeting-recur.xml</data>
+ </script>
+ </group>
+ <group>
+ <script>
+ <name>modifythisinstmeet.py</name>
+ <data>modify-recur-meeting.xml</data>
+ </script>
+ </group>
+ <group>
+ <script>
+ <name>deletesingleinstmeeting.py</name>
+ <data>deletemeetingone.xml</data>
+ </script>
+ </group>
+ <group>
+ <script>
+ <name>createrecurmeet.py</name>
+ <data>create-meeting-recur.xml</data>
+ </script>
+ </group>
+ <group>
+ <script>
+ <name>modifyallinstmeet.py</name>
+ <data>modify-recur-meeting-all.xml</data>
+ </script>
+ </group>
+ <group>
+ <script>
+ <name>deleteallinstmeeting.py</name>
+ <data>deletemeetingall.xml</data>
+ </script>
+ </group>
+ <group>
+ <script>
+ <name>create-appointment.py</name>
+ <data>create-appointment.xml</data>
+ </script>
+ </group>
+ <group>
+ <script>
+ <name>create-recursive-app.py</name>
+ <data>create-recursive-app.xml</data>
+ </script>
+ </group>
+<group>
+ <script>
+ <name>all-day-event.py</name>
+ <data>all-day-event.xml</data>
+ </script>
+ </group>
+ <group>
+ <script>
+ <name>all-day-event-recur.py</name>
+ <data>all-day-event-recur.xml</data>
+ </script>
+ </group>
+</ldtp>
diff --git a/evolution/calen.py b/evolution/calen.py
new file mode 100644
index 0000000..fa560b9
--- /dev/null
+++ b/evolution/calen.py
@@ -0,0 +1,115 @@
+#!/usr/bin/env python
+#
+# Linux Desktop Testing Project http://ldtp.freedesktop.org
+#
+# 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.calendar import *
+from ldtputils import *
+from evoutils import *
+
+
+def create_appointment (summary, location, description, from_date, from_time,
+ to_date, to_time, calendar):
+ log ('Appointment Creation', 'teststart')
+ try:
+ selectCalendarPane()
+ windowname = 'frmAppointment-*'
+ flag = 0
+ selectmenuitem ('frmEvolution-*', 'mnuFile;mnuNew;mnuAppointment')
+ waittillguiexist (windowname)
+ if guiexist (windowname) == 0:
+ log ('Failed to open new appointment window', 'cause')
+ raise LdtpExecutionError (0)
+
+ log ('Insertion of Appointment values', 'teststart')
+ menuuncheck (windowname, 'mnuOptions;mnuAllDayEvent')
+ insert_appointment (windowname, summary, location, description,
+ from_date, from_time, to_date, to_time,
+ calendar, 'No')
+ try:
+ print 'starting verify... make sure evolution has focus'
+ verify_appointment (windowname, summary, location, description,
+ from_date, from_time, to_date, to_time)
+ print 'verify succeeded'
+ except:
+ log ('Verification of Appointment failed','cause')
+ raise LdtpExecutionError (0)
+ log ('Appointment creation succeeded', 'pass')
+ except LdtpExecutionError,msg:
+ print 'Creation of appointment failed' + str(msg)
+ log ('Appointment creation succeeded', 'fail')
+ log ('Appointment Creation', 'testend')
+ raise LdtpExecutionError (0)
+
+ log ('Appointment Creation', 'testend')
+
+
+def create_all_day_event (summary, location, description, from_date,
+ to_date, calendar):
+ log ('Create Appointment', 'teststart')
+ try:
+ windowname = 'frmAppointment-*'
+ flag = 0
+ more_items_todo = 'yes'
+ #summary, location, description, from_date, to_date, calendar = read_data()
+
+ time.sleep (2)
+ selectmenuitem ('frmEvolution-Calendars', 'mnuFile;mnuNew;mnuAppointment')
+ waittillguiexist (windowname)
+ time.sleep (2)
+
+ if guiexist (windowname) == 0:
+ log ('Failed to open new appointment window', 'cause')
+ raise LdtpExecutionError (0)
+ try:
+ menucheck (windowname, 'mnuOptions;mnuAllDayEvent')
+ from_time = '0'
+ to_time = '0'
+ except:
+ log ('unable to click the button (All Day event)','cause')
+ raise LdtpExecutionError (0)
+
+ insert_appointment (windowname, summary, location, description,
+ from_date, from_time, to_date, to_time,
+ calendar, more_items_todo)
+ time.sleep (2)
+ click(windowname,'btnSave')
+
+ print 'All Day Event has been completed'
+ try:
+ print 'starting verify... make sure evolution has focus'
+ verify_appointment (windowname, summary, location, description,
+ from_date, from_time, to_date, to_time)
+ print 'verify succeeded'
+ except:
+ log ('Verification of Event failed','cause')
+ raise LdtpExecutionError (0)
+
+ except:
+ log('unable to Create a new appoinment','error')
+ log ('Create Appointment', 'fail')
+ log ('Create Appointment', 'testend')
+ raise LdtpExecutionError (0)
+ log ('All day Appointment created','info')
+ log ('Create Appointment', 'pass')
+ log ('Create Appointment', 'testend')
diff --git a/evolution/change-view.py b/evolution/change-view.py
index c00d360..f231b56 100644
--- a/evolution/change-view.py
+++ b/evolution/change-view.py
@@ -1,5 +1,5 @@
#
-# Linux Desktop Testing Project http://www.gnomebangalore.org/ldtp
+# Linux Desktop Testing Project http://ldtp.freedesktop.org
#
# Author:
# Venkateswaran S <wenkat.s@gmail.com>
diff --git a/evolution/change_status.py b/evolution/change_status.py
index 4f38a36..faed1a0 100644
--- a/evolution/change_status.py
+++ b/evolution/change_status.py
@@ -1,5 +1,5 @@
#
-# Linux Desktop Testing Project http://www.gnomebangalore.org/ldtp
+# Linux Desktop Testing Project http://ldtp.freedesktop.org
#
# Author:
# Venkateswaran S <wenkat.s@gmail.com>
@@ -86,6 +86,7 @@ def change_status(fldr, subject, status, importance, junk_status, follow_up_flag
windowname = 'dlgFlagtoFollowUp'
#remap('evolution','frmEvolution-Mail')
if selectrowpartialmatch ('frmEvolution-*','ttblMailFolderTree',fldr) == 1:
+ waittillguiexist ('frmEvolution-'+fldr+'*')
# time.sleep(2)
log('Folder identified','info')
Row_index = getrowindex(subject)
diff --git a/evolution/changecomponent.py b/evolution/changecomponent.py
index 3f1a8a7..d7c59a8 100644
--- a/evolution/changecomponent.py
+++ b/evolution/changecomponent.py
@@ -1,3 +1,28 @@
+#!/usr/bin/env python
+#
+# Linux Desktop Testing Project http://ldtp.freedesktop.org
+#
+# 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 *
# Read input from file
diff --git a/evolution/changelanginspellcheck.py b/evolution/changelanginspellcheck.py
index 875d737..b124321 100644
--- a/evolution/changelanginspellcheck.py
+++ b/evolution/changelanginspellcheck.py
@@ -1,6 +1,6 @@
#!/usr/bin/env python
#
-# Linux Desktop Testing Project http://www.gnomebangalore.org/ldtp
+# Linux Desktop Testing Project http://ldtp.freedesktop.org
#
# Author:
# Prashanth Mohan <prashmohan@gmail.com>
diff --git a/evolution/changesentfolder.py b/evolution/changesentfolder.py
index 77d833e..11c4580 100644
--- a/evolution/changesentfolder.py
+++ b/evolution/changesentfolder.py
@@ -1,3 +1,28 @@
+#!/usr/bin/env python
+#
+# Linux Desktop Testing Project http://ldtp.freedesktop.org
+#
+# 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.mailpreferences import *
from ldtputils import *
diff --git a/evolution/checkaddbookrdonly.py b/evolution/checkaddbookrdonly.py
index 8d247a7..e35ad1a 100644
--- a/evolution/checkaddbookrdonly.py
+++ b/evolution/checkaddbookrdonly.py
@@ -1,6 +1,6 @@
#!/usr/bin/env python
#
-# Linux Desktop Testing Project http://www.gnomebangalore.org/ldtp
+# Linux Desktop Testing Project http://ldtp.freedesktop.org
#
# Author:
# Prashanth Mohan <prashmohan@gmail.com>
diff --git a/evolution/checkheaders.py b/evolution/checkheaders.py
index d0a9645..d8a9e8f 100644
--- a/evolution/checkheaders.py
+++ b/evolution/checkheaders.py
@@ -1,6 +1,6 @@
#!/usr/bin/env python
#
-# Linux Desktop Testing Project http://www.gnomebangalore.org/ldtp
+# Linux Desktop Testing Project http://ldtp.freedesktop.org
#
# Author:
# Prashanth Mohan <prashmohan@gmail.com>
diff --git a/evolution/chk_file_new.py b/evolution/chk_file_new.py
index 0a11d14..6dbf6a1 100644
--- a/evolution/chk_file_new.py
+++ b/evolution/chk_file_new.py
@@ -1,6 +1,6 @@
#!/usr/bin/env python
#
-# Linux Desktop Testing Project http://www.gnomebangalore.org/ldtp
+# Linux Desktop Testing Project http://ldtp.freedesktop.org
#
# Author:
# Venkateswaran S <wenkat.s@gmail.com>
diff --git a/evolution/closecomposewindow.py b/evolution/closecomposewindow.py
index 72a5b05..e04a931 100644
--- a/evolution/closecomposewindow.py
+++ b/evolution/closecomposewindow.py
@@ -1,6 +1,6 @@
#!/usr/bin/env python
#
-# Linux Desktop Testing Project http://www.gnomebangalore.org/ldtp
+# Linux Desktop Testing Project http://ldtp.freedesktop.org
#
# Author:
# Prashanth Mohan <prashmohan@gmail.com>
diff --git a/evolution/compose-mail-withouthtml.py b/evolution/compose-mail-withouthtml.py
index e8f7479..66f26e9 100644
--- a/evolution/compose-mail-withouthtml.py
+++ b/evolution/compose-mail-withouthtml.py
@@ -1,5 +1,28 @@
#!/usr/bin/env python
-
+#!/usr/bin/env python
+#
+# Linux Desktop Testing Project http://ldtp.freedesktop.org
+#
+# 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 *
from evoutils.composemail import *
from evoutils.mailpreferences import *
diff --git a/evolution/compose-mail.py b/evolution/compose-mail.py
index d8109fb..5c54a27 100644
--- a/evolution/compose-mail.py
+++ b/evolution/compose-mail.py
@@ -1,5 +1,5 @@
#
-# Linux Desktop Testing Project http://www.gnomebangalore.org/ldtp
+# Linux Desktop Testing Project http://ldtp.freedesktop.org
#
# Authors:
# Khasim Shaheed <khasim.shaheed@gmail.com>
@@ -29,16 +29,21 @@ from evoutils.mailpreferences import *
# Section to compose a new mail through File menu
def compose_mail (to, subject, body, cc, attachment, sentitemsfolder, refimg):
+ print to, subject, body, cc, attachment, sentitemsfolder, refimg
+ raw_input()
try:
if sentitemsfolder:
sent_folder = sentitemsfolder[0]
else:
- sent_folder = 'Sent Items'
+ sent_folder = 'Sent'
- selectrowpartialmatch ('frmEvolution-*', 'ttblMailFolderTree', sent_folder)
- time.sleep (2)
- sent_mail_count = getrowcount ('frmEvolution-*', 'ttblMessages')
+ selectrowpartialmatch ('*Evolution*', 'ttblMailFolderTree', sent_folder)
+ waittillguiexist ('frmEvolution-'+sent_folder+'*')
+ time.sleep (5)
+ sent_mail_count = getrowcount ('*Evolution*', 'ttblMessages')
compose (to, subject, body, cc, attachment)
+ print 'compose over'
+ raw_input()
if verifymailwithimage (sent_folder, sent_mail_count, refimg) == 1:
log ('Compose new message', 'pass')
else:
@@ -50,6 +55,7 @@ def compose_mail (to, subject, body, cc, attachment, sentitemsfolder, refimg):
# Reading Input from File
#to, subject, body, cc, attachment, sentitemsfolder, refimg = read_maildata (datafilename)
+datafilename = 'compose-mail.xml'
try:
data_object = LdtpDataFileParser (datafilename)
to = data_object.gettagvalue ('to')
diff --git a/evolution/compose_mail.py b/evolution/compose_mail.py
index 387e951..1fedc6c 100755
--- a/evolution/compose_mail.py
+++ b/evolution/compose_mail.py
@@ -1,5 +1,5 @@
#
-# Linux Desktop Testing Project http://www.gnomebangalore.org/ldtp
+# Linux Desktop Testing Project http://ldtp.freedesktop.org
#
# Authors:
# Khasim Shaheed <khasim.shaheed@gmail.com>
@@ -31,24 +31,19 @@ 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)
+ selectrowpartialmatch ('frmEvolution-*', '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')
+ waittillguiexist ('frmEvolution-'+sent_folder+'*')
+ sent_mail_count = getrowcount ('frmEvolution-*', 'ttblMessageList')
compose (to, subject, body, cc,bcc, attachment)
sendmail (subject)
- click ('frmEvolution-Mail', 'btnSend/Receive')
+ click ('frmEvolution-*', 'btnSend/Receive')
waittillguinotexist ('dlgSend&ReceiveMail')
- #remap ('evolution','frmEvolution-Mail')
if verifymailwithimage (sent_folder, sent_mail_count, refimg) == 1:
log ('Compose new message', 'pass')
else:
@@ -56,7 +51,7 @@ def compose_mail (to, subject, body, cc, bcc, attachment, sentitemsfolder, refim
## 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)
+ sub=getcellvalue ('frmEvolution-*','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:
@@ -82,10 +77,9 @@ def compose_mail (to, subject, body, cc, bcc, attachment, sentitemsfolder, refim
# 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)
+compose_mail (['prashmohan@gmail.com'],'test mail','This is the body of the test email','prashmohan@gmail.com','',[],'Sent','')
diff --git a/evolution/composerprefs.py b/evolution/composerprefs.py
index 691b91e..e2e6006 100644
--- a/evolution/composerprefs.py
+++ b/evolution/composerprefs.py
@@ -1,6 +1,6 @@
#!/usr/bin/env python
#
-# Linux Desktop Testing Project http://www.gnomebangalore.org/ldtp
+# Linux Desktop Testing Project http://ldtp.freedesktop.org
#
# Author:
# Prashanth Mohan <prashmohan@gmail.com>
@@ -28,11 +28,12 @@ from ldtputils import *
from mailtests import closecomposewindow
from contact import *
from evoutils.mail import *
+from evoutils import *
def addnewsignature(name,text):
- #log ('Add New Signature','teststart')
+ log ('Add New Signature','teststart')
try:
- #selectMailPane()
+ selectMailPane()
try:
selectmenuitem ('frmEvolution-*','mnuEdit;mnuPreferences')
window_id='dlgEvolutionPreferences'
@@ -40,11 +41,8 @@ def addnewsignature(name,text):
time.sleep (1)
selecttab ('dlgEvolutionPreferences', 'ptl0', 'Composer Preferences')
time.sleep (1)
- #remap ('evolution',window_id)
selecttab ('dlgEvolutionPreferences', 'ptl2','Signatures')
- #undoremap ('evolution',window_id)
time.sleep (1)
- #remap ('evolution',window_id)
click (window_id,'btnAdd2')
waittillguiexist ('frmEditsignature')
time.sleep (1)
@@ -54,27 +52,26 @@ def addnewsignature(name,text):
fillinsignaturevalues(name,text)
time.sleep (2)
#verification code
- #verifysignature (name,text)
+ # verifysignature (name,text) http://bugzilla.gnome.org/show_bug.cgi?id=324241
num=getrowcount (window_id,'tblSignatures')
- flag=0
+ flag=False
for x in range (num):
if getcellvalue (window_id,'tblSignatures',x,0) == name:
- flag=1
+ flag=True
break
- if flag==1:
- #log ('Signature added successfully','info')
+ click (window_id,'btnClose')
+ if flag==True:
+ log ('Signature added successfully','info')
return 1
else:
- #log ('Signature not added succcessfully','cause')
+ log ('Signature not added succcessfully','cause')
return 0
raise LdtpExecutionError (0)
- # except:
- #undoremap ('evolution',window_id)
except:
log ('Add New Signature failed','error')
- #log ('Add New Signature','testend')
+ log ('Add New Signature','testend')
raise LdtpExecutionError (0)
- #log ('Add New Signature','testend')
+ log ('Add New Signature','testend')
def fillinsignaturevalues (name,text):
@@ -84,6 +81,9 @@ def fillinsignaturevalues (name,text):
settextvalue (window_id,'txt1',text)
time.sleep (1)
click (window_id,'btnSaveandClose')
+ time.sleep (5)
+ if guiexist ('*EvolutionError'):
+ click ('*EvolutionError','btnOK')
waittillguinotexist (window_id)
except:
log ('Unable to fill in values for signature','cause')
@@ -111,10 +111,10 @@ def verifysignature (name,text):
raise LdtpExecutionError (0)
-def edit_signature (name,text,newname=''):
+def edit_signature (name,text,newname=''): #http://bugzilla.gnome.org/show_bug.cgi?id=324241
log ('Edit Signature','teststart')
try:
- #selectMailPane()
+ selectMailPane()
try:
selectmenuitem ('frmEvolution-*','mnuEdit;mnuPreferences')
window_id='dlgEvolutionPreferences'
@@ -122,11 +122,8 @@ def edit_signature (name,text,newname=''):
time.sleep (1)
selecttab ('dlgEvolutionPreferences', 'ptl0', 'Composer Preferences')
time.sleep (1)
- #remap ('evolution',window_id)
selecttab ('dlgEvolutionPreferences', 'ptl2','Signatures')
- #undoremap ('evolution',window_id)
time.sleep (1)
- #remap ('evolution',window_id)
try:
selectrow ('dlgEvolutionPreferences','tblSignatures',name)
except:
@@ -143,7 +140,7 @@ def edit_signature (name,text,newname=''):
name=newname
fillinsignaturevalues(name,text)
- verifysignature (name,text)
+ #verifysignature (name,text)
except:
log ('Edit Signature failed','error')
log ('Edit Signature','testend')
@@ -155,19 +152,16 @@ def edit_signature (name,text,newname=''):
def removesignature(name):
log ('Remove Signature','teststart')
try:
- #selectMailPane()
+ selectMailPane()
try:
- selectmenuitem ('frmEvolution-Mail','mnuEdit;mnuPreferences')
+ selectmenuitem ('frmEvolution-*','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:
@@ -181,13 +175,13 @@ def removesignature(name):
try:
#verification
- num=getrowcount (window_id,'tblSignatures')
- flag=0
+ 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:
+ if flag == 1:
log ('Signature not removed','cause')
raise LdtpExecutionError (0)
else:
@@ -199,15 +193,19 @@ def removesignature(name):
log ('Remove signature failed','error')
log ('Remove Signature','testend')
raise LdtpExecutionError (0)
- undoremap ('evolution',window_id)
log ('Remove Signature','testend')
+
-def format_in_HTML ():
+def format_in_HTML (to, text):
log ('format messages in HTML','teststart')
try:
- to='abc@abc.com'
- text='aaaa'
- #selectMailPane()
+ if to == [] or text == []:
+ log ('Not enough input available','cause')
+ raise LdtpExecutionError (0)
+ to = to[0]
+ text = text[0]
+ subject = 'Test for HTML formatting'
+ selectMailPane()
try:
selectmenuitem ('frmEvolution-*','mnuEdit;mnuPreferences')
window_id='dlgEvolutionPreferences'
@@ -215,8 +213,7 @@ def format_in_HTML ():
time.sleep (1)
selecttab (window_id, 'ptl0', 'Composer Preferences')
time.sleep (1)
- #remap ('evolution',window_id)
- #selecttab (window_id, 'ptl2','General')
+ selecttab (window_id, 'ptl2','General')
check (window_id,'chkFormatmessagesinHTML')
time.sleep (1)
if verifycheck (window_id,'chkFormatmessagesinHTML')==0:
@@ -227,24 +224,21 @@ def format_in_HTML ():
raise LdtpExecutionError (0)
click (window_id,'btnClose')
- #undoremap ('evolution',window_id)
- #verification
try:
selectmenuitem ('frmEvolution-*','mnuFile;mnuNew;mnuMailMessage')
waittillguiexist ('frmComposeMessage')
settextvalue ('frmComposeMessage','txtTo',to)
settextvalue ('frmComposeMessage','txt6',text)
- settextvalue ('frmComposeamessage','txtSubject','Test for HTML formatting')
- setcontext ('Compose a message','Test for HTML formatting')
- click ('frmComposeMessage','btnSend')
+ settextvalue ('frmComposeMessage','txtSubject',subject)
+ compose_window = get_mail_name (subject)
+ click (compose_window,'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)
+ closecomposewindow (0, compose_window)
except:
log ('Verification Failed','error')
raise LdtpExecutionError (0)
@@ -258,15 +252,12 @@ def format_in_HTML ():
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')
@@ -329,7 +320,7 @@ def changelanginspellcheck():
def forwardstyle(fldr,subject):
log ('Changing forward styles','teststart')
try:
- #selectMailPane()
+ selectMailPane()
try:
selectmenuitem ('frmEvolution-*','mnuEdit;mnuPreferences')
window_id='dlgEvolutionPreferences'
@@ -337,39 +328,38 @@ def forwardstyle(fldr,subject):
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
+# for combo in getobjectlist (window_id):
+# if combo in ['cboQuoted','cboAttachment','cboInline']:
+# break
- comboselect (window_id,combo,'Attachment')
+ comboselect (window_id,'cboForwardstyle','Attachment')
click (window_id,'btnClose')
time.sleep (2)
- selectrowpartialmatch ('frmEvolution-Mail','ttblMailFolderTree',fldr)
+ selectrowpartialmatch ('frmEvolution-*','ttblMailFolderTree',fldr)
+ waittillguiexist ('frmEvolution-'+fldr+'*')
time.sleep (2)
selectrow ('frmEvolution-*','ttblMessages',subject)
- setcontext ('Readonlyframe',subject)
+ message_id = get_mail_name (subject)
selectmenuitem ('frmEvolution-*','mnuMessage;mnuOpeninNewWindow')
- waittillguiexist ('frmReadonly')
+ waittillguiexist (message_id)
time.sleep (2)
- text = getsentmailtext ()
- selectmenuitem ('frmReadonly','mnuFile;mnuClose')
- waittillguinotexist ('frmReadonly')
- releasecontext ()
- click ('frmEvolution-Mail','btnForward')
- setcontext ('Compose a message','[Fwd: '+subject+']')
- waittillguiexist ('frmComposeMessage')
+ text = getsentmailtext (message_id)
+ print text
+ selectmenuitem (message_id,'mnuFile;mnuClose')
+ waittillguinotexist (message_id)
+ click ('frmEvolution-*','btnForward')
+ message_id = get_mail_name('[Fwd: '+subject+']')
+ waittillguiexist (message_id)
time.sleep (2)
- fwdtext=getmailtext ()
+ fwdtext = getmailtext (message_id)
if fwdtext == '':
log ('Forward style - Attachment works fine','info')
else:
log ('Forward style - Attachment not proper','cause')
raise LdtpExecutionError (0)
- selectmenuitem ('frmComposeMessage','mnuFile;mnuClose')
- waittillguinotexist ('frmComposeMessage')
- #undoremap ('evolution',window_id)
+ selectmenuitem (message_id,'mnuFile;mnuClose')
+ waittillguinotexist (message_id)
except:
log ('Forward style Attachment failed','error')
raise LdtpExecutionError (0)
@@ -378,47 +368,34 @@ def forwardstyle(fldr,subject):
selectmenuitem ('frmEvolution-*','mnuEdit;mnuPreferences')
window_id='dlgEvolutionPreferences'
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
+# for combo in getobjectlist (window_id):
+# if combo in ['cboQuoted','cboAttachment','cboInline']:
+# break
- comboselect (window_id,combo,'Inline')
+ comboselect (window_id,'cboForwardstyle','Inline')
click (window_id,'btnClose')
click ('frmEvolution-*','btnForward')
- waittillguiexist ('frmComposeMessage')
+ waittillguiexist (message_id)
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)
+ fwdtext = getmailtext (message_id)
+ print 'FWD TEXT: ',fwdtext,'TEXT: ',text
+ fwdtext.find (text)
+ if not fwdtext.startswith ('-------- Forwarded Message --------'):
+ 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 ('frmComposeMessage','mnuFile;mnuClose')
- waittillguinotexist ('frmComposeMessage')
- releasecontext()
- #undoremap ('evolution',window_id)
+ selectmenuitem (message_id,'mnuFile;mnuClose')
+ waittillguinotexist (message_id)
except:
log ('Forward style Inline failed','error')
raise LdtpExecutionError (0)
-
except:
log ('Attachement style selection failed','error')
log ('Changing forward styles','testend')
@@ -437,7 +414,6 @@ def prompt_for_empty_subject(to):
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:
@@ -445,7 +421,6 @@ def prompt_for_empty_subject(to):
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)
@@ -458,10 +433,9 @@ def prompt_for_empty_subject(to):
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')
+ waittillguinotexist ('frmComposeMessage')
except:
log ('Prompting for empty subject line failed for verification','cause')
raise LdtpExecutionError (0)
@@ -477,8 +451,8 @@ def prompt_for_only_bcc (to):
try:
#selectMailPane()
try:
- selectmenuitem ('frmEvolution-Mail','mnuEdit;mnuPreferences')
- window_id='dlgEvolutionSettings'
+ selectmenuitem ('frmEvolution-*','mnuEdit;mnuPreferences')
+ window_id='dlgEvolutionPreferences'
waittillguiexist (window_id)
time.sleep (1)
selecttab (window_id, 'ptl0', 'Composer Preferences')
@@ -491,25 +465,25 @@ def prompt_for_only_bcc (to):
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')
+ selectmenuitem ('frmEvolution-*','mnuFile;mnuNew;mnuMailMessage')
+ compose_id = 'frmComposeMessage'
+ waittillguiexist (compose_id)
+ settextvalue (compose_id,'txtBcc',to)
+ settextvalue (compose_id,'txtSubject','Test for prompt for only bcc recepients')
+ #setcontext ('Compose a message','Test for prompt for only bcc recepients')
+ compose_id = get_mail_name ('Test for prompt for only bcc recepients')
+ click (compose_id,'btnSend')
+ time.sleep (5)
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)
@@ -526,41 +500,40 @@ def prompt_when_expunging(fldr):
try:
#selectMailPane()
try:
- selectmenuitem ('frmEvolution-Mail','mnuEdit;mnuPreferences')
- window_id='dlgEvolutionSettings'
+ selectmenuitem ('frmEvolution-*','mnuEdit;mnuPreferences')
+ window_id='dlgEvolutionPreferences'
waittillguiexist (window_id)
time.sleep (1)
selecttab (window_id, 'ptl0', 'Mail Preferences')
time.sleep (1)
- remap ('evolution',window_id)
+ #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)
+ selectrowpartialmatch ('frmEvolution-*','ttblMailFolderTree',fldr)
+ waittillguiexist ('frmEvolution-'+fldr+'*')
time.sleep (1)
- selectmenuitem ('frmEvolution-Mail','mnuFolder;mnuExpunge')
+ selectmenuitem ('frmEvolution-*','mnuFolder;mnuExpunge')
if waittillguiexist ('dlgEvolutionQuery') == 0:
log ('Prompt did not show','cause')
raise LdtpExecutionError (0)
remap ('evolution','dlgEvolutionQuery')
- click ('dlgEvolutionQuery','btnExpunge')
+ click ('dlgEvolutionQuery','btnCancel')
except:
raise LdtpExecutionError (0)
#verification for expunging
- if getrowcount ('frmEvolution-Mail','ttblMessageList') != 0:
- log ('Expunging failed','cause')
- raise LdtpExecutionError (0)
+# if getrowcount ('frmEvolution-*','ttblMessageList') != 0:
+# log ('Expunging failed','cause')
+# raise LdtpExecutionError (0)
except:
log ('Enabling prompt while expunging failed','error')
diff --git a/evolution/contact.py b/evolution/contact.py
index 93a75fe..644e22b 100644
--- a/evolution/contact.py
+++ b/evolution/contact.py
@@ -1,6 +1,6 @@
#!/usr/bin/env python
#
-# Linux Desktop Testing Project http://www.gnomebangalore.org/ldtp
+# Linux Desktop Testing Project http://ldtp.freedesktop.org
#
# Author:
# Prashanth Mohan <prashmohan@gmail.com>
@@ -25,33 +25,31 @@
from ldtp import *
from ldtputils import *
+from evoutils.mail import *
+from evoutils import *
-def deletecontact(name):
- log ('Deleting a contact','teststart')
+def deletecontact(name, contactlist=False):
try:
- selectcontact (titleappend(name)[1:])
- selectmenuitem ('frmEvolution-Contacts','mnuEdit;mnuDelete')
+ if contactlist == False:
+ selectcontact (titleappend(name)[1:])
+ else:
+ selectcontact (name)
+ selectmenuitem ('frmEvolution-Contacts','mnuEdit;mnuDeleteContact')
waittillguiexist ('dlgQuestion')
- time.sleep (2)
click ('dlgQuestion','btnDelete')
+ waittillguinotexist ('dlgQuestion')
+ try:
+ if contactlist == False:
+ selectcontact (titleappend(name)[1:])
+ else:
+ selectcontact (name)
+ except:
+ return
+ raise LdtpExecutionError(0)
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"""
@@ -78,93 +76,6 @@ def getcontactvals(datafilename):
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()
- window_id = 'frmEvolution-*'
- print "after getcurinwdow"
- click (window_id,'tbtnMail')
- waittillguiexist ('frmEvolution-*')
- 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 selectPanel(components='Mail'):
"""Selects Pane in Evolution"""
@@ -180,92 +91,29 @@ def selectPanel(components='Mail'):
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')
+ if name:
+ selectrow ('frmEvolution-Contacts','ttblContactSourceSelector',name)
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')
- print "HERE"
- print getobjectlist ('frmEvolution-Contacts')
- print "AFTER"
+ 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 (' ')
@@ -282,9 +130,6 @@ def titleappend(name):
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')
@@ -293,17 +138,10 @@ def getmodifiedvals(datafilename):
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=[]
@@ -320,14 +158,11 @@ def getcontactlistvals(datafilename):
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=[]
@@ -354,120 +189,100 @@ def getmodlistvals(datafilename):
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')
+ waittillguiexist ('*'+ListName[0]+'*')
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)
+ 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')
+def opennewcontact (AddrBook=[]):
#OPEN CONTACT EDITOR
try:
- #=getcontactvals(datafilename)
selectContactPane()
- selectaddrbook (AddrBook[0])
+ if AddrBook:
+ selectaddrbook (AddrBook[0])
selectmenuitem ('frmEvolution-Contacts','mnuFile;mnuNew;mnuContact')
time.sleep(2)
- waittillguiexist ('dlgContactEditor')
+ waittillguiexist ('*ContactEditor*')
except:
log ('Could Not select Contacts Button','error')
- log ('Add New Contact','testend')
raise LdtpExecutionError(0)
+
+def addcontact(AddrBook,FullName,Nick,WorkEmail,HomeMail,BusPhone,Yahoo,HomePage,Profession,Notes,HomeAdd,WorkAdd,OtherAdd):
+ """ Adds a new contact to evolution"""
#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]))
+ selecttab ('*ContactEditor*','ptl0','Contact')
+ settextvalue ('*ContactEditor*','txtFullName', FullName[0])
if len(Nick)>0:
- settextvalue ('dlgContactEditor','txtNickname',Nick[0])
+ settextvalue ('*ContactEditor*','txtNickname',Nick[0])
if len(WorkEmail)>0:
- settextvalue ('dlgContactEditor','txtWork',WorkEmail[0])
+ settextvalue ('*ContactEditor*','txtWork',WorkEmail[0])
if len(HomeMail)>0:
- settextvalue ('dlgContactEditor','txtHome',HomeMail[0])
+ settextvalue ('*ContactEditor*','txtHome',HomeMail[0])
if len(BusPhone)>0:
- settextvalue ('dlgContactEditor','txtBusinessPhone',BusPhone[0])
+ settextvalue ('*ContactEditor*','txtBusinessPhone',BusPhone[0])
#print "YAHOO[0]",Yahoo[0]
if len(Yahoo)>0:
print "INSIDE"
- settextvalue ('dlgContactEditor','txtYahoo',Yahoo[0])
+ settextvalue ('*ContactEditor*','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')
+ selecttab ('*ContactEditor*','ptl0','Personal Information')
time.sleep(1)
if len(HomePage)>0:
- settextvalue ('dlgContactEditor','txtHomePage',HomePage[0])
+ settextvalue ('*ContactEditor*','txtHomePage',HomePage[0])
if len(Profession)>0:
- settextvalue ('dlgContactEditor','txtProfession',Profession[0])
+ settextvalue ('*ContactEditor*','txtProfession',Profession[0])
if len(Notes)>0:
- settextvalue ('dlgContactEditor','txtNotes',Notes[0])
+ settextvalue ('*ContactEditor*','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')
+ selecttab ('*ContactEditor*','ptl0','Mailing Address')
time.sleep(1)
if len(HomeAdd)>0:
- settextvalue ('dlgContactEditor','txtAddress',HomeAdd[0])
+ settextvalue ('*ContactEditor*','txtAddress',HomeAdd[0])
if len(WorkAdd)>0:
- settextvalue ('dlgContactEditor','txtAddress1',WorkAdd[0])
+ settextvalue ('*ContactEditor*','txtAddress1',WorkAdd[0])
if len(OtherAdd)>0:
- settextvalue ('dlgContactEditor','txtAddress2',OtherAdd[0])
+ settextvalue ('*ContactEditor*','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')
+ click ('*ContactEditor*','btnOK')
time.sleep (5)
if guiexist ('dlgDuplicateContactDetected')==1:
log ('contact already exists','info')
@@ -477,69 +292,60 @@ def addcontact(AddrBook,FullName,Nick,WorkEmail,HomeMail,BusPhone,Yahoo,HomePage
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')
+ title='*ContactEditor*-'+titleappend(FullName[0]).replace(' ','')
+ waittillguiexist ('*ContactEditor*')
time.sleep(2)
- if gettextvalue ('dlgContactEditor','txtFullName')!=FullName[0]:
+ if gettextvalue ('*ContactEditor*','txtFullName')!=FullName[0]:
log ('Full Name does not match','info')
raise LdtpExecutionError(0)
- if len(Nick)>0 and gettextvalue ('dlgContactEditor','txtNickname')!=Nick[0]:
+ if len(Nick)>0 and gettextvalue ('*ContactEditor*','txtNickname')!=Nick[0]:
log ('Nick Name matches','info')
raise LdtpExecutionError(0)
- if len (WorkEmail)>0 and gettextvalue ('dlgContactEditor','txtWork')!=WorkEmail[0]:
+ if len (WorkEmail)>0 and gettextvalue ('*ContactEditor*','txtWork')!=WorkEmail[0]:
log ('Work Email matches','info')
raise LdtpExecutionError(0)
- if len(HomeMail)>0 and gettextvalue ('dlgContactEditor','txtHome')!=HomeMail[0]:
+ if len(HomeMail)>0 and gettextvalue ('*ContactEditor*','txtHome')!=HomeMail[0]:
log ('Home Email matches','info')
raise LdtpExecutionError(0)
- if len(BusPhone)>0 and gettextvalue ('dlgContactEditor','txtBusinessPhone')!=BusPhone[0]:
+ if len(BusPhone)>0 and gettextvalue ('*ContactEditor*','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]:
+ if len (Yahoo)>0 and gettextvalue ('*ContactEditor*','txtYahoo')!=Yahoo[0]:
log ('Yahoo ID matches','info')
raise LdtpExecutionError(0)
- if len(HomePage)>0 and gettextvalue ('dlgContactEditor','txtHomePage')!=HomePage[0]:
+ if len(HomePage)>0 and gettextvalue ('*ContactEditor*','txtHomePage')!=HomePage[0]:
log ('Home Page matches','info')
raise LdtpExecutionError(0)
- if len( Profession)>0 and gettextvalue ('dlgContactEditor','txtProfession')!=Profession[0]:
+ if len( Profession)>0 and gettextvalue ('*ContactEditor*','txtProfession')!=Profession[0]:
log ('Profession matches','info')
raise LdtpExecutionError(0)
- if len(Notes)>0 and gettextvalue ('dlgContactEditor','txtNotes')!=Notes[0]:
+ if len(Notes)>0 and gettextvalue ('*ContactEditor*','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')
+ homeaddress=gettextvalue ('*ContactEditor*','txtAddress')
+ if len(HomeAdd)>0 and gettextvalue ('*ContactEditor*','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 ('*ContactEditor*','txtAddress1')!=WorkAdd[0]:
+ log ('Work Address matches','info')
+ raise LdtpExecutionError(0)
+ if len(OtherAdd)>0 and gettextvalue ('*ContactEditor*','txtAddress2')!=OtherAdd[0]:
+ log ('Other Address matches','info')
+ raise LdtpExecutionError(0)
+ click ('*ContactEditor*','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/contacts.xml b/evolution/contacts.xml
index 9f32592..2e921fc 100644
--- a/evolution/contacts.xml
+++ b/evolution/contacts.xml
@@ -2,7 +2,6 @@
<ldtp>
<logfileoverwrite>1</logfileoverwrite>
<logfile>evo-testing.xml</logfile>
- <appmapfile>evolution.map</appmapfile>
<group>
<script>
<name>addcontact.py</name>
@@ -17,12 +16,6 @@
</group>
<group>
<script>
- <name>searchcontact.py</name>
- <data>searchcontact.xml</data>
- </script>
- </group>
- <group>
- <script>
<name>deletecontact.py</name>
<data>deletecontact.xml</data>
</script>
diff --git a/evolution/copy-to.py b/evolution/copy-to.py
index db01ad1..a4cba90 100644
--- a/evolution/copy-to.py
+++ b/evolution/copy-to.py
@@ -1,5 +1,5 @@
#
-# Linux Desktop Testing Project http://www.gnomebangalore.org/ldtp
+# Linux Desktop Testing Project http://ldtp.freedesktop.org
#
# Author:
# Venkateswaran S <wenkat.s@gmail.com>
diff --git a/evolution/copymail.py b/evolution/copymail.py
index 6d314ed..04e269a 100644
--- a/evolution/copymail.py
+++ b/evolution/copymail.py
@@ -1,6 +1,6 @@
#!/usr/bin/python
#
-# Linux Desktop Testing Project http://www.gnomebangalore.org/ldtp
+# Linux Desktop Testing Project http://ldtp.freedesktop.org
#
# Authors:
# Nagashree <mnagashree@novell.com>
@@ -35,9 +35,11 @@ from evoutils.mail import *
def copy_mail (from_fldr, to_fldr, mail_index):
try:
selectrowpartialmatch ('frmEvolution-*', 'ttblMailFolderTree', to_fldr)
+ waittillguiexist ('frmEvolution-'+to_fldr+'*')
time.sleep (2)
row_before = getrowcount('frmEvolution-*', 'ttblMessages')
selectrowpartialmatch ('frmEvolution-*', 'ttblMailFolderTree', from_fldr)
+ waittillguiexist ('frmEvolution-'+from_fldr+'*')
time.sleep (2)
rowcount = getrowcount('frmEvolution-*', 'ttblMessages')
if rowcount > 0:
@@ -61,9 +63,11 @@ def copy_mail (from_fldr, to_fldr, mail_index):
else:
# TODO: Copying a duplicate message has to be handled
selectrowpartialmatch ('frmEvolution-*', 'ttblMailFolderTree', to_fldr)
+ waittillguiexist ('frmEvolution-'+to_fldr+'*')
time.sleep (2)
row_after = getrowcount('frmEvolution-*', 'ttblMessages')
selectrowpartialmatch ('frmEvolution-*', 'ttblMailFolderTree', from_fldr)
+ waittillguiexist ('frmEvolution-'+from_fldr+'*')
time.sleep (2)
rowcount_after_copy = getrowcount('frmEvolution-*', 'ttblMessages')
if row_after == (row_before+1) and rowcount == rowcount_after_copy:
diff --git a/evolution/copymessagewhenoffline.py b/evolution/copymessagewhenoffline.py
index a4cbe9a..10506fe 100644
--- a/evolution/copymessagewhenoffline.py
+++ b/evolution/copymessagewhenoffline.py
@@ -1,6 +1,6 @@
#!/usr/bin/env python
#
-# Linux Desktop Testing Project http://www.gnomebangalore.org/ldtp
+# Linux Desktop Testing Project http://ldtp.freedesktop.org
#
# Author:
# Prashanth Mohan <prashmohan@gmail.com>
@@ -34,7 +34,7 @@ try:
log ('Error while reading values for copy message test','cause')
raise LdtpExecutionError (0)
try:
- #go_offline ()
+ go_offline ()
copymessage (from_folder[0],to_folder[0],subject[0])
except:
log ('copy message when offline test failed','error')
diff --git a/evolution/cr_task_list.py b/evolution/cr_task_list.py
index ab8c6bc..91077e5 100644
--- a/evolution/cr_task_list.py
+++ b/evolution/cr_task_list.py
@@ -1,6 +1,6 @@
#!/usr/bin/env python
#
-# Linux Desktop Testing Project http://www.gnomebangalore.org/ldtp
+# Linux Desktop Testing Project http://ldtp.freedesktop.org
#
# Author:
# Venkateswaran S <wenkat.s@gmail.com>
@@ -32,42 +32,39 @@ def read_data ():
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):
+ return Type, Name, Color
+def create_tasklist(Type, Name, Color):
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')
+ settextvalue ('dlgTaskListProperties', 'txtName', Name[0])
+ for obj in getobjectlist ('dlgTaskListProperties'):
+ if obj.startswith ('cbo'):
+ type_obj = obj
+ break
+ comboselect ('dlgTaskListProperties', type_obj, Type[0])
+# 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])
+ waittillguiexist('*Pickacolor')
+ settextvalue ('*Pickacolor', 'txtColorName', Color[0])
time.sleep(2)
- click('uknPickacolor','btnOK')
- settextvalue ('dlgTaskListProperties', 'txtName', Name[0])
- time.sleep(3)
+ click('*Pickacolor','btnOK')
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)
@@ -79,15 +76,23 @@ def create_tasklist(Type, Name, Color, Default):
else:
print 'The task list already exists'
click('dlgTaskListProperties','btnCancel')
- log('The required task list cannot be created','error')
+ 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)
+ try:
+ selectrow ('frmEvolution-Tasks','ttblTaskSourceSelector',Name[0])
+ try:
+ selectrow ('frmEvolution-Tasks','ttblTaskSourceSelector',
+ 'Personal')
+ except:
+ pass
- #undoremap('evolution','frmEvolution-Tasks')
+ except:
+ log ('Task List not created','cause')
+ raise LdtpExecutionError (0)
log('create a task list','testend')
-Type, Name, Color, Default = read_data()
-create_tasklist(Type, Name, Color, Default)
+Type, Name, Color = read_data()
+create_tasklist(Type, Name, Color)
diff --git a/evolution/create-appointment.py b/evolution/create-appointment.py
index 5200653..8e508b2 100644
--- a/evolution/create-appointment.py
+++ b/evolution/create-appointment.py
@@ -1,8 +1,9 @@
+
#
-# Linux Desktop Testing Project http://www.gnomebangalore.org/ldtp
+# Linux Desktop Testing Project http://ldtp.freedesktop.org
#
# Author:
-# Prem <jpremkumar@novell.com>
+# Prashanth Mohan <prashmohan@gmail.com>
#
# Copyright 2004 Novell, Inc.
#
@@ -23,84 +24,29 @@
#
#To create an Appointment
-from evoutils.calendar import *
-from ldtputils import *
-
-#Initialising XML parser with data file
-data_object = LdtpDataFileParser (datafilename)
+from evoutils import *
+from appointment import *
-#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:
+ log ('Create Non Recursive Appointment','teststart')
+ selectCalendarPane ()
windowname = 'frmAppointment-*'
- ptlistname = 'ptl0'
- flag = 0
- #selectmenuitem ('frmEvolution-Calendars', 'mnuView;mnuWindow;mnuCalendars')
- selectmenuitem ('frmEvolution-*', 'mnuFile;mnuFile;mnuAppointment')
- time.sleep(2)
- #click ('frmEvolution-Calendars', 'btnNew')
+ selectmenuitem ('frmEvolution-*', 'mnuFile;mnuNew;mnuAppointment')
+
waittillguiexist (windowname)
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)
- i = insert_appointment (windowname, summary, location, description, from_date, from_time, to_date, to_time, calendar, 'No')
- 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,msg:
- #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')
+
+ menuuncheck (windowname, 'mnuOptions;mnuAllDayEvent')
+
+ create_appointment (datafilename, 'no')
+except:
+ log ('Create Non Recursive Appointment','fail')
+ log ('Create Non Recursive Appointment','testend')
raise LdtpExecutionError (0)
+log ('Create Non Recursive Appointment','pass')
+log ('Create Non Recursive Appointment','testend')
-log ('Appointment Creation', 'testend')
diff --git a/evolution/create-appointment.xml b/evolution/create-appointment.xml
index a9283ff..5b8f0fe 100644
--- a/evolution/create-appointment.xml
+++ b/evolution/create-appointment.xml
@@ -1,13 +1,13 @@
<?xml version="1.0"?>
<data>
- <summary>new summary</summary>
+ <summary>Non Recursive Appointment</summary>
<location>Conference room</location>
<description>A new appointment for testing appointment creation</description>
<classification>Confidential</classification>
- <calendar>personal</calendar>
+ <calendar>Personal</calendar>
<categories>Business</categories>
- <from_date>09/24/2005</from_date>
- <to_date>09/24/2005</to_date>
+ <from_date>07/12/06</from_date>
+ <to_date>07/12/06</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
index 464ea24..6a430d0 100644
--- a/evolution/create-folder.py
+++ b/evolution/create-folder.py
@@ -1,5 +1,5 @@
#
-# Linux Desktop Testing Project http://www.gnomebangalore.org/ldtp
+# Linux Desktop Testing Project http://ldtp.freedesktop.org
#
# Author:
# Venkateswaran S <wenkat.s@gmail.com>
diff --git a/evolution/create-mail-folder.py b/evolution/create-mail-folder.py
index 423766d..e5624bd 100644
--- a/evolution/create-mail-folder.py
+++ b/evolution/create-mail-folder.py
@@ -1,6 +1,6 @@
#!/usr/bin/python
#
-# Linux Desktop Testing Project http://www.gnomebangalore.org/ldtp
+# Linux Desktop Testing Project http://ldtp.freedesktop.org
#
# Author:
# Khasim Shaheed <khasim.shaheed@gmail.com>
@@ -39,6 +39,7 @@ def create_mail_folder (parent, folder_name):
return
else:
selectrowpartialmatch ('frmEvolution-*', 'ttblMailFolderTree', parent)
+ waittillguiexist ('frmEvolution-'+parent+'*')
selectmenuitem ('frmEvolution-*', 'mnuFile;mnuNew;mnuMailFolder')
if waittillguiexist ('dlgCreatefolder') == 0:
diff --git a/evolution/create-meeting-recur.xml b/evolution/create-meeting-recur.xml
index c29be08..a7deb1f 100644
--- a/evolution/create-meeting-recur.xml
+++ b/evolution/create-meeting-recur.xml
@@ -1,21 +1,21 @@
<?xml version="1.0"?>
<data>
<addrbook>Personal</addrbook>
- <summary>dddd</summary>
+ <summary>Recursive Meeting</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>
+ <from_date>07/13/06</from_date>
+ <to_date>07/26/06</to_date>
<attendee>asd asda</attendee>
<email>asd@asdfa.com</email>
- <exception>10/28/2005</exception>
+ <exception>10/28/06</exception>
<duration>month(s)</duration>
<durvalue>second</durvalue>
<durday>Saturday</durday>
<count>5</count>
<fortype>until</fortype>
- <nooftimes>12/12/05</nooftimes>
+ <nooftimes>13/08/06</nooftimes>
</data>
diff --git a/evolution/create-meeting.xml b/evolution/create-meeting.xml
index a41ffdf..c31db38 100644
--- a/evolution/create-meeting.xml
+++ b/evolution/create-meeting.xml
@@ -1,20 +1,18 @@
<?xml version="1.0"?>
<data>
<addrbook>Personal</addrbook>
- <summary>new summary</summary>
+ <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>
+ <from_date>07/15/06</from_date>
+ <to_date>07/15/06</to_date>
+ <attendee1>cray III</attendee1>
+ <email1>cray30@gmail.com</email1>
+ <attendee2>Rave Hanker</attendee2>
+ <email2>ravehanker@gmail.com</email2>
+ <attendee3>sankar</attendee3>
+ <email3>sankar_16@yahoo.com</email3>
</data>
diff --git a/evolution/create-recursive-app.py b/evolution/create-recursive-app.py
index 61b1479..804e19c 100644
--- a/evolution/create-recursive-app.py
+++ b/evolution/create-recursive-app.py
@@ -1,8 +1,8 @@
#
-# Linux Desktop Testing Project http://www.gnomebangalore.org/ldtp
+# Linux Desktop Testing Project http://ldtp.freedesktop.org
#
# Author:
-# Venkateswaran S <wenkat.s@gmail.com>
+# Prashanth Mohan <prashmohan@gmail.com>
#
# Copyright 2004 Novell, Inc.
#
@@ -25,71 +25,26 @@
# To create an appoinment with attachment.
#from create-appointment import *
-from evoutils.calendar import *
-from ldtp import *
-from ldtputils import *
+from evoutils import *
+from appointment 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
+try:
+ log ('Create Recursive Appointment','teststart')
+ selectCalendarPane ()
+ windowname = 'frmAppointment-*'
+ selectmenuitem ('frmEvolution-*', 'mnuFile;mnuNew;mnuAppointment')
-def appointment_withrecurrence():
+ waittillguiexist (windowname)
+ if guiexist (windowname) == 0:
+ log ('Failed to open new appointment window', 'cause')
+ raise LdtpExecutionError (0)
- 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()
+ menuuncheck (windowname, 'mnuOptions;mnuAllDayEvent')
+ create_appointment (datafilename, 'yes')
+except:
+ log ('Create Recursive Appointment','fail')
+ log ('Create Recursive Appointment','testend')
+ raise LdtpExecutionError (0)
+log ('Create Recursive Appointment','pass')
+log ('Create Recursive Appointment','testend')
diff --git a/evolution/create-recursive-app.xml b/evolution/create-recursive-app.xml
index 4af0442..9222205 100644
--- a/evolution/create-recursive-app.xml
+++ b/evolution/create-recursive-app.xml
@@ -1,18 +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>
+ <description>A new appointment for testing appointment creation</description>
<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>
+ <count>3</count>
+ <duration>month(s)</duration>
+ <durvalue>second</durvalue>
+ <durday>Saturday</durday>
+ <fortype>for</fortype>
+ <nooftimes>12</nooftimes>
+ <exception>12/25/05</exception>
+ <calendar>Personal</calendar>
+ <from_date>07/12/06</from_date>
+ <to_date>07/12/06</to_date>
+ <from_time>0</from_time>
+ <to_time>0</to_time>
</data>
diff --git a/evolution/create-search-folder-from-message.py b/evolution/create-search-folder-from-message.py
index 1a3c220..098d864 100644
--- a/evolution/create-search-folder-from-message.py
+++ b/evolution/create-search-folder-from-message.py
@@ -1,6 +1,6 @@
#!/usr/bin/python
#
-# Linux Desktop Testing Project http://www.gnomebangalore.org/ldtp
+# Linux Desktop Testing Project http://ldtp.freedesktop.org
#
# Author:
# Khasim Shaheed <khasim.shaheed@gmail.com>
@@ -34,6 +34,7 @@ def create_search_folder (source_folder, message_index, search_condition, search
try:
search_mail_count = 0
selectrowpartialmatch ('frmEvolution-*', 'ttblMailFolderTree', source_folder)
+ waittillguiexist ('frmEvolution-'+source_folder+'*')
time.sleep (2)
total_messages = getrowcount ('frmEvolution-*', 'ttblMessages')
selectrowindex ('frmEvolution-*', 'ttblMessages', message_index)
@@ -111,7 +112,8 @@ def create_search_folder (source_folder, message_index, search_condition, search
log ('Creating search mail folder failed', 'fail')
else:
if total_messages == getrowcount ('frmEvolution-Mail', 'ttblMessageList'):
- selectrowpartialmatch ('frmEvolution-Mail', 'ttblMailFolderTree', search_folder)
+ selectrowpartialmatch ('frmEvolution-*', 'ttblMailFolderTree', search_folder)
+ waittillguiexist ('frmEvolution-'+search_folder+'*')
time.sleep (2)
if search_mail_count == getrowcount ('frmEvolution-Mail', 'ttblMessageList'):
log ('Create search folder passed', 'pass')
diff --git a/evolution/create_appointment.py b/evolution/create_appointment.py
new file mode 100755
index 0000000..8f99059
--- /dev/null
+++ b/evolution/create_appointment.py
@@ -0,0 +1,103 @@
+#
+# Linux Desktop Testing Project http://ldtp.freedesktop.org
+#
+# 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 *
+from evoutils import *
+
+datafilename = 'create-appointment.xml'
+#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 of appointment
+log ('Appointment Creation', 'teststart')
+
+try:
+ selectCalendarPane()
+ windowname = 'frmAppointment-*'
+ ptlistname = 'ptl0'
+ flag = 0
+ selectmenuitem ('frmEvolution-*', 'mnuFile;mnuNew;mnuAppointment')
+ waittillguiexist (windowname)
+ 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)
+ i = insert_appointment (windowname, summary, location, description, from_date, from_time, to_date, to_time, calendar, 'No')
+ if i == 1:
+ flag = 1
+ log ('Insertion of Appointment values', 'testend')
+ time.sleep (2)
+ if i == 0:
+ log ('Insertion of recurrence values', 'teststart')
+ 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)
+ if flag == 1:
+ log ('Appointment creation succeeded', 'fail')
+ else:
+ log ('Appointment creation succeeded', 'pass')
+except LdtpExecutionError,msg:
+ #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_filter.py b/evolution/create_filter.py
index 2276c55..f0f1059 100644
--- a/evolution/create_filter.py
+++ b/evolution/create_filter.py
@@ -1,5 +1,5 @@
#
-# Linux Desktop Testing Project http://www.gnomebangalore.org/ldtp
+# Linux Desktop Testing Project http://ldtp.freedesktop.org
#
# Author:
# Venkateswaran S <wenkat.s@gmail.com>
@@ -59,7 +59,7 @@ def selectfolder(fldr,dest=''):
click('dlgCreatefolder','btnCancel')
print 'Folder Name already exist'
log('Folder Already exists','error')
- selectrowpartialmatch (windowname, 'ttblMailFolderTree',fldr)
+ selectrowpartialmatch (windowname, 'ttblMailFolderTree',fldr)
log('Dest fldr selected','info')
click(windowname,'btnOK')
return 1
@@ -81,6 +81,7 @@ def read_data():
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')
diff --git a/evolution/createaddrbook.py b/evolution/createaddrbook.py
index 5071762..17395a7 100644
--- a/evolution/createaddrbook.py
+++ b/evolution/createaddrbook.py
@@ -1,6 +1,6 @@
#!/usr/bin/env python
#
-# Linux Desktop Testing Project http://www.gnomebangalore.org/ldtp
+# Linux Desktop Testing Project http://ldtp.freedesktop.org
#
# Author:
# Prashanth Mohan <prashmohan@gmail.com>
@@ -26,6 +26,7 @@
from ldtp import *
from ldtputils import *
from contact import *
+from evoutils import *
def newaddrbook(datafilename):
@@ -33,10 +34,8 @@ def newaddrbook(datafilename):
try:
data_object = LdtpDataFileParser (datafilename)
Name=data_object.gettagvalue ('Name')
- #print Name
- #time.sleep (10)
- #selectContactPane()
- window_id=getcurwindow()
+ selectContactPane()
+ window_id = 'frmEvolution-Contacts'
selectmenuitem (window_id,'mnuFile;mnuNew;mnuAddressBook')
waittillguiexist ('dlgNewAddressBook')
time.sleep (3)
@@ -53,7 +52,6 @@ def newaddrbook(datafilename):
raise LdtpExecutionError (0)
log ('Create New Address Book','testend')
-selectPanel ('Contacts')
newaddrbook (datafilename)
diff --git a/evolution/createmeeting.py b/evolution/createmeeting.py
index 0ac3b3d..84b8840 100644
--- a/evolution/createmeeting.py
+++ b/evolution/createmeeting.py
@@ -1,6 +1,6 @@
#!/usr/bin/env python
#
-# Linux Desktop Testing Project http://www.gnomebangalore.org/ldtp
+# Linux Desktop Testing Project http://ldtp.freedesktop.org
#
# Author:
# Prashanth Mohan <prashmohan@gmail.com>
@@ -24,8 +24,15 @@
#
-from addmeeting import *
+from meeting import *
selectCalendarPane ()
-addmeeting (datafilename,0)
+log ('Add Non Recurring Meeting','teststart')
+try:
+ addmeeting (datafilename,0)
+except:
+ log ('Add Non Recurring Meeting','fail')
+ log ('Add Non Recurring Meeting','testend')
+log ('Add Non Recurring Meeting','pass')
+log ('Add Non Recurring Meeting','testend')
diff --git a/evolution/createrecurmeet.py b/evolution/createrecurmeet.py
index e39976b..7d33363 100644
--- a/evolution/createrecurmeet.py
+++ b/evolution/createrecurmeet.py
@@ -1,6 +1,6 @@
#!/usr/bin/env python
#
-# Linux Desktop Testing Project http://www.gnomebangalore.org/ldtp
+# Linux Desktop Testing Project http://ldtp.freedesktop.org
#
# Author:
# Prashanth Mohan <prashmohan@gmail.com>
@@ -24,7 +24,15 @@
#
-from addmeeting import *
+from meeting import *
+selectCalendarPane ()
+
+log ('Add Recurring Meeting','teststart')
+try:
+ addmeeting (datafilename, 1)
+except:
+ log ('Add Recurring Meeting','fail')
+ log ('Add Recurring Meeting','testend')
+log ('Add Recurring Meeting','testend')
-addmeeting (datafilename,1)
diff --git a/evolution/del-non-sys-folder.py b/evolution/del-non-sys-folder.py
index 6a3aae2..39b408a 100644
--- a/evolution/del-non-sys-folder.py
+++ b/evolution/del-non-sys-folder.py
@@ -1,5 +1,5 @@
#
-# Linux Desktop Testing Project http://www.gnomebangalore.org/ldtp
+# Linux Desktop Testing Project http://ldtp.freedesktop.org
#
# Author:
# Venkateswaran S <wenkat.s@gmail.com>
diff --git a/evolution/del_assigned_task.py b/evolution/del_assigned_task.py
index a96a1c0..ac84228 100644
--- a/evolution/del_assigned_task.py
+++ b/evolution/del_assigned_task.py
@@ -1,8 +1,9 @@
#
-# Linux Desktop Testing Project http://www.gnomebangalore.org/ldtp
+# Linux Desktop Testing Project http://ldtp.freedesktop.org
#
# Author:
# Venkateswaran S <wenkat.s@gmail.com>
+# Prashanth Mohan <prashmohan@gmail.com>
#
# Copyright 2004 Novell, Inc.
#
diff --git a/evolution/del_assigned_task.xml b/evolution/del_assigned_task.xml
index 09af00d..cda6b9f 100644
--- a/evolution/del_assigned_task.xml
+++ b/evolution/del_assigned_task.xml
@@ -1,4 +1,4 @@
<?xml version="1.0"?>
<data>
- <summary>This is the modified summary</summary>
+ <summary>This is just a summary for assigned task</summary>
</data>
diff --git a/evolution/del_task.py b/evolution/del_task.py
index ea9099f..c68cd82 100644
--- a/evolution/del_task.py
+++ b/evolution/del_task.py
@@ -1,8 +1,9 @@
#
-# Linux Desktop Testing Project http://www.gnomebangalore.org/ldtp
+# Linux Desktop Testing Project http://ldtp.freedesktop.org
#
# Author:
# Venkateswaran S <wenkat.s@gmail.com>
+# Prashanth Mohan <prashmohan@gmail.com>
#
# Copyright 2004 Novell, Inc.
#
@@ -26,25 +27,18 @@
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.
@@ -55,40 +49,32 @@ try:
waittillguiexist('frmEvolution-Tasks')
summary = read_data()
- #remap('evolution','frmEvolution-Tasks')
no_rows_b4deleting = getrowcount ('frmEvolution-Tasks', 'tblTasks')
- print summary[0]
- print summary
+
#if selectrowpartialmatch ('frmEvolution-Tasks', 'tblTasks', summary[0]) == 1:
# selectrowpartialmatch doesn't work: 333090
if selectrow ('frmEvolution-Tasks', 'tblTasks', 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')
+ log('The specified task has been deleted','info')
time.sleep(2)
no_rows_afterdeleting = getrowcount ('frmEvolution-Tasks', 'tblTasks')
if no_rows_afterdeleting == no_rows_b4deleting -1:
- print 'The task has been deleted'
time.sleep(3)
log('the task has been deleted','info')
- log('the task has been deleted','pass')
else:
print 'Deletion of task verify failed'
log('Deletion of task verify failed','error')
- log('the task has been deleted','fail')
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('the task has been deleted','fail')
log('Delete a task','testend')
raise LdtpExecutionError(0)
-
+log('the task has been deleted','pass')
log('Delete a task','testend')
diff --git a/evolution/del_task.xml b/evolution/del_task.xml
index 09af00d..0b6cebd 100644
--- a/evolution/del_task.xml
+++ b/evolution/del_task.xml
@@ -1,4 +1,4 @@
<?xml version="1.0"?>
<data>
- <summary>This is the modified summary</summary>
+ <summary>This is just a sample</summary>
</data>
diff --git a/evolution/delete-mail-folder.py b/evolution/delete-mail-folder.py
index fa8abb3..f6c537b 100644
--- a/evolution/delete-mail-folder.py
+++ b/evolution/delete-mail-folder.py
@@ -1,6 +1,6 @@
#!/usr/bin/python
#
-# Linux Desktop Testing Project http://www.gnomebangalore.org/ldtp
+# Linux Desktop Testing Project http://ldtp.freedesktop.org
#
# Author:
# Khasim Shaheed <khasim.shaheed@gmail.com>
diff --git a/evolution/deleteallinstmeeting.py b/evolution/deleteallinstmeeting.py
new file mode 100644
index 0000000..a7d32d6
--- /dev/null
+++ b/evolution/deleteallinstmeeting.py
@@ -0,0 +1,50 @@
+#!/usr/bin/env python
+#
+# Linux Desktop Testing Project http://ldtp.freedesktop.org
+#
+# 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 meeting import *
+
+try:
+ log ('Delete all instance of recursive Meeting','teststart')
+ try:
+ data_object = LdtpDataFileParser (datafilename)
+ fromdate=data_object.gettagvalue ('fromdate')
+ summary=data_object.gettagvalue ('summary')
+ except:
+ log ('Error while reading values for delete meeting','cause')
+ log ('Delete all instance of recursive Meeting','fail')
+ raise LdtpExecutionError (0)
+
+ try:
+ deletemeeting (fromdate[0],summary[0],1)
+ except:
+ log ('Unable to delete meeting','error')
+ log ('Delete all instance of recursive Meeting','fail')
+ raise LdtpExecutionError (0)
+ log ('Delete all instance of recursive Meeting','pass')
+
+except:
+ log ('Delete all instance of recursive Meeting','testend')
+ raise LdtpExecutionError (0)
+log ('Delete all instance of recursive Meeting','testend')
diff --git a/evolution/deletecontact.py b/evolution/deletecontact.py
index 75af3d4..5847738 100644
--- a/evolution/deletecontact.py
+++ b/evolution/deletecontact.py
@@ -1,6 +1,6 @@
#!/usr/bin/env python
#
-# Linux Desktop Testing Project http://www.gnomebangalore.org/ldtp
+# Linux Desktop Testing Project http://ldtp.freedesktop.org
#
# Author:
# Prashanth Mohan <prashmohan@gmail.com>
@@ -30,4 +30,12 @@ from contact import deletecontact
data_object = LdtpDataFileParser (datafilename)
Name=data_object.gettagvalue ('Name')
-deletecontact (Name[0])
+try:
+ log ('Delete Contact','teststart')
+ deletecontact (Name[0])
+ log ('Delete Contact','pass')
+except:
+ log ('Delete Contact','fail')
+ log ('Delete Contact','testend')
+ raise LdtpExecutionError (0)
+log ('Delete Contact','testend')
diff --git a/evolution/deletecontact.xml b/evolution/deletecontact.xml
index 490023c..87e6574 100644
--- a/evolution/deletecontact.xml
+++ b/evolution/deletecontact.xml
@@ -1,4 +1,4 @@
<?xml version="1.0"?>
<data>
- <Name>Test Name</Name>
+ <Name>Test Name</Name> <!-- Make sure that this Contact is present -->
</data>
diff --git a/evolution/deletecontactlist.py b/evolution/deletecontactlist.py
index 9feef2a..e70d3ad 100644
--- a/evolution/deletecontactlist.py
+++ b/evolution/deletecontactlist.py
@@ -1,6 +1,6 @@
#!/usr/bin/env python
#
-# Linux Desktop Testing Project http://www.gnomebangalore.org/ldtp
+# Linux Desktop Testing Project http://ldtp.freedesktop.org
#
# Author:
# Prashanth Mohan <prashmohan@gmail.com>
@@ -25,10 +25,19 @@
from ldtp import *
from ldtputils import *
-from contact import deletecontactlist
+from contact import *
-data_object = LdtpDataFileParser (datafilename)
-ListName=data_object.gettagvalue ('ListName')
-deletecontactlist (ListName[0])
+try:
+ data_object = LdtpDataFileParser (datafilename)
+ ListName=data_object.gettagvalue ('ListName')
+ log ('Delete Contact List', 'teststart')
+ deletecontact (ListName[0], True)
+ log ('Delete Contact List', 'pass')
+except:
+ log ('Delete Contact List', 'fail')
+ log ('Delete Contact List', 'testend')
+ raise LdtpExecutionError (0)
+log ('Delete Contact List', 'testend')
+
diff --git a/evolution/deletecontactlist.xml b/evolution/deletecontactlist.xml
index 6af8bbb..d1eb10e 100644
--- a/evolution/deletecontactlist.xml
+++ b/evolution/deletecontactlist.xml
@@ -1,4 +1,4 @@
<?xml version="1.0"?>
<data>
- <ListName>Test List</ListName>
+ <ListName>Test List</ListName> <!-- Make sure that this Contact is present -->
</data>
diff --git a/evolution/deletemail.py b/evolution/deletemail.py
index b52f3a9..b615316 100644
--- a/evolution/deletemail.py
+++ b/evolution/deletemail.py
@@ -1,5 +1,5 @@
#
-# Linux Desktop Testing Project http://www.gnomebangalore.org/ldtp
+# Linux Desktop Testing Project http://ldtp.freedesktop.org
#
# Author:
# Bhargavi <kbhargavi_83@yahoo.co.in>
@@ -34,6 +34,7 @@ from evoutils.mail import *
def delete_mail (source_fldr, mail_index):
try:
selectrowpartialmatch ('frmEvolution-*', 'ttblMailFolderTree', source_fldr)
+ waittillguiexist ('frmEvolution-'+source_fldr+'*')
time.sleep (2)
rowcount = getrowcount('frmEvolution-*', 'ttblMessages')
if rowcount > 0:
@@ -44,6 +45,7 @@ def delete_mail (source_fldr, mail_index):
selectmenuitem ('frmEvolution-*', 'mnuEdit;mnuDeleteMessage')
time.sleep (1)
selectrowpartialmatch ('frmEvolution-*', 'ttblMailFolderTree', source_fldr)
+ waittillguiexist ('frmEvolution-'+source_fldr+'*')
time.sleep (2)
row_after = getrowcount('frmEvolution-*','ttblMessages')
if row_after == (rowcount-1):
diff --git a/evolution/deletemailaccount.py b/evolution/deletemailaccount.py
index 394b05f..a05c129 100644
--- a/evolution/deletemailaccount.py
+++ b/evolution/deletemailaccount.py
@@ -1,6 +1,6 @@
#!/usr/bin/env python
#
-# Linux Desktop Testing Project http://www.gnomebangalore.org/ldtp
+# Linux Desktop Testing Project http://ldtp.freedesktop.org
#
# Author:
# Prashanth Mohan <prashmohan@gmail.com>
diff --git a/evolution/deletemailaccount.xml b/evolution/deletemailaccount.xml
index c60ce56..18d050d 100644
--- a/evolution/deletemailaccount.xml
+++ b/evolution/deletemailaccount.xml
@@ -1,4 +1,4 @@
<?xml version="1.0"?>
<data>
- <accountname>IMAP Account</accountname>
+ <accountname>Test Account</accountname>
</data>
diff --git a/evolution/deletemeeting.py b/evolution/deletemeeting.py
new file mode 100644
index 0000000..3cf3f96
--- /dev/null
+++ b/evolution/deletemeeting.py
@@ -0,0 +1,50 @@
+#!/usr/bin/env python
+#
+# Linux Desktop Testing Project http://ldtp.freedesktop.org
+#
+# 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 meeting import *
+
+try:
+ log ('Delete non recursive Meeting','teststart')
+ try:
+ data_object = LdtpDataFileParser (datafilename)
+ fromdate=data_object.gettagvalue ('fromdate')
+ summary=data_object.gettagvalue ('summary')
+ except:
+ log ('Error while reading values for delete meeting','cause')
+ log ('Delete non recursive Meeting','fail')
+ raise LdtpExecutionError (0)
+
+ try:
+ deletemeeting (fromdate[0],summary[0],0)
+ except:
+ log ('Unable to delete meeting','error')
+ log ('Delete non recursive Meeting','fail')
+ raise LdtpExecutionError (0)
+ log ('Delete non recursive Meeting','pass')
+
+except:
+ log ('Delete non recursive Meeting','testend')
+ raise LdtpExecutionError (0)
+log ('Delete non recursive Meeting','testend')
diff --git a/evolution/deletemeeting.xml b/evolution/deletemeeting.xml
new file mode 100644
index 0000000..855e6b8
--- /dev/null
+++ b/evolution/deletemeeting.xml
@@ -0,0 +1,5 @@
+<?xml version="1.0"?>
+<data>
+ <fromdate>07/15/06</fromdate>
+ <summary>new summary</summary> <!-- Make sure that this Meeting is present on the given date -->
+</data>
diff --git a/evolution/deletemeetingall.xml b/evolution/deletemeetingall.xml
index 3283e66..b2f7f75 100644
--- a/evolution/deletemeetingall.xml
+++ b/evolution/deletemeetingall.xml
@@ -1,6 +1,5 @@
<?xml version="1.0"?>
<data>
- <fromdate>10/24/2005</fromdate>
- <summary>new summary</summary>
- <occurance>0</occurance>
+ <fromdate>07/14/06</fromdate>
+ <summary>Recursive Meeting</summary> <!-- Make sure that this Meeting is present on the given date -->
</data>
diff --git a/evolution/deletemeetingone.xml b/evolution/deletemeetingone.xml
index 946fd35..1e6909b 100644
--- a/evolution/deletemeetingone.xml
+++ b/evolution/deletemeetingone.xml
@@ -1,6 +1,6 @@
<?xml version="1.0"?>
<data>
- <fromdate>10/26/2005</fromdate>
- <summary>dddd</summary>
+ <fromdate>07/13/06</fromdate>
+ <summary>Recursive Meeting</summary> <!-- Make sure that this Meeting is present on the given date -->
<occurance>2</occurance>
</data>
diff --git a/evolution/deletemessagewhenoffline.py b/evolution/deletemessagewhenoffline.py
index 9b8750c..98c5266 100644
--- a/evolution/deletemessagewhenoffline.py
+++ b/evolution/deletemessagewhenoffline.py
@@ -1,6 +1,6 @@
#!/usr/bin/env python
#
-# Linux Desktop Testing Project http://www.gnomebangalore.org/ldtp
+# Linux Desktop Testing Project http://ldtp.freedesktop.org
#
# Author:
# Prashanth Mohan <prashmohan@gmail.com>
diff --git a/evolution/deletemessagewhenoffline.xml b/evolution/deletemessagewhenoffline.xml
index 278ea88..8afd719 100644
--- a/evolution/deletemessagewhenoffline.xml
+++ b/evolution/deletemessagewhenoffline.xml
@@ -1,5 +1,5 @@
<?xml version="1.0"?>
<data>
- <folder>backup</folder>
- <subject>asd</subject>
+ <folder>Inbox</folder>
+ <subject>Happy New Year</subject> <!-- Make sure that at least 1 message containing this subject exists in the source folder -->
</data>
diff --git a/evolution/deletesingleinstmeeting.py b/evolution/deletesingleinstmeeting.py
index 7761ea5..859ddb5 100644
--- a/evolution/deletesingleinstmeeting.py
+++ b/evolution/deletesingleinstmeeting.py
@@ -1,6 +1,6 @@
#!/usr/bin/env python
#
-# Linux Desktop Testing Project http://www.gnomebangalore.org/ldtp
+# Linux Desktop Testing Project http://ldtp.freedesktop.org
#
# Author:
# Prashanth Mohan <prashmohan@gmail.com>
@@ -23,25 +23,28 @@
# Boston, MA 02111-1307, USA.
#
-from modifymeeting import *
-
-
+from meeting import *
try:
+ log ('Delete single instance of recursive Meeting','teststart')
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')
+ log ('Delete single instance of recursive Meeting','fail')
raise LdtpExecutionError (0)
try:
- deletemeeting (fromdate[0],summary[0],int(occurance[0]))
+ deletemeeting (fromdate[0],summary[0],1)
except:
log ('Unable to delete meeting','error')
+ log ('Delete single instance of recursive Meeting','fail')
raise LdtpExecutionError (0)
+ log ('Delete single instance of recursive Meeting','pass')
except:
+ log ('Delete single instance of recursive Meeting','testend')
raise LdtpExecutionError (0)
+log ('Delete single instance of recursive Meeting','testend')
diff --git a/evolution/editsign.py b/evolution/editsign.py
index b3aba38..7568eeb 100644
--- a/evolution/editsign.py
+++ b/evolution/editsign.py
@@ -1,6 +1,6 @@
#!/usr/bin/env python
#
-# Linux Desktop Testing Project http://www.gnomebangalore.org/ldtp
+# Linux Desktop Testing Project http://ldtp.freedesktop.org
#
# Author:
# Prashanth Mohan <prashmohan@gmail.com>
diff --git a/evolution/emptysubjectline.py b/evolution/emptysubjectline.py
index 54bf2f1..08a3d57 100644
--- a/evolution/emptysubjectline.py
+++ b/evolution/emptysubjectline.py
@@ -1,6 +1,6 @@
#!/usr/bin/env python
#
-# Linux Desktop Testing Project http://www.gnomebangalore.org/ldtp
+# Linux Desktop Testing Project http://ldtp.freedesktop.org
#
# Author:
# Prashanth Mohan <prashmohan@gmail.com>
diff --git a/evolution/enabledisablemailaccount.py b/evolution/enabledisablemailaccount.py
index 3ce784b..b7affd0 100644
--- a/evolution/enabledisablemailaccount.py
+++ b/evolution/enabledisablemailaccount.py
@@ -1,6 +1,6 @@
#!/usr/bin/env python
#
-# Linux Desktop Testing Project http://www.gnomebangalore.org/ldtp
+# Linux Desktop Testing Project http://ldtp.freedesktop.org
#
# Author:
# Prashanth Mohan <prashmohan@gmail.com>
@@ -37,6 +37,7 @@ try:
if account_name!=[]:
disablemailaccount (account_name[0])
time.sleep (3)
+ remap ('evolution','frmEvolution-*')
enablemailaccount (account_name[0])
elif email!=[]:
disablemailaccount (email[0])
diff --git a/evolution/enabledisablemailaccount.xml b/evolution/enabledisablemailaccount.xml
index 3cd32d7..1d2d72c 100644
--- a/evolution/enabledisablemailaccount.xml
+++ b/evolution/enabledisablemailaccount.xml
@@ -1,4 +1,4 @@
<?xml version="1.0"?>
<data>
- <email>partha@matrix.net</email>
+ <accountname>Gmail Account</accountname> <!-- Make sure you have an Account by the same name configured for use -->
</data>
diff --git a/evolution/evo-testing.xml b/evolution/evo-testing.xml
index 44ea895..7f55b2a 100644
--- a/evolution/evo-testing.xml
+++ b/evolution/evo-testing.xml
@@ -1,255 +1,10 @@
<?xml version='1.0' encoding='utf-8'?>
<!-- XML Logging -->
<ldtp>
-<info>appmap file name evolution.map</info>
+<warning>testcaseid entry not present - skipping</warning>
+<warning>comment entry not present - skipping</warning>
<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>
+<warning>Script file entry not present - skipping</warning>
+<groupstatus>0 test scripts passed of 1</groupstatus>
</group>
</ldtp>
diff --git a/evolution/evoutils/TAGS b/evolution/evoutils/TAGS
new file mode 100644
index 0000000..5cc4350
--- /dev/null
+++ b/evolution/evoutils/TAGS
@@ -0,0 +1,62 @@
+
+calendar.py,209
+def getrecentrowindex 31,1033
+def selectdate 41,1441
+def insert_appointment 97,3167
+def insert_recurrence 149,5541
+def selectcalevent(233,9045
+def selectCalendarPane(259,9888
+def getcurwindow(273,10370
+
+composemail.py,124
+def compose 32,1143
+def sendmail(61,2344
+def savethismail 83,3134
+def attach_files 114,4288
+def read_maildata 137,5211
+
+__init__.py,305
+def get_window 4,21
+def selectContactPane(26,720
+def selectMailPane(36,1036
+def selectContactPane(46,1311
+def selectMemoPane(57,1628
+def selectTaskPane(68,1934
+def selectCalendarPane(80,2243
+def go_offline(91,2562
+def go_online 122,3488
+def get_mail_name 154,4418
+def restartevolution(160,4550
+
+mailpreferences.py,56
+def change_style 29,974
+def change_sentfolder 55,1916
+
+mail.py,292
+def setandverify 33,1096
+def populate_mail_header 56,1728
+def capturemailimage 92,3342
+def verifymailwithimage 131,4886
+def get_HTML_pref(165,6028
+def insert_bgimage 190,6745
+def apply_template(212,7521
+def getmailtext(229,8059
+def getrowindex(252,8677
+def getsentmailtext(267,9100
+
+menu_reorganization.py,301
+def selectfolder(29,1017
+def verify_folder_exist(53,1860
+def create_folder(71,2421
+def copy_to 111,3741
+def move_to 148,4952
+def select_all 185,6131
+def mark_all_read(212,6970
+def rename 231,7510
+def delete_nonsys_folder 271,8775
+def insert_followup_details 311,10096
+def expunge(332,10846
+
+password.py,57
+class EvoPassword:30,988
+ def EnterPassword 31,1007
diff --git a/evolution/evoutils/__init__.py b/evolution/evoutils/__init__.py
index 8b13789..61bd4e2 100644
--- a/evolution/evoutils/__init__.py
+++ b/evolution/evoutils/__init__.py
@@ -1 +1,206 @@
+from ldtp import *
+from ldtputils import *
+
+def get_window (component=None):
+ window_id = ''
+ if guiexist ('frmEvolution-Calendars') == 1:
+ window_id = 'frmEvolution-Calendars'
+ elif guiexist ('frmEvolution-Tasks') == 1:
+ window_id = 'frmEvolution-Tasks'
+ elif guiexist ('frmEvolution-Contacts') == 1:
+ window_id = 'frmEvolution-Contacts'
+ elif guiexist ('frmEvolution-Memos') == 1:
+ window_id = 'frmEvolution-Memos'
+ elif guiexist ('frmEvolution-*') == 1:
+ window_id = 'frmEvolution-*'
+ if component:
+ if window_id:
+ click (window_id, str('tbtn'+ component))
+ time.sleep (3)
+ return 1
+ else:
+ return 0
+ else:
+ return window_id
+
+def selectContactPane():
+ """Selects the Contacts Pane in Evolution"""
+ try:
+ window_id=get_window()
+ click (window_id,'tbtnContacts')
+ waittillguiexist ('frmEvolution-Contacts')
+ except:
+ log ('error selecting Contacts pane','error')
+ raise LdtpExecutionError(0)
+
+def selectMailPane():
+ """Selects the Contacts Pane in Evolution"""
+ try:
+ window_id = get_window()
+ click (window_id,'tbtnMail')
+ time.sleep (2)
+ except:
+ log ('error selecting Mail pane','error')
+ raise LdtpExecutionError(0)
+
+def selectContactPane():
+ """Selects the Contacts Pane in Evolution"""
+ try:
+ window_id=get_window()
+ click (window_id,'tbtnContacts')
+ waittillguiexist ('frmEvolution-Contacts')
+ except:
+ log ('error selecting Contacts pane','error')
+ raise LdtpExecutionError(0)
+
+
+def selectMemoPane():
+ """Selects the Calendars Pane in Evolution"""
+ try:
+ window_id=get_window()
+ click (window_id,'tbtnMemos')
+ waittillguiexist ('frmEvolution-Memos')
+ except:
+ log ('error selecting Memos pane','error')
+ raise LdtpExecutionError(0)
+
+
+def selectTaskPane():
+ """Selects the Contacts Pane in Evolution"""
+ try:
+ window_id = get_window()
+ click (window_id,'tbtnTasks')
+ waittillguiexist ('frmEvolution-Tasks')
+ except:
+ log ('error selecting Tasks pane','error')
+ raise LdtpExecutionError(0)
+
+
+
+def selectCalendarPane():
+ """Selects the Contacts Pane in Evolution"""
+ try:
+ window_id = get_window()
+ click (window_id,'tbtnCalendars')
+ waittillguiexist ('frmEvolution-Calendars')
+ except:
+ log ('error selecting Calendars pane','error')
+ raise LdtpExecutionError(0)
+
+
+def go_offline():
+ time.sleep (10)
+ remap ('evolution','frmEvolution-*')
+ try:
+ window_id = 'frmEvolution-*'
+ flag=False
+ if 'mnuWorkOffline' in getobjectlist(window_id):
+ flag=True
+ if flag==True:
+ selectmenuitem (window_id,'mnuFile;mnuWorkOffline')
+ log ('going offline','info')
+ else:
+ log ('already offline','info')
+ return
+ time.sleep (3)
+# remap ('evolution','frmEvolution-*')
+# time.sleep (1)
+# flag=False
+# if 'mnuWorkOnline' in getobjectlist (window_id):
+# flag = True
+# for x in getobjectlist (window_id):
+# if x == 'mnuWorkOnline':
+# flag=True
+# break
+ if flag == False:
+ log ('Work Online not available','cause')
+ raise LdtpExecutionError (0)
+ except:
+ log ('Could not go offline','error')
+ raise LdtpExecutionError (0)
+
+
+def go_online ():
+ time.sleep (10)
+ remap ('evolution','frmEvolution-*')
+ try:
+ window_id = 'frmEvolution-*'
+ flag=False
+ if 'mnuWorkOnline' in getobjectlist(window_id):
+ flag=True
+
+ if flag == True:
+ selectmenuitem (window_id,'mnuFile;mnuWorkOnline')
+ log ('going online','info')
+ else:
+ log ('already online','info')
+ return
+ time.sleep (3)
+ remap ('evolution','frmEvolution-*')
+
+ time.sleep (1)
+# flag=False
+# if 'mnuWorkOffline' in getobjectlist (window_id):
+# flag = True
+# for x in getobjectlist (window_id):
+# if x == 'mnuWorkOffline':
+# flag=True
+# break
+ if flag == False:
+ log ('Work Offline not available','cause')
+ raise LdtpExecutionError (0)
+ except:
+ log ('Could not go Online','error')
+ raise LdtpExecutionError (0)
+
+
+def get_mail_name (subject):
+ if subject == '':
+ return '*ComposeMessage*'
+ else:
+ return '*'+subject.replace(' ','')
+
+def restartevolution():
+ log ('Restart Evolution','teststart')
+ try:
+ time.sleep (3)
+ window_id = 'frmEvolution-*'
+ 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')
+
+def select_mail(fldr,subject):
+ try:
+ if selectrowpartialmatch('frmEvolution-*','ttblMailFolderTree',fldr) == 1:
+ waittillguiexist ('frmEvolution-'+fldr+'*')
+ log('Folder selected','info')
+ if selectrow('frmEvolution-*','ttblMessages',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)
+
diff --git a/evolution/evoutils/calendar.py b/evolution/evoutils/calendar.py
index 65a4b2c..5df8f6e 100644
--- a/evolution/evoutils/calendar.py
+++ b/evolution/evoutils/calendar.py
@@ -1,10 +1,11 @@
#!/usr/bin/python
#
-# Linux Desktop Testing Project http://www.gnomebangalore.org/ldtp
+# Linux Desktop Testing Project http://ldtp.freedesktop.org
#
# Author:
# Premkumar <jpremkumar@novell.com>
# Venkateswaran S <wenkat.s@gmail.com>
+# Prashanth Mohan <prashmohan@gmail.com>
#
# Copyright 2004 Novell, Inc.
#
@@ -27,6 +28,14 @@
from ldtp import *
from ldtputils import *
from evoutils.mail import *
+import datetime
+
+days = ['Monday','Tuesday','Wednesday','Thursday',
+ 'Friday','Saturday','Sunday']
+months = ['January','February','March','April',
+ 'May','June','July','August','September',
+ 'October','Novemeber','December']
+
def getrecentrowindex (windowname, tablename, column, summary):
totalcount = getrowcount (windowname, tablename)
@@ -83,70 +92,21 @@ def selectdate (new_date):
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)
+# if int (year) < 11 or int (year) > 99:
+# log ('Given year is invalid', 'cause')
+# raise LdtpExecutionError (0)
+ setvalue ('dlgSelectDate', 'sbtn0', '20'+year)
time.sleep (3)
- selectcalendardate ('dlgSelectDate', 'calviewCalendar', day, mnt, int (year))
+ selectcalendardate ('dlgSelectDate', 'calviewCalendar', day, mnt,
+ int ('20'+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)
- setandverify (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, 'txtDate1', 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, 'txtDate1', 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):
+ print windowname, duration, dur_value, dur_day, count, for_type, no_of_times, exception
try:
flag = 0
if waittillguiexist (windowname) == 0:
@@ -158,7 +118,7 @@ def insert_recurrence (windowname, duration, dur_value, dur_day, count, for_type
flag = 1
time.sleep (1)
check (windowname, 'chkThisappointmentrecurs')
-
+ time.sleep (2)
if verifycheck (windowname, 'chkThisappointmentrecurs') == 0:
log ('Verification of checkbox failed!!', 'cause')
raise LdtpExecutionError (0)
@@ -169,12 +129,9 @@ def insert_recurrence (windowname, duration, dur_value, dur_day, count, for_type
setvalue (windowname, 'sbtn0', count)
time.sleep(2)
- remap ('evolution',windowname)
comboselect (windowname,'cboday(s)',duration)
- undoremap ('evolution',windowname)
- remap ('evolution',windowname)
time.sleep (2)
-
+ remap ('evolution',windowname)
if duration == 'day(s)':
pass
elif duration == 'month(s)':
@@ -184,26 +141,25 @@ def insert_recurrence (windowname, duration, dur_value, dur_day, count, for_type
# those toggle buttons are not recognized in the appmap. so leaving as it is.
pass
elif duration == 'year(s)':
- pass
-
+ pass
time.sleep(2)
- comboselect (windowname,'cbofor',for_type)
- undoremap ('evolution',windowname)
remap ('evolution',windowname)
+ comboselect (windowname,'cbofor',for_type)
time.sleep(2)
+ remap ('evolution',windowname)
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))
+ settextvalue(windowname,'txtDate',str(no_of_times))
time.sleep(2)
elif for_type == 'forever':
pass
- undoremap ('evolution',windowname)
- remap ('evolution',windowname)
time.sleep(3)
-
+ print exception
+ if exception:
+ exception = exception[0]
exception=exception.split(' ')
if len(exception) > 0:
for i in range (len (exception)):
@@ -213,15 +169,15 @@ def insert_recurrence (windowname, duration, dur_value, dur_day, count, for_type
log ('Failed to open exception add dialog', 'cause')
raise LdtpExecutionError (0)
else:
- settextvalue ('dlgAddexception', 'txtTextDateEntry', exception[i])
+ settextvalue ('dlgAddexception', 'txtDate',
+ exception[i])
click ('dlgAddexception', 'btnOK')
if waittillguinotexist ('dlgAddexception') == 0:
- log ('Failed to close exception add dialog', 'cause')
+ 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
@@ -230,9 +186,77 @@ def insert_recurrence (windowname, duration, dur_value, dur_day, count, for_type
log ('Error in insertng recurrence tab details', 'error')
return 0
-def selectcalevent(fromdate,summary):
+def verify_recurrence (windowname, duration, dur_value, dur_day, count,
+ for_type, no_of_times, exception):
+ try:
+ remap ('evolution', windowname)
+ objlist = getobjectlist (windowname)
+ if waittillguiexist (windowname) == 0:
+ log ('Window: ' + windowname + ' Is not open', 'cause')
+ raise LdtpExecutionError (0)
+ activatewin (windowname)
+ 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:
+ if count and int(getvalue (windowname, 'sbtn0')) != int(count[0]):
+ log ('No of recurrence not set','cause')
+ raise LdtpExecutionError (0)
+ time.sleep(2)
+
+ if duration and not 'cbo'+duration[0] in objlist:
+ log ('Duration not selected','cause')
+ raise LdtpExecutionError (0)
+
+ if duration and duration[0] == 'day(s)':
+ pass
+ elif duration and duration[0] == 'month(s)':
+ if not ('cbo'+dur_value[0] in objlist and 'cbo'+dur_day[0] in objlist):
+ log ('duration value not selected','cause')
+ raise LdtpExecutionError (0)
+
+ elif duration and duration[0] == 'week(s)':
+ # those toggle buttons are not recognized in the appmap. so leaving as it is.
+ pass
+ elif duration and duration[0] == 'year(s)':
+ pass
- log ('Selecting a Cal event','teststart')
+ if for_type and not 'cbo'+for_type[0] in objlist:
+ log ('For Type not in object list','cause')
+ raise LdtpExecutionError (0)
+
+ if for_type and for_type[0] == 'for' and str(int(getvalue(windowname,'sbtn1'))) != str (no_of_times[0]):
+ log ('For value not properly set','cause')
+ raise LdtpExecutionError (0)
+
+# elif for_type and for_type[0] == 'until' and gettextvalue(windowname,'txtDate') != get_date_format(no_of_times[0]):
+# log ('Until Value not properly set','cause')
+# raise LdtpExecutionError (0)
+ elif for_type and for_type[0] == 'forever':
+ pass
+ time.sleep(3)
+ if exception:
+ exception = exception[0].split(' ')
+ if len(exception) > 0:
+ for ex in exception:
+ try:
+ select = ex.split ('/')
+ selectrowpartialmatch (windowname,'tbl0',select[0]+'/'+select[1]+'/20'+select[2])
+ except:
+ log ('Execption not added','cause')
+ raise LdtpExecutionError (0)
+ time.sleep(3)
+ click(windowname, 'btnClose')
+ log ('Recurrence details set successfully','info')
+ except:
+ log ('Error in insertng recurrence tab details', 'error')
+ click(windowname, 'btnClose')
+
+
+def selectcalevent(fromdate,summary):
try:
time.sleep(5)
date=fromdate.split('/')
@@ -245,39 +269,32 @@ def selectcalevent(fromdate,summary):
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')
+ try:
+ selectevent ('frmEvolution-Calendars','calDayView',summary)
+ except:
+ print 'Unable to select event'
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 get_date_format (date):
+
+ date = date.split ('/')
+ year = int ('20'+date[2])
+ month = int (date[0])
+ day = int (date[1])
+ format = date[1] + ' ' + months[month-1] + ' ' + str(year)
+ date = datetime.date (year, month, day)
+ weekday = days [date.weekday()]
+ format = weekday + ' ' + format
+ return format
+
+def parsename (attendee,email):
+ name=attendee
+ name=name+' <'+email+'>'
+ return name
+
-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/composemail.py b/evolution/evoutils/composemail.py
index d75d60e..86f97a0 100644
--- a/evolution/evoutils/composemail.py
+++ b/evolution/evoutils/composemail.py
@@ -1,5 +1,5 @@
#
-# Linux Desktop Testing Project http://www.gnomebangalore.org/ldtp
+# Linux Desktop Testing Project http://ldtp.freedesktop.org
#
# Authors:
# Bhargavi <kbhargavi_83@yahoo.co.in>
@@ -26,30 +26,32 @@
# Compose a new mail through File menu
from evoutils.mail import *
+from evoutils import *
# Section to compose a new mail through File menu
def compose (to, subject=[], body=[], cc=[], bcc=[],attachment=[], format=[]):
try:
- selectmenuitem ('frmEvolution-*', 'mnuFile;mnuNew;mnuMailMessage')
+ selectmenuitem ('*Evolution*', 'mnuFile;mnuNew;mnuMailMessage')
time.sleep (2)
- if waittillguiexist ('frmComposeMessage') == 0:
+ window_id = '*ComposeMessage*'
+ if waittillguiexist (window_id) == 0:
log('Compose message window does not appear', 'error')
raise LdtpExecutionError (0)
else:
- populate_mail_header (to, subject, body, cc,bcc)
if len(format)>0:
try:
if format[0]=='HTML':
- check ('frmComposeMessage','mnuHTML')
+ selectmenuitem (window_id,'mnuFormat;mnuHTML')
elif format[0]=='Plain Text':
- uncheck ('frmComposeMessage','mnuHTML')
+ uncheck (window_id,'mnuHTML')
else:
log ('Format not proper','warning')
except:
log ('Error while setting Format of mail','error')
raise LdtpExecutionError (0)
if attachment:
- attach_files (attachment)
+ attach_files (attachment)
+ populate_mail_header (to, subject, body, cc,bcc)
except ldtp.error, msg:
log ('Compose message failed ' + str (msg), 'cause')
log ('Compose message failed', 'Fail' );
@@ -58,47 +60,46 @@ def compose (to, subject=[], body=[], cc=[], bcc=[],attachment=[], format=[]):
def sendmail(subject):
try:
- click ('frmComposeMessage', 'btnSend')
+ window_id = get_mail_name (subject[0])
+ click (window_id, 'btnSend')
time.sleep (3)
- if len(subject)==0 and guiexist ('dlgEvolutionQuery')==1:
- remap ('evolution','dlgEvolutionQuery')
+ if guiexist ('*EvolutionQuery')==1:
+ remap ('evolution','*EvolutionQuery')
click ('dlgEvolutionQuery','btnSend')
- undoremap ('evolution','dlgEvolutionQuery')
if waittillguinotexist ('frmComposeMessage') == 0:
log ('Failed during clicking the send button', 'error')
raise LdtpExecutionError (0)
- if guiexist ('dlgEvolutionError'):
- log ('Error while sending mail', 'error')
- click ('dlgEvolutionError', 'btnOK')
- raise LdtpExecutionError (0)
- else:
- releasecontext()
- time.sleep (2)
+# if guiexist ('*EvolutionError') == 1:
+# log ('Error while sending mail', 'error')
+# click ('*EvolutionError', 'btnOK')
+# raise LdtpExecutionError (0)
+# else:
+# time.sleep (2)
except:
log ('Could not send message','error')
raise LdtpExecutionError (0)
-def savethismail (savemethod):
+def savethismail (savemethod, subject='frmComposeMessage'):
"""savemethod == 0 --> Save Draft
- savemethod == 1 --> save in FS"""
+ savemethod == 1 --> Save in FS"""
try:
if savemethod==0:
- selectmenuitem ('frmComposeMessage','mnuFile;mnuSaveDraft')
+ selectmenuitem (subject,'mnuFile;mnuSaveDraft')
time.sleep (1)
- selectmenuitem ('frmComposeMessage','mnuFile;mnuClose')
+ selectmenuitem (subject,'mnuFile;mnuClose')
elif savemethod==1:
- selectmenuitem ('frmComposeMessage','mnuFile;mnuSaveAs')
- waittillguiexist ('dlgSaveas')
- settextvalue ('dlgSaveas','txtName','testfile')
- click ('dlgSaveas','btnSave')
+ selectmenuitem (subject,'mnuFile;mnuSaveAs')
+ waittillguiexist ('dlgSaveas*')
+ settextvalue ('dlgSaveas*','txtName','testfile')
+ click ('dlgSaveas*','btnSave')
time.sleep (2)
- if guiexist ('dlgOverwritefile?')==1:
- click ('dlgOverwritefile?','btnOverwrite')
+ if guiexist ('dlgOverwritefile*')==1:
+ click ('dlgOverwritefile*','btnOverwrite')
log ('testfile already exists','warning')
- selectmenuitem ('frmComposeMessage','mnuFile;mnuClose')
- waittillguiexist ('dlgWarning')
- click ('dlgWarning','btnDiscardChanges')
+ selectmenuitem (subject,'mnuFile;mnuClose')
+ waittillguiexist ('dlgWarning*')
+ click ('dlgWarning*','btnDiscardChanges')
else:
log ('invalid save method','cause')
raise LdtpExecutionError (0)
@@ -106,7 +107,6 @@ def savethismail (savemethod):
except:
log ('Saving Mail Failed!','error')
raise LdtpExecutionError (0)
-
@@ -145,5 +145,5 @@ def read_maildata (datafile):
sentitemsfolder = data_object.gettagvalue ('sentitemsfolder')
refimg = data_object.gettagvalue ('refimg')
#return [to, subject, body, cc, bcc, attachment, sentitemsfolder, refimg]
- return to, cc, bcc, subject, body, attachment, sentitemsfolder, refimg
+ return to, cc, bcc, subject, body, attachment, sentitemsfolder, refimg
diff --git a/evolution/evoutils/mail.py b/evolution/evoutils/mail.py
index bc2763c..74938f9 100644
--- a/evolution/evoutils/mail.py
+++ b/evolution/evoutils/mail.py
@@ -1,5 +1,5 @@
#
-# Linux Desktop Testing Project http://www.gnomebangalore.org/ldtp
+# Linux Desktop Testing Project http://ldtp.freedesktop.org
#
# Authors:
# Premkumar <jpremkumar@novell.com>
@@ -23,48 +23,22 @@
# Boston, MA 02111-1307, USA.
#
-import time, types
+import time, types, os
from ldtp import *
from ldtputils import *
-from contact import *
-
-# To Change component
-def get_window (component=None):
- window_id = ''
- if guiexist ('frmEvolution-Mail') == 1:
- window_id = 'frmEvolution-Mail'
- elif guiexist ('frmEvolution-Calendars') == 1:
- window_id = 'frmEvolution-Calendars'
- elif guiexist ('frmEvolution-Tasks') == 1:
- window_id = 'frmEvolution-Tasks'
- elif guiexist ('frmEvolution-Contacts') == 1:
- window_id = 'frmEvolution-Contacts'
- elif guiexist ('frmEvolution-Memos') == 1:
- window_id = 'frmEvolution-Memos'
-
- window_id = 'frmEvolution-*'
- if component:
- if window_id:
- #selectmenuitem (window_id, 'mnuView;mnuWindow;mnu' + component)
- click (window_id, str('tbtn'+ component))
- time.sleep (3)
- return 1
- else:
- return 0
- else:
- return window_id
+#from contact import *
+from evoutils import *
# To set and verify a textbox
def setandverify (win_name, box_name, value):
try:
text = ''
- if type (value) == types.StringType or types.UnicodeType:
+ if type (value) == types.StringType or type (value) == types.UnicodeType:
text = value
- else:
+ elif type (value) == types.ListType:
length = len (value)
for i in range (length):
text = text + str (value[i]) + ', '
-
settextvalue (win_name, box_name, text)
tokens = text.split ('\n')
if tokens[0] != text:
@@ -80,66 +54,62 @@ def setandverify (win_name, box_name, value):
#To populate mail header
def populate_mail_header (to=[], subject=[], body=[], cc = [], bcc = []):
+ win_id = '*ComposeMessage*'
try:
- if to and setandverify ('frmComposeMessage', 'txtTo', to) == 0:
+ if to != [] and setandverify ('*ComposeMessage*', 'txtTo', to) == 0:
log ('Failed to insert text into To field','error')
raise LdtpExecutionError (0)
- if cc:
- check ('frmComposeMessage','mnuCcField')
- if setandverify ('frmComposeMessage', 'txtCc', cc) == 0:
+ if cc != []:
+ selectmenuitem ('*ComposeMessage*','mnuView;mnuCcField')
+ if setandverify ('*ComposeMessage*', 'txtCc', cc) == 0:
log ('Failed to insert text into Cc field','error')
raise LdtpExecutionError (0)
- if bcc:
- check ('frmComposeMessage','mnuBccField')
- if setandverify ('frmComposeMessage', 'txtBcc', bcc) == 0:
+ if bcc != []:
+ selectmenuitem ('*ComposeMessage*','mnuView;mnuBccField')
+ if setandverify ('*ComposeMessage*', 'txtBcc', bcc) == 0:
log ('Failed to insert text into Bcc field','error')
raise LdtpExecutionError (0)
-
#cant use set and verify since context switching is involved
if subject:
- settextvalue ('frmComposeMessage', 'txtSubject', subject[0])
- setcontext ('Compose Message', subject[0])
- if verifysettext ('frmComposeMessage', 'txtSubject',
- subject[0]) == 0:
+ settextvalue ('*ComposeMessage*', 'txtSubject', subject[0])
+ win_id = get_mail_name (subject[0])
+ if verifysettext (win_id, 'txtSubject',
+ subject[0]) == 0:
log ('Failed to insert text into subject Field','error')
raise LdtpExecutionError (0)
-
-
- #TODO: Change 'txt6' to some meaningful name in
- #evolution.map also in the following code
- if body and setandverify ('frmComposeMessage', 'txt6', str(body[0])) == 0:
+ if body and setandverify (win_id, 'txt6', str(body[0])) == 0:
log ('Failed to insert text into Body field','error')
raise LdtpExecutionError (0)
- #TODO: Check bcc field
- return 1
+ return win_id
except:
log ('Compose mail failed', 'error')
- if guiexist ('frmComposeMessage'):
- selectmenuitem ('frmComposeMessage', 'mnuFile;mnuClose')
+ if guiexist (win_id):
+ selectmenuitem ('*ComposeMessage*', 'mnuFile;mnuClose')
time.sleep (2)
raise LdtpExecutionError (0)
#To capture image of the ith mail in the given folder
def capturemailimage (sent_folder, sent_mail_count, filename):
try:
- selectrowpartialmatch ('frmEvolution-Mail', 'ttblMailFolderTree', sent_folder)
+ selectrowpartialmatch ('frmEvolution*', 'ttblMailFolderTree', sent_folder)
+ waittillguiexist ('frmEvolution-'+sent_folder+'*')
time.sleep (2)
print "SENT MAIL COUNT:",sent_mail_count
- print "NEW COUNT:",getrowcount ('frmEvolution-Mail', 'ttblMessageList')
-
- if (sent_mail_count+1) > getrowcount ('frmEvolution-Mail', 'ttblMessageList'):
- log ('Sent mail missing from Sent folder', 'error')
- raise LdtpExecutionError (0)
- remap ('evolution','frmEvolution-Mail')
- selectrowindex ('frmEvolution-Mail', 'ttblMessageList', sent_mail_count)
+ new_count = getrowcount ('frmEvolution*', 'ttblMessages')
+ print "NEW COUNT:", new_count
+
+ if (sent_mail_count+1) > new_count:
+ log ('Sent mail missing from Sent folder', 'error')
+ raise LdtpExecutionError (0)
+ selectrowindex ('frmEvolution*', 'ttblMessages', sent_mail_count)
time.sleep (2)
- subject = getcellvalue ('frmEvolution-Mail', 'ttblMessageList', sent_mail_count, 4)
- undoremap ('evolution','frmEvolution-Mail')
- setcontext ('Readonlyframe', subject)
- selectmenuitem ('frmEvolution-Mail', 'mnuMessage;mnuOpeninNewWindow')
+ subject = getcellvalue ('frmEvolution*', 'ttblMessages', sent_mail_count, 4)
+ selectmenuitem ('frmEvolution*', 'mnuMessage;mnuOpeninNewWindow')
time.sleep (1)
- if waittillguiexist ('frmReadonly') == 0:
- log ('Readonlyframe failed to open', 'cause')
+
+ window_id = get_mail_name (subject)
+ if waittillguiexist (window_id) == 0:
+ log ('Message failed to open', 'cause')
raise LdtpExecutionError (0)
activatewin (subject)
@@ -147,21 +117,26 @@ def capturemailimage (sent_folder, sent_mail_count, filename):
print 'Capturing image of the sent mail for comparision...'
imagecapture (subject, 'IMAGES/'+filename)
print '...done'
- selectmenuitem ('frmReadonly', 'mnuFile;mnuClose')
- if waittillguinotexist ('frmReadonly') == 0:
+ time.sleep (2)
+ selectmenuitem (window_id, 'mnuFile;mnuClose')
+ if waittillguinotexist (window_id) == 0:
log ('Message Window is not close after capturing', 'warning')
raise LdtpExecutionError (0)
-
- releasecontext ()
return 1
except ldtp.error, msg:
log ('Capturing of mail failed ' + str (msg), 'warning')
- LdtpExecutionError(0)
+ raise LdtpExecutionError(0)
#To verify the ith mail in the given folder with the given image
-def verifymailwithimage (folder_name, sent_mail_count, refimg_filename):
+def verifymailwithimage (folder_name, sent_mail_count, refimg_filename, subject=[]):
+
try:
# TODO: Have to black out the date display region for best results
+ # 85, 94 && 340,200
+ if subject:
+ subject = get_mail_name (subject[0])
+ else:
+ subject = 'frmReadonly'
if not (refimg_filename):
log ('Reference Image not provided', 'error')
raise LdtpExecutionError (0)
@@ -171,16 +146,21 @@ def verifymailwithimage (folder_name, sent_mail_count, refimg_filename):
print "error while capturing image"
raise LdtpExecutionError (0)
time.sleep (3)
+ blackoutregion ('IMAGES/cur_mail.png','IMAGES/cur_mail.png',85,94,340,200)
+
if imagecompare ('IMAGES/cur_mail.png',refimg_filename[0]) < 3.0:
+ #selectmenuitem (subject, 'mnuFile;mnuClose')
return 1
else:
+ #selectmenuitem (subject, 'mnuFile;mnuClose')
return 0
except ldtp.error, msg:
log ('Comparision of mail images failed - ' + str (msg), 'error')
- if guiexist ('frmReadonly'):
- selectmenuitem ('frmReadonly', 'mnuFile;mnuClose')
- LdtpExecutionError (0)
+
+ if guiexist (subject):
+ selectmenuitem (subject, 'mnuFile;mnuClose')
+ raise LdtpExecutionError (0)
def get_HTML_pref(cont_name,addrbook='Personal'):
try:
@@ -209,22 +189,21 @@ def get_HTML_pref(cont_name,addrbook='Personal'):
def insert_bgimage (bgimage):
try:
- check ('frmComposeamessage','mnuHTML')
+ menucheck ('frmComposeMessage','mnuHTML')
time.sleep (1)
- selectmenuitem ('frmComposeamessage','mnuFormat;mnuPage')
- waittillguiexist ('dlgFormatPage')
- remap ('evolution','dlgFormatPage')
- click ('dlgFormatPage','btnBrowse')
- waittillguiexist('uknBackgroundImage')
- time.sleep (2)
- click ('uknBackgroundImage','btnHome')
- remap ('evolution','uknBackgroundImage')
+ selectmenuitem ('frmComposeMessage','mnuFormat;mnuPage')
time.sleep (2)
- selectrow ('uknBackgroundImage','tblFiles',bgimage)
- click ('uknBackgroundImage','btnOK')
- undoremap ('evolution','uknBackgroundImage')
+ waittillguiexist ('dlgFormatPage')
+ settextvalue ('dlgFormatPage','cboBackgroundImageFilePath',os.getcwd() + os.sep + bgimage)
+# click ('dlgFormatPage','btnBrowse')
+# time.sleep (2)
+# waittillguiexist('uknBackgroundImage')
+# time.sleep (2)
+# click ('uknBackgroundImage','btnHome')
+# time.sleep (2)
+# selectrow ('uknBackgroundImage','tblFiles',bgimage)
+# click ('uknBackgroundImage','btnOK')
click ('dlgFormatPage','btnClose')
- undoremap ('evolution','dlgFormatPage')
except:
log ('could not apply BackGround Image','cause')
raise LdtpExecutionError (0)
@@ -232,38 +211,35 @@ def insert_bgimage (bgimage):
def apply_template(template):
try:
- check ('frmComposeamessage','mnuHTML')
- time.sleep (10)
- selectmenuitem ('frmComposeamessage','mnuFormat;mnuPage')
+ menucheck ('frmComposeMessage','mnuHTML')
+ time.sleep (2)
+ selectmenuitem ('frmComposeMessage','mnuFormat;mnuPage')
waittillguiexist ('dlgFormatPage')
- remap ('evolution','dlgFormatPage')
- print "after wait"
try:
- print template
comboselect ('dlgFormatPage','cboTemplate',template)
except:
log ('unable to select template','cause')
raise LdtpExecutionError (0)
click ('dlgFormatPage','btnClose')
- remap ('evolution','dlgFormatPage')
except:
log ('Could not apply template','error')
raise LdtpExecutionError (0)
-def getmailtext():
+def getmailtext(window_id = '*Compose*'):
try:
- window_id='frmComposeMessage'
if guiexist (window_id) != 1:
log ('Compose window not open','cause')
raise LdtpExecutionError (0)
numchild=getpanelchildcount(window_id,'pnlPanelcontainingHTML')
- #remap ('evolution',window_id)
+ print numchild
text=''
for val in range (6,6+numchild):
- text+=gettextvalue(window_id,'txt'+str(val))
+ print text, 'txt'+str(val)
+ temp = gettextvalue(window_id,'txt'+str(val))
+ if temp != None:
+ text += temp
text+='\n'
- #undoremap ('evolution',window_id)
except:
log ('could not get text from Compose Window','error')
raise LdtpExecutionError (0)
@@ -287,89 +263,15 @@ def getrowindex(subject):
raise LdtpExecutionError (0)
-def go_offline():
- log ('Go Offline','teststart')
- try:
- #window_id=getcurwindow()
- window_id = 'frmEvolution-*'
- #remap ('evolultion',window_id)
- flag=False
- for x in getobjectlist(window_id):
- if x == 'mnuWorkOffline':
- flag=True
- break
-
- if flag==True:
- selectmenuitem (window_id,'mnuFile;mnuWorkOffline')
- log ('going offline','info')
- else:
- log ('already offline','info')
- log ('Go Offline','testend')
- return
- #undoremap ('evolution',window_id)
- time.sleep (1)
- flag=False
- #remap ('evolution',window_id)
- for x in getobjectlist (window_id):
- if x == 'mnuWorkOnline':
- flag=True
- break
- if flag == False:
- log ('Work Online not available','cause')
- raise LdtpExecutionError (0)
- #undoremap ('evolution',window_id)
- except:
- log ('Could not go offline','error')
- log ('Go Offline','testend')
- raise LdtpExecutionError (0)
- log ('Go Offline','testend')
-
-def go_online ():
- log ('Go Online','teststart')
+def getsentmailtext(window_id='frmReadonly'):
try:
- #window_id=getcurwindow()
- window_id = 'frmEvolution-*'
- #remap ('evolultion',window_id)
- flag=False
- for x in getobjectlist(window_id):
- if x == 'mnuWorkOnline':
- flag=True
- break
-
- if flag==True:
- selectmenuitem (window_id,'mnuFile;mnuWorkOnline')
- log ('going online','info')
- else:
- log ('already online','info')
- log ('Go Online','testend')
- return
- #undoremap ('evolution',window_id)
- time.sleep (1)
- flag=False
- #remap ('evolution',window_id)
- for x in getobjectlist (window_id):
- if x == 'mnuWorkOffline':
- flag=True
- break
- if flag == False:
- log ('Work Offline not available','cause')
- raise LdtpExecutionError (0)
- #undoremap ('evolution',window_id)
- except:
- log ('Could not go Online','error')
- log ('Go Online','testend')
- raise LdtpExecutionError (0)
- log ('Go Online','testend')
-
-def getsentmailtext():
- try:
- remap ('evolution','frmReadonly')
- noofchild = getpanelchildcount ('frmReadonly','pnlPanelcontainingHTML')
-
+ noofchild = getpanelchildcount (window_id,'pnlPanelcontainingHTML1')
text=''
for textboxno in range (noofchild):
- text+=gettextvalue ('frmReadonly','txt'+str(textboxno))
+ temp = gettextvalue (window_id,'txt'+str(textboxno))
+ if temp != None:
+ text += temp
text+='\n'
if len (text) > 0:
text=text[:-1]
@@ -380,3 +282,4 @@ def getsentmailtext():
raise LdtpExecutionError (0)
+
diff --git a/evolution/evoutils/mailpreferences.py b/evolution/evoutils/mailpreferences.py
index 38d9efa..aea7753 100644
--- a/evolution/evoutils/mailpreferences.py
+++ b/evolution/evoutils/mailpreferences.py
@@ -1,6 +1,6 @@
#!/usr/bin/python
#
-# Linux Desktop Testing Project http://www.gnomebangalore.org/ldtp
+# Linux Desktop Testing Project http://ldtp.freedesktop.org
#
# Author:
# Khasim Shaheed <khasim.shaheed@gmail.com>
diff --git a/evolution/evoutils/menu_reorganization.py b/evolution/evoutils/menu_reorganization.py
index abe276d..7103022 100644
--- a/evolution/evoutils/menu_reorganization.py
+++ b/evolution/evoutils/menu_reorganization.py
@@ -1,9 +1,10 @@
#!/usr/bin/env python
#
-# Linux Desktop Testing Project http://www.gnomebangalore.org/ldtp
+# Linux Desktop Testing Project http://ldtp.freedesktop.org
#
# Author:
# Venkateswaran S <wenkat.s@gmail.com>
+# Prashanth Mohan <prashmohan@gmail.com>
#
# Copyright 2004 Novell, Inc.
#
@@ -26,8 +27,8 @@ from ldtp import *
from ldtputils import *
def selectfolder(windowname,fldr,dest=''):
-
- waittillguiexist(windowname)
+ if waittillguiexist(windowname) == 0:
+ return 0
if gettreetablerowindex (windowname, 'ttblMailFolderTree', fldr) == -1:
click(windowname,'btnNew')
time.sleep(3)
@@ -44,6 +45,7 @@ def selectfolder(windowname,fldr,dest=''):
print 'Folder Name already exist'
log('Folder Already exists','error')
selectrowpartialmatch (windowname, 'ttblMailFolderTree',fldr)
+ #waittillguiexist ('frmEvolution-'+fldr+'*')
log('Required folder selected','info')
return 1
@@ -52,10 +54,11 @@ 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')
+ #remap('evolution','frmEvolution-*')
+ if selectrowpartialmatch ('frmEvolution-*','ttblMailFolderTree',Folder_name) == 1:
+ waittillguiexist ('frmEvolution-'+Folder_name+'*')
+ log('Verify succeeded', 'pass')
+ #undoremap('evolution','frmEvolution-*')
log('Verify Folder Exists','testend')
return 1
except:
@@ -66,11 +69,13 @@ def verify_folder_exist(Folder_name):
def create_folder(Folder_name, location=''):
+ log('Create a new folder','teststart')
+ windowname = 'dlgCreatefolder'
try:
- log('Create a new folder','teststart')
- windowname = 'dlgCreatefolder'
- time.sleep(3)
- waittillguiexist (windowname)
+ if waittillguiexist (windowname) == 0:
+ log ('Create Folder Dialog did not arise','cause')
+ log('Create a new folder','testend')
+ raise LdtpExecutionError (0)
settextvalue(windowname,'txtFoldername',Folder_name)
selectrowpartialmatch ('dlgCreatefolder', 'ttblMailFolderTree',location)
log('User Value Entered','info')
@@ -82,15 +87,13 @@ def create_folder(Folder_name, location=''):
click(windowname,'btnCancel')
print 'Folder Name already exist'
log('Folder Already exists','cause')
- log('Create a new folder','testend')
- return 0
+ raise LdtpExecutionError (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
+ raise LdtpExecutionError (0)
else:
print 'Folder Creation verified'
log('Folder Verified','info')
@@ -105,15 +108,17 @@ def create_folder(Folder_name, location=''):
def copy_to (from_fldr,to_fldr):
-
+ log('Copy a folder','teststart')
+ windowname = 'dlgSelectfolder'
try:
- log('Copy a folder','teststart')
- windowname = 'dlgSelectfolder'
- remap('evolution','frmEvolution-Mail')
- if selectrowpartialmatch ('frmEvolution-Mail','ttblMailFolderTree',from_fldr) == 1:
+ if selectrowpartialmatch ('frmEvolution-*','ttblMailFolderTree',from_fldr) == 1:
+ waittillguiexist ('frmEvolution-'+from_fldr+'*')
log('From folder selected','info')
- selectmenuitem('frmEvolution-Mail','mnuFolder;mnuCopyFolderTo')
- time.sleep(3)
+ selectmenuitem('frmEvolution-*','mnuFolder;mnuCopyFolderTo')
+ if waittillguiexist (windowname) == 0:
+ log ('Select Folder did not arise','cause')
+ raise LdtpExecutionError (0)
+
if selectfolder(windowname,to_fldr) == 1:
log('Destionation folder selected')
else:
@@ -125,19 +130,14 @@ def copy_to (from_fldr,to_fldr):
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')
+ raise LdtpExecutionError (0)
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)
@@ -145,58 +145,51 @@ def copy_to (from_fldr,to_fldr):
def move_to (from_fldr,to_fldr):
+ log('move a folder','teststart')
+ windowname = 'dlgSelectfolder'
try:
- log('move a folder','teststart')
- windowname = 'dlgSelectfolder'
- remap('evolution','frmEvolution-Mail')
- if selectrowpartialmatch ('frmEvolution-Mail','ttblMailFolderTree',from_fldr) == 1:
+ if selectrowpartialmatch ('frmEvolution-*','ttblMailFolderTree',from_fldr) == 1:
+ waittillguiexist ('frmEvolution-'+from_fldr+'*')
log('From folder selected','info')
- selectmenuitem('frmEvolution-Mail','mnuFolder;mnuMoveFolderTo')
+ selectmenuitem('frmEvolution-*','mnuFolder;mnuMoveFolderTo')
+ if waittillguiexist (windowname) == 0:
+ log ('Select Folder did not arise','cause')
+ raise LdtpExecutionError (0)
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
+ raise LdtpExecutionError (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
+ raise LdtpExecutionError (0)
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:
+ #remap('evolution','frmEvolution-*')
+ if selectrowpartialmatch ('frmEvolution-*','ttblMailFolderTree',fldrname) == 1:
+ waittillguiexist ('frmEvolution-'+fldrname+'*')
log('From folder selected','info')
time.sleep (3)
- if selectmenuitem('frmEvolution-Mail','mnuFolder;mnuSelectAllMessages') == 1:
+ if selectmenuitem('frmEvolution-*','mnuFolder;mnuSelectAllMessages') == 1:
print 'All Mails have been selected'
log('All items have been selected','info')
return 1
@@ -220,7 +213,7 @@ def mark_all_read(fldrname):
try:
log('Mark all as read','teststart')
select_all(fldrname)
- if selectmenuitem('frmEvolution-Mail','mnuFolder;mnuMarkMessagesasRead') == 1:
+ if selectmenuitem('frmEvolution-*','mnuFolder;mnuMarkMessagesasRead') == 1:
print 'All messages has been marked read'
log('All items have been selected','info')
else:
@@ -235,19 +228,19 @@ def mark_all_read(fldrname):
def rename (old_name,new_name):
-
+ log('Rename a folder','teststart')
+ windowname = 'dlgRenameFolder'
try:
- log('Rename a folder','teststart')
- windowname = 'dlgRenameFolder'
- remap('evolution','frmEvolution-Mail')
- if selectrowpartialmatch ('frmEvolution-Mail','ttblMailFolderTree',old_name) == 1:
+ if selectrowpartialmatch ('frmEvolution-*','ttblMailFolderTree',old_name) == 1:
+ waittillguiexist ('frmEvolution-'+old_name+'*')
log('From folder selected','info')
- selectmenuitem('frmEvolution-Mail','mnuFolder;mnuRename')
+ selectmenuitem('frmEvolution-*','mnuFolder;mnuRename')
- time.sleep(3)
- waittillguiexist(windowname)
+ if waittillguiexist(windowname) == 0:
+ log ('Rename Folder Dialog did not arise','cause')
+ raise LdtpExecutionError (0)
+
settextvalue(windowname,'txt0',new_name)
- undoremap('evolution','frmEvolution-Mail')
click(windowname,'btnOK')
time.sleep(3)
if guiexist('dlgEvolutionError'):
@@ -257,20 +250,16 @@ def rename (old_name,new_name):
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
+ raise LdtpExecutionError (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
+ raise LdtpExecutionError (0)
except :
print 'Unable to rename'
log('Cannot rename the folder','error')
@@ -282,41 +271,33 @@ def delete_nonsys_folder (fldr):
try:
log('delete a non system folder','teststart')
- windowname = 'dlgDelete'
- defaultname = '\"Inbox/ashwin\"?'
+ windowname = 'dlgDelete*'
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)
+ selectrow ('frmEvolution-*', '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 + '\"?')
+ raise LdtpExecutionError (0)
+ selectmenuitem('frmEvolution-*','mnuFolder;mnuDelete')
time.sleep(3)
- if waittillguiexist (windowname + defaultname) == 1:
- click(windowname + defaultname, 'btnDelete')
+ if waittillguiexist (windowname) == 1:
+ click(windowname, '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
+ raise LdtpExecutionError (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')
@@ -352,11 +333,12 @@ def expunge():
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):
+ #remap('evolution','frmEvolution-*')
+ if selectrowpartialmatch ('frmEvolution-*', 'ttblMailFolderTree', fldr):
+ waittillguiexist ('frmEvolution-'+fldr+'*')
log('fldr has been selected','info')
time.sleep(2)
- if selectmenuitem('frmEvolution-Mail','mnuFolder;mnuExpunge') == 1:
+ if selectmenuitem('frmEvolution-*','mnuFolder;mnuExpunge') == 1:
log('Expunge successfull','info')
print 'Mails have been permanently removed'
else:
@@ -367,7 +349,7 @@ def expunge():
print fldr+ 'not found'
log('Unable to find trash','error')
time.sleep (2)
- if getrowcount ('frmEvolution-Mail','mnuFolder;mnuExpunge') == 0:
+ if getrowcount ('frmEvolution-*','mnuFolder;mnuExpunge') == 0:
log ('Expunge Verified','info')
else:
log ('Expunge Failed during verification','cause')
diff --git a/evolution/evoutils/password.py b/evolution/evoutils/password.py
index 94b1833..6625af4 100644
--- a/evolution/evoutils/password.py
+++ b/evolution/evoutils/password.py
@@ -1,6 +1,6 @@
#!/usr/bin/python
#
-# Linux Desktop Testing Project http://www.gnomebangalore.org/ldtp
+# Linux Desktop Testing Project http://ldtp.freedesktop.org
#
# Author:
# A. Nagappan <anagappan@novell.com>
diff --git a/evolution/expunge.py b/evolution/expunge.py
index be9a305..1b1686f 100644
--- a/evolution/expunge.py
+++ b/evolution/expunge.py
@@ -1,8 +1,9 @@
#
-# Linux Desktop Testing Project http://www.gnomebangalore.org/ldtp
+# Linux Desktop Testing Project http://ldtp.freedesktop.org
#
# Author:
# Venkateswaran S <wenkat.s@gmail.com>
+# Prashanth Mohan <prashmohan@gmail.com>
#
# Copyright 2004 Novell, Inc.
#
@@ -35,6 +36,7 @@ try:
fldr = 'Trash'
#remap('evolution','frmEvolution-Mail')
if selectrowpartialmatch ('frmEvolution-*', 'ttblMailFolderTree', fldr):
+ waittillguiexist ('frmEvolution-'+fldr+'*')
log('fldr has been selected','info')
time.sleep(2)
if selectmenuitem('frmEvolution-*','mnuFolder;mnuExpunge') == 1:
diff --git a/evolution/findandreplace.py b/evolution/findandreplace.py
index 4721234..8800059 100644
--- a/evolution/findandreplace.py
+++ b/evolution/findandreplace.py
@@ -1,6 +1,6 @@
#!/usr/bin/env python
#
-# Linux Desktop Testing Project http://www.gnomebangalore.org/ldtp
+# Linux Desktop Testing Project http://ldtp.freedesktop.org
#
# Author:
# Prashanth Mohan <prashmohan@gmail.com>
@@ -24,7 +24,7 @@
#
from mailtests import *
-
+import time
try:
data_object = LdtpDataFileParser (datafilename)
@@ -39,7 +39,8 @@ try:
#selectMailPane()
window_id='frmEvolution-*'
selectmenuitem (window_id,'mnuFile;mnuNew;mnuMailMessage')
- waittillguiexist ('frmComposeMessage')
+ waittillguiexist ('*Compose*')
+ time.sleep (2)
settextvalue ('frmComposeMessage','txt6',text[0])
except:
log ('Unable to set text','cause')
diff --git a/evolution/fltr_from_msg.py b/evolution/fltr_from_msg.py
index 56f8482..0d300cf 100644
--- a/evolution/fltr_from_msg.py
+++ b/evolution/fltr_from_msg.py
@@ -1,5 +1,5 @@
#
-# Linux Desktop Testing Project http://www.gnomebangalore.org/ldtp
+# Linux Desktop Testing Project http://ldtp.freedesktop.org
#
# Author:
# Venkateswaran S <wenkat.s@gmail.com>
@@ -82,6 +82,7 @@ def filter_from_msg(fldr,filter_on,details,then_actions,then_values):
windowname = 'dlgAddFilterRule'
log('create a filter from the existing message','teststart')
selectrowpartialmatch('frmEvolution-*','ttblMailFolderTree',fldr)
+ waittillguiexist ('frmEvolution-'+fldr+'*')
time.sleep(2)
selectrow('frmEvolution-*','ttblMessages',details)
print 'mnuMessage;mnuCreateRule;mnuFilteron'+filter_on+'*'
diff --git a/evolution/folderopswhenoffline.py b/evolution/folderopswhenoffline.py
index 940eef1..0b2a0fe 100644
--- a/evolution/folderopswhenoffline.py
+++ b/evolution/folderopswhenoffline.py
@@ -1,6 +1,6 @@
#!/usr/bin/env python
#
-# Linux Desktop Testing Project http://www.gnomebangalore.org/ldtp
+# Linux Desktop Testing Project http://ldtp.freedesktop.org
#
# Author:
# Prashanth Mohan <prashmohan@gmail.com>
@@ -38,6 +38,8 @@ try:
log ('Error while reading values for folder tests','cause')
raise LdtpExecutionError (0)
try:
+ go_offline ()
+ selectMailPane ()
create_folder_when_offline (crefolder[0],location[0])
delete_folder_when_offline (delfolder[0])
move_folder_when_offline (from_folder[0],to_folder[0])
diff --git a/evolution/folderopswhenoffline.xml b/evolution/folderopswhenoffline.xml
index 9f9c5e7..684a725 100644
--- a/evolution/folderopswhenoffline.xml
+++ b/evolution/folderopswhenoffline.xml
@@ -1,10 +1,10 @@
<?xml version="1.0"?>
<data>
- <delfolder>abacd</delfolder>
+ <delfolder>Big Files</delfolder>
<crefolder>abc</crefolder>
- <to_folder>backup</to_folder>
- <from_folder>345</from_folder>
- <oldfolder>345</oldfolder>
- <newfolder>567</newfolder>
- <location>abacd</location>
+ <to_folder>Old Mails</to_folder>
+ <from_folder>Big Files</from_folder>
+ <oldfolder>Big Files</oldfolder>
+ <newfolder>Small Files</newfolder>
+ <location>Big Files</location>
</data>
diff --git a/evolution/fonts.py b/evolution/fonts.py
index 0dcbb58..267f57e 100644
--- a/evolution/fonts.py
+++ b/evolution/fonts.py
@@ -1,6 +1,6 @@
#!/usr/bin/env python
#
-# Linux Desktop Testing Project http://www.gnomebangalore.org/ldtp
+# Linux Desktop Testing Project http://ldtp.freedesktop.org
#
# Author:
# Prashanth Mohan <prashmohan@gmail.com>
diff --git a/evolution/fonts_formatting.py b/evolution/fonts_formatting.py
index 915e455..d7dbb88 100644
--- a/evolution/fonts_formatting.py
+++ b/evolution/fonts_formatting.py
@@ -1,6 +1,6 @@
#!/usr/bin/env python
#
-# Linux Desktop Testing Project http://www.gnomebangalore.org/ldtp
+# Linux Desktop Testing Project http://ldtp.freedesktop.org
#
# Author:
# Prashanth Mohan <prashmohan@gmail.com>
diff --git a/evolution/fonts_test.py b/evolution/fonts_test.py
index 0641745..c129eb4 100644
--- a/evolution/fonts_test.py
+++ b/evolution/fonts_test.py
@@ -1,6 +1,6 @@
#!/usr/bin/env python
#
-# Linux Desktop Testing Project http://www.gnomebangalore.org/ldtp
+# Linux Desktop Testing Project http://ldtp.freedesktop.org
#
# Author:
# Prashanth Mohan <prashmohan@gmail.com>
diff --git a/evolution/formatinhtml.py b/evolution/formatinhtml.py
index d0bfb02..ed8749c 100644
--- a/evolution/formatinhtml.py
+++ b/evolution/formatinhtml.py
@@ -1,6 +1,6 @@
#!/usr/bin/env python
#
-# Linux Desktop Testing Project http://www.gnomebangalore.org/ldtp
+# Linux Desktop Testing Project http://ldtp.freedesktop.org
#
# Author:
# Prashanth Mohan <prashmohan@gmail.com>
@@ -24,4 +24,7 @@
#
from composerprefs import *
-format_in_HTML ()
+data_object = LdtpDataFileParser (datafilename)
+to = data_object.gettagvalue ('to')
+body = data_object.gettagvalue ('body')
+format_in_HTML (to,body)
diff --git a/evolution/formatinhtml.xml b/evolution/formatinhtml.xml
new file mode 100644
index 0000000..5aa8ad8
--- /dev/null
+++ b/evolution/formatinhtml.xml
@@ -0,0 +1,5 @@
+<?xml version="1.0"?>
+<data>
+ <to>abc@abc.com</to>
+ <body>Test Information Here</body>
+</data>
diff --git a/evolution/forward-mail.py b/evolution/forward-mail.py
index 904bdad..6b5abe4 100644
--- a/evolution/forward-mail.py
+++ b/evolution/forward-mail.py
@@ -1,6 +1,6 @@
#!/usr/bin/python
#
-# Linux Desktop Testing Project http://www.gnomebangalore.org/ldtp
+# Linux Desktop Testing Project http://ldtp.freedesktop.org
#
# Author:
# Nagashree <mnagashree@novell.com>
@@ -42,9 +42,11 @@ def forward_mail (source_fldr, mail_index, to, body, subject_new, cc, refimg):
change_style ('Forward', style)
# forward mail section
selectrowpartialmatch ('frmEvolution-*', 'ttblMailFolderTree', sentitems)
+ waittillguiexist ('frmEvolution-'+sent_items+'*')
time.sleep (2)
n_sentitems = getrowcount ('frmEvolution-*', 'ttblMessages')
selectrowpartialmatch ('frmEvolution-*', 'ttblMailFolderTree', source_fldr)
+ waittillguiexist ('frmEvolution-'+source_fldr+'*')
time.sleep (2)
if mail_index == -1:
mail_index = getrowcount ('frmEvolution-*', 'ttblMessages') - 1
diff --git a/evolution/forwardstyle.py b/evolution/forwardstyle.py
index beadc85..d39ec88 100644
--- a/evolution/forwardstyle.py
+++ b/evolution/forwardstyle.py
@@ -1,6 +1,6 @@
#!/usr/bin/env python
#
-# Linux Desktop Testing Project http://www.gnomebangalore.org/ldtp
+# Linux Desktop Testing Project http://ldtp.freedesktop.org
#
# Author:
# Prashanth Mohan <prashmohan@gmail.com>
diff --git a/evolution/forwardstyle.xml b/evolution/forwardstyle.xml
index 591446b..32463a7 100644
--- a/evolution/forwardstyle.xml
+++ b/evolution/forwardstyle.xml
@@ -1,5 +1,5 @@
<?xml version="1.0"?>
<data>
<fldr>Inbox</fldr>
- <subject>asd</subject>
+ <subject>Happy New year</subject> <!-- Make sure that a Mail containing the same subject is present in the folder specified in the `fldr' tag -->
</data>
diff --git a/evolution/gnome-background-image.png b/evolution/gnome-background-image.png
new file mode 100644
index 0000000..d02f6af
--- /dev/null
+++ b/evolution/gnome-background-image.png
Binary files differ
diff --git a/evolution/gooffline.py b/evolution/gooffline.py
index 141b58c..29d1caf 100644
--- a/evolution/gooffline.py
+++ b/evolution/gooffline.py
@@ -1,6 +1,6 @@
#!/usr/bin/env python
#
-# Linux Desktop Testing Project http://www.gnomebangalore.org/ldtp
+# Linux Desktop Testing Project http://ldtp.freedesktop.org
#
# Author:
# Prashanth Mohan <prashmohan@gmail.com>
@@ -24,6 +24,14 @@
#
-from evoutils.mail import *
+from evoutils import *
-go_offline()
+log ('Go Offline','teststart')
+try:
+ go_offline()
+except:
+ log ('Go Offline','fail')
+ log ('Go Offline','testend')
+ raise LdtpExecutionError (0)
+log ('Go Offline','pass')
+log ('Go Offline','testend')
diff --git a/evolution/goonline.py b/evolution/goonline.py
index bbacce0..a9201b5 100644
--- a/evolution/goonline.py
+++ b/evolution/goonline.py
@@ -1,6 +1,6 @@
#!/usr/bin/env python
#
-# Linux Desktop Testing Project http://www.gnomebangalore.org/ldtp
+# Linux Desktop Testing Project http://ldtp.freedesktop.org
#
# Author:
# Prashanth Mohan <prashmohan@gmail.com>
@@ -22,6 +22,6 @@
# Free Software Foundation, Inc., 59 Temple Place - Suite 330,
# Boston, MA 02111-1307, USA.
#
-from evoutils.mail import *
+from evoutils import *
go_online ()
diff --git a/evolution/htmlformattingcheck.py b/evolution/htmlformattingcheck.py
index ac6c09c..99409ce 100644
--- a/evolution/htmlformattingcheck.py
+++ b/evolution/htmlformattingcheck.py
@@ -1,6 +1,6 @@
#!/usr/bin/env python
#
-# Linux Desktop Testing Project http://www.gnomebangalore.org/ldtp
+# Linux Desktop Testing Project http://ldtp.freedesktop.org
#
# Author:
# Prashanth Mohan <prashmohan@gmail.com>
@@ -23,8 +23,6 @@
# 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
index 5905973..cb7df96 100644
--- a/evolution/imap-log.xml
+++ b/evolution/imap-log.xml
@@ -3,19 +3,15 @@
<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 name="compose-mail.py">
+<datafilename>compose-mail.xml</datafilename>
+<info>User data read successfull</info>
+<debug>Object definition ttblMailFolderTree not found in appmap</debug>
+<debug>Object definition ttblMailFolderTree not found in appmap</debug>
+<error>Unable to find object name: ttblMailFolderTree in appmap</error>
+<error>stopping this group execution</error>
+<cause>"'selectrowpartialmatch failed</cause>
</script>
+<groupstatus>0 test scripts passed of 1</groupstatus>
</group>
</ldtp>
diff --git a/evolution/lists.py b/evolution/lists.py
index d4f379e..5953ba5 100644
--- a/evolution/lists.py
+++ b/evolution/lists.py
@@ -1,6 +1,6 @@
#!/usr/bin/env python
#
-# Linux Desktop Testing Project http://www.gnomebangalore.org/ldtp
+# Linux Desktop Testing Project http://ldtp.freedesktop.org
#
# Author:
# Prashanth Mohan <prashmohan@gmail.com>
diff --git a/evolution/lists_test.py b/evolution/lists_test.py
index 1611a32..5c91fea 100644
--- a/evolution/lists_test.py
+++ b/evolution/lists_test.py
@@ -1,6 +1,6 @@
#!/usr/bin/env python
#
-# Linux Desktop Testing Project http://www.gnomebangalore.org/ldtp
+# Linux Desktop Testing Project http://ldtp.freedesktop.org
#
# Author:
# Prashanth Mohan <prashmohan@gmail.com>
diff --git a/evolution/mail.xml b/evolution/mail.xml
index 27cd2ee..2233e82 100644
--- a/evolution/mail.xml
+++ b/evolution/mail.xml
@@ -2,7 +2,6 @@
<ldtp>
<logfileoverwrite>1</logfileoverwrite>
<logfile>evo-testing.xml</logfile>
- <appmapfile>evolution.map</appmapfile>
<group>
<script>
<name>mailtoadd.py</name>
@@ -11,8 +10,13 @@
</group>
<group>
<script>
+ <name>replyto.py</name>
+ <data>replyto.xml</data>
+ </script>
+ </group>
+ <group>
+ <script>
<name>htmlformattingcheck.py</name>
- <data>asd.xml</data>
</script>
<script>
<name>savemail.py</name>
@@ -23,10 +27,6 @@
<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>
@@ -36,148 +36,163 @@
</script>
</group>
<group>
+ <script>
+ <name>account-setup.py</name>
+ <data>pop-account.xml</data>
+ </script>
<script>
- <name>fonts_test.py</name>
- <data>fonts_test.xml</data>
+ <name>deletemailaccount.py</name>
+ <data>deletemailaccount.xml</data>
</script>
+ </group>
+ <group>
<script>
- <name>fonts_formatting.py</name>
- <data>fonts_formatting.xml</data>
+ <name>enabledisablemailaccount.py</name>
+ <data>enabledisablemailaccount.xml</data>
</script>
+ </group>
+ <group>
<script>
- <name>lists_test.py</name>
- <data>lists_test.xml</data>
+ <name>makedefault.py</name>
+ <data>makedefault.xml</data>
</script>
+ </group>
+ <group>
<script>
- <name>template.py</name>
- <data>template.xml</data>
+ <name>formatinhtml.py</name>
+ <data>formatinhtml.xml</data>
</script>
+ </group>
+ <group>
<script>
- <name>backgroundimage.py</name>
- <data>backgroundimage.xml</data>
+ <name>forwardstyle.py</name>
+ <data>forwardstyle.xml</data>
</script>
<script>
- <name>newmail.py</name>
- <data>compose-mail.xml</data>
+ <name>emptysubjectline.py</name>
+ <data>emptysubjectline.xml</data>
</script>
<script>
- <name>checkheaders.py</name>
- <data>checkheaders.xml</data>
+ <name>onlybcc.py</name>
+ <data>emptysubjectline.xml</data>
</script>
</group>
<group>
<script>
- <name>sendmailwhenoffline.py</name>
- <data>compose-mail.xml</data>
+ <name>promptwhenexpunging.py</name>
+ <data>promptwhenexpunging.xml</data>
</script>
+ </group>
+ <group>
<script>
- <name>gooffline.py</name>
- <data>fonts_formatting.xml</data>
+ <name>addnewsign.py</name>
+ <data>addnewsign.xml</data>
</script>
+ </group>
+
+ <!-- The following scripts for Signatures cannot be executed at present for Evolution due to the bug #324241 http://bugzilla.gnome.org/show_bug.cgi?id=324241
+
+ UPDATE: The bug has been fixed and committed to CVS HEAD. It will be part of Evolution 2.7.5+ -->
+
+ <!--
+<group>
<script>
- <name>applyfilterwhenoffline.py</name>
- <data>applyfilterwhenoffline.xml</data>
+ <name>editsign.py</name>
+ <data>editsign.xml</data>
</script>
+ </group>
+ <group>
<script>
- <name>copymessagewhenoffline.py</name>
- <data>movemessagewhenoffline.xml</data>
+ <name>removesign.py</name>
+ <data>addnewsign.xml</data>
</script>
+ </group>-->
+ <group>
<script>
- <name>movemessagewhenoffline.py</name>
- <data>movemessagewhenoffline.xml</data>
+ <name>simplesearch.py</name>
+ <data>search-on-subject-sender.xml</data>
</script>
<script>
- <name>deletemessagewhenoffline.py</name>
- <data>deletemessagewhenoffline.xml</data>
+ <name>advancedsearch.py</name>
+ <data>advancedsearch.xml</data>
</script>
<script>
- <name>saveattachmentswhenoffline.py</name>
- <data>saveattachmentswhenoffline.xml</data>
+ <name>savedsearch.py</name>
+ <data>advancedsearch.xml</data>
</script>
- </group>
- <group>
<script>
- <name>folderopswhenoffline.py</name>
- <data>folderopswhenoffline.xml</data>
+ <name>searchfolder.py</name>
+ <data>advancedsearch.xml</data>
</script>
</group>
<group>
<script>
- <name>goonline.py</name>
+ <name>fonts_test.py</name>
+ <data>fonts_test.xml</data>
</script>
- </group>
- <group>
<script>
- <name>account-setup.py</name>
- <data>imap-account.xml</data>
+ <name>fonts_formatting.py</name>
+ <data>fonts_formatting.xml</data>
</script>
<script>
- <name>deletemailaccount.py</name>
- <data>deletemailaccount.xml</data>
+ <name>lists_test.py</name>
+ <data>lists_test.xml</data>
</script>
- </group>
- <group>
<script>
- <name>enabledisablemailaccount.py</name>
- <data>enabledisablemailaccount.xml</data>
+ <name>template.py</name>
+ <data>template.xml</data>
</script>
- </group>
- <group>
<script>
- <name>makedefault.py</name>
- <data>makedefault.xml</data>
+ <name>backgroundimage.py</name>
+ <data>backgroundimage.xml</data>
</script>
- </group>
- <group>
<script>
- <name>formatinhtml.py</name>
+ <name>checkheaders.py</name>
+ <data>checkheaders.xml</data>
</script>
<script>
- <name>changelanginspellcheck.py</name>
+ <name>newmail.py</name>
+ <data>compose-mail.xml</data>
</script>
</group>
<group>
<script>
- <name>forwardstyle.py</name>
- <data>forwardstyle.xml</data>
+ <name>sendmailwhenoffline.py</name>
+ <data>compose-mail.xml</data>
</script>
<script>
- <name>emptysubjectline.py</name>
- <data>emptysubjectline.xml</data>
+ <name>gooffline.py</name>
</script>
<script>
- <name>onlybcc.py</name>
- <data>emptysubjectline.xml</data>
+ <name>applyfilterwhenoffline.py</name>
+ <data>applyfilterwhenoffline.xml</data>
</script>
- </group>
- <group>
<script>
- <name>promptwhenexpunging.py</name>
- <data>promptwhenexpunging.xml</data>
+ <name>copymessagewhenoffline.py</name>
+ <data>movemessagewhenoffline.xml</data>
</script>
- </group>
- <group>
<script>
- <name>addnewsign.py</name>
- <data>addnewsign.xml</data>
+ <name>movemessagewhenoffline.py</name>
+ <data>movemessagewhenoffline.xml</data>
</script>
- </group>
- <group>
<script>
- <name>editsign.py</name>
- <data>editsign.xml</data>
+ <name>deletemessagewhenoffline.py</name>
+ <data>deletemessagewhenoffline.xml</data>
+ </script>
+ <script>
+ <name>saveattachmentswhenoffline.py</name>
+ <data>saveattachmentswhenoffline.xml</data>
</script>
</group>
<group>
<script>
- <name>removesign.py</name>
- <data>addnewsign.xml</data>
+ <name>folderopswhenoffline.py</name>
+ <data>folderopswhenoffline.xml</data>
</script>
</group>
<group>
<script>
- <name>restartevo.py</name>
- <data>makedefault.xml</data>
+ <name>goonline.py</name>
</script>
</group>
</ldtp>
diff --git a/evolution/mailaccounts.py b/evolution/mailaccounts.py
index 2d64a59..d6d362c 100644
--- a/evolution/mailaccounts.py
+++ b/evolution/mailaccounts.py
@@ -1,6 +1,6 @@
#!/usr/bin/env python
#
-# Linux Desktop Testing Project http://www.gnomebangalore.org/ldtp
+# Linux Desktop Testing Project http://ldtp.freedesktop.org
#
# Author:
# Prashanth Mohan <prashmohan@gmail.com>
@@ -26,23 +26,26 @@
from ldtp import *
from ldtputils import *
-from contact import getcurwindow
+from evoutils import *
def deletemailaccount (account_name):
log ('Delete E-Mail Account','teststart')
try:
try:
- selectmenuitem ('frmEvolution-Mail','mnuEdit;mnuPreferences')
- waittillguiexist ('dlgEvolutionSettings')
+ selectmenuitem ('frmEvolution-*','mnuEdit;mnuPreferences')
+ waittillguiexist ('dlgEvolutionPreferences')
if verifyaccountexist (account_name)== -1:
+ #account_name += ' [Default]'
+ #raw_input (account_name)
+ #if verifyaccountexist (account_name) == -1:
raise LdtpExecutionError (0)
- selectrowpartialmatch ('dlgEvolutionSettings','tblMailAccountsTable',account_name)
+ selectrowpartialmatch ('dlgEvolutionPreferences','tblMailAccounts',account_name)
except:
log ('Account not present','cause')
raise LdtpExecutionError (0)
-
+ time.sleep (3)
try:
- click ('dlgEvolutionSettings','btnRemove')
+ click ('dlgEvolutionPreferences','btnRemove')
waittillguiexist ('dlgDeleteaccount?')
click ('dlgDeleteaccount?','btnDelete')
except:
@@ -54,7 +57,7 @@ def deletemailaccount (account_name):
else:
log ('Delete Account','fail')
raise LdtpExecutionError (0)
- click ('dlgEvolutionSettings','btnClose')
+ click ('dlgEvolutionPreferences','btnClose')
except:
log ('Unable to delete account','error')
log ('Delete E-Mail Account','testend')
@@ -65,7 +68,7 @@ def deletemailaccount (account_name):
def verifyaccountexist (account_name):
try:
print account_name
- numofchild=getrowcount ('dlgEvolutionPreferences','tblMailAccounts')
+ numofchild = getrowcount ('dlgEvolutionPreferences','tblMailAccounts')
for num in range (numofchild):
if getcellvalue ('dlgEvolutionPreferences','tblMailAccounts',num,1).startswith (account_name):
print num
@@ -92,23 +95,23 @@ def enablemailaccount (account_name):
raise LdtpExecutionError (0)
try:
- selectrow ('dlgEvolutionPreferences','tblMailAccounts',name)
- time.sleep (2)
- checkrow ('dlgEvolutionPreferences','tblMailAccounts',index,0)
+ selectrowpartialmatch ('dlgEvolutionPreferences','tblMailAccounts',account_name)
+ time.sleep (10)
checkrow ('dlgEvolutionPreferences','tblMailAccounts',index,0)
except:
log ('Unable to enable Mail Account','cause')
raise LdtpExecutionError (0)
- time.sleep (2)
- #verification
+ time.sleep (5)
+ #verification -- Not valid for POP accounts
try:
selectrowpartialmatch ('frmEvolution-*','ttblMailFolderTree',account_name)
except:
- log ('Enable Account','fail')
- raise LdtpExecutionError (0)
+ log ('Account not available in Directory List','warning')
+ #raise LdtpExecutionError (0)
log ('Enable Account','pass')
- click ('dlgEvolutionSettings','btnClose')
+ click ('dlgEvolutionPreferences','btnClose')
+ waittillguinotexist ('dlgEvolutionPreferences')
except:
log ('Mail Account not enabled','error')
log ('Enable Mail Account','testend')
@@ -126,19 +129,19 @@ def disablemailaccount (account_name):
if index==-1:
raise LdtpExecutionError (0)
selectrowpartialmatch ('dlgEvolutionPreferences','tblMailAccounts',account_name)
- time.sleep (2)
+ time.sleep (10)
except:
log ('Account not present','cause')
raise LdtpExecutionError (0)
try:
uncheckrow ('dlgEvolutionPreferences','tblMailAccounts',index,0)
- uncheckrow ('dlgEvolutionPreferences','tblMailAccounts',index,0)
except:
log ('Unable to disable Mail Account','cause')
raise LdtpExecutionError (0)
- time.sleep (2)
- #verification
+ time.sleep (5)
+
+ #verification -- useless for POP accounts
try:
print account_name
@@ -147,6 +150,7 @@ def disablemailaccount (account_name):
log ('Disable Account','pass')
log ('Disable Mail Account','testend')
click ('dlgEvolutionPreferences','btnClose')
+ waittillguinotexist ('dlgEvolutionPreferences')
return
log ('Disable Account','fail')
raise LdtpExecutionError (0)
@@ -173,7 +177,11 @@ def makedefault (account_name):
raise LdtpExecutionError (0)
try:
- click ('dlgEvolutionPreferences','btnDefault')
+ try:
+ click ('dlgEvolutionPreferences','btnDefault')
+ except:
+ log ('Already Default','info')
+ return
time.sleep (2)
name=getcellvalue ('dlgEvolutionPreferences','tblMailAccounts',index,1)
desired_name=account_name+' '+'[Default]'
@@ -198,7 +206,7 @@ def restartevolution():
log ('Restart Evolution','teststart')
try:
time.sleep (3)
- window_id = 'frmEvolution-Mail'
+ window_id = 'frmEvolution-*'
remap ('evolution',window_id)
selectmenuitem (window_id,'mnuFile;mnuQuit')
waittillguinotexist (window_id)
diff --git a/evolution/mailprefs.py b/evolution/mailprefs.py
index 011eded..3726fc8 100644
--- a/evolution/mailprefs.py
+++ b/evolution/mailprefs.py
@@ -1,6 +1,6 @@
#!/usr/bin/env python
#
-# Linux Desktop Testing Project http://www.gnomebangalore.org/ldtp
+# Linux Desktop Testing Project http://ldtp.freedesktop.org
#
# Author:
# Prashanth Mohan <prashmohan@gmail.com>
@@ -59,6 +59,7 @@ def emptytrashonexit():
restartevolution()
time.sleep (3)
selectrowpartialmatch ('frmEvolution-Mail','ttblMailFolderTree','Trash')
+ waittillguiexist ('frmEvolution-Trash*)
msgs_in_trash = getrowcount ('frmEvolution-Mail','ttblMessageList')
if msgs_in_trash != 0:
log ('trash stil has some messages','cause')
diff --git a/evolution/mailsearch.py b/evolution/mailsearch.py
new file mode 100644
index 0000000..a3e88f1
--- /dev/null
+++ b/evolution/mailsearch.py
@@ -0,0 +1,219 @@
+from evoutils import *
+import re
+
+def set_query (field, query, value, window_id='dlgAdvancedSearch'):
+ remap ('evolution',window_id)
+ obj_list = getobjectlist (window_id)
+ sub_max = ''
+ txt_max = '1'
+ con_max = ''
+ for obj in obj_list:
+ if obj.startswith ('txt') and obj != 'txtSearchname':
+ txt_max = obj
+ elif obj.startswith ('cbo') and not obj.startswith ('cbospecific') and not obj.startswith ('cbowith'):
+ if obj[3] < 'A' or obj[3] > 'Z':
+ if obj > con_max:
+ con_max = obj
+ else:
+ if obj > sub_max:
+ sub_max = obj
+ comboselect (window_id, sub_max, field)
+ comboselect (window_id, con_max, query)
+ settextvalue (window_id, txt_max, value)
+
+
+def fill_search_box (dataobject, window_id='dlgAdvancedSearch'):
+ index = 1
+ constraint = []
+ name = dataobject.gettagvalue ('name')
+ settextvalue (window_id, 'txtSearchname', name[0])
+ comboselect (window_id,'cboIfanycriteriaaremet','If any criteria are met')
+ click (window_id, 'btnRemove1')
+ while True:
+ field = dataobject.gettagvalue ('field'+str(index))
+ query = dataobject.gettagvalue ('query'+str(index))
+ value = dataobject.gettagvalue ('value'+str(index))
+ if field == [] or query == [] or value == []:
+ break
+ if index != 1:
+ click (window_id, 'btnAdd')
+ set_query (field[0], query[0], value[0], window_id)
+ constraint.append ([field[0],query[0],value[0]])
+ index += 1
+
+ return constraint
+
+
+def check (constraint, row):
+ field = constraint [0]
+ query = constraint [1]
+ value = constraint [2]
+ if field == 'Subject':
+ col = 4
+ elif field == 'Sender':
+ col = 3
+ elif field == 'Attachments':
+ col = 1
+ else:
+ # cannot check. Assume correct
+ return True
+
+ val = getcellvalue ('frmEvolution-*','ttblMessages',row,col)
+
+ if col == 1 and query == 'Exist':
+ if val == 1:
+ return True
+ return False
+ elif col == 1 and query == 'Do Not Exist':
+ if val == 0:
+ return True
+ return False
+
+ val = val.lower()
+ value = value.lower()
+ #regexp = re.compile (re.escape (search_text), re.I)
+ if query == 'contains':
+ if val.find (value) != -1:#regexp.search (value):
+ return True
+ return False
+ elif query == 'does not contain':
+ if not val.find (value) == -1:#regexp.search (value):
+ return True
+ return False
+ elif query == 'is':
+ if val == value:
+ return True
+ return False
+ elif query == 'is not':
+ if val != value:
+ return True
+ return False
+ elif query == 'starts with':
+ if val.startswith(value):
+ return True
+ return False
+ elif query == 'does not start with':
+ if not val.startswith(value):
+ return True
+ return False
+ elif query == 'ends with':
+ if val.endswith (value):
+ return True
+ return False
+ elif query == 'does not end with':
+ if not val.endswith (value):
+ return True
+ return False
+
+ #query not support assume True
+ return True
+
+
+def check_constraints (constraint):
+ total_count = getrowcount ('frmEvolution-*','ttblMessages')
+
+ for val in range (total_count):
+ print val
+ for con in constraint:
+ if check (con,val):
+ continue
+ return False
+ return True
+
+
+def advanced_search (dataobject):
+ try:
+ log ('Advanced Search','teststart')
+ selectmenuitem ('frmEvolution-*','mnuSearch;mnuAdvancedSearch')
+ waittillguiexist ('dlgAdvancedSearch')
+ const = fill_search_box (dataobject,'dlgAdvancedSearch')
+ click ('dlgAdvancedSearch', 'btnOK')
+ waittillguinotexist ('dlgAdvancedSearch')
+ #time.sleep (5)
+ if check_constraints (const):
+ click ('frmEvolution-*','btnClear')
+ log ('Advanced Search','pass')
+
+ else:
+ click ('frmEvolution-*','btnClear')
+ log ('Check failed','cause')
+ raise LdtpExecutionError (0)
+ except:
+ log ('Advanced Search','fail')
+ log ('Advanced Search','testend')
+ raise LdtpExecutionError (0)
+ log ('Advanced Search','testend')
+
+
+def saved_search (dataobject):
+ try:
+ log ('Saved Search','teststart')
+ selectmenuitem ('frmEvolution-*','mnuSearch;mnuSaveSearch')
+ waittillguiexist ('dlgSaveSearch')
+
+ objlist = getobjectlist ('frmEvolution-*')
+ max_val = 0
+ for obj in objlist:
+ if obj.startswith ('mnu'):
+ if obj[3] < '0' or obj[3] > '9':
+ continue
+ if len(obj) != 4:
+ continue
+ val = int (obj[3])
+ if max_val < val:
+ max_val = val
+ raw_input (str(max_val))
+ const = fill_search_box (dataobject,'dlgSaveSearch')
+ click ('dlgSaveSearch', 'btnOK')
+ waittillguinotexist ('dlgSaveSearch')
+ time.sleep (5)
+ remap ('evolution','frmEvolution-*')
+ selectmenuitem ('frmEvolution-*','mnuSearch;mnu'+str(max_val+1))
+ time.sleep (5)
+ if check_constraints (const):
+ click ('frmEvolution-*','btnClear')
+ log ('Saved Search','pass')
+ else:
+ click ('frmEvolution-*','btnClear')
+ log ('Check failed','cause')
+ raise LdtpExecutionError (0)
+ except:
+ click ('frmEvolution-*','btnClear')
+ log ('Saved Search','fail')
+ log ('Saved Search','testend')
+ raise LdtpExecutionError (0)
+ log ('Saved Search','testend')
+
+
+def search_folder (dataobject):
+ try:
+ log ('Search Folder','teststart')
+ selectmenuitem ('frmEvolution-*','mnuSearch;mnuCreateSearchFolderFromSearch')
+ window_id = 'dlgNewSearchFolder'
+ waittillguiexist (window_id)
+
+ const = fill_search_box (dataobject,window_id)
+ name = dataobject.gettagvalue ('name')
+ click (window_id, 'btnOK')
+ waittillguinotexist (window_id)
+ time.sleep (5)
+
+ try:
+ selectrowpartialmatch ('frmEvolution-*','ttblMailFolderTree',name[0])
+ except:
+ log ('Search Folder not available','cause')
+ raise LdtpExecutionError (0)
+
+ if check_constraints (const):
+ click ('frmEvolution-*','btnClear')
+ log ('Search Folder','pass')
+ else:
+ click ('frmEvolution-*','btnClear')
+ log ('Check failed','cause')
+ raise LdtpExecutionError (0)
+ except:
+ click ('frmEvolution-*','btnClear')
+ log ('Search Folder','fail')
+ log ('Search Folder','testend')
+ raise LdtpExecutionError (0)
+ log ('Search Folder','testend')
diff --git a/evolution/mailtests.py b/evolution/mailtests.py
index 3786e30..e3a5275 100644
--- a/evolution/mailtests.py
+++ b/evolution/mailtests.py
@@ -1,6 +1,6 @@
#!/usr/bin/env python
#
-# Linux Desktop Testing Project http://www.gnomebangalore.org/ldtp
+# Linux Desktop Testing Project http://ldtp.freedesktop.org
#
# Author:
# Prashanth Mohan <prashmohan@gmail.com>
@@ -24,61 +24,49 @@
#
from contact import *
+from evoutils import *
from evoutils.mail import *
from evoutils.mailpreferences import *
from evoutils.composemail import *
from ldtp import *
from ldtputils import *
-import os
+import os, time
def htmlformatting():
log ('Check if formatting elements get disabled when HTML setting is off','teststart')
try:
selectMailPane()
- #window_id=getcurwindow()
- window_id='frmEvolution-Mail'
+ window_id = get_window()
selectmenuitem (window_id,'mnuFile;mnuNew;mnuMailMessage')
- waittillguiexist ('frmComposeMessage')
+ waittillguiexist ('*ComposeMessage')
time.sleep (1)
- uncheck ('frmComposeMessage','mnuHTML')
- if verifycheck ('frmComposeMessage','mnuHTML')==0:
- if stateenabled ('frmComposeMessage','tbtnTypewriter')==1 or stateenabled ('frmComposeMessage','tbtnBold')==1 or stateenabled ('frmComposeMessage','tbtnItalic')==1 or stateenabled ('frmComposeMessage','tbtnStrikeout')==1:
- log ('text formatting is enabled','cause')
- raise LdtpExecutionError(0)
- elif stateenabled ('frmComposeMessage','btnImage') == 1 or stateenabled ('frmComposeMessage','btnRule') == 1 or stateenabled ('frmComposeMessage','btnLink') == 1 or stateenabled ('frmComposeMessage','btnTable') == 1:
- log ('Inserting Objects is enabled','cause')
- raise LdtpExecutionError(0)
-# elif stateenabled ('frmComposeMessage','rbtnLeftalign')==1 or stateenabled ('frmComposeMessage','rbtnRightalign')==1 or stateenabled ('frmComposeMessage','rbtnCenter')==1:
-# log ('aligning buttons enabled','cause')
-# raise LdtpExecutionError (0)
-# elif stateenabled ('frmComposeMessage','btnUnindent')==1 or stateenabled ('frmComposeMessage','btnIndent')==1:
-# log ('indentation buttons enabled','cause')
-# raise LdtpExecutionError (0)
- else:
- log ('UnChecking HTML menu failed','error')
- raise LdtpExecutionError (0)
- selectmenuitem ('frmComposeMessage','mnuFile;mnuClose')
+ menuuncheck ('*ComposeMessage','mnuHTML')
+ if stateenabled ('*ComposeMessage','tbtnTypewriter')==1 or stateenabled ('*ComposeMessage','tbtnBold')==1 or stateenabled ('*ComposeMessage','tbtnItalic')==1 or stateenabled ('*ComposeMessage','tbtnStrikeout')==1:
+ log ('text formatting is enabled','cause')
+ raise LdtpExecutionError(0)
+# elif stateenabled ('*ComposeMessage','btnImage') == 1 or stateenabled ('*ComposeMessage','btnRule') == 1 or stateenabled ('*ComposeMessage','btnLink') == 1 or stateenabled ('*ComposeMessage','btnTable') == 1:
+# log ('Inserting Objects is enabled','cause')
+# raise LdtpExecutionError(0)
+ selectmenuitem ('*ComposeMessage','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','fail')
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','pass')
log ('Check if formatting elements get disabled when HTML setting is off','testend')
-def savemail(savemethod,to, subject=[], body=[], cc=[], bcc=[], attachment=[], draftfolder='Drafts'):
+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)
+ selectrowpartialmatch ('frmEvolution-*', 'ttblMailFolderTree', draftfolder)
+ waittillguiexist ('frmEvolution-'+draftfolder+'*')
time.sleep (2)
- undoremap ('evolution','frmEvolution-Mail')
- remap ('evolution','frmEvolution-Mail')
- draft_mail_count = getrowcount ('frmEvolution-Mail', 'ttblMessages')
+ draft_mail_count = getrowcount ('frmEvolution-*', 'ttblMessages')
print "Draft count:",draft_mail_count
- undoremap ('evolution','frmEvolution-Mail')
compose (to, subject, body, cc,bcc, attachment)
- savethismail (savemethod)
+ savethismail (savemethod, get_mail_name (subject[0]))
testsavemail (draft_mail_count,savemethod)
except:
log ('Saving Mail failed','error')
@@ -90,15 +78,15 @@ def savemail(savemethod,to, subject=[], body=[], cc=[], bcc=[], attachment=[], d
def testsavemail(draft_count,savemethod):
log ('Verification for save mail','teststart')
try:
- if savemethod==0:
- new_draft_count=getrowcount ('frmEvolution-Mail','ttblMessages')
+ if savemethod == 0:
+ new_draft_count=getrowcount ('frmEvolution-*','ttblMessages')
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:
+ elif savemethod == 1:
home=os.environ.get('HOME')
if os.path.isfile(home+os.sep+'testfile')==True:
log ('Save Mail','pass')
@@ -107,52 +95,58 @@ def testsavemail(draft_count,savemethod):
raise LdtpExecutionError (0)
except:
log ('Save mail could not be verified','error')
+ log ('Verification for save mail','fail')
log ('Verification for save mail','testend')
raise LdtpExecutionError (0)
+ log ('Verification for save mail','pass')
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')
+ selectrowpartialmatch ('frmEvolution-*', 'ttblMailFolderTree', 'Outbox')
time.sleep (2)
- outbox_mail_count = getrowcount ('frmEvolution-Mail', 'ttblMessages')
- selectrowpartialmatch ('frmEvolution-Mail', 'ttblMailFolderTree', 'Sent')
+ waittillguiexist ('frmEvolution-Outbox*')
+ outbox_mail_count = getrowcount ('frmEvolution-*', 'ttblMessages')
+ selectrowpartialmatch ('frmEvolution-*', 'ttblMailFolderTree', 'Sent')
time.sleep (2)
- sent_mail_count = getrowcount ('frmEvolution-Mail', 'ttblMessages')
+ waittillguiexist ('frmEvolution-Sent*')
+ sent_mail_count = getrowcount ('frmEvolution-*', 'ttblMessages')
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', 'ttblMessages')
- if new_outbox_mail_count==outbox_mail_count+1:
+ selectrowpartialmatch ('frmEvolution-*', 'ttblMailFolderTree', 'Outbox')
+ waittillguiexist ('frmEvolution-Outbox*')
+ time.sleep (10)
+ new_outbox_mail_count = getrowcount ('frmEvolution-*', 'ttblMessages')
+ print 'Old:',outbox_mail_count, 'New: ',new_outbox_mail_count
+ 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')
+
+ go_online ()
time.sleep (1)
+
try:
- click ('frmEvolution-Mail', 'btnSend/Receive')
+ click ('frmEvolution-*', 'btnSend/Receive')
+ waittillguiexist ('dlgSend&ReceiveMail')
waittillguinotexist ('dlgSend&ReceiveMail')
- time.sleep (5)
+ time.sleep (3)
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', 'ttblMessages')
+ selectrowpartialmatch ('frmEvolution-*', 'ttblMailFolderTree', 'Sent')
+ waittillguiexist ('frmEvolution-Sent*')
+ time.sleep (2)
+ new_sent_mail_count = getrowcount ('frmEvolution-*', 'ttblMessages')
if new_sent_mail_count==sent_mail_count+new_outbox_mail_count:
log ('Message sent','info')
log ('Send Mail while offline Succeeded','info')
@@ -160,21 +154,22 @@ def sendmailwhenoffline (to=[], subject=[], body=[], cc=[], bcc=[], attachment=[
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','fail')
log ('Sending mail when evolution is offline','testend')
raise LdtpExecutionError (0)
+ log ('Sending mail when evolution is offline','pass')
log ('Sending mail when evolution is offline','testend')
-def closecomposewindow(state):
+def closecomposewindow(state, window_id='frmComposeMessage'):
""" state == 0 --> Discard Message
state == 1 --> Cancel Dialog
state == 2 --> Save Message"""
log ('Close compose window','teststart')
try:
- if guiexist ('frmComposeMessage') == 0:
+ if guiexist (window_id) == 0:
log ('Compose window not open','cause')
raise LdtpExecutionError (0)
except:
@@ -182,7 +177,7 @@ def closecomposewindow(state):
raise LdtpExecutionError (0)
try:
- selectmenuitem ('frmComposeMessage','mnuFile;mnuClose')
+ selectmenuitem (window_id,'mnuFile;mnuClose')
time.sleep (2)
if guiexist ('dlgWarning*')==1:
if state==0:
@@ -202,7 +197,7 @@ def closecomposewindow(state):
log ('Close compose window','fail')
log ('Close compose window','testend')
raise LdtpExecutionError (0)
- #waittillguinotexist ('frmComposeMessage')
+ waittillguinotexist (window_id)
time.sleep (2)
log ('Close compose window','pass')
log ('Close compose window','testend')
@@ -211,8 +206,8 @@ def closecomposewindow(state):
def checkheaders(ref_image):
log ('Check Compose window header boxes','teststart')
try:
- #window_id=getcurwindow()
- selectmenuitem ('frmEvolution-*','mnuFile;mnuNew;mnuMailMessage')
+ window_id=getcurwindow()
+ selectmenuitem ('window_id','mnuFile;mnuNew;mnuMailMessage')
waittillguiexist ('frmComposeMessage')
except:
log ('could not open Mail Editor','cause')
@@ -220,11 +215,11 @@ def checkheaders(ref_image):
raise LdtpExecutionError (0)
try:
- check ('frmComposeMessage','mnuFromField')
- check ('frmComposeMessage','mnuPost-ToField')
- check ('frmComposeMessage','mnuReply-ToField')
- check ('frmComposeMessage','mnuCcField')
- check ('frmComposeMessage','mnuBccField')
+ menucheck ('frmComposeMessage','mnuFromField')
+ menucheck ('frmComposeMessage','mnuPost-ToField')
+ menucheck ('frmComposeMessage','mnuReply-ToField')
+ menucheck ('frmComposeMessage','mnuCcField')
+ menucheck ('frmComposeMessage','mnuBccField')
except:
log ('error while selecting fields','cause')
log ('Check Compose window header boxes','testend')
@@ -240,6 +235,11 @@ def checkheaders(ref_image):
try:
if imagecompare (ref_image,'IMAGES/cur_mail.png') < 1.0:
log ('Header fields ','pass')
+ menuuncheck ('frmComposeMessage','mnuFromField')
+ menuuncheck ('frmComposeMessage','mnuPost-ToField')
+ menuuncheck ('frmComposeMessage','mnuReply-ToField')
+ menuuncheck ('frmComposeMessage','mnuCcField')
+ menuuncheck ('frmComposeMessage','mnuBccField')
selectmenuitem ('frmComposeMessage','mnuFile;mnuClose')
else:
log ('Header fields ','fail')
@@ -249,49 +249,44 @@ def checkheaders(ref_image):
log ('Header fields do not match','warning')
log ('Check Compose window header boxes','testend')
raise LdtpExecutionError (0)
- #selectmenuitem ('frmComposeMessage','mnuFile;mnuClose')
log ('Check Compose window header boxes','testend')
def add_to_replytofield(replyto,to):
log ('Add to reply-to field','teststart')
try:
- #selectMailPane()
+ selectMailPane()
window_id='frmEvolution-*'
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,'ttblMessages')
+ waittillguiexist ('frmEvolution-Sent*')
+ sent_mail_count = getrowcount (window_id,'ttblMessages')
selectmenuitem (window_id,'mnuFile;mnuNew;mnuMailMessage')
+ time.sleep (5)
waittillguiexist ('frmComposeMessage')
- populate_mail_header (to,subject,body)
- check ('frmComposeMessage','mnuReply-ToField')
- settextvalue ('frmComposeMessage','txtReply-To',replyto)
+ sub = populate_mail_header (to,subject,body)
+ menucheck (sub,'mnuReply-ToField')
+ settextvalue (sub,'txtReply-To',replyto)
sendmail (subject)
- click ('frmEvolution-*', 'btnSend/Receive')
- waittillguinotexist ('dlgSend*')
+ click (window_id, 'btnSend/Receive')
+ waittillguiexist ('dlgSend&ReceiveMail')
+ waittillguinotexist ('dlgSend&ReceiveMail')
time.sleep (5)
- #click ('frmComposeMessage','btnSend')
- #releasecontext ()
- #undoremap ('evolution',window_id)
- #remap ('evolution',window_id)
- new_sent_mail_count=getrowcount (window_id,'ttblMessages')
- if new_sent_mail_count!=sent_mail_count+1:
+ new_sent_mail_count = getrowcount (window_id,'ttblMessages')
+ print 'NEW :: ',new_sent_mail_count, 'OLD :: ',sent_mail_count
+ if new_sent_mail_count < sent_mail_count + 1:
log ('Message not sent','cause')
raise LdtpExecutionError (0)
selectrowindex(window_id,'ttblMessages',sent_mail_count)
selectmenuitem (window_id,'mnuMessage;mnuPostaReply')
- #setcontext ('Compose Message','Re: '+subject[0])
- waittillguiexist ('frmRe*')
- if gettextvalue ('frmRe*','txtTo') != replyto:
+ waittillguiexist ('frmRe:*')
+ if gettextvalue ('frmRe:*','txtTo') != replyto:
log ('To field does not have replyto address','cause')
raise LdtpExecutionError (0)
- selectmenuitem ('frmRe*','mnuFile;mnuClose')
+ menuuncheck (sub,'mnuReply-ToField')
+ selectmenuitem ('frmRe:*','mnuFile;mnuClose')
log ('Reply to Field','pass')
- #undoremap ('evolution',window_id)
except:
log ('Reply to Field','fail')
log ('Add to reply-to field','testend')
@@ -304,20 +299,20 @@ def background_image_test (to,bgimage,ref_image):
try:
subject=['background image test']
body=['background image test']
- #selectMailPane()
+ selectMailPane()
window_id='frmEvolution-*'
time.sleep (2)
- #remap ('evolution',window_id)
selectrowpartialmatch (window_id,'ttblMailFolderTree','Sent')
- sent_mail_count=getrowcount (window_id,'ttblMessages')
+ waittillguiexist ('frmEvolution-Sent*')
+ sent_mail_count = getrowcount (window_id,'ttblMessages')
selectmenuitem (window_id,'mnuFile;mnuNew;mnuMailMessage')
waittillguiexist ('frmComposeMessage')
populate_mail_header ([to],subject,body)
- insert_bgimage (bgimage)
+ insert_bgimage (bgimage[0])
sendmail (subject)
click (window_id, 'btnSend/Receive')
+ waittillguiexist ('dlgSend&ReceiveMail')
waittillguinotexist ('dlgSend&ReceiveMail')
- #remap ('evolution',window_id)
new_sent_mail_count=getrowcount (window_id,'ttblMessages')
if new_sent_mail_count < sent_mail_count+1:
log ('Could not send mail','cause')
@@ -327,14 +322,12 @@ def background_image_test (to,bgimage,ref_image):
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')
@@ -348,22 +341,19 @@ def template_test(to,template,ref_image):
subject=['template test']
body=['template test\ntemplate test\ntemplate test\ntemplate test\n']
selectMailPane()
- window_id='frmEvolution-Mail'
- #remap ('evolution',window_id)
+ window_id='frmEvolution-*'
selectrowpartialmatch (window_id,'ttblMailFolderTree','Sent')
- sent_mail_count=getrowcount (window_id,'ttblMessages')
+ waittillguiexist ('frmEvolution-Sent*')
+ sent_mail_count = getrowcount (window_id,'ttblMessages')
selectmenuitem (window_id,'mnuFile;mnuNew;mnuMailMessage')
waittillguiexist ('frmComposeMessage')
populate_mail_header ([to],subject,body)
apply_template (template)
sendmail (subject)
- click ('frmEvolution-Mail', 'btnSend/Receive')
+ click ('frmEvolution-*', 'btnSend/Receive')
+ waittillguiexist ('dlgSend&ReceiveMail')
waittillguinotexist ('dlgSend&ReceiveMail')
- time.sleep (5)
- releasecontext()
- #undoremap ('evolution',window_id)
- #remap ('evolution',window_id)
- new_sent_mail_count=getrowcount (window_id,'ttblMessages')
+ new_sent_mail_count = getrowcount (window_id,'ttblMessages')
if new_sent_mail_count < sent_mail_count+1:
log ('Could not send mail','cause')
raise LdtpExecutiontionError (0)
@@ -373,13 +363,12 @@ def template_test(to,template,ref_image):
raise LdtpExecutionError (0)
try:
if verifymailwithimage ('Sent',sent_mail_count,ref_image) ==1:
- log ('Backgroung Image ','pass')
+ log ('Template Test','pass')
else:
- log ('Background Image ','fail')
+ log ('Template Test','fail')
raise LdtpExecutionError(0)
- #undoremap ('evolution',window_id)
except:
- log ('Background image test did not pass','error')
+ log ('Template test did not pass','error')
log ('applying templates','testend')
raise LdtpExecutionError (0)
log ('applying templates','testend')
@@ -388,20 +377,22 @@ def template_test(to,template,ref_image):
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 ('frmComposeMessage')
text = getmailtext()
grabfocus ('frmComposeMessage','txt6')
+ #selectmenuitem ('frmComposeMessage','mnuEdit;mnuSelectAll')
selectmenuitem ('frmComposeMessage','mnuEdit;mnuReplace')
waittillguiexist ('dlgReplace')
settextvalue ('dlgReplace','txtReplace',replace)
settextvalue ('dlgReplace','txtWith',with)
- click ('dlgReplace','btnFindandReplace')
- time.sleep (1)
+ click ( 'dlgReplace','btnFindandReplace')
+ waittillguinotexist ('dlgReplace')
+ time.sleep (2)
if guiexist('dlgReplaceconfirmation')==1:
click ('dlgReplaceconfirmation','btnReplaceAll')
+ waittillguinotexist ('dlgReplaceconfirmation')
+
+ print 'TEXT:',text
+ print 'NEWTEXT:',getmailtext()
if getmailtext() == text.replace (replace,with):
log ('Find and Replace','pass')
else:
@@ -417,14 +408,12 @@ def find_and_replace_test(replace,with):
def undo_redo_test():
log ('Undo and Redo','teststart')
try:
- window_id='frmComposeMessage'
- numchild=getpanelchildcount(window_id,'pnlPanelcontainingHTML')
- present_text=getmailtext()
+ window_id = 'frmComposeMessage'
+ 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()
+ added_text = getmailtext()
try:
selectmenuitem (window_id,'mnuEdit;mnuUndo')
@@ -432,7 +421,7 @@ def undo_redo_test():
log ('Undo Button is not active','cause')
raise LdtpExecutionError (0)
- undoed_text=getmailtext()
+ undoed_text = getmailtext()
if undoed_text == present_text:
log ('Undo','pass')
@@ -446,7 +435,7 @@ def undo_redo_test():
log ('Redo Button is not active','cause')
raise LdtpExecutionError (0)
- redoed_text=getmailtext()
+ redoed_text = getmailtext()
if redoed_text == added_text :
log ('Redo','pass')
@@ -472,7 +461,7 @@ def spell_check_test(method):
log ('Spell Check','teststart')
try:
window_id='dlgSpellchecker'
- selectmenuitem ('frmComposeMessage','mnuEdit;mnuSpellCheckDocument')
+ selectmenuitem ('frmComposeMessage','mnuEdit;mnuCheckSpelling')
time.sleep (2)
addwords=[]
if guiexist ('dlgInformation')==1:
@@ -488,7 +477,7 @@ def spell_check_test(method):
if objects.startswith ('tbl'):
obj=objects
break
- repl=getrowcount (window_id,obj)
+ repl = getrowcount (window_id,obj)
if method==0:
if repl>0:
@@ -511,7 +500,6 @@ def spell_check_test(method):
time.sleep (1)
#verification of the above code
-
if method == 3:
present_text=gettextvalue ('frmComposeMessage','txt6')
text=''
@@ -525,7 +513,7 @@ def spell_check_test(method):
#verification for all 3 methods
- selectmenuitem ('frmComposeMessage','mnuEdit;mnuSpellCheckDocument')
+ selectmenuitem ('frmComposeMessage','mnuEdit;mnuCheckSpelling')
time.sleep (2)
if guiexist ('dlgInformation')==1 and method in [0,1,3]:
@@ -533,6 +521,7 @@ def spell_check_test(method):
log ('Spell Check','pass')
elif guiexist (window_id) == 1 and method == 2:
click (window_id,'btnClose')
+ waittillguinotexist (window_id)
log ('Spell Check','pass')
else:
log ('Verification of Spell check failed','cause')
@@ -541,9 +530,11 @@ def spell_check_test(method):
if method==3:
settextvalue ('frmComposeMessage','txt6',present_text)
+
elif guiexist (window_id) == 1 and method == 4:
click (window_id,'btnClose')
+ waittillguinotexist (window_id)
time.sleep (1)
if guiexist (window_id) == 0:
@@ -554,7 +545,6 @@ def spell_check_test(method):
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:
@@ -566,22 +556,17 @@ def spell_check_test(method):
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)
@@ -594,6 +579,7 @@ def spell_check_test(method):
obj=obj[:obj.find('\'')]
new_word = obj
click (window_id,'btnClose')
+ waittillguinotexist (window_id)
if new_word != last_word:
log ('Back does not lead to last misspelt word','cause')
@@ -609,49 +595,35 @@ def text_formatting_test(to,ref_image):
log ('text formatting','teststart')
try:
subject=['bold,italic,strikethrough test']
- #selectMailPane()
+ selectMailPane()
window_id='frmEvolution-*'
- #remap ('evolution',window_id)
selectrowpartialmatch (window_id,'ttblMailFolderTree','Sent')
+ waittillguiexist ('frmEvolution-Sent*')
sent_mail_count=getrowcount (window_id,'ttblMessages')
selectmenuitem (window_id,'mnuFile;mnuNew;mnuMailMessage')
waittillguiexist ('frmComposeMessage')
- check ('frmComposeMessage','mnuHTML')
+ menucheck ('frmComposeMessage','mnuHTML')
time.sleep (1)
selectmenuitem ('frmComposeMessage','mnuFormat;mnuStyle;mnuBold')
settextvalue ('frmComposeMessage','txt6','Hello\n')
- #remap ('evolution','frmComposeMessage')
selectmenuitem ('frmComposeMessage','mnuFormat;mnuStyle;mnuItalic')
settextvalue ('frmComposeMessage','txt7','Hello\n')
- #undoremap ('evolution','frmComposeMessage')
- #remap ('evolution','frmComposeMessage')
- #selectmenuitem ('frmComposeMessage','mnuFormat;mnuStyle;mnuItalic')
settextvalue ('frmComposeMessage','txt8','Hello\n')
- #undoremap ('evolution','frmComposeMessage')
- #remap ('evolution','frmComposeMessage')
- selectmenuitem ('frmComposeMessage','mnuFormat;mnuStyle;mnuStrikeout')
+ selectmenuitem ('frmComposeMessage','mnuFormat;mnuStyle;mnuStrikethrough')
settextvalue ('frmComposeMessage','txt9','Hello\n')
- #undoremap ('evolution','frmComposeMessage')
- #remap ('evolution','frmComposeMessage')
settextvalue ('frmComposeMessage','txt10','Hello')
selectmenuitem ('frmComposeMessage','mnuFormat;mnuAlignment;mnuCenter')
settextvalue ('frmComposeMessage','txt10','Hello\n')
- #undoremap ('evolution','frmComposeMessage')
- #remap ('evolution','frmComposeMessage')
settextvalue ('frmComposeMessage','txt11','Hello')
selectmenuitem ('frmComposeMessage','mnuFormat;mnuAlignment;mnuRight')
settextvalue ('frmComposeMessage','txt11','Hello\n')
- #undoremap ('evolution','frmComposeMessage')
populate_mail_header ([to],subject)
- #undoremap ('evolution',window_id)
sendmail (subject)
- click ('frmEvolution-Mail', 'btnSend/Receive')
+ click ('frmEvolution-*', 'btnSend/Receive')
+ waittillguiexist ('dlgSend&ReceiveMail')
waittillguinotexist ('dlgSend&ReceiveMail')
time.sleep (5)
- releasecontext()
- #undoremap ('evolution',window_id)
- #remap ('evolution',window_id)
- new_sent_mail_count=getrowcount (window_id,'ttblMessages')
+ new_sent_mail_count = getrowcount (window_id,'ttblMessages')
if new_sent_mail_count < sent_mail_count+1:
log ('Could not send mail','cause')
raise LdtpExecutiontionError (0)
@@ -660,12 +632,11 @@ def text_formatting_test(to,ref_image):
log ('text formatting','testend')
raise LdtpExecutionError (0)
try:
- if verifymailwithimage ('Sent',sent_mail_count,ref_image) ==1:
+ if verifymailwithimage ('Sent',sent_mail_count,ref_image, subject) ==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')
@@ -677,37 +648,29 @@ def lists_test(to,ref_image):
log ('numbered,alphabetic,bulleted lists','teststart')
try:
subject=['Compose editor List test']
- #selectMailPane()
+ selectMailPane()
window_id='frmEvolution-*'
- #selectmenuitem (window_id,'mnuFile;mnuNew;mnuMailMessage')
selectrowpartialmatch (window_id,'ttblMailFolderTree','Sent')
- #remap ('evolution',window_id)
+ waittillguiexist ('frmEvolution-Sent*')
sent_mail_count=getrowcount (window_id,'ttblMessages')
selectmenuitem (window_id,'mnuFile;mnuNew;mnuMailMessage')
waittillguiexist ('frmComposeMessage')
- check ('frmComposeMessage','mnuHTML')
+ menucheck ('frmComposeMessage','mnuHTML')
time.sleep (1)
selectmenuitem ('frmComposeMessage','mnuFormat;mnuHeading;mnuBulletedList')
settextvalue ('frmComposeMessage','txt6','Hello\nHello\nHello\n')
- #remap ('evolution','frmComposeMessage')
selectmenuitem ('frmComposeMessage','mnuFormat;mnuHeading;mnuNumberedList')
settextvalue ('frmComposeMessage','txt9','Hello\nHello\nHello\n')
- #undoremap ('evolution','frmComposeMessage')
- #remap ('evolution','frmComposeMessage')
selectmenuitem ('frmComposeMessage','mnuFormat;mnuHeading;mnuAlphabeticalList')
settextvalue ('frmComposeMessage','txt12','Hello\nHello\nHello\n')
- #undoremap ('evolution','frmComposeMessage')
- #remap ('evolution','frmComposeMessage')
selectmenuitem ('frmComposeMessage','mnuFormat;mnuHeading;mnuRomanNumeralList')
settextvalue ('frmComposeMessage','txt15','Hello\nHello\nHello\n')
- #undoremap ('evolution','frmComposeMessage')
populate_mail_header ([to],subject)
sendmail (subject)
- click ('frmEvolution-Mail', 'btnSend/Receive')
+ click ('frmEvolution-*', 'btnSend/Receive')
+ waittillguiexist ('dlgSend&ReceiveMail')
waittillguinotexist ('dlgSend&ReceiveMail')
- #remap ('evolution',window_id)
time.sleep (5)
- releasecontext()
new_sent_mail_count=getrowcount (window_id,'ttblMessages')
if new_sent_mail_count < sent_mail_count+1:
log ('Could not send mail','cause')
@@ -717,7 +680,7 @@ def lists_test(to,ref_image):
log ('numbered,alphabetic,bulleted lists','testend')
raise LdtpExecutionError (0)
try:
- if verifymailwithimage ('Sent',sent_mail_count,ref_image) ==1:
+ if verifymailwithimage ('Sent',sent_mail_count,ref_image, subject) == 1:
log ('Text Formatting ','pass')
else:
log ('Text Formatting ','fail')
@@ -734,37 +697,28 @@ def fonts_test(to,ref_image):
log ('Fonts Test','teststart')
try:
subject=['Compose editor Fonts test']
- #selectMailPane()
+ selectMailPane()
window_id='frmEvolution-*'
- #selectmenuitem (window_id,'mnuFile;mnuNew;mnuMailMessage')
- #remap ('evolution',window_id)
selectrowpartialmatch (window_id,'ttblMailFolderTree','Sent')
- #remap ('evolution',window_id)
+ waittillguiexist ('frmEvolution-Sent*')
sent_mail_count=getrowcount (window_id,'ttblMessages')
selectmenuitem (window_id,'mnuFile;mnuNew;mnuMailMessage')
waittillguiexist ('frmComposeMessage')
- check ('frmComposeMessage','mnuHTML')
+ menucheck ('frmComposeMessage','mnuHTML')
time.sleep (1)
settextvalue ('frmComposeMessage','txt6','Hello\n')
- #remap ('evolution','frmComposeMessage')
selectmenuitem ('frmComposeMessage','mnuFormat;mnuFontSize;mnu+1')
settextvalue ('frmComposeMessage','txt7','Hello\n')
- #undoremap ('evolution','frmComposeMessage')
- #remap ('evolution','frmComposeMessage')
selectmenuitem ('frmComposeMessage','mnuFormat;mnuFontSize;mnu+2')
settextvalue ('frmComposeMessage','txt8','Hello\n')
- #undoremap ('evolution','frmComposeMessage')
- #remap ('evolution','frmComposeMessage')
selectmenuitem ('frmComposeMessage','mnuFormat;mnuFontSize;mnu+3')
settextvalue ('frmComposeMessage','txt9','Hello\n')
- #undoremap ('evolution','frmComposeMessage')
populate_mail_header ([to],subject)
sendmail (subject)
- click ('frmEvolution-Mail', 'btnSend/Receive')
+ click ('frmEvolution-*', 'btnSend/Receive')
+ waittillguiexist ('dlgSend&ReceiveMail')
waittillguinotexist ('dlgSend&ReceiveMail')
- #remap ('evolution',window_id)
time.sleep (5)
- releasecontext()
new_sent_mail_count=getrowcount (window_id,'ttblMessages')
if new_sent_mail_count < sent_mail_count+1:
log ('Could not send mail','cause')
@@ -774,12 +728,11 @@ def fonts_test(to,ref_image):
log ('Fonts Test','testend')
raise LdtpExecutionError (0)
try:
- if verifymailwithimage ('Sent',sent_mail_count,ref_image) ==1:
+ if verifymailwithimage ('Sent',sent_mail_count,ref_image, subject) ==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')
diff --git a/evolution/mailtoadd.py b/evolution/mailtoadd.py
index f8fc7b6..7ff7b34 100644
--- a/evolution/mailtoadd.py
+++ b/evolution/mailtoadd.py
@@ -1,6 +1,6 @@
#!/usr/bin/env python
#
-# Linux Desktop Testing Project http://www.gnomebangalore.org/ldtp
+# Linux Desktop Testing Project http://ldtp.freedesktop.org
#
# Author:
# Prashanth Mohan <prashmohan@gmail.com>
@@ -25,19 +25,19 @@
from ldtp import *
from ldtputils import *
-from contact import titleappend
from evoutils.mail import *
+from evoutils import *
def mailtoaddbook(datafilename):
log ('Add Mail Sender to Address Book','teststart')
try:
data_object = LdtpDataFileParser (datafilename)
- subject=data_object.gettagvalue ('subject')
+ subject = data_object.gettagvalue ('subject')
selectMailPane()
time.sleep (2)
try:
- #remap ('evolution','frmEvolution-Mail')
selectrowpartialmatch ('frmEvolution-*','ttblMailFolderTree','Inbox')
+ waittillguiexist ('frmEvolution-Inbox*')
time.sleep (2)
selectrow ('frmEvolution-*','ttblMessages',subject[0])
time.sleep (1)
@@ -51,17 +51,17 @@ def mailtoaddbook(datafilename):
selectmenuitem ('frmEvolution-*','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')
+
+ time.sleep (3)
+ if guiexist ('*DuplicateContactDetected*') == 1:
+ click ('*DuplicateContactDetected*', 'btnAdd');
+ waittillguinotexist ('*DuplicateContactDetected*')
+ else:
+ waittillguinotexist ('dlgContactQuick-Add')
except:
log ('Adding mail sender to Address Book failed','error')
log ('Add Mail Sender to Address Book','testend')
diff --git a/evolution/mailtoadd.xml b/evolution/mailtoadd.xml
index d1083a1..6d119f5 100644
--- a/evolution/mailtoadd.xml
+++ b/evolution/mailtoadd.xml
@@ -1,4 +1,4 @@
<?xml version="1.0"?>
<data>
- <subject>asd</subject>
+ <subject>HAPPY NEW YEAR</subject> <!-- Make sure that you have the a mail containing the same Subject-->
</data>
diff --git a/evolution/makedefault.py b/evolution/makedefault.py
index 0a47c66..bb86dbe 100644
--- a/evolution/makedefault.py
+++ b/evolution/makedefault.py
@@ -1,6 +1,6 @@
#!/usr/bin/env python
#
-# Linux Desktop Testing Project http://www.gnomebangalore.org/ldtp
+# Linux Desktop Testing Project http://ldtp.freedesktop.org
#
# Author:
# Prashanth Mohan <prashmohan@gmail.com>
diff --git a/evolution/makedefault.xml b/evolution/makedefault.xml
index 38f5ca4..1d2d72c 100644
--- a/evolution/makedefault.xml
+++ b/evolution/makedefault.xml
@@ -1,4 +1,4 @@
<?xml version="1.0"?>
<data>
- <email>partha@matrix.net</email>
-</data> \ No newline at end of file
+ <accountname>Gmail Account</accountname> <!-- Make sure you have an Account by the same name configured for use -->
+</data>
diff --git a/evolution/mark_read.py b/evolution/mark_read.py
index c970621..09f3ff4 100644
--- a/evolution/mark_read.py
+++ b/evolution/mark_read.py
@@ -1,5 +1,5 @@
#
-# Linux Desktop Testing Project http://www.gnomebangalore.org/ldtp
+# Linux Desktop Testing Project http://ldtp.freedesktop.org
#
# Author:
# Venkateswaran S <wenkat.s@gmail.com>
diff --git a/evolution/meeting.py b/evolution/meeting.py
new file mode 100755
index 0000000..f7cdd14
--- /dev/null
+++ b/evolution/meeting.py
@@ -0,0 +1,380 @@
+#!/usr/bin/env python
+#
+# Linux Desktop Testing Project http://ldtp.freedesktop.org
+#
+# 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 evoutils.calendar import *
+
+def addmeeting(datafilename,recur):
+ 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')
+ windowname = 'frmMeeting-*'
+ waittillguiexist (windowname)
+ time.sleep (1)
+ menuuncheck (windowname, 'mnuOptions;mnuAllDayEvent')
+ remap ('evolution',windowname)
+ 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:
+ selectmenuitem (windowname, 'mnuOptions;mnuRecurrence')
+ waittillguiexist ('dlgRecurrence')
+ time.sleep (4)
+ insert_recurrence ('dlgRecurrence',duration[0],dur_value[0],
+ dur_day[0],count[0],for_type[0],
+ no_of_times[0],exception)
+ except:
+ raise LdtpExecutionError(0)
+ click (windowname,'btnSave')
+ if waittillguiexist ('dlgEvolutionQuery') != 0:
+ click ('dlgEvolutionQuery','btnDonotSend')
+ time.sleep (3)
+ except:
+ log ('Could not add New meeting','error')
+ 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:
+ log ('Verification Failed', 'cause')
+ raise LdtpExecutionError (0)
+
+
+def getmeetingdata(datafilename):
+ 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')
+ index = 1
+ attendee = []
+ email = []
+ while True:
+ att = data_object.gettagvalue ('attendee'+str(index))
+ em = data_object.gettagvalue ('email'+str(index))
+
+ if att == [] or em == []:
+ break
+ attendee.append (att[0])
+ email.append (em[0])
+ index += 1
+
+ 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')
+ raise LdtpExecutionError(0)
+ 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, window_id='frmMeeting-*'):
+ try:
+ print window_id
+ click (window_id,'btnAttendees')
+ waittillguiexist ('dlgRequiredParticipants')
+ time.sleep (1)
+ comboselect ('dlgRequiredParticipants','cboAddressBook',addrbook[0])
+ remap ('evolution','dlgRequiredParticipants')
+ print attendee, email
+ 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"
+ selectrowpartialmatch ('dlgRequiredParticipants','tblContacts',att)
+ print "row selected"
+ click ('dlgRequiredParticipants', 'btnAdd1')
+ time.sleep (1)
+ except:
+ log ('User not found','cause')
+ raise LdtpExceptionError(0)
+ click ('dlgRequiredParticipants', 'btnClose')
+ except:
+ log ('Attendee Addition failed','error')
+ raise LdtpExecutionError (0)
+
+
+def verimeetattendees(attendee,email):
+ try:
+ click ('frmMeeting-Nosummary','btnAttendees')
+ waittillguiexist ('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')
+ except:
+ raise LdtpExecutionError (0)
+
+
+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):
+ try:
+ try:
+ print from_date
+ print summary
+ except:
+ print 'from_date, summary not available'
+ selectcalevent (from_date[0],summary[0])
+ time.sleep (2)
+ selectmenuitem ('frmEvolution-Calendars','mnuFile;mnuOpenAppointment')
+ window_id = 'frmMeeting-*'
+ time.sleep (3)
+ waittillguiexist (window_id)
+ verimeetmainwindow(summary,location,description,from_date,to_date,from_time,
+ to_time,calendar,classification,categories)
+ #verimeetattendees (attendee,email)
+ if duration or dur_value or dur_day or count or for_type or no_of_times:
+ selectmenuitem (window_id,'mnuOptions;mnuRecurrence')
+ waittillguiexist ('dlgRecurrence')
+ verify_recurrence ('dlgRecurrence', duration, dur_value, dur_day, count,
+ for_type, no_of_times, exception)
+ waittillguinotexist ('dlgRecurrence')
+ selectmenuitem (window_id,'mnuFile;mnuClose')
+ except:
+ log ('Meeting not Verified','error')
+ selectmenuitem (window_id,'mnuFile;mnuClose')
+ raise LdtpExecutionError (0)
+
+
+def verimeetmainwindow(summary,location,description,from_date,to_date,from_time,to_time,calendar,classification,categories):
+ try:
+ window_id = 'frmMeeting-*'
+ if summary and verifysettext (window_id,'txtSummary',summary[0])==0:
+ log ('Summary not set properly','cause')
+ raise LdtpExecutionError(0)
+ print location[0]
+ if len(location)>0 and verifysettext (window_id,'txtLocation',location[0])==0:
+ log ('Location not set properly','cause')
+ raise LdtpExecutionError(0)
+ if description and verifysettext (window_id,'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)
+ if len(categories)>0 and verifysettext (window_id,'txtCategories',categories[0])==0:
+ log ('Categories not set properly','cause')
+ raise LdtpExecutionError(0)
+ except:
+ raise LdtpExecutionError(0)
+
+
+def definemeeting(summary,location,description,from_date,to_date,from_time,to_time,calendar,classification,categories):
+ try:
+ time.sleep (2)
+ window_id = 'frmMeeting-*'
+ try:
+ menuuncheck (window_id,'mnuOptions;mnuAllDayEvent')
+ comboselect (window_id,'cboCalendar',calendar[0])
+ except:
+ log ('Calendar not present','cause')
+ raise LdtpExecutionError(0)
+ settextvalue (window_id,'txtSummary',summary[0])
+
+ print "Setting Sumary Over"
+ if len(location)>0:
+ settextvalue (window_id,'txtLocation',location[0])
+ print "Setting Location Over"
+ if len (description)>0:
+ settextvalue (window_id,'txtDescription',description[0])
+ print "Setting Desc Over"
+ if len(from_date)>0:
+ settextvalue (window_id,'txtDate',from_date[0])
+ time.sleep (2)
+ if guiexist ('*Warning') == 1:
+ log ('Error in input date format','cause')
+ click ('*Warning','btnOK')
+ raise LdtpExecutionError (0)
+
+ print "Setting from date Over"
+ if len (to_date)>0:
+ if 'cbofor' in getobjectlist (window_id):
+ comboselect (window_id, 'cbofor','until')
+ settextvalue (window_id,'txtDate1',to_date[0])
+ time.sleep (2)
+ if guiexist ('*Warning') == 1:
+ log ('Error in input date format','cause')
+ click ('*Warning','btnOK')
+ raise LdtpExecutionError (0)
+
+ print "Setting TO DATE Over"
+ if len(from_time)>0:
+ settextvalue (window_id,'txt3',from_time[0])
+ time.sleep (2)
+ if guiexist ('*Warning') == 1:
+ log ('Error in input date format','cause')
+ click ('*Warning','btnOK')
+ raise LdtpExecutionError (0)
+
+ print "Setting from time Over"
+ if len(to_time)>0:
+ settextvalue (window_id,'txt5',to_time[0])
+ time.sleep (2)
+ if guiexist ('*Warning') == 1:
+ log ('Error in input date format','cause')
+ click ('*Warning','btnOK')
+ raise LdtpExecutionError (0)
+
+ print "Setting to time Over"
+ try:
+ selectmenuitem (window_id,'mnuOptions;mnuClassification;mnu'+classification[0])
+ print "Classification menu is special"
+ except:
+ log ('Classification incorrectly specified','cause')
+ raise LdtpExecutionError(0)
+ if len (categories)>0:
+ menucheck (window_id,'mnuEdit;mnuCategories')
+ remap ('evolution',window_id)
+ settextvalue (window_id,'txtCategories',categories[0])
+ print "Setting Categories Over"
+ except:
+ log ('Define Meeting values failed','error')
+ raise LdtpExecutionError(0)
+
+
+def deletemeeting(fromdate,summary,occurance=0):
+ """ occurance == 0 Non recursive
+ occurance == 1 if only this instance
+ occurance == 2 for all instances"""
+ try:
+ selectcalevent (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')
+ time.sleep (3)
+ try:
+ if waittillguiexist ('dlgEvolutionQuery') == 1:
+ remap ('evolution','dlgEvolutionQuery')
+ click ('dlgEvolutionQuery','btnDonotSend')
+ waittillguinotexist ('dlgEvolutionQuery')
+ except:
+ pass
+ except:
+ log ('Delete Meeting/Appointment Failed','error')
+ raise LdtpExecutionError(0)
+
+
+def modifymeeting(datafilename,occurance=0):
+ 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()
+ try:
+ selectcalevent (from_date[0],summary[0])
+ selectmenuitem ('frmEvolution-Calendars','mnuFile;mnuOpenAppointment')
+ window_id = 'frmMeeting-*'
+ time.sleep (3)
+ waittillguiexist (window_id)
+ 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)
+ if len(attendee)>0:
+ addattendees (attendee,email,addrbook)
+ time.sleep (2)
+ try:
+ if duration or dur_value or dur_day or count or for_type or no_of_times or exception:
+ print 'inside if'
+ selectmenuitem (window_id, 'mnuOptions;mnuRecurrence')
+ waittillguiexist ('dlgRecurrence')
+ time.sleep (4)
+ insert_recurrence ('dlgRecurrence',duration[0],dur_value[0],
+ dur_day[0],count[0],for_type[0],
+ no_of_times[0],exception)
+ except:
+ raise LdtpExecutionError(0)
+ click (window_id,'btnSave')
+ except:
+ log ('Event not available','cause')
+ raise LdtpExecutionError(0)
+ 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')
+ if waittillguiexist ('dlgEvolutionQuery') != 0:
+ click ('dlgEvolutionQuery','btnDonotSend')
+ waittillguinotexist ('dlgEvolutionQuery')
+ except:
+ log ('Could not Modify New meeting','error')
+ log ('Modify 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:
+ log ('Modify meeting verify failed','error')
+ raise LdtpExecutionError (0)
diff --git a/evolution/menu_reorganization.py b/evolution/menu_reorganization.py
index 9b03f09..e86459a 100644
--- a/evolution/menu_reorganization.py
+++ b/evolution/menu_reorganization.py
@@ -1,9 +1,10 @@
#!/usr/bin/env python
#
-# Linux Desktop Testing Project http://www.gnomebangalore.org/ldtp
+# Linux Desktop Testing Project http://ldtp.freedesktop.org
#
# Author:
# Venkateswaran S <wenkat.s@gmail.com>
+# Prashanth Mohan <prashmohan@gmail.com>
#
# Copyright 2004 Novell, Inc.
#
@@ -24,31 +25,10 @@
#
from ldtp import *
from ldtputils import *
+from evoutils import *
-def select_mail(fldr,subject):
- try:
- #log('select mail in a folder','teststart')
- #remap('evolution','frmEvolution-Mail')
- if selectrowpartialmatch('frmEvolution-*','ttblMailFolderTree',fldr) == 1:
- #if selectrow ('frmEvolution-*', 'ttblMailFolderTree', fldr) == 1:
- log('Folder selected','info')
- if selectrow('frmEvolution-*','ttblMessages',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')
@@ -69,6 +49,7 @@ def selectfolder(windowname,fldr,dest=''):
log('Folder Already exists','error')
selectrowpartialmatch (windowname, 'ttblMailFolderTree',fldr)
+ waittillguiexist ('frmEvolution-'+fldr+'*')
log('Required folder selected','info')
log('Selecting a given folder','testend')
return 1
@@ -81,11 +62,11 @@ def selectfolder(windowname,fldr,dest=''):
def verify_folder_exist(Folder_name):
-
try:
#log('Verify Folder Exists','teststart')
#remap('evolution','frmEvolution-Mail')
if selectrowpartialmatch ('frmEvolution-*','ttblMailFolderTree',Folder_name) == 1:
+ waittillguiexist ('frmEvolution-'+Folder_name+'*')
log('Verify succeeded')
#undoremap('evolution','frmEvolution-Mail')
#log('Verify Folder Exists','testend')
@@ -145,6 +126,7 @@ def copy_to (from_fldr,to_fldr):
windowname = 'dlgSelectfolder'
#remap('evolution','frmEvolution-Mail')
if selectrowpartialmatch ('frmEvolution-*','ttblMailFolderTree',from_fldr) == 1:
+ waittillguiexist ('frmEvolution-'+from_fldr+'*')
log('From folder selected','info')
selectmenuitem('frmEvolution-*','mnuFolder;mnuCopyFolderTo*')
time.sleep(3)
@@ -185,6 +167,7 @@ def move_to (from_fldr,to_fldr):
windowname = 'dlgSelectfolder'
#remap('evolution','frmEvolution-Mail')
if selectrowpartialmatch ('frmEvolution-*','ttblMailFolderTree',from_fldr) == 1:
+ waittillguiexist ('frmEvolution-'+from_fldr+'*')
log('From folder selected','info')
selectmenuitem('frmEvolution-*','mnuFolder;mnuMoveFolderTo')
time.sleep(3)
@@ -223,11 +206,11 @@ def move_to (from_fldr,to_fldr):
def select_all (fldrname):
-
try:
#log('select all mails in a folder','teststart')
#remap('evolution','frmEvolution-Mail')
if selectrowpartialmatch ('frmEvolution-*','ttblMailFolderTree',fldrname) == 1:
+ waittillguiexist ('frmEvolution-'+fldrname+'*')
log('From folder selected','info')
time.sleep (3)
if selectmenuitem('frmEvolution-*','mnuFolder;mnuSelectAllMessages') == 1:
@@ -250,7 +233,6 @@ def select_all (fldrname):
def mark_all_read(fldrname):
-
try:
log('Mark all as read','teststart')
select_all(fldrname)
@@ -261,13 +243,71 @@ def mark_all_read(fldrname):
print 'Unable to select the mails'
log('Unable to select the menu Markas;Read','error')
log('Mark all as read','testend')
- except :
+ 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 mark_read (subject, fldr=''):
+ try:
+ if fldr != '':
+ selectrowpartialmatch ('frmEvolution-*','ttblMessageFolderTree',fldr)
+ waittillguiexist ('frmEvolution-'+fldr+'*')
+ selectrowpartialmatch ('frmEvolution-*','ttblMessages',subject)
+ try:
+ selectmenuitem ('frmEvolution-*','mnuMessage;mnuMarkas;mnuRead')
+ except:
+ log ('Already in Read state','info')
+ except:
+ log ('Unable to mark message as read','error')
+ raise LdtpExecutionError (0)
-
+
+def mark_unread (subject, fldr=''):
+ try:
+ if fldr != '':
+ selectrowpartialmatch ('frmEvolution-*','ttblMessageFolderTree',fldr)
+ waittillguiexist ('frmEvolution-'+fldr+'*')
+ selectrowpartialmatch ('frmEvolution-*','ttblMessages',subject)
+ try:
+ selectmenuitem ('frmEvolution-*','mnuMessage;mnuMarkas;mnuUnread')
+ except:
+ log ('Already in Unread state','info')
+ except:
+ log ('Unable to mark message as Unread','error')
+ raise LdtpExecutionError (0)
+
+def mark_junk (subject, fldr=''):
+ try:
+ if fldr != '':
+ selectrowpartialmatch ('frmEvolution-*','ttblMessageFolderTree',fldr)
+ waittillguiexist ('frmEvolution-'+fldr+'*')
+ selectrowpartialmatch ('frmEvolution-*','ttblMessages',subject)
+ try:
+ selectmenuitem ('frmEvolution-*','mnuMessage;mnuMarkas;mnuJunk')
+ except:
+ log ('Already in Junk state','info')
+ except:
+ log ('Unable to mark message as Junk','error')
+ raise LdtpExecutionError (0)
+
+def mark_notjunk (subject, fldr=''):
+ try:
+ if fldr != '':
+ selectrowpartialmatch ('frmEvolution-*','ttblMessageFolderTree',fldr)
+ waittillguiexist ('frmEvolution-'+fldr+'*')
+ selectrowpartialmatch ('frmEvolution-*','ttblMessages',subject)
+ try:
+ selectmenuitem ('frmEvolution-*','mnuMessage;mnuMarkas;mnuNotJunk')
+ except:
+ log ('Already in Not Junk state','info')
+ except:
+ log ('Unable to mark message as not junk','error')
+ raise LdtpExecutionError (0)
+
+
+
def rename (old_name,new_name):
try:
@@ -275,6 +315,7 @@ def rename (old_name,new_name):
windowname = 'dlgRenameFolder'
#remap('evolution','frmEvolution-Mail')
if selectrowpartialmatch ('frmEvolution-*','ttblMailFolderTree',old_name) == 1:
+ waittillguiexist ('frmEvolution-'+old_name+'*')
log('From folder selected','info')
selectmenuitem('frmEvolution-*','mnuFolder;mnuRename')
@@ -313,20 +354,16 @@ def rename (old_name,new_name):
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\"?'
+ #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-*', 'ttblMailFolderTree', fldr)
selectmenuitem('frmEvolution-*','mnuFolder;mnuDelete')
- #setcontext ('Delete \"Inbox/ashwin\"?','Delete \"' + fldr + '\"?')
time.sleep(2)
#if waittillguiexist (windowname + defaultname) == 1:
print windowname + '\"'+fldr+'\"?'
@@ -345,13 +382,10 @@ def delete_nonsys_folder (fldr):
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):
@@ -387,6 +421,7 @@ def expunge():
fldr = 'Trash'
remap('evolution','frmEvolution-Mail')
if selectrowpartialmatch ('frmEvolution-Mail', 'ttblMailFolderTree', fldr):
+ waittillguiexist ('frmEvolution-'+fldr+'*')
log('fldr has been selected','info')
time.sleep(2)
if selectmenuitem('frmEvolution-Mail','mnuFolder;mnuExpunge') == 1:
diff --git a/evolution/modify-appointment.py b/evolution/modify-appointment.py
index c1a00c9..8d6d67b 100644
--- a/evolution/modify-appointment.py
+++ b/evolution/modify-appointment.py
@@ -1,6 +1,6 @@
#!/usr/bin/python
#
-# Linux Desktop Testing Project http://www.gnomebangalore.org/ldtp
+# Linux Desktop Testing Project http://ldtp.freedesktop.org
#
# Author:
# Venkateswaran S <wenkat.s@gmail.com>
diff --git a/evolution/modify-meeting.xml b/evolution/modify-meeting.xml
index 72ddc04..40f44ac 100644
--- a/evolution/modify-meeting.xml
+++ b/evolution/modify-meeting.xml
@@ -1,21 +1,12 @@
<?xml version="1.0"?>
<data>
<addrbook>Personal</addrbook>
- <summary>new summary</summary>
+ <summary>new summary</summary> <!-- Make sure that this Meeting is present on the given date -->
<location>apshdpa room</location>
- <description>asophidoaishd </description>
+ <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>
+ <from_date>07/15/06</from_date>
+ <to_date>07/15/06</to_date>
</data>
diff --git a/evolution/modify-recur-meeting-all.xml b/evolution/modify-recur-meeting-all.xml
new file mode 100644
index 0000000..b1ace72
--- /dev/null
+++ b/evolution/modify-recur-meeting-all.xml
@@ -0,0 +1,12 @@
+<?xml version="1.0"?>
+<data>
+ <addrbook>Personal</addrbook>
+ <summary>Recursive Meeting</summary>
+ <location>hall room</location>
+ <description>Modified Recursive Meeting</description>
+ <classification>Confidential</classification>
+ <calendar>Personal</calendar>
+ <categories>Business</categories>
+ <from_date>07/14/06</from_date>
+ <to_date>07/26/06</to_date>
+</data>
diff --git a/evolution/modify-recur-meeting.py b/evolution/modify-recur-meeting.py
new file mode 100644
index 0000000..d467510
--- /dev/null
+++ b/evolution/modify-recur-meeting.py
@@ -0,0 +1,12 @@
+<?xml version="1.0"?>
+<data>
+ <addrbook>Personal</addrbook>
+ <summary>Recursive Meeting</summary>
+ <location>hall room</location>
+ <description>Modified Recursive Meeting</description>
+ <classification>Confidential</classification>
+ <calendar>Personal</calendar>
+ <categories>Business</categories>
+ <from_date>07/13/06</from_date>
+ <to_date>07/26/06</to_date>
+</data>
diff --git a/evolution/modify-recur-meeting.xml b/evolution/modify-recur-meeting.xml
new file mode 100644
index 0000000..9207773
--- /dev/null
+++ b/evolution/modify-recur-meeting.xml
@@ -0,0 +1,12 @@
+<?xml version="1.0"?>
+<data>
+ <addrbook>Personal</addrbook>
+ <summary>Recursive Meeting</summary> <!-- Make sure that this Meeting is present on the given date -->
+ <location>hall room</location>
+ <description>Modified Recursive Meeting</description>
+ <classification>Confidential</classification>
+ <calendar>Personal</calendar>
+ <categories>Business</categories>
+ <from_date>07/13/06</from_date>
+ <to_date>07/26/06</to_date>
+</data>
diff --git a/evolution/modify_task.py b/evolution/modify_task.py
index c699050..32f7bd9 100644
--- a/evolution/modify_task.py
+++ b/evolution/modify_task.py
@@ -1,5 +1,5 @@
#
-# Linux Desktop Testing Project http://www.gnomebangalore.org/ldtp
+# Linux Desktop Testing Project http://ldtp.freedesktop.org
#
# Author:
# Venkateswaran S <wenkat.s@gmail.com>
@@ -23,101 +23,45 @@
#
# 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','tblTasks')
- for ind in range (noofchild):
- if getcellvalue('frmEvolution-Tasks','tblTasks',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)
+from task import *
# 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', 'tblTasks', old_summary[0])
- selectmenuitem('frmEvolution-Tasks', 'mnuFile;mnuOpenTask')
- time.sleep(2)
- #setcontext('Task - No summary','Task - ' + old_summary[0])
- waittillguiexist('frmTask-*')
- #remap('evolution','frmTask-Nosummary')
-
+ log('Modify a task','teststart')
+ selectTaskPane()
+ Group, Summary, Desc, Start_date, Start_time, \
+ End_date, End_time, Time_zone, \
+ Categories = gettaskdata (datafilename)
+ selectrow ('frmEvolution-Tasks', 'tblTasks', Summary[0])
+ selectmenuitem('frmEvolution-Tasks', 'mnuFile;mnuOpenTask')
+ time.sleep(2)
+ waittillguiexist('frmTask-*')
except:
- log('Unable to open Task window','error')
- log('Modify a task','testend')
- raise LdtpExecutionError(0)
+ log('Unable to open Task window','error')
+ log('Modify a task','fail')
+ log('Modify a task','testend')
+ raise LdtpExecutionError(0)
# Modifies the task according to users wish.
try:
- settextvalue ('frmTask-*', 'txtDate',Due_date[0])
- settextvalue ('frmTask-*', 'txtSummary',Summary[0])
- #setcontext('Task - No summary','Task - ' + Summary[0])
- log('User data Loaded','info')
- time.sleep(3)
- if stateenabled ('frmTask-*','btnSave')==1:
- click('frmTask-*','btnSave')
- time.sleep(3)
- log('The required task list has been modified','info')
- else:
- log('The Task list already exists','info')
- click('frmTask-*','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', 'tblTasks', int(Row_no), 1)
- elif Progress[0] == 'Not started':
- uncheckrow ('frmEvolution-Tasks', 'tblTasks', int(Row_no), 1)
- print 'The Task has been modified successfully'
- log('progress of the task has been modified','info')
+ fill_task (Group, Summary, Desc, Start_date, Start_time, End_date, End_time, Time_zone, Categories)
+ click('frmTask-*','btnSave')
+ waittillguinotexist ('frmTask-*')
+ selectrow ('frmEvolution-Tasks', 'tblTasks', Summary[0])
+ selectmenuitem('frmEvolution-Tasks', 'mnuFile;mnuOpenTask')
+ time.sleep(2)
+ waittillguiexist('frmTask-*')
+ verify_task (Group, Summary, Desc, Start_date,
+ Start_time, End_date, End_time,
+ Time_zone, Categories)
+ click ('frmTask-*','btnClose')
except:
- log('unable to change the progress of the task','error')
- log('modify a task','testend')
- raise LdtpExecutionError(0)
-
+ log ('Verification of Modified Task failed','cause')
+ log('Modify a task','fail')
+ log('Modify a task','testend')
+ click ('frmTask-*','btnClose')
+ raise LdtpExecutionError(0)
+log('Modify a task','pass')
log('Modify a task','testend')
diff --git a/evolution/modify_task.xml b/evolution/modify_task.xml
index d362d8a..fb436df 100644
--- a/evolution/modify_task.xml
+++ b/evolution/modify_task.xml
@@ -1,8 +1,12 @@
<?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>
+ <summary>This is just a sample</summary>
+ <desc>Modified Description</desc>
+ <start_date>12/20/05</start_date>
+ <start_time>02:00 AM</start_time>
+ <end_date>12/22/05</end_date>
+ <end_time>03:00 AM</end_time>
+ <time_zone>UTC</time_zone>
+ <group>Personal</group>
+ <Categories>Holiday</Categories>
</data>
diff --git a/evolution/modifyallinstmeet.py b/evolution/modifyallinstmeet.py
index a72fa4e..a273996 100644
--- a/evolution/modifyallinstmeet.py
+++ b/evolution/modifyallinstmeet.py
@@ -1,6 +1,6 @@
#!/usr/bin/env python
#
-# Linux Desktop Testing Project http://www.gnomebangalore.org/ldtp
+# Linux Desktop Testing Project http://ldtp.freedesktop.org
#
# Author:
# Prashanth Mohan <prashmohan@gmail.com>
@@ -22,6 +22,14 @@
# Free Software Foundation, Inc., 59 Temple Place - Suite 330,
# Boston, MA 02111-1307, USA.
#
-from modifymeeting import *
+from meeting import *
-modifymeeting (datafilename,1)
+try:
+ log ('Modify All Instance recursive meeting','teststart')
+ modifymeeting (datafilename, 1)
+except:
+ log ('Modify All Instance recursive meeting','fail')
+ log ('Modify All Instance recursive meeting','testend')
+ raise LdtpExecutionError (0)
+log ('Modify All Instance recursive meeting','pass')
+log ('Modify All Instance recursive meeting','testend')
diff --git a/evolution/modifycontact.py b/evolution/modifycontact.py
index f7f72ed..23f5344 100644
--- a/evolution/modifycontact.py
+++ b/evolution/modifycontact.py
@@ -1,6 +1,6 @@
#!/usr/bin/env python
#
-# Linux Desktop Testing Project http://www.gnomebangalore.org/ldtp
+# Linux Desktop Testing Project http://ldtp.freedesktop.org
#
# Author:
# Prashanth Mohan <prashmohan@gmail.com>
@@ -27,107 +27,25 @@ 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')
+AddrBook,FullName,Nick,WorkEmail,HomeMail,BusPhone,Yahoo,HomePage,Profession,Notes,HomeAdd,WorkAdd,OtherAdd = getcontactvals(datafilename)
+try:
+ log ('Modify Contact','teststart')
+ #opennewcontact (AddrBook)
+ if AddrBook:
+ selectaddrbook (AddrBook[0])
-
-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
+ name = titleappend(FullName[0])[1:]
+ selectcontact (name)
+ selectmenuitem ('frmEvolution-Contacts','mnuFile;mnuOpen')
+ waittillguiexist ('*ContactEditor*')
+ addcontact (AddrBook,FullName,Nick,WorkEmail,HomeMail,\
+ BusPhone,Yahoo,HomePage,Profession,Notes,\
+ HomeAdd,WorkAdd,OtherAdd)
+ log ('Modify Contact','pass')
+except:
+ log ('Modify Contact','fail')
+ log ('Modify Contact','testend')
+ raise LdtpExecutionError (0)
+log ('Modify Contact','testend')
-
-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
index 4c3010c..ff76490 100644
--- a/evolution/modifycontact.xml
+++ b/evolution/modifycontact.xml
@@ -1,7 +1,7 @@
<?xml version="1.0"?>
<data>
<AddrBook>Personal</AddrBook>
- <Name>Test Name</Name>
+ <FullName>Test Name</FullName> <!-- Make sure that this Contact is present -->
<WorkEmail>work1@work1.com</WorkEmail>
<WorkAddress>work1</WorkAddress>
<OtherAddress>other1</OtherAddress>
diff --git a/evolution/modifycontactlist.py b/evolution/modifycontactlist.py
index d0486a5..735ca65 100644
--- a/evolution/modifycontactlist.py
+++ b/evolution/modifycontactlist.py
@@ -1,6 +1,6 @@
#!/usr/bin/env python
#
-# Linux Desktop Testing Project http://www.gnomebangalore.org/ldtp
+# Linux Desktop Testing Project http://ldtp.freedesktop.org
#
# Author:
# Prashanth Mohan <prashmohan@gmail.com>
@@ -23,18 +23,17 @@
# 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)
+ name = '*'+ListName[0]+'*'
opencontactlist(ListName)
- addtocontactlist (AddEmailAddresses)
- delfromcontactlist (DelEmailAddresses)
- click ('dlgContactListEditor','btnOK')
+ addtocontactlist (AddEmailAddresses, name)
+ delfromcontactlist (DelEmailAddresses, name)
+ click (name,'btnOK')
time.sleep (2)
verifymodifylist(ListName,AddEmailAddresses,DelEmailAddresses)
except:
@@ -44,49 +43,42 @@ def modcontactlist(datafilename):
log ('Modify Contact List','testend')
-def addtocontactlist(addList):
- log ('Add to Contact List','teststart')
-# print addList
+def addtocontactlist(addList, name):
try:
for val in range(len (addList)):
- settextvalue ('dlgContactListEditor','txtTypeanemailaddressordragacontactintothelistbelow',addList[val])
+ settextvalue (name,'txtTypeanemailaddressordragacontactintothelistbelow',addList[val])
print 'set the list value'
- click ('dlgContactListEditor','btnAdd')
+ click (name,'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')
+def delfromcontactlist (remList, name):
try:
for val in range(len(remList)):
try:
- selectrow ('dlgContactListEditor','tbl0',remList[val])
+ selectrow (name,'tbl0',remList[val])
except:
log (remList[val]+' not in List','error')
time.sleep (1)
- click ('dlgContactListEditor','btnRemove')
+ click (name,'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)
+ name = '*'+ListName[0]+'*'
setcontext ('Contact List Editor',ListName[0])
- waittillguiexist ('dlgContactListEditor')
+ waittillguiexist (name)
for value in InEmail:
- if (gettablerowindex ('dlgContactListEditor','tbl0',value)) == -1:
+ if (gettablerowindex (name,'tbl0',value)) == -1:
raise LdtpExecutionError(0)
# print "values in inemail perfect"
@@ -94,13 +86,9 @@ def verifymodifylist(ListName,InEmail,OutEmail):
# for value in OutEmail:
# if (gettablerowindex ('dlgContactListEditor','tbl0',EmailAddresses[val])) != -1:
# raise LdtpExecutionError(0)
- click ('dlgContactListEditor','btnCancel')
+ click (name,'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
index 19c336b..3853eff 100644
--- a/evolution/modifycontactlist.xml
+++ b/evolution/modifycontactlist.xml
@@ -1,7 +1,7 @@
<?xml version="1.0"?>
<data>
- <ListName>Test List</ListName>
+ <ListName>Test List</ListName> <!-- Make sure that this Contact List is present -->
<AddEmail1>asodha@sodfh.com</AddEmail1>
<AddEmail2>aspdapsjdpa@pasihfdpa.com</AddEmail2>
- <DelEmail1>asda@asd.com</DelEmail1>
+ <DelEmail1>asda@asd.com</DelEmail1> <!-- Make sure that this Contact is present in the list -->
</data>
diff --git a/evolution/modifycontactwhenoffline.py b/evolution/modifycontactwhenoffline.py
index 15ccc70..ef17751 100644
--- a/evolution/modifycontactwhenoffline.py
+++ b/evolution/modifycontactwhenoffline.py
@@ -1,6 +1,6 @@
#!/usr/bin/env python
#
-# Linux Desktop Testing Project http://www.gnomebangalore.org/ldtp
+# Linux Desktop Testing Project http://ldtp.freedesktop.org
#
# Author:
# Prashanth Mohan <prashmohan@gmail.com>
diff --git a/evolution/modifymeeting.py b/evolution/modifymeeting.py
index 2cd3ba8..08d95ca 100644
--- a/evolution/modifymeeting.py
+++ b/evolution/modifymeeting.py
@@ -1,6 +1,6 @@
#!/usr/bin/env python
#
-# Linux Desktop Testing Project http://www.gnomebangalore.org/ldtp
+# Linux Desktop Testing Project http://ldtp.freedesktop.org
#
# Author:
# Prashanth Mohan <prashmohan@gmail.com>
@@ -23,101 +23,14 @@
# Boston, MA 02111-1307, USA.
#
-from addmeeting import *
+from meeting 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')
+try:
+ log ('Modify Non recursive meeting','teststart')
+ modifymeeting (datafilename, 0)
+except:
+ log ('Modify Non recursive meeting','fail')
+ log ('Modify Non recursive meeting','testend')
+ raise LdtpExecutionError (0)
+log ('Modify Non recursive meeting','pass')
+log ('Modify Non recursive meeting','testend')
diff --git a/evolution/modifythisinstmeet.py b/evolution/modifythisinstmeet.py
index 696903c..14084a7 100644
--- a/evolution/modifythisinstmeet.py
+++ b/evolution/modifythisinstmeet.py
@@ -1,3 +1,36 @@
-from modifymeeting import *
+#!/usr/bin/env python
+#
+# Linux Desktop Testing Project http://ldtp.freedesktop.org
+#
+# 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.
+#
-modifymeeting (datafilename,0)
+from meeting import *
+
+try:
+ log ('Modify Single Instance recursive meeting','teststart')
+ modifymeeting (datafilename, 0)
+except:
+ log ('Modify Single Instance recursive meeting','fail')
+ log ('Modify Single Instance recursive meeting','testend')
+ raise LdtpExecutionError (0)
+log ('Modify Single Instance recursive meeting','pass')
+log ('Modify Single Instance recursive meeting','testend')
diff --git a/evolution/move-to.py b/evolution/move-to.py
index d7c8700..eea58e1 100644
--- a/evolution/move-to.py
+++ b/evolution/move-to.py
@@ -1,5 +1,5 @@
#
-# Linux Desktop Testing Project http://www.gnomebangalore.org/ldtp
+# Linux Desktop Testing Project http://ldtp.freedesktop.org
#
# Author:
# Venkateswaran S <wenkat.s@gmail.com>
diff --git a/evolution/movemail.py b/evolution/movemail.py
index fbbc546..158c956 100644
--- a/evolution/movemail.py
+++ b/evolution/movemail.py
@@ -1,5 +1,5 @@
#
-# Linux Desktop Testing Project http://www.gnomebangalore.org/ldtp
+# Linux Desktop Testing Project http://ldtp.freedesktop.org
#
# Authors:
# Nagashree <mnagashree@novell.com>
@@ -34,9 +34,11 @@ from evoutils.mail import *
def move_mail (from_fldr, to_fldr, mail_index):
try:
selectrowpartialmatch ('frmEvolution-*', 'ttblMailFolderTree', to_fldr)
+ waittillguiexist ('frmEvolution-'+to_fldr+'*')
time.sleep (2)
row_before = getrowcount('frmEvolution-*', 'ttblMessages')
selectrowpartialmatch ('frmEvolution-*', 'ttblMailFolderTree', from_fldr)
+ waittillguiexist ('frmEvolution-'+from_fldr+'*')
time.sleep (2)
rowcount = getrowcount('frmEvolution-*', 'ttblMessages')
if rowcount > 0:
@@ -59,9 +61,11 @@ def move_mail (from_fldr, to_fldr, mail_index):
else:
# TODO: Moving a duplicate message has to be handled
selectrowpartialmatch ('frmEvolution-*', 'ttblMailFolderTree',to_fldr)
+ waittillguiexist ('frmEvolution-'+to_fldr+'*')
time.sleep (2)
row_after = getrowcount ('frmEvolution-*', 'ttblMessages')
selectrowpartialmatch ('frmEvolution-*', 'ttblMailFolderTree', from_fldr)
+ waittillguiexist ('frmEvolution-'+from_fldr+'*')
time.sleep (2)
rowcount_after_move = getrowcount('frmEvolution-*', 'ttblMessages')
if row_after == (row_before+1) and rowcount == (rowcount_after_move+1):
diff --git a/evolution/movemessagewhenoffline.py b/evolution/movemessagewhenoffline.py
index 5d16e59..d7ba278 100644
--- a/evolution/movemessagewhenoffline.py
+++ b/evolution/movemessagewhenoffline.py
@@ -1,6 +1,6 @@
#!/usr/bin/env python
#
-# Linux Desktop Testing Project http://www.gnomebangalore.org/ldtp
+# Linux Desktop Testing Project http://ldtp.freedesktop.org
#
# Author:
# Prashanth Mohan <prashmohan@gmail.com>
diff --git a/evolution/movemessagewhenoffline.xml b/evolution/movemessagewhenoffline.xml
index 7d6722e..78c2160 100644
--- a/evolution/movemessagewhenoffline.xml
+++ b/evolution/movemessagewhenoffline.xml
@@ -1,6 +1,6 @@
<?xml version="1.0"?>
<data>
- <from_folder>Inbox</from_folder>
- <to_folder>backup</to_folder>
- <subject>asd</subject>
+ <from_folder>Inbox</from_folder> <!-- Make sure both folders exist -->
+ <to_folder>BSD</to_folder>
+ <subject>Happy New Year</subject> <!-- Make sure that at least 1 message containing this subject exists in the source folder -->
</data>
diff --git a/evolution/new_task.py b/evolution/new_task.py
index e2c2106..50ed41f 100644
--- a/evolution/new_task.py
+++ b/evolution/new_task.py
@@ -1,5 +1,5 @@
#
-# Linux Desktop Testing Project http://www.gnomebangalore.org/ldtp
+# Linux Desktop Testing Project http://ldtp.freedesktop.org
#
# Author:
# Venkateswaran S <wenkat.s@gmail.com>
@@ -24,112 +24,57 @@
# This script will create a new task.
-from ldtp import *
-from ldtputils import *
-import string, sys, os, commands, time, filecmp
-from contact import *
-
-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-*','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')
+from task import *
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')
+ selectTaskPane()
no_rows_b4creat = getrowcount ('frmEvolution-Tasks', 'tblTasks')
click('frmEvolution-Tasks','btnNew')
- if waittillguiexist('frmTask-Nosummary'):
+ if waittillguiexist('frmTask-Nosummary') == 1:
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-*', 'txtDescription', Desc[0])
- settextvalue ('frmTask-*', 'txtDate1',Start_date[0])
- settextvalue ('frmTask-*', 'txtDate',End_date[0])
- settextvalue ('frmTask-*', 'txt8',Start_time[0])
- settextvalue ('frmTask-*', 'txt6',End_time[0])
- settextvalue ('frmTask-*', 'txt4',Time_zone[0])
- settextvalue ('frmTask-*', 'txt1',Categories[0])
- time.sleep(2)
- log('User Details entered','info')
+ raise LdtpExecutionError (0)
+ fill_task (Group, Summary, Desc, Start_date, Start_time, End_date, End_time, Time_zone, Categories)
+ click('frmTask-*','btnSave')
except:
- print 'Error in entering the values'
- #releasecontext()
- log('Error in entering the values','error')
- log('Create New Task','testend')
- raise LdtpExecutionError(0)
+ log ('Unable to create Task','cause')
+ log('Create New Task','fail')
+ log('Create New Task','teststart')
+ raise LdtpExecutionError (0)
try:
- click('frmTask-*','btnSave')
time.sleep(3)
no_rows_aftercreat = getrowcount ('frmEvolution-Tasks', 'tblTasks')
- if no_rows_aftercreat == no_rows_b4creat + 1:
- if selectrow('frmEvolution-Tasks','tblTasks',Summary[0]) == 1:
- log('Task Creation Completed and verified','info')
- print 'Task Creation completed and verified.'
- log('Task Creation Completed and verified','pass')
+ if no_rows_aftercreat == no_rows_b4creat + 1 and \
+ selectrow('frmEvolution-Tasks','tblTasks',Summary[0]) == 1:
+ log('Task Creation Completed and verified','info')
+ verify_task (Group, Summary, Desc, Start_date,
+ Start_time, End_date, End_time,
+ Time_zone, Categories)
+ print 'Task Creation completed and verified.'
else:
- raise LdtpExecutionError(0)
- log('Task Creation Completed and verified','fail')
+ raise LdtpExecutionError(0)
+ click ('frmTask-*','btnClose')
except:
print 'Unable to verify the task :'+Summary[0]
- log('Unable to save the task')
+ log('Task not created','cause')
+ log('Task Creation Completed and verified','fail')
log('Create New Task','testend')
- #releasecontext()
+ click ('frmTask-*','btnClose')
raise LdtpExecutionError(0)
-
- #undoremap('evolution','frmEvolution-Tasks')
- #releasecontext()
+ log('Task Creation Completed and verified','pass')
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()
-selectPanel('Tasks')
+Group, Summary, Desc, Start_date, Start_time, \
+ End_date, End_time, Time_zone, \
+ Categories = gettaskdata (datafilename)
+
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
index 6f84346..aacb58d 100644
--- a/evolution/new_task.xml
+++ b/evolution/new_task.xml
@@ -2,11 +2,11 @@
<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>
+ <start_date>12/20/05</start_date>
+ <start_time>01:00 AM</start_time>
+ <end_date>12/22/05</end_date>
+ <end_time>01:00 AM</end_time>
+ <time_zone>UTC</time_zone>
<group>Personal</group>
<Categories>Holiday</Categories>
</data>
diff --git a/evolution/newmail.py b/evolution/newmail.py
index 371c9ff..6ecc4f8 100644
--- a/evolution/newmail.py
+++ b/evolution/newmail.py
@@ -1,6 +1,6 @@
#!/usr/bin/env python
#
-# Linux Desktop Testing Project http://www.gnomebangalore.org/ldtp
+# Linux Desktop Testing Project http://ldtp.freedesktop.org
#
# Author:
# Prashanth Mohan <prashmohan@gmail.com>
diff --git a/evolution/newmsg_fromsent.py b/evolution/newmsg_fromsent.py
index 8679602..af78b8c 100644
--- a/evolution/newmsg_fromsent.py
+++ b/evolution/newmsg_fromsent.py
@@ -1,5 +1,5 @@
#
-# Linux Desktop Testing Project http://www.gnomebangalore.org/ldtp
+# Linux Desktop Testing Project http://ldtp.freedesktop.org
#
# Author:
# Venkateswaran S <wenkat.s@gmail.com>
@@ -46,6 +46,7 @@ def create_fromsent():
Row_index, summary_to_append, subject, to = read_data()
#remap('evolution','frmEvolution-Mail')
if selectrowpartialmatch ('frmEvolution-*','ttblMailFolderTree',fldr) == 1:
+ waittillguiexist ('frmEvolution-'+fldr+'*')
time.sleep(3)
log('Folder identified','info')
print Row_index
diff --git a/evolution/offline.py b/evolution/offline.py
index 6382b50..1adcc08 100644
--- a/evolution/offline.py
+++ b/evolution/offline.py
@@ -1,6 +1,6 @@
#!/usr/bin/env python
#
-# Linux Desktop Testing Project http://www.gnomebangalore.org/ldtp
+# Linux Desktop Testing Project http://ldtp.freedesktop.org
#
# Author:
# Prashanth Mohan <prashmohan@gmail.com>
@@ -26,70 +26,72 @@
from contact import *
+from evoutils import *
from evoutils.mail import *
from evoutils.mailpreferences import *
from evoutils.composemail import *
-from evoutils.change_status import *
-from evoutils.change_properties import *
+# from 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)
+ selectMailPane()
+ window_id='frmEvolution-*'
try:
selectrowpartialmatch (window_id,'ttblMailFolderTree',folder)
+ waittillguiexist ('frmEvolution-'+folder+'*')
except:
log ('Folder not available','cause')
raise LdtpExecutionError (0)
time.sleep (2)
try:
- selectrow (window_id,'ttblMessageList',subject)
+ selectrow (window_id,'ttblMessages',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','fail')
log ('Apply Filter','testend')
raise LdtpExecutionError (0)
+ log ('Apply Filter','pass')
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')
+ selectMailPane()
+ window_id='frmEvolution-*'
try:
selectrowpartialmatch (window_id,'ttblMailFolderTree',to_folder)
+ waittillguiexist ('frmEvolution-'+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')
+ initial_dest_count = getrowcount (window_id,'ttblMessages')
print initial_dest_count
try:
selectrowpartialmatch (window_id,'ttblMailFolderTree',from_folder)
+ waittillguiexist ('frmEvolution-'+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')
+ initial_src_count=getrowcount (window_id,'ttblMessages')
print initial_src_count
time.sleep (2)
try:
- selectrow (window_id,'ttblMessageList',subject)
+ selectrow (window_id,'ttblMessages',subject)
except:
log ('Message not available','cause')
raise LdtpExecutionError (0)
@@ -108,7 +110,7 @@ def movemessage (from_folder,to_folder,subject):
click ('dlgSelectfolder','btnMove')
time.sleep (3)
#verification starts here
- new_src_count=getrowcount (window_id,'ttblMessageList')
+ new_src_count=getrowcount (window_id,'ttblMessages')
print new_src_count
if new_src_count != initial_src_count-1:
@@ -116,8 +118,9 @@ def movemessage (from_folder,to_folder,subject):
raise LdtpExecutionError (0)
selectrowpartialmatch (window_id,'ttblMailFolderTree',to_folder)
+ waittillguiexist ('frmEvolution-'+to_folder+'*')
time.sleep (1)
- new_dest_count=getrowcount (window_id,'ttblMessageList')
+ new_dest_count=getrowcount (window_id,'ttblMessages')
print new_dest_count
if new_dest_count!=initial_dest_count+1:
@@ -125,10 +128,11 @@ def movemessage (from_folder,to_folder,subject):
raise LdtpExecutionError (0)
except:
log ('Moving a Message failed','error')
+ log ('Move Message','fail')
log ('Move Message','testend')
raise LdtpExecutionError (0)
- #undoremap ('evolution','frmEvolution-Mail')
log ('Moving a Message succeeded','info')
+ log ('Move Message','pass')
log ('Move Message','testend')
@@ -136,27 +140,28 @@ def movemessage (from_folder,to_folder,subject):
def copymessage (from_folder,to_folder,subject):
log ('Copy Message','teststart')
try:
- #selectMailPane()
- #remap ('evolution','frmEvolution-Mail')
- window_id='frmEvolution-Mail'
+ selectMailPane()
+ window_id='frmEvolution-*'
try:
selectrowpartialmatch (window_id,'ttblMailFolderTree',to_folder)
+ waittillguiexist ('frmEvolution-'+tp_folder+'*')
except:
log ('To Folder not available','cause')
raise LdtpExecutionError (0)
time.sleep (1)
- initial_dest_count=getrowcount (window_id,'ttblMessageList')
+ initial_dest_count=getrowcount (window_id,'ttblMessages')
try:
selectrowpartialmatch (window_id,'ttblMailFolderTree',from_folder)
+ waittillguiexist ('frmEvolution-'+from_folder+'*')
except:
log ('From Folder not available','cause')
raise LdtpExecutionError (0)
time.sleep (1)
- initial_src_count=getrowcount (window_id,'ttblMessageList')
+ initial_src_count=getrowcount (window_id,'ttblMessages')
try:
- selectrow (window_id,'ttblMessageList',subject)
+ selectrow (window_id,'ttblMessages',subject)
except:
log ('Message not available','cause')
raise LdtpExecutionError (0)
@@ -165,7 +170,7 @@ def copymessage (from_folder,to_folder,subject):
selectmenuitem (window_id,'mnuMessage;mnuCopytoFolder')
time.sleep (1)
waittillguiexist ('dlgSelectfolder')
- remap ('evolution','dlgSelectfolder')
+ #remap ('evolution','dlgSelectfolder')
selectrowpartialmatch ('dlgSelectfolder','ttblMailFolderTree',to_folder)
except:
log ('To Folder not available','cause')
@@ -176,47 +181,47 @@ def copymessage (from_folder,to_folder,subject):
click ('dlgSelectfolder','btnCopy')
time.sleep (3)
- undoremap ('evolution','dlgSelectfolder')
#verification
- new_src_count=getrowcount (window_id,'ttblMessageList')
+ new_src_count=getrowcount (window_id,'ttblMessages')
if new_src_count != initial_src_count:
log ('Message not in source folder','cause')
raise LdtpExecutionError (0)
selectrowpartialmatch (window_id,'ttblMailFolderTree',to_folder)
+ waittillguiexist ('frmEvolution-'+to_folder+'*')
time.sleep (3)
- new_dest_count=getrowcount (window_id,'ttblMessageList')
+ new_dest_count=getrowcount (window_id,'ttblMessages')
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 ('Move Message','fail')
log ('Copy Message','testend')
raise LdtpExecutionError (0)
- #undoremap ('evolution','frmEvolution-Mail')
log ('Copying a message succeeded','info')
+ log ('Move Message','pass')
log ('Copy Message','testend')
def deletemessage(folder,subject):
log ('Delete Message','teststart')
try:
- #selectMailPane()
- #remap ('evolution','frmEvolution-Mail')
- window_id='frmEvolution-Mail'
+ selectMailPane()
+ window_id='frmEvolution-*'
time.sleep (2)
try:
selectrowpartialmatch (window_id,'ttblMailFolderTree',folder)
+ waittillguiexist ('frmEvolution-'+folder+'*')
except:
log ('Folder not available','cause')
raise LdtpExecutionError (0)
time.sleep (2)
- initial_count=getrowcount (window_id,'ttblMessageList')
+ initial_count=getrowcount (window_id,'ttblMessages')
time.sleep (2)
try:
- selectrow (window_id,'ttblMessageList',subject)
+ selectrow (window_id,'ttblMessages',subject)
except:
log ('Message not available','cause')
raise LdtpExecutionError (0)
@@ -230,7 +235,7 @@ def deletemessage(folder,subject):
raise LdtpExecutionError (0)
#verification
- new_count=getrowcount (window_id,'ttblMessageList')
+ new_count=getrowcount (window_id,'ttblMessages')
if new_count != initial_count-1:
log ('Folder still has mail','cause')
@@ -239,7 +244,6 @@ def deletemessage(folder,subject):
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')
@@ -247,107 +251,109 @@ def deletemessage(folder,subject):
def saveattachments(folder,subject,save_location):
log ('Save Attachments','teststart')
try:
- #selectMailPane()
- #remap ('evolution','frmEvolution-Mail')
- window_id='frmEvolution-Mail'
+ selectMailPane()
+ window_id='frmEvolution-*'
try:
selectrowpartialmatch (window_id,'ttblMailFolderTree',folder)
+ waittillguiexist ('frmEvolution-'+folder+'*')
except:
log ('Folder not available','cause')
raise LdtpExecutionError (0)
time.sleep (2)
try:
- selectrow (window_id,'ttblMessageList',subject)
+ selectrow (window_id,'ttblMessages',subject)
time.sleep (2)
selectmenuitem (window_id,'mnuMessage;mnuOpeninNewWindow')
- setcontext ('Readonlyframe',subject)
- waittillguiexist ('frmReadonly')
- remap ('evolution','frmReadonly')
+ mail_name = get_mail_name (subject)
+ waittillguiexist (mail_name)
time.sleep (3)
except:
log ('Message not available','cause')
raise LdtpExecutionError (0)
try:
- click ('frmReadonly','btnSaveAll')
- waittillguiexist ('dlgSelectfoldertosaveallattachments')
+ click (mail_name,'btnSave')
+ waittillguiexist ('*Selectfoldertosaveallattachments*')
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')
+# save_location = save_location.split ('/')
+# for fldr in save_location:
+# doubleclickrow ('*Selectfoldertosaveallattachment*s','tblFiles',fldr)
+# time.sleep (1)
+# if stateenabled ('*Selectfoldertosaveallattachments*','btnSave')==0:
+# log ('Unable to Save in this folder','cause')
+# raise LdtpExecutionError (0)
+
+ click ('*Selectfoldertosaveallattachments*','btnSave')
+ time.sleep (5)
+ if guiexist ('*Overwrite*') == 1:
+ click ('*Overwrite*','btnOverwrite')
+ waittillguinotexist ('*Overwrite*')
except:
log ('Unable to find destination folder','cause')
raise LdtpExecutionError (0)
- selectmenuitem ('frmReadonly','mnuFile;mnuClose')
- undoremap ('evolution','frmReadonly')
- releasecontext()
+ selectmenuitem (mail_name,'mnuFile;mnuClose')
except:
log ('Unable to Save attachments','error')
+ log ('Save Attachments','fail')
log ('Save Attachments','testend')
raise LdtpExecutionError (0)
- #undoremap ('evolution','frmEvolution-Mail')
log ('All attachments saved','info')
+ log ('Save Attachments','pass')
log ('Save Attachments','testend')
def delete_folder_when_offline(folder):
log ('Delete folder while offline','teststart')
+ #go_offline ()
+ #selectMailPane ()
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)
-
+ delete_nonsys_folder(folder)
except:
+ log ('Delete folder not permitted while offline','info')
+ log ('Delete folder while offline','pass')
log ('Delete folder while offline','testend')
- raise LdtpExecutionError (0)
+ return
+ log ('Delete folder allowed while offline','cause')
+ log ('Delete folder while offline','fail')
log ('Delete folder while offline','testend')
+ raise LdtpExecutionError (0)
+
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:
+# #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','pass')
log ('Move folder while offline','testend')
return
log ('Move folder permitted while offline','cause')
+ log ('Move folder while offline','fail')
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:
+# #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)
@@ -364,31 +370,35 @@ def copy_folder_when_offline (from_fldr,to_fldr):
def create_folder_when_offline (fldr,location=''):
log ('create folder while offline','teststart')
try:
- go_offline ()
+ #go_offline ()
selectmenuitem ('frmEvolution-*','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')
+ try:
+ create_folder (fldr,location)
+ except:
+ log ('Create folder not permitted while offline','info')
+ log ('create folder while offline','pass')
log ('create folder while offline','testend')
- raise LdtpExecutionError (0)
-
- log ('Create folder not permitted while offline','info')
+ return
+ log ('Create folder permitted while offline','cause')
+ log ('create folder while offline','fail')
log ('create folder while offline','testend')
+ raise LdtpExecutionError (0)
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:
+# #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:
diff --git a/evolution/onlybcc.py b/evolution/onlybcc.py
index 50e4258..522d077 100644
--- a/evolution/onlybcc.py
+++ b/evolution/onlybcc.py
@@ -1,6 +1,6 @@
#!/usr/bin/env python
#
-# Linux Desktop Testing Project http://www.gnomebangalore.org/ldtp
+# Linux Desktop Testing Project http://ldtp.freedesktop.org
#
# Author:
# Prashanth Mohan <prashmohan@gmail.com>
diff --git a/evolution/open_newwin.py b/evolution/open_newwin.py
index e848d16..52c18fc 100644
--- a/evolution/open_newwin.py
+++ b/evolution/open_newwin.py
@@ -1,6 +1,6 @@
#!/usr/bin/env python
#
-# Linux Desktop Testing Project http://www.gnomebangalore.org/ldtp
+# Linux Desktop Testing Project http://ldtp.freedesktop.org
#
# Author:
# Venkateswaran S <wenkat.s@gmail.com>
diff --git a/evolution/openmsg_window.py b/evolution/openmsg_window.py
index 54ddd67..ba2b5f6 100644
--- a/evolution/openmsg_window.py
+++ b/evolution/openmsg_window.py
@@ -1,5 +1,5 @@
#
-# Linux Desktop Testing Project http://www.gnomebangalore.org/ldtp
+# Linux Desktop Testing Project http://ldtp.freedesktop.org
#
# Author:
# Venkateswaran S <wenkat.s@gmail.com>
@@ -56,6 +56,7 @@ def openmsg(fldr, subject):
windowname = 'frmWelcometoEvolution!'
#remap('evolution','frmEvolution-Mail')
if selectrowpartialmatch('frmEvolution-*','ttblMailFolderTree',fldr) == 1:
+ waittillguiexist ('frmEvolution-'+fldr+'*')
time.sleep(2)
log('Folder identified','info')
selectrow('frmEvolution-*','ttblMessages',subject)
diff --git a/evolution/pop-account.xml b/evolution/pop-account.xml
new file mode 100644
index 0000000..f5c0ccc
--- /dev/null
+++ b/evolution/pop-account.xml
@@ -0,0 +1,27 @@
+<?xml version="1.0"?>
+<data>
+ <email>ldtproj1@gmail.com</email>
+ <name>LDTP1</name>
+ <replyto>ldtproj1@gmail.com</replyto>
+ <organization>Linux Desktop Testing Project</organization>
+ <defaultaccount>1</defaultaccount>
+ <recvservertype>POP</recvservertype>
+ <mailserver>pop.gmail.com</mailserver>
+ <username>ldtproj1</username>
+ <secureconnection>SSL encryption</secureconnection>
+ <authtype>Password</authtype>
+ <rememberpassword>1</rememberpassword>
+ <checkmail>1</checkmail>
+ <mailcheckinterval>5</mailcheckinterval>
+ <leavemessageonserver>0</leavemessageonserver>
+ <disablesupportforextn>0</disablesupportforextn>
+ <sendservertype>SMTP</sendservertype>
+ <smtpserver>smtp.gmail.com</smtpserver>
+ <serverrequiresauth>1</serverrequiresauth>
+ <smtpsecureconnection>TLS encryption</smtpsecureconnection>
+ <smtpauthtype>Login</smtpauthtype>
+ <smtpusername>ldtproj</smtpusername>
+ <smtprememberpassword>1</smtprememberpassword>
+ <accountname>Test Account</accountname>
+ <timezone>Asia/Calcutta</timezone>
+</data>
diff --git a/evolution/print.py b/evolution/print.py
index 5e135b7..b07e8ba 100755
--- a/evolution/print.py
+++ b/evolution/print.py
@@ -1,6 +1,6 @@
#!/usr/bin/env python
#
-# Linux Desktop Testing Project http://www.gnomebangalore.org/ldtp
+# Linux Desktop Testing Project http://ldtp.freedesktop.org
#
# Author:
# Venkateswaran S <wenkat.s@gmail.com>
diff --git a/evolution/print_preview.py b/evolution/print_preview.py
index 99dbdd5..efae478 100644
--- a/evolution/print_preview.py
+++ b/evolution/print_preview.py
@@ -1,6 +1,6 @@
#!/usr/bin/env python
#
-# Linux Desktop Testing Project http://www.gnomebangalore.org/ldtp
+# Linux Desktop Testing Project http://ldtp.freedesktop.org
#
# Author:
# Venkateswaran S <wenkat.s@gmail.com>
diff --git a/evolution/promptwhenexpunging.py b/evolution/promptwhenexpunging.py
index 3cac60c..7ba068a 100644
--- a/evolution/promptwhenexpunging.py
+++ b/evolution/promptwhenexpunging.py
@@ -1,6 +1,6 @@
#!/usr/bin/env python
#
-# Linux Desktop Testing Project http://www.gnomebangalore.org/ldtp
+# Linux Desktop Testing Project http://ldtp.freedesktop.org
#
# Author:
# Prashanth Mohan <prashmohan@gmail.com>
diff --git a/evolution/promptwhenexpunging.xml b/evolution/promptwhenexpunging.xml
index c9ffa78..b6d3dd8 100644
--- a/evolution/promptwhenexpunging.xml
+++ b/evolution/promptwhenexpunging.xml
@@ -1,4 +1,4 @@
<?xml version="1.0"?>
<data>
- <fldr>backup</fldr>
+ <fldr>LDTP</fldr> <!-- Make sure this folder exists in the Folder Tree -->
</data>
diff --git a/evolution/rec-all-day-event.py b/evolution/rec-all-day-event.py
index b97b262..993385f 100644
--- a/evolution/rec-all-day-event.py
+++ b/evolution/rec-all-day-event.py
@@ -1,5 +1,5 @@
#
-# Linux Desktop Testing Project http://www.gnomebangalore.org/ldtp
+# Linux Desktop Testing Project http://ldtp.freedesktop.org
#
# Author:
# Venkateswaran S <wenkat.s@gmail.com>
diff --git a/evolution/recursive-app-with-attachment.py b/evolution/recursive-app-with-attachment.py
index 49f3579..9b78a01 100644
--- a/evolution/recursive-app-with-attachment.py
+++ b/evolution/recursive-app-with-attachment.py
@@ -1,5 +1,5 @@
#
-# Linux Desktop Testing Project http://www.gnomebangalore.org/ldtp
+# Linux Desktop Testing Project http://ldtp.freedesktop.org
#
# Author:
# Venkateswaran S <wenkat.s@gmail.com>
diff --git a/evolution/redirect-mail.py b/evolution/redirect-mail.py
index e01e85e..17e2d4a 100644
--- a/evolution/redirect-mail.py
+++ b/evolution/redirect-mail.py
@@ -1,5 +1,5 @@
#
-# Linux Desktop Testing Project http://www.gnomebangalore.org/ldtp
+# Linux Desktop Testing Project http://ldtp.freedesktop.org
#
# Author:
# Venkateswaran S <wenkat.s@gmail.com>
@@ -56,6 +56,7 @@ def redirect(fldr, subject, redirect_to):
windowname = 'frmComposeMessage'
#remap('evolution','frmEvolution-Mail')
if selectrowpartialmatch ('frmEvolution-*','ttblMailFolderTree',fldr) == 1:
+ waittillguiexist ('frmEvolution-'+fldr+'*')
time.sleep(2)
log('Folder identified','info')
Row_index = getrowindex(subject)
diff --git a/evolution/reg-suite.xml b/evolution/reg-suite.xml
new file mode 100644
index 0000000..dccbf0e
--- /dev/null
+++ b/evolution/reg-suite.xml
@@ -0,0 +1,47 @@
+<?xml version='1.0' encoding='utf-8'?>
+<!-- XML Logging -->
+<ldtp>
+<warning>testcaseid entry not present - skipping</warning>
+<warning>comment entry not present - skipping</warning>
+<group name="Executing-group1">
+<script name="textvalue.py">
+<datafilename>textvalue.xml</datafilename>
+<error>Unable to update context: *gedit in appmap</error>
+<test name="settextvalue">
+<debug>Property label not found in appmap</debug>
+<debug>Property label_by not found in appmap</debug>
+<debug>Property label not found in appmap</debug>
+<debug>Property label_by not found in appmap</debug>
+</test>
+<test name="gettextvalue">
+<debug>Property label not found in appmap</debug>
+<debug>Property label_by not found in appmap</debug>
+</test>
+</script>
+<script name="textmanip.py">
+<datafilename>textvalue.xml</datafilename>
+<debug>Property label not found in appmap</debug>
+<debug>Property label_by not found in appmap</debug>
+<test name="appendtext">
+<debug>Property label not found in appmap</debug>
+<debug>Property label_by not found in appmap</debug>
+<debug>Property label not found in appmap</debug>
+<debug>Property label_by not found in appmap</debug>
+</test>
+<debug>Property label not found in appmap</debug>
+<debug>Property label_by not found in appmap</debug>
+<test name="getcharactercount">
+<debug>Property label not found in appmap</debug>
+<debug>Property label_by not found in appmap</debug>
+</test>
+<error>Traceback (most recent call last):
+ File &quot;/usr/bin/ldtprunner&quot;, line 200, in executescript
+ execfile (scriptname, scriptglobal)
+ File &quot;textmanip.py&quot;, line 58, in ?
+ if len (present_text) &lt; position:
+NameError: name &apos;position&apos; is not defined
+</error>
+</script>
+<groupstatus>1 test scripts passed of 2</groupstatus>
+</group>
+</ldtp>
diff --git a/evolution/removesign.py b/evolution/removesign.py
index 8b55e62..de9428a 100644
--- a/evolution/removesign.py
+++ b/evolution/removesign.py
@@ -1,6 +1,6 @@
#!/usr/bin/env python
#
-# Linux Desktop Testing Project http://www.gnomebangalore.org/ldtp
+# Linux Desktop Testing Project http://ldtp.freedesktop.org
#
# Author:
# Prashanth Mohan <prashmohan@gmail.com>
diff --git a/evolution/rename-mail-folder.py b/evolution/rename-mail-folder.py
index 881cfe1..287d8e1 100644
--- a/evolution/rename-mail-folder.py
+++ b/evolution/rename-mail-folder.py
@@ -1,6 +1,6 @@
#!/usr/bin/python
#
-# Linux Desktop Testing Project http://www.gnomebangalore.org/ldtp
+# Linux Desktop Testing Project http://ldtp.freedesktop.org
#
# Author:
# Khasim Shaheed <khasim.shaheed@gmail.com>
diff --git a/evolution/rename_folder.py b/evolution/rename_folder.py
index 088c59a..74eecc3 100644
--- a/evolution/rename_folder.py
+++ b/evolution/rename_folder.py
@@ -1,5 +1,5 @@
#
-# Linux Desktop Testing Project http://www.gnomebangalore.org/ldtp
+# Linux Desktop Testing Project http://ldtp.freedesktop.org
#
# Author:
# Venkateswaran S <wenkat.s@gmail.com>
diff --git a/evolution/reply_toall.py b/evolution/reply_toall.py
index 3ed989d..50b5c07 100644
--- a/evolution/reply_toall.py
+++ b/evolution/reply_toall.py
@@ -1,5 +1,5 @@
#
-# Linux Desktop Testing Project http://www.gnomebangalore.org/ldtp
+# Linux Desktop Testing Project http://ldtp.freedesktop.org
#
# Author:
# Venkateswaran S <wenkat.s@gmail.com>
@@ -58,6 +58,7 @@ def reply_toall(fldr, subject, expected_to_names, expected_to_emails):
#remap('evolution','frmEvolution-Mail')
print fldr,subject
if selectrowpartialmatch ('frmEvolution-*','ttblMailFolderTree',fldr) == 1:
+ waittillguiexist ('frmEvolution-'+fldr+'*')
time.sleep(2)
log('Folder identified','info')
Row_index = getrowindex(subject)
diff --git a/evolution/replyto.py b/evolution/replyto.py
index dad5a7a..2c7a7f7 100644
--- a/evolution/replyto.py
+++ b/evolution/replyto.py
@@ -1,6 +1,6 @@
#!/usr/bin/env python
#
-# Linux Desktop Testing Project http://www.gnomebangalore.org/ldtp
+# Linux Desktop Testing Project http://ldtp.freedesktop.org
#
# Author:
# Prashanth Mohan <prashmohan@gmail.com>
diff --git a/evolution/restartevo.py b/evolution/restartevo.py
index 2fd9b8a..f23b536 100644
--- a/evolution/restartevo.py
+++ b/evolution/restartevo.py
@@ -1,6 +1,6 @@
#!/usr/bin/env python
#
-# Linux Desktop Testing Project http://www.gnomebangalore.org/ldtp
+# Linux Desktop Testing Project http://ldtp.freedesktop.org
#
# Author:
# Prashanth Mohan <prashmohan@gmail.com>
diff --git a/evolution/save_msg.py b/evolution/save_msg.py
index 306374e..6ecb976 100644
--- a/evolution/save_msg.py
+++ b/evolution/save_msg.py
@@ -1,6 +1,6 @@
#!/usr/bin/env python
#
-# Linux Desktop Testing Project http://www.gnomebangalore.org/ldtp
+# Linux Desktop Testing Project http://ldtp.freedesktop.org
#
# Author:
# Venkateswaran S <wenkat.s@gmail.com>
diff --git a/evolution/saveattachmentswhenoffline.py b/evolution/saveattachmentswhenoffline.py
index c8d703c..6d554c9 100644
--- a/evolution/saveattachmentswhenoffline.py
+++ b/evolution/saveattachmentswhenoffline.py
@@ -1,6 +1,6 @@
#!/usr/bin/env python
#
-# Linux Desktop Testing Project http://www.gnomebangalore.org/ldtp
+# Linux Desktop Testing Project http://ldtp.freedesktop.org
#
# Author:
# Prashanth Mohan <prashmohan@gmail.com>
diff --git a/evolution/saveattachmentswhenoffline.xml b/evolution/saveattachmentswhenoffline.xml
index 8a52a92..262b644 100644
--- a/evolution/saveattachmentswhenoffline.xml
+++ b/evolution/saveattachmentswhenoffline.xml
@@ -1,6 +1,6 @@
<?xml version="1.0"?>
<data>
<folder>Inbox</folder>
- <subject>smtp mail failed</subject>
- <save_location>Desktop</save_location>
+ <subject>apt tst</subject> <!-- Make sure that at least 1 message containing this subject exists in the source folder -->
+ <save_location>Desktop</save_location> <!-- Make sure that the save location is a folder within the home directory -->
</data>
diff --git a/evolution/savedsearch.py b/evolution/savedsearch.py
new file mode 100644
index 0000000..1a606d1
--- /dev/null
+++ b/evolution/savedsearch.py
@@ -0,0 +1,4 @@
+from search import *
+
+data_object = LdtpDataFileParser (datafilename)
+saved_search (data_object)
diff --git a/evolution/savemail.py b/evolution/savemail.py
index 73b2322..a372ea2 100644
--- a/evolution/savemail.py
+++ b/evolution/savemail.py
@@ -1,6 +1,6 @@
#!/usr/bin/env python
#
-# Linux Desktop Testing Project http://www.gnomebangalore.org/ldtp
+# Linux Desktop Testing Project http://ldtp.freedesktop.org
#
# Author:
# Prashanth Mohan <prashmohan@gmail.com>
diff --git a/evolution/search-on-subject-sender.xml b/evolution/search-on-subject-sender.xml
index eada77b..4314193 100644
--- a/evolution/search-on-subject-sender.xml
+++ b/evolution/search-on-subject-sender.xml
@@ -2,5 +2,5 @@
<data>
<search_type>Subject or Sender contains</search_type>
<search_folder>Inbox</search_folder>
- <search_text>evo</search_text>
+ <search_text>Happy</search_text>
</data>
diff --git a/evolution/search.py b/evolution/search.py
index dca1454..d43d635 100644
--- a/evolution/search.py
+++ b/evolution/search.py
@@ -1,8 +1,9 @@
#!/usr/bin/python
#
-# Linux Desktop Testing Project http://www.gnomebangalore.org/ldtp
+# Linux Desktop Testing Project http://ldtp.freedesktop.org
#
# Author:
+# Prashanth Mohan <prashmohan@gmail.com>
# Khasim Shaheed <khasim.shaheed@gmail.com>
#
# Copyright 2004 Novell, Inc.
@@ -23,21 +24,23 @@
# Boston, MA 02111-1307, USA.
#
-# Search for mail based on one of the following search conditions
-# a) Subject or Sender contains
-# b) Subject contains
-# c) Sender contains
-#
+
import time, re
from ldtp import *
from ldtputils import *
+from evoutils import *
# Section to perform search for mail based on above search condition
def search (search_type, search_folder, search_text):
+# Search for mail based on one of the following search conditions
+# a) Subject or Sender contains
+# b) Subject contains
+# c) Sender contains
try:
selectrowpartialmatch ('frmEvolution-*', 'ttblMailFolderTree', search_folder)
+ waittillguiexist ('frmEvolution-'+search_folder+'*')
time.sleep (2)
search_mail_count = 0
total_mail_count = getrowcount ('frmEvolution-*', 'ttblMessages')
@@ -68,7 +71,7 @@ def search (search_type, search_folder, search_text):
print '...done'
comboselect ('frmEvolution-*', 'cboSearchType', search_type)
- settextvalue ('frmEvolution-*', 'txtSearchTextEntry', search_text)
+ settextvalue ('frmEvolution-*', 'txtSearch', search_text)
click ('frmEvolution-*', 'btnFindNow')
time.sleep (2)
filter_mail_count = getrowcount ('frmEvolution-*', 'ttblMessages')
@@ -86,21 +89,240 @@ def search (search_type, search_folder, search_text):
log ('Search based on ' + search_type + ' failed', 'fail')
raise LdtpExecutionError (0)
-# Read input from file
-data_object = LdtpDataFileParser (datafilename)
-search_type = data_object.gettagvalue ('search_type')
-search_folder = data_object.gettagvalue ('search_folder')
-search_text = data_object.gettagvalue ('search_text')
-
-# Call the function
-if search_type and search_folder and search_text:
- search (search_type[0], search_folder[0], search_text[0])
-else:
- if not (search_type):
- log ('search_type is not provided in data xml file', 'error')
- if not (search_folder):
- log ('search_folder is not provided in data xml file', 'error')
- if not (search_text):
- log ('search_text is not provided in data xml file', 'error')
- log ('search mail', 'fail')
+def set_query (field, query, value, window_id='dlgAdvancedSearch'):
+ remap ('evolution',window_id)
+ obj_list = getobjectlist (window_id)
+ sub_max = ''
+ txt_max = '1'
+ con_max = ''
+ for obj in obj_list:
+ if obj.startswith ('txt') and obj != 'txtSearchname':
+ txt_max = obj
+ elif obj.startswith ('cbo') and not obj.startswith ('cbospecific') and not obj.startswith ('cbowith'):
+ if obj[3] < 'A' or obj[3] > 'Z':
+ if obj > con_max:
+ con_max = obj
+ else:
+ if obj > sub_max:
+ sub_max = obj
+ comboselect (window_id, sub_max, field)
+ comboselect (window_id, con_max, query)
+ settextvalue (window_id, txt_max, value)
+
+
+def fill_search_box (dataobject, window_id='dlgAdvancedSearch'):
+ index = 1
+ constraint = []
+ name = dataobject.gettagvalue ('name')
+ settextvalue (window_id, 'txtSearchname', name[0])
+ comboselect (window_id,'cboIfanycriteriaaremet','If any criteria are met')
+ click (window_id, 'btnRemove1')
+ while True:
+ field = dataobject.gettagvalue ('field'+str(index))
+ query = dataobject.gettagvalue ('query'+str(index))
+ value = dataobject.gettagvalue ('value'+str(index))
+ if field == [] or query == [] or value == []:
+ break
+ if index != 1:
+ click (window_id, 'btnAdd')
+ set_query (field[0], query[0], value[0], window_id)
+ constraint.append ([field[0],query[0],value[0]])
+ index += 1
+
+ return constraint
+
+
+def check (constraint, row):
+ field = constraint [0]
+ query = constraint [1]
+ value = constraint [2]
+ if field == 'Subject':
+ col = 4
+ elif field == 'Sender':
+ col = 3
+ elif field == 'Attachments':
+ col = 1
+ else:
+ # cannot check. Assume correct
+ return True
+
+ val = getcellvalue ('frmEvolution-*','ttblMessages',row,col)
+
+ if col == 1 and query == 'Exist':
+ if val == 1:
+ return True
+ return False
+ elif col == 1 and query == 'Do Not Exist':
+ if val == 0:
+ return True
+ return False
+
+ val = val.lower()
+ value = value.lower()
+ #regexp = re.compile (re.escape (search_text), re.I)
+ if query == 'contains':
+ if val.find (value) != -1:#regexp.search (value):
+ return True
+ return False
+ elif query == 'does not contain':
+ if not val.find (value) == -1:#regexp.search (value):
+ return True
+ return False
+ elif query == 'is':
+ if val == value:
+ return True
+ return False
+ elif query == 'is not':
+ if val != value:
+ return True
+ return False
+ elif query == 'starts with':
+ if val.startswith(value):
+ return True
+ return False
+ elif query == 'does not start with':
+ if not val.startswith(value):
+ return True
+ return False
+ elif query == 'ends with':
+ if val.endswith (value):
+ return True
+ return False
+ elif query == 'does not end with':
+ if not val.endswith (value):
+ return True
+ return False
+
+ #query not support assume True
+ return True
+
+
+def check_constraints (constraint):
+ total_count = getrowcount ('frmEvolution-*','ttblMessages')
+
+ for val in range (total_count):
+ print val
+ for con in constraint:
+ if check (con,val):
+ continue
+ return False
+ return True
+
+
+def advanced_search (dataobject):
+ try:
+ log ('Advanced Search','teststart')
+ selectmenuitem ('frmEvolution-*','mnuSearch;mnuAdvancedSearch')
+ waittillguiexist ('dlgAdvancedSearch')
+ const = fill_search_box (dataobject,'dlgAdvancedSearch')
+ click ('dlgAdvancedSearch', 'btnOK')
+ waittillguinotexist ('dlgAdvancedSearch')
+ #time.sleep (5)
+ if check_constraints (const):
+ click ('frmEvolution-*','btnClear')
+ log ('Advanced Search','pass')
+
+ else:
+ click ('frmEvolution-*','btnClear')
+ log ('Check failed','cause')
+ raise LdtpExecutionError (0)
+ except:
+ log ('Advanced Search','fail')
+ log ('Advanced Search','testend')
+ raise LdtpExecutionError (0)
+ log ('Advanced Search','testend')
+
+
+def saved_search (dataobject):
+ try:
+ log ('Saved Search','teststart')
+ selectmenuitem ('frmEvolution-*','mnuSearch;mnuSaveSearch')
+ waittillguiexist ('dlgSaveSearch')
+
+ objlist = getobjectlist ('frmEvolution-*')
+ max_val = 0
+ for obj in objlist:
+ if obj.startswith ('mnu'):
+ if obj[3] < '0' or obj[3] > '9':
+ continue
+ if len(obj) != 4:
+ continue
+ val = int (obj[3])
+ if max_val < val:
+ max_val = val
+ raw_input (str(max_val))
+ const = fill_search_box (dataobject,'dlgSaveSearch')
+ click ('dlgSaveSearch', 'btnOK')
+ waittillguinotexist ('dlgSaveSearch')
+ time.sleep (5)
+ remap ('evolution','frmEvolution-*')
+ selectmenuitem ('frmEvolution-*','mnuSearch;mnu'+str(max_val+1))
+ time.sleep (5)
+ if check_constraints (const):
+ click ('frmEvolution-*','btnClear')
+ log ('Saved Search','pass')
+ else:
+ click ('frmEvolution-*','btnClear')
+ log ('Check failed','cause')
+ raise LdtpExecutionError (0)
+ except:
+ click ('frmEvolution-*','btnClear')
+ log ('Saved Search','fail')
+ log ('Saved Search','testend')
+ raise LdtpExecutionError (0)
+ log ('Saved Search','testend')
+
+
+def search_folder (dataobject):
+ try:
+ log ('Search Folder','teststart')
+ name = dataobject.gettagvalue ('name')
+ flag = False
+ try:
+ selectrow ('frmEvolution-*','ttblMailFolderTree',name[0])
+ except:
+ flag = True
+
+ if flag:
+ log ('A folder already exists with the same name','error')
+ raise LdtpExecutionError (0)
+
+ selectmenuitem ('frmEvolution-*','mnuSearch;mnuCreateSearchFolderFromSearch')
+ window_id = 'dlgNewSearchFolder'
+ waittillguiexist (window_id)
+
+ const = fill_search_box (dataobject,window_id)
+ click (window_id, 'btnOK')
+ time.sleep (2)
+ if guiexist ('*EvolutionError*'):
+ remap ('evolution','*EvolutionError*')
+ click ('*EvolutionError*','btnOK')
+ click (window_id, 'btnCancel')
+ waittillguinotexist (window_id)
+ log ('Search Already exists','cause')
+ raise LdtpExecutionError (0)
+
+ waittillguinotexist (window_id)
+ time.sleep (5)
+
+ try:
+ selectrow ('frmEvolution-*','ttblMailFolderTree',name[0])
+ except:
+ log ('Search Folder not available','cause')
+ raise LdtpExecutionError (0)
+
+ if check_constraints (const):
+ click ('frmEvolution-*','btnClear')
+ log ('Search Folder','pass')
+ else:
+ click ('frmEvolution-*','btnClear')
+ log ('Check failed','cause')
+ raise LdtpExecutionError (0)
+ except:
+ click ('frmEvolution-*','btnClear')
+ log ('Search Folder','fail')
+ log ('Search Folder','testend')
+ raise LdtpExecutionError (0)
+ time.sleep (8)
+ log ('Search Folder','testend')
diff --git a/evolution/searchcontact.py b/evolution/searchcontact.py
index 16d8d2f..9bf6075 100644
--- a/evolution/searchcontact.py
+++ b/evolution/searchcontact.py
@@ -1,6 +1,6 @@
#!/usr/bin/env python
#
-# Linux Desktop Testing Project http://www.gnomebangalore.org/ldtp
+# Linux Desktop Testing Project http://ldtp.freedesktop.org
#
# Author:
# Prashanth Mohan <prashmohan@gmail.com>
diff --git a/evolution/searchfolder.py b/evolution/searchfolder.py
new file mode 100644
index 0000000..fe2a79a
--- /dev/null
+++ b/evolution/searchfolder.py
@@ -0,0 +1,4 @@
+from search import *
+
+data_object = LdtpDataFileParser (datafilename)
+search_folder (data_object)
diff --git a/evolution/select_all.py b/evolution/select_all.py
index fa56f79..eb75c46 100644
--- a/evolution/select_all.py
+++ b/evolution/select_all.py
@@ -1,5 +1,5 @@
#
-# Linux Desktop Testing Project http://www.gnomebangalore.org/ldtp
+# Linux Desktop Testing Project http://ldtp.freedesktop.org
#
# Author:
# Venkateswaran S <wenkat.s@gmail.com>
diff --git a/evolution/sendmailwhenoffline.py b/evolution/sendmailwhenoffline.py
index aa6a352..f268c21 100644
--- a/evolution/sendmailwhenoffline.py
+++ b/evolution/sendmailwhenoffline.py
@@ -1,6 +1,6 @@
#!/usr/bin/env python
#
-# Linux Desktop Testing Project http://www.gnomebangalore.org/ldtp
+# Linux Desktop Testing Project http://ldtp.freedesktop.org
#
# Author:
# Prashanth Mohan <prashmohan@gmail.com>
@@ -27,7 +27,7 @@
from mailtests import *
from evoutils.composemail import *
-to, subject, body, cc,bcc, attachment, sentitemsfolder, refimg = read_maildata (datafilename)
+to, cc, bcc, subject, body, attachment, sentitemsfolder, refimg = read_maildata (datafilename)
sendmailwhenoffline (to, subject, body, cc, bcc, attachment)
diff --git a/evolution/simplesearch.py b/evolution/simplesearch.py
new file mode 100644
index 0000000..572638d
--- /dev/null
+++ b/evolution/simplesearch.py
@@ -0,0 +1,18 @@
+from search import *
+# Read input from file
+data_object = LdtpDataFileParser (datafilename)
+search_type = data_object.gettagvalue ('search_type')
+search_folder = data_object.gettagvalue ('search_folder')
+search_text = data_object.gettagvalue ('search_text')
+
+# Call the function
+if search_type and search_folder and search_text:
+ search (search_type[0], search_folder[0], search_text[0])
+else:
+ if not (search_type):
+ log ('search_type is not provided in data xml file', 'error')
+ if not (search_folder):
+ log ('search_folder is not provided in data xml file', 'error')
+ if not (search_text):
+ log ('search_text is not provided in data xml file', 'error')
+ log ('search mail', 'fail')
diff --git a/evolution/spellcheck.py b/evolution/spellcheck.py
index c9afcdb..70706df 100644
--- a/evolution/spellcheck.py
+++ b/evolution/spellcheck.py
@@ -1,6 +1,6 @@
#!/usr/bin/env python
#
-# Linux Desktop Testing Project http://www.gnomebangalore.org/ldtp
+# Linux Desktop Testing Project http://ldtp.freedesktop.org
#
# Author:
# Prashanth Mohan <prashmohan@gmail.com>
@@ -36,10 +36,10 @@ except:
try:
selectMailPane()
- window_id='frmEvolution-Mail'
+ window_id='frmEvolution-*'
selectmenuitem (window_id,'mnuFile;mnuNew;mnuMailMessage')
- waittillguiexist ('frmComposeamessage')
- settextvalue ('frmComposeamessage','txt6',text[0])
+ waittillguiexist ('frmComposeMessage')
+ settextvalue ('frmComposeMessage','txt6',text[0])
except:
log ('Unable to set text','cause')
raise LdtpExecutionError (0)
diff --git a/evolution/task.py b/evolution/task.py
new file mode 100644
index 0000000..985a7ce
--- /dev/null
+++ b/evolution/task.py
@@ -0,0 +1,132 @@
+from ldtp import *
+from ldtputils import *
+from contact import *
+from evoutils import *
+from evoutils.calendar import get_date_format
+
+
+def gettaskdata(datafilename):
+ 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')
+ return Group, Summary, Desc, Start_date, Start_time, End_date, End_time, Time_zone, Categories
+
+
+def fill_task (Group, Summary, Desc, Start_date, Start_time, End_date, End_time, Time_zone, Categories, window_id = 'frmTask-*'):
+ try:
+# for obj in getobjectlist ('frmTask-*'):
+# if obj.startswith ('cbo'):
+# grp_obj = obj
+# break
+ grp_obj = 'cboPersonal'
+ if Group:
+ comboselect (window_id, grp_obj, Group[0])
+ time.sleep(3)
+ settextvalue (window_id, 'txtSummary', Summary[0])
+ if Desc:
+ settextvalue (window_id, 'txtDescription', Desc[0])
+ if Start_date:
+ settextvalue (window_id, 'txtDate1',Start_date[0])
+ if End_date:
+ settextvalue (window_id, 'txtDate',End_date[0])
+ if Start_time:
+ settextvalue (window_id, 'txt8',Start_time[0])
+ if End_time:
+ settextvalue (window_id, 'txt6',End_time[0])
+ #if Time_zone:
+ # menucheck (window_id,'mnuView;mnuTimeZone')
+ # settextvalue (window_id, 'txt4',Time_zone[0])
+ #else:
+ menuuncheck (window_id,'mnuView;mnuTimeZone')
+ if Categories:
+ menucheck (window_id,'mnuView;mnuCategories')
+ settextvalue (window_id, 'txt0',Categories[0])
+ else:
+ menuuncheck (window_id,'mnuView;mnuCategories')
+ log('User Details entered','info')
+ except:
+ print 'Error in entering the values'
+ log('Error in entering the values','error')
+ raise LdtpExecutionError(0)
+
+
+def verify_task (Group, Summary, Desc, Start_date, Start_time, End_date,
+ End_time, Time_zone, Categories, windowname='frmTask-*'):
+ try:
+ selectmenuitem ('frmEvolution-Tasks','mnuFile;mnuOpenTask');
+ if waittillguiexist (windowname) == 0:
+ log ('Unable to open Task','cause')
+ raise LdtpExecutionError (0)
+
+ if Desc and verifysettext (windowname, 'txtDescription', Desc[0]) == 0:
+ log ('Description not set','cause')
+ raise LdtpExecutionError (0)
+
+ # if Start_date and verifysettext (windowname, 'txtDate1',get_date_format(Start_date[0])) == 0:
+ # log ('Start Date set incorrectly','cause')
+ # raise LdtpExecutionError (0)
+ # if End_date and verifysettext (windowname, 'txtDate',get_date_format(End_date[0])) == 0:
+ # log ('End date set incorrectly','cause')
+ # raise LdtpExecutionError (0)
+
+ if Start_time and verifysettext (windowname, 'txt8',Start_time[0]) == 0:
+ log ('Start time set incorrectly','cause')
+ raise LdtpExecutionError (0)
+
+ if End_time and verifysettext (windowname, 'txt6',End_time[0]) == 0:
+ log ('End time set incorrectly','cause')
+ raise LdtpExecutionError (0)
+
+ # if Time_zone and verifysettext (windowname, 'txt4',Time_zone[0]) == 0:
+ # log ('Time Zone set incorrecly','cause')
+ # raise LdtpExecutionError (0)
+
+ if Categories and verifysettext (windowname, 'txt0',Categories[0]) == 0:
+ log ('Categories set incorrectly','cause')
+ raise LdtpExecutionError (0)
+ except:
+ log ('Task Verification failed','error')
+ raise LdtpExecutionError (0)
+
+
+
+def read_assignedtask_data (datafilename):
+ try:
+ data_object = LdtpDataFileParser (datafilename)
+ index = 1
+ attendee = []
+ email = []
+ while True:
+ att = data_object.gettagvalue ('attendee'+str(index))
+ em = data_object.gettagvalue ('email'+str(index))
+
+ if att == [] or em == []:
+ break
+ attendee.append (att[0])
+ email.append (em[0])
+ index += 1
+ 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')
+ Categories = data_object.gettagvalue ('Categories')
+ print Group, Summary, Desc, Start_date, Start_time, \
+ End_date, End_time, Time_zone, Categories, attendee, email
+ return Group, Summary, Desc, Start_date, Start_time, \
+ End_date, End_time, Time_zone, Categories, addr_book, attendee, email
+
+ except:
+ log('Unable to read the user data or data file missing','error')
+ raise LdtpExecutionError (0)
diff --git a/evolution/task.xml b/evolution/task.xml
new file mode 100644
index 0000000..3e76ad2
--- /dev/null
+++ b/evolution/task.xml
@@ -0,0 +1,47 @@
+<?xml version="1.0"?>
+<ldtp>
+ <logfileoverwrite>1</logfileoverwrite>
+ <logfile>evo-testing.xml</logfile>
+ <group>
+ <script>
+ <name>new_task.py</name>
+ <data>new_task.xml</data>
+ </script>
+ </group>
+ <group>
+ <script>
+ <name>modify_task.py</name>
+ <data>modify_task.xml</data>
+ </script>
+ </group>
+ <group>
+ <script>
+ <name>del_task.py</name>
+ <data>del_task.xml</data>
+ </script>
+ </group>
+ <group>
+ <script>
+ <name>New_assigned_task.py</name>
+ <data>New_assigned_task.xml</data>
+ </script>
+ </group>
+ <group>
+ <script>
+ <name>Assigned_Task_modify.py</name>
+ <data>Assigned_Task_modify.xml</data>
+ </script>
+ </group>
+ <group>
+ <script>
+ <name>del_task.py</name>
+ <data>del_assigned_task.xml</data>
+ </script>
+ </group>
+ <group>
+ <script>
+ <name>cr_task_list.py</name>
+ <data>cr_task_list.xml</data>
+ </script>
+ </group>
+</ldtp>
diff --git a/evolution/temp.xml b/evolution/temp.xml
new file mode 100644
index 0000000..5a6b9af
--- /dev/null
+++ b/evolution/temp.xml
@@ -0,0 +1,11 @@
+<?xml version="1.0"?>
+<ldtp>
+ <logfileoverwrite>1</logfileoverwrite>
+ <logfile>evo-testing.xml</logfile>
+ <group>
+ <script>
+ <name>createrecurmeet.py</name>
+ <data>create-meeting-recur.xml</data>
+ </script>
+ </group>
+</ldtp>
diff --git a/evolution/template.py b/evolution/template.py
index 5a7ea58..74c2672 100644
--- a/evolution/template.py
+++ b/evolution/template.py
@@ -1,6 +1,6 @@
#!/usr/bin/env python
#
-# Linux Desktop Testing Project http://www.gnomebangalore.org/ldtp
+# Linux Desktop Testing Project http://ldtp.freedesktop.org
#
# Author:
# Prashanth Mohan <prashmohan@gmail.com>
diff --git a/evolution/test-imap.xml b/evolution/test-imap.xml
index 35057d1..b1b39b7 100644
--- a/evolution/test-imap.xml
+++ b/evolution/test-imap.xml
@@ -4,7 +4,7 @@
<logfile>imap-log.xml</logfile>
<appmapfile>evolution.map</appmapfile>
<group>
- <script>
+<!-- <script>
<name>changecomponent.py</name>
</script>
<script>
@@ -12,12 +12,12 @@
<data>changesentfolder.xml</data>
</script>
</group>
- <group>
+ <group>-->
<script>
<name>compose-mail.py</name>
<data>compose-mail.xml</data>
</script>
- <script>
+<!-- <script>
<name>compose-mail.py</name>
<data>compose-mail-w-attachment.xml</data>
</script>
@@ -86,6 +86,6 @@
<script>
<name>create-search-folder-from-message.py</name>
<data>search-folder-on-subject.xml</data>
- </script>
+ </script>-->
</group>
</ldtp>
diff --git a/evolution/test.xml b/evolution/test.xml
new file mode 100644
index 0000000..e51fd3f
--- /dev/null
+++ b/evolution/test.xml
@@ -0,0 +1,89 @@
+<?xml version="1.0"?>
+<ldtp>
+ <logfileoverwrite>1</logfileoverwrite>
+ <logfile>evo-testing.xml</logfile>
+<!-- <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>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>
+ <group>
+ <script>
+ <name>createaddrbook.py</name>
+ <data>createaddrbook.xml</data>
+ </script>
+ </group>-->
+ <group>
+ <script>
+ <name>new_task.py</name>
+ <data>new_task.xml</data>
+ </script>
+ </group>
+ <group>
+ <script>
+ <name>modify_task.py</name>
+ <data>modify_task.xml</data>
+ </script>
+ </group>
+ <group>
+ <script>
+ <name>del_task.py</name>
+ <data>del_task.xml</data>
+ </script>
+ </group>
+ <group>
+ <script>
+ <name>New_assigned_task.py</name>
+ <data>New_assigned_task.xml</data>
+ </script>
+ </group>
+ <group>
+ <script>
+ <name>Assigned_Task_modify.py</name>
+ <data>Assigned_Task_modify.xml</data>
+ </script>
+ </group>
+ <group>
+ <script>
+ <name>del_task.py</name>
+ <data>del_assigned_task.xml</data>
+ </script>
+ </group>
+ <group>
+ <script>
+ <name>cr_task_list.py</name>
+ <data>cr_task_list.xml</data>
+ </script>
+ </group>
+</ldtp>
diff --git a/evolution/test_image.png b/evolution/test_image.png
new file mode 100644
index 0000000..71eea9b
--- /dev/null
+++ b/evolution/test_image.png
Binary files differ
diff --git a/evolution/textformatting.py b/evolution/textformatting.py
index 49973a4..590ac11 100644
--- a/evolution/textformatting.py
+++ b/evolution/textformatting.py
@@ -1,6 +1,6 @@
#!/usr/bin/env python
#
-# Linux Desktop Testing Project http://www.gnomebangalore.org/ldtp
+# Linux Desktop Testing Project http://ldtp.freedesktop.org
#
# Author:
# Prashanth Mohan <prashmohan@gmail.com>
diff --git a/evolution/traverse-mail.py b/evolution/traverse-mail.py
index d5dae43..1501d98 100644
--- a/evolution/traverse-mail.py
+++ b/evolution/traverse-mail.py
@@ -1,5 +1,5 @@
#
-# Linux Desktop Testing Project http://www.gnomebangalore.org/ldtp
+# Linux Desktop Testing Project http://ldtp.freedesktop.org
#
# Author:
# Venkateswaran S <wenkat.s@gmail.com>
@@ -65,6 +65,7 @@ def Traverse(fldr, subject, traverse_method):
windowname = 'frmWelcometoEvolution!'
#remap('evolution','frmEvolution-Mail')
if selectrowpartialmatch ('frmEvolution-*','ttblMailFolderTree',fldr) == 1:
+ waittillguiexist ('frmEvolution-'+fldr+'*')
time.sleep(3)
log('Folder identified','info')
selectrow('frmEvolution-*','ttblMessages',subject)
diff --git a/evolution/undoredo.py b/evolution/undoredo.py
index cb0e1e8..217fac4 100644
--- a/evolution/undoredo.py
+++ b/evolution/undoredo.py
@@ -1,6 +1,6 @@
#!/usr/bin/env python
#
-# Linux Desktop Testing Project http://www.gnomebangalore.org/ldtp
+# Linux Desktop Testing Project http://ldtp.freedesktop.org
#
# Author:
# Prashanth Mohan <prashmohan@gmail.com>
diff --git a/evolution/verify_readonly_tasklist.py b/evolution/verify_readonly_tasklist.py
index 613effd..ede1c0f 100644
--- a/evolution/verify_readonly_tasklist.py
+++ b/evolution/verify_readonly_tasklist.py
@@ -1,5 +1,5 @@
#
-# Linux Desktop Testing Project http://www.gnomebangalore.org/ldtp
+# Linux Desktop Testing Project http://ldtp.freedesktop.org
#
# Author:
# Venkateswaran S <wenkat.s@gmail.com>
@@ -44,6 +44,7 @@ def verify_readonly():
selectmenuitem('frmEvolution-Tasks','mnuFile;mnuWorkOffline')
#selectrowpartialmatch ('frmEvolution-Tasks', 'tblTasks', summary)
+
selectrow ('frmEvolution-Tasks', 'tblTasks', summary)
selectmenuitem('frmEvolution-Tasks','mnuFile;mnuOpenTask')
time.sleep(3)
diff --git a/evolution/work_offline.py b/evolution/work_offline.py
index aa299cf..f93e6bd 100644
--- a/evolution/work_offline.py
+++ b/evolution/work_offline.py
@@ -1,6 +1,6 @@
#!/usr/bin/env python
#
-# Linux Desktop Testing Project http://www.gnomebangalore.org/ldtp
+# Linux Desktop Testing Project http://ldtp.freedesktop.org
#
# Author:
# Venkateswaran S <wenkat.s@gmail.com>