diff options
51 files changed, 6449 insertions, 6138 deletions
diff --git a/testautomation/chart2/required/ch2_updt_calc.bas b/testautomation/chart2/required/ch2_updt_calc.bas index 57c5fa52bcec..632df0614063 100755 --- a/testautomation/chart2/required/ch2_updt_calc.bas +++ b/testautomation/chart2/required/ch2_updt_calc.bas @@ -1,157 +1,158 @@ -'encoding UTF-8 Do not remove or change this line! -'************************************************************************** -'* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. -'* -'* Copyright 2008 by Sun Microsystems, Inc. -'* -'* OpenOffice.org - a multi-platform office productivity suite -'* -'* $RCSfile: ch2_updt_calc.bas,v $ -'* -'* $Revision: 1.1 $ -'* -'* last change: $Author: jsi $ $Date: 2008-06-13 14:27:01 $ -'* -'* This file is part of OpenOffice.org. -'* -'* OpenOffice.org is free software: you can redistribute it and/or modify -'* it under the terms of the GNU Lesser General Public License version 3 -'* only, as published by the Free Software Foundation. -'* -'* OpenOffice.org is distributed in the hope that it will be useful, -'* but WITHOUT ANY WARRANTY; without even the implied warranty of -'* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -'* GNU Lesser General Public License version 3 for more details -'* (a copy is included in the LICENSE file that accompanied this code). -'* -'* You should have received a copy of the GNU Lesser General Public License -'* version 3 along with OpenOffice.org. If not, see -'* <http://www.openoffice.org/license.html> -'* for a copy of the LGPLv3 License. -'* -'/************************************************************************ -'* -'* owner : helge.delfs@sun.com -'* -'* short description : Resource Test for all chart specific menues -'* -'\************************************************************************************************ - -sub main - use "chart2\tools\ch_tools_common.inc" - use "chart2\tools\ch_tools_chart_type.inc" - use "chart2\tools\ch_tools_titles.inc" - use "chart2\tools\ch_tools_axes.inc" - use "chart2\tools\ch_tools_grids.inc" - use "chart2\tools\ch_tools_legend.inc" - use "chart2\tools\ch_tools_data_labels.inc" - use "chart2\tools\ch_tools_statistics.inc" - use "chart2\tools\ch_tools_tab_pages.inc" - use "chart2\tools\ch_tools_select.inc" - use "chart2\required\includes\ch2_wizard.inc" - use "chart2\required\includes\ch2_file.inc" - use "chart2\required\includes\ch2_view.inc" - use "chart2\required\includes\ch2_insert_ctl.inc" - use "chart2\required\includes\ch2_insert.inc" - use "chart2\required\includes\ch2_format.inc" - use "chart2\required\includes\ch2_format1.inc" - use "chart2\required\includes\ch2_window.inc" - use "chart2\required\includes\ch2_toolbars.inc" - use "chart2\required\includes\ch2_menu.inc" - use "chart2\required\includes\ch2_ole.inc" - - Call hStatusIn("Chart2", "ch2_updt_calc.bas") - - printlog "----------------------------------------" - printlog "C h a r t 2 i n S p r e a d s h e e t" - printlog " U p d a t e t e s t" - printlog "----------------------------------------" - printLog Chr(13) + "----------- Chart2 Wizard ------------" - Call tCreateNewChart - printLog Chr(13) + "----------- Chart2 Menu ------------" - call tMainMenu - printLog Chr(13) + "---------- Chart2 File Menu ----------" - call tFileClose - call tFileSaveAsOTS - call tFileSaveAsSXC - call tFileSaveAsSTC - call tFileSaveAsXLS - call tFileSaveAsXLT - call tFileSaveAsSDC - call tFileSaveAsVOR - call tFileReload - printLog Chr(13) + "---------- Chart2 View Menu -----------" - Call tViewToolbars - Call tViewToolbarsCustomize - Call tViewFullScreen - printLog Chr(13) + "-------- Chart2 Insert Menu ----------" - call tInsertTitle - call tInsertAxes - call tInsertGrids - call tInsertLegend - call tInsertDataLabels - call tInsertTrendLines - call tInsertMeanValueLines - call tInsertYErrorBars - call tInsertSpecialCharacter - printLog Chr(13) + "-------- Chart2 CTL Features ----------" - call tTitleTextDirection - call tLegendTextDirection - call tXAxisTextDirection - call tDataSeriesTextDirection - call tEquationTextDirection - call tDataPointTextDirection - printlog Chr(13) + "--------- Chart2 Format Menu ---------" - call tFormatObjectProperties - call tFormatObjectPropertiesPieChart - call tFormatPositonAndSize - call tFormatArrangement - Call tFormatTitleMaintitle - Call tFormatTitleSubtitle - Call tFormatTitleXAxistitle - Call tFormatTitleYAxistitle - Call tFormatTitleZAxistitle - Call tFormatTitleAllTitles - Call tFormatAxisXAxis - Call tFormatAxisYAxis - Call tFormatAxisZAxis - Call tFormatAxisSecondaryXAxis - Call tFormatAxisSecondaryYAxis - Call tFormatAxisAllAxes - Call tFormatXAxisMainGrid - Call tFormatYAxisMainGrid - Call tFormatZAxisMainGrid - call tFormatXAxisMinorGrid - Call tFormatYAxisMinorGrid - Call tFormatAllAxesGrids - Call tFormatLegend - Call tFormatChartWall - Call tFormatChartFloor - Call tFormatChartArea - Call tFormatChartType - call tFormatDataRanges - Call tFormat3DView - printlog Chr(13) + "--------- Chart2 Window Menu ---------" - Call tWindowNewWindowAndClose - printLog Chr(13) + "---------- Chart2 Toolbars -----------" - Call tdummyToolbar - printLog Chr(13) + "--------- Chart2 as OLE object ---------" - Call tChartOLE("WRITER") - Call tChartOLE("CALC") - Call tChartOLE("IMPRESS") - Call tChartOLE("DRAW") - Call tChartOLE("HTMLDOKUMENT") - Call tChartOLE("MASTERDOC") - Call hStatusOut -end sub -' -'------------------------------------------------------------------------------- -' -sub LoadIncludeFiles - use "global\system\includes\master.inc" - use "global\system\includes\gvariabl.inc" - use "global\tools\includes\optional\t_set_standard_controls.inc" - Call GetUseFiles - gApplication = "CALC" -end sub - +'encoding UTF-8 Do not remove or change this line!
+'**************************************************************************
+'* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+'*
+'* Copyright 2008 by Sun Microsystems, Inc.
+'*
+'* OpenOffice.org - a multi-platform office productivity suite
+'*
+'* $RCSfile: ch2_updt_calc.bas,v $
+'*
+'* $Revision: 1.1 $
+'*
+'* last change: $Author: jsi $ $Date: 2008-06-13 14:27:01 $
+'*
+'* This file is part of OpenOffice.org.
+'*
+'* OpenOffice.org is free software: you can redistribute it and/or modify
+'* it under the terms of the GNU Lesser General Public License version 3
+'* only, as published by the Free Software Foundation.
+'*
+'* OpenOffice.org is distributed in the hope that it will be useful,
+'* but WITHOUT ANY WARRANTY; without even the implied warranty of
+'* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+'* GNU Lesser General Public License version 3 for more details
+'* (a copy is included in the LICENSE file that accompanied this code).
+'*
+'* You should have received a copy of the GNU Lesser General Public License
+'* version 3 along with OpenOffice.org. If not, see
+'* <http://www.openoffice.org/license.html>
+'* for a copy of the LGPLv3 License.
+'*
+'/************************************************************************
+'*
+'* owner : helge.delfs@sun.com
+'*
+'* short description : Resource Test for all chart specific menues
+'*
+'\************************************************************************************************
+
+sub main
+ use "chart2\tools\ch_tools_common.inc"
+ use "chart2\tools\ch_tools_chart_type.inc"
+ use "chart2\tools\ch_tools_titles.inc"
+ use "chart2\tools\ch_tools_axes.inc"
+ use "chart2\tools\ch_tools_grids.inc"
+ use "chart2\tools\ch_tools_legend.inc"
+ use "chart2\tools\ch_tools_data_labels.inc"
+ use "chart2\tools\ch_tools_statistics.inc"
+ use "chart2\tools\ch_tools_tab_pages.inc"
+ use "chart2\tools\ch_tools_select.inc"
+ use "chart2\required\includes\ch2_wizard.inc"
+ use "chart2\required\includes\ch2_file.inc"
+ use "chart2\required\includes\ch2_view.inc"
+ use "chart2\required\includes\ch2_insert_ctl.inc"
+ use "chart2\required\includes\ch2_insert.inc"
+ use "chart2\required\includes\ch2_format.inc"
+ use "chart2\required\includes\ch2_format1.inc"
+ use "chart2\required\includes\ch2_window.inc"
+ use "chart2\required\includes\ch2_toolbars.inc"
+ use "chart2\required\includes\ch2_menu.inc"
+ use "chart2\required\includes\ch2_ole.inc"
+
+ Call hStatusIn("Chart2", "ch2_updt_calc.bas")
+
+ printlog "----------------------------------------"
+ printlog "C h a r t 2 i n S p r e a d s h e e t"
+ printlog " U p d a t e t e s t"
+ printlog "----------------------------------------"
+ printLog Chr(13) + "----------- Chart2 Wizard ------------"
+ Call tCreateNewChart
+ printLog Chr(13) + "----------- Chart2 Menu ------------"
+ call tMainMenu
+ printLog Chr(13) + "---------- Chart2 File Menu ----------"
+ call tFileClose
+ call tFileSaveAsOTS
+ call tFileSaveAsSXC
+ call tFileSaveAsSTC
+ call tFileSaveAsXLS
+ call tFileSaveAsXLT
+ call tFileSaveAsSDC
+ call tFileSaveAsVOR
+ call tFileReload
+ printLog Chr(13) + "---------- Chart2 View Menu -----------"
+ Call tViewToolbars
+ Call tViewToolbarsCustomize
+ Call tViewFullScreen
+ printLog Chr(13) + "-------- Chart2 Insert Menu ----------"
+ call tInsertTitle
+ call tInsertAxes
+ call tInsertGrids
+ call tInsertLegend
+ call tInsertDataLabels
+ call tInsertTrendLines
+ call tInsertMeanValueLines
+ call tInsertYErrorBars
+ call tInsertSpecialCharacter
+ printLog Chr(13) + "-------- Chart2 CTL Features ----------"
+ call tTitleTextDirection
+ call tLegendTextDirection
+ call tXAxisTextDirection
+ call tDataSeriesTextDirection
+ call tEquationTextDirection
+ call tDataPointTextDirection
+ printlog Chr(13) + "--------- Chart2 Format Menu ---------"
+ call tFormatObjectProperties
+ call tFormatObjectPropertiesPieChart
+ call tFormatPositonAndSize
+ call tFormatArrangement
+ Call tFormatTitleMaintitle
+ Call tFormatTitleSubtitle
+ Call tFormatTitleXAxistitle
+ Call tFormatTitleYAxistitle
+ Call tFormatTitleZAxistitle
+ Call tFormatTitleAllTitles
+ Call tFormatAxisXAxis
+ Call tFormatAxisYAxis
+ Call tFormatAxisZAxis
+ Call tFormatAxisSecondaryXAxis
+ Call tFormatAxisSecondaryYAxis
+ Call tFormatAxisAllAxes
+ Call tFormatXAxisMainGrid
+ Call tFormatYAxisMainGrid
+ Call tFormatZAxisMainGrid
+ call tFormatXAxisMinorGrid
+ Call tFormatYAxisMinorGrid
+ Call tFormatAllAxesGrids
+ Call tFormatLegend
+ Call tFormatChartWall
+ Call tFormatChartFloor
+ Call tFormatChartArea
+ Call tFormatChartType
+ call tFormatDataRanges
+ Call tFormat3DView
+ printlog Chr(13) + "--------- Chart2 Window Menu ---------"
+ Call tWindowNewWindowAndClose
+ printLog Chr(13) + "---------- Chart2 Toolbars -----------"
+ Call tdummyToolbar
+ printLog Chr(13) + "--------- Chart2 as OLE object ---------"
+ Call tChartOLE("WRITER")
+ Call tChartOLE("CALC")
+ Call tChartOLE("IMPRESS")
+ Call tChartOLE("DRAW")
+ Call tChartOLE("HTML")
+ Call tChartOLE("MASTERDOCUMENT")
+ Call hStatusOut
+
+end sub
+'
+'-------------------------------------------------------------------------------
+'
+sub LoadIncludeFiles
+ use "global\system\includes\master.inc"
+ use "global\system\includes\gvariabl.inc"
+ use "global\tools\includes\optional\t_set_standard_controls.inc"
+ Call GetUseFiles
+ gApplication = "CALC"
+end sub
+
diff --git a/testautomation/framework/required/includes/standard_toolbar_3.inc b/testautomation/framework/required/includes/standard_toolbar_3.inc index c2a4bb581c06..2af30fef9589 100755 --- a/testautomation/framework/required/includes/standard_toolbar_3.inc +++ b/testautomation/framework/required/includes/standard_toolbar_3.inc @@ -184,7 +184,7 @@ testcase tStandardBar_3 '///+<li>Click on Paste</li> printlog( "Paste" ) Kontext "Standardbar" - hWaitForObject( Einfuegen , 8000 ) + sleep( 3 ) ' No better solution found yet. Einfuegen.Click() Kontext "DocumentCalc" diff --git a/testautomation/global/input/filters/build_to_filter.txt b/testautomation/global/input/filters/build_to_filter.txt index f5860778c898..32a95a095060 100644 --- a/testautomation/global/input/filters/build_to_filter.txt +++ b/testautomation/global/input/filters/build_to_filter.txt @@ -7,8 +7,8 @@ CALC=StarCalc 5.0 IMPRESS=StarImpress 5.0 DRAW=StarDraw 5.0 MATH=StarMath 5.0 -MASTERDOC=StarWriter 5.0/GlobalDocument -INSIGHT= +MASTERDOCUMENT=StarWriter 5.0/GlobalDocument +DATABASE= CHART=StarChart 5.0 HTML=HTML @@ -18,8 +18,8 @@ CALC=StarOffice XML (Calc) IMPRESS=StarOffice XML (Impress) DRAW=StarOffice XML (Draw) MATH=StarOffice XML (Math) -MASTERDOC=writer_globaldocument_StarOffice_XML_Writer_GlobalDocument -INSIGHT= +MASTERDOCUMENT=writer_globaldocument_StarOffice_XML_Writer_GlobalDocument +DATABASE= CHART=StarOffice XML (Chart) HTML=Text (StarWriter/Web) @@ -29,8 +29,8 @@ CALC=StarOffice XML (Calc) IMPRESS=StarOffice XML (Impress) DRAW=StarOffice XML (Draw) MATH=StarOffice XML (Math) -MASTERDOC=writer_globaldocument_StarOffice_XML_Writer_GlobalDocument -INSIGHT= +MASTERDOCUMENT=writer_globaldocument_StarOffice_XML_Writer_GlobalDocument +DATABASE= CHART=StarOffice XML (Chart) HTML=HTML @@ -40,8 +40,8 @@ CALC=calc8 IMPRESS=impress8 DRAW=draw8 MATH=math8 -MASTERDOC=writerglobal8 -INSIGHT= +MASTERDOCUMENT=writerglobal8 +DATABASE= CHART=chart8 HTML=HTML @@ -51,8 +51,8 @@ CALC=calc8 IMPRESS=impress8 DRAW=draw8 MATH=math8 -MASTERDOC=writerglobal8 -INSIGHT= +MASTERDOCUMENT=writerglobal8 +DATABASE= CHART=chart8 HTML=HTML @@ -62,7 +62,7 @@ CALC=calc8 IMPRESS=impress8 DRAW=draw8 MATH=math8 -MASTERDOC=writerglobal8 -INSIGHT= +MASTERDOCUMENT=writerglobal8 +DATABASE= CHART=chart8 HTML=HTML diff --git a/testautomation/global/input/filters/build_to_suffix.txt b/testautomation/global/input/filters/build_to_suffix.txt index 0c9c72f70c33..3bd665bf7311 100644 --- a/testautomation/global/input/filters/build_to_suffix.txt +++ b/testautomation/global/input/filters/build_to_suffix.txt @@ -7,7 +7,7 @@ CALC=calc_StarCalc_50 IMPRESS=impress_StarImpress_50 DRAW=draw_StarDraw_50 MATH=math_StarMath_50 -MASTERDOC=writer_globaldocument_StarWriter_50GlobalDocument +MASTERDOCUMENT=writer_globaldocument_StarWriter_50GlobalDocument INSIGHT= CHART=chart_StarChart_50 HTML=HTML @@ -18,7 +18,7 @@ CALC=calc_StarOffice_XML_Calc IMPRESS=impress_StarOffice_XML_Impress DRAW=draw_StarOffice_XML_Draw MATH=math_StarOffice_XML_Math -MASTERDOC=writer_globaldocument_StarOffice_XML_Writer_GlobalDocument +MASTERDOCUMENT=writer_globaldocument_StarOffice_XML_Writer_GlobalDocument INSIGHT= CHART=chart_StarOffice_XML_Chart HTML=writer_web_HTML @@ -29,7 +29,7 @@ CALC=calc_StarOffice_XML_Calc IMPRESS=impress_StarOffice_XML_Impress DRAW=draw_StarOffice_XML_Draw MATH=math_StarOffice_XML_Math -MASTERDOC=writer_globaldocument_StarOffice_XML_Writer_GlobalDocument +MASTERDOCUMENT=writer_globaldocument_StarOffice_XML_Writer_GlobalDocument INSIGHT= CHART=chart_StarOffice_XML_Chart HTML=writer_web_HTML @@ -40,7 +40,7 @@ CALC=calc8 IMPRESS=impress8 DRAW=draw8 MATH=math8 -MASTERDOC=writerglobal8 +MASTERDOCUMENT=writerglobal8 INSIGHT= CHART=chart8 HTML=writer_web_HTML @@ -51,7 +51,7 @@ CALC=calc8 IMPRESS=impress8 DRAW=draw8 MATH=math8 -MASTERDOC=writerglobal8 +MASTERDOCUMENT=writerglobal8 INSIGHT= CHART=chart8 HTML=writer_web_HTML @@ -62,7 +62,7 @@ CALC=calc8 IMPRESS=impress8 DRAW=draw8 MATH=math8 -MASTERDOC=writerglobal8 +MASTERDOCUMENT=writerglobal8 INSIGHT= CHART=chart8 HTML=writer_web_HTML diff --git a/testautomation/global/input/filters/native_suffixes.dat b/testautomation/global/input/filters/native_suffixes.dat index bfb3acad138d..6c648955fbdb 100755 --- a/testautomation/global/input/filters/native_suffixes.dat +++ b/testautomation/global/input/filters/native_suffixes.dat @@ -7,7 +7,7 @@ IMPRESS=.sdd DRAW=.sda
MATH=.smf
HTML=.htm
-MASTERDOC=.sgl
+MASTERDOCUMENT=.sgl
[641]
#StarOffice 6.x
@@ -18,7 +18,7 @@ IMPRESS=.sxi DRAW=.sxd
MATH=.sxm
HTML=.htm
-MASTERDOC=.sxg
+MASTERDOCUMENT=.sxg
[645]
#OpenOffice.org 1.x / StarOffice 7 / StarSuite 7
@@ -29,7 +29,7 @@ IMPRESS=.sxi DRAW=.sxd
MATH=.sxm
HTML=.htm
-MASTERDOC=.sxg
+MASTERDOCUMENT=.sxg
[680]
#OpenOffice.org 2.0 / StarOffice 8 / StarSuite 8
@@ -40,7 +40,7 @@ IMPRESS=.odp DRAW=.odg
MATH=.odf
HTML=.htm
-MASTERDOC=.odm
+MASTERDOCUMENT=.odm
[current]
#the current build is 680
@@ -50,4 +50,4 @@ IMPRESS=.odp DRAW=.odg
MATH=.odf
HTML=.htm
-MASTERDOC=.odm
+MASTERDOCUMENT=.odm
diff --git a/testautomation/global/required/includes/g_option.inc b/testautomation/global/required/includes/g_option.inc index a9f5a2b72550..fe3fb9b23236 100755 --- a/testautomation/global/required/includes/g_option.inc +++ b/testautomation/global/required/includes/g_option.inc @@ -1,7 +1,7 @@ 'encoding UTF-8 Do not remove or change this line! '************************************************************************** '* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. -'* +'* '* Copyright 2008 by Sun Microsystems, Inc. '* '* OpenOffice.org - a multi-platform office productivity suite @@ -39,27 +39,26 @@ global sErrMes as String global iSectionNumber as Integer -sub ExtrasOptionenTest - Call tToolsOptionsTest -end sub +'******************************************************************************* sub tToolsOptionsTest - dim sApplication as string - - sApplication = gApplication + + dim sPreviousApplication as string + + sPreviousApplication = gApplication ' Document- and database related options are placed in the g_option2.inc library use "global\required\includes\g_option2.inc" ' subs and functions has been placed there use "global/tools/includes/required/t_option2.inc" - ' To prevent users from running just a subsection from this file, without THIS + ' To prevent users from running just a subsection from this file, without THIS ' subroutine, in every subsection the value of 'iSectionNumber' is checked. - ' The test will exist with warnlog, if iSectionNumber is 0 + ' The test will exit with warnlog, if iSectionNumber is 0 sErrMes = "" - select case uCase(gApplication) - case "WRITER","MASTERDOCUMENT","HTML": iSectionNumber = 8 - case "IMPRESS","DRAW","MATH","CALC" : iSectionNumber = 7 - end select + select case uCase(gApplication) + case "WRITER","MASTERDOCUMENT","HTML" : iSectionNumber = 8 + case "IMPRESS","DRAW","MATH","CALC" : iSectionNumber = 7 + end select ' common testcases are placed in this library ' these tab-sets are always available: Call tToolsOptionsStarOffice @@ -74,235 +73,270 @@ sub tToolsOptionsTest gApplication = "WRITER" iSectionNumber = 8 Call tToolsOptionsTextdocument - + gApplication = "HTML" Call tToolsOptionsHTMLDocument - + gApplication = "CALC" iSectionNumber = 7 Call tToolsOptionsSpreadsheet - + gApplication = "IMPRESS" iSectionNumber = 7 Call tToolsOptionsPresentation - + gApplication = "DRAW" iSectionNumber = 7 Call tToolsOptionsDrawing - + gApplication = "MATH" iSectionNumber = 7 Call tToolsOptionsFormula - gApplication = sApplication + gApplication = sPreviousApplication end sub +'******************************************************************************* + testcase tToolsOptionsStarOffice + dim EchteAnzahl as Integer, i as Integer dim gefunden as Boolean, bSave as Boolean dim iMenuShould as integer '/// We have 12 tab pages in this category. If the <i>central configuration</i> feature is being used 13 (<i>Single SignOn</i>) '/// <i>Tools</i> / <i>Options</i> / <i>OpenOffice.org</i> PrintLog "- Tools/Options/StarOffice ( Extras/Optionen/StarOffice )" - if (0 = iSectionNumber) then + if (0 = iSectionNumber) then warnlog "You can't run this testcase seperated! Ending now! Please run it via: tToolsOptionsTest" goto endsub endif - if gApplication <> "BACKGROUND" then Call hNewDocument + + if ( gApplication = "BACKGROUND" ) then + ' Do not open any document + else + Call hNewDocument + endif + ToolsOptions ToPosInOptionlist ( 1 ) Kontext "ExtrasOptionenDlg" EchteAnzahl = Optionsliste.GetItemCount - iSectionNumber iMenuShould = 14 - + if EchteAnzahl <> iMenuShould then if ((gtplatform = "sol") OR (gtplatform = "x86") OR gOOO) AND EchteAnzahl = 12 then - printLog "One Tabpage is missing. This is ok for a patched Solaris (sparc and x86) or OOo installation." + printLog "One Tabpage is missing. This is ok for a patched Solaris (sparc and x86) or OOo installation." else Warnlog "The number of entries is not " + iMenuShould + "! => the current number is " + EchteAnzahl endif - end if + endif + Kontext "Active" try if Active.Exists then Active.OK catch if Active.Exists then Active.No endcatch + for i=1 to EchteAnzahl gefunden = FALSE Kontext "OptionenDlg" Optionsliste.TypeKeys "<Down>" select case i - case 1 : Kontext "TabAllgemeines" - '///+<ul><li>User data</li> - printlog " - Userdata / Benutzerdaten" - if TabAllgemeines.IsVisible then - gefunden = TRUE - Call DialogTest ( TabAllgemeines ) - end if - case 2 : Kontext "TabSonstigesAllgemein" - '///+<li>General</li> - printlog " - General / Allgemein" - if TabSonstigesAllgemein.IsVisible then - gefunden = TRUE - Call DialogTest ( TabSonstigesAllgemein ) - end if - case 3 : Kontext "TabMemory" - '///+<li>Memory</li> - printlog " - Memory / Arbeitsspeicher" - if TabMemory.IsVisible then - gefunden = TRUE - Call DialogTest ( TabMemory ) - end if - case 4 : Kontext "TabAnsichtAllgemein" - '///+<li>View</li> - printlog " - View / Ansicht" - if TabAnsichtAllgemein.IsVisible then - gefunden = TRUE - Call DialogTest ( TabAnsichtAllgemein ) - end if - case 5 : Kontext "TabPrintStarOffice" - '///+<li>Print</li> - printlog " - Print / Drucken" - if TabPrintStarOffice.IsVisible then - gefunden = TRUE - Call DialogTest ( TabPrintStarOffice ) - end if - case 6 : Kontext "TabPfade" - '///+<li>Paths - '///+ <ul><li>Click <i>edit</i> to all list entries and then close the file dialog</li></ul></li> - printlog " - Paths / Pfade" - if TabPfade.IsVisible then - gefunden = TRUE - Call DialogTest ( TabPfade ) - Call DialogeFuerTypenKontrollieren - end if - case 7 : Kontext "TabFarben" - '///+<li>Colors - '///+<ul><li>Click on <i>Add</i></li> - '///+<li>Click <i>OK</i> on message box</li> - '///+<li>Click <i>cancel> on <i>Name</i> dialog</li> - '///+<li>Click on <i>Edit</i></li> - '///+<li>Click on <i>Close</i> in <i>Colors</i> dialog</li></ul></li> - printlog " - Color / Farben" - sleep(4) + case 1 : + Kontext "TabAllgemeines" + '///+<ul><li>User data</li> + printlog " - Userdata / Benutzerdaten" + if TabAllgemeines.IsVisible then + gefunden = TRUE + Call DialogTest ( TabAllgemeines ) + endif + case 2 : + Kontext "TabSonstigesAllgemein" + '///+<li>General</li> + printlog " - General / Allgemein" + if TabSonstigesAllgemein.IsVisible then + gefunden = TRUE + Call DialogTest ( TabSonstigesAllgemein ) + endif + case 3 : + Kontext "TabMemory" + '///+<li>Memory</li> + printlog " - Memory / Arbeitsspeicher" + if TabMemory.IsVisible then + gefunden = TRUE + Call DialogTest ( TabMemory ) + endif + case 4 : + Kontext "TabAnsichtAllgemein" + '///+<li>View</li> + printlog " - View / Ansicht" + if TabAnsichtAllgemein.IsVisible then + gefunden = TRUE + Call DialogTest ( TabAnsichtAllgemein ) + endif + case 5 : + Kontext "TabPrintStarOffice" + '///+<li>Print</li> + printlog " - Print / Drucken" + if TabPrintStarOffice.IsVisible then + gefunden = TRUE + Call DialogTest ( TabPrintStarOffice ) + endif + case 6 : + Kontext "TabPfade" + '///+<li>Paths + '///+ <ul><li>Click <i>edit</i> to all list entries and then close the file dialog</li></ul></li> + printlog " - Paths / Pfade" + if TabPfade.IsVisible then + gefunden = TRUE + Call DialogTest ( TabPfade ) + Call DialogeFuerTypenKontrollieren + endif + case 7 : + Kontext "TabFarben" + '///+<li>Colors + '///+<ul><li>Click on <i>Add</i></li> + '///+<li>Click <i>OK</i> on message box</li> + '///+<li>Click <i>cancel> on <i>Name</i> dialog</li> + '///+<li>Click on <i>Edit</i></li> + '///+<li>Click on <i>Close</i> in <i>Colors</i> dialog</li></ul></li> + printlog " - Color / Farben" + if ( TabFarben.exists( 4 ) ) then if TabFarben.IsVisible then - gefunden = TRUE - Call DialogTest (TabFarben) - Farbe.Select(1) - Hinzufuegen.Click - Kontext "Active" - Active.OK - Kontext "NameDlg" - Call DialogTest (NameDlg) - NameDlg.Cancel - Kontext "TabFarben" - Bearbeiten.Click - sleep(3) - Kontext "FarbeDlg" - FarbeDlg.Cancel - end if - case 8 : Kontext "TabSchriftErsetzung" - '///+<li>Font replacement</li> - printlog " - Font Replacement / Schriftersetzung" - if TabSchriftErsetzung.IsVisible then - gefunden = TRUE - Call DialogTest ( TabSchriftErsetzung ) - end if - case 9: Kontext "TabSecurity" - '///+<li>Security</li> - printlog " - Security / Sicherheit" - if TabSecurity.IsVisible then - gefunden = TRUE - Call DialogTest ( TabSecurity ) - MacroSecurity.click() - - kontext "TabSecurityLevel" - if ( TabSecurityLevel.exists( 2 ) ) then - call DialogTest( TabSecurityLevel ) - kontext - active.setpage TabTrustedSources - kontext "TabTrustedSources" - call DialogTest( TabTrustedSources ) - TabTrustedSources.cancel - else - warnlog( "Macro Security Options dialog is missing" ) - qaerrorlog( "#i45295# or office built without mozilla support" ) - endif - - Kontext "TabSecurity" - if Protect.isEnabled then - Protect.click() - Kontext "PasswordDLG" - call DialogTest( PasswordDLG ) - PasswordDLG.cancel() - else - select case uCase(gApplication) - case "WRITER","MASTERDOCUMENT" :WarnLog "Protect-Button is disabled." - case "MATH","IMPRESS","DRAW","HTML","CALC" :PrintLog "Protect-Button is disabled." - end select - endif - sleep(1) - Kontext "TabSecurity" - Options.click - Kontext "TabSecurityOptionsAndWarnings" - Call DialogTest(TabSecurityOptionsAndWarnings) - TabSecurityOptionsAndWarnings.cancel - sleep(1) - end if - case 10: Kontext "TabAppearance" - '///+<li>Appearance</li> - printlog " - Appearance / Aussehen" - if TabAppearance.IsVisible then - gefunden = TRUE - Call DialogTest ( TabAppearance ) - end if - case 11: Kontext "TabAccessibility" - '///+<li>Accessibility</li> - printlog " - Accessibility" - if TabAccessibility.IsVisible then - gefunden = TRUE - Call DialogTest ( TabAccessibility ) - end if - case 12: Kontext "TabJava" - '///+<li>Java</li></ul> - printlog " - Java" - if TabJava.IsVisible then - gefunden = TRUE - Call DialogTest ( TabJava ) - end if - if useJava.isChecked then - Add.click - Kontext "OeffnenDlg" - Sleep (1) - OeffnenDlg.Cancel - Kontext "TabJava" - Parameters.click - Kontext "JavaStartParameter" - Call DialogTest ( JavaStartParameter ) - JavaStartParameter.cancel - Kontext "TabJava" - ClassPath.click - Kontext "JavaClassPath" - Call DialogTest ( JavaClassPath ) - JavaClassPath.cancel + gefunden = TRUE + Call DialogTest (TabFarben) + Farbe.Select(1) + Hinzufuegen.Click + Kontext "Active" + Active.OK + Kontext "NameDlg" + Call DialogTest (NameDlg) + NameDlg.Cancel + Kontext "TabFarben" + Bearbeiten.Click + WaitSlot( 3000 ) + Kontext "FarbeDlg" + FarbeDlg.Cancel + endif + endif + case 8 : + Kontext "TabSchriftErsetzung" + '///+<li>Font replacement</li> + printlog " - Font Replacement / Schriftersetzung" + if TabSchriftErsetzung.IsVisible then + gefunden = TRUE + Call DialogTest ( TabSchriftErsetzung ) + endif + case 9: + Kontext "TabSecurity" + '///+<li>Security</li> + printlog " - Security / Sicherheit" + if TabSecurity.IsVisible then + gefunden = TRUE + Call DialogTest ( TabSecurity ) + MacroSecurity.click() + + kontext "TabSecurityLevel" + if ( TabSecurityLevel.exists( 2 ) ) then + call DialogTest( TabSecurityLevel ) + kontext + active.setpage TabTrustedSources + kontext "TabTrustedSources" + call DialogTest( TabTrustedSources ) + TabTrustedSources.cancel + else + warnlog( "Macro Security Options dialog is missing" ) + qaerrorlog( "#i45295# or office built without mozilla support" ) + endif + + Kontext "TabSecurity" + if Protect.isEnabled then + Protect.click() + Kontext "PasswordDLG" + call DialogTest( PasswordDLG ) + PasswordDLG.cancel() + else + select case uCase(gApplication) + case "WRITER","MASTERDOCUMENT" + WarnLog "Protect-Button is disabled." + case "MATH","IMPRESS","DRAW","HTML","CALC" + PrintLog "Protect-Button is disabled." + end select + endif + + Kontext "TabSecurity" + if ( TabSecurity.exists( 1 ) ) then + Options.click + Kontext "TabSecurityOptionsAndWarnings" + Call DialogTest(TabSecurityOptionsAndWarnings) + TabSecurityOptionsAndWarnings.cancel else - printlog "Use Java is disabled." - end if - case 13: kontext "TabOnlineUpdate" - '///+<li>Online update</li> - printlog " - Online update" - if TabOnlineUpdate.isVisible then - gefunden = TRUE - Call DialogTest( TabOnlineUpdate ) + warnlog( "Tabsecurity did not open" ) endif - 'CheckNow.click - case 14: Kontext "TabOOoImprovement" - printlog( " - OpenOffice.org Improvement Program" ) - if ( TabOOoImprovement.isVisible() ) then - gefunden = TRUE - Call DialogTest( TabOOoImprovement ) - endif + + endif + case 10: + Kontext "TabAppearance" + '///+<li>Appearance</li> + printlog " - Appearance / Aussehen" + if TabAppearance.IsVisible then + gefunden = TRUE + Call DialogTest ( TabAppearance ) + endif + case 11: + Kontext "TabAccessibility" + '///+<li>Accessibility</li> + printlog " - Accessibility" + if TabAccessibility.IsVisible then + gefunden = TRUE + Call DialogTest ( TabAccessibility ) + endif + case 12: + Kontext "TabJava" + '///+<li>Java</li></ul> + printlog " - Java" + if TabJava.IsVisible then + gefunden = TRUE + Call DialogTest ( TabJava ) + endif + if useJava.isChecked then + Add.click + Kontext "OeffnenDlg" + if ( OeffnenDlg.exists( 1 ) ) then + OeffnenDlg.Cancel + else + warnlog( "OeffnenDlg is missing" ) + endif + Kontext "TabJava" + Parameters.click + Kontext "JavaStartParameter" + Call DialogTest ( JavaStartParameter ) + JavaStartParameter.cancel + Kontext "TabJava" + ClassPath.click + Kontext "JavaClassPath" + Call DialogTest ( JavaClassPath ) + JavaClassPath.cancel + else + printlog "Use Java is disabled." + endif + case 13: + kontext "TabOnlineUpdate" + '///+<li>Online update</li> + printlog " - Online update" + if TabOnlineUpdate.isVisible then + gefunden = TRUE + Call DialogTest( TabOnlineUpdate ) + endif + 'CheckNow.click + case 14: + Kontext "TabOOoImprovement" + printlog( " - OpenOffice.org Improvement Program" ) + if ( TabOOoImprovement.isVisible() ) then + gefunden = TRUE + Call DialogTest( TabOOoImprovement ) + endif end select if ( NOT gefunden ) then Warnlog "Error with the " & i & ".page, perhaps this page has been deleted or changed its position" @@ -311,265 +345,287 @@ testcase tToolsOptionsStarOffice i=10 else i=1-1 - end if - end if + endif + endif next i -'/// Close the options dialog - Kontext "OptionenDlg" - OptionenDlg.Cancel -'/// Close the document - if gApplication <> "BACKGROUND" then - Call hCloseDocument - end if + '/// Close the options dialog + Kontext "OptionenDlg" + if ( OptionenDlg.exists( 1 ) ) then + OptionenDlg.Cancel + else + warnlog( "Options Dialog not ready" ) + endif + '/// Close the document + if ( gApplication = "BACKGROUND" ) then + ' We should be on the backing window + else + Call hCloseDocument() + endif + endcase '------------------------------------------------------------------------- testcase tToolsOptionsLoadSave - dim EchteAnzahl as Integer, i as Integer - dim gefunden as Boolean - PrintLog "- Tools/Options/Load Save ( Extras/Optionen/Laden Speichern )" - if (0 = iSectionNumber) then + + dim EchteAnzahl as Integer, i as Integer + dim gefunden as Boolean + PrintLog "- Tools/Options/Load Save ( Extras/Optionen/Laden Speichern )" + if (0 = iSectionNumber) then warnlog "You can't run this testcase seperated! Ending now! Please run it via: tToolsOptionsTest" goto endsub endif - if gApplication <> "BACKGROUND" then Call hNewDocument -'/// <i>Tools</i> / <i>Options</i> / <i>Load/Save</i> - ToolsOptions - ToPosInOptionlist (2) - EchteAnzahl = OptionTabPageZaehler (4, FALSE) - for i=1 to EchteAnzahl - gefunden = FALSE - Kontext "OptionenDlg" - Optionsliste.TypeKeys "<Down>" - select case i - case 1 : Kontext "TabSpeichern" - '///+<ul><li>General</li> - printlog " - General / Save" - if TabSpeichern.IsVisible then - gefunden = TRUE - Call DialogTest ( TabSpeichern ) - end if - case 2 : Kontext "TabMicrosoftOffice97" - '///+<li>VBA settings</li> - printlog " - VBA Settings / VBA Eigenschaften" - if TabMicrosoftOffice97.IsVisible then - gefunden = TRUE - Call DialogTest ( TabMicrosoftOffice97 ) - end if - case 3 : Kontext "TabMicrosoftOffice2" - '///+<li>Microsoft Office</li> - printlog " - Microsoft Office" - if TabMicrosoftOffice2.IsVisible then - gefunden = TRUE - Call DialogTest ( TabMicrosoftOffice2 ) - end if - case 4 : Kontext "TabHTML" - '///+<li>HTML Compatibility</li></ul> - printlog " - HTML Compatibility / HTML Kompatibilitaet" - if TabHTML.IsVisible then - gefunden = TRUE - Call DialogTest ( TabHTML ) - end if - end select - if gefunden=FALSE then - Warnlog "Error with the " + i + ".page, perhaps this page is deleted or change the place!" - EchteAnzahl = EchteAnzahl - 1 - if EchteAnzahl < 5 then - i=11 - else - i=1-1 - end if - end if - next i -'/// Close the options dialog - Kontext "OptionenDlg" - OptionenDlg.Cancel -'/// Close the document - if gApplication <> "BACKGROUND" then - Call hCloseDocument - end if + if gApplication <> "BACKGROUND" then Call hNewDocument + '/// <i>Tools</i> / <i>Options</i> / <i>Load/Save</i> + ToolsOptions + ToPosInOptionlist (2) + EchteAnzahl = OptionTabPageZaehler (4, FALSE) + for i=1 to EchteAnzahl + gefunden = FALSE + Kontext "OptionenDlg" + Optionsliste.TypeKeys "<Down>" + select case i + case 1 : + Kontext "TabSpeichern" + '///+<ul><li>General</li> + printlog " - General / Save" + if TabSpeichern.IsVisible then + gefunden = TRUE + Call DialogTest ( TabSpeichern ) + endif + case 2 : + Kontext "TabMicrosoftOffice97" + '///+<li>VBA settings</li> + printlog " - VBA Settings / VBA Eigenschaften" + if TabMicrosoftOffice97.IsVisible then + gefunden = TRUE + Call DialogTest ( TabMicrosoftOffice97 ) + endif + case 3 : + Kontext "TabMicrosoftOffice2" + '///+<li>Microsoft Office</li> + printlog " - Microsoft Office" + if TabMicrosoftOffice2.IsVisible then + gefunden = TRUE + Call DialogTest ( TabMicrosoftOffice2 ) + endif + case 4 : + Kontext "TabHTML" + '///+<li>HTML Compatibility</li></ul> + printlog " - HTML Compatibility / HTML Kompatibilitaet" + if TabHTML.IsVisible then + gefunden = TRUE + Call DialogTest ( TabHTML ) + endif + end select + if gefunden=FALSE then + Warnlog "Error with the " + i + ".page, perhaps this page is deleted or change the place!" + EchteAnzahl = EchteAnzahl - 1 + if EchteAnzahl < 5 then + i=11 + else + i=1-1 + endif + endif + next i + '/// Close the options dialog + Kontext "OptionenDlg" + OptionenDlg.Cancel + '/// Close the document + if gApplication <> "BACKGROUND" then + Call hCloseDocument + endif endcase '------------------------------------------------------------------------- testcase tToolsOptionsLanguageSettings - dim EchteAnzahl as Integer, i as Integer, j as Integer - dim gefunden as Boolean - dim bAsianSup as Boolean - PrintLog "- Tools/Options/Language Settings ( Extras/Optionen/Spracheinstellungen )" - if (0 = iSectionNumber) then + dim EchteAnzahl as Integer, i as Integer, j as Integer + dim gefunden as Boolean + dim bAsianSup as Boolean + + PrintLog "- Tools/Options/Language Settings ( Extras/Optionen/Spracheinstellungen )" + if (0 = iSectionNumber) then warnlog "You can't run this testcase seperated! Ending now! Please run it via: tToolsOptionsTest" goto endsub endif - if gApplication <> "BACKGROUND" then Call hNewDocument - '/// <i>Tools</i> / <i>Options</i> / <i>Language settings</i> - ToolsOptions + if gApplication <> "BACKGROUND" then Call hNewDocument + '/// <i>Tools</i> / <i>Options</i> / <i>Language settings</i> + ToolsOptions ToPosInOptionlist ( 3 ) - EchteAnzahl = Optionsliste.GetItemCount - iSectionNumber - '/// We only have two tab pages in this section: - '///+ <ul><li><i>Languages</i> and <i>Writing Aids</i></li> - '///+<ol><li>In asian languages we have two additional tab pages: - '///+ <ul><li><i>Japanese Find</i> and <i>Asian Layout</i></li></ul></li> - '///+<li>In languages with CTL (<i>Complex Text Layout</i>) there is also one more: - '///+<ul><li><i>Complex Text Layout</i></li></ul></li></ol></li></ul> - select case (EchteAnzahl) - case 2: printlog "Asian or Complex Text Layout support is not activated (on languages-page)!" - case 3: printlog "Complex Text Layout support is activated (on languages-page)!" - case 4: printlog "Asian support is activated (on languages-page)!" - case 5: if (gAsianSup AND gCTLSup) then - printlog "Asian and Complex Text Layout support is activated (on languages-page)!" - else - Warnlog "There are more than 4 pages!" - endif - case else - Warnlog "There are more than 5 pages!" - end select - Kontext "Active" - try - if Active.Exists then Active.OK - catch - if Active.Exists then Active.No - endcatch - for i=1 to EchteAnzahl - gefunden = FALSE - Kontext "OptionenDlg" - Optionsliste.TypeKeys "<Down>" - select case i - case 1 : Kontext "TabSprachen" - 'Languages - printlog " - Languages / Sprachen" - if TabSprachen.IsVisible then - gefunden = TRUE - Call DialogTest ( TabSprachen ) - end if - case 2 : Kontext "TabLinguistik" - printlog " - Writing Aids / Linguistik" - if TabLinguistik.IsVisible then - gefunden = TRUE - Call DialogTest ( TabLinguistik ) + EchteAnzahl = Optionsliste.GetItemCount - iSectionNumber + '/// We only have two tab pages in this section: + '///+ <ul><li><i>Languages</i> and <i>Writing Aids</i></li> + '///+<ol><li>In asian languages we have two additional tab pages: + '///+ <ul><li><i>Japanese Find</i> and <i>Asian Layout</i></li></ul></li> + '///+<li>In languages with CTL (<i>Complex Text Layout</i>) there is also one more: + '///+<ul><li><i>Complex Text Layout</i></li></ul></li></ol></li></ul> + select case (EchteAnzahl) + case 2: + printlog "Asian or Complex Text Layout support is not activated (on languages-page)!" + case 3: + printlog "Complex Text Layout support is activated (on languages-page)!" + case 4: + printlog "Asian support is activated (on languages-page)!" + case 5: + if (gAsianSup AND gCTLSup) then + printlog "Asian and Complex Text Layout support is activated (on languages-page)!" + else + Warnlog "There are more than 4 pages!" + endif + case else + Warnlog "There are more than 5 pages!" + end select + Kontext "Active" + try + if Active.Exists then Active.OK + catch + if Active.Exists then Active.No + endcatch + for i=1 to EchteAnzahl + gefunden = FALSE + Kontext "OptionenDlg" + Optionsliste.TypeKeys "<Down>" + select case i + case 1 : + Kontext "TabSprachen" + 'Languages + printlog " - Languages / Sprachen" + if TabSprachen.IsVisible then + gefunden = TRUE + Call DialogTest ( TabSprachen ) + endif + case 2 : + Kontext "TabLinguistik" + printlog " - Writing Aids / Linguistik" + if TabLinguistik.IsVisible then + gefunden = TRUE + Call DialogTest ( TabLinguistik ) '/// In <i>Writing aids</i> '///+<ul><li> On <i>modules<i> click <i>edit</i></li> - SprachmoduleBearbeiten.Click - Kontext "ModuleBearbeiten" - Call DialogTest ( ModuleBearbeiten ) - ModuleBearbeiten.Close - '///+<li> close dialog</li></ul> - Kontext "TabLinguistik" + SprachmoduleBearbeiten.Click + Kontext "ModuleBearbeiten" + Call DialogTest ( ModuleBearbeiten ) + ModuleBearbeiten.Close + '///+<li> close dialog</li></ul> + Kontext "TabLinguistik" '///+<ul><li>On <i>dictionaries</i> click <i>new</i></li> '///+<li>close dialog</li></ul> - Neu.Click - Kontext "BenutzerwoerterbuchAnlegen" - Call DialogTest ( BenutzerwoerterbuchAnlegen ) - BenutzerwoerterbuchAnlegen.Cancel + Neu.Click + Kontext "BenutzerwoerterbuchAnlegen" + Call DialogTest ( BenutzerwoerterbuchAnlegen ) + BenutzerwoerterbuchAnlegen.Cancel '///+<ul><li>On <i>dictionaries</i> click <i>edit</i></li> '///+<li>close dialog</li></ul> - Kontext "TabLinguistik" - for j=1 to 5 - if Bearbeiten.IsEnabled then - Bearbeiten.Click - j=6 - else - Benutzerwoerterbuch.TypeKeys "<Down>" - end if - next j - Kontext "BenutzerwoerterbuchBearbeiten" - if BenutzerwoerterbuchBearbeiten.Exists then - Call DialogTest ( BenutzerwoerterbuchBearbeiten ) - BenutzerwoerterbuchBearbeiten.Close - else - warnlog "Edit the 'user-defined dictionary' is not possible => Bug?" - end if - '/// <i>Options</i> + Kontext "TabLinguistik" + for j=1 to 5 + if Bearbeiten.IsEnabled then + Bearbeiten.Click + j=6 + else + Benutzerwoerterbuch.TypeKeys "<Down>" + endif + next j + Kontext "BenutzerwoerterbuchBearbeiten" + if BenutzerwoerterbuchBearbeiten.Exists then + Call DialogTest ( BenutzerwoerterbuchBearbeiten ) + BenutzerwoerterbuchBearbeiten.Close + else + warnlog "Edit the 'user-defined dictionary' is not possible => Bug?" + endif + '/// <i>Options</i> '///+<ul><li>On 9th, 10th and 11th entry click <i>edit</i></li> '///+<li>close dialog</li></ul> - Kontext "TabLinguistik" - Optionen.TypeKeys "<PageUp>", 3 - Sleep 1 - Optionen.TypeKeys "<Down>", 6 - Sleep 1 - OptionenBearbeiten.Click - Kontext "SilbentrennungOptionen" - Call DialogTest ( SilbentrennungOptionen ) - SilbentrennungOptionen.Cancel - Kontext "TabLinguistik" - Optionen.TypeKeys "<Down>" - OptionenBearbeiten.Click - Kontext "SilbentrennungOptionen" - Call DialogTest ( SilbentrennungOptionen ) - SilbentrennungOptionen.Cancel - Kontext "TabLinguistik" - Optionen.TypeKeys "<Down>" - OptionenBearbeiten.Click - Kontext "SilbentrennungOptionen" - Call DialogTest ( SilbentrennungOptionen ) - SilbentrennungOptionen.Cancel - end if - case 3,5 : try - Kontext "TabJapaneseFind" - 'Japanese find - if TabJapaneseFind.IsVisible then - printlog " - Japanese Find / Japanische Suche" - gefunden = TRUE - Call DialogTest ( TabJapaneseFind ) - end if - catch - endcatch - try - Kontext "TabComplexTextLayout" - 'Complex Text Layout - if TabComplexTextLayout.IsVisible then - printlog " - Complex Text Layout" - gefunden = TRUE - Call DialogTest ( TabComplexTextLayout ) - end if - catch - endcatch - case 4 : Kontext "TabAsianLayoutOptions" - 'Asian layout - printlog " - Asian Layout / Asiatisches Layout" - if TabAsianLayoutOptions.IsVisible then - gefunden = TRUE - Call DialogTest ( TabAsianLayoutOptions ) - end if - end select - if gefunden=FALSE then - Warnlog "Error with the " + i + ".page, perhaps this page is deleted or change the place!" - EchteAnzahl = EchteAnzahl - 1 - if EchteAnzahl < 5 then - i=5 - else - i=1-1 - end if - end if - next i -'/// Close the options dialog - Kontext "OptionenDlg" - OptionenDlg.Cancel -'/// Close the document - if gApplication <> "BACKGROUND" then - Call hCloseDocument - end if + Kontext "TabLinguistik" + Optionen.TypeKeys "<PageUp>", 3 + WaitSlot() ' similar effect as a NOOP + Optionen.TypeKeys "<Down>", 6 + WaitSlot() ' similar effect as a NOOP + OptionenBearbeiten.Click + Kontext "SilbentrennungOptionen" + Call DialogTest ( SilbentrennungOptionen ) + SilbentrennungOptionen.Cancel + Kontext "TabLinguistik" + Optionen.TypeKeys "<Down>" + OptionenBearbeiten.Click + Kontext "SilbentrennungOptionen" + Call DialogTest ( SilbentrennungOptionen ) + SilbentrennungOptionen.Cancel + Kontext "TabLinguistik" + Optionen.TypeKeys "<Down>" + OptionenBearbeiten.Click + Kontext "SilbentrennungOptionen" + Call DialogTest ( SilbentrennungOptionen ) + SilbentrennungOptionen.Cancel + endif + case 3,5 : + try + Kontext "TabJapaneseFind" + 'Japanese find + if TabJapaneseFind.IsVisible then + printlog " - Japanese Find / Japanische Suche" + gefunden = TRUE + Call DialogTest ( TabJapaneseFind ) + endif + catch + endcatch + try + Kontext "TabComplexTextLayout" + 'Complex Text Layout + if TabComplexTextLayout.IsVisible then + printlog " - Complex Text Layout" + gefunden = TRUE + Call DialogTest ( TabComplexTextLayout ) + endif + catch + endcatch + case 4 : + Kontext "TabAsianLayoutOptions" + 'Asian layout + printlog " - Asian Layout / Asiatisches Layout" + if TabAsianLayoutOptions.IsVisible then + gefunden = TRUE + Call DialogTest ( TabAsianLayoutOptions ) + endif + end select + if gefunden=FALSE then + Warnlog "Error with the " + i + ".page, perhaps this page is deleted or change the place!" + EchteAnzahl = EchteAnzahl - 1 + if EchteAnzahl < 5 then + i=5 + else + i=1-1 + endif + endif + next i + '/// Close the options dialog + Kontext "OptionenDlg" + OptionenDlg.Cancel + '/// Close the document + if gApplication <> "BACKGROUND" then + Call hCloseDocument + endif endcase '------------------------------------------------------------------------- testcase tToolsOptionsInternet - dim EchteAnzahl as Integer, i as Integer - dim gefunden as Boolean - PrintLog "- Tools/Options/Internet ( Extras/Optionen/Internet )" - if (0 = iSectionNumber) then + dim EchteAnzahl as Integer, i as Integer + dim gefunden as Boolean + + PrintLog "- Tools/Options/Internet ( Extras/Optionen/Internet )" + if (0 = iSectionNumber) then warnlog "You can't run this testcase seperated! Ending now! Please run it via: tToolsOptionsTest" goto endsub endif - if gApplication <> "BACKGROUND" then Call hNewDocument - '/// <i>Tools</i> / <i>Options</i> / <i>Internet</i> - ToolsOptions - '/// (The last section in Tools / Options is <i>Internet</i>) - ToPosInOptionlist ( iSectionNumber) + if gApplication <> "BACKGROUND" then Call hNewDocument + '/// <i>Tools</i> / <i>Options</i> / <i>Internet</i> + ToolsOptions + '/// (The last section in Tools / Options is <i>Internet</i>) + ToPosInOptionlist ( iSectionNumber) if gPlatgroup = "w95" OR gPlatform = lcase("osx") then '/// On MacOS X systems this section includes the tab pages: @@ -588,87 +644,89 @@ testcase tToolsOptionsInternet '///+<li>E-Mail</li> '///+<li>Mozilla Plugin</li></ol> EchteAnzahl = OptionTabPageZaehler ( 4 , FALSE ) - end if - - for i=1 to EchteAnzahl - gefunden = FALSE - Kontext "OptionenDlg" - Optionsliste.TypeKeys "<Down>" - Kontext "ProxyWarnung" - if ProxyWarnung.Exists(1) then - NichtMehrAnzeigen.Check - ProxyWarnung.OK - end if - - select case i - case 1 : Kontext "TabProxyServer" - 'Proxy - printlog " - Proxy / Proxy" - if TabProxyServer.IsVisible then - gefunden = TRUE - Call DialogTest ( TabProxyServer ) - end if - case 2 : Kontext "Active" - 'Search - printlog " - Search / Suche" - if Active.Exists then - sErrMes = Active.GetText - Warnlog "A messagebox exists => BUG : " + sErrMes - Active.OK - end if - Kontext "TabSuche" - if TabSuche.IsVisible then - gefunden = TRUE - Call DialogTest ( TabSuche ) - end if - case 3 : - if gPlatgroup = "unx" then - Kontext "TabEmail" - 'E-mail - printlog " - E-mail" - if TabEmail.IsVisible then - gefunden = TRUE - Call DialogTest ( TabEmail ) - end if - end if - if gPlatgroup = "w95" then - Kontext "TabMozillaPlugin" - 'Mozilla Plug-in (On Win32) - printlog " - Mozilla Plug-in" - if TabMozillaPlugin.IsVisible then - gefunden = TRUE - Call DialogTest ( TabMozillaPlugin ) - end if - end if - case 4 : - if gPlatgroup = "w95" then - warnlog "On Win32 platform there should be only 3 tab pages in section 'Internet'!?" - else - Kontext "TabMozillaPlugin" - printlog " - Mozilla Plug-in" - if TabMozillaPlugin.IsVisible then - gefunden = TRUE - Call DialogTest ( TabMozillaPlugin ) - end if - end if - end select - if gefunden=FALSE then - Warnlog "Error with the " + i + ".page, perhaps this page is deleted or change the place!" - EchteAnzahl = EchteAnzahl - 1 - if EchteAnzahl < 4 then - i=11 - else - i=1-1 - end if - end if - next i -'/// Close the options dialog - Kontext "OptionenDlg" - OptionenDlg.Cancel -'/// Close document - if gApplication <> "BACKGROUND" then - Call hCloseDocument - end if + endif + + for i=1 to EchteAnzahl + gefunden = FALSE + Kontext "OptionenDlg" + Optionsliste.TypeKeys "<Down>" + Kontext "ProxyWarnung" + if ProxyWarnung.Exists(1) then + NichtMehrAnzeigen.Check + ProxyWarnung.OK + endif + + select case i + case 1 : + Kontext "TabProxyServer" + 'Proxy + printlog " - Proxy / Proxy" + if TabProxyServer.IsVisible then + gefunden = TRUE + Call DialogTest ( TabProxyServer ) + endif + case 2 : + Kontext "Active" + 'Search + printlog " - Search / Suche" + if Active.Exists then + sErrMes = Active.GetText + Warnlog "A messagebox exists => BUG : " + sErrMes + Active.OK + endif + Kontext "TabSuche" + if TabSuche.IsVisible then + gefunden = TRUE + Call DialogTest ( TabSuche ) + endif + case 3 : + if gPlatgroup = "unx" then + Kontext "TabEmail" + 'E-mail + printlog " - E-mail" + if TabEmail.IsVisible then + gefunden = TRUE + Call DialogTest ( TabEmail ) + endif + endif + if gPlatgroup = "w95" then + Kontext "TabMozillaPlugin" + 'Mozilla Plug-in (On Win32) + printlog " - Mozilla Plug-in" + if TabMozillaPlugin.IsVisible then + gefunden = TRUE + Call DialogTest ( TabMozillaPlugin ) + endif + endif + case 4 : + if gPlatgroup = "w95" then + warnlog "On Win32 platform there should be only 3 tab pages in section 'Internet'!?" + else + Kontext "TabMozillaPlugin" + printlog " - Mozilla Plug-in" + if TabMozillaPlugin.IsVisible then + gefunden = TRUE + Call DialogTest ( TabMozillaPlugin ) + endif + endif + end select + if gefunden=FALSE then + Warnlog "Error with the " + i + ".page, perhaps this page is deleted or change the place!" + EchteAnzahl = EchteAnzahl - 1 + if EchteAnzahl < 4 then + i=11 + else + i=1-1 + endif + endif + next i + '/// Close the options dialog + Kontext "OptionenDlg" + OptionenDlg.Cancel + '/// Close document + if gApplication <> "BACKGROUND" then + Call hCloseDocument + endif endcase '------------------------------------------------------------------------- @@ -676,10 +734,10 @@ endcase testcase tToolsOptionsImprovementProgram printlog( "Update test for the tools/options dialog of the OOo Improvement Program" ) - + dim cLogFile as string - cLogFile = gOfficePath & "user\temp\feedback\Current.csv" - cLogFile = convertpath( cLogFile ) + cLogFile = gOfficePath & "user\temp\feedback\Current.csv" + cLogFile = convertpath( cLogFile ) if ( hDeleteFile( cLogFile ) ) then printlog( "Test environment is clean, no logfile present (anymore)" ) @@ -693,15 +751,15 @@ testcase tToolsOptionsImprovementProgram ParticipateNo.check() ParticipateYes.check() - - if ( ShowData.isEnabled() ) then + + if ( ShowData.isEnabled() ) then ShowData.click() Kontext "TextImport" if ( TextImport.exists( 1 ) ) then printlog( "Text import dialog" ) - + call DialogTest( TextImport ) TextImport.cancel() else diff --git a/testautomation/global/system/includes/master.inc b/testautomation/global/system/includes/master.inc index 580b4068787b..745381b6f2fb 100755 --- a/testautomation/global/system/includes/master.inc +++ b/testautomation/global/system/includes/master.inc @@ -886,7 +886,7 @@ sub mMakeGeneralOptionsAPI printlog "** 'Temporary files'-path : " & sTempPath end if '///Check which 'Macro Security Level' is set and put it into <i>gMacroSecurityLevel</i> variable. - gMacroSecurityLevel = fGetSetMacroSecurityUNO() + gMacroSecurityLevel = hSetMacroSecurityAPI( 2 ) catch diff --git a/testautomation/global/tools/includes/optional/t_docfuncs.inc b/testautomation/global/tools/includes/optional/t_docfuncs.inc index eb3007a528b9..f75865739f57 100755 --- a/testautomation/global/tools/includes/optional/t_docfuncs.inc +++ b/testautomation/global/tools/includes/optional/t_docfuncs.inc @@ -54,11 +54,11 @@ function hUseImpressAutopilot( bEnable as boolean ) as boolean '///+<li>Open Tools/Options, go to Presentataion/General page</li> ToolsOptions - hToolsOptions( "IMPRESS" , "General" ) + hToolsOptions( gApplication , "General" ) '///+<li>Check or uncheck to start with autopilot</li> Kontext "TabSonstigesDraw" - if ( mitAutopilotStarten.exists() ) then + if ( mitAutopilotStarten.exists( 2 ) ) then if ( bEnable ) then mitAutopilotStarten.check() @@ -68,14 +68,14 @@ function hUseImpressAutopilot( bEnable as boolean ) as boolean printlog( CFN & "Disable Impress Autopilot" ) endif + '///+<li>Return Status of Checkbox (checked=TRUE)</li> + hUseImpressAutopilot() = mitAutopilotStarten.isChecked() + else warnlog( CFN & "Cannot find Autopilot Checkbox" ) endif - - '///+<li>Return Status of Checkbox (checked=TRUE)</li> - hUseImpressAutopilot() = mitAutopilotStarten.isChecked() '///+<li>Close Tools/Options</li> Kontext "OptionenDlg" diff --git a/testautomation/global/tools/includes/optional/t_xml_filter1.inc b/testautomation/global/tools/includes/optional/t_xml_filter1.inc index f15cdef0a360..96992320558c 100644 --- a/testautomation/global/tools/includes/optional/t_xml_filter1.inc +++ b/testautomation/global/tools/includes/optional/t_xml_filter1.inc @@ -1,5 +1,5 @@ 'encoding UTF-8 Do not remove or change this line!
-'**************************************************************************
+'*******************************************************************************
'* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
'*
'* Copyright 2008 by Sun Microsystems, Inc.
@@ -29,21 +29,16 @@ '* <http://www.openoffice.org/license.html>
'* for a copy of the LGPLv3 License.
'*
-'/************************************************************************
+'/******************************************************************************
'*
'* owner : helge.delfs@sun.com
'*
'* short description : Tools / XML Filter Settings Resource Test
'*
-'************************************************************************
-'*
-' #1 tToolsXMLFilterSettings 'Resource test for 'Tools' / 'XML Filter Settings'
-' #1 fInitialXMLSetting 'Checks the availibility of the Excel XML import filter
-' #0 sRemoveXSLTFilter
-'*
-'\***********************************************************************
+'\******************************************************************************
-testcase tToolsXMLFilterSettings
+testcase tToolsXMLFilterSettings + Dim iCountOfXSLTStylesAtBeginning as integer
Dim iCountOfXSLTStylesAfterInstallCheck as integer
Dim iApplicationEntries as integer
@@ -153,16 +148,21 @@ testcase tToolsXMLFilterSettings FilterList.TypeKeys "<HOME>"
for ic = 1 to iCountOfXSLTStylesAfterInstallCheck
Kontext "XMLFilterSettings"
- sleep(1)
- 'read the filter names from the dialog.
- sTempReadFilterName = FilterList.GetItemText(ic)
- 'lower case comparison!
- sTempReadFilterName = lcase(sTempReadFilterName)
- if InStr(sTempReadFilterName , sWhichFilterToUse) <> 0 then
- FilterList.TypeKeys "<DOWN> " , ic-1
- ' printlog "DEBUG: Filtername: " & FilterList.GetItemText(ic)
- sleep(1)
- end if
+ if ( XMLFilterSettings.exists( 2 ) ) then +
+ 'read the filter names from the dialog.
+ sTempReadFilterName = FilterList.GetItemText(ic) +
+ 'lower case comparison!
+ sTempReadFilterName = lcase(sTempReadFilterName)
+ if InStr(sTempReadFilterName , sWhichFilterToUse) <> 0 then
+ FilterList.TypeKeys "<DOWN> " , ic-1
+ ' printlog "DEBUG: Filtername: " & FilterList.GetItemText(ic)
+ WaitSlot() ' Sort of NOOP
+ endif + else + warnlog( "XML Filter Settings dialog too slow/not displayed" ) + endif
next ic
for ia = 1 to 2
Kontext "XMLFilterSettings"
@@ -214,22 +214,26 @@ testcase tToolsXMLFilterSettings case 4 : printlog " +- Browse button 'Template for import'"
BrowseTemplateForImport.Click
end select
- sleep(2)
+
Kontext "OeffnenDlg"
- if OeffnenDlg.Exists(1) then
+ if OeffnenDlg.Exists(3) then
'/// After every click on "Browse"-button an "FileOpen"-dialog shoud be visible. Cancel that dialog.
printlog " +- After every click on 'Browse'-button an 'FileOpen'-dialog shoud be visible. Cancel that dialog."
call Dialogtest (OeffnenDlg)
OeffnenDlg.Cancel
- sleep(3)
+
else
warnlog sErrorPointerTextForResultfile & "File Open dialog did not appeared."
end if
next ib
'/// [Loop end]
- Kontext "XMLFilter"
- printlog " +- Closing 'XML Filter: New Filter'-dialog."
- XMLFilter.Cancel
+ Kontext "XMLFilter" + if ( XMLFilter.exists( 3 ) ) then
+ printlog " +- Closing 'XML Filter: New Filter'-dialog."
+ XMLFilter.Cancel + else + warnlog( "XML Filter Dialog not available" ) + endif
'/// Closing "XML Filter: New Filter"-dialog
else
warnlog "XML Filter dialog did not appeared!"
@@ -239,12 +243,13 @@ testcase tToolsXMLFilterSettings '/// Clicking "Test XLSTs"-button.
printlog "+- Clicking 'Test XLSTs'-button."
TestXSLTs.Click
- sleep(1)
+
'If it's an Import filter it makes no sense to test the export.
if sWhichFilterToUse = "docbook" then
+ printlog "+- E X P O R T (Writer, Impress)"
Kontext "TestXMLFilter"
- if TestXMLFilter.Exists(1) then
+ if TestXMLFilter.Exists( 3 ) then
call Dialogtest(TestXMLFilter)
else
warnlog sErrorPointerTextForResultfile & "Testing of the XML filter not possible. Exiting."
@@ -270,89 +275,99 @@ testcase tToolsXMLFilterSettings ExportBrowseBtn.Click
'/// Press first "Browse"-button on the "Test XML Filter"-dialog.
printlog " +-Press first 'Browse'-button on the 'Test XML Filter'-dialog."
- sleep(2)
+
Kontext "OeffnenDlg"
- if OeffnenDlg.Exists(1) then
+ if OeffnenDlg.Exists( 3 ) then
call Dialogtest (OeffnenDlg)
OeffnenDlg.Cancel
'/// Closing 'FileOpen'-Dialog.
printlog " +- Closing 'FileOpen'-Dialog."
- sleep(3)
else
warnlog sErrorPointerTextForResultfile & "File Open dialog did not occoured?!"
- end if
- Kontext "TestXMLFilter"
- '/// If the application is Writer (because the default XSLT stylesheets are only Writer filter).
- '///+<ul><li>Clicking on "Current Document"-button.</li></ul>
- if gApplication = "WRITER" then
- printlog " +- Clicking on 'Current Document'-button."
- CurrentDocument.Click
- sleep(3)
- '/// If Java is not [correctly] installed a messagebox will be shown and the test of the filter will be canceled!
- Kontext "Messagebox"
- if MessageBox.Exists(2) then
- warnlog Messagebox.GetText
- try
- Messagebox.Cancel
- catch
- Messagebox.OK
- endcatch
- else
- try
- Kontext "XMLFilterOutput"
- if XMLFilterOutput.Exists(1) then
- '/// "XML Filter Output"-dialog should be visible.
- printlog " +- 'XML Filter Output'-dialog should be visible."
- call Dialogtest(XMLFilterOutput)
- '/// Clicking "Validate"-button.
- printlog " +- Clicking 'Validate'-button."
- Validate.Click
- sleep(2)
- '/// Checking that the validate output control is visible inside the window.
- printlog " +- Checking that the validate output control is visible inside the window."
- if NOT ValidateOutput.isVisible then
- warnlog " +- Validate output is not visible!"
+ end if +
+ Kontext "TestXMLFilter" + if ( TestXMLFilter.exists( 2 ) ) then
+ '/// If the application is Writer (because the default XSLT stylesheets are only Writer filter).
+ '///+<ul><li>Clicking on "Current Document"-button.</li></ul>
+ if gApplication = "WRITER" then
+ printlog " +- Clicking on 'Current Document'-button."
+ CurrentDocument.Click
+
+ '/// If Java is not [correctly] installed a messagebox will be shown and the test of the filter will be canceled!
+ Kontext "Messagebox"
+ if MessageBox.Exists( 5 ) then
+ warnlog Messagebox.GetText
+ try
+ Messagebox.Cancel
+ catch
+ Messagebox.OK
+ endcatch
+ else
+ try
+ Kontext "XMLFilterOutput"
+ if XMLFilterOutput.Exists(1) then
+ '/// "XML Filter Output"-dialog should be visible.
+ printlog " +- 'XML Filter Output'-dialog should be visible."
+ call Dialogtest(XMLFilterOutput)
+ '/// Clicking "Validate"-button.
+ printlog " +- Clicking 'Validate'-button."
+ Validate.Click
+ WaitSlot( 2000 )
+ '/// Checking that the validate output control is visible inside the window.
+ printlog " +- Checking that the validate output control is visible inside the window."
+ if NOT ValidateOutput.isVisible then
+ warnlog " +- Validate output is not visible!"
+ end if
+ '/// Closing "XML Filter Output"-dialog.
+ printlog " +- Closing 'XML Filter Output'-dialog."
+ XMLFilterOutput.Close
+
+ else
+ warnlog sErrorPointerTextForResultfile & "XML Filter Ouput dialog did not occoured."
end if
- '/// Closing "XML Filter Output"-dialog.
- printlog " +- Closing 'XML Filter Output'-dialog."
- XMLFilterOutput.Close
- sleep(2)
- else
- warnlog sErrorPointerTextForResultfile & "XML Filter Ouput dialog did not occoured."
- end if
- catch
- warnlog "Testing of XSLTs does not work."
- endcatch
- end if
- else
- Kontext "TestXMLFilter"
- printlog " +- 'Current Document'-button should not be enabled if no !"
- if CurrentDocument.IsEnabled then
- Kontext "DocumentWriter"
- try
- DocumentWriter.TypeKeys "A writer document exists!"
- catch
- QAErrorLog "'Current Document'-button is enabled but a 'Writer' XML filter has been selected! If there's no Writer document (may be in the background) also opened it would be a bug!"
- endcatch
+ catch
+ warnlog "Testing of XSLTs does not work."
+ endcatch
+ end if
+ else
+ Kontext "TestXMLFilter"
+ printlog " +- 'Current Document'-button should not be enabled if no !"
+ if CurrentDocument.IsEnabled then
+ Kontext "DocumentWriter"
+ try
+ DocumentWriter.TypeKeys "A writer document exists!"
+ catch
+ QAErrorLog "'Current Document'-button is enabled but a 'Writer' XML filter has been selected! If there's no Writer document (may be in the background) also opened it would be a bug!"
+ endcatch
+ end if end if
+ else + warnlog( "FATAL: TestXMLFilter not available" ) end if
- end if
- printlog "+- I M P O R T"
- Kontext "TestXMLFilter"
- '/// Clicking "Browse"-button (Import).
- printlog " +- Clicking 'Browse'-button (Import)."
- ImportBrowseBtn.Click
- sleep(2)
- Kontext "OeffnenDlg"
- if OeffnenDlg.Exists(1) then
- call Dialogtest (OeffnenDlg)
- '/// Closing "FileOpen"-dialog.
- printlog " +- Closing 'FileOpen'-dialog."
- OeffnenDlg.Cancel
- sleep(3)
- else
- warnlog sErrorPointerTextForResultfile & "File Open dialog did not occoured?!"
- end if
+ printlog "+- I M P O R T" + endif + +
+ Kontext "TestXMLFilter" + if ( TestXMLFilter.exists( 2 ) ) then
+ '/// Clicking "Browse"-button (Import).
+ printlog " +- Clicking 'Browse'-button (Import)."
+ ImportBrowseBtn.Click
+
+ Kontext "OeffnenDlg"
+ if OeffnenDlg.Exists( 2 ) then
+ call Dialogtest (OeffnenDlg)
+ '/// Closing "FileOpen"-dialog.
+ printlog " +- Closing 'FileOpen'-dialog."
+ OeffnenDlg.Cancel
+ else
+ warnlog sErrorPointerTextForResultfile & "File Open dialog did not occoured?!"
+ end if + else + warnlog( "FATAL: Dialog <TestXMLFilter> is not available" ) + endif +
Kontext "TestXMLFilter"
'/// Checking if 'Display Source'-checkbox is checked (should not be!).
printlog " +- Checking if 'Display Source'-checkbox is checked (should not be!)."
@@ -397,14 +412,12 @@ testcase tToolsXMLFilterSettings '/// Clicking "Browse"-button (Import) again to test it with the XML file.
printlog " +- Clicking 'Browse'-button (Import) again to test it the XML file."
ImportBrowseBtn.Click
- sleep(2)
+ Kontext "OeffnenDlg"
- if OeffnenDlg.Exists(1) then
+ if OeffnenDlg.Exists( 3 ) then
call Dialogtest (OeffnenDlg)
Dateiname.SetText sDocXMLTestFile
- sleep(3)
Oeffnen.Click
- sleep(3)
try
' If Java is not [correctly] installed a messagebox will be shown and the test of the filter will be canceled!
Kontext "Messagebox"
@@ -436,9 +449,9 @@ testcase tToolsXMLFilterSettings '/// Clicking "Validate"-button.
printlog " +- Clicking 'Validate'-button."
Validate.Click
- sleep(2)
+ Kontext "Messagebox"
- if Messagebox.Exists(2) then
+ if Messagebox.Exists( 2 ) then
if bJavaBroken then
Messagebox.OK
else
@@ -456,7 +469,6 @@ testcase tToolsXMLFilterSettings printlog " +- Closing 'XML Filter Output'-dialog."
Kontext "XMLFilterOutput"
XMLFilterOutput.Close
- sleep(1)
else
warnlog sErrorPointerTextForResultfile & "No output window was visible! Exiting routine!"
Kontext "TestXMLFilter"
@@ -485,7 +497,7 @@ testcase tToolsXMLFilterSettings catch
'/// If Java is not [correctly] installed a messagebox will be shown and the test of the filter will be canceled!
Kontext "Messagebox"
- if MessageBox.Exists(2) then
+ if MessageBox.Exists( 2 ) then
warnlog Messagebox.GetText
Messagebox.OK
warnlog sErrorPointerTextForResultfile & "Java is not usable! Exiting routine!"
@@ -544,95 +556,126 @@ testcase tToolsXMLFilterSettings else
QAErrorLog "#i27370# Normaly there should be a second document but there is none!"
end if
- sleep(1)
- Kontext "TestXMLFilter"
- if bJavaBroken = FALSE then
- '/// Clicking on "Recent File"-Button.
- printlog " +- Clicking on 'Recent File'-Button."
- RecentFile.Click
- Kontext "XMLFilterOutput"
- '/// "XML Filter Output"-dialog should be visible.
- printlog " +- 'XML Filter Output'-dialog should be visible."
- Kontext "XMLFilterOutput"
- '/// Closing "XML Filter Output"-dialog.
- printlog " +- Closing 'XML Filter Output'-dialog."
- XMLFilterOutput.Close
- sleep(1)
- '/// Closing the tested XML document
- printlog " +- Closing the tested XML document"
- '/// ...if there is more than 1 document opened.
- if GetDocumentCount > 1 then
- call hCloseDocument
- else
- QAErrorLog "#i27370# Normaly there should be a second document but there is none!"
- end if
- sleep(1)
- Kontext "TestXMLFilter"
- '/// Closing the "Test XML Filter"-dialog.
- printlog " +- Closing the 'Test XML Filter'-dialog"
- endif
+
+ Kontext "TestXMLFilter" + if ( TestXMLFilter.exists( 1 ) ) then
+ if bJavaBroken = FALSE then
+ '/// Clicking on "Recent File"-Button.
+ printlog " +- Clicking on 'Recent File'-Button."
+ RecentFile.Click
+ + Kontext "XMLFilterOutput"
+ '/// "XML Filter Output"-dialog should be visible.
+ printlog " +- 'XML Filter Output'-dialog should be visible."
+ + Kontext "XMLFilterOutput"
+ '/// Closing "XML Filter Output"-dialog.
+ printlog " +- Closing 'XML Filter Output'-dialog."
+ XMLFilterOutput.Close
+
+ '/// Closing the tested XML document
+ printlog " +- Closing the tested XML document"
+ '/// ...if there is more than 1 document opened.
+ if GetDocumentCount > 1 then
+ call hCloseDocument
+ else
+ QAErrorLog "#i27370# Normaly there should be a second document but there is none!"
+ end if
+
+ Kontext "TestXMLFilter"
+ '/// Closing the "Test XML Filter"-dialog.
+ printlog " +- Closing the 'Test XML Filter'-dialog"
+ endif + else + warnlog( "Dialog <TestXMLFilter> is not available" ) + endif +
CloseBtn.Click
- Kontext "XMLFilterSettings"
- '/// Clicking "Delete"-button.
- printlog " +- Clicking 'Delete'-button"
- DeleteBtn.Click
- Kontext
- if Active.Exists(1) then
- if Active.GetRT = 304 then
- Active.No
- end if
- end if
- Kontext "XMLFilterSettings"
+ + Kontext "XMLFilterSettings" + if ( XMLFilterSettings.exists( 1 ) ) then
+ '/// Clicking "Delete"-button.
+ printlog " +- Clicking 'Delete'-button"
+ DeleteBtn.Click
+ Kontext
+ if Active.Exists(1) then
+ if Active.GetRT = 304 then
+ Active.No
+ end if
+ end if + else + warnlog( "Dialog <XMLFilterSettings> is not available" ) + endif +
'/// Clicking 'Save to Package'-button.
- printlog " +- Clicking 'Save to Package'-button."
- SaveToPackage.Click
- sleep(2)
- Kontext "SpeichernDlg"
- if SpeichernDlg.Exists(1) then
- call Dialogtest(SpeichernDlg)
- SpeichernDlg.Cancel
- '/// Closing 'File Save As'-Dialog.
- printlog " +- Closing 'File Save As'-Dialog."
- else
- warnlog sErrorPointerTextForResultfile & "Save As dialog missing!"
- end if
Kontext "XMLFilterSettings"
+ if ( XMLFilterSettings.exists( 1 ) ) then
+ + printlog " +- Clicking 'Save to Package'-button."
+ SaveToPackage.Click
+
+ Kontext "SpeichernDlg"
+ if SpeichernDlg.Exists( 3 ) then
+ call Dialogtest(SpeichernDlg)
+ SpeichernDlg.Cancel
+ '/// Closing 'File Save As'-Dialog.
+ printlog " +- Closing 'File Save As'-Dialog."
+ else
+ warnlog sErrorPointerTextForResultfile & "Save As dialog missing!"
+ end if + else + warnlog( "Dialog <XMLFilterSettings> is not available" ) + endif + +
'/// Clicking 'Open Package'-button.
- printlog " +- Clicking 'Open Package'-button."
- OpenPackage.Click
- sleep(2)
- Kontext "OeffnenDlg"
- if OeffnenDlg.Exists(1) then
- call Dialogtest(OeffnenDlg)
- OeffnenDlg.Cancel
- '/// Closing 'FileOpen'-Dialog.
- printlog " +- Closing 'FileOpen'-Dialog."
- else
- warnlog sErrorPointerTextForResultfile & "File open dialog missing!"
- end if
Kontext "XMLFilterSettings"
+ if ( XMLFilterSettings.exists( 1 ) ) then
+ printlog " +- Clicking 'Open Package'-button."
+ OpenPackage.Click
+
+ Kontext "OeffnenDlg"
+ if OeffnenDlg.Exists( 3 ) then
+ call Dialogtest(OeffnenDlg)
+ OeffnenDlg.Cancel
+ '/// Closing 'FileOpen'-Dialog.
+ printlog " +- Closing 'FileOpen'-Dialog."
+ else
+ warnlog sErrorPointerTextForResultfile & "File open dialog missing!"
+ end if
+ else + warnlog( "Dialog <XMLFilterSettings> is not available" ) + endif + + '/// Closing the "XML Filter Settings"-dialog.
- printlog "+- Closing the 'XML Filter Settings'-dialog."
- 'Deinstall the XSLT stylesheet if this routine has
- 'added one at the beginning.
- if bREMOVEXSLT = TRUE then
- call sRemoveXSLTFilter
- end if
+ Kontext "XMLFilterSettings"
+ if ( XMLFilterSettings.exists( 1 ) ) then
+ printlog "+- Closing the 'XML Filter Settings'-dialog."
+ 'Deinstall the XSLT stylesheet if this routine has
+ 'added one at the beginning.
+ if bREMOVEXSLT = TRUE then
+ call sRemoveXSLTFilter
+ end if
+ else + warnlog( "Dialog <XMLFilterSettings> is not available" ) + endif + + Kontext "XMLFilterSettings"
- CloseBtn.Click
- '/// Closing the opened application document.
+ if ( XMLFilterSettings.exists( 1 ) ) then
+ CloseBtn.Click
+ '/// Closing the opened application document. + else + warnlog( "Dialog <XMLFilterSettings> is not available" ) + endif +
printlog "- Closing the opened application document."
'/// ...if there is more than 1 document opened.
- if GetDocumentCount > 1 then
- call hCloseDocument
- else
+ if ( hFileCloseAll() <> 2 ) then
QAErrorLog "#i27370# Normaly there should be a second document but there is none!"
- end if
- if GetDocumentCount >= 1 then
- do until GetDocumentCount = 0
- Call hCloseDocument
- loop
- endif
+ end if + endcase
'-------------------------------------------------------------------------
@@ -698,34 +741,43 @@ sub fInitialXMLSetting( sXMLFilterType as string ) as boolean case "xhtml" : sFilterPackagePath = ConvertPath(gTestToolPath & "global\input\xslt_stylesheets\xhtml.jar")
end select
OpenPackage.Click
- Kontext "OeffnenDlg"
- call Dialogtest (OeffnenDlg)
- Dateiname.SetText sFilterPackagePath
- sleep(3)
- Oeffnen.Click
- sleep(3)
- Kontext
- if Active.Exists(3) then
- if Active.GetRT = 304 then
- printlog "global::tools::inc::t_xml_filter1,inc::fInitialXMLSetting: " & Active.GetText
- Active.OK
- Kontext "XMLFilterSettings"
- iSecondCountOfDefaultXSLTStyles = FilterList.GetItemCount
- printlog "global::tools::inc::t_xml_filter1,inc::fInitialXMLSetting: Checking again the count of installed XSLT stylesheets."
- if iSecondCountOfDefaultXSLTStyles <> (iCountOfDefaultXSLTStyles+1) then
- warnlog "global::tools::inc::t_xml_filter1,inc::fInitialXMLSetting: It was not possible to add " & sXMLFilterType & "-XML filter!"
- warnlog "global::tools::inc::t_xml_filter1,inc::fInitialXMLSetting: Test aborted!"
- exit sub
- else
- printlog "global::tools::inc::t_xml_filter1,inc::fInitialXMLSetting: XML filter has been installed!"
- fInitialXMLSetting = TRUE
+ + Kontext "OeffnenDlg" + if ( OeffnenDlg.exists( 2 ) ) then
+ call Dialogtest (OeffnenDlg)
+ Dateiname.SetText sFilterPackagePath
+ Oeffnen.Click +
+ Kontext
+ if Active.Exists(3) then
+ if Active.GetRT = 304 then
+ printlog "global::tools::inc::t_xml_filter1,inc::fInitialXMLSetting: " & Active.GetText
+ Active.OK
+ Kontext "XMLFilterSettings"
+ iSecondCountOfDefaultXSLTStyles = FilterList.GetItemCount
+ printlog "global::tools::inc::t_xml_filter1,inc::fInitialXMLSetting: Checking again the count of installed XSLT stylesheets."
+ if iSecondCountOfDefaultXSLTStyles <> (iCountOfDefaultXSLTStyles+1) then
+ warnlog "global::tools::inc::t_xml_filter1,inc::fInitialXMLSetting: It was not possible to add " & sXMLFilterType & "-XML filter!"
+ warnlog "global::tools::inc::t_xml_filter1,inc::fInitialXMLSetting: Test aborted!"
+ exit sub
+ else
+ printlog "global::tools::inc::t_xml_filter1,inc::fInitialXMLSetting: XML filter has been installed!"
+ fInitialXMLSetting = TRUE
+ end if
end if
- end if
- end if
- Kontext "XMLFilterSettings"
- '/// Closing the XML Filter Settings-dialog.
- printlog "global::tools::inc::t_xml_filter1,inc::fInitialXMLSetting: Closing the 'XML Filter Settings'-dialog."
- CloseBtn.Click
+ end if + else + warnlog( "Dialog <OeffnenDlg> is not available" ) + endif +
+ Kontext "XMLFilterSettings" + if ( XMLFilterSettings.exists( 1 ) ) then
+ '/// Closing the XML Filter Settings-dialog.
+ printlog "global::tools::inc::t_xml_filter1,inc::fInitialXMLSetting: Closing the 'XML Filter Settings'-dialog."
+ CloseBtn.Click + else + warnlog( "Dialog <XMLFilterSettings> is not available" ) + endif
'/// Closing the opened application document.
printlog "global::tools::inc::t_xml_filter1,inc::fInitialXMLSetting: Closing the opened application document."
call hCloseDocument
@@ -756,9 +808,9 @@ sub sRemoveXSLTFilter if InStr(sTempReadFilterName , sXMLFilterType) <> 0 then
'/// If the filter has been found delete it.
FilterList.TypeKeys "<HOME>"
- sleep(1)
+ wait( 100 )
FilterList.TypeKeys "<DOWN>" , (ia-1)
- sleep(1)
+ wait( 100 )
DeleteBtn.Click
Kontext
if Active.Exists(1) then
diff --git a/testautomation/global/tools/includes/required/t_doc2.inc b/testautomation/global/tools/includes/required/t_doc2.inc index 973082f6ea73..522c78240660 100755 --- a/testautomation/global/tools/includes/required/t_doc2.inc +++ b/testautomation/global/tools/includes/required/t_doc2.inc @@ -37,6 +37,8 @@ '* '\*********************************************************************** +private const VERBOSE = TRUE + sub hTabelleEinfuegen '/// <b>WRITER only </b>///' '/// hTabelleEinfuegen hInsertTable ///' @@ -119,35 +121,53 @@ end sub ' '------------------------------------------------------------------------------- ' -sub sMakeReadOnlyDocumentEditable - If IsItLoaded() then - Kontext "Standardbar" - if Bearbeiten.IsEnabled then - 'Check if the button is enabled. - if Bearbeiten.getState(2) = 0 then - 'Check if the document has been loaded read-only and if yes - 'click on the 'Edit'-button - Bearbeiten.Click() - sleep (2) - Kontext - if Active.Exists(5) then - 'If there is a messagebox coming up, click on Yes/OK - printlog "Document was read-only. A copy will be used." - Active.Yes - end if - Kontext - if Active.Exists(2) then - ' Sometimes an messagebox will be opened that the file does - ' not exists. - QAErrorLog Active.GetText - Active.OK - end if - end if - end if +function sMakeReadOnlyDocumentEditable() as boolean + + ' Function returns TRUE if document has been made editable and FALSE if + ' no action was required (that is: Document was not read-only) + + dim iTry as integer + const CFN = "sMakeReadOnlyDocumentEditable::" + + if ( VERBOSE ) then printlog( CFN & "Making document editable (create a copy) if it is readonly" ) + + Kontext "Standardbar" + if ( Bearbeiten.IsEnabled() ) then + + if ( Bearbeiten.getState( 2 ) = 0 ) then + + Bearbeiten.Click() + + for iTry = 1 to 2 + + Kontext "Active" + if ( Active.exists( 5 ) ) then + + printlog( CFN & "Messagebox: " & Active.getText() ) + + try + if ( VERBOSE ) then printlog( CFN & "Document was read-only. A copy will be used." ) + Active.Yes() + if ( VERBOSE ) then printlog( CFN & "Closed 'use copy' message" ) + catch + if ( VERBOSE ) then printlog( CFN & "Probing for unexpected messagebox..." ) + active.ok() + warnlog( "#i100701 - Object not found message" ) + endcatch + else + printlog( CFN & "No messagebox informing about a copy being used" ) + endif + sMakeReadOnlyDocumentEditable() = TRUE + next iTry + else + if ( VERBOSE ) then printlog( CFN & "Button <Bearbeiten> is pressed, document is editable" ) + sMakeReadOnlyDocumentEditable() = FALSE + endif else - warnlog "The document has not been loaded correctly." - end if -end sub + if ( VERBOSE ) then printlog( CFN & "Control <Bearbeiten> is not enabled" ) + endif + +end function ' '------------------------------------------------------------------------------- ' diff --git a/testautomation/global/tools/includes/required/t_files.inc b/testautomation/global/tools/includes/required/t_files.inc index 0edae832b7ff..4e4160188a57 100755 --- a/testautomation/global/tools/includes/required/t_files.inc +++ b/testautomation/global/tools/includes/required/t_files.inc @@ -37,7 +37,7 @@ '* '\****************************************************************************** -private const C_INFO = FALSE ' Set this to TRUE to increase verbosity of some functions +private const C_INFO = TRUE ' Set this to TRUE to increase verbosity of some functions function hGrafikEinfuegen ( Grafik$ ) as Boolean '/// hGrafikEinfuegen hGraphicInsert @@ -722,6 +722,19 @@ end function ' '------------------------------------------------------------------------------- ' +function hFileCloseAll() as integer + + dim iDocumentCount as integer : iDocumentCount = 0 + Do Until GetDocumentCount = 0 + Call hCloseDocument() + iDocumentCount = iDocumentCount + 1 + Loop + hFileCloseAll() = iDocumentCount + +end function +' +'------------------------------------------------------------------------------- +' function hFileOpen( cFile as string ) as boolean dim sFile as string : sFile = convertToURL( convertpath( cFile ) ) @@ -904,6 +917,14 @@ function hFileWait( optional bWarn as boolean ) as integer iWait = -4 exit do endif + + ' LOAD: Master Password Dialog + kontext "MasterPasswordEnter" + if ( MasterPasswordEnter.exists() ) then + iWait = -10 + warnlog( CFN & "Master Password dialog displayed. Tests are likely to fail" ) + exit do + endif ' LOAD: Filter selection dialog Kontext "Filterauswahl" @@ -957,6 +978,7 @@ function hFileWait( optional bWarn as boolean ) as integer case -7 : printlog( CFN & "A dialog box is in the way (1 button), rc = " & iWait ) case -8 : printlog( CFN & "A dialog box is in the way (2 buttons), rc = " & iWait ) case -9 : printlog( CFN & "A dialog box is in the way (3 buttons), rc = " & iWait ) + case -10 : printlog( CFN & "Master Password Dialog displayed, rc = " & iWait ) case else : printlog( CFN & "File I/O completed in " & iWait & " seconds" ) end select endif diff --git a/testautomation/global/tools/includes/required/t_option.inc b/testautomation/global/tools/includes/required/t_option.inc index 5e2322c27c44..6ba837d79f84 100755 --- a/testautomation/global/tools/includes/required/t_option.inc +++ b/testautomation/global/tools/includes/required/t_option.inc @@ -29,25 +29,28 @@ '* <http://www.openoffice.org/license.html> '* for a copy of the LGPLv3 License. '* -'/************************************************************************ +'/****************************************************************************** '* '* owner : thorsten.bosbach@sun.com '* '* short description : General option test (sub-routines for options tests) '* -'************************************************************************ -'* -' #1 hToolsOptions 'Select the correct page in Tools / Options -'* -'\*********************************************************************** +'\****************************************************************************** function hToolsOptions ( Applicationname as string, Tabpagename as string, OPTIONAL bSilent as Boolean ) as Boolean + + const CFN = "global::tools::includes::required::t_option.inc:" + Dim bCorPage as Boolean Dim bFirst as Boolean - Dim AnzahlEintraegeZu as Integer - Dim AnzahlEintraege as Integer - Dim i as Integer + + Dim InitialNodeCount as Integer ' All nodes collapsed + Dim CurrentNodeCount as Integer ' Number of nodes when a top node is expanded + Dim iCurrentPage as Integer ' Increment variable for stepping through the nodes Dim startpos as integer + + Applicationname = ucase( Applicationname ) + Tabpagename = ucase( Tabpagename ) '///<i>hToolsOptions</i>: Routine to select the correct option page '///+<u>input</u>: The groupname as string, name of optionpage as string @@ -81,83 +84,44 @@ function hToolsOptions ( Applicationname as string, Tabpagename as string, OPTIO if ExtrasOptionenDlg.Exists then Optionsliste.TypeKeys "<HOME>" - for i = 1 to 12+1 + for iCurrentPage = 1 to 12+1 Optionsliste.TypeKeys "-<DOWN>" - next i + next iCurrentPage 'Optionsliste.TypeKeys "<HOME>" - AnzahlEintraegeZu = Optionsliste.GetItemCount - select case Ucase$(Applicationname) + InitialNodeCount = Optionsliste.GetItemCount + select case Applicationname case "STAROFFICE" : startpos = 1 case "LOADSAVE" : startpos = 2 case "LANGUAGESETTINGS" : startpos = 3 - case "WRITER" - if ((gApplication = "WRITER")OR(gApplication = "MASTERDOCUMENT")OR(gApplication = "HTML")) then - startpos = 4 - else - qaErrorLog "please review your test; the OptionsSet '" + Applicationname + "' is not available for application '" + gApplication + "'" - exit function - endif - case "HTML" - if ((gApplication = "WRITER")OR(gApplication = "MASTERDOCUMENT")OR(gApplication = "HTML")) then - startpos = 5 - else - qaErrorLog "please review your test; the OptionsSet '" + Applicationname + "' is not available for application '" + gApplication + "'" - exit function - endif - - case "CALC" - if (gApplication = "CALC") then - startpos = 4 - else - qaErrorLog "please review your test; the OptionsSet '" + Applicationname + "' is not available for application '" + gApplication + "'" - exit function - endif - - case "IMPRESS" - if ((gApplication = "DRAW")OR(gApplication = "DRAW")) then - startpos = 4 - else - qaErrorLog "please review your test; the OptionsSet '" + Applicationname + "' is not available for application '" + gApplication + "'" - exit function - endif - - case "DRAWING" - if ((gApplication = "DRAW")OR(gApplication = "IMPRESS")) then - startpos = 4 - else - qaErrorLog "please review your test; the OptionsSet '" + Applicationname + "' is not available for application '" + gApplication + "'" - exit function - endif - - case "MATH" - if (gApplication = "MATH") then - startpos = 4 - else - qaErrorLog "please review your test; the OptionsSet '" + Applicationname + "' is not available for application '" + gApplication + "'" - exit function - endif - - case "DATASOURCES" - startpos = AnzahlEintraegeZu -2 - case "CHART" - startpos = AnzahlEintraegeZu -1 - case "INTERNET" - startpos = AnzahlEintraegeZu ' always the last one + case "WRITER" : startpos = 4 + case "MASTERDOCUMENT" : startpos = 4 + case "HTML" : startpos = 5 + case "CALC" : startpos = 4 + case "IMPRESS" : startpos = 4 + case "DRAW" : startpos = 4 + case "MATH" : startpos = 4 + case "DATASOURCES" : startpos = InitialNodeCount -2 + case "CHART" : startpos = InitialNodeCount -1 + case "INTERNET" : startpos = InitialNodeCount ' always the last one case else - warnlog "hToolsOptions(): " + Applicationname + " / " + Tabpagename + " could not be found! Please review your testscript! '" + gApplication + "'" + warnlog( CFN & "Invalid Application name specified: " & Applicationname ) + printlog( "Valid options are:" ) + printlog( "gApplications: WRITER, CALC, MASTERDOCUMENT, DRAW, IMPRESS, HTML, MATH, CHART" ) + printlog( "additionally.: STAROFFICE, LOADSAVE, LANGUAGESETTINGS, DATASOURCES, INTERNET" ) + printlog( "All names must be uppercase" ) exit function end select Optionsliste.select Startpos Optionsliste.typekeys "+" - AnzahlEintraege = Optionsliste.GetItemCount + CurrentNodeCount = Optionsliste.GetItemCount bFirst = TRUE - for i = 1 to AnzahlEintraege - AnzahlEintraegeZu + for iCurrentPage = 1 to CurrentNodeCount - InitialNodeCount bCorPage = FALSE Kontext "ExtrasOptionenDlg" Optionsliste.TypeKeys "<DOWN>" - sleep (1) - select case ucase$(Applicationname) + WaitSlot() ' Some sort of NOOP + select case Applicationname case "STAROFFICE" '///Pages in group "StarOffice"are: '///+<ul><li>"UserData"</li> @@ -172,7 +136,7 @@ function hToolsOptions ( Applicationname as string, Tabpagename as string, OPTIO '///+<li>"Appearence"</li> '///+<li>"Accessibility"</li> '///+<li>"Java"</li></ul> - select case ucase$(Tabpagename) + select case Tabpagename case "USERDATA" Kontext "TabBenutzerdaten" if TabBenutzerdaten.exists then bCorPage = TRUE @@ -249,7 +213,7 @@ function hToolsOptions ( Applicationname as string, Tabpagename as string, OPTIO '///+<li>"VBAProperties"</li> '///+<li>"MicrosoftOffice"</li> '///+<li>"HTMLCompatibility"</li></ul> - select case ucase$(Tabpagename) + select case Tabpagename case "GENERAL" Kontext "TabSpeichern" if TabSpeichern.exists then bCorPage = TRUE @@ -280,7 +244,7 @@ function hToolsOptions ( Applicationname as string, Tabpagename as string, OPTIO Kontext "Active" if Active.Exists then Active.OK Kontext "ExtrasOptionenDlg" - select case ucase$(Tabpagename) + select case Tabpagename case "LANGUAGES" Kontext "TabSprachen" If TabSprachen.exists(2) then bCorPage = TRUE @@ -313,7 +277,7 @@ function hToolsOptions ( Applicationname as string, Tabpagename as string, OPTIO Kontext "Active" if Active.Exists then Active.OK Kontext "ExtrasOptionenDlg" - select case ucase$(Tabpagename) + select case Tabpagename case "PROXY" Kontext "ProxyWarnung" if ProxyWarnung.Exists then @@ -346,7 +310,7 @@ function hToolsOptions ( Applicationname as string, Tabpagename as string, OPTIO '///+<li>"Print"</li> '///+<li>"Table"</li> '///+<li>"Changes"</li></ul> - select case ucase$(Tabpagename) + select case Tabpagename case "GENERAL" Kontext "TabLaden" If TabLaden.exists then bCorPage = TRUE @@ -422,7 +386,7 @@ function hToolsOptions ( Applicationname as string, Tabpagename as string, OPTIO '///+<li>"Table"</li> '///+<li>"Source"</li> '///+<li>"Background"</li></ul> - select case ucase$(Tabpagename) + select case Tabpagename case "VIEW" Kontext "TabInhalteHTML" If TabInhalteHTML.exists then bCorPage = TRUE @@ -462,7 +426,7 @@ function hToolsOptions ( Applicationname as string, Tabpagename as string, OPTIO '///+<li>"Changes"</li> '///+<li>"Grid"</li> '///+<li>"Print"</li></ul> - select case ucase$(Tabpagename) + select case Tabpagename case "GENERAL" Kontext "TabLayoutCalc" If TabLayoutCalc.exists(2) then bCorPage = TRUE @@ -504,7 +468,7 @@ function hToolsOptions ( Applicationname as string, Tabpagename as string, OPTIO '///+<li>"View"</li> '///+<li>"Grid"</li> '///+<li>"Print"</li></ul> - select case ucase$(Tabpagename) + select case Tabpagename case "GENERAL" Kontext "TabSonstigesDraw" If TabSonstigesDraw.exists then bCorPage = TRUE @@ -531,7 +495,7 @@ function hToolsOptions ( Applicationname as string, Tabpagename as string, OPTIO '///+<li>"View"</li> '///+<li>"Grid"</li> '///+<li>"Print"</li></ul> - select case ucase$(Tabpagename) + select case Tabpagename case "GENERAL" Kontext "TabSonstigesDraw" If TabSonstigesDraw.exists then bCorPage = TRUE @@ -555,7 +519,7 @@ function hToolsOptions ( Applicationname as string, Tabpagename as string, OPTIO case "MATH" '///Page(s) in group "Formula"are: '///+<ul><li>"Settings"</li></ul> - select case ucase$(Tabpagename) + select case Tabpagename case "SETTINGS" Kontext "TabDruckenMath" If TabDruckenMath.exists then bCorPage = TRUE @@ -564,7 +528,7 @@ function hToolsOptions ( Applicationname as string, Tabpagename as string, OPTIO case "CHART" '///Pages in group "Chart"are: '///+<ul><li>"DefaultColors"</li></ul> - select case ucase$(Tabpagename) + select case Tabpagename case "DEFAULTCOLORS" Kontext "TabGrundfarben" If TabGrundfarben.exists(4) then bCorPage = TRUE @@ -573,7 +537,7 @@ function hToolsOptions ( Applicationname as string, Tabpagename as string, OPTIO case "DATASOURCES" '///Pages in group "Datasource"are: '///+<ul><li>"Connetions"</li></ul> - select case ucase$(Tabpagename) + select case Tabpagename case "CONNECTIONS" Kontext "TabConnections" If TabConnections.exists(4) then bCorPage = TRUE @@ -586,17 +550,17 @@ function hToolsOptions ( Applicationname as string, Tabpagename as string, OPTIO bCorPage = False end select If bCorPage = TRUE then Exit for - next i - if bCorPage = FALSE then - if bSilent = FALSE then - warnlog "hToolsOptions(): "+ Applicationname + " / " + Tabpagename + " could not be found! Please review your test!" + next iCurrentPage + if ( NOT bCorPage ) then + if ( NOT bSilent ) then + warnlog CFN & Applicationname + " / " + Tabpagename + " could not be found! Please review your test!" else - printlog "hToolsOptions(): "+ Applicationname + " / " + Tabpagename + " should not be found!" + printlog CFN & Applicationname + " / " + Tabpagename + " could not be found!" end if end if else bCorPage = FALSE - warnlog "Please open the option-dialog with 'ToolsOptions' before you called this routine!" + warnlog CFN & "Please open the option-dialog with 'ToolsOptions' before you called this routine!" end if hToolsOptions = bCorPage end function diff --git a/testautomation/global/tools/includes/required/t_option2.inc b/testautomation/global/tools/includes/required/t_option2.inc index dc8e4d5817b4..74f49d9e3916 100644 --- a/testautomation/global/tools/includes/required/t_option2.inc +++ b/testautomation/global/tools/includes/required/t_option2.inc @@ -68,6 +68,7 @@ sub DialogeFuerTypenKontrollieren Dim i as Integer Dim iCount as Integer Dim iErrorCount as integer + dim iExitCounter as integer : iExitCounter = 0 Kontext "TabPfade" Typ.TypeKeys "<Down><Down><Home>" iCount = 0 @@ -75,28 +76,40 @@ sub DialogeFuerTypenKontrollieren for i=1 to Typ.GetItemCount if i<>1 then Typ.TypeKeys "<Down>" printlog " "+typ.getText - if bAsianLan <> TRUE then + if ( bAsianLan <> TRUE ) then try Bearbeiten.Click - kontext - if active.exists (3) then - iErrorCount = iErrorCount + 1 - if (iErrorCount > 1) then - Warnlog active.getText + + do while( iExitCounter <= 10 ) + + kontext "Active" + if ( active.exists() ) then + iErrorCount = iErrorCount + 1 + if (iErrorCount > 1) then + Warnlog active.getText + endif + qaErrorlog "#i69014# gallery path doesn't exist: '" + active.getText + "'" + printlog active.getText + active.ok endif - qaErrorlog "#i69014# gallery path doesn't exist: '" + active.getText + "'" - printlog active.getText - active.ok - endif - Kontext "OeffnenDlg" - if OeffnenDlg.Exists(2) then - if Dateityp.IsVisible = TRUE then Warnlog "The normal FileOpen-Dialog is visible with the Filetype-Listbox => BUG!" - OeffnenDlg.Cancel - else + + Kontext "OeffnenDlg" + if OeffnenDlg.Exists() then + if ( Dateityp.IsVisible ) then + Warnlog "The normal FileOpen-Dialog is visible with the Filetype-Listbox => BUG!" + endif + OeffnenDlg.Cancel + exit do + endif + Kontext "PfadeAuswaehlen" - PfadeAuswaehlen.Cancel - end if - Sleep (1) + if ( PfadeAuswaehlen.exists() ) then + PfadeAuswaehlen.Cancel + exit do + endif + + iExitCounter = iExitCounter + 1 + loop Kontext "TabPfade" catch Warnlog "Error on entry " & i & "!" @@ -104,26 +117,36 @@ sub DialogeFuerTypenKontrollieren endcatch else try - if Bearbeiten.IsEnabled = TRUE then + if ( Bearbeiten.IsEnabled ) then Bearbeiten.Click - kontext - if active.exists (3) then - iErrorCount = iErrorCount + 1 - if (iErrorCount > 1) then - Warnlog active.getText + + do while( iExitCounter <= 10 ) + + kontext "Active" + if active.exists () then + iErrorCount = iErrorCount + 1 + if (iErrorCount > 1) then + Warnlog active.getText + endif + qaErrorlog "WorkAround for #109107# has to come up only once @'Add-Ins'! else BUG!" + active.ok endif - qaErrorlog "WorkAround for #109107# has to come up only once @'Add-Ins'! else BUG!" - active.ok - endif - Kontext "OeffnenDlg" - if OeffnenDlg.Exists(2) then - if Dateityp.IsVisible = TRUE then Warnlog "The normal FileOpen-Dialog is visible with the Filetype-Listbox => BUG!" - OeffnenDlg.Cancel - else + + Kontext "OeffnenDlg" + if OeffnenDlg.Exists() then + if ( Dateityp.IsVisible ) then + Warnlog "The normal FileOpen-Dialog is visible with the Filetype-Listbox => BUG!" + OeffnenDlg.Cancel + exit do + endif + endif + Kontext "PfadeAuswaehlen" - PfadeAuswaehlen.Cancel - end if - Sleep (1) + if ( PfadeAuswaehlen.exists() ) then + PfadeAuswaehlen.Cancel + exit do + end if + loop Kontext "TabPfade" else iCount = iCount + 1 @@ -265,76 +288,6 @@ function hSetMacroSecurity( iLevel as integer ) as integer hSetMacroSecurity() = iOldSecurityLevel end function -'------------------------------------------------------------------------- - -function fGetSetMacroSecurityUNO (optional iLevel as integer) as integer - ' Input : Security level where 0 = low and 3 = very high; empty: just return current value - ' Return : Previous security level, -1 on error - ' Changes: If iLevel is given, update global variable gMacroSecurityLevel to new level - ' NOTE : If possible use this function outside the testcase - '///Switch between macro security levels in Tools/Options without using the UI - Dim sFileFunction as string - Dim iOldSecurityLevel as integer - Dim oUnoOfficeConnection as object - Dim oUnoConfigurationAccess as object - Dim aPropertyValue(1) As new com.sun.star.beans.PropertyValue ' Array of pairs: Property with Value - Dim xViewRoot - Dim bOptional as boolean - - sFileFunction = "global::tools::inc::t_option2.inc::hSetMacroSecurity::" - bOptional = isMissing(iLevel) - iOldSecurityLevel = -1 - - ' Open OOo UNO-Port for communication - oUnoOfficeConnection=hGetUnoService(TRUE) - if (NOT isNull(oUnoOfficeConnection)) then - try - ' Open Configuration access - oUnoConfigurationAccess=oUnoOfficeConnection.createInstance("com.sun.star.configuration.ConfigurationProvider") - if (NOT isNull(oUnoConfigurationAccess)) then - ' Specifies the location of the view root in the configuration: - ' The value is the Path name of the configuration item to change. - aPropertyValue(0).Name="nodepath" - ' Controls how updates are handled in the cache: If false , the cache - ' must operate in write-through mode, where updates are written to - ' persistent storage at once - that is before ::commitChanges() returns. - aPropertyValue(1).Name="lazywrite" - aPropertyValue(1).Value=False - - '///Tools / Options / Security - '///Check which 'Macro Security Level' is set and put it into returnvalue. - aPropertyValue(0).Value="/org.openoffice.Office.Common/Security/Scripting" - xViewRoot=oUnoConfigurationAccess.createInstanceWithArguments("com.sun.star.configuration.ConfigurationUpdateAccess",aPropertyValue()) - iOldSecurityLevel = xViewRoot.getByName("MacroSecurityLevel") - ' If input is given, use it by setting the Security Level - if NOT bOptional then - xViewRoot.setPropertyValue("MacroSecurityLevel", iLevel) - xViewRoot.commitChanges() - ' Since we use lazywrite=false, the call to '.commitChanges()' returns if all data is written. - ' This call to ask for pending changes is just to convince me; - if xViewRoot.hasPendingChanges() then - qaErrorLog(sFileFunction+"Changes still pending...") - ' At this point there is no needed to think about what to do, if it doesn't work. - ' If it doesn't work, the change is performed in the UI via - ' global::system::inc::master.inc::mMakeGeneralOptions - end if - ' Update global value - gMacroSecurityLevel = iLevel - end if - ' Destroy, discard, dump, get rid of, put away, throw away, trash, the object: - xViewRoot.dispose() - else - qaErrorLog(sFileFunction+"Couldn't create Configuration access") - end if - catch - qaErrorLog(sFileFunction+"Failure during reading or setting Configuration Value") - endcatch - else - qaErrorLog(sFileFunction+"Couldn't get UNO service") - end if - fGetSetMacroSecurityUNO = iOldSecurityLevel -end function - '******************************************************************************* function hGetMacroSecurityAPI() as integer @@ -477,7 +430,7 @@ function hSetMacroSecurityAPI( iSecLevel as integer ) as integer xViewRoot.commitChanges() xViewRoot.dispose() - printlog( CFN & "Setting macro security level to " & caLevel( iSecLevel ) + 'printlog( CFN & "Setting macro security level to " & caLevel( iSecLevel ) catch diff --git a/testautomation/global/tools/includes/required/t_tools1.inc b/testautomation/global/tools/includes/required/t_tools1.inc index 14bd3455a63c..aa9711e89952 100755 --- a/testautomation/global/tools/includes/required/t_tools1.inc +++ b/testautomation/global/tools/includes/required/t_tools1.inc @@ -41,7 +41,7 @@ private SLEEP_TIME_REQUESTED as integer private SLEEP_CALLS_SUM as integer private SLEEP_TIME_USED as integer -private const VERBOSE = false +private const VERBOSE = true function GetClipboardText as string @@ -1209,31 +1209,53 @@ function hUseAsyncSlot( cSlot as string ) as integer for iWait = 1 to MAX_WAIT try select case ( lcase( cSlot ) ) - case "fileclose" : FileClose - case "filesaveas" : FileSaveAs - case "filesaveall" : FileSaveAll - case "fileexport" : FileExport + case "fileclose" : FileClose + case "filesaveas" : FileSaveAs + case "filesaveall" : FileSaveAll + case "fileexport" : FileExport + case "filereload" : FileReload - case "editcopy" : EditCopy - case "editpaste" : EditPaste - case "editcut" : EditCut - case "editselectall" : EditSelectAll - case "editselectallmath" : EditSelectAllMath - case "editdeletecontents" : EditDeleteContents - case "editundo" : EditUndo - case "editredo" : EditRedo - case "editrepeat" : EditRepeat - case "editpastespecial" : EditPasteSpecial - case "editsearchandreplace" : EditSearchAndReplace - case "editduplicate" : EditDuplicate - case "editgluepoints" : EditGluePoints - case "editdeleteslide" : EditDeleteSlide - case "editobjectproperties" : EditObjectProperties - case "editobjectedit" : EditObjectEdit - case "editobjectsavecopyas" : EditObjectSaveCopyAs + case "editcopy" : EditCopy + case "editchangesrecord" : EditChangesRecord + case "editchangesshow" : EditChangesShow + case "editchangesprotecttrace" : EditChangesProtectTrace + case "editchangescomment" : EditChangesComment + + case "editpaste" : EditPaste + case "editcut" : EditCut + case "editselectall" : EditSelectAll + case "editselectallmath" : EditSelectAllMath + case "editselectionmodeblock" : EditSelectionModeBlock + case "editselectionmodestandard" : EditSelectionModeStandard + case "editdeletecontents" : EditDeleteContents + case "editundo" : EditUndo + case "editredo" : EditRedo + case "editrepeat" : EditRepeat + case "editpastespecial" : EditPasteSpecial + case "editpastespecialwriter" : EditPasteSpecialWriter + case "editsearchandreplace" : EditSearchAndReplace + case "editduplicate" : EditDuplicate + case "editgluepoints" : EditGluePoints + case "editdeleteslide" : EditDeleteSlide + case "editobjectproperties" : EditObjectProperties + case "editobjectedit" : EditObjectEdit + case "editobjectsavecopyas" : EditObjectSaveCopyAs - case "formatcontrol" : FormatControl - case "formateditpoints" : FormatEditPoints + case "formatcontrol" : FormatControl + case "formateditpoints" : FormatEditPoints + case "formatsections" : FormatSections + case "formatchangecaseupper" : FormatChangeCaseUpper + case "formatchangecaselower" : FormatChangeCaseLower + case "formatarea" : FormatArea + case "formatarrangebringtofrontcalc" : FormatArrangeBringToFrontCalc + case "formatflipvertically" : FormatFlipVertically + case "formatfliphorizontally" : FormatFlipHorizontally + case "formatline" : FormatLine + case "formatpositionandsize" : FormatPositionAndSize + + case "insertindexesbibliographyentry" : InsertIndexesBibliographyEntry + + case "contextpositionandsize" : ContextPositionAndSize case else : warnlog( "Unknown slot called: " & cSlot ) end select diff --git a/testautomation/graphics/optional/g_arrangealign.bas b/testautomation/graphics/optional/g_arrangealign.bas index d47403967994..92ed54205dd2 100755 --- a/testautomation/graphics/optional/g_arrangealign.bas +++ b/testautomation/graphics/optional/g_arrangealign.bas @@ -50,13 +50,9 @@ sub main use "graphics\tools\id_tools_2.inc" use "graphics\optional\includes\global\g_arrangealign.inc" + gApplication = "IMPRESS" PrintLog "-------------------------" + gApplication + "-------------------" - if (Lcase(gApplication) = "impress") then - Datei = ConvertPath (gOfficePath + "user\work\" + "anord.odp") - else - Datei = ConvertPath (gOfficePath + "user\work\" + "anord.odg") - end if - + Datei = ConvertPath (gOfficePath + "user\work\" + "anord.odp") Call tiDatei_Fuer_Anordnen_Erstellen ' is needed for the following test :-( ueber vars are set here Call tdContextSendBackward Call tdContextBringForward @@ -68,12 +64,7 @@ sub main gApplication = "DRAW" PrintLog "-------------------------" + gApplication + "-------------------" - if (Lcase(gApplication) = "impress") then - Datei = ConvertPath (gOfficePath + "user\work\" + "anord.odp") - else - Datei = ConvertPath (gOfficePath + "user\work\" + "anord.odg") - end if - + Datei = ConvertPath (gOfficePath + "user\work\" + "anord.odg") Call tiDatei_Fuer_Anordnen_Erstellen ' is needed for the following test :-( ueber vars are set here Call tdContextSendBackward Call tdContextBringForward diff --git a/testautomation/graphics/optional/includes/global/g_paragraph.inc b/testautomation/graphics/optional/includes/global/g_paragraph.inc index 2d1e5ea449f7..63a83ae0829f 100755 --- a/testautomation/graphics/optional/includes/global/g_paragraph.inc +++ b/testautomation/graphics/optional/includes/global/g_paragraph.inc @@ -1,7 +1,7 @@ 'encoding UTF-8 Do not remove or change this line! '************************************************************************** '* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. -'* +'* '* Copyright 2008 by Sun Microsystems, Inc. '* '* OpenOffice.org - a multi-platform office productivity suite @@ -35,118 +35,107 @@ '* '* short description : '* -'*********************************************************************************** -'* -' #1 tdFormatParagraph -'* '\*********************************************************************************** testcase tdFormatParagraph - Dim Zaehler as integer - Dim a as integer - dim iCount as integer '3 out of 6 have to be able to change a value! - dim sIndent as string - dim sIndentValue - dim sTemp(5) as string - dim iTemp as integer - dim sApplication as string - - if (gApplication = "DRAW") then - sApplication = "DRAWING" - else - sApplication = "IMPRESS" - endif + Dim Zaehler as integer + Dim a as integer + dim iCount as integer '3 out of 6 have to be able to change a value! + dim sIndent as string + dim sIndentValue + dim sTemp(5) as string + dim iTemp as integer - iCount = 0 - '/// open application ///' - Call hNewDocument + iCount = 0 + '/// open application ///' + Call hNewDocument - printlog "'/// - save states ///" ' - ToolsOptions - hToolsOptions (sApplication,"General") + printlog "'/// - save states ///" ' + ToolsOptions + hToolsOptions (gApplication,"General") iTemp = Masseinheit.GetSelIndex Masseinheit.TypeKeys= "<HOME>" '(first entry) Kontext "ExtrasOptionenDlg" - ExtrasOptionenDlg.OK + ExtrasOptionenDlg.OK -'/// call Format->Paragraph & set some values on 'indents and spacing' ///' - FormatParagraph - Kontext - Active.SetPage TabEinzuegeUndAbstaende - Kontext "TabEinzuegeUndAbstaende" - VonLinks.SetText "2" - sleep (1) - VonLinks.Typekeys "<TAB>" - ErsteZeile.SetText "2" - sleep (1) - ErsteZeile.Typekeys "<TAB>" - VonRechts.SetText "2" - sleep (1) - VonRechts.Typekeys "<TAB>" - Oben.SetText "2" - sleep (1) - Oben.Typekeys "<TAB>" - Unten.SetText "2" - sleep (1) - Unten.Typekeys "<TAB>" - Zeilenabstand.TypeKeys "<DOWN>" - Zeilenabstand.TypeKeys "<UP>" - printlog "linespacing count: "+Zeilenabstand.GetItemCount - sTemp(1) = VonLinks.getText - sTemp(2) = ErsteZeile.getText - sTemp(3) = VonRechts.getText - sTemp(4) = Oben.getText - sTemp(5) = Unten.getText - TabEinzuegeUndAbstaende.OK - '///+ close dialog ///' - '///+ call Format->Paragraph again and check values ///' - FormatParagraph - Kontext - Active.SetPage TabEinzuegeUndAbstaende - Kontext "TabEinzuegeUndAbstaende" - if LiberalMeasurement(VonLinks.GetText, sTemp(1)) <> TRUE Then WarnLog "Value changed VonLinks is: '" + VonLinks.GetText + "' should: '" + sTemp(1) +"'" - if LiberalMeasurement(VonRechts.GetText, sTemp(2)) <> TRUE Then WarnLog "Value changed VonRechts is: '" + VonRechts.GetText + "' should: '" + sTemp(2) +"'" - if LiberalMeasurement(ErsteZeile.GetText, sTemp(3)) <> TRUE Then WarnLog "Value changed ErsteZeile is: '" + ErsteZeile.GetText + "' should: '" + sTemp(3) +"'" - if LiberalMeasurement(Oben.GetText, sTemp(4)) <> TRUE Then WarnLog "Value changed Oben is: '" + Oben.GetText + "' should: '" + sTemp(4) +"'" - if LiberalMeasurement(Unten.GetText, sTemp(5)) <> TRUE Then WarnLog "Value changed Unten is: '" + Unten.GetText + "' should: '" + sTemp(5) +"'" + '/// call Format->Paragraph & set some values on 'indents and spacing' ///' + FormatParagraph + Kontext + Active.SetPage TabEinzuegeUndAbstaende + Kontext "TabEinzuegeUndAbstaende" + VonLinks.SetText "2" + sleep (1) + VonLinks.Typekeys "<TAB>" + ErsteZeile.SetText "2" + sleep (1) + ErsteZeile.Typekeys "<TAB>" + VonRechts.SetText "2" + sleep (1) + VonRechts.Typekeys "<TAB>" + Oben.SetText "2" + sleep (1) + Oben.Typekeys "<TAB>" + Unten.SetText "2" + sleep (1) + Unten.Typekeys "<TAB>" + Zeilenabstand.TypeKeys "<DOWN>" + Zeilenabstand.TypeKeys "<UP>" + printlog "linespacing count: "+Zeilenabstand.GetItemCount + sTemp(1) = VonLinks.getText + sTemp(2) = ErsteZeile.getText + sTemp(3) = VonRechts.getText + sTemp(4) = Oben.getText + sTemp(5) = Unten.getText + TabEinzuegeUndAbstaende.OK + '///+ close dialog ///' + '///+ call Format->Paragraph again and check values ///' + FormatParagraph + Kontext + Active.SetPage TabEinzuegeUndAbstaende + Kontext "TabEinzuegeUndAbstaende" + if LiberalMeasurement(VonLinks.GetText, sTemp(1)) <> TRUE Then WarnLog "Value changed VonLinks is: '" + VonLinks.GetText + "' should: '" + sTemp(1) +"'" + if LiberalMeasurement(VonRechts.GetText, sTemp(2)) <> TRUE Then WarnLog "Value changed VonRechts is: '" + VonRechts.GetText + "' should: '" + sTemp(2) +"'" + if LiberalMeasurement(ErsteZeile.GetText, sTemp(3)) <> TRUE Then WarnLog "Value changed ErsteZeile is: '" + ErsteZeile.GetText + "' should: '" + sTemp(3) +"'" + if LiberalMeasurement(Oben.GetText, sTemp(4)) <> TRUE Then WarnLog "Value changed Oben is: '" + Oben.GetText + "' should: '" + sTemp(4) +"'" + if LiberalMeasurement(Unten.GetText, sTemp(5)) <> TRUE Then WarnLog "Value changed Unten is: '" + Unten.GetText + "' should: '" + sTemp(5) +"'" - '///+ try to activate the metric field for line spacing, has to work for the last 3 of 6 entries !///' - Zaehler=Zeilenabstand.GetItemCount - for a=1 to Zaehler + '///+ try to activate the metric field for line spacing, has to work for the last 3 of 6 entries !///' + Zaehler=Zeilenabstand.GetItemCount + for a=1 to Zaehler Zeilenabstand.Select a sIndent = Zeilenabstand.GetSelText sleep 1 try -' if um.IsEnabled then printlog "## UM##" -' if von.IsEnabled then printlog "##VON##" - if (von.IsEnabled and um.IsEnabled) then printlog "##VON#### UM## !!!!! :-(" - if von.IsEnabled then - sIndentValue = von.GetText - von.More - sleep 1 - if sIndentValue = von.GetText then - warnlog "value didn't change :-( : '"+sIndent +"'" - else - printlog "value changed :-) '"+sIndent +"'" - endif - iCount = iCount+1 - else - if um.IsEnabled then - sIndentValue = Um.GetText - Um.More - sleep 1 - if sIndentValue = Um.GetText then + ' if um.IsEnabled then printlog "## UM##" + ' if von.IsEnabled then printlog "##VON##" + if (von.IsEnabled and um.IsEnabled) then printlog "##VON#### UM## !!!!! :-(" + if von.IsEnabled then + sIndentValue = von.GetText + von.More + sleep 1 + if sIndentValue = von.GetText then warnlog "value didn't change :-( : '"+sIndent +"'" - else + else printlog "value changed :-) '"+sIndent +"'" - endif - iCount = iCount+1 - else - printlog "value not changeable :-? '"+sIndent +"'" - endif - endif + endif + iCount = iCount+1 + else + if um.IsEnabled then + sIndentValue = Um.GetText + Um.More + sleep 1 + if sIndentValue = Um.GetText then + warnlog "value didn't change :-( : '"+sIndent +"'" + else + printlog "value changed :-) '"+sIndent +"'" + endif + iCount = iCount+1 + else + printlog "value not changeable :-? '"+sIndent +"'" + endif + endif catch - warnLog "BIGERROR :-(" + warnLog "BIGERROR :-(" endcatch printlog "----------------------------------------------------------------------------------------" sleep 1 @@ -156,85 +145,85 @@ testcase tdFormatParagraph Kontext Active.SetPage TabEinzuegeUndAbstaende Kontext "TabEinzuegeUndAbstaende" - next a - if iCount <> 3 then warnlog "Could only activate "+ iCount + " out of "+Zaehler +" vlauefields :-(" - TabeinzuegeUndAbstaende.OK + next a + if iCount <> 3 then warnlog "Could only activate "+ iCount + " out of "+Zaehler +" vlauefields :-(" + TabeinzuegeUndAbstaende.OK -'/// call Format->Paragraph & set some values on 'alignment' ///' -'///+ check button, close dialog, open again, check if the button is stioll selected ///' -'///+ do it for all four buttons: left, right, center, justified ///' - FormatParagraph - Kontext - Active.SetPage TabAusrichtungAbsatz - Kontext "TabAusrichtungAbsatz" + '/// call Format->Paragraph & set some values on 'alignment' ///' + '///+ check button, close dialog, open again, check if the button is stioll selected ///' + '///+ do it for all four buttons: left, right, center, justified ///' + FormatParagraph + Kontext + Active.SetPage TabAusrichtungAbsatz + Kontext "TabAusrichtungAbsatz" - Links.Check - TabAusrichtungAbsatz.OK - FormatParagraph - Kontext - Active.SetPage TabAusrichtungAbsatz - Kontext "TabAusrichtungAbsatz" - if Links.IsChecked=False Then WarnLog " Button 'left' is not activated" + Links.Check + TabAusrichtungAbsatz.OK + FormatParagraph + Kontext + Active.SetPage TabAusrichtungAbsatz + Kontext "TabAusrichtungAbsatz" + if Links.IsChecked=False Then WarnLog " Button 'left' is not activated" - Rechts.Check - TabAusrichtungAbsatz.OK - FormatParagraph - Kontext - Active.SetPage TabAusrichtungAbsatz - Kontext "TabAusrichtungAbsatz" - if Rechts.IsChecked=False Then WarnLog " Button 'right' is not activated" + Rechts.Check + TabAusrichtungAbsatz.OK + FormatParagraph + Kontext + Active.SetPage TabAusrichtungAbsatz + Kontext "TabAusrichtungAbsatz" + if Rechts.IsChecked=False Then WarnLog " Button 'right' is not activated" - Zentriert.Check - TabAusrichtungAbsatz.OK - FormatParagraph - Kontext - Active.SetPage TabAusrichtungAbsatz - Kontext "TabAusrichtungAbsatz" - if Zentriert.IsChecked=False Then WarnLog " Button 'center' is not activated" + Zentriert.Check + TabAusrichtungAbsatz.OK + FormatParagraph + Kontext + Active.SetPage TabAusrichtungAbsatz + Kontext "TabAusrichtungAbsatz" + if Zentriert.IsChecked=False Then WarnLog " Button 'center' is not activated" - Blocksatz.Check - TabAusrichtungAbsatz.OK - FormatParagraph - Kontext - Active.SetPage TabAusrichtungAbsatz - Kontext "TabAusrichtungAbsatz" - if Blocksatz.IsChecked=False Then WarnLog " Button 'justified' is not activated" - TabAusrichtungAbsatz.OK + Blocksatz.Check + TabAusrichtungAbsatz.OK + FormatParagraph + Kontext + Active.SetPage TabAusrichtungAbsatz + Kontext "TabAusrichtungAbsatz" + if Blocksatz.IsChecked=False Then WarnLog " Button 'justified' is not activated" + TabAusrichtungAbsatz.OK -'/// call Format->Paragraph & set some values on 'tabs' ///' - FormatParagraph - Kontext - Active.SetPage TabTabulator - Kontext "TabTabulator" - SetClipboard Position.GetItemCount - Position.SetText "1" - Neu.Click - Position.SetText "2" - Neu.Click - Position.SetText "3" - Neu.Click - TabTabulator.OK - FormatParagraph - Kontext - Active.SetPage TabTabulator - Kontext "TabTabulator" - if GetClipboardText + 3 = Position.GetItemCount Then PrintLog " positions added" - Loeschen.Click - if Position.GetItemCount="3" Then - WarnLog " Delete does not work" - else - Printlog " TAll ran well in TabTabulator" - end if - TabTabulator.OK + '/// call Format->Paragraph & set some values on 'tabs' ///' + FormatParagraph + Kontext + Active.SetPage TabTabulator + Kontext "TabTabulator" + SetClipboard Position.GetItemCount + Position.SetText "1" + Neu.Click + Position.SetText "2" + Neu.Click + Position.SetText "3" + Neu.Click + TabTabulator.OK + FormatParagraph + Kontext + Active.SetPage TabTabulator + Kontext "TabTabulator" + if GetClipboardText + 3 = Position.GetItemCount Then PrintLog " positions added" + Loeschen.Click + if Position.GetItemCount="3" Then + WarnLog " Delete does not work" + else + Printlog " TAll ran well in TabTabulator" + end if + TabTabulator.OK - printlog "'/// - Reset states back to what they were before ///"' - ToolsOptions - hToolsOptions (sApplication,"General") + printlog "'/// - Reset states back to what they were before ///"' + ToolsOptions + hToolsOptions (gApplication,"General") Masseinheit.Select iTemp if ( Masseinheit.GetSelIndex <> iTemp ) then WarnLog "Unit of Measurement state were NOT changed back" Kontext "ExtrasOptionenDlg" - ExtrasOptionenDlg.OK + ExtrasOptionenDlg.OK - '/// close application ///' - Call hCloseDocument + '/// close application ///' + Call hCloseDocument endcase diff --git a/testautomation/graphics/required/d_opt.bas b/testautomation/graphics/required/d_opt.bas index 017ac65a7bff..57b53bdce6c4 100755 --- a/testautomation/graphics/required/d_opt.bas +++ b/testautomation/graphics/required/d_opt.bas @@ -55,13 +55,13 @@ sub main printLog Chr(13) + "------------ Options - Tools Draw - ------------" - Call tToolsOptionsDrawGeneral ("Drawing") - Call tToolsOptionsDrawView ("Drawing") - Call tToolsOptionsDrawGrid ("Drawing") - Call tToolsOptionsDrawPrint ("Drawing") + Call tToolsOptionsDrawGeneral ("DRAW") + Call tToolsOptionsDrawView ("DRAW") + Call tToolsOptionsDrawGrid ("DRAW") + Call tToolsOptionsDrawPrint ("DRAW") ' Special Tests - Call tToolsOptionsMeasurementUnit ("Drawing") + Call tToolsOptionsMeasurementUnit ("DRAW") Call hStatusOut end sub diff --git a/testautomation/graphics/required/i_opt.bas b/testautomation/graphics/required/i_opt.bas index 419d5a7941d4..8287e7cd4f7f 100755 --- a/testautomation/graphics/required/i_opt.bas +++ b/testautomation/graphics/required/i_opt.bas @@ -56,14 +56,14 @@ sub main printLog Chr(13) + "--------- Options - Tools Impress - ----------" ' Special Tests - Call tToolsOptionsMeasurementUnit ("Presentation") + Call tToolsOptionsMeasurementUnit ("IMPRESS") Call tiAlwaysWithCurrentPage ' More common tests - Call tToolsOptionsDrawGeneral ("Presentation") - Call tToolsOptionsDrawView ("Presentation") - Call tToolsOptionsDrawGrid ("Presentation") - Call tToolsOptionsDrawPrint ("Presentation") + Call tToolsOptionsDrawGeneral ("IMPRESS") + Call tToolsOptionsDrawView ("IMPRESS") + Call tToolsOptionsDrawGrid ("IMPRESS") + Call tToolsOptionsDrawPrint ("IMPRESS") Call hStatusOut end sub diff --git a/testautomation/graphics/required/includes/global/id_opt_2.inc b/testautomation/graphics/required/includes/global/id_opt_2.inc index 0e02fc83a6c9..32e4de03079d 100755 --- a/testautomation/graphics/required/includes/global/id_opt_2.inc +++ b/testautomation/graphics/required/includes/global/id_opt_2.inc @@ -97,8 +97,9 @@ testcase tToolsOptionsMeasurementUnit (sApplication as string) Dateiname.SetText "adagio" Dateityp.Select "BMP - Windows Bitmap (.bmp)" if AutomatischeDateinamenserweiterung.Exists then - QAErrorLog "OBSOLETE: Automatic file extension check-box in file dialog will be removed soon!" AutomatischeDateinamenserweiterung.Check + else + warnlog( "Automatic Filename Extension checkbox is mising" ) endif Speichern.Click kontext "AlienWarning" diff --git a/testautomation/spreadsheet/required/includes/c_upd_datamenu.inc b/testautomation/spreadsheet/required/includes/c_upd_datamenu.inc index 80c4a26281e5..830140843bca 100755 --- a/testautomation/spreadsheet/required/includes/c_upd_datamenu.inc +++ b/testautomation/spreadsheet/required/includes/c_upd_datamenu.inc @@ -929,16 +929,23 @@ testcase tDataDataPilot '/// Close 'Data Field' dialog with 'Cancel' printlog " Close 'Data Field' dialog with 'Cancel'" Datenfeld.Cancel - sleep 1 + sleep 2 Kontext "Datenpilot" - '/// Select first item (Sum – 2000) in 'Data Fields' by 3 <TAB> - printlog " Select first item (Sum – 2000) in 'Data Fields' by 3 <TAB>" - Datenpilot.TypeKeys "<TAB><TAB><TAB>",TRUE - Sleep 1 + '/// Select second item (Sum – 2001) in 'Data Fields' by 4 <TAB> + printlog " Select second item (Sum – 2001) in 'Data Fields' by 4 <TAB>" + Datenpilot.TypeKeys "<TAB><TAB><TAB><TAB>",TRUE + Sleep 3 '/// Click on 'Options' button to open 'Data Filed' dialog printlog " Click on 'Options' button to open 'Data Filed' dialog" - Optionen.Click - sleep 1 + If Optionen.IsEnabled Then + Optionen.Click + else + warnlog "Option button is not enabled. Aborting" + Datenpilot.Cancel + Call hCloseDocument + goto endsub + end if + sleep 3 Kontext "DataFieldsFunctionDlg" '/// Click on 'More' button printlog " Click on 'More' button" diff --git a/testautomation/writer/optional/includes/option/wh_o_1.inc b/testautomation/writer/optional/includes/option/wh_o_1.inc index dfcbea50e427..f95607e47a7f 100755 --- a/testautomation/writer/optional/includes/option/wh_o_1.inc +++ b/testautomation/writer/optional/includes/option/wh_o_1.inc @@ -61,7 +61,7 @@ testcase tToolsOptionsHTMLContent printlog ("'/// - save states ///") ToolsOptions - Call hToolsOptions ("HTMLDocument","View") + Call hToolsOptions ("HTML","View") irgendwas(1) = GrafikenUndObjekte.IsChecked irgendwas(2) = Tabellen.IsChecked @@ -90,7 +90,7 @@ testcase tToolsOptionsHTMLContent printlog ("'/// - checking states ///") ToolsOptions - Call hToolsOptions ( "HTMLDocument","View" ) + Call hToolsOptions ( "HTML","View" ) if ( irgendwas(1) = GrafikenUndObjekte.IsChecked ) Then WarnLog "GrafikenUndObjekte state changed" if ( irgendwas(2) = Tabellen.IsChecked ) Then WarnLog "Tabellen state changed" @@ -113,7 +113,7 @@ testcase tToolsOptionsHTMLContent printlog ("'/// - check if all UnChecked ///") ToolsOptions - hToolsOptions ( "HTMLDocument","View" ) + hToolsOptions ( "HTML","View" ) if GrafikenUndObjekte.IsChecked Then WarnLog "GrafikenUndObjekte x" if Tabellen.IsChecked Then WarnLog "Tabellen x" @@ -133,7 +133,7 @@ testcase tToolsOptionsHTMLContent printlog ("'/// - check if all Checked ///") ToolsOptions - Call hToolsOptions ( "HTMLDocument","View" ) + Call hToolsOptions ( "HTML","View" ) if true <> GrafikenUndObjekte.IsChecked Then WarnLog "GrafikenUndObjekte o" if True <> Tabellen.IsChecked Then WarnLog "Tabellen o" @@ -167,7 +167,7 @@ testcase tToolsOptionsHTMLLayout printlog "'///- Tools/Options/Writer: View ///" ToolsOptions - Call hToolsOptions ( "HTMLDocument" , "VIEW" ) '*TabLayoutHTML/ (1) + Call hToolsOptions ( "HTML" , "VIEW" ) '*TabLayoutHTML/ (1) irgendwas(1) = Hilfslinien.IsChecked irgendwas(2) = FarbigeHandles.IsChecked @@ -220,7 +220,7 @@ testcase tToolsOptionsHTMLLayout printlog ("'/// - checking states ///" ) ToolsOptions - Call hToolsOptions ( "HTMLDocument" , "VIEW" ) '*TabLayoutHTML/ (1) + Call hToolsOptions ( "HTML" , "VIEW" ) '*TabLayoutHTML/ (1) if ( irgendwas(1) = Hilfslinien.IsChecked ) Then WarnLog "Hilfslinien state changed" if ( irgendwas(2) = FarbigeHandles.IsChecked ) Then WarnLog "FarbigeHandles state changed" @@ -271,7 +271,7 @@ testcase tToolsOptionsHTMLLayout printlog ("'/// - check if all UnChecked ///") ToolsOptions - Call hToolsOptions ( "HTMLDocument" , "VIEW" ) '*TabLayoutHTML/ (1) + Call hToolsOptions ( "HTML" , "VIEW" ) '*TabLayoutHTML/ (1) if Hilfslinien.IsChecked Then WarnLog "Hilfslinien x" if FarbigeHandles.IsChecked Then WarnLog "FarbigeHandles x" if GrosseHandles.IsChecked Then WarnLog "GrosseHandles x" @@ -316,7 +316,7 @@ testcase tToolsOptionsHTMLLayout printlog ("'/// - check if all Checked ///") ToolsOptions - Call hToolsOptions ( "HTMLDocument" , "VIEW" ) '*TabLayoutHTML/ (1) + Call hToolsOptions ( "HTML" , "VIEW" ) '*TabLayoutHTML/ (1) if True <> Hilfslinien.IsChecked Then WarnLog "Hilfslinien o" if True <> FarbigeHandles.IsChecked Then WarnLog "FarbigeHandles o" if True <> GrosseHandles.IsChecked Then WarnLog "GrosseHandles o" @@ -361,7 +361,7 @@ testcase tToolsOptionsHTMLLayout ' see everything ToolsOptions - Call hToolsOptions ( "HTMLDocument" , "VIEW" ) + Call hToolsOptions ( "HTML" , "VIEW" ) '///' Hilfslinien.Check only, when graphic's in motion! ///' FarbigeHandles.Check @@ -370,7 +370,7 @@ testcase tToolsOptionsHTMLLayout ExtrasOptionenDlg.Ok ToolsOptions - Call hToolsOptions ( "HTMLDocument" , "VIEW" ) + Call hToolsOptions ( "HTML" , "VIEW" ) FarbigeHandles.UnCheck GrosseHandles.UnCheck Kontext "ExtrasOptionenDlg" @@ -379,7 +379,7 @@ testcase tToolsOptionsHTMLLayout Call hCloseDocument ToolsOptions - Call hToolsOptions ( "HTMLDocument" , "VIEW" ) + Call hToolsOptions ( "HTML" , "VIEW" ) if ( irgendwas(1) = TRUE ) Then Hilfslinien.Check Else Hilfslinien.UnCheck if ( irgendwas(2) = TRUE ) Then FarbigeHandles.Check Else FarbigeHandles.UnCheck @@ -418,7 +418,7 @@ testcase tToolsOptionsHTMLGrid printlog ("'/// - save states ///") ToolsOptions - Call hToolsOptions ( "HTMLDocument","Grid" ) + Call hToolsOptions ( "HTML","Grid" ) printlog ("'///TabRaster all UnCheck ! ///") @@ -465,7 +465,7 @@ testcase tToolsOptionsHTMLGrid printlog ("'/// - checking states ///") ToolsOptions - Call hToolsOptions ( "HTMLDocument","Grid" ) + Call hToolsOptions ( "HTML","Grid" ) if (irgendwas(1) = FangrasterBenutzen.IsChecked ) Then WarnLog "FangrasterBenutzen state changed BugID: 82944 " if (irgendwas(2) = RasterSichtbar.IsChecked ) Then WarnLog "RasterSichtbar state changed" @@ -480,7 +480,7 @@ testcase tToolsOptionsHTMLGrid printlog ("'/// - all UnCheck -> o ///") ToolsOptions - Call hToolsOptions ( "HTMLDocument","Grid" ) + Call hToolsOptions ( "HTML","Grid" ) FangrasterBenutzen.UnCheck RasterSichtbar.UnCheck @@ -512,7 +512,7 @@ testcase tToolsOptionsHTMLGrid printlog ("'/// - check if all UnChecked ///") ToolsOptions - Call hToolsOptions ( "HTMLDocument","Grid" ) + Call hToolsOptions ( "HTML","Grid" ) if FangrasterBenutzen.IsChecked Then WarnLog "FangrasterBenutzen x" if RasterSichtbar.IsChecked Then WarnLog "RasterSichtbar x" @@ -546,7 +546,7 @@ testcase tToolsOptionsHTMLGrid printlog ("'/// - check if all Checked ///") ToolsOptions - Call hToolsOptions ( "HTMLDocument","Grid" ) + Call hToolsOptions ( "HTML","Grid" ) if True <> FangrasterBenutzen.IsChecked Then WarnLog "FangrasterBenutzen o" if True <> RasterSichtbar.IsChecked Then WarnLog "RasterSichtbar o" @@ -594,7 +594,7 @@ testcase tToolsOptionsHTMLGrid ' change Grid Resolution ToolsOptions - Call hToolsOptions ( "HTMLDocument","Grid" ) + Call hToolsOptions ( "HTML","Grid" ) RasterAufloesungXAchse.SetText("2") RasterAufloesungYAchse.SetText("3") RasterUnterteilungXAchse.SetText("2") @@ -634,7 +634,7 @@ testcase tToolsOptionsHTMLGrid printlog ("'/// - restore states ///") ToolsOptions - Call hToolsOptions ( "HTMLDocument","Grid" ) + Call hToolsOptions ( "HTML","Grid" ) if ( irgendwas(1) = TRUE ) Then FangrasterBenutzen.Check Else FangrasterBenutzen.UnCheck if ( irgendwas(2) = TRUE ) Then RasterSichtbar.Check Else RasterSichtbar.UnCheck diff --git a/testautomation/writer/optional/includes/option/wh_o_2.inc b/testautomation/writer/optional/includes/option/wh_o_2.inc index 6175f1ed260a..1ee7f659a43f 100755 --- a/testautomation/writer/optional/includes/option/wh_o_2.inc +++ b/testautomation/writer/optional/includes/option/wh_o_2.inc @@ -82,7 +82,7 @@ testcase tToolsOptionsHTMLPrint printlog ("'/// - save states ///") ToolsOptions - Call hToolsOptions ("HtmlDocument","PRINT") + Call hToolsOptions ("HTML","PRINT") irgendwas(1) = Grafiken.IsChecked irgendwas(2) = Tabellen.IsChecked @@ -139,7 +139,7 @@ testcase tToolsOptionsHTMLPrint printlog ("'/// - checking states ///") ToolsOptions - Call hToolsOptions ( "HtmlDocument" , "PRINT" ) + Call hToolsOptions ( "HTML" , "PRINT" ) if ( irgendwas(1) = Grafiken.IsChecked ) Then WarnLog "'Graphics' state changed" if ( irgendwas(2) = Tabellen.IsChecked ) Then WarnLog "'Tables' state changed" @@ -188,7 +188,7 @@ testcase tToolsOptionsHTMLPrint printlog ("'/// - check if all UnChecked ///") ToolsOptions - Call hToolsOptions ( "HtmlDocument" , "PRINT" ) + Call hToolsOptions ( "HTML" , "PRINT" ) if Grafiken.IsChecked Then WarnLog "'Graphics' x" if Tabellen.IsChecked Then WarnLog "'Tables' x" @@ -207,7 +207,7 @@ testcase tToolsOptionsHTMLPrint ExtrasOptionenDlg.OK Call hFileOpen(gOfficepath + "user\work\printtest.html") ToolsOptions - Call hToolsOptions ( "HtmlDocument" , "PRINT" ) + Call hToolsOptions ( "HTML" , "PRINT" ) if ( bTempRadioBut(1) <> Keine.IsChecked ) Then WarnLog "'None' state changed" if ( bTempRadioBut(2) <> NurNotizen.IsChecked ) Then WarnLog "'Notes only' state changed" @@ -244,7 +244,7 @@ testcase tToolsOptionsHTMLPrint printlog ("'/// - check if all Checked ///") ToolsOptions - Call hToolsOptions ( "HtmlDocument" , "PRINT" ) + Call hToolsOptions ( "HTML" , "PRINT" ) if not Grafiken.IsChecked Then WarnLog "'Graphics' o" if not Tabellen.IsChecked Then WarnLog "'Tables' o" @@ -270,7 +270,7 @@ testcase tToolsOptionsHTMLPrint printlog ("'/// - restore states ///") ToolsOptions - Call hToolsOptions ( "HtmlDocument" , "PRINT" ) + Call hToolsOptions ( "HTML" , "PRINT" ) if ( irgendwas(1) = TRUE ) Then Grafiken.Check Else Grafiken.UnCheck if ( irgendwas(2) = TRUE ) Then Tabellen.Check Else Tabellen.UnCheck @@ -335,7 +335,7 @@ testcase tToolsOptionsHTMLTable printlog ("'/// - save states ///") ToolsOptions - Call hToolsOptions ("HtmlDocument","Table") + Call hToolsOptions ("HTML","Table") sMetricField(1) = VerschiebenZeile.GetText sMetricField(2) = VerschiebenSpalte.GetText @@ -378,7 +378,7 @@ testcase tToolsOptionsHTMLTable printlog ("'/// - checking states ///") ToolsOptions - Call hToolsOptions ( "HtmlDocument" , "Table" ) + Call hToolsOptions ( "HTML" , "Table" ) if ( VerschiebenZeile.GetText <> sTempMetricField(1) ) Then WarnLog "Move cells: 'Rows' state changed BugID: 82990 " if ( VerschiebenSpalte.GetText <> sTempMetricField(2) ) Then WarnLog "Move cells: 'Column' state changed" @@ -394,7 +394,7 @@ testcase tToolsOptionsHTMLTable printlog ("'/// - all UnCheck -> o ///") ToolsOptions - Call hToolsOptions ( "HtmlDocument" , "Table" ) + Call hToolsOptions ( "HTML" , "Table" ) VerschiebenZeile.ToMin VerschiebenSpalte.ToMin @@ -429,7 +429,7 @@ testcase tToolsOptionsHTMLTable printlog ("'/// - check if all UnChecked ///") ToolsOptions - Call hToolsOptions ( "HtmlDocument" , "Table" ) + Call hToolsOptions ( "HTML" , "Table" ) if ( VerschiebenZeile.GetText <> sTempMetricField(1) ) Then WarnLog "Move Cells : 'Row' is not min." if ( VerschiebenSpalte.GetText <> sTempMetricField(2) ) Then WarnLog "Move Cells : 'Column' is not min." @@ -475,7 +475,7 @@ testcase tToolsOptionsHTMLTable printlog ("'/// - check if all Checked ///") ToolsOptions - Call hToolsOptions ( "HtmlDocument" , "Table" ) + Call hToolsOptions ( "HTML" , "Table" ) if ( VerschiebenZeile.GetText <> sTempMetricField(1) ) Then WarnLog "Move Cells : 'Row' is not max." if ( VerschiebenSpalte.GetText <> sTempMetricField(2) ) Then WarnLog "Move Cells : 'Column' is not min." diff --git a/testautomation/writer/optional/includes/option/wh_o_3.inc b/testautomation/writer/optional/includes/option/wh_o_3.inc index 347ecae76895..099ff82aa7e6 100755 --- a/testautomation/writer/optional/includes/option/wh_o_3.inc +++ b/testautomation/writer/optional/includes/option/wh_o_3.inc @@ -73,7 +73,7 @@ testcase tToolsOptionsHTMLInsert printlog ("'/// - save states ///") ToolsOptions - hToolsOptions ("HtmlDocument","Table") + hToolsOptions ("HTML","Table") irgendwas(2) = Ueberschrift.IsChecked irgendwas(3) = Wiederholen.IsChecked @@ -104,7 +104,7 @@ testcase tToolsOptionsHTMLInsert printlog ("'/// - checking states ///") ToolsOptions - hToolsOptions ( "HtmlDocument" , "Table" ) + hToolsOptions ( "HTML" , "Table" ) ' If ( irgendwas(2) = Ueberschrift.IsChecked ) Then WarnLog "Ueberschrift state changed" If ( Ueberschrift.IsChecked = False ) Then WarnLog "Ueberschrift state changed" @@ -121,7 +121,7 @@ testcase tToolsOptionsHTMLInsert printlog ("'/// - all UnCheck -> o ///") ToolsOptions - hToolsOptions ( "HtmlDocument" , "Table" ) + hToolsOptions ( "HTML" , "Table" ) Ueberschrift.UnCheck ' Wiederholen.UnCheck @@ -184,7 +184,7 @@ testcase tToolsOptionsHTMLInsert DocumentWriter.typekeys ("a") ToolsOptions - hToolsOptions ( "HtmlDocument" , "Table" ) + hToolsOptions ( "HTML" , "Table" ) If Ueberschrift.IsChecked Then WarnLog "Ueberschrift x" ' If Wiederholen.IsChecked Then WarnLog "Wiederholen x" @@ -245,7 +245,7 @@ testcase tToolsOptionsHTMLInsert DocumentWriter.typekeys ("a") ToolsOptions - hToolsOptions ( "HtmlDocument" , "Table" ) + hToolsOptions ( "HTML" , "Table" ) If ( Ueberschrift.IsChecked = FALSE ) Then WarnLog "Ueberschrift o" If ( Wiederholen.IsChecked = FALSE ) Then WarnLog "Wiederholen o" @@ -297,7 +297,7 @@ testcase tToolsOptionsHTMLCursor printlog ("'/// - save states ///") ToolsOptions - hToolsOptions ("HtmlDocument","FORMATTINGAIDS") + hToolsOptions ("HTML","FORMATTINGAIDS") irgendwas(10) = Absatzenden.IsChecked irgendwas(11) = WeicheTrenner.IsChecked @@ -322,7 +322,7 @@ testcase tToolsOptionsHTMLCursor printlog ("'/// - checking states ///") ToolsOptions - hToolsOptions ( "HtmlDocument" , "FORMATTINGAIDS" ) + hToolsOptions ( "HTML" , "FORMATTINGAIDS" ) If ( irgendwas(10) = Absatzenden.IsChecked ) Then WarnLog "Absatzenden state changed" If ( irgendwas(11) = WeicheTrenner.IsChecked ) Then WarnLog "WeicheTrenner state changed" @@ -335,7 +335,7 @@ testcase tToolsOptionsHTMLCursor printlog ("'/// - all UnCheck -> o ///") ToolsOptions - hToolsOptions ( "HtmlDocument" , "FORMATTINGAIDS" ) + hToolsOptions ( "HTML" , "FORMATTINGAIDS" ) Absatzenden.UnCheck WeicheTrenner.UnCheck @@ -348,7 +348,7 @@ testcase tToolsOptionsHTMLCursor printlog ("'/// - check if all UnChecked ///") ToolsOptions - hToolsOptions ( "HtmlDocument" , "FORMATTINGAIDS" ) + hToolsOptions ( "HTML" , "FORMATTINGAIDS" ) If Absatzenden.IsChecked Then WarnLog "Absatzenden x" If WeicheTrenner.IsChecked Then WarnLog "WeicheTrenner x" @@ -369,7 +369,7 @@ testcase tToolsOptionsHTMLCursor printlog ("'/// - check if all Checked ///") ToolsOptions - hToolsOptions ( "HtmlDocument" , "FORMATTINGAIDS" ) + hToolsOptions ( "HTML" , "FORMATTINGAIDS" ) If True <> Absatzenden.IsChecked Then WarnLog "Absatzenden o BugID: 82942 OS" If True <> WeicheTrenner.IsChecked Then WarnLog "WeicheTrenner o" diff --git a/testautomation/writer/optional/includes/option/wr_o_2.inc b/testautomation/writer/optional/includes/option/wr_o_2.inc index 7edb8fedb463..7284c7f20ce9 100755 --- a/testautomation/writer/optional/includes/option/wr_o_2.inc +++ b/testautomation/writer/optional/includes/option/wr_o_2.inc @@ -965,7 +965,7 @@ testcase tToolsOptionsWriterTable1 Call hNewDocument printlog ("'///- Tools/Options/HTML: Table ///") ToolsOptions - Call hToolsOptions ("HTMLDOCUMENT","Table") + Call hToolsOptions ("HTML","Table") '/// Check fixed and choose 'OK' /// VerhaltenFix.Check @@ -975,7 +975,7 @@ testcase tToolsOptionsWriterTable1 '/// /// ToolsOptions - Call hToolsOptions ("HTMLDOCUMENT","Table") + Call hToolsOptions ("HTML","Table") '/// Reset radiobutton to 'Variable' in Options /// Variabel.Check diff --git a/testautomation/writer/optional/w_CJKCTLDependency.bas b/testautomation/writer/optional/w_CJKCTLDependency.bas index 46530ac84a46..abfb624fa28c 100644 --- a/testautomation/writer/optional/w_CJKCTLDependency.bas +++ b/testautomation/writer/optional/w_CJKCTLDependency.bas @@ -70,7 +70,7 @@ sub main Call tCTLDependency_4 Call tCTLKashidaCheck - gApplication = "HTMLDOKUMENT" + gApplication = "HTML" Call tCTLDependency_5 Call tCTLDependency_6 Call tCTLDependency_7 diff --git a/testautomation/writer/optional/ww_opt.bas b/testautomation/writer/optional/ww_opt.bas index c4fc9834b298..baebb12f80c6 100755 --- a/testautomation/writer/optional/ww_opt.bas +++ b/testautomation/writer/optional/ww_opt.bas @@ -72,5 +72,5 @@ sub LoadIncludeFiles use "global\system\includes\master.inc" use "global\system\includes\gvariabl.inc" Call GetUseFiles - gApplication = "HTMLDOKUMENT" + gApplication = "HTML" end sub diff --git a/testautomation/writer/required/includes/w_001_.inc b/testautomation/writer/required/includes/w_001_.inc index 79b56b58cf6c..5f6662b36cee 100755 --- a/testautomation/writer/required/includes/w_001_.inc +++ b/testautomation/writer/required/includes/w_001_.inc @@ -55,188 +55,180 @@ sub w_001_ Call tFileReload Call tFileVersions - if gApplication <> "HTML" then - Call tToolsXMLFilterSettings - end if - Call tFileExportAsPDF - Call tExportAsPDFButton - Call tFileSendCreateMasterDocument - Call tFileSendCreateHTMLDocument - Call tFileSendOutlineToPresentation - Call tFileSendOutlineToClipboard - Call tFileSendCreateAutoabstract - Call tFileSendAutoabstractToPresentation - - 'Writer Master Document - gApplication = "MASTERDOCUMENT" - Call tMasterDocFileSaveWithPassword - Call tMasterDocFileReload - Call tMasterDocFileVersions - Call tMasterDocFileSendCreateHTMLDocument - Call tMasterDocFileSendOutlineToPresentation - Call tMasterDocFileSendOutlineToClipboard - Call tMasterDocFileSendCreateAutoabstract - Call tMasterDocFileSendAutoabstractToPresentation - gApplication = "WRITER" - end sub '----------------------------------------------------------- testcase tFileNewLabels - Dim i as integer - Dim x as integer - Dim y as integer + + Dim iSheetFormat as integer + Dim iBrandIndex as integer + Dim iType as integer Dim sTypes as integer Dim vTypes as integer - PrintLog "- File / New / Labels" - if gApplication <> "WRITER" then - printlog "Not in : " + gApplication - goto endsub - end if - PrintLog "Open Labels-dialog with File / New / Labels" - if hCreateLabels = False then goto endsub - Sleep() - Call DialogTest (TabEtiketten) - PrintLog "Switch to Tabpage 'Labels'" - Sleep() - PrintLog "Check number of brands and types (see #i44801# for details)" - For i = 1 to 2 - Select Case i - Case 1 - Endlos.Check - printlog "Continous is checked" - Case 2 - Bogen.Check - printlog "Sheet is checked" - end select - PrintLog "There should be 10 brands in list" - For x = 1 to Marke.GetItemCount - Marke.Select x - printlog "- Brand: " & Marke.GetSelText - sTypes = Typ.GetItemCount - Select Case x - Case 1: - PrintLog "Avery/A4 should have 295 types in list if 'Sheet' is checked" - PrintLog "Avery/A4 should have 1 type in list if 'Continous' is checked" - if i = 1 then vTypes = 1 else vTypes = 295 - Case 2: - PrintLog "Avery A4/Asia should have 88 types in list if 'Sheet' is checked" - PrintLog "Avery A4/Asia should have 1 type in list if 'Continous' is checked" - if i = 1 then vTypes = 1 else vTypes = 88 - Case 3: - PrintLog "Avery Lettersize should have 251 types in list if 'Sheet' is checked" - PrintLog "Avery Lettersize should have 45 types in list if 'Continous' is checked" - if i = 1 then vTypes = 45 else vTypes = 251 - Case 4: - PrintLog "Avery Zweckform should have 333 types in list if 'Sheet' is checked" - PrintLog "Avery Zweckform should have 67 types in list if 'Continous' is checked" - if i = 1 then vTypes = 67 else vTypes = 333 - Case 5: - PrintLog "Herlitz should have 26 types in list if 'Sheet' is checked" - PrintLog "Herlitz should have 6 types in list if 'Continous' is checked" - if i = 1 then vTypes = 6 else vTypes = 26 - Case 6: - PrintLog "Herma A4 should have 491 types in list if 'Sheet' is checked" - PrintLog "Herma A4 should have 1 type in list if 'Continous' is checked" - if i = 1 then vTypes = 1 else vTypes = 491 - Case 7: - PrintLog "Herma A5 should have 18 types in list if 'Sheet' is checked" - PrintLog "Herma A5 should have 1 type in list if 'Continous' is checked" - if i = 1 then vTypes = 1 else vTypes = 18 - Case 8: - PrintLog "Herma endlos should have 1 type in list if 'Sheet' is checked" - PrintLog "Herma endlos should have 119 types in list if 'Continous' is checked" - if i = 1 then vTypes = 119 else vTypes = 1 - Case 9: - PrintLog "Leitz should have 13 types in list if 'Sheet' is checked" - PrintLog "Leitz should have 1 type in list if 'Continous' is checked" - if i = 1 then vTypes = 1 else vTypes = 13 - Case 10: - PrintLog "Sigel should have 20 types in list if 'Sheet' is checked" - PrintLog "Sigel should have 1 type in list if 'Continous' is checked" - if i = 1 then vTypes = 1 else vTypes = 20 - Case else: Warnlog "- There are more than 10 brands in list" + if ( hCreateLabels ) then + + Call DialogTest( TabEtiketten ) + + PrintLog "Switch to Tabpage 'Labels'" + PrintLog "Check number of brands and types (see #i44801# for details)" + + For iSheetFormat = 1 to 2 + + Select Case( iSheetFormat ) + Case 1 + Endlos.Check + printlog "Continous is checked" + Case 2 + Bogen.Check + printlog "Sheet is checked" end select - if sTypes <> vTypes then Warnlog "- Not " & sTypes & " types in list but " & vTypes - For y = 1 to Typ.GetItemCount - Typ.Select y - printlog "- Type: " & Typ.GetSelText - next y - next x - next i - Sleep() - - PrintLog "Switch to Tabpage 'Format'" - Kontext - active.SetPage TabFormatEtiketten - - wait 250 - Kontext "TabFormatEtiketten" - Call DialogTest (TabFormatEtiketten) - wait 250 + + PrintLog "There should be 10 brands in list" + For iBrandIndex = 1 to Marke.GetItemCount + + Marke.Select iBrandIndex + printlog "- Brand: " & Marke.GetSelText + sTypes = Typ.GetItemCount + + Select Case iBrandIndex + Case 1: + PrintLog "Avery/A4 should have 295 types in list if 'Sheet' is checked" + PrintLog "Avery/A4 should have 1 type in list if 'Continous' is checked" + if ( iSheetFormat = 1 ) then vTypes = 1 else vTypes = 295 + Case 2: + PrintLog "Avery A4/Asia should have 88 types in list if 'Sheet' is checked" + PrintLog "Avery A4/Asia should have 1 type in list if 'Continous' is checked" + if ( iSheetFormat = 1 ) then vTypes = 1 else vTypes = 88 + Case 3: + PrintLog "Avery Lettersize should have 251 types in list if 'Sheet' is checked" + PrintLog "Avery Lettersize should have 45 types in list if 'Continous' is checked" + if ( iSheetFormat = 1 ) then vTypes = 45 else vTypes = 251 + Case 4: + PrintLog "Avery Zweckform should have 333 types in list if 'Sheet' is checked" + PrintLog "Avery Zweckform should have 67 types in list if 'Continous' is checked" + if ( iSheetFormat = 1 ) then vTypes = 67 else vTypes = 333 + Case 5: + PrintLog "Herlitz should have 26 types in list if 'Sheet' is checked" + PrintLog "Herlitz should have 6 types in list if 'Continous' is checked" + if ( iSheetFormat = 1 ) then vTypes = 6 else vTypes = 26 + Case 6: + PrintLog "Herma A4 should have 491 types in list if 'Sheet' is checked" + PrintLog "Herma A4 should have 1 type in list if 'Continous' is checked" + if ( iSheetFormat = 1 ) then vTypes = 1 else vTypes = 491 + Case 7: + PrintLog "Herma A5 should have 18 types in list if 'Sheet' is checked" + PrintLog "Herma A5 should have 1 type in list if 'Continous' is checked" + if ( iSheetFormat = 1 ) then vTypes = 1 else vTypes = 18 + Case 8: + PrintLog "Herma endlos should have 1 type in list if 'Sheet' is checked" + PrintLog "Herma endlos should have 119 types in list if 'Continous' is checked" + if ( iSheetFormat = 1 ) then vTypes = 119 else vTypes = 1 + Case 9: + PrintLog "Leitz should have 13 types in list if 'Sheet' is checked" + PrintLog "Leitz should have 1 type in list if 'Continous' is checked" + if ( iSheetFormat = 1 ) then vTypes = 1 else vTypes = 13 + Case 10: + PrintLog "Sigel should have 20 types in list if 'Sheet' is checked" + PrintLog "Sigel should have 1 type in list if 'Continous' is checked" + if ( iSheetFormat = 1 ) then vTypes = 1 else vTypes = 20 + Case else: + Warnlog "- There are more than 10 brands in list" + end select + if sTypes <> vTypes then Warnlog "- Not " & sTypes & " types in list but " & vTypes + + For iType = 1 to Typ.GetItemCount + Typ.Select iType + printlog "- Type: " & Typ.GetSelText + next iType + next iBrandIndex + next iSheetFormat + + PrintLog "Switch to Tabpage 'Format'" + Kontext + active.SetPage TabFormatEtiketten + wait( 100 ) + + Kontext "TabFormatEtiketten" + Call DialogTest (TabFormatEtiketten) + + PrintLog "Click 'Save'" + FormatSpeichern.Click + + Kontext "SaveLabelFormat" + if ( SaveLabelFormat.exists( 1 ) ) then + + Call DialogTest (SaveLabelFormat) + + PrintLog "Close dialog 'Save Label Format'" + SaveLabelFormat.Cancel + else + warnlog( "Dialog <SaveLabelFormat> is not available" ) + endif + + Kontext "TabFormatEtiketten" + + PrintLog "Switch to Tabpage 'Options'" + Kontext + active.SetPage TabDruckerEtiketten + + Kontext "TabDruckerEtiketten" + if ( TabDruckerEtiketten.exists( 1 ) ) then + Call DialogTest (TabDruckerEtiketten) - PrintLog "Click 'Save'" - FormatSpeichern.Click + if ( gPlatgroup = "w95" or gPlatgroup = "wnt" ) then - PrintLog "Close dialog 'Save Label Format'" - Kontext "SaveLabelFormat" - Call DialogTest (SaveLabelFormat) - SaveLabelFormat.Cancel - Kontext "TabFormatEtiketten" - Sleep() + PrintLog "Click printer setup for Windows" + Einrichten.Click - PrintLog "Switch to Tabpage 'Options'" - Kontext - active.SetPage TabDruckerEtiketten - wait 250 - Kontext "TabDruckerEtiketten" - Call DialogTest (TabDruckerEtiketten) + PrintLog "Close printer-setup dialog" + Kontext "DruckerEinrichten" + if DruckerEinrichten.Exists( 2 ) then + DruckerEinrichten.Cancel + else + Warnlog "No Default Printer defined for the system, set one!" + endif + else + printlog( "No printer setup for UNIX like OS" ) + endif - PrintLog "Click pushbutton 'Setup'" - if gPlatgroup = "w95" or gPlatgroup = "wnt" then - Einrichten.Click + PrintLog "Check checkbox 'Synchronize contents'" + Kontext "TabDruckerEtiketten" + InhaltSynchronisieren.Check() + + PrintLog "Click 'New document'" + NeuesDok.Click() - PrintLog "Close printer-setup dialog" - Kontext "DruckerEinrichten" - if DruckerEinrichten.Exists( 2 ) then - DruckerEinrichten.Cancel + printlog( "JSK: Unknown messagebox handled silently before refactoring" ) + Kontext "Active" + if ( Active.Exists( 1 ) ) then + warnlog( "Unexpected Messagebox: " & Active.getText() + try + printlog( "Click <ok>" ) + Active.Ok + catch + Warnlog "Once Document has been opened, office asks to save it! BugID 89702" + Active.Cancel + endcatch + endif + + PrintLog "Check if dialog 'Synchronize Labels' is up" + Kontext "EtikettenSynchronisieren" + if ( EtikettenSynchronisieren.Exists( 2 ) ) then + Call DialogTest ( EtikettenSynchronisieren ) + Synchronisieren.Click + WaitSlot() + else + Warnlog " Dialog to synchronize labels not up!" + endif else - Warnlog "No Default Printer!" - end if - Kontext "TabDruckerEtiketten" - end if - - Sleep() - PrintLog "Check checkbox 'Synchronize contents'" - InhaltSynchronisieren.Check - wait 250 - PrintLog "Click 'New document'" - NeuesDok.Click - Sleep() - - Kontext "Active" - if Active.Exists then - try - Active.Ok - catch - Active.Cancel - Warnlog "Once Document has been opened, office asks to save it! BugID 89702" - endcatch - end if - - wait 250 - PrintLog "Check if dialog 'Synchronize Labels' is up" - Kontext "EtikettenSynchronisieren" - if EtikettenSynchronisieren.Exists then - Call DialogTest ( EtikettenSynchronisieren ) - Synchronisieren.Click - Sleep() + warnlog( "Tabpage <TabDruckerEtiketten> is not available" ) + endif else - Warnlog " Dialog to synchronize labels not up!" - end if + warnlog( "hCreateLabels() failed" ) + endif PrintLog "Close active document" Call hCloseDocument @@ -245,285 +237,321 @@ endcase '----------------------------------------------------------- testcase tFileNewBusinessCards - Dim i as integer - Dim x as integer - Dim y as integer + + Dim iFormat as integer + Dim iBrand as integer + Dim iType as integer + Dim iWait as integer Dim sTypes as integer Dim vTypes as integer - Printlog "- File / New / Business Cards" - if gApplication <> "WRITER" then - printlog "Not in : " + gApplication - goto endsub - end if - PrintLog "Open Business Cards dialog with File / New / Business Cards" - if hCreateBusinessCards = False then goto endsub - PrintLog "Switch to Tabpage 'Medium'" - Kontext - Active.Setpage TabEtikettenMedium - Kontext "TabEtikettenMedium" - Call DialogTest (TabEtikettenMedium) - Sleep() - PrintLog "Check number of brands and types (see #i44801# for details)" - For i = 1 to 2 - Select Case i - Case 1 - Endlos.Check - printlog "Continous is checked" - Case 2 - Bogen.Check - printlog "Sheet is checked" - end select - PrintLog "There should be 10 brands in list" - For x = 1 to Marke.GetItemCount - Marke.Select x - printlog "- Brand: " & Marke.GetSelText - sTypes = Typ.GetItemCount - Select Case x - Case 1: - PrintLog "Avery/A4 should have 295 types in list if 'Sheet' is checked" - PrintLog "Avery/A4 should have 1 type in list if 'Continous' is checked" - if i = 1 then vTypes = 1 else vTypes = 295 - Case 2: - PrintLog "Avery A4/Asia should have 88 types in list if 'Sheet' is checked" - PrintLog "Avery A4/Asia should have 1 type in list if 'Continous' is checked" - if i = 1 then vTypes = 1 else vTypes = 88 - Case 3: - PrintLog "Avery Lettersize should have 251 types in list if 'Sheet' is checked" - PrintLog "Avery Lettersize should have 45 types in list if 'Continous' is checked" - if i = 1 then vTypes = 45 else vTypes = 251 - Case 4: - PrintLog "Avery Zweckform should have 333 types in list if 'Sheet' is checked" - PrintLog "Avery Zweckform should have 67 types in list if 'Continous' is checked" - if i = 1 then vTypes = 67 else vTypes = 333 - Case 5: - PrintLog "Herlitz should have 26 types in list if 'Sheet' is checked" - PrintLog "Herlitz should have 6 types in list if 'Continous' is checked" - if i = 1 then vTypes = 6 else vTypes = 26 - Case 6: - PrintLog "Herma A4 should have 491 types in list if 'Sheet' is checked" - PrintLog "Herma A4 should have 1 type in list if 'Continous' is checked" - if i = 1 then vTypes = 1 else vTypes = 491 - Case 7: - PrintLog "Herma A5 should have 18 types in list if 'Sheet' is checked" - PrintLog "Herma A5 should have 1 type in list if 'Continous' is checked" - if i = 1 then vTypes = 1 else vTypes = 18 - Case 8: - PrintLog "Herma endlos should have 1 type in list if 'Sheet' is checked" - PrintLog "Herma endlos should have 119 types in list if 'Continous' is checked" - if i = 1 then vTypes = 119 else vTypes = 1 - Case 9: - PrintLog "Leitz should have 13 types in list if 'Sheet' is checked" - PrintLog "Leitz should have 1 type in list if 'Continous' is checked" - if i = 1 then vTypes = 1 else vTypes = 13 - Case 10: - PrintLog "Sigel should have 20 types in list if 'Sheet' is checked" - PrintLog "Sigel should have 1 type in list if 'Continous' is checked" - if i = 1 then vTypes = 1 else vTypes = 20 - Case else: Warnlog "- There are more than 10 brands in list" - end select - if sTypes <> vTypes then Warnlog "- Not " & sTypes & " types in list but " & vTypes - For y = 1 to Typ.GetItemCount - Typ.Select y - printlog "- Type: " & Typ.GetSelText - next y - next x - next i - Sleep() - PrintLog "Switch to Tabpage 'Business Cards'" - Kontext - Active.Setpage TabVisitenkarten - Sleep() + if ( hCreateBusinessCards ) then + + PrintLog "Switch to Tabpage 'Medium'" + Kontext + Active.Setpage TabEtikettenMedium + + Kontext "TabEtikettenMedium" + if ( TabEtikettenMedium.exists( 1 ) ) then + Call DialogTest (TabEtikettenMedium) + + PrintLog "Check number of brands and types (see #i44801# for details)" + For iFormat = 1 to 2 + Select Case iFormat + Case 1 + Endlos.Check + printlog "Continous is checked" + Case 2 + Bogen.Check + printlog "Sheet is checked" + end select + + PrintLog "There should be 10 brands in list" + For iBrand = 1 to Marke.GetItemCount + Marke.Select iBrand + printlog "- Brand: " & Marke.GetSelText + sTypes = Typ.GetItemCount + Select Case iBrand + Case 1: + PrintLog "Avery/A4 should have 295 types in list if 'Sheet' is checked" + PrintLog "Avery/A4 should have 1 type in list if 'Continous' is checked" + if ( iFormat = 1 ) then vTypes = 1 else vTypes = 295 + Case 2: + PrintLog "Avery A4/Asia should have 88 types in list if 'Sheet' is checked" + PrintLog "Avery A4/Asia should have 1 type in list if 'Continous' is checked" + if ( iFormat = 1 ) then vTypes = 1 else vTypes = 88 + Case 3: + PrintLog "Avery Lettersize should have 251 types in list if 'Sheet' is checked" + PrintLog "Avery Lettersize should have 45 types in list if 'Continous' is checked" + if ( iFormat = 1 ) then vTypes = 45 else vTypes = 251 + Case 4: + PrintLog "Avery Zweckform should have 333 types in list if 'Sheet' is checked" + PrintLog "Avery Zweckform should have 67 types in list if 'Continous' is checked" + if ( iFormat = 1 ) then vTypes = 67 else vTypes = 333 + Case 5: + PrintLog "Herlitz should have 26 types in list if 'Sheet' is checked" + PrintLog "Herlitz should have 6 types in list if 'Continous' is checked" + if ( iFormat = 1 ) then vTypes = 6 else vTypes = 26 + Case 6: + PrintLog "Herma A4 should have 491 types in list if 'Sheet' is checked" + PrintLog "Herma A4 should have 1 type in list if 'Continous' is checked" + if ( iFormat = 1 ) then vTypes = 1 else vTypes = 491 + Case 7: + PrintLog "Herma A5 should have 18 types in list if 'Sheet' is checked" + PrintLog "Herma A5 should have 1 type in list if 'Continous' is checked" + if ( iFormat = 1 ) then vTypes = 1 else vTypes = 18 + Case 8: + PrintLog "Herma endlos should have 1 type in list if 'Sheet' is checked" + PrintLog "Herma endlos should have 119 types in list if 'Continous' is checked" + if ( iFormat = 1 ) then vTypes = 119 else vTypes = 1 + Case 9: + PrintLog "Leitz should have 13 types in list if 'Sheet' is checked" + PrintLog "Leitz should have 1 type in list if 'Continous' is checked" + if ( iFormat = 1 ) then vTypes = 1 else vTypes = 13 + Case 10: + PrintLog "Sigel should have 20 types in list if 'Sheet' is checked" + PrintLog "Sigel should have 1 type in list if 'Continous' is checked" + if ( iFormat = 1 ) then vTypes = 1 else vTypes = 20 + Case else: + Warnlog "- There are more than 10 brands in list" + end select + + if sTypes <> vTypes then Warnlog "- Not " & sTypes & " types in list but " & vTypes + For iType = 1 to Typ.GetItemCount + Typ.Select iType + printlog "- Type: " & Typ.GetSelText + next iType + next iBrand + next iFormat + + PrintLog "Switch to Tabpage 'Business Cards'" + Kontext + Active.Setpage TabVisitenkarten + else + warnlog( "Dialog <TabEtiketteMedium> not available" ) + endif - Kontext "Active" - if Active.GetRT = 304 then - Warnlog Active.Gettext - Active.Ok - end if - - Kontext "TabVisitenkarten" - for i = 1 to 20 - if Inhalt.IsVisible then - Call DialogTest (TabVisitenkarten) - i = 21 + Kontext "Active" + if ( Active.GetRT = 304 ) then + Warnlog( "UNexpected messagebox: " & Active.GetText() ) + Active.Ok + endif + + Kontext "TabVisitenkarten" + for iWait = 1 to 100 + if Inhalt.IsVisible then + Call DialogTest (TabVisitenkarten) + iWait = 101 + else + wait( 100 ) + endif + next iWait + + PrintLog "Switch to Tabpage 'Private'" + Kontext + Active.Setpage TabPrivat + + Kontext "TabPrivat" + Call DialogTest (TabPrivat) + + PrintLog "Switch to Tabpage 'Business'" + Kontext + Active.Setpage TabGeschaeft + + Kontext "TabGeschaeft" + Call DialogTest (TabGeschaeft) + + Kontext + Active.Setpage TabFormatEtiketten + + PrintLog "Switch to Tabpage 'Format'" + Kontext "TabFormatEtiketten" + Call DialogTest (TabFormatEtiketten) + + PrintLog "Click pushbutton 'Save'" + FormatSpeichern.Click + + PrintLog "Close upcoming dialog 'Save Label Format'" + Kontext "SaveLabelFormat" + + Call DialogTest (SaveLabelFormat) + SaveLabelFormat.Cancel + + Kontext "TabFormatEtiketten" + Kontext + Active.Setpage TabZusaetzeEtiketten + + Kontext "TabZusaetzeEtiketten" + Call DialogTest (TabZusaetzeEtiketten) + Einrichten.Click + + Kontext "DruckerEinrichten" + if ( DruckerEinrichten.Exists( 1 ) ) then + DruckerEinrichten.Cancel else - Sleep 1 - end if - next i + Warnlog "No Default Printer configured for this system. Set one!" + endif - PrintLog "Switch to Tabpage 'Private'" - Kontext - Active.Setpage TabPrivat - wait 250 - Kontext "TabPrivat" - Call DialogTest (TabPrivat) + Kontext "TabZusaetzeEtiketten" + PrintLog "Switch to Tabpage 'Options'" + PrintLog "Check Checkbox 'Syncronize contents" + InhaltSynchronisieren.Check - PrintLog "Switch to Tabpage 'Business'" - Kontext - Active.Setpage TabGeschaeft - wait 250 - Kontext "TabGeschaeft" - Call DialogTest (TabGeschaeft) + PrintLog "Click 'new Document'" + NeuesDok.Click - Kontext - Active.Setpage TabFormatEtiketten - wait 250 - Kontext "TabFormatEtiketten" - Call DialogTest (TabFormatEtiketten) - PrintLog "Switch to Tabpage 'Format'" - wait 250 - PrintLog "Click pushbutton 'Save'" - FormatSpeichern.Click - - PrintLog "Close upcoming dialog 'Save Label Format'" - Kontext "SaveLabelFormat" - wait 250 - Call DialogTest (SaveLabelFormat) - SaveLabelFormat.Cancel - Kontext "TabFormatEtiketten" - Sleep 2 + Kontext "Active" + if ( Active.Exists( 2 ) ) then + try + Active.Ok + catch + Active.Cancel + Warnlog "Once Document has been opened, office asks to save it! BugID 89702" + endcatch + endif + + PrintLog "Check i dialog 'Syncronize Labels' is up" + Kontext "EtikettenSynchronisieren" + if ( EtikettenSynchronisieren.Exists( 2 ) ) then + Call DialogTest ( EtikettenSynchronisieren ) + Synchronisieren.Click + else + Warnlog "Dialog to synchronize Business Cards not up!" + endif - Kontext - Active.Setpage TabZusaetzeEtiketten - wait 250 - Kontext "TabZusaetzeEtiketten" - Call DialogTest (TabZusaetzeEtiketten) - Einrichten.Click - Sleep 1 - Kontext "DruckerEinrichten" - if DruckerEinrichten.Exists then - DruckerEinrichten.Cancel - else - Warnlog "No Default Printer!" - end if - - Kontext "TabZusaetzeEtiketten" - PrintLog "Switch to Tabpage 'Options'" - PrintLog "Check Checkbox 'Syncronize contents" - wait 250 - InhaltSynchronisieren.Check - - PrintLog "Click 'new Document'" - NeuesDok.Click - Sleep 2 - Kontext "Active" - if Active.Exists then - try - Active.Ok - catch - Active.Cancel - Warnlog "Once Document has been opened, office asks to save it! BugID 89702" - endcatch - end if - - wait 250 - Kontext "EtikettenSynchronisieren" - PrintLog "Check i dialog 'Syncronize Labels' is up" - if EtikettenSynchronisieren.Exists then - Call DialogTest ( EtikettenSynchronisieren ) - Synchronisieren.Click - Sleep 1 + PrintLog "Close active document" + Call hCloseDocument else - Warnlog "Dialog to synchronize Business Cards not up!" - end if - - PrintLog "Close active document" - Call hCloseDocument + warnlog( "Failed to create business cards" ) + endif + endcase '----------------------------------------------------------- testcase tFileOpen + printLog "- File / Open" FileOpen - WaitSlot(2000) - if gUseSysDlg = False then - Kontext "OeffnenDlg" + + Kontext "OeffnenDlg" + if ( OeffnenDlg.exists( 2 ) ) then + Call DialogTest ( OeffnenDlg ) - UebergeordneterOrdner.Click + PrintLog "Click 'Up one level'" - Sleep 1 + UebergeordneterOrdner.Click + + WaitSlot() + try - Standard.Click PrintLog "Click button 'Default directory'" + Standard.Click + WaitSlot() catch ExceptLog endcatch - Sleep 1 + PrintLog "Click Button 'New folder'" - if NeuerOrdner.IsVisible and NeuerOrdner.IsEnabled then - NeuerOrdner.Click - Sleep 1 - Kontext "NeuerOrdner" - OrdnerName.SetText "TT_Test" - PrintLog "Enter a folder name in upcoming dialog and click 'Cancel'" - NeuerOrdner.Cancel + if ( NeuerOrdner.exists() ) then + if ( NeuerOrdner.isVisible() ) then + if ( NeuerOrdner.IsEnabled() ) then + NeuerOrdner.Click + + Kontext "NeuerOrdner" + if ( NeuerOrdner.exists( 1 ) ) then + PrintLog "Enter a foldername in upcoming dialog" + OrdnerName.SetText( "TT_Test" ) + + PrintLog "Close dialog with 'Cancel'" + NeuerOrdner.Cancel + else + warnlog( "Dialog <NeuerOrdner> not available" ) + endif + else + Warnlog( "New Folder button disabled" ) + endif + else + Warnlog( "New Folder button not visible" ) + endif else - Warnlog "Unable to create new folder! (Button disabled)" - end if + Warnlog( "New Folder button missing on dialog" ) + endif Kontext "OeffnenDlg" OeffnenDlg.Cancel - PrintLog "Close File-Open-dialog with 'Cancel'" - end if + else + warnlog( "File Open dialog is not available" ) + endif + PrintLog "Close File-Open-dialog with 'Cancel'" endcase '----------------------------------------------------------- testcase tFileClose + PrintLog "- File/Close" PrintLog "Open new document" Call hNewDocument + PrintLog "Insert a table" Call hTabelleEinfuegen - wait 250 PrintLog "File / Close" - FileClose - Kontext - WaitSlot(500) - PrintLog "Cancel upcoming messagebox" - Active.Cancel - Sleep 1 + hUseAsyncSlot( "FileClose" ) + + PrintLog( "Cancel saving the document" ) + kontext "Active" + if ( Active.exists( 1 ) ) then + Active.Cancel + else + Warnlog( "No warning for modified document" ) + endif PrintLog "again File / Close" - FileClose + hUseAsyncSlot( "FileClose" ) + + Printlog( "Confirm to save the document" ) Kontext "Active" - wait 250 - Active.Yes + if ( Active.exists( 1 ) ) then + Active.Yes() + else + warnlog( "No warning for modified document" ) + endif - Sleep 1 - if gUSeSysDlg = False then - PrintLog "Click 'Cancel' in File-Save-Dialog" - Kontext "SpeichernDlg" - if SpeichernDlg.Exists then - SpeichernDlg.Cancel + PrintLog "Click 'Cancel' in File-Save-Dialog" + Kontext "SpeichernDlg" + if ( SpeichernDlg.Exists( 1 ) ) then + SpeichernDlg.Cancel + else + Kontext "Active" + if Active.Exists() then + Warnlog Active.Gettext() + Active.Ok() else - Kontext "Active" - if Active.Exists then - Warnlog Active.Gettext - Active.Ok - else - Warnlog "Dialog to Save document isn't up!" - end if - end if - end if + Warnlog( "File Save dialog not displayed, messagebox came up instead" ) + endif + endif - Sleep 1 PrintLog "Choose File / Close again" - FileClose + hUseAsyncSlot( "FileClose" ) + PrintLog "On upcoming messagebox click 'No'" - Kontext - WaitSlot(500) - Active.No - Sleep 1 + Kontext "Active" + if ( Active.exists( 1 ) ) then + Active.No + else + warnlog( "Expected messagebox missing" ) + endif + endcase '----------------------------------------------------------- testcase tFileSave + PrintLog "- File/Save" PrintLog "Open new document" @@ -532,40 +560,58 @@ testcase tFileSave PrintLog "Insert a table" Call hTabelleEinfuegen - if gUseSysDlg = False then - PrintLog "Choose 'File / Save'" - FileSave - Kontext "SpeichernDlg" + PrintLog "Choose 'File / Save'" + FileSave + + Kontext "SpeichernDlg" + if ( SpeichernDlg.exists( 2 ) ) then + Call DialogTest ( SpeichernDlg ) PrintLog "In File-Dialog click 'Up one level'" UebergeordneterOrdner.Click - Sleep 1 + + WaitSlot() + try PrintLog "Click 'Default directory'" Standard.Click + WaitSlot() catch ExceptLog endcatch - Sleep 1 + PrintLog "Click 'Create New Folder '" - if NeuerOrdner.IsVisible and NeuerOrdner.Exists then - if NeuerOrdner.IsEnabled then - NeuerOrdner.Click - Kontext "NeuerOrdner" - PrintLog "Enter a foldername" - OrdnerName.SetText "TT_Test" - PrintLog "Close 'Create New Folder-dialog' with cancel" - NeuerOrdner.Cancel + if ( NeuerOrdner.exists() ) then + if ( NeuerOrdner.isVisible() ) then + if ( NeuerOrdner.IsEnabled() ) then + NeuerOrdner.Click + + Kontext "NeuerOrdner" + if ( NeuerOrdner.exists( 1 ) ) then + + PrintLog "Enter a foldername in upcoming dialog" + OrdnerName.SetText( "TT_Test" ) + + PrintLog "Close dialog with 'Cancel'" + NeuerOrdner.Cancel + else + warnlog( "Dialog <NeuerOrdner> not available" ) + endif + else + Warnlog( "New Folder button disabled" ) + endif else - Warnlog "Unable to creater new folder! (Button disabled)" - end if + Warnlog( "New Folder button not visible" ) + endif else - Warnlog "Unable to create new folder! (Button not found)" - end if + Warnlog( "New Folder button missing on dialog" ) + endif + Kontext "SpeichernDlg" - PrintLog "Close File-Save-Dialog with Cancel" - SpeichernDlg.Cancel - end if + SpeichernDlg.cancel() + else + warnlog( "File Save dialog is not available" ) + endif PrintLog "Close active document" Call hCloseDocument @@ -574,85 +620,111 @@ endcase '----------------------------------------------------------- testcase tFileSaveAll + PrintLog "- File / Save All" PrintLog "Open new document" Call hNewDocument + PrintLog "Insert a table in document" Call hTabelleEinfuegen + PrintLog "Open a second document" Call hNewDocument + PrintLog "Insert a table in second document" Call hTabelleEinfuegen - - if gUSeSysDlg = False then - PrintLog "Choose File / Save all" - FileSaveAll - Kontext "SpeichernDlg" - WaitSlot(5000) - PrintLog "Cancel 1. upcoming Filedialog" + PrintLog "Choose File / Save all" + FileSaveAll + + PrintLog "Cancel 1. upcoming Filedialog" + Kontext "SpeichernDlg" + if ( SpeichernDlg.exists( 2 ) ) then SpeichernDlg.Cancel - - Kontext "SpeichernDlg" - PrintLog "Cancel 2. upcoming Filedialog" - Sleep 1 + else + warnlog( "First File Save dialog is not available" ) + endif + + PrintLog "Cancel 2. upcoming Filedialog" + Kontext "SpeichernDlg" + if ( SpeichernDlg.exists( 2 ) ) then SpeichernDlg.Cancel + else + warnlog( "Second File Save dialog is not available" ) + endif - Kontext "SpeichernDlg" - Sleep 1 - if SpeichernDlg.Exists then SpeichernDlg.Cancel - end if - - Sleep 1 + Kontext "SpeichernDlg" + if ( SpeichernDlg.exists( 1 ) ) then + warnlog( "Third, unexpected File Save dialog open" ) + SpeichernDlg.cancel() + endif PrintLog "Close documents" - Do Until GetDocumentCount = 0 - Call hCloseDocument - Loop + hFileCloseAll() + endcase '----------------------------------------------------------- testcase tFileSaveAs + PrintLog "- File / Save As" PrintLog "Open new document" Call hNewDocument - if gUseSysDlg = False then - PrintLog "Choose 'Fiole / Save as'" - FileSaveAs - Kontext "SpeichernDlg" + PrintLog "Choose 'File / Save as'" + FileSaveAs + + Kontext "SpeichernDlg" + if ( SpeichernDlg.exists( 1 ) ) then + Call DialogTest ( SpeichernDlg ) + PrintLog "Click button 'Up one level'" - UebergeordneterOrdner.Click - Sleep 1 + UebergeordneterOrdner.Click() + + WaitSlot() + + PrintLog "Click button 'Default Directory'" try - PrintLog "Click button 'Default Directory'" Standard.Click catch ExceptLog endcatch - Sleep 1 + PrintLog "Click button 'Create Folder'" - if NeuerOrdner.IsVisible and NeuerOrdner.Exists then - if NeuerOrdner.IsEnabled then - NeuerOrdner.Click - Kontext "NeuerOrdner" - PrintLog "Enter a foldername in upcoming dialog" - OrdnerName.SetText "TT_Test" - PrintLog "Close dialog with 'Cancel'" - NeuerOrdner.Cancel + if ( NeuerOrdner.exists() ) then + if ( NeuerOrdner.isVisible() ) then + if ( NeuerOrdner.IsEnabled() ) then + NeuerOrdner.Click + + Kontext "NeuerOrdner" + if ( NeuerOrdner.exists( 1 ) ) then + + Printlog( "Name the folder" ) + OrdnerName.SetText( "TT_Test" ) + PrintLog "Close dialog with 'Cancel'" + NeuerOrdner.Cancel + else + warnlog( "Dialog <NeuerOrdner> not available" ) + endif + else + Warnlog( "New Folder button disabled" ) + endif else - Warnlog "Unable to create new folder! (Button disabled)" - end if + Warnlog( "New Folder button not visible" ) + endif else - Warnlog "Unable to create new folder! (Button not found)" - end if + Warnlog( "New Folder button missing on dialog" ) + endif + Kontext "SpeichernDlg" SpeichernDlg.Cancel - end if + else + warnlog( "File Save dialog is not available" ) + endif PrintLog "Close active document" Call hCloseDocument @@ -661,6 +733,7 @@ endcase '----------------------------------------------------------- testcase tFileSaveAsExport + QaErrorLog "#i93340# - Testcase outcommented due to bug with filter." goto endsub @@ -675,48 +748,44 @@ testcase tFileSaveAsExport Case else goto endsub end select + PrintLog "Open new document" Call hNewDocument PrintLog "Open document '..\writer\required\input\st1_1.sxw" Call hFileOpen(xExport) - Sleep 1 Call sMakeReadOnlyDocumentEditable PrintLog "Select Save as .. and choose 'Microsoft Word 97/2000/XP' as export-filter" xExportFile = gOfficepath + "user\work\ecksport.doc" Call hFileSaveAsWithFilterKill (xExportFile, "MS Word 2003 XML") - CountDocu = 0 - Do Until GetDocumentCount = 1 - Call hCloseDocument - CountDocu = CountDocu + 1 - Loop - if CountDocu > 1 then + if ( hFileCloseAll() > 1 ) then QAErrorlog "More than 1 document had to be closed!" - end if + endif PrintLog "Close document" Call hCloseDocument + endcase '----------------------------------------------------------- testcase tFileSaveWithPassword - Dim DokumentPfad$ - Dim Datei$ - Dim sFile$ - Dim sFile2$ + + Dim sFileName1 as string + dim sFileName2 as string + dim sFilePath as string Printlog "- File / Save with Password" Select Case gApplication Case "WRITER" - sFile$ = "password.odt" - sFile2$ = "password2.odt" + sFileName1 = "password.odt" + sFileName2 = "password2.odt" Case "MASTERDOCUMENT" - sFile$ = "password.odm" - sFile2$ = "password2.odm" + sFileName1 = "password.odm" + sFileName2 = "password2.odm" Case "HTML" printlog "Not in Writer/Web!" goto endsub @@ -724,160 +793,187 @@ testcase tFileSaveWithPassword PrintLog "Open new document" Call hNewDocument + PrintLog "Enter some text into document" Call wTypeKeys("This document will be saved with a password!") - if gUseSysDlg = True then goto endsub - Datei$ = ConvertPath ( gOfficePath + "user\work\" + sFile$ ) - if Dir (Datei$) <> "" then kill Datei$ + sFilePath = ConvertPath ( gOfficePath + "user\work\" + sFileName1 ) + hDeleteFile( sFilePath ) PrintLog "Choose File / Save as." FileSaveAs + PrintLog "enter destination and check 'Password'" Kontext "SpeichernDlg" - if Passwort.IsEnabled then - Passwort.Check - else - Warnlog "- Not able to save with Password -> Checkbox is disabled! Maybe default-filter wrong!?" - SpeichernDlg.Cancel - PrintLog "if Checkbox is disabled the test stops here!" - Call hCloseDocument - goto endsub - end if + if ( SpeichernDlg.exists( 2 ) ) then + if ( Passwort.exists() ) then + if ( Passwort.isEnabled() ) then + Passwort.Check() + else + warnlog( "FATAL: Password checkbox is not enabled" ) + goto endsub + endif + else + warnlog( "FATAL: Password checkbox does not exist" ) + goto endsub + endif - PrintLog "Save the document" - Dateiname.SetText Datei$ - Speichern.Click - Sleep 1 - Kontext "Active" - if Active.Exists (1) then Active.Yes + PrintLog "Save the document" + Dateiname.SetText( sFilePath ) + Speichern.Click() - Sleep 1 - PrintLog "Password dialog has to come up" - Kontext "PasswordFileSave" - if PasswordFileSave.Exists then - PrintLog "Enter your password" - Password.SetText "12345" - PrintLog "Re-Enter a wrong passwort" - PasswordConfirm.Settext "54321" - PasswordFileSave.OK - Sleep 2 - else - Warnlog "- Password-Dialog not up !" - end if + printlog( "JSK: Unknown messagebox handled silently before refactoring" ) + Kontext "Active" + if ( Active.Exists (1) ) then + warnlog( "Unexpected messagebox: " & Active.getText() ) + Active.Yes + endif - Kontext "Active" - Sleep 1 - PrintLog "A messagebox has to come up, warns of wrong confirmation" - if Active.Exists(1) then - Active.OK - else - Warnlog "Able to save document with wrong password" - end if - - Kontext "PasswordFileSave" - if PasswordFileSave.Exists then - PrintLog "Enter new password, and re-enter the same password" - Password.SetText "12345" - PasswordConfirm.SetText "12345" - PasswordFileSave.OK + PrintLog "Password dialog has to come up" + Kontext "PasswordFileSave" + if ( PasswordFileSave.Exists( 1 ) ) then + + PrintLog "Enter your password" + Password.SetText( "12345" ) + + PrintLog "Re-Enter a wrong passwort" + PasswordConfirm.Settext( "54321" ) + PasswordFileSave.OK + else + Warnlog "- Password-Dialog not up !" + endif + + Kontext "Active" + PrintLog "A messagebox has to come up, warns of wrong confirmation" + if ( Active.Exists( 1 ) )then + Active.OK + else + Warnlog "Able to save document with wrong password" + endif + + Kontext "PasswordFileSave" + if ( PasswordFileSave.Exists() ) then + PrintLog "Enter new password, and re-enter the same password" + Password.SetText( "12345" ) + PasswordConfirm.SetText( "12345" ) + PasswordFileSave.OK + else + Warnlog "- Password-Dialog not up !" + endif else - Warnlog "- Password-Dialog not up !" - end if + warnlog( "Dialog <SpeichernDlg> not available" ) + endif + - Sleep 1 PrintLog "Close the document" - FileClose - WaitSlot(2000) + hUseAsyncSlot( "FileClose" ) + PrintLog "Open previous saved document" - Call hFileOpen(Datei$) + hFileOpen( sFilePath ) Kontext "PasswordFileOpen" PrintLog "Enter a wrong password." - if PasswordFileOpen.Exists then - PasswortName.SetText "34567" - PasswordFileOpen.OK + if ( PasswordFileOpen.Exists() ) then + PasswortName.SetText( "34567" ) + PasswordFileOpen.OK() else Warnlog "- Password-Dialog not up or Document couldn't be loaded!" - end if + endif PrintLog "A messagebox has to come up, warns of wrong password" Kontext "Active" - Sleep 1 - if Not Active.Exists(1) then - Warnlog "Able to load document with wrong password" + if ( Active.Exists(1) ) then + printlog( "Warning for incorrect password -> good" ) + Active.OK() else - Active.OK - end if + Warnlog "Able to load document with wrong password" + endif Kontext "PasswordFileOpen" - PrintLog "Close password dialog" - if PasswordFileOpen.Exists then - PasswordFileOpen.Cancel - end if + PrintLog "Cancel Password dialog (not loading the document" + if ( PasswordFileOpen.Exists( 1 ) ) then + PasswordFileOpen.Cancel() + endif - Sleep 1 PrintLog "File / Open again your previous saved document" - Call hFileOpen(Datei$) + hFileOpen( sFilePath ) + PrintLog "Enter your password in password dialog" Kontext "PasswordFileOpen" - if PasswordFileOpen.Exists then - PasswortName.SetText "12345" - PasswordFileOpen.OK + if ( PasswordFileOpen.Exists() ) then + PasswortName.SetText( "12345" ) + PasswordFileOpen.OK() else Warnlog "- Password-Dialog not up!" - end if - Sleep 1 - - Datei$ = ConvertPath ( gOfficePath + "user\work\" + sFile2$ ) - if Dir (Datei$) <> "" then kill Datei$ + endif + + ' Rename document, the old one is now obsolete + sFilePath = ConvertPath ( gOfficePath + "user\work\" + sFileName2 ) + hDeleteFile( sFilePath ) + + PrintLog "File / Save as ..." FileSaveAs + Kontext "SpeichernDlg" - if Not Passwort.IsChecked = True then - if gPlatgroup = "unx" then - QAErrorlog "#i73968#Opening a password protected file looses focus after loading" - else - Warnlog "#i36015#Checkbox 'Save with password' is not checked in file-dialog !" - end if - Passwort.Check - SpeichernDlg.Cancel - else - Dateiname.SetText Datei$ - Speichern.Click - Kontext "Active" - if Active.Exists(2) then Active.Yes - PrintLog "Click on 'Save' in file open dialog" - Kontext "PasswordFileSave" - if Not PasswordFileSave.Exists(1) then - Warnlog "Passworddialog is not coming up on saving document" + if ( SpeichernDlg.exists( 2 ) ) then + + printlog( "Verify that password setting is persistent" ) + if ( Not Passwort.IsChecked ) then + if ( gPlatgroup = "unx" ) then + QAErrorlog "#i73968#Opening a password protected file looses focus after loading" + else + Warnlog "#i36015#Checkbox 'Save with password' is not checked in file-dialog !" + Passwort.Check + endif + SpeichernDlg.Cancel else - Password.SetText "54321" - PasswordConfirm.SetText "54321" - PasswordFileSave.OK - PrintLog "The password dialog should come up" - Sleep 1 - FileClose - PrintLog "File / Close and open your document again" - Call hFileOpen(Datei$) - Sleep 1 - Kontext "PasswordFileOpen" - PrintLog "Now the passwort dialog should come up" - if Not PasswordFileOpen.Exists(2) then - Warnlog "Passworddialog is not coming up on reload" + Dateiname.SetText( sFilePath ) + Speichern.Click() + + printlog( "JSK: Unknown messagebox handled silently before refactoring" ) + Kontext "Active" + if ( Active.Exists( 2 ) ) then + printlog( "Messagebox: " & Active.getText() ) + Active.Yes() + endif + + PrintLog "Click on 'Save' in file open dialog" + Kontext "PasswordFileSave" + if ( PasswordFileSave.Exists( 1 ) ) then + + Password.SetText( "54321" ) + PasswordConfirm.SetText( "54321" ) + PasswordFileSave.OK() + + PrintLog( "The password dialog should come up" ) + hUseAsyncSlot( "FileClose" ) + + PrintLog "File / Close and open your document again" + hFileOpen( sFilePath ) + + Kontext "PasswordFileOpen" + if ( PasswordFileOpen.exists() ) then + PasswortName.SetText "54321" + PasswordFileOpen.OK + else + warnlog( "Password dialog did not open" ) + endif else - PasswortName.SetText "54321" - PasswordFileOpen.OK - end if - end if - end if + Warnlog "Passworddialog is not coming up on saving document" + endif + endif + else + warnlog( "Dialog <SpeichernDlg> not available" ) + endif PrintLog "Close active document" Call hCloseDocument endcase -'----------------------------------------------------------- +'------------------------------------------------------------------------------- testcase tFileReload + Dim DokumentPfad$ Dim Datei$ Dim sFile$ @@ -909,7 +1005,7 @@ testcase tFileReload if MessageBox.Exists (1) then WarnLog "Messagebox after saving and closing : " + MessageBox.GetText MessageBox.Yes - end if + endif Wait (500) PrintLog "Open previous saved document" @@ -992,744 +1088,3 @@ endcase '----------------------------------------------------------- -testcase tFileSendCreateMasterDocument - PrintLog "- File / Send / Create Masterdocument" - if gApplication <> "WRITER" then - printlog "Not in : " + gApplication - goto endsub - end if - - PrintLog "Open new document" - Call hNewDocument - Call wTypeKeys("File -> Send -> Create Master Document") - PrintLog "Choose File / Send /Create Master Document" - FileSendCreateMasterdocument - Kontext "SendMasterDocument" - - PrintLog "Cancel File-Save-dialog" - SendMasterdocument.Cancel - Kontext "Active" - if Active.Exists then Active.OK - PrintLog "Close active document" - Call hCloseDocument -endcase - -'----------------------------------------------------------- - -testcase tFileSendCreateHTMLDocument - PrintLog "- File / Send / Create HTML-Dokument" - PrintLog "Open new document" - Select Case gApplication - Case "WRITER" - Call hNewDocument - Case "MASTERDOCUMENT" - Call hNewDocument - Case "HTML" - printlog "Not in WriterWeb!" - goto endsub - end select - PrintLog "Choose File / Send / Create HTML-Document" - FileSendCreateHTMLDocument - - PrintLog "Cancel Filedialog" - Kontext "SendHTMLDocument" - SendHTMLDocument.Cancel - Kontext "Active" - if Active.Exists then Active.OK - - PrintLog "Close documents" - Do Until GetDocumentCount = 0 - Call hCloseDocument - Loop -endcase - -'----------------------------------------------------------- - -testcase tFileSendOutlineToPresentation - Dim sFile$ - PrintLog "- File / Send / Outline to Presentation" - Select Case gApplication - Case "WRITER" - sFile$ = "htmltest.sxw" - Case "MASTERDOCUMENT" - sFile$ = "htmltest.sxg" - Case "HTML" - printlog "Not in Writer/Web!" - goto endsub - end select - PrintLog "Open file ( gTesttoolPath + writer\required\input\ + htmltest.sxw )" - Call hFileOpen ( gTesttoolPath + "writer\required\input\" + sFile$ ) - Kontext "Navigator" - if Navigator.Exists then Navigator.Close - Sleep 1 - Kontext "DocumentWriter" - PrintLog "File / Send / Outline to presentation" - try - FileSendOutlineToPresentation - catch - Warnlog "#i38723#Unable to execute 'File -> Send -> Outline to Presentation'" - Call hCloseDocument - goto endsub - endcatch - Wait(500) - - Kontext "DocumentImpressOutlineView" - if DocumentImpressOutlineView.Exists then - DocumentImpressOutlineView.TypeKeys "<Mod1 Home>" - DocumentImpressOutlineView.TypeKeys "<Shift End>" - Wait(500) - try - EditCopy - if GetClipboardText <> "Seite 1." then QAErrorlog "Wrong Outline in Impress Outlinemode" - catch - QAErrorlog "Send outline to presentation doesn't work correct." - endcatch - else - WarnLog "Outlinemode comes not up!" - end if - - Kontext "Navigator" - if Navigator.Exists then Navigator.Close - PrintLog "Close documents" - Do Until GetDocumentCount = 0 - Call hCloseDocument - Loop -endcase - -'----------------------------------------------------------- - -testcase tFileSendOutlineToClipboard - Dim sFile$ - PrintLog "- File / Send / Outline to Clipboard" - Select Case gApplication - Case "WRITER" - sFile$ = "htmltest.sxw" - Case "MASTERDOCUMENT" - sFile$ = "htmltest.sxg" - Case "HTML" - printlog "Not in Writer/Web!" - goto endsub - end select - - PrintLog "Open file ( gTesttoolPath + writer\required\input\ + htmltest.sxw )" - Call hFileOpen ( gTesttoolPath + "writer\required\input\" + sFile$ ) - Sleep 1 - PrintLog "File / Send / Outline to Clipboard" - try - FileSendOutlineToClipboard - catch - Warnlog "#i38723#Unable to execute 'File -> Send -> Outline to Clipboard'" - Call hCloseDocument - goto endsub - endcatch - - Sleep 1 - PrintLog "Close active document" - Call hCloseDocument - WaitSlot(1000) - Call hNewDocument - PrintLog "Open new document" - - WaitSlot(1000) - - PrintLog "Paste outline in new document" - EditPaste - Call wTypeKeys("<Up>", 6) - Call wTypeKeys("<Home><Shift End>") - EditCopy - if GetClipboardText <> "Seite 1." then QAErrorlog "Wrong Outline in Impress Outlinemode" - WaitSlot(1000) - PrintLog "Close active document" - Call hCloseDocument -endcase - -'----------------------------------------------------------- - -testcase tFileSendCreateAutoabstract - Dim sFile$ - PrintLog "- File / Send / Create Autoabstract" - Select Case gApplication - Case "WRITER" - sFile$ = "htmltest.sxw" - Case "MASTERDOCUMENT" - sFile$ = "htmltest.sxg" - Case "HTML" - printlog "Not in Writer/Web!" - goto endsub - end select - - PrintLog "Open file ( gTesttoolPath + writer\required\input\ + htmltest.sxw )" - Call hFileOpen ( gTesttoolPath + "writer\required\input\" + sFile$ ) - Kontext "Navigator" - if Navigator.Exists then Navigator.Close - Sleep 1 - Kontext "DocumentWriter" - PrintLog "File / Send / Create Autoabstract" - try - FileSendCreateAutoabstract - catch - Warnlog "#i38723#Unable to execute 'File -> Send -> Create Autoabstract'" - Call hCloseDocument - goto endsub - endcatch - WaitSlot(2000) - - PrintLog "Close upcoming dialog with 'Ok" - Kontext "AutoAbstractErzeugen" - AutoAbstractErzeugen.OK - Sleep 1 - Call wTypeKeys("<Home><Up>", 10) - Call wTypeKeys("<Shift End>") - try - EditCopy - WaitSlot(1000) - if GetClipboardText <> "Seite 1." then QAErrorlog "Wrong Outline in Impress Outlinemode" - catch - QAErrorlog "Empty autoabstract created" - endcatch - - Kontext "Navigator" - if Navigator.Exists then Navigator.Close - Sleep 1 - - PrintLog "Close active documents" - Do Until GetDocumentCount = 0 - Call hCloseDocument - Loop -endcase - -'----------------------------------------------------------- - -testcase tFileSendAutoabstractToPresentation - Dim sFile$ - PrintLog "- File / Send / Autoabstract to Presentation" - Select Case gApplication - Case "WRITER" - sFile$ = "htmltest.sxw" - Case "MASTERDOCUMENT" - sFile$ = "htmltest.sxg" - Case "HTML" - printlog "Not in Writer/Web!" - goto endsub - end select - - PrintLog "Open file ( gTesttoolPath + writer\required\input\ + htmltest.sxw )" - Call hFileOpen ( gTesttoolPath + "writer\required\input\" + sFile$ ) - Kontext "Navigator" - if Navigator.Exists then Navigator.Close - Sleep 1 - Kontext "DocumentWriter" - PrintLog "File / Send / Create Autoabstract To Presentation" - try - FileSendAutoabstractToPresentation - catch - Warnlog "#i38723#Unable to execute 'File -> Send -> Autoabstract to Presentation'" - Call hCloseDocument - goto endsub - endcatch - - Sleep 1 - Kontext "AutoAbstractErzeugen" - PrintLog "Close upcoming dialog with 'Ok'" - AutoAbstractErzeugen.OK - - Sleep 2 - Kontext "DocumentImpressOutlineView" - if DocumentImpressOutlineView.Exists then - PrintLog "Point cursor to beginning of document" - DocumentImpressOutlineView.TypeKeys "<Mod1 Home>" - PrintLog "Mark text" - DocumentImpressOutlineView.TypeKeys "<Shift End>" - try - EditCopy - WaitSlot(1000) - if GetClipboardText <> "Seite 1." then QAErrorlog "Wrong Outline in Impress Outlinemode" - catch - QAErrorlog "Edit / copy disabled. Maybe data could not be pasted correctly!" - endcatch - else - Warnlog "- Outline in Impress not created!" - end if - Kontext "Navigator" - if Navigator.Exists then Navigator.Close - Sleep 1 - Call hCloseDocument - PrintLog "Close active document" - - Call wDocSetContext - FileClose -endcase -'-------------------------------------------------------------------------------------------------------------------------------------------- - -testcase tMasterDocFileSaveWithPassword - Dim DokumentPfad$ - Dim Datei$ - Dim sFile$ - Dim sFile2$ - - Printlog "- File / Save with Password" - sFile$ = "password.odm" - sFile2$ = "password2.odm" - - gApplication = "MASTERDOCUMENT" - PrintLog "Open new document" - Call hNewDocument - PrintLog "Enter some text into document" - Call wTypeKeys("This document will be saved with a password!") - - if gUseSysDlg = True then goto endsub - Datei$ = ConvertPath ( gOfficePath + "user\work\" + sFile$ ) - if Dir (Datei$) <> "" then kill Datei$ - - PrintLog "Choose File / Save as." - FileSaveAs - PrintLog "enter destination and check 'Password'" - Kontext "SpeichernDlg" - if Passwort.IsEnabled then - Passwort.Check - else - Warnlog "- Not able to save with Password -> Checkbox is disabled! Maybe default-filter wrong!?" - SpeichernDlg.Cancel - PrintLog "if Checkbox is disabled the test stops here!" - Call hCloseDocument - goto endsub - end if - - Dateiname.SetText Datei$ - PrintLog "Save your document" - Speichern.Click - Sleep 1 - Kontext "Active" - if Active.Exists (1) then Active.Yes - - Sleep 1 - PrintLog "Password dialog has to come up" - Kontext "PasswordFileSave" - if PasswordFileSave.Exists then - PrintLog "Enter your password" - Password.SetText "12345" - PrintLog "Re-Enter a wrong passwort" - PasswordConfirm.Settext "54321" - PasswordFileSave.OK - Sleep 2 - else - Warnlog "- Password-Dialog not up !" - end if - - Kontext "Active" - Sleep 1 - PrintLog "A messagebox has to come up, warns of wrong confirmation" - if Active.Exists(1) then - Active.OK - else - Warnlog "Able to save document with wrong password" - end if - - Kontext "PasswordFileSave" - if PasswordFileSave.Exists then - PrintLog "Enter new password, and re-enter the same password" - Password.SetText "12345" - PasswordConfirm.SetText "12345" - PasswordFileSave.OK - else - Warnlog "- Password-Dialog not up !" - end if - - Sleep 1 - PrintLog "Close the document" - FileClose - WaitSlot(2000) - PrintLog "Open previous saved document" - Call hFileOpen(Datei$) - - Kontext "PasswordFileOpen" - PrintLog "Enter a wrong password." - if PasswordFileOpen.Exists then - PasswortName.SetText "34567" - PasswordFileOpen.OK - else - Warnlog "- Password-Dialog not up or Document couldn't be loaded!" - end if - - PrintLog "A messagebox has to come up, warns of wrong password" - Kontext "Active" - Sleep 1 - if Not Active.Exists(1) then - Warnlog "Able to load document with wrong password" - else - Active.OK - end if - - Kontext "PasswordFileOpen" - PrintLog "Close password dialog" - if PasswordFileOpen.Exists then - PasswordFileOpen.Cancel - end if - - Sleep 1 - PrintLog "File / Open again your previous saved document" - Call hFileOpen(Datei$) - PrintLog "Enter your password in password dialog" - Kontext "PasswordFileOpen" - if PasswordFileOpen.Exists then - PasswortName.SetText "12345" - PasswordFileOpen.OK - else - Warnlog "- Password-Dialog not up!" - end if - Sleep 1 - - Datei$ = ConvertPath ( gOfficePath + "user\work\" + sFile2$ ) - if Dir (Datei$) <> "" then kill Datei$ - PrintLog "File / Save as ..." - FileSaveAs - Kontext "SpeichernDlg" - if Not Passwort.IsChecked = True then - if gPlatgroup = "unx" then - QAErrorlog "#i73968#Opening a password protected file looses focus after loading" - else - Warnlog "#i36015#Checkbox 'Save with password' is not checked in file-dialog !" - end if - Passwort.Check - SpeichernDlg.Cancel - else - Dateiname.SetText Datei$ - Speichern.Click - Kontext "Active" - if Active.Exists(2) then Active.Yes - PrintLog "Click on 'Save' in file open dialog" - Kontext "PasswordFileSave" - if Not PasswordFileSave.Exists(1) then - Warnlog "Passworddialog is not coming up on saving document" - else - Password.SetText "54321" - PasswordConfirm.SetText "54321" - PasswordFileSave.OK - PrintLog "The password dialog should come up" - Sleep 1 - FileClose - PrintLog "File / Close and open your document again" - Call hFileOpen(Datei$) - Sleep 1 - Kontext "PasswordFileOpen" - PrintLog "Now the passwort dialog should come up" - if Not PasswordFileOpen.Exists(2) then - Warnlog "Passworddialog is not coming up on reload" - else - PasswortName.SetText "54321" - PasswordFileOpen.OK - end if - end if - end if - PrintLog "Close active document" - Call hCloseDocument -endcase - -'----------------------------------------------------------- - -testcase tMasterDocFileReload - Dim DokumentPfad$ - Dim Datei$ - Dim sFile$ - Dim WriterFilterExtension(10) as string - Dim MasterDocFilterExtension(10) as string - - WriterFilterExtension() = hGetFilternameExtension ( "writer8" ) - MasterDocFilterExtension() = hGetFilternameExtension ( "writerglobal8" ) - - PrintLog "- File / Reload" - sFile$ = "reload." & MasterDocFilterExtension(0) - - gApplication = "MASTERDOCUMENT" - PrintLog "Open new document" - Call hNewDocument - - PrintLog "Enter some text, save and close document" - Call wTypeKeys("File -> Reload!") - Call hFileSaveAsKill ( gOfficePath + "user\work\" + sFile$ ) - FileClose - Kontext - if MessageBox.Exists (1) then - WarnLog "Messagebox after saving and closing : " + MessageBox.GetText - MessageBox.Yes - end if - Wait (500) - - PrintLog "Open previous saved document" - Call hFileOpen ( gOfficePath + "user\work\" + sFile$ ) - PrintLog "Insert a table in document" - Call hTabelleEinfuegen - PrintLog "File / Reload" - FileReload - WaitSlot(1000) - PrintLog "Quit messagebox with 'No'" - Kontext "Active" - Active.No - Wait (500) - - PrintLog "File / Reload again and quit messagebox with yes" - FileReload - - WaitSlot(2000) - Kontext "Active" - Active.Yes - Wait (500) - PrintLog "Close active document" - Call hCloseDocument -endcase - -'----------------------------------------------------------- - -testcase tMasterDocFileVersions - Dim sFile$ - Dim WriterFilterExtension(10) as string - Dim MasterDocFilterExtension(10) as string - - WriterFilterExtension() = hGetFilternameExtension ( "writer8" ) - MasterDocFilterExtension() = hGetFilternameExtension ( "writerglobal8" ) - - gApplication = "MASTERDOCUMENT" - PrintLog "- File / Versions" - sFile$ = "kann_weg." & MasterDocFilterExtension(0) - - PrintLog "Open new document" - Call hNewDocument - Call wTypeKeys ("File version") - PrintLog "enter some text in documet and save it" - Call hFileSaveAsKill(gOfficePath + "user\work\" + sFile$) - - try - PrintLog "Choose File / Versions" - FileVersions - catch - Warnlog "- File / Versions not accessible!" - goto endsub - endcatch - - Kontext "Versionen" - Call DialogTest ( Versionen ) - Speichern.Click - PrintLog "In Version-dialog click 'Save New Version'" - Kontext "VersionskommentarEingeben" - Call DialogTest ( VersionskommentarEingeben ) - VersionskommentarEingeben.Cancel - PrintLog "Cancel dialog 'Insert version comment'" - - Kontext "Versionen" - PrintLog "Close dialog" - Versionen.Close - PrintLog "Close active document" - Call hCloseDocument -endcase - -'----------------------------------------------------------- - -testcase tMasterDocFileSendCreateHTMLDocument - PrintLog "- File / Send / Create HTML-Dokument" - gApplication = "MASTERDOCUMENT" - PrintLog "Open new document" - Call hNewDocument - - PrintLog "Choose File / Send / Create HTML-Document" - FileSendCreateHTMLDocument - - PrintLog "Cancel Filedialog" - Kontext "SendHTMLDocument" - SendHTMLDocument.Cancel - Kontext "Active" - if Active.Exists then Active.OK - PrintLog "Close active document" - Call hCloseDocument -endcase - -'----------------------------------------------------------- - -testcase tMasterDocFileSendOutlineToPresentation - Dim sFile$ - PrintLog "- File / Send / Outline to Presentation" - gApplication = "MASTERDOCUMENT" - sFile$ = "htmltest.sxg" - - PrintLog "Open file ( gTesttoolPath + writer\required\input\ + htmltest.sxw )" - Call hFileOpen ( gTesttoolPath + "writer\required\input\" + sFile$ ) - Kontext "Navigator" - if Navigator.Exists then Navigator.Close - Sleep 1 - Kontext "DocumentWriter" - PrintLog "File / Send / Outline to presentation" - try - FileSendOutlineToPresentation - catch - Warnlog "#i38723#Unable to execute 'File -> Send -> Outline to Presentation'" - Call hCloseDocument - goto endsub - endcatch - Wait(500) - - Kontext "DocumentImpressOutlineView" - if DocumentImpressOutlineView.Exists then - DocumentImpressOutlineView.TypeKeys "<Mod1 Home>" - DocumentImpressOutlineView.TypeKeys "<Shift End>" - Wait(500) - try - EditCopy - if GetClipboardText <> "Seite 1." then QAErrorlog "Wrong Outline in Impress Outlinemode" - catch - QAErrorlog "Send outline to presentation doesn't work correct." - endcatch - else - WarnLog "Outlinemode comes not up!" - end if - - Kontext "Navigator" - if Navigator.Exists then Navigator.Close - PrintLog "Close documents" - Do Until GetDocumentCount = 0 - Call hCloseDocument - Loop -endcase - -'----------------------------------------------------------- - -testcase tMasterDocFileSendOutlineToClipboard - gApplication = "MASTERDOCUMENT" - Dim sFile$ - PrintLog "- File / Send / Outline to Clipboard" - sFile$ = "htmltest.sxg" - - PrintLog "Open file ( gTesttoolPath + writer\required\input\ + htmltest.sxw )" - Call hFileOpen ( gTesttoolPath + "writer\required\input\" + sFile$ ) - Sleep 1 - PrintLog "File / Send / Outline to Clipboard" - try - FileSendOutlineToClipboard - catch - Warnlog "#i38723#Unable to execute 'File -> Send -> Outline to Clipboard'" - Call hCloseDocument - goto endsub - endcatch - - Sleep 1 - PrintLog "Close active document" - Call hCloseDocument - WaitSlot(1000) - PrintLog "Open new document" - Call hNewDocument - WaitSlot(1000) - PrintLog "Paste outline in new document" - EditPaste - Call wTypeKeys("<Up>", 6) - Call wTypeKeys("<Home><Shift End>") - EditCopy - if GetClipboardText <> "Seite 1." then QAErrorlog "Wrong Outline in Impress Outlinemode" - WaitSlot(1000) - PrintLog "Close active document" - Call hCloseDocument - gApplication = "WRITER" -endcase - -'----------------------------------------------------------- - -testcase tMasterDocFileSendCreateAutoabstract - gApplication = "MASTERDOCUMENT" - Dim sFile$ - PrintLog "- File / Send / Create Autoabstract" - sFile$ = "htmltest.sxg" - - PrintLog "Open file ( gTesttoolPath + writer\required\input\ + htmltest.sxw )" - Call hFileOpen ( gTesttoolPath + "writer\required\input\" + sFile$ ) - Kontext "Navigator" - if Navigator.Exists then Navigator.Close - Sleep 1 - Kontext "DocumentWriter" - PrintLog "File / Send / Create Autoabstract" - try - FileSendCreateAutoabstract - catch - Warnlog "#i38723#Unable to execute 'File -> Send -> Create Autoabstract'" - Call hCloseDocument - goto endsub - endcatch - WaitSlot(2000) - - PrintLog "Close upcoming dialog with 'Ok" - Kontext "AutoAbstractErzeugen" - AutoAbstractErzeugen.OK - Sleep 1 - Call wTypeKeys("<Home><Up>", 10) - Call wTypeKeys("<Shift End>") - try - EditCopy - WaitSlot(1000) - if GetClipboardText <> "Seite 1." then QAErrorlog "Wrong Outline in Impress Outlinemode" - catch - QAErrorlog "Empty autoabstract created" - endcatch - - Kontext "Navigator" - if Navigator.Exists then Navigator.Close - Sleep 1 - - PrintLog "Close documents" - Do Until GetDocumentCount = 0 - Call hCloseDocument - Loop - gApplication = "WRITER" -endcase - -'----------------------------------------------------------- - -testcase tMasterDocFileSendAutoabstractToPresentation - gApplication = "MASTERDOCUMENT" - Dim sFile$ - PrintLog "- File / Send / Autoabstract to Presentation" - sFile$ = "htmltest.sxg" - - PrintLog "Open file ( gTesttoolPath + writer\required\input\ + htmltest.sxw )" - Call hFileOpen ( gTesttoolPath + "writer\required\input\" + sFile$ ) - Kontext "Navigator" - if Navigator.Exists then Navigator.Close - Sleep 1 - Kontext "DocumentWriter" - PrintLog "File / Send / Create Autoabstract To Presentation" - try - FileSendAutoabstractToPresentation - catch - Warnlog "#i38723#Unable to execute 'File -> Send -> Autoabstract to Presentation'" - Call hCloseDocument - goto endsub - endcatch - - Sleep 1 - Kontext "AutoAbstractErzeugen" - PrintLog "Close upcoming dialog with 'Ok'" - AutoAbstractErzeugen.OK - - Sleep 2 - Kontext "DocumentImpressOutlineView" - if DocumentImpressOutlineView.Exists then - PrintLog "Point cursor to beginning of document" - DocumentImpressOutlineView.TypeKeys "<Mod1 Home>" - PrintLog "Mark text" - DocumentImpressOutlineView.TypeKeys "<Shift End>" - try - EditCopy - WaitSlot(1000) - if GetClipboardText <> "Seite 1." then QAErrorlog "Wrong Outline in Impress Outlinemode" - catch - QAErrorlog "Edit / copy disabled. Maybe data could not be pasted correctly!" - endcatch - else - Warnlog "- Outline in Impress not created!" - end if - Kontext "Navigator" - if Navigator.Exists then Navigator.Close - Sleep 1 - Call hCloseDocument - PrintLog "Close active document" - - Call wDocSetContext - FileClose - gApplication = "WRITER" -endcase -'-------------------------------------------------------------------------------------------------------------------------------------------- diff --git a/testautomation/writer/required/includes/w_001a_.inc b/testautomation/writer/required/includes/w_001a_.inc index bc96aa2b08b8..9ae27b17cf1c 100644 --- a/testautomation/writer/required/includes/w_001a_.inc +++ b/testautomation/writer/required/includes/w_001a_.inc @@ -90,7 +90,7 @@ testcase tFileProperties Call DialogTest (TabDokumentinfo) - WarnLog "#i95523# - FileProperties - Tabpage 'User Defined' has changed. - Adaption of testcases needed." + QAErrorlog "#i95523# - FileProperties - Tabpage 'User Defined' has changed. - Adaption of testcases needed." ' printlog " Switch to Tabpage 'User defined'" ' Kontext ' active.SetPage TabBenutzer diff --git a/testautomation/writer/required/includes/w_001b_.inc b/testautomation/writer/required/includes/w_001b_.inc new file mode 100644 index 000000000000..9b62f7802bda --- /dev/null +++ b/testautomation/writer/required/includes/w_001b_.inc @@ -0,0 +1,876 @@ +'encoding UTF-8 Do not remove or change this line! +'************************************************************************** +'* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. +'* +'* Copyright 2008 by Sun Microsystems, Inc. +'* +'* OpenOffice.org - a multi-platform office productivity suite +'* +'* $RCSfile: w_001_.inc,v $ +'* +'* $Revision: 1.5 $ +'* +'* last change: $Author: rt $ $Date: 2008-09-04 09:26:17 $ +'* +'* This file is part of OpenOffice.org. +'* +'* OpenOffice.org is free software: you can redistribute it and/or modify +'* it under the terms of the GNU Lesser General Public License version 3 +'* only, as published by the Free Software Foundation. +'* +'* OpenOffice.org is distributed in the hope that it will be useful, +'* but WITHOUT ANY WARRANTY; without even the implied warranty of +'* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +'* GNU Lesser General Public License version 3 for more details +'* (a copy is included in the LICENSE file that accompanied this code). +'* +'* You should have received a copy of the GNU Lesser General Public License +'* version 3 along with OpenOffice.org. If not, see +'* <http://www.openoffice.org/license.html> +'* for a copy of the LGPLv3 License. +'* +'/************************************************************************ +'* +'* owner : fredrik.haegg@sun.com +'* +'* short description : Required-Testcases for the File-menu. +'* +'\*********************************************************************** + +sub w_001b_ + + printLog Chr(13) + "--------- File Menu (w_001b_.inc) ----------" + gApplication = "WRITER" + + Call tToolsXMLFilterSettings + Call tFileExportAsPDF + Call tExportAsPDFButton + Call tFileSendCreateMasterDocument + Call tFileSendCreateHTMLDocument + Call tFileSendOutlineToPresentation + Call tFileSendOutlineToClipboard + Call tFileSendCreateAutoabstract + Call tFileSendAutoabstractToPresentation + + 'Writer Master Document + gApplication = "MASTERDOCUMENT" + Call tMasterDocFileSaveWithPassword + Call tMasterDocFileReload + Call tMasterDocFileVersions + Call tMasterDocFileSendCreateHTMLDocument + Call tMasterDocFileSendOutlineToPresentation + Call tMasterDocFileSendOutlineToClipboard + Call tMasterDocFileSendCreateAutoabstract + Call tMasterDocFileSendAutoabstractToPresentation + gApplication = "WRITER" + +end sub + +'------------------------------------------------------------------------------- + +testcase tFileSendCreateMasterDocument + PrintLog "- File / Send / Create Masterdocument" + if gApplication <> "WRITER" then + printlog "Not in : " + gApplication + goto endsub + endif + + PrintLog "Open new document" + Call hNewDocument + Call wTypeKeys("File -> Send -> Create Master Document") + PrintLog "Choose File / Send /Create Master Document" + FileSendCreateMasterdocument + Kontext "SendMasterDocument" + + PrintLog "Cancel File-Save-dialog" + SendMasterdocument.Cancel + Kontext "Active" + if Active.Exists then Active.OK + PrintLog "Close active document" + Call hCloseDocument +endcase + +'----------------------------------------------------------- + +testcase tFileSendCreateHTMLDocument + PrintLog "- File / Send / Create HTML-Dokument" + PrintLog "Open new document" + Select Case gApplication + Case "WRITER" + Call hNewDocument + Case "MASTERDOCUMENT" + Call hNewDocument + Case "HTML" + printlog "Not in WriterWeb!" + goto endsub + end select + PrintLog "Choose File / Send / Create HTML-Document" + FileSendCreateHTMLDocument + + PrintLog "Cancel Filedialog" + Kontext "SendHTMLDocument" + SendHTMLDocument.Cancel + Kontext "Active" + if Active.Exists then Active.OK + + PrintLog "Close documents" + Do Until GetDocumentCount = 0 + Call hCloseDocument + Loop +endcase + +'----------------------------------------------------------- + +testcase tFileSendOutlineToPresentation + Dim sFile$ + PrintLog "- File / Send / Outline to Presentation" + Select Case gApplication + Case "WRITER" + sFile$ = "htmltest.sxw" + Case "MASTERDOCUMENT" + sFile$ = "htmltest.sxg" + Case "HTML" + printlog "Not in Writer/Web!" + goto endsub + end select + PrintLog "Open file ( gTesttoolPath + writer\required\input\ + htmltest.sxw )" + Call hFileOpen ( gTesttoolPath + "writer\required\input\" + sFile$ ) + Kontext "Navigator" + if Navigator.Exists then Navigator.Close + Sleep 1 + Kontext "DocumentWriter" + PrintLog "File / Send / Outline to presentation" + try + FileSendOutlineToPresentation + catch + Warnlog "#i38723#Unable to execute 'File -> Send -> Outline to Presentation'" + Call hCloseDocument + goto endsub + endcatch + Wait(500) + + Kontext "DocumentImpressOutlineView" + if DocumentImpressOutlineView.Exists then + DocumentImpressOutlineView.TypeKeys "<Mod1 Home>" + DocumentImpressOutlineView.TypeKeys "<Shift End>" + Wait(500) + try + EditCopy + if GetClipboardText <> "Seite 1." then QAErrorlog "Wrong Outline in Impress Outlinemode" + catch + QAErrorlog "Send outline to presentation doesn't work correct." + endcatch + else + WarnLog "Outlinemode comes not up!" + endif + + Kontext "Navigator" + if Navigator.Exists then Navigator.Close + PrintLog "Close documents" + Do Until GetDocumentCount = 0 + Call hCloseDocument + Loop +endcase + +'----------------------------------------------------------- + +testcase tFileSendOutlineToClipboard + Dim sFile$ + PrintLog "- File / Send / Outline to Clipboard" + Select Case gApplication + Case "WRITER" + sFile$ = "htmltest.sxw" + Case "MASTERDOCUMENT" + sFile$ = "htmltest.sxg" + Case "HTML" + printlog "Not in Writer/Web!" + goto endsub + end select + + PrintLog "Open file ( gTesttoolPath + writer\required\input\ + htmltest.sxw )" + Call hFileOpen ( gTesttoolPath + "writer\required\input\" + sFile$ ) + Sleep 1 + PrintLog "File / Send / Outline to Clipboard" + try + FileSendOutlineToClipboard + catch + Warnlog "#i38723#Unable to execute 'File -> Send -> Outline to Clipboard'" + Call hCloseDocument + goto endsub + endcatch + + Sleep 1 + PrintLog "Close active document" + Call hCloseDocument + WaitSlot(1000) + Call hNewDocument + PrintLog "Open new document" + + WaitSlot(1000) + + PrintLog "Paste outline in new document" + EditPaste + Call wTypeKeys("<Up>", 6) + Call wTypeKeys("<Home><Shift End>") + EditCopy + if GetClipboardText <> "Seite 1." then QAErrorlog "Wrong Outline in Impress Outlinemode" + WaitSlot(1000) + PrintLog "Close active document" + Call hCloseDocument +endcase + +'----------------------------------------------------------- + +testcase tFileSendCreateAutoabstract + Dim sFile$ + PrintLog "- File / Send / Create Autoabstract" + Select Case gApplication + Case "WRITER" + sFile$ = "htmltest.sxw" + Case "MASTERDOCUMENT" + sFile$ = "htmltest.sxg" + Case "HTML" + printlog "Not in Writer/Web!" + goto endsub + end select + + PrintLog "Open file ( gTesttoolPath + writer\required\input\ + htmltest.sxw )" + Call hFileOpen ( gTesttoolPath + "writer\required\input\" + sFile$ ) + Kontext "Navigator" + if Navigator.Exists then Navigator.Close + Sleep 1 + Kontext "DocumentWriter" + PrintLog "File / Send / Create Autoabstract" + try + FileSendCreateAutoabstract + catch + Warnlog "#i38723#Unable to execute 'File -> Send -> Create Autoabstract'" + Call hCloseDocument + goto endsub + endcatch + WaitSlot(2000) + + PrintLog "Close upcoming dialog with 'Ok" + Kontext "AutoAbstractErzeugen" + AutoAbstractErzeugen.OK + Sleep 1 + Call wTypeKeys("<Home><Up>", 10) + Call wTypeKeys("<Shift End>") + try + EditCopy + WaitSlot(1000) + if GetClipboardText <> "Seite 1." then QAErrorlog "Wrong Outline in Impress Outlinemode" + catch + QAErrorlog "Empty autoabstract created" + endcatch + + Kontext "Navigator" + if Navigator.Exists then Navigator.Close + Sleep 1 + + PrintLog "Close active documents" + Do Until GetDocumentCount = 0 + Call hCloseDocument + Loop +endcase + +'----------------------------------------------------------- + +testcase tFileSendAutoabstractToPresentation + Dim sFile$ + PrintLog "- File / Send / Autoabstract to Presentation" + Select Case gApplication + Case "WRITER" + sFile$ = "htmltest.sxw" + Case "MASTERDOCUMENT" + sFile$ = "htmltest.sxg" + Case "HTML" + printlog "Not in Writer/Web!" + goto endsub + end select + + PrintLog "Open file ( gTesttoolPath + writer\required\input\ + htmltest.sxw )" + Call hFileOpen ( gTesttoolPath + "writer\required\input\" + sFile$ ) + Kontext "Navigator" + if Navigator.Exists then Navigator.Close + Sleep 1 + Kontext "DocumentWriter" + PrintLog "File / Send / Create Autoabstract To Presentation" + try + FileSendAutoabstractToPresentation + catch + Warnlog "#i38723#Unable to execute 'File -> Send -> Autoabstract to Presentation'" + Call hCloseDocument + goto endsub + endcatch + + Sleep 1 + Kontext "AutoAbstractErzeugen" + PrintLog "Close upcoming dialog with 'Ok'" + AutoAbstractErzeugen.OK + + Sleep 2 + Kontext "DocumentImpressOutlineView" + if DocumentImpressOutlineView.Exists then + PrintLog "Point cursor to beginning of document" + DocumentImpressOutlineView.TypeKeys "<Mod1 Home>" + PrintLog "Mark text" + DocumentImpressOutlineView.TypeKeys "<Shift End>" + try + EditCopy + WaitSlot(1000) + if GetClipboardText <> "Seite 1." then QAErrorlog "Wrong Outline in Impress Outlinemode" + catch + QAErrorlog "Edit / copy disabled. Maybe data could not be pasted correctly!" + endcatch + else + Warnlog "- Outline in Impress not created!" + endif + Kontext "Navigator" + if Navigator.Exists then Navigator.Close + Sleep 1 + Call hCloseDocument + PrintLog "Close active document" + + Call wDocSetContext + FileClose +endcase +'-------------------------------------------------------------------------------------------------------------------------------------------- + +testcase tMasterDocFileSaveWithPassword + Dim DokumentPfad$ + Dim Datei$ + Dim sFile$ + Dim sFile2$ + + Printlog "- File / Save with Password" + sFile$ = "password.odm" + sFile2$ = "password2.odm" + + gApplication = "MASTERDOCUMENT" + PrintLog "Open new document" + Call hNewDocument + PrintLog "Enter some text into document" + Call wTypeKeys("This document will be saved with a password!") + + if gUseSysDlg = True then goto endsub + Datei$ = ConvertPath ( gOfficePath + "user\work\" + sFile$ ) + if Dir (Datei$) <> "" then kill Datei$ + + PrintLog "Choose File / Save as." + FileSaveAs + PrintLog "enter destination and check 'Password'" + Kontext "SpeichernDlg" + if Passwort.IsEnabled then + Passwort.Check + else + Warnlog "- Not able to save with Password -> Checkbox is disabled! Maybe default-filter wrong!?" + SpeichernDlg.Cancel + PrintLog "if Checkbox is disabled the test stops here!" + Call hCloseDocument + goto endsub + endif + + Dateiname.SetText Datei$ + PrintLog "Save your document" + Speichern.Click + Sleep 1 + Kontext "Active" + if Active.Exists (1) then Active.Yes + + Sleep 1 + PrintLog "Password dialog has to come up" + Kontext "PasswordFileSave" + if PasswordFileSave.Exists then + PrintLog "Enter your password" + Password.SetText "12345" + PrintLog "Re-Enter a wrong passwort" + PasswordConfirm.Settext "54321" + PasswordFileSave.OK + Sleep 2 + else + Warnlog "- Password-Dialog not up !" + endif + + Kontext "Active" + Sleep 1 + PrintLog "A messagebox has to come up, warns of wrong confirmation" + if Active.Exists(1) then + Active.OK + else + Warnlog "Able to save document with wrong password" + endif + + Kontext "PasswordFileSave" + if PasswordFileSave.Exists then + PrintLog "Enter new password, and re-enter the same password" + Password.SetText "12345" + PasswordConfirm.SetText "12345" + PasswordFileSave.OK + else + Warnlog "- Password-Dialog not up !" + endif + + Sleep 1 + PrintLog "Close the document" + FileClose + WaitSlot(2000) + PrintLog "Open previous saved document" + Call hFileOpen(Datei$) + + Kontext "PasswordFileOpen" + PrintLog "Enter a wrong password." + if PasswordFileOpen.Exists then + PasswortName.SetText "34567" + PasswordFileOpen.OK + else + Warnlog "- Password-Dialog not up or Document couldn't be loaded!" + endif + + PrintLog "A messagebox has to come up, warns of wrong password" + Kontext "Active" + Sleep 1 + if Not Active.Exists(1) then + Warnlog "Able to load document with wrong password" + else + Active.OK + endif + + Kontext "PasswordFileOpen" + PrintLog "Close password dialog" + if PasswordFileOpen.Exists then + PasswordFileOpen.Cancel + endif + + Sleep 1 + PrintLog "File / Open again your previous saved document" + Call hFileOpen(Datei$) + PrintLog "Enter your password in password dialog" + Kontext "PasswordFileOpen" + if PasswordFileOpen.Exists then + PasswortName.SetText "12345" + PasswordFileOpen.OK + else + Warnlog "- Password-Dialog not up!" + endif + Sleep 1 + + Datei$ = ConvertPath ( gOfficePath + "user\work\" + sFile2$ ) + if Dir (Datei$) <> "" then kill Datei$ + PrintLog "File / Save as ..." + FileSaveAs + Kontext "SpeichernDlg" + if Not Passwort.IsChecked = True then + if gPlatgroup = "unx" then + QAErrorlog "#i73968#Opening a password protected file looses focus after loading" + else + Warnlog "#i36015#Checkbox 'Save with password' is not checked in file-dialog !" + endif + Passwort.Check + SpeichernDlg.Cancel + else + Dateiname.SetText Datei$ + Speichern.Click + Kontext "Active" + if Active.Exists(2) then Active.Yes + PrintLog "Click on 'Save' in file open dialog" + Kontext "PasswordFileSave" + if Not PasswordFileSave.Exists(1) then + Warnlog "Passworddialog is not coming up on saving document" + else + Password.SetText "54321" + PasswordConfirm.SetText "54321" + PasswordFileSave.OK + PrintLog "The password dialog should come up" + Sleep 1 + FileClose + PrintLog "File / Close and open your document again" + Call hFileOpen(Datei$) + Sleep 1 + Kontext "PasswordFileOpen" + PrintLog "Now the passwort dialog should come up" + if Not PasswordFileOpen.Exists(2) then + Warnlog "Passworddialog is not coming up on reload" + else + PasswortName.SetText "54321" + PasswordFileOpen.OK + endif + endif + endif + PrintLog "Close active document" + Call hCloseDocument +endcase + +'----------------------------------------------------------- + +testcase tMasterDocFileReload + + Dim sDocumentPath as string + Dim sFile as string + Dim WriterFilterExtension(10) as string + Dim MasterDocFilterExtension(10) as string + + WriterFilterExtension() = hGetFilternameExtension ( "writer8" ) + MasterDocFilterExtension() = hGetFilternameExtension ( "writerglobal8" ) + + PrintLog "- File / Reload" + sFile = "reload." & MasterDocFilterExtension(0) + sDocumentPath = gOfficePath + "user\work\" + sFile + + gApplication = "MASTERDOCUMENT" + + PrintLog "Open new document" + Call hNewDocument + + PrintLog "Enter some text, save and close document" + Call wTypeKeys("File -> Reload!") + Call hFileSaveAsKill ( sDocumentPath ) + hUseAsyncSlot( "FileClose" ) + + Kontext + if ( MessageBox.Exists( 1 ) ) then + WarnLog "Messagebox after saving and closing : " + MessageBox.GetText + MessageBox.Yes + endif + + PrintLog "Open previous saved document" + Call hFileOpen ( sDocumentPath ) + + PrintLog "Insert a table in document" + Call hTabelleEinfuegen + + PrintLog "File / Reload" + hUseAsyncSlot( "FileReload" ) + + PrintLog "Quit messagebox with 'No'" + Kontext "Active" + if ( Active.exists( 1 ) ) then + Active.No + else + warnlog( "Messagebox missing" ) + endif + + PrintLog "File / Reload again and quit messagebox with yes" + hUseAsyncSlot( "FileReload" ) + + Kontext "Active" + if ( Active.exists( 2 ) ) then + Active.Yes + else + warnlog( "Messagebox missing" ) + endif + + PrintLog "Close active document" + Call hCloseDocument + hDeleteFile( sDocumentPath ) + +endcase + +'----------------------------------------------------------- + +testcase tMasterDocFileVersions + + Dim sFile as string + Dim WriterFilterExtension(10) as string + Dim MasterDocFilterExtension(10) as string + + WriterFilterExtension() = hGetFilternameExtension ( "writer8" ) + MasterDocFilterExtension() = hGetFilternameExtension ( "writerglobal8" ) + + gApplication = "MASTERDOCUMENT" + + PrintLog "- File / Versions" + sFile = "kann_weg." & MasterDocFilterExtension(0) + + PrintLog "Open new document" + Call hNewDocument + Call wTypeKeys ("File version") + + PrintLog "enter some text in documet and save it" + Call hFileSaveAsKill(gOfficePath + "user\work\" + sFile ) + + try + PrintLog "Choose File / Versions" + FileVersions + catch + Warnlog "- File / Versions not accessible!" + goto endsub + endcatch + + Kontext "Versionen" + if ( Versionen.exists( 2 ) ) then + + Call DialogTest ( Versionen ) + Speichern.Click + + PrintLog "In Version-dialog click 'Save New Version'" + Kontext "VersionskommentarEingeben" + if ( VersionskommentarEingeben.exists( 1 ) ) then + Call DialogTest ( VersionskommentarEingeben ) + + PrintLog "Cancel dialog 'Insert version comment'" + VersionskommentarEingeben.Cancel + else + warnlog( "Dialog <VersionskommentarEingeben> is not available" ) + endif + + Kontext "Versionen" + PrintLog "Close dialog" + Versionen.Close() + else + warnlog( "Dialog <Versionen> is not available" ) + endif + + PrintLog "Close active document" + Call hCloseDocument + +endcase + +'----------------------------------------------------------- + +testcase tMasterDocFileSendCreateHTMLDocument + + PrintLog "- File / Send / Create HTML-Dokument" + + gApplication = "MASTERDOCUMENT" + + PrintLog "Open new document" + Call hNewDocument + + PrintLog "Choose File / Send / Create HTML-Document" + FileSendCreateHTMLDocument + + PrintLog "Cancel Filedialog" + Kontext "SendHTMLDocument" + if ( SendHTMLDocument.exists( 2 ) ) then + SendHTMLDocument.Cancel + + Kontext "Active" + if Active.Exists( 1 ) then + warnlog( "Unexpected messgebox" & Active.getText() ) + Active.OK + endif + else + warnlog( "Dialog <SendHTMLDocument> is not available" ) + endif + + PrintLog "Close active document" + Call hCloseDocument + +endcase + +'----------------------------------------------------------- + +testcase tMasterDocFileSendOutlineToPresentation + + PrintLog "- File / Send / Outline to Presentation" + + Dim sFile as string : sFile = "htmltest.sxg" + + gApplication = "MASTERDOCUMENT" + + Call hFileOpen ( gTesttoolPath + "writer\required\input\" + sFile ) + + Kontext "Navigator" + if ( Navigator.Exists ) then + Navigator.Close + WaitSlot() + endif + + Kontext "DocumentWriter" + PrintLog "File / Send / Outline to presentation" + try + FileSendOutlineToPresentation + catch + Warnlog "#i38723#Unable to execute 'File -> Send -> Outline to Presentation'" + Call hCloseDocument + goto endsub + endcatch + + Kontext "DocumentImpressOutlineView" + if ( DocumentImpressOutlineView.Exists( 2 ) ) then + DocumentImpressOutlineView.TypeKeys "<Mod1 Home>" + DocumentImpressOutlineView.TypeKeys "<Shift End>" + hUseAsyncSlot( "EditCopy" ) + if ( GetClipboardText <> "Seite 1." ) then + QAErrorlog "Wrong Outline in Impress Outlinemode" + endif + else + WarnLog "Outlinemode comes not up!" + endif + + Kontext "Navigator" + if Navigator.Exists then + Navigator.Close + WaitSlot() + endif + + PrintLog "Close documents" + hFileCloseAll() + +endcase + +'----------------------------------------------------------- + +testcase tMasterDocFileSendOutlineToClipboard + + gApplication = "MASTERDOCUMENT" + Dim sFile as string : sFile = "htmltest.sxg" + + PrintLog "- File / Send / Outline to Clipboard" + Call hFileOpen ( gTesttoolPath + "writer\required\input\" + sFile ) + + PrintLog "File / Send / Outline to Clipboard" + try + FileSendOutlineToClipboard + catch + Warnlog "#i38723#Unable to execute 'File -> Send -> Outline to Clipboard'" + Call hCloseDocument + goto endsub + endcatch + + PrintLog "Close active document" + Call hCloseDocument + + PrintLog "Open new document" + Call hNewDocument + + PrintLog "Paste outline in new document" + hUseAsyncSlot( "EditPaste" ) + Call wTypeKeys("<Up>", 6) + Call wTypeKeys("<Home><Shift End>") + hUseAsyncSlot( "EditCopy" ) + if ( GetClipboardText <> "Seite 1." ) then + QAErrorlog "Wrong Outline in Impress Outlinemode" + endif + + PrintLog "Close active document" + Call hCloseDocument + gApplication = "WRITER" + +endcase + +'----------------------------------------------------------- + +testcase tMasterDocFileSendCreateAutoabstract + + gApplication = "MASTERDOCUMENT" + Dim sFile as string : sFile = "htmltest.sxg" + + PrintLog "- File / Send / Create Autoabstract" + Call hFileOpen ( gTesttoolPath + "writer\required\input\" + sFile ) + + Kontext "Navigator" + if ( Navigator.Exists ) then + Navigator.Close + WaitSlot() + endif + + Kontext "DocumentWriter" + PrintLog "File / Send / Create Autoabstract" + try + FileSendCreateAutoabstract + catch + Warnlog "#i38723#Unable to execute 'File -> Send -> Create Autoabstract'" + Call hCloseDocument + goto endsub + endcatch + + PrintLog "Close upcoming dialog with 'Ok" + Kontext "AutoAbstractErzeugen" + if ( AutoAbstractErzeugen.exists( 2 ) ) then + + AutoAbstractErzeugen.OK() + + Call wTypeKeys("<Home><Up>", 10) + Call wTypeKeys("<Shift End>") + + hUseAsyncSlot( "EditCopy" ) + if GetClipboardText <> "Seite 1." then + QAErrorlog "Wrong Outline in Impress Outlinemode" + endif + else + warnlog( "Dialog <AutoAbstractErzeugen> is not available" ) + endif + + Kontext "Navigator" + if ( Navigator.Exists ) then + Navigator.Close() + WaitSlot() + endif + + PrintLog "Close documents" + hFileCloseAll() + gApplication = "WRITER" + +endcase + +'----------------------------------------------------------- + +testcase tMasterDocFileSendAutoabstractToPresentation + + gApplication = "MASTERDOCUMENT" + Dim sFile as string : sFile = "htmltest.sxg" + + PrintLog "- File / Send / Autoabstract to Presentation" + PrintLog "Open file ( gTesttoolPath + writer\required\input\ + htmltest.sxw )" + Call hFileOpen ( gTesttoolPath + "writer\required\input\" + sFile ) + + Kontext "Navigator" + if Navigator.Exists then + Navigator.Close + Waitslot() + endif + + Kontext "DocumentWriter" + PrintLog "File / Send / Create Autoabstract To Presentation" + try + FileSendAutoabstractToPresentation + catch + Warnlog "#i38723#Unable to execute 'File -> Send -> Autoabstract to Presentation'" + Call hCloseDocument + goto endsub + endcatch + + Kontext "AutoAbstractErzeugen" + if ( AutoAbstractErzeugen.exists( 1 ) ) then + PrintLog "Close upcoming dialog with 'Ok'" + AutoAbstractErzeugen.OK + else + warnlog( "Dialog <AutoAbstractErzeugen> is not available" ) + endif + + Kontext "DocumentImpressOutlineView" + if ( DocumentImpressOutlineView.Exists( 2 ) ) then + + PrintLog "Point cursor to beginning of document" + DocumentImpressOutlineView.TypeKeys "<Mod1 Home>" + + PrintLog "Mark text" + DocumentImpressOutlineView.TypeKeys "<Shift End>" + try + EditCopy + WaitSlot(1000) + if GetClipboardText <> "Seite 1." then QAErrorlog "Wrong Outline in Impress Outlinemode" + catch + QAErrorlog "Edit / copy disabled. Maybe data could not be pasted correctly!" + endcatch + else + Warnlog "- Outline in Impress not created!" + endif + + Kontext "Navigator" + if Navigator.Exists then + Navigator.Close + WaitSlot() + endif + + Call hCloseDocument + PrintLog "Close active document" + + Call wDocSetContext + FileClose + gApplication = "WRITER" + +endcase +'------------------------------------------------------------------------------- diff --git a/testautomation/writer/required/includes/w_002_.inc b/testautomation/writer/required/includes/w_002_.inc index ff752ad8c300..a2dc24de62e5 100755 --- a/testautomation/writer/required/includes/w_002_.inc +++ b/testautomation/writer/required/includes/w_002_.inc @@ -89,16 +89,16 @@ testcase tEditUndoRedo PrintLog "Insert table" Call hTabelleEinfuegen PrintLog "Edit / Undo" - EditUndo - WaitSlot (1000) + hUseAsyncSlot( "EditUndo" ) + PrintLog "Undo / Redo" - EditRedo - WaitSlot (1000) + hUseAsyncSlot( "EditRedo" ) + PrintLog "Edit / Undo" - EditUndo - WaitSlot (1000) + hUseAsyncSlot( "EditUndo" ) + PrintLog "File / Close" - FileClose + hUseAsyncSlot( "FileClose" ) Kontext if ( Active.Exists ) then if Active.GetRT = 304 then @@ -123,7 +123,7 @@ testcase tEditRepeat Call wTypeKeys("<Down><Down>") PrintLog "Edit / Repeat" - EditRepeat + hUseAsyncSlot( "EditRepeat" ) PrintLog "Close active document" Call hCloseDocument @@ -141,23 +141,32 @@ testcase tEditPaste Call wTypeKeys("What a beatiful day !") PrintLog "Edit / Select All" - EditSelectAll + hUseAsyncSlot( "EditSelectAll" ) + PrintLog "Edit / Cut" - EditCut + hUseAsyncSlot( "EditCut" ) + PrintLog "Edit / Paste" - EditPaste + hUseAsyncSlot( "EditPaste" ) + PrintLog "Type <Shift Home >" Call wTypeKeys("<Shift Home>") + PrintLog "Edit / Copy" - EditCopy + hUseAsyncSlot( "EditCopy" ) + PrintLog "Enter 2 Line breaks" Call wTypeKeys("<Return>", 2) + PrintLog "Edit / Paste" - EditPaste + hUseAsyncSlot( "EditPaste" ) + PrintLog "Edit / Select All" - EditSelectAll + hUseAsyncSlot( "EditSelectAll" ) + PrintLog "Edit / Cut" - EditCut + hUseAsyncSlot( "EditCut" ) + PrintLog "Close active document" Call hCloseDocument endcase @@ -175,12 +184,12 @@ testcase tEditPasteSpecial SetClipboard "Text from external clipboard!" PrintLog "Paste from external clipboard with Edit / Paste in Office" - EditPaste - WaitSlot(1000) + hUseAsyncSlot( "EditPaste" ) + Call wTypeKeys("<Mod1 A>") Wait(200) - EditCopy - WaitSlot(1000) + hUseAsyncSlot( "EditCopy" ) + if GetClipboardText <> "Text from external clipboard!" then Warnlog "External Clipboard not available!" Warnlog "Is: " & GetClipboardText @@ -190,7 +199,7 @@ testcase tEditPasteSpecial SetClipboard "2nd Text from external clipboard!" try PrintLog "Edit / Paste / Special" - EditPasteSpecialWriter + hUseAsyncSlot( "EditPasteSpecialWriter" ) Kontext "InhaltEinfuegen" if InhaltEinfuegen.Exists then try @@ -216,7 +225,7 @@ testcase tEditPasteSpecial end if else Call wTypeKeys("<Home><Shift End>") - EditCopy + hUseAsyncSlot( "EditCopy" ) if GetClipboardText <> "2nd Text from external clipboard!" then Warnlog "Wrong Text inserted! Is: " & GetClipboardText end if else @@ -230,9 +239,10 @@ testcase tEditPasteSpecial PrintLog " - Internal Clipboard with StarOffice Writer-Text" PrintLog "Enter some text in writer and copy it" Call wTypeKeys("<Return>Text from internal clipboard<Shift Home>") - EditCopy + hUseAsyncSlot( "EditCopy" ) Call wTypeKeys("<End><Return>") - EditPasteSpecialWriter + hUseAsyncSlot( "EditPasteSpecialWriter" ) + PrintLog "Edit / Paste / Special" Kontext "InhaltEinfuegen" if InhaltEinfuegen.Exists then @@ -240,35 +250,33 @@ testcase tEditPasteSpecial Auswahl.Select 1 InhaltEinfuegen.OK Call wTypeKeys "<Home><Shift End>" - EditCopy + hUseAsyncSlot( "EditCopy" ) if GetClipboardText <> "Text from internal clipboard" then Warnlog "Wrong Text inserted! Is: " & GetClipboardText else Warnlog "Dialog 'Paste Special' is not up!" end if Call hCloseDocument PrintLog "Close active document" + endcase '---------------------------------------------------- testcase tEditSelectionMode + PrintLog " - Edit - Selection Mode" PrintLog " Open new writer document" Call hNewDocument PrintLog " Try to switch to / activate the Block-selectionmode." - try - EditSelectionModeBlock - catch + if ( hUseAsyncSlot( "EditSelectionModeBlock" ) = -1 ) then warnlog " Could not activate Blockmode via Edit-menu." - endcatch + endif PrintLog " Try to switch to / activate the Standard-selectionmode." - try - EditSelectionModeStandard - catch + if ( hUseAsyncSlot( "EditSelectionModeStandard" ) = -1 ) then warnlog " Could not activate Blockmode via Edit-menu." - endcatch + endif PrintLog " Close active document." Call hCloseDocument @@ -278,52 +286,49 @@ endcase 'tEditSelectionMode '---------------------------------------------------- testcase tEditChanges + PrintLog "- Edit/Changes" if gApplication = "HTML" then printlog "Not in WriterWeb!" goto endsub end if - Call hNewDocument + PrintLog "Open new document" + Call hNewDocument - Call wTypeKeys("Hallo<Return><Return>") PrintLog "Enter some text in document" - Wait(200) - UseBindings + Call wTypeKeys("Hallo<Return><Return>") + PrintLog "Select Edit / Changes / Record" - EditChangesRecord - WaitSlot(1000) + hUseAsyncSlot( "EditChangesRecord" ) + PrintLog "Enter some more text in document" Call wTypeKeys("Aenderung 1<Return><Up><Up><End>") Call wTypeKeys("<Backspace>", 4) - Wait(200) - UseBindings + PrintLog "Select Edit / Changes / Record" - EditChangesRecord - WaitSlot(2000) - UseBindings - EditChangesShow + hUseAsyncSlot( "EditChangesRecord" ) + PrintLog "Select Edit / Changes / Show" - WaitSlot(1000) - UseBindings + hUseAsyncSlot( "EditChangesShow" ) + PrintLog "Select Edit / Changes / Show" - EditChangesShow - WaitSlot(1000) - UseBindings + hUseAsyncSlot( "EditChangesShow" ) + PrintLog "Select Edit / Changes / Protect Trace" - EditChangesProtectTrace - WaitSlot(1000) + hUseAsyncSlot( "EditChangesProtectTrace" ) + PrintLog "Passwort-dialog has to come up, cancel it" Kontext "Passwort" - if Passwort.Exists then + if ( Passwort.Exists( 1 ) ) then Passwort.Close else Warnlog "Password-dialog is not up!" end if - UseBindings PrintLog "Edit / Changes / Accept or Reject" EditChangesAcceptOrReject + PrintLog "Dialog 'Accept or reject changes' has to come up" Kontext "Redlining" if Redlining.Exists then @@ -339,31 +344,29 @@ testcase tEditChanges end if Call wTypeKeys("<Down><Right>") - UseBindings - try - PrintLog "Point cursor into a changed text in document" - EditChangesComment - PrintLog "Edit / Changes / Comment" - catch + + PrintLog "Point cursor into a changed text in document" + PrintLog "Edit / Changes / Comment" + if ( hUseAsyncSlot( "EditChangesComment" ) = -1 ) then Call wTypeKeys("<Up>") - try - EditChangesComment - catch + if ( hUseAsyncSlot( "EditChangesComment" ) = -1 ) then Warnlog "Unable to execute 'Edit / Changes / Comment!" - endcatch - endcatch + endif + endif + Kontext "Kommentar" - WaitSlot(5000) PrintLog "Dialog to comment a change has to come up" - if Kommentar.Exists then + if ( Kommentar.Exists( 5 ) ) then Call DialogTest ( Kommentar ) Kommentar.Cancel else Warnlog "Dialog 'Comment' not opened!" PrintLog "Close dialog 'Comment'" end if - Call hCloseDocument + PrintLog "Close active document" + Call hCloseDocument + endcase '---------------------------------------------------- @@ -884,8 +887,8 @@ testcase tEditAutotext if GetDocumentCount = 1 then Warnlog "The autotext has been edited in current document!" else - FileClose - WaitSlot (1000) + hUseAsyncSlot( "FileClose" ) + Kontext "Active" PrintLog "A message that module has been changed should come up" if Active.Exists then @@ -951,7 +954,7 @@ testcase tEditHyperlink Call wDocSetContext try PrintLog "Check if correct URL has been set to document" - EditCopy + hUseAsyncSlot( "EditCopy" ) if GetClipBoardtext = "" then Warnlog "No Hyperlink or wrong hyperlink in document!" & GetClipBoardtext end if diff --git a/testautomation/writer/required/includes/w_003_.inc b/testautomation/writer/required/includes/w_003_.inc index 2befbcb13c83..77d71a9d7ba8 100755 --- a/testautomation/writer/required/includes/w_003_.inc +++ b/testautomation/writer/required/includes/w_003_.inc @@ -82,41 +82,45 @@ testcase tViewZoom printlog " View -> Zoom" ViewZoom Kontext "Massstab" - DialogTest ( Massstab ) - select case uCASE(gApplication) - case "HTML" : - printlog " check checkbox '100%'" - Vergroesserung100.check - printlog " check checkbox 'Variable'" - VergroesserungStufenlos.check - case else : - printlog " check checkbox 'Optimal'" - Optimal.check - printlog " check checkbox 'Fit height and width'" - GanzeSeite.check - printlog " check checkbox 'Fit Width'" - Seitenbreite.check - printlog " check checkbox '100%'" - Vergroesserung100.check - printlog " check checkbox 'Variable'" - VergroesserungStufenlos.check - printlog " click button MORE on 'Variable'" - Stufenlos.more - printlog " click button 'Automatic'" - Automatic.check - printlog " click button 'Single Page'" - Singlepage.check - printlog " click button 'Columns'" - Columns.check - printlog " click button MORE on 'Columns'" - Columnsfield.more - printlog " click button LESS on 'Columns'" - Columnsfield.less - printlog " Check checkbox 'Book mode'" - Bookmode.check - printlog " cancel dialog 'Zoom'" - end select - Massstab.Cancel + if ( Massstab.exists( 1 ) ) then + DialogTest ( Massstab ) + select case uCASE(gApplication) + case "HTML" : + printlog " check checkbox '100%'" + Vergroesserung100.check + printlog " check checkbox 'Variable'" + VergroesserungStufenlos.check + case else : + printlog " check checkbox 'Optimal'" + Optimal.check + printlog " check checkbox 'Fit height and width'" + GanzeSeite.check + printlog " check checkbox 'Fit Width'" + Seitenbreite.check + printlog " check checkbox '100%'" + Vergroesserung100.check + printlog " check checkbox 'Variable'" + VergroesserungStufenlos.check + printlog " click button MORE on 'Variable'" + Stufenlos.more + printlog " click button 'Automatic'" + Automatic.check + printlog " click button 'Single Page'" + Singlepage.check + printlog " click button 'Columns'" + Columns.check + printlog " click button MORE on 'Columns'" + Columnsfield.more + printlog " click button LESS on 'Columns'" + Columnsfield.less + printlog " Check checkbox 'Book mode'" + Bookmode.check + printlog " cancel dialog 'Zoom'" + end select + Massstab.Cancel + else + warnlog( "Dialog <Massstab> is not available" ) + endif printlog " close application" Call hCloseDocument endcase @@ -129,22 +133,28 @@ testcase tViewDataSources Call hNewDocument printlog " View / Data Sources" ViewCurrentDatabaseWriter - WaitSlot (5000) + Kontext "DatabaseBeamer" - if Not DatabaseBeamer.Exists then - Warnlog "Database Beamer has not been opened!" - else + if ( DatabaseBeamer.Exists( 5 ) ) then printlog " Close database beamer with : View Data Sources" ViewCurrentDatabaseWriter + Kontext "DatabaseBeamer" - if DatabaseBeamer.Exists then + if ( DatabaseBeamer.Exists() ) then Warnlog "Could not close Databasebeamer with same slot!" ViewBeamer + Kontext "DatabaseBeamer" - if DatabaseBeamer.Exists then Warnlog "Could not close Databasebeamer with Slot->View Beamer!" - end if - end if - WaitSlot(1000) + if DatabaseBeamer.Exists then + Warnlog "Could not close Databasebeamer with Slot->View Beamer!" + endif + else + printlog( "Closed Database Beamer dialog" ) + endif + else + Warnlog "Database Beamer has not been opened!" + endif + printlog " Close active document" Call hCloseDocument endcase @@ -503,7 +513,10 @@ endcase testcase tViewInputMethodStatus PrintLog "- View / Input Method Status (only Solaris)" - if Ucase(gPlatform) <> "SOLARIS" then goto endsub + if ( Ucase(gPlatform) <> "SOLARIS" ) then + printlog( "No testing for IME status for OS <> Solaris" ) + goto endsub + endif PrintLog " Open new document" Call hNewDocument @@ -526,29 +539,36 @@ endcase testcase tViewHTMLSource PrintLog "- View / HTML Source (only in HTML-Document)" - if gApplication <> "HTML" then goto endsub + if ( gApplication <> "HTML" ) then + goto endsub + endif + printlog "Open new document" Call hNewDocument printlog "View / HTML-Source" AnsichtHTMLQuelltext - WaitSlot (1000) + printlog "Save-As dialog has to come up" Kontext "SpeichernDlg" - Dateiname.Settext Convertpath(gofficepath + "user\work\sourcecode.html") - printlog "Save sourcecode" - Speichern.Click - Kontext "Active" - If Active.Exists then - if Active.GetRT = 304 then - try - Active.Yes - catch - Warnlog Active.Gettext - Active.Ok - endcatch + if ( SpeichernDlg.exists( 1 ) ) then + Dateiname.Settext Convertpath(gofficepath + "user\work\sourcecode.html") + printlog "Save sourcecode" + Speichern.Click() + Kontext "Active" + If Active.Exists then + if Active.GetRT = 304 then + try + Active.Yes + catch + Warnlog Active.Gettext + Active.Ok + endcatch + end if end if - end if - wait 500 + else + warnlog( "Dialog <SpeichernDlg> is not available" ) + endif + Kontext "DocumentHTMLSourceView" DocumentHTMLSourceView.TypeKeys "Check for bug: #116402" wait 500 @@ -567,17 +587,20 @@ testcase tHtmlDocViewZoom Call hNewDocument printlog " type something into the document" hTypekeys "<RETURN>", 3 - UseBindings + printlog " View -> Zoom" ViewZoom Kontext "Massstab" - DialogTest ( Massstab ) - printlog " check checkbox '100%'" - Vergroesserung100.check - printlog " check checkbox 'Variable'" - VergroesserungStufenlos.check - Massstab.Cancel - + if ( Massstab.exists( 1 ) ) then + DialogTest ( Massstab ) + printlog " check checkbox '100%'" + Vergroesserung100.check + printlog " check checkbox 'Variable'" + VergroesserungStufenlos.check + Massstab.Cancel + else + warnlog( "Dialog <Massstab> is not available" ) + endif printlog " close application" Call hCloseDocument gApplication = "WRITER" diff --git a/testautomation/writer/required/includes/w_004_.inc b/testautomation/writer/required/includes/w_004_.inc index 6406176da25e..79254e9347b8 100755 --- a/testautomation/writer/required/includes/w_004_.inc +++ b/testautomation/writer/required/includes/w_004_.inc @@ -236,10 +236,13 @@ testcase tInsertFieldsOther exit do end if Loop - Sleep 5 + Kontext "ScriptSelector" - Sleep 1 - ScriptSelector.Close + if ( ScriptSelector.exists( 5 ) ) then + ScriptSelector.Close + else + warnlog( "Dialog <ScriptSelector> is not available" ) + endif Kontext "TabFunktionen" i=100 end if @@ -362,25 +365,26 @@ testcase tInsertHyperlink Call wEinfuegenHyperlink(3) wait 500 Call DialogTest ( TabHyperlinkDokument ) - if gUseSysDlg = False then - DateiOeffnen.Click - Sleep 1 - Kontext "OeffnenDlg" + + DateiOeffnen.Click + + Kontext "OeffnenDlg" + if ( OeffnenDlg.exists( 1 ) ) then OeffnenDlg.Cancel - Sleep 1 - end if + else + warnlog( "Dialog <OeffnenDlg> is not available" ) + endif Kontext "Hyperlink" printlog "- New Document" Call wEinfuegenHyperlink(4) wait 500 Call DialogTest ( TabHyperlinkNeuesDokument ) - if gUseSysDlg = False then - Pfad.Click - Sleep 1 - Kontext "OeffnenDlg" - OeffnenDlg.Cancel - end if + + Pfad.Click + Sleep 1 + Kontext "OeffnenDlg" + OeffnenDlg.Cancel Kontext "TabHyperlinkNeuesDokument" TabHyperlinkNeuesDokument.Cancel @@ -540,8 +544,11 @@ testcase tInsertCrossReference end if Loop Kontext "ScriptSelector" - Sleep 1 - ScriptSelector.Close + if ( ScriptSelector.exists( 3 ) ) then + ScriptSelector.Close + else + warnlog( "Dialog <ScriptSelector> is not available" ) + endif Kontext "TabFunktionen" i=100 end if @@ -765,15 +772,15 @@ testcase tInsertIndexesBibliographyEntry end if printlog " Open new document" Call hNewDocument - Sleep 2 - + printlog " Insert / Indexes and Tables / Bibliography Entry " - InsertIndexesBibliographyEntry + hUseAsyncSlot( "InsertIndexesBibliographyEntry" ) + Kontext "Active" - if Active.Exists then + if ( Active.Exists() ) then Do try - if Active.GetRT = 304 then + if ( Active.GetRT = 304 ) then Warnlog Active.Gettext Active.Ok end if @@ -784,17 +791,27 @@ testcase tInsertIndexesBibliographyEntry end if Kontext "LiteratureintragEinfuegen" - Call DialogTest ( LiteratureintragEinfuegen ) - printlog " In dialog 'Insert Bibliography Entry' click 'Edit'" - EintragBearbeiten.Click - - Kontext "LiteratureintragDefinieren" - Call DialogTest ( LiteratureintragDefinieren ) - printlog " Close dialog 'Define Bibliography Entry'" - LiteratureintragDefinieren.Close - Kontext "LiteratureintragEinfuegen" - printlog " Close dialog 'Insert Bibliography Entry'" - EintragSchliessen.Click + if ( LiteratureintragEinfuegen.exists( 1 ) ) then + Call DialogTest ( LiteratureintragEinfuegen ) + + printlog " In dialog 'Insert Bibliography Entry' click 'Edit'" + EintragBearbeiten.Click + + Kontext "LiteratureintragDefinieren" + if ( LiteratureintragDefinieren.exists( 1 ) ) then + Call DialogTest ( LiteratureintragDefinieren ) + printlog " Close dialog 'Define Bibliography Entry'" + LiteratureintragDefinieren.Close + else + warnlog( "Dialog <LiteratureintragDefinieren> is not available" ) + endif + + Kontext "LiteratureintragEinfuegen" + printlog " Close dialog 'Insert Bibliography Entry'" + EintragSchliessen.Click + else + warnlog( "Dialog <LiteratureintragEinfuegen> is not available" ) + endif printlog " Close active document" Call hCloseDocument endcase @@ -1051,10 +1068,9 @@ testcase tInsertGraphicsFromFile printlog " Select as graphic to insert: '...\writer\required\input\graphics\jolink.jpg" Dateiname.Settext ConvertPath ( gTesttoolPath + "writer\required\input\graphics\jolink.jpg" ) Oeffnen.Click - sleep 1 Kontext "Active" - if Active.Exists then + if Active.Exists( 1 ) then Warnlog Active.Gettext Active.Ok Kontext "GrafikEinfuegenDlg" @@ -1109,7 +1125,7 @@ testcase tInsertGraphicsFromFile Do j = j + 1 Kontext "Active" - if Active.Exists then + if Active.Exists() then if Active.GetRT = 304 then if j = 1 then Warnlog Active.Gettext Active.Ok @@ -1342,30 +1358,28 @@ testcase tInsertFile printlog " Open new document" Call hNewDocument - if gUseSysDlg = False then - InsertFileWriter - printlog " Insert / File" - WaitSlot (3000) - Kontext "OeffnenDlg" - WaitSlot (2000) - printlog " Check 'File dialog'" - if OeffnenDlg.Exists then - Call DialogTest ( OeffnenDlg ) - try - Standard.Click - catch - Exceptlog - endcatch + InsertFileWriter + WaitSlot( 2000 ) + + printlog " Insert / File" + Kontext "OeffnenDlg" + + printlog " Check 'File dialog'" + if OeffnenDlg.Exists( 2 ) then + Call DialogTest ( OeffnenDlg ) + try + Standard.Click + catch + Exceptlog + endcatch - Kontext "Active" - if Active.Exists then - Warnlog Active.Gettext - Active.Ok - else - Kontext "OeffnenDlg" - OeffnenDlg.Cancel - end if - Sleep 1 + Kontext "Active" + if Active.Exists then + Warnlog Active.Gettext + Active.Ok + else + Kontext "OeffnenDlg" + OeffnenDlg.Cancel end if end if @@ -1505,10 +1519,13 @@ testcase tHtmlDocInsertFieldsOther exit do end if Loop - Sleep 5 + Kontext "ScriptSelector" - Sleep 1 - ScriptSelector.Close + if ( ScriptSelector.exists( 3 ) ) then + ScriptSelector.Close + else + warnlog( "Dialog <ScriptSelector> is not available" ) + endif Kontext "TabFunktionen" i=100 end if @@ -1549,11 +1566,15 @@ testcase tHtmlDocInsertSection Kontext "TabBereiche" Call DialogTest (TabBereiche) Verknuepfung.Check - if gUseSysDlg = False then - Auswaehlen.Click - Kontext "OeffnenDlg" + + Auswaehlen.Click + Kontext "OeffnenDlg" + if ( OeffnenDlg.exists( 1 ) ) then OeffnenDlg.Cancel - end if + else + warnlog( "Dialog <OeffnenDlg> is not available" ) + endif + Wait 500 Kontext printlog "- Tabpage Columns" @@ -1684,10 +1705,9 @@ testcase tHtmlDocInsertGraphicsFromFile printlog " Select as graphic to insert: '...\writer\required\input\graphics\jolink.jpg" Dateiname.Settext ConvertPath ( gTesttoolPath + "writer\required\input\graphics\jolink.jpg" ) Oeffnen.Click - sleep 1 Kontext "Active" - if Active.Exists then + if Active.Exists( 1 ) then Warnlog Active.Gettext Active.Ok Kontext "GrafikEinfuegenDlg" diff --git a/testautomation/writer/required/includes/w_005_.inc b/testautomation/writer/required/includes/w_005_.inc index d5dd9fcb08d8..cec32343a16a 100755 --- a/testautomation/writer/required/includes/w_005_.inc +++ b/testautomation/writer/required/includes/w_005_.inc @@ -101,8 +101,8 @@ testcase tFormatSections Kontext "TabBereiche" Bereichsliste.SetText "Mein Bereich" TabBereiche.OK - sleep(5) - FormatSections + + hUseAsyncSlot( "FormatSections" ) Kontext "BereicheBearbeiten" Call Dialogtest(BereicheBearbeiten) Optionen.Click @@ -126,15 +126,24 @@ testcase tFormatSections Active.Ok end if end If - Sleep 1 + Kontext "GrafikEinfuegenDlg" - GrafikEinfuegenDlg.Cancel - Sleep 1 + if ( GrafikEinfuegenDlg.exists( 1 ) ) then + GrafikEinfuegenDlg.Cancel + WaitSlot ' NOOP + else + warnlog( "Dialog <GrafikEinfuegenDlg> is not available" ) + endif + Kontext "TabHintergrund" TabHintergrund.Cancel - sleep(1) + Kontext "BereicheBearbeiten" - BereicheBearbeiten.Cancel + if ( BereicheBearbeiten.exists( 1 ) ) then + BereicheBearbeiten.Cancel + else + warnlog( "Dialog <BereicheBearbeiten> is not available" ) + endif printlog " Close active document" Call hCloseDocument endcase @@ -183,14 +192,12 @@ testcase tFormatCharacter Kontext "TabHyperlinkZeichen" Call DialogTest ( TabHyperlinkZeichen ) - if gUSeSysDlg = False then - Durchsuchen.Click - Kontext "OeffnenDlg" - if OeffnenDlg.Exists then - OeffnenDlg.Cancel - else - Warnlog "File-Open dialog is not up!" - end if + Durchsuchen.Click + Kontext "OeffnenDlg" + if OeffnenDlg.Exists( 1 ) then + OeffnenDlg.Cancel + else + Warnlog "File-Open dialog is not up!" end if Kontext "TabHyperlinkZeichen" @@ -234,35 +241,37 @@ testcase tFormatChangeCase Call wTypeKeys ("Hello World!") Call wTypeKeys ("<Shift Home>") - Wait 500 printlog " Format / Case Characters / Upper" - FormatChangeCaseUpper - WaitSlot(500) + hUseAsyncSlot( "FormatChangeCaseUpper" ) + printlog " Format / Case Characters / Lower" - FormatChangeCaseLower - WaitSlot(500) - if gAsianSup = True then + hUseAsyncSlot( "FormatChangeCaseLower" ) + + if ( gAsianSup ) then try FormatChangeCaseHalfWidth printlog " Format / Case Characters / Half Width" catch Warnlog "Format / Change Case / Half Width does not work. Maybe no Asian support!" endcatch - WaitSlot(500) + WaitSlot() + try printlog " Format / Case Characters / Full Width" FormatChangeCaseFullWidth catch Warnlog "Format / Change Case / Full Width does not work. Maybe no Asian support!" endcatch - WaitSlot(500) + WaitSlot() + try printlog " Format / Case Characters / Hiragana" FormatChangeCaseHiragana catch Warnlog "Format / Change Case / Hiragana does not work. Maybe no Asian support!" endcatch - WaitSlot(500) + WaitSlot() + try printlog " Format / Case Characters / Katagana" FormatChangeCaseKatagana @@ -303,9 +312,9 @@ testcase tFormatRuby printlog " Open Stylist" CallStylist.Click - wait 500 + Kontext "Stylist" - if Stylist.Exists then + if Stylist.Exists( 1 ) then Stylist.close else Warnlog "Stylist has not been opened!" @@ -357,7 +366,7 @@ testcase tFormatParagraph kontext "TabTextfluss" Call DialogTest ( TabTextfluss ) - if gAsianSup = True then + if ( gAsianSup ) then try Kontext Active.SetPage TabAsianTypography @@ -436,9 +445,13 @@ testcase tFormatPage Als.Select 2 Call DialogTest ( TabHintergrund, 2 ) Durchsuchen.Click - Sleep 1 + Kontext "GrafikEinfuegenDlg" - GrafikEinfuegenDlg.Cancel + if ( GrafikEinfuegenDlg.exists( 1 ) ) then + GrafikEinfuegenDlg.Cancel + else + warnlog( "Dialog <GrafikEinfuegenDlg> is not available" ) + endif Kontext active.SetPage TabKopfzeile @@ -556,21 +569,21 @@ testcase tFormatNumberingBullets Kontext "TabOptionenNumerierung" Call DialogTest ( TabOptionenNumerierung ) Numerierung.Select 9 - if gUseSysDlg = False then - try - Auswahl.Click - catch - QAErrorlog "Numbering option 'Linked graphics' is missing" - TabOptionenNumerierung.Cancel - Call hCloseDocument - goto endsub - endcatch - Sleep 2 - Call hMenuSelectNr (1) - Sleep 2 - Kontext "OeffnenDlg" - OeffnenDlg.Cancel - end if + + try + Auswahl.Click + catch + QAErrorlog "Numbering option 'Linked graphics' is missing" + TabOptionenNumerierung.Cancel + Call hCloseDocument + goto endsub + endcatch + Sleep 2 + Call hMenuSelectNr (1) + Sleep 2 + Kontext "OeffnenDlg" + OeffnenDlg.Cancel + Kontext "TabOptionenNumerierung" Sleep 1 @@ -622,28 +635,31 @@ testcase tFormatStylist Zeichenvorlagen.Click printlog " Click all Styles-buttons in Stylist" if gApplication <> "HTML" then - Sleep 1 + WaitSlot() Rahmenvorlagen.Click - Sleep 1 + WaitSlot() Seitenvorlagen.Click end if - Sleep 1 + WaitSlot() Numerierungsvorlagen.Click - Sleep 1 + WaitSlot() Absatzvorlagen.Click - Sleep 1 + WaitSlot() TBGestalterRight.Click Giesskanne - Sleep 1 + WaitSlot() AusSelektion.OpenMenu Sleep 1 hMenuSelectNr(1) - Sleep 1 + Kontext "VorlageErzeugen" - DialogTest ( VorlageErzeugen ) - VorlageErzeugen.Cancel - Sleep 1 + if ( VorlageErzeugen.exists( 1 ) ) then + DialogTest ( VorlageErzeugen ) + VorlageErzeugen.Cancel + else + warnlog( "Dialog <VorlageErzeugen> is not available" ) + endif Kontext "Gestalter" AusSelektion.OpenMenu @@ -653,10 +669,14 @@ testcase tFormatStylist AusSelektion.OpenMenu Sleep 1 hMenuSelectNr(3) - Sleep 10 + Kontext "Neu" - DialogTest ( Neu ) - Neu.Cancel + if ( Neu.exists( 10 ) ) then + DialogTest ( Neu ) + Neu.Cancel + else + warnlog( "Dialog <Neu> is not available" ) + endif printlog " Close Stylist" Kontext "Gestalter" @@ -885,10 +905,8 @@ testcase tFormatAnchorArea Call hNewDocument printlog " Paste a rectangle from draw via clipboard" Call wRectangleToClipboard - WaitSlot (2000) - EditPaste - WaitSlot (2000) + hUseAsyncSlot( "EditPaste" ) try printlog " Format / Anchor / To page" @@ -927,8 +945,7 @@ testcase tFormatWrapArea printlog " Paste a rectangle from draw via clipboard" Call wRectangleToClipboard - EditPaste - WaitSlot (2000) + hUseAsyncSlot( "EditPaste" ) try printlog " Format / Wrap / No wrap" @@ -1077,9 +1094,13 @@ testcase tHtmlDocFormatPage Als.Select 2 Call DialogTest ( TabHintergrund, 2 ) Durchsuchen.Click - Sleep 1 + Kontext "GrafikEinfuegenDlg" - GrafikEinfuegenDlg.Cancel + if ( GrafikEinfuegenDlg.exists( 1 ) ) then + GrafikEinfuegenDlg.Cancel + else + warnlog( "Dialog <GrafikEinfuegenDlg> is not available" ) + endif Kontext active.SetPage TabKopfzeile @@ -1115,40 +1136,54 @@ testcase tHtmlDocFormatStylist Call DialogTest ( Gestalter ) Zeichenvorlagen.Click printlog " Click all Styles-buttons in Stylist" - Sleep 1 + WaitSlot() + Numerierungsvorlagen.Click - Sleep 1 + WaitSlot() + Absatzvorlagen.Click - Sleep 1 + WaitSlot() TBGestalterRight.Click Giesskanne - Sleep 1 + WaitSlot() AusSelektion.OpenMenu - Sleep 1 - hMenuSelectNr(1) - Sleep 1 + wait( 500 ) + hMenuSelectNr( 1 ) + Kontext "VorlageErzeugen" - DialogTest ( VorlageErzeugen ) - VorlageErzeugen.Cancel - Sleep 1 + if ( VorlageErzeugen.exists( 1 ) ) then + DialogTest ( VorlageErzeugen ) + VorlageErzeugen.Cancel + else + warnlog( "Dialog <VorlageErzeugen> is not available" ) + endif + Kontext "Gestalter" - AusSelektion.OpenMenu - Sleep 1 - hMenuSelectNr(2) - - AusSelektion.OpenMenu - Sleep 1 - hMenuSelectNr(3) - Sleep 10 - Kontext "Neu" - DialogTest ( Neu ) - Neu.Cancel + if ( Gestalter.exists( 1 ) ) then + AusSelektion.OpenMenu + wait( 500 ) + hMenuSelectNr(2) + + AusSelektion.OpenMenu + wait( 500 ) + hMenuSelectNr(3) + + Kontext "Neu" + if ( Neu.exists( 10 ) ) then + DialogTest ( Neu ) + Neu.Cancel + else + warnlog( "Dialog <Neu> is not available" ) + endif - printlog " Close Stylist" - Kontext "Gestalter" - Gestalter.Close + printlog " Close Stylist" + Kontext "Gestalter" + Gestalter.Close + else + warnlog( "Dialog <Gestalter> is not available" ) + endif printlog " Close active document" Call hCloseDocument diff --git a/testautomation/writer/required/includes/w_005b_.inc b/testautomation/writer/required/includes/w_005b_.inc index cb8b2298ca20..a1ac654246cb 100755 --- a/testautomation/writer/required/includes/w_005b_.inc +++ b/testautomation/writer/required/includes/w_005b_.inc @@ -191,21 +191,21 @@ testcase tFormatArrange catch Warnlog "'Bring to front' couldn't be executed!" endcatch - WaitSlot (1000) + WaitSlot() try FormatArrangeBringForward printlog " Format / Arrange / Bring forward" catch Warnlog "'Bring forward' couldn't be executed!" endcatch - WaitSlot (1000) + WaitSlot() try FormatArrangeSetBackward printlog " Format / Arrange / Set backward" catch Warnlog "'Send backward' couldn't be executed!" endcatch - WaitSlot (1000) + WaitSlot() try FormatArrangeSendToBack printlog " Format / Arrange / Send to back" @@ -235,7 +235,7 @@ testcase tFormatAlignment try printlog " Format / Alignment / Left" FormatAlignmentLeft - WaitSlot (1000) + WaitSlot() catch Warnlog "'Alignment left' couldn't be executed!" endcatch @@ -243,7 +243,7 @@ testcase tFormatAlignment try printlog " Format / Alignment / Right" FormatAlignmentRight - WaitSlot (1000) + WaitSlot() catch Warnlog "'Alignment right' couldn't be executed!" endcatch @@ -251,7 +251,7 @@ testcase tFormatAlignment try printlog " Format / Alignment / Top" FormatAlignmentTop - WaitSlot (1000) + WaitSlot() catch Warnlog "'Alignment top' couldn't be executed!" endcatch @@ -259,7 +259,7 @@ testcase tFormatAlignment try printlog " Format / Alignment / Center" FormatAlignmentCenter - WaitSlot (1000) + WaitSlot() catch Warnlog "'Alignment center' couldn't be executed!" endcatch @@ -267,7 +267,7 @@ testcase tFormatAlignment try printlog " Format / Alignment / Bottom" FormatAlignmentBottom - WaitSlot (1000) + WaitSlot() catch Warnlog "'Alignment bottom' couldn't be executed!" endcatch @@ -364,16 +364,16 @@ testcase tFormatArrangeObject Call wInsertFrame printlog " Format / Arrange / Bring to front" FormatArrangeBringToFrontCalc - WaitSlot (1000) + WaitSlot() printlog " Format / Arrange / Bring forward" FormatArrangeBringForward - WaitSlot (1000) + WaitSlot() printlog " Format / Arrange / Set backward" FormatArrangeSetBackward - WaitSlot (1000) + WaitSlot() printlog " Format / Arrange / Send to back " FormatArrangeSendToBack - WaitSlot (1000) + WaitSlot() printlog " Close active document" Call hCloseDocument endcase @@ -392,22 +392,22 @@ testcase tFormatAlignmentObject Call wInsertFrame printlog " Format / Alignment / Left" FormatAlignmentLeft - WaitSlot (1000) + WaitSlot() printlog " Format / Alignment / Centered" FormatAlignmentCentered - WaitSlot (1000) + WaitSlot() printlog " Format / Alignment / Right" FormatAlignmentRight - WaitSlot (1000) + WaitSlot() printlog " Format / Alignment / Top" FormatAlignmentTop - WaitSlot (1000) + WaitSlot() printlog " Format / Alignment / Center" FormatAlignmentCenter - WaitSlot (1000) + WaitSlot() printlog " Format / Alignment / Bottom" FormatAlignmentBottom - WaitSlot (1000) + WaitSlot() printlog " Close active document" Call hCloseDocument endcase @@ -423,16 +423,16 @@ testcase tFormatAnchorObject Call wInsertFrame printlog " Format / Anchor / to page" FormatAnchorToPage - WaitSlot (1000) + WaitSlot() printlog " Format / Anchor / to paragraph" FormatAnchorToParagraph - WaitSlot (1000) + WaitSlot() printlog " Format / Anchor / to character" FormatAnchorToCharacter - WaitSlot (1000) + WaitSlot() printlog " Format / Anchor / as character" FormatAnchorAsCharacter - WaitSlot (1000) + WaitSlot() printlog " Close active document" Call hCloseDocument endcase @@ -449,25 +449,25 @@ testcase tFormatWrapObject Call hNewDocument printlog " Insert a frame" Call wInsertFrame - WaitSlot (1000) + WaitSlot() printlog " Format / Wrap / no wrap" FormatWrapNoWrap - WaitSlot (1000) + WaitSlot() printlog " Format / Wrap / page wrap" FormatWrapPageWrap - WaitSlot (1000) + WaitSlot() printlog " Format / Wrap / optimal page wrap" FormatWrapOptimalPageWrap - WaitSlot (1000) + WaitSlot() printlog " Format / Wrap / through" FormatWrapThrough - WaitSlot (1000) + WaitSlot() printlog " Format / Wrap / in background" FormatWrapInBackground - WaitSlot (1000) + WaitSlot() printlog " Format / Wrap / first paragraph" FormatWrapFirstParagraph - WaitSlot (1000) + WaitSlot() try printlog " Format / Wrap / Contour" FormatWrapContour @@ -480,10 +480,13 @@ testcase tFormatWrapObject printlog " Format / Wrap / Edit Contour" FormatWrapEditContour Kontext "KonturEditor" - WaitSlot (2000) - Warnlog "Wrap / Edit Contour should not be enabled for frames ! (Bug#90964)" - printlog " Close 'Contour Editor'" - KonturEditor.Close + if ( KonturEditor.exists( 2 ) ) then + Warnlog "Wrap / Edit Contour should not be enabled for frames ! (Bug#90964)" + printlog " Close 'Contour Editor'" + KonturEditor.Close + else + warnlog( "Dialog <KonturEditor> is not available" ) + endif catch endcatch Kontext @@ -502,25 +505,25 @@ testcase tFormatLine printlog "Not in WriterWeb!" goto endsub end if - printlog "crashed because of i32539 (fixed in m54)" printlog " Open new document" Call hNewDocument printlog " Insert a rectangle" Call wRectangleToClipboard + printlog " Edit / Paste" - EditPaste - Sleep (1) + hUseAsyncSlot( "EditPaste" ) + - try printlog " Format / Line" - FormatLine - catch + if ( hUseAsyncSlot( "FormatLine" ) = -1 ) then Warnlog "Clipboard problem between applications!" Call wZeichenobjektEinfuegen ( "Rechteck", 40, 40, 50, 50 ) Call gMouseClick ( 45, 45 ) - FormatLine - endcatch + if ( hUseAsyncSlot( "FormatLine" ) = -1 ) then + warnlog( "Failed to execute slot <FormatLine>" ) + endif + endif Kontext printlog " Step through all tabpages" @@ -585,17 +588,15 @@ testcase tFormatArea printlog " Insert a rectangle" Call wRectangleToClipboard - EditPaste - Sleep (1) - try - printlog " Format / Area" - FormatArea - catch + hUseAsyncSlot( "EditPaste" ) + + printlog " Format / Area" + if ( hUseAsyncSlot( "FormatArea" ) = -1 ) then Warnlog "Clipboard problem between applications!" Call wZeichenobjektEinfuegen ( "Rechteck", 40, 40, 50, 50 ) Call gMouseClick ( 45, 45 ) FormatArea - endcatch + endif Kontext wait 500 @@ -625,11 +626,15 @@ testcase tFormatArea Call DialogTest ( TabFarben ) Bearbeiten.Click - Sleep 1 + Kontext "FarbeDlg" - Call DialogTest ( FarbeDlg ) - FarbeDlg.cancel - Sleep 1 + if ( FarbeDlg.exists( 1 ) ) then + Call DialogTest ( FarbeDlg ) + FarbeDlg.cancel + WaitSlot() + else + warnlog( "Dialog <FarbeDlg> is not available" ) + endif Kontext active.SetPage TabFarbverlaeufe @@ -646,9 +651,6 @@ testcase tFormatArea Call DialogTest ( TabSchraffuren) try Aendern.Click - Kontext "NameDlg" - Call DialogTest ( NameDlg ) - NameDlg.Cancel catch Warnlog "Button 'Modify' does not work!" if Tabelle.GetItemcount = 0 then @@ -656,6 +658,14 @@ testcase tFormatArea end if endcatch + Kontext "NameDlg" + if ( NameDlg.exists( 1 ) ) then + Call DialogTest ( NameDlg ) + NameDlg.Cancel + else + warnlog( "Dialog <NameDlg> is not available" ) + endif + Kontext active.SetPage TabBitmap kontext "TabBitmap" @@ -663,18 +673,27 @@ testcase tFormatArea try Aendern.Click - Kontext "NameDlg" - Call DialogTest ( NameDlg ) - NameDlg.cancel catch WarnLog "#36902#Modify is disabled. Wrong default-list loaded" endcatch + Kontext "NameDlg" + if ( NameDlg.exists( 1 ) ) then + Call DialogTest ( NameDlg ) + NameDlg.Cancel + else + warnlog( "Dialog <NameDlg> is not available" ) + endif + kontext "TabBitmap" Import.Click Kontext "GrafikEinfuegenDlg" - Call DialogTest ( GrafikEinfuegenDlg ) - GrafikEinfuegenDlg.Cancel + if ( GrafikEinfuegenDlg.exists( 1 ) ) then + Call DialogTest ( GrafikEinfuegenDlg ) + GrafikEinfuegenDlg.Cancel + else + warnlog( "Dialog <GrafikEinfuegenDlg> is not available" ) + endif printlog " Close Tabdialog" kontext "TabBitmap" @@ -691,7 +710,6 @@ testcase tFormatText printlog "Not in WriterWeb!" goto endsub end if - printlog "crashed because of i32539 (fixed in m54)" printlog " Open new document" Call hNewDocument @@ -736,24 +754,23 @@ testcase tFormatPositionAndSize printlog "Not in WriterWeb!" goto endsub end if - printlog "crashed because of i32539 (fixed in m54)" printlog " Open new document" Call hNewDocument printlog " Paste a rectangle from draw via clipboard" Call wRectangleToClipboard - EditPaste - Sleep (1) + hUseAsyncSlot( "EditPaste" ) - try - printlog " Format Position and Size" - ContextPositionAndSize - catch + printlog " Format Position and Size" + if ( hUseAsyncSlot( "ContextPositionAndSize" ) = -1 ) then Warnlog "Clipboard problem between applications!" Call wZeichenobjektEinfuegen ( "Rechteck", 40, 40, 50, 50 ) Call gMouseClick ( 45, 45 ) - ContextPositionAndSize - endcatch + if ( hUseAsyncSlot( "ContextPositionAndSize" ) = -1 ) then + warnlog( "Failed to execute slot <ContextPositionAndSize>" ) + endif + endif + printlog " Step through all tabpages" Kontext @@ -781,33 +798,34 @@ endcase '----------------------------------------------------------- testcase tFormatFlip + PrintLog "- Format / Flip drawing objects" if gApplication = "HTML" then printlog "Not in WriterWeb!" goto endsub end if - printlog "crashed because of i32539 (fixed in m54)" - + printlog " Open new document" Call hNewDocument + printlog " Paste a rectangle from draw via clipboard" Call wRectangleToClipboard - EditPaste - Sleep(1) + hUseAsyncSlot( "EditPaste" ) - try - printlog " Format / Flip vertically" - FormatFlipVertically - catch + printlog " Format / Flip vertically" + if ( hUseAsyncSlot( "FormatFlipVertically" ) = -1 ) then Warnlog "Clipboard problem between applications!" Call wZeichenobjektEinfuegen ( "Rechteck", 40, 40, 50, 50 ) Call gMouseClick ( 45, 45 ) - FormatFlipVertically - endcatch + if ( hUseAsyncSlot( "FormatFlipVertically" ) = -1 ) then + warnlog( "Failed to execute slot <FormatFlipVertically>" ) + endif + endif + WaitSlot (3000) printlog " Format / Flip horizontally" - FormatFlipHorizontally + hUseAsyncSlot( "FormatFlipHorizontally" ) printlog " Close active document" Call hCloseDocument endcase @@ -815,40 +833,41 @@ endcase '----------------------------------------------------------- testcase tFormatArrangeArea + PrintLog "- Format / Arrange drawing objects" if gApplication = "HTML" then printlog "Not in WriterWeb!" goto endsub end if - printlog "crashed because of i32539 (fixed in m54)" - + printlog " Open new document" Call hNewDocument + printlog " Paste a rectangle from draw via clipboard" Call wRectangleToClipboard - EditPaste - Sleep (1) + hUseAsyncSlot( "EditPaste" ) + + printlog " Format / Arrange / Bring to front" + if ( hUseAsyncSlot( "FormatArrangeBringToFrontCalc" ) = -1 ) then - try - printlog " Format / Arrange / Bring to front" - FormatArrangeBringToFrontCalc - catch Warnlog "Clipboard problem between applications!" Call wZeichenobjektEinfuegen ( "Rechteck", 40, 40, 50, 50 ) Call gMouseClick ( 45, 45 ) - FormatArrangeBringToFrontCalc - endcatch + if ( hUseAsyncSlot( "FormatArrangeBringToFrontCalc" ) = -1 ) then + warnlog( "Failed to execute slot <FormatArrangeBringToFrontCalc>" ) + endif + endif - WaitSlot (1000) + WaitSlot() printlog " Format / Arrange / Bring Forward" FormatArrangeBringForward - WaitSlot (1000) + WaitSlot() printlog " Format / Arrange / Set backward" FormatArrangeSetBackward - WaitSlot (1000) + WaitSlot() printlog " Format / Arrange / Send to back" FormatArrangeSendToBack - WaitSlot (1000) + WaitSlot() printlog " Close active document" Call hCloseDocument @@ -873,7 +892,7 @@ testcase tFormatAlignmentArea try printlog " Format / Anchor / As Character" FormatAnchorAsCharacter - WaitSlot (1000) + WaitSlot() catch Warnlog "Anchor could not be set to character! No test!" Call hCloseDocument @@ -884,7 +903,7 @@ testcase tFormatAlignmentArea try printlog " Format / Object / Alignment left" FormatObjectAlignmentLeft - WaitSlot (1000) + WaitSlot() catch Warnlog "Format / Object / Alignment / Left could not be executed!" endcatch @@ -892,7 +911,7 @@ testcase tFormatAlignmentArea try printlog " Format / Object / Alignment centered" FormatObjectAlignmentCentered - WaitSlot (1000) + WaitSlot() catch Warnlog "Format / Object / Alignment / Centered could not be executed!" endcatch @@ -900,7 +919,7 @@ testcase tFormatAlignmentArea try printlog " Format / Object / Alignment right" FormatObjectAlignmentRight - WaitSlot (1000) + WaitSlot() catch Warnlog "Format / Object / Alignment / Right could not be executed!" endcatch @@ -908,7 +927,7 @@ testcase tFormatAlignmentArea try printlog " Format / Object / Alignment Top" FormatObjectAlignmentTop - WaitSlot (1000) + WaitSlot() catch Warnlog "Format / Object / Alignment / Top could not be executed!" endcatch @@ -916,7 +935,7 @@ testcase tFormatAlignmentArea try printlog " Format / Object / Alignment Center" FormatObjectAlignmentCenter - WaitSlot (1000) + WaitSlot() catch Warnlog "Format / Object / Alignment / Center could not be executed!" endcatch @@ -924,7 +943,7 @@ testcase tFormatAlignmentArea try printlog " Format / Object / Alignment bottom" FormatObjectAlignmentBottom - WaitSlot (1000) + WaitSlot() catch Warnlog "Format / Object / Alignment / Bottom could not be executed!" endcatch @@ -1033,7 +1052,6 @@ testcase tFormatFontwork printlog "Not in WriterWeb!" goto endsub end if - printlog "crashed because of i32539 (fixed in m54)" printlog " Open new document" Call hNewDocument @@ -1080,16 +1098,12 @@ testcase tFormatPositionAndSizeLegend sleep (1) Call wObjektSelektieren(43, 33, 75, 75) - sleep (1) - try - printlog " Format / Position and size" - FormatPositionAndSize - catch + if ( hUseAsyncSlot( "FormatPositionAndSize" = -1 ) ) then Warnlog "Format / Position and Size does not work! Maybe object not selected!" printlog " Close active document" Call hCloseDocument goto endsub - endcatch + endif printlog " In upcoming dialog step through all tabpages" Kontext @@ -1135,41 +1149,41 @@ testcase tFormatStyleEdit Call wTypeKeys ("a") printlog " Format / Style / Italic" FormatStyleItalic - WaitSlot (1000) + WaitSlot() printlog " Insert a letter in text object" Call wTypeKeys ("a") printlog " Format / Style / Underline" FormatStyleUnderline - WaitSlot (1000) + WaitSlot() printlog " Insert a letter in text object" Call wTypeKeys ("a") printlog " Format /Style / Strike through" UseBindings FormatStyleStrikeThrough - WaitSlot (1000) + WaitSlot() printlog " Insert a letter in text object" Call wTypeKeys ("b") printlog " Format / Style / Shadow" UseBindings FormatStyleShadow - WaitSlot (1000) + WaitSlot() printlog " Insert a letter in text object" Call wTypeKeys ("b") printlog " Format / Style / Outline" UseBindings FormatStyleOutline - WaitSlot (1000) + WaitSlot() printlog " Insert a letter in text object" Call wTypeKeys ("b") printlog " Format / Style / Superscript" FormatStyleSuperscript - WaitSlot (1000) + WaitSlot() printlog " Insert a letter in text object" Call wTypeKeys ("a") printlog " Format / Style / Subscript " FormatStyleSubscript - WaitSlot (1000) + WaitSlot() printlog " Insert a letter in text object" Call wTypeKeys ("a") Kontext "Drawbar" @@ -1204,16 +1218,16 @@ testcase tFormatAlignmentEdit Call wTypeKeys ("Ein Wort") printlog " Format / Alignment / Left" FormatAlignmentLeftText - WaitSlot (1000) + WaitSlot() printlog " Format / Alignment / Right" FormatAlignmentRightText - WaitSlot (1000) + WaitSlot() printlog " Format / Alignment / Centered" FormatAlignmentCenteredText - WaitSlot (1000) + WaitSlot() printlog " Format Alignment / Justify" FormatAlignmentJustifiedText - WaitSlot (1000) + WaitSlot() Kontext "Drawbar" Drawbar.Close @@ -1245,15 +1259,15 @@ testcase tFormatLineSpacing printlog " Format / Line Spacing / Single line" FormatLineSpacingSingleLine - WaitSlot (1000) + WaitSlot() printlog " Format / Line Spacing / 1.5 line" FormatLineSpacing15Lines - WaitSlot (1000) + WaitSlot() printlog " Format / Line spacing / Double" FormatLineSpacingDouble - WaitSlot (1000) + WaitSlot() Kontext "Drawbar" Drawbar.Close @@ -1406,7 +1420,7 @@ testcase tHtmlDocFormatAlignment try printlog " Format / Alignment / Left" FormatAlignmentLeft - WaitSlot (1000) + WaitSlot() catch Warnlog "'Alignment left' couldn't be executed!" endcatch @@ -1414,7 +1428,7 @@ testcase tHtmlDocFormatAlignment try printlog " Format / Alignment / Right" FormatAlignmentRight - WaitSlot (1000) + WaitSlot() catch Warnlog "'Alignment right' couldn't be executed!" endcatch @@ -1422,7 +1436,7 @@ testcase tHtmlDocFormatAlignment try printlog " Format / Alignment / Top" FormatAlignmentTop - WaitSlot (1000) + WaitSlot() catch Warnlog "'Alignment top' couldn't be executed!" endcatch @@ -1430,7 +1444,7 @@ testcase tHtmlDocFormatAlignment try printlog " Format / Alignment / Center" FormatAlignmentCenter - WaitSlot (1000) + WaitSlot() catch Warnlog "'Alignment center' couldn't be executed!" endcatch @@ -1438,7 +1452,7 @@ testcase tHtmlDocFormatAlignment try printlog " Format / Alignment / Bottom" FormatAlignmentBottom - WaitSlot (1000) + WaitSlot() catch Warnlog "'Alignment bottom' couldn't be executed!" endcatch diff --git a/testautomation/writer/required/includes/w_007_.inc b/testautomation/writer/required/includes/w_007_.inc index a1f9c5bfe09d..2c53d767d928 100755 --- a/testautomation/writer/required/includes/w_007_.inc +++ b/testautomation/writer/required/includes/w_007_.inc @@ -679,11 +679,13 @@ testcase tToolsMailMergeWizard Call hNewDocument printlog " Open new document" ToolsMailMergeWizard - WaitSlot (5000) + printlog " Tools / Mail Merge Wizard" Kontext "MailMergeWizard" - if Not MailMergeWizard.Exists then - Warnlog "MailMerge Wizard is not up! Test ends here!" + if ( MailMergeWizard.Exists( 5 ) ) then + printlog( "Dialog <MailmergeWizard> is available" ) + else + Warnlog( "FATAL: Dialog <MailmergeWizard> not available" ) Call hCloseDocument goto endsub end if @@ -694,21 +696,25 @@ testcase tToolsMailMergeWizard Wait 500 printlog " Click document 'Browse' button" BrowseDocument.Click - wait 500 + Kontext "OeffnenDlg" - if Not OeffnenDlg.Exists then - Warnlog "Filedialog not up on document 'Browse' button" - else + if ( OeffnenDlg.Exists( 1 ) ) then OeffnenDlg.Cancel + else + Warnlog "Filedialog not up on document 'Browse' button" end if Kontext "TabMailMergeSourceDocument" printlog " Click template 'Browse' button" BrowseTemplate.Click - wait 500 + Kontext "Neu" - Call DialogTest ( Neu ) - Neu.Cancel + if ( Neu.exists( 1 ) ) then + Call DialogTest ( Neu ) + Neu.Cancel + else + warnlog( "Dialog <Neu> is not available" ) + endif Kontext "TabMailMergeSourceDocument" printlog " Check 'Use the current document' radio button" @@ -730,18 +736,19 @@ testcase tToolsMailMergeWizard wait 500 printlog " Click 'Select Address List'" SelectAddressListButton.Click - Wait 500 + Kontext "Active" - if Active.Exists then + if ( Active.Exists( 1 ) ) then if Active.GetRT = 304 then Warnlog Active.Gettext Active.Ok end if end if - Sleep 1 + Kontext "SelectAddressList" - Call DialogTest ( SelectAddressList ) - if Not SelectAddressList.Exists then + if ( SelectAddressList.exists( 2 ) ) then + Call DialogTest ( SelectAddressList ) + else Warnlog "Problems selecting addresses" Kontext "MailMergeWizard" MailMergeWizard.Cancel @@ -751,27 +758,33 @@ testcase tToolsMailMergeWizard printlog " In 'Select address list' dialog click 'Add'" Add.Click - wait 500 + Kontext "OeffnenDlg" - if Not OeffnenDlg.Exists then - Warnlog "Filedialog not up on template 'Browse' button" - else + if ( OeffnenDlg.Exists( 1 ) ) then OeffnenDlg.Cancel - end if + else + Warnlog "Filedialog not up on template 'Browse' button" + endif Kontext "SelectAddressList" - printlog " In 'Select address list' dialog click 'Create'" - Create.Click - wait 500 + if ( SelectAddressList.exists( 1 ) ) then + printlog " In 'Select address list' dialog click 'Create'" + Create.Click + else + warnlog( "Dialog <SelectAddressList> is not available" ) + endif Kontext "NewAddressList" - Call DialogTest ( NewAddressList ) - printlog " In 'New address' dialog click 'Find' button" - Find.Click - wait 500 + if ( NewAddressList.exists( 1 ) ) then + Call DialogTest ( NewAddressList ) + printlog " In 'New address' dialog click 'Find' button" + Find.Click + else + warnlog( "Dialog <NewAddressList> is not available" ) + endif Kontext "FindEntry" - if FindEntry.Exists then + if ( FindEntry.Exists( 1 ) ) then Call DialogTest ( FindEntry ) FindEntry.Cancel else @@ -781,10 +794,9 @@ testcase tToolsMailMergeWizard printlog " In 'New address' dialog click 'Customize' button" Kontext "NewAddressList" Customize.Click - wait 500 Kontext "CustomizeAddressList" - if CustomizeAddressList.Exists then + if ( CustomizeAddressList.Exists( 1 ) ) then Call DialogTest ( CustomizeAddressList ) printlog " In 'Customize Addresss List' dialog select first entry in list" AddressListElements.Select 1 @@ -806,16 +818,29 @@ testcase tToolsMailMergeWizard else Warnlog "Dialog 'Customize Address List' is not up" end if + printlog " Close all open dialogs" - wait 500 + Kontext "NewAddressList" - NewAddressList.Cancel - wait 500 + if ( NewAddressList.exists( 1 ) ) then + NewAddressList.Cancel + else + warnlog( "Dialog <NewAddressList> is not available" ) + endif + Kontext "SelectAddressList" - SelectAddressList.Cancel + if ( SelectAddressList.exists( 1 ) ) then + SelectAddressList.Cancel + else + warnlog( "Dialog <SelectAddressList> is not available" ) + endif Kontext "MailMergeWizard" - MailMergeWizard.Cancel + if ( MailMergeWizard.exists( 1 ) ) then + MailMergeWizard.Cancel + else + warnlog( "Dialog <MailMergeWizard> is not available" ) + endif printlog " Close active document" Call hCloseDocument @@ -898,15 +923,15 @@ testcase tToolsUpdate Call wTypeKeys ("Dieser Text ist zur Aktualisierung") printlog " Insert / Indexes" InsertIndexes - WaitSlot (2000) + Kontext "Active" - if Active.Exists then + if ( Active.Exists( 2 ) ) then if active.GetRT = 304 then Warnlog Active.Gettext Active.Ok end if end if - Sleep 2 + Kontext Active.Setpage TabVerzeichnisseVerzeichnis printlog " Close upcoming Index dialog" @@ -956,21 +981,18 @@ endcase testcase tToolsHangulHanjaConversion - WarnLog "#i96838# - tToolsHangulHanjaConversion outcommented due to unreability." - goto endsub - Dim bAsianLanguage as Boolean Dim sTestFile as String + + if ( gApplication = "MASTERDOCUMENT" ) then + goto endsub + endif - if gApplication = "HTML" then - sTestFile = Convertpath (gTesttoolpath + "writer\required\input\hangul.html") - else - if Ucase(gApplication) = "MASTERDOCUMENT" then - goto endsub - else - sTestFile = Convertpath (gTesttoolpath + "writer\required\input\hangul.sxw") - end if - end if + select case gApplication + case "HTML" : sTestFile = gTesttoolpath & "writer\required\input\hangul.html" + case "WRITER" : sTestFile = gTesttoolpath & "writer\required\input\hangul.sxw" + case default : goto endsub + end select PrintLog "- Tools / HangulHanjaConversion" @@ -978,7 +1000,7 @@ testcase tToolsHangulHanjaConversion bAsianLanguage = ActiveDeactivateAsianSupport(TRUE) printlog " Open the test file" - Call hFileOpen (sTestFile) + hFileOpen (sTestFile) Call sMakeReadOnlyDocumentEditable Call wTypeKeys("<MOD1 Home>") @@ -1106,8 +1128,6 @@ endcase ' ------------------------------------------- testcase tHtmlDocToolsHangulHanjaConversion - WarnLog "#96838# - tToolsHangulHanjaConversion outcommented due to unreability." - goto endsub Dim bAsianLanguage as Boolean Dim sTestFile as String @@ -1180,52 +1200,58 @@ endcase ' ------------------------------------------- testcase tMasterDocToolsHyphenation - Dim DieDatei as string + + Dim sTestFile as string Dim LingFile as string gApplication = "MASTERDOCUMENT" PrintLog "- Tools / Hyphenation" ' As long as OOo has no modules for that, disabled - if gOOO = True then + if ( gOOO ) then printlog "No hyphenation in OOo" goto endsub end if - if gBuild < 9239 then - QAErrorlog "Hyphenation dialog freezes office!" - goto endsub - end if - select case iSprache - case 1,01 : LingFile = "01-44-hyph.dat" - DieDatei = ConvertPath( gTesttoolpath + "writer\required\input\linguistik\001.odt" ) - case 7,07 : DieDatei = ConvertPath( gTesttoolpath + "writer\required\input\linguistik\007.odt" ) - case 3,03 : DieDatei = ConvertPath( gTesttoolpath + "writer\required\input\linguistik\003.odt" ) - case 81 : Printlog "- No Hyphenation in Japanese!" + case 1,01 + LingFile = "01-44-hyph.dat" + sTestFile = gTesttoolpath + "writer\required\input\linguistik\001.odt" + case 7,07 + sTestFile = gTesttoolpath + "writer\required\input\linguistik\007.odt" + case 3,03 + sTestFile = gTesttoolpath + "writer\required\input\linguistik\003.odt" + case 81 + Printlog "- No Hyphenation in Japanese!" goto endsub - case 82 : Printlog "- No Hyphenation in Korean!" + case 82 + Printlog "- No Hyphenation in Korean!" goto endsub - case 86 : Printlog "- No Hyphenation in Chinese (simplified)!" + case 86 + Printlog "- No Hyphenation in Chinese (simplified)!" goto endsub - case 88 : Printlog "- No Hyphenation in Chinese (traditional)!" + case 88 + Printlog "- No Hyphenation in Chinese (traditional)!" goto endsub - case else : DieDatei = ConvertPath( gTesttoolpath + "writer\required\input\linguistik\0" + trim$(str$(iSprache)) + ".odt" ) + case else + sTestFile = gTesttoolpath + "writer\required\input\linguistik\0" + trim$(str$(iSprache)) + ".odt" LingFile = str$(iSprache) + "-hyph.dat" end select + + sTestFile = convertpath( sTestFile ) - if hFileExists(DieDatei) = False then + if ( not hFileExists( sTestFile ) )then Warnlog "No defined Errortext for language: " + isprache + "! Exit!" goto endsub end if - if wInsertDocumentinMasterDoc(DieDatei) = False then + if ( not wInsertDocumentinMasterDoc( sTestFile ) ) then Warnlog "Loading document did not work!" goto endsub else Call hNewDocument printlog " Open new document" - EditPaste - end if + hUseAsyncSlot( "EditPaste" ) + endif Call sMakeReadOnlyDocumentEditable printlog " Insert file 'writer\required\input\linguistik\0 + [OfficeLanguage] + '.odt'" @@ -1234,35 +1260,48 @@ testcase tMasterDocToolsHyphenation ToolsLanguageHyphenate printlog " Tools / Hyphenate" + + ' This is probably a workaround to make the hyphenation dialog work in any case. Kontext "Active" - try - Active.Yes - catch - endcatch - if Active.Exists then - if Active.GetRT = 304 then - Active.Ok - ' Force pagesize change to bringup Hyphenation-dialog - FormatPageWriter - Kontext - active.SetPage TabSeite - Kontext "TabSeite" - Breite.Settext "15" - TabSeite.Ok - Sleep 1 - ToolsLanguageHyphenate + if ( Active.exists( 1 ) ) then + + ' JSK: These messagboxes were originally handled silently. + ' So i have no idea which of those is expected and which is not... + printlog( "Messagebox: " & Active.getText() ) + try + printlog( "Trying to close messageboy with <YES>" ) + Active.Yes + catch + printlog( "<YES> failed... (Whatever that means)" ) + endcatch + + + if ( Active.Exists() ) then + printlog( "Messagebx: " & Active.getText() ) + if ( Active.GetRT() = 304 ) then + Active.Ok + ' Force pagesize change to bringup Hyphenation-dialog + FormatPageWriter + Kontext + active.SetPage TabSeite + Kontext "TabSeite" + Breite.Settext "15" + TabSeite.Ok + WaitSlot() + ToolsLanguageHyphenate + end if end if - end if + endif Kontext "Silbentrennung" printlog " Close upcoming 'Hyphenation' dialog" - if Silbentrennung.Exists then + if ( Silbentrennung.Exists( 2 ) ) then Call DialogTest ( Silbentrennung ) Silbentrennung.Cancel else Warnlog "Dialog 'Hyphenation' not up!" Kontext "Active" - if Active.Exists then + if ( Active.Exists() ) then try Active.Ok catch @@ -1271,8 +1310,7 @@ testcase tMasterDocToolsHyphenation end if printlog " Close active documents" - Do Until GetDocumentCount = 0 - Call hCloseDocument - Loop + hFileCloseAll() + gApplication = "WRITER" endcase diff --git a/testautomation/writer/required/includes/w_010_.inc b/testautomation/writer/required/includes/w_010_.inc index 2740a5fb5ee0..d466b89527f5 100755 --- a/testautomation/writer/required/includes/w_010_.inc +++ b/testautomation/writer/required/includes/w_010_.inc @@ -74,7 +74,7 @@ sub w_010_ gApplication = "MASTERDOCUMENT" Call tMasterDocFormatting gApplication = "WRITER" - + end sub '----------------------------------------------------------- @@ -381,10 +381,13 @@ testcase tNumSubpointsUpDown printlog " Click 'Numbering' in Object bar" Call wTypeKeys ("Numbering <Return><Tab>", 2) Call wTypeKeys ("<Tab>Numbering<Up><Up><Up>") - Sleep 1 Kontext "NumObjectbar" - if Not NumObjectbar.Exists then Call hToolbarSelect("BULLETSANDNUMBERING", true) + if ( NumObjectbar.Exists( 1 ) ) then + ' all good + else + Call hToolbarSelect("BULLETSANDNUMBERING", true) + endif printlog " - 6 times subpoints down" printlog " click 6 times subpoints down in object bar" diff --git a/testautomation/writer/required/includes/w_011_.inc b/testautomation/writer/required/includes/w_011_.inc index 82faaab6f668..6a2822442edb 100755 --- a/testautomation/writer/required/includes/w_011_.inc +++ b/testautomation/writer/required/includes/w_011_.inc @@ -136,7 +136,7 @@ testcase tGraphicFilters end if sleep (1) - if CheckForFilters=False then + if ( CheckForFilters=False ) then printlog "Close active document" Call hCloseDocument goto endsub diff --git a/testautomation/writer/required/includes/w_020_.inc b/testautomation/writer/required/includes/w_020_.inc index d07c6500d05d..e3634ebde88a 100755 --- a/testautomation/writer/required/includes/w_020_.inc +++ b/testautomation/writer/required/includes/w_020_.inc @@ -88,40 +88,47 @@ testcase t_TB_Insert printlog " - Graphic" Kontext "Insertbar" - if Not Insertbar.Exists then Call hToolbarSelect("Insert", true) + if ( Insertbar.Exists ) then + ' all good + else + Call hToolbarSelect("Insert", true) + endif wait 500 - if gUSeSysDlg = False then - printlog " Click 'Insert Graphics' in Toolbox" - if Grafik.IsEnabled then - Grafik.Click - Kontext "GrafikEinfuegenDlg" - if GrafikEinfuegenDlg.Exists then - printlog " Select graphic from file '..\writer\required\input\graphics\jolink.jpg'" - Dateiname.SetText ( ConvertPath ( gTesttoolPath + "writer\required\input\graphics\jolink.jpg" ) ) - Oeffnen.Click - else - Warnlog "Dialog 'Insert Graphic' not up!" - end if - Sleep 1 - Kontext "Active" - if Active.Exists then - Warnlog Active.Gettext - Active.Ok - Kontext "GrafikEinfuegenDlg" - GrafikEinfuegenDlg.Cancel - end if - printlog " Hit 'Delete' to remove graphic" - Call wTypeKeys ("<Delete>") + + printlog " Click 'Insert Graphics' in Toolbox" + if Grafik.IsEnabled then + Grafik.Click + Kontext "GrafikEinfuegenDlg" + if GrafikEinfuegenDlg.Exists then + printlog " Select graphic from file '..\writer\required\input\graphics\jolink.jpg'" + Dateiname.SetText ( ConvertPath ( gTesttoolPath + "writer\required\input\graphics\jolink.jpg" ) ) + Oeffnen.Click else - Warnlog "Button 'Graphic' on Insertbar is not enabled!" + Warnlog "Dialog 'Insert Graphic' not up!" + end if + + Kontext "Active" + if Active.Exists( 1 ) then + Warnlog Active.Gettext + Active.Ok + Kontext "GrafikEinfuegenDlg" + GrafikEinfuegenDlg.Cancel end if + printlog " Hit 'Delete' to remove graphic" + Call wTypeKeys ("<Delete>") + else + Warnlog "Button 'Graphic' on Insertbar is not enabled!" end if - Sleep 2 printlog " - Table" printlog " Click 'Insert Table' in Toolbox" Kontext "Insertbar" - if Not Insertbar.Exists then Call hToolbarSelect("Insert", true) + if ( Insertbar.Exists() ) then + ' No action required + else + Call hToolbarSelect("Insert", true) + endif + if Tabelle.IsEnabled then Tabelle.Click Kontext "TabelleEinfuegenWriter" @@ -357,9 +364,13 @@ testcase t_TB_Form printlog " Open new document" Call hNewDocument - Sleep 1 + Kontext "FormControls" - if Not FormControls.Exists then Call hToolbarSelect("Controls", true) + if ( FormControls.Exists( 1 ) ) then + 'do nothing + else + Call hToolbarSelect("Controls", true) + endif try printlog " Tear off 'Form' Toolbox" @@ -435,7 +446,7 @@ testcase t_TB_Form Call sMenufunktionen("-Listbox-") Kontext "FormControls" - if Ucase(gApplication) <> "HTML" then + if ( gApplication <> "HTML" ) then Combobox.Click printlog " Insert a Combobox from toolbox" Wait 500 @@ -448,7 +459,7 @@ testcase t_TB_Form printlog " Insert a Formatted Field from toolbox" Kontext "FormControls" - if Ucase(gApplication) <> "HTML" then + if ( gApplication <> "HTML" ) then FormattedField.Click Wait 500 Call hMalZeichnenMitSelektion ( 45, 50, 55, 55 ) @@ -487,16 +498,20 @@ testcase t_TB_EditAutotext Sleep 2 Autotext.Click printlog " Click 'Autotext' in Toolbar" - wait 500 + Kontext "Active" - if Active.Exists then + if ( Active.Exists( 1 ) ) then Active.Gettext Active.Ok end if - Sleep 5 + Kontext "Autotext" - printlog " Close upcoming 'Autotext' dialog" - Autotext.Close + if ( Autotext.exists( 4 ) ) then + printlog " Close upcoming 'Autotext' dialog" + Autotext.Close + else + warnlog( "Dialog <Autotext> is not available" ) + endif printlog " Close active document" Call hCloseDocument endcase @@ -666,30 +681,29 @@ testcase tHtmlDoc_TB_Insert Kontext "Insertbar" if Not Insertbar.Exists then Call hToolbarSelect("Insert", true) wait 500 - if gUSeSysDlg = False then - if Grafik.IsEnabled then - Grafik.Click - Kontext "GrafikEinfuegenDlg" - if GrafikEinfuegenDlg.Exists then - printlog " Select graphic from file '..\writer\required\input\graphics\jolink.jpg'" - Dateiname.SetText ( ConvertPath ( gTesttoolPath + "writer\required\input\graphics\jolink.jpg" ) ) - Oeffnen.Click - else - Warnlog "Dialog 'Insert Graphic' not up!" - end if - Sleep 1 - Kontext "Active" - if Active.Exists then - Warnlog Active.Gettext - Active.Ok - Kontext "GrafikEinfuegenDlg" - GrafikEinfuegenDlg.Cancel - end if - printlog " Hit 'Delete' to remove graphic" - Call wTypeKeys ("<Delete>") + + if Grafik.IsEnabled then + Grafik.Click + Kontext "GrafikEinfuegenDlg" + if ( GrafikEinfuegenDlg.Exists( 1 ) ) then + printlog " Select graphic from file '..\writer\required\input\graphics\jolink.jpg'" + Dateiname.SetText ( ConvertPath ( gTesttoolPath + "writer\required\input\graphics\jolink.jpg" ) ) + Oeffnen.Click else - Warnlog "Button 'Graphic' on Insertbar is not enabled!" + Warnlog "Dialog 'Insert Graphic' not up!" + end if + + Kontext "Active" + if ( Active.Exists( 1 ) ) then + Warnlog Active.Gettext + Active.Ok + Kontext "GrafikEinfuegenDlg" + GrafikEinfuegenDlg.Cancel end if + printlog " Hit 'Delete' to remove graphic" + Call wTypeKeys ("<Delete>") + else + Warnlog "Button 'Graphic' on Insertbar is not enabled!" end if Sleep 2 @@ -809,9 +823,11 @@ testcase tHtmlDoc_TB_Form printlog " Open new document" Call hNewDocument - Sleep 1 + Kontext "FormControls" - if Not FormControls.Exists then + if ( FormControls.Exists( 1 ) ) then + ' do nothing + else Call hToolbarSelect("Controls", true) end if diff --git a/testautomation/writer/required/w_updt.bas b/testautomation/writer/required/w_updt.bas index a2b4f7d79649..582dfff86904 100755 --- a/testautomation/writer/required/w_updt.bas +++ b/testautomation/writer/required/w_updt.bas @@ -44,6 +44,7 @@ sub main use "writer\required\includes\w_001_.inc" use "writer\required\includes\w_001a_.inc" + use "writer\required\includes\w_001b_.inc" use "writer\required\includes\w_002_.inc" use "writer\required\includes\w_003_.inc" use "writer\required\includes\w_004_.inc" @@ -60,9 +61,10 @@ sub main Printlog "******* Ressource-Test Writer Document *******" - Call hStatusIn ( "writer", "w_updt.bas","Writer Update-Test" ) + Call hStatusIn ( "writer", "w_updt.bas" ) Call w_001_ ' Menu File Call w_001a_ ' Menu File + Call w_001b_ ' Menu File Call w_002_ ' Menu Edit Call w_003_ ' Menu View Call w_004_ ' Menu Insert diff --git a/testautomation/writer/tools/includes/w_get_locale_strings.inc b/testautomation/writer/tools/includes/w_get_locale_strings.inc index d8a7e8730c0e..72246a84d0e2 100644 --- a/testautomation/writer/tools/includes/w_get_locale_strings.inc +++ b/testautomation/writer/tools/includes/w_get_locale_strings.inc @@ -1,7 +1,7 @@ 'encoding UTF-8 Do not remove or change this line! '************************************************************************** '* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. -'* +'* '* Copyright 2008 by Sun Microsystems, Inc. '* '* OpenOffice.org - a multi-platform office productivity suite @@ -42,7 +42,7 @@ sub w_get_locale_strings Call wAllFieldNames Call wUsedInTableTest Call wUsedInLoadSaveTests - + end sub '------------------------------------------------------------------------------------------------ @@ -53,42 +53,42 @@ testcase wAllFieldNames printlog " get all field descriptions (used in w_tools.inc)" Call hNewDocument - + InsertFieldsOther for i = 1 to 5 - Kontext + Kontext Select Case i - Case 1 - printlog "Tabpage Document" - Active.Setpage TabDokumentFeldbefehle - Kontext "TabDokumentFeldbefehle" - Case 2 - printlog "Tabpage References" - Active.Setpage TabReferenzen - Kontext "TabReferenzen" - Case 3 - printlog "Tabpage Functions" - Active.Setpage TabFunktionen - Kontext "TabFunktionen" - Case 4 - printlog "Tabpage DocInformation" - Active.Setpage TabDokumentInfoFeldbefehle - Kontext "TabDokumentInfoFeldbefehle" - Case 5 - printlog "Tabpage Variables" - Active.Setpage TabVariablen - Kontext "TabVariablen" + Case 1 + printlog "Tabpage Document" + Active.Setpage TabDokumentFeldbefehle + Kontext "TabDokumentFeldbefehle" + Case 2 + printlog "Tabpage References" + Active.Setpage TabReferenzen + Kontext "TabReferenzen" + Case 3 + printlog "Tabpage Functions" + Active.Setpage TabFunktionen + Kontext "TabFunktionen" + Case 4 + printlog "Tabpage DocInformation" + Active.Setpage TabDokumentInfoFeldbefehle + Kontext "TabDokumentInfoFeldbefehle" + Case 5 + printlog "Tabpage Variables" + Active.Setpage TabVariablen + Kontext "TabVariablen" end select - if i = 4 then + if i = 4 then for j = 1 to Feldtyp.GetItemCount Feldtyp.Select j Feldtyp.TypeKeys "+" next j - end if - + end if + for j = 1 to Feldtyp.GetItemCount - Feldtyp.Select j + Feldtyp.Select j printlog "- " & Feldtyp.GetSelText next j next i @@ -99,13 +99,13 @@ endcase testcase wUsedInTableTest - Dim pos as integer + Dim pos as integer Dim wTableName as string printlog " gets all strings which are used in '.\\optional\\w_table.bas'" printlog " add these entries into file : .\\optional\input\\table\\locale.txt" Call hNewDocument - + InsertTableWriter Kontext "TabelleEinfuegenWriter" TabelleEinfuegenWriter.Ok @@ -146,8 +146,8 @@ testcase wUsedInTableTest wTableName = TabellenName.Gettext pos = Instr(wTableName, "2") if pos > 0 then - wTableName = Left$(wTableName, pos -1) - end if + wTableName = Left$(wTableName, pos -1) + end if printlog "Table: " & wTableName TabelleEinfuegenWriter.Cancel @@ -161,24 +161,24 @@ testcase wUsedInLoadSaveTests Call hNewDocument printlog "- All filters from open dialog:" - FileOpen - Kontext "OeffnenDlg" - For i = 1 to Dateityp.GetItemCount - Dateityp.Select i - printlog " - " & Dateityp.GetSelText - next i + FileOpen + Kontext "OeffnenDlg" + For i = 1 to Dateityp.GetItemCount + Dateityp.Select i + printlog " - " & Dateityp.GetSelText + next i - OeffnenDlg.Cancel + OeffnenDlg.Cancel printlog "- All filters from save dialog:" - FileSaveAs - Kontext "SpeichernDlg" - For i = 1 to Dateityp.GetItemCount - Dateityp.Select i - printlog " - " & Dateityp.GetSelText - next i - - SpeichernDlg.Cancel + FileSaveAs + Kontext "SpeichernDlg" + For i = 1 to Dateityp.GetItemCount + Dateityp.Select i + printlog " - " & Dateityp.GetSelText + next i + + SpeichernDlg.Cancel Call hCloseDocument endcase diff --git a/testautomation/writer/tools/includes/w_locale_strings2.inc b/testautomation/writer/tools/includes/w_locale_strings2.inc index bde88232aaf4..54d8cc12f446 100755 --- a/testautomation/writer/tools/includes/w_locale_strings2.inc +++ b/testautomation/writer/tools/includes/w_locale_strings2.inc @@ -1,7 +1,7 @@ 'encoding UTF-8 Do not remove or change this line! '************************************************************************** '* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. -'* +'* '* Copyright 2008 by Sun Microsystems, Inc. '* '* OpenOffice.org - a multi-platform office productivity suite @@ -33,7 +33,7 @@ '* '* owner : fredrik.haegg@sun.com '* -'* short description : defining locale dependant strings for language guessing +'* short description : defining locale dependant strings for language guessing '* '\*********************************************************************** function wGetLanguageGuessString(sValue as string, iLanguageCount as integer) as string 'function for getting strings out of this file @@ -69,305 +69,305 @@ function wGetLanguageGuessString(sValue as string, iLanguageCount as integer) as '///Case 11: german///' Select Case iSprache 'Detecting Office language - Case 01 'Case 01: english + Case 01 'Case 01: english '----------------------------------------------------------------------- Select Case iLanguageCount - Case 1: WordPreSet = "Word is English (USA)" - ParagraphPreSet = "Paragraph is English (USA)" - Case 2: WordPreSet = "Word is Portuguese (Portugal)" - ParagraphPreSet = "Paragraph is Portuguese (Portugal)" - Case 3: WordPreSet = "Word is Russian" - ParagraphPreSet = "Paragraph is Russian" - Case 4: WordPreSet = "Word is Dutch (Netherlands)" - ParagraphPreSet = "Paragraph is Dutch (Netherlands)" - Case 5: WordPreSet = "Word is French (France)" - ParagraphPreSet = "Paragraph is French (France)" - Case 6: WordPreSet = "Word is Spanish (Spain)" - ParagraphPreSet = "Paragraph is Spanish (Spain)" - Case 7: WordPreSet = "Word is Hungarian" - ParagraphPreSet = "Paragraph is Hungarian" - Case 8: WordPreSet = "Word is Italian (Italy)" - ParagraphPreSet = "Paragraph is Italian (Italy)" - Case 9: WordPreSet = "Word is Swedish (Sweden)" - ParagraphPreSet = "Paragraph is Swedish (Sweden)" - Case 10:WordPreSet = "Word is Polish" - ParagraphPreSet = "Paragraph is Polish" - Case 11:WordPreSet = "Word is German (Germany)" - ParagraphPreSet = "Paragraph is German (Germany)" + Case 1: WordPreSet = "Word is English (USA)" + ParagraphPreSet = "Paragraph is English (USA)" + Case 2: WordPreSet = "Word is Portuguese (Portugal)" + ParagraphPreSet = "Paragraph is Portuguese (Portugal)" + Case 3: WordPreSet = "Word is Russian" + ParagraphPreSet = "Paragraph is Russian" + Case 4: WordPreSet = "Word is Dutch (Netherlands)" + ParagraphPreSet = "Paragraph is Dutch (Netherlands)" + Case 5: WordPreSet = "Word is French (France)" + ParagraphPreSet = "Paragraph is French (France)" + Case 6: WordPreSet = "Word is Spanish (Spain)" + ParagraphPreSet = "Paragraph is Spanish (Spain)" + Case 7: WordPreSet = "Word is Hungarian" + ParagraphPreSet = "Paragraph is Hungarian" + Case 8: WordPreSet = "Word is Italian (Italy)" + ParagraphPreSet = "Paragraph is Italian (Italy)" + Case 9: WordPreSet = "Word is Swedish (Sweden)" + ParagraphPreSet = "Paragraph is Swedish (Sweden)" + Case 10:WordPreSet = "Word is Polish" + ParagraphPreSet = "Paragraph is Polish" + Case 11:WordPreSet = "Word is German (Germany)" + ParagraphPreSet = "Paragraph is German (Germany)" end select '----------------------------------------------------------------------- - Case 07 'Case 07: russian + Case 07 'Case 07: russian Select Case iLanguageCount - Case 1: WordPreSet = "Язык слова: Английский (США)" - ParagraphPreSet = "Язык абзаца: Английский (США)" - Case 2: WordPreSet = "Язык слова: Португальский (Португалия)" - ParagraphPreSet = "Язык абзаца: Португальский (Португалия)" - Case 3: WordPreSet = "Язык слова: Русский" - ParagraphPreSet = "Язык абзаца: Русский" - Case 4: WordPreSet = "Язык слова: Голландский (Нидерланды)" - ParagraphPreSet = "Язык абзаца: Голландский (Нидерланды)" - Case 5: WordPreSet = "Язык слова: Французский (Франция)" - ParagraphPreSet = "Язык абзаца: Французский (Франция)" - Case 6: WordPreSet = "Язык слова: Испанский (Испания)" - ParagraphPreSet = "Язык абзаца: Испанский (Испания)" - Case 7: WordPreSet = "Язык слова: Венгерский" - ParagraphPreSet = "Язык абзаца: Венгерский" - Case 8: WordPreSet = "Язык слова: Итальянский (Италия) " - ParagraphPreSet = "Язык абзаца: Итальянский (Италия) " - Case 9: WordPreSet = "Язык слова: Шведский (Швеция)" - ParagraphPreSet = "Язык абзаца: Шведский (Швеция)" - Case 10:WordPreSet = "Язык слова: Польский" - ParagraphPreSet = "Язык абзаца: Польский" - Case 11:WordPreSet = "Язык слова: Немецкий (Германия)" - ParagraphPreSet = "Язык абзаца: Немецкий (Германия)" + Case 1: WordPreSet = "Язык слова: Английский (США)" + ParagraphPreSet = "Язык абзаца: Английский (США)" + Case 2: WordPreSet = "Язык слова: Португальский (Португалия)" + ParagraphPreSet = "Язык абзаца: Португальский (Португалия)" + Case 3: WordPreSet = "Язык слова: Русский" + ParagraphPreSet = "Язык абзаца: Русский" + Case 4: WordPreSet = "Язык слова: Голландский (Нидерланды)" + ParagraphPreSet = "Язык абзаца: Голландский (Нидерланды)" + Case 5: WordPreSet = "Язык слова: Французский (Франция)" + ParagraphPreSet = "Язык абзаца: Французский (Франция)" + Case 6: WordPreSet = "Язык слова: Испанский (Испания)" + ParagraphPreSet = "Язык абзаца: Испанский (Испания)" + Case 7: WordPreSet = "Язык слова: Венгерский" + ParagraphPreSet = "Язык абзаца: Венгерский" + Case 8: WordPreSet = "Язык слова: Итальянский (Италия) " + ParagraphPreSet = "Язык абзаца: Итальянский (Италия) " + Case 9: WordPreSet = "Язык слова: Шведский (Швеция)" + ParagraphPreSet = "Язык абзаца: Шведский (Швеция)" + Case 10:WordPreSet = "Язык слова: Польский" + ParagraphPreSet = "Язык абзаца: Польский" + Case 11:WordPreSet = "Язык слова: Немецкий (Германия)" + ParagraphPreSet = "Язык абзаца: Немецкий (Германия)" end select '----------------------------------------------------------------------- - Case 31 'Case 31: dutch + Case 31 'Case 31: dutch Select Case iLanguageCount - Case 1: WordPreSet = "Woord is Engels (VS)" - ParagraphPreSet = "Alinea is Engels (VS)" - Case 2: WordPreSet = "Woord is Portugees (Portugal)" - ParagraphPreSet = "Alinea is Portugees (Portugal)" - Case 3: WordPreSet = "Woord is Russisch" - ParagraphPreSet = "Alinea is Russisch" - Case 4: WordPreSet = "Woord is Nederlands (NL)" - ParagraphPreSet = "Alinea is Nederlands (NL)" - Case 5: WordPreSet = "Woord is Frans (Frankrijk)" - ParagraphPreSet = "Alinea is Frans (Frankrijk)" - Case 6: WordPreSet = "Woord is Spaans (Spanje)" - ParagraphPreSet = "Alinea is Spaans (Spanje)" - Case 7: WordPreSet = "Woord is Hongaars" - ParagraphPreSet = "Alinea is Hongaars" - Case 8: WordPreSet = "Woord is Italiaans (Italië)" - ParagraphPreSet = "Alinea is Italiaans (Italië)" - Case 9: WordPreSet = "Woord is Zweeds (Zweden)" - ParagraphPreSet = "Alinea is Zweeds (Zweden)" - Case 10:WordPreSet = "Woord is Pools" - ParagraphPreSet = "Alinea is Pools" - Case 11:WordPreSet = "Woord is Duits (Duitsland)" - ParagraphPreSet = "Alinea is Duits (Duitsland)" + Case 1: WordPreSet = "Woord is Engels (VS)" + ParagraphPreSet = "Alinea is Engels (VS)" + Case 2: WordPreSet = "Woord is Portugees (Portugal)" + ParagraphPreSet = "Alinea is Portugees (Portugal)" + Case 3: WordPreSet = "Woord is Russisch" + ParagraphPreSet = "Alinea is Russisch" + Case 4: WordPreSet = "Woord is Nederlands (NL)" + ParagraphPreSet = "Alinea is Nederlands (NL)" + Case 5: WordPreSet = "Woord is Frans (Frankrijk)" + ParagraphPreSet = "Alinea is Frans (Frankrijk)" + Case 6: WordPreSet = "Woord is Spaans (Spanje)" + ParagraphPreSet = "Alinea is Spaans (Spanje)" + Case 7: WordPreSet = "Woord is Hongaars" + ParagraphPreSet = "Alinea is Hongaars" + Case 8: WordPreSet = "Woord is Italiaans (Italië)" + ParagraphPreSet = "Alinea is Italiaans (Italië)" + Case 9: WordPreSet = "Woord is Zweeds (Zweden)" + ParagraphPreSet = "Alinea is Zweeds (Zweden)" + Case 10:WordPreSet = "Woord is Pools" + ParagraphPreSet = "Alinea is Pools" + Case 11:WordPreSet = "Woord is Duits (Duitsland)" + ParagraphPreSet = "Alinea is Duits (Duitsland)" end select '----------------------------------------------------------------------- - Case 33 'Case 33: french - Select Case iLanguageCount - Case 1: WordPreSet = "Le mot est en Anglais (U.S.A.)" - ParagraphPreSet = "Le paragraphe est en Anglais (U.S.A.)" - Case 2: WordPreSet = "Le mot est en Portugais (Portugal)" - ParagraphPreSet = "Le paragraphe est en Portugais (Portugal)" - Case 3: WordPreSet = "Le mot est en Russe" - ParagraphPreSet = "Le paragraphe est en Russe" - Case 4: WordPreSet = "Le mot est en Néerlandais (Pays-Bas)" - ParagraphPreSet = "Le paragraphe est en Néerlandais (Pays-Bas)" - Case 5: WordPreSet = "Le mot est en Français (France)" - ParagraphPreSet = "Le paragraphe est en Français (France)" - Case 6: WordPreSet = "Le mot est en Espagnol (Espagne)" - ParagraphPreSet = "Le paragraphe est en Espagnol (Espagne)" - Case 7: WordPreSet = "Le mot est en Hongrois" - ParagraphPreSet = "Le paragraphe est en Hongrois" - Case 8: WordPreSet = "Le mot est en Italien (Italie)" - ParagraphPreSet = "Le paragraphe est en Italien (Italie)" - Case 9: WordPreSet = "Le mot est en Suédois (Suède)" - ParagraphPreSet = "Le paragraphe est en Suédois (Suède)" - Case 10: WordPreSet = "Le mot est en Polonais" - ParagraphPreSet = "Le paragraphe est en Polonais" - Case 11: WordPreSet = "Le mot est en Allemand (Allemagne)" - ParagraphPreSet = "Le paragraphe est en Allemand (Allemagne)" - end select - '----------------------------------------------------------------------- - Case 34 'Case 34: spanish + Case 33 'Case 33: french Select Case iLanguageCount - Case 1: WordPreSet = "La palabra está Inglés (Estados Unidos)" - ParagraphPreSet = "El párrafo es Inglés (Estados Unidos)" - Case 2: WordPreSet = "La palabra está Español (España)" - ParagraphPreSet = "El párrafo es Portugués (Portugal)" - Case 3: WordPreSet = "La palabra está Ruso" - ParagraphPreSet = "El párrafo es Ruso" - Case 4: WordPreSet = "La palabra está Holandés (Países Bajos)" - ParagraphPreSet = "El párrafo es Holandés (Países Bajos)" - Case 5: WordPreSet = "La palabra está Francés (Francia)" - ParagraphPreSet = "El párrafo es Francés (Francia)" - Case 6: WordPreSet = "La palabra está Español (España)" - ParagraphPreSet = "El párrafo es Español (España)" - Case 7: WordPreSet = "La palabra está Húngaro" - ParagraphPreSet = "El párrafo es Húngaro" - Case 8: WordPreSet = "La palabra está Italiano (Italia)" - ParagraphPreSet = "El párrafo es Italiano (Italia)" - Case 9: WordPreSet = "La palabra está Sueco (Suecia)" - ParagraphPreSet = "El párrafo es Sueco (Suecia)" - Case 10:WordPreSet = "La palabra está Polaco" - ParagraphPreSet = "El párrafo es Polaco" - Case 11:WordPreSet = "La palabra está Alemán (Alemania)" - ParagraphPreSet = "El párrafo es Alemán (Alemania)" + Case 1: WordPreSet = "Le mot est en Anglais (U.S.A.)" + ParagraphPreSet = "Le paragraphe est en Anglais (U.S.A.)" + Case 2: WordPreSet = "Le mot est en Portugais (Portugal)" + ParagraphPreSet = "Le paragraphe est en Portugais (Portugal)" + Case 3: WordPreSet = "Le mot est en Russe" + ParagraphPreSet = "Le paragraphe est en Russe" + Case 4: WordPreSet = "Le mot est en Néerlandais (Pays-Bas)" + ParagraphPreSet = "Le paragraphe est en Néerlandais (Pays-Bas)" + Case 5: WordPreSet = "Le mot est en Français (France)" + ParagraphPreSet = "Le paragraphe est en Français (France)" + Case 6: WordPreSet = "Le mot est en Espagnol (Espagne)" + ParagraphPreSet = "Le paragraphe est en Espagnol (Espagne)" + Case 7: WordPreSet = "Le mot est en Hongrois" + ParagraphPreSet = "Le paragraphe est en Hongrois" + Case 8: WordPreSet = "Le mot est en Italien (Italie)" + ParagraphPreSet = "Le paragraphe est en Italien (Italie)" + Case 9: WordPreSet = "Le mot est en Suédois (Suède)" + ParagraphPreSet = "Le paragraphe est en Suédois (Suède)" + Case 10: WordPreSet = "Le mot est en Polonais" + ParagraphPreSet = "Le paragraphe est en Polonais" + Case 11: WordPreSet = "Le mot est en Allemand (Allemagne)" + ParagraphPreSet = "Le paragraphe est en Allemand (Allemagne)" end select '----------------------------------------------------------------------- - Case 36 'Case 36: hungarian + Case 34 'Case 34: spanish Select Case iLanguageCount - Case 1: WordPreSet = "A szó: Angol (USA)" - ParagraphPreSet = "Bekezdés: Angol (USA)" - Case 2: WordPreSet = "A szó: Portugál (Portugália)" - ParagraphPreSet = "Bekezdés: Portugál (Portugália)" - Case 3: WordPreSet = "A szó: Orosz" - ParagraphPreSet = "Bekezdés: Orosz" - Case 4: WordPreSet = "A szó: Holland (Hollandia)" - ParagraphPreSet = "Bekezdés: Holland (Hollandia)" - Case 5: WordPreSet = "A szó: Francia (Franciaország)" - ParagraphPreSet = "Bekezdés: Francia (Franciaország)" - Case 6: WordPreSet = "A szó: Spanyol (Spanyolország)" - ParagraphPreSet = "Bekezdés: Spanyol (Spanyolország)" - Case 7: WordPreSet = "A szó: Magyar" - ParagraphPreSet = "Bekezdés: Magyar" - Case 8: WordPreSet = "A szó: Olasz (Olaszország)" - ParagraphPreSet = "Bekezdés: Olasz (Olaszország)" - Case 9: WordPreSet = "A szó: Svéd (Svédország)" - ParagraphPreSet = "Bekezdés: Svéd (Svédország)" - Case 10:WordPreSet = "A szó: Lengyel" - ParagraphPreSet = "Bekezdés: Lengyel" - Case 11:WordPreSet = "A szó: Német (Németország)" - ParagraphPreSet = "Bekezdés: Német (Németország)" + Case 1: WordPreSet = "La palabra está Inglés (Estados Unidos)" + ParagraphPreSet = "El párrafo es Inglés (Estados Unidos)" + Case 2: WordPreSet = "La palabra está Español (España)" + ParagraphPreSet = "El párrafo es Portugués (Portugal)" + Case 3: WordPreSet = "La palabra está Ruso" + ParagraphPreSet = "El párrafo es Ruso" + Case 4: WordPreSet = "La palabra está Holandés (Países Bajos)" + ParagraphPreSet = "El párrafo es Holandés (Países Bajos)" + Case 5: WordPreSet = "La palabra está Francés (Francia)" + ParagraphPreSet = "El párrafo es Francés (Francia)" + Case 6: WordPreSet = "La palabra está Español (España)" + ParagraphPreSet = "El párrafo es Español (España)" + Case 7: WordPreSet = "La palabra está Húngaro" + ParagraphPreSet = "El párrafo es Húngaro" + Case 8: WordPreSet = "La palabra está Italiano (Italia)" + ParagraphPreSet = "El párrafo es Italiano (Italia)" + Case 9: WordPreSet = "La palabra está Sueco (Suecia)" + ParagraphPreSet = "El párrafo es Sueco (Suecia)" + Case 10:WordPreSet = "La palabra está Polaco" + ParagraphPreSet = "El párrafo es Polaco" + Case 11:WordPreSet = "La palabra está Alemán (Alemania)" + ParagraphPreSet = "El párrafo es Alemán (Alemania)" end select '----------------------------------------------------------------------- - Case 39 'Case 39: italian + Case 36 'Case 36: hungarian Select Case iLanguageCount - Case 1: WordPreSet = "La parola è Inglese (USA)" - ParagraphPreSet = "Il paragrafo è Inglese (USA)" - Case 2: WordPreSet = "La parola è Portoghese (Portogallo)" - ParagraphPreSet = "Il paragrafo è Portoghese (Portogallo)" - Case 3: WordPreSet = "La parola è Russo" - ParagraphPreSet = "Il paragrafo è Russo" - Case 4: WordPreSet = "La parola è Olandese (Paesi Bassi)" - ParagraphPreSet = "Il paragrafo è Olandese (Paesi Bassi)" - Case 5: WordPreSet = "La parola è Francese (Francia)" - ParagraphPreSet = "Il paragrafo è Francese (Francia)" - Case 6: WordPreSet = "La parola è Spagnolo (Spagna)" - ParagraphPreSet = "Il paragrafo è Spagnolo (Spagna)" - Case 7: WordPreSet = "La parola è Ungherese" - ParagraphPreSet = "Il paragrafo è Ungherese" - Case 8: WordPreSet = "La parola è Italiano (Italia)" - ParagraphPreSet = "Il paragrafo è Italiano (Italia)" - Case 9: WordPreSet = "La parola è Svedese (Svezia)" - ParagraphPreSet = "Il paragrafo è Svedese (Svezia)" - Case 10: WordPreSet = "La parola è Polacco" - ParagraphPreSet = "Il paragrafo è Polacco" - Case 11: WordPreSet = "La parola è Tedesco (Germania)" - ParagraphPreSet = "Il paragrafo è Tedesco (Germania)" + Case 1: WordPreSet = "A szó: Angol (USA)" + ParagraphPreSet = "Bekezdés: Angol (USA)" + Case 2: WordPreSet = "A szó: Portugál (Portugália)" + ParagraphPreSet = "Bekezdés: Portugál (Portugália)" + Case 3: WordPreSet = "A szó: Orosz" + ParagraphPreSet = "Bekezdés: Orosz" + Case 4: WordPreSet = "A szó: Holland (Hollandia)" + ParagraphPreSet = "Bekezdés: Holland (Hollandia)" + Case 5: WordPreSet = "A szó: Francia (Franciaország)" + ParagraphPreSet = "Bekezdés: Francia (Franciaország)" + Case 6: WordPreSet = "A szó: Spanyol (Spanyolország)" + ParagraphPreSet = "Bekezdés: Spanyol (Spanyolország)" + Case 7: WordPreSet = "A szó: Magyar" + ParagraphPreSet = "Bekezdés: Magyar" + Case 8: WordPreSet = "A szó: Olasz (Olaszország)" + ParagraphPreSet = "Bekezdés: Olasz (Olaszország)" + Case 9: WordPreSet = "A szó: Svéd (Svédország)" + ParagraphPreSet = "Bekezdés: Svéd (Svédország)" + Case 10:WordPreSet = "A szó: Lengyel" + ParagraphPreSet = "Bekezdés: Lengyel" + Case 11:WordPreSet = "A szó: Német (Németország)" + ParagraphPreSet = "Bekezdés: Német (Németország)" end select '----------------------------------------------------------------------- - Case 46 'Case 46: swedish + Case 39 'Case 39: italian Select Case iLanguageCount - Case 1: WordPreSet = "Ordet är Engelska (USA)" - ParagraphPreSet = "Stycket är Engelska (USA)" - Case 2: WordPreSet = "Ordet är Portugisiska (Portugal)" - ParagraphPreSet = "Stycket är Portugisiska (Portugal)" - Case 3: WordPreSet = "Ordet är Ryska" - ParagraphPreSet = "Stycket är Ryska" - Case 4: WordPreSet = "Ordet är Svenska (Sverige)" - ParagraphPreSet = "Stycket är Holländska (Nederländerna)" - Case 5: WordPreSet = "Ordet är Franska (Frankrike)" - ParagraphPreSet = "Stycket är Franska (Frankrike)" - Case 6: WordPreSet = "Ordet är Spanska (Spanien)" - ParagraphPreSet = "Stycket är Spanska (Spanien)" - Case 7: WordPreSet = "Ordet är Ungerska" - ParagraphPreSet = "Stycket är Ungerska" - Case 8: WordPreSet = "Ordet är Italienska (Italien)" - ParagraphPreSet = "Stycket är Italienska (Italien)" - Case 9: WordPreSet = "Ordet är Svenska (Sverige)" - ParagraphPreSet = "Stycket är Svenska (Sverige)" - Case 10:WordPreSet = "Ordet är Polska" - ParagraphPreSet = "Stycket är Polska" - Case 11:WordPreSet = "Ordet är Tyska (Tyskland)" - ParagraphPreSet = "Stycket är Tyska (Tyskland)" + Case 1: WordPreSet = "La parola è Inglese (USA)" + ParagraphPreSet = "Il paragrafo è Inglese (USA)" + Case 2: WordPreSet = "La parola è Portoghese (Portogallo)" + ParagraphPreSet = "Il paragrafo è Portoghese (Portogallo)" + Case 3: WordPreSet = "La parola è Russo" + ParagraphPreSet = "Il paragrafo è Russo" + Case 4: WordPreSet = "La parola è Olandese (Paesi Bassi)" + ParagraphPreSet = "Il paragrafo è Olandese (Paesi Bassi)" + Case 5: WordPreSet = "La parola è Francese (Francia)" + ParagraphPreSet = "Il paragrafo è Francese (Francia)" + Case 6: WordPreSet = "La parola è Spagnolo (Spagna)" + ParagraphPreSet = "Il paragrafo è Spagnolo (Spagna)" + Case 7: WordPreSet = "La parola è Ungherese" + ParagraphPreSet = "Il paragrafo è Ungherese" + Case 8: WordPreSet = "La parola è Italiano (Italia)" + ParagraphPreSet = "Il paragrafo è Italiano (Italia)" + Case 9: WordPreSet = "La parola è Svedese (Svezia)" + ParagraphPreSet = "Il paragrafo è Svedese (Svezia)" + Case 10: WordPreSet = "La parola è Polacco" + ParagraphPreSet = "Il paragrafo è Polacco" + Case 11: WordPreSet = "La parola è Tedesco (Germania)" + ParagraphPreSet = "Il paragrafo è Tedesco (Germania)" end select '----------------------------------------------------------------------- - Case 48 'Case 48: polish + Case 46 'Case 46: swedish Select Case iLanguageCount - Case 1: WordPreSet = "Wyraz jest Angielski (USA)" - ParagraphPreSet = "Akapit jest Angielski (USA)" - Case 2: WordPreSet = "Wyraz jest Portugalski (Portugalia)" - ParagraphPreSet = "Akapit jest Portugalski (Portugalia)" - Case 3: WordPreSet = "Wyraz jest Rosyjski" - ParagraphPreSet = "Akapit jest Rosyjski" - Case 4: WordPreSet = "Wyraz jest Holenderski (Holandia)" - ParagraphPreSet = "Akapit jest Holenderski (Holandia)" - Case 5: WordPreSet = "Wyraz jest Francuski (Francja)" - ParagraphPreSet = "Akapit jest Francuski (Francja)" - Case 6: WordPreSet = "Wyraz jest Hiszpański (Hiszpania)" - ParagraphPreSet = "Akapit jest Hiszpański (Hiszpania)" - Case 7: WordPreSet = "Wyraz jest Węgierski" - ParagraphPreSet = "Akapit jest Węgierski" - Case 8: WordPreSet = "Wyraz jest Włoski (Włochy)" - ParagraphPreSet = "Akapit jest Włoski (Włochy)" - Case 9: WordPreSet = "Wyraz jest Szwedzki (Szwecja)" - ParagraphPreSet = "Akapit jest Szwedzki (Szwecja)" - Case 10:WordPreSet = "Wyraz jest Polski" - ParagraphPreSet = "Akapit jest Polski" - Case 11:WordPreSet = "Wyraz jest Niemiecki (Niemcy)" - ParagraphPreSet = "Akapit jest Niemiecki (Niemcy)" + Case 1: WordPreSet = "Ordet är Engelska (USA)" + ParagraphPreSet = "Stycket är Engelska (USA)" + Case 2: WordPreSet = "Ordet är Portugisiska (Portugal)" + ParagraphPreSet = "Stycket är Portugisiska (Portugal)" + Case 3: WordPreSet = "Ordet är Ryska" + ParagraphPreSet = "Stycket är Ryska" + Case 4: WordPreSet = "Ordet är Svenska (Sverige)" + ParagraphPreSet = "Stycket är Holländska (Nederländerna)" + Case 5: WordPreSet = "Ordet är Franska (Frankrike)" + ParagraphPreSet = "Stycket är Franska (Frankrike)" + Case 6: WordPreSet = "Ordet är Spanska (Spanien)" + ParagraphPreSet = "Stycket är Spanska (Spanien)" + Case 7: WordPreSet = "Ordet är Ungerska" + ParagraphPreSet = "Stycket är Ungerska" + Case 8: WordPreSet = "Ordet är Italienska (Italien)" + ParagraphPreSet = "Stycket är Italienska (Italien)" + Case 9: WordPreSet = "Ordet är Svenska (Sverige)" + ParagraphPreSet = "Stycket är Svenska (Sverige)" + Case 10:WordPreSet = "Ordet är Polska" + ParagraphPreSet = "Stycket är Polska" + Case 11:WordPreSet = "Ordet är Tyska (Tyskland)" + ParagraphPreSet = "Stycket är Tyska (Tyskland)" end select '----------------------------------------------------------------------- - Case 49 'Case 49: german + Case 48 'Case 48: polish Select Case iLanguageCount - Case 1: WordPreSet = "Wort ist Englisch (USA)" - ParagraphPreSet = "Absatz ist Englisch (USA)" - Case 2: WordPreSet = "Wort ist Portugiesisch (Portugal)" - ParagraphPreSet = "Absatz ist Portugiesisch (Portugal)" - Case 3: WordPreSet = "Wort ist Russisch" - ParagraphPreSet = "Absatz ist Russisch" - Case 4: WordPreSet = "Wort ist Niederländisch (Niederlande)" - ParagraphPreSet = "Absatz ist Niederländisch (Niederlande)" - Case 5: WordPreSet = "Wort ist Französisch (Frankreich)" - ParagraphPreSet = "Absatz ist Französisch (Frankreich)" - Case 6: WordPreSet = "Wort ist Spanisch (Spanien)" - ParagraphPreSet = "Absatz ist Spanisch (Spanien)" - Case 7: WordPreSet = "Wort ist Ungarisch" - ParagraphPreSet = "Absatz ist Ungarisch" - Case 8: WordPreSet = "Wort ist Italienisch (Italien)" - ParagraphPreSet = "Absatz ist Italienisch (Italien)" - Case 9: WordPreSet = "Wort ist Schwedisch (Schweden)" - ParagraphPreSet = "Absatz ist Schwedisch (Schweden)" - Case 10:WordPreSet = "Wort ist Polnisch" - ParagraphPreSet = "Absatz ist Polnisch" - Case 11:WordPreSet = "Wort ist Deutsch (Deutschland)" - ParagraphPreSet = "Absatz ist Deutsch (Deutschland)" + Case 1: WordPreSet = "Wyraz jest Angielski (USA)" + ParagraphPreSet = "Akapit jest Angielski (USA)" + Case 2: WordPreSet = "Wyraz jest Portugalski (Portugalia)" + ParagraphPreSet = "Akapit jest Portugalski (Portugalia)" + Case 3: WordPreSet = "Wyraz jest Rosyjski" + ParagraphPreSet = "Akapit jest Rosyjski" + Case 4: WordPreSet = "Wyraz jest Holenderski (Holandia)" + ParagraphPreSet = "Akapit jest Holenderski (Holandia)" + Case 5: WordPreSet = "Wyraz jest Francuski (Francja)" + ParagraphPreSet = "Akapit jest Francuski (Francja)" + Case 6: WordPreSet = "Wyraz jest Hiszpański (Hiszpania)" + ParagraphPreSet = "Akapit jest Hiszpański (Hiszpania)" + Case 7: WordPreSet = "Wyraz jest Węgierski" + ParagraphPreSet = "Akapit jest Węgierski" + Case 8: WordPreSet = "Wyraz jest Włoski (Włochy)" + ParagraphPreSet = "Akapit jest Włoski (Włochy)" + Case 9: WordPreSet = "Wyraz jest Szwedzki (Szwecja)" + ParagraphPreSet = "Akapit jest Szwedzki (Szwecja)" + Case 10:WordPreSet = "Wyraz jest Polski" + ParagraphPreSet = "Akapit jest Polski" + Case 11:WordPreSet = "Wyraz jest Niemiecki (Niemcy)" + ParagraphPreSet = "Akapit jest Niemiecki (Niemcy)" end select '----------------------------------------------------------------------- - Case 55 'Case 55: Portuguese (Brazil) + Case 49 'Case 49: german Select Case iLanguageCount - Case 1: WordPreSet = "a palavra é Inglês (EUA)" - ParagraphPreSet = "O parágrafo é Inglês (EUA)" - Case 2: WordPreSet = "a palavra é Português (Brasil)" - ParagraphPreSet = "O parágrafo é Português (Portugal)" - Case 3: WordPreSet = "a palavra é Russo" - ParagraphPreSet = "O parágrafo é Russo" - Case 4: WordPreSet = "a palavra é Holandês (Holanda)" - ParagraphPreSet = "O parágrafo é Holandês (Holanda)" - Case 5: WordPreSet = "a palavra é Francês (França)" - ParagraphPreSet = "O parágrafo é Francês (França)" - Case 6: WordPreSet = "a palavra é Português (Brasil)" - ParagraphPreSet = "O parágrafo é Espanhol (Espanha)" - Case 7: WordPreSet = "a palavra é Húngaro" - ParagraphPreSet = "O parágrafo é Húngaro" - Case 8: WordPreSet = "a palavra é Italiano (Itália)" - ParagraphPreSet = "O parágrafo é Italiano (Itália)" - Case 9: WordPreSet = "a palavra é Sueco (Suécia)" - ParagraphPreSet = "O parágrafo é Sueco (Suécia)" - Case 10:WordPreSet = "a palavra é Polonês" - ParagraphPreSet = "O parágrafo é Polonês" - Case 11:WordPreSet = "a palavra é Alemão (Alemanha)" - ParagraphPreSet = "O parágrafo é Alemão (Alemanha)" + Case 1: WordPreSet = "Wort ist Englisch (USA)" + ParagraphPreSet = "Absatz ist Englisch (USA)" + Case 2: WordPreSet = "Wort ist Portugiesisch (Portugal)" + ParagraphPreSet = "Absatz ist Portugiesisch (Portugal)" + Case 3: WordPreSet = "Wort ist Russisch" + ParagraphPreSet = "Absatz ist Russisch" + Case 4: WordPreSet = "Wort ist Niederländisch (Niederlande)" + ParagraphPreSet = "Absatz ist Niederländisch (Niederlande)" + Case 5: WordPreSet = "Wort ist Französisch (Frankreich)" + ParagraphPreSet = "Absatz ist Französisch (Frankreich)" + Case 6: WordPreSet = "Wort ist Spanisch (Spanien)" + ParagraphPreSet = "Absatz ist Spanisch (Spanien)" + Case 7: WordPreSet = "Wort ist Ungarisch" + ParagraphPreSet = "Absatz ist Ungarisch" + Case 8: WordPreSet = "Wort ist Italienisch (Italien)" + ParagraphPreSet = "Absatz ist Italienisch (Italien)" + Case 9: WordPreSet = "Wort ist Schwedisch (Schweden)" + ParagraphPreSet = "Absatz ist Schwedisch (Schweden)" + Case 10:WordPreSet = "Wort ist Polnisch" + ParagraphPreSet = "Absatz ist Polnisch" + Case 11:WordPreSet = "Wort ist Deutsch (Deutschland)" + ParagraphPreSet = "Absatz ist Deutsch (Deutschland)" end select '----------------------------------------------------------------------- - case else - 'if Office language is not already covered: warning appears. - Warnlog "Language has to be added to testcase. Please see w_locale_strings2.inc for further details" - QAErrorlog "Please add " & iSprache & " to file!" - wGetLanguageGuessString = "" + Case 55 'Case 55: Portuguese (Brazil) + Select Case iLanguageCount + Case 1: WordPreSet = "a palavra é Inglês (EUA)" + ParagraphPreSet = "O parágrafo é Inglês (EUA)" + Case 2: WordPreSet = "a palavra é Português (Brasil)" + ParagraphPreSet = "O parágrafo é Português (Portugal)" + Case 3: WordPreSet = "a palavra é Russo" + ParagraphPreSet = "O parágrafo é Russo" + Case 4: WordPreSet = "a palavra é Holandês (Holanda)" + ParagraphPreSet = "O parágrafo é Holandês (Holanda)" + Case 5: WordPreSet = "a palavra é Francês (França)" + ParagraphPreSet = "O parágrafo é Francês (França)" + Case 6: WordPreSet = "a palavra é Português (Brasil)" + ParagraphPreSet = "O parágrafo é Espanhol (Espanha)" + Case 7: WordPreSet = "a palavra é Húngaro" + ParagraphPreSet = "O parágrafo é Húngaro" + Case 8: WordPreSet = "a palavra é Italiano (Itália)" + ParagraphPreSet = "O parágrafo é Italiano (Itália)" + Case 9: WordPreSet = "a palavra é Sueco (Suécia)" + ParagraphPreSet = "O parágrafo é Sueco (Suécia)" + Case 10:WordPreSet = "a palavra é Polonês" + ParagraphPreSet = "O parágrafo é Polonês" + Case 11:WordPreSet = "a palavra é Alemão (Alemanha)" + ParagraphPreSet = "O parágrafo é Alemão (Alemanha)" end select '----------------------------------------------------------------------- - 'distinguishing if string for word or string for paragraph is handed over - if sValue = "WordPreSet" then - wGetLanguageGuessString = WordPreSet - elseif sValue = "ParagraphPreSet" then - wGetLanguageGuessString = ParagraphPreSet - end if + case else + 'if Office language is not already covered: warning appears. + Warnlog "Language has to be added to testcase. Please see w_locale_strings2.inc for further details" + QAErrorlog "Please add " & iSprache & " to file!" + wGetLanguageGuessString = "" + end select + '----------------------------------------------------------------------- + 'distinguishing if string for word or string for paragraph is handed over + if sValue = "WordPreSet" then + wGetLanguageGuessString = WordPreSet + elseif sValue = "ParagraphPreSet" then + wGetLanguageGuessString = ParagraphPreSet + end if end function diff --git a/testautomation/writer/tools/includes/w_tool1.inc b/testautomation/writer/tools/includes/w_tool1.inc index 39148ccf3279..3b2a61c0afb9 100755 --- a/testautomation/writer/tools/includes/w_tool1.inc +++ b/testautomation/writer/tools/includes/w_tool1.inc @@ -1,6 +1,6 @@ -'************************************************************************** +'******************************************************************************* '* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. -'* +'* '* Copyright 2008 by Sun Microsystems, Inc. '* '* OpenOffice.org - a multi-platform office productivity suite @@ -28,536 +28,525 @@ '* <http://www.openoffice.org/license.html> '* for a copy of the LGPLv3 License. '* -'/************************************************************************ +'/****************************************************************************** '* '* owner : fredrik.haegg@sun.com '* '* short description : Put description here '* -'************************************************************************ -' ** ** -' #1 hInhalte '*** fügt den Inhalt der Zwischenablage in allen Formaten einmal ein und versucht es zu löschen -' #1 ClipboardGibsMir(Inhalt As String) As Boolean '*** Fügt aus dem Clipboard ein vorher gewähltes Format ins Dokument ein und gibt True zurück wenn erfolgreich -' #1 hObjektmalen '*** Vergrössert ein vorher selektiertes Objekt mit der Maus -' #1 hClipboarden '*** Ausschneiden, Kopieren und Einfuegen von Objekten -' #1 FeldbefehlAendernUndKontrollieren '*** Selektierten Feldbefehl ändern -' #1 hEinfuegenFloatingFrame '*** fügt ein Frameset ein -' #1 hEinfuegenRahmen '*** fügt einen Rahmen ein -' #1 hEinfuegenChart '*** fügt ein Chart ein -' #1 hRechteckEinfuegen '*** zeichnet im Draw win Rechteck und fügt es übers Clipboard ins Writerdokument ein -' #1 hLegendeEinfugen '*** fügt über die Objektleiste eine Legende ein -' #1 hSchreibeTestinfo '*** öffnet Hauptdokument und ein neues Dokument, schreibt Testnamen ins Dokument -' ** ** -' \******************************************************************* +' \***************************************************************************** sub hInhalte - Dim Anzahl as Integer - Dim i as Integer - - Sleep 5 - try - EditCut - catch - Warnlog "Unable to execute 'Edit / Cut'!. Maybe object not selected!" - exit sub - endcatch - Sleep 1 - Call gMouseClick ( 99,80 ) - Sleep 1 - - EditPasteSpecialWriter - Kontext "InhaltEinfuegen" - Anzahl = Auswahl.GetItemCount - for i = 1 to Anzahl - Auswahl.Select i - InhaltEinfuegen.OK - Sleep 1 - try - EditDeleteContents - catch - Warnlog "Unable to execute Edit / Delete / Contents ! Entry: " + i - endcatch - Sleep 1 - Call gMouseClick ( 99,80 ) - Sleep 1 - try - EditPasteSpecialWriter - catch - warnlog "Unable to execute Edit / Paste / Special!" - endcatch - Kontext "InhaltEinfuegen" - next i - InhaltEinfuegen.Cancel + + Dim Anzahl as Integer + Dim i as Integer + + if ( hUseAsyncSlot( "EditCut" ) = -1 ) then + Warnlog "Unable to execute 'Edit / Cut'!. Maybe object not selected!" + exit sub + endif + + Sleep 1 + Call gMouseClick ( 99,80 ) + Sleep 1 + + hUseAsyncSlot( "EditPasteSpecialWriter" ) + + Kontext "InhaltEinfuegen" + if ( InhaltEinfuegen.exists( 1 ) ) then + Anzahl = Auswahl.GetItemCount + for i = 1 to Anzahl + Auswahl.Select i + InhaltEinfuegen.OK + + if ( hUseAsyncSlot( "EditDeleteContents" ) = -1 ) then + Warnlog "Unable to execute Edit / Delete / Contents ! Entry: " + i + else + Call gMouseClick ( 99,80 ) + if ( hUseAsyncSlot( "EditPasteSpecialWriter" ) = -1 ) then + warnlog "Unable to execute Edit / Paste / Special!" + endif + endif + Kontext "InhaltEinfuegen" + next i + InhaltEinfuegen.Cancel + else + warnlog( "Dialog <InhaltEinfuegen> is not available" ) + endif end sub ' ----------------------------------------------------------------------- sub hObjektmalen - Kontext "DocumentWriter" - DocumentWriter.MouseDown 35, 25 - DocumentWriter.MouseMove 70, 60 - DocumentWriter.MouseUp 70, 60 - Sleep 1 + Kontext "DocumentWriter" + DocumentWriter.MouseDown 35, 25 + DocumentWriter.MouseMove 70, 60 + DocumentWriter.MouseUp 70, 60 + Sleep 1 end sub ' ----------------------------------------------------------------------- sub hClipboarden - Sleep 1 - try - EditCut - catch - Warnlog "Unable to Cut object. 'Edit / Cut' is disabled!" - exit sub - endcatch - - Sleep 1 - Call wTypeKeys "<Escape>" - EditPaste - Sleep 1 - EditCopy - Call wTypeKeys "<Escape>" - Sleep 1 - EditPaste - Sleep 1 - Call wTypeKeys "<Delete>" - Sleep 2 - Call wTypeKeys "<Escape>" - Sleep 1 + + if ( hUseAsyncSlot( "EditCut" ) = -1 ) then + Warnlog "Unable to Cut object. 'Edit / Cut' is disabled!" + exit sub + endif + + Call wTypeKeys "<Escape>" + hUseAsyncSlot( "EditPaste" ) + + hUseAsyncSlot( "EditCopy" ) + Call wTypeKeys "<Escape>" + + hUseAsyncSlot( "EditPaste" ) + + Call wTypeKeys "<Delete>" + WaitSlot() ' NOOP + Call wTypeKeys "<Escape>" + WaitSlot() ' NOOP end sub ' ----------------------------------------------------------------------- sub FeldbefehlAendernUndKontrollieren ( Selektion as Integer ) - Dim Merk_dir_das as String - - Call wTypeKeys "<Left>" - EditFields - Kontext "FeldbefehlBearbeitenDokument" - if Formatliste.IsVisible AND Formatliste.IsEnabled then - Formatliste.Select Selektion - Merk_dir_das=Formatliste.GetSelText - else - if Zahlenformat.IsVisible AND Zahlenformat.IsEnabled then - Zahlenformat.Select Selektion - Merk_dir_das=Zahlenformat.GetSelText - else - Auswahl.Select 2 - end if - end if - Sleep 2 - FeldbefehlBearbeitenDokument.OK - Sleep 1 - - EditFields - Kontext "FeldbefehlBearbeitenDokument" - if Formatliste.IsVisible AND Formatliste.IsEnabled then - if Formatliste.GetSelText <> Merk_dir_das then Warnlog "Changing the field has not been worked. Format " + Merk_dir_das + " Is : Format " + Formatliste.GetSelText - else - if Zahlenformat.IsVisible AND Zahlenformat.IsEnabled then - if Zahlenformat.GetSelText <> Merk_dir_das then Warnlog "Changing the field has not been worked. Format " + Merk_dir_das + " Is : Format " + Zahlenformat.GetSelText - else - if Auswahl.GetSelIndex <> 2 then Warnlog "Changing the field has not been worked." - end if - end if - FeldbefehlBearbeitenDokument.OK - Call wTypeKeys "<End>" - Sleep 1 - Call wTypeKeys "<Return>" + + Dim Merk_dir_das as String + + Call wTypeKeys "<Left>" + EditFields + Kontext "FeldbefehlBearbeitenDokument" + if ( FeldbefehlBearbeitenDokument.exists( 1 ) ) then + if Formatliste.IsVisible AND Formatliste.IsEnabled then + Formatliste.Select Selektion + Merk_dir_das=Formatliste.GetSelText + else + if Zahlenformat.IsVisible AND Zahlenformat.IsEnabled then + Zahlenformat.Select Selektion + Merk_dir_das=Zahlenformat.GetSelText + else + Auswahl.Select 2 + end if + end if + FeldbefehlBearbeitenDokument.OK + else + warnlog( "Dialog <FeldbefehlBearbeitenDokument> not available" ) + endif + + EditFields + Kontext "FeldbefehlBearbeitenDokument" + if ( FeldbefehlBearbeitenDokument.exists( 1 ) ) then + if Formatliste.IsVisible AND Formatliste.IsEnabled then + if Formatliste.GetSelText <> Merk_dir_das then Warnlog "Changing the field has not been worked. Format " + Merk_dir_das + " Is : Format " + Formatliste.GetSelText + else + if Zahlenformat.IsVisible AND Zahlenformat.IsEnabled then + if Zahlenformat.GetSelText <> Merk_dir_das then Warnlog "Changing the field has not been worked. Format " + Merk_dir_das + " Is : Format " + Zahlenformat.GetSelText + else + if Auswahl.GetSelIndex <> 2 then Warnlog "Changing the field has not been worked." + end if + end if + FeldbefehlBearbeitenDokument.OK + else + warnlog( "Dialog <FeldbefehlBearbeitenDokument> not available" ) + endif + Call wTypeKeys "<End>" + WaitSlot() ' NOOP + Call wTypeKeys "<Return>" end sub ' ----------------------------------------------------------------------- sub hEinfuegenFloatingFrame - InsertFloatingFrame - Kontext "TabEigenschaften" - FrameName.SetText "Hallo" - Inhalt.SetText ConvertPath ( gTesttoolpath + "input\desktop\frameset.htm" ) - TabEigenschaften.OK - Sleep 10 + + InsertFloatingFrame + Kontext "TabEigenschaften" + FrameName.SetText "Hallo" + Inhalt.SetText ConvertPath ( gTesttoolpath + "input\desktop\frameset.htm" ) + TabEigenschaften.OK + Sleep 10 + end sub ' ----------------------------------------------------------------------- sub hEinfuegenRahmen - InsertFrame - Kontext - Active.SetPage TabType - Kontext "TabType" - TabType.OK - Sleep 3 + InsertFrame + Kontext + Active.SetPage TabType + Kontext "TabType" + TabType.OK + Sleep 3 end sub ' ----------------------------------------------------------------------- sub hEinfuegenChart - InsertObjectChart - Kontext "AutoformatDiagramm1" - Fertigstellen.Click - Sleep 2 + InsertObjectChart + Kontext "AutoformatDiagramm1" + Fertigstellen.Click + WaitSlot() ' NOOP end sub ' ----------------------------------------------------------------------- sub hLegendeEinfugen - Kontext "Toolbar" - Zeichnen.TearOff - Kontext "Drawbar" - Sleep 2 - Legende.Click - Kontext "DocumentWriter" - DocumentWriter.MouseDown 20, 20 - DocumentWriter.MouseMove 40, 40 - DocumentWriter.MouseUp 40, 40 - Kontext "Drawbar" - Drawbar.Close + Kontext "Toolbar" + Zeichnen.TearOff + Kontext "Drawbar" + Sleep 2 + Legende.Click + Kontext "DocumentWriter" + DocumentWriter.MouseDown 20, 20 + DocumentWriter.MouseMove 40, 40 + DocumentWriter.MouseUp 40, 40 + Kontext "Drawbar" + Drawbar.Close end sub ' ----------------------------------------------------------------------- sub wWriterKickBoxAway - ' Call this routine if you don't expect a messagebox - ' expect on an error. Closes messagebox and gives a Warnlog - Kontext "Active" - if Active.Exists then - if Active.GetRT = 304 then - Warnlog Active.Gettext - try - Active.Ok - catch - Active.Yes - endcatch - end if - end if + ' Call this routine if you don't expect a messagebox + ' expect on an error. Closes messagebox and gives a Warnlog + Kontext "Active" + if Active.Exists then + if Active.GetRT = 304 then + Warnlog Active.Gettext + try + Active.Ok + catch + Active.Yes + endcatch + end if + end if end sub '---------------------------------------------------------------- sub tCheckAutotextInGroup(NumberOff as integer, NumberVariant as integer) - Dim j as integer - for j = 1 to NumberOff - Liste.Select j + NumberVariant - printlog "- " & Liste.GetSelText - Wait 500 - try - AutoText.Ok - Wait 100 - Kontext "Active" ' Messagebox bei Basic-Fehler - if Active.Exists then - Warnlog Active.Gettext + "Group " + NumberVariant + " Entry " + j + Dim j as integer + for j = 1 to NumberOff + Liste.Select j + NumberVariant + printlog "- " & Liste.GetSelText + Wait 500 + try + AutoText.Ok + Wait 100 + Kontext "Active" ' Messagebox bei Basic-Fehler + if Active.Exists then + Warnlog Active.Gettext + "Group " + NumberVariant + " Entry " + j + Active.Ok + end if + wait 500 + Kontext "Eingabefeld" + if Eingabefeld.Exists then Eingabefeld.Cancel + wait 500 + Call wTypeKeys "<Mod1 a>" + EditCopy + if GetClipboard = "" then Warnlog "No autotext inserted. Variant: "+ NumberVariant + " " + j + catch + Warnlog "Variant "+ NumberVariant + " " + j +" has a Problem." + endcatch + Call wTypeKeys "<Delete>" ' only text + Call wMarkObjects(TRUE) + EditAutotext + Kontext "Active" + if active.Exists then + QAErrorlog Active.Gettext Active.Ok - end if - wait 500 - Kontext "Eingabefeld" - if Eingabefeld.Exists then Eingabefeld.Cancel - wait 500 - Call wTypeKeys "<Mod1 a>" - EditCopy - if GetClipboard = "" then Warnlog "No autotext inserted. Variant: "+ NumberVariant + " " + j - catch - Warnlog "Variant "+ NumberVariant + " " + j +" has a Problem." - endcatch - Call wTypeKeys "<Delete>" ' only text - Call wMarkObjects(TRUE) - EditAutotext - Kontext "Active" - if active.Exists then - QAErrorlog Active.Gettext - Active.Ok - end if - Kontext "AutoText" - if not Vorschau_anzeigen.IsChecked then Warnlog "Preview isn't checked anymore!" - next j + end if + Kontext "AutoText" + if not Vorschau_anzeigen.IsChecked then Warnlog "Preview isn't checked anymore!" + next j end sub '---------------------------------------------------------------- sub hMalZeichnenMitSelektion ( xS, yS, xE, yE ) - Select Case gApplication - Case "WRITER" - Kontext "DocumentWriter" - DocumentWriter.MouseDown ( xS, yS ) - DocumentWriter.MouseMove ( xE, yE ) - DocumentWriter.MouseUp ( xE, yE ) - Sleep 1 - - Case "HTML" - Kontext "DocumentWriterWeb" - DocumentWriterWeb.MouseDown ( xS, yS ) - DocumentWriterWeb.MouseMove ( xE, yE ) - DocumentWriterWeb.MouseUp ( xE, yE ) - Sleep 1 - - Case "MASTERDOCUMENT" - Kontext "DocumentMasterDoc" - DocumentMasterDoc.MouseDown ( xS, yS ) - DocumentMasterDoc.MouseMove ( xE, yE ) - DocumentMasterDoc.MouseUp ( xE, yE ) - Sleep 1 - - end select + Select Case gApplication + Case "WRITER" + Kontext "DocumentWriter" + DocumentWriter.MouseDown ( xS, yS ) + DocumentWriter.MouseMove ( xE, yE ) + DocumentWriter.MouseUp ( xE, yE ) + + Case "HTML" + Kontext "DocumentWriterWeb" + DocumentWriterWeb.MouseDown ( xS, yS ) + DocumentWriterWeb.MouseMove ( xE, yE ) + DocumentWriterWeb.MouseUp ( xE, yE ) + + Case "MASTERDOCUMENT" + Kontext "DocumentMasterDoc" + DocumentMasterDoc.MouseDown ( xS, yS ) + DocumentMasterDoc.MouseMove ( xE, yE ) + DocumentMasterDoc.MouseUp ( xE, yE ) + + end select + WaitSlot() ' NOOP end sub '---------------------------------------------------------------- sub hMalZeichnen ( xS, yS, xE, yE ) - Select Case gApplication - Case "WRITER" - Kontext "DocumentWriter" - DocumentWriter.MouseDown ( xS, yS ) - DocumentWriter.MouseMove ( xE, yE ) - DocumentWriter.MouseUp ( xE, yE ) - Sleep 1 - if DocumentWriter.IsEnabled then Call wTypeKeys "<Escape>" - - Case "HTML" - Kontext "DocumentWriterWeb" - DocumentWriterWeb.MouseDown ( xS, yS ) - DocumentWriterWeb.MouseMove ( xE, yE ) - DocumentWriterWeb.MouseUp ( xE, yE ) - Sleep 1 - if DocumentWriterWeb.IsEnabled then DocumentWriterWeb.TypeKeys "<Escape>" - - Case "MASTERDOCUMENT" - Kontext "DocumentMasterDoc" - DocumentMasterDoc.MouseDown ( xS, yS ) - DocumentMasterDoc.MouseMove ( xE, yE ) - DocumentMasterDoc.MouseUp ( xE, yE ) - Sleep 1 - if DocumentMasterDoc.IsEnabled then DocumentMasterDoc.TypeKeys "<Escape>" - - end select + Select Case gApplication + Case "WRITER" + Kontext "DocumentWriter" + DocumentWriter.MouseDown ( xS, yS ) + DocumentWriter.MouseMove ( xE, yE ) + DocumentWriter.MouseUp ( xE, yE ) + WaitSlot() ' NOOP + if DocumentWriter.IsEnabled then Call wTypeKeys "<Escape>" + + Case "HTML" + Kontext "DocumentWriterWeb" + DocumentWriterWeb.MouseDown ( xS, yS ) + DocumentWriterWeb.MouseMove ( xE, yE ) + DocumentWriterWeb.MouseUp ( xE, yE ) + WaitSlot() ' NOOP + if DocumentWriterWeb.IsEnabled then DocumentWriterWeb.TypeKeys "<Escape>" + + Case "MASTERDOCUMENT" + Kontext "DocumentMasterDoc" + DocumentMasterDoc.MouseDown ( xS, yS ) + DocumentMasterDoc.MouseMove ( xE, yE ) + DocumentMasterDoc.MouseUp ( xE, yE ) + WaitSlot() ' NOOP + if DocumentMasterDoc.IsEnabled then DocumentMasterDoc.TypeKeys "<Escape>" + + end select end sub '---------------------------------------------------------------- sub sMenufunktionen(Fuer_Was as string) - Dim i as integer - - Kontext "FormControls" - Sleep 3 - for i = 1 to 20 - if ControlProperties.IsEnabled then - ControlProperties.Click ' Formularfunktion über Toolbox abschalten - i=21 - else - Sleep 1 - if i >= 20 then - if gPlatform = "osx" then - Warnlog "#i82427#-Mac OS X (Aqua): Drawing function does not draw anything" - else - Warnlog "Button (" + i + ")" + Fuer_Was + " is disabled " - end if - end if - end if - next i - - Kontext - try - FormatControl - Sleep 1 - Kontext "ControlPropertiesDialog" - if ControlPropertiesDialog.Exists then - ControlPropertiesDialog.Close - else - FormatControl - Wait 500 - Kontext "ControlPropertiesDialog" - if ControlPropertiesDialog.Exists then + Dim i as integer + + Kontext "FormControls" + Sleep 3 + for i = 1 to 20 + if ControlProperties.IsEnabled then + ControlProperties.Click ' Formularfunktion über Toolbox abschalten + i=21 + else + Sleep 1 + if i >= 20 then + if gPlatform = "osx" then + Warnlog "#i82427#-Mac OS X (Aqua): Drawing function does not draw anything" + else + Warnlog "Button (" + i + ")" + Fuer_Was + " is disabled " + end if + end if + end if + next i + + Kontext + try + FormatControl + Sleep 1 + Kontext "ControlPropertiesDialog" + if ControlPropertiesDialog.Exists then ControlPropertiesDialog.Close - else - Warnlog " - Controlfieldproperties "+ Fuer_Was +" from Menu not available!" - end if - end if - printlog Fuer_Was - catch + else + FormatControl + Wait 500 + Kontext "ControlPropertiesDialog" + if ControlPropertiesDialog.Exists then + ControlPropertiesDialog.Close + else + Warnlog " - Controlfieldproperties "+ Fuer_Was +" from Menu not available!" + end if + end if + printlog Fuer_Was + catch if gPlatform = "osx" then Warnlog "#i82427#-Mac OS X (Aqua): Drawing function does not draw anything" else Warnlog " - Controlfieldproperties "+ Fuer_Was +" from Menu not available!" - end if - endcatch + end if + endcatch - Call wTypeKeys "<Escape>" - Kontext "FormControls" - end sub + Call wTypeKeys "<Escape>" + Kontext "FormControls" +end sub '---------------------------------------------------------------- sub sAutopilot_Groupelement - Kontext "AutopilotGroupelement" - if AutopilotGroupelement.Exists then - printlog " -Autopilot-Group-Box Page 1" - Kontext "TabGroupBoxData" - Call DialogTest ( TabGroupBoxData ) - Names.Settext "Optionsfeld 1" - if AddTo.IsEnabled then - AddTo.Click - else - Warnlog "Entry couldn't be overtaken in 1st Window of the Group Box-Autopilot!" - Kontext "AutopilotGroupelement" - CancelButton.Click - end if - Sleep 3 - Kontext "AutopilotGroupelement" - if NextButton.IsEnabled then - NextButton.Click - else - Warnlog "In 1st Window the 'Next'-button is disabled!" - CancelButton.Click - end if - Sleep 3 - printlog " -Autopilot-Group-Box Page 2" - Kontext "TabDefaultFieldSelection" - Call DialogTest ( TabDefaultFieldSelection ) - Kontext "AutopilotGroupelement" - if NextButton.IsEnabled then - NextButton.Click - else - Warnlog "In 2nd Window the 'Next'-button is disabled!!" - AutopilotGroupelement.Cancel - end if - Sleep 3 - printlog " -Autopilot-Group-Box Page 3" - Kontext "TabDatabaseValues" - Call DialogTest ( TabDatabaseValues ) - Kontext "AutopilotGroupelement" - if NextButton.IsEnabled then - NextButton.Click - else - Warnlog "In 3rd Window the 'Next'-button is disabled!" - AutopilotGroupelement.Cancel - end if - Sleep 3 - printlog " -Autopilot-Group-Box Page 4" - Kontext "TabCreateOptionGroup" - Call DialogTest ( TabCreateOptionGroup ) - Kontext "AutopilotGroupelement" - if CreateButton.IsEnabled then - CreateButton.Click - else - Warnlog "In 4th Window the 'Create'-button is disabled!" - AutopilotGroupelement.Cancel - end if - else - Warnlog "- Autopilot for Group Box didn't appear!" - end if - Sleep 2 + Kontext "AutopilotGroupelement" + if AutopilotGroupelement.Exists then + printlog " -Autopilot-Group-Box Page 1" + Kontext "TabGroupBoxData" + Call DialogTest ( TabGroupBoxData ) + Names.Settext "Optionsfeld 1" + if AddTo.IsEnabled then + AddTo.Click + else + Warnlog "Entry couldn't be overtaken in 1st Window of the Group Box-Autopilot!" + Kontext "AutopilotGroupelement" + CancelButton.Click + end if + Sleep 3 + Kontext "AutopilotGroupelement" + if NextButton.IsEnabled then + NextButton.Click + else + Warnlog "In 1st Window the 'Next'-button is disabled!" + CancelButton.Click + end if + Sleep 3 + printlog " -Autopilot-Group-Box Page 2" + Kontext "TabDefaultFieldSelection" + Call DialogTest ( TabDefaultFieldSelection ) + Kontext "AutopilotGroupelement" + if NextButton.IsEnabled then + NextButton.Click + else + Warnlog "In 2nd Window the 'Next'-button is disabled!!" + AutopilotGroupelement.Cancel + end if + Sleep 3 + printlog " -Autopilot-Group-Box Page 3" + Kontext "TabDatabaseValues" + Call DialogTest ( TabDatabaseValues ) + Kontext "AutopilotGroupelement" + if NextButton.IsEnabled then + NextButton.Click + else + Warnlog "In 3rd Window the 'Next'-button is disabled!" + AutopilotGroupelement.Cancel + end if + Sleep 3 + printlog " -Autopilot-Group-Box Page 4" + Kontext "TabCreateOptionGroup" + Call DialogTest ( TabCreateOptionGroup ) + Kontext "AutopilotGroupelement" + if CreateButton.IsEnabled then + CreateButton.Click + else + Warnlog "In 4th Window the 'Create'-button is disabled!" + AutopilotGroupelement.Cancel + end if + else + Warnlog "- Autopilot for Group Box didn't appear!" + end if + Sleep 2 end sub '---------------------------------------------------------------- sub sAutopilot_ListboxCombobox(WhichBox as String) - Kontext "AutoPilotListComboBox" - if AutoPilotListComboBox.Exists then - printlog " -Autopilot-Listbox Page 1" - Kontext "TabListBoxData" - if TabListboxData.Exists then - Call DialogTest( TabListBoxData ) - DataSource.Select 1 - if Table.GetItemCount > 0 then - Table.Select 1 - else - Kontext "Messagebox" - Do - if Messagebox.Exists then - Warnlog Messagebox.Gettext - Messagebox.Ok + Kontext "AutoPilotListComboBox" + if AutoPilotListComboBox.Exists then + printlog " -Autopilot-Listbox Page 1" + Kontext "TabListBoxData" + if TabListboxData.Exists then + Call DialogTest( TabListBoxData ) + DataSource.Select 1 + if Table.GetItemCount > 0 then + Table.Select 1 + else + Kontext "Messagebox" + Do + if Messagebox.Exists then + Warnlog Messagebox.Gettext + Messagebox.Ok + else + Warnlog "No table selectable!" + exit do + end if + Loop + Kontext "AutoPilotListComboBox" + CancelButton.Click + exit sub + end if + end if + Sleep 5 + Kontext "AutoPilotListComboBox" + if NextButton.IsEnabled then + NextButton.Click + printlog " -Autopilot-Listbox Page 2" + Kontext "TabTableSelection" + Call DialogTest ( TabTableSelection ) + if TableSelection.GetItemCount > 0 then + TableSelection.Select 1 + Kontext "AutoPilotListComboBox" + if NextButton.IsEnabled then + NextButton.Click + printlog " -Autopilot-Listbox Page 3" + Kontext "TabFieldSelection" + Call DialogTest ( TabFieldSelection ) + ExistingFields.Select 1 + Kontext "AutoPilotListComboBox" + if NextButton.IsEnabled then + NextButton.Click + Select Case Ucase(WhichBox) + Case "LISTBOX" + printlog " -Autopilot-Listbox Page 4" + Kontext "TabFieldLink" + Call DialogTest ( TabFieldLink ) + Case "COMBO" + Kontext "TabDatabaseField" + Call DialogTest ( TabDatabaseField ) + end select + Kontext "AutoPilotListComboBox" + CancelButton.Click + else + Warnlog "Next-Button on 3rd Tabpage disabled!" + CancelButton.Click + exit sub + end if else - Warnlog "No table selectable!" - exit do + Warnlog "Next-Button on Second Tabpage disabled!" + CancelButton.Click + exit sub end if - Loop - Kontext "AutoPilotListComboBox" - CancelButton.Click - exit sub - end if - end if - Sleep 5 - Kontext "AutoPilotListComboBox" - if NextButton.IsEnabled then - NextButton.Click - printlog " -Autopilot-Listbox Page 2" - Kontext "TabTableSelection" - Call DialogTest ( TabTableSelection ) - if TableSelection.GetItemCount > 0 then - TableSelection.Select 1 - Kontext "AutoPilotListComboBox" - if NextButton.IsEnabled then - NextButton.Click - printlog " -Autopilot-Listbox Page 3" - Kontext "TabFieldSelection" - Call DialogTest ( TabFieldSelection ) - ExistingFields.Select 1 - Kontext "AutoPilotListComboBox" - if NextButton.IsEnabled then - NextButton.Click - Select Case Ucase(WhichBox) - Case "LISTBOX" - printlog " -Autopilot-Listbox Page 4" - Kontext "TabFieldLink" - Call DialogTest ( TabFieldLink ) - Case "COMBO" - Kontext "TabDatabaseField" - Call DialogTest ( TabDatabaseField ) - end select - Kontext "AutoPilotListComboBox" - CancelButton.Click - else - Warnlog "Next-Button on 3rd Tabpage disabled!" - CancelButton.Click - exit sub - end if else - Warnlog "Next-Button on Second Tabpage disabled!" - CancelButton.Click - exit sub + Warnlog "Unable to select table on second tabpage!" + CancelButton.Click + exit sub end if - else - Warnlog "Unable to select table on second tabpage!" + else + Warnlog "Next-Button on first Tabpage disabled!" CancelButton.Click - exit sub - end if - else - Warnlog "Next-Button on first Tabpage disabled!" - CancelButton.Click - Exit sub - end if - else - Warnlog "Autopilot is not up!" - end if + Exit sub + end if + else + Warnlog "Autopilot is not up!" + end if end sub '---------------------------------------------------------------- sub sAutopilotTableElement - Kontext "AutopilotTableElement" - if AutopilotTableElement.Exists then - Call DialogTest ( AutopilotTableElement ) - Kontext "TabListBoxData" - if TabListboxData.Exists then - Call DialogTest( TabListBoxData ) - DataSource.Select 1 - if Table.GetItemCount > 0 then - Table.Select 1 - else - Kontext "Messagebox" - if Messagebox.Exists then - Warnlog Messagebox.Gettext - Messagebox.Ok - else - Warnlog "No table selectable!" - end if - Kontext "AutopilotTableElement" - CancelButton.Click - exit sub - end if - end if - Kontext "AutopilotTableElement" - CancelButton.Click - else - Warnlog "Autopilot Table Element is not up" - end if + Kontext "AutopilotTableElement" + if AutopilotTableElement.Exists then + Call DialogTest ( AutopilotTableElement ) + Kontext "TabListBoxData" + if TabListboxData.Exists then + Call DialogTest( TabListBoxData ) + DataSource.Select 1 + if Table.GetItemCount > 0 then + Table.Select 1 + else + Kontext "Messagebox" + if Messagebox.Exists then + Warnlog Messagebox.Gettext + Messagebox.Ok + else + Warnlog "No table selectable!" + end if + Kontext "AutopilotTableElement" + CancelButton.Click + exit sub + end if + end if + Kontext "AutopilotTableElement" + CancelButton.Click + else + Warnlog "Autopilot Table Element is not up" + end if end sub ' ***************************************************** @@ -565,472 +554,472 @@ end sub ' ***************************************************** function uTabDokument as Integer - Dim i : Dim j : Dim k : Dim Ende : Dim NichtMachen - Dim Zaehler - Dim AlterWert as String : Dim Naechster as String - - printlog " - Tabpage Document" - try - Kontext - Active.SetPage TabDokumentFeldbefehle - Kontext "TabDokumentFeldbefehle" - for i=1 to Feldtyp.GetItemCount - Feldtyp.Select i - Sleep 1 - if Formatliste.IsVisible then - if Formatliste.IsEnabled then - if Auswahl.IsEnabled then - for j=1 to Auswahl.GetItemCount - Auswahl.Select j - for k=1 to Formatliste.GetItemCount - Formatliste.Select k - Zaehler=Zaehler+1 - Einfuegen.Click - next k - k=0 - next j - j=0 - else - for k=1 to Formatliste.GetItemCount - Formatliste.Select k - Zaehler=Zaehler+1 - Einfuegen.Click - next k - k=0 - end if - else - if Auswahl.IsEnabled then - for j=1 to Auswahl.GetItemCount - Auswahl.Select j - Zaehler=Zaehler+1 - Einfuegen.Click - next j - j=0 - end if - end if - else - if Zahlenformat.IsEnabled then - if Auswahl.IsEnabled then - for j=1 to Auswahl.GetItemCount - Auswahl.Select j - for k=1 to Zahlenformat.GetItemCount - Zahlenformat.Select k - BeseitigeTabZahlen - Zaehler=Zaehler+1 - Einfuegen.Click - next k - k=0 - next j - j=0 - else - for k=1 to Zahlenformat.GetItemCount - Zahlenformat.Select k - BeseitigeTabZahlen - Zaehler=Zaehler+1 - Einfuegen.Click - next k - k=0 - end if + Dim i : Dim j : Dim k : Dim Ende : Dim NichtMachen + Dim Zaehler + Dim AlterWert as String : Dim Naechster as String + + printlog " - Tabpage Document" + try + Kontext + Active.SetPage TabDokumentFeldbefehle + Kontext "TabDokumentFeldbefehle" + for i=1 to Feldtyp.GetItemCount + Feldtyp.Select i + Sleep 1 + if Formatliste.IsVisible then + if Formatliste.IsEnabled then + if Auswahl.IsEnabled then + for j=1 to Auswahl.GetItemCount + Auswahl.Select j + for k=1 to Formatliste.GetItemCount + Formatliste.Select k + Zaehler=Zaehler+1 + Einfuegen.Click + next k + k=0 + next j + j=0 + else + for k=1 to Formatliste.GetItemCount + Formatliste.Select k + Zaehler=Zaehler+1 + Einfuegen.Click + next k + k=0 + end if + else + if Auswahl.IsEnabled then + for j=1 to Auswahl.GetItemCount + Auswahl.Select j + Zaehler=Zaehler+1 + Einfuegen.Click + next j + j=0 + end if + end if else - if Auswahl.IsEnabled then - for j=1 to Auswahl.GetItemCount - Auswahl.Select j - Zaehler=Zaehler+1 - Einfuegen.Click - next j - j=0 - end if + if Zahlenformat.IsEnabled then + if Auswahl.IsEnabled then + for j=1 to Auswahl.GetItemCount + Auswahl.Select j + for k=1 to Zahlenformat.GetItemCount + Zahlenformat.Select k + BeseitigeTabZahlen + Zaehler=Zaehler+1 + Einfuegen.Click + next k + k=0 + next j + j=0 + else + for k=1 to Zahlenformat.GetItemCount + Zahlenformat.Select k + BeseitigeTabZahlen + Zaehler=Zaehler+1 + Einfuegen.Click + next k + k=0 + end if + else + if Auswahl.IsEnabled then + for j=1 to Auswahl.GetItemCount + Auswahl.Select j + Zaehler=Zaehler+1 + Einfuegen.Click + next j + j=0 + end if + end if end if - end if - Sleep 1 - next i - printlog " here are " + Zaehler + " Fields selectable" - catch - Exceptlog - Warnlog "Tabpage Document: Error in variant " + i + " " + j + " " + k - endcatch - uTabDokument = Zaehler + Sleep 1 + next i + printlog " here are " + Zaehler + " Fields selectable" + catch + Exceptlog + Warnlog "Tabpage Document: Error in variant " + i + " " + j + " " + k + endcatch + uTabDokument = Zaehler end function ' ----------------------------------------------------------------------- function uTabReferenzen as Integer - Dim i : Dim Zaehler - - printlog " - Tabpage Reference" - try - Zaehler = 0 : i=0 - Kontext - Active.SetPage TabReferenzen - Kontext "TabReferenzen" - if NOT NameFeld.IsEnabled then Feldtyp.Select 2 - NameFeld.SetText "Testtool" - TabReferenzen.OK - Feldtyp.Select 1 - if NameFeld.IsEnabled then Feldtyp.Select 2 - for i=1 to Formatliste.GetItemCount - Formatliste.Select i - Zaehler=Zaehler+1 - if Einfuegen.IsEnabled then Einfuegen.Click - Sleep 1 - next i - printlog " - here are " + Zaehler + " Fields selectable" - catch - Exceptlog - Warnlog "Tabpage References: Error in Listentry Type " + i - endcatch - uTabReferenzen = Zaehler + Dim i : Dim Zaehler + + printlog " - Tabpage Reference" + try + Zaehler = 0 : i=0 + Kontext + Active.SetPage TabReferenzen + Kontext "TabReferenzen" + if NOT NameFeld.IsEnabled then Feldtyp.Select 2 + NameFeld.SetText "Testtool" + TabReferenzen.OK + Feldtyp.Select 1 + if NameFeld.IsEnabled then Feldtyp.Select 2 + for i=1 to Formatliste.GetItemCount + Formatliste.Select i + Zaehler=Zaehler+1 + if Einfuegen.IsEnabled then Einfuegen.Click + Sleep 1 + next i + printlog " - here are " + Zaehler + " Fields selectable" + catch + Exceptlog + Warnlog "Tabpage References: Error in Listentry Type " + i + endcatch + uTabReferenzen = Zaehler end function ' ----------------------------------------------------------------------- function uTabFunktionen as Integer - Dim i : Dim j : Dim k : Dim Ende : Dim NichtMachen - Dim Zaehler, x as integer - Dim weiter as Boolean - Dim AlterWert as String : Dim Naechster as String - - printlog " - Tabpage Function" - try - Zaehler = 0 : i=0 : j=0 : k= 0 - Kontext - Active.SetPage TabFunktionen - Kontext "TabFunktionen" - for i=1 to Feldtyp.GetItemCount - Feldtyp.Select i - weiter = TRUE - if Formatliste.IsVisible AND Formatliste.IsEnabled then - for j=1 to FormatListe.GetItemCount - FormatListe.Select j - Platzhalter.SetText "Ein" - Hinweis.SetText "Test" - Zaehler=Zaehler+1 - if Einfuegen.IsEnabled then Einfuegen.Click - weiter = FALSE - next j - j=0 - else - if Dann.IsVisible AND Dann.IsEnabled then - Bedingung.SetText "Hallo" - Dann.SetText "Ein" - Sonst.SetText "Test" - Zaehler=Zaehler+1 - if Einfuegen.IsEnabled then Einfuegen.Click - weiter = FALSE - end if + Dim i : Dim j : Dim k : Dim Ende : Dim NichtMachen + Dim Zaehler, x as integer + Dim weiter as Boolean + Dim AlterWert as String : Dim Naechster as String + + printlog " - Tabpage Function" + try + Zaehler = 0 : i=0 : j=0 : k= 0 + Kontext + Active.SetPage TabFunktionen + Kontext "TabFunktionen" + for i=1 to Feldtyp.GetItemCount + Feldtyp.Select i + weiter = TRUE + if Formatliste.IsVisible AND Formatliste.IsEnabled then + for j=1 to FormatListe.GetItemCount + FormatListe.Select j + Platzhalter.SetText "Ein" + Hinweis.SetText "Test" + Zaehler=Zaehler+1 + if Einfuegen.IsEnabled then Einfuegen.Click + weiter = FALSE + next j + j=0 + else + if Dann.IsVisible AND Dann.IsEnabled then + Bedingung.SetText "Hallo" + Dann.SetText "Ein" + Sonst.SetText "Test" + Zaehler=Zaehler+1 + if Einfuegen.IsEnabled then Einfuegen.Click + weiter = FALSE + end if - if weiter = TRUE then - if ( Hinweis.IsVisible AND Hinweis.IsEnabled ) AND NOT Namefeld.IsEnabled then - Hinweis.SetText "Testtool" - Zaehler=Zaehler+1 - Einfuegen.Click - Kontext "Eingabefeld" - if Eingabefeld.Exists then - Eingabefeld.OK - else - Warnlog "The textfield is missing in Variant " + i + " " + j + " " + k + " !" - end if - Kontext "TabFunktionen" - weiter = FALSE - end if - end if + if weiter = TRUE then + if ( Hinweis.IsVisible AND Hinweis.IsEnabled ) AND NOT Namefeld.IsEnabled then + Hinweis.SetText "Testtool" + Zaehler=Zaehler+1 + Einfuegen.Click + Kontext "Eingabefeld" + if Eingabefeld.Exists then + Eingabefeld.OK + else + Warnlog "The textfield is missing in Variant " + i + " " + j + " " + k + " !" + end if + Kontext "TabFunktionen" + weiter = FALSE + end if + end if - if weiter = TRUE then - if MakroButton.IsEnabled then - MakroButton.Click - ' if no JRE is installed a messagebox appears - Do - x = x + 1 - Kontext "Active" - if Active.Exists then - if Active.GetRT = 304 then - if x = 1 then Warnlog Active.Gettext - Active.Ok + if weiter = TRUE then + if MakroButton.IsEnabled then + MakroButton.Click + ' if no JRE is installed a messagebox appears + Do + x = x + 1 + Kontext "Active" + if Active.Exists then + if Active.GetRT = 304 then + if x = 1 then Warnlog Active.Gettext + Active.Ok + else + exit do + end if else exit do - end if + end if + Loop + Kontext "Makro" + if Ausfuehren.IsEnabled then + Ausfuehren.Click else - exit do + Makro.Cancel end if - Loop - Kontext "Makro" - if Ausfuehren.IsEnabled then - Ausfuehren.Click - else - Makro.Cancel - end if - Kontext "TabFunktionen" - Zaehler=Zaehler+1 - if Einfuegen.IsEnabled then Einfuegen.Click - weiter = FALSE - end if - end if + Kontext "TabFunktionen" + Zaehler=Zaehler+1 + if Einfuegen.IsEnabled then Einfuegen.Click + weiter = FALSE + end if + end if - if weiter = TRUE then - if Bedingung.IsEnabled AND TextEinfuegen.IsEnabled then - Bedingung.SetText "Ein" - TextEinfuegen.SetText "Test" - Zaehler=Zaehler+1 - if Einfuegen.IsEnabled then Einfuegen.Click - weiter = FALSE - end if - end if + if weiter = TRUE then + if Bedingung.IsEnabled AND TextEinfuegen.IsEnabled then + Bedingung.SetText "Ein" + TextEinfuegen.SetText "Test" + Zaehler=Zaehler+1 + if Einfuegen.IsEnabled then Einfuegen.Click + weiter = FALSE + end if + end if - if weiter = TRUE then - if Bedingung.IsEnabled AND NOT Wert.IsEnabled then - Bedingung.SetText "Ein Test" - Zaehler=Zaehler+1 - if Einfuegen.IsEnabled then Einfuegen.Click - weiter = FALSE - end if + if weiter = TRUE then + if Bedingung.IsEnabled AND NOT Wert.IsEnabled then + Bedingung.SetText "Ein Test" + Zaehler=Zaehler+1 + if Einfuegen.IsEnabled then Einfuegen.Click + weiter = FALSE + end if + end if end if - end if - Sleep 1 - next i - printlog " - here are " + Zaehler + " Fields selectable" - catch - Exceptlog - Warnlog "Tabpage Functions: Error in entry type " + i + " " + j - endcatch - uTabFunktionen = Zaehler + Sleep 1 + next i + printlog " - here are " + Zaehler + " Fields selectable" + catch + Exceptlog + Warnlog "Tabpage Functions: Error in entry type " + i + " " + j + endcatch + uTabFunktionen = Zaehler end function ' ----------------------------------------------------------------------- function uTabDokumentinfo as Integer - Dim i : Dim j : Dim k : Dim Ende : Dim NichtMachen - Dim Zaehler - Dim AlterWert as String : Dim Naechster as String - - printlog " - Tabpage DocInformation" - try - Zaehler = 0 : i=0 : j=0 : k= 0 - Kontext - Active.SetPage TabDokumentInfoFeldbefehle - Kontext "TabDokumentInfoFeldbefehle" - - for i=1 to 20 - AlterWert = Feldtyp.GetText - Feldtyp.TypeKeys "<Down>" - Naechster = Feldtyp.GetText - Feldtyp.TypeKeys "<Up>" - Feldtyp.TypeKeys "<Add>" - Feldtyp.TypeKeys "<Down>" - if Feldtyp.GetText <> Naechster then NichtMachen=i - Feldtyp.TypeKeys "<Up>" - Feldtyp.TypeKeys "<Down>" - if Feldtyp.GetText = AlterWert then - Ende = i - i=21 - end if - Sleep 1 - next i - Feldtyp.TypeKeys "<Up>", Ende+1 - - i=0 - for i=1 to Ende ' Alle Feldtypen - Sleep 1 - if Auswahl.IsEnabled then - for j=1 to Auswahl.GetItemCount - Auswahl.Select j - if Zahlenformat.IsEnabled then - for k=1 to Zahlenformat.GetItemCount - Zahlenformat.Select k - Zaehler = Zaehler + 1 - Kontext "TabZahlen" - if TabZahlen.Exists then TabZahlen.Cancel - Kontext "TabDokumentinfoFeldbefehle" - if Einfuegen.IsEnabled then Einfuegen.Click - next k - k=0 - else - Zaehler = Zaehler + 1 - if Einfuegen.IsEnabled then Einfuegen.Click - end if - next j - j=0 - else - if Zahlenformat.IsEnabled then - for k=1 to Zahlenformat.GetItemCount - Zahlenformat.Select k - Zaehler = Zaehler + 1 - Kontext "TabZahlen" - if TabZahlen.Exists then TabZahlen.Cancel - Kontext "TabDokumentinfoFeldbefehle" - if Einfuegen.IsEnabled then Einfuegen.Click - next k - k=0 - else - Zaehler = Zaehler + 1 - if Einfuegen.IsEnabled then Einfuegen.Click - end if - end if - if i = NichtMachen-1 then - Feldtyp.TypeKeys "<Down><Down>" - else + Dim i : Dim j : Dim k : Dim Ende : Dim NichtMachen + Dim Zaehler + Dim AlterWert as String : Dim Naechster as String + + printlog " - Tabpage DocInformation" + try + Zaehler = 0 : i=0 : j=0 : k= 0 + Kontext + Active.SetPage TabDokumentInfoFeldbefehle + Kontext "TabDokumentInfoFeldbefehle" + + for i=1 to 20 + AlterWert = Feldtyp.GetText Feldtyp.TypeKeys "<Down>" - end if - Sleep 1 - next i - printlog " - here are " + Zaehler + " Fields selectable" - catch - Exceptlog - Warnlog "Tabpage Variables: Error on type entry " + i + " " + j + " " + k - endcatch - uTabDokumentinfo = Zaehler -end function - -' ----------------------------------------------------------------------- - -function uTabVariablen as Integer - Dim i : Dim j : Dim k : Dim Ende : Dim NichtMachen - Dim Zaehler - Dim AlterWert as String : Dim Naechster as String - printlog " - Tabpage Variables" - - try - Zaehler = 0 : i=0 : j=0 : k=0 - Kontext - Active.SetPage TabVariablen - Kontext "TabVariablen" - - for i=1 to Feldtyp.GetItemCount - Feldtyp.Select i - if i=9 then + Naechster = Feldtyp.GetText Feldtyp.TypeKeys "<Up>" + Feldtyp.TypeKeys "<Add>" Feldtyp.TypeKeys "<Down>" - end if - if NameText.IsEnabled then NameText.SetText "Hallo" - if Wert.IsEnabled then Wert.SetText "189882" - - if Auswahl.IsEnabled AND ( Formatliste.IsEnabled OR Zahlenformat.IsEnabled )then - for j=1 to Auswahl.GetItemCount - Auswahl.Select j - if FormatListe.IsVisible AND FormatListe.IsEnabled then - for k=1 to Formatliste.GetItemCount - Formatliste.Select k - Zaehler = Zaehler + 1 - if Einfuegen.IsEnabled then Einfuegen.Click - next k - k=0 - else - if Zahlenformat.IsVisible AND Zahlenformat.IsEnabled then - for k=1 to Zahlenformat.GetItemCount + if Feldtyp.GetText <> Naechster then NichtMachen=i + Feldtyp.TypeKeys "<Up>" + Feldtyp.TypeKeys "<Down>" + if Feldtyp.GetText = AlterWert then + Ende = i + i=21 + end if + Sleep 1 + next i + Feldtyp.TypeKeys "<Up>", Ende+1 + + i=0 + for i=1 to Ende ' Alle Feldtypen + Sleep 1 + if Auswahl.IsEnabled then + for j=1 to Auswahl.GetItemCount + Auswahl.Select j + if Zahlenformat.IsEnabled then + for k=1 to Zahlenformat.GetItemCount + Zahlenformat.Select k + Zaehler = Zaehler + 1 + Kontext "TabZahlen" + if TabZahlen.Exists then TabZahlen.Cancel + Kontext "TabDokumentinfoFeldbefehle" + if Einfuegen.IsEnabled then Einfuegen.Click + next k + k=0 + else + Zaehler = Zaehler + 1 + if Einfuegen.IsEnabled then Einfuegen.Click + end if + next j + j=0 + else + if Zahlenformat.IsEnabled then + for k=1 to Zahlenformat.GetItemCount Zahlenformat.Select k Zaehler = Zaehler + 1 Kontext "TabZahlen" - if TabZahlen.Exists then TabZahlen.OK - Kontext "TabVariablen" + if TabZahlen.Exists then TabZahlen.Cancel + Kontext "TabDokumentinfoFeldbefehle" if Einfuegen.IsEnabled then Einfuegen.Click - Kontext "Eingabefeld" - if Eingabefeld.Exists then Eingabefeld.OK - Kontext "TabVariablen" - next k - k=0 - end if - end if - next j - j=0 - else - if FormatListe.IsVisible AND FormatListe.IsEnabled then - for k=1 to Formatliste.GetItemCount - Formatliste.Select k - Zaehler = Zaehler + 1 - if Einfuegen.IsEnabled then Einfuegen.Click - Kontext "TabZahlen" - if TabZahlen.Exists then TabZahlen.OK - Kontext "TabVariablen" - next k - k=0 + next k + k=0 + else + Zaehler = Zaehler + 1 + if Einfuegen.IsEnabled then Einfuegen.Click + end if + end if + if i = NichtMachen-1 then + Feldtyp.TypeKeys "<Down><Down>" else - if Zahlenformat.IsVisible AND Zahlenformat.IsEnabled then - for k=1 to Zahlenformat.GetItemCount - Zahlenformat.Select k - Zaehler = Zaehler + 1 - Kontext "TabZahlen" - if TabZahlen.Exists then TabZahlen.OK - Kontext "TabVariablen" - if Einfuegen.IsEnabled then Einfuegen.Click - Kontext "Eingabefeld" - if Eingabefeld.Exists then Eingabefeld.OK - Kontext "TabVariablen" - next k - k=0 - end if + Feldtyp.TypeKeys "<Down>" end if - end if - Sleep 1 - next i - i=0 - printlog " - here are " + Zaehler + " Fields selectable" - catch - Exceptlog - Warnlog "Tabpage Variables: Error on entry type" + i + " " + j + " " + k - endcatch - uTabVariablen = Zaehler + Sleep 1 + next i + printlog " - here are " + Zaehler + " Fields selectable" + catch + Exceptlog + Warnlog "Tabpage Variables: Error on type entry " + i + " " + j + " " + k + endcatch + uTabDokumentinfo = Zaehler end function ' ----------------------------------------------------------------------- -function uTabDatenbank as Integer - Dim i : Dim j : Dim k : Dim Ende : Dim NichtMachen - Dim Zaehler - Dim AlterWert as String : Dim Naechster as String - - printlog " - Tabpage Database" - try - Zaehler = 0 : i=0 : j=0 : k= 0 - Kontext - Active.SetPage TabDatenbank - Kontext "TabDatenbank" - - Datenbankauswahl.TypeKeys "<Up>", 5 - for i=1 to Feldtyp.GetItemCount - j=0 : k=0 - Feldtyp.Select i - if Satznummer.IsEnabled then Satznummer.SetText "Na_mal_sehen" - for j=1 to 20 - AlterWert = Datenbankauswahl.GetText - if j=1 then - Datenbankauswahl.TypeKeys "<Add>" - Datenbankauswahl.TypeKeys "<Down>" - Datenbankauswahl.TypeKeys "<Add>" - Datenbankauswahl.TypeKeys "<Down>" - else - Datenbankauswahl.TypeKeys "<Down>" +function uTabVariablen as Integer + Dim i : Dim j : Dim k : Dim Ende : Dim NichtMachen + Dim Zaehler + Dim AlterWert as String : Dim Naechster as String + printlog " - Tabpage Variables" + + try + Zaehler = 0 : i=0 : j=0 : k=0 + Kontext + Active.SetPage TabVariablen + Kontext "TabVariablen" + + for i=1 to Feldtyp.GetItemCount + Feldtyp.Select i + if i=9 then + Feldtyp.TypeKeys "<Up>" + Feldtyp.TypeKeys "<Down>" end if - if Datenbankauswahl.GetText = AlterWert then - if j=1 then printlog "Address book contains no data" - j=21 + if NameText.IsEnabled then NameText.SetText "Hallo" + if Wert.IsEnabled then Wert.SetText "189882" + + if Auswahl.IsEnabled AND ( Formatliste.IsEnabled OR Zahlenformat.IsEnabled )then + for j=1 to Auswahl.GetItemCount + Auswahl.Select j + if FormatListe.IsVisible AND FormatListe.IsEnabled then + for k=1 to Formatliste.GetItemCount + Formatliste.Select k + Zaehler = Zaehler + 1 + if Einfuegen.IsEnabled then Einfuegen.Click + next k + k=0 + else + if Zahlenformat.IsVisible AND Zahlenformat.IsEnabled then + for k=1 to Zahlenformat.GetItemCount + Zahlenformat.Select k + Zaehler = Zaehler + 1 + Kontext "TabZahlen" + if TabZahlen.Exists then TabZahlen.OK + Kontext "TabVariablen" + if Einfuegen.IsEnabled then Einfuegen.Click + Kontext "Eingabefeld" + if Eingabefeld.Exists then Eingabefeld.OK + Kontext "TabVariablen" + next k + k=0 + end if + end if + next j + j=0 else - if Selbstdefiniert.IsEnabled AND Selbstdefiniert.IsChecked then - for k=1 to Formatliste.GetItemCount - Formatliste.Select k - Zaehler = Zaehler + 1 - if Einfuegen.IsEnabled then Einfuegen.Click - next k - else - Zaehler = Zaehler + 1 - if Einfuegen.IsEnabled then Einfuegen.Click - end if + if FormatListe.IsVisible AND FormatListe.IsEnabled then + for k=1 to Formatliste.GetItemCount + Formatliste.Select k + Zaehler = Zaehler + 1 + if Einfuegen.IsEnabled then Einfuegen.Click + Kontext "TabZahlen" + if TabZahlen.Exists then TabZahlen.OK + Kontext "TabVariablen" + next k + k=0 + else + if Zahlenformat.IsVisible AND Zahlenformat.IsEnabled then + for k=1 to Zahlenformat.GetItemCount + Zahlenformat.Select k + Zaehler = Zaehler + 1 + Kontext "TabZahlen" + if TabZahlen.Exists then TabZahlen.OK + Kontext "TabVariablen" + if Einfuegen.IsEnabled then Einfuegen.Click + Kontext "Eingabefeld" + if Eingabefeld.Exists then Eingabefeld.OK + Kontext "TabVariablen" + next k + k=0 + end if + end if end if - next j - Datenbankauswahl.TypeKeys "<up>", 20 - Sleep 1 - next i - - printlog " - here are " + Zaehler + " Fields selectable" - catch - Exceptlog - Warnlog "Tabpage Database: Error on field entry " + i + " " + j + " " + k - endcatch - uTabDatenbank = Zaehler + Sleep 1 + next i + i=0 + printlog " - here are " + Zaehler + " Fields selectable" + catch + Exceptlog + Warnlog "Tabpage Variables: Error on entry type" + i + " " + j + " " + k + endcatch + uTabVariablen = Zaehler +end function + +' ----------------------------------------------------------------------- + +function uTabDatenbank as Integer + Dim i : Dim j : Dim k : Dim Ende : Dim NichtMachen + Dim Zaehler + Dim AlterWert as String : Dim Naechster as String + + printlog " - Tabpage Database" + try + Zaehler = 0 : i=0 : j=0 : k= 0 + Kontext + Active.SetPage TabDatenbank + Kontext "TabDatenbank" + + Datenbankauswahl.TypeKeys "<Up>", 5 + for i=1 to Feldtyp.GetItemCount + j=0 : k=0 + Feldtyp.Select i + if Satznummer.IsEnabled then Satznummer.SetText "Na_mal_sehen" + for j=1 to 20 + AlterWert = Datenbankauswahl.GetText + if j=1 then + Datenbankauswahl.TypeKeys "<Add>" + Datenbankauswahl.TypeKeys "<Down>" + Datenbankauswahl.TypeKeys "<Add>" + Datenbankauswahl.TypeKeys "<Down>" + else + Datenbankauswahl.TypeKeys "<Down>" + end if + if Datenbankauswahl.GetText = AlterWert then + if j=1 then printlog "Address book contains no data" + j=21 + else + if Selbstdefiniert.IsEnabled AND Selbstdefiniert.IsChecked then + for k=1 to Formatliste.GetItemCount + Formatliste.Select k + Zaehler = Zaehler + 1 + if Einfuegen.IsEnabled then Einfuegen.Click + next k + else + Zaehler = Zaehler + 1 + if Einfuegen.IsEnabled then Einfuegen.Click + end if + end if + next j + Datenbankauswahl.TypeKeys "<up>", 20 + Sleep 1 + next i + + printlog " - here are " + Zaehler + " Fields selectable" + catch + Exceptlog + Warnlog "Tabpage Database: Error on field entry " + i + " " + j + " " + k + endcatch + uTabDatenbank = Zaehler end function ' ----------------------------------------------------------------------- sub BeseitigeTabZahlen - Kontext "TabZahlen" - if TabZahlen.Exists then TabZahlen.Cancel - Kontext "TabDokumentFeldbefehle" + Kontext "TabZahlen" + if TabZahlen.Exists then TabZahlen.Cancel + Kontext "TabDokumentFeldbefehle" end sub diff --git a/testautomation/writer/tools/includes/w_tool2.inc b/testautomation/writer/tools/includes/w_tool2.inc index 45e4d48831aa..0699f6c74975 100755 --- a/testautomation/writer/tools/includes/w_tool2.inc +++ b/testautomation/writer/tools/includes/w_tool2.inc @@ -1,6 +1,6 @@ '************************************************************************** '* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. -'* +'* '* Copyright 2008 by Sun Microsystems, Inc. '* '* OpenOffice.org - a multi-platform office productivity suite @@ -61,10 +61,10 @@ sub OptionenAufrufen(Seite as string) next i Kontext Select case Seite - case "TabErsetzung" : active.SetPage TabErsetzung - case "TabAusnahmen" : active.SetPage TabAusnahmen - case "TabOptionen" : active.SetPage TabOptionen - case "TabTypografisch": active.SetPage TabTypografisch + case "TabErsetzung" : active.SetPage TabErsetzung + case "TabAusnahmen" : active.SetPage TabAusnahmen + case "TabOptionen" : active.SetPage TabOptionen + case "TabTypografisch": active.SetPage TabTypografisch end select for i = 1 to 5 Kontext "Active" @@ -129,14 +129,14 @@ end sub ' ----------------------------------------------------------------------------- function wCreateAutotextCategory(vCategoryName as string) as boolean - Dim i as integer, bCategoryExist as boolean + Dim i as integer, bCategoryExist as boolean '/// This function creates an autotext-category '/// requires CategoryName to create '/// returns true if category could be created '/// Attention: Autotext-Dialog leaves open after creating category Kontext "Autotext" if Not Autotext.Exists then EditAutotext - + Kontext "Active" if Active.Exists then if Active.GetRT = 304 then @@ -144,10 +144,10 @@ function wCreateAutotextCategory(vCategoryName as string) as boolean Active.Ok end if end if - + Kontext "Autotext" try - Bereiche.Click + Bereiche.Click Kontext "Active" if Active.Exists then if Active.GetRT = 304 then @@ -156,73 +156,73 @@ function wCreateAutotextCategory(vCategoryName as string) as boolean end if end if catch - Warnlog "Button 'Categories' is disabled!" - goto NotPassed + Warnlog "Button 'Categories' is disabled!" + exit function endcatch - - wait 500 + Kontext "BereicheBearbeitenAutotext" - if Not BereicheBearbeitenAutotext.Exists then goto NotPassed - - Liste.TypeKeys "<Home>" - For i = 1 to Liste.GetItemCount - if Liste.GetText = vCategoryName then - QAErrorlog "Category " & vCategoryName & " already existing" - bCategoryExist = true - exit for - end if - next i - - if bCategoryExist = false then - for i = 1 to Pfad.GetItemCount - Pfad.Select i - Bereich.Settext vCategoryName - try - Neu.Click - exit for - catch - if i = Pfad.GetItemCount then - Warnlog "Unable to create new category" - BereicheBearbeitenAutotext.Close - goto NotPassed - end if - endcatch - next i - - if Liste.GetText <> vCategoryName then - Warnlog "New category is not selected after creation" - try - Liste.Select vCategoryName + if ( BereicheBearbeitenAutotext.Exists( 1 ) ) then + + Liste.TypeKeys "<Home>" + For i = 1 to Liste.GetItemCount + if Liste.GetText = vCategoryName then + QAErrorlog "Category " & vCategoryName & " already existing" + bCategoryExist = true + exit for + end if + next i + + if bCategoryExist = false then + for i = 1 to Pfad.GetItemCount + Pfad.Select i + Bereich.Settext vCategoryName + try + Neu.Click + exit for + catch + if i = Pfad.GetItemCount then + Warnlog "Unable to create new category" + BereicheBearbeitenAutotext.Close + exit function + end if + endcatch + next i + + if Liste.GetText <> vCategoryName then + Warnlog "New category is not selected after creation" + try + Liste.Select vCategoryName + wCreateAutotextCategory = true + catch + exit function + endcatch + else wCreateAutotextCategory = true - catch - goto NotPassed - endcatch + end if else wCreateAutotextCategory = true end if - else - wCreateAutotextCategory = true - end if - - Sleep 1 - BereicheBearbeitenAutotext.Ok - Kontext "Active" - if Active.Exists then - if Active.GetRT = 304 then - QAErrorlog Active.Gettext - Active.Ok + BereicheBearbeitenAutotext.Ok + + Kontext "Active" + if Active.Exists then + if Active.GetRT = 304 then + QAErrorlog Active.Gettext + Active.Ok + end if end if - end if - - NotPassed: + + else + warnlog( "Dialog <BereicheBearbeitenAutotext> is not available" ) + endif end function ' ----------------------------------------------------------------------------- function wSelectAutotextCategory(vCategoryName as string) as boolean - Dim i as integer + Dim i as integer '/// This function selects an autotext-category '/// requires CategoryName to select '/// returns true if category could be selected @@ -236,7 +236,7 @@ function wSelectAutotextCategory(vCategoryName as string) as boolean QAErrorlog Active.Gettext Active.Ok end if - end if + end if '/// close all categories Kontext "Autotext" Liste.Select 1 @@ -252,16 +252,16 @@ function wSelectAutotextCategory(vCategoryName as string) as boolean Liste.TypeKeys "<Down>" wait 500 end if - next i - + next i + if Liste.Gettext = vCategoryName then wSelectAutotextCategory = true -end function +end function ' ----------------------------------------------------------------------------- function wDeleteAutotextCategory(vCategoryName as string) as boolean - Dim i as integer + Dim i as integer '/// This function deletes an autotext-category '/// requires CategoryName to delete '/// returns true if category could be deleted @@ -276,11 +276,11 @@ function wDeleteAutotextCategory(vCategoryName as string) as boolean Active.Ok end if end if - + Kontext "Autotext" try Bereiche.Click - + Kontext "Active" if Active.Exists then if Active.GetRT = 304 then @@ -290,32 +290,32 @@ function wDeleteAutotextCategory(vCategoryName as string) as boolean end if catch - Warnlog "Button 'Categories' is disabled!" - goto NotPassed + Warnlog "Button 'Categories' is disabled!" + exit function endcatch - + wait 500 Kontext "BereicheBearbeitenAutotext" - if Not BereicheBearbeitenAutotext.Exists then goto NotPassed - + if Not BereicheBearbeitenAutotext.Exists then exit function + Liste.TypeKeys "<Home>" for i=1 to 10 if Liste.Gettext <> vCategoryName then Liste.TypeKeys "<Down>" wait 500 end if - next i - - if Liste.Gettext = vCategoryName then + next i + + if Liste.Gettext = vCategoryName then try - Loeschen.Click + Loeschen.Click catch - goto NotPassed + exit function BereicheBearbeitenAutotext.Close - endcatch + endcatch end if BereicheBearbeitenAutotext.Ok - + Kontext "Active" if Active.Exists then if Active.GetRT = 304 then @@ -337,8 +337,6 @@ function wDeleteAutotextCategory(vCategoryName as string) as boolean end if end if - NotPassed: - end function '---------------------------------------------------------------------- @@ -348,7 +346,7 @@ function wDeleteAutotext(vAutotextName as string) as boolean '/// requires AutotextName to delete '/// returns true if Autotext could be deleted '/// Attention: Autotext-Dialog leaves open after deleting autotext - + Dim j as integer, sAll as integer Kontext "Autotext" if Not Autotext.Exists then EditAutotext @@ -360,8 +358,8 @@ function wDeleteAutotext(vAutotextName as string) as boolean Active.Ok end if end if - - Kontext "Autotext" + + Kontext "Autotext" Liste.Select 1 for j=1 to 10 Liste.TypeKeys "-" @@ -373,7 +371,7 @@ function wDeleteAutotext(vAutotextName as string) as boolean Liste.TypeKeys "+" sAll = Liste.GetItemCount For j = 1 to sAll - Liste.TypeKeys "<Down>" + Liste.TypeKeys "<Down>" if Liste.Gettext = vAutotextName then try Menue.Click diff --git a/testautomation/writer/tools/includes/w_tool3.inc b/testautomation/writer/tools/includes/w_tool3.inc index 498956365baa..3a3164e3e181 100755 --- a/testautomation/writer/tools/includes/w_tool3.inc +++ b/testautomation/writer/tools/includes/w_tool3.inc @@ -1,6 +1,6 @@ -'************************************************************************** +'******************************************************************************* '* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. -'* +'* '* Copyright 2008 by Sun Microsystems, Inc. '* '* OpenOffice.org - a multi-platform office productivity suite @@ -28,305 +28,260 @@ '* <http://www.openoffice.org/license.html> '* for a copy of the LGPLv3 License. '* -'/************************************************************************ -'* ** -'* owner : fredrik.haegg@sun.com ** -'* ** -'* short description : Description of file ** -'* ** -'******************************************************************* -'* ** -' #1 InTabelleKontrollieren -' #1 InTabelleKontrollierenExtra -' #1 InTextKontrollieren -' #1 AufsteigendKontrollieren ( Zahl as Boolean ) -' #1 AbsteigendKontrollieren ( Zahl as Boolean ) -' #1 AufSortierungPruefen -' #1 AbSortierungPruefen -' #1 UndoRichtigBeiSortierung -' #1 TrennzeichenSetzen ( Trennstring as String ) -' #1 ZelleRuntertesten ( Wert$ ) as Boolean -' #1 wEinfuegenEintragAlle ( NaWieSollErheissen$ ) -' #1 ReihenfolgePruefen -' #1 ReihenfolgePruefen2 -' #1 SchriftFormatTesten ( sName$ ) as String -' #1 ErmittleErgebnis ( Ergebnis as String ) as Boolean -' #1 VerzeichnisUeberNavigator(Welches as integer) -' #1 sZahlenformatfuerZelle -' #1 sNavigatorInBrauchbarenZustand -' #1 sZellinhaltInZwischenablage(VergleichDas as string -' #1 sSeiteMitBrauchbarerTabelleEinrichten -' #1 wOpenContextMenu -'* ** -'\****************************************************************** +'/****************************************************************************** +'* +'* owner : fredrik.haegg@sun.com +'* +'* short description : Description of file +'* +'\****************************************************************************** sub InTabelleKontrollieren - Call wTypeKeys ("<Home>") - Call wTypeKeys ("<Tab><Shift End>") - EditCopy - if GetClipBoardText <> "Text" then - Warnlog "Text has not been inserted in a table" - else - Call wTypeKeys "<Home>" - Call wTypeKeys "<Shift End>" - end if + Call wTypeKeys ("<Home>") + Call wTypeKeys ("<Tab><Shift End>") + EditCopy + if GetClipBoardText <> "Text" then + Warnlog "Text has not been inserted in a table" + else + Call wTypeKeys "<Home>" + Call wTypeKeys "<Shift End>" + end if end sub ' **** sub InTabelleKontrollierenExtra - Call wTypeKeys ("<Home><Shift Tab><Shift End>") - EditCopy - if GetClipBoardText <> "Der" then - Warnlog "Text has not been inserted in a table" - else - Call wTypeKeys "<Home>" - Call wTypeKeys "<Shift End>" - end if + Call wTypeKeys ("<Home><Shift Tab><Shift End>") + EditCopy + if GetClipBoardText <> "Der" then + Warnlog "Text has not been inserted in a table" + else + Call wTypeKeys "<Home>" + Call wTypeKeys "<Shift End>" + end if end sub '*** sub InTextKontrollieren - Call wTypeKeys ("<Home><Shift Mod1 Right>") - EditCopy - if Left$(GetClipBoardText,3) <> "Der" AND Left$(GetClipboardText,4) <> "Der " then - Warnlog "Table has not been changed to text" - else - Call wTypeKeys "<Home>" - Call wTypeKeys "<Shift End>" - end if + Call wTypeKeys ("<Home><Shift Mod1 Right>") + EditCopy + if Left$(GetClipBoardText,3) <> "Der" AND Left$(GetClipboardText,4) <> "Der " then + Warnlog "Table has not been changed to text" + else + Call wTypeKeys "<Home>" + Call wTypeKeys "<Shift End>" + end if end sub '*** sub AufsteigendKontrollieren ( Zahl as Boolean ) - Call wTypeKeys "<Home><Up>",6 - wait 500 - Call wTypeKeys ("<Home><Shift End>" ) - wait 100 - EditCopy - if Zahl = TRUE then - if GetClipboardText <> "23" then Warnlog "1. Number not correctly sorted" - else - if GetClipboardText <> "Ahallo" then Warnlog "1. Word is not correctly sorted" - end if - Call wTypeKeys ( "<Down><Down><Home><Shift End>" ) - wait 100 - EditCopy - if Zahl = TRUE then - if GetClipboardText <> "54" then Warnlog "3. Number not correctly sorted" - else - if GetClipboardText <> "Ohallo" then Warnlog "3. Word not correctly sorted" - end if - Call wTypeKeys ( "<Down><Down><Home><Shift End>" ) - wait 100 - EditCopy - if Zahl = TRUE then - if GetClipboardText <> "65" then Warnlog "Last number is not correctly sorted" - else - if GetClipboardText <> "Zhallo" then Warnlog "Last word is not correctly sorted" - end if + Call wTypeKeys "<Home><Up>",6 + wait 500 + Call wTypeKeys ("<Home><Shift End>" ) + hUseAsyncSlot( "EditCopy" ) + if Zahl = TRUE then + if GetClipboardText <> "23" then Warnlog "1. Number not correctly sorted" + else + if GetClipboardText <> "Ahallo" then Warnlog "1. Word is not correctly sorted" + end if + Call wTypeKeys ( "<Down><Down><Home><Shift End>" ) + hUseAsyncSlot( "EditCopy" ) + if Zahl = TRUE then + if GetClipboardText <> "54" then Warnlog "3. Number not correctly sorted" + else + if GetClipboardText <> "Ohallo" then Warnlog "3. Word not correctly sorted" + end if + Call wTypeKeys ( "<Down><Down><Home><Shift End>" ) + hUseAsyncSlot( "EditCopy" ) + if Zahl = TRUE then + if GetClipboardText <> "65" then Warnlog "Last number is not correctly sorted" + else + if GetClipboardText <> "Zhallo" then Warnlog "Last word is not correctly sorted" + end if end sub '*** sub AbsteigendKontrollieren ( Zahl as Boolean ) - Call wTypeKeys "<Home><Up>",6 - wait 500 - Call wTypeKeys ( "<Home><Shift End>" ) - wait 100 - EditCopy - if Zahl = TRUE then - if GetClipboardText <> "65" then Warnlog "1. Number not correctly sorted" - else - if GetClipboardText <> "Zhallo" then Warnlog "1. word not correctly sorted" - end if - Call wTypeKeys ( "<Down><Down><Down><Home><Shift End>" ) - wait 100 - EditCopy - if Zahl = TRUE then - if GetClipboardText <> "43" then Warnlog "4th number not correctly sorted" - else - if GetClipboardText <> "Ghallo" then Warnlog "4th word not correctly sorted" - end if - Call wTypeKeys ( "<Down><Home><Shift End>" ) - wait 100 - EditCopy - if Zahl = TRUE then - if GetClipboardText <> "23" then Warnlog "Wrong sort: last number. Should => "+"Ohallo"+" Is =>"+GetClipboardText - else - if GetClipboardText <> "Ahallo" then Warnlog "Wrong sort: last word. Should => "+"Ohallo"+" Is =>"+GetClipboardText - end if + Call wTypeKeys "<Home><Up>",6 + wait 500 + Call wTypeKeys ( "<Home><Shift End>" ) + hUseAsyncSlot( "EditCopy" ) + if Zahl = TRUE then + if GetClipboardText <> "65" then Warnlog "1. Number not correctly sorted" + else + if GetClipboardText <> "Zhallo" then Warnlog "1. word not correctly sorted" + end if + Call wTypeKeys ( "<Down><Down><Down><Home><Shift End>" ) + hUseAsyncSlot( "EditCopy" ) + if Zahl = TRUE then + if GetClipboardText <> "43" then Warnlog "4th number not correctly sorted" + else + if GetClipboardText <> "Ghallo" then Warnlog "4th word not correctly sorted" + end if + Call wTypeKeys ( "<Down><Home><Shift End>" ) + hUseAsyncSlot( "EditCopy" ) + if Zahl = TRUE then + if GetClipboardText <> "23" then Warnlog "Wrong sort: last number. Should => "+"Ohallo"+" Is =>"+GetClipboardText + else + if GetClipboardText <> "Ahallo" then Warnlog "Wrong sort: last word. Should => "+"Ohallo"+" Is =>"+GetClipboardText + end if end sub '*** sub AufSortierungPruefen(i as integer) - Call wTypeKeys "<Home>" - Call wTypeKeys "<up>",6 - Call wTypeKeys "<Shift Mod1 Right>" - Wait 100 - EditCopy - if GetClipboardText = Trennzeichen then - QaErrorLog "#i94661# - Marked the Separator-Sign, correcting now." - Call wTypeKeys "<Right><Shift Mod1 Right>" - EditCopy - end if - if Left$(GetClipboardText,3) <> "AAA" then Warnlog "Entry in 1.Column/1.Row incorrect" - if i <> 1 then - Call wTypeKeys "<Mod1 Right>", 3 - else - Call wTypeKeys "<Mod1 Right>" - end if - Call wTypeKeys "<Shift Mod1 Right>" - Wait 100 - EditCopy - if Left$(GetClipboardText,3) <> "CCC" then Warnlog "Entry in 2.Column/1.Row incorrect" - Call wTypeKeys "<Down><Home>" - Call wTypeKeys "<Shift Mod1 Right>" - Wait 100 - EditCopy - if GetClipboardText = Trennzeichen then - QaErrorLog "#i94661# - Marked the Separator-Sign, correcting now." - Call wTypeKeys "<Home><Shift Mod1 Right>" - EditCopy - end if - if Left$(GetClipboardText,3) <> "AAA" then Warnlog "Entry in 1.Column/2.Row incorrect" - if i <> 1 then - Call wTypeKeys "<Mod1 Right>", 3 - else - Call wTypeKeys "<Mod1 Right>" - end if - Call wTypeKeys "<Shift Mod1 Right>" - Wait 100 - EditCopy - if GetClipboardText = Trennzeichen then - QaErrorLog "#i94661# - Marked the Separator-Sign, correcting now." - Call wTypeKeys "<Right><Shift Mod1 Right>" - EditCopy - end if - if Left$(GetClipboardText,3) <> "DDD" then Warnlog "Entry in 2.Column/2.Row incorrect" - Call wTypeKeys "<Down><Home>" - if i <> 1 then - Call wTypeKeys "<Mod1 Right>", 10 - else - Call wTypeKeys "<Mod1 Right>", 5 - end if - Call wTypeKeys "<Shift Mod1 Right>" - Wait 100 - EditCopy - if GetClipboardText = Trennzeichen then - QaErrorLog "#i94661# - Marked the Separator-Sign, correcting now." - Call wTypeKeys "<Right><Shift Mod1 Right>" - EditCopy - end if - if Left$(GetClipboardText,3) <> "AAA" then Warnlog "Entry in 4.Column/3.Row incorrect" + Call wTypeKeys "<Home>" + Call wTypeKeys "<up>",6 + Call wTypeKeys "<Shift Mod1 Right>" + hUseAsyncSlot( "EditCopy" ) + if GetClipboardText = Trennzeichen then + QaErrorLog "#i94661# - Marked the Separator-Sign, correcting now." + Call wTypeKeys "<Right><Shift Mod1 Right>" + EditCopy + end if + if Left$(GetClipboardText,3) <> "AAA" then Warnlog "Entry in 1.Column/1.Row incorrect" + if i <> 1 then + Call wTypeKeys "<Mod1 Right>", 3 + else + Call wTypeKeys "<Mod1 Right>" + end if + Call wTypeKeys "<Shift Mod1 Right>" + hUseAsyncSlot( "EditCopy" ) + if Left$(GetClipboardText,3) <> "CCC" then Warnlog "Entry in 2.Column/1.Row incorrect" + Call wTypeKeys "<Down><Home>" + Call wTypeKeys "<Shift Mod1 Right>" + hUseAsyncSlot( "EditCopy" ) + if GetClipboardText = Trennzeichen then + QaErrorLog "#i94661# - Marked the Separator-Sign, correcting now." + Call wTypeKeys "<Home><Shift Mod1 Right>" + EditCopy + end if + if Left$(GetClipboardText,3) <> "AAA" then Warnlog "Entry in 1.Column/2.Row incorrect" + if i <> 1 then + Call wTypeKeys "<Mod1 Right>", 3 + else + Call wTypeKeys "<Mod1 Right>" + end if + Call wTypeKeys "<Shift Mod1 Right>" + hUseAsyncSlot( "EditCopy" ) + if GetClipboardText = Trennzeichen then + QaErrorLog "#i94661# - Marked the Separator-Sign, correcting now." + Call wTypeKeys "<Right><Shift Mod1 Right>" + EditCopy + end if + if Left$(GetClipboardText,3) <> "DDD" then Warnlog "Entry in 2.Column/2.Row incorrect" + Call wTypeKeys "<Down><Home>" + if i <> 1 then + Call wTypeKeys "<Mod1 Right>", 10 + else + Call wTypeKeys "<Mod1 Right>", 5 + end if + Call wTypeKeys "<Shift Mod1 Right>" + hUseAsyncSlot( "EditCopy" ) + if GetClipboardText = Trennzeichen then + QaErrorLog "#i94661# - Marked the Separator-Sign, correcting now." + Call wTypeKeys "<Right><Shift Mod1 Right>" + EditCopy + end if + if Left$(GetClipboardText,3) <> "AAA" then Warnlog "Entry in 4.Column/3.Row incorrect" end sub '*** sub AbSortierungPruefen(i as integer) - Call wTypeKeys "<Home>" - Call wTypeKeys "<up>", 6 - Call wTypeKeys "<Shift Mod1 Right>" - Wait 100 - EditCopy - if GetClipboardText = Trennzeichen then - QaErrorLog "#i94661# - Marked the Separator-Sign, correcting now." - Call wTypeKeys "<Right><Shift Mod1 Right>" - EditCopy - end if - if Left$(GetClipboardText,3) <> "CCC" then Warnlog "Entry in 1.Column/1.Row incorrect" - Call wTypeKeys "<Down><Shift Mod1 Left>" - Wait 100 - EditCopy - if GetClipboardText = Trennzeichen then - QaErrorLog "#i94661# - Marked the Separator-Sign, correcting now." - Call wTypeKeys "<Home><Shift Mod1 Right>" - EditCopy - end if - if Left$(GetClipboardText,3) <> "CCC" then Warnlog "Entry in 1.Column/2.Row incorrect" - if i <> 1 then - Call wTypeKeys "<Mod1 Right>" , 4 - else - Call wTypeKeys "<Mod1 Right>" , 2 - end if - Call wTypeKeys "<Shift Mod1 Right>" - Wait 100 - EditCopy - if GetClipboardText = Trennzeichen then - QaErrorLog "#i94661# - Marked the Separator-Sign, correcting now." - Call wTypeKeys "<MOD1 Left>", 2 - Call wTypeKeys "<Shift MOD1 Right>" - EditCopy - end if - if Left$(GetClipboardText,3) <> "BBB" then Warnlog "Entry in 2.Column/2.Row incorrect" - Call wTypeKeys "<Left><Up>" - Call wTypeKeys "<Right>" - Call wTypeKeys "<Shift Mod1 Left>" - Wait 100 - EditCopy - if GetClipboardText = Trennzeichen then - QaErrorLog "#i94661# - Marked the Separator-Sign, correcting now." - Call wTypeKeys "<Right><Shift Mod1 Right>" - EditCopy - end if - if Left$(GetClipboardText,3) <> "EEE" then Warnlog "Entry in 2.Column/1.Row incorrect" - if i <> 1 then - Call wTypeKeys "<Mod1 Right>", 6 - Call wTypeKeys "<Down>", 3 - Call wTypeKeys "<End><Shift Mod1 Left>" - else - Call wTypeKeys "<Mod1 Right>", 3 - Call wTypeKeys "<Down>", 3 + Call wTypeKeys "<Home>" + Call wTypeKeys "<up>", 6 + Call wTypeKeys "<Shift Mod1 Right>" + hUseAsyncSlot( "EditCopy" ) + if GetClipboardText = Trennzeichen then + QaErrorLog "#i94661# - Marked the Separator-Sign, correcting now." + Call wTypeKeys "<Right><Shift Mod1 Right>" + EditCopy + end if + if Left$(GetClipboardText,3) <> "CCC" then Warnlog "Entry in 1.Column/1.Row incorrect" + Call wTypeKeys "<Down><Shift Mod1 Left>" + hUseAsyncSlot( "EditCopy" ) + if GetClipboardText = Trennzeichen then + QaErrorLog "#i94661# - Marked the Separator-Sign, correcting now." + Call wTypeKeys "<Home><Shift Mod1 Right>" + EditCopy + end if + if Left$(GetClipboardText,3) <> "CCC" then Warnlog "Entry in 1.Column/2.Row incorrect" + if i <> 1 then + Call wTypeKeys "<Mod1 Right>" , 4 + else + Call wTypeKeys "<Mod1 Right>" , 2 + end if Call wTypeKeys "<Shift Mod1 Right>" - end if - Wait 100 - EditCopy - if GetClipboardText = Trennzeichen then - QaErrorLog "#i94661# - Marked the Separator-Sign, correcting now." - Call wTypeKeys "<Right><Shift Mod1 Right>" - EditCopy - end if - if Left$(GetClipboardText,3) <> "AAA" then Warnlog "Entry in 2.Column/1.Row incorrect" + hUseAsyncSlot( "EditCopy" ) + if GetClipboardText = Trennzeichen then + QaErrorLog "#i94661# - Marked the Separator-Sign, correcting now." + Call wTypeKeys "<MOD1 Left>", 2 + Call wTypeKeys "<Shift MOD1 Right>" + EditCopy + end if + if Left$(GetClipboardText,3) <> "BBB" then Warnlog "Entry in 2.Column/2.Row incorrect" + Call wTypeKeys "<Left><Up>" + Call wTypeKeys "<Right>" + Call wTypeKeys "<Shift Mod1 Left>" + hUseAsyncSlot( "EditCopy" ) + if GetClipboardText = Trennzeichen then + QaErrorLog "#i94661# - Marked the Separator-Sign, correcting now." + Call wTypeKeys "<Right><Shift Mod1 Right>" + EditCopy + end if + if Left$(GetClipboardText,3) <> "EEE" then Warnlog "Entry in 2.Column/1.Row incorrect" + if i <> 1 then + Call wTypeKeys "<Mod1 Right>", 6 + Call wTypeKeys "<Down>", 3 + Call wTypeKeys "<End><Shift Mod1 Left>" + else + Call wTypeKeys "<Mod1 Right>", 3 + Call wTypeKeys "<Down>", 3 + Call wTypeKeys "<Shift Mod1 Right>" + end if + hUseAsyncSlot( "EditCopy" ) + if GetClipboardText = Trennzeichen then + QaErrorLog "#i94661# - Marked the Separator-Sign, correcting now." + Call wTypeKeys "<Right><Shift Mod1 Right>" + EditCopy + end if + if Left$(GetClipboardText,3) <> "AAA" then Warnlog "Entry in 2.Column/1.Row incorrect" end sub '*** sub UndoRichtigBeiSortierung - Dim Fehler as Boolean - Call wTypeKeys "<Left Right>" - wait 100 - EditUndo - Sleep 1 - Call wTypeKeys "<Home>" - Call wTypeKeys "<up>", 6 - Call wTypeKeys "<Shift Mod1 Right>" - EditCopy - if Left$(GetClipboardText,3) <> "AAA" then Fehler = TRUE - Call wTypeKeys "<Down><Home><Shift Mod1 Right>" - Wait 100 - EditCopy - if Left$(GetClipboardText,3) <> "BBB" then Fehler = TRUE - Call wTypeKeys "<Down><Home><Shift Mod1 Right>" - Wait 100 - EditCopy - if Left$(GetClipboardText,3) <> "CCC" then Fehler = TRUE - Call wTypeKeys "<Down><Home><Shift Mod1 Right>" - Wait 100 - EditCopy - if Left$(GetClipboardText,3) <> "AAA" then Fehler = TRUE - Call wTypeKeys "<Down><Home><Shift Mod1 Right>" - Wait 100 - EditCopy - if Left$(GetClipboardText,3) <> "BBB" then Fehler = TRUE - Call wTypeKeys "<Down><Home><Shift Mod1 Right>" - Wait 100 - EditCopy - if Left$(GetClipboardText,3) <> "CCC" then Fehler = TRUE - if Fehler = TRUE then - Warnlog "Undo after sorting has not been functioned correctly" - Call hCloseDocument - Call hFileOpen ( gTesttoolPath + "writer\optional\input\st1_5.sdw" ) - end if - Call wTypeKeys "<End>" - Call wTypeKeys "<Down>",6 - Call wTypeKeys "<Mod1 a>" - wait 100 + Dim Fehler as Boolean + Call wTypeKeys "<Left Right>" + wait 100 + EditUndo + Sleep 1 + Call wTypeKeys "<Home>" + Call wTypeKeys "<up>", 6 + Call wTypeKeys "<Shift Mod1 Right>" + EditCopy + if Left$(GetClipboardText,3) <> "AAA" then Fehler = TRUE + Call wTypeKeys "<Down><Home><Shift Mod1 Right>" + hUseAsyncSlot( "EditCopy" ) + if Left$(GetClipboardText,3) <> "BBB" then Fehler = TRUE + Call wTypeKeys "<Down><Home><Shift Mod1 Right>" + hUseAsyncSlot( "EditCopy" ) + if Left$(GetClipboardText,3) <> "CCC" then Fehler = TRUE + Call wTypeKeys "<Down><Home><Shift Mod1 Right>" + hUseAsyncSlot( "EditCopy" ) + if Left$(GetClipboardText,3) <> "AAA" then Fehler = TRUE + Call wTypeKeys "<Down><Home><Shift Mod1 Right>" + hUseAsyncSlot( "EditCopy" ) + if Left$(GetClipboardText,3) <> "BBB" then Fehler = TRUE + Call wTypeKeys "<Down><Home><Shift Mod1 Right>" + hUseAsyncSlot( "EditCopy" ) + if Left$(GetClipboardText,3) <> "CCC" then Fehler = TRUE + if Fehler = TRUE then + Warnlog "Undo after sorting has not been functioned correctly" + Call hCloseDocument + Call hFileOpen ( gTesttoolPath + "writer\optional\input\st1_5.sdw" ) + end if + Call wTypeKeys "<End>" + Call wTypeKeys "<Down>",6 + Call wTypeKeys "<Mod1 a>" + wait 100 end sub '*** @@ -337,13 +292,13 @@ sub TrennzeichenSetzen ( Trennstring as String ) Kontext "FindAndReplace" if Not RegularExpressions.IsVisible then More.Click Select Case Trennstring - Case ";" - RegularExpressions.Check - SearchFor.SetText "\t" + Case ";" + RegularExpressions.Check + SearchFor.SetText "\t" - Case "|" - RegularExpressions.Check - SearchFor.SetText "\t" + Case "|" + RegularExpressions.Check + SearchFor.SetText "\t" end select @@ -380,339 +335,315 @@ end sub '*** function ZelleRuntertesten ( Wert$ ) as Boolean - Call wTypeKeys "<Down>" - Call wTypeKeys "<Mod1 a>" - wait 100 - EditCopy - if GetClipboardText = Wert$ then - ZelleRuntertesten = TRUE - else - ZelleRuntertesten = FALSE - end if + Call wTypeKeys "<Down>" + Call wTypeKeys "<Mod1 a>" + hUseAsyncSlot( "EditCopy" ) + if GetClipboardText = Wert$ then + ZelleRuntertesten = TRUE + else + ZelleRuntertesten = FALSE + end if end function '*** sub wEinfuegenEintragAlle ( NaWieSollErheissen$ ) - Call wTypeKeys NaWieSollErheissen$ - Call wTypeKeys "<Mod1 Left><Shift Mod1 Right>" - InsertIndexesEntry - Kontext "VerzeichniseintragEinfuegen" - Verzeichnis.Select 1 - VerzeichniseintragEinfuegen.OK - - Call wTypeKeys "<End> " - Call wTypeKeys "<Left><Shift Mod1 Left>" - InsertIndexesEntry - Kontext "VerzeichniseintragEinfuegen" - Verzeichnis.Select 2 - VerzeichniseintragEinfuegen.OK - - Call wTypeKeys "<End> " - Call wTypeKeys "<Left><Left><Shift Mod1 Left>" - InsertIndexesEntry - Kontext "VerzeichniseintragEinfuegen" - Verzeichnis.Select 3 - VerzeichniseintragEinfuegen.OK - Call wTypeKeys "<End> " + Call wTypeKeys NaWieSollErheissen$ + Call wTypeKeys "<Mod1 Left><Shift Mod1 Right>" + InsertIndexesEntry + Kontext "VerzeichniseintragEinfuegen" + Verzeichnis.Select 1 + VerzeichniseintragEinfuegen.OK + + Call wTypeKeys "<End> " + Call wTypeKeys "<Left><Shift Mod1 Left>" + InsertIndexesEntry + Kontext "VerzeichniseintragEinfuegen" + Verzeichnis.Select 2 + VerzeichniseintragEinfuegen.OK + + Call wTypeKeys "<End> " + Call wTypeKeys "<Left><Left><Shift Mod1 Left>" + InsertIndexesEntry + Kontext "VerzeichniseintragEinfuegen" + Verzeichnis.Select 3 + VerzeichniseintragEinfuegen.OK + Call wTypeKeys "<End> " end sub '*** sub ReihenfolgePruefen - Dim sDummy$ - - printlog " - Checking entry's on first page" - Call wTypeKeys "<Down><Shift Mod1 Right>" - wait 100 - EditCopy - sDummy$ = GetClipboardText - if sDummy$ <> "Zhallo" then - if sDummy$ <> "Ahallo" then - Warnlog "Wrong Sort: Should -> Zhallo Is -> "+ sDummy$ - else - Warnlog "Sort infinitely is not in alphabetical order" - Call wTypeKeys "<Home><Down><Shift Mod1 Right>" - wait 100 - EditCopy - if GetClipboardText <> "Zhallo" then Warnlog "2. entry not Zhallo but "+GetClipboardText - end if - else - Call wTypeKeys "<Home><Down><Shift Mod1 Right>" - wait 100 - EditCopy - if GetClipboardText <> "Ahallo" then Warnlog "2. entry not Ahallo but "+GetClipboardText - end if - Call wTypeKeys "<Home><Down><Shift Mod1 Right>" - wait 100 - EditCopy - if GetClipboardText <> "Xhallo" then Warnlog "3. entry not Xhallo but "+GetClipboardText - Call wTypeKeys "<Home><Down><Shift Mod1 Right>" - wait 100 - EditCopy - if GetClipboardText <> "Ghallo" then Warnlog "4. entry not Ghallo but "+GetClipboardText - - printlog " - checking entrys on 3rd page" - Call wTypeKeys "<Home><Down><Shift Mod1 Right>" - wait 100 - EditCopy - sDummy$ = GetClipboardText - if sDummy$ <> "Zhallo" then - if sDummy$ <> "Ahallo" then - Warnlog "Wrong Sort: Should -> Zhallo Is -> "+ sDummy$ - else - Warnlog "Sort infinitely is not in alphabetical order" - Call wTypeKeys "<Home><Down><Shift Mod1 Right>" - wait 100 - EditCopy - if GetClipboardText <> "Zhallo" then Warnlog "6. entry not Zhallo but "+GetClipboardText - end if - else - Call wTypeKeys "<Home><Down><Shift Mod1 Right>" - wait 100 - EditCopy - if GetClipboardText <> "Ahallo" then Warnlog "6. entry not Ahallo but "+GetClipboardText - end if - Call wTypeKeys "<Home><Down><Shift Mod1 Right>" - wait 100 - EditCopy - if GetClipboardText <> "Xhallo" then Warnlog "7. entry not Xhallo but "+GetClipboardText - Call wTypeKeys "<Home><Down><Shift Mod1 Right>" - wait 100 - EditCopy - if GetClipboardText <> "Ghallo" then Warnlog "8. entry not Ghallo but "+GetClipboardText - - printlog " - checking page entrys" - Call wTypeKeys "<End><Shift Mod1 Left>" - wait 100 - EditCopy - if GetClipboardText <> "3" then Warnlog "8. Entry: Not page 3 but "+ GetClipboardText - Call wTypeKeys "<End><Up><Shift Mod1 Left>" - wait 100 - EditCopy - if GetClipboardText <> "3" then Warnlog "7. Entry: Not page 3 but "+ GetClipboardText - Call wTypeKeys "<End><Up><Shift Mod1 Left>" - wait 100 - EditCopy - if GetClipboardText <> "3" then Warnlog "6. entry: Not page 3 but "+ GetClipboardText - Call wTypeKeys "<End><Up><Shift Mod1 Left>" - wait 100 - EditCopy - if GetClipboardText <> "3" then Warnlog "5. entry: Not page 3 but "+ GetClipboardText - Call wTypeKeys "<End><Up><Shift Mod1 Left>" - wait 100 - EditCopy - if GetClipboardText <> "1" then Warnlog "4. entry: Not page 1 but "+ GetClipboardText - Call wTypeKeys "<End><Up><Shift Mod1 Left>" - wait 100 - EditCopy - if GetClipboardText <> "1" then Warnlog "3. entry: Not page 1 but "+ GetClipboardText - Call wTypeKeys "<End><Up><Shift Mod1 Left>" - wait 100 - EditCopy - if GetClipboardText <> "1" then Warnlog "2. entry: Not page 1 but "+ GetClipboardText - Call wTypeKeys "<End><Up><Shift Mod1 Left>" - wait 100 - EditCopy - if GetClipboardText <> "1" then Warnlog "1. entry: Not page 1 but "+ GetClipboardText - Call wTypeKeys "<End><Up><Shift Mod1 Left>" + Dim sDummy$ + + printlog " - Checking entry's on first page" + Call wTypeKeys "<Down><Shift Mod1 Right>" + hUseAsyncSlot( "EditCopy" ) + sDummy$ = GetClipboardText + if sDummy$ <> "Zhallo" then + if sDummy$ <> "Ahallo" then + Warnlog "Wrong Sort: Should -> Zhallo Is -> "+ sDummy$ + else + Warnlog "Sort infinitely is not in alphabetical order" + Call wTypeKeys "<Home><Down><Shift Mod1 Right>" + wait 100 + EditCopy + if GetClipboardText <> "Zhallo" then Warnlog "2. entry not Zhallo but "+GetClipboardText + end if + else + Call wTypeKeys "<Home><Down><Shift Mod1 Right>" + wait 100 + EditCopy + if GetClipboardText <> "Ahallo" then Warnlog "2. entry not Ahallo but "+GetClipboardText + end if + Call wTypeKeys "<Home><Down><Shift Mod1 Right>" + hUseAsyncSlot( "EditCopy" ) + if GetClipboardText <> "Xhallo" then Warnlog "3. entry not Xhallo but "+GetClipboardText + Call wTypeKeys "<Home><Down><Shift Mod1 Right>" + hUseAsyncSlot( "EditCopy" ) + if GetClipboardText <> "Ghallo" then Warnlog "4. entry not Ghallo but "+GetClipboardText + + printlog " - checking entrys on 3rd page" + Call wTypeKeys "<Home><Down><Shift Mod1 Right>" + hUseAsyncSlot( "EditCopy" ) + sDummy$ = GetClipboardText + if sDummy$ <> "Zhallo" then + if sDummy$ <> "Ahallo" then + Warnlog "Wrong Sort: Should -> Zhallo Is -> "+ sDummy$ + else + Warnlog "Sort infinitely is not in alphabetical order" + Call wTypeKeys "<Home><Down><Shift Mod1 Right>" + wait 100 + EditCopy + if GetClipboardText <> "Zhallo" then Warnlog "6. entry not Zhallo but "+GetClipboardText + end if + else + Call wTypeKeys "<Home><Down><Shift Mod1 Right>" + wait 100 + EditCopy + if GetClipboardText <> "Ahallo" then Warnlog "6. entry not Ahallo but "+GetClipboardText + end if + Call wTypeKeys "<Home><Down><Shift Mod1 Right>" + hUseAsyncSlot( "EditCopy" ) + if GetClipboardText <> "Xhallo" then Warnlog "7. entry not Xhallo but "+GetClipboardText + Call wTypeKeys "<Home><Down><Shift Mod1 Right>" + hUseAsyncSlot( "EditCopy" ) + if GetClipboardText <> "Ghallo" then Warnlog "8. entry not Ghallo but "+GetClipboardText + + printlog " - checking page entrys" + Call wTypeKeys "<End><Shift Mod1 Left>" + hUseAsyncSlot( "EditCopy" ) + if GetClipboardText <> "3" then Warnlog "8. Entry: Not page 3 but "+ GetClipboardText + Call wTypeKeys "<End><Up><Shift Mod1 Left>" + hUseAsyncSlot( "EditCopy" ) + if GetClipboardText <> "3" then Warnlog "7. Entry: Not page 3 but "+ GetClipboardText + Call wTypeKeys "<End><Up><Shift Mod1 Left>" + hUseAsyncSlot( "EditCopy" ) + if GetClipboardText <> "3" then Warnlog "6. entry: Not page 3 but "+ GetClipboardText + Call wTypeKeys "<End><Up><Shift Mod1 Left>" + hUseAsyncSlot( "EditCopy" ) + if GetClipboardText <> "3" then Warnlog "5. entry: Not page 3 but "+ GetClipboardText + Call wTypeKeys "<End><Up><Shift Mod1 Left>" + hUseAsyncSlot( "EditCopy" ) + if GetClipboardText <> "1" then Warnlog "4. entry: Not page 1 but "+ GetClipboardText + Call wTypeKeys "<End><Up><Shift Mod1 Left>" + hUseAsyncSlot( "EditCopy" ) + if GetClipboardText <> "1" then Warnlog "3. entry: Not page 1 but "+ GetClipboardText + Call wTypeKeys "<End><Up><Shift Mod1 Left>" + hUseAsyncSlot( "EditCopy" ) + if GetClipboardText <> "1" then Warnlog "2. entry: Not page 1 but "+ GetClipboardText + Call wTypeKeys "<End><Up><Shift Mod1 Left>" + hUseAsyncSlot( "EditCopy" ) + if GetClipboardText <> "1" then Warnlog "1. entry: Not page 1 but "+ GetClipboardText + Call wTypeKeys "<End><Up><Shift Mod1 Left>" end sub '*** sub ReihenfolgePruefen2 - printlog " - checking entrys" - Call wTypeKeys "<Down><Shift Mod1 Right>" - wait 100 - EditCopy - if GetClipboardText <> "Ahallo" then Warnlog "1. entry not Ahallo but "+GetClipboardText - Call wTypeKeys "<Home><Down><Shift Mod1 Right>" - wait 100 - EditCopy - if GetClipboardText <> "Ghallo" then Warnlog "2. entry not Ghallo but "+GetClipboardText - Call wTypeKeys "<Home><Down><Shift Mod1 Right>" - wait 100 - EditCopy - if GetClipboardText <> "Xhallo" then Warnlog "3. entry not Xhallo but "+GetClipboardText - Call wTypeKeys "<Home><Down><Shift Mod1 Right>" - wait 100 - EditCopy - if GetClipboardText <> "Zhallo" then Warnlog "4. entry not Zhallo but "+GetClipboardText - Call wTypeKeys "<Down><Mod1 Left><Shift Mod1 Right>" - wait 100 - EditCopy - if GetClipboardText <> "Bhallo " then Warnlog "Number of entrys more then 4." - - printlog " - checking page entrys" - Call wTypeKeys "<Up>" - Call wTypeKeys "<Shift Mod1 Right>", 3 - wait 100 - EditCopy - if GetClipboardText <> "1, 3" then Warnlog "4. entry: Not '1, 3' but "+ GetClipboardText - Call wTypeKeys "<Up>" - Call wTypeKeys "<Shift Mod1 Left>", 3 - wait 100 - EditCopy - if GetClipboardText <> "1, 3" then Warnlog "3. entry: Not '1, 3' but "+ GetClipboardText - Call wTypeKeys "<Up>" - Call wTypeKeys "<Shift Mod1 Right>", 3 - wait 100 - EditCopy - if GetClipboardText <> "1, 3" then Warnlog "2. entry: Not '1, 3' but "+ GetClipboardText - Call wTypeKeys "<Up>" - Call wTypeKeys "<Shift Mod1 Left>", 3 - wait 100 - EditCopy - if GetClipboardText <> "1, 3" then Warnlog "1. entry: Not '1, 3' but "+ GetClipboardText + printlog " - checking entrys" + Call wTypeKeys "<Down><Shift Mod1 Right>" + hUseAsyncSlot( "EditCopy" ) + if GetClipboardText <> "Ahallo" then Warnlog "1. entry not Ahallo but "+GetClipboardText + Call wTypeKeys "<Home><Down><Shift Mod1 Right>" + hUseAsyncSlot( "EditCopy" ) + if GetClipboardText <> "Ghallo" then Warnlog "2. entry not Ghallo but "+GetClipboardText + Call wTypeKeys "<Home><Down><Shift Mod1 Right>" + hUseAsyncSlot( "EditCopy" ) + if GetClipboardText <> "Xhallo" then Warnlog "3. entry not Xhallo but "+GetClipboardText + Call wTypeKeys "<Home><Down><Shift Mod1 Right>" + hUseAsyncSlot( "EditCopy" ) + if GetClipboardText <> "Zhallo" then Warnlog "4. entry not Zhallo but "+GetClipboardText + Call wTypeKeys "<Down><Mod1 Left><Shift Mod1 Right>" + hUseAsyncSlot( "EditCopy" ) + if GetClipboardText <> "Bhallo " then Warnlog "Number of entrys more then 4." + + printlog " - checking page entrys" + Call wTypeKeys "<Up>" + Call wTypeKeys "<Shift Mod1 Right>", 3 + hUseAsyncSlot( "EditCopy" ) + if GetClipboardText <> "1, 3" then Warnlog "4. entry: Not '1, 3' but "+ GetClipboardText + Call wTypeKeys "<Up>" + Call wTypeKeys "<Shift Mod1 Left>", 3 + hUseAsyncSlot( "EditCopy" ) + if GetClipboardText <> "1, 3" then Warnlog "3. entry: Not '1, 3' but "+ GetClipboardText + Call wTypeKeys "<Up>" + Call wTypeKeys "<Shift Mod1 Right>", 3 + hUseAsyncSlot( "EditCopy" ) + if GetClipboardText <> "1, 3" then Warnlog "2. entry: Not '1, 3' but "+ GetClipboardText + Call wTypeKeys "<Up>" + Call wTypeKeys "<Shift Mod1 Left>", 3 + hUseAsyncSlot( "EditCopy" ) + if GetClipboardText <> "1, 3" then Warnlog "1. entry: Not '1, 3' but "+ GetClipboardText end sub ' *** function SchriftFormatTesten ( sName$ ) as String - SchriftFormatTesten = sName$ - FormatCharacter - Kontext - Active.SetPage TabFont - Kontext "TabFont" - if FontWest.GetSelText <> sName then SchriftFormatTesten = FontWest.GetSelText - TabFont.OK + SchriftFormatTesten = sName$ + FormatCharacter + Kontext + Active.SetPage TabFont + Kontext "TabFont" + if FontWest.GetSelText <> sName then SchriftFormatTesten = FontWest.GetSelText + TabFont.OK end function ' ******************************************************************* function ErmittleErgebnis ( Ergebnis as String ) as Boolean - ErmittleErgebnis = TRUE - Kontext "DocumentWriter" - Call wTypeKeys "<End><Shift Home>" - EditCopy - Wait 500 - if GetClipboardText <> Ergebnis then ErmittleErgebnis = FALSE + ErmittleErgebnis = TRUE + Kontext "DocumentWriter" + Call wTypeKeys "<End><Shift Home>" + EditCopy + Wait 500 + if GetClipboardText <> Ergebnis then ErmittleErgebnis = FALSE end function ' ******************************************************************* sub VerzeichnisUeberNavigator(Welches as integer) - dim j as integer - Kontext "Navigator" + dim j as integer + Kontext "Navigator" if Navigator.NotExists then ViewNavigator Kontext "NavigatorWriter" if Auswahlliste.GetItemCount<11 then Inhaltsansicht.Click if Auswahlliste.GetItemCount >11 then - For j= 1 to 11 - Auswahlliste.Select j - Auswahlliste.TypeKeys "-" - next j - end if + For j= 1 to 11 + Auswahlliste.Select j + Auswahlliste.TypeKeys "-" + next j + end if - wait 500 + wait 500 Auswahlliste.Select 10 Auswahlliste.TypeKeys "+" Auswahlliste.Select 10 + Welches Auswahlliste.TypeKeys "<Return>" - Kontext "DocumentWriter" + Kontext "DocumentWriter" end sub '********************************************************** sub sZahlenformatfuerZelle - Kontext "DocumentWriter" - FormatNumberFormat - Kontext "Zahlenformat" - Kategorie.Select 3 - KategorieFormat.Select 1 - Zahlenformat.OK - Kontext "DocumentWriter" + Kontext "DocumentWriter" + FormatNumberFormat + Kontext "Zahlenformat" + Kategorie.Select 3 + KategorieFormat.Select 1 + Zahlenformat.OK + Kontext "DocumentWriter" end sub '********************************************************** sub sNavigatorInBrauchbarenZustand - dim j as integer + dim j as integer Kontext "NavigatorWriter" if NavigatorWriter.NotExists then ViewNavigator if Auswahlliste.GetItemCount<11 then Inhaltsansicht.Click Wait 500 if Auswahlliste.GetItemCount >11 then - For j= 1 to 11 - Auswahlliste.Select j - Auswahlliste.TypeKeys "-" - next j - end if + For j= 1 to 11 + Auswahlliste.Select j + Auswahlliste.TypeKeys "-" + next j + end if Wait 500 Auswahlliste.Select 2 Auswahlliste.TypeKeys "+" Inhaltsansicht.Click - Kontext "DocumentWriter" + Kontext "DocumentWriter" end sub '********************************************************** sub sZellinhaltInZwischenablage(VergleichDas as string,Aktion as string) - Call wTypeKeys "<Home><Shift End>" - EditCopy - if VergleichDas <> GetClipboardText then Warnlog "- Table has not been splitted correctly!(" + Aktion + ")" + Call wTypeKeys "<Home><Shift End>" + EditCopy + if VergleichDas <> GetClipboardText then Warnlog "- Table has not been splitted correctly!(" + Aktion + ")" end sub '********************************************************** sub sSeiteMitBrauchbarerTabelleEinrichten - Call hTabelleEinfuegen - FormatTable - Kontext - Active.SetPage TabTabelle - Kontext "TabTabelle" - Tabellenname.Settext "MeineTabelle" - TabTabelle.OK - - Call wTypeKeys "�berschrift 1" - Call wTypeKeys "<Down>" - Call wTypeKeys "Text 1" - Call wTypeKeys "<Down>" - wait 500 - Call hTabelleEinfuegen - wait 500 - Call wTypeKeys "�berschrift 2" - Call wTypeKeys "<Down>" - Call wTypeKeys "Text 2" - Call wTypeKeys "<Up>",1 + Call hTabelleEinfuegen + FormatTable + Kontext + Active.SetPage TabTabelle + Kontext "TabTabelle" + Tabellenname.Settext "MeineTabelle" + TabTabelle.OK + + Call wTypeKeys "�berschrift 1" + Call wTypeKeys "<Down>" + Call wTypeKeys "Text 1" + Call wTypeKeys "<Down>" + wait 500 + Call hTabelleEinfuegen + wait 500 + Call wTypeKeys "�berschrift 2" + Call wTypeKeys "<Down>" + Call wTypeKeys "Text 2" + Call wTypeKeys "<Up>",1 end sub '********************************************************** sub wOpenContextMenu ( optional FocusParam as boolean) - if IsMissing(FocusParam) = True then - Select Case gApplication - Case "WRITER" - Kontext "DocumentWriter" - Call DocumentWriter.TypeKeys "<SHIFT F10>" 'OpenContextMenu - - Case "MASTERDOCUMENT" - Kontext "DocumentMasterDoc" - Call DocumentMasterDoc.TypeKeys "<SHIFT F10>" 'OpenContextMenu - - end select - else - if FocusParam = True then - Select Case gApplication - Case "WRITER" - Kontext "DocumentWriter" - Call DocumentWriter.OpenContextMenu true - - Case "MASTERDOCUMENT" - Kontext "DocumentMasterDoc" - Call DocumentMasterDoc.OpenContextMenu true - - end select - else - Select Case gApplication - Case "WRITER" - Kontext "DocumentWriter" - Call DocumentWriter.OpenContextMenu - - Case "MASTERDOCUMENT" - Kontext "DocumentMasterDoc" - Call DocumentMasterDoc.OpenContextMenu - end select - end if - end if + if IsMissing(FocusParam) = True then + Select Case gApplication + Case "WRITER" + Kontext "DocumentWriter" + Call DocumentWriter.TypeKeys "<SHIFT F10>" 'OpenContextMenu + + Case "MASTERDOCUMENT" + Kontext "DocumentMasterDoc" + Call DocumentMasterDoc.TypeKeys "<SHIFT F10>" 'OpenContextMenu + + end select + else + if FocusParam = True then + Select Case gApplication + Case "WRITER" + Kontext "DocumentWriter" + Call DocumentWriter.OpenContextMenu true + + Case "MASTERDOCUMENT" + Kontext "DocumentMasterDoc" + Call DocumentMasterDoc.OpenContextMenu true + + end select + else + Select Case gApplication + Case "WRITER" + Kontext "DocumentWriter" + Call DocumentWriter.OpenContextMenu + + Case "MASTERDOCUMENT" + Kontext "DocumentMasterDoc" + Call DocumentMasterDoc.OpenContextMenu + end select + end if + end if end sub diff --git a/testautomation/writer/tools/includes/w_tool4.inc b/testautomation/writer/tools/includes/w_tool4.inc index 805dcac835bf..7a8092cbfd2e 100755 --- a/testautomation/writer/tools/includes/w_tool4.inc +++ b/testautomation/writer/tools/includes/w_tool4.inc @@ -1,6 +1,6 @@ '************************************************************************** '* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. -'* +'* '* Copyright 2008 by Sun Microsystems, Inc. '* '* OpenOffice.org - a multi-platform office productivity suite @@ -79,30 +79,30 @@ end function '******************************************************************* function wCheckOutline(WhatToFind as string) as boolean - '/// This function checks the Outline in level 1 test. - '/// Purpose is to have a little tolerance, because when resolution changes, the - '/// line breaks are different - wCheckOutline = False - Kontext "DocumentImpressOutlineView" - DocumentImpressOutlineView.TypeKeys "<Home><Down>" ,1 - DocumentImpressOutlineView.TypeKeys "<Home><Shift End>" - EditCopy - if GetClipboardText <> WhatToFind then + '/// This function checks the Outline in level 1 test. + '/// Purpose is to have a little tolerance, because when resolution changes, the + '/// line breaks are different + wCheckOutline = False + Kontext "DocumentImpressOutlineView" + DocumentImpressOutlineView.TypeKeys "<Home><Down>" ,1 + DocumentImpressOutlineView.TypeKeys "<Home><Shift End>" + EditCopy + if GetClipboardText <> WhatToFind then DocumentImpressOutlineView.TypeKeys "<Home><Up>" ,2 DocumentImpressOutlineView.TypeKeys "<Home><Shift End>" EditCopy if GetClipboardText = WhatToFind then - wCheckOutline = True + wCheckOutline = True end if - else - wCheckOutline = True - end if + else + wCheckOutline = True + end if end function '******************************************************************* function wSetZoom ( ) - '/// This function sets the zoom size to 100% in a text document + '/// This function sets the zoom size to 100% in a text document ViewZoom Kontext "Massstab" @@ -119,33 +119,33 @@ function wGetSpellcheckDocumentName(xCategory as integer) as string Dim sTemp as string, sReturn as string '/// This function is to return the document to load in spellcheck test select case xCategory - case 1: - select case iSprache - case 81, 82, 86, 88 - sReturn = "None" - case 1 - sTemp = Convertpath(gTesttoolpath + "writer\optional\input\spellcheck\st1_2_01.odt") - case 3 - sTemp = Convertpath(gTesttoolpath + "writer\optional\input\spellcheck\st1_2_03.odt") - case 7 - sTemp = Convertpath(gTesttoolpath + "writer\optional\input\spellcheck\st1_2_07.odt") - case else - sTemp = Convertpath(gTesttoolpath + "writer\optional\input\spellcheck\st1_2_" & iSprache & ".odt") - end select - - case 2: - select case iSprache - case 81, 82, 86, 88 - sReturn = "None" - case 1 - sTemp = Convertpath(gTesttoolpath + "writer\optional\input\linguistik\001.odt") - case 3 - sTemp = Convertpath(gTesttoolpath + "writer\optional\input\linguistik\003.odt") - case 7 - sTemp = Convertpath(gTesttoolpath + "writer\optional\input\linguistik\007.odt") - case else - sTemp = Convertpath(gTesttoolpath + "writer\optional\input\linguistik\0" & iSprache & ".odt") - end select + case 1: + select case iSprache + case 81, 82, 86, 88 + sReturn = "None" + case 1 + sTemp = Convertpath(gTesttoolpath + "writer\optional\input\spellcheck\st1_2_01.odt") + case 3 + sTemp = Convertpath(gTesttoolpath + "writer\optional\input\spellcheck\st1_2_03.odt") + case 7 + sTemp = Convertpath(gTesttoolpath + "writer\optional\input\spellcheck\st1_2_07.odt") + case else + sTemp = Convertpath(gTesttoolpath + "writer\optional\input\spellcheck\st1_2_" & iSprache & ".odt") + end select + + case 2: + select case iSprache + case 81, 82, 86, 88 + sReturn = "None" + case 1 + sTemp = Convertpath(gTesttoolpath + "writer\optional\input\linguistik\001.odt") + case 3 + sTemp = Convertpath(gTesttoolpath + "writer\optional\input\linguistik\003.odt") + case 7 + sTemp = Convertpath(gTesttoolpath + "writer\optional\input\linguistik\007.odt") + case else + sTemp = Convertpath(gTesttoolpath + "writer\optional\input\linguistik\0" & iSprache & ".odt") + end select end select if sReturn <> "None" then @@ -165,32 +165,32 @@ end function sub wToolsSpellcheckCheckWriter '/// This function opens the spellcheck-dialog in all applications Select Case Ucase(gApplication) - Case "WRITER" : ToolsSpellcheckWriter - Case "MASTERDOCUMENT" : ToolsSpellcheckWriter - Case "HTML" : ToolsSpellcheckWriter - case "DRAW" : ToolsSpellcheck - case "IMPRESS" : ToolsSpellcheck + Case "WRITER" : ToolsSpellcheckWriter + Case "MASTERDOCUMENT" : ToolsSpellcheckWriter + Case "HTML" : ToolsSpellcheckWriter + case "DRAW" : ToolsSpellcheck + case "IMPRESS" : ToolsSpellcheck end select end sub '******************************************************************* sub wEnableAutoSpellcheck(sEnable as boolean) - '/// This function checks option 'AutoCheck' in Options - '/// requires a bool to indicate state + '/// This function checks option 'AutoCheck' in Options + '/// requires a bool to indicate state '/// from 680m61 on it is checked by default - ExtrasOptionen + ExtrasOptionen Kontext "ExtrasOptionenDLG" Call hToolsOptions("LanguageSettings","WritingAids") Optionen.Select 1 - Select Case sEnable - Case true - Optionen.Check - Case false - Optionen.UnCheck - end select - Kontext "ExtrasOptionenDLG" - ExtrasOptionenDLG.Ok + Select Case sEnable + Case true + Optionen.Check + Case false + Optionen.UnCheck + end select + Kontext "ExtrasOptionenDLG" + ExtrasOptionenDLG.Ok end sub @@ -205,10 +205,10 @@ sub wEnableHyphenation(sEnable as boolean) Active.SetPage TabTextfluss kontext "TabTextfluss" Select Case sEnable - case true - Automatisch.Check - case false - Automatisch.UnCheck + case true + Automatisch.Check + case false + Automatisch.UnCheck end select TabTextfluss.OK Call hCloseDocument diff --git a/testautomation/writer/tools/includes/w_tool5.inc b/testautomation/writer/tools/includes/w_tool5.inc index 4ee5f4cf25ba..6774f0b2bcb1 100644 --- a/testautomation/writer/tools/includes/w_tool5.inc +++ b/testautomation/writer/tools/includes/w_tool5.inc @@ -1,7 +1,7 @@ 'encoding UTF-8 Do not remove or change this line! -'************************************************************************** +'******************************************************************************* '* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. -'* +'* '* Copyright 2008 by Sun Microsystems, Inc. '* '* OpenOffice.org - a multi-platform office productivity suite @@ -29,22 +29,13 @@ '* <http://www.openoffice.org/license.html> '* for a copy of the LGPLv3 License. '* -'/************************************************************************ -'* ** -'* owner : fredrik.haegg@sun.com ** -'* ** -'* short description : Description of file ** -'* ** -'******************************************************************* -'* ** -' #1 hLevelContent () as String -' #1 hLevelChange( aL() as integer,i as integer,x as integer ,y as integer, sublevel as boolean ) as boolean -' #1 hLevelPrint (aL()as integer) as boolean -' #1 hIsNumberingBullets () as Boolean -' #1 hFormatParagraphNumbering (sStyle as string -' #1 hFindInDocument (sTempSearch as string) as boolean -'* ** -'\****************************************************************** +'/****************************************************************************** +'* +'* owner : fredrik.haegg@sun.com +'* +'* short description : Description of file +'* +'\****************************************************************************** function hLevelContent () as String ' presupposition: just stay in line with the to check content @@ -62,86 +53,86 @@ end function '------------------------------------------------------------------------------ function hLevelChange(aL() as integer,i as integer,x as integer ,y as integer, sublevel as boolean ) as boolean -' ALSO boolean, if it schould be checked, if it got changed! else don't adjust array!!! -' input: level Nr., how many levels +/- -' return: false, if wrong paragraph - - dim itemp as integer - dim xtemp as integer - dim ytemp as integer - dim stemp as integer - dim j as integer - - if (hLevelOk (i)) then - if (aL (i,1) + x) > 0 then ' CHG <-> level 'stufen' - ' has to work for +/- x - xTemp = aL (i,1) - aL (i,1) = aL (i,1) + x - if (sublevel) then - iTemp = i+1 - do while (aL (iTemp,1) > xTemp) - aL (iTemp,1) = aL (iTemp,1) + x - iTemp=iTemp + 1 - loop - end if - else - 'warnlog "This makes no sense; you trie to 'move to the left'; it doesn't go further! Entry: "+i - end if - iTemp = 1 - do while (i <> aL(itemp,2)) - inc iTemp - loop - printlog "CHG: found i="+i+" at: "+iTemp - - ' move entry without sublevels - if (y < -1) OR (y > 1) then warnlog "y ! aus (-1,1) is not implemented :-( yet !" - if (y > 0) then + ' ALSO boolean, if it schould be checked, if it got changed! else don't adjust array!!! + ' input: level Nr., how many levels +/- + ' return: false, if wrong paragraph + + dim itemp as integer + dim xtemp as integer + dim ytemp as integer + dim stemp as integer + dim j as integer + + if (hLevelOk (i)) then + if (aL (i,1) + x) > 0 then ' CHG <-> level 'stufen' + ' has to work for +/- x + xTemp = aL (i,1) + aL (i,1) = aL (i,1) + x + if (sublevel) then + iTemp = i+1 + do while (aL (iTemp,1) > xTemp) + aL (iTemp,1) = aL (iTemp,1) + x + iTemp=iTemp + 1 + loop + end if + else + 'warnlog "This makes no sense; you trie to 'move to the left'; it doesn't go further! Entry: "+i + end if + iTemp = 1 + do while (i <> aL(itemp,2)) + inc iTemp + loop + printlog "CHG: found i="+i+" at: "+iTemp + + ' move entry without sublevels + if (y < -1) OR (y > 1) then warnlog "y ! aus (-1,1) is not implemented :-( yet !" + if (y > 0) then xtemp = aL( itemp+y ,1) aL( itemp+y ,1) = aL( itemp ,1) aL( itemp ,1) = xtemp xtemp = aL( itemp+y ,2) aL( itemp+y ,2) = aL( itemp ,2) aL( itemp ,2) = xtemp - if (sublevel) then ' with sublevel - yTemp = aL( iTemp+y ,1) ' save hor <-> level in yTemp - sTemp = 2 - do while (aL (iTemp ,1) > yTemp) - xtemp = aL( itemp+sTemp ,1) - aL( itemp+sTemp ,1) = aL( itemp ,1) - aL( itemp ,1) = xtemp - xtemp = aL( itemp+sTemp ,2) - aL( itemp+sTemp ,2) = aL( itemp ,2) - aL( itemp ,2) = xtemp - inc sTemp - loop - end if - else - if (y < 0) then - for j=-1 to y - xtemp = aL( itemp+j ,1) ' hori <-> level copy - aL( itemp+j ,1) = aL( itemp+j+1 ,1) - aL( itemp+j+1 ,1) = xtemp ' ^ - xtemp = aL( itemp+j ,2) ' vert | level copy - aL( itemp+j ,2) = aL( itemp+j+1 ,2) ' v - aL( itemp+j+1 ,2) = xtemp - next j if (sublevel) then ' with sublevel - yTemp = aL( iTemp+y ,1) ' save hor <-> level in yTemp - iTemp = itemp+1 - do while (aL (iTemp,1) > yTemp) - xtemp = aL( itemp+y ,1) - aL( itemp+y ,1) = aL( itemp+y+1 ,1) - aL( itemp+y+1 ,1) = xtemp - xtemp = aL( itemp+y ,2) - aL( itemp+y ,2) = aL( itemp+y+1 ,2) - aL( itemp+y+1 ,2) = xtemp - iTemp=iTemp + 1 - loop + yTemp = aL( iTemp+y ,1) ' save hor <-> level in yTemp + sTemp = 2 + do while (aL (iTemp ,1) > yTemp) + xtemp = aL( itemp+sTemp ,1) + aL( itemp+sTemp ,1) = aL( itemp ,1) + aL( itemp ,1) = xtemp + xtemp = aL( itemp+sTemp ,2) + aL( itemp+sTemp ,2) = aL( itemp ,2) + aL( itemp ,2) = xtemp + inc sTemp + loop + end if + else + if (y < 0) then + for j=-1 to y + xtemp = aL( itemp+j ,1) ' hori <-> level copy + aL( itemp+j ,1) = aL( itemp+j+1 ,1) + aL( itemp+j+1 ,1) = xtemp ' ^ + xtemp = aL( itemp+j ,2) ' vert | level copy + aL( itemp+j ,2) = aL( itemp+j+1 ,2) ' v + aL( itemp+j+1 ,2) = xtemp + next j + if (sublevel) then ' with sublevel + yTemp = aL( iTemp+y ,1) ' save hor <-> level in yTemp + iTemp = itemp+1 + do while (aL (iTemp,1) > yTemp) + xtemp = aL( itemp+y ,1) + aL( itemp+y ,1) = aL( itemp+y+1 ,1) + aL( itemp+y+1 ,1) = xtemp + xtemp = aL( itemp+y ,2) + aL( itemp+y ,2) = aL( itemp+y+1 ,2) + aL( itemp+y+1 ,2) = xtemp + iTemp=iTemp + 1 + loop + end if + else ' 0 end if - else ' 0 - end if - end if - end if + end if + end if end function '------------------------------------------------------------------------------ @@ -149,7 +140,7 @@ end function function hLevelPrint (aL()as integer) as boolean dim sTemp as string dim iTemp as integer - dim i,j as integer + dim i,j as integer ' how big is this array??!!! pd: it has to be in aL(0,0) printlog "---------------------------------------------------------------------" for i=1 to aL(0,0) @@ -213,22 +204,22 @@ sub hFormatParagraphNumbering (sStyle as string,bRestart as integer,sStartW as s end if if (bRestart <> -1) then select case bRestart - case 0: NumerierungNeuBeginnen.UnCheck - case 1: NumerierungNeuBeginnen.Check - case 2: NumerierungNeuBeginnen.TriState + case 0: NumerierungNeuBeginnen.UnCheck + case 1: NumerierungNeuBeginnen.Check + case 2: NumerierungNeuBeginnen.TriState end select end if if (sStartW <> -1) then select case sStartW - case 0: NumerierungBeginnenBei.UnCheck - case 1: NumerierungBeginnenBei.Check + case 0: NumerierungBeginnenBei.UnCheck + case 1: NumerierungBeginnenBei.Check end select end if catch Warnlog "Not possible; wrong style=none??" endcatch - TabNumerierungAbsatz.OK + TabNumerierungAbsatz.OK end sub diff --git a/testautomation/writer/tools/includes/w_tool6.inc b/testautomation/writer/tools/includes/w_tool6.inc index 57cfb8670423..2575b7eb6862 100755 --- a/testautomation/writer/tools/includes/w_tool6.inc +++ b/testautomation/writer/tools/includes/w_tool6.inc @@ -1,7 +1,7 @@ 'encoding UTF-8 Do not remove or change this line! -'************************************************************************** +'******************************************************************************* '* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. -'* +'* '* Copyright 2008 by Sun Microsystems, Inc. '* '* OpenOffice.org - a multi-platform office productivity suite @@ -29,56 +29,21 @@ '* <http://www.openoffice.org/license.html> '* for a copy of the LGPLv3 License. '* -'/************************************************************************ +'/****************************************************************************** '* '* owner : fredrik.haegg@sun.com '* '* short description : Tools for writer tests. '* -'************************************************************************ -'* -' #0 wOfficeRestart ** -' #1 LiberalMeasurement ** -' #1 GetMeasUnit ** -' #1 StrToDouble ** -' #1 wKillUpcomingActives ** -' #1 wGetCharacterFont -' #1 wGetCharacterFontSize -' #1 ScreenShot -' #1 ZeilenHoeheHolen -' #1 ZeilenHoeheTesten -' #1 SpaltenBreiteHolen -' #1 SpaltenBreiteTesten -' #1 SeitenAbstaendeHolen -' #1 SeitenAbstaendeTesten -' #1 ZahlAusSpinnfield -' #1 ZeilenTesten -' #1 SpaltenTesten -' #1 TBOhTabelleEinfuegen -' #1 hGetTableName -' #1 dec -' #1 inc -' #1 hGetColumn -' #1 hNavigatorOpenWindows -' #1 hIsNamedDocLoaded -' #1 hSetSpellHypLanguage -' #1 hFindSpellHypLanguage -' #1 wSearchWriteableArea -' ** ** -' \******************************************************************* +'\****************************************************************************** sub wOfficeRestart - Dim i as integer - Call sleep(5) - for i = 1 to GetDocumentCount - Call hCloseDocument - next i - Call sleep(5) - ' Close the backing windows - FileExit "SynchronMode", TRUE + + hFileCloseAll() + ' Close the backing windows + FileExit "SynchronMode", TRUE Call hStartTheOffice - Call sleep(5) end sub '-------------------------------------------------------------- @@ -169,7 +134,7 @@ function StrToDouble ( sWert$ ) as Double if i1 > i2 then i = i1 else i = i2 ' vorkommateil try - a = val (left$ (sDummy$,i-1)) + a = val (left$ (sDummy$,i-1)) catch endcatch n = (len (sDummy$)-i) @@ -204,10 +169,10 @@ function wKillUpcomingActives(optional sDocument as string) Warnlog "(1/2): " + Active.GetText ' Changed from Warn to print. else Select case sDocument - Case "sw31.sdw", "sw31.vor" - warnlog "Saving sdw-file as sxw fails" - Case else - Warnlog Active.Gettext + Case "sw31.sdw", "sw31.vor" + warnlog "Saving sdw-file as sxw fails" + Case else + Warnlog Active.Gettext end select end if try @@ -439,10 +404,10 @@ sub TBOhTabelleEinfuegen (optional tName as string, optional tHeader as boolean, Kontext "TabelleEinfuegenWriter" wait 500 - ' Default had been changed. Not to rewrite the whole test I decided to changed the row-number - Spalten.Settext "5" - wait 500 - + ' Default had been changed. Not to rewrite the whole test I decided to changed the row-number + Spalten.Settext "5" + wait 500 + if (IsMissing (tName) <> True) then TabellenName.SetText tName if (IsMissing (tHeader) <> True) then if tHeader then @@ -470,10 +435,10 @@ sub TBOhTabelleEinfuegen (optional tName as string, optional tHeader as boolean, end if if IsMissing(tWidth) <> True then - Spalten.SetText tWidth - else - Spalten.Settext "5" - end if + Spalten.SetText tWidth + else + Spalten.Settext "5" + end if if IsMissing(tHeight) <> True then Zeilen.SetText tHeight TabelleEinfuegenWriter.OK @@ -487,14 +452,14 @@ sub TBOhTabelleEinfuegen (optional tName as string, optional tHeader as boolean, end if Select Case gApplication - Case "WRITER" - Kontext "DocumentWriter" + Case "WRITER" + Kontext "DocumentWriter" - Case "MASTERDOCUMENT" - Kontext "DocumentMasterDoc" + Case "MASTERDOCUMENT" + Kontext "DocumentMasterDoc" - Case "HTML" - Kontext "DocumentWriterWeb" + Case "HTML" + Kontext "DocumentWriterWeb" end select Sleep 1 @@ -606,12 +571,12 @@ function hNavigatorOpenWindows() as Integer sleep (3) hNavigatorOpenWindows = DokumentListe.GetItemCount - 2 ' couldn' see dokumentliste :-( reason:: active that prevents it :-( sleep (3) -' printlog " hnow: "+DokumentListe.GetItemCount +" "+DokumentListe.GetSelText + ' printlog " hnow: "+DokumentListe.GetItemCount +" "+DokumentListe.GetSelText if (DokumentListe.GetItemCount = 0) then print "waassss o ??!!?!??!?!" -' close Navigator + ' close Navigator ViewNavigator Kontext "DocumentWriter" -ENDE: + ENDE: end function '-------------------------------------------------------------- @@ -626,17 +591,17 @@ function hIsNamedDocLoaded (ShouldFile as String) as Boolean '///' Plan A :-( /// ''///+ to be able to check, that document was loaded, print something before opening new doc ///' ''///+ during test, check if it is readable ... ///' -' Kontext "DocumentWriter" -' DocumentWriter.TypeKeys "<Mod1 home>" -' DocumentWriter.TypeKeys "TBOlastWindow" -' DocumentWriter.TypeKeys "<Return>" - -' Kontext "DocumentWriter" -' DocumentWriter.TypeKeys "<Mod1 Home>" -' DocumentWriter.TypeKeys "<Shift End>" -' EditCopy -' DocumentWriter.TypeKeys "<Home>" -' if GetClipboardText <> "TBOlastWindow" Then ///' + ' Kontext "DocumentWriter" + ' DocumentWriter.TypeKeys "<Mod1 home>" + ' DocumentWriter.TypeKeys "TBOlastWindow" + ' DocumentWriter.TypeKeys "<Return>" + + ' Kontext "DocumentWriter" + ' DocumentWriter.TypeKeys "<Mod1 Home>" + ' DocumentWriter.TypeKeys "<Shift End>" + ' EditCopy + ' DocumentWriter.TypeKeys "<Home>" + ' if GetClipboardText <> "TBOlastWindow" Then ///' '/// ' Plan B :-) /// '///+' if a doc got loaded, the filename in a 'SaveAs' Dlg is different from "" /// @@ -647,8 +612,8 @@ function hIsNamedDocLoaded (ShouldFile as String) as Boolean Kontext "SpeichernDlg" If DateiOhneExt(DateiExtract(Dateiname.GetSelText)) = DateiOhneExt(DateiExtract(ShouldFile)) Then hIsNamedDocLoaded = True -' Printlog "Filename: " + Dateiname.GetSelText+"; "+ShouldFile -' Printlog "--------------------------------------------------Loaded as: " + Dateityp.GetSelText + ' Printlog "Filename: " + Dateiname.GetSelText+"; "+ShouldFile + ' Printlog "--------------------------------------------------Loaded as: " + Dateityp.GetSelText Else 'exception! for templates if lcase(right(ShouldFile,3)) = "vor" or lcase(right(ShouldFile,3)) = "dot" then hIsNamedDocLoaded = True @@ -677,20 +642,20 @@ sub hSetSpellHypLanguage ExtrasOptionenDlg.Cancel sTrieit = hFindSpellHypLanguage ToolsOptions - Call hToolsOptions ("LANGUAGESETTINGS","LANGUAGES") - AktuellesDokument.Check - if sTrieit <> "" then - Westlich.Select sTrieit - else - warnlog "SOrry no spellbook found :-(" - end if + Call hToolsOptions ("LANGUAGESETTINGS","LANGUAGES") + AktuellesDokument.Check + if sTrieit <> "" then + Westlich.Select sTrieit + else + warnlog "SOrry no spellbook found :-(" + end if else Westlich.Select glLocale (4) end if printlog "selected: "+Westlich.GetSelText Kontext "ExtrasOptionenDlg" ExtrasOptionenDlg.OK - end if + end if end sub '-------------------------------------------------------------- @@ -793,16 +758,16 @@ end sub function fInsertFrame (x1 as Integer , y1 as Integer , x2 as Integer , y2 as Integer) 'This function will insert a frame with the coordinate - + Call wDocSetContext Call gMouseClick (x1, y1) - + Call hToolbarSelect("INSERT", true ) Sleep 1 Kontext "Insertbar" Rahmen.Click Sleep 1 - + Call gMouseDown ( x1,y1 ) Call gMouseMove ( x1,y1,x2,y2 ) Call gMouseUp( x2,y2 ) diff --git a/testautomation/writer/tools/includes/w_tool7.inc b/testautomation/writer/tools/includes/w_tool7.inc index 3df9241cd2f2..585404cc57f6 100644 --- a/testautomation/writer/tools/includes/w_tool7.inc +++ b/testautomation/writer/tools/includes/w_tool7.inc @@ -1,7 +1,7 @@ 'encoding UTF-8 Do not remove or change this line! '************************************************************************** '* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. -'* +'* '* Copyright 2008 by Sun Microsystems, Inc. '* '* OpenOffice.org - a multi-platform office productivity suite @@ -33,7 +33,7 @@ '* '* owner : fredrik.haegg@sun.com '* -'* short description : Functions mostly used for fields +'* short description : Functions mostly used for fields '* '******************************************************************* '* @@ -49,13 +49,13 @@ function fSetLocale(sLocaleSetting as String) as String - 'This function is set Locale in Tools/Options/Language Settings / Languages - ToolsOptions - Call hToolsOptions("LANGUAGESETTINGS","LANGUAGES") + 'This function is set Locale in Tools/Options/Language Settings / Languages + ToolsOptions + Call hToolsOptions("LANGUAGESETTINGS","LANGUAGES") fSetLocale = Gebietsschema.GetSelText Gebietsschema.Select sLocaleSetting - Kontext "ExtrasOptionenDlg" - ExtrasOptionenDlg.OK + Kontext "ExtrasOptionenDlg" + ExtrasOptionenDlg.OK end function @@ -63,18 +63,18 @@ end function function fSetWestern(sWestern as String) as String - 'This function is set western language in Tools/Options/Language Settings / Languages - ToolsOptions - Call hToolsOptions("LANGUAGESETTINGS","LANGUAGES") + 'This function is set western language in Tools/Options/Language Settings / Languages + ToolsOptions + Call hToolsOptions("LANGUAGESETTINGS","LANGUAGES") fSetWestern = Westlich.GetSelText if sWestern = "Null" then Westlich.Select 1 goto GoON end if Westlich.Select sWestern -GoON: - Kontext "ExtrasOptionenDlg" - ExtrasOptionenDlg.OK + GoON: + Kontext "ExtrasOptionenDlg" + ExtrasOptionenDlg.OK end function @@ -90,7 +90,7 @@ function fSetAsian(sAsian as String) as String if Asiatisch.IsEnabled then Asiatisch.Select 1 else if Asiatisch.IsEnabled then Asiatisch.Select sAsian - end if + end if Kontext "ExtrasOptionenDlg" ExtrasOptionenDlg.OK @@ -102,190 +102,190 @@ function fGetType(sType as String) as String 'This function will RETURN TYPE select case sType - case "Author" - select case iSprache - case 1: fGetType = "Author" - case 7: fGetType = "Автор" - case 31: fGetType = "Gebruiker" - case 33: fGetType = "Utilisateur" - case 34: fGetType = "Autor" - case 36: fGetType = "Szerzó" - case 39: fGetType = "Autore" - case 46: fGetType = "Användare" - case 49: fGetType = "Benutzer" - case 55: fGetType = "Autor" - case 81: fGetType = "ユーザー" - case 82: fGetType = "작성�?" - case 86: fGetType = "使用者" - case 88: fGetType = "使用者" - case else : - QAErrorLog "Now, the test does not support for the language " +iSprache - fGetType = "" - end select - case "Chapter" - select case iSprache - case 1: fGetType = "Chapter" - case 7: fGetType = "Глава" - case 31: fGetType = "Hoofdstuk" - case 33: fGetType = "Chapitre" - case 34: fGetType = "Capítulo" - case 36: fGetType = "Fejezet" - case 39: fGetType = "Capitolo" - case 46: fGetType = "Kapitel" - case 49: fGetType = "Kapitel" - case 55: fGetType = "Capítulo" - case 81: fGetType = "章" - case 82: fGetType = "장" - case 86: fGetType = "章" - case 88: fGetType = "章" - case else : - QAErrorLog "Now, the test does not support for the language " +iSprache - fGetType = "" - end select - case "Date" - select case iSprache - case 1: fGetType = "Date" - case 7: fGetTYpe = "Дата" - case 31: fGetType = "Datum" - case 33: fGetType = "Date" - case 34: fGetType = "Fecha" - case 36: fGetType = "Dátum" - case 39: fGetType = "Data" - case 46: fGetType = "Datum" - case 49: fGetType = "Datum" - case 55: fGetType = "Data" - case 81: fGetType = "日付" - case 82: fGetType = "날짜" - case 86: fGetType = "日期" - case 88: fGetType = "日期" - case else : - QAErrorLog "Now, the test does not support for the language " +iSprache - fGetType = "" - end select - case "File name" - select case iSprache - case 1: fGetType = "File name" - case 7: fGetType = "Имя файла" - case 31: fGetType = "Bestandsnaam" - case 33: fGetType = "Nom de fichier" - case 34: fGetType = "Nombre del archivo" - case 36: fGetType = "Fájlnév" - case 39: fGetType = "Nome file" - case 46: fGetType = "Filnamn" - case 49: fGetType = "Dateiname" - case 55: fGetType = "Nome do arquivo" - case 81: fGetType = "ファイル�??" - case 82: fGetType = "파�?� �?�름" - case 86: fGetType = "文件�??" - case 88: fGetType = "檔案�??" - case else : - QAErrorLog "Now, the test does not support for the language " +iSprache - fGetType = "" - end select - case "Page" - select case iSprache - case 1: fGetType = "Page" - case 7: fGetType = "Страница" - case 31: fGetType = "Pagina" - case 33: fGetType = "Page" - case 34: fGetType = "Página" - case 36: fGetType = "Oldal" - case 39: fGetType = "Pagina" - case 46: fGetType = "Sida" - case 49: fGetType = "Seite" - case 55: fGetType = "Página" - case 81: fGetType = "ページ" - case 82: fGetType = "페�?�지" - case 86: fGetType = "页" - case 88: fGetType = "�?" - case else : - QAErrorLog "Now, the test does not support for the language " +iSprache - fGetType = "" - end select - case "Sender" - select case iSprache - case 1: fGetType = "Sender" - case 7: fGetType = "Отправитель" - case 31: fGetType = "Afzender" - case 33: fGetType = "Expéditeur" - case 34: fGetType = "Remitente" - case 36: fGetType = "Feladó" - case 39: fGetType = "Mittente" - case 46: fGetType = "Avsändare" - case 49: fGetType = "Absender" - case 55: fGetType = "Remetente" - case 81: fGetType = "差出人" - case 82: fGetType = "보낸 사람" - case 86: fGetType = "�?�件人" - case 88: fGetType = "寄件者" - case else : - QAErrorLog "Now, the test does not support for the language " +iSprache - fGetType = "" - end select - case "Statistics" - select case iSprache - case 1: fGetType = "Statistics" - case 7: fGetType = "Статистика" - case 31: fGetType = "Statistiek" - case 33: fGetType = "Statistiques" - case 34: fGetType = "Estadística" - case 36: fGetType = "Statisztika" - case 39: fGetType = "Statistiche" - case 46: fGetType = "Statistik" - case 49: fGetType = "Statistik" - case 55: fGetType = "Estatísticas" - case 81: fGetType = "統計" - case 82: fGetType = "통계" - case 86: fGetType = "统计" - case 88: fGetType = "統計" - case else : - QAErrorLog "Now, the test does not support for the language " +iSprache - fGetType = "" - end select - case "Templates" - select case iSprache - case 1: fGetType = "Templates" - case 7: fGetType = "Шаблоны" - case 31: fGetType = "Sjablonen" - case 33: fGetType = "Modèle de document" - case 34: fGetType = "Plantillas" - case 36: fGetType = "Sablonok" - case 39: fGetType = "Modello" - case 46: fGetType = "Dokumentmall" - case 49: fGetType = "Dokumentvorlage" - case 55: fGetType = "Modelos" - case 81: fGetType = "ドキュメントテンプレート" - case 82: fGetType = "서�? 파�?�" - case 86: fGetType = "文档�?样" - case 88: fGetType = "文件樣�?" - case else : - QAErrorLog "Now, the test does not support for the language " +iSprache - fGetType = "" - end select - case "Time" - select case iSprache - case 1: fGetType = "Time" - case 7: fGetTYpe = "Время" - case 31: fGetType = "Tijd" - case 33: fGetType = "Heure" - case 34: fGetType = "Hora" - case 36: fGetTYpe = "Idó" - case 39: fGetType = "Orario" - case 46: fGetType = "Klockslag" - case 49: fGetType = "Uhrzeit" - case 55: fGetType = "Hora" - case 81: fGetType = "時刻" - case 82: fGetType = "시간" - case 86: fGetType = "时间" - case 88: fGetType = "時間" - case else : - QAErrorLog "Now, the test does not support for the language " +iSprache - fGetType = "" - end select - case else : ' Fallback - QAErrorLog "Now, the test does not support for the type -- " &sType + case "Author" + select case iSprache + case 1: fGetType = "Author" + case 7: fGetType = "Автор" + case 31: fGetType = "Gebruiker" + case 33: fGetType = "Utilisateur" + case 34: fGetType = "Autor" + case 36: fGetType = "Szerzó" + case 39: fGetType = "Autore" + case 46: fGetType = "Användare" + case 49: fGetType = "Benutzer" + case 55: fGetType = "Autor" + case 81: fGetType = "ユーザー" + case 82: fGetType = "작성�?" + case 86: fGetType = "使用者" + case 88: fGetType = "使用者" + case else : + QAErrorLog "Now, the test does not support for the language " +iSprache + fGetType = "" + end select + case "Chapter" + select case iSprache + case 1: fGetType = "Chapter" + case 7: fGetType = "Глава" + case 31: fGetType = "Hoofdstuk" + case 33: fGetType = "Chapitre" + case 34: fGetType = "Capítulo" + case 36: fGetType = "Fejezet" + case 39: fGetType = "Capitolo" + case 46: fGetType = "Kapitel" + case 49: fGetType = "Kapitel" + case 55: fGetType = "Capítulo" + case 81: fGetType = "章" + case 82: fGetType = "장" + case 86: fGetType = "章" + case 88: fGetType = "章" + case else : + QAErrorLog "Now, the test does not support for the language " +iSprache + fGetType = "" + end select + case "Date" + select case iSprache + case 1: fGetType = "Date" + case 7: fGetTYpe = "Дата" + case 31: fGetType = "Datum" + case 33: fGetType = "Date" + case 34: fGetType = "Fecha" + case 36: fGetType = "Dátum" + case 39: fGetType = "Data" + case 46: fGetType = "Datum" + case 49: fGetType = "Datum" + case 55: fGetType = "Data" + case 81: fGetType = "日付" + case 82: fGetType = "날짜" + case 86: fGetType = "日期" + case 88: fGetType = "日期" + case else : + QAErrorLog "Now, the test does not support for the language " +iSprache + fGetType = "" + end select + case "File name" + select case iSprache + case 1: fGetType = "File name" + case 7: fGetType = "Имя файла" + case 31: fGetType = "Bestandsnaam" + case 33: fGetType = "Nom de fichier" + case 34: fGetType = "Nombre del archivo" + case 36: fGetType = "Fájlnév" + case 39: fGetType = "Nome file" + case 46: fGetType = "Filnamn" + case 49: fGetType = "Dateiname" + case 55: fGetType = "Nome do arquivo" + case 81: fGetType = "ファイル�??" + case 82: fGetType = "파�?� �?�름" + case 86: fGetType = "文件�??" + case 88: fGetType = "檔案�??" + case else : + QAErrorLog "Now, the test does not support for the language " +iSprache + fGetType = "" + end select + case "Page" + select case iSprache + case 1: fGetType = "Page" + case 7: fGetType = "Страница" + case 31: fGetType = "Pagina" + case 33: fGetType = "Page" + case 34: fGetType = "Página" + case 36: fGetType = "Oldal" + case 39: fGetType = "Pagina" + case 46: fGetType = "Sida" + case 49: fGetType = "Seite" + case 55: fGetType = "Página" + case 81: fGetType = "ページ" + case 82: fGetType = "페�?�지" + case 86: fGetType = "页" + case 88: fGetType = "�?" + case else : + QAErrorLog "Now, the test does not support for the language " +iSprache fGetType = "" - end select + end select + case "Sender" + select case iSprache + case 1: fGetType = "Sender" + case 7: fGetType = "Отправитель" + case 31: fGetType = "Afzender" + case 33: fGetType = "Expéditeur" + case 34: fGetType = "Remitente" + case 36: fGetType = "Feladó" + case 39: fGetType = "Mittente" + case 46: fGetType = "Avsändare" + case 49: fGetType = "Absender" + case 55: fGetType = "Remetente" + case 81: fGetType = "差出人" + case 82: fGetType = "보낸 사람" + case 86: fGetType = "�?�件人" + case 88: fGetType = "寄件者" + case else : + QAErrorLog "Now, the test does not support for the language " +iSprache + fGetType = "" + end select + case "Statistics" + select case iSprache + case 1: fGetType = "Statistics" + case 7: fGetType = "Статистика" + case 31: fGetType = "Statistiek" + case 33: fGetType = "Statistiques" + case 34: fGetType = "Estadística" + case 36: fGetType = "Statisztika" + case 39: fGetType = "Statistiche" + case 46: fGetType = "Statistik" + case 49: fGetType = "Statistik" + case 55: fGetType = "Estatísticas" + case 81: fGetType = "統計" + case 82: fGetType = "통계" + case 86: fGetType = "统计" + case 88: fGetType = "統計" + case else : + QAErrorLog "Now, the test does not support for the language " +iSprache + fGetType = "" + end select + case "Templates" + select case iSprache + case 1: fGetType = "Templates" + case 7: fGetType = "Шаблоны" + case 31: fGetType = "Sjablonen" + case 33: fGetType = "Modèle de document" + case 34: fGetType = "Plantillas" + case 36: fGetType = "Sablonok" + case 39: fGetType = "Modello" + case 46: fGetType = "Dokumentmall" + case 49: fGetType = "Dokumentvorlage" + case 55: fGetType = "Modelos" + case 81: fGetType = "ドキュメントテンプレート" + case 82: fGetType = "서�? 파�?�" + case 86: fGetType = "文档�?样" + case 88: fGetType = "文件樣�?" + case else : + QAErrorLog "Now, the test does not support for the language " +iSprache + fGetType = "" + end select + case "Time" + select case iSprache + case 1: fGetType = "Time" + case 7: fGetTYpe = "Время" + case 31: fGetType = "Tijd" + case 33: fGetType = "Heure" + case 34: fGetType = "Hora" + case 36: fGetTYpe = "Idó" + case 39: fGetType = "Orario" + case 46: fGetType = "Klockslag" + case 49: fGetType = "Uhrzeit" + case 55: fGetType = "Hora" + case 81: fGetType = "時刻" + case 82: fGetType = "시간" + case 86: fGetType = "时间" + case 88: fGetType = "時間" + case else : + QAErrorLog "Now, the test does not support for the language " +iSprache + fGetType = "" + end select + case else : ' Fallback + QAErrorLog "Now, the test does not support for the type -- " &sType + fGetType = "" + end select end function @@ -293,9 +293,9 @@ end function function fGetFieldContent( ) as String - Call fFormatCharacter("TabHyperlinkZeichen") - fGetFieldContent = Hinweis.GetText - TabHyperlinkZeichen.Cancel + Call fFormatCharacter("TabHyperlinkZeichen") + fGetFieldContent = Hinweis.GetText + TabHyperlinkZeichen.Cancel end function @@ -303,13 +303,13 @@ end function function fSetToBigSize( ) - Call fFormatCharacter("TabFont") + Call fFormatCharacter("TabFont") try - SizeWest.Select SizeWest.GetItemCount + SizeWest.Select SizeWest.GetItemCount catch - Size.Select Size.GetItemCount + Size.Select Size.GetItemCount endcatch - TabFont.OK + TabFont.OK end function @@ -318,25 +318,25 @@ end function function fGetDirLanguage( ) as String - 'This function will RETURN language name for - 'install directory , - 'eg . $SO_path/share/template/?? <- What you need to know - Select case iSprache - case 01 : fGetDirLanguage = "en-US" '(English USA) - case 31 : fGetDirLanguage = "nl" ' Dutch - case 33 : fGetDirLanguage = "fr-FR" '(French) - case 34 : fGetDirLanguage = "es-ES" '(Spanish) - case 39 : fGetDirLanguage = "it-IT" '(Italian) - case 46 : fGetDirLanguage = "sv-SE" '(Swedish) - case 49 : fGetDirLanguage = "de-DE" '(German) - case 55 : fGetDirLanguage = "pt-BR" '(Portuguese) - case 81 : fGetDirLanguage = "ja-JP" '(Japanese) - case 82 : fGetDirLanguage = "ko-KR" '(Korean) - case 86 : fGetDirLanguage = "zh-CN" '(Simplified Chinese) - case 88 : fGetDirLanguage = "zh-TW" '(Traditional Chinese) - case else : QAErrorLog "The test does not support the language " + iSprache - fGetDirLanguage = "en-US" - end select + 'This function will RETURN language name for + 'install directory , + 'eg . $SO_path/share/template/?? <- What you need to know + Select case iSprache + case 01 : fGetDirLanguage = "en-US" '(English USA) + case 31 : fGetDirLanguage = "nl" ' Dutch + case 33 : fGetDirLanguage = "fr-FR" '(French) + case 34 : fGetDirLanguage = "es-ES" '(Spanish) + case 39 : fGetDirLanguage = "it-IT" '(Italian) + case 46 : fGetDirLanguage = "sv-SE" '(Swedish) + case 49 : fGetDirLanguage = "de-DE" '(German) + case 55 : fGetDirLanguage = "pt-BR" '(Portuguese) + case 81 : fGetDirLanguage = "ja-JP" '(Japanese) + case 82 : fGetDirLanguage = "ko-KR" '(Korean) + case 86 : fGetDirLanguage = "zh-CN" '(Simplified Chinese) + case 88 : fGetDirLanguage = "zh-TW" '(Traditional Chinese) + case else : QAErrorLog "The test does not support the language " + iSprache + fGetDirLanguage = "en-US" + end select end function @@ -344,22 +344,22 @@ end function function fGetCategory( ) as String - 'This function will RETURN Category when inserting from template - Select case iSprache - case 01 : fGetCategory = "Education" - case 31 : fGetCategory = "Opleiding" - case 33 : fGetCategory = "Éducation" - case 34 : fGetCategory = "Educación" - case 39 : fGetCategory = "Formazione" - case 46 : fGetCategory = "Utbildning" - case 49 : fGetCategory = "Bildung" - case 55 : fGetCategory = "Formação" - case 81 : fGetCategory = "教養" - case 82 : fGetCategory = "�?사 학위 논문" - case 86 : fGetCategory = "教育" - case 88 : fGetCategory = "教育" - case else : QAErrorLog "The test does not support the language " + iSprache - end select + 'This function will RETURN Category when inserting from template + Select case iSprache + case 01 : fGetCategory = "Education" + case 31 : fGetCategory = "Opleiding" + case 33 : fGetCategory = "Éducation" + case 34 : fGetCategory = "Educación" + case 39 : fGetCategory = "Formazione" + case 46 : fGetCategory = "Utbildning" + case 49 : fGetCategory = "Bildung" + case 55 : fGetCategory = "Formação" + case 81 : fGetCategory = "教養" + case 82 : fGetCategory = "�?사 학위 논문" + case 86 : fGetCategory = "教育" + case 88 : fGetCategory = "教育" + case else : QAErrorLog "The test does not support the language " + iSprache + end select end function @@ -367,21 +367,21 @@ end function function fGetStyle( ) as String - 'This function will RETURN Style when inserting from template - Select case iSprache - case 01 : fGetStyle = "Master's Thesis" - case 33 : fGetStyle = "Mémoire" - case 34 : fGetStyle = "Trabajo de licenciatura" - case 39 : fGetStyle = "Tesi di laurea" - case 46 : fGetStyle = "Examensarbete" - case 49 : fGetStyle = "Diplomarbeit" - case 55 : fGetStyle = "Dissertação de Mestrado" - case 81 : fGetStyle = "�?�業論文" - case 82 : fGetStyle = "�?육" - case 86 : fGetStyle = "硕士论文" - case 88 : fGetStyle = "碩士論文" - case else : QAErrorLog "The test does not support the language " + iSprache - end select + 'This function will RETURN Style when inserting from template + Select case iSprache + case 01 : fGetStyle = "Master's Thesis" + case 33 : fGetStyle = "Mémoire" + case 34 : fGetStyle = "Trabajo de licenciatura" + case 39 : fGetStyle = "Tesi di laurea" + case 46 : fGetStyle = "Examensarbete" + case 49 : fGetStyle = "Diplomarbeit" + case 55 : fGetStyle = "Dissertação de Mestrado" + case 81 : fGetStyle = "�?�業論文" + case 82 : fGetStyle = "�?육" + case 86 : fGetStyle = "硕士论文" + case 88 : fGetStyle = "碩士論文" + case else : QAErrorLog "The test does not support the language " + iSprache + end select end function @@ -389,27 +389,27 @@ end function function fGetDate(sDate as String) as String - Dim sMonth , sDay , sYear as String + Dim sMonth , sDay , sYear as String - 'This function will RETURN Style when inserting from template + 'This function will RETURN Style when inserting from template - select case iSystemSprache - case 01 : - sMonth = Left (sDate , 2) - sDay = Mid (sDate , 4 , 2) - sYear = Right(sDate , 2) - case 49 : - sMonth = Mid (sDate , 4 , 2) - sDay = Left (sDate , 2) - sYear = Right(sDate , 2) - case 86 : - sMonth = Mid (sDate , 6 , 2) - sDay = Right(sDate , 2) - sYear = Mid (sDate , 3 , 2) - case else: + select case iSystemSprache + case 01 : + sMonth = Left (sDate , 2) + sDay = Mid (sDate , 4 , 2) + sYear = Right(sDate , 2) + case 49 : + sMonth = Mid (sDate , 4 , 2) + sDay = Left (sDate , 2) + sYear = Right(sDate , 2) + case 86 : + sMonth = Mid (sDate , 6 , 2) + sDay = Right(sDate , 2) + sYear = Mid (sDate , 3 , 2) + case else: - end select - fGetDate = sMonth & "/" & sDay & "/" & sYear + end select + fGetDate = sMonth & "/" & sDay & "/" & sYear end function @@ -417,50 +417,50 @@ end function function fGetDate1(sDate as String) as String - Dim sMonth , sDay , sYear as String + Dim sMonth , sDay , sYear as String - 'This function will RETURN Style when inserting from template + 'This function will RETURN Style when inserting from template - select case iSystemSprache - case 01 : - sMonth = Left (sDate , 2) - sDay = Mid (sDate , 4 , 2) - sYear = Right(sDate , 4) - case 49 : - sMonth = Mid (sDate , 4 , 2) - sDay = Left (sDate , 2) - sYear = Right(sDate , 4) - case 86 : - sMonth = Mid (sDate , 6 , 2) - sDay = Right(sDate , 2) - sYear = Left (sDate , 4) - case else: + select case iSystemSprache + case 01 : + sMonth = Left (sDate , 2) + sDay = Mid (sDate , 4 , 2) + sYear = Right(sDate , 4) + case 49 : + sMonth = Mid (sDate , 4 , 2) + sDay = Left (sDate , 2) + sYear = Right(sDate , 4) + case 86 : + sMonth = Mid (sDate , 6 , 2) + sDay = Right(sDate , 2) + sYear = Left (sDate , 4) + case else: - end select - fGetDate1 = sMonth & "/" & sDay & "/" & sYear + end select + fGetDate1 = sMonth & "/" & sDay & "/" & sYear end function '------------------------------------------------------------------------------------------- function fConvertBacklashToSlash (sTest) as String - '/// convert all \ to / , return the string with / - '///+ eg, \tmp\test\optional\includes\ ==> /tmp/test/optional/includes/ - - Dim i as Integer - Dim s1$ : Dim s2$ : Dim s3$ - - s1$ = sTest - - 'convert all \ to / - do - i = InStr( s1$, "\" ) - if i = 0 then exit do - s2$ = Left( s1$ , i-1 ) - s1$ = Mid( s1$ , i+1 ) - s3$ = s3$ + s2$ + "/" - loop until s1$="" - fConvertBacklashToSlash = s3$ + s1$ + '/// convert all \ to / , return the string with / + '///+ eg, \tmp\test\optional\includes\ ==> /tmp/test/optional/includes/ + + Dim i as Integer + Dim s1$ : Dim s2$ : Dim s3$ + + s1$ = sTest + + 'convert all \ to / + do + i = InStr( s1$, "\" ) + if i = 0 then exit do + s2$ = Left( s1$ , i-1 ) + s1$ = Mid( s1$ , i+1 ) + s3$ = s3$ + s2$ + "/" + loop until s1$="" + fConvertBacklashToSlash = s3$ + s1$ end function diff --git a/testautomation/writer/tools/includes/w_tools.inc b/testautomation/writer/tools/includes/w_tools.inc index f9c0d459d377..cb46e53749b2 100755 --- a/testautomation/writer/tools/includes/w_tools.inc +++ b/testautomation/writer/tools/includes/w_tools.inc @@ -1,7 +1,7 @@ 'encoding UTF-8 Do not remove or change this line! -'************************************************************************** +'******************************************************************************* '* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. -'* +'* '* Copyright 2008 by Sun Microsystems, Inc. '* '* OpenOffice.org - a multi-platform office productivity suite @@ -29,99 +29,72 @@ '* <http://www.openoffice.org/license.html> '* for a copy of the LGPLv3 License. '* -'/************************************************************************ +'/****************************************************************************** '* '* owner : fredrik.haegg@sun.com '* '* short description : Writer-Tools '* -'************************************************************************ -'* -' #1 wDokSchreiben ( OutputText ) -' #1 wTypeKeys ( OutputText ) -' #1 wDocSetContext -' #1 wBlindtextEinfuegen -' #1 wSelectVorlage ( sVorlagenTyp as String -' #1 wZeichenobjektEinfuegen ( Objekt$ -' #1 wObjektSelektieren ( xStart% -' #1 WortAusWoerterbuchLoeschen ( Aufnahme$ ) as Boolean -' #1 wIgnorierenlisteLoeschen -' #1 hLeisteUmschalten(welche as integer) -' #1 hGrafikleisteUmschalten(welche as integer) -' #1 wEinfuegenHyperlink(welcheSeite as integer) -' #1 wNavigatorAuswahl(Gruppe as integer -' #1 wClearDocument -' #1 wMarkObjects(delete as boolean) -' #1 hExportUmstellung ( WasDenn as Boolean ) -' #1 wInsertFrame -' #1 wRectangleToClipboard -' #1 wRectangleToClipboardHTML -' #1 MachMirDenEintrag(WoDenn as integer -' #1 wOptionenUndo ( sOption$ ) -' #1 wInsertDocumentinMasterDoc(DocumentName as string) as boolean -' #1 CheckForFilters() as boolean -' #1 hInsertFloatingFrame -'* -'\*********************************************************************** +'\****************************************************************************** sub wDokSchreiben ( OutputText , optional iLoop as Integer ) -Dim i as integer -If lcase(OutputText) = "<mod1 a>" then - If iSprache = 34 then OutputText = "<Mod1 E>" -end if -If IsMissing(iLoop) = True then iLoop = 1 + Dim i as integer + If lcase(OutputText) = "<mod1 a>" then + If iSprache = 34 then OutputText = "<Mod1 E>" + end if + If IsMissing(iLoop) = True then iLoop = 1 For i = 1 to iLoop - Select Case Ucase(gApplication) + Select Case Ucase(gApplication) Case "WRITER" - Kontext "DocumentWriter" - DocumentWriter.TypeKeys OutputText + Kontext "DocumentWriter" + DocumentWriter.TypeKeys OutputText Case "MASTERDOCUMENT" - Kontext "DocumentMasterDoc" - DocumentMasterDoc.TypeKeys OutputText + Kontext "DocumentMasterDoc" + DocumentMasterDoc.TypeKeys OutputText Case "HTML" - Kontext "DocumentWriterWeb" - DocumentWriterWeb.TypeKeys OutputText + Kontext "DocumentWriterWeb" + DocumentWriterWeb.TypeKeys OutputText case "DRAW" - Call hTextrahmenErstellen (OutputText,35,35,50,20) + Call hTextrahmenErstellen (OutputText,35,35,50,20) case "IMPRESS" - Call hTextrahmenErstellen (OutputText,35,35,50,20) + Call hTextrahmenErstellen (OutputText,35,35,50,20) - end select - wait 500 + end select + wait 500 next i end sub ' ----------------------------------------------------------------------- sub wTypeKeys ( OutputText , optional iLoop as Integer ) -Dim i as integer -If lcase(OutputText) = "<mod1 a>" then - If iSprache = 34 then OutputText = "<Mod1 E>" -end if -If IsMissing(iLoop) = True then iLoop = 1 + Dim i as integer + If lcase(OutputText) = "<mod1 a>" then + If iSprache = 34 then OutputText = "<Mod1 E>" + end if + If IsMissing(iLoop) = True then iLoop = 1 For i = 1 to iLoop - Select Case Ucase(gApplication) + Select Case Ucase(gApplication) Case "WRITER" - Kontext "DocumentWriter" - DocumentWriter.TypeKeys OutputText + Kontext "DocumentWriter" + DocumentWriter.TypeKeys OutputText Case "MASTERDOCUMENT" - Kontext "DocumentMasterDoc" - DocumentMasterDoc.TypeKeys OutputText + Kontext "DocumentMasterDoc" + DocumentMasterDoc.TypeKeys OutputText Case "HTML" - Kontext "DocumentWriterWeb" - DocumentWriterWeb.TypeKeys OutputText + Kontext "DocumentWriterWeb" + DocumentWriterWeb.TypeKeys OutputText case "DRAW" - Call hTextrahmenErstellen (OutputText,35,35,50,20) + Call hTextrahmenErstellen (OutputText,35,35,50,20) case "IMPRESS" - Call hTextrahmenErstellen (OutputText,35,35,50,20) - end select - wait 500 + Call hTextrahmenErstellen (OutputText,35,35,50,20) + end select + wait 500 next i end sub @@ -129,25 +102,25 @@ end sub sub wDocSetContext Select Case Ucase(gApplication) - Case "WRITER" + Case "WRITER" Kontext "DocumentWriter" - Case "MASTERDOCUMENT" + Case "MASTERDOCUMENT" Kontext "DocumentMasterDoc" - Case "HTML" + Case "HTML" Kontext "DocumentWriterWeb" - Case "IMPRESS" + Case "IMPRESS" Kontext "DocumentImpress" - Case "DRAW" + Case "DRAW" Kontext "DocumentDraw" - Case "MATH" + Case "MATH" Kontext "DocumentMath" - Case "CALC" + Case "CALC" Kontext "DocumentCalc" end select @@ -156,28 +129,28 @@ end sub ' ----------------------------------------------------------------------- -function wBlindtextEinfuegen() as boolean +function wBlindtextEinfuegen() as boolean '/// This functions inserts a Dummytext and returns true if it was inserted Dim BlindText as string, bTemp as boolean bTemp = False select case iSprache - case 01 : BlindText = "DT<F3>" - case 03 : BlindText = "TE<F3>" - case 07 : BlindText = "DT<F3>" - case 31 : BlindText = "BT<F3>" - case 34 : BlindText = "TE<F3>" - case 33 : BlindText = "TEX<F3>" - case 39 : BlindText = "TE<F3>" - case 45 : BlindText = "ET<F3>" - case 46 : BlindText = "BT<F3>" - case 48 : BlindText = "TW<F3>" - case 49 : BlindText = "BT<F3>" - case 55 : BlindText = "TP<F3>" - case 81 : BlindText = "DT<F3>" - case 82 : BlindText = "BT<F3>" - case 86 : BlindText = "DT<F3>" - case 88 : BlindText = "BT<F3>" - case else : QAErrorlog "No Shortcut for Dummytext available!" + case 01 : BlindText = "DT<F3>" + case 03 : BlindText = "TE<F3>" + case 07 : BlindText = "DT<F3>" + case 31 : BlindText = "BT<F3>" + case 34 : BlindText = "TE<F3>" + case 33 : BlindText = "TEX<F3>" + case 39 : BlindText = "TE<F3>" + case 45 : BlindText = "ET<F3>" + case 46 : BlindText = "BT<F3>" + case 48 : BlindText = "TW<F3>" + case 49 : BlindText = "BT<F3>" + case 55 : BlindText = "TP<F3>" + case 81 : BlindText = "DT<F3>" + case 82 : BlindText = "BT<F3>" + case 86 : BlindText = "DT<F3>" + case 88 : BlindText = "BT<F3>" + case else : QAErrorlog "No Shortcut for Dummytext available!" end select if BlindText > "" then @@ -188,7 +161,7 @@ function wBlindtextEinfuegen() as boolean Warnlog Active.Gettext Active.Ok else - bTemp = True + bTemp = True end if else bTemp = True @@ -209,11 +182,11 @@ sub wZeichenobjektEinfuegen ( Objekt$, xStart%, yStart%, xEnde%, yEnde%, optiona Objekt = UCase( Objekt ) select case Objekt - case "RECHTECK" : Rechteck.Click - case "LINIE" : Linie.Click - case "ELLIPSE" : Ellipse.Click - case "TEXT" : Textobjekt.Click - case "VTEXT" : + case "RECHTECK" : Rechteck.Click + case "LINIE" : Linie.Click + case "ELLIPSE" : Ellipse.Click + case "TEXT" : Textobjekt.Click + case "VTEXT" : try VerticalText.Click catch @@ -221,9 +194,9 @@ sub wZeichenobjektEinfuegen ( Objekt$, xStart%, yStart%, xEnde%, yEnde%, optiona Warnlog "Unable to insert Vertical Text! Asian Support in Options activated ?" end if endcatch - case "LAUFTEXT" : Lauftext.Click - case "LEGENDE" : Legende.Click - case "VLEGENDE" : + case "LAUFTEXT" : Lauftext.Click + case "LEGENDE" : Legende.Click + case "VLEGENDE" : try VerticalCallout.Click catch @@ -232,49 +205,49 @@ sub wZeichenobjektEinfuegen ( Objekt$, xStart%, yStart%, xEnde%, yEnde%, optiona end select Select Case gApplication - Case "WRITER" - Kontext "DocumentWriter" - DocumentWriter.MouseDown xStart%, yStart% - DocumentWriter.MouseMove xEnde%, yEnde% - DocumentWriter.MouseUp xEnde%, yEnde% - wait 100 - Kontext "Drawbar" - if IsMissing(sCloseToolbar) then - Drawbar.Close - else - if sCloseToolbar = true then Drawbar.Close - end if - if Objekt <> "TEXT" and Objekt <> "VTEXT" then - Kontext "DocumentWriter" - Call gMouseClick (1, 1) - wait 100 - end if - - Case "MASTERDOCUMENT" - Kontext "DocumentMasterDoc" - DocumentMasterDoc.MouseDown xStart%, yStart% - DocumentMasterDoc.MouseMove xEnde%, yEnde% - DocumentMasterDoc.MouseUp xEnde%, yEnde% - wait 100 - Kontext "Drawbar" - if IsMissing(sCloseToolbar) then - Drawbar.Close - else - if sCloseToolbar = true then Drawbar.Close - end if - if Objekt <> "TEXT" and Objekt <> "VTEXT" then - Kontext "DocumentMasterDoc" - Call gMouseClick (1, 1) - wait 100 - end if + Case "WRITER" + Kontext "DocumentWriter" + DocumentWriter.MouseDown xStart%, yStart% + DocumentWriter.MouseMove xEnde%, yEnde% + DocumentWriter.MouseUp xEnde%, yEnde% + wait 100 + Kontext "Drawbar" + if IsMissing(sCloseToolbar) then + Drawbar.Close + else + if sCloseToolbar = true then Drawbar.Close + end if + if Objekt <> "TEXT" and Objekt <> "VTEXT" then + Kontext "DocumentWriter" + Call gMouseClick (1, 1) + wait 100 + end if + + Case "MASTERDOCUMENT" + Kontext "DocumentMasterDoc" + DocumentMasterDoc.MouseDown xStart%, yStart% + DocumentMasterDoc.MouseMove xEnde%, yEnde% + DocumentMasterDoc.MouseUp xEnde%, yEnde% + wait 100 + Kontext "Drawbar" + if IsMissing(sCloseToolbar) then + Drawbar.Close + else + if sCloseToolbar = true then Drawbar.Close + end if + if Objekt <> "TEXT" and Objekt <> "VTEXT" then + Kontext "DocumentMasterDoc" + Call gMouseClick (1, 1) + wait 100 + end if end select end sub ' ----------------------------------------------------------------------- sub wObjektSelektieren ( xStart%, yStart%, xEnde%, yEnde% ) -' Call gMouseClick(90,90) - Call hToolbarSelect("DRAWING",true) + ' Call gMouseClick(90,90) + Call hToolbarSelect("DRAWING",true) Auswahl.Click Select Case gApplication Case "WRITER" @@ -302,20 +275,20 @@ sub wFindSelectObjectBelow ( xStart%, yStart%, xEnde%, yEnde% ) DocumentWriter.MouseDown xStart%, yStart% DocumentWriter.MouseUp xStart%, yStart% - do while (Mousepointer<>"Normalpointer") + do while (Mousepointer<>"Normalpointer") DocumentWriter.MouseMove xEnde%, yEnde% DocumentWriter.MouseDown xEnde%, yEnde% DocumentWriter.MouseUp - loop - - i = 1 - while ((getMouseStyle = 0) AND (i<80)) - sleep 1 - inc (i) - printlog getMouseStyle - if (getMouseStyle <> 0) then i = 80 - wend - + loop + + i = 1 + while ((getMouseStyle = 0) AND (i<80)) + sleep 1 + inc (i) + printlog getMouseStyle + if (getMouseStyle <> 0) then i = 80 + wend + Case "MASTERDOCUMENT" Kontext "DocumentMasterDoc" DocumentMasterDoc.MouseDown xStart%, yStart% @@ -330,7 +303,7 @@ end sub function WortAusWoerterbuchLoeschen ( Aufnahme$ ) as Boolean Dim i as integer : Dim AnzahlBuecher as string Dim j as integer - + ToolsOptions Call hToolsOptions("LanguageSettings","WritingAids") WortAusWoerterbuchLoeschen = FALSE @@ -356,11 +329,11 @@ function WortAusWoerterbuchLoeschen ( Aufnahme$ ) as Boolean WortAusWoerterbuchLoeschen = TRUE i = AnzahlBuecher + 1 end if - next i - if WortAusWoerterbuchLoeschen = FALSE then Warnlog "The added word has not been found in modules" - BenutzerwoerterbuchBearbeiten.Close - Kontext "ExtrasOptionenDlg" - ExtrasOptionenDlg.OK + next i + if WortAusWoerterbuchLoeschen = FALSE then Warnlog "The added word has not been found in modules" + BenutzerwoerterbuchBearbeiten.Close + Kontext "ExtrasOptionenDlg" + ExtrasOptionenDlg.OK end function ' ----------------------------------------------------------------------- @@ -384,27 +357,27 @@ function wIgnorierenlisteLoeschen AlleBuecher = Buch.GetItemCount for i = 1 to AlleBuecher Buch.Select i - if Left$(Buch.GetSelText,13)="IgnoreAllList" then - sleep 2 - for j = 1 to 100 - if Loeschen.IsEnabled then - Loeschen.Click - sleep 1 - else - Kontext "Active" - if Active.Exists then - Warnlog Active.Gettext - Active.Ok - end if - Kontext "BenutzerwoerterbuchBearbeiten" - BenutzerwoerterbuchBearbeiten.Cancel - sleep 1 - j=101 + if Left$(Buch.GetSelText,13)="IgnoreAllList" then + sleep 2 + for j = 1 to 100 + if Loeschen.IsEnabled then + Loeschen.Click + sleep 1 + else + Kontext "Active" + if Active.Exists then + Warnlog Active.Gettext + Active.Ok end if - wait 500 - next j - i=AlleBuecher + 1 - end if + Kontext "BenutzerwoerterbuchBearbeiten" + BenutzerwoerterbuchBearbeiten.Cancel + sleep 1 + j=101 + end if + wait 500 + next j + i=AlleBuecher + 1 + end if next i Kontext "ExtrasOptionenDlg" ExtrasOptionenDlg.OK @@ -415,7 +388,7 @@ end function sub hLeisteUmschalten(welche as integer) Sleep 2 Select Case welche - case 1: + case 1: try ' Textobjectbar Kontext "NumObjectbar" NumObjectbar.SetNextToolbox @@ -433,39 +406,39 @@ sub hLeisteUmschalten(welche as integer) Sleep 1 Fett.Click catch - Warnlog "Error on switching the function bar!" + Warnlog "Error on switching the function bar!" endcatch Sleep 1 - case 2: + case 2: Select Case gApplication - ' Numbering-Objectbar - Case "HTML" - Kontext "TextObjectbar" - try - TextObjectbar.SetNextToolbox - catch - endcatch - - Case else - Kontext "TextObjectbar" - try - TextObjectbar.SetNextToolbox - catch - endcatch - end select - Sleep 1 - Kontext "NumObjectbar" + ' Numbering-Objectbar + Case "HTML" + Kontext "TextObjectbar" try - Hinunterstufen.Click + TextObjectbar.SetNextToolbox catch - try - Hochstufen.Click - catch - Warnlog "Error on switching the function bar!" - endcatch endcatch - Sleep 2 + + Case else + Kontext "TextObjectbar" + try + TextObjectbar.SetNextToolbox + catch + endcatch + end select + Sleep 1 + Kontext "NumObjectbar" + try + Hinunterstufen.Click + catch + try + Hochstufen.Click + catch + Warnlog "Error on switching the function bar!" + endcatch + endcatch + Sleep 2 end select end sub @@ -473,7 +446,7 @@ end sub sub hGrafikleisteUmschalten(welche as integer) Select Case welche - case 1: + case 1: try Kontext "GraphicObjectbar" Wait 500 @@ -483,7 +456,7 @@ sub hGrafikleisteUmschalten(welche as integer) Kontext "FrameObjectbar" Sleep 1 - case 2: + case 2: try Kontext "FrameObjectbar" Wait 500 @@ -508,18 +481,18 @@ sub wEinfuegenHyperlink(welcheSeite as integer) Sleep 1 Select case welcheSeite - case 1: + case 1: Kontext "TabHyperlinkInternet" - case 2: + case 2: Auswahl.TypeKeys "<Down>",1 Kontext "TabHyperlinkMailUndNews" - case 3: + case 3: Auswahl.TypeKeys "<Down>",2 Kontext "TabHyperlinkDokument" - case 4: + case 4: Auswahl.TypeKeys "<Down>",3 Kontext "TabHyperlinkNeuesDokument" @@ -535,38 +508,38 @@ sub wNavigatorAuswahl(Gruppe as integer, Eintrag as integer,optional LeaveFocus If IsMissing(LeaveFocus) = True then LeaveFocus = False Select Case Ucase(gApplication) - Case "CALC" - Kontext "NavigatorCalc" - if NavigatorCalc.NotExists then ViewNavigator - wait 500 - Kontext "NavigatorCalc" - MinEntrys = 8 - Case "WRITER", "HTML", "HTML" - Kontext "NavigatorWriter" - if NavigatorWriter.NotExists then ViewNavigator - wait 500 + Case "CALC" + Kontext "NavigatorCalc" + if NavigatorCalc.NotExists then ViewNavigator + wait 500 + Kontext "NavigatorCalc" + MinEntrys = 8 + Case "WRITER", "HTML", "HTML" + Kontext "NavigatorWriter" + if NavigatorWriter.NotExists then ViewNavigator + wait 500 + Kontext "NavigatorWriter" + MinEntrys = 11 + Case "MASTERDOCUMENT" + Kontext "NavigatorGlobalDoc" + if NavigatorGlobalDoc.NotExists then ViewNavigator + wait 500 + Kontext "NavigatorGlobalDoc" + if Liste.IsVisible then + Kontext "GlobaldokumentToolbox" + Umschalten.Click Kontext "NavigatorWriter" - MinEntrys = 11 - Case "MASTERDOCUMENT" - Kontext "NavigatorGlobalDoc" - if NavigatorGlobalDoc.NotExists then ViewNavigator - wait 500 - Kontext "NavigatorGlobalDoc" - if Liste.IsVisible then - Kontext "GlobaldokumentToolbox" - Umschalten.Click - Kontext "NavigatorWriter" - end if - MinEntrys = 11 - Case Else ' for all others!!!! - Warnlog "Not supported application!" - exit sub + end if + MinEntrys = 11 + Case Else ' for all others!!!! + Warnlog "Not supported application!" + exit sub end select - Sleep 2 + Sleep 2 Select Case Ucase(gApplication) - Case "CALC" + Case "CALC" if (Liste.GetItemCount < MinEntrys) then Umschalten.Click if Liste.GetItemCount >MinEntrys then For j= 1 to 9 @@ -577,13 +550,13 @@ sub wNavigatorAuswahl(Gruppe as integer, Eintrag as integer,optional LeaveFocus Liste.Select Gruppe if Eintrag >0 then - WelcherEintrag = Gruppe + Eintrag - Liste.TypeKeys "+" - Liste.Select WelcherEintrag - Liste.TypeKeys "<Return>" + WelcherEintrag = Gruppe + Eintrag + Liste.TypeKeys "+" + Liste.Select WelcherEintrag + Liste.TypeKeys "<Return>" end if - Case "WRITER","HTML", "HTML" + Case "WRITER","HTML", "HTML" if (Auswahlliste.GetItemCount < MinEntrys) then try Inhaltsansicht.Click @@ -605,15 +578,15 @@ sub wNavigatorAuswahl(Gruppe as integer, Eintrag as integer,optional LeaveFocus Auswahlliste.TypeKeys "<Return>" end if - Case "MASTERDOCUMENT" + Case "MASTERDOCUMENT" if Liste.IsVisible = True then Umschalten.Click end if if Auswahlliste.GetItemCount >MinEntrys then - For j= 1 to 12 - Auswahlliste.Select j - Auswahlliste.TypeKeys "-" + For j= 1 to 12 + Auswahlliste.Select j + Auswahlliste.TypeKeys "-" next j end if @@ -628,14 +601,14 @@ sub wNavigatorAuswahl(Gruppe as integer, Eintrag as integer,optional LeaveFocus if LeaveFocus = False then Select Case Ucase(gApplication) - Case "CALC" - Kontext "DocumentCalc" - Case "HTML", "HTML" - Kontext "DocumentWriter" - Case "WRITER" - Kontext "DocumentWriter" - Case "MASTERDOCUMENT" - Kontext "DocumentMasterDoc" + Case "CALC" + Kontext "DocumentCalc" + Case "HTML", "HTML" + Kontext "DocumentWriter" + Case "WRITER" + Kontext "DocumentWriter" + Case "MASTERDOCUMENT" + Kontext "DocumentMasterDoc" end select end if end sub @@ -645,11 +618,10 @@ end sub function wNavigatorClose '/// Close Navigator Kontext "Navigator" - Sleep 3 if Navigator.Exists(2) then Navigator.Close + WaitSlot() end if - Sleep 3 end function ' --------------------------------------------------------------- @@ -720,12 +692,12 @@ end sub sub wMarkObjects(delete as boolean) ' The drawing objects has to be selected before deleting them Select Case gApplication - Case "WRITER" - Kontext "DocumentWriter" - Case "MASTERDOCUMENT" - Kontext "DocumentMasterDoc" - Case "HTML" - Kontext "DocumentWriterWeb" + Case "WRITER" + Kontext "DocumentWriter" + Case "MASTERDOCUMENT" + Kontext "DocumentMasterDoc" + Case "HTML" + Kontext "DocumentWriterWeb" end select Call gMouseClick 50,50 @@ -733,14 +705,14 @@ sub wMarkObjects(delete as boolean) Call wTypeKeys "<Backspace>",5 Call gMouseClick 50,50 Select Case gApplication - Case "WRITER" - DocumentWriter.TypeKeys "<Shift F4>" + Case "WRITER" + DocumentWriter.TypeKeys "<Shift F4>" - Case "MASTERDOCUMENT" - DocumentMasterDoc.TypeKeys "<Shift F4>" + Case "MASTERDOCUMENT" + DocumentMasterDoc.TypeKeys "<Shift F4>" - Case "HTML" - DocumentWriterWeb.TypeKeys "<Shift F4>" + Case "HTML" + DocumentWriterWeb.TypeKeys "<Shift F4>" end select Sleep 1 @@ -757,10 +729,10 @@ sub hExportUmstellung ( WasDenn as Boolean ) ToolsOptions Call hToolsOptions("LoadSave","HTMLCompatibility") if WasDenn = TRUE then - 'Select Case iSprache - ' Case 81 : Export.Select "Microsoft Internet Explorer 4.0" - ' Case else : Export.Select "MS Internet Explorer 4.0" - 'end select + 'Select Case iSprache + ' Case 81 : Export.Select "Microsoft Internet Explorer 4.0" + ' Case else : Export.Select "MS Internet Explorer 4.0" + 'end select try Export.Select "Microsoft Internet Explorer" catch @@ -792,17 +764,17 @@ sub wSetMacroSecurityLevel ( wLevel as integer ) as boolean Kontext "TabSecurityLevel" Select Case wLevel - Case 1: VeryHigh.Check - Case 2: High.Check - Case 3: Medium.Check - Case 4: Low.Check - Case else: Warnlog "Wrong level number entered. Unknown" - goto EarlyExit + Case 1: VeryHigh.Check + Case 2: High.Check + Case 3: Medium.Check + Case 4: Low.Check + Case else: Warnlog "Wrong level number entered. Unknown" + goto EarlyExit end select TabSecurityLevel.Ok wSetMacroSecurityLevel = True -EarlyExit: + EarlyExit: Kontext "ExtrasOptionenDlg" ExtrasOptionenDlg.OK @@ -843,10 +815,10 @@ sub wRectangleToClipboard Call hCloseDocument gApplication = tempApplication Select Case gApplication - Case "WRITER" - Kontext "DocumentWriter" - Case "MASTERDOCUMENT" - Kontext "DocumentMasterDoc" + Case "WRITER" + Kontext "DocumentWriter" + Case "MASTERDOCUMENT" + Kontext "DocumentMasterDoc" end select Call gMouseClick 10,10 end sub @@ -874,9 +846,9 @@ function MachMirDenEintrag(WoDenn as integer,WieLang as integer, optional Welche Kontext "VerzeichniseintragEinfuegen" if Welches > "" then Select case Welches - case "Inhalt" : Verzeichnis.Select 1 - case "Stich" : Verzeichnis.Select 2 - case "Benutz" : Verzeichnis.Select 3 + case "Inhalt" : Verzeichnis.Select 1 + case "Stich" : Verzeichnis.Select 2 + case "Benutz" : Verzeichnis.Select 3 end select end if Verzeichniseintrag.TypeKeys "<Up>" @@ -887,12 +859,12 @@ end function ' ----------------------------------------------------------------------- sub wOptionenUndo ( sOption$ ) - Dim i as integer, sTempSeparator as string, sTempUnit as integer + Dim i as integer, sTempSeparator as string, sTempUnit as integer - Printlog " - Initial state" + Printlog " - Initial state" Call hNewDocument - + Kontext "ExtrasOptionenDlg" if Not ExtrasOptionenDlg.Exists then ToolsOptions @@ -913,16 +885,16 @@ sub wOptionenUndo ( sOption$ ) Diagramme.Uncheck ' Settings Select Case sTempUnit - Case 1: 'Millimeter - Tabulatorenabstand.Settext "12" & sTempSeparator & "51" - Case 2: ' Centimeter - Tabulatorenabstand.Settext "1" & sTempSeparator & "25" - Case 3: ' Inch - Tabulatorenabstand.Settext "0" & sTempSeparator & "49" - Case 4: ' Pica - Tabulatorenabstand.Settext "2" & sTempSeparator & "95" - Case 5: ' Point - Tabulatorenabstand.Settext "35" & sTempSeparator & "5" + Case 1: 'Millimeter + Tabulatorenabstand.Settext "12" & sTempSeparator & "51" + Case 2: ' Centimeter + Tabulatorenabstand.Settext "1" & sTempSeparator & "25" + Case 3: ' Inch + Tabulatorenabstand.Settext "0" & sTempSeparator & "49" + Case 4: ' Pica + Tabulatorenabstand.Settext "2" & sTempSeparator & "95" + Case 5: ' Point + Tabulatorenabstand.Settext "35" & sTempSeparator & "5" end select end if @@ -973,21 +945,21 @@ sub wOptionenUndo ( sOption$ ) ' Resolution AchsenSynchronisieren.Uncheck Select Case sTempUnit - Case 1: 'Millimeter - RasterAufloesungXAchse.SetText "10" & sTempSeparator & "00" - RasterAufloesungYAchse.SetText "10" & sTempSeparator & "00" - Case 2: ' Centimeter - RasterAufloesungXAchse.SetText "1" & sTempSeparator & "00" - RasterAufloesungYAchse.SetText "1" & sTempSeparator & "00" - Case 3: ' Inch - RasterAufloesungXAchse.SetText "0" & sTempSeparator & "39" - RasterAufloesungYAchse.SetText "0" & sTempSeparator & "39" - Case 4: ' Pica - RasterAufloesungXAchse.SetText "2" & sTempSeparator & "36" - RasterAufloesungYAchse.SetText "2" & sTempSeparator & "36" - Case 5: ' Point - RasterAufloesungXAchse.SetText "28" & sTempSeparator & "3" - RasterAufloesungYAchse.SetText "28" & sTempSeparator & "3" + Case 1: 'Millimeter + RasterAufloesungXAchse.SetText "10" & sTempSeparator & "00" + RasterAufloesungYAchse.SetText "10" & sTempSeparator & "00" + Case 2: ' Centimeter + RasterAufloesungXAchse.SetText "1" & sTempSeparator & "00" + RasterAufloesungYAchse.SetText "1" & sTempSeparator & "00" + Case 3: ' Inch + RasterAufloesungXAchse.SetText "0" & sTempSeparator & "39" + RasterAufloesungYAchse.SetText "0" & sTempSeparator & "39" + Case 4: ' Pica + RasterAufloesungXAchse.SetText "2" & sTempSeparator & "36" + RasterAufloesungYAchse.SetText "2" & sTempSeparator & "36" + Case 5: ' Point + RasterAufloesungXAchse.SetText "28" & sTempSeparator & "3" + RasterAufloesungYAchse.SetText "28" & sTempSeparator & "3" end select RasterUnterteilungXAchse.ToMin RasterUnterteilungXAchse.More 1 @@ -1037,31 +1009,31 @@ sub wOptionenUndo ( sOption$ ) AutomatischeZahlenerkennung.UnCheck ' Keyboard handling Select Case sTempUnit - Case 1: 'Millimeter - VerschiebenZeile.SetText "4" & sTempSeparator & "99" - VerschiebenSpalte.SetText "4" & sTempSeparator & "99" - EinfuegenZeile.SetText "4" & sTempSeparator & "99" - EinfuegenSpalte.SetText "24" & sTempSeparator & "99" - Case 2: ' Centimeter - VerschiebenZeile.SetText "0" & sTempSeparator & "50" - VerschiebenSpalte.SetText "0" & sTempSeparator & "50" - EinfuegenZeile.SetText "0" & sTempSeparator & "50" - EinfuegenSpalte.SetText "2" & sTempSeparator & "50" - Case 3: ' Inch - VerschiebenZeile.SetText "0" & sTempSeparator & "20" - VerschiebenSpalte.SetText "0" & sTempSeparator & "20" - EinfuegenZeile.SetText "0" & sTempSeparator & "20" - EinfuegenSpalte.SetText "0" & sTempSeparator & "98" - Case 4: ' Pica - VerschiebenZeile.SetText "1" & sTempSeparator & "18" - VerschiebenSpalte.SetText "1" & sTempSeparator & "18" - EinfuegenZeile.SetText "1" & sTempSeparator & "18" - EinfuegenSpalte.SetText "5" & sTempSeparator & "90" - Case 5: ' Point - VerschiebenZeile.SetText "14" & sTempSeparator & "2" - VerschiebenSpalte.SetText "14" & sTempSeparator & "2" - EinfuegenZeile.SetText "14" & sTempSeparator & "2" - EinfuegenSpalte.SetText "70" & sTempSeparator & "9" + Case 1: 'Millimeter + VerschiebenZeile.SetText "4" & sTempSeparator & "99" + VerschiebenSpalte.SetText "4" & sTempSeparator & "99" + EinfuegenZeile.SetText "4" & sTempSeparator & "99" + EinfuegenSpalte.SetText "24" & sTempSeparator & "99" + Case 2: ' Centimeter + VerschiebenZeile.SetText "0" & sTempSeparator & "50" + VerschiebenSpalte.SetText "0" & sTempSeparator & "50" + EinfuegenZeile.SetText "0" & sTempSeparator & "50" + EinfuegenSpalte.SetText "2" & sTempSeparator & "50" + Case 3: ' Inch + VerschiebenZeile.SetText "0" & sTempSeparator & "20" + VerschiebenSpalte.SetText "0" & sTempSeparator & "20" + EinfuegenZeile.SetText "0" & sTempSeparator & "20" + EinfuegenSpalte.SetText "0" & sTempSeparator & "98" + Case 4: ' Pica + VerschiebenZeile.SetText "1" & sTempSeparator & "18" + VerschiebenSpalte.SetText "1" & sTempSeparator & "18" + EinfuegenZeile.SetText "1" & sTempSeparator & "18" + EinfuegenSpalte.SetText "5" & sTempSeparator & "90" + Case 5: ' Point + VerschiebenZeile.SetText "14" & sTempSeparator & "2" + VerschiebenSpalte.SetText "14" & sTempSeparator & "2" + EinfuegenZeile.SetText "14" & sTempSeparator & "2" + EinfuegenSpalte.SetText "70" & sTempSeparator & "9" end select Sleep 1 ' Behaviour of rows/columns @@ -1084,11 +1056,11 @@ sub wOptionenUndo ( sOption$ ) if sOption$ = "AutoCaption" OR sOption$ = "Alle" then Call hToolsOptions("WRITER","Autocaption") - for i = 1 to ObjectList.GetItemCount - ObjectList.Select i - ObjectList.UnCheck - next i - end if + for i = 1 to ObjectList.GetItemCount + ObjectList.Select i + ObjectList.UnCheck + next i + end if Kontext "ExtrasOptionenDlg" ExtrasOptionenDlg.OK @@ -1124,16 +1096,16 @@ function CheckForFilters() as boolean else Warnlog "- Though graphic is selected, the filter button in objectbar is disabled!" Select Case gApplication - Case "WRITER" - Kontext "DocumentWriter" - DocumentWriter.MouseDoubleClick 10,10 - DocumentWriter.MouseDown 50,20 - DocumentWriter.MouseUp 50,20 - case else - Kontext "DocumentMasterDoc" - DocumentMasterDoc.MouseDoubleClick 10,10 - DocumentMasterDoc.MouseDown 50,20 - DocumentMasterDoc.MouseUp 50,20 + Case "WRITER" + Kontext "DocumentWriter" + DocumentWriter.MouseDoubleClick 10,10 + DocumentWriter.MouseDown 50,20 + DocumentWriter.MouseUp 50,20 + case else + Kontext "DocumentMasterDoc" + DocumentMasterDoc.MouseDoubleClick 10,10 + DocumentMasterDoc.MouseDown 50,20 + DocumentMasterDoc.MouseUp 50,20 end select Wait 500 Kontext "GraphicObjectbar" @@ -1170,20 +1142,20 @@ end sub ' ----------------------------------------------------------------------- function wStyleCreate( sStyleName as string, sType as string, optional NotFromSelection as boolean ) as boolean - '/// This function creates a new style through stylist + '/// This function creates a new style through stylist - Kontext "Stylist" - If Not Stylist.Exists then FormatStylist + Kontext "Stylist" + If Not Stylist.Exists then FormatStylist - select case sType - case "Paragraph": Absatzvorlagen.Click - case "Character": Zeichenvorlagen.Click - case "Frame": Rahmenvorlagen.Click - case "Page": Seitenvorlagen.Click - case "Numbering": Numerierungsvorlagen.Click + select case sType + case "Paragraph": Absatzvorlagen.Click + case "Character": Zeichenvorlagen.Click + case "Frame": Rahmenvorlagen.Click + case "Page": Seitenvorlagen.Click + case "Numbering": Numerierungsvorlagen.Click end select - if IsMissing ( NotFromSelection ) then + if IsMissing ( NotFromSelection ) then wait 500 AusSelektion.OpenMenu Sleep 1 @@ -1199,7 +1171,7 @@ function wStyleCreate( sStyleName as string, sType as string, optional NotFromSe Vorlagenliste.TypeKeys "<Mod1 Home>" Vorlagenliste.OpenContextMenu Sleep 1 - Call hMenuSelectNr(1) + Call hMenuSelectNr(1) wait 500 Kontext Active.SetPage TabVerwalten @@ -1211,105 +1183,105 @@ function wStyleCreate( sStyleName as string, sType as string, optional NotFromSe end if end if - Kontext "Stylist" - + Kontext "Stylist" + if wStyleSelect ( sStyleName, sType ) = true then wStyleCreate = False else wStyleCreate = True end if - Stylist.Close + Stylist.Close end function ' ----------------------------------------------------------------------- function wStyleSelect( sStyleName as string, optional sType as string ) as boolean - '/// This function selects a given style in Stylist - '/// function leaves Stylist opened + '/// This function selects a given style in Stylist + '/// function leaves Stylist opened - Dim i as integer + Dim i as integer - Kontext "Stylist" - If Not Stylist.Exists then FormatStylist + Kontext "Stylist" + If Not Stylist.Exists then FormatStylist wait 500 Gruppenliste.Select 2 '-> 'All Styles' has to be selected wait 500 if IsMissing (sType) then - Absatzvorlagen.Click + Absatzvorlagen.Click else select case sType - case "Paragraph": Absatzvorlagen.Click - case "Character": Zeichenvorlagen.Click - case "Frame": Rahmenvorlagen.Click - case "Page": Seitenvorlagen.Click - case "Numbering": Numerierungsvorlagen.Click + case "Paragraph": Absatzvorlagen.Click + case "Character": Zeichenvorlagen.Click + case "Frame": Rahmenvorlagen.Click + case "Page": Seitenvorlagen.Click + case "Numbering": Numerierungsvorlagen.Click end select end if - Sleep 1 + Sleep 1 Vorlagenliste.Select 1 wait 500 - if Vorlagenliste.GetSelText <> sStyleName then - For i = 1 to 200 - if Vorlagenliste.GetSelText = sStyleName then - wStyleSelect = true - i = 202 + if Vorlagenliste.GetSelText <> sStyleName then + For i = 1 to 200 + if Vorlagenliste.GetSelText = sStyleName then + wStyleSelect = true + i = 202 else Vorlagenliste.TypeKeys "<Down>" end if - next i - if i = 202 then wStyleSelect = true - else - wStyleSelect = true - end if + next i + if i = 202 then wStyleSelect = true + else + wStyleSelect = true + end if end function ' ----------------------------------------------------------------------- function wStyleDelete ( sStyleName as string, sType as string ) as boolean - '/// This function selects a given style in Stylist - '/// function leaves Stylist opened + '/// This function selects a given style in Stylist + '/// function leaves Stylist opened - Dim i as integer + Dim i as integer - Kontext "Stylist" - If Not Stylist.Exists then FormatStylist + Kontext "Stylist" + If Not Stylist.Exists then FormatStylist - select case sType - case "Paragraph": Absatzvorlagen.Click - case "Character": Zeichenvorlagen.Click - case "Frame": Rahmenvorlagen.Click - case "Page": Seitenvorlagen.Click - case "Numbering": Numerierungsvorlagen.Click - end select + select case sType + case "Paragraph": Absatzvorlagen.Click + case "Character": Zeichenvorlagen.Click + case "Frame": Rahmenvorlagen.Click + case "Page": Seitenvorlagen.Click + case "Numbering": Numerierungsvorlagen.Click + end select - Vorlagenliste.TypeKeys "<Mod1 End>" + Vorlagenliste.TypeKeys "<Mod1 End>" Vorlagenliste.TypeKeys "<Mod1 Home>" - if Vorlagenliste.GetSelText <> sStyleName then - For i = 1 to 200 - if Vorlagenliste.GetSelText = sStyleName then + if Vorlagenliste.GetSelText <> sStyleName then + For i = 1 to 200 + if Vorlagenliste.GetSelText = sStyleName then Vorlagenliste.OpenContextMenu Sleep 1 - Call hMenuSelectNr(3) + Call hMenuSelectNr(3) wait 500 Kontext "Active" if Active.Exists then if Active.GetRT = 304 then Active.Yes - i = 203 + i = 203 end if end if - else + else Vorlagenliste.TypeKeys "<Down>" end if - next i - if i = 204 then wStyleDelete = true - else + next i + if i = 204 then wStyleDelete = true + else Vorlagenliste.OpenContextMenu Sleep 1 - Call hMenuSelectNr(3) + Call hMenuSelectNr(3) wait 500 Kontext "Active" if Active.Exists then @@ -1318,84 +1290,84 @@ function wStyleDelete ( sStyleName as string, sType as string ) as boolean end if end if wStyleDelete = true - end if + end if end function ' ----------------------------------------------------------------------- function wStyleSet( sStyleName as string, optional sType as string ) as boolean - '/// This function sets a given style in Stylist - '/// function leaves Stylist opened + '/// This function sets a given style in Stylist + '/// function leaves Stylist opened - Dim i as integer + Dim i as integer - Kontext "Stylist" - If Not Stylist.Exists then FormatStylist + Kontext "Stylist" + If Not Stylist.Exists then FormatStylist wait 500 Gruppenliste.Select 2 '-> 'All Styles' has to be selected wait 500 if IsMissing (sType) then - Absatzvorlagen.Click + Absatzvorlagen.Click else select case sType - case "Paragraph": Absatzvorlagen.Click - case "Character": Zeichenvorlagen.Click - case "Frame": Rahmenvorlagen.Click - case "Page": Seitenvorlagen.Click - case "Numbering": Numerierungsvorlagen.Click + case "Paragraph": Absatzvorlagen.Click + case "Character": Zeichenvorlagen.Click + case "Frame": Rahmenvorlagen.Click + case "Page": Seitenvorlagen.Click + case "Numbering": Numerierungsvorlagen.Click end select end if - Sleep 1 + Sleep 1 Vorlagenliste.Select 1 wait 500 - if Vorlagenliste.GetSelText <> sStyleName then - For i = 1 to 200 - if Vorlagenliste.GetSelText = sStyleName then - wStyleSet = true + if Vorlagenliste.GetSelText <> sStyleName then + For i = 1 to 200 + if Vorlagenliste.GetSelText = sStyleName then + wStyleSet = true Vorlagenliste.TypeKeys "<Return>" - exit for + exit for else Vorlagenliste.TypeKeys "<Down>" end if - next i - else - wStyleSet = true - end if + next i + else + wStyleSet = true + end if end function ' ----------------------------------------------------------------------- function wStyleGet( sStyleName as string, optional sType as string ) as boolean - '/// This function checks if a given style is selected in Stylist - '/// function leaves Stylist opened + '/// This function checks if a given style is selected in Stylist + '/// function leaves Stylist opened - Dim i as integer + Dim i as integer - Kontext "Stylist" - If Not Stylist.Exists then FormatStylist + Kontext "Stylist" + If Not Stylist.Exists then FormatStylist wait 500 Gruppenliste.Select 2 '-> 'All Styles' has to be selected wait 500 if IsMissing (sType) then - Absatzvorlagen.Click + Absatzvorlagen.Click else select case sType - case "Paragraph": Absatzvorlagen.Click - case "Character": Zeichenvorlagen.Click - case "Frame": Rahmenvorlagen.Click - case "Page": Seitenvorlagen.Click - case "Numbering": Numerierungsvorlagen.Click + case "Paragraph": Absatzvorlagen.Click + case "Character": Zeichenvorlagen.Click + case "Frame": Rahmenvorlagen.Click + case "Page": Seitenvorlagen.Click + case "Numbering": Numerierungsvorlagen.Click end select end if wait 500 - if Vorlagenliste.GetSelText = sStyleName then - wStyleGet = true - end if + if Vorlagenliste.GetSelText = sStyleName then + wStyleGet = true + end if end function diff --git a/testautomation/writer/tools/includes/w_tools_autocorrection.inc b/testautomation/writer/tools/includes/w_tools_autocorrection.inc index 9dec2f0108ce..c9621a1868b6 100644 --- a/testautomation/writer/tools/includes/w_tools_autocorrection.inc +++ b/testautomation/writer/tools/includes/w_tools_autocorrection.inc @@ -1,7 +1,7 @@ 'encoding UTF-8 Do not remove or change this line! '************************************************************************** '* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. -'* +'* '* Copyright 2008 by Sun Microsystems, Inc. '* '* OpenOffice.org - a multi-platform office productivity suite @@ -49,36 +49,36 @@ function fAutocorrectOptions(Options as String) Kontext Active.Setpage TabOptionenAutokorrektur Kontext "TabOptionenAutokorrektur" - + Einstellungen.TypeKeys "<Home>" Select case Options - case "UseReplacementTable" : wait 500 - case "CorrectTWoINitialCApitals" : Einstellungen.TypeKeys "<Down>" - case "CapitalizeFirstLetter" : Einstellungen.TypeKeys "<Down>",2 - case "AutomaticBoldAndUnderline" : Einstellungen.TypeKeys "<Down>",3 - case "URLRecognition" : Einstellungen.TypeKeys "<Down>",4 - case "Replace1st" : Einstellungen.TypeKeys "<Down>",5 - case "Replace1/2" : Einstellungen.TypeKeys "<Down>",6 - case "ReplaceDashes" : Einstellungen.TypeKeys "<Down>",7 - case "DeleteSpaceParagraph" : Einstellungen.TypeKeys "<Down>",8 - case "DeleteSpaceLine" : Einstellungen.TypeKeys "<Down>",9 - case "IgnoreDoulbeSpaces" : Einstellungen.TypeKeys "<Down>",10 - case "ApplyNumbering" : Einstellungen.TypeKeys "<Down>",11 - case "ApplyBorder" : Einstellungen.TypeKeys "<Down>",12 - case "CreateTable" : Einstellungen.TypeKeys "<Down>",13 - case "ApplyStyles" : Einstellungen.TypeKeys "<Down>",14 - case "RemoveBlankParagraphs" : Einstellungen.TypeKeys "<Down>",15 - case "ReplaceCustomStyles" : Einstellungen.TypeKeys "<Down>",16 - case "ReplaceBullets" : Einstellungen.TypeKeys "<Down>",17 - case "ReplaceQuotes" : Einstellungen.TypeKeys "<Down>",18 - case "CombineSingleLine" : Einstellungen.TypeKeys "<End>" + case "UseReplacementTable" : wait 500 + case "CorrectTWoINitialCApitals" : Einstellungen.TypeKeys "<Down>" + case "CapitalizeFirstLetter" : Einstellungen.TypeKeys "<Down>",2 + case "AutomaticBoldAndUnderline" : Einstellungen.TypeKeys "<Down>",3 + case "URLRecognition" : Einstellungen.TypeKeys "<Down>",4 + case "Replace1st" : Einstellungen.TypeKeys "<Down>",5 + case "Replace1/2" : Einstellungen.TypeKeys "<Down>",6 + case "ReplaceDashes" : Einstellungen.TypeKeys "<Down>",7 + case "DeleteSpaceParagraph" : Einstellungen.TypeKeys "<Down>",8 + case "DeleteSpaceLine" : Einstellungen.TypeKeys "<Down>",9 + case "IgnoreDoulbeSpaces" : Einstellungen.TypeKeys "<Down>",10 + case "ApplyNumbering" : Einstellungen.TypeKeys "<Down>",11 + case "ApplyBorder" : Einstellungen.TypeKeys "<Down>",12 + case "CreateTable" : Einstellungen.TypeKeys "<Down>",13 + case "ApplyStyles" : Einstellungen.TypeKeys "<Down>",14 + case "RemoveBlankParagraphs" : Einstellungen.TypeKeys "<Down>",15 + case "ReplaceCustomStyles" : Einstellungen.TypeKeys "<Down>",16 + case "ReplaceBullets" : Einstellungen.TypeKeys "<Down>",17 + case "ReplaceQuotes" : Einstellungen.TypeKeys "<Down>",18 + case "CombineSingleLine" : Einstellungen.TypeKeys "<End>" end select Einstellungen.TypeKeys "<SPACE>" TabOptionenAutokorrektur.OK - + end function '--------------------------------------------------------------- @@ -87,15 +87,15 @@ function fFormatCharacter(Options as string) '/// Open format/character diglog with Options. Kontext FormatCharacter - + Select case Options - case "TabFont" : active.SetPage TabFont - case "TabFontEffects" : active.SetPage TabFontEffects - case "TabFontPosition" : active.SetPage TabFontPosition - case "TabHyperlinkZeichen" : active.SetPage TabHyperlinkZeichen - case "TabHintergrund" : active.SetPage TabHintergrund + case "TabFont" : active.SetPage TabFont + case "TabFontEffects" : active.SetPage TabFontEffects + case "TabFontPosition" : active.SetPage TabFontPosition + case "TabHyperlinkZeichen" : active.SetPage TabHyperlinkZeichen + case "TabHintergrund" : active.SetPage TabHintergrund end select - + Kontext Options end function @@ -106,12 +106,12 @@ function fFormatParagraph(Options as string) '/// Open format/paragraph diglog with Options Kontext FormatParagraph - + Select case Options - case "TabUmrandung" : active.SetPage TabUmrandung 'Borders - case "TabEinzuegeUndAbstaende" : active.SetPage TabEinzuegeUndAbstaende 'Indents & Spacing + case "TabUmrandung" : active.SetPage TabUmrandung 'Borders + case "TabEinzuegeUndAbstaende" : active.SetPage TabEinzuegeUndAbstaende 'Indents & Spacing end select - + Kontext Options end function @@ -126,7 +126,7 @@ function fDeleteAllEntries() Kontext Active.Setpage TabWortergaenzung Kontext "TabWortergaenzung" - + if GesammelteWorte.GetItemCount > 0 then for i= 1 to GesammelteWorte.GetItemCount GesammelteWorte.Select 1 diff --git a/testautomation/writer/tools/includes/w_tools_drawing.inc b/testautomation/writer/tools/includes/w_tools_drawing.inc index b3099f0062fd..cf024f06772f 100644 --- a/testautomation/writer/tools/includes/w_tools_drawing.inc +++ b/testautomation/writer/tools/includes/w_tools_drawing.inc @@ -1,7 +1,7 @@ 'encoding UTF-8 Do not remove or change this line! '************************************************************************** '* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. -'* +'* '* Copyright 2008 by Sun Microsystems, Inc. '* '* OpenOffice.org - a multi-platform office productivity suite @@ -42,33 +42,33 @@ '\*********************************************************************** function fPositionAndSize(Options as string) -'/// Open Format/Position and Size diglog with Options. + '/// Open Format/Position and Size diglog with Options. Kontext FormatPositionAndSize - Select case Options + Select case Options case "TabPositionAndSizeWriter" : active.SetPage TabPositionAndSizeWriter case "TabDrehung" : active.SetPage TabDrehung case "TabSchraegstellen" : active.SetPage TabSchraegstellen - end Select + end Select - Kontext Options + Kontext Options end function '------------------------------------------------------------------------- function fFormatLine(Options as string) -'/// Open Format/Line with Options. - Kontext - FormatLine + '/// Open Format/Line with Options. + Kontext + FormatLine - Select case Options + Select case Options case "TabLinie" : active.SetPage TabLinie case "TabLinienstile" : active.SetPage TabLinienstile case "TabLinienenden" : active.SetPage TabLinienenden - end Select + end Select - Kontext Options + Kontext Options end function '------------------------------------------------------------------------- |