diff options
author | Joerg Skottke [jsk] <jsk@openoffice.org> | 2010-01-12 11:51:21 +0100 |
---|---|---|
committer | Joerg Skottke [jsk] <jsk@openoffice.org> | 2010-01-12 11:51:21 +0100 |
commit | 53fa1c622f0c74325e13d8afe1b5351ca0c00f02 (patch) | |
tree | 22c6a6f4e0b45b8e05b06fbbc5131bf29498177d | |
parent | 28bd293e222e9e1013a5dd1200d622c3f5c97f0d (diff) |
sb111: Better dialog handling for the Assign Macro dialog (using timeout now). Added slot <ContextProperties> to hUseAsyncSlot
3 files changed, 53 insertions, 40 deletions
diff --git a/testautomation/framework/required/includes/basic_macroassignment.inc b/testautomation/framework/required/includes/basic_macroassignment.inc index 92c88f7ace17..88a88bad48da 100755 --- a/testautomation/framework/required/includes/basic_macroassignment.inc +++ b/testautomation/framework/required/includes/basic_macroassignment.inc @@ -106,20 +106,28 @@ testcase tUpdtMacroAssignment Kontext "AssignMacro" printlog( "Current Dialog: Assign Macro" ) - call dialogtest( AssignMacro ) - printlog( "Click the Assign-Button on the Macro-Assignment-Dialog" ) - AssignButton.click() - - Kontext "ScriptSelector" - printlog( "Current Dialog: ScriptSelector" ) - call dialogtest( ScriptSelector ) - printlog( "Cancel the scriptselector" ) - ScriptSelector.cancel() - - Kontext "AssignMacro" - printlog( "Current Dialog: Assign Macro" ) - printlog( "Cancel the Script-Assignement-Dialog" ) - AssignMacro.cancel() + if ( AssignMacro.exists( 1 ) ) then + call dialogtest( AssignMacro ) + printlog( "Click the Assign-Button on the Macro-Assignment-Dialog" ) + AssignButton.click() + + Kontext "ScriptSelector" + printlog( "Current Dialog: ScriptSelector" ) + if ( ScriptSelector.exists( 1 ) ) then + call dialogtest( ScriptSelector ) + printlog( "Cancel the scriptselector" ) + ScriptSelector.cancel() + else + warnlog( "Failed to open/access <ScriptSelector>" ) + endif + + Kontext "AssignMacro" + printlog( "Current Dialog: Assign Macro" ) + printlog( "Cancel the Script-Assignement-Dialog" ) + AssignMacro.cancel() + else + warnlog( "Failed to open/access <AssignMacro> dialog" ) + endif endif diff --git a/testautomation/framework/tools/includes/pbrowser_tools.inc b/testautomation/framework/tools/includes/pbrowser_tools.inc index dbf91221b1bc..5b59dae3c472 100755 --- a/testautomation/framework/tools/includes/pbrowser_tools.inc +++ b/testautomation/framework/tools/includes/pbrowser_tools.inc @@ -67,36 +67,38 @@ function hOpenPropertyBrowser() as boolean '///<ul> const CFN = "hOpenPropertyBrowser::" + dim irc as integer '///+<li>Open the property browser (call slot)</li> - try - ContextProperties - - '///+<li>Verify that the property browser is open</li> - kontext "ControlPropertiesTabControl" - if ( ControlPropertiesTabControl.exists( 2 ) ) then - - '///+<li>Activate General-tabpage</li> - ControlPropertiesTabControl.setPage( TabGeneralControl ) - - '///+<li>Verify that the General-tabpage is visible</li> - kontext "TabGeneralControl" - if ( TabGeneralControl.isVisible() ) then - printlog( CFN & "ok" ) - hOpenPropertyBrowser() = true - else - printlog( CFN & "General-tab is not visible." ) - hOpenPropertyBrowser() = false - endif - else - printlog( CFN & "Could not open property browser" ) - hOpenPropertyBrowser() = false - endif - catch + irc = hUseAsyncSlot( "ContextProperties" ) + + ' Check that the slot did indeed get executed. If not: Warn and exit + if ( irc = -1 ) then + warnlog( CFN & "hUseAsyncSlot timed out for <ContextProperties>" ) hOpenPropertyBrowser() = false - printlog( CFN & "Slot <ContextProperties> not available" ) - endcatch + exit function + endif + '///+<li>Verify that the property browser is open</li> + kontext "ControlPropertiesTabControl" + if ( ControlPropertiesTabControl.exists( 2 ) ) then + + '///+<li>Activate General-tabpage</li> + ControlPropertiesTabControl.setPage( TabGeneralControl ) + + '///+<li>Verify that the General-tabpage is visible</li> + kontext "TabGeneralControl" + if ( TabGeneralControl.isVisible() ) then + printlog( CFN & "ok" ) + hOpenPropertyBrowser() = true + else + printlog( CFN & "General-tab is not visible." ) + hOpenPropertyBrowser() = false + endif + else + printlog( CFN & "Could not open property browser" ) + hOpenPropertyBrowser() = false + endif '///</ul> end function diff --git a/testautomation/global/tools/includes/required/t_tools1.inc b/testautomation/global/tools/includes/required/t_tools1.inc index 1fd3e89cb800..1bf6685a13f3 100755 --- a/testautomation/global/tools/includes/required/t_tools1.inc +++ b/testautomation/global/tools/includes/required/t_tools1.inc @@ -1275,6 +1275,9 @@ function hUseAsyncSlot( cSlot as string ) as integer case "toolsupdatelinks" : ToolsUpdateLinks case "toolslanguagehangulhanjaconversion" : ToolsLanguageHangulHanjaConversion + ' This is the property browser in the BASIC IDE + case "contextproperties" : ContextProperties + case else : warnlog( "Unknown slot called: " & cSlot ) end select |