diff options
author | skotti <skotti@buster.gleitmeier.de> | 2009-11-26 15:39:08 +0100 |
---|---|---|
committer | skotti <skotti@buster.gleitmeier.de> | 2009-11-26 15:39:08 +0100 |
commit | d839e25d30e4dbb2400ab07eca19b1b4e45d1287 (patch) | |
tree | 96117ee63a88d6d220d882f7ada1b77976a8853e | |
parent | f38a1aaef3b8eb830078d68de6f8db7f3fab2950 (diff) |
sb111: <no issue> remove some sleep statements, resolve potential timing issues, add slots to hUseAsyncSlot()
-rwxr-xr-x | testautomation/framework/optional/includes/ole_1.inc | 74 | ||||
-rwxr-xr-x | testautomation/global/tools/includes/required/t_tools1.inc | 4 |
2 files changed, 45 insertions, 33 deletions
diff --git a/testautomation/framework/optional/includes/ole_1.inc b/testautomation/framework/optional/includes/ole_1.inc index 050a78b0fc6c..8a17a233f5d6 100755 --- a/testautomation/framework/optional/includes/ole_1.inc +++ b/testautomation/framework/optional/includes/ole_1.inc @@ -47,13 +47,13 @@ testcase tOLEWriter Call hNewDocument PrintLog "- Writer : Chart without table" - InsertObjectChart - sleep(4) + hUseAsyncSlot( "InsertObjectChart" ) + Kontext "DocumentChart" - if DocumentChart.Exists(5) then + if ( DocumentChart.Exists( 5 ) ) then FormatChartType Kontext "ChartType" - if ChartType.Exists(5) then + if ( ChartType.Exists( 5 ) ) then ChartType.Cancel else warnlog "Chart Type dialog did bot occour." @@ -62,18 +62,22 @@ testcase tOLEWriter DocumentChart.TypeKeys "<ESCAPE>" Kontext "DocumentWriter" DocumentWriter.TypeKeys "<DELETE>" - sleep(1) else warnlog "Chart has not been inserted." end if - sleep(4) + PrintLog "- Writer : Chart out of a table only with numbers" - InsertTableWriter + hUseAsyncSlot( "InsertTableWriter" ) Kontext "TabelleEinfuegenWriter" - Spalten.SetText "3" - Zeilen.SetText "10" - TabelleEinfuegenWriter.OK + if ( TabelleEinfuegenWriter.exists( 1 ) ) then + Spalten.SetText "3" + Zeilen.SetText "10" + TabelleEinfuegenWriter.OK + TabelleEinfuegenWriter.notExists( 2 ) + else + warnlog( "Dialog <TabelleEinfuegenWriter> did not open" ) + endif Kontext "DocumentWriter" for i%=1 to 10 @@ -86,7 +90,7 @@ testcase tOLEWriter DocumentWriter.TypeKeys "<Left>", 3 next i% - InsertObjectChart + hUseAsyncSlot( "InsertObjectChart" ) hStepThroughChartWizard() Kontext "DocumentChart" @@ -96,16 +100,19 @@ testcase tOLEWriter Sleep 1 DocumentWriter.TypeKeys "<Down>", 20 DocumentWriter.TypeKeys "<Return>", 2 - Sleep 1 - PrintLog "- Writer : Chart out of a table only with chars" - InsertTableWriter + hUseAsyncSlot( "InsertTableWriter" ) Kontext "TabelleEinfuegenWriter" - Spalten.SetText "3" - Zeilen.SetText "10" - TabelleEinfuegenWriter.OK + if ( TabelleEinfuegenWriter.exists( 1 ) ) then + Spalten.SetText "3" + Zeilen.SetText "10" + TabelleEinfuegenWriter.OK + TabelleEinfuegenWriter.notExists( 2 ) + else + warnlog( "Dialog <TabelleEinfuegenWriter> did not open" ) + endif Kontext "DocumentWriter" for i%=1 to 10 @@ -118,8 +125,7 @@ testcase tOLEWriter DocumentWriter.TypeKeys "<Left>", 3 next i% - InsertObjectChart - + hUseAsyncSlot( "InsertObjectChart" ) hStepThroughChartWizard() Kontext "DocumentChart" @@ -129,30 +135,32 @@ testcase tOLEWriter Sleep 1 DocumentWriter.TypeKeys "<Down>", 20 DocumentWriter.TypeKeys "<Return>", 2 - Sleep 1 PrintLog "- Writer : Math" - InsertObjectFormulaWriter + hUseAsyncSlot( "InsertObjectFormulaWriter" ) gMouseClick ( 1, 1) Kontext "DocumentWriter" DocumentWriter.TypeKeys "<Delete>" - Sleep 1 PrintLog "- Writer : floating frame" + hUseAsyncSlot( "InsertFloatingFrame" ) - 'warnlog( "#148094# - Crash when deselecting floating frame in Writer" ) - - InsertFloatingFrame - + printlog( "Properties dialog for floating frame should open" ) Kontext "TabEigenschaften" - FrameName.SetText "Hallo" - Inhalt.SetText ConvertPath ( gTesttoolPath+"global\input\graf_inp\borabora.jpg" ) - - TabEigenschaften.OK - Sleep 2 + if ( TabEigenschaften.exists( 1 ) and TabEigenschaften.isVisible() ) then + + printlog( "Name the floating frame, close the dialog" ) + FrameName.SetText "Hallo" + Inhalt.SetText ConvertPath ( gTesttoolPath+"global\input\graf_inp\borabora.jpg" ) + + TabEigenschaften.OK + TabEigenSchaften.notExists( 2 ) + + endif + printlog( "Close the writer document" ) Kontext "DocumentWriter" DocumentWriter.TypeKeys "<Delete>" Sleep 1 @@ -333,7 +341,7 @@ testcase tOLEDraw MenuSelect(0) try - InsertObjectChart + hUseAsyncSlot( "InsertObjectChart" ) Sleep ( 2 ) Kontext "DocumentChart" @@ -413,7 +421,7 @@ testcase tOLEImpress PrintLog "- Impress : Chart" try - InsertObjectChart + hUseAsyncSlot( "InsertObjectChart" ) sleep 2 gMouseClick ( 1 , 1 ) diff --git a/testautomation/global/tools/includes/required/t_tools1.inc b/testautomation/global/tools/includes/required/t_tools1.inc index d4019b96cf3d..1fd3e89cb800 100755 --- a/testautomation/global/tools/includes/required/t_tools1.inc +++ b/testautomation/global/tools/includes/required/t_tools1.inc @@ -1262,6 +1262,10 @@ function hUseAsyncSlot( cSlot as string ) as integer case "formatpagewriter" : FormatPageWriter case "insertindexesbibliographyentry" : InsertIndexesBibliographyEntry + case "insertobjectchart" : InsertObjectChart + case "inserttablewriter" : InsertTableWriter + case "insertobjectformulawriter" : InsertObjectFormulaWriter + case "insertfloatingframe" : InsertFloatingFrame case "contextpositionandsize" : ContextPositionAndSize |