diff options
author | patrickgu <patrickgu> | 2006-03-06 06:29:51 +0000 |
---|---|---|
committer | patrickgu <patrickgu> | 2006-03-06 06:29:51 +0000 |
commit | d7b61a61a8696bf3e1504db6b54f7491eefc3077 (patch) | |
tree | ca0ffada91f403ff568f66bfe6d141baef9d50e2 | |
parent | 55305c790f4b8dfa7c870ea82dbf78e70ef4de40 (diff) |
Comments remap, undoremap ...
-rw-r--r-- | evolution/openmsg_window.py | 16 | ||||
-rw-r--r-- | evolution/redirect-mail.py | 14 | ||||
-rw-r--r-- | evolution/reply_toall.py | 14 | ||||
-rw-r--r-- | evolution/traverse-mail.py | 10 | ||||
-rw-r--r-- | evolution/work_offline.py | 18 |
5 files changed, 36 insertions, 36 deletions
diff --git a/evolution/openmsg_window.py b/evolution/openmsg_window.py index c37cd39..54ddd67 100644 --- a/evolution/openmsg_window.py +++ b/evolution/openmsg_window.py @@ -29,9 +29,9 @@ from ldtputils import * def getrowindex(subject): try: - noofchild=getrowcount ('frmEvolution-Mail','ttblMessageList') + noofchild=getrowcount ('frmEvolution-*','ttblMessages') for ind in range (noofchild): - if getcellvalue('frmEvolution-Mail','ttblMessageList',ind,4) == subject: + if getcellvalue('frmEvolution-*','ttblMessages',ind,4) == subject: return ind if ind == noofchild-1: log ('Message not present','cause') @@ -54,14 +54,14 @@ def openmsg(fldr, subject): try: log('Open in a new window','teststart') windowname = 'frmWelcometoEvolution!' - remap('evolution','frmEvolution-Mail') - if selectrowpartialmatch('frmEvolution-Mail','ttblMailFolderTree',fldr) == 1: + #remap('evolution','frmEvolution-Mail') + if selectrowpartialmatch('frmEvolution-*','ttblMailFolderTree',fldr) == 1: time.sleep(2) log('Folder identified','info') - selectrow('frmEvolution-Mail','ttblMessageList',subject) + selectrow('frmEvolution-*','ttblMessages',subject) Row_index = getrowindex(subject) - selectrowindex('frmEvolution-Mail','ttblMessageList',int(Row_index)) - selectmenuitem('frmEvolution-Mail','mnuMessage;mnuOpeninNewWindow') + selectrowindex('frmEvolution-*','ttblMessages',int(Row_index)) + selectmenuitem('frmEvolution-*','mnuMessage;mnuOpeninNewWindow') time.sleep(3) setcontext('Welcome to Evolution!',subject) if waittillguiexist(windowname) == 1: @@ -72,7 +72,7 @@ def openmsg(fldr, subject): else: print 'Verification failed' log('verify failed','error') - undoremap('evolution','frmEvolution-Mail') + #undoremap('evolution','frmEvolution-Mail') else: log('The folder cannot be identified','error') diff --git a/evolution/redirect-mail.py b/evolution/redirect-mail.py index 862f09e..e01e85e 100644 --- a/evolution/redirect-mail.py +++ b/evolution/redirect-mail.py @@ -29,7 +29,7 @@ from ldtputils import * def getrowindex(subject): try: - noofchild=getrowcount ('frmEvolution-Mail','ttblMessageList') + noofchild=getrowcount ('frmEvolution-*','ttblMessageList') for ind in range (noofchild): if getcellvalue('frmEvolution-Mail','ttblMessageList',ind,4) == subject: return ind @@ -53,9 +53,9 @@ def read_data(): def redirect(fldr, subject, redirect_to): try: log('redirect a mail','teststart') - windowname = 'frmComposeamessage' - remap('evolution','frmEvolution-Mail') - if selectrowpartialmatch ('frmEvolution-Mail','ttblMailFolderTree',fldr) == 1: + windowname = 'frmComposeMessage' + #remap('evolution','frmEvolution-Mail') + if selectrowpartialmatch ('frmEvolution-*','ttblMailFolderTree',fldr) == 1: time.sleep(2) log('Folder identified','info') Row_index = getrowindex(subject) @@ -63,9 +63,9 @@ def redirect(fldr, subject, redirect_to): log('Message selected','info') from_id = getcellvalue('frmEvolution-Mail','ttblMessageList',int(Row_index),3) - selectmenuitem('frmEvolution-Mail','mnuMessage;mnuRedirect') + selectmenuitem('frmEvolution-*','mnuMessage;mnuRedirect') time.sleep(2) - setcontext('Compose a message',subject) + #setcontext('Compose a message',subject) if waittillguiexist(windowname) == 1: print 'Redirect Window opened, hence verified' @@ -91,7 +91,7 @@ def redirect(fldr, subject, redirect_to): else: print 'Unable to find the folder' log('Unable to find the folder','error') - undoremap('evolution','frmEvolution-Mail') + #undoremap('evolution','frmEvolution-Mail') log('Reply to all','testend') except: log('Unable to reply','error') diff --git a/evolution/reply_toall.py b/evolution/reply_toall.py index 2e1ce38..3ed989d 100644 --- a/evolution/reply_toall.py +++ b/evolution/reply_toall.py @@ -29,9 +29,9 @@ from ldtputils import * def getrowindex(subject): try: - noofchild=getrowcount ('frmEvolution-Mail','ttblMessageList') + noofchild=getrowcount ('frmEvolution-*','ttblMessages') for ind in range (noofchild): - if getcellvalue('frmEvolution-Mail','ttblMessageList',ind,4) == subject: + if getcellvalue('frmEvolution-*','ttblMessages',ind,4) == subject: return ind if ind == noofchild-1: log ('Message not present','cause') @@ -55,15 +55,15 @@ def reply_toall(fldr, subject, expected_to_names, expected_to_emails): try: log('Reply to all','teststart') windowname = 'frmComposeamessage' - remap('evolution','frmEvolution-Mail') + #remap('evolution','frmEvolution-Mail') print fldr,subject - if selectrowpartialmatch ('frmEvolution-Mail','ttblMailFolderTree',fldr) == 1: + if selectrowpartialmatch ('frmEvolution-*','ttblMailFolderTree',fldr) == 1: time.sleep(2) log('Folder identified','info') Row_index = getrowindex(subject) - if selectrowindex('frmEvolution-Mail','ttblMessageList',int(Row_index)) == 1: + if selectrowindex('frmEvolution-*','ttblMessageList',int(Row_index)) == 1: log('Message selected','info') - selectmenuitem('frmEvolution-Mail','mnuMessage;mnuReply') + selectmenuitem('frmEvolution-*','mnuMessage;mnuReply') time.sleep(2) setcontext('Compose a message','Re: '+subject) if waittillguiexist(windowname) == 1: @@ -97,7 +97,7 @@ def reply_toall(fldr, subject, expected_to_names, expected_to_emails): else: print 'Unable to find the folder' log('Unable to find the folder','error') - undoremap('evolution','frmEvolution-Mail') + #undoremap('evolution','frmEvolution-Mail') log('Reply to all','testend') except: log('Unable to reply','error') diff --git a/evolution/traverse-mail.py b/evolution/traverse-mail.py index d9fe25d..d5dae43 100644 --- a/evolution/traverse-mail.py +++ b/evolution/traverse-mail.py @@ -31,7 +31,7 @@ def getrowct_based_properties(property_val): try: ct = 0 colmn = 4 - noofchild = getrowcount ('frmEvolution-Mail','ttblMessageList') + noofchild = getrowcount ('frmEvolution-*','ttblMessages') if property_val == 'Important': colmn = 2 elif property_val == 'Unread': @@ -40,7 +40,7 @@ def getrowct_based_properties(property_val): ct = noofchild - 1 for ind in range (noofchild): - if getcellvalue('frmEvolution-Mail','ttblMessageList',ind,colmn) == '1': + if getcellvalue('frmEvolution-*','ttblMessages',ind,colmn) == '1': ct = ct + 1 if colmn == 0: ct = noofchild - ct @@ -63,11 +63,11 @@ def Traverse(fldr, subject, traverse_method): try: log('Traverse Mail','teststart') windowname = 'frmWelcometoEvolution!' - remap('evolution','frmEvolution-Mail') - if selectrowpartialmatch ('frmEvolution-Mail','ttblMailFolderTree',fldr) == 1: + #remap('evolution','frmEvolution-Mail') + if selectrowpartialmatch ('frmEvolution-*','ttblMailFolderTree',fldr) == 1: time.sleep(3) log('Folder identified','info') - selectrow('frmEvolution-Mail','ttblMessageList',subject) + selectrow('frmEvolution-*','ttblMessages',subject) if traverse_method == 'NextUnread' or traverse_method == 'PreviousUnread': property_val = 'Unread' elif traverse_method == 'NextImportant' or traverse_method == 'PreviousImportant': diff --git a/evolution/work_offline.py b/evolution/work_offline.py index 2db252e..aa299cf 100644 --- a/evolution/work_offline.py +++ b/evolution/work_offline.py @@ -31,16 +31,16 @@ from ldtputils import * def work_offline(): try: log('Work Offline','teststart') - remap('evolution','frmEvolution-Mail') - if doesmenuitemexist ('frmEvolution-Mail', 'mnuFile;mnuWorkOffline') == 1: - if selectmenuitem('frmEvolution-Mail','mnuFile;mnuWorkOffline') == 1: + #remap('evolution','frmEvolution-Mail') + if doesmenuitemexist ('frmEvolution-*', 'mnuFile;mnuWorkOffline') == 1: + if selectmenuitem('frmEvolution-*','mnuFile;mnuWorkOffline') == 1: time.sleep(3) - undoremap('evolution','frmEvolution-Mail') - remap('evolution','frmEvolution-Mail') - if doesmenuitemexist ('frmEvolution-Mail', 'mnuFile;mnuWorkOnline') == 1: + #undoremap('evolution','frmEvolution-Mail') + #remap('evolution','frmEvolution-Mail') + if doesmenuitemexist ('frmEvolution-*', 'mnuFile;mnuWorkOnline') == 1: print 'Work Offline in the File menu works fine' log('Work offline verified','info') - selectmenuitem('frmEvolution-Mail','mnuFile;mnuWorkOnline') + selectmenuitem('frmEvolution-*','mnuFile;mnuWorkOnline') else: print 'Unable to see the work online in the file menu after selecting woek offline' log('Unable to see the work online in the file menu after selecting woek offline','cause') @@ -50,12 +50,12 @@ def work_offline(): else: print 'Already working offline/ evolution-mail is not opened' log('Already working offline/ evolution-mail is not opened','cause') - undoremap('evolution','frmEvolution-Mail') + #undoremap('evolution','frmEvolution-Mail') log('Work Offline','testend') except: log('Unable to go offline','error') log('Work Offline','testend') - undoremap('evolution','frmEvolution-Mail') + #undoremap('evolution','frmEvolution-Mail') raise LdtpExecutionError (0) work_offline() |