diff options
author | Joerg Skottke [jsk] <jsk@openoffice.org> | 2010-02-24 08:20:31 +0100 |
---|---|---|
committer | Joerg Skottke [jsk] <jsk@openoffice.org> | 2010-02-24 08:20:31 +0100 |
commit | b67a6169fa8a1499701403c39b4d96eba1434c7c (patch) | |
tree | 337c5220b12e521228ec5c45b2741ed09d04cd17 /testautomation/global/tools/includes/required/t_tools3.inc | |
parent | 7b987f633142d3acb3ba6dc3d0eca3b6af425873 (diff) |
vitomation01: #i108621 - simplified function interface of hClodeDialog()
Diffstat (limited to 'testautomation/global/tools/includes/required/t_tools3.inc')
-rwxr-xr-x | testautomation/global/tools/includes/required/t_tools3.inc | 15 |
1 files changed, 5 insertions, 10 deletions
diff --git a/testautomation/global/tools/includes/required/t_tools3.inc b/testautomation/global/tools/includes/required/t_tools3.inc index 0c19a993e9c7..ef3564d7d835 100755 --- a/testautomation/global/tools/includes/required/t_tools3.inc +++ b/testautomation/global/tools/includes/required/t_tools3.inc @@ -982,31 +982,26 @@ end function '------------------------------------------------------------------------------- -function hCloseDialog( oDialog as object, sMethod as string, iTimeout as integer ) as boolean +function hCloseDialog( oDialog as object, sMethod as string ) as boolean ' this function closes a dialog providing three different methods while ' removing the need for static sleep statements const CFN = "global::tools::includes::required::t_tools3.inc:hCloseDialog" + const TIMEOUT = 2 ' Maximum time to wait for a dialog to close dim sClosingMethod as string : sClosingMethod = lcase( _sMethod ) hCloseDialog() = FALSE ' Set default returnvalue, assume failure printlog( "Closing dialog <" & oDialog.name() & "." & sClosingMethod ) - ' prevent misuse - if ( iTimeout < 1 or iTimeout > 10 ) then - warnlog( CFN & "Please select a timeout between 1 and 10 seconds" ) - exit function - endif - select case( sClosingMethod ) case "close" : oDialog.close() case "cancel": oDialog.cancel() case "ok" : oDialog.ok() - case else : warnlog( CFN & " Allowed closing methods are <cancel>, <close> and <ok>" ) + case else : warnlog( CFN & " Script error: Allowed closing methods are <cancel>, <close> and <ok>" ) end case - if ( oDialog.notExists( iTimeout ) ) then hCloseDialog() = TRUE + if ( oDialog.notExists( TIMEOUT ) ) then hCloseDialog() = TRUE -end function
\ No newline at end of file +end function |