diff options
author | Joerg Skottke [jsk] <jsk@openoffice.org> | 2010-05-17 13:58:17 +0200 |
---|---|---|
committer | Joerg Skottke [jsk] <jsk@openoffice.org> | 2010-05-17 13:58:17 +0200 |
commit | b9468485ff8bb120ea01651ec28dd753eac1cb1b (patch) | |
tree | 9b25440ead7791821d0cbdc7d3625d3238d755fe /testautomation/framework | |
parent | e6f2d72f070caeb486f5bc8dd6d30d7a9e9d7525 (diff) |
npower13_objectmodules: #i110724 - hClickButton() has a returnvalue which should be evaluated.
Diffstat (limited to 'testautomation/framework')
-rwxr-xr-x | testautomation/framework/optional/includes/basic_vba-compat_application-union.inc | 40 |
1 files changed, 23 insertions, 17 deletions
diff --git a/testautomation/framework/optional/includes/basic_vba-compat_application-union.inc b/testautomation/framework/optional/includes/basic_vba-compat_application-union.inc index 7f57bc89130e..222b99215f81 100755 --- a/testautomation/framework/optional/includes/basic_vba-compat_application-union.inc +++ b/testautomation/framework/optional/includes/basic_vba-compat_application-union.inc @@ -43,6 +43,7 @@ testcase tBasicVBACompatApplicationUnion() const MODULE_NAME = "Module1" const EXPECTED_MACRO_COUNT = 6 const MAX_WAIT = 2 + const RC_FAILURE = -1 dim macro_identifier( EXPECTED_MACRO_COUNT ) macro_identifier( 1 ) = "1: True" @@ -89,29 +90,34 @@ testcase tBasicVBACompatApplicationUnion() endif printlog( "Click <Ausfuehren> to execute the macro" ) - iMacroPosition = hClickButton( Ausfuehren ) + if ( hClickButton( Ausfuehren ) <> RC_FAILURE ) then - printlog( "Check for the " & EXPECTED_MACRO_COUNT & " expected messageboxes" ) - for iCurrentMacro = 1 to EXPECTED_MACRO_COUNT + printlog( "Check for the " & EXPECTED_MACRO_COUNT & " expected messageboxes" ) + for iCurrentMacro = 1 to EXPECTED_MACRO_COUNT - printlog( "" ) - kontext "Active" - printlog( iCurrentMacro & ": Check for messagebox: " & macro_identifier( iCurrentMacro ) ) - if ( Active.exists( MAX_WAIT ) ) then + printlog( "" ) + kontext "Active" + printlog( iCurrentMacro & ": Check for messagebox: " & macro_identifier( iCurrentMacro ) ) + if ( Active.exists( MAX_WAIT ) ) then + + if ( Active.getText() = macro_identifier( iCurrentMacro ) ) then + printlog( "The expected macro was executed" ) + else + warnlog( "Unexpected macro executed: " & Active.getText() ) + endif + Active.ok() - if ( Active.getText() = macro_identifier( iCurrentMacro ) ) then - printlog( "The expected macro was executed" ) else - warnlog( "Unexpected macro executed: " & Active.getText() ) + warnlog( "Expected messagebox not displayed within reasonable timeframe" ) + goto endsub endif - Active.ok() - - else - warnlog( "Expected messagebox not displayed within reasonable timeframe" ) - goto endsub - endif - next iCurrentMacro + next iCurrentMacro + else + warnlog( "Unable to execute macro, the <Run Macro> button is disabled" ) + kontext "Makro" + Makro.close() + endif else warnlog( "Failed to open BASIC organizer" ) endif |