diff options
author | Joerg Skottke [jsk] <jsk@openoffice.org> | 2010-03-08 13:46:19 +0100 |
---|---|---|
committer | Joerg Skottke [jsk] <jsk@openoffice.org> | 2010-03-08 13:46:19 +0100 |
commit | fc989a5db858c76c0a8b11e3ccc985d4a920c007 (patch) | |
tree | c7c20ee7f81a9f15970a35b2c1cd910ac7d64659 /testautomation/global/tools/includes/required/t_tools3.inc | |
parent | a1aceffdf0bf928fc423c3a298744d3df81f8ccc (diff) |
vitomation01: #i109562 - Make hClickButton() a little verbose by default
Diffstat (limited to 'testautomation/global/tools/includes/required/t_tools3.inc')
-rw-r--r-- | testautomation/global/tools/includes/required/t_tools3.inc | 14 |
1 files changed, 7 insertions, 7 deletions
diff --git a/testautomation/global/tools/includes/required/t_tools3.inc b/testautomation/global/tools/includes/required/t_tools3.inc index b523adaaeb90..96c8006732d0 100644 --- a/testautomation/global/tools/includes/required/t_tools3.inc +++ b/testautomation/global/tools/includes/required/t_tools3.inc @@ -1096,7 +1096,7 @@ end function function hClickButton( oButton as object ) as integer - dim iWait as integer : iWait = 0 + dim iRetries as integer : iWait = 0 dim iTime as integer : iTime = 0 const MAX_RETRIES = 50 ' Try to click the button max 50 times @@ -1104,10 +1104,10 @@ function hClickButton( oButton as object ) as integer const RETVAL_TIMEOUT = -1 ' Return -1 if the button is not available const CFN = "global::tools::includes::required::hClickButton(): " - if ( VERBOSE ) then printlog( CFN & "Click button: " & oButton.name() ) + printlog( "Click button: <" & oButton.name() & ">" ) WaitSlot() - for iWait = 1 to MAX_RETRIES + for iRetries = 1 to MAX_RETRIES try oButton.click() exit for @@ -1117,9 +1117,9 @@ function hClickButton( oButton as object ) as integer next iWait ' Total time used - iTime = iWait * DELAY + iTime = iRetries * DELAY - if ( iTime = MAX_RETRIES * DELAY ) then iTime = RETVAL_TIMEOUT + if ( iWait = MAX_RETRIES ) then iTime = RETVAL_TIMEOUT if ( VERBOSE ) then printlog( CFN & "Exit with rc=" & iTime ) hClickButton() = iTime @@ -1146,9 +1146,9 @@ function hCloseDialog( oDialog as object, sUserFlags as string ) as boolean hCloseDialog() = FALSE ' Set default returnvalue, assume failure ' Find out which closing method was provided, "close" ist the default - if ( instr( sFlags, "cancel" ) > 0 ) then + if ( instr( sFlags, "cancel" ) ) then iClosingMethod = METHOD_CANCEL - elseif ( instr( sFlags, "ok" ) > 0 ) then + elseif ( instr( sFlags, "ok" ) ) then iClosingMethod = METHOD_OK else iClosingMethod = METHOD_CLOSE |