diff options
Diffstat (limited to 'testautomation/graphics/required/includes')
25 files changed, 10132 insertions, 0 deletions
diff --git a/testautomation/graphics/required/includes/draw/d_002_.inc b/testautomation/graphics/required/includes/draw/d_002_.inc new file mode 100644 index 000000000000..cf37b87ffee4 --- /dev/null +++ b/testautomation/graphics/required/includes/draw/d_002_.inc @@ -0,0 +1,117 @@ +'encoding UTF-8 Do not remove or change this line! +'************************************************************************** +' DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. +' +' Copyright 2000, 2010 Oracle and/or its affiliates. +' +' OpenOffice.org - a multi-platform office productivity suite +' +' 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 : wolfram.garten@sun.com +'* +'* short description : +'* +'\***************************************************************** + +sub d_002 + + call tdEditCrossFading() + call tdEditLayer() + +end sub + +'******************************************************************************* + +testcase tdEditCrossFading + + printlog " open application " + Call hNewDocument + printlog " create 2 rectangles " + gMouseClick 50,50 + Call hRechteckErstellen ( 10, 10, 20, 40 ) + Call hRechteckErstellen ( 30, 30, 50, 60 ) + printlog " Edit-YSelect All " + EditSelectAll + try + printlog " Edit->Cross-fading " + EditCrossFading + catch + warnlog "EditCrossFading not accessible :-(" + endcatch + + Kontext "Ueberblenden" + Call DialogTest ( Ueberblenden ) + printlog " Change : 'Increments'; 1 more, 1 less " + Schritte.More + Schritte.Less + printlog " Change: Cross-fading attributes; uncheck, check " + Attributierung.uncheck + Attributierung.check + printlog " Change: same orientation; uncheck, check " + GleicheOrientierung.Uncheck + GleicheOrientierung.Check + printlog " cancel dialog 'Cross-fading'; uncheck, check " + Ueberblenden.Cancel + printlog " close application " + Call hCloseDocument + +endcase 'tdEditCrossFading +'------------------------------------------------------------------------------ +testcase tdEditLayer + + printlog " open application " + Call hNewDocument + printlog " View->Layer " + ViewLayer + printlog " Edit->Layer->Insert " + InsertLayer + Kontext "EbeneEinfuegenDlg" + Call DialogTest ( EbeneEinfuegenDlg ) + printlog " Change: Set another name for the layer " + EbenenName.SetText "SomeThing" + printlog " Change: Visible; uncheck, check " + Sichtbar.UnCheck + Sichtbar.Check + printlog " Change: Printable; uncheck, check " + Druckbar.UnCheck + Druckbar.Check + printlog " Change: Locked; check, uncheck " + Gesperrt.Check + Gesperrt.UnCheck + EbeneEinfuegenDlg.OK + printlog " (Edit->Layer->Modify is tested in format-menu-test) " + printlog " Edit->Layer->Rename " + EditLayerRename + kontext "DocumentDrawImpress" + LayerTabBar.TypeKeys "Apply!!<Return>" , true + printlog " Edit->Layer->Delete " + EditDeleteLayer + printlog " Messagebox: really delete? YES " + Kontext "Messagebox" + Messagebox.Yes + sleep (2) + printlog " View->Layer " + ViewLayer + printlog " close application " + Call hCloseDocument + +endcase 'tdEditLayer +'------------------------------------------------------------------------------ diff --git a/testautomation/graphics/required/includes/draw/d_003_.inc b/testautomation/graphics/required/includes/draw/d_003_.inc new file mode 100644 index 000000000000..246e0db05fc9 --- /dev/null +++ b/testautomation/graphics/required/includes/draw/d_003_.inc @@ -0,0 +1,91 @@ +'encoding UTF-8 Do not remove or change this line! +'************************************************************************** +' DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. +' +' Copyright 2000, 2010 Oracle and/or its affiliates. +' +' OpenOffice.org - a multi-platform office productivity suite +' +' 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 : wolfram.garten@sun.com +'* +'* short description : +'* +'\***************************************************************** + +sub d_003 + + call tdViewPagePane() + call tdViewSlide() + +end sub + +'******************************************************************************* + +testcase tdViewPagePane + + printlog " open application " + Call hNewDocument + sleep 1 + kontext "pagepane" + if (NOT pagepane.exists) then + qaerrorlog "Pages Panel not visible on opening application. Opening now." + ViewPagePane + endif + kontext "pagepane" + sleep (2) + try + printlog " View->Page Pane " + ViewPagePane + sleep (2) + if (pagepane.exists) then + warnlog "View->Page Pane failed." + ViewPagePane + endif + catch + warnlog "View->Page Pane couldn't get executed" + endcatch + sleep 1 + if (NOT pagepane.exists) then + ViewPagePane + sleep (1) + endif + printlog " close application " + Call hCloseDocument + +endcase 'tdViewPagePane + +'------------------------------------------------------------------------------- +testcase tdViewSlide + + printlog " open application " + hNewDocument + kontext "DocumentDrawImpress" ' special case :-) + printlog " click the button on the bottom: 'Master View' (because it is not accessible via the menu :-() " + ViewMasterPage + sleep 1 + printlog " View->Slide " + ViewPagePane + Sleep 1 + printlog " close application " + Call hCloseDocument + +endcase 'tdViewSlide diff --git a/testautomation/graphics/required/includes/draw/d_005_.inc b/testautomation/graphics/required/includes/draw/d_005_.inc new file mode 100644 index 000000000000..998a42cdc093 --- /dev/null +++ b/testautomation/graphics/required/includes/draw/d_005_.inc @@ -0,0 +1,59 @@ +'encoding UTF-8 Do not remove or change this line! +'************************************************************************** +' DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. +' +' Copyright 2000, 2010 Oracle and/or its affiliates. +' +' OpenOffice.org - a multi-platform office productivity suite +' +' 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 : wolfram.garten@sun.com +'* +'* short description : +'* +'\***************************************************************** + +sub d_005 + + call tiFormatLayer() + +end sub + +'******************************************************************************* + +testcase tiFormatLayer + + printlog " open application " + Call hNewDocument + printlog " View->Layer " + ViewLayer + printlog " Format->Layer " + FormatLayer + Kontext "EbeneAendernDlg" + DialogTest ( EbeneAendernDlg ) + printlog " cancel dialog 'Modify Layer' " + EbeneAendernDlg.Cancel + printlog " View->Layer " + ViewLayer + printlog " close application " + Call hCloseDocument + +endcase 'tiFormatLayer diff --git a/testautomation/graphics/required/includes/draw/d_007.inc b/testautomation/graphics/required/includes/draw/d_007.inc new file mode 100644 index 000000000000..ce36abf03b59 --- /dev/null +++ b/testautomation/graphics/required/includes/draw/d_007.inc @@ -0,0 +1,55 @@ +'encoding UTF-8 Do not remove or change this line! +'************************************************************************** +' DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. +' +' Copyright 2000, 2010 Oracle and/or its affiliates. +' +' OpenOffice.org - a multi-platform office productivity suite +' +' 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 : wolfram.garten@sun.com +'* +'* short description : +'* +'\***************************************************************** + +sub d_007 + + call tdModifyRotate() + +end sub + +'******************************************************************************* + +testcase tdModifyRotate + + printlog " open application " + Call hNewDocument + printlog " create a rectangle " + Call hRechteckErstellen 20,20,40,40 + sleep 1 + printlog " Modify->Rotate " + ModifyRotate + sleep 1 + printlog " close application " + Call hCloseDocument + +endcase 'tdModifyRotate diff --git a/testautomation/graphics/required/includes/global/gallery.inc b/testautomation/graphics/required/includes/global/gallery.inc new file mode 100644 index 000000000000..c6f3e2daae7d --- /dev/null +++ b/testautomation/graphics/required/includes/global/gallery.inc @@ -0,0 +1,987 @@ +'encoding UTF-8 Do not remove or change this line! +'************************************************************************** +' DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. +' +' Copyright 2000, 2010 Oracle and/or its affiliates. +' +' OpenOffice.org - a multi-platform office productivity suite +' +' 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 : wolfram.garten@sun.com +'* +'* short description : Global Required/resource test: Checking the gallery +'* +'\****************************************************************************** +testcase tGallery_DialogTest + '///Open a new Writer document + '///Tools / Gallery + printlog "- Working with Gallery-Beamer!" + gApplication = "WRITER" + call hNewDocument + call hOpenGallery + Kontext "DocumentWriter" + '///+Undock the <i>Gallery Beamer</i> + printlog "- undock the Gallery Beamer" + Kontext "Gallery" + Gallery.Undock ( AlignTop ) + sleep(2) + '///+<ul><li>Move the gallery-window</li></ul> + printlog " - move the gallery window" + Gallery.move ( 20, 20 ) + sleep(2) + '///+Dock the <i>Gallery Beamer</i> + printlog "- dock the Gallery Beamer" + Gallery.Dock ( AlignTop ) + sleep(2) + '///+Close the <i>Gallery Beamer</i> (Tools / Gallery) + printlog "- close the Gallery Beamer" + ToolsGallery + call hCloseDocument +endcase + +'------------------------------------------------------------------------- + +testcase tGallery_ActivateAndUpdateAllThemes + Dim iThemeCount as Integer + Dim i as Integer + Dim j as Integer + Dim Gallerytext as string + '///Activate and update all gallery themes (NET installation: Activate only!) + '///Open a new Writer document + '///+Tools / Gallery + '///+Click on each theme and update it (via context menu) + printlog "activate and update all gallery-themes" + gApplication = "WRITER" + call hNewDocument + Kontext + call hOpenGallery + Kontext "Gallery" + iThemeCount = Gallerys.GetItemCount + for i=1 to iThemeCount + if gNetzInst = FALSE then + Kontext "Gallery" + Gallerytext = Gallerys.GetItemText(i) + printlog "- " + i + ". entry (" & Gallerytext & ")" + Gallerys.Select i + Gallerys.MouseMove ( 10, 10 ) + Gallerys.OpenContextMenu + sleep (3) + printlog " - update" + hMenuSelectNr (1) + sleep (3) + Kontext "Messagebox" + if Messagebox.Exists(3) then + if Messagebox.getRT=304 then + printlog "- 'MyTheme' is the " & i & "'s entry." + Messagebox.No + end if + else + for j = 1 to 800 + Kontext "AktualisierenGallery" + if AktualisierenGallery.Exists then + printlog "DEBUG (j): " & j + sleep (1) + else + printlog "DEBUG: 800 reached!" + j=801 + end if + next j + end if + end if + next i + call hCloseDocument +endcase + +'------------------------------------------------------------------------- + +testcase tGallery_CheckNames + Dim iThemeCount as Integer + Dim i as Integer + Dim j as Integer + Dim ssList (100) as String + Dim siList (100) as String + Dim sFileName as String + Dim iGalleryThemes as integer + + if gOOO = true then + sFileName = ConvertPath ( gTesttoolPath + "graphics\required\input\gallery\gal_oo_" + iSprache + ".txt" ) + else + sFileName = ConvertPath ( gTesttoolPath + "graphics\required\input\gallery\gal_" + iSprache + ".txt" ) + end if + + '///Check the names for the gallery themes + '///Open a new Writer document + '///+Tools / Gallery + gApplication = "WRITER" + call hNewDocument + Kontext + call hOpenGallery + '///+Check the number of gallery themes. For StarOffice: should be 32. For OpenOffice.Org: should be 6. + printlog "- check the number of gallery-themes" + Kontext "Gallery" + if NOT gOOO then + if bAsianLan then + iGalleryThemes = 29 ' Flags are not allowed! + else + iGalleryThemes = 30 + end if + else + if bAsianLan then + iGalleryThemes = 6 ' Flags are not allowed! + else + iGalleryThemes = 6 + end if + end if + iThemeCount = Gallerys.GetItemCount + if (iThemeCount <> iGalleryThemes) then + warnlog "Difference in count of gallery themes; found: '" + iThemeCount + "'; expected: '"+ iGalleryThemes +"'" + end if + for i=1 to iThemeCount + Gallerys.Select i + ListAppend ( siList(), Gallerys.GetSelText ) + next i + '///+Check all names with a list which depends on language (<i>gTestToolPath</i>/graphics/udpate/input/gallery) + printlog "- check the names of gallery-themes" + if Dir ( sFilename ) = "" then + warnlog "The file for comparison does not exists. The file will be written!" + warnlog "Please control : " + sFilename + ListWrite ( siList(), sFilename, "utf8" ) + else + printlog " file for comparison is : " + sFilename + ListRead ( ssList (), sFilename, "uft8" ) + gCompare2Lists ( siList(), ssList () ) + end if + ToolsGallery + call hCloseDocument +endcase + +'------------------------------------------------------------------------- + +testcase tGallery_CheckContextMenuForGalleryThemes + Dim iForBidden as Integer + Dim iMenuEntries as Integer + Dim i as Integer + Dim iThemeCount as Integer + '/// Check the contextmenu for the gallery themes + '/// Open a new Writer document + '/// +Tools / Gallery + printlog "check the contextmenu for the gallery-themes" + gApplication = "WRITER" + call hNewDocument + call hOpenGallery + '/// +Testing <i>rename</i> and <i>properties</i> for each gallery theme (via context-menu) + '/// +<ul><li>Only the private gallery theme must be deleteable (different 3 entries in the context-menu than the rest)</li></ul> + Kontext "Gallery" + iThemeCount = Gallerys.GetItemCount + Gallerys.MouseMove ( 10, 10 ) + for i=1 to iThemeCount + Kontext "Gallery" + printlog "- " + i + ". entry" + sleep 1 + Gallerys.Select 1 + sleep (1) + Gallerys.Select i + sleep (1) + Gallerys.OpenContextMenu + sleep (2) + iMenuEntries = hMenuItemGetCount + if iMenuEntries <> 3 then + if gNetzInst = FALSE then + warnlog "There are not 3 entries! => no test on the contextmenu!" + else + if iMenuEntries <> 1 then + warnlog "Net-Inst : There are not 1 entries! => no test on the contextmenu!" + else + sleep (3) + hMenuSelectNr(1) + Kontext + if Active.GetPageCount <> 1 then + warnlog "There are more than 1 Tabpage in Net-Installation ( perhaps no root-installation )!" + end if + Active.SetPage TabAllgemeinGallery + Kontext "TabAllgemeinGallery" + TabAllgemeinGallery.Cancel + sleep (1) + end if + end if + else + sleep (1) + hMenuSelectNr(2) + Kontext "GalleryNewTitle" + GalleryNewTitle.Cancel + sleep(1) + Kontext "Gallery" + Gallerys.OpenContextMenu + sleep (3) + hMenuSelectNr (3) + Kontext + Active.SetPage TabAllgemeinGallery + Active.SetPage TabDateien + Kontext "TabDateien" + TabDateien.Cancel + sleep(1) + end if + next i + ToolsGallery + call hCloseDocument +endcase + +'------------------------------------------------------------------------- + +testcase tGallery_CreateAndWorkWithANewGalleryThemes + Dim iMenuEntries as Integer + Dim j as Integer + '/// Open a new Writer document + '/// Tools / Gallery + printlog "create a new gallery-theme ( TT-theme )" + gApplication = "WRITER" + call hNewDocument + call hOpenGallery + iMenuEntries = Gallerys.GetItemCount + printlog "- Clicking on 'New Theme' and creating a new theme" + '/// Create a new gallery-theme + '/// + by clicking on <i>New Theme</i> + NewTheme.Click + '/// +Activate <i>General</i> tabpage and insert <b><i>TT-theme</b></i> as name + Kontext + Active.SetPage TabAllgemeinGallery + Kontext "TabAllgemeinGallery" + NeuesThema.SetText "TT-theme" + sleep (1) + printlog " - named the new theme 'TT-theme' on the general-page" + printlog " - insert all files out of '[gTestToolpath]\global\input\graf_inp' in the files-page" + '/// +Activate <i>Files</i> tabpage + Kontext + Active.SetPage TabDateien + Kontext "TabDateien" + printlog " - click 'add' without a selected file => insert-graphic-dialog has to be be visible" + '/// +Click on <i>Add</i> (If no file is selected the <i>Graphic-Insert</i> dialog has to be be opened -> close it) + Hinzufuegen.Click + sleep (1) + Kontext "GrafikEinfuegenDlg" + GrafikEinfuegenDlg.Cancel + sleep (1) + printlog " - click 'find files' to insert the path for graphics" + '///+Click on <i>Find Files</i> => <i>select-path</i> dialog will be visible + Kontext "TabDateien" + Suche.Click + sleep (1) + '/// +Insert [gTesttoolPath]/input/global/graf_inp as path-name as click on <i>Select</i> + Kontext "OeffnenDlg" + Pfad.SetText ( convertPath ( gTesttoolPath + "global\input\graf_inp" ) ) + sleep (1) + Auswaehlen.Click + sleep (10) + '/// +Click on <i>Add</i> for some graphics + printlog " - 'add' one by one" + Kontext "TabDateien" + DateiListe.Select 1 + WaitSlot(1000) + Hinzufuegen.Click + sleep (1) + DateiListe.Select 1 + Hinzufuegen.Click + sleep (1) + '/// +Click on <i>Add all</i> for rest of the graphics + '/// +<ul><li>apply-dialog -> cancel</li></ul> + '/// +click on <i>Add all</i> for rest of the graphics + printlog " - 'add all' for the rest of the files" + DateiListe.Select 1 + HinzufuegenAlle.Click + printlog " - apply-dialog -> cancel" + Kontext "ApplyGallery" + for j=1 to 100 + if ApplyGallery.Exists then + try + ApplyGallery.Cancel + catch + endcatch + else + if j>5 then j=101 + sleep (1) + end if + next j + Kontext "TabDateien" + if DateiListe.GetItemCount > 1 then + printlog " - 'add all' for the rest of the files" + DateiListe.Select 1 + HinzufuegenAlle.Click + sleep (2) + Kontext "ApplyGallery" + for j=1 to 100 + If ApplyGallery.Exists then + sleep (1) + else + j=101 + end if + next j + end if + Kontext "TabDateien" + printlog " - click 'OK' for the tabpages" + TabDateien.OK + '/// +Check if the new entry is inserted and select it + printlog " - check if the new entrie is inserted and select it" + Kontext "Gallery" + if Gallerys.GetItemCount <> ( iMenuEntries + 1 ) then + warnlog "No new theme was created => the test ends here" + ToolsGallery + call hCloseDocument + else + gMouseClick 50,50 '/// make mouseclick to set focus ///' + Kontext "Gallery" + Gallerys.Select "TT-theme" + Gallerys.MouseMove ( 10, 10 ) + sleep (1) + Gallerys.OpenContextMenu + '/// +Update the entry (1. entry in context menu ) => cancel it + printlog " - update the entry => cancel the update" + sleep (3) + hMenuSelectNr (1) + sleep (1) + Kontext "AktualisierenGallery" + if AktualisierenGallery.Exists <> TRUE then + AktualisierenGallery.Cancel + end if + do + sleep 1 + loop while AktualisierenGallery.Exists + Kontext "Gallery" + Gallerys.Select "TT-theme" + Gallerys.OpenContextMenu + '/// +Update it (1. entry in context menu ) + printlog " - update" + sleep (3) + hMenuSelectNr (1) + for j=1 to 100 + Kontext "AktualisierenGallery" + if AktualisierenGallery.Exists <> TRUE then + j=101 + else + sleep (1) + end if + next j + '/// +Rename it (3. entry in context menu) + printlog " - rename ( 3. entry in context-menu )" + Kontext "Gallery" + Gallerys.OpenContextMenu + sleep (3) + hMenuSelectNr (3) + Kontext "GalleryNewTitle" + Title.SetText "New TT-theme" + GalleryNewTitle.OK + Kontext "Gallery" + Gallerys.Select "New TT-theme" + '///+Add new files in properties (4. entry in context menu) + printlog " - add new graphics in properties ( 4. entry in context-menu )" + Kontext "Gallery" + Gallerys.OpenContextMenu + sleep (3) + hMenuSelectNr (4) + Kontext + Active.SetPage TabDateien + Kontext "TabDateien" + Suche.Click + Kontext "OeffnenDlg" + Pfad.SetText ( convertPath ( gTesttoolPath + "global\input\graf_inp" ) ) + Auswaehlen.Click + sleep (10) + Kontext "TabDateien" + DateiListe.Select 1 + Hinzufuegen.Click + TabDateien.OK + '/// +Delete the entry (2. entry in context menu) + printlog " - delete the entry ( 2. entry in context-menu )" + printlog " - messagebox -> no" + Kontext "Gallery" + Gallerys.Select "New TT-theme" + sleep (3) + Gallerys.OpenContextMenu + sleep (3) + hMenuSelectNr (2) + Kontext "Active" + sleep (1) + Active.No + printlog " - messagebox -> yes" + Kontext "Gallery" + sleep (1) + Gallerys.Select "New TT-theme" + sleep (1) + Gallerys.OpenContextMenu + sleep (3) + hMenuSelectNr (2) + Kontext "Active" + Active.Yes + try + Kontext "Gallery" + Gallerys.Select "New TT-theme" + warnlog "The entry isn't deleted!" + catch + endcatch + end if + sleep 10 + ToolsGallery + call hCloseDocument +endcase + +'------------------------------------------------------------------------- + +testcase tGallery_GalleryView_Preview + Dim jpeg_bkg as Integer + Dim iAnimation as Integer + Dim iSound as Integer + Dim i as Integer + Dim iPreview as Integer + Dim iTitle as Integer + if NOT gOOO then + select case iSprache + case 01 : jpeg_bkg = 3 : iAnimation = 1 : iSound = 28 + case 07 : jpeg_bkg = 29 : iAnimation = 1 : iSound = 6 + case 31 : jpeg_bkg = 3 : iAnimation = 3 : iSound = 11 + case 33 : jpeg_bkg = 13 : iAnimation = 1 : iSound = 29 + case 34 : jpeg_bkg = 11 : iAnimation = 1 : iSound = 28 + case 36 : jpeg_bkg = 12 : iAnimation = 1 : iSound = 10 + case 39 : jpeg_bkg = 10 : iAnimation = 1 : iSound = 27 + case 46 : jpeg_bkg = 2 : iAnimation = 1 : iSound = 17 + case 48 : jpeg_bkg = 2 : iAnimation = 1 : iSound = 17 + case 49 : jpeg_bkg = 12 : iAnimation = 1 : iSound = 16 + case 55 : jpeg_bkg = 21 : iAnimation = 1 : iSound = 28 + case 81 : jpeg_bkg = 21 : iAnimation = 1 : iSound = 10 'FHA TODO: Find out the right numbers for Asian languages. + case 82 : jpeg_bkg = 1 : iAnimation = 17 : iSound = 12 + case 86 : jpeg_bkg = 1 : iAnimation = 9 : iSound = 13 + case 88 : jpeg_bkg = 1 : iAnimation = 7 : iSound = 20 + case else : jpeg_bkg = 10 : iAnimation = 1 : iSound = 17 + warnlog "Please insert the entrienumbers for 'Backgrounds', 'Sounds' and one with normal files ( Animations )" + end select + else ' Testing OOO + select case iSprache + case 01 : jpeg_bkg = 1 : iAnimation = 5 : iSound = 2 + case 07 : jpeg_bkg = 1 : iAnimation = 5 : iSound = 2 + case 31 : jpeg_bkg = 3 : iAnimation = 1 : iSound = 1 + case 33 : jpeg_bkg = 3 : iAnimation = 1 : iSound = 2 + case 34 : jpeg_bkg = 1 : iAnimation = 1 : iSound = 2 + case 36 : jpeg_bkg = 2 : iAnimation = 1 : iSound = 2 + case 39 : jpeg_bkg = 2 : iAnimation = 1 : iSound = 2 + case 46 : jpeg_bkg = 2 : iAnimation = 5 : iSound = 2 + case 48 : jpeg_bkg = 2 : iAnimation = 5 : iSound = 2 + case 49 : jpeg_bkg = 2 : iAnimation = 5 : iSound = 2 + case 55 : jpeg_bkg = 2 : iAnimation = 5 : iSound = 2 + case 81 : jpeg_bkg = 2 : iAnimation = 5 : iSound = 2 'FHA TODO: Find out the right numbers for Asian languages. + case 82 : jpeg_bkg = 1 : iAnimation = 5 : iSound = 2 + case 86 : jpeg_bkg = 1 : iAnimation = 5 : iSound = 3 + case 88 : jpeg_bkg = 1 : iAnimation = 5 : iSound = 2 + case else : jpeg_bkg = 1 : iAnimation = 5 : iSound = 2 + warnlog "Please insert the entrienumbers for 'Backgrounds', 'Sounds' and one with normal files ( Animations )" + end select + end if + '/// Open a new Writer document + '/// Tools / Gallery + printlog "open a writer and the gallery" + gApplication = "WRITER" + call hNewDocument + Kontext + call hOpenGallery + '/// Check the view for Background-pictures (JPEGs), for standard graphic files (Animation) and for <i>Sound</i> objects + for i=1 to 3 + if i=1 then + Gallerys.Select jpeg_bkg + printlog "selected gallery-theme : Backgrounds (Jpeg-files)" + end if + if i=2 then + Gallerys.Select iAnimation + printlog "selected gallery-theme : Animation" + end if + if i=3 then + Gallerys.Select iSound + printlog "selected gallery-theme : Sound" + end if + if gNetzInst = FALSE then + iPreview = 2 : iTitle = 3 + else + iPreview = 2 : iTitle = 0 + end if + '/// Test the list-view + '/// +Click on List-View-Button in toolbar + printlog "- list-view" + printlog " - open the list-view" + ListView.Click + sleep (1) + printlog " - Press Home + Enter to focus and enter Preview-mode." + '/// +Double-click on an object (preview has to be visible) + View.TypeKeys "<HOME>" + View.TypeKeys "<RETURN>" + sleep (2) + '/// +Back to normal view with Enter + View.TypeKeys "<RETURN>" + sleep (2) + '/// +Preview out of context menu on/off + printlog " - preview out of context menu on/off" + View.TypeKeys "<HOME>" + Sleep (2) + View.OpenContextMenu true + sleep (3) + hMenuSelectNr ( iPreview ) + sleep (3) + kontext "Gallery" + Sleep (2) + View.OpenContextMenu true + sleep (2) + hMenuSelectNr ( iPreview ) + sleep (3) + '/// +Title (FAT installation only) + if gNetzInst = FALSE then + printlog " - title" + Kontext "Gallery" + sleep (2) + View.OpenContextMenu true + sleep (3) + hMenuSelectNr ( iTitle ) + Kontext "GalleryNewTitle" + sleep (1) + GalleryNewTitle.Cancel + sleep (1) + Kontext "Gallery" + end if + View.OpenContextMenu true + sleep (3) + hMenuSelectNr ( iPreview ) + sleep (3) + '/// Should now be in Preview-mode. Check if we are. ///' + View.OpenContextMenu true + sleep (3) + printlog MenuIsItemChecked (MenuGetItemID(iPreview+1)) + if MenuIsItemChecked (MenuGetItemID(iPreview+1)) then + Printlog " Entered Preview-mode correctly" + sleep (1) + else + Warnlog " Didnt seem to enter preview-mode correctly." + end if + MenuSelect (0) + sleep (1) + '/// From here, try switching to icon-view ///' + '///+Click on Icon-View-Button in toolbar + printlog "- icon-view" + if IconView.isEnabled then + IconView.Click + qaErrorLog "The bug 64543 has been fixed! Please report to FHA." + end if + sleep (1) + View.TypeKeys "<HOME>" + printlog " - Enter to get out of Preview-mode" + '/// +Press Return on an object (preview has to be visible) + View.TypeKeys "<RETURN>" + sleep (2) + '/// +Back to normal view with Return + View.TypeKeys "<RETURN>" + sleep (2) + '/// +Preview out of context menu on/off + printlog " - preview out of context menu on/off" + View.TypeKeys "<HOME>" + sleep (3) + View.OpenContextMenu true + sleep (3) + hMenuSelectNr ( iPreview ) + sleep (3) + View.OpenContextMenu true + sleep (3) + hMenuSelectNr ( iPreview ) + sleep (3) + '/// +Title (FAT installation only) + if gNetzInst = FALSE then + printlog " - title" + try + View.OpenContextMenu true + sleep (3) + catch + warnlog "Could not open Contextmenu for Title nr:" +iTitle + endcatch + hMenuSelectNr ( iTitle ) + Kontext "GalleryNewTitle" + GalleryNewTitle.Cancel + Kontext "Gallery" + end if + next i + sleep 1 ' else crash + ToolsGallery + + '/// If the MediaPlayer exists - close it ///' + kontext "Mplayer" + if Mplayer.Exists then + if (gApplication = "IMPRESS") then + kontext "DocumentImpress" + else + kontext "DocumentDraw" + end if + ToolsMediaPlayer + else + if (gApplication = "IMPRESS") then + kontext "DocumentImpress" + else + kontext "DocumentDraw" + end if + end if + + call hCloseDocument +endcase + +'------------------------------------------------------------------------- + +testcase tGallery_GalleryView_Insert + Dim jpeg_bkg as Integer + Dim iAnimation as Integer + Dim i as Integer + Dim j as Integer + Dim k as Integer + '/// Test gallery-view -> insert gallery-object with context-menu (3D-Object (<i>internal object</i>), Animation (<i>as file</i>)) + if NOT gOOO then + select case iSprache + case 01 : jpeg_bkg = 3 : iAnimation = 1 + case 07 : jpeg_bkg = 29 : iAnimation = 1 + case 31 : jpeg_bkg = 3 : iAnimation = 3 + case 33 : jpeg_bkg = 13 : iAnimation = 1 + case 34 : jpeg_bkg = 7 : iAnimation = 1 + case 36 : jpeg_bkg = 12 : iAnimation = 1 + case 39 : jpeg_bkg = 10 : iAnimation = 1 + case 46 : jpeg_bkg = 1 : iAnimation = 2 + case 48 : jpeg_bkg = 3 : iAnimation = 1 + case 49 : jpeg_bkg = 1 : iAnimation = 2 + case 55 : jpeg_bkg = 8 : iAnimation = 1 + case 81 : jpeg_bkg = 1 : iAnimation = 3 + case 82 : jpeg_bkg = 1 : iAnimation = 17 + case 86 : jpeg_bkg = 17 : iAnimation = 15 + case 88 : jpeg_bkg = 17 : iAnimation = 15 + case else : jpeg_bkg = 1 : iAnimation = 2 + warnlog "Please insert the entrienumbers for 'Backgrounds' and one with normal files ( Animations )" + end select + else ' Testing OOO + select case iSprache + case 01 : jpeg_bkg = 3 : iAnimation = 1 + case 07 : jpeg_bkg = 5 : iAnimation = 1 + case 31 : jpeg_bkg = 3 : iAnimation = 3 + case 33 : jpeg_bkg = 5 : iAnimation = 1 + case 34 : jpeg_bkg = 6 : iAnimation = 1 + case 36 : jpeg_bkg = 5 : iAnimation = 1 + case 39 : jpeg_bkg = 5 : iAnimation = 1 + case 46 : jpeg_bkg = 1 : iAnimation = 2 + case 48 : jpeg_bkg = 3 : iAnimation = 1 + case 49 : jpeg_bkg = 1 : iAnimation = 2 + case 55 : jpeg_bkg = 6 : iAnimation = 1 + case 81 : jpeg_bkg = 1 : iAnimation = 3 + case 82 : jpeg_bkg = 1 : iAnimation = 1 + case 86 : jpeg_bkg = 5 : iAnimation = 5 + case 88 : jpeg_bkg = 5 : iAnimation = 1 + case else : jpeg_bkg = 1 : iAnimation = 2 + warnlog "Please insert the entrienumbers for 'Backgrounds' and one with normal files ( Animations )" + end select + end if + '/// Test following for all applications (Writer, Calc, Impress, Draw) + for i=1 to 4 ' each application + if i=1 then gApplication = "WRITER" + if i=2 then gApplication = "CALC" + if i=3 then gApplication = "IMPRESS" + if i=4 then gApplication = "DRAW" + + '/// +Open a new document + '/// +Open the Gallery + printlog gApplication 'Chr(13) + call hNewDocument + call hOpenGallery + '/// +Select 3D-theme (these are internal objects and not realy files) + '/// +<ul><li>on context menu there are only 2 entries for insert (copy, link) + '/// +<li>insert the object per <i>copy</i></li> + '/// +<li>insert the object per <i>link</i></li></ul> + '/// +Select Animation theme (these are realy files) + '/// +<ul><li>On context menu there are only 2 entries for insert (copy, link ) for Calc, Draw Impress</li> + '/// +<li>On context menu there are only 3 entries for insert (copy, link, background / page, paragraph ) for Writer</li> + '/// +<li>insert the object per <i>copy</i></li> + '/// +<li>insert the object per <i>link</i></li> + '/// +<li>Only for the Writer:<ul> + '/// +<li>Insert the object per background / page</li> + '/// +<li>insert the object per background / paragraph</li></ul></li></ul> + '/// +Close the Gallery + '/// +Close the document + '/// Since the GraphicObjectbar could disturb our testing, we close it if it is open ///' + ' kontext "GraphicObjectbar" + ' if GraphicObjectbar.Exists then GraphicObjectbar.Close + for j=1 to 2 ' the two gallery-theme + if j=1 then + Gallerys.Select jpeg_bkg + printlog " selected gallery-theme : Backgrounds" + end if + + if j=2 then + Gallerys.Select iAnimation + printlog " selected gallery-theme : Animation" + end if + + if i=1 then ' test for writer + for k=1 to 2 + if k=1 then + ListView.Click + printlog " - insert on list view" + else + IconView.Click + printlog " - insert on icon view" + end if + + sleep (2) + View.Mousedown ( 5, 18 ) + View.Mouseup ( 5, 18 ) + View.typekeys "<DOWN>,<UP>" + + sleep (3) + View.TypeKeys "<SHIFT F10>" ' OpenContextMenu + sleep (3) + hMenuSelectNr ( 1 ) + + if j=1 then + printlog " - copy" + sleep (1) + hMenuSelectNr ( 1 ) + sleep (2) + else + printlog " - copy" + sleep (1) + hMenuSelectNr ( 1 ) + sleep (3) + + printlog " - link" + View.TypeKeys "<SHIFT F10>" 'OpenContextMenu + sleep (1) + hMenuSelectNr ( 1 ) + hMenuSelectNr ( 2 ) + sleep (3) + + printlog " - background -> page" + View.TypeKeys "<SHIFT F10>" 'OpenContextMenu + sleep (2) + hMenuSelectNr ( 1 ) + hMenuSelectNr ( 3 ) + hMenuSelectNr ( 1 ) + sleep (3) + + printlog " - background -> paragraph" + View.TypeKeys "<SHIFT F10>" 'OpenContextMenu + sleep (2) + hMenuSelectNr ( 1 ) + hMenuSelectNr ( 3 ) + hMenuSelectNr ( 2 ) + sleep (3) + end if + + kontext "GraphicObjectbar" + if GraphicObjectbar.Exists then + if GraphicObjectbar.isDocked = False then + GraphicObjectbar.Move 900,900 + end if + end if + kontext "Gallery" + + next k + else ' test for other applications ( calc, impress, draw ) + kontext "GraphicObjectbar" + if GraphicObjectbar.Exists then + if GraphicObjectbar.isDocked = False then + GraphicObjectbar.Move 900,900 + end if + end if + kontext "Gallery" + + kontext "Gluepointsobjectbar" + if Gluepointsobjectbar.Exists then + if Gluepointsobjectbar.isDocked = false then + Gluepointsobjectbar.Move 900,900 + end if + end if + kontext "Gallery" + + kontext "Optionsbar" + if Optionsbar.Exists then + if Optionsbar.isDocked = false then + Optionsbar.Move 900,900 + end if + end if + kontext "Gallery" + + for k=1 to 2 + if k=1 then + ListView.Click + printlog " - insert on list view" + else + IconView.Click + printlog " - insert on icon view" + end if + + sleep (1) + View.Mousedown ( 5, 18 ) + View.Mouseup ( 5, 18 ) + View.typekeys "<DOWN>,<UP>" + + sleep (1) + View.TypeKeys "<SHIFT F10>" 'OpenContextMenu + printlog " - copy" + sleep (3) + hMenuSelectNr ( 1 ) + hMenuSelectNr ( 1 ) + sleep (3) + + if j=2 then + View.TypeKeys "<SHIFT F10>" 'OpenContextMenu + printlog " - link" + sleep (3) + hMenuSelectNr ( 1 ) + hMenuSelectNr ( 2 ) + sleep (2) + end if + + next k + end if + next j + ToolsGallery + WaitSlot (2000) + call hCloseDocument + WaitSlot (2000) + next i +endcase + +'------------------------------------------------------------------------- + +testcase tGallery_GalleryView_Delete + Dim jpeg_bkg as Integer + Dim iAnimation as Integer + Dim iSound as Integer + Dim i as Integer + Dim j as Integer + Dim k as Integer + + if gNetzInst = TRUE then + ' TODO: since we now only know net- installations, make it work! + printlog "No test for 'net' installations, because there are no rights to delete objects out of Gallery!" + 'NOTE: Jump to NotForNetInst... + Goto NotForNetInst + end if + + '/// Test gallery view -> delete objects with context-menu ( Backgrounds (<i>internal object</i>), Animation (<i>file</i>), Sound (<i>file</i>)) + select case iSprache + case 01 : jpeg_bkg = 1 : iAnimation = 2 : iSound = 28 + case 07 : jpeg_bkg = 29 : iAnimation = 1 : iSound = 6 + case 31 : jpeg_bkg = 1 : iAnimation = 2 : iSound = 28 + case 33 : jpeg_bkg = 13 : iAnimation = 1 : iSound = 29 + case 34 : jpeg_bkg = 7 : iAnimation = 1 : iSound = 28 + case 36 : jpeg_bkg = 12 : iAnimation = 1 : iSound = 10 + case 39 : jpeg_bkg = 10 : iAnimation = 1 : iSound = 27 + case 46 : jpeg_bkg = 1 : iAnimation = 2 : iSound = 18 + case 49 : jpeg_bkg = 1 : iAnimation = 2 : iSound = 17 + case 55 : jpeg_bkg = 8 : iAnimation = 1 : iSound = 30 + case 81 : jpeg_bkg = 1 : iAnimation = 3 : iSound = 10 + case 82 : jpeg_bkg = 1 : iAnimation = 17 : iSound = 12 + case 86 : jpeg_bkg = 1 : iAnimation = 9 : iSound = 13 + case 88 : jpeg_bkg = 1 : iAnimation = 7 : iSound = 20 + case else : jpeg_bkg = 1 : iAnimation = 2 : iSound = 17 + warnlog "Please insert the entrienumbers for '3D-graphics', 'Sounds' and one with normal files ( Animations )" + end select + + '/// Open a new writer-doc + '/// Tools / Gallery + gApplication = "WRITER" + call hNewDocument + call hOpenGallery + '/// Delete one object in list-view and icon-view for 3D, Animation and Sound + for i=1 to 3 + Kontext "Gallery" + if i=1 then + Gallerys.Select jpeg_bkg + printlog " selected gallery-theme : Backgrounds" + end if + + if i=2 then + Gallerys.Select iAnimation + printlog " selected gallery-theme : Animation" + end if + + if i=3 then + Gallerys.Select iSound + printlog " selected gallery-theme : Sound" + end if + + for j=1 to 2 + Kontext "Gallery" + if j=1 then + IconView.Click + printlog " Icon view" + sleep 1 + end if + if j=2 then + ListView.Click + printlog " List view" + end if + + for k=1 to 2 + Kontext "Gallery" + sleep (1) + View.MouseMove ( 5, 15 ) + View.TypeKeys "<SHIFT F10>" 'OpenContextMenu true + hMenuSelectNr ( 4 ) + kontext "Active" + if k=1 then + Active.No + printlog " delete one object => no" + else + Active.Yes + printlog " delete one object => yes" + end if + next k + next j + next i + ToolsGallery + call hCloseDocument + 'NOTE: Jump End NotForNetInst + NotForNetInst: +endcase + +'------------------------------------------------------------------------- +testcase tGallery_Quick_check + + '/// Short check, if at least 2 files exist in the gallery, and if they are > 0 in size ///' + '/// One in the gallery folder itself and the other one in a subfolder. ///' + dim sFile(1) as string + dim i as integer + + sFile(0) = ConvertPath ( gOfficeBasisPath + "share/gallery/apples.gif" ) ' + sFile(1) = ConvertPath ( gOfficeBasisPath + "share/gallery/bullets/coffee_1.gif" ) ' + '/// Open a new document + call hNewDocument + for i = 0 to 1 + '/// Click to deselect any selected objects ///' + gMouseclick 1, 50 + if FileExists(sFile(i)) then + if (FileLen(sFile(i)) > 0 ) then + call hGrafikEinfuegen ( sFile(i) ) + else + warnlog "File lenght is 0: '" + sFile(i) + "'" + end if + else + warnlog "File doesn't exist: '" + sFile(i) + "'" + end if + next i + '///close the document + call hCloseDocument +endcase + diff --git a/testautomation/graphics/required/includes/global/gallery2.inc b/testautomation/graphics/required/includes/global/gallery2.inc new file mode 100644 index 000000000000..1028503a0830 --- /dev/null +++ b/testautomation/graphics/required/includes/global/gallery2.inc @@ -0,0 +1,290 @@ +'encoding UTF-8 Do not remove or change this line! +'************************************************************************** +' DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. +' +' Copyright 2000, 2010 Oracle and/or its affiliates. +' +' OpenOffice.org - a multi-platform office productivity suite +' +' 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 : wolfram.garten@sun.com +'* +'* short description : Checking all gallery themes +'* +'***************************************************************** +'* +' #1 tLoad100GalleryGraphicFiles 'Inserting 100 gallery graphics and checking the sizes +' #1 tCheckAllGalleryGraphicFiles 'Checking the size ( > 0 Byte ) of all gallery-files. +' #1 tInsertGalleryObjects 'Inserting random objects via contextmenu-insert-copy. +' #0 LoadGraphic +' #0 CheckGraphic +' #0 makeNumOutOfText +' #1 tSettingsToCM 'Measurement unit for textdocuments to cm +' #1 tResetSettings 'Resetting the measurement unit for textdocuments. +'* +'\****************************************************************************** + +testcase tSettingsToCM + + printlog " Setting the measurement unit for textdocuments to cm." + printlog " +Tools / options / text documents / general" + ExitRestartTheOffice + WaitSlot (10000) + Call hNewDocument + ToolsOptions + hToolsOptions ( "WRITER", "General" ) + iSaveSetting = Masseinheit.GetSelIndex + Masseinheit.Select 2 + Kontext "ExtrasOptionenDlg" + ExtrasOptionenDlg.OK + Call hCloseDocument + +endcase +'------------------------------------------------------------------------- +testcase tLoad100GalleryGraphicFiles + + '/// Inserting all gallery graphics in a Writer document and checking the sizes. + Dim lsFiles (3000) as String + Dim lsGraphics (3000) as String + Dim i as Integer + Dim y as Integer + Dim t as Integer + Dim iCount as Integer + Dim corLoad as Boolean + Dim x as boolean + + '/// Geting all installed gallery objects out of the installation in a list. + if gNetzInst = TRUE then + GetAllFileList ( ConvertPath ( gOfficeBasisPath + "share\gallery\" ), "*.*", lsFiles () ) + else + GetAllFileList ( ConvertPath ( gOfficePath + "share\gallery\" ), "*.*", lsFiles () ) + end if + call GetOnlyGraphics ( lsFiles (), lsGraphics() ) + iCount = ListCount ( lsGraphics() ) + printlog " We have " + iCount + " graphics in the gallery." + '/// + Open a new document + call hNewDocument + + for i = 1 to 100 + for y = 1 to 1 + randomize + t = Int((iCount*Rnd)) + if (t<1) then 'just so we get it between 1 and the amount of items. + y = y - 1 + end if + next y + + corLoad = FALSE + try + '/// <i>Loop begin</i> + '/// + Inserting all gallery files and checking the sizes + '/// +- Iinsert / graphic / from file + '/// +- Check the size in 'format / graphics' on the <i>Type</i> tabpage + '/// +-- The size should noz be smaler than 17*25cm / photos 21*25cm + '/// + Deleting the graphic with <delete> of the keyboard + '/// <i>Loop ends</i> + x = LoadGraphic ( lsGraphics(t), corLoad ) + printlog + catch + ExceptLog + if corLoad = FALSE then + warnlog "Problems with " + lsGraphics(t) + ResetApplication + call hNewDocument + end if + endcatch + if (not x) then + printlog " Tested nr: " + t + " : " + lsGraphics(t) + end if + next i + + '/// Close the gallery ///' + ToolsGallery + WaitSlot (2000) + '/// Close the document ///' + call hCloseDocument +endcase 'tLoadAllGalleryGraphicFiles + +'------------------------------------------------------------------------- + +testcase tCheckAllGalleryGraphicFiles +'/// Checking the filesize of all gallery graphics. + Dim lsFiles (3000) as String + Dim lsGraphics (3000) as String + Dim i as Integer + Dim y as Integer + Dim t as Integer + Dim iCount as Integer + Dim corLoad as Boolean + Dim x as boolean + + '/// Geting all installed gallery objects out of the installation in a list. + if gNetzInst = TRUE then + GetAllFileList ( ConvertPath ( gOfficeBasisPath + "share\gallery\" ), "*.*", lsFiles () ) + else + GetAllFileList ( ConvertPath ( gOfficePath + "share\gallery\" ), "*.*", lsFiles () ) + end if + call GetOnlyGraphics ( lsFiles (), lsGraphics() ) + iCount = ListCount ( lsGraphics() ) + printlog " We have " + iCount + " graphics in the gallery." + '/// Open a new document + call hNewDocument + + for i=1 to iCount + corLoad = FALSE + try + '/// <i>Loop begin</i> + '///+ Inserting all gallery files and checking the sizes + '///+- Iinsert / graphic / from file + '///+- Check the size in 'format / graphics' on the <i>Type</i> tabpage + '///+-- The size should noz be smaler than 17*25cm / photos 21*25cm + '///+ Deleting the graphic with <delete> of the keyboard + '/// <i>Loop ends</i> + x = CheckGraphic ( lsGraphics(i), corLoad ) + catch + ExceptLog + if corLoad = FALSE then + warnlog "Problems with " + lsGraphics(i) + ResetApplication + call hNewDocument + end if + endcatch + if (not x) then + printlog " Tested nr: " + i + " : " + lsGraphics(i) + end if + next i + '/// Close the gallery ///' + ToolsGallery + WaitSlot (2000) + '/// Close the document ///' + call hCloseDocument +endcase 'tLoadAllGalleryGraphicFiles + +'------------------------------------------------------------------------- + +testcase tInsertGalleryObjects + Dim lsFiles (3000) as String + Dim lsGraphics (3000) as String + Dim CountOfThemes + Dim HowManyItems as Integer + Dim WhichOne as Integer + Dim CountOfItems as Integer + Dim ct as Integer + Dim i as Integer + Dim d as Integer + Dim iCount as Integer + Dim corLoad, x as Boolean + + '/// 1. Select theme ///' + call hNewDocument + call hOpenGallery + kontext "Gallery" + CountOfThemes = Gallerys.GetItemCount + for ct = 1 to CountOfThemes + Gallerys.Select ct + printlog " Selected Gallery-Theme nr: " + ct + ": " + Gallerys.GetSelText + kontext "Gallery" + CountOfItems = View.GetItemCount() + '/// 2. Choose if we should test 3,4 or 5 objects. ///' + for d = 1 to 1 + randomize + HowManyItems=Int((5*Rnd)+(3*Rnd)) + if CountOfItems = 0 then + QaErrorLog " There were no objects in the the gallery-theme on position: " + ct + else + if (HowManyItems<3) then 'just so we get it between 3 and 5. + d = d - 1 + else + printlog " Will now select and copy " + HowManyItems + " items from this Theme." + end if + for i = 1 to HowManyItems + '/// 3. Select the objects ///' + for x = 1 to 1 + randomize + WhichOne=Int(CountOfItems*RND) '(5*Rnd)+(CountOfItems*Rnd)) + if (WhichOne<1) then 'just so we get it between 1 and the amount of items. '>(CountOfItems + 1)) OR (WhichOne<1) then ' + x = x - 1 + end if + next x + printlog " Will copy object nr: " + WhichOne + View.Mousemove (1,1) + View.TypeKeys "<HOME>" + View.TypeKeys "<RIGHT>", (WhichOne) + kontext "GraphicObjectBar" + if GraphicObjectBar.Exists then + if GraphicObjectBar.IsDocked = False then GraphicObjectBar.Dock + end if + kontext "Gallery" + sleep (1) + View.TypeKeys("<shift f10>") + sleep (1) + try + dim number as integer + number = MenuGetItemCount + if (number > 2) AND (number < 10) then + '/// 4. Copy the selected item into our document. ///' + hMenuSelectNr (1) 'Insert + hMenuSelectNr (1) 'As Copy + sleep (1) + else + Warnlog " The contextmenu came up, but the number of entries were strange." + printlog " Number of entries:" + number + MenuSelect(0) + end if + catch + warnlog " A contextmenu didnt come up for the gallery-theme on position: " + ct + i = HowManyItems + endcatch + '/// 5. Repeat 3.-5. until 2. is fulfilled. ///' + next i + end if 'if the theme didnt have any objects, we landed here. + next d + '/// 6. Change Theme. ///' + '/// 7. Repeat 2. - 8. until all themes are done. ///' + next ct + + Kontext "Gallery" + if Gallery.Exists(2) then + ToolsGallery + WaitSlot (2000) + end if + + '/// Remove the last copied object. ///' + hTypeKeys "<DELETE>" + call hCloseDocument + +endcase 'tInsertGalleryObjects + +'------------------------------------------------------------------------- +testcase tResetSettings + + printlog "Resetting the measurement unit for textdocuments." + printlog "+Tools / options / text documents / general" + call hNewDocument + ToolsOptions + hToolsOptions ( "WRITER", "General" ) + Masseinheit.Select iSaveSetting + Kontext "ExtrasOptionenDlg" + ExtrasOptionenDlg.OK + call hCloseDocument + +endcase 'tResetSettings +'------------------------------------------------------------------------- diff --git a/testautomation/graphics/required/includes/global/id_001.inc b/testautomation/graphics/required/includes/global/id_001.inc new file mode 100644 index 000000000000..96d2b276eeaf --- /dev/null +++ b/testautomation/graphics/required/includes/global/id_001.inc @@ -0,0 +1,809 @@ +'encoding UTF-8 Do not remove or change this line! +'************************************************************************** +' DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. +' +' Copyright 2000, 2010 Oracle and/or its affiliates. +' +' OpenOffice.org - a multi-platform office productivity suite +' +' 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 : wolfram.garten@sun.com +'* +'* short description : +'* +'\****************************************************************************** + +testcase tiFileSaveAs + + dim sFileName as string ' test document & new created doc +' dim sFormula as string ' container for formula to create document with + dim sTemp as string + dim sFilter (50) as string + dim i as integer + dim x as integer + dim y as integer + dim Exlist(100) as string ' files to be deleted + dim sFile as string ' filename to export + dim sPath as string ' filename to export + dim sFilterName as string + dim sFileNameLoaded as string 'gets name of fiel from Dateiname that will be loaded + + + if (gApplication = "IMPRESS") then + ExtensionString = "odp" + else + ExtensionString = "odg" + end if + + sFilter (0) = 0 ' initalize ;-)... + printlog " used document: graphics\required\input\tbo_alf_.od?" + sFileName = "graphics\required\input\tbo_alf_." + ExtensionString ' this is the file with all features + printlog "FileName is " + sFileName + sFile = "isas_" ' this is the filename of the export files + sPath = ConvertPath ( gOfficePath + "user/work/graphics/required/"+gApplication+"\"+ gPlatform) ' this is the export path + printlog "sPath is " + sPath + if dir (sPath) = "" then + app.mkdir (sPath) + end if + + printlog " deleting all files in output directory: \\user\\work\\graphics\\required\\gApplication gPlatform isas_*" + if gSamePC = TRUE then ' delete export directory + GetFileList ( sPath, sFile+"*", Exlist() ) + if KillFileList ( Exlist() ) <> TRUE then + Warnlog "Couldn't delete all Files in Output-Export-Directory, the followings are still there:" + for i=1 to ListCount ( Exlist() ) + printlog " <> " + Exlist(i) + next i + end if + end if + + printlog "load a sample presentation file" + Call hFileOpen ( ConvertPath(gTesttoolPath + sFileName) ) + WaitSlot (3000) + + printlog "running 5 times save as with different Filters" + for i = 1 to 6 'run it 5 times + printlog "calling Save as Dialog" + FileSaveAs + WaitSlot (2000) + Kontext "SpeichernDlg" + printlog "Selecting filter according to number of run" + Dateityp.Select i + sFilterName = Dateityp.GetSelText + sFileName = sPath + sFile + (i) + printlog "Filename is " & sFileName + printlog "Filtername for this file is " & sFilterName + Dateiname.SetText (sFileName) + Speichern.Click + kontext "AlienWarning" + if AlienWarning.exists(5) then + AlienWarning.OK + end if + WaitSlot (5000) + next i + printlog "closing the sample file" + fileclose + WaitSlot (3000) + kontext "Messagebox" + if Messagebox.exists then + printlog "Messagebox about informationloss... :-) that's OK: 'Text in the messagebox: "+Messagebox.GetText+"'" + Messagebox.YES + end if + + printlog "Loading the former saved files:" + for i = 1 to 6 'run it 5 times + + FileOpen + Kontext "OeffnenDlg" + WaitSlot (2000) + DateiAuswahl.TypeKeys "<END>" + DateiAuswahl.TypeKeys "<HOME>" + if i <> 1 then + DateiAuswahl.TypeKeys "<DOWN>", (i-1) + endif + sFileNameLoaded = Dateiname.GetSelText + printlog "File will be loaded: " & sFileNameLoaded + Oeffnen.Click + printlog "Closing doc if it gets loaded: " & sFileNameLoaded + if gApplication = "IMPRESS" then + Kontext "DocumentImpress" + if DocumentImpress.exists(5) then + Call hCloseDocument + else + warnlog "File did not get loaded." + endif + else + Kontext "DocumentDraw" + if DocumentDraw.exists(5) then + Call hCloseDocument + else + warnlog "File did not get loaded." + endif + endif + WaitSlot (2000) + next i + +endcase 'tiFileSaveAs + +'------------------------------------------------------------------------------- + +testcase tiFileReload + + Dim DokumentPfad$ + Dim Datei$ + + if (gApplication = "IMPRESS") then + ExtensionString = "odp" + else + ExtensionString = "odg" + end if + + Datei$= (ConvertPath (gOfficePath + "user/work/graphics/required/version1." + ExtensionString)) + + if app.dir(ConvertPath (gOfficePath + "user/work/graphics/required/")) = "" then + app.mkdir (ConvertPath (gOfficePath + "user/work/graphics/required/")) + end if +printlog " open application" + Call hNewDocument + WaitSlot (2000) +printlog " save document ..." + Call hFileSaveAsKill (Datei$) + WaitSlot (2000) +printlog " close document " + Call hCloseDocument + +printlog " load document again " + Call hFileOpen (Datei$) + WaitSlot (2000) +printlog " type something in document " + call hTBOtypeInDoc + WaitSlot (2000) +printlog " File->Reload " + FileReload + WaitSlot (2000) +printlog " Messagebox has to come up; say NO" + Kontext "Messagebox" + sleep 2 + Messagebox.No + WaitSlot (2000) + +printlog " File->Reload " + FileReload + WaitSlot (2000) + Kontext "Messagebox" + sleep 2 +printlog " Messagebox has to come up; say YES" + Messagebox.Yes + WaitSlot (1000) + +printlog " close document" + Call hCloseDocument +printlog " delete document" + if Dir (Datei$) <> "" AND gSamePC = TRUE then kill Datei$ + +endcase 'tiFileReload + +'------------------------------------------------------------------------------- + +testcase tiFileVersion + + Dim DokumentPfad$ + Dim Datei$ + + if (gApplication = "IMPRESS") then + ExtensionString = "odp" + else + ExtensionString = "odg" + end if + + Datei$= (ConvertPath (gOfficePath + "user/work/graphics/required/erwin." + ExtensionString)) + 'if dir (ConvertPath (gOfficePath + "user/work/graphics/required/")) = "" then + if dir (Datei$) = "" then app.mkdir (ConvertPath (gOfficePath + "user/work/graphics/required/")) +printlog " open application" + Call hNewDocument + WaitSlot (1000) +printlog " save document as ..." + Call hFileSaveAsKill (Datei$) + WaitSlot (1000) +printlog " close document" + Call hCloseDocument + +printlog " open document again" + Call hFileOpen (Datei$) + WaitSlot (1000) +printlog " type something in document" + call hTBOtypeInDoc + WaitSlot (1000) +printlog " File->Versions " + try + FileVersions + catch + Warnlog "- File / Versions not accessible!" + goto endsub + endcatch + + Kontext "Versionen" + Call DialogTest ( Versionen ) +printlog " in Versions dialog press save " + Speichern.Click +printlog " type a comment" + Kontext "VersionskommentarEingeben" + Call DialogTest ( VersionskommentarEingeben ) +printlog " exit comment dialog with cancel" + VersionskommentarEingeben.Cancel + Kontext "Versionen" +printlog " close version dialog" + Versionen.Close +printlog " close document" + Call hCloseDocument +' if Dir (Datei$) <> "" AND gSamePC = TRUE then kill Datei$ + +endcase 'tiFileVersion + +'------------------------------------------------------------------------------- + +testcase tiFilePassword + + goto endsub + Dim DokumentPfad$ + Dim Datei$ + dim sFileName as string ' test document & new created doc +' dim sFormula as string ' container for formula to create document with + dim e as string + dim sTemp as string + dim sFilter (50) as string + dim i as integer + dim x as integer + dim y as integer + dim Exlist(100) as string ' files to be deleted + dim sFileIn as string ' filename to import + dim sFile as string ' filename to export + dim sPath as string ' and path to export + + if (gApplication = "IMPRESS") then + ExtensionString = "odp" + else + ExtensionString = "odg" + end if + +printlog " save file to: graphics\required\output\" + gApplication + "\" + gPlatform + "\" + sFile = "isp__" ' this is the filename of the export files + sPath = ConvertPath ( gOfficePath + "user/work/graphics/required/"+gApplication+"\"+ gPlatform+"\") ' this is the export path + mkdir (sPath) + if dir (sPath) = "" then app.mkdir (sPath) + sFileIn = (sPath + sFile + "." + ExtensionString) + printlog " deleting all files in output directory: \\graphics\required\output\\impress\\ gPlatform isp_* " + if gSamePC = TRUE then ' delete export directory + GetFileList ( sPath, sFile+"*", Exlist() ) + if KillFileList ( Exlist() ) <> TRUE then + Warnlog "Couldnt delete all Files in Output-Export-Directory, the followings are still there:" + for i=1 to ListCount ( Exlist() ) + printlog " <> " + Exlist(i) + next i + end if + end if + +printlog " open application " + Call hNewDocument + WaitSlot (1000) +printlog " File->SaveAs " + FileSaveAs + Kontext "SpeichernDlg" + Datei$ = ConvertPath ( sFileIn ) + printlog " will use the file: "+Datei$ + if Dir (Datei$) <> "" then + kill Datei$ + end if + printlog " check 'password'" + Passwort.Check + printlog " set 'filename'" + Dateiname.SetText Datei$ + printlog " press 'save'" + Speichern.Click + WaitSlot (2000) + Kontext "Passwort" + printlog " type password 12345, confirm password: 54321 -> WRONG " + PasswortName.SetText "12345" + PasswortBestaetigen.Settext "54321" + Passwort.OK + WaitSlot (2000) + Kontext "Messagebox" + printlog " messagebox has to show up, say OK, if messagebox doesnt come up -> ERROR " + if Messagebox.Exists(1) then + Messagebox.OK + else + Warnlog "- Wrong password not recognized" + end if + Kontext "Passwort" + printlog " type password 12345, confirm password: 12345 -> RIGHT " + PasswortName.SetText "12345" + PasswortBestaetigen.SetText "12345" + Passwort.OK + printlog " close document" + sleep 2 + FileClose + sleep 2 + + printlog " open document" + FileOpen + Kontext "OeffnenDlg" + WaitSlot (2000) + Dateiname.SetText Datei$ + Oeffnen.Click + WaitSlot (2000) + Kontext "PasswordFileOpen" + printlog " type password: 34567 -> WRONG " + PasswortName.SetText "34567" + try + PasswordFileOpen.OK + catch + Printlog "- Wrong password not accepted" + endcatch + Kontext + printlog " messagebox has to show up, say OK, if messagebox doesn't come up -> ERROR " + if Not Messagebox.Exists(1) then + Warnlog "Wrong password while loading not recognized" + else + Messagebox.OK + printlog "Wrong password on loading ok - recogniced" + end if + WaitSlot (3000) + Kontext "PasswordFileOpen" + printlog " type password: 12345 -> RIGHT" + PasswortName.SetText "12345" + PasswordFileOpen.OK + WaitSlot (5000) + printlog " File->SaveAs " + FileSaveAs + Kontext "SpeichernDlg" + Dateiname.SetText Datei$ + if (Passwort.IsChecked <> TRUE) then + Warnlog "Password has to be checked! :-(" + end if + printlog " press 'save', without changing any checkbox! -> file has to be saved WITH password protection " + Speichern.Click + WaitSlot (1000) + Kontext "Messagebox" + printlog " (if messagebox comes up, say YES)" + if Messagebox.Exists(5) then + Messagebox.Yes + end if + printlog " password dialog has to show up!" + Kontext "Passwort" + if (Passwort.Exists(5) = FALSE)then + Warnlog "- Password dialog Didn't pop up after pressing save" + else + Kontext "Passwort" + printlog " type password a12345, confirm password: a12345 -> RIGHT" + WaitSlot (1000) + PasswortName.SetText "a12345" + PasswortBestaetigen.SetText "a12345" + Passwort.OK + WaitSlot (1000) + printlog " close document" + FileClose + WaitSlot (1000) + end if + printlog " open document" + FileOpen + WaitSlot (2000) + Kontext "OeffnenDlg" + Dateiname.SetText Datei$ + Oeffnen.Click + Kontext "PasswordFileOpen" + WaitSlot (1000) + printlog " type password: a12345 -> RIGHT" + PasswortName.SetText "a12345" + PasswordFileOpen.OK + WaitSlot (5000) + printlog " File->SaveAs " + FileSaveAs + Kontext "SpeichernDlg" + Dateiname.SetText Datei$ + if (Passwort.IsChecked <> TRUE) then + Warnlog "Password has to be checked! :-(" + end if + Passwort.UnCheck + printlog " press 'save', without changing any checkbox! -> file has to be saved WITH password protection " + Speichern.Click + Kontext "Messagebox" + printlog " (if messagebox comes up, say YES)" + if Messagebox.Exists(5) then Messagebox.Yes + printlog " password dialog needn't to show up!" + Kontext "Passwort" + if (Passwort.Exists(5))then + Warnlog "- Password dialog didn't pop up after pressing save" + Kontext "Passwort" + password.cancel + printlog " close document " + FileClose + else + printlog " close document" + hCloseDocument + end if +endcase 'tiFilePassword + +'------------------------------------------------------------------------------- + +testcase tiFileTemplates + Call hNewDocument + + FileTemplatesOrganize + Kontext "DVVerwalten" + WaitSlot (1000) + Call DialogTest (DVVerwalten) + sleep 1 + PopuplisteLinks.Select 2 + WaitSlot (1000) + PopuplisteRechts.Select 2 + WaitSlot (1000) + WelcheDatei.Click + WaitSlot (1000) + Kontext "Oeffnendlg" + Call DialogTest (OeffnenDlg) + sleep 1 + OeffnenDlg.Cancel + WaitSlot (2000) + Kontext "DVVerwalten" + DVVerwalten.Close + +if gtSYSName = "Solaris x86" then + qaErrorLog "#i62423# - FileTemplatesAddressBookSource outcommented under x86. - FHA" +else + FileTemplatesAddressBookSource + Printlog "- AddressBookAssignment" + kontext "AddressBookSource" + Call DialogTest (AddressBookSource) + Administrate.Click + kontext "AddressSourceAutopilot" + AddressSourceAutopilot.Cancel + kontext "AddressBookSource" + AddressBookSource.Cancel +end if + + FileTemplatesSave + Printlog "- Save template" + WaitSlot (1000) + Kontext "Dokumentvorlagen" + sleep 1 + Call DialogTest (Dokumentvorlagen) + WaitSlot (1000) + Verwalten.Click + WaitSlot (2000) + Kontext "DVVerwalten" + Call DialogTest (DVVerwalten) + WaitSlot (3000) + DVVerwalten.Close + WaitSlot (1000) + Kontext "Dokumentvorlagen" + sleep 1 + Dokumentvorlagen.Cancel + WaitSlot (1000) + + try + FileTemplatesEdit + Printlog "- Edit template" + WaitSlot (1000) + Kontext "OeffnenDlg" + sleep 1 + Call DialogTest (OeffnenDlg) + WaitSlot (1000) + OeffnenDlg.Cancel + catch + Warnlog "- There are problems with File-Template-Save" + endcatch + WaitSlot (1000) + Call hCloseDocument +endcase 'tiFileTemplates + +'------------------------------------------------------------------------------- + +testcase tmFileNewFromTemplate + Call hNewDocument + FileNewFromTemplate + printlog " Open dialog with File / New / From Template" + WaitSlot (5000) + Kontext "TemplateAndDocuments" + printlog " Check if dialog has been opened" + if TemplateAndDocuments.NotExists then + Warnlog "Dialog Templates and Documents are not up!" + goto endsub + end if + Call DialogTest (TemplateAndDocuments) + WaitSlot (5000) + try + TemplateAndDocuments.Cancel + catch + endcatch + WaitSlot (5000) + Call hCloseDocument +endcase 'tmFileNewFromTemplate + +'------------------------------------------------------------------------------- + +testcase tmFileOpen + call hNewDocument + FileOpen + Kontext "OeffnenDlg" + UebergeordneterOrdner.Click + Standard.Click + NurLesen.check + Call DialogTest ( OeffnenDlg ) + OeffnenDlg.Cancel + WaitSlot (2000) + Call hCloseDocument +endcase 'tmFileOpen + +'------------------------------------------------------------------------------- + +testcase tmFileClose + printlog "- File Close" + hNewDocument + call hTBOtypeInDoc + WaitSlot (2000) + FileClose + Kontext + if active.exists (5) then + printlog " Ok, active came up: " + active.gettext + Active.Cancel + else + warnlog "active missing (1)" + end if + WaitSlot (2000) + + FileClose + Kontext + Active.Yes + WaitSlot (2000) + + Kontext "SpeichernDlg" + Call DialogTest ( SpeichernDlg ) + SpeichernDlg.Cancel + WaitSlot (2000) + + FileClose + Kontext + Active.No + WaitSlot (2000) +endcase 'tmFileClose + +'------------------------------------------------------------------------------- + +testcase tmFileSave + hNewDocument + call hTBOtypeInDoc + + FileSave + WaitSlot (2000) + Kontext "SpeichernDlg" + UebergeordneterOrdner.click + Standard.Click + Call DialogTest (SpeichernDlg) + Kontext "SpeichernDlg" + Standard.Click + SpeichernDlg.Cancel + WaitSlot (2000) + Call hCloseDocument +endcase 'tmFileSave + +'------------------------------------------------------------------------------- + +testcase tmFileSaveAs + + hNewDocument + WaitSlot (2000) + call hTBOtypeInDoc + + FileSaveAs + WaitSlot (2000) + Kontext "SpeichernDlg" + if (SpeichernDlg.exists (5) = FALSE) then + warnlog "FileSaveAs dialog is not visible" + end if + WaitSlot (2000) + Passwort.check + Passwort.uncheck + UebergeordneterOrdner.click + Standard.Click + + NeuerOrdner.click + kontext "NeuerOrdner" + neuerordner.cancel + Kontext "SpeichernDlg" + + Call DialogTest (SpeichernDlg) + + Kontext "SpeichernDlg" + SpeichernDlg.Cancel + WaitSlot (2000) + Call hCloseDocument +endcase 'tmFileSaveAs + +'------------------------------------------------------------------------------- + +testcase tmFileSaveAll + printlog "- File SaveAll" + + hNewDocument + call hTBOtypeInDoc + + Printlog " open 2. window" + hNewDocument + call hTBOtypeInDoc + + Printlog " call save all" + FileSaveAll + Printlog " cancel 1. save" + Kontext "SpeichernDlg" + SpeichernDlg.Cancel + + Printlog " cancel 2. save" + WaitSlot (2000) + Kontext "SpeichernDlg" + SpeichernDlg.Cancel + WaitSlot (2000) + + try + Kontext "SpeichernDlg" + SpeichernDlg.Cancel + printlog "smth had been typed in the starting window (just a hint ;-) )" + catch + printlog "--------- no other window wants to get saved. :-)" + endcatch + + WaitSlot (2000) + Printlog " hCloseDocument both" + Call hCloseDocument + sleep 2 + Printlog " first closed" + Call hCloseDocument + WaitSlot (2000) + Printlog " second closed" + WaitSlot (5000) +endcase 'tmFileSaveAll + +'------------------------------------------------------------------------------- + +testcase tmFileProperties + printlog "- File Properties" + + Call hNewDocument + FileProperties + + Kontext + active.SetPage TabDokument + Kontext "TabDokument" + Call DialogTest ( TabDokument ) + + Kontext + active.SetPage TabDokumentInfo + Kontext "TabDokumentInfo" + Call DialogTest ( TabDokumentInfo ) + + qaerrorlog "#i95523#" + 'Kontext + 'active.SetPage TabBenutzer + 'Kontext "TabBenutzer" + 'Call DialogTest ( TabBenutzer ) + 'Infofelder.Click + ' Kontext "InfonamenBearbeiten" + ' Call DialogTest (InfonamenBearbeiten) + 'InfonamenBearbeiten.Cancel + + Kontext + active.SetPage TabInternet + Kontext "TabInternet" + Call DialogTest (TabInternet) + TabInternet.Cancel + + Call hCloseDocument +endcase 'tmFileProperties + +'------------------------------------------------------------------------------- + +testcase tmFilePrinterSetting + printlog "- File Printersettings" + Call hNewDocument + WaitSlot (3000) + FilePrintersettings + kontext + if active.exists(5) then + active.ok + qaerrorlog "There is no printer available - please install one on your system!" + end if + WaitSlot (2000) + Kontext "DruckerEinrichten" + Call DialogTest (DruckerEinrichten) + sleep 2 + DruckerEinrichten.Cancel + WaitSlot (2000) + Call hCloseDocument +endcase 'tmFilePrinterSetting + +'------------------------------------------------------------------------------- + +testcase tdFileExport + goto endsub + dim x as integer +printlog " just call File->Export and exit " + Call hNewDocument + WaitSlot (3000) + FileExport + Kontext "ExportierenDlg" + Call DialogTest ( ExportierenDlg ) + UebergeordneterOrdner.Click + Kontext "SpeichernDlg" + printlog " check number of available export filters. it has to be 17 " + printlog "+ this is also done in the 'first test', I provide it just as an additional info here" + printlog "+ testcase: ExFilterCountCompare" + x=Dateityp.getitemcount + if x <> 18 then warnlog "the number of filters is not 18, it is: " + x + SpeichernDlg.Cancel + WaitSlot (2000) + Call hCloseDocument + WaitSlot (2000) +endcase 'tdFileExport + +'------------------------------------------------------------------------------- + +testcase tmFileExit + goto endsub + printlog "- File Close" + Call hNewDocument + WaitSlot (2000) + try + FileExit "SynchronMode", TRUE + WaitSlot (2000) + Kontext + WaitSlot (2000) + Kontext "MessageBox" + if MessageBox.Exists(1) then ' this is the messagebox from the first window! + Printlog MessageBox.GetText + try + MessageBox.OK + catch + MessageBox.No + endcatch + end if + Kontext "MessageBox" + if MessageBox.Exists(1) then + Warnlog "MsgBox popped up and there were no changes in the document" + Printlog MessageBox.GetText + try + MessageBox.OK + catch + MessageBox.No + endcatch + end if + catch + printlog "this exit is wanted :-)" + endcatch + try + WaitSlot (20000) + call hStartTheOffice ' from master.inc + catch + printlog "catch AGAIN" + endcatch + Kontext "SD_Praesentation" + if SD_Praesentation.exists (2) then + ViewToolbarsPresentation + end if +endcase 'tmFileExit diff --git a/testautomation/graphics/required/includes/global/id_002.inc b/testautomation/graphics/required/includes/global/id_002.inc new file mode 100644 index 000000000000..5880fc968806 --- /dev/null +++ b/testautomation/graphics/required/includes/global/id_002.inc @@ -0,0 +1,571 @@ +'encoding UTF-8 Do not remove or change this line! +'************************************************************************** +' DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. +' +' Copyright 2000, 2010 Oracle and/or its affiliates. +' +' OpenOffice.org - a multi-platform office productivity suite +' +' 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 : wolfram.garten@sun.com +'* +'* short description : +'* +'\****************************************************************************** +testcase tiEditUndoRedo + + printlog " open application" + printlog " Type a sentence into the document and do :" + printlog " Edit / Undo and Edit / Redo" + hNewDocument + call hTBOtypeInDoc + + EditUndo + WaitSlot (2000) + EditRedo + WaitSlot (2000) + printlog " close application" + Call hCloseDocument + +endcase 'tiEditUndoRedo +'--------------------------------------------------------- +testcase tiEditRepeat + + goto endsub 'Quaste, ask FHA + printlog " open application" + Call hNewDocument + +printlog " create 3 rectangles" + gMouseClick 50,50 + Call hRechteckErstellen ( 30, 10, 70, 30 ) + WaitSlot (1000) + Call hRechteckErstellen ( 20, 20, 60, 40 ) + WaitSlot (1000) + Call hRechteckErstellen ( 80, 50, 40, 20 ) + WaitSlot (1000) + printlog " [Modify | ContextMenu]->Arrange->SendBackward" + ContextArrangeBringBackward + WaitSlot (2000) + printlog " Edit->Repeat" + try + EditRepeat + catch + Warnlog " Menu entry is disabled #i26129#" + endcatch + + printlog " close application" + Call hCloseDocument + +endcase 'tiEditRepeat +'--------------------------------------------------------- +testcase tiEditCutPasteCopySelectall + + printlog " open application" + printlog " Type a sentence into the dokument and do : " + printlog " edit-> (Cut | Paste | Copy | SelectAll | Cut | Paste | DeleteContents) " + Call hNewDocument + + call hTBOtypeInDoc + + hUseAsyncSlot( "EditCut" ) + hUseAsyncSlot( "EditPaste" ) + hUseAsyncSlot( "EditCopy" ) + hUseAsyncSlot( "EditPaste" ) + hUseAsyncSlot( "EditSelectAll" ) + hUseAsyncSlot( "EditCut" ) + hUseAsyncSlot( "EditPaste" ) + hUseAsyncSlot( "EditDeleteContents" ) + + printlog " close application" + Call hCloseDocument + +endcase 'tiEditCutPasteCopySelectall +'--------------------------------------------------------- +testcase tiEditPasteSpecial + + printlog " open application" + Call hNewDocument + + printlog " put some words into the clipboard " + SetClipboard "This is a Text in the Clipboard" + + printlog " Edit->PasteSpecial" + hUseAsyncSlot( "EditPasteSpecial" ) + + Kontext "InhaltEinfuegen" + if ( InhaltEinfuegen.exists( 2 ) ) then + DialogTest ( InhaltEinfuegen ) + + printlog " close the dialog without inserting something" + hCloseDialog( InhaltEinfuegen, "Cancel" ) + else + warnlog( "Dialog <InhalteEinfuegen> did not open" ) + endif + + printlog " close application" + Call hCloseDocument + +endcase 'tiEditPasteSpecial +'--------------------------------------------------------- +testcase tiEditSearchAndReplace + + printlog " open application" + Call hNewDocument + + try + printlog " Edit->Find & Replace" + EditSearchAndReplace + WaitSlot (1000) + Kontext "FindAndReplace" + DialogTest ( FindAndReplace ) + + printlog " click on More Options" + More.Click + printlog " check 'similarity search' " + SimilaritySearch.Check ' culprint for errors if not resetted ! + WaitSlot (1000) + printlog " click '...' " + SimilaritySearchFor.Click + Kontext "Aehnlichkeitssuche" + DialogTest (Aehnlichkeitssuche ) + Aehnlichkeitssuche.Cancel + printlog " close dialog 'similarity search' " + Kontext "FindAndReplace" + printlog " UNcheck 'similarity search' " + SimilaritySearch.UnCheck + printlog " click on More Options" + More.Click + printlog " close dialog 'Find & Replace'" + FindAndReplace.Close + catch + Warnlog "EditSearchAndReplace caused an error" + endcatch + printlog " close application" + Call hCloseDocument + +endcase 'tiEditSearchAndReplace +'--------------------------------------------------------- +testcase tiEditDuplicate + + printlog " open application " + Call hNewDocument + printlog " create a rectangle" + call hTBOtypeInDoc + printlog " 'Edit->Select All' " + EditSelectAll + printlog " Edit->Duplicate " + EditDuplicate + + Kontext "Duplizieren" + Call DialogTest ( Duplizieren ) + printlog " cancel dialog 'duplicate'" + Duplizieren.Cancel + + Call hCloseDocument + printlog " close application" + +endcase 'tiEditDuplicate +'--------------------------------------------------------- +testcase tEditPoints + + printlog " open application " + Call hNewDocument + printlog " create a rectangle" + call hTBOtypeInDoc + printlog " 'Edit->Points'" + FormatEditPoints + printlog " 'Edit->Glue Points'" + EditGluePoints + printlog " close application" + Call hCloseDocument + +endcase 'tEditPoints +'--------------------------------------------------------- +testcase tiEditFields + + printlog " open application " + Call hNewDocument + WaitSlot (2000) + printlog " insert something to be able to use this function" + printlog "+ Insert->Fields->Date (fixed)" + printlog "+ deselect object, select, editmode " + InsertFieldsDateFix + WaitSlot (1000) + gMouseDoubleClick 10,10 + + hTypeKeys "<ESCAPE>" + printlog "With a Tab we catch always the Object" + hTypeKeys "<Tab>",3 + printlog "Here we enter Edit-Mode and therefore also the right place" + hTypeKeys "<F2>" + printlog "Here we enter Edit-Mode and therefore also the right place" + hTypeKeys "<Home>" + + try + printlog " Edit->Fields" + EditFieldsDraw + Kontext "FeldbefehlBearbeitenDraw" + Call DialogTest ( FeldbefehlBearbeitenDraw ) + printlog " cancel dialog 'Edit->Field' " + FeldbefehlBearbeitenDraw.Close + catch + Warnlog "- Slot could not be accessed" + endcatch + +printlog " close application" + Call hCloseDocument + +endcase 'tiEditFields +'-------------------------------------------------------- +testcase tdEditDeleteSlide + +printlog " open application " + Call hNewDocument +printlog " Insert->Slide" + InsertSlide + WaitSlot (2000) + hTypekeys "<Pagedown>" + WaitSlot (2000) + printlog " check with navigator, if slide is inserted " + printlog " check state of navigator ! expected: closed " + Kontext "Navigator" + sleep (2) + if Navigator.exists then + printlog "Navigator: open :-)" + else + printlog "Navigator: NOT available :-( Will be opened now!" + ViewNavigator + end if + WaitSlot (2000) + Kontext "NavigatorDraw" + if Liste.GetItemCount<>2 Then + Warnlog "- No slide inserted" + Kontext "Navigator" + Navigator.Close + Call hCloseDocument + goto endsub + else + Liste.Select 2 + printlog " Press Return to go to the selected slide" + Liste.Typekeys "<RETURN>" + Kontext "Navigator" + Navigator.Close + end if + WaitSlot (2000) + printlog " Edit->Delete Slide" + EditDeleteSlide + WaitSlot (2000) + printlog " close application " + Call hCloseDocument + +endcase 'tdEditDeleteSlide +'--------------------------------------------------------- +testcase tiEditLinks + + printlog " open application " + Call hNewDocument + + printlog " Insert a linked graphic : global\input\graf_inp\stabler.tif" + InsertGraphicsFromFile + Kontext "GrafikEinfuegenDlg" + try + if Link.Exists then + Link.Check + else + Warnlog "- Link in Insert graphic is not working" + end if + Dateiname.settext Convertpath (gTesttoolPath + "global\input\graf_inp\stabler.tif") + Oeffnen.Click + Kontext "Messagebox" + if Messagebox.Exists=True Then + Warnlog Messagebox.GetText + Messagebox.Ok + end if + InsertGraphicsFromFile + Kontext "GrafikEinfuegenDlg" + Link.Check + printlog " Insert a linked graphic : global\input\graf_inp\desp.bmp" + Dateiname.SetText ConvertPath (gTesttoolPath + "global\input\graf_inp\desp.bmp") + Oeffnen.Click + sleep 2 + kontext "Messagebox" + if Messagebox.Exists then + Warnlog Messagebox.GetText + Messagebox.OK + sleep 1 + end if + catch + Warnlog "Insert graphic caused errors" + endcatch + + WaitSlot (2000) + try + printlog " Edit->Links " + EditLinksDraw + WaitSlot (2000) + Kontext "VerknuepfungenBearbeiten" + Call DialogTest ( VerknuepfungenBearbeiten ) + printlog " close dialog 'Edit Links' " + VerknuepfungenBearbeiten.Close + WaitSlot (1000) + catch + Warnlog "- EditLinks could not be executed, could be the graphic was not imported" + endcatch + + printlog " close application " + Call hCloseDocument + +endcase 'tiEditLinks +'--------------------------------------------------------- +testcase tiEditImageMap + + printlog " open application " + Call hNewDocument + + printlog " Edit->Image Map " + EditImageMap + Kontext "ImageMapEditor" + sleep (1) + if ImageMapEditor.Exists (2) then + printlog "- ImageMap exists" + DialogTest ( ImageMapEditor ) + try + printlog " Close dialog 'Image Map Editor' " + ImageMapEditor.Close + Printlog "ImageMap closed using the close button" + catch + EditImageMap + Printlog "ImageMap closed using menue 'edit-imagemap'" + endcatch + else + warnlog "ImageMap didn't come up!" + end if + printlog " close application " + Call hCloseDocument + +endcase 'tiEditImageMap +'--------------------------------------------------------- +testcase tiEditObjectProperties + + dim i as integer + printlog " for every object, there are several edit options: " + printlog "+ starting with FloatingFrame->Properties " + printlog "+ file used for input in frame: global\input\graf_inp\desp.bmp" + + printlog " open application " + Call hNewDocument + + printlog " Insert->Floating Frame " + InsertFloatingFrame + WaitSlot (2000) + + Kontext "TabEigenschaften" + FrameName.SetText "Hello" + printlog " insert an picture into the frame (embedded into draw application" + Inhalt.SetText ConvertPath ( gTesttoolpath + "global\input\graf_inp\desp.bmp" ) + WaitSlot (2000) + TabEigenschaften.OK + WaitSlot (2000) + gMouseDoubleClick 1,1 + + printlog " select frame " + hTypekeys "<tab>",3 + + printlog " Edit->Object->Properties " + kontext + WaitSlot (2000) + EditObjectProperties + WaitSlot (1000) + Kontext "TabEigenschaften" + DialogTest ( TabEigenschaften ) + printlog " open Contents File Dialog " + sleep(1) + Oeffnen.Click + Kontext "OeffnenDlg" + Call DialogTest ( OeffnenDlg ) + printlog " Cancel 'Select File for Floating Frame'" + OeffnenDlg.Cancel + Kontext "TabEigenschaften" + TabEigenschaften.Cancel + + printlog " close application " + Call hCloseDocument + +endcase 'tiEditObjectProperties +'--------------------------------------------------------- +testcase tiEditObjectEdit + + printlog " OLE: edit & save copy as..." + printlog " open application " + dim i as integer + Call hNewDocument + + printlog " Insert->Object->OLE Object; select the first one in list, usually: 'StarOffice 6.0 Spreadsheet' " + InsertObjectOLEObject + WaitSlot (1000) + Kontext "OLEObjektEinfuegen" + ObjektTyp.Select 1 + OLEObjektEinfuegen.OK + WaitSlot (1000) + + gMouseClick 20,1 + + printlog " select object " + hTypekeys "<tab>",3 + + printlog " Edit->Object->Edit " + EditObjectEdit + printlog "try EditObjectEdit again, to see, if it is in edit mode !" + WaitSlot (2000) + try + ContextNameObject + warnlog " Couldn't get into edit mode!" + catch + printlog "Reached edit mode - ok :-)" + printlog " exit edit mode, by clicking outside the object " + gMouseClick 20,1 + endcatch + + printlog " select object " + hTypekeys "<tab>",3 + + printlog " Edit->Object->Save Copy As " + EditObjectSaveCopyAs + Kontext "SpeichernDlg" + Call DialogTest ( SpeichernDlg ) + printlog " cancel dialog 'Save As' " + SpeichernDlg.Cancel + WaitSlot (2000) + Kontext "Active" + if Active.Exists(2) then Active.No + printlog " close application " + Call hCloseDocument + +endcase'tiEditObjectEdit +'--------------------------------------------------------- +testcase tiEditPlugIn + + printlog " open application " + Call hNewDocument + + printlog " Insert->Object->Plugin " + InsertObjectPlugin + Kontext "PlugInEinfuegen" + ' DialogTest ( PlugInEinfuegen) + Durchsuchen.click + Kontext "OeffnenDlg" + ' Call DialogTest ( OeffnenDlg ) + if OeffnenDlg.exists (5) then + OeffnenDlg.Cancel + else + warnlog "Open file dialog didn't come up" + end if + WaitSlot (5000) + Kontext "PlugInEinfuegen" + if PlugInEinfuegen.exists then + printlog " insert a '.mov' file : graphics\required\input\sample.mov" + DateiUrl.SetText (ConvertPath ( gTesttoolpath + "graphics\required\input\sample.mov" )) + printlog " Type something into the option field, and delete it " + + Optionen.SetText "Fiddler's Green" + Optionen.TypeKeys "<HOME>" + Optionen.TypeKeys "<SHIFT><END>" + Optionen.TypeKeys "<delete>" + PlugInEinfuegen.Ok + else + warnlog "Insert plugin isn't visible" + end if + WaitSlot (5000) + kontext "Messagebox" + if Messagebox.exists (5) then + warnlog "Messagebox: " + Messagebox.gettext + Messagebox.ok + end if + printlog " Edit->Plugin " + EditPlugIn + printlog "Editplugin works!" + + printlog " close application " + Call hCloseDocument + +endcase 'tiEditPlugIn +'--------------------------------------------------------- +testcase tiEditHyperlink + + printlog " open application" + hNewDocument + Call sSelectEmptyLayout + printlog " Insert->Hyperlink" + InsertHyperlink + + kontext "HyperlinkDialog" + if ( HyperlinkDialog.exists( 2 ) ) then + + Kontext "Hyperlink" + Auswahl.MouseDown 50, 5 + Auswahl.MouseUp 50, 5 + Auswahl.typekeys "<PAGEDOWN><PAGEUP>" + Auswahl.typekeys "<TAB>" + sleep 1 + + Kontext "TabHyperlinkInternet" + printlog "Workaround to get rid of a Focusing-problem..." + NameText.Typekeys "alal <RETURN>" + NameText.Typekeys "<MOD1 A><DELETE>" + TabHyperlinkInternet.Typekeys "<TAB>", 6 + TabHyperlinkInternet.Typekeys "<LEFT>", 3 + printlog "End of workaround" + + Internet.Check + ZielUrl.SetText( "http://www.liegerad-fahrer.de" ) + + Uebernehmen.Click() + + kontext "HyperlinkDialog" + HyperlinkDialog.Close() + else + warnlog( "Failed to open <HyperlinkDialog>" ) + endif + printlog " presupposition to enable edit->hyperlink: <TAB><F2><STRG+a>" + hTypeKeys "<TAB>" + hTypeKeys "<F2>" + hTypeKeys "<MOD1 SHIFT RIGHT>" + EditSelectAll + try + printlog " Edit->Hyperlink " + EditHyperlinkDraw + + Kontext "HyperlinkDialog" + if ( HyperlinkDialog.Exists( 2 ) ) then + printlog " close dialog 'Hyperlink'" + HyperlinkDialog.Close() + else + Warnlog "- Hyperlinkdialog not up" + end if + catch + Warnlog "- Not able to edit Hyperlink!" + endcatch + + printlog " close application " + Call hCloseDocument + +endcase 'tiEditHyperlink +'--------------------------------------------------------- diff --git a/testautomation/graphics/required/includes/global/id_003.inc b/testautomation/graphics/required/includes/global/id_003.inc new file mode 100644 index 000000000000..16aa9f27bcd6 --- /dev/null +++ b/testautomation/graphics/required/includes/global/id_003.inc @@ -0,0 +1,343 @@ +'encoding UTF-8 Do not remove or change this line! +'************************************************************************** +' DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. +' +' Copyright 2000, 2010 Oracle and/or its affiliates. +' +' OpenOffice.org - a multi-platform office productivity suite +' +' 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 : wolfram.garten@sun.com +'* +'* short description : +'* +'\****************************************************************************** +testcase tiViewNavigator + + printlog " open application " + Call hNewDocument + + Kontext "NavigatorDraw" + printlog " if 'Navigator' isn't already open, open it (View->Navigator)" + if Not NavigatorDraw.Exists Then + ViewNavigator + end if + Kontext "NavigatorDraw" + Call DialogTest ( NavigatorDraw ) + + try + Kontext "Navigator" + printlog " close 'Navigator' " + Navigator.Close + catch + Errorlog " Navigator wasn't closed, second try with Menu" + ViewNavigator + endcatch + printlog " close application " + Call hCloseDocument + +endcase 'tiViewNavigator +'------------------------------------------------------------------------- +testcase tiViewZoom + + printlog " open application " + Call hNewDocument + UseBindings + ViewZoom + Kontext "Massstab" + DialogTest ( Massstab ) + Massstab.Cancel + printlog " close application " + Call hCloseDocument + +endcase 'tiViewZoom +'------------------------------------------------------------------------- +testcase tiViewToolbar + + printlog " including ruler & statusbar " + printlog " open application " + Call hNewDocument + + printlog " View->Toolbars->ThreeDSettings " + ViewToolbarsThreeDSettings + WaitSlot (1000) + printlog " View->Toolbars->ThreeDSettings " + ViewToolbarsThreeDSettings + WaitSlot (1000) + + printlog " View->Toolbars->Align " + ViewToolbarsAlign + WaitSlot (1000) + printlog " View->Toolbars->Align " + ViewToolbarsAlign + WaitSlot (1000) + + printlog " View->Toolbars->Tools " + ViewToolbarsTools + WaitSlot (1000) + printlog " View->Toolbars->Tools " + ViewToolbarsTools + WaitSlot (1000) + + printlog " View->Toolbars->Bezier " + ViewToolbarsBezier + WaitSlot (1000) + printlog " View->Toolbars->Bezier " + ViewToolbarsBezier + WaitSlot (1000) + + printlog " View->Toolbars->Fontwork " + ViewToolbarsFontwork + WaitSlot (1000) + printlog " View->Toolbars->Fontwork " + ViewToolbarsFontwork + WaitSlot (1000) + + ' if gApplication = "IMPRESS" then + printlog " View->Toolbars->Presentation " + ' ViewToolbarsPresentation ' only in impress, not draw + printlog " View->Toolbars->Presentation " + ' ViewToolbarsPresentation + ' endif + + printlog " View->Toolbars->Form Controls " + ViewToolbarsFormControls + WaitSlot (1000) + printlog " View->Toolbars->Form Controls " + ViewToolbarsFormControls + WaitSlot (1000) + +'----------------- + printlog " View->Toolbars->Form Design " + ViewToolbarsFormDesign + WaitSlot (1000) + printlog " View->Toolbars->Form Design " + ViewToolbarsFormDesign + WaitSlot (1000) + + printlog " View->Toolbars->FormNavigation " + ViewToolbarsFormNavigation + WaitSlot (1000) + printlog " View->Toolbars->FormNavigation " + ViewToolbarsFormNavigation + WaitSlot (1000) + + printlog " View->Toolbars->Gluepoints " + ViewToolbarsGluepoints + WaitSlot (1000) + printlog " View->Toolbars->Gluepoints " + ViewToolbarsGluepoints + WaitSlot (1000) + printlog " View->Toolbars->Insert " + ViewToolbarsInsert + WaitSlot (1000) + printlog " View->Toolbars->Insert " + ViewToolbarsInsert + WaitSlot (1000) + + printlog " View->Toolbars->Graphic " + ViewToolbarsGraphic + WaitSlot (1000) + printlog " View->Toolbars->Graphic " + ViewToolbarsGraphic + WaitSlot (1000) + + printlog " View->Toolbars->MediaPlayback " + ViewToolbarsMediaPlayback + WaitSlot (1000) + printlog " View->Toolbars->MediaPlayback " + ViewToolbarsMediaPlayback + WaitSlot (1000) + + printlog " View->Toolbars->Optionbar " + ViewToolbarsOptionbar + WaitSlot (1000) + printlog " View->Toolbars->Optionbar " + ViewToolbarsOptionbar + WaitSlot (1000) + + printlog " View->Toolbars->Picture " + ViewToolbarsPicture + WaitSlot (1000) + printlog " View->Toolbars->Picture " + ViewToolbarsPicture + WaitSlot (1000) + + printlog " View->Toolbars->Standard " + ViewToolbarsStandard + WaitSlot (1000) + printlog " View->Toolbars->Standard " + ViewToolbarsStandard + WaitSlot (1000) + + printlog " View->Toolbars->Standard View " + ViewToolbarsStandardView + WaitSlot (1000) + printlog " View->Toolbars->Standard View " + ViewToolbarsStandardView + WaitSlot (1000) + + printlog " View->Toolbars->Hyperlinkbar " + ViewToolbarsHyperlinkbar + WaitSlot (1000) + printlog " View->Toolbars->Hyperlinkbar " + ViewToolbarsHyperlinkbar + WaitSlot (1000) + + printlog " View->Toolbars->ColorBar " + ViewToolbarsColorBar + WaitSlot (1000) + printlog " View->Toolbars->ColorBar " + ViewToolbarsColorBar + WaitSlot (1000) + + printlog " View->Toolbars->Customize " + ViewToolbarsCustomize + WaitSlot (1000) + Kontext + printlog " switch to tabpage 'Menus' " + try + Messagebox.SetPage TabCustomizeMenu ' 1 ------------------ + catch + warnlog "couldn't switch to tabpage 'Menus'" + endcatch + Kontext "TabCustomizeMenu" + if TabCustomizeMenu.exists(5) then + Call DialogTest ( TabCustomizeMenu ) + Menu.typeKeys("<down>") + Entries.typeKeys("<down>") + sleep 2 + printlog " click button 'new' " + BtnNew.Click + sleep 1 + printlog " Dialog 'New Menu' comes up " + Kontext "MenuOrganiser" + Call DialogTest ( MenuOrganiser ) + printlog " Cancel dialog 'New Menu' " + MenuOrganiser.cancel + sleep 1 + Kontext "TabCustomizeMenu" + TabCustomizeMenu.Close + end if + sleep (1) + + printlog " close application " + Call hCloseDocument + +endcase 'tiViewToolbar +'------------------------------------------------------------------------- +testcase tiViewDisplayQuality + + printlog " open application " + Call hNewDocument + + printlog " create a rectangle " + Call hRechteckErstellen 20,20,40,40 + + try + printlog " View->Display Quality->Black and White " + ViewQualityBlackWhite + Printlog "- Quality set to black and white" + catch + Warnlog "- Slot could not be accessed" + endcatch + WaitSlot (1000) + try + printlog " View->Display Quality->Greyscale " + ViewQualityGreyscale + Printlog "- View quality set to greyscale" + catch + Warnlog "- View quality greyscale could not be accessed" + endcatch + WaitSlot (1000) + try + printlog " View->Display Quality->Colour " + ViewQualityColour + Printlog "- View quality set to colour" + catch + Warnlog "- View quality colour could not be accessed" + endcatch + printlog " close application " + Call hClosedocument + +endcase 'tiViewDisplayQuality +'------------------------------------------------------------------------- +testcase tiViewLayer + + printlog " open application " + Call hNewDocument + printlog " Insert->Layer / in impress: ???? " + + printlog " View->Layer " + ViewLayer + WaitSlot (1000) + printlog " View->Layer " + ViewLayer + printlog " close application " + Call hCloseDocument + +endcase 'tiViewLayer +'------------------------------------------------------------------------- +testcase tViewGrid + + printlog " open application " + Call hNewDocument + + printlog " View->Grid-> " + ViewGridVisible + printlog " View->Grid-> " + ViewGridUse + printlog " View->Grid-> " + ViewGridFront + printlog " View->Grid-> " + ViewGridVisible + printlog " View->Grid-> " + ViewGridUse + printlog " View->Grid-> " + ViewGridFront + WaitSlot (1000) + printlog " close application " + Call hCloseDocument + +endcase 'tViewGrid +'------------------------------------------------------------------------- +testcase tViewSnapLines + + printlog " open application " + Call hNewDocument + + printlog " View->Snap Lines-> " + ViewSnapLinesVisible + printlog " View->Snap Lines-> " + ViewSnapLinesUse + printlog " View->Snap Lines-> " + ViewSnapLinesFront + printlog " View->Snap Lines-> " + ViewSnapLinesVisible + printlog " View->Snap Lines-> " + ViewSnapLinesUse + printlog " View->Snap Lines-> " + ViewSnapLinesFront + WaitSlot (1000) + printlog " close application " + Call hCloseDocument + +endcase 'tViewSnapLines diff --git a/testautomation/graphics/required/includes/global/id_004.inc b/testautomation/graphics/required/includes/global/id_004.inc new file mode 100644 index 000000000000..e6f154f169c8 --- /dev/null +++ b/testautomation/graphics/required/includes/global/id_004.inc @@ -0,0 +1,502 @@ +'encoding UTF-8 Do not remove or change this line! +'************************************************************************** +' DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. +' +' Copyright 2000, 2010 Oracle and/or its affiliates. +' +' OpenOffice.org - a multi-platform office productivity suite +' +' 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 : wolfram.garten@sun.com +'* +'* short description : +'* +'\****************************************************************************** +testcase tiInsertSlide + + printlog "Dateiname.settext Convertpath (gTesttoolPath + global\input\graf_inp\stabler.tif) " + printlog "open application" + Call hNewDocument + printlog "Insert->Slide" + InsertSlide + WaitSlot (2000) + hTypekeys "<Pagedown>" + WaitSlot (2000) 'sleep 2 + printlog "close application" + Call hCloseDocument + +endcase 'tiInsertSlide +'-------------------------------------------------------- +testcase tiInsertDuplicateSlide + + printlog "open application" + Call hNewDocument + printlog "create rectangle" + Call hRechteckErstellen ( 30, 40, 40, 50 ) + printlog "Insert->Duplicate Slide" + InsertDuplicateSlide + WaitSlot (2000) + printlog "close application" + Call hCloseDocument + +endcase 'tiInsertDuplicateSlide +'-------------------------------------------------------- +testcase tiInsertField + + printlog "open application" + Call hNewDocument + + printlog "Insert->Fields->Time (fixed)" + InsertFieldsTimeFix + WaitSlot (1000) + printlog "OK Time Fix" + printlog "delete it with EditSelectAll + <Delete> " + EditSelectAll + hTypekeys "<Delete>" + sleep 1 + + printlog "Insert->Fields->Date (fixed) " + InsertFieldsDateFix + WaitSlot (1000) + printlog "OK Date Fix" + printlog "delete it with EditSelectAll + <Delete> " + EditSelectAll + hTypekeys "<Delete>" + sleep 1 + + printlog "Insert->Fields->Time (variable) " + InsertFieldsTimeVariable + WaitSlot (1000) + printlog "OK Time Variabel" + printlog "delete it with EditSelectAll + <Delete> " + EditSelectAll + hTypekeys "<Delete>" + sleep 1 + + printlog "Insert->Fields->Date (variable) " + InsertFieldsDateVariable + WaitSlot (1000) + printlog "OK Date Variabel" + printlog "delete it with EditSelectAll + <Delete> " + EditSelectAll + hTypekeys "<Delete>" + sleep 1 + + printlog "Insert->Fields->Author " + InsertFieldsAuthorDraw + WaitSlot (1000) + printlog "OK Author" + printlog "delete it with EditSelectAll + <Delete> " + EditSelectAll + hTypekeys "<Delete>" + sleep 1 + + printlog "Insert->Fields->Page Numbers" + InsertFieldsPageNumberDraw + WaitSlot (1000) + printlog "OK Page number" + printlog "delete it with EditSelectAll + <Delete> " + EditSelectAll + hTypekeys "<Delete>" + sleep 1 + + printlog "Insert->Fields->Filename " + InsertFieldsFileName + WaitSlot (1000) 'sleep 1 + printlog "OK File name" + printlog "delete it with EditSelectAll + <Delete> " + EditSelectAll + hTypekeys "<Delete>" + sleep 2 + printlog "close application " + Call hCloseDocument + +endcase 'tiInsertField +'-------------------------------------------------------- +testcase tiInsertSpecialCharacter + + printlog "open application " + Call hNewDocument + + printlog "insert text " + hTextrahmenErstellen ("This is a testtext",30,40,60,50) + sleep 2 + printlog "Insert->SpecialCharacter " + InsertSpecialCharacterDraw + WaitSlot (2000) + Kontext "Sonderzeichen" + Call DialogTest (Sonderzeichen) + printlog "cancel dialog 'Special Characters' " + Sonderzeichen.Cancel + sleep 2 + printlog "close application " + Call hCloseDocument + +endcase 'tiInsertSpecialCharacter +'-------------------------------------------------------- +testcase tiInsertHyperlink + + printlog "open application " + Call hNewDocument + printlog "Insert->Hyperlink " + InsertHyperlink + + kontext "HyperlinkDialog" + if ( HyperlinkDialog.exists( 2 ) ) then + + Kontext "TabHyperlinkInternet" + + Auswahl.MouseDown 50, 5 + Auswahl.MouseUp 50, 5 + Auswahl.typekeys "<PAGEDOWN><PAGEUP>" + Auswahl.typekeys "<TAB>" + + printlog "Workaround to get rid of a Focusing-problem..." + NameText.Typekeys "alal <RETURN>" + NameText.Typekeys "<MOD1 A><DELETE>" + TabHyperlinkInternet.Typekeys "<TAB>", 6 + TabHyperlinkInternet.Typekeys "<LEFT>", 3 + printlog "End of workaround..." + + Internet.Check + ZielUrl.Settext "http://www.nowhere.com" + + Uebernehmen.Click() + + kontext "HyperlinkDialog" + HyperlinkDialog.Close() + + else + warnlog "Failed to open hyperlink ??!!" + end if + printlog "close application " + Call hCloseDocument + +endcase 'tiInsertHyperlink +'-------------------------------------------------------- +testcase tiInsertGraphic + + printlog "open application " + Call hNewDocument + printlog "Insert->Graphics " + InsertGraphicsFromFile + WaitSlot (2000) ' + try + Kontext "GrafikEinfuegenDlg" + printlog "if checkbox 'link' is available, check it; if not available: ERROR " + if Link.exists then + Link.Check + else + Warnlog "Linking grafik doesn't work :-(" + end if + printlog "if checkbox 'Preview' is available, check it; if not available: ERROR " + if Preview.exists then + Preview.Check + else + Warnlog "Preview of graphic doesn't work :-(" + end if + DialogTest (GrafikEinfuegenDlg) + printlog " use file: global\input\graf_inp\stabler.tif) " + Dateiname.settext Convertpath (gTesttoolPath + "global\input\graf_inp\stabler.tif") + printlog "click 'open' " + Oeffnen.click + catch + Warnlog "Insert graphic doesn't work :-(" + endcatch + + printlog "close application " + Call hCloseDocument + +endcase 'tiInsertGraphic +'-------------------------------------------------------- +testcase tiInsertObjectSound + + goto endsub ' disabled for final, because always wrong (TZ 01/2002) + 'TODO: TBO: enhance! + printlog "open application " + Call hNewDocument + try + printlog " Insert->Object->Sound " + InsertObjectSound + WaitSlot (1000) + Kontext "OeffnenDlg" + 'Call Dialogtest (OeffnenDlg) ' just be sure to check one pth and one open dialog : TZ 28.11.201 + printlog "cancel file open dialog " + OeffnenDlg.Cancel + catch + printlog "'Insert -> Object -> Sound' not available. TestDevelopmentInProgress (TDIP) ;-)" + endcatch + printlog "close application " + Call hCloseDocument + +endcase 'tiInsertObjectSound +'-------------------------------------------------------- +testcase tiInsertObjectVideo + + goto endsub + 'TODO: TBO: enhance! + printlog " open application " + Call hNewDocument + try + printlog "Insert->Object->Video " + InsertObjectVideo + Kontext "OeffnenDlg" + 'Call Dialogtest (OeffnenDlg) + WaitSlot (1000) + printlog "cancel file open dialog " + OeffnenDlg.Cancel + catch + printlog "'Insert -> Object -> Video' not available. (TDIP) ;-)" + endcatch + printlog "close application " + Call hCloseDocument + +endcase 'tiInsertObjectVideo +'-------------------------------------------------------- +testcase tiInsertChart + + printlog "open application " + Call hNewDocument + printlog "Insert->Chart " + InsertChart + WaitSlot (2000) + Kontext "Messagebox" + if Messagebox.Exists then + Warnlog Messagebox.GetText + Messagebox.OK + sleep 1 + end if + gMouseClick 1,1 + sleep 2 + printlog "close application " + Call hCloseDocument + +endcase 'tiInsertChart +'-------------------------------------------------------- +testcase tiInsertObjectOLEObjects + + printlog "open application " + hNewDocument + printlog "Insert->Object->OLEObjekts " + InsertObjectOLEObject + Kontext "OLEObjektEinfuegen" + 'Call Dialogtest ( OLEObjektEinfuegen ) + 'NeuErstellen.Check ' is default value + Call DialogTest (OLEObjektEinfuegen, 1) + printlog "check 'Create from file' " + AusDateiErstellen.Check + Call DialogTest (OLEObjektEinfuegen, 2) + printlog "click 'Search...' " + Durchsuchen.click + Kontext "OeffnenDlG" + printlog "cancel file open dialog " + OeffnenDLG.Cancel + Kontext "OLEObjektEinfuegen" + printlog "cancel dialog 'insert OLE Object' " + OLEObjektEinfuegen.Cancel + sleep 1 + printlog "close application " + Call hCloseDocument + +endcase 'tiInsertObjectOLEObjects +'-------------------------------------------------------- +testcase tiInsertSpreadsheet + + if gtSYSName = "Linux" then + printlog "Linux = wont test tiInsertSpreadsheet" + goto endsub + endif + + printlog "open application " + Call hNewDocument + WaitSlot (2000) + printlog "Insert->Spreadsheet " + InsertSpreadsheetDraw + WaitSlot (2000) + Kontext "Messagebox" + if Messagebox.Exists (5) then + Warnlog Messagebox.GetText + Messagebox.OK + end if + sleep 2 + printlog "click somewhere out of the object, to deselect it " + gMouseClick 1,1 + sleep 1 + printlog "select and delete object with keys: <Tab><Delete> " + hTypekeys "<Tab><Delete>" + sleep 2 + printlog "close application " + Call hCloseDocument + +endcase 'tiInsertSpreadsheet +'-------------------------------------------------------- +testcase tiInsertFormula + + printlog "open application " + Call hNewDocument + printlog "Insert->Object->Formula " + InsertObjectFormulaDraw + WaitSlot (2000) + Kontext "Messagebox" + if Messagebox.Exists then + Warnlog Messagebox.GetText + Messagebox.OK + sleep 1 + end if + printlog "click somewhere out of the object, to deselect it " + gMouseClick 1,1 + sleep 1 + printlog "select and delete object with keys: <Tab><Delete> " + hTypekeys "<Tab><Delete>" + printlog "close application " + Call hCloseDocument + +endcase 'tiInsertFormula +'-------------------------------------------------------- +testcase tiInsertFloatingFrame + + printlog "open application " + Call hNewDocument + printlog "Insert->Floating Frame " + InsertFloatingFrame + WaitSlot (2000) + Kontext "TabEigenschaften" + Dialogtest (TabEigenschaften) + printlog "click '...' " + Oeffnen.Click + Kontext "OeffnenDlg" + sleep 1 + printlog "cancel file open dialog " + OeffnenDlg.Cancel + Kontext "TabEigenschaften" + printlog "cancel dialog 'Floating Frame Properties' " + TabEigenschaften.Cancel + printlog "close application " + Call hCloseDocument + +endcase 'tiInsertFloatingFrame +'-------------------------------------------------------- +testcase tiInsertFile + + printlog "open application " + Call hNewDocument + WaitSlot (1000) + printlog "Insert->File " + InsertFileDraw + WaitSlot (1000) + Kontext "OeffnenDLG" + 'Call Dialogtest ( OeffnenDLG ) + printlog "cancel file open dialog " + OeffnenDLG.Cancel + printlog "close application " + Call hCloseDocument + +endcase 'tiInsertFile +'-------------------------------------------------------- +testcase tiInsertPlugin + + printlog "open application " + call hNewDocument + printlog "Insert->Object->PlugIn " + InsertObjectPlugIn + Kontext "PluginEinfuegen" + if PluginEinfuegen.exists (5) then + call Dialogtest (PluginEinfuegen) + printlog "click 'browse' " + Durchsuchen.Click + sleep 1 + Kontext "Messagebox" + if Messagebox.Exists (5) Then + Warnlog Messagebox.GetText + Messagebox.OK + else + printlog "No Messagebox :-)" + end if + Kontext "OeffnenDlG" + if OeffnenDlG.exists (5) then + sleep 1 + printlog "cancel file open dialog " + OeffnenDLG.Cancel + end if + Kontext "PluginEinfuegen" + printlog "cancel dialog 'Insert Plug-in' " + if PluginEinfuegen.exists (5) then PluginEinfuegen.Cancel + else + warnlog "Insert Plugin does not work :-(" + end if + printlog "close application " + Call hCloseDocument + +endcase 'tiInsertPlugin +'-------------------------------------------------------- +testcase tiInsertScan + + goto endsub + printlog "DISABLED because not able to make automatic :-( " + printlog "open application " + Call hNewDocument + printlog "Insert->Scan->Request " + InsertScanRequest ' as long as there is no scanner available, nothing happens + WaitSlot (1000) + printlog " Insert->Scan->SelectSource " + InsertScanSelectSource + WaitSlot (1000) + printlog "Not testable, not translatable, just callable, because of systemdialog :-(" + printlog "close application " + Call hCloseDocument + +endcase 'tiInsertScan +'-------------------------------------------------------- +testcase tiInsertSnappointLine + + printlog "open application " + Call hNewDocument + printlog "DRAW : Insert->Snap Point/Line " + printlog "+ IMPRESS: available via Kontext menu: Insert->Snap Point/Line " + InsertSnapPointLine + Kontext "NeuesFangobjekt" + DialogTest ( NeuesFangobjekt ) + printlog "Cancel dialog 'New Snap Object' " + NeuesFangobjekt.Cancel + sleep 2 + printlog "close application " + Call hCloseDocument + +endcase 'tiInsertSnappointLine +'-------------------------------------------------------- +testcase tdInsertLayer + + printlog "open application " + Call hNewDocument + WaitSlot (1000) + printlog "View->Layer " + ViewLayer + printlog "Insert->Layer " + InsertLayer + Kontext "EbeneEinfuegenDlg" + DialogTest ( EbeneEinfuegenDlg ) + printlog "cancel dialog 'Insert Layer' " + EbeneEinfuegenDlg.Cancel + printlog "close application " + Call hCloseDocument + +endcase 'tdInsertLayer + diff --git a/testautomation/graphics/required/includes/global/id_005.inc b/testautomation/graphics/required/includes/global/id_005.inc new file mode 100644 index 000000000000..97fea2b33dae --- /dev/null +++ b/testautomation/graphics/required/includes/global/id_005.inc @@ -0,0 +1,1013 @@ +'encoding UTF-8 Do not remove or change this line! +'************************************************************************** +' DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. +' +' Copyright 2000, 2010 Oracle and/or its affiliates. +' +' OpenOffice.org - a multi-platform office productivity suite +' +' 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 : wolfram.garten@sun.com +'* +'* short description : +'* +'\****************************************************************************** +testcase tiFormatDefault + + printlog "open application" + Call hNewDocument + printlog "create rectangle" + gMouseClick 50,50 + Call hRechteckErstellen ( 10, 10, 20, 40 ) + printlog "Format->Default" + FormatStandardDraw + printlog "close application" + Call hCloseDocument + +endcase 'tiFormatDefault +'--------------------------------------------------------------------------------------- +testcase tiFormatLine + + printlog "open application" + hNewDocument + printlog "create rectangle" + gMouseClick 50,50 + Call hRechteckErstellen ( 10, 10, 20, 40 ) + printlog "Format->Line" + FormatLine + printlog "switch to tabpage 'Line'" + Kontext + Messagebox.SetPage TabLinie + kontext "TabLinie" + Call DialogTest ( TabLinie ) + + printlog "switch to tabpage 'Line Styles'" + Kontext + Messagebox.SetPage TabLinienstile + kontext "TabLinienstile" + Call DialogTest ( TabLinienstile ) + printlog "click 'add...'" + Hinzufuegen.click + Kontext "NameDLG" + Call DialogTest ( NameDlg ) + printlog "cancel dialog 'name'" + NameDlg.Cancel + + kontext "TabLinienstile" + printlog "click 'modify...'" + Aendern.Click + Kontext "NameDlg" + Call DialogTest ( NameDlg ) + printlog "cancel dialog 'name'" + NameDlg.Cancel + kontext "TabLinienstile" + printlog "click 'delete...'" + Loeschen.Click + printlog "say NO to messagebox" + Kontext "Messagebox" + Messagebox.no + + kontext "TabLinienstile" + printlog "click 'load line styles'" + Oeffnen.click + Kontext "OeffnenDLG" + call Dialogtest (OeffnenDLG) + printlog "cancel dialog 'open'" + OeffnenDLG.Cancel + kontext "TabLinienstile" + printlog "click 'save line styles'" + Speichern.click + Kontext "SpeichernDLG" + call Dialogtest (SpeichernDLG) + printlog "cancel dialog 'save'" + SpeichernDLG.Cancel + printlog "switch to tabpage 'Arrow Styles'" + Kontext + Messagebox.SetPage TabLinienenden + kontext "TabLinienenden" + Call DialogTest ( TabLinienenden ) + printlog "click 'add...'" + Hinzufuegen.Click + Kontext "NameDLG" + Call DialogTest ( NameDlg ) + printlog "cancel dialog 'name'" + NameDlg.Cancel + + kontext "TabLinienenden" + printlog "click 'modify...'" + Aendern.Click + Kontext "Messagebox" + try + printlog "say OK to messagebox" + Messagebox.OK + catch + 'print "TabLinienenden" + endcatch + + kontext "NameDlg" + Call DialogTest ( NameDlg ) + printlog "cancel dialog 'name'" + NameDlg.Cancel + + kontext "TabLinienenden" + printlog "click 'delete...'" + Loeschen.Click + Kontext "Messagebox" + printlog "say NO to messagebox" + Messagebox.no + + kontext "TabLinienenden" + printlog "click 'load arrow styles'" + Oeffnen.click + Kontext "OeffnenDLG" + call Dialogtest (OeffnenDLG) + printlog "cancel dialog 'open'" + OeffnenDLG.Cancel + kontext "TabLinienenden" + printlog "click 'save arrow styles'" + Speichern.click + Kontext "SpeichernDLG" + call Dialogtest (SpeichernDLG) + printlog "cancel dialog 'save'" + SpeichernDlg.Cancel + kontext "TabLinienenden" + printlog "cancel dialog 'line'" + TabLinienenden.cancel + printlog "close application" + Call hCloseDocument + +endcase 'tiFormatLine +'--------------------------------------------------------------------------------------- +testcase tdFormatArea + + printlog "open application" + Call hNewDocument + printlog "create rectangle" + gMouseClick 50,50 + Call hRechteckErstellen (15,15,65,65) + gMouseClick 30,30 + printlog "Format->Area" + FormatArea + WaitSlot (1000) + Kontext + printlog "switch to tabpage 'Area'" + Messagebox.SetPage TabArea + Kontext "TabArea" + Call DialogTest ( TabArea ) + Kontext + printlog "switch to tabpage 'Shadow'" + Messagebox.SetPage TabSchatten + kontext "TabSchatten" + Anzeigen.Check + Call DialogTest ( TabSchatten ) + printlog "switch to tabpage 'Transparency'" + Kontext + printlog "switch to tabpage 'Colors'" + Messagebox.SetPage TabFarben + kontext "TabFarben" + printlog "select the 1st 'color' in the listbox" + Farbe.select 1 + printlog "select the 1st 'color model' in the listbox" + Farbmodell.Select 1 + Call DialogTest ( TabFarben,1 ) + printlog "select the 2nd 'color model' in the listbox" + Farbmodell.Select 2 + Call DialogTest ( TabFarben,2 ) + + printlog "click button 'Add'" + Hinzufuegen.click + Kontext "Messagebox" + printlog "say OK to the messagebox: the name already exists" + Messagebox.OK + kontext "NameDlg" + Call DialogTest ( NameDlg ) + printlog "cancel dialog 'Name'" + NameDlg.Cancel + kontext "TabFarben" + printlog "click button 'Delete'" + Loeschen.click + Kontext "Messagebox" + printlog "say NO to the messagebox: realy delete?" + Messagebox.no + + kontext "TabFarben" + sleep 1 + printlog "click button 'Save color List'" + Speichern.click + Kontext "SpeichernDLG" + call Dialogtest (SpeichernDLG) + printlog "cancel dialog 'save as'" + SpeichernDlg.Cancel + sleep 1 + + kontext "TabFarben" + printlog "click button 'Load color List'" + Oeffnen.click + Kontext "OeffnenDLG" + call Dialogtest (OeffnenDLG) + printlog "cancel dialog 'open'" + OeffnenDLG.Cancel + Kontext "TabFarben" + + Kontext + printlog "switch to tabpage 'Gradients'" + Messagebox.SetPage TabFarbverlaeufe + kontext "TabFarbverlaeufe" + Call DialogTest ( TabFarbverlaeufe ) + + printlog "click button 'Add'" + Hinzufuegen.click + Kontext "NameDlg" + Call DialogTest ( NameDlg ) + printlog "cancel dialog 'Name'" + NameDlg.Cancel + + kontext "TabFarbverlaeufe" + printlog "click button 'Mofify'" + Aendern.Click + Kontext "NameDlg" + Call DialogTest ( NameDlg ) + printlog "cancel dialog 'Name'" + NameDlg.Cancel + + kontext "TabFarbverlaeufe" + printlog "click button 'Delete'" + loeschen.click + try + kontext "Messagebox" + printlog "say NO to the messagebox: realy delete?" + Messagebox.no + catch + warnlog "nobody cares about deleting a gradient :-(" + endcatch + + kontext "TabFarbverlaeufe" + printlog "click button 'Load gradients List'" + Oeffnen.click + Kontext "OeffnenDLG" + call Dialogtest (OeffnenDLG) + printlog "cancel dialog 'open'" + OeffnenDLG.Cancel + kontext "TabFarbverlaeufe" + printlog "click button 'Save gradients List'" + Speichern.click + Kontext "SpeichernDLG" + call Dialogtest (SpeichernDLG) + printlog "cancel dialog 'save as'" + SpeichernDLG.Cancel + + Kontext + printlog "switch to tabpage 'Hatching' " + Messagebox.SetPage TabSchraffuren + kontext "TabSchraffuren" + Call DialogTest ( TabSchraffuren) + + printlog "click button 'Add'" + Hinzufuegen.click + Kontext "NameDlg" + Call DialogTest ( NameDlg ) + printlog "cancel dialog 'Name'" + NameDlg.Cancel + + kontext "TabSchraffuren" + printlog "click button 'Modify'" + Aendern.Click + Kontext "NameDlg" + Call DialogTest ( NameDlg ) + printlog "cancel dialog 'Name'" + NameDlg.Cancel + + kontext "TabSchraffuren" + printlog "click button 'Delete'" + Loeschen.click + kontext "Messagebox" + printlog "say NO to the messagebox: realy delete?" + Messagebox.no + + kontext "TabSchraffuren" + printlog "click button 'Load hatches List'" + Oeffnen.click + Kontext "OeffnenDLG" + call Dialogtest (OeffnenDLG) + printlog "cancel dialog 'open'" + OeffnenDLG.Cancel + kontext "TabSchraffuren" + printlog "click button 'Save hatches List'" + Speichern.click + Kontext "SpeichernDLG" + call Dialogtest (SpeichernDLG) + printlog "cancel dialog 'save as'" + SpeichernDLG.Cancel + + Kontext + printlog "switch to tabpage 'Bitmaps'" + Messagebox.SetPage TabBitmap + kontext "TabBitmap" + Call DialogTest ( TabBitmap ) + printlog "click button 'Reset'" + zurueck.click + sleep 1 + printlog "click button 'Add'" + hinzufuegen.click + Kontext "NameDlg" + Call DialogTest ( NameDlg ) + printlog "cancel dialog 'Name'" + NameDlg.cancel + + kontext "TabBitmap" + try + printlog "click button 'Modify'" + Aendern.Click + Kontext "NameDlg" + Call DialogTest ( NameDlg ) + printlog "cancel dialog 'Name'" + NameDlg.cancel + catch + WarnLog "Control is disabled - modify bitmap" + endcatch + kontext "TabBitmap" + printlog "click button 'Import'" + Import.Click + try + Kontext "GrafikEinfuegenDlg" + Call DialogTest ( GrafikEinfuegenDlg ) + Kontext "GrafikEinfuegenDlg" + printlog "cancel dialog 'Import'" + GrafikEinfuegenDlg.Cancel + catch + Warnlog "Insert graphic does not work" + endcatch + + kontext "TabBitmap" + printlog "click button 'Delete'" + loeschen.click + kontext "Messagebox" + printlog "say NO to the messagebox: realy delete?" + Messagebox.no + + kontext "TabBitmap" + printlog "click button 'Load Bitmap List'" + Oeffnen.click + Kontext "OeffnenDLG" + call Dialogtest (OeffnenDLG) + printlog "cancel dialog 'open'" + OeffnenDLG.Cancel + kontext "TabBitmap" + printlog "click button 'Save Bitmap List'" + Speichern.click + Kontext "SpeichernDLG" + call Dialogtest (SpeichernDLG) + printlog "cancel dialog 'save as'" + SpeichernDLG.Cancel + kontext "TabBitmap" + printlog "cancel dialog 'Area'" + TabBitmap.Cancel + printlog "close application" + Call hCloseDocument + +endcase 'tdFormatArea +'--------------------------------------------------------------------------------------- +testcase tiFormatText + + printlog "open application" + Call hNewDocument + printlog "Format->Text" + FormatTextDraw + Kontext + printlog "switch to tabpage 'Text'" + Messagebox.SetPage TabText + Kontext "TabText" + DialogTest ( TabText ) + Kontext + printlog "switch to tabpage 'Text Animation'" + Messagebox.SetPage TabLauftext + Kontext "TabLauftext" + DialogTest ( TabLauftext ) + printlog "cancel dialog 'text'" + TabLauftext.Cancel + printlog "close application" + Call hCloseDocument + +endcase 'tdFormatArea +'--------------------------------------------------------------------------------------- +testcase tiFormatPositionAndSize + + printlog "open application" + Call hNewDocument + printlog "create rectangle" + Call hRechteckErstellen ( 10, 10, 20, 40 ) + printlog "Format->Position And Size" + ContextPositionAndSize + Kontext + printlog "switch to tabpage 'Position'" + Messagebox.setpage TabPositionAndSize + Kontext "TabPositionAndSize" + call Dialogtest ( TabPositionAndSize ) + printlog "Type <right> two times in Position : Base Point" + kontext "PositionPosition" + PositionPosition.TypeKeys ("<right>", 2) + printlog "Type <down> two times in Size : Base Point" + kontext "SizePosition" + SizePosition.TypeKeys ("<down>", 2) + Kontext + printlog "switch to tabpage 'Rotation'" + Messagebox.setPage TabDrehung + Kontext "TabDrehung" + call Dialogtest ( TabDrehung ) + Kontext + printlog "switch to tabpage 'Slant & Corner Radius'" + Messagebox.setpage TabSchraegstellen + Kontext "TabSchraegstellen" + call Dialogtest ( TabSchraegstellen ) + printlog "cancel dialog 'Position and Size'" + TabSchraegstellen.cancel + printlog "close application" + Call hCloseDocument + +endcase 'tiFormatPositionAndSize +'--------------------------------------------------------------------------------------- +testcase tiFormatCharacter + + printlog "open application" + Call hNewDocument + printlog "Format->Character" + FormatCharacter + WaitSlot (1000) + Kontext + printlog "switch to tabpage 'Font'" + Messagebox.SetPage TabFont + kontext "TabFont" + sleep 1 + Call DialogTest ( TabFont ) + Kontext + printlog "switch to tabpage 'Font Effects'" + Messagebox.SetPage TabFontEffects + kontext "TabFontEffects" + sleep 1 + Call DialogTest ( TabFontEffects ) + sleep 1 + Kontext + printlog "switch to tabpage 'Position'" + Messagebox.SetPage TabFontPosition + Kontext "TabFontPosition" + sleep 1 + Call DialogTest ( TabFontPosition ) + sleep 2 + printlog "cancel dialog 'Character'" + TabFontPosition.Cancel + printlog "close application" + Call hCloseDocument + +endcase 'tiFormatCharacter +'--------------------------------------------------------------------------------------- +testcase tiFormatControlForm + + printlog "testcase: check if controls are available" + printlog "open new document" + Call hNewDocument + + 'click in the document to get the focus into the document + if ( UCase(gApplication) = "DRAW" ) then + Kontext "DocumentDraw" + DocumentDraw.MouseDown(50,50) + DocumentDraw.MouseUp(50,50) + else 'Impress + Kontext "DocumentImpress" + DocumentImpress.MouseDown(50,50) + DocumentImpress.MouseUp(50,50) + endif + + printlog "open the form controls toolbar" + call hToolbarSelect("FormControls",true) + + kontext "FormControls" + printlog "insert a PushButton" + Pushbutton.Click + Sleep 1 + gMouseMove (50, 20,70, 40) + + printlog "open the control properties dialog" + FormatControl + + Kontext "ControlPropertiesDialog" + WaitSlot (1000) + printlog "close the control properties dialog" + ControlPropertiesDialog.Close + + printlog "open the form properties dialog" + FormatForm + Kontext "ControlPropertiesDialog" + WaitSlot (1000) + printlog "close the form properties dialog" + ControlPropertiesDialog.Close + + printlog "close the form control toolbar" + call hToolbarSelect("FormControls",false) + + printlog "close application" + Call hCloseDocument + +endcase 'tiFormatControlForm +'--------------------------------------------------------------------------------------- +testcase tiFormatDimensions + + printlog "open application" + Call hNewDocument + printlog "Format->Dimensions" + FormatDimensioning + Kontext "Bemassung" + DialogTest ( Bemassung ) + printlog "cancel dialog 'Dimensioning'" + Bemassung.Cancel + printlog "close application" + Call hCloseDocument + +endcase 'tiFormatDimensions +'--------------------------------------------------------------------------------------- +testcase tiFormatConnector + + printlog "open application" + Call hNewDocument + printlog "Format->Connector" + FormatConnector + Kontext "Verbinder" + DialogTest ( Verbinder ) + printlog "cancel dialog 'Connector'" + Verbinder.Cancel + printlog "close application" + Call hCloseDocument + +endcase 'tiFormatConnector +'--------------------------------------------------------------------------------------- +testcase tiFormat3D_Effects + + printlog "open application" + Call hNewDocument + printlog "Format->3D_Effects" + Format3D_Effects + Kontext "Drei_D_Effekte" + Call DialogTest ( Drei_D_Effekte,1 ) + printlog "click button 'Geometry'" + Geometrie.Click + Call DialogTest ( Drei_D_Effekte,2 ) + printlog "click button 'Shading'" + Darstellung.Click + Call DialogTest ( Drei_D_Effekte,3 ) + printlog "click button 'Illumination'" + Beleuchtung.Click + Call DialogTest ( Drei_D_Effekte,4 ) + printlog "click button 'Textures'" + Texturen.Click + Call DialogTest ( Drei_D_Effekte,5 ) + printlog "click button 'Material'" + Material.Click + Call DialogTest ( Drei_D_Effekte,6 ) + Kontext "Drei_D_Effekte" + printlog "close dialog '3D Effects'" + Drei_D_Effekte.Close + printlog "close application" + Call hCloseDocument + +endcase 'tiFormat3D_Effects +'--------------------------------------------------------------------------------------- +testcase tiFormatNumberingBullets + + printlog "open application" + Call hNewDocument + WaitSlot (2000) + printlog "Format->Numbering/Bullets" + FormatNumberingBulletsDraw + WaitSlot (2000) + printlog "switch to tabpage 'Bullets'" + Kontext + Messagebox.SetPage TabBullet + Kontext "TabBullet" + Call DialogTest ( TabBullet ) + Kontext + printlog "switch to tabpage 'Numbering Type'" + Messagebox.SetPage TabNumerierungsart + Kontext "TabNumerierungsart" + Call DialogTest ( TabNumerierungsart ) + Kontext + printlog "switch to tabpage 'Graphics'" + Messagebox.SetPage TabGrafiken + Kontext "TabGrafiken" + Call DialogTest ( TabGrafiken ) + Kontext + printlog "switch to tabpage 'Position'" + Messagebox.SetPage TabPositionNumerierung + Kontext "TabPositionNumerierung" + Call DialogTest ( TabPositionNumerierung ) + Kontext + printlog "switch to tabpage 'Customize'" + Messagebox.SetPage TabOptionenNumerierung + Kontext "TabOptionenNumerierung" + Call DialogTest ( TabOptionenNumerierung ) + printlog "select 7th entry from the top in the listbox 'Numbering'" + Numerierung.Select 9 ' last one always ? -> graphics + printlog "click button graphics 'select'" + TabOptionenNumerierung.MouseDown 50,60 + TabOptionenNumerierung.MouseUp 50,60 + Auswahl.TypeKeys "<SPACE>" + printlog "select 'From file'" + hMenuSelectNr (1) + sleep 3 + printlog "dialog 'link' with an grayed out & selected link checkbox" + Kontext "OeffnenDlg" + printlog "cancel dialog 'link'" + OeffnenDlg.Cancel + sleep 1 + sleep 1 + Kontext + printlog "switch to tabpage 'Customize'" + Messagebox.SetPage TabOptionenNumerierung + Kontext "TabOptionenNumerierung" + sleep 1 + try + printlog "click button graphics 'select'" + Auswahl.TypeKeys "<SPACE>" + printlog "select 'Gallery'" + hMenuSelectNr (2) + printlog "select 3rd element from the top 'blusquare.gif'" + hMenuSelectNr (3) + Sleep 2 + catch + warnlog "couldn't do something :-) (1)" + Exceptlog + Call hMenuClose + endcatch + printlog "cancel dialog 'Numbering/Bullets'" + TabOptionenNumerierung.Cancel + sleep 1 + printlog "close application" + Call hCloseDocument + +endcase 'tiFormatNumberingBullets +'--------------------------------------------------------------------------------------- +testcase tiFormatCaseCharacter + + printlog "open application" + Call hNewDocument + printlog "create textbox with text" + Call hTextrahmenErstellen ("testit",20,20,50,30) + sleep 1 + printlog "move curser 1 time to the left" + hTypeKeys "<left>" + + printlog "Format->Case/Characters->Uppercase" + FormatChangeCaseUpper + WaitSlot (1000) + printlog "Format->Case/Characters->Lowercase" + FormatChangeCaseLower + WaitSlot (2000) + if bAsianLan then + if not gAsianSup then + qaerrorlog "This is an asian language-office, but asian support was disabled in a previous test?" + end if + printlog "if asian language (81/82/86/88):" + try + printlog "+ Format->Case/Characters->Half-width" + FormatChangeCaseHalfWidth + catch + Warnlog "Format / Change Case / Half Width does not work." + endcatch + WaitSlot (1000) + try + printlog "+ Format->Case/Characters->Full-width" + FormatChangeCaseFullWidth + catch + Warnlog "Format / Change Case / Full Width does not work!" + endcatch + sleep 1 + try + printlog "+ Format->Case/Characters->Hiragana" + FormatChangeCaseHiragana + catch + Warnlog "Format / Change Case / Hiragana does not work." + endcatch + sleep 1 + try + printlog "+ Format->Case/Characters->Katatana" + FormatChangeCaseKatagana + catch + Warnlog "Format / Change Case / Katagana does not work." + endcatch + end if + printlog "close application" + Call hCloseDocument + +endcase 'tiFormatCaseCharacter +'--------------------------------------------------------------------------------------- +testcase tiFormatParagraph + + printlog "open application" + Call hNewDocument + printlog "Format->Paragraph" + FormatParagraph + Kontext + printlog "switch to tabpage 'Indents & Spacing'" + Messagebox.SetPage TabEinzuegeUndAbstaende + kontext "TabEinzuegeUndAbstaende" + Call DialogTest ( TabEinzuegeUndAbstaende ) + Kontext + printlog "switch to tabpage 'Alignment'" + Messagebox.SetPage TabAusrichtungAbsatz + Kontext "TabAusrichtungAbsatz" + Call DialogTest ( TabAusrichtungAbsatz ) + Kontext + printlog "switch to tabpage 'Tabs'" + Messagebox.SetPage TabTabulator + kontext "TabTabulator" + Call DialogTest ( TabTabulator ) + printlog "cancel dialog 'Paragraph'" + TabTabulator.Cancel + printlog "close application" + Call hCloseDocument + +endcase 'tiFormatParagraph +'--------------------------------------------------------------------------------------- +testcase tiFormatPage + + printlog "open application" + Call hNewDocument + printlog "Format->Page" + FormatSlideDraw + kontext + if Messagebox.exists (5) then + printlog "switch to tabpage 'Page'" + Messagebox.SetPage TabSeite + Kontext "TabSeite" + if TabSeite.exists (5) then + Call Dialogtest (TabSeite) + else + warnlog "nope :-(1" + endif + sleep 1 + kontext + printlog "switch to tabpage 'Background'" + Messagebox.SetPage TabArea + sleep 1 + kontext + if messagebox.GetRT = 304 then + printlog "active about pagesize != printersettings, will say NO: " + Messagebox.GetText + try + Messagebox.No + catch + warnlog messagebox.getText + Messagebox.ok ' should be Error loading BASIC of document ##? + kontext + if messagebox.GetRT = 304 then + try + warnlog messagebox.getText + Messagebox.ok + catch + printlog "not expected state." + endcatch + endif + endcatch + endif + sleep 1 + kontext + Messagebox.SetPage TabArea + Kontext "TabArea" + if TabArea.exists (5) then + Call Dialogtest (TabArea) + endif + sleep 1 + printlog "cancel dialog 'Page Setup'" + TabArea.Cancel + else + warnlog "FormatPage doesn't come up with dialog :-(" + endif + printlog "close application" + Call hCloseDocument + +endcase 'tiFormatParagraph +'--------------------------------------------------------------------------------------- +testcase tiFormatStylesAndFormatting + + Dim sTemp as String + dim sSettings(20,3) ' Control_name; control_type; value + dim i as integer + dim abctemp + + printlog "Open Application" + + WaitSlot (10000) + printlog "Open new document" + Call hNewDocument + printlog "Create a Textframe with content" + sleep 5 + + hTextrahmenErstellen ("I love Wednesdays...",20,20,80,40) + sleep 1 + printlog "Checking if TextObjectBar is up" + Kontext "TextObjectbar" + if TextObjectbar.Exists Then + printlog "TextObjectbar.Exists = " + TextObjectbar.Exists + else + ViewToolbarsTextFormatting + endif + FormatStylist + printlog "Open Stylist with: Format -> Stylist" + FormatStylist + WaitSlot (1000) + Kontext "Stylist" + if (Stylist.NotExists) then + qaErrorLog "There is no stylist open, trying again now" + FormatStylist + end if + WaitSlot (1000) + Vorlagenliste.TypeKeys "<End>" + Vorlagenliste.TypeKeys "<Up>" + Vorlagenliste.TypeKeys "<Up>" + sleep 1 + printlog "open context menu, select first entry from top: 'New'" + Vorlagenliste.OpenContextMenu + sleep 1 + hMenuSelectNr (1) + sleep 1 + + Kontext + if Messagebox.exists (5) then + printlog "switch to tabpage Organizer" + try + Messagebox.SetPage TabVerwalten + Kontext "TabVerwalten" + TabVerwalten.TypeKeys "<TAB>" + VorlagenName.setText("1Test") + sTemp = VorlagenName.getText + VerknuepftMit.getSelText + Bereich.getSelText + printlog "close dialog 'Graphics Styles'" + TabVerwalten.OK + catch + warnlog "Under Gnome we have a focus problem here." + endcatch + end if + sleep 1 + Kontext "Stylist" + Vorlagenliste.TypeKeys "<Home>" 'to go to the style we've created ourselves. + sleep 1 + Vorlagenliste.OpenContextMenu + sleep 1 + hMenuSelectNr (2) 'modify... + sleep 1 + Kontext + if Messagebox.exists (5) then + printlog "switch to tabpage Organizer" + try + Messagebox.SetPage TabVerwalten + Kontext "TabVerwalten" + VorlagenName.setText("2Test") + printlog "close dialog 'Graphics Styles'" + TabVerwalten.OK + catch + warnlog "Under Gnome we have a focus problem here." + endcatch + end if + + sleep 3 + Kontext "Stylist" + printlog " Delete the style we created." + Vorlagenliste.TypeKeys "<Home>" 'to go to the style we've created ourselves. + sleep 1 + try + Vorlagenliste.TypeKeys "<Delete>" 'To delete the style. + Kontext "Active" 'do you really wish to delete? + Active.YES + sleep 2 + catch + Warnlog "Couldnt delete the new Style, or maybe wrong position?" + endcatch + Kontext "Stylist" + if (Stylist.NotExists) then + ErrorLog "There was no Stylist open, should be." + else + printlog "Close Stylist" + if lcase(gPlatform) = "osx" then + hTypekeys "<mod1 t>" + else + hTypekeys "<F11>" + endif + Kontext "Stylist" + if (Stylist.Exists) then + ErrorLog "The Stylist should be closed now." + endif + endif + Call hCloseDocument + +endcase 'tiFormatStylesAndFormatting +'--------------------------------------------------------------------------------------- +testcase tiFormatFontwork + + printlog "open application" + Call hNewDocument + printlog "create a textframe with text" + Call hTextrahmenErstellen ("Flightplanning via www.aua.com is hard!",20,20,50,30) + sleep 1 + printlog "Format->Fontwork" + FormatFontwork + Kontext "FontWork" + if FontWork.exists (5) then + DialogTest ( FontWork ) + sleep 1 + printlog "close dialog 'Fontwork'" + FontWork.Close + else + warnlog "FontWork didn't came up :-(" + endif + printlog "close application" + Call hCloseDocument + +endcase 'tiFormatFontwork +'--------------------------------------------------------------------------------------- +testcase tiFormatGroup + + printlog "open application" + Call hNewDocument + Call sSelectEmptyLayout + printlog "create 2 rectangles" + hRechteckErstellen ( 10, 10, 20, 20 ) + hRechteckErstellen ( 30, 30, 40, 40 ) + printlog "select both objects with keys [strg]+[a]" + EditSelectAll + printlog "DRAW: in Modify menu" + printlog "+ Impress in Format menu" + printlog "+ Format->Group / Modify->Group" + FormatGroupDraw + WaitSlot (1000) + printlog "Format->Edit Group / Modify->Enter Group" + FormatEditGroupDraw + WaitSlot (1000) + printlog "Format->Exit Group / Modify->Exit Group" + FormatExitGroupDraw + WaitSlot (1000) + printlog "Format->Ungroup Group / Modify->Ungroup Group" + FormatUngroupDraw + WaitSlot (1000) + printlog "close application" + Call hCloseDocument + +endcase 'tiFormatGroup +'--------------------------------------------------------------------------------------- +testcase tiFormatStylesSlideDesign + + ' create recktanglr; click outside ? + printlog "open application" + Call hNewDocument + WaitSlot (3000) + printlog "Format->Styles->Slide Design" + FormatModifyLayout ' is OK : Format->Styles->Slide Design; 27064; SID_PRESENTATION_LAYOUT + WaitSlot (1000) + Kontext "Seitenvorlage" + Call DialogTest ( Seitenvorlage ) + printlog "check the checkboxes: ExchangeBackgroundPages and DeleteUnusedBackgrounds" + HintergrundseiteAustauschen.check + DeleteUnusedBackgrounds.check + printlog "click button 'Load...'" + Laden.Click + kontext "Neu" + printlog "click button 'more'" + Zusaetze.click + sleep 1 + kontext "Neu" + printlog "check checkbox 'Preview'" + try + Vorschau.check + catch + printlog "Preview wasn't checkable :-( hopfully now:" + Zusaetze.click + sleep 1 + Vorschau.check + printlog "... OK :-)" + endcatch + printlog "cancel dialog 'Load Slide Design'" + Neu.cancel + Kontext "Seitenvorlage" + printlog "cancel dialog 'Slide Design'" + Seitenvorlage.Cancel + sleep 2 + printlog "close application" + Call hCloseDocument + +endcase 'tiFormatStylesSlideDesign +'--------------------------------------------------------------------------------------- diff --git a/testautomation/graphics/required/includes/global/id_006.inc b/testautomation/graphics/required/includes/global/id_006.inc new file mode 100644 index 000000000000..57990c2a16b0 --- /dev/null +++ b/testautomation/graphics/required/includes/global/id_006.inc @@ -0,0 +1,475 @@ +'encoding UTF-8 Do not remove or change this line! +'************************************************************************** +' DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. +' +' Copyright 2000, 2010 Oracle and/or its affiliates. +' +' OpenOffice.org - a multi-platform office productivity suite +' +' 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 : wolfram.garten@sun.com +'* +'* short description : +'* +'\********************************************************************************** + +sub id_Tools + printLog "--------- id_006 ----------" + call tiToolsSpellchecking + call tiToolsSpellcheckingAutomatic + call tiToolsThesaurus + call tiToolsHyphenation + call tiToolsAutoCorrect + call tChineseTranslation + call tiToolsMacro + call tiToolsGallery + call tiToolsEyedropper + call tToolsOptionsTest ' global one +end sub +'------------------------------------------------------------------------------- +testcase tiToolsSpellchecking + + if not gOOO then ' Spellcheck doesn't work in OOo builds. + '/// open application ///' + Call hNewDocument + WaitSlot (2000) 'sleep 2 + '/// call subroutine 'hSetSpellHypLanguage' for setting the default language in th eoptions, to enable it for languages, which don't provide a dictionary (usually asian ones) ///' + call hSetSpellHypLanguage + '/// create textframe with content ///' + Call hTextrahmenErstellen ("Whaaaat", 10, 10, 30, 40) + sleep 1 + '/// Tools->Spellcheck->Check ///' + ToolsSpellCheck + WaitSlot (1000) 'sleep 1 + Kontext "MessageBox" + if MessageBox.exists(2) then + qaerrorlog "Messagebox : " + MessageBox.gettext() + " appear." + qaerrorlog "Maybe no spellchecking for this languages is available." + MessageBox.OK + else + Kontext "Rechtschreibung" + if Rechtschreibung.exists then + Call DialogTest ( Rechtschreibung ) + '/// close dialog 'Spellcheck' ///' + Rechtschreibung.Close + else + warnlog " Spellcheck dialog didn't came up :-(" + end if + end if + sleep 1 + '/// say OK to messagebox about 'Spellcheck has been completed' ///' + Kontext "Messagebox" + if Messagebox.exists (5) then + warnlog "Shouldn't be any messagebox after pressing close in spellchecker" + Messagebox.OK + sleep (2) + Kontext + end if + '/// close application ///' + Call hCloseDocument + else goto endsub + endif +endcase +'------------------------------------------------------------------------------- +testcase tiToolsSpellcheckingAutomatic + '/// open application ///' + Call hNewDocument + '/// Tools->Spellcheck->AutoSpellcheck ///' + ToolsSpellcheckAutoSpellcheck + '/// create textframe with text ///' + Call hTextrahmenErstellen ("What", 10, 10, 30, 40) + sleep 2 + '/// Tools->Spellcheck->AutoSpellcheck ///' + ToolsSpellcheckAutoSpellcheck + '/// close application ///' + Call hCloseDocument +endcase +'------------------------------------------------------------------------------- +testcase tiToolsThesaurus + Dim sWord as string + Dim sExt as string + Dim sFileName as string + + 'for normal text, the thesaurus is enabled, + 'if the format->character->language of the word has a thesaurus + 'unfortunately in textboxes this doesn't work, you can give the word a langauge, + 'but this is been ignored by our thesaurus + 'so especially for asian languages you have to set a default language in the options, + 'to be able to use the thesaurus there - fallback to englisch, + 'because there is no thesaurus for cjk languages + + 'As long as OOo has no modules for that, disabled + if gOOO = True then + printlog "No spellchecking in OOo" + goto endsub + endif + + 'First we make sure we test a language where Thesaurus + select case iSprache + case 01 : sWord = "Hello" + case 03 : sWord = "Alo" + case 07 : printlog "- No Thesaur for Russian available" + goto endsub + case 30 : Printlog "- No Thesaurus available !" + goto endsub + case 31 : sWord = "Guiten" + case 33 : sWord = "Bonjour" + case 34 : sWord = "Hola" + case 35 : Printlog "- No Thesaurus available !" + goto endsub + case 36 : Printlog "- No Thesaurus available !" + goto endsub + case 37 : Printlog "- No Thesaurus available !" + goto endsub + case 39 : sWord = "Ciao" + case 42 : Printlog "- No Thesaurus available !" + goto endsub + case 45 : sWord = "Hej" + case 46 : sWord = "Välkommen" + case 47 : Printlog "- No Thesaurus available !" + goto endsub + case 48 : Printlog "- No Thesaurus in Polish!" + goto endsub + case 49 : sWord = "Hallo" + case 50 : sWord = "Prosojnica" + case 51 : Printlog "- No Thesaurus available !" + goto endsub + case 55 : Printlog "- No Thesaurus in Brazilian!" + goto endsub + case 90 : Printlog "- No Thesaurus available !" + goto endsub + + case else : if bAsianLan then + hSetSpellHypLanguage + sWord = "Hello" + else + Warnlog "For the language " + iSprache +" nothing is prepared yet: insert text here" + sWord = "Hello" + endif + end select + + PrintLog "Thesaurus with 1 word: " + sWord + + if( Ucase(gApplication) = "DRAW" ) then + sExt = ".odg" + elseif( Ucase(gApplication) = "IMPRESS" ) then + sExt = ".odp" + endif + + Call hFileOpen (gTesttoolpath + "graphics\required\input\recht_" + iSprache + sExt) + Call sMakeReadOnlyDocumentEditable() + Call hTextrahmenErstellen (sWord,20,20,50,30) + sleep 1 + + printlog "select the word" + hTypeKeys "<Home><SHIFT END>" + + try + ExtrasThesaurusDraw + catch + warnlog "No Thesaurus available." + hCloseDocument() + goto endsub + endcatch + + Kontext "Thesaurus" + if Thesaurus.Exists(3) then + Thesaurus.Cancel + else + warnlog "the thesaurus does not appear" + end if + Call hCloseDocument +endcase +'------------------------------------------------------------------------------- +testcase tiToolsHyphenation + '/// open application ///' + Call hNewDocument + '/// Tools->Hyphenation ///' + ToolsLanguageHyphenationDraw + WaitSlot (2000) 'sleep 2 + '/// Tools->Hyphenation ///' + ToolsLanguageHyphenationDraw + '/// close application ///' + Call hCloseDocument +endcase +'------------------------------------------------------------------------------- +testcase tiToolsAutoCorrect + dim iLanguage as integer ' for resetting the language + '/// open application ///' + Call hNewDocument + WaitSlot (1000) 'sleep 1 + '/// Tools->Autocorrect ///' + ToolsAutocorrect + WaitSlot (2000) 'sleep 1 + Kontext + '/// select tabpage 'Replace' ///' + Messagebox.SetPage TabErsetzung + Kontext "TabErsetzung" + Call DialogTest ( TabErsetzung ) + '/// remember the language, that is selected in the 'Replacements and exceptions for Language' Listbox ///' + iLanguage = WelcheSprache.GetSelIndex + '///+ change the language to the 1st from the top ///' + WelcheSprache.Select 1 ' select language with empty list + '///+ type something into the field 'replace' ///' + Kuerzel.SetText "a" + '///+ type something into the field 'with' ///' + ErsetzenDurch.SetText "b" + '///+ click button 'new' ///' + Neu.Click + sleep 1 + '///+ click button 'delete' ///' + Loeschen.Click + sleep 1 + try + '///+ click button 'delete' again ///' + Loeschen.Click + catch + printlog "ok was CRASH before" '# + endcatch + '///+ if nothing happens it is ok, was a Crash before :-( ///' + '///+ restore cthe remembered language ///' + WelcheSprache.select (iLanguage) + Kontext + '/// select tabpage 'Exception' ///' + Messagebox.SetPage TabAusnahmen + Kontext "TabAusnahmen" + Call DialogTest ( TabAusnahmen ) + '/// type something into the field 'Abbreviations' ///' + Abkuerzungen.settext "Lala" + '///+ click button 'new' in 'Abbreviations' ///' + AbkuerzungenNeu.click + '///+ click button 'delete' in 'Abbreviations' ///' + AbkuerzungenLoeschen.click + '/// type something into the field 'Word with TWo INitial CApitals' ///' + Woerter.settext "LALA" + '///+ check the checkbox 'AutoInclude' in 'Word with TWo INitial CApitals' ///' + WoerterAutomatisch.Check + '///+ click button 'new' in 'Word with TWo INitial CApitals' ///' + WoerterNeu.click + '///+ click button 'delete' in 'Word with TWo INitial CApitals' ///' + WoerterLoeschen.click + '///+ UNcheck the checkbox 'AutoInclude' in 'Word with TWo INitial CApitals' ///' + WoerterAutomatisch.UnCheck + Kontext + '/// select tabpage 'Options' ///' + Messagebox.SetPage TabOptionen + Kontext "TabOptionen" + Call DialogTest ( TabOptionen ) + Kontext + '/// select tabpage 'Custom Quotes' ///' + Messagebox.SetPage TabLocalizedOptions + Kontext "TabLocalizedOptions" ' 1a + '/// in the part of 'single quotes': ///' + '///+ check 'replace' ///' + '///+ click 'start quote' ///' + SingleQuotesReplace.Check + SingleQuotesStart.Click + Kontext "Sonderzeichen" + Call DialogTest ( Sonderzeichen, 1 ) + '///+ cancel dialog 'start quote' ///' + Sonderzeichen.Cancel + Kontext "TabLocalizedOptions" ' 1b + '///+ click 'end quote' ///' + SingleQuotesEnd.Click + Kontext "Sonderzeichen" + Call DialogTest ( Sonderzeichen, 2 ) + '///+ cancel dialog 'end quote' ///' + Sonderzeichen.Cancel + Kontext "TabLocalizedOptions" ' 1s + '///+ click button 'default' ///' + SingleQuotesDefault.Click + + Kontext "TabLocalizedOptions" ' 2a + '/// in the part of 'double quotes': ///' + '///+ click 'start quote' ///' + DoubleQuotesStart.Click + Kontext "Sonderzeichen" + Call DialogTest ( Sonderzeichen, 3 ) + '///+ cancel dialog 'start quote' ///' + Sonderzeichen.Cancel + Kontext "TabLocalizedOptions" ' 2b + '///+ click 'end quote' ///' + DoubleQuotesEnd.Click + Kontext "Sonderzeichen" + Call DialogTest ( Sonderzeichen, 4 ) + '///+ cancel dialog 'end quote' ///' + Sonderzeichen.Cancel + Kontext "TabLocalizedOptions" ' 2s + '///+ click button 'default' ///' + DoubleQuotesDefault.Click + '///+ UNcheck 'replace' ///' + SingleQuotesReplace.UnCheck + '/// cancel dialog 'AtorCorrect' ///' + TabLocalizedOptions.cancel + '/// close application ///' + Call hCloseDocument +endcase +'------------------------------------------------------------------------------- +testcase tChineseTranslation + + qaerrorlog( "#i89634# - Chinese Translation dialog does not close" ) + goto endsub + + dim sFileName as string + dim bSavedAsianSupport as boolean + + if uCase(gApplication) = "IMPRESS" then + sFileName = "graphics\required\input\tchinese.odp" + else + sFileName = "graphics\required\input\tchinese.odg" + end if + + '/// Open application ///' + Call hNewDocument + WaitSlot (2000) 'sleep 1 + '/// Save old state and Activate Support for Asian language ///' + bSavedAsianSupport = ActiveDeactivateAsianSupport(TRUE) + '/// Open Document ///' + Call hFileOpen ( ConvertPath(gTesttoolPath + sFileName) ) + '/// If write-protected - open as Temp-file ///' + sleep (2) + Kontext "Standardbar" + if Bearbeiten.GetState(2) <> 1 then + Bearbeiten.Click '0 = not pressed. 1 = pressed. + Kontext + if Active.Exists(1) then + Active.Yes + else + warnlog "No messagebox after making document editable? - Test canceled here" + goto endsub + end if + end if + if uCase(gApplication) = "IMPRESS" then + Kontext "DocumentImpress" + else + Kontext "DocumentDraw" + end if + '/// Select all, Press RETURN to enter text in Editmode ///' + '/// Move marker to top of the text, go two steps right, mark two characters ///' + EditSelectAll + hTypeKeys "<RETURN>" + hTypeKeys "<MOD1 HOME><RIGHT><RIGHT><SHIFT RIGHT RIGHT>" + '/// Open Chinesetranslation ///' + ToolsChineseTranslation + WaitSlot (2000) 'sleep 1 + kontext "ChineseTranslation" + '/// Check if everything is there ///' + Call DialogTest ( ChineseTranslation ) + '/// Click on EditTerms ///' + EditTerms.Click + kontext "ChineseDictionary" + '/// Check if everything is there ///' + Call DialogTest ( ChineseDictionary ) + '/// Close dialog 'ChineseDictionary' with 'OK' ///' + ChineseDictionary.Ok + kontext "ChineseTranslation" + '/// Close dialog 'Chinese' with 'OK' ///' + ChineseTranslation.OK + kontext + '/// if messagebox exist, say OK; ('Spellcheck completed' or 'Word not found') ///' + if Messagebox.exists (5) then + printlog "Messagebox: "+Messagebox.gettext+"'" + Messagebox.ok + end if + '/// Restore old state for Asian language ///' + ActiveDeactivateAsianSupport(bSavedAsianSupport) + '/// Close application ///' + Call hCloseDocument +endcase +'------------------------------------------------------------------------------- +testcase tiToolsMacro + '/// open application ///' + Call hNewDocument + WaitSlot (2000) 'sleep 2 + '/// Tools->Macro ///' + ToolsMacro + Kontext "Makro" + Call DialogTest ( Makro ) + '/// click button 'organizer...' ///' + Verwalten.Click + + Kontext + '/// switch to tabpage 'Modules' ///' + Messagebox.SetPage TabModule + Kontext "TabModule" + Call DialogTest ( TabModule ) + + Kontext + '/// switch to tabpage 'Libraries' ///' + Messagebox.SetPage TabBibliotheken + Kontext "TabBibliotheken" + Call DialogTest ( TabBibliotheken ) + '/// click lbutton 'append' ///' + Hinzufuegen.Click + Kontext "Messagebox" + if Messagebox.Exists (5) then + if Messagebox.GetRT = 304 then + Warnlog Messagebox.Gettext + Messagebox.Ok + end if + end if + Kontext "OeffnenDlg" + '/// cancel dialog 'append libraries' ///' + OeffnenDlg.Cancel + Kontext "TabBibliotheken" + '/// click button 'new' ///' + Neu.Click + kontext "NeueBibliothek" + sleep 1 'Bibliotheksname + '/// cancel dialog 'new library' ///' + NeueBibliothek.cancel + Kontext "TabBibliotheken" + '/// close dialog 'macro organizer' ///' + TabBibliotheken.Close + + Kontext "Makro" + '/// close dialog 'macro' ///' + Makro.Cancel + '/// close application ///' + Call hCloseDocument +endcase +'------------------------------------------------------------------------------- +testcase tiToolsGallery + '/// open application ///' + Call hNewDocument + '/// Tools->Gallery ///' + ToolsGallery + WaitSlot (2000) 'sleep 1 + '/// Tools->Gallery ///' + ToolsGallery + '/// close application ///' + Call hCloseDocument +endcase +'------------------------------------------------------------------------------- +testcase tiToolsEyedropper + '/// open application ///' + Call hNewDocument + '/// Tools->Eyedropper ///' + ToolsEyedropper + Kontext "Pipette" + Call DialogTest (Pipette) + '/// close dialog 'Eyedropper' ///' + Pipette.Close + sleep 1 + '/// close application ///' + Call hCloseDocument +endcase + diff --git a/testautomation/graphics/required/includes/global/id_007.inc b/testautomation/graphics/required/includes/global/id_007.inc new file mode 100644 index 000000000000..7fd278bc702c --- /dev/null +++ b/testautomation/graphics/required/includes/global/id_007.inc @@ -0,0 +1,563 @@ +'encoding UTF-8 Do not remove or change this line! +'************************************************************************** +' DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. +' +' Copyright 2000, 2010 Oracle and/or its affiliates. +' +' OpenOffice.org - a multi-platform office productivity suite +' +' 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 : wolfram.garten@sun.com +'* +'* short description : +'* +'\********************************************************************************** + +testcase tdModifyFlipVertikal + + '/// open application ///' + Call hNewDocument ' imp: contextmenue same SID! + sleep 1 + '/// create rectangle ///' + Call hRechteckErstellen ( 10, 10, 20, 40 ) + try + '/// imp: Kontextmenu: Flip->Vertically ///' + '///+ Modify->Flip->Vertically ///' + ContextFlipVerticalDraw + Printlog "- Flip-vertical is working" + catch + Warnlog "- Flip-Vertical does not work" + endcatch + sleep 1 + '/// close application ///' + Call hCloseDocument +endcase + +'------------------------------------------------------------------------------------------------------------------------------------------------ + +testcase tdModifyFlipHorizontal + '/// open application ///' + Call hNewDocument ' imp: contextmenue same SID! + WaitSlot (1000) + '/// create rectangle ///' + Call hRechteckErstellen ( 10, 10, 20, 40 ) + try + '/// imp: Kontextmenu: Flip->Horizontally ///' + '///+ Modify->Flip->Horizontally ///' + ContextFlipHorizontalDraw + Printlog "- Flip-horizontal is working" + catch + Warnlog "- Flip-horizontal does not work" + endcatch + sleep 1 + '/// close application ///' + Call hCloseDocument +endcase + +'------------------------------------------------------------------------------------------------------------------------------------------------ + +testcase tdContextConvertIntoCurve + '/// open application ///' + Call hNewDocument + '/// create rectangle ///' + Call hRechteckErstellen ( 10, 10, 20, 40 ) + '/// Modify->Convert->To Curve ///' + '///+ Modify->Convert->To Curve ///' + ContextConvertIntoCurve + WaitSlot (2000) + '/// close application ///' + Call hCloseDocument +endcase + +'------------------------------------------------------------------------------------------------------------------------------------------------ + +testcase tdContextConvertIntoPolygon + dim iWaitIndex as integer + '/// open application ///' + Call hNewDocument ' imp: contextmenue same SID! + InsertGraphicsFromFile + Kontext "GrafikEinfuegenDlg" + '/// Check if the dialogue is there. If not - wait for maximum 10 seconds) + iWaitIndex = 0 + do while NOT GrafikEinfuegenDlg.Exists AND iWaitIndex < 10 + sleep(1) + iWaitIndex = iWaitIndex + 1 + loop + if NOT GrafikEinfuegenDlg.Exists AND iWaitIndex = 10 then + warnlog "Dialogue Insert Graphics didnt work. Ending testcase." + Call hCloseDocument + goto endsub + end if + '/// insert graphic: "global\input\graf_inp\enter.bmp" ///' + Dateiname.SetText ConvertPath (gTesttoolPath + "global\input\graf_inp\enter.bmp") + Oeffnen.Click + sleep 3 + '/// Modify->Convert->To Polygon ///' + '/// Modify->Convert->To Polygon ///' + ContextConvertIntoPolygon + Kontext "InPolygonUmwandeln" + Call DialogTest (InPolygonUmwandeln) + '/// check checkbox: 'Fill holes' ///' + LoecherFuellen.Check + '/// click more in number field: 'Number of colors' ///' + Farbanzahl.More + '/// click more in number field: 'Point reductionn' ///' + Punktreduktion.More + '/// click more in number field: 'Tile size' ///' + Kachelgroesse.More + '/// click button 'Preview' ///' + Vorschau.Click + sleep 10 + '/// cancel dialog 'Convert to Polygon' ///' + InPolygonUmwandeln.Cancel + sleep (2) + '/// close application ///' + Call hCloseDocument +endcase + +'------------------------------------------------------------------------------------------------------------------------------------------------ + +testcase tdContextConvertIntoContour + '/// open application ///' + Call hNewDocument + '/// create rectangle ///' + Call hRechteckErstellen ( 10, 10, 20, 40 ) + '/// Modify->Convert->To Contour ///' + '/// Modify->Convert->To Contour ///' + ContextConvertIntoContour + WaitSlot (1000) + '/// close application ///' + Call hCloseDocument +endcase + +'------------------------------------------------------------------------------------------------------------------------------------------------ + +testcase tdContextConvertInto3D + '/// open application ///' + Call hNewDocument + '/// create rectangle ///' + Call hRechteckErstellen ( 10, 10, 20, 40 ) + '/// Modify->Convert->To 3D ///' + '/// Modify->Convert->To 3D ///' + ContextConvertInto3D + WaitSlot (1000) + '/// close application ///' + Call hCloseDocument +endcase + +'------------------------------------------------------------------------------------------------------------------------------------------------ + +testcase tdContextConvertIntoRotationObject + '/// open application ///' + Call hNewDocument + WaitSlot (1000) + '/// create rectangle ///' + Call hRechteckErstellen (20,20,50,50) + sleep 2 + '/// Modify->Convert->To 3D Rotation Object ///' + '/// Modify->Convert->To 3D Rotation Object ///' + ContextConvertInto3DRotationObject + WaitSlot (1000) + '/// close application ///' + Call hCloseDocument +endcase + +'------------------------------------------------------------------------------------------------------------------------------------------------ + +testcase tdContextConvertIntoBitmap + '/// open application ///' + Call hNewDocument + WaitSlot (3000) + InsertGraphicsFromFile + WaitSlot (3000) + Kontext "GrafikEinfuegenDlg" + sleep 2 + '/// insert graphic: "global\input\graf_inp\columbia.dxf" ///' + Dateiname.SetText ConvertPath (gTesttoolPath + "global\input\graf_inp\columbia.dxf") + sleep 2 + Oeffnen.Click + sleep 2 + try + '/// Modify->Convert->To Bitmap ///' + ContextConvertIntoBitmap + Printlog "- Convert into bitmap is working" + catch + Warnlog "- Convert into bitmap does not work" + endcatch + '/// close application ///' + Call hCloseDocument +endcase + +'------------------------------------------------------------------------------------------------------------------------------------------------ + +testcase tdContextConvertIntoMetaFile + '/// open application ///' + Call hNewDocument + WaitSlot (3000) + InsertGraphicsFromFile + WaitSlot (1000) + kontext "Messagebox" + if Messagebox.Exists (5) Then Messagebox.OK + sleep 1 + Kontext "GrafikEinfuegenDlg" + '/// insert graphic: "global\input\graf_inp\desp.bmp" ///' + sleep 2 + Dateiname.SetText ConvertPath (gTesttoolPath + "global\input\graf_inp\desp.bmp") + sleep 2 + Preview.Click + sleep 3 + Oeffnen.Click + sleep 5 + try + '/// Modify->Convert->To Metafile ///' + '/// Modify->Convert->To Metafile ///' + ContextConvertIntoMetafile + Printlog "- convert into meta file does work" + catch + Warnlog "- convert into meta file does not work" + endcatch + '/// close application ///' + Call hCloseDocument +endcase + +'------------------------------------------------------------------------------------------------------------------------------------------------ + +testcase tdModifyArrange + '/// open application ///' + Call hNewDocument + '/// create two rectangles ///' + Call hRechteckErstellen ( 10, 10, 20, 40 ) + hTypeKeys("<escape>") + Call hRechteckErstellen ( 30, 30, 50, 60 ) + '/// Modify->Arrange->Bring to Front ///' + '///+ Modify->Arrange->Bring to Front ///' + FormatArrangeBringToFront + WaitSlot (1000) + '/// Modify->Arrange->Bring Forward ///' + '///+ Modify->Arrange->Bring Forward ///' + ContextArrangeBringForward + WaitSlot (1000) + '/// Modify->Arrange->Send Backward ///' + '///+ Modify->Arrange->Send Backward ///' + ContextArrangeBringBackward + WaitSlot (1000) + '/// Modify->Arrange->Send to Back ///' + '///+ Modify->Arrange->Send to Back ///' + FormatArrangeSendToBack + WaitSlot (1000) + '/// Edit->Select All ///' + EditSelectAll + '/// Modify->Arrange->Reverse ///' + '///+ Modify->Arrange->Reverse ///' + ContextArrangeReverse + WaitSlot (1000) + '/// close application ///' + Call hCloseDocument +endcase + +'------------------------------------------------------------------------------------------------------------------------------------------------ + +testcase tdModifyArrangeObjects + '/// open application ///' + Call hNewDocument + WaitSlot (1000) + '/// create two rectangles ///' + Call hRechteckErstellen ( 20, 20, 30, 50 ) + hTypeKeys("<escape>") + Call hRechteckErstellen ( 30,30,50,50 ) + '/// Modify->Arrange->In Front of Object ///' + '///+ Modify->Arrange->In Front of Object ///' + ContextArrangeInFrontOfObject + '/// click on the upper left rectangle ///' + gMouseClick 11,11 + '/// Modify->Arrange->Behind Object ///' + '///+ Modify->Arrange->Behind Object ///' + ContextArrangeBehindObject + '/// click on the lower right rectangle ///' + gMouseClick 45,45 + sleep 1 + '/// close application ///' + Call hCloseDocument +endcase + +'------------------------------------------------------------------------------------------------------------------------------------------------ + +testcase tdModifyAlignment + '/// open application ///' + Call hNewDocument + WaitSlot (1000) + '/// create rectangle ///' + Call hRechteckErstellen ( 20, 20, 30, 50 ) + '/// Modify->Alignment->Left ///' + '///+ Modify->Alignment->Left ///' + ContextAlignmentLeft + WaitSlot (1000) + '/// Modify->Alignment->Centered ///' + '///+ Modify->Alignment->Centered ///' + ContextAlignmentCentered + WaitSlot (1000) + '/// Modify->Alignment->Right ///' + '///+ Modify->Alignment->Right ///' + ContextAlignmentRight + WaitSlot (1000) + '/// Modify->Alignment->Top ///' + '///+ Modify->Alignment->Top ///' + ContextAlignmentTop + WaitSlot (1000) + '/// Modify->Alignment->Center ///' + '///+ Modify->Alignment->Center ///' + ContextAlignmentBottom + WaitSlot (1000) + '/// Modify->Alignment->Bottom ///' + '///+ Modify->Alignment->Bottom ///' + ContextAlignmentCenter + WaitSlot (1000) + '/// close application ///' + Call hCloseDocument +endcase + +'------------------------------------------------------------------------------------------------------------------------------------------------ + +testcase tdContextDistribution + '/// open application ///' + Call hNewDocument + WaitSlot (3000) + '/// create 3 rectangles ///' + Call sSelectEmptyLayout + Call hRechteckErstellen (20,20,30,30) + Call hRechteckErstellen (40,40,50,50) + Call hRechteckErstellen (60,60,70,70) + sleep 1 + '/// select all with keyboard: <STRG>+ <A> ///' + EditSelectAll + sleep 1 + '/// Modify->Distibution... ///' + '///+ Modify->Distibution... ///' + ContextDistribution + Kontext "VerteilenDlg" + sleep 1 + Call DialogTest (VerteilenDlg) + sleep 1 + '/// check radiobutton horizontal 'Left' ///' + Links.Check + '///+ check radiobutton 'Center' ///' + MitteHorizontal.Check + '///+ check radiobutton 'spacing' ///' + AbstandHorizontal.Check + '///+ check radiobutton 'right' ///' + Rechts.Check + '///+ check radiobutton 'none' ///' + KeineHorizontal.Check + '/// check radiobutton vertical 'top' ///' + Oben.Check + '///+ check radiobutton 'center' ///' + MitteVertikal.Check + '///+ check radiobutton 'spacing' ///' + AbstandVertikal.Check + '///+ check radiobutton 'bottom' ///' + Unten.Check + '///+ check radiobutton 'none' ///' + KeineVertikal.Check + '/// cancel dialog 'Distribution' ///' + VerteilenDlg.Cancel + sleep 2 + '/// close application ///' + Call hCloseDocument +endcase + +'------------------------------------------------------------------------------------------------------------------------------------------------ + +testcase tdContextDescriptionObject + '/// Open application ///' + Call hNewDocument + WaitSlot (1000) + '/// create rectangle ///' + Call hRechteckErstellen ( 10, 10, 20, 40 ) + ContextDescriptionObject + Kontext "DescriptionObject" + Call DialogTest (DescriptionObject) + '/// Cancel dialog 'DescriptionObject' ///' + DescriptionObject.Cancel + '/// Close application ///' + Call hCloseDocument +endcase + +'------------------------------------------------------------------------------------------------------------------------------------------------ + +testcase tdContextNameObject + '/// open application ///' + Call hNewDocument + WaitSlot (1000) + '/// create two rectangles ///' + Call hRechteckErstellen ( 20, 20, 30, 50 ) + hTypeKeys("<escape>") + Call hRechteckErstellen ( 30, 40, 50, 60 ) + sleep 1 + '/// select both by spanning a selection with the mouse ///' + gMouseMove 1,1,70,70 + sleep 1 + '/// Modify->Group ///' + '///+ Modify->Group ///' + FormatGroupGroup + WaitSlot (1000) + '/// Modify->Name Object ///' + '///+ Modify->Name Object ///' + ContextNameObject + Kontext "NameDlgObject" + Call DialogTest (NameDlgObject) + '/// cancel dialog 'name' ///' + NameDlgObject.Cancel + '/// Modify->UnGroup ///' + '///+ Modify->UnGroup ///' + FormatUngroupDraw + '/// close application ///' + Call hCloseDocument +endcase + +'------------------------------------------------------------------------------------------------------------------------------------------------ + +testcase tdModifyConnectBreak + '/// open application ///' + Call hNewDocument + Call sSelectEmptyLayout + sleep 1 + '/// create two rectangles ///' + Call hRechteckErstellen (10,10,30,30) + Call hRechteckErstellen (35,35,50,50) + sleep 1 + '/// Edit->Select All ///' + EditSelectAll + '/// Modify->Connect ///' + '///+ Modify->Connect ///' + ContextConnect + sleep 1 + try + '/// Modify->Break ///' + '///+ Modify->Break ///' + ContextBreak + catch + Warnlog "- Modify-Break does not work" + endcatch + sleep 1 + '/// close application ///' + Call hCloseDocument +endcase + +'------------------------------------------------------------------------------------------------------------------------------------------------ + +testcase tdModifyShapes + '/// open application ///' + Call hNewDocument + Call sSelectEmptyLayout + sleep 1 + '/// create two rectangles ///' + gMouseClick 50,50 + Call hRechteckErstellen (30,30,50,50) + Call hRechteckErstellen (60,60,80,80) + sleep 1 + '/// Edit->Select All ///' + EditSelectAll + sleep 1 + try + '/// Modify->Shapes->Merge ///' + '///+ Modify->Shapes->Merge ///' + ModifyShapesMerge ' 1 + WaitSlot (1000) 'sleep 1 + Printlog "- Modify-Shape merge is working" + catch + Warnlog "- Modify-shape merge is not working" + endcatch + '/// select all and delete it ///' + EditSelectAll + sleep 1 + hTypeKeys "<DELETE>" + sleep 1 + '/// create two rectangles ///' + Call hRechteckErstellen (30,30,50,50) + Call hRechteckErstellen (60,60,80,80) + sleep 1 + '/// Edit->Select All ///' + EditSelectAll + sleep 1 + try + '/// Modify->Shapes->Substract ///' + '///+ Modify->Shapes->Substract ///' + ModifyShapesSubstract ' 2 + Printlog "- Modify-shape-substract is working" + catch + Warnlog "- Modify-shape substract is not working" + endcatch + sleep 1 + '/// select all and delete it ///' + EditSelectAll + sleep 1 + hTypeKeys "<DELETE>" + sleep 1 + '/// create two rectangles ///' + Call hRechteckErstellen (30,30,50,50) + sleep 1 + Call hRechteckErstellen (60,60,80,80) + sleep 1 + EditSelectall + sleep 1 + try + '/// Modify->Shapes->Intersect ///' + '///+ Modify->Shapes->Intersect ///' + ModifyShapesIntersect ' 3 + Printlog "- Modify-shape intersect is working" + catch + Warnlog "- Modify-Shape intersect is not working" + endcatch + '/// close application ///' + Call hCloseDocument +endcase + +'------------------------------------------------------------------------------------------------------------------------------------------------ + +testcase tdModifyCombineSplit + '/// open application ///' + Call hNewDocument + Call sSelectEmptyLayout + sleep 1 + '/// create two rectangles ///' + Call hRechteckErstellen (30,30,50,50) + Call hRechteckErstellen (60,60,80,80) + sleep 1 + '/// Edit->Select All ///' + EditSelectAll + sleep 1 + try + '/// Modify->Shapes->Combine ///' + '///+ Modify->Shapes->Combine ///' + ContextCombine + Printlog "- Modify combine is working" + '/// Modify->Shapes->Split ///' + '///+ Modify->Shapes->Split ///' + ContextSplit + Printlog "- Modify-split is working" + catch + Warnlog "- Modify-combine and split are not working" + endcatch + '/// close application ///' + Call hCloseDocument +endcase + +'------------------------------------------------------------------------------------------------------------------------------------------------ diff --git a/testautomation/graphics/required/includes/global/id_008.inc b/testautomation/graphics/required/includes/global/id_008.inc new file mode 100644 index 000000000000..0697e82260b7 --- /dev/null +++ b/testautomation/graphics/required/includes/global/id_008.inc @@ -0,0 +1,75 @@ +'encoding UTF-8 Do not remove or change this line! +'************************************************************************** +' DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. +' +' Copyright 2000, 2010 Oracle and/or its affiliates. +' +' OpenOffice.org - a multi-platform office productivity suite +' +' 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 : wolfram.garten@sun.com +'* +'* short description : +'* +'\***************************************************************** + +testcase tiWindowNewWindow + + '/// open application ///' + Call hNewDocument + '/// create rectangle ///' + Call hRechteckErstellen ( 10, 10, 20, 40 ) + '/// Window->New Window ///' + WindowNewWindow + WaitSlot (2000) + '/// close application ///' + Call hCloseDocument +endcase + +testcase tidWindow123 + goto endsub '' testing TBO: 29.03.2002 + dim iMenues as integer + '/// open application ///' + Call hNewDocument + '/// create rectangle ///' + Call hRechteckErstellen ( 10, 10, 20, 40 ) + + Kontext "DocumentImpress" + DocumentImpress.UseMenu + iMenues = MenuGetItemCount + warnlog "---- Number of Main menus: " & iMenues + MenuSelect(Menugetitemid(8)) + sleep 1 + iMenues = MenuGetItemCount + printlog "---- Number of Main menus: " & iMenues + ' MenuSelect(Menugetitemid(14)) + sleep 1 + i=1 + printlog "count: " + i + "; of submenu: " + MenuGetItemCount + "; SID: " + MenuGetItemId (i) + "; Text: " + MenuGetItemText (Menugetitemid(i)) + "; Command: " + MenuGetItemCommand(Menugetitemid(i)) + "; Seperator?: " + MenuIsSeperator(i) + "; Enabled: " + MenuIsItemEnabled(Menugetitemid(i)) + "; Checked: " + MenuIsItemChecked(Menugetitemid(i)) + ";" + i=2 + printlog "count: " + i + "; of submenu: " + MenuGetItemCount + "; SID: " + MenuGetItemId (i) + "; Text: " + MenuGetItemText (Menugetitemid(i)) + "; Command: " + MenuGetItemCommand(Menugetitemid(i)) + "; Seperator?: " + MenuIsSeperator(i) + "; Enabled: " + MenuIsItemEnabled(Menugetitemid(i)) + "; Checked: " + MenuIsItemChecked(Menugetitemid(i)) + ";" + warnlog "Dynamic entries not accessible ? :-(((((" + ' i=3 + ' printlog "count: " + i + "; of submenue: " + MenuGetItemCount + "; SID: " + MenuGetItemId (i) + "; Text: " + MenuGetItemText (Menugetitemid(i)) + "; Command: " + MenuGetItemCommand(Menugetitemid(i)) + "; Seperator?: " + MenuIsSeperator(i) + "; Enabled: " + MenuIsItemEnabled(Menugetitemid(i)) + "; Checked: " + MenuIsItemChecked(Menugetitemid(i)) + ";" + '/// close application ///' + Call hCloseDocument +endcase + diff --git a/testautomation/graphics/required/includes/global/id_009.inc b/testautomation/graphics/required/includes/global/id_009.inc new file mode 100644 index 000000000000..bbd9481430ab --- /dev/null +++ b/testautomation/graphics/required/includes/global/id_009.inc @@ -0,0 +1,282 @@ +'encoding UTF-8 Do not remove or change this line! +'************************************************************************** +' DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. +' +' Copyright 2000, 2010 Oracle and/or its affiliates. +' +' OpenOffice.org - a multi-platform office productivity suite +' +' 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 : wolfram.garten@sun.com +'* +'* short description : Testcases to test the Help-Menu. +'* +'\****************************************************************************** +' +testcase tmHelpHelpAgent + + Call hNewDocument + + hTBOtypeInDoc + + HelpHelpAgent ' it's just a switch + sleep 2 + HelpHelpAgent + + Call hCloseDocument +endcase + +'...---....---.-.-.-.-.....---......--.-.-.-.....----..-........................---....... + +testcase tmHelpTips + Call hNewDocument + hTBOtypeInDoc + + HelpTips + Sleep 2 + HelpTips + + Call hCloseDocument +endcase + +'...---....---.-.-.-.-.....---......--.-.-.-.....----..-........................---....... + +testcase tmHelpExtendedTips + Call hNewDocument + hTBOtypeInDoc + + HelpEntendedHelp + Sleep (2) + HelpEntendedHelp + + Call hCloseDocument +endcase + +'...---....---.-.-.-.-.....---......--.-.-.-.....----..-........................---....... + +testcase tmHelpAboutStarOffice + Call hNewDocument + hTBOtypeInDoc + + HelpAboutStarOffice + Kontext "UeberStarMath" + DialogTest (UeberStarMath) + UeberStarMath.OK + + Call hCloseDocument +endcase + +'...---....---.-.-.-.-.....---......--.-.-.-.....----..-........................---....... + +testcase tmHelpContents + goto endsub '"#i84486# - tmHelpContents outcommented due to crash." + dim i as integer + + '/// open application ///' + Call hNewDocument + '/// Help->Contents ///' + HelpContents + sleep(8) + kontext "StarOfficeHelp" + if Not StarOfficeHelp.Exists then + Warnlog "Help is not up!" + else + '/// get the number of entries in the listbox 'select Help modul' ///' + Printlog "HelpAbout: '" + HelpAbout.GetItemCount +"'" + '################ left half ################ + '/// on the left half of the dialog: ///' + '///+ change to the tabpage 'Contents' ///' + TabControl.SetPage ContentPage + '///+ get the number of entries in the listbox 'MAin help themes' ///' + Printlog "SearchContent: '" + SearchContent.GetItemCount + "'" + '///+ change to the tabpage 'Index' ///' + TabControl.SetPage IndexPage + '///+ get the number of entries in the listbox 'Search term' ///' + Printlog "SearchIndex: '" + SearchIndex.GetItemCount + "'" + sleep 5 + '///+ click on button 'Display' ///' + DisplayIndex.Click + sleep 5 + '///+ change to the tabpage 'Find' ///' + TabControl.SetPage FindPage + '///+ get the number of entries in the listbox 'Search term' ///' + Printlog "SearchFind: '" + SearchFind.GetItemCount + "'" + '/// If the Search-Text-Field is empty - Check that the Find-button is deactivated ///' + if SearchFind.GetSelText = "" then + if FindButton.IsEnabled then + warnlog " The Find-Button should have been inactive, but was active." + endif + else + warnlog " The Search-Text-Field shouldn't contain any text. But contained: " + SearchFind.GetSelText + endif + '/// Insert some irrelevant text to get 0 results from the search. ///' + SearchFind.SetText "Doobbidedooo" + '///+ click on button 'Find' ///' + FindButton.Click + kontext + '///+ Messagebox comes up about: 'No topics found.' say OK ///' + if (active.exists (2) )then + Printlog "active came up: '" + active.gettext + "'" + active.ok + endif + kontext "StarOfficeHelp" + '///+ check checkbox 'Complete words only' ///' + FindFullWords.Check + '///+ check checkbox 'Find in headings only' ///' + FindInHeadingsOnly.Check + '///+ get the number of entries in the listbox 'List of headings' ///' + Printlog "Result: '" + Result.GetItemCount + "'" + '///+ click on button 'Display' ///' + DisplayFind.Click + '///+ change to the tabpage 'Bookmarks' ///' + TabControl.SetPage BookmarksPage + '///+ get the number of entries in the listbox 'Bookmark list' ///' + Printlog "Bookmarks: '" + Bookmarks.GetItemCount + "'" + '///+ click on button 'Display' ///' + DisplayBookmarks.Click + '################ right half ################ + '/// on the right half of teh dialog: ///' + '################ toolbar ################ + Kontext "TB_Help" + '///+ click on button 'Hide/Show Navigation Pane' ///' + Index.Click + sleep 1 + '///+ click on button 'Hide/Show Navigation Pane' ///' + Index.Click + sleep 1 + '///+ click on button 'First Page' ///' + GoToStart.Click + sleep 1 + '///+ click on button 'Previous Page' ///' + Backward.Click + sleep 1 + '///+ click on button 'Next Page' ///' + Forward.Click + sleep 1 + '///+ click on button 'Print ...' ///' + PrintButton.Click + sleep (1) + + kontext "Active" + if Active.Exists( 2 ) then + qaerrorlog "No default printer defined: " & Active.GetText + Active.Ok + end if + + kontext "Printing" + if Printing.Exists( 2 ) then + '/// In the dialog 'Print' press the button 'Cancel' ///' + Printing.cancel + else + warnlog "the Print-Dialogue didnt appear." + end if + Kontext "TB_Help" + '///+ click on button 'Add to Bookmarks ...' ///' + sleep 1 + SetBookmarks.Click + sleep 1 + Kontext "AddBookmark" + '///+ on the dialog 'Add to Bookmarks ...' get the text from the editfield 'Bookmark' and press button 'Cancel' ///' + Printlog "Bookmarkname: '" + Bookmarkname.GetText + "'" + AddBookmark.Cancel + sleep 1 + '################ help display ################ + kontext "HelpContent" + '///+ open the Context Menu of the Frame 'Help Content' and count the entries ///' + HelpContent.OpenContextMenu + + sleep 1 + Printlog " i: " + hMenuItemGetCount + hMenuClose() + '################ right scroolbar ################ + kontext "HelpContent" + '///+ click on button 'Previous Page' ///' + if HelpContentUP.IsVisible then + HelpContentUP.Click + sleep 1 + endif + '///+ click on button 'Navigation' ///' + if HelpContentNAVIGATION.IsVisible then + HelpContentNAVIGATION.Click + sleep 1 + endif + kontext "NavigationsFenster" + '/// on the toolbox 'Navigation' press the window close button 'X' ///' + NavigationsFenster.Close + sleep 1 + kontext "HelpContent" + '///+ click on button 'Next Page' ///' + if HelpContentDOWN.IsVisible then + HelpContentDOWN.Click + sleep 1 + endif + kontext "StarOfficeHelp" + '/// close the help with the keys [strg]+[F4] ///' + Printlog "trying to close the help now" + try + StarOfficeHelp.TypeKeys "<Mod1 F4>" ' strg F4 supported since bug #103586# + catch + Warnlog "failed to close the help window :-(" + endcatch + kontext "StarOfficeHelp" + if StarOfficeHelp.Exists then + warnlog "Help still up!" + endif + endif + '/// close application ///' + Call hCloseDocument +endcase + +'...---....---.-.-.-.-.....---......--.-.-.-.....----..-........................---....... + +testcase tCheckIfTheHelpExists + '/// open application ///' + Call hNewDocument + '/// Bring up the help-window ///' + HelpContents + kontext "HelpContent" + sleep (5) + '/// Press "CTRL A" and "CTRL C" to select all and then copy it. ///' + HelpContent.TypeKeys "<MOD1 A>" + sleep (1) + HelpContent.TypeKeys "<MOD1 C>" + '/// If the clipboard now is empty, then nothing were copied, which means we have a bug. ///' + if GetClipBoard = "" then + Warnlog " No content in the Help-Content -view." + else + Printlog " The Help-Content -view contained content. Good." + endif + kontext "StarOfficeHelp" + '/// Press "CTRL F4" to close the help-window. ///' + try + StarOfficeHelp.TypeKeys "<MOD1 F4>" + catch + Warnlog " Failed to close the help window :-(" + endcatch + kontext "StarOfficeHelp" + if StarOfficeHelp.Exists then + warnlog "Help was still visible!" + endif + '/// And a dot into the main window. Making sure kontext and focus is right. ///' + hTypeKeys "." + '/// Close Application ///' + Call hCloseDocument +endcase 'tCheckIfTheHelpExists diff --git a/testautomation/graphics/required/includes/global/id_011.inc b/testautomation/graphics/required/includes/global/id_011.inc new file mode 100644 index 000000000000..a0e3e680709d --- /dev/null +++ b/testautomation/graphics/required/includes/global/id_011.inc @@ -0,0 +1,1157 @@ +'encoding UTF-8 Do not remove or change this line! +'************************************************************************** +' DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. +' +' Copyright 2000, 2010 Oracle and/or its affiliates. +' +' OpenOffice.org - a multi-platform office productivity suite +' +' 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 : wolfram.garten@sun.com +'* +'* short description : +'* +'\****************************************************************************** + +testcase tiTextToolbar + + Dim iWaitIndex as integer + Dim Zufall as integer + Dim i as integer + + '/// open application ///' + Call hNewDocument + Call sSelectEmptyLayout + + '/// create a textframe with text ///' + hTextrahmenErstellen ("This is a Text, which will be formatted in several ways", 20,20,40,80) + '/// The 'Object Toolbar' now changes ///' + sleep 2 + '/// select of the text with <STRG> + <A> ///' + EditSelectAll + sleep 2 + '/// Call the textobjectbar from the View-Toolbars-menu ///' + Kontext "TextObjectbar" + if TextObjectbar.Exists <> TRUE then 'isVisible + ViewToolbarsTextFormatting + end if + WaitSlot (3000) 'sleep (3) + Kontext "TextObjectbar" + Printlog "- choose random font" + randomize + Zufall=((2*Rnd)+1) ' wird nicht auf den verfuegbaren bereich getreckt :-( TODO TBO! + Schriftart.GetItemcount + Schriftart.GetSelText + Schriftart.Select (Zufall) + '/// select any font you like in the listbox 'Font' on 'Object Toolbar' ///' + Printlog Schriftart.GetSelText + " chosen" + + Kontext "TextObjectbar" + sleep 2 + Printlog "- Change size of font" + '/// select any font you like in the listbox 'Size' on 'Object Toolbar' ///' + Schriftgroesse.Select (Zufall) + Printlog Schriftgroesse.GetSelText + " chosen" + + Kontext "TextObjectbar" + Printlog "- Font attribute bold" + '/// click button 'Bold' ///' + Fett.Click + sleep 2 + + Kontext "TextObjectbar" + Printlog "- Font attribute cursive" + '/// click button 'Italic' ///' + Kursiv.Click + sleep 2 + + Kontext "TextObjectbar" + Printlog "- Font attribute cursiv" + '/// click button 'Underline' ///' + Unterstrichen.Click + sleep 2 + + Kontext "TextObjectbar" + Printlog "- font attribute color" + '/// click button 'Font Color' and tearoff the box ///' + sleep 3 + FontColorGraphics.TearOff + Kontext "TB_Farbe" + TB_Farbe.Move 20, 20 + Sleep 2 + '/// double click in the middle of the box ///' + TB_Farbe.MouseDoubleClick 50, 50 + Sleep 2 + '/// close box 'Font Color' ///' + TB_Farbe.Close + + Kontext "TextObjectbar" + Printlog "- Allign text left" + '/// click button 'Left' ///' + Linksbuendig.Click + sleep 2 + + Kontext "TextObjectbar" + Printlog "- Allign text centered" + '/// click button 'Centered' ///' + Zentriert.Click + sleep 2 + + Kontext "TextObjectbar" + Printlog "- align text to right" + '/// click button 'Right' ///' + Rechtsbuendig.Click + sleep 2 + + Kontext "TextObjectbar" + Printlog "- Justified" + '/// click button 'Justified' ///' + Blocksatz.Click + sleep 2 + + Kontext "TextObjectbar" + if TextObjectbar.isEnabled <> TRUE then + warnlog "Couldn't access TextObjectbar - known bug with bars - FHA" + ViewToolbarsTextFormatting + end if + WaitSlot (2000) 'sleep 2 + Printlog "- Raising Font spacing" + '/// click button 'Increase Spacing' ///' + + kontext "TextObjectbar" + sleep 1 + '/// Check if the bar is there. If not - wait for maximum 10 seconds) + iWaitIndex = 0 + do while NOT TextObjectbar.isEnabled AND iWaitIndex < 10 + sleep(1) + iWaitIndex = iWaitIndex + 1 + loop + if NOT TextObjectbar.isEnabled AND iWaitIndex = 10 then + warnlog "Dialogue TextObjectbar didnt work. Ending testcase." + Call hCloseDocument + goto endsub + end if + '/// Activate the Font spacing-buttons ///' + TextObjectbar.OpenContextMenu + sleep 2 + hMenuselectNr (1) + sleep 2 + hMenuItemCheck (13) + sleep 2 + TextObjectbar.OpenContextMenu + sleep 2 + hMenuselectNr (1) + sleep 2 + hMenuItemCheck (14) + sleep 2 + ZeilenabstandErhoehen.Click + sleep 2 + + Kontext "TextObjectbar" + Printlog "- Decrease Spacing" + '/// click button 'Decrease Spacing' ///' + ZeilenabstandVerringern.Click + sleep 2 + + Kontext "TextObjectbar" + Printlog "- Numbering and Bullets" + sleep 2 + '/// click button 'Bullets On/Off' ///' + BulletsOnOff.Click + sleep 2 + '/// click button 'Bullets On/Off' ///' + BulletsOnOff.Click + '----------------------------------------------------------------------- + Kontext "TextObjectBar" + Printlog "- Increase Font /Reduce Font" + sleep 2 + printlog "- Click on Increase Font" + IncreaseFont.Click + sleep 2 + printlog "- Click on Reduce Font" + ReduceFont.Click + '----------------------------------------------------------------------- + Kontext "TextObjectbar" + Printlog "- Text direction from left to right" + sleep 2 + Printlog "- click button 'Text direction from left to right'" + try + TextdirectionLeftToRight.Click + printlog "hor does work :-)" + if (gAsianSup = FALSE) then + warnlog " this doesn't have to work if asian lang support is disabled :-)" + end if + catch + if (gAsianSup = TRUE) then + warnlog "hor does NOT work :-(" + end if + endcatch + Printlog "- click button 'Text direction from top to bottom" + try + TextdirectionTopToBottom.Click + printlog "ver does work :-)" + if (gAsianSup = FALSE) then + warnlog " this doesnt have to work if asian lang support is disabled :-)" + end if + catch + if (gAsianSup = TRUE) then + warnlog "ver does NOT work :-( , AsianLanguage support is enabled !" + end if + endcatch + + Printlog "- open character dialog" + Kontext "TextObjectbar" + sleep 2 + '/// click button 'Character' ///' + Zeichenformat.Click + sleep 2 + Kontext + Active.SetPage TabFont + Kontext "TabFont" + sleep 2 + if TabFont.Exists Then + '/// close dialog 'character' ///' + TabFont.Cancel + Printlog "- Tabfont exists" + else + Warnlog "- No dialog exists " + end if + + Kontext "TextObjectbar" + sleep 2 + Printlog "- call properties for paragraph using text object toolbar" + '/// click button 'Paragraph' ///' + Absatzformat.Click + sleep 2 + Kontext + Active.SetPage TabTabulator + Kontext "TabTabulator" + if TabTabulator.Exists Then + Printlog "- TabTabulator exists" + '/// close dialog 'Paragraph' ///' + TabTabulator.Cancel + else + Warnlog "- TabTabulator does not exist" + end if + + if (UCase(gApplication)) = "IMPRESS" then ' IMPRESS only + '/// if the Application is Impress: ///' + + Kontext "TextObjectbar" + '/// click button 'Numbering Symbols' ///' + OutlineBullet.Click + kontext + if active.exists (5) then + messagebox.SetPage TabOptionenNumerierung + kontext "TabOptionenNumerierung" + '/// cancel dialog 'Numbering/Bullets' ///' + if (TabOptionenNumerierung.exists (5) ) then + Printlog "Numbering/Bullets window came up :-)" + sleep 2 + TabOptionenNumerierung.cancel + else + warnlog "no Numbering/Bullets window came up :-(" + end if + sleep 2 + else + warnlog "no Numbering/Bullets window came up :-( 2" + end if + + Printlog "-change order of outline points" + sleep 3 + '/// View->Master View->Outline View ///' + ViewWorkspaceOutlineView + WaitSlot (2000) 'sleep (3) + Kontext "DocumentImpressOutlineView" + sleep 1 + '/// type something ///' + DocumentImpressOutlineView.TypeKeys "Bla bla bla <RETURN><TAB>bla bla bla bla bla <MOD1 SHIFT LEFT>" + sleep 1 + Kontext "TextObjectbar" + '/// click button 'Promote' ///' + HierachieRunter.Click + sleep 1 + Printlog "- Move back down" + '/// click button 'Denote' ///' + HierachieHoch.Click + sleep 1 + '/// click button 'Denote' ///' + HierachieHoch.Click + sleep 1 + Printlog "- Move paragraph up" + '/// click button 'Move Up', twice to get two slides ///' + AbsatzHoch.Click + sleep 1 + Printlog "- move paragraph back down and switch to drawing view" + '/// click button 'Move Down' ///' + AbsatzRunter.Click + sleep 1 + + Kontext "Vorschau" + if Vorschau.Exists then + printlog "- - - - preview window is open, hope there is no problem" + ' Vorschau.Close + end if + + else ' DRAW only + Kontext "TextObjectbar" + Printlog "- Double" + '/// click button 'Double' ///' + LineSpacing2.Click + sleep 2 + + Kontext "TextObjectbar" + Printlog "- 1.5 lines" + '/// click button '1.5 lines' ///' + LineSpacing15.Click + sleep 2 + + Kontext "TextObjectbar" + Printlog "- Single" + '/// click button 'Single' ///' + LineSpacing1.Click + sleep 2 + end if + + '/// Check if the bar is there. If not - wait for maximum 10 seconds) + iWaitIndex = 0 + Kontext "TextObjectbar" + do while TextObjectbar.isEnabled = FALSE AND iWaitIndex < 10 + sleep(1) + iWaitIndex = iWaitIndex + 1 + loop + if TextObjectbar.isEnabled = FALSE AND iWaitIndex = 10 then + warnlog "Dialogue TextObjectbar didnt work. Ending testcase." + Call hCloseDocument + goto endsub + end if + '/// Reset the original value of the Font spacing-buttons ///' + sleep 2 + Kontext "TextObjectbar" + TextObjectbar.OpenContextMenu + sleep 2 + hMenuselectNr (1) + sleep 2 + hMenuItemUnCheck (13) + sleep 2 + TextObjectbar.OpenContextMenu + sleep 2 + hMenuselectNr (1) + sleep 2 + hMenuItemUnCheck (14) + sleep 2 + '/// Close the TextFormatting Toolbar ///' + ViewToolbarsTextFormatting + WaitSlot (2000) 'sleep 1 + '/// Clear the document from content ///' + if (gApplication = "IMPRESS") then + Kontext "DocumentImpressOutlineView" + DocumentImpressOutlineView.TypeKeys "<ESCAPE>" + EditSelectAll + DocumentImpressOutlineView.TypeKeys "<DELETE>" + sleep (3) + ViewWorkspaceDrawingView + Kontext "DocumentImpress" + WaitSlot (2000) 'sleep 1 + DocumentImpress.TypeKeys "<ESCAPE>" + EditSelectAll + DocumentImpress.TypeKeys "<DELETE>" + else + Kontext "DocumentDraw" + DocumentDraw.TypeKeys "<ESCAPE>" + EditSelectAll + DocumentDraw.TypeKeys "<DELETE>" + end if + Printlog "Test ended." + + '/// close application ///' + Call hCloseDocument +endcase + +'------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------' + +testcase tiDrawObjectBar + Dim a as string + Dim Zaehler as integer + Dim i as integer + Dim x as integer + + '/// open application ///' + Call hNewDocument + + '/// create rectangle to test the part for draw objects ///' + Call hRechteckErstellen (20,20,70,70) + sleep 1 + '--------------------------- format line ------------------------ + Printlog "- call format line using graphic object toolbar" + Kontext "DrawingObjectbar" + '/// Check if the Graphic-Toolbar is there. Which it should be. ///' + '/// If it's not - then we call it from the View-Toolbars ///' + if DrawingObjectbar.Exists = FALSE then + ViewToolbarsGraphic + end if + if DrawingObjectbar.Exists = FALSE then + warnlog "Drawing-Objectbar should have been opened, but wasnt" + ViewToolbarsGraphic + end if + + sleep 3 + '/// click button 'line' on 'Object Toolbar' ///' + Linie.Click + sleep 2 + Kontext + Active.SetPage TabLinie + Kontext "TabLinie" + if TabLinie.Exists Then + '/// cancel dialog 'line' ///' + TabLinie.Cancel + Printlog "- TabLinie exists " + else + Warnlog "- TabLinie does not exist" + end if + + '--------------------------- Linienendenstil -------------------- + Printlog "- Style of line ends" + Kontext "DrawingObjectbar" + sleep 1 + '/// click button 'Arrow Style' and tearoff the box ///' + Linienendenstil.TearOff + sleep 2 + Kontext "Linienenden" + if Linienenden.Exists Then + Printlog "- dialog exists" + '/// close toolbox 'arrowheads' ///' + Linienenden.Close + else + Warnlog "- Arrowheads does not exist" + end if + + '--------------------------- Linienstil ------------------------- + Printlog "- choose style of lines using graphic object toolbar" + + Kontext "DrawingObjectbar" + sleep 1 + '/// select 2nd entry from the top in listbox 'Line Style' ///' + Linienstil.Select 2 + Printlog Linienstil.GetSelText + " chosen" + '/// select last entry in listbox 'Line Style' ///' + Linienstil.Select Linienstil.GetItemCount + Printlog Linienstil.GetSelText + " chosen" + sleep 2 + + '--------------------------- Linienbreite------------------------ + Printlog "- check style of lines using graphic object toolbar" + Kontext "DrawingObjectbar" + sleep 1 + a = Linienbreite.GetText + SetClipboard a + sleep 1 + '/// set 'Line Width' to "0,5" ///' + Linienbreite.SetText "0,5" + sleep 2 + '/// check if the value is accepted or not ///' + if Linienbreite.GetText = a Then + Warnlog "- changes in edit field did not happen; is: '"+Linienbreite.GetText+"', should be : '"+"0,5"+"'" + else + Printlog "- Width of lines changed" + end if + + '--------------------------- Linienfarbe ------------------------ + Printlog "- change line color" + Kontext "DrawingObjectbar" + sleep 1 + Zaehler = Linienfarbe.GetItemCount + randomize + i = Int(Zaehler*Rnd+1) + '/// select some entry in the listbox 'Line Color' ///' + Linienfarbe.Select i + Printlog Linienfarbe.GetSelText + " chosen" + + '--------------------------- Flaechenformatierung --------------- + Printlog "- Call Format area using graphic object toolbar" + Kontext "DrawingObjectbar" + sleep 1 + '/// click button 'Area' ///' + try + Flaeche.Click + catch + printlog "clicking on area took ages :-(" + endcatch + sleep 5 + Kontext + Active.SetPage TabArea + Kontext "TabArea" + if TabArea.Exists Then + Printlog "- TabArea exists " + '/// cancel dialog 'Area' ///' + TabArea.Cancel + else + Warnlog "- TabArea does not exist" + end if + + '--- + sleep 1 + Kontext "DrawingObjectbar" + sleep 1 + x = AreaStyle.GetItemCount + i = 1 + for i = i to x + AreaStyle.Select i + Printlog "Area Style: (" + i + "/" + x + ") - " + AreaStyle.GetSelText + sleep 1 + '/// for every item in the listbox 'Area Style' select the last item in the listbox 'Area Filling' ///' + if AreaStyle.GetSelIndex > 1 then + Printlog " Area Filling " + AreaFilling.GetSelIndex + " - " + AreaFilling.GetItemCount + if (i <> 1) AND (AreaFilling.GetItemCount <> 0) then + if (AreaFilling.GetSelIndex = 0) AND (AreaFilling.GetItemCount > 0) then + printlog "default item is 0 => means nothing; NO BUG! 100909" + end if + AreaFilling.Select (AreaFilling.GetItemCount) + Printlog " Selected: " + AreaFilling.GetSelIndex + " - " + AreaFilling.GetSelText + end if + end if + next i + + '---------------------------- Schatten -------------------------- + Printlog "- Assign shadow using graphic object toolbar" + Kontext "DrawingObjectbar" + sleep 1 + '/// click button 'Shadow' ///' + Schatten.Click + sleep 1 + Printlog "- shadow assigned" + + '---------------------------- Praesentationsflyer --------------- + '/// if Application is Impress: ///' + if (UCase(gApplication)) = "IMPRESS" then ' IMPRESS only + Printlog "- Call presentation flyer" + Kontext "CommonTaskbar" ' first check , if presentation flyer is up! if not -> make it up :-) + '///+ if 'Presentation Box' is not visible, click button 'Presentation Box on/off' ///' + if CommonTaskbar.Exists Then + printlog "- flyer is already visible :-)" + else + printlog "- flyer wasn't visible :-( -will be now!" + Kontext "DrawingObjectbar" + sleep 1 + ViewToolbarsPresentation ' put it up again! + end if + end if + '/// Make sure the Graphics-Toolbar is visible ///' + if ((UCase(gApplication)) = "IMPRESS") then ' IMPRESS only + Kontext "DrawingObjectbar" + if DrawingObjectbar.isVisible = FALSE then + ViewToolbarsGraphic + end if + end if + '/// close application ///' + Call hCloseDocument +endcase + +'------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------' + +testcase tiGraphicsObjectBar + dim i as integer + '/// open application ///' + Call hNewDocument + + '/// insert a graphic "global\input\graf_inp\desp.bmp" ///' + hGrafikeinfuegen ConvertPath (gTesttoolPath + "global\input\graf_inp\desp.bmp") + sleep 1 + Kontext "GraphicObjectbar" + if GraphicObjectbar.Exists = FALSE then + ViewToolbarsPicture + end if + sleep 1 + '/// click button 'Filter' and tearoff the box in the Objectbar///' + Filter.TearOff + sleep 1 + Kontext "GraphicFilterBar" + sleep 1 + Printlog "invert" + '/// click button 'Invert' in window 'Filters' ///' + Invert.Click + sleep 3 + Printlog "smooth" + '/// click button 'Smooth' in window 'Filters' ///' + Smooth.Click + sleep 3 + Printlog "sharpen" + '/// click button 'Sharpen' in window 'Filters' ///' + Sharpen.Click + sleep 3 + Printlog "remove noise" + '/// click button 'RemoveNoise' in window 'Filters' ///' + Remove.Click + sleep 3 + Printlog "solarization" + '/// click button 'Solarization' in window 'Filters' ///' + Solarization.Click + sleep 3 + Kontext "Solarization" + if Solarization.exists (5) then + sleep 1 + Call Dialogtest ( Solarization ) + sleep 1 + '/// press 'more' and 'less' in field 'Trashold Value' on dialog 'Solarization' ///' + Value.More + Value.Less + '/// check checkbox 'Invert' on dialog 'Solarization' ///' + Invert.Check + '/// close dialog 'Solarization' with OK ///' + Solarization.OK + else + warnlog "solarization didn't came up :-(" + end if + sleep 1 + Kontext "GraphicFilterBar" + sleep 1 + Printlog "aging" + '/// click button 'Aging' in window 'Filters' ///' + Aging.Click + Kontext "Aging" + sleep 1 + Call Dialogtest ( Aging ) + '/// press 'more' and 'less' in field 'Aging degree' on dialog 'Aging' ///' + AgingDegree.More + AgingDegree.Less + sleep 1 + '/// close dialog 'Aging' with OK ///' + Aging.OK + sleep 1 + Kontext "GraphicFilterBar" + sleep 1 + Printlog "poster" + '/// click button 'Posterize' in window 'Filters' ///' + Posterize.Click + sleep 1 + Kontext "Posterize" + sleep 1 + Call Dialogtest ( Posterize ) + '/// press 'more' and 'less' in field 'Aging degree' on dialog 'Posterize' ///' + PosterColors.More + PosterColors.Less + sleep 1 + '/// close dialog 'Posterize' with OK ///' + Posterize.OK + sleep 2 + kontext "GraphicFilterBar" + sleep 1 + Printlog "pop" + '/// click button 'PopArt' in window 'Filters' ///' + Art.Click + sleep 3 + Printlog "charcoal" + '/// click button 'CharcoalSketch' in window 'Filters' ///' + CharcoalSketch.Click + sleep 3 + Printlog "relief" + '/// click button 'Relief' in window 'Filters' ///' + Relief.Click + Kontext "Relief" + sleep 1 + Call Dialogtest ( Relief ) + LightSource.TypeKeys "<left><up>" + '/// close dialog 'Relief' with OK ///' + Relief.OK + sleep 3 + Kontext "GraphicFilterBar" + Printlog "mos" + '/// click button 'Mosaic' in window 'Filters' ///' + Mosaic.Click + sleep 1 + Kontext "Mosaic" + sleep 1 + Call Dialogtest ( Mosaic ) + '/// press 'more' and 'less' in field 'Width' on dialog 'Mosaic' ///' + Width.More + Width.Less + '/// press 'more' and 'less' in field 'Height' on dialog 'Mosaic' ///' + Height.More + Height.Less + '/// check checkbox 'Enhance Edges' on dialog 'Mosaic' ///' + EnhanceEdges.Check + '/// close dialog 'Mosaic' with OK ///' + Mosaic.OK + sleep 3 + Kontext "GraphicFilterBar" + '/// close dialog 'Filters' ///' + GraphicFilterBar.Close + + Kontext "GraphicObjectbar" + if GraphicObjectbar.Exists = FALSE then ViewToolbarsPicture + sleep 1 + '/// select every entry in the listbox 'Graphics mode' ///' + for i = 1 to Grafikmodus.GetItemCount + Grafikmodus.select i + sleep 1 + next i + + '/// Click on the icon for 'ColorSettings' to open the colorbar ///' + ColorSettings.Click + Kontext "ColorBar" + sleep (2) + + '/// press 'more' and 'less' in field 'Red' on colorbar ///' + try + Rotanteil.More + Rotanteil.Less + catch + warnlog "not working from testtool redvalue "+ rotanteil.GetRT + endcatch + '/// press 'more' and 'less' in field 'Green' on colorbar ///' + try + Gruenanteil.More + Gruenanteil.Less + catch + warnlog "not working from testtool Greenvalue." + endcatch + '/// press 'more' and 'less' in field 'Blue' on colorbar ///' + try + Blauanteil.More + Blauanteil.Less + catch + warnlog "not working from testtool Bluevalue." + endcatch + '/// press 'more' and 'less' in field 'Brightness' on colorbar ///' + try + Helligkeit.More + Helligkeit.Less + catch + warnlog "not working from testtool Brightness." + endcatch + '/// press 'more' and 'less' in field 'Contrast' on colorbar ///' + try + Kontrast.More + Kontrast.Less + catch + warnlog "not working from testtool Contrast." + endcatch + '/// press 'more' and 'less' in field 'Gamma' on colorbar ///' + try + Gamma.More + Gamma.Less + catch + warnlog "not working from testtool Gamma." + endcatch + + ColorBar.Close + Kontext "GraphicObjectbar" + + '/// press 'more' and 'less' in field 'Transparency' on objectbar ///' + try + Transparenz.More + Transparenz.Less + catch + warnlog "Not working from testtool Transparency." + endcatch + + '/// press button 'Crop' on objectbar ///' + Crop.click + '/// Opening Dialog via Slot + FormatCropPicture + + kontext "TabZuschneiden" + '/// check radiobutton 'Keep scale' on dialog 'Crop' ///' + GroesseBeibehalten.Check + '/// check radiobutton 'Keep Image Size' on dialog 'Crop' ///' + MassstabBeibehalten.Check + '/// press 'more' and 'less' in field 'Left' in section 'Crop' on dialog 'Crop' ///' + Links.More + Links.Less + '/// press 'more' and 'less' in field 'Right' in section 'Crop' on dialog 'Crop' ///' + Rechts.More + Rechts.Less + '/// press 'more' and 'less' in field 'Top' in section 'Crop' on dialog 'Crop' ///' + Oben.More + Oben.Less + '/// press 'more' and 'less' in field 'Bottom' in section 'Crop' on dialog 'Crop' ///' + Unten.More + Unten.Less + '/// press 'more' and 'less' in field 'Width' in section 'Scale' on dialog 'Crop' ///' + MassstabBreite.More + MassstabBreite.Less + '/// press 'more' and 'less' in field 'Height' in section 'Scale' on dialog 'Crop' ///' + MassstabHoehe.More + MassstabHoehe.Less + '/// press 'more' and 'less' in field 'Width' in section 'Image size' on dialog 'Crop' ///' + GroesseBreite.More + GroesseBreite.Less + '/// press 'more' and 'less' in field 'Height' in section 'Image size' on dialog 'Crop' ///' + GroesseHoehe.More + GroesseHoehe.Less + '/// click button 'Original Size' on dialog 'Crop' ///' + Originalgroesse.Click + '/// cancel dialog 'Crop' ///' + TabZuschneiden.Cancel + + '/// close application ///' + Call hCloseDocument +endcase + +'------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------' + +testcase tiGluepointToolbar + '/// open application ///' + Call hNewDocument + + '/// create 2 rectangles ///' + Call hRechteckErstellen 20,20,40,40 + Call hRechteckErstellen 60,60,80,80 + sleep 2 + '/// View->Toolbars->Option Bar ///' + ViewToolbarsOptionbar + '/// at the bottom of the office has a toolbar to appear ///' + sleep 2 + + Kontext "Optionsbar" + if Optionsbar.Exists = False Then + ViewToolbarsOptionbar + Kontext "Optionsbar" + if Optionsbar.Exists = False Then + warnlog "Can't open Optionsbar." + end if + end if + sleep 2 + Kontext "Toolbar" + sleep 1 + '/// click button 'Connector' on Toolbar ///' + Verbinder.Click + '/// make a line with the mouse ///' + gMouseMove 30,30,70,70 + sleep 3 + Kontext "Toolbar" + GluePoints.Click + sleep 1 + '/// open Glue Points Toolbar ///' + Kontext "Gluepointsobjectbar" + if Gluepointsobjectbar.Exists = False Then + ViewToolbarsGluepoints + end if + sleep 3 + '-------------------------------------- Klebepunkt einfuegen ---- + try + '/// click button 'Insert Glue Point' on Objecttoolbar ///' + PunkteEinfuegen.Click + sleep 2 + '/// click 2 times onto the created line ///' + gMouseClick 25,30 + sleep 1 + gMouseclick 25,30 + Printlog "- insert gluepoint works" + catch + Warnlog "- gluepoint could not be insert. Following errors might have their reason here" + endcatch + sleep 3 + Kontext "Gluepointsobjectbar" + + '-------------------------------------- Links ------------------- + try + '/// click button 'Exit Direction Left' on Objecttoolbar ///' + Links.Click + Printlog "- gluepoint left works" + catch + Warnlog "- gluepoint left does not work" + endcatch + sleep 1 + '-------------------------------------- Rechts ------------------ + try + '/// click button 'Exit Direction Right' on Objecttoolbar ///' + Rechts.Click + Printlog "- gluepoint right works" + catch + Warnlog "- gluepoint right does not work" + endcatch + sleep 1 + '-------------------------------------- Oben -------------------- + try + '/// click button 'Exit Direction Top' on Objecttoolbar ///' + Oben.Click + Printlog "- gluepoint top works" + catch + Warnlog "- gluepoint top does not work" + endcatch + sleep 1 + '-------------------------------------- Unten ------------------- + try + '/// click button 'Exit Direction Bottom' on Objecttoolbar ///' + Unten.Click + Printlog "- gluepoint bottom works" + catch + Warnlog "- gluepoint bottom does not work" + endcatch + sleep 1 + '---------------------- Position an Objekt anpassen ------------- + try + '/// click button 'Glue Point Relative' on Objecttoolbar ///' + PositionAnObjektAnpassen.Click + Printlog "- align position to object works" + gMouseClick 25,30 ' if you don't click onto an existing point, the state changes back :-[ + catch + Warnlog "- align position to object does not work" + endcatch + Kontext "Gluepointsobjectbar" + sleep 1 + '------------------------------------- Horizontal links --------- + if PositionAnObjektAnpassen.exists then printlog "PositionAnObjektAnpassen = Exists" + if PositionAnObjektAnpassen.GetState(2) <> 0 then PositionAnObjektAnpassen.Click ' make unpressed! + '0 = not pressed. 1 = pressed. + sleep 2 + try + Kontext "Gluepointsobjectbar" + '/// click button 'Glue Point Horizontal Left' on Objecttoolbar ///' + HorizontalLinks.Click + Printlog "- align horizontal left works" + catch + Warnlog "- align horizontal left does not work" + PositionAnObjektAnpassen.Click ' that's the middle button, it has to be UP/not activated! + for i = 1 to Gluepointsobjectbar.GetItemCount + if (Gluepointsobjectbar.GetState ( i, 0 ) <> 0 ) then ' is no seperator + printlog "----------------------------------------------------------------------" + printlog "helpid : " + Gluepointsobjectbar.Getstate ( i, 0 ) + " number in row: " + i + printlog "itemtype: " + Gluepointsobjectbar.GetState ( i, 1 ) + printlog "state : " + Gluepointsobjectbar.GetState ( i, 2 ) + printlog "----------------------------------------------------------------------" + end if + next i + endcatch + sleep 2 + '------------------------------------- Horizontal rechts -------- + try + '/// click button 'Glue Point Horizontal Right' on Objecttoolbar ///' + HorizontalRechts.Click + Printlog "- Align horizontal right does work" + catch + Warnlog "- Align horizontal right does notwork" + endcatch + sleep 1 + '------------------------------------- Horizontal zentriert ----- + try + '/// click button 'Glue Point Horizontal Center' on Objecttoolbar ///' + HorizontalZentriert.Click + Printlog "- align horizontal center does work" + catch + Warnlog "- align horizontal center does work" + endcatch + sleep 1 + '------------------------------------- Vertikal oben ------------ + try + '/// click button 'Glue Point Vertical Top' on Objecttoolbar ///' + VertikalOben.Click + sleep 1 + Printlog "- Align vertical top does work" + catch + Warnlog "- Align vertical top does not work" + endcatch + '------------------------------------- Vertikal unten ----------- + try + '/// click button 'Glue Point Vertical Bottom' on Objecttoolbar ///' + VertikalUnten.Click + sleep 1 + printlog "- Align vertical bottom does work" + catch + Warnlog "- Align vertical bottom does not work" + endcatch + '------------------------------------- Vertikal zentriert ------- + try + '/// click button 'Glue Point Vertical Center' on Objecttoolbar ///' + VertikalZentriert.Click + sleep 1 + Printlog "- Align vertical center does work" + catch + Warnlog "- Align vertical center does not work" + endcatch + + Printlog "- End of testing gluepoints" + + '/// Close the Option Bar via View->Toolbars->Option Bar ///' + ViewToolbarsOptionbar + sleep 2 + Kontext "Optionsbar" + if Optionsbar.Exists = True Then + warnlog "Couldnt close Optionsbar." + end if + '/// close application ///' + Call hCloseDocument +endcase + +'------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------' + +testcase tdBezierToolbar + '/// Open the Application ///' + Call hNewDocument + + '/// Create a rectangle. ///' + Call hRechteckErstellen ( 10, 10, 30, 40 ) + sleep (1) + + '/// Convert the recttangle to an 'Polygon-object' via the context-menu for the object ///' + Call hOpenContextMenu + Call hMenuSelectNr (11) '/// Convert to ///' + Call hMenuSelectNr (2) '/// Polygon-object ///' + sleep (1) + + '/// In the context-menu, select 'Edit Points" ///' + Call hOpenContextMenu + Call hMenuSelectNr (5) '/// Select entry nr 5 (Edit Points) ///' + sleep (2) + + Kontext "Bezierobjectbar" + if Bezierobjectbar.Exists <> TRUE then + ViewToolbarsBezier + Sleep (2) + if Bezierobjectbar.Exists <> TRUE then + warnlog "Bezierobjectbar did not show up. Check why." + end if + end if + + '----------------------------------- Punkte verschieben ------------------------------------ + '/// Select a part of the object with the keyboard ///' + hTypeKeys "<MOD1 TAB>", 4 '/// Selects the fourth vector. ///' + hTypeKeys "<RIGHT>", 40 '/// Moves the selected vector 40 steps. ///' + + '/// The 'Object Toolbar' now changes ///' + Kontext "Bezierobjectbar" + if Bezierobjectbar.Exists <> TRUE then + ViewToolbarsBezier + Sleep 2 + end if + if Bezierobjectbar.Exists <> TRUE then + Warnlog "The Bezier-Objectbar should have been opened, but wasnt." + ViewToolbarsBezier + Sleep 2 + end if + + Kontext "Bezierobjectbar" + sleep 1 + Printlog "- Move points" + '/// click button 'Move points' on 'Object Toolbar' ///' + Verschieben.Click + sleep 2 + + hTypeKeys "<MOD1 TAB>" + hTypeKeys "<MOD1 SHIFT SPACE>" '/// Marks the selected vector. ///' + hTypeKeys "<RIGHT>", 20 '/// Moves the vector 20 with "arrow right", twenty times. ///' + + Printlog "- Insert points" + '/// Click button 'Insert points' on 'Object Toolbar' ///' + Kontext "Bezierobjectbar" + Einfuegen.Click + sleep 2 + Bezierobjectbar.Move 20, 20 + sleep (1) + Printlog "- Delete points" + + '/// Select another part of the object with spanning a selection with the mouse ///' + gMouseMove 25,25,45,45 + + hTypeKeys "<MOD1 TAB>", 2 '/// Select the second next vector. ///' + hTypeKeys "<MOD1 SHIFT SPACE>" '/// Mark the selected vector. ///' + hTypeKeys "<MOD1 TAB><SHIFT SPACE>" '/// Select and mark the next vector. ///' + + sleep 2 + Kontext "Bezierobjectbar" + sleep 2 + Printlog "- Convert into curve" + '/// click button 'convert to curve' on 'Object Toolbar' ///' + InKurve.Click + sleep 2 + Printlog "- Place edge point" + '/// click button 'corner point' on 'Object Toolbar' ///' + Ecke.Click + sleep 2 + Printlog "- Smooth transition" + '/// click button 'smooth transition' on 'Object Toolbar' ///' + Glatt.Click + sleep 2 + Printlog "- Symetric transition" + '/// click button 'symmetric transition' on 'Object Toolbar' ///' + Symmetrisch.Click + sleep 2 + + '/// Click button 'Eliminate points' on 'Object Toolbar' ///' + Kontext "Bezierobjectbar" + PunkteReduzieren.Click + sleep 2 + + '/// Mark another point ///' + hTypeKeys "<MOD1 TAB>" + hTypeKeys "<MOD1 SHIFT SPACE>" + + '/// click button 'split curve' on 'Object Toolbar' ///' + Kontext "Bezierobjectbar" + try + Auftrennen.Click + catch + Warnlog "- 'Break' could not be executed" + endcatch + sleep 2 + + '/// Mark all points ///' + hTypeKeys "<MOD1 TAB>" + hTypeKeys "<MOD1 A>" + + Printlog "- Close bezier" + Kontext "Bezierobjectbar" + try + '/// click button 'close bezier' on 'Object Toolbar' ///' + Schliessen.Click + catch + InKurve.Click + sleep 2 + try + Schliessen.Click + catch + warnlog "Couldn't push button :-( can't reproduce it now, mostly seen on linux, if i loop this test, it happens only 1/5 of the time ... :-)" + endcatch + endcatch + sleep 2 + + '/// Mark all points ///' + hTypeKeys "<MOD1 TAB>" + hTypeKeys "<MOD1 A>" + + '/// Click button 'Delete points' on 'Object Toolbar' ///' + Kontext "Bezierobjectbar" + Printlog "- Break curve" + if ( hClickButton( Loeschen ) = -1 ) then + warnlog( "Unable to click button <Loeschen>" ) + endif + 'try + ' Loeschen.Click + ' sleep 2 + 'catch + ' warnlog "Delete didn't work... why?" + 'endcatch + + '/// Uncheck on the symbol 'Curve' on the toolbar 'Main Toolbar' ///' + Kontext "Toolbar" + sleep 2 + Toolbar.OpenContextMenu ' Enable forms button in menuebar + sleep 2 + hMenuselectNr (1) + sleep 2 + hMenuItemUnCheck (7) + sleep 2 + '/// Close application ///' + Call hCloseDocument +endcase + +'------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------' diff --git a/testautomation/graphics/required/includes/global/id_opt_1.inc b/testautomation/graphics/required/includes/global/id_opt_1.inc new file mode 100644 index 000000000000..6df5ccdfdddf --- /dev/null +++ b/testautomation/graphics/required/includes/global/id_opt_1.inc @@ -0,0 +1,1054 @@ +'encoding UTF-8 Do not remove or change this line! +'************************************************************************** +' DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. +' +' Copyright 2000, 2010 Oracle and/or its affiliates. +' +' OpenOffice.org - a multi-platform office productivity suite +' +' 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 : wolfram.garten@sun.com +'* +'* short description : +'* +'\****************************************************************************** + +testcase tToolsOptionsDrawGeneral (sApplication as string) + dim irgendwas(9) as boolean + dim iMasseinheit as integer + dim sTabAbstand as string + dim iZeichnungsmasstab as integer + dim sTemp as string + dim iTemp as integer + dim sTemp2 as string + dim iTemp2 as integer + dim sMeasUnit as string + + hNewDocument + + printlog "save states" + ToolsOptions + hToolsOptions (sApplication,"General") + + irgendwas(1) = Schnellbearbeitung.IsChecked + irgendwas(2) = TextbereichSelektierbar.IsChecked + + irgendwas(3) = CacheFuerHintergrund.IsChecked + irgendwas(4) = KopieBeimVerschieben.IsChecked + irgendwas(5) = ObjekteImmerVerschiebbar.IsChecked + + if (gApplication = "DRAW") then + irgendwas(6) = SetzenAufKreis.IsChecked ' DRAW + iZeichnungsmasstab = Zeichnungsmasstab.GetSelIndex ' DRAW + else ' IMPRESS + irgendwas(7) = MitAutopilotStarten.IsChecked + irgendwas(8) = MitAktuellerSeite.IsChecked + irgendwas(9) = AlleAbsatzabstaendeAddieren.IsChecked + endif + + iMasseinheit = Masseinheit.GetSelIndex + sTabAbstand = Tabulatorabstand.GetText + + printlog "all states inverting" + + if irgendwas(1) Then Schnellbearbeitung.UnCheck Else Schnellbearbeitung.Check + if irgendwas(2) Then TextbereichSelektierbar.UnCheck Else TextbereichSelektierbar.Check + + if irgendwas(3) Then CacheFuerHintergrund.UnCheck Else CacheFuerHintergrund.Check + if irgendwas(4) Then KopieBeimVerschieben.UnCheck Else KopieBeimVerschieben.Check + if irgendwas(5) Then ObjekteImmerVerschiebbar.UnCheck Else ObjekteImmerVerschiebbar.Check + + Tabulatorabstand.ToMax + sTemp = Tabulatorabstand.GetText + Tabulatorabstand.More + + if (LiberalMeasurement (sTemp,Tabulatorabstand.GetText) <> TRUE) Then Warnlog "Something wrong, please check!" + Tabulatorabstand.SetText (sTabAbstand) + + if (gApplication = "DRAW") then + If ( Zeichnungsmasstab.GetItemCount <> iZeichnungsmasstab ) Then Zeichnungsmasstab.Select (Zeichnungsmasstab.GetItemCount) _ + Else Zeichnungsmasstab.Select (1) + iTemp2 = Zeichnungsmasstab.GetSelIndex + if irgendwas(6) Then SetzenAufKreis.UnCheck Else SetzenAufKreis.Check + else ' IMPRESS + if irgendwas(7) Then MitAutopilotStarten.UnCheck Else MitAutopilotStarten.Check + if irgendwas(8) Then MitAktuellerSeite.UnCheck Else MitAktuellerSeite.Check + if irgendwas(9) Then AlleAbsatzabstaendeAddieren.UnCheck Else AlleAbsatzabstaendeAddieren.Check + endif + + printlog "<Meas.Unit> interacts with <Tap stops> and vice versa" + + If ( Masseinheit.GetItemCount <> iMasseinheit ) Then Masseinheit.Select (Masseinheit.GetItemCount) _ + Else Masseinheit.Select (1) + iTemp = Masseinheit.GetSelIndex + + sTemp = Tabulatorabstand.GetText + Tabulatorabstand.ToMax + If ( Tabulatorabstand.GetText = sTemp ) Then Tabulatorabstand.ToMin + sTemp = Tabulatorabstand.GetText + + Kontext "ExtrasOptionenDlg" + ExtrasOptionenDlg.OK + + printlog "Office quit - start" + + ExitRestartTheOffice + printlog "opening new doc to get the Options" + Call hNewDocument + printlog "checking states" + ToolsOptions + hToolsOptions (sApplication,"General") + + If ( irgendwas(1) = Schnellbearbeitung.IsChecked ) Then WarnLog "Allow Quick Editing state changed" + If ( irgendwas(2) = TextbereichSelektierbar.IsChecked ) Then WarnLog "Only Text Area Selectable state changed" + + If ( irgendwas(3) = CacheFuerHintergrund.IsChecked ) Then WarnLog "Use Background Cache state changed" + If ( irgendwas(4) = KopieBeimVerschieben.IsChecked ) Then WarnLog "Copy When Moving state changed" + If ( irgendwas(5) = ObjekteImmerVerschiebbar.IsChecked ) Then WarnLog "Objects Always Movable state changed" + + if (gApplication = "DRAW") then + If ( Zeichnungsmasstab.GetSelIndex <> iTemp2 ) Then WarnLog "Drawing Scale state changed BUG #97391 is:"+Zeichnungsmasstab.GetSelIndex+"; should: "+iTemp2 + If ( irgendwas(6) = SetzenAufKreis.IsChecked ) Then WarnLog "'Do not disort objects in curve' state changed" + else ' IMPRESS + if ( irgendwas(7) = MitAutopilotStarten.IsChecked ) Then WarnLog "'Start with AutoPilot' state changed." +' + if ( irgendwas(8) = MitAktuellerSeite.IsChecked ) Then WarnLog "'Always with current page' changed" + if ( irgendwas(9) = AlleAbsatzabstaendeAddieren.IsChecked ) Then WarnLog "'Add spacing between paragraphs in the current document' changed" + endif + + If ( Masseinheit.GetSelIndex <> iTemp ) Then WarnLog "Unit of Measurement state changed" + If (LiberalMeasurement (sTemp,Tabulatorabstand.GetText) <> TRUE ) Then WarnLog "Tab stops state changed - watch BugID: 82744 for Status" + + printlog "all UnCheck -> o" + + Schnellbearbeitung.UnCheck + TextbereichSelektierbar.UnCheck + + CacheFuerHintergrund.UnCheck + KopieBeimVerschieben.UnCheck + ObjekteImmerVerschiebbar.UnCheck + + if (gApplication = "DRAW") then + Zeichnungsmasstab.Select (1) + SetzenAufKreis.UnCheck + else ' IMPRESS + MitAutopilotStarten.UnCheck + MitAktuellerSeite.UnCheck + AlleAbsatzabstaendeAddieren.UnCheck + endif + + Masseinheit.Select (1) + Tabulatorabstand.ToMin + sTemp = Tabulatorabstand.GetText + printlog " More test " + Tabulatorabstand.More + if ( sTemp = Tabulatorabstand.GetText ) Then WarnLog "Tab Stops More-Button not working; stemp1: "+sTemp + " =? (2) " +Tabulatorabstand.GetText + sTemp = Tabulatorabstand.GetText + + Kontext "ExtrasOptionenDlg" + ExtrasOptionenDlg.OK + + printlog "check if all UnChecked" + ToolsOptions + hToolsOptions (sApplication,"General") + + If Schnellbearbeitung.IsChecked Then WarnLog "Allow Quick Editing x" + If TextbereichSelektierbar.IsChecked Then WarnLog "Only Text Area Selectable x" + + If CacheFuerHintergrund.IsChecked Then WarnLog "Use Background Cache x" + If KopieBeimVerschieben.IsChecked Then WarnLog "Copy When Moving x" + If ObjekteImmerVerschiebbar.IsChecked Then WarnLog "Objects Always Movable x" + + if (gApplication = "DRAW") then + If ( Zeichnungsmasstab.GetSelIndex <> 1 ) Then WarnLog "'Drawing Scale' is not item 1" + If SetzenAufKreis.IsChecked Then WarnLog "'Do not disort objects in curve' x" + else ' IMPRESS + if MitAutopilotStarten.IsChecked Then WarnLog "Start with AutoPilot x" + if MitAktuellerSeite.IsChecked Then WarnLog "'Always with current page' x" + if AlleAbsatzabstaendeAddieren.IsChecked Then WarnLog "'Add spacing between paragraphs in the current document' x" + endif + + If ( Masseinheit.GetSelIndex <> 1 ) Then WarnLog "Unit of Measurement is not item 1" + If (LiberalMeasurement (sTemp,Tabulatorabstand.GetText) <> TRUE ) Then WarnLog "Tab stops is not min. is: " +Tabulatorabstand.GetText + " should: " +sTemp + + Kontext "ExtrasOptionenDlg" + ExtrasOptionenDlg.OK +'--------------------------------------------------------------------------------- + printlog "Tabstops have to be saved in dokument!" + + printlog "check if tab stops get saved in document" + hNewDocument + + printlog "set Default Tab Stop to 2,5cm" + ToolsOptions + hToolsOptions (sApplication,"General") + Masseinheit.Select (2) ' cm + sMeasUnit = GetMeasUnit(Tabulatorabstand.GetText) +' printlog "before " + Tabulatorabstand.GetText + Tabulatorabstand.SetText ("2" + GetDecimalSeperator(Tabulatorabstand.GetText) + "50"+ sMeasUnit) +' printlog "after " + Tabulatorabstand.GetText +' printlog "seperator: " + GetDecimalSeperator(Tabulatorabstand.GetText) +' printlog "generated string: " + "2" + GetDecimalSeperator(Tabulatorabstand.GetText) + "50cm" + Kontext "ExtrasOptionenDlg" + ExtrasOptionenDlg.OK + + printlog "creating document with tabstops and save it" + if (gApplication = "DRAW") then + kontext "Toolbar" + Textfield.Click + kontext "DocumentDraw" + hMouseClick DocumentDraw,50,50 + else + kontext "Toolbar" + Textfield.Click + kontext "DocumentImpress" + hMouseClick DocumentImpress,20,50 + endif + hTypeKeys "a<Tab>b<Tab>c<Tab>d<Tab>e<Tab>f<Tab>g<Tab>h<Tab>i<Tab>j" + + + if ( gApplication = "IMPRESS" ) then + ExtensionString = "odp" + else + ExtensionString = "odg" + end if + + hFileSaveAsKill (gOfficePath + "user\work\tab25cm." & ExtensionString ) + + hCloseDocument + sleep (2) + + printlog "change tab stops" + hNewDocument + printlog "Changed the Default Tab Stop to 2,9cm" + ToolsOptions + hToolsOptions (sApplication,"General") + Masseinheit.Select (2) ' cm +' printlog "before " + Tabulatorabstand.GetText + Tabulatorabstand.SetText ("2" + GetDecimalSeperator(Tabulatorabstand.GetText) + "90"+sMeasUnit ) +' printlog "after " + Tabulatorabstand.GetText + Kontext "ExtrasOptionenDlg" + ExtrasOptionenDlg.OK + sleep (2) + + + + printlog "load the saved file into this environment" + printlog "use output\\writer\\w95\\tab25cm.odt" + hFileOpen (gOfficePath + "user\work\tab25cm." + ExtensionString) + + sleep (10) + printlog "check TabStops, have to be the ones this file was saved with" + ToolsOptions + hToolsOptions (sApplication,"General") + Masseinheit.Select (2) ' cm +' printlog "before " + Tabulatorabstand.GetText + if Tabulatorabstand.GetText <> ("2" + GetDecimalSeperator(Tabulatorabstand.GetText) + "50"+sMeasUnit ) Then + warnlog "The tab stops didn't get saved in the document !!! - i33211" + printlog "should be 2,50"+sMeasUnit +", is " + Tabulatorabstand.GetText + end if + Kontext "ExtrasOptionenDlg" + ExtrasOptionenDlg.OK + hCloseDocument + hCloseDocument + +'--------------------------------------------------------------------------------- + Printlog ("'/// - all Check -> x ///") + + printlog "Click in the open impress document to get the focus back to the document" + printlog "Otherwise it sometimes happend that the Tools/Option dialog doesn't display the correct applications" + hNewDocument + if ( sApplication = "IMPRESS") then + Kontext "DocumentImpress" + DocumentImpress.MouseDown(50,50) + DocumentImpress.MouseUp(50,50) + else + Kontext "DocumentDraw" + DocumentDraw.MouseDown(50,50) + DocumentDraw.MouseUp(50,50) + endif + + + ToolsOptions + hToolsOptions (sApplication,"General") + kontext "TabSonstigesDraw" + Schnellbearbeitung.Check + TextbereichSelektierbar.Check + + CacheFuerHintergrund.Check + KopieBeimVerschieben.Check + ObjekteImmerVerschiebbar.Check + + if (gApplication = "DRAW") then + Zeichnungsmasstab.Select (2) + itemp2 = Zeichnungsmasstab.GetSelIndex + SetzenAufKreis.Check + else ' IMPRESS +' MitAutopilotStarten.Check + MitAktuellerSeite.Check + AlleAbsatzabstaendeAddieren.Check + endif + + Masseinheit.Select (2) + itemp = Masseinheit.GetSelIndex + sTemp = "3" + GetDecimalSeperator(Tabulatorabstand.GetText) + "21"+sMeasUnit + Tabulatorabstand.SetText (sTemp) + + Kontext "ExtrasOptionenDlg" + ExtrasOptionenDlg.OK + + printlog ("'/// - check if all Checked ///") + ToolsOptions + hToolsOptions (sApplication,"General") + + If True <> Schnellbearbeitung.IsChecked Then WarnLog "Allow Quick Editing o" + If True <> TextbereichSelektierbar.IsChecked Then WarnLog "Only Text Area Selectable o" + + If True <> CacheFuerHintergrund.IsChecked Then WarnLog "Use Background Cache o i26631" + If True <> KopieBeimVerschieben.IsChecked Then WarnLog "Copy When Moving o" + If True <> ObjekteImmerVerschiebbar.IsChecked Then WarnLog "Objects Always Movable o" + + if (gApplication = "DRAW") then + If ( Zeichnungsmasstab.GetSelIndex <> iTemp2 ) Then WarnLog "Drawing Scale is not item " + iTemp2 + " it's: " + Zeichnungsmasstab.GetSelIndex + If True <> SetzenAufKreis.IsChecked Then WarnLog "'Do not disort objects in curve' o" + else ' IMPRESS +' If True <> MitAutopilotStarten.IsChecked Then WarnLog "Start with AutoPilot o" + If True <> MitAktuellerSeite.IsChecked Then WarnLog "'Always with current page' o" + If True <> AlleAbsatzabstaendeAddieren.IsChecked Then WarnLog "'Add spacing between paragraphs in the current document' o" + endif + + If ( Masseinheit.GetSelIndex <> iTemp ) Then WarnLog "Masseinheit is not item " + iTemp + " it's: " + Masseinheit.GetSelIndex + If (LiberalMeasurement (sTemp,Tabulatorabstand.GetText) <> TRUE ) Then WarnLog "Tab stops is not " + sTemp + " it's: " + Tabulatorabstand.GetText + + printlog "restore states" + + If ( irgendwas(1) = TRUE ) Then Schnellbearbeitung.Check Else Schnellbearbeitung.UnCheck + If ( irgendwas(2) = TRUE ) Then TextbereichSelektierbar.Check Else TextbereichSelektierbar.UnCheck + + If ( irgendwas(3) = TRUE ) Then CacheFuerHintergrund.Check Else CacheFuerHintergrund.UnCheck + If ( irgendwas(4) = TRUE ) Then KopieBeimVerschieben.Check Else KopieBeimVerschieben.UnCheck + If ( irgendwas(5) = TRUE ) Then ObjekteImmerVerschiebbar.Check Else ObjekteImmerVerschiebbar.UnCheck + + if (gApplication = "DRAW") then + Zeichnungsmasstab.Select (iZeichnungsmasstab) + If ( irgendwas(6) = TRUE ) Then SetzenAufKreis.Check Else SetzenAufKreis.UnCheck + else ' IMPRESS + if ( irgendwas(7) = TRUE ) Then MitAutopilotStarten.Check Else MitAutopilotStarten.UnCheck + if ( irgendwas(8) = TRUE ) Then MitAktuellerSeite.Check Else MitAktuellerSeite.UnCheck + if ( irgendwas(9) = TRUE ) Then AlleAbsatzabstaendeAddieren.Check Else AlleAbsatzabstaendeAddieren.UnCheck + endif + + Masseinheit.Select (iMasseinheit) 'sw:ListBox:TP_LAYOUT_O + Tabulatorabstand.SetText (sTabAbstand) ' sw:MetricField:TP_LAYOUT_OPT:MF_TAB + + Kontext "ExtrasOptionenDlg" + ExtrasOptionenDlg.OK + + hCloseDocument +endcase 'tToolsOptionsDrawGeneral + +'------------------------------------------------------------------------------ +testcase tToolsOptionsDrawView (sApplication as string) + dim irgendwas(8) as boolean + + hNewDocument + + printlog "save states" + ToolsOptions + hToolsOptions (sApplication,"View") + + irgendwas(1) = LinealeSichtbar.IsChecked + irgendwas(2) = HilfslinienBeimBewegen.IsChecked + irgendwas(3) = KontrolpunkteImBezierEditor.IsChecked + irgendwas(4) = KonturFuerIndividuelleObjekte.IsChecked + + printlog "all states inverting" + + if irgendwas(1) Then LinealeSichtbar.UnCheck Else LinealeSichtbar.Check + if irgendwas(2) Then HilfslinienBeimBewegen.UnCheck Else HilfslinienBeimBewegen.Check + if irgendwas(3) Then KontrolpunkteImBezierEditor.UnCheck Else KontrolpunkteImBezierEditor.Check + if irgendwas(4) Then KonturFuerIndividuelleObjekte.UnCheck Else KonturFuerIndividuelleObjekte.Check + + Kontext "ExtrasOptionenDlg" + ExtrasOptionenDlg.OK + + printlog "Office quit - start" + + ExitRestartTheOffice + printlog "opening new doc to get the Options" + Call hNewDocument + printlog "checking states" + ToolsOptions + hToolsOptions (sApplication,"View") + + If ( irgendwas(1) = LinealeSichtbar.IsChecked ) Then WarnLog "LinealeSichtbar state changed" + If ( irgendwas(2) = HilfslinienBeimBewegen.IsChecked ) Then WarnLog "HilfslinienBeimBewegen state changed" + If ( irgendwas(3) = KontrolpunkteImBezierEditor.IsChecked ) Then WarnLog "KontrolpunkteImBezierEditor state changed" + If ( irgendwas(4) = KonturFuerIndividuelleObjekte.IsChecked ) Then WarnLog "KonturFuerIndividuelleObjekte state changed" + + printlog "all UnCheck -> o" + + LinealeSichtbar.UnCheck + HilfslinienBeimBewegen.UnCheck + KontrolpunkteImBezierEditor.UnCheck + KonturFuerIndividuelleObjekte.UnCheck + + Kontext "ExtrasOptionenDlg" + ExtrasOptionenDlg.OK + + printlog "check if all UnChecked" + ToolsOptions + hToolsOptions (sApplication,"View") + + If LinealeSichtbar.IsChecked Then WarnLog "Rulers Visible x" + If HilfslinienBeimBewegen.IsChecked Then WarnLog "Guides When Moving x" + If KontrolpunkteImBezierEditor.IsChecked Then WarnLog "'All Control Points In B�zier Editor' x" + If KonturFuerIndividuelleObjekte.IsChecked Then WarnLog "'Contour of Each Individual Object' x" + + Printlog "all Check -> x" + + LinealeSichtbar.Check + HilfslinienBeimBewegen.Check + KontrolpunkteImBezierEditor.Check + KonturFuerIndividuelleObjekte.Check + + Kontext "ExtrasOptionenDlg" + ExtrasOptionenDlg.OK + + printlog "check if all Checked" + ToolsOptions + hToolsOptions (sApplication,"View") + + If True <> LinealeSichtbar.IsChecked Then WarnLog "Rulers Visible o" + If True <> HilfslinienBeimBewegen.IsChecked Then WarnLog "Guides When Moving o" + If True <> KontrolpunkteImBezierEditor.IsChecked Then WarnLog "'All Control Points In B�zier Editor' o" + If True <> KonturFuerIndividuelleObjekte.IsChecked Then WarnLog "'Contour of Each Individual Object' o" + + printlog "restore states" + + If ( irgendwas(1) = TRUE ) Then LinealeSichtbar.Check Else LinealeSichtbar.UnCheck + If ( irgendwas(2) = TRUE ) Then HilfslinienBeimBewegen.Check Else HilfslinienBeimBewegen.UnCheck + If ( irgendwas(3) = TRUE ) Then KontrolpunkteImBezierEditor.Check Else KontrolpunkteImBezierEditor.UnCheck + If ( irgendwas(4) = TRUE ) Then KonturFuerIndividuelleObjekte.Check Else KonturFuerIndividuelleObjekte.UnCheck + + Kontext "ExtrasOptionenDlg" + ExtrasOptionenDlg.OK + + hCloseDocument +endcase 'tToolsOptionsDrawView + +'-------------------------------------------------------------------------------- + +testcase tToolsOptionsDrawGrid (sApplication as string) + dim irgendwas(10) as boolean + dim sMetricField(7) as string ' MetricField + dim sTempMetricField(7) as string + dim iTry as integer ' some increment variable + + if ( gApplication = "IMPRESS" ) then + ExtensionString = "odp" + else + ExtensionString = "odg" + end if + + hNewDocument + + printlog "save states" + ToolsOptions + hToolsOptions (sApplication,"Grid") + + irgendwas(1) = FangrasterBenutzen.IsChecked + irgendwas(2) = RasterSichtbar.IsChecked + + irgendwas(3) = AchsenSynchronisieren.IsChecked + + irgendwas(4) = AnFanglinien.IsChecked + irgendwas(5) = AnSeitenraendern.IsChecked + irgendwas(6) = AmObjektrahmen.IsChecked + irgendwas(7) = AnObjektpunkten.IsChecked + + irgendwas(8) = BeimErzeugenUndBewegen.IsChecked + irgendwas(9) = LaengereKantenlaenge.IsChecked + irgendwas(10)= BeimDrehen.IsChecked + if BeimDrehen.IsChecked then sMetricField(7) = Winkel.getText + + sMetricField(1) = RasterAufloesungXAchse.GetText + sMetricField(2) = RasterAufloesungYAchse.GetText + sMetricField(3) = RasterUnterteilungXAchse.GetText + sMetricField(4) = RasterUnterteilungYAchse.GetText + sMetricField(5) = FangenFangbereich.GetText + sMetricField(6) = Punktreduktion.GetText + + printlog "all states inverting" + + if irgendwas(1) Then FangrasterBenutzen.UnCheck Else FangrasterBenutzen.Check + if irgendwas(2) Then RasterSichtbar.UnCheck Else RasterSichtbar.Check + +' if irgendwas(3) Then AchsenSynchronisieren.UnCheck Else AchsenSynchronisieren.Check + ' this CheckBox interacts with the MetricBoxes: + AchsenSynchronisieren.UnCheck + + if irgendwas(4) Then AnFanglinien.UnCheck Else AnFanglinien.Check + if irgendwas(5) Then AnSeitenraendern.UnCheck Else AnSeitenraendern.Check + if irgendwas(6) Then AmObjektrahmen.UnCheck Else AmObjektrahmen.Check + if irgendwas(7) Then AnObjektpunkten.UnCheck Else AnObjektpunkten.Check + + if irgendwas(8) Then BeimErzeugenUndBewegen.UnCheck Else BeimErzeugenUndBewegen.Check + if irgendwas(9) Then LaengereKantenlaenge.UnCheck Else LaengereKantenlaenge.Check + if irgendwas(10)Then BeimDrehen.UnCheck Else BeimDrehen.Check + + sTempMetricField(1) = RasterAufloesungXAchse.GetText + sTempMetricField(2) = RasterAufloesungYAchse.GetText + sTempMetricField(3) = RasterUnterteilungXAchse.GetText + sTempMetricField(4) = RasterUnterteilungYAchse.GetText + sTempMetricField(5) = FangenFangbereich.GetText + sTempMetricField(6) = Punktreduktion.GetText + RasterAufloesungXAchse.ToMax + RasterAufloesungYAchse.ToMin + RasterUnterteilungXAchse.ToMin + RasterUnterteilungYAchse.ToMax + FangenFangbereich.ToMin + Punktreduktion.ToMax + If ( RasterAufloesungXAchse.GetText = sTempMetricField(1) ) Then RasterAufloesungXAchse.ToMin + If ( RasterAufloesungYAchse.GetText = sTempMetricField(2) ) Then RasterAufloesungYAchse.ToMax + If ( RasterUnterteilungXAchse.GetText = sTempMetricField(3) ) Then RasterUnterteilungXAchse.ToMax + If ( RasterUnterteilungYAchse.GetText = sTempMetricField(4) ) Then RasterUnterteilungYAchse.ToMin + If ( FangenFangbereich.GetText = sTempMetricField(5) ) Then FangenFangbereich.ToMax + If ( Punktreduktion.GetText = sTempMetricField(6) ) Then Punktreduktion.ToMin + RasterAufloesungXAchse.More ' because it must greater than the.min value for the subdivisions if they are .tomax! + RasterAufloesungXAchse.More + RasterAufloesungYAchse.More + RasterAufloesungYAchse.More + sTempMetricField(1) = RasterAufloesungXAchse.GetText + sTempMetricField(2) = RasterAufloesungYAchse.GetText + sTempMetricField(3) = RasterUnterteilungXAchse.GetText + sTempMetricField(4) = RasterUnterteilungYAchse.GetText + sTempMetricField(5) = FangenFangbereich.GetText + sTempMetricField(6) = Punktreduktion.GetText + + Kontext "ExtrasOptionenDlg" + ExtrasOptionenDlg.OK + + printlog "Office quit - start" + + ExitRestartTheOffice + printlog "opening new doc to get the Options" + Call hNewDocument + + printlog "checking states" + ToolsOptions + hToolsOptions (sApplication,"Grid") + + If ( irgendwas(1) = FangrasterBenutzen.IsChecked ) Then WarnLog "Snap to Grid state changed" + If ( irgendwas(2) = RasterSichtbar.IsChecked ) Then WarnLog "Visible Grid state changed" + +' If ( irgendwas(3) = AchsenSynchronisieren.IsChecked ) Then WarnLog "Synchronize Axes state changed" + if ( AchsenSynchronisieren.IsChecked = TRUE ) Then WarnLog "Synchronize Axes state changed" + + If ( irgendwas(4) = AnFanglinien.IsChecked ) Then WarnLog "To snap lines state changed" + If ( irgendwas(5) = AnSeitenraendern.IsChecked ) Then WarnLog "To the page margins state changed" + If ( irgendwas(6) = AmObjektrahmen.IsChecked ) Then WarnLog "To object frame state changed" + If ( irgendwas(7) = AnObjektpunkten.IsChecked ) Then WarnLog "To object points state changed" + + If ( irgendwas(8) = BeimErzeugenUndBewegen.IsChecked ) Then WarnLog "When creating or moving objects state changed" + If ( irgendwas(9) = LaengereKantenlaenge.IsChecked ) Then WarnLog "Extend Edges state changed" + If ( irgendwas(10)= BeimDrehen.IsChecked ) Then WarnLog "When Rotating state changed" + + If ( RasterAufloesungXAchse.GetText <> sTempMetricField(1) ) Then WarnLog "GridResolutionXAxel state changed" + If ( RasterAufloesungYAchse.GetText <> sTempMetricField(2) ) Then WarnLog "GridResolutionYAxel state changed" + If ( RasterUnterteilungXAchse.GetText <> sTempMetricField(3) ) Then WarnLog "GridSubdivisionXAxel state changed is: "+RasterUnterteilungXAchse.GetText+"; should: "+sTempMetricField(3) + If ( RasterUnterteilungYAchse.GetText <> sTempMetricField(4) ) Then WarnLog "GridSubdivisionYAxel state changed is: "+RasterUnterteilungYAchse.GetText+"; should: "+sTempMetricField(4) + If ( FangenFangbereich.GetText <> sTempMetricField(5) ) Then WarnLog "SnapSnap range state changed" + If ( Punktreduktion.GetText <> sTempMetricField(6) ) Then WarnLog "Pointreduction state changed" + + printlog "all UnCheck -> o" + + FangrasterBenutzen.UnCheck + RasterSichtbar.UnCheck + + AchsenSynchronisieren.UnCheck + + AnFanglinien.UnCheck + AnSeitenraendern.UnCheck + AmObjektrahmen.UnCheck + AnObjektpunkten.UnCheck + + BeimErzeugenUndBewegen.UnCheck + LaengereKantenlaenge.UnCheck + BeimDrehen.UnCheck + + RasterAufloesungXAchse.ToMin + RasterAufloesungYAchse.ToMin + RasterUnterteilungXAchse.ToMin + RasterUnterteilungYAchse.ToMin + FangenFangbereich.ToMin + Punktreduktion.ToMin + sTempMetricField(1) = RasterAufloesungXAchse.GetText + sTempMetricField(2) = RasterAufloesungYAchse.GetText + sTempMetricField(3) = RasterUnterteilungXAchse.GetText + sTempMetricField(4) = RasterUnterteilungYAchse.GetText + sTempMetricField(5) = FangenFangbereich.GetText + sTempMetricField(6) = Punktreduktion.GetText + printlog "More test" + RasterAufloesungXAchse.More + RasterAufloesungYAchse.More + RasterUnterteilungXAchse.More + RasterUnterteilungYAchse.More + FangenFangbereich.More + Punktreduktion.More + if ( sTempMetricField(1) = RasterAufloesungXAchse.GetText ) Then WarnLog "GridResolutionXAxel More-Button not working" + if ( sTempMetricField(2) = RasterAufloesungYAchse.GetText ) Then WarnLog "GridResolutionYAxel More-Button not working" + if ( sTempMetricField(3) = RasterUnterteilungXAchse.GetText ) Then WarnLog "GridSubdivisionXAxel More-Button not working" + if ( sTempMetricField(4) = RasterUnterteilungYAchse.GetText ) Then WarnLog "GridSubdivisionYAxel More-Button not working" + if ( sTempMetricField(5) = FangenFangbereich.GetText ) Then WarnLog "Snap Snap Range More-Button not working" + if ( sTempMetricField(6) = Punktreduktion.GetText ) Then WarnLog "Pointreduction More-Button not working is: "+Punktreduktion.GetText + sTempMetricField(1) = RasterAufloesungXAchse.GetText + sTempMetricField(2) = RasterAufloesungYAchse.GetText + sTempMetricField(3) = RasterUnterteilungXAchse.GetText + sTempMetricField(4) = RasterUnterteilungYAchse.GetText + sTempMetricField(5) = FangenFangbereich.GetText + sTempMetricField(6) = Punktreduktion.GetText + + Kontext "ExtrasOptionenDlg" + ExtrasOptionenDlg.OK + + printlog "check if all UnChecked" + ToolsOptions + hToolsOptions (sApplication,"Grid") + + If FangrasterBenutzen.IsChecked Then WarnLog "Snap to Grid x" + If RasterSichtbar.IsChecked Then WarnLog "Visible Grid x" + + If AchsenSynchronisieren.IsChecked Then WarnLog "Synchronize Axes x" + + If AnFanglinien.IsChecked Then WarnLog "To Snap Lines x" + If AnSeitenraendern.IsChecked Then WarnLog "To The Page Margins x" + If AmObjektrahmen.IsChecked Then WarnLog "To Object Frame x" + If AnObjektpunkten.IsChecked Then WarnLog "To Object Points x" + + If BeimErzeugenUndBewegen.IsChecked Then WarnLog "When Creating or Moving Objects x" + If LaengereKantenlaenge.IsChecked Then WarnLog "Extend Edges x" + If BeimDrehen.IsChecked Then WarnLog "When Rotating x" + + If ( RasterAufloesungXAchse.GetText <> sTempMetricField(1) ) Then WarnLog "GridResolutionXAxel is not min." + If ( RasterAufloesungYAchse.GetText <> sTempMetricField(2) ) Then WarnLog "GridResolutionYAxel is not min." + If ( RasterUnterteilungXAchse.GetText <> sTempMetricField(3) ) Then WarnLog "GridSubdivisionXAxel is not min." + If ( RasterUnterteilungYAchse.GetText <> sTempMetricField(4) ) Then WarnLog "GridSubdivisionYAxel is not min." + If ( FangenFangbereich.GetText <> sTempMetricField(5) ) Then WarnLog "Snap Snap Range is not min." + If ( Punktreduktion.GetText <> sTempMetricField(6) ) Then WarnLog "Point Reduction is not min." + + Printlog "all Check -> x" + + FangrasterBenutzen.Check + RasterSichtbar.Check + + AchsenSynchronisieren.Check + + printlog "Synchronize axes check" + RasterAufloesungXAchse.ToMax + sleep 1 + sTempMetricField(1) = RasterAufloesungXAchse.GetText + if RasterAufloesungYAchse.GetText <> sTempMetricField(1) then Warnlog "Y-axis res. differs from X-axis" + RasterUnterteilungXAchse.ToMax + sleep 1 + sTempMetricField(3) = RasterUnterteilungXAchse.GetText + if RasterUnterteilungYAchse.GetText <> sTempMetricField(3) then Warnlog "Y-axis sub. differs from X-axis" +'-------------------------------------------- + sTempMetricField(2) = RasterAufloesungYAchse.GetText + sTempMetricField(4) = RasterUnterteilungYAchse.GetText + + FangenFangbereich.Less + Punktreduktion.Less + sTempMetricField(5) = FangenFangbereich.GetText + sTempMetricField(6) = Punktreduktion.GetText + + AnFanglinien.Check + AnSeitenraendern.Check + AmObjektrahmen.Check + AnObjektpunkten.Check + + BeimErzeugenUndBewegen.Check + LaengereKantenlaenge.Check + BeimDrehen.Check + Winkel.ToMax + sTempMetricField(7) = Winkel.GetText + + Kontext "ExtrasOptionenDlg" + ExtrasOptionenDlg.OK + + printlog "check if all Checked" + ToolsOptions + hToolsOptions (sApplication,"Grid") + + If True <> FangrasterBenutzen.IsChecked Then WarnLog "Snap to Grid o" + If True <> RasterSichtbar.IsChecked Then WarnLog "Visible Grid o" + + If True <> AchsenSynchronisieren.IsChecked Then WarnLog "Synchronize Axes o" + + If True <> AnFanglinien.IsChecked Then WarnLog "to snap lines o" + If True <> AnSeitenraendern.IsChecked Then WarnLog "to the page margins o" + If True <> AmObjektrahmen.IsChecked Then WarnLog "to object frame o" + If True <> AnObjektpunkten.IsChecked Then WarnLog "To object points o" + + If True <> BeimErzeugenUndBewegen.IsChecked Then WarnLog "When creating or moving objects o" + If True <> LaengereKantenlaenge.IsChecked Then WarnLog "Extend Edges o" + If True <> BeimDrehen.IsChecked Then WarnLog "When Rotating o" + If ( Winkel.GetText <> sTempMetricField(7) ) Then WarnLog "Angle is not max." + + If ( RasterAufloesungXAchse.GetText <> sTempMetricField(1) ) Then WarnLog "GridResolutionXAxel is not max.Bug 54934 in 01:" + If ( RasterAufloesungYAchse.GetText <> sTempMetricField(2) ) Then WarnLog "GridResolutionYAxel is not max." + If ( RasterUnterteilungXAchse.GetText <> sTempMetricField(3) ) Then WarnLog "GridSubdivisionXAxel is not max." + If ( RasterUnterteilungYAchse.GetText <> sTempMetricField(4) ) Then WarnLog "GridSubdivisionYAxel is not max." + If ( FangenFangbereich.GetText <> sTempMetricField(5) ) Then WarnLog "Snap Snap Range is not max." + If ( Punktreduktion.GetText <> sTempMetricField(6) ) Then WarnLog "Pointreduction is not max." + + Kontext "ExtrasOptionenDlg" + ExtrasOptionenDlg.OK + +'------------------------------------------------------------------------------- + printlog "Function Test: Grid Resolution" + printlog "gTesttoolPath + graphics\required\input\gridtst.od?" + + if ( gApplication = "IMPRESS" ) then + ExtensionString = "odp" + else + ExtensionString = "odg" + end if + + + Call hFileOpen ( gTesttoolPath + "graphics\required\input\gridtst."+ExtensionString, False ) + sleep 5 + printlog "If write-protected - open as Temp-file" + Kontext "Standardbar" + if Bearbeiten.GetState(2) <> 1 then + Bearbeiten.Click '0 = not pressed. 1 = pressed. + Kontext + if Active.Exists() then + Active.Yes + else + warnlog "No messagebox after making document editable? - Test canceled here" + goto endsub + endif + endif + sleep (8) + if uCase(gApplication) = "IMPRESS" then + Kontext "DocumentImpress" + else + Kontext "DocumentDraw" + endif + printlog "select grafik element" + for iTry = 1 to 20 + try + EditSelectAll + printlog "EditSelectAll ready after " & iTry/10 & " seconds" + exit for + catch + wait( 100 ) + endcatch + next iTry + + + ContextPositionAndSize + Kontext + active.setpage TabPositionAndSize + Kontext "TabPositionAndSize" + sleep 1 + if ( StrToDouble (PositionX.GetText) <> 0 ) Then WarnLog "HorizontalBy wrong presupposition != 0" + if ( StrToDouble (Positiony.GetText) <> 0 ) Then WarnLog "VerticalBy wrong presupposition != 0" + TabPositionAndSize.Cancel + sleep (3) + + printlog "move grafik with <Alt> + <up/down>" + printlog "resulting step = defined for accessability <> one pixel with cursor traveling" + hTypeKeys "<Mod2 Down>" + sleep (3) + hTypeKeys "<Mod2 Right>" + + printlog "check if @ (1,1) Current-Measure-Unit :-)" + for iTry = 1 to 20 + try + EditSelectAll + printlog "EditSelectAll ready after " & iTry/10 & " seconds" + exit for + catch + wait( 100 ) + endcatch + next iTry + try + ContextPositionAndSize + catch + printlog "Why is format position and size not enabled ? Wrong focus?" + endcatch + Kontext + active.setpage TabPositionAndSize + Kontext "TabPositionAndSize" + Printlog "X difference is: '"+StrToDouble (PositionX.GetText)+"'; "+PositionX.GetText + Printlog "Y difference is: '"+StrToDouble (PositionY.GetText)+"'; "+PositionY.GetText + TabPositionAndSize.Cancel +' sleep (3) + + hCloseDocument + +'-------------------------------------------------- + printlog "restore states" + hNewDocument + ToolsOptions + hToolsOptions (sApplication,"Grid") + + If ( irgendwas(2) = TRUE ) Then FangrasterBenutzen.Check Else FangrasterBenutzen.UnCheck + If ( irgendwas(3) = TRUE ) Then RasterSichtbar.Check Else RasterSichtbar.UnCheck + + If ( irgendwas(4) = TRUE ) Then AchsenSynchronisieren.Check Else AchsenSynchronisieren.UnCheck + + If ( irgendwas(5) = TRUE ) Then AnFanglinien.Check Else AnFanglinien.UnCheck + If ( irgendwas(6) = TRUE ) Then AnSeitenraendern.Check Else AnSeitenraendern.UnCheck + If ( irgendwas(7) = TRUE ) Then AmObjektrahmen.Check Else AmObjektrahmen.UnCheck + If ( irgendwas(8) = TRUE ) Then AnObjektpunkten.Check Else AnObjektpunkten.UnCheck + + If ( irgendwas(6) = TRUE ) Then BeimErzeugenUndBewegen.Check Else BeimErzeugenUndBewegen.UnCheck + If ( irgendwas(7) = TRUE ) Then LaengereKantenlaenge.Check Else LaengereKantenlaenge.UnCheck + If ( irgendwas(8) = TRUE ) Then BeimDrehen.Check Else BeimDrehen.UnCheck + if BeimDrehen.IsChecked then Winkel.SetText (sMetricField(7)) + + RasterAufloesungXAchse.SetText (sMetricField(1)) + RasterAufloesungYAchse.SetText (sMetricField(2)) + RasterUnterteilungXAchse.SetText (sMetricField(3)) + RasterUnterteilungYAchse.SetText (sMetricField(4)) + FangenFangbereich.SetText (sMetricField(5)) + Punktreduktion.SetText (sMetricField(6)) + + Kontext "ExtrasOptionenDlg" + ExtrasOptionenDlg.OK + + hCloseDocument +endcase 'tToolsOptionsDrawGrid + +'------------------------------------------------------------------------------- + +testcase tToolsOptionsDrawPrint (sApplication as string) + + dim irgendwas(11) as boolean + dim bRadioBut(7) as boolean ' RadioButtons + dim bTempRadioBut(7) as boolean + dim iShouldHaveBeenAMultiListBox as integer + + hNewDocument + + printlog "save states" + ToolsOptions + hToolsOptions (sApplication,"Print") + + Standard.Check + irgendwas(1) = Seitenname.IsChecked + irgendwas(2) = Datum.IsChecked + irgendwas(3) = Zeit.IsChecked + irgendwas(4) = AusgeblendeteSeitenDrucken.IsChecked + + Prospekt.Check + irgendwas(5) = Vorderseite.IsChecked + irgendwas(6) = Rueckseite.IsChecked + + irgendwas(7) = AusDruckereinstellung.IsChecked + + bRadioBut(1) = StandardAusgabe.IsChecked + bRadioBut(2) = Graustufen.IsChecked + bRadioBut(3) = SchwarzWeiss.IsChecked + bRadioBut(4) = Standard.IsChecked + bRadioBut(5) = AnSeitengroesseAnpassen.IsChecked + bRadioBut(6) = SeitenKacheln.IsChecked + + printlog "all states inverting" + + Standard.Check + if irgendwas(1) Then Seitenname.UnCheck Else Seitenname.Check + if irgendwas(2) Then Datum.UnCheck Else Datum.Check + if irgendwas(3) Then Zeit.UnCheck Else Zeit.Check + if irgendwas(4) Then AusgeblendeteSeitenDrucken.UnCheck Else AusgeblendeteSeitenDrucken.Check + + Prospekt.Check + if irgendwas(5) Then Vorderseite.UnCheck Else Vorderseite.Check + if irgendwas(6) Then Rueckseite.UnCheck Else Rueckseite.Check + + if irgendwas(7) Then AusDruckereinstellung.UnCheck Else AusDruckereinstellung.Check + + if (StandardAusgabe.IsChecked = True) Then Graustufen.Check Else StandardAusgabe.Check + bTempRadioBut(1) = StandardAusgabe.IsChecked + bTempRadioBut(2) = Graustufen.IsChecked + bTempRadioBut(3) = SchwarzWeiss.IsChecked + if (Standard.IsChecked = True) Then AnSeitengroesseAnpassen.Check Else Standard.Check + bRadioBut(4) = Standard.IsChecked + bRadioBut(5) = AnSeitengroesseAnpassen.IsChecked + bRadioBut(6) = SeitenKacheln.IsChecked + + Kontext "ExtrasOptionenDlg" + ExtrasOptionenDlg.OK + + printlog "SO quit - start" + + ExitRestartTheOffice + printlog "opening new doc to get the Options" + Call hNewDocument + printlog "checking states" + ToolsOptions + hToolsOptions (sApplication,"Print") + + Standard.Check + If ( irgendwas(1) = Seitenname.IsChecked ) Then WarnLog "Pagename state changed" + If ( irgendwas(2) = Datum.IsChecked ) Then WarnLog "Date state changed" + If ( irgendwas(3) = Zeit.IsChecked ) Then WarnLog "Time state changed" + If ( irgendwas(4) = AusgeblendeteSeitenDrucken.IsChecked ) Then WarnLog "Hidden Pages state changed" + + Prospekt.Check + If ( irgendwas(5) = Vorderseite.IsChecked ) Then WarnLog "Brochure Front state changed" + If ( irgendwas(6) = Rueckseite.IsChecked ) Then WarnLog "Brochure Back state changed" + + If ( irgendwas(7) = AusDruckereinstellung.IsChecked ) Then WarnLog "Paper Tray From Printer Settings state changed" + + If ( bTempRadioBut(1) <> StandardAusgabe.IsChecked ) Then WarnLog "Quality Default state changed" + If ( bTempRadioBut(2) <> Graustufen.IsChecked ) Then WarnLog "Quality Grayscale state changed" + If ( bTempRadioBut(3) <> SchwarzWeiss.IsChecked ) Then WarnLog "Quality Black & White state changed" + If ( bTempRadioBut(4) <> Standard.IsChecked ) Then WarnLog "Page Options Default state changed" + If ( bTempRadioBut(5) <> AnSeitengroesseAnpassen.IsChecked ) Then WarnLog "Page Options Fit to Page state changed" + If ( bTempRadioBut(6) <> SeitenKacheln.IsChecked ) Then WarnLog "Page Options Tile Pages state changed" + + printlog "all UnCheck -> o" + + Standard.Check + Seitenname.UnCheck + Datum.UnCheck + Zeit.UnCheck + AusgeblendeteSeitenDrucken.UnCheck + + Prospekt.Check + Vorderseite.UnCheck + Rueckseite.UnCheck + + AusDruckereinstellung.UnCheck + + if (Graustufen.IsChecked = True) Then SchwarzWeiss.Check Else Graustufen.Check + bTempRadioBut(1) = StandardAusgabe.IsChecked + bTempRadioBut(2) = Graustufen.IsChecked + bTempRadioBut(3) = SchwarzWeiss.IsChecked + if (AnSeitengroesseAnpassen.IsChecked = True) Then SeitenKacheln.Check Else AnSeitengroesseAnpassen.Check + bRadioBut(4) = Standard.IsChecked + bRadioBut(5) = AnSeitengroesseAnpassen.IsChecked + bRadioBut(6) = SeitenKacheln.IsChecked + + Kontext "ExtrasOptionenDlg" + ExtrasOptionenDlg.OK + + printlog "check if all UnChecked" + ToolsOptions + hToolsOptions (sApplication,"Print") + + Standard.Check + If Seitenname.IsChecked Then WarnLog "Print: Page Name x" + If Datum.IsChecked Then WarnLog "Print: Date x" + If Zeit.IsChecked Then WarnLog "Print: Time x" + If AusgeblendeteSeitenDrucken.IsChecked Then WarnLog "Print: Hidden Pages x" + + Prospekt.Check + If Vorderseite.IsChecked Then WarnLog "Page options: Brochure: Front x" + If Rueckseite.IsChecked Then WarnLog "Page options: Brochure: Back x" + + If AusDruckereinstellung.IsChecked Then WarnLog "Page options: Paper tray from printer settings x" + + If ( bTempRadioBut(1) <> StandardAusgabe.IsChecked) Then WarnLog "Quality: Default state changed" + If ( bTempRadioBut(2) <> Graustufen.IsChecked ) Then WarnLog "Quality: Grayscale state changed" + If ( bTempRadioBut(3) <> SchwarzWeiss.IsChecked ) Then WarnLog "Quality: Black & White state changed" + If ( bTempRadioBut(4) <> Standard.IsChecked ) Then WarnLog "Page options: Default state changed" + If ( bTempRadioBut(5) <> AnSeitengroesseAnpassen.IsChecked ) Then WarnLog "Page options: Fit to page state changed" + If ( bTempRadioBut(6) <> SeitenKacheln.IsChecked ) Then WarnLog "Page options: Tile Pages state changed" + + Printlog "all Check -> x" + + Standard.Check + Seitenname.Check + Datum.Check + Zeit.Check + AusgeblendeteSeitenDrucken.Check + + Prospekt.Check + Vorderseite.Check + Rueckseite.Check + + AusDruckereinstellung.Check + + if (SchwarzWeiss.IsChecked = True) Then StandardAusgabe.Check Else SchwarzWeiss.Check + bTempRadioBut(1) = StandardAusgabe.IsChecked + bTempRadioBut(2) = Graustufen.IsChecked + bTempRadioBut(3) = SchwarzWeiss.IsChecked + if (SeitenKacheln.IsChecked = True) Then Standard.Check Else SeitenKacheln.Check + bRadioBut(4) = Standard.IsChecked + bRadioBut(5) = AnSeitengroesseAnpassen.IsChecked + bRadioBut(6) = SeitenKacheln.IsChecked + + Kontext "ExtrasOptionenDlg" + ExtrasOptionenDlg.OK + + printlog "check if all Checked" + ToolsOptions + hToolsOptions (sApplication,"Print") + + Standard.Check + If True <> Seitenname.IsChecked Then WarnLog "Print: Page name o" + If True <> Datum.IsChecked Then WarnLog "Print: Date o" + If True <> Zeit.IsChecked Then WarnLog "Print: Time o" + If True <> AusgeblendeteSeitenDrucken.IsChecked Then WarnLog "Print: Hidden pages o" + + Prospekt.Check + If True <> Vorderseite.IsChecked Then WarnLog "Page options: Brochure: Front o" + If True <> Rueckseite.IsChecked Then WarnLog "Page options: Brochure: Back o" + + If True <> AusDruckereinstellung.IsChecked Then WarnLog "Page options: Paper tray from printer settings o" + + If ( bTempRadioBut(1) <> StandardAusgabe.IsChecked) Then WarnLog "Quality: Default state changed" + If ( bTempRadioBut(2) <> Graustufen.IsChecked ) Then WarnLog "Quality: Grayscale state changed" + If ( bTempRadioBut(3) <> SchwarzWeiss.IsChecked ) Then WarnLog "Quality: Black & White state changed" + If ( bTempRadioBut(4) <> Standard.IsChecked ) Then WarnLog "Page options: Default state changed" + If ( bTempRadioBut(5) <> AnSeitengroesseAnpassen.IsChecked ) Then WarnLog "Page options: Fit to page state changed" + If ( bTempRadioBut(6) <> SeitenKacheln.IsChecked ) Then WarnLog "Page options: Tile pages state changed" + + printlog "restore states" + + Standard.Check + If ( irgendwas(1) = TRUE ) Then Seitenname.Check Else Seitenname.UnCheck + If ( irgendwas(2) = TRUE ) Then Datum.Check Else Datum.UnCheck + If ( irgendwas(3) = TRUE ) Then Zeit.Check Else Zeit.UnCheck + If ( irgendwas(4) = TRUE ) Then AusgeblendeteSeitenDrucken.Check Else AusgeblendeteSeitenDrucken.UnCheck + + Prospekt.Check + If ( irgendwas(5) = TRUE ) Then Vorderseite.Check Else Vorderseite.UnCheck + If ( irgendwas(6) = TRUE ) Then Rueckseite.Check Else Rueckseite.UnCheck + + If ( irgendwas(7) = TRUE ) Then AusDruckereinstellung.Check Else AusDruckereinstellung.UnCheck + + If ( bRadioBut(1) = TRUE ) Then StandardAusgabe.Check + If ( bRadioBut(2) = TRUE ) Then Graustufen.Check + If ( bRadioBut(3) = TRUE ) Then SchwarzWeiss.Check + Standard.Check + + Kontext "ExtrasOptionenDlg" + ExtrasOptionenDlg.OK + + hCloseDocument +endcase 'tToolsOptionsDrawPrint + diff --git a/testautomation/graphics/required/includes/global/id_opt_2.inc b/testautomation/graphics/required/includes/global/id_opt_2.inc new file mode 100644 index 000000000000..6fa722e09dd9 --- /dev/null +++ b/testautomation/graphics/required/includes/global/id_opt_2.inc @@ -0,0 +1,133 @@ +'encoding UTF-8 Do not remove or change this line! +'************************************************************************** +' DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. +' +' Copyright 2000, 2010 Oracle and/or its affiliates. +' +' OpenOffice.org - a multi-platform office productivity suite +' +' 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 : wolfram.garten@sun.com +'* +'* short description : +'* +'\****************************************************************************** + +testcase tToolsOptionsMeasurementUnit (sApplication as string) + dim i as integer + dim iCount as integer + dim iCount2 as integer + dim sUnitOptions as string + dim sUnitDialog as string + + hNewDocument + sleep 1 + ToolsOptions + hToolsOptions (sApplication,"General") + iCount2 = Masseinheit.GetSelIndex + printlog "current measurement unit is: " & iCount2 + iCount = Masseinheit.GetItemCount + + Kontext "ExtrasOptionenDlg" + ExtrasOptionenDlg.OK + printlog "----------------------" + + printlog "Take Measurement Units from Graphics " + printlog "(1) reference from options; (2) BMP export dialog; (3) Format->3D Effects->Geometry" + ' In graphics are some more; beside the general one from writer we see large ones: m, km, Miles, foot + for i=1 to iCount + ToolsOptions + hToolsOptions (sApplication,"General") + + Masseinheit.select i + sUnitOptions = GetMeasUnit(Tabulatorabstand.getText) ' (1) + printlog "(" + i + "/" + iCount + "): '" + Masseinheit.getSelText + "' - " + sUnitOptions + " (1)" + + Kontext "ExtrasOptionenDlg" + ExtrasOptionenDlg.OK + + FileExport + Kontext "ExportierenDlg" + Dateiname.SetText "adagio" + Dateityp.Select "BMP - Windows Bitmap (.bmp)" + if AutomatischeDateinamenserweiterung.Exists then + AutomatischeDateinamenserweiterung.Check + else + warnlog( "Automatic Filename Extension checkbox is mising" ) + endif + Speichern.Click + kontext "AlienWarning" + if AlienWarning.exists(5) then + warnlog "#i41983# Alien Warning on export not allowed" + AlienWarning.OK + endif + Kontext "Messagebox" + if Messagebox.Exists(2) then + Messagebox.Yes + endif + Sleep 3 + Kontext "BMPOptionen" + Groesse.Check + sUnitDialog = getMeasUnit(Breite.getText) ' (2) + if (getMeasUnit(Hoehe.getText) <> sUnitDialog) then + warnlog " Measurement Unit is different for Width:'" + sUnitDialog + "' and Hight:'" + getMeasUnit(Hoehe.getText) + "'" + else + printlog "Measurement Unit is same for Width:'" + sUnitDialog + "' and Hight:'" + getMeasUnit(Hoehe.getText) + "'" + endif + if (sUnitOptions <> sUnitDialog) then + printlog "#109705# Measurement Unit is different for Options:'" + sUnitOptions + "' and BMP Dialog:'" + sUnitDialog + "' (1) <> (2)" + endif + BMPOptionen.Cancel + + Format3D_Effects + Kontext "Drei_D_Effekte" + Geometrie.Click + sleep 1 + if (getMeasUnit(Tiefe.getText) <> sUnitOptions) then + printlog "#109705# Measurement Unit is different for Options:'" + sUnitOptions + "' and Depth:'" + getMeasUnit(Tiefe.getText) + "' (1) <> (3)" + else + printlog "Measurement Unit is same for Options:'" + sUnitOptions + "' and Depth:'" + getMeasUnit(Tiefe.getText) + "' (3)" + endif + Drei_D_Effekte.close + + FormatParagraph + Kontext + Messagebox.SetPage TabEinzuegeUndAbstaende + kontext "TabEinzuegeUndAbstaende" + sleep 1 + if (getMeasUnit(Vonlinks.getText) <> sUnitOptions) then + warnlog "#109705# Measurement Unit is different for Options:'" + sUnitOptions + "' and Vonlinks:'" + getMeasUnit(Vonlinks.getText) + "' Paragraph" + else + printlog "Measurement Unit is same for Options:'" + sUnitOptions + "' and Vonlinks:'" + getMeasUnit(Vonlinks.getText) + "' Paragraph" + endif + TabEinzuegeUndAbstaende.cancel + + next i + + printlog "Setting back measurement to " & iCount2 + ToolsOptions + hToolsOptions (sApplication,"General") + Masseinheit.Select(iCount2) + Kontext "ExtrasOptionenDlg" + ExtrasOptionenDlg.OK + + hCloseDocument +endcase 'tToolsOptionsMeasurementUnit diff --git a/testautomation/graphics/required/includes/impress/i_opt_1_.inc b/testautomation/graphics/required/includes/impress/i_opt_1_.inc new file mode 100644 index 000000000000..148bbe980424 --- /dev/null +++ b/testautomation/graphics/required/includes/impress/i_opt_1_.inc @@ -0,0 +1,197 @@ +'encoding UTF-8 Do not remove or change this line! +'************************************************************************** +' DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. +' +' Copyright 2000, 2010 Oracle and/or its affiliates. +' +' OpenOffice.org - a multi-platform office productivity suite +' +' 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 : wolfram.garten@sun.com +'* +'* short description : +'* +'\****************************************************************************** + +testcase tiAlwaysWithCurrentPage() + dim i as integer + + Call hNewDocument() + printlog "Open file 'impdraw\required\input\diashow.od?" + hFileOpen ConvertPath (gTesttoolPath + "graphics\required\input\diashow.odp") + WaitSlot(10000) 'sleep 10 + + printlog "Check if the document is writable" + if fIsDocumentWritable = false then + printlog "Make the document writable and check if it's succesfull" + if fMakeDocumentWritable = false then + warnlog "The document can't be make writeable. Test stopped." + goto endsub + endif + endif + + printlog "Test with default option." + printlog "Checking: 'Always with current page' - default" + + printlog "Setting Options to start with current page." + setStartCurrentPage(true) + printlog "Check if Navigator is open. Default: closed." + Kontext "NavigatorDraw" + if NavigatorDraw.exists (5) then + warnlog "presupposition not met: navigator should be closed on loading the document!" + else + ViewNavigator + WaitSlot (2000) + end if + + printlog "Making sure after loading we are on slide one." + i = fGetSlideNumber() + if (i<>1) then + warnlog "Presupposition not met. After loading the file not the first slide is up. It is number: " + i + endif + + printlog "Press Key [Page Down] two times to get to slide number three. We are on slide one." + hTypeKeys ("<home><PageDown><PageDown>") + printlog "Start the slideshow with 'Slide Show->Slide Show." + SlideShowSlideshow + kontext "DocumentPresentation" + printlog "Open the navigator View->Navigator." + Kontext "NavigatorDraw" + printlog "Opening navigator if none is there." + if (not NavigatorDraw.exists(5)) then + ViewNavigator + endif + printlog "The slideshow has to start on slide 3." + printlog "running routine for slide 3 and 4." + for i = 3 to 4 + Kontext "NavigatorDraw" + printlog "Checking for navigator.." + if (not NavigatorDraw.exists(5)) then + ViewNavigator + endif + printlog "Getting number of current slide." + printlog "Countervariable is " & i + fGetSlideNumber(i) + printlog "Current slide number is: " & i & "." + printlog "Typing pagedown to get to next slide." + DocumentPresentation.TypeKeys "<pagedown>" + WaitSlot (5000) 'sleep (5) + next i + + printlog "Trying to end presentation with mouseclick on black endscreen." + try + DocumentPresentation.mousedown (50,50,1) + DocumentPresentation.mouseup (50,50,1) + catch + warnlog "TimeOut on pressing mouse button." + endcatch + + printlog "Trying to recognize if slideshow did not end.." + try + gMouseClick 50,50 ' this one works to recognice the not ending ! + Printlog "- Slideshow ended at the right time" + catch + Warnlog "- Slideshow still running " + kontext "DocumentPresentation" + printlgo "Ending presentation with ESC." + DocumentPresentation.TypeKeys "<ESCAPE>" + endcatch + WaitSlot (2000) 'sleep 2 + + printlog "Test with changed option: start with first slide." + setStartCurrentPage(false) + printlog "UnChecked: Always with current page." + printlog "press Key [Home] to get to the first slide." + kontext "DocumentImpress" + printlog "Deselect object." + hTypeKeys "<ESCAPE>" + hTypeKeys "<home>" + printlog "Making sure navigator is open." + Kontext "NavigatorDraw" + if (not NavigatorDraw.exists(5)) then + ViewNavigator + endif + printlog "Checking if we are on slide one." + i = fGetSlideNumber() + if (i<>1) then + warnlog "Start-condition not met. Not the first slide is up. It is number: " & i & "." + endif + printlog "Press Key [Page Down] two times to get to slide number three." + hTypeKeys "<PageDown> <PageDown>" + printlog "Start the slideshow with 'Slide Show->Slide Show." + SlideShowSlideshow + kontext "DocumentPresentation" + printlog "Open the navigator View->Navigator." + Kontext "NavigatorDraw" + printlog "Checking if navigator is open." + if (not NavigatorDraw.exists(5)) then + ViewNavigator + endif + printlog "The slideshow has to start on slide 1." + printlog "Running routine for slide 1-4. i = 1 to 3 because we start already on slide 1." + for i = 1 to 3 + Kontext "NavigatorDraw" + if (not NavigatorDraw.exists(5)) then + ViewNavigator + endif + printlog "Getting number of current slide." + fGetSlideNumber(i) + printlog "Current slide is: " & i & "." + DocumentPresentation.TypeKeys "<pagedown>" + WaitSlot (5000) + next i + fGetSlideNumber(i) + printlog "Current slide is: " & i & "." + DocumentPresentation.TypeKeys "<pagedown>" + printlog "Trying to end presentation with mouseclick on black endscreen." + try + DocumentPresentation.mousedown (50,50,1) + DocumentPresentation.mouseup (50,50,1) + Printlog "- Slideshow ended at the right time" + catch + Warnlog "- Slideshow still running " + kontext "DocumentPresentation" + printlog "Ending running presentation with ESC." + DocumentPresentation.TypeKeys "<ESCAPE>" + endcatch + + Kontext "NavigatorDraw" + printlog "Checking if navigator is open." + if (not NavigatorDraw.exists(5)) then + ViewNavigator + endif + printlog "Checking if we are on slide 3." + i = fGetSlideNumber() + if (i<>3) then + warnlog "We are on the wrong slide! Should be 3 but it is: " & i + endif + + printlog "Close the navigator View->Navigator." + Kontext "NavigatorDraw" + if NavigatorDraw.exists(5) then + ViewNavigator + endif + + printlog "Restore: check Always with current page." + setStartCurrentPage(true) + Call hCloseDocument +endcase + diff --git a/testautomation/graphics/required/includes/impress/im_002_.inc b/testautomation/graphics/required/includes/impress/im_002_.inc new file mode 100644 index 000000000000..bd101e4413f4 --- /dev/null +++ b/testautomation/graphics/required/includes/impress/im_002_.inc @@ -0,0 +1,57 @@ +'encoding UTF-8 Do not remove or change this line! +'************************************************************************** +' DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. +' +' Copyright 2000, 2010 Oracle and/or its affiliates. +' +' OpenOffice.org - a multi-platform office productivity suite +' +' 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 : wolfram.garten@sun.com +'* +'* short description : Impress Required Test Library (2) +'* +'\***************************************************************** + +sub im_002_ + + call tiEditDeleteSlide() + +end sub + +'******************************************************************************* + +testcase tiEditDeleteSlide + + printlog "open application" + Call hNewDocument + printlog "Insert->Slide; press 'OK' " + InsertSlide + WaitSlot( 2000 ) + hTypekeys "<Pagedown>" + printlog "Edit->Delete Slide " + hUseAsyncSlot( "EditDeleteSlide" ) + Call hCloseDocument + printlog "close application " + +endcase + + diff --git a/testautomation/graphics/required/includes/impress/im_003_.inc b/testautomation/graphics/required/includes/impress/im_003_.inc new file mode 100644 index 000000000000..a160699d74ca --- /dev/null +++ b/testautomation/graphics/required/includes/impress/im_003_.inc @@ -0,0 +1,260 @@ +'encoding UTF-8 Do not remove or change this line! +'************************************************************************** +' DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. +' +' Copyright 2000, 2010 Oracle and/or its affiliates. +' +' OpenOffice.org - a multi-platform office productivity suite +' +' 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 : wolfram.garten@sun.com +'* +'* short description : Impress Resource Test: View Menu +'* +'\****************************************************************************** + +sub im_003_ + + call tiViewPanes() + call tiViewMasterView() + call tiViewSlideMaster() + call tiViewToolbar_1() + +end sub + +'******************************************************************************* + +testcase tiViewPanes + + qaerrorlog( "This test is disabled, it needs rewriting" ) + goto endsub 'TODO WG, tiViewPanes outcommented due to reconstruction of test + dim bState as boolean + printlog "open application " + Call hCloseDocument + Call hNewDocument + + kontext "Tasks" + if ( not Tasks.exists( 2 ) ) then + warnlog "Tasks Panel not visible on opening application. Opening now." + ViewTaskPane + endif + kontext "Slides" + if (NOT Slides.exists) then + warnlog "Slides Panel not visible on opening application. Opening now." + ViewTaskSlide + endif + kontext "Tasks" + printlog "Deactivate all but masterpages " + View.OpenMenu + hMenuSelectNr (2) + View.OpenMenu + hMenuSelectNr (3) + View.OpenMenu + hMenuSelectNr (4) + + sleep 1 + + Tasks.TypeKeys ("<RIGHT><RIGHT><RIGHT>") + + try + kontext "recentlyUsed" + printlog "Toggeling Master Pages now with <space>" + kontext "MasterPages" + MasterPages.typeKeys "<space>" + kontext "recentlyUsed" + if (recentlyUsed.IsVisible = FALSE) then 'exists = FALSE) then + warnlog "View-menu didn't work" + endif + kontext "Tasks" + sleep 1 + printlog "View->Task Pane " + ViewTaskPane + sleep 1 + if (Tasks.exists) then + warnlog "View->Task Panel failed" + ViewTaskPane + endif + printlog "View->Task Pane " + ViewTaskPane + sleep 1 + if (NOT Tasks.exists) then + warnlog "View->Task Panel failed" + ViewTaskPane + endif + catch + warnlog "View->Task Pane couldn't get executed" + endcatch + kontext "Slides" + try + ViewTaskSlide + if (Slides.exists) then + warnlog "View->Slide Panel failed." + ViewTaskSlide + endif + printlog "View->Slide Pane " + ViewTaskSlide + sleep 1 + if (NOT Slides.exists) then + warnlog "View->Slide Panel failed." + ViewTaskSlide + endif + catch + warnlog "View->Slide Pane couldn't get executed" + endcatch + + printlog "Reactivate all pages in the Task-panel " + kontext "Tasks" + View.OpenMenu + hMenuSelectNr (2) + View.OpenMenu + hMenuSelectNr (3) + View.OpenMenu + hMenuSelectNr (4) + +endcase 'tiViewPanes +'--------------------------------------------------------- +testcase tiViewMasterView + printlog "open application" + Call hNewDocument + printlog "View->Master View->Drawing View" + hUseAsyncSlot( "ViewWorkspaceDrawingView" ) + printlog "View->Master View->Outline View " + hUseAsyncSlot( "ViewWorkspaceOutlineView" ) + printlog "View->Master View->Slides View " + ViewWorkspaceSlidesView + sleep 1 + printlog "View->Master View->Notes View " + hUseAsyncSlot( "ViewWorkspaceNotesView" ) + printlog "View->Master View->Handout View " + hUseAsyncSlot( "ViewWorkspaceHandoutView" ) + printlog "View->Master View->Drawing View " + hUseAsyncSlot( "ViewWorkspaceDrawingView" ) + printlog "close application " + Call hCloseDocument +endcase 'tiViewMasterView +'--------------------------------------------------------- +testcase tiViewSlideMaster + + printlog "open application with : File->Autopilot->Presentation; OK; OK " + FileAutopilotPresentation ' to get a title :-) + Kontext "AutopilotPraesentation1" + if ( AutopilotPraesentation1.exists( 2 ) ) then + hCloseDialog( AutopilotPraesentation1, "ok" ) + else + warnlog( "Dialog <AutopilotPraesentation1> did not open" ) + endif + Kontext "Seitenlayout" ' aka: Modify Slide + + if ( Seitenlayout.exists( 5 ) ) then + warnlog "Slidelayout has to vanish; moved to sidebar" + hCloseDialog( Seitenlayout, "ok" ) + endif + + kontext "DocumentImpress" + printlog "View->Slide " + hUseAsyncSlot( "ViewSlide" ) + + printlog "View->Master->Drawing " + hUseAsyncSlot( "ViewDrawing" ) + + printlog "View->Slide " + hUseAsyncSlot( "ViewSlide" ) + + printlog "View->Master->Title " + try + ViewTitle + Errorlog "View - Master - Title Slide Master should NOT be accessable" + catch + printlog "View - Master - Title Slide Master not accessable - good" + endcatch + + printlog "View->Slide " + hUseAsyncSlot( "ViewSlide" ) + + printlog "View->Master->Handout " + hUseAsyncSlot( "ViewHandout" ) + + printlog "View->Master->Notes " + hUseAsyncSlot( "ViewNotes" ) + kontext "DocumentImpress" + + printlog "View->Slide " + hUseAsyncSlot( "ViewSlide" ) + + printlog "close application " + Call hCloseDocument + +endcase 'tiViewSlideMaster +'-------------------------------------------------------- +testcase tiViewToolbar_1 + + const DEFAULT_DELAY = 3 + + Dim NumberOfGraphicModes as integer + Dim iCurrentGraphicsMode as integer + + dim TestFile as string + TestFile = ConvertPath (gTesttoolPath + "global\input\graf_inp\desp.bmp") + + printlog "open application " + Call hNewDocument + + printlog "Insert->Graphic... : global\input\graf_inp\desp.bmp " + hUseAsyncSlot( "InsertGraphicsFromFile" ) + + Kontext "GrafikEinfuegenDlg" + if ( GrafikEinfuegenDlg.exists( DEFAULT_DELAY ) ) then + Dateiname.SetText( TestFile ) + Oeffnen.Click + + Kontext "Messagebox" + if ( Messagebox.Exists( DEFAULT_DELAY ) ) then + Warnlog Messagebox.GetText + hCloseDialog( Messagebox, "ok" ) + end if + + Kontext "DocumentImpress" + printlog "select graphic " + hUseAsyncSlot( "EditSelectAll" ) + + Kontext "GraphicObjectbar" + printlog "The Graphics Toolbar has to be visible now; If not -> ERROR " + if ( GraphicObjectbar.Exists( DEFAULT_DELAY ) ) Then + + Printlog "- graphic object toolbar exists" + NumberOfGraphicModes=Grafikmodus.GetItemCount + + for iCurrentGraphicsMode = 1 to NumberOfGraphicModes + Printlog( "- access all controls in the toolbar (" & iCurrentGraphicsMode & "/" & NumberOfGraphicModes & ")" ) + Grafikmodus.Select( iCurrentGraphicsMode ) + sleep ( DEFAULT_DELAY ) + next iCurrentGraphicsMode + else + Warnlog "- No graphic function toolbar visible" + end if + else + warnlog( "Insert Graphics dialog did not open" ) + endif + + printlog "close application " + Call hCloseDocument + +endcase 'tiViewToolbar_1 diff --git a/testautomation/graphics/required/includes/impress/im_004_.inc b/testautomation/graphics/required/includes/impress/im_004_.inc new file mode 100644 index 000000000000..28f11a778864 --- /dev/null +++ b/testautomation/graphics/required/includes/impress/im_004_.inc @@ -0,0 +1,64 @@ +'encoding UTF-8 Do not remove or change this line! +'************************************************************************** +' DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. +' +' Copyright 2000, 2010 Oracle and/or its affiliates. +' +' OpenOffice.org - a multi-platform office productivity suite +' +' 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 : wolfram.garten@sun.com +'* +'* short description : Impress Required Test Library (4) +'* +'\***************************************************************** + +sub im_004_ + + call tiInsertSlideExpandSummary() + +end sub + +'******************************************************************************* + +testcase tiInsertSlideExpandSummary + + printlog "open application " + Call hNewDocument + printlog "View->Master View->Outline View " + ViewWorkspaceOutlineView + WaitSlot() + Kontext "DocumentImpressOutlineView" + printlog "Type 2 rows " + DocumentImpressOutlineView.TypeKeys "Herbert<Return>Rudi" + printlog "View->Master View->Drawing View " + ViewWorkspaceDrawingView + WaitSlot() + printlog "Insert->Summery Slide " + InsertSummerySlide + WaitSlot() + printlog "Insert->Expand Slide " + InsertExpandSlide + WaitSlot( 3000 ) + printlog "close application " + Call hCloseDocument +endcase + diff --git a/testautomation/graphics/required/includes/impress/im_005_.inc b/testautomation/graphics/required/includes/impress/im_005_.inc new file mode 100644 index 000000000000..5a8b9fb9a518 --- /dev/null +++ b/testautomation/graphics/required/includes/impress/im_005_.inc @@ -0,0 +1,63 @@ +'encoding UTF-8 Do not remove or change this line! +'************************************************************************** +' DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. +' +' Copyright 2000, 2010 Oracle and/or its affiliates. +' +' OpenOffice.org - a multi-platform office productivity suite +' +' 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 : wolfram.garten@sun.com +'* +'* short description : Impress Required Test Library (5) +'* +'\***************************************************************** + +sub im_005_ + + call tiFormatModifyLayout() + +end sub + +'******************************************************************************* + +testcase tiFormatModifyLayout + + printlog "open application " + Call hNewDocument + + printlog( "Format/Page" ) + FormatPage + + Kontext "SeitenLayout" + if ( SeitenLayout.exists( 2 ) ) then + DialogTest ( SeitenLayout ) + + printlog "cancel dialog 'Page Setup' " + hCloseDialog( SeitenLayout, "Cancel" ) + else + warnlog( "Dialog <SeitenLayout> did not open" ) + endif + + printlog "close application" + Call hCloseDocument + +endcase 'tiFormatModifyLayout diff --git a/testautomation/graphics/required/includes/impress/im_007_.inc b/testautomation/graphics/required/includes/impress/im_007_.inc new file mode 100644 index 000000000000..0a598f59c520 --- /dev/null +++ b/testautomation/graphics/required/includes/impress/im_007_.inc @@ -0,0 +1,735 @@ +'encoding UTF-8 Do not remove or change this line! +'************************************************************************** +' DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. +' +' Copyright 2000, 2010 Oracle and/or its affiliates. +' +' OpenOffice.org - a multi-platform office productivity suite +' +' 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 : wolfram.garten@sun.com +'* +'* short description : Impress Required Test Library (7) +'* +'\***************************************************************** + +sub im_007_ + + call tSlideShowSlideShow() + call tSlideShowRehearseTimings() + call tSlideShowSlideShowSettings() + call tSlideShowCustomSlideShow() + call tSlideShowSlideTransition() + call tSlideShowShowHideSlide() + call tSlideShowCustomAnimation() + call tSlideShowInteraction() + call tSlideShowAnimation() + +end sub + +'******************************************************************************* + +testcase tSlideShowSlideShow + + printlog "open application " + Call hNewDocument + printlog "Slide Show->Slide Show Settings " + SlideShowPresentationSettings + Kontext "Bildschirmpraesentation" + printlog "check if 'type' 'default' is checked, it has to be the default !" + if standard.IsChecked then + if LogoAnzeigen.isEnabled then + Warnlog "'Show Logo' is Enabled :-(" + endif + else + Warnlog "type 'default' is not checked as default :-(" + endif + printlog "check checkbox 'Window' " + Fenster.Check + Printlog "- Presentation in window mode is checked" + printlog "close dialog with OK 'Slide Show' " + Bildschirmpraesentation.Ok + sleep 3 + printlog "Slide Show->Slide Show " + SlideShowSlideshow + Sleep 5 + try + Kontext "DocumentPresentation" + sleep 3 + printlog "Press <Esc> to leave presentation mode " + DocumentPresentation.Typekeys ("<Escape>") + Sleep 3 + Kontext "DocumentImpress" + DocumentImpress.MouseDoubleClick ( 50, 50 ) + Sleep 3 + catch + ' FileClose + warnlog "had to catch <the ball> :-( " + ' Kontext "Messagebox" + ' if Messagebox.Exists (5) Then Messagebox.No + ' Kontext + ' sleep (12) + ' start sAppExe$ + ' sleep (6) + ' Kontext + ' if Office.Exists(2) then Resetapplication + ' Warnlog "Slide didn't end, application wasn't in document edit mode" + endcatch + printlog "close application " + Call hCloseDocument + +endcase 'tSlideShowSlideShow +'------------------------------------------------------------------------------- +testcase tSlideShowRehearseTimings + + goto endsub + printlog "open application " + Call hNewDocument + printlog "Slide Show->Slide Show Settings " + SlideShowPresentationSettings + Kontext "Bildschirmpraesentation" + printlog "check checkbox 'Window' " + Fenster.Check + printlog "close dialog with OK 'Slide Show' " + Bildschirmpraesentation.Ok + printlog "Slide Show->Rehearse Timings " + SlideShowRehearseTimings + sleep 2 + Kontext "DocumentPresentation" + printlog "Press <Esc> to leave presentation mode " + if DocumentPresentation.Exists (5) then + DocumentPresentation.Typekeys ("<Escape>") + else + Warnlog "SlideShowRehearseTimings mode not accessible" + endif + Sleep 3 + if DocumentPresentation.Exists then ' the kontext hasnt to be available, else ERROR + DocumentPresentation.TypeKeys "<ESCAPE>" ' => I mustn't be here ever ! + Warnlog "- Slide show mode should have ended" + else + printlog "SlideShowRehearseTimings mode not accessible :-) " + end if + sleep 3 + try + Kontext "DocumentImpress" + DocumentImpress.MouseDoubleClick ( 50, 50 ) + + sleep 3 + catch + warnlog "Had to catch <the ball> :-( " + endcatch + sleep 3 + printlog "close application " + Call hCloseDocument + +endcase 'tSlideShowRehearseTimings +'------------------------------------------------------------------------------- +testcase tSlideShowSlideShowSettings + + printlog "open application " + Call hNewDocument + sleep 2 + printlog "Slide Show->Slide Show Settings " + SlideShowPresentationSettings + Kontext "Bildschirmpraesentation" + call Dialogtest (Bildschirmpraesentation) + printlog "check checkbox in section 'Range' - 'From: " + AbDia.Check + printlog "select the 3rd item from the top from listbox 'From:' " + AbDiaName.GetSelText + printlog "check checkbox 'All Slides' " + AlleDias.Check + '" RangeCustomSlideShow ' gets tested in tSlideShowCustomSlideShow " + ' IndividuellePraesentationName + printlog "check checkbox 'window'" + Fenster.Check + printlog "check checkbox 'default' " + Standard.Check + printlog "check check box 'Auto' -> implies looping of slideshow in fullscreen mode" + Auto.Check + printlog "set duration of pause to '00:00:05' " + Zeit.GetText + printlog "check check box 'Show logo' " + LogoAnzeigen.Check + printlog "check checkbox 'Change slides maually'" + DiawechselManuel.Check + printlog "check checkbox 'Mouse pointer as pen'" + MauszeigerAlsStift.Check + printlog "UNcheck checkbox 'Mouse pointer visible'" + MauszeigerSichtbar.UnCheck + printlog "check checkbox 'Navigator visible'" + NavigatorSichtbar.Check + printlog "UNcheck checkbox 'animations allowed'" + AnimationenZulassen.UnCheck + printlog "UNcheck checkbox 'Change slides by clicking on background'" + DiaWechselAufHintergrund.UnCheck + printlog "check checkbox 'Presentation always on top'" + PraesentationImmerImVordergrund.Check + printlog "cancel dialog 'Slide Show' " + Bildschirmpraesentation.Cancel + printlog "close application " + Call hCloseDocument + +endcase 'tSlideShowSlideShowSettings +'------------------------------------------------------------------------------- +testcase tSlideShowCustomSlideShow + + printlog "open application " + Call hNewDocument + sleep 2 + printlog "Slide Show->Custom Slide Show " + SlideShowCustomSlideshow + Kontext "IndividuellePraesentation" + call Dialogtest (IndividuellePraesentation) + printlog "click button 'New' " + Neu.Click + Kontext "IndividuellePraesentationDefinieren" + Call DialogTest (IndividuellePraesentationDefinieren) + printlog "select the first entry in the list 'Existing Slides' " + SeitenPraesentation.Select 1 + printlog "click button '>>' " + Hinzufuegen.Click + printlog "close dialog 'Define Custom Slide Show' with OK " + IndividuellePraesentationDefinieren.OK + Kontext "IndividuellePraesentation" + printlog "click button 'Copy' " + Kopieren.Click + printlog "click button 'Delete' " + Loeschen.Click + printlog "click button 'Edit' " + Bearbeiten.Click + Kontext "IndividuellePraesentationDefinieren" + printlog "select 1st entry in the list 'Selected Slides' " + SelectedSlides.Select 1 + printlog "click button '<<' " + Entfernen.Click + printlog "close dialog 'Define Custom Slide Show' with Cancel " + IndividuellePraesentationDefinieren.Cancel + Kontext "IndividuellePraesentation" + printlog "check checkbox 'Use Custom Slide Show' " + IndividuellePraesentationBenutzen.Check + sleep 1 + printlog "+ UNcheck checkbox 'Use Custom Slide Show' " + IndividuellePraesentationBenutzen.UnCheck + printlog "click button 'Start...' " + Starten.Click + sleep 5 + printlog "press key [space] 2 times " + kontext "DocumentPresentation" + DocumentPresentation.TypeKeys "<space>" + sleep 1 + DocumentPresentation.TypeKeys "<space>" + sleep 1 + printlog "close dialog 'Custom Slide Shows' " + ' IndividuellePraesentation.Close ' slide show ends dialog ! + printlog "Slide Show->Slide Show Settings " + try + SlideShowPresentationSettings + catch + warnlog "Presentation did not end :-(" + DocumentPresentation.TypeKeys "<escape>" + endcatch + Kontext "Bildschirmpraesentation" + if Bildschirmpraesentation.exists (5) then + printlog "check checkbox 'Custom Slide Show' " + RangeCustomSlideShow.Check + printlog "check: '" + IndividuellePraesentationName.GetSelText + "'" + printlog "cancel dialog 'Slide Show' " + Bildschirmpraesentation.Cancel + else + warnlog "Dialog not open? SlideShowPresentationSettings" + endif + printlog "Slide Show->Custom Slide Show " + SlideShowCustomSlideshow + Kontext "IndividuellePraesentation" + if (IndividuellePraesentation.exists (5)) then + printlog "click button 'Delete' " + Loeschen.Click + printlog "close dialog 'Custom Slide Shows' " + IndividuellePraesentation.Close + else + warnlog "Dialog not open? SlideShowCustomSlideshow" + endif + printlog "close application " + Call hCloseDocument + +endcase 'tSlideShowCustomSlideShow +'------------------------------------------------------------------------------ +testcase tSlideShowSlideTransition + + dim i as integer + dim a as integer + dim iCount as integer + + printlog "open application " + Call hNewDocument + printlog "create rectangle " + Call hRechteckErstellen ( 10, 10, 20, 40 ) + sleep 1 + printlog "Slide Show->Slide Transition " + SlideShowSlideTransition + sleep 2 + printlog "The 'Slide Transition' in the right 'Tasks' Pane has to come up " + Kontext "Tasks" + printlog "Select the second entry from teh Listbox 'Applay to selected slides' " + TransitionApplyToSelectedSlide.select (2) + sleep 5 ' takes some time, until it is run + Printlog "Count of effects : "+TransitionApplyToSelectedSlide.GetItemCount + Printlog "Count of Speeds : "+TransitionSpeed.GetItemCount + iCount = TransitionSound.GetItemCount + Printlog "Count of Sounds : " + iCount + + printlog "One Entry of the Listbox 'Sound' is 'Other sound...', select it " + TransitionSound.typeKeys "<home>" + i = 0 + for a = 1 to iCount + TransitionSound.select (a) + kontext "OeffnenDlg" + if (OeffnenDlg.exists (5)) then + if (0=i) then + ' remember when dialog came up + i = a + OeffnenDlg.cancel + else + warnlog "File Open Dialog comes up a second time!" + OeffnenDlg.cancel + endif + endif + kontext "Tasks" + ' the Checkbox is disabled on teh first three entries: <No Sound>, <Stop previous sound>... + if (TransitionLoopUntilNextSound.isEnabled AND (a<4)) then + qaErrorLog "May be Language specific -> Evaluation of TBO; " + a + endif + next a + TransitionSound.select (i) + printlog "The dialog 'Open' comes up" + sleep 1 + kontext "OeffnenDlg" + if (OeffnenDlg.exists (5)) then + printlog "Read all entries in Listbox 'File type' " + for i = 1 to Dateityp.getItemCount + printlog "" + i + ":" + Dateityp.getItemText(i) + next i + printlog "cancel dialog 'Open' " + OeffnenDlg.cancel + else + warnlog "Impress:Tasks Pane:Slide Transition:Sound:Other sound... disdn't bring up teh File Open Dialog!" + endif + kontext "Tasks" + sleep (2) + printlog "check checkbox 'Automatically after' " + TransitionAutomaticallyAfter.check + sleep (2) + printlog "press key 'Page Up' in box " + TransitionAutomaticallyAfterTime.typeKeys "<PageUp>" + sleep 9 + printlog "check the standard checkbox 'On mouse click' " + TransitionOnMouseClick.check + sleep (2) + printlog "press button 'Apply to All Slides' " + TransitionApplyToAllSlides.click + sleep (2) + printlog "press button 'Play' " + TransitionPlay.click + sleep 10 + printlog "press button 'Slide Show' " + TransitionSlideShow.click + sleep 2 + kontext "DocumentPresentation" + if DocumentPresentation.exists (10) then + printlog "Presentation started :-)" + DocumentPresentation.typeKeys "<escape>" + else + warnlog "Impress:Tasks Pane:Slide Transition:Slide Show button doesn't start slideshow!" + endif + kontext "Tasks" + + printlog "uncheck and check Checkbox 'Automatic Preview' " + printlog "default is checked " + if (NOT TransitionAutomaticPreview.isChecked) then + warnlog "Impress:Tasks Pane:Slide Transition: Automatic preview has to be checked by default, wasn't!" + endif + sleep (2) + TransitionAutomaticPreview.unCheck + sleep (2) + TransitionAutomaticPreview.Check + printlog "close application " + Call hCloseDocument + +endcase 'tSlideShowSlideTransition +'------------------------------------------------------------------------------- +testcase tSlideShowShowHideSlide + + printlog "open application " + Call hNewDocument + printlog "create rectangle " + Call hRechteckErstellen ( 10, 10, 20, 40 ) + printlog "View->Master View->Slides View " + ViewWorkspaceSlidesView + sleep 1 + printlog "Slide Show->Hide Slide " + SlideShowHideSlide + sleep 1 + printlog "Slide Show->Show Slide " + SlideShowShowSlide + printlog "close application " + Call hCloseDocument +endcase + +testcase tSlideShowAnimation + printlog "open application " + Call hNewDocument + sleep 1 + printlog "create rectangle " + Call hRechteckErstellen ( 10, 10, 20, 40 ) + sleep 1 + printlog "Insert ->Animated image " + Opl_SD_EffekteZulassen + Kontext "Animation" + sleep 1 + printlog "click button 'Apply Object' " + BildAufnehmen.Click 'BildAufnehmen + printlog "click button 'Create' " + Erstellen.Click + sleep 1 + printlog "Select 1st entry from top in 'Alignment' " + Anpassung.Select 1 + sleep 1 + printlog "click button 'Create' " + Erstellen.Click + sleep 1 + printlog "click button 'Apply Objects Individually' " + AlleAufnehmen.Click + sleep 1 + printlog "click button 'First Image' " + ErstesBild.Click + sleep 1 + printlog "click button 'Last Image' " + LetztesBild.Click + sleep 1 + printlog "click button 'BAckwards' " + Rueckwaerts.Click + sleep 1 + printlog "click button 'Play' " + Abspielen.Click + sleep 1 + printlog "click in Number field 'Image Number' Less - More " + AnzahlBilder.Less + sleep 1 + AnzahlBilder.More + sleep 1 + printlog "check 'Bitmap Object' " + AnimationsgruppeBitmapobjekt.Check + sleep 1 + printlog "Type '10' into the field 'Duration' " + AnzeigedauerProBild.SetText "10" + printlog "click button 'Play' " + Abspielen.Click + printlog "wait 5 seconds " + sleep 5 + printlog "click button 'Stop' " + try + Stopp.Click + catch + warnlog "Stopbutton doesn't work" + endcatch + sleep 1 + printlog "Select 1st entry from top in 'Loop Count' " + AnzahlDurchlaeufe.Select 1 + sleep 1 + printlog "click button 'Delete Current Image' " + BildLoeschen.Click + sleep 1 + printlog "check 'Group Object' " + AnimationsgruppeGruppenobjekt.Check + sleep 1 + printlog "click button 'Delete All Images' " + AlleLoeschen.Click + kontext "Messagebox" + printlog "there has to be a messagebox 'Really delete?' say YES!; else ERROR " + if Messagebox.exists (5) then + Messagebox.YES + else + warnlog "No one cares about my data :-( No one asked if all shall be deleted :-( " + endif + sleep 1 + kontext "Animation" + printlog "close dialog 'Animation' " + Animation.Close + printlog "close application " + Call hCloseDocument + +endcase 'tSlideShowShowHideSlide +'------------------------------------------------------------------------------- +testcase tSlideShowCustomAnimation + + dim bError as boolean + + printlog "open application" + Call hNewDocument + printlog "create textbox with text" + Call hTextrahmenErstellen ("Test text to test text effects", 10, 10, 20, 40 ) + printlog "Slide Show->Custom Animation..." + SlideShowCustomAnimation + Kontext "Tasks" + printlog "click button 'Add...'printlog " + EffectAdd.click + printlog "Dialog 'Custom Animation' comes up" + kontext + printlog "Switch to TabPage: Entrance" + active.setPage(TabEntrance) + kontext "TabEntrance" + if TabEntrance.exists(5) then + DialogTest(TabEntrance) + printlog "select in the listbox 'Effects' the second entry" + Effects.select(2) + Speed.getItemCount + AutomaticPreview.unCheck + sleep 1 + AutomaticPreview.Check + kontext + + printlog "Switch to TabPage: Emphasis" + active.setPage(TabEmphasis) + kontext "TabEmphasis" + if TabEmphasis.exists(5) then + DialogTest(TabEmphasis) + else + bError = true + warnlog "Impress:Tasks Pane:Custom Animation:TabEmphasis tabPage doesn't work." + endif + kontext + + printlog "Switch to TabPage: Exit" + active.setPage(TabExit) + kontext "TabExit" + if TabExit.exists(5) then + DialogTest(TabExit) + else + bError = true + warnlog "Impress:Tasks Pane:Custom Animation:TabExit tabPage doesn't work." + endif + kontext + + printlog "Switch to TabPage: Motion Paths" + active.setPage(TabMotionPaths) + kontext "TabMotionPaths" + if TabMotionPaths.exists(5) then + DialogTest(TabMotionPaths) + Effects.select(7) + else + bError = true + warnlog "Impress:Tasks Pane:Custom Animation:TabMotionPaths tabPage doesn't work." + endif + kontext + '----------------------------------------------------------------------- + 'printlog "Switch to tabpage: Misc Effects" + 'active.setPage(TabMiscEffects) + 'kontext "TabMiscEffects" + 'if TabMiscEffects.exists(5) then + ' DialogTest(TabMiscEffects) + 'else + ' bError = true + ' warnlog "Impress:TaskPane:CustomAnimation:TabMiscEffects tabPage does not work." + 'endif + 'kontext + '----------------------------------------------------------------------- + printlog "Close dialog 'Custom Animation' with 'OK'" + TabMotionPaths.OK + bError = false + else + bError = true + warnlog "Impress:Tasks Pane:Custom Animation:Add... button didn't work." + endif + + Kontext "Tasks" + if (NOT bError) then + printlog "click button 'Change...'" + EffectChange.click + printlog "Dialog 'Custom Animation' comes up" + kontext + printlog "Switch to TabPage: Entrance" + active.setPage(TabEntrance) + kontext "TabEntrance" + if (NOT TabEntrance.exists(5)) then + warnlog "Impress:Tasks Pane:Custom Animation:Change... button didn't work." + endif + TabEntrance.cancel + Kontext "Tasks" + EffectStart.getItemCount + if EffectProperty.isEnabled then + EffectProperty.getItemCount + endif + printlog "Click on button '...' (Options)" + EffectOptions.click + kontext "TabEffect" + if TabEffect.exists(5) then + dialogTest(TabEffect) + Sound.getItemCount + AfterAnimation.getItemCount + printlog "switch to TabPage 'Timing'" + Kontext + active.setPage TabTiming + kontext "TabTiming" + if TabTiming.exists(5) then + dialogTest(TabTiming) + TimingStart.getItemCount + Delay.getText + Speed.getItemCount + Repeat.getItemCount + Rewind.ischecked + TriggerAnimate.isChecked + TriggerStart.isChecked + Shape.getItemCount + else + warnlog "Impress:Tasks Pane:Custom Animation:Effect Options: Timing TabPage didn't work." + endif + printlog "switch to TabPage 'Timing'" + Kontext + active.setPage TabTextAnimation + kontext "TabTextAnimation" + if TabTextAnimation.exists(5) then + dialogTest(TabTextAnimation) + GroupText.getItemCount + AnimateAttachedShape.isChecked + TabTextAnimation.cancel + else + warnlog "Impress:Tasks Pane:Custom Animation:Effect Options: TextAnimation TabPage didn't work." + endif + else + warnlog "Impress:Tasks Pane:Custom Animation:... button didn't work." + endif + Kontext "Tasks" + EffectSpeed.getItemCount + EffectList.getItemCount + EffectPlay.click + printlog "Wait five seconds so the Playfunction has ended " + sleep 5 + EffectSlideShow.click + sleep 1 + kontext "DocumentPresentation" + if DocumentPresentation.exists (5) then + printlog "Presentation started :-)" + DocumentPresentation.typeKeys "<escape>" + else + warnlog "Impress:Tasks Pane:Custom Animation:Slide Show button doesn't start slideshow!" + endif + kontext "Tasks" + EffectAutomaticPreview.isChecked + printlog "click button 'Remove'" + EffectRemove.click + endif + printlog "close application" + Call hCloseDocument + +endcase 'tSlideShowCustomAnimation +'------------------------------------------------------------------------------- +testcase tSlideShowInteraction + + printlog "open application " + Call hNewDocument + sleep 2 + printlog "create rectangle " + Call hRechteckErstellen (10, 10, 20, 20) + sleep 3 + printlog "Slide Show->Interaction " + SlideShowInteraction + Kontext "TabInteraktion" + Call DialogTest (TabInteraktion, 1) + printlog "+ Select 6th entry from top in 'Action at mouse click' : 'Go to page or object' " + AktionBeiMausklick.select 6 + Printlog AktionBeiMausklick.GetSelText + " chosen" + Call DialogTest (TabInteraktion, 2) + printlog "+ click button 'Find' " + sleep 1 + suchen.click + Kontext "TabInteraktion" + printlog "Select 7th entry from top in 'Action at mouse click' : 'Go to document' " + sleep 1 + AktionBeiMausklick.select 7 + sleep 1 + Printlog AktionBeiMausklick.GetSelText + " chosen" + Kontext "TabInteraktion" + Call DialogTest (TabInteraktion, 3) + printlog "+ click button 'Browse...' " + Durchsuchen.click + sleep 1 + kontext "OeffnenDlg" + call Dialogtest (OeffnenDlg) + printlog "+ cancel dialog 'open' " + OeffnenDlg.cancel + Kontext "TabInteraktion" + sleep 1 + printlog "Select 9th entry from top in 'Action at mouse click' : 'Play Sound' " + AktionBeiMausklick.select 8 + Printlog AktionBeiMausklick.GetSelText + " chosen" + Call DialogTest (TabInteraktion, 4) + printlog "+ click button 'Browse...' " + Durchsuchen.click + sleep 1 + Kontext "OeffnenDlg" + Call dialogTest (OeffnenDlg) + printlog "cancel dialog 'open' " + OeffnenDlg.Cancel + sleep 1 + Kontext "TabInteraktion" + printlog "Select 8th entry from top in 'Action at mouse click' : 'Run Program' " + AktionBeiMausklick.select 9 + Printlog AktionBeiMausklick.GetSelText + " chosen" + Call DialogTest (TabInteraktion, 7) + Kontext "TabInteraktion" + printlog "+ click button 'Browse...' " + Durchsuchen.Click + sleep 1 + Kontext "OeffnenDlg" + Call dialogTest (OeffnenDlg) + printlog "+ cancel dialog 'open' " + OeffnenDlg.Cancel + sleep 1 + printlog "Select 9th entry from top in 'Action at mouse click' : 'Run Macro' " + Kontext "TabInteraktion" + AktionBeiMausklick.select 10 + Printlog AktionBeiMausklick.GetSelText + " chosen" + sleep 3 + Call DialogTest (TabInteraktion, 6) + printlog "+ click button 'Browse...' " + Durchsuchen.Click + sleep 1 + Kontext "ScriptSelector" + sleep 1 + Call DialogTest ( ScriptSelector, 1) + sleep 1 + printlog "+ cancel dialog 'ScriptSelector' " + ScriptSelector.Cancel + sleep 1 + printlog "Select 10th entry from top in 'Action at mouse click' : 'Exit Presentation' " + Kontext "TabInteraktion" + AktionBeiMausklick.select 11 + Printlog AktionBeiMausklick.GetSelText + " chosen" + Call DialogTest (TabInteraktion, 7) + Kontext "TabInteraktion" + printlog "close dialog 'Interaction' " + TabInteraktion.Close + sleep 2 + printlog "close application " + Call hCloseDocument + +endcase 'tSlideShowInteraction diff --git a/testautomation/graphics/required/includes/impress/im_011_.inc b/testautomation/graphics/required/includes/impress/im_011_.inc new file mode 100644 index 000000000000..084be5223b10 --- /dev/null +++ b/testautomation/graphics/required/includes/impress/im_011_.inc @@ -0,0 +1,180 @@ +'encoding UTF-8 Do not remove or change this line! +'************************************************************************** +' DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. +' +' Copyright 2000, 2010 Oracle and/or its affiliates. +' +' OpenOffice.org - a multi-platform office productivity suite +' +' 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 : wolfram.garten@sun.com +'* +'* short description : Impress Required Test Library (11) +'* +'\***************************************************************** + +sub m_011_ + + call tiDiaLeiste() + +end sub + +'******************************************************************************* + +testcase tiDiaLeiste + + ' only in IMPRESS + dim sTemp as string + Dim i,x as integer + + printlog " open application " + Call hNewDocument + sleep 1 + printlog " Change options so the presentation won't start from the current, but the first slide. " + ToolsOptions + hToolsOptions ( "IMPRESS", "General" ) + MitAktuellerSeite.Uncheck + Kontext "ExtrasOptionenDlg" + ExtrasOptionenDlg.OK + + printlog " insert a graphic: global\input\graf_inp\desp.bmp) " + Printlog "- Insert graphic from file so there is something for the slide mode" + hGrafikEinfuegen ConvertPath (gTesttoolPath + "global\input\graf_inp\desp.bmp") + sleep 3 + printlog "+ Insert->Slide " + InsertSlide + sleep 2 + hTypekeys "<Pagedown>" + sleep 2 + printlog "+ insert a graphic: "global\input\graf_inp\desp.bmp") " + hGrafikeinfuegen ConvertPath (gTesttoolPath + "global\input\graf_inp\desp.bmp") + sleep 3 + printlog "+ View->Master View->Slides View " + ViewWorkspaceSlidesView + sleep 2 + '-------------------------------- Ueberblendeffekt ---------------------------------------- + Printlog "- Test blend effect" + Kontext "SlideViewObjectbar" ' CORRECT + sleep 5 + + if Ueberblendeffekt.GetItemCount <> 57 then warnlog "these are not 57: " + Ueberblendeffekt.GetItemCount + printlog " select last entry 'Automatic (random)' in listbox 'Slide Effects' on object toolbar " + Ueberblendeffekt.Select (Ueberblendeffekt.GetItemCount) + Printlog " select last effect (random effect): " + Ueberblendeffekt.GetSelText + + ' Printlog Geschwindigkeit.GetRT ' 341 listbox + ' Printlog Diawechsel.GetRT ' 341 listbox + ' Printlog Zeit.GetRT ' 353 spinfield + ' Printlog DiasProReihe.GetRT ' 353 spinfield + ' Printlog PraesentationMitZeitnahme.GetRT doesn't work, but behave as button + ' Printlog DiaAnzeigen.GetRT doesn't work, but behave as button + + '-------------------------------- Geschwindigkeit ----------------------------------------- + Printlog "- Check different speed settings" + Kontext "SlideViewObjectbar" + printlog " select every item in list 'Transition Speed' " + x = Geschwindigkeit.GetItemCount + for i = 1 to x + Geschwindigkeit.Select i + Printlog " changed to: " + Geschwindigkeit.GetSelText + next i + '-------------------------------- Diawechsel ---------------------------------------------- + Printlog "- Style of slide change" + Kontext "SlideViewObjectbar" + printlog " select every item in list 'Auto Transition' " + x = Diawechsel.GetItemCount + for i = 1 to x + Diawechsel.Select i + Printlog " Changed to: " + Diawechsel.GetSelText + "; is time enabled ?: "+Zeit.IsEnabled + next i + '-------------------------------- Diawechsel Zeitintervall -------------------------------- + Printlog "- Zeitintervall testen" + Kontext "SlideViewObjectbar" + printlog " select last entry 'Automatic' in listbox 'Auto Transition' " + Diawechsel.Select (Diawechsel.GetItemCount) ' automatic is usually the last one + sleep 1 + if (Zeit.IsEnabled = FALSE) Then Warnlog "- Time should be editable, if automatic is chosen" + printlog " type "15" into the field 'Time' " + Zeit.SetText "15" + sleep 1 + Printlog " Time set to: " + Zeit.GetText + '-------------------------------- Praesentation mit Zeitnahme ------------------------------ + Printlog "- Presentation with rehearsed timings" + Kontext "SlideViewObjectbar" + printlog " click button 'Rehearse Timings' " + PraesentationMitZeitnahme.Click + sleep 2 + Kontext "DocumentPresentation" + if DocumentPresentation.exists (5) then + sleep 5 + printlog " wait some seconds and click with mouse " + DocumentPresentation.MouseDown 50,50 + DocumentPresentation.MouseUp 50,50 + sleep 2 + printlog " wait some seconds and click with mouse " + DocumentPresentation.MouseDown 50,50 + DocumentPresentation.MouseUp 50,50 + sleep 3 + else + warnlog "Didn't switch into presentation mode :-(" + endif + Kontext "DocumentPresentation" + if DocumentPresentation.exists (5) then + warnlog "We are still in presentation mode :-( WHY!!!!???" + endif + '------------------------------- Dia anzeigen ja/nein -------------------------------------- + Printlog "- Show slide yes/no" + Kontext "SlideViewObjectbar" + printlog " click button 'Show/Hide Slide' " + DiaAnzeigen.Click + sleep 3 + printlog " click button 'Show/Hide Slide' " + DiaAnzeigen.Click + '------------------------------- Dias pro Reihe -------------------------------------------- + Printlog "- Presentation with rehearsed timings" + Kontext "SlideViewObjectbar" + sTemp = DiasProReihe.GetText + printlog " press button 'less' in field 'Slides Per Row' " + DiasProReihe.Less + if sTemp = DiasProReihe.GetText then warnlog " nothing changed (less)" + sTemp = DiasProReihe.GetText + printlog " press button 'more' in field 'Slides Per Row' " + DiasProReihe.more + if sTemp = DiasProReihe.GetText then warnlog " nothing changed (more 1)" + sTemp = DiasProReihe.GetText + printlog " press button 'more' in field 'Slides Per Row' " + DiasProReihe.more + if sTemp = DiasProReihe.GetText then warnlog " nothing changed (more 2)" + kontext + if active.exists then + warnlog "active (1): '"+active.gettext+"'" + endif + printlog " Restore default settings in ToolsOptions " + ToolsOptions + hToolsOptions ( "IMPRESS", "General" ) + MitAktuellerSeite.Check + Kontext "ExtrasOptionenDlg" + ExtrasOptionenDlg.OK + printlog " close application " + Call hCloseDocument + sleep 2 + +endcase 'tiDiaLeiste |