diff options
author | Joerg Skottke [jsk] <jsk@openoffice.org> | 2010-05-17 13:36:12 +0200 |
---|---|---|
committer | Joerg Skottke [jsk] <jsk@openoffice.org> | 2010-05-17 13:36:12 +0200 |
commit | 4d2c2b749c5c352f7087afd521e565cc88c3a33f (patch) | |
tree | eaeb4129fa583442d077267c2e2f9c2ac496ace9 /testautomation | |
parent | 57856accd784aa87fb7b72585c5be5626fe33f7f (diff) |
npower13_objectmodules: #i111007 - Add timeout to button.
Diffstat (limited to 'testautomation')
-rwxr-xr-x | testautomation/framework/optional/includes/basic_vba-compat_xlsm-xlsb.inc | 31 |
1 files changed, 18 insertions, 13 deletions
diff --git a/testautomation/framework/optional/includes/basic_vba-compat_xlsm-xlsb.inc b/testautomation/framework/optional/includes/basic_vba-compat_xlsm-xlsb.inc index 888bc3402f95..89a09468ea27 100755 --- a/testautomation/framework/optional/includes/basic_vba-compat_xlsm-xlsb.inc +++ b/testautomation/framework/optional/includes/basic_vba-compat_xlsm-xlsb.inc @@ -44,6 +44,7 @@ testcase tBasicVBACompatXLSM_XLSB() const MODULE_NOT_FOUND = 0 const MAX_DELAY = 3 + const RC_TIMEOUT = -1 const RELATIVE_PATH = "framework/optional/input/vba-compat/" @@ -90,23 +91,27 @@ testcase tBasicVBACompatXLSM_XLSB() if ( hSelectNodeByName( MakroAus, cTestModuleList( iCurrentModule ) ) <> MODULE_NOT_FOUND ) then printlog( "Execute the default macro <Test> for the current module" ) - Ausfuehren.click() - kontext "Active" - printlog( "Probe for messagebox containing the module name" ) - if ( Active.exists( MAX_DELAY ) ) then - - if ( Active.getText() = cTestModuleList( iCurrentModule ) ) then - printlog( "The correct macro has been executed: " & cTestModuleList( iCurrentModule ) + if ( hClickButton( Ausfuehren ) > RC_TIMEOUT ) then + + kontext "Active" + printlog( "Probe for messagebox containing the module name" ) + if ( Active.exists( MAX_DELAY ) ) then + + if ( Active.getText() = cTestModuleList( iCurrentModule ) ) then + printlog( "The correct macro has been executed: " & cTestModuleList( iCurrentModule ) + else + warnlog( "Incorrect macro executed:" ) + printlog( "Expected: " & cTestModuleList( iCurrentModule ) ) + printlog( "Found...: " & Active.getText() ) + endif + Active.ok() + WaitSlot() else - warnlog( "Incorrect macro executed:" ) - printlog( "Expected: " & cTestModuleList( iCurrentModule ) ) - printlog( "Found...: " & Active.getText() ) + warnlog( "Macro was not executed" ) endif - Active.ok() - WaitSlot() else - warnlog( "Macro was not executed" ) + warnlog( "No executable macro found for the current module / <Run> button is disabled" ) endif else warnlog( "the expected macro module could not be found" ) |