diff options
Diffstat (limited to 'testautomation/graphics/optional/includes/impress')
17 files changed, 10574 insertions, 0 deletions
diff --git a/testautomation/graphics/optional/includes/impress/i_animation.inc b/testautomation/graphics/optional/includes/impress/i_animation.inc new file mode 100644 index 000000000000..ac1c07ed817e --- /dev/null +++ b/testautomation/graphics/optional/includes/impress/i_animation.inc @@ -0,0 +1,214 @@ +'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@oracle.com +'* +'* short description : +'* +'********************************************************************* +' #1 tExtrasAnimation +'\******************************************************************** + +' Dateiname.SetText ConvertPath (gTesttoolPath + "global\input\graf_inp\enter.bmp") +' Dateiname.SetText ConvertPath (gTesttoolPath + "global\input\graf_inp\grafix3.ras") + +testcase tExtrasAnimation + + Dim i + Dim Zaehler + Dim ZaehlerAnpassung + + + Printlog "- Tools/Animation" + printlog "New impress document " + Call hNewDocument + Call sSelectEmptyLayout + sleep 2 + printlog "insert graphic file (sample.bmp) " + InsertGraphicsFromFile + sleep 1 + Kontext "GrafikEinfuegenDlg" + sleep 2 + + Dateiname.SetText ConvertPath (gTesttoolPath + "global\input\graf_inp\enter.bmp") + sleep 2 + Oeffnen.Click + sleep 2 + Kontext "DocumentImpress" + printlog "Deselect graphic " + DocumentImpress.MouseDoubleClick 90,90 + sleep 1 + InsertGraphicsFromFile + sleep 2 + Kontext "GrafikEinfuegenDlg" + Dateiname.SetText ConvertPath (gTesttoolPath + "global\input\graf_inp\grafix3.ras") + sleep 2 + Oeffnen.Click + sleep 2 + Opl_SD_EffekteZulassen + Kontext "Animation" + + printlog "add selected picture 10 times into the animation " + for i=1 to 10 + BildAufnehmen.Click + next i + sleep 1 + printlog "compare frame number in animation dialog " + if AnzahlBilder.GetText <> "10" Then + WarnLog " - Adding graphics did not work" + else + printlog "Pictures added" + end if + + printlog "test if Add all is eneabled (shouldn't be because of only 1 object selected) " + if AlleAufnehmen.IsEnabled Then WarnLog " - Add all should not be enabled, there is only 1 graphic selected" + Kontext "DocumentImpress" + printlog "Select both pictures " + EditSelectAll + Kontext "Animation" + printlog "Add all (5 times) " + for i=1 to 5 + AlleAufnehmen.Click + next i + sleep 1 + printlog "check if number of frames is now 20 " + if AnzahlBilder.GetText <> "20" Then + WarnLog " - Adding pics did not work" + else + printlog "All pics added" + end if + + printlog "Click First Picture " + ErstesBild.Click + + printlog "Control if we are at frame 1 " + if AnzahlBilder.GetText <> "1" Then + WarnLog " - Jump back to start did not work" + else + printlog "Jumped back to first picture" + end if + + printlog "Go to last picture " + LetztesBild.Click + + printlog "Control frame number " + if AnzahlBilder.GetText <> "20" Then + WarnLog " - Jump to end did not work" + else + printlog "Jump to end did work" + end if + + printlog "Play animation " + Abspielen.Click + sleep 3 + Kontext "DocumentImpress" + printlog "Select all in document " + EditSelectAll + printlog "Delete content " + DocumentImpress.TypeKeys "<DELETE>" + + Kontext "Animation" + printlog "Create animation" + Erstellen.Click + sleep 10 + + Kontext "DocumentImpress" + try + printlog "Try to copy ccreated animation into clipboard " + EditCopy + printlog "animation created" + catch + WarnLog " - Animation not created" + endcatch + + Kontext "Animation" + + if AnimationsgruppeGruppenobjekt.IsChecked=True Then + try + printlog "Try setting duration per frame " + AnzeigedauerProBild.SetText "1" + WarnLog " - Edit field should be disabled" + catch + printlog "Edit field not enabled because groupobject status is = " + AnimationsgruppeGruppenobjekt.IsChecked + endcatch + end if + + + printlog "check animation group object " + AnimationsgruppeBitmapobjekt.Check + + printlog "Set duration per frame to 3" + AnzeigedauerProBild.SetText "3" + SetClipboard AnzeigedauerProBild.GetText + printlog "Raise value for duration " + AnzeigedauerProBild.More + if AnzeigedauerProBild.GetText <> GetClipboardText Then + printlog "Time per pic could be edited" + else + WarnLog " - Time per pic could be edited" + end if + + Zaehler = AnzahlDurchlaeufe.GetItemCount + printlog "Change number of plays " + for i=1 to Zaehler + AnzahlDurchlaeufe.Select i + next i + printlog "Number of loops checked" + + printlog "change ZaehlerAnpassung " + ZaehlerAnpassung=Anpassung.GetItemCount + for i=1 to ZaehlerAnpassung + Anpassung.Select i + next i + printlog "Loop count changed" + + printlog "Delete 1 frame " + BildLoeschen.Click + if AnzahlBilder = "20" Then + WarnLog " - Delete pictures from animation did not work" + else + printlog "Picture No20 deleted" + end if + + printlog "Delete all frames " + AlleLoeschen.Click + Kontext "Active" + Active.Yes + sleep 3 + + Kontext "Animation" + if Abspielen.IsEnabled=true Then + WarnLog " - Not all pics could be deleted" + else + printlog "all pics deleted" + end if + sleep 2 + Animation.Close + sleep 2 + printlog "close document" + Call hCloseDocument +endcase diff --git a/testautomation/graphics/optional/includes/impress/i_headerfooter.inc b/testautomation/graphics/optional/includes/impress/i_headerfooter.inc new file mode 100644 index 000000000000..d69a6762f886 --- /dev/null +++ b/testautomation/graphics/optional/includes/impress/i_headerfooter.inc @@ -0,0 +1,711 @@ +'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@oracle.com +'* +'* short description : Tests the header-footer-function in Impress +'* +'******************************************************************* + +testcase tiHeaderFooterSlide + + dim numbervalue1 as integer + dim value2 as String + dim value3 as String + + printlog "This part checks the first Tabpage of the Header and Footer Dialog" + + printlog "Open New document" + Call hNewDocument + kontext "drawimpress" + try + printlog "View - Header And Footer" + ViewHeaderAndFooter + sleep(1) + catch + warnlog " Could'nt open ViewHeaderAndFooter!" + endcatch + + printlog " Testing TabHeaderFooterSlide." + kontext "TabHeaderFooterSlide" + + printlog "Testing date and time checkbox" + if DateTime.Exists = TRUE AND DateTimeFixed.isVisible = TRUE then + DateTime.UnCheck + sleep(1) + DateTime.Check + sleep(1) + + if DateTime.IsChecked then + printlog " DateTimeFormat-checkbox works." + else + warnlog " Something wrong with the DateTime-checkbox!" + endif + + else + warnlog "DateTime does not exist or is not visible." + endif + + printlog "Checking if DateTime checkbox setting is remembered..." + DateTime.Uncheck + printlog " Date Time is unchecked now." + Apply.Click + ViewHeaderAndFooter + + if DateTime.isChecked then + warnlog " Settings of Date Time not remembered!" + else + printlog " Setting of date Time is remembered." + endif + DateTime.Check + + printlog "Check DateTimeFixed can be checked/unchecked" + if DateTimeFixed.Exists = TRUE AND DateTimeFixed.isVisible = TRUE then + DateTimeFixed.Check + sleep(1) + + if DateTimeFixed.isChecked = TRUE AND DateTimeVariable.IsChecked = FALSE then + printlog " Datetimefixed-checkbox seem to work." + else + warnlog " Datetimefixed-checkbox isnt checked or DateTimeVariable is checked!" + endif + + else + warnlog " DateTimeFixed doesnt exist or is not visible!" + endif + + printlog "Can text be inserted in the fixed-field?" + if DateTimeFixedText.exists = TRUE AND DateTimeFixedText.isVisible = TRUE then + DateTimeFixedText.settext "lalala" + + if DateTimeFixedText.gettext <> "lalala" then + errorlog " Could'nt write a text to the DateTimeFixedText-field!" + else + printlog " Text is the same." + endif + + else + warnlog " DateTimeFixedText doesnt exist or is not visible!" + endif + + printlog "Checking if DateTimeFixed and Text setting is remembered..." + DateTime.Check + DateTimeFixed.Check + DateTimeFixedText.settext "lalala" + Apply.Click + ViewHeaderAndFooter + + if DateTimeFixedText.gettext <> "lalala" then + warnlog " Text in DateTimeFixedText is not the same!" + else + printlog " Text was saved." + endif + DateTimeFixedText.settext "" + + printlog "Can I change to Variable and check it?" + if DateTimeVariable.exists = TRUE AND DateTimeVariable.isVisible = TRUE then + DateTimeVariable.Check + sleep(1) + + if DateTimeVariable.IsChecked AND DateTimeFixed.IsChecked = FALSE then + printlog " DateTimeVariable-checkbox works." + else + warnlog " Something wrong with the DateTimeVariable-checkbox or DateTimeFormat is checked!" + endif + + else + warnlog " DateTimeVariable doesnt exist or is not visible!" + endif + + printlog "Is the Variable setting saved?" + Apply.Click + ViewHeaderAndFooter + if DateTimeVariable.isChecked then + printlog " Variable Setting gets saved." + else + warnlog " Variable setting does not get saved!" + endif + + printlog "Checking DateTimeFormat box" + if DateTimeFormat.exists = TRUE AND DateTimeFormat.isVisible = TRUE then + printlog "Get the number of choices" + numbervalue1 = DateTimeFormat.getitemcount + printlog " DateTimeFormat equals: " + numbervalue1 + printlog "Get the text for the choosen entry" + value2 = DateTimeFormat.getseltext + printlog " Tries to get ", numbervalue1 & "." + printlog "Select the last entry" + DateTimeFormat.select ( numbervalue1 - 1 ) + printlog "Get the text for the last entry" + value3 = DateTimeFormat.getseltext + printlog " DateTimeFormat is: " + value3 + + if value2 = value3 then + printlog "Check if the first and last are the same." + errorlog " More options for Date should exist!" + printlog "Choose the original state" + DateTimeFormat.select value2 + else + printlog " DateTimeFormat box works." + endif + + printlog "Checking if settings of DateTimeFormat box get saved" + Apply. Click + ViewHeaderAndFooter + if DateTimeFormat.GetSelText = value3 then + printlog " DateTimeFormat settings get saved." + else + warnlog " DateTimeFormat settings did not get saved!" + endif + + else + warnlog " DateTimeFormat doesnt exist or is not visible." + endif + + printlog "Checking DateTimeLanguage box" + if DateTimeLanguage.exists = TRUE AND DateTimeLanguage.isVisible = TRUE then + printlog "Get the number of choices " + numbervalue1 = DateTimeLanguage.GetItemCount + printlog "Choose the first entry " + DateTimeFormat.select 1 + printlog "Get the text for the choosen entry " + value2 = DateTimeLanguage.GetSelText + printlog "Select the last entry " + DateTimeLanguage.select ( numbervalue1 - 1 ) + printlog "Get the text for the last entry " + value3 = DateTimeLanguage.GetSelText + + if value2 = value3 then + errorlog " More options for Date should exist!" + printlog "Check if the first and last are the same. " + printlog "Choose the original state " + DateTimeLanguage.select value2 + value3 = DateTimeLanguage.GetSelText + else + printlog " DateTimeLanguage box works." + endif + + printlog "Checking if language settings get saved" + Apply.Click + ViewHeaderAndFooter + if DateTimeLanguage.GetSelText = value3 then + printlog " DateTimeLanguage settings get saved." + else + warnlog " DateTimeLanguage do not get saved!" + endif + + else + warnlog " DateTime doesnt exist or is not visible!" + endif + + printlog "Checking Footer checkbox " + if Footer.exists = TRUE AND Footer.isVisible = TRUE then + Footer.Check + sleep(1) + + if Footer.IsChecked then + printlog " Footer-checkbox works." + else + errorlog " Something wrong with the Footer-checkbox!" + endif + + else + warnlog " Footer checkbox doesnt exist or is not visible!" + endif + + printlog "Checking if Footer setting gest saved" + Footer.Uncheck + Apply.Click + ViewHeaderAndFooter + if Footer.IsChecked then + warnlog " Footer settings do not get saved!" + else + printlog " Footer settings saved." + endif + Footer.Check + + printlog "Checking if text can be inserted in FooterFixedText " + if FooterFixedText.exists = TRUE AND FooterFixedText.isVisible = TRUE then + FooterFixedText.SetText "lalala" + + if FooterFixedText.GetText <> "lalala" then + errorlog " Could'nt write a text to the FooterFixedText-field!" + else + printlog " FooterFixedText works." + endif + + else + warnlog " Footer doesnt exist or is not visible!" + endif + + printlog "Checking if Footer text gets saved." + Apply.Click + ViewHeaderAndFooter + + if FooterFixedText.GetText <>"lalala" then + errorlog " Text does not get saved!" + else + printlog " FooterFixedText works." + + endif + FooterFixedText.SetText "" + + printlog "Checking Slidenumber checkbox" + if Donotshowonfirstslide.exists = TRUE AND Donotshowonfirstslide.isVisible = TRUE then + Slidenumber.Check + sleep(1) + + if Slidenumber.IsChecked then + printlog " Slidenumber-checkbox works" + else + warnlog " Something wrong with the slidenumber-checkbox!" + endif + else + warnlog " Do not show on first slide doesnt exist or is not visible!" + endif + + printlog "Checking if Slidenumber gets saved." + Apply.Click + ViewHeaderAndFooter + + if Slidenumber.IsChecked then + printlog " Slidenumber setting is remembered." + else + warnlog " Slidenumber setting is not remembered!" + endif + + printlog "Checking Do not show on first slide checkbox" + if Donotshowonfirstslide.exists = TRUE AND Donotshowonfirstslide.isVisible = TRUE then + Donotshowonfirstslide.UnCheck + sleep(1) + Donotshowonfirstslide.Check + if Donotshowonfirstslide.IsChecked then + printlog " Do not show on first slide-checkbox works" + else + errorlog " Something wrong with the Do not show on first slide-checkbox!" + endif + else + warnlog " Do not show on first slide doesnt exist or is not visible!" + endif + + printlog "Checking if Do not show on first slide is saved." + Apply.Click + ViewHeaderAndFooter + + if Donotshowonfirstslide.IsChecked then + printlog " Do not show on first slide setting is saved." + else + warnlog " Do not show on first slide setting is not saved!" + endif + + printlog "Closing dialog with cancel" + sleep 1 + TabHeaderFooterSlide.Cancel + sleep 1 + kontext "drawimpress" + sleep 1 + + printlog "Close document" + Call hCloseDocument + +endcase 'tiHeaderFooterSlide + +'---------------------------------------------------------------------------- + +testcase tiHeaderFooterNotesHandout + + dim numbervalue1 as integer + dim value2 as String + dim value3 as String + + printlog "This part checks the second Tabpage of the Header and Footer Dialog for notes and handout" + + printlog "Open New document " + Call hNewDocument + kontext "drawimpress" + try + printlog "View - Header And Footer " + ViewHeaderAndFooter + sleep(1) + catch + printlog "Warnlog for not opening dialog" + warnlog " Could'nt open ViewHeaderAndFooter!" + endcatch 'goto endcase + kontext " TabHeaderFooterSlide" + + printlog " Testing TabHeaderFooterNotesHandout." + sleep 2 + kontext + active.setpage TabHeaderFooterNotesHandout + sleep 2 + kontext "TabHeaderFooterNotesHandout" + + printlog "Checking Header checkbox " + if Header.exists = TRUE AND Header.isVisible = TRUE then + Header.UnCheck + sleep(1) + Header.Check + sleep(1) + + if Header.isChecked then + printlog " Header-checkbox works." + else + warnlog " Header-checkbox doesn't work!" + endif + + else + warnlog " Header doesnt exist or is not visible!" + endif + + printlog "Checking if Header setting is saved." + Header.Uncheck + ApplyToAll.Click + ViewHeaderAndFooter + kontext + active.setpage TabHeaderFooterNotesHandout + kontext "TabHeaderFooterNotesHandout" + + if Header.IsChecked then + warnlog " Header should not be checked!" + else + printlog " Header not checked." + Header.Check + endif + + printlog "Checking if header text can be inserted" + if HeaderFixedText.exists = TRUE AND HeaderFixedText.isVisible = TRUE then + HeaderFixedText.settext "lalala" + sleep(1) + + if HeaderFixedText.gettext <> "lalala" then + warnlog " HeaderFixedText is wrong!" + else + printlog " HeaderFixedText works." + endif + else + warnlog " HeaderFixedText doesnt exist or is not visible!" + endif + + printlog "Checking if text is saved." + ApplyToAll.Click + ViewHeaderAndFooter + kontext + active.setpage TabHeaderFooterNotesHandout + kontext "TabHeaderFooterNotesHandout" + if HeaderFixedText.gettext <> "lalala" then + warnlog " HeaderFixedText does not get saved!" + else + printlog " HeaderFixedText gets saved." + endif + HeaderFixedText.SetText "" + + printlog "Checking Date And Time checkbox" + if DateTime.exists = TRUE AND DateTime.isVisible = TRUE then + DateTime.UnCheck + sleep(1) + DateTime.Check + sleep(1) + + if DateTime.isChecked then + printlog " DateAndTime-checkbox works." + else + warnlog " DateAndTime-checkbox doesnt work!" + endif + + else + warnlog " DateTime doesnt exist or is not visible!" + endif + + printlog "Checking if Date and Time setting is saved." + DateTime.Uncheck + ApplyToAll.Click + ViewHeaderAndFooter + kontext + active.setpage TabHeaderFooterNotesHandout + kontext "TabHeaderFooterNotesHandout" + + if DateTime.IsChecked then + warnlog " DateTime is not saved!" + else + printlog " DateTime gets saved." + endif + DateTime.Check + + printlog "Check DateTimeFixed can be checked/unchecked " + if DateTimeFixed.exists = TRUE AND DateTimeFixed.isVisible = TRUE then + + if DateTimeFixed.isChecked then + errorlog "DateTimeFixed shouldnt be checked at this point" + DateTimeVariable.check + sleep(1) + else + printlog " DateTimeFixed not checked." + endif + + if DateTimeFixed.isChecked then + warnlog " Datetimefixed-checkbox doesnt work!" + else + DateTimeFixed.check + if DateTimeFixed.isChecked then + printlog " Datetimefixed checkbox works." + else + warnlog " DateTimeFixed is not checked!" + endif + endif + else + warnlog " DateTimeFixed doesnt exist or is not visible!" + endif + + printlog "Can text be inserted in the fixed-field? " + if DateTimeFixedText.exists = TRUE AND DateTimeFixedText.isVisible = TRUE then + DateTimeFixedText.settext "lalala" + + if DateTimeFixedText.gettext <> "lalala" then + errorlog " Error with writing in the DateTimeFixedText-field!" + else + printlog " DateTimeFixedText works." + endif + + printlog "Checking if DateTimeFixedText gets saved." + ApplyToAll.Click + ViewHeaderAndFooter + kontext + active.setpage TabHeaderFooterNotesHandout + kontext "TabHeaderFooterNotesHandout" + + if DateTimeFixedText.GetText <> "lalala" then + warnlog " DateTimeFixedText does not get saved!" + else + printlog " DateTimeFixedText gets saved." + endif + + else + warnlog "DateTimeFixedText doesnt exist or is not visible" + endif + + printlog "Can it be changed to Variable and checked? " + if DateTimeVariable.exists = TRUE AND DateTimeVariable.isVisible = TRUE then + DateTimeVariable.Check + sleep(1) + + if DateTimeVariable.IsChecked AND DateTimeFixed.IsChecked = FALSE then + printlog " DateTimeVariable-checkbox works." + else + warnlog " Something wrong with the DateTimeVariable-checkbox or DateTimeFormat is checked!" + endif + + printlog "Checking if DateTimeVariable setting gets saved." + ApplyToAll.Click + ViewHeaderAndFooter + kontext + active.setpage TabHeaderFooterNotesHandout + kontext "TabHeaderFooterNotesHandout" + + if DateTimeVariable.IsChecked then + printlog " Variable setting gets saved." + else + warnlog " Variable setting does not get saved!" + endif + + else + warnlog " DateTimeVariable doesnt exist or is not visible" + endif + + printlog "Checking format dropdown box" + printlog "Get the number of choices " + numbervalue1 = DateTimeFormat.getitemcount + printlog " DateTimeFormat equals: " + numbervalue1 + printlog "Get the text for the choosen entry " + value2 = DateTimeFormat.getseltext + printlog " Tries to get ", numbervalue1 + + if DateTimeFormat.exists = TRUE AND DateTimeFormat.isVisible = TRUE then + printlog "Select the last entry " + DateTimeFormat.select ( numbervalue1 - 1 ) + printlog "Get the text for the last entry " + value3 = DateTimeFormat.getseltext + printlog " DateTimeFormat is: " + value3 + + if value2 = value3 then + printlog "Check if the first and last are the same. " + errorlog " More options for Date should exist." + printlog "Choose the original state " + DateTimeFormat.select value2 + else + printlog " DateTimeFormat works." + endif + + printlog "Checking if DateTimeFormat setting gets saved." + ApplyToAll.Click + ViewHeaderAndFooter + kontext + active.setpage TabHeaderFooterNotesHandout + kontext "TabHeaderFooterNotesHandout" + + if DateTimeFormat.GetSelText = value3 then + printlog " DateTimeFormat setting gets saved." + else + warnlog " DateTimeFormat setting does not get saved!" + endif + + else + warnlog "DateTimeFormat does not exist or is not visible." + endif + + if DateTimeLanguage.exists = TRUE AND DateTimeLanguage.isVisible = TRUE then + printlog "Get the number of choices " + numbervalue1 = DateTimeLanguage.getitemcount + printlog "Choose the first entry " + DateTimeFormat.select 1 + printlog "Get the text for the choosen entry " + value2 = DateTimeLanguage.getseltext + printlog "Select the last entry " + DateTimeLanguage.select ( numbervalue1 - 1 ) + printlog "Get the text for the last entry" + value3 = DateTimeLanguage.getseltext + + if value2 = value3 then + printlog "Check if the first and last are the same. " + errorlog " More options for Date should exist!" + else + printlog " Footer works." + endif + + printlog "Checking if DateTimeLanguage setting gets saved." + ApplyToAll.Click + ViewHeaderAndFooter + kontext + active.setpage TabHeaderFooterNotesHandout + kontext "TabHeaderFooterNotesHandout" + + if DateTimeLanguage.GetSelText = value3 then + printlog " DateTimeLanguage setting gets saved." + else + warnlog " DateTimeLanguage setting does not get saved!" + endif + else + warnlog " DateTimeLanguage does not exist!" + endif + + printlog "Checking Footer checkbox. " + if Footer.exists = TRUE AND Footer.isVisible = TRUE then + Footer.UnCheck + sleep(1) + else + warnlog " Footer does not exists!" + endif + + if Footer.IsChecked = TRUE then + warnlog "Footer should NOT be checked at this point" + else + Footer.Check + endif + + printlog "Check if Footer setting is saved." + Footer.Uncheck + ApplyToAll.Click + ViewHeaderAndFooter + kontext + active.setpage TabHeaderFooterNotesHandout + kontext "TabHeaderFooterNotesHandout" + + if Footer.IsChecked then + warnlog " Footer should not be checked!" + else + printlog " Footer is not checked." + endif + Footer.Check + + printlog "Checking if Footer text can be inserted" + if FooterFixedText.exists = TRUE AND FooterFixedText.isVisible = TRUE then + FooterFixedText.SetText "lalala" + sleep(1) + + if FooterFixedText.GetText <> "lalala" then + errorlog " Could'nt write a text to the FooterFixedText-field!" + else + printlog " FooterFixedText works." + endif + + else + warnlog " FooterFixedText does not exists!" + endif + + printlog "Checking if Footer text is saved." + ApplyToAll.Click + ViewHeaderAndFooter + kontext + active.setpage TabHeaderFooterNotesHandout + kontext "TabHeaderFooterNotesHandout" + + if FooterFixedText.GetText <> "lalala" then + warnlog " FooterFixedText does not get saved!" + else + printlog " FooterFixedText gets saved." + endif + + printlog "Checking Slidenumber checkbox" + if Slidenumber.exists = TRUE AND Slidenumber.isVisible = TRUE then + Slidenumber.UnCheck + sleep(1) + + if Slidenumber.IsChecked = TRUE then + warnlog " Slidenumber should NOT be checked at this point!" + else + Slidenumber.Check + endif + + printlog "Checking if Slidenumber setting is saved." + ApplyToAll.Click + ViewHeaderAndFooter + kontext + active.setpage TabHeaderFooterNotesHandout + kontext "TabHeaderFooterNotesHandout" + + if Slidenumber.IsChecked then + printlog " Slidenumber setting get saved." + else + warnlog " Slidenumber setting does not get saved!" + endif + + else + warnlog " Slidenumber does'nt exist or is not visible!" + endif + + printlog "Close dialog with cancel" + sleep 1 + TabHeaderFooterNotesHandout.Cancel + sleep 1 + kontext "drawimpress" + sleep 1 + + printlog "Close document " + Call hCloseDocument + +endcase 'tiHeaderFooterNotesHandout + +'-------------------------------------------------------------------------------
\ No newline at end of file diff --git a/testautomation/graphics/optional/includes/impress/i_pengine.inc b/testautomation/graphics/optional/includes/impress/i_pengine.inc new file mode 100644 index 000000000000..2374ff28f572 --- /dev/null +++ b/testautomation/graphics/optional/includes/impress/i_pengine.inc @@ -0,0 +1,758 @@ +'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@oracle.com +'* +'* short description : Tests the shaddow-function on a picture +'* +'******************************************************************* +'* +' #1 tiPenginefast +'* +'\******************************************************************* + +testcase tiPenginefast + ' dim i,t,q as integer + ' dim e as string + dim sFileName as string + + printlog "the Presentation-Engine consists of showing the presentation, with all it's effects." + printlog "Create a new presentation." + Call hNewDocument + sleep 1 + + printlog "Open the test-file." + Call hDateiOeffnen (gTesttoolpath + "graphics\required\input\allshapes.odp") + + printlog "Start the slideshow." + CALL hTypeKeys "<F5>" + sleep (5) + kontext "DocumentPresentation" + DocumentPresentation.TypeKeys "<SPACE>" + printlog "Wait for the presentation to reach a certain moment." + sleep (10) + DocumentPresentation.TypeKeys "<SPACE>" + sleep (7) + DocumentPresentation.TypeKeys "<SPACE>" + sleep (7) + DocumentPresentation.TypeKeys "<SPACE>" + sleep (7) + printlog "Press "Space" again, to continue with slide two." + DocumentPresentation.TypeKeys "<SPACE>" + sleep (7) + DocumentPresentation.TypeKeys "<SPACE>" + sleep (7) + DocumentPresentation.TypeKeys "<SPACE>" + sleep (7) + DocumentPresentation.TypeKeys "<SPACE>" + sleep (7) + printlog "And press "Space" again, to exit the presentation-mode." + DocumentPresentation.TypeKeys "<SPACE>" + FileClose + + Call hNewDocument + sleep 1 + printlog "Open the test-file." + Call hDateiOeffnen (gTesttoolpath + "graphics\required\input\effects.odp") + printlog "Start the slideshow." + CALL hTypeKeys "<F5>" + sleep (200) + printlog "Press Space again, to continue with slide two." + kontext "DocumentPresentation" + DocumentPresentation.TypeKeys "<SPACE>" + sleep (40) + printlog "End of first page." + DocumentPresentation.TypeKeys "<SPACE>" + sleep (12) + printlog "End of second page." + DocumentPresentation.TypeKeys "<SPACE>" + sleep (25) + printlog "End of third page." + DocumentPresentation.TypeKeys "<SPACE>" + sleep (15) + printlog "End of fourth page." + DocumentPresentation.TypeKeys "<SPACE>" + sleep (2) + printlog "End of fifth page." + DocumentPresentation.TypeKeys "<SPACE>" + printlog "End of sixth page." + DocumentPresentation.TypeKeys "<SPACE>" + sleep (5) + printlog "End of seventh page." + DocumentPresentation.TypeKeys "<SPACE>" + sleep (1) + printlog "End of eight page." + DocumentPresentation.TypeKeys "<SPACE>" + sleep (1) + printlog "End of ninth page." + DocumentPresentation.TypeKeys "<SPACE>" + sleep (1) + printlog "End of tenth page." + DocumentPresentation.TypeKeys "<SPACE>" + sleep (7) + printlog "End of eleventh page." + if DocumentPresentation.Exists then + warnlog "DocumentPresentation shouldnt be visible right now." + DocumentPresentation.TypeKeys "<SPACE>" + else + printlog "Presentation ended correctly." + kontext "DocumentImpress" + end if + + printlog "Insert a new slide." + ' InsertSlide + ' sleep 2 + ' hTypekeys "<Pagedown>" + ' sleep 2 + + printlog "Menu: Slideshow: Check every menu-item." + + 'Exists: + ' #1 tSlideShowSlideShow + ' #1 tSlideShowRehearseTimings + ' #1 tSlideShowSlideShowSettings + ' #1 tSlideShowCustomSlideShow + ' #1 tSlideShowSlideTransition + ' #1 tSlideShowShowHideSlide + + ' Slideshow menu 1 - Slide show + ' Slideshow menu 2 - Slide show settings + ' Slideshow menu 3 - Rehearse timings + ' Slideshow menu 4 - Interaction + ' Slideshow menu 6 - Slide Transition + ' Slideshow menu 7 - Show / Hide slide + ' Slideshow menu 8 - Custom Slide show + + + 'Printlog " Here starts the test " + + 'Presentation - Start / Stop. Different ways to do it. + 'Presentation - Effects. + 'LeftWindow + + printlog "Slideshow Settings: Range: test all three alternatives." + printlog "Test if the Slideshow-types (Default, Window, Auto) works." + printlog "Check if the checkboxes works." + printlog "Close dialogue." + printlog "Add an object." + printlog "Custom Animation: Add an Animation to the object." + printlog "Run the slideshow." + + printlog "Change to the next effect and continue through every animation in" + printlog "Entrance, Emphasis, Exit and Motion Paths." + printlog "While testing - test the speed-choices for every kind of animation." + printlog "Check if the "Change" and "Remove"-buttons." + printlog "Check the Start, "Direction" and "Speed" variables." + printlog "Add two effects to one object and change the order." + printlog "Try the Play and "Slide Show"-button." + printlog "Try the Automatic preview-button." + + printlog "Slidetransition." + printlog "Go through every kind of effect, speed, and sound." + printlog "Check loop until next sound." + printlog "Check the Advance slide with mouseclick-function." + printlog "Check the "Apply to all slides", "Play", and "Slide Show"-buttons." + printlog "Check Automatic preview." + + printlog "Some effects doesnt have a right / left orientation. Test these." + printlog "Possibility: check random effects and see if something hangs." + + printlog "Load/Save-test: Does the settings last?" + + printlog "Are two different objects dependant or independent from each other?" + + printlog "Close Application" + Call hCloseDocument + Printlog "Finished Optional-test for Presentation-Engine" +endcase 'tiPenginefast + +'------------------------------------------------------------------------------- + +testcase tSlideShowInteraction + Dim Datei$ + Dim i as integer + Dim Zaehler as integer + dim b115364 as boolean + + Datei$ =ConvertPath (gOfficePath + "user\work\interac.sxi") + +' printlog "save file as presentation with name '"user\\work\\diashow.sxi")'" +' hFileSaveAsWithFilterKill ( sFile , gImpressFilter, FALSE ) +' Printlog "saved presetation: '" + sFile + "'" + + printlog "open application" + Call hNewDocument + sleep 5 + setStartCurrentPage(FALSE) printlog "Set "start with current page to OFF" + + printlog "call 'Insert->Slide' three times and name the slides 2, 3, 4 and create a rectangle on it " + for i = 2 to 4 + InsertSlide + sleep 2 + hTypekeys "<Pagedown>" + sleep 2 + Call hRechteckErstellen (i*10,i*10,i*20,i*20) + sleep 2 + next i + + printlog "check state of navigator ! expected: closed -> open navigator" + Kontext "Navigator" + if Navigator.exists then + warnlog "Navigator: already open :-(" + else + printlog "Navigator: NOT available :-( will be opened now!" + ViewNavigator + endif + sleep 3 + + printlog "Slide Show->Interaction" + SlideShowInteraction + Kontext "TabInteraktion" + sleep 1 + if AktionBeiMausklick.GetItemCount = 13 Then + Printlog "- List is complete" + else + Warnlog "- Number of possible actions is wrong. It should be: 13, but it is: " + AktionBeiMausklick.GetItemCount + end if + sleep 1 + + AktionBeiMausklick.Select 1 'Keine Aktion bei Mausclick + Printlog (AktionBeiMausklick.GetSelText + " chosen") + If Durchsuchen.IsVisible then Warnlog "- Control should be invisible because AktionBeiMausklick = " + AktionBeiMausKlick.GetSelText + sleep 1 + + Kontext "TabInteraktion" + AktionBeiMausklick.Select 2 'Sprung zur vorhergehenden Seite + Printlog (AktionBeiMausklick.GetSelText + " chosen") + if Durchsuchen.IsVisible Then Warnlog "- Control should be invisible, beacause Action = " + AktionBeiMausKlick.GetSelText + TabInteraktion.OK + sleep 2 + Kontext "DocumentImpress" + gMouseClick 90,90 + sleep 1 + gMouseClick 50,50 + sleep 2 + + Kontext "NavigatorDraw" + sleep 2 + if Not Liste.GetSelIndex = 3 Then + Warnlog "- jumped to wrong slide" + else + Printlog "- jumped to correct slide" + end if + sleep 1 + + Kontext "DocumentImpress" + EditSelectAll + sleep 1 + + SlideShowInteraction + sleep 2 + Kontext "TabInteraktion" + AktionBeiMausklick.select 3 'Sprung zur naechsten Seite + Printlog (AktionBeiMausKlick.GetSelText + " chosen") + TabInteraktion.OK + sleep 1 + + Kontext "DocumentImpress" + gMouseClick 90,90 + sleep 2 + gMouseClick 50,50 + Kontext "NavigatorDraw" + if Liste.GetSelIndex <> 4 Then + Warnlog "- Jumped to wrong slide" + else + Printlog " Jumped to correct slide" + end if + sleep 1 + kontext "DocumentImpress" + EditSelectAll + sleep 1 + + SlideShowInteraction + sleep 1 + Kontext "TabInteraktion" + AktionBeiMausklick.select 4 'Sprung zur ersten Seite + Printlog AktionBeiMausKlick.GetSelText + sleep 1 + TabInteraktion.OK + sleep 1 + Kontext "DocumentImpress" + gMouseClick 90,90 + gMouseClick 50,50 + Kontext "NavigatorDraw" + if Liste.GetSelIndex <> 1 Then Warnlog "- jumped to wrong slide" + Letzte.Click 'Liste.Select 4 + Kontext "DocumentImpress" + EditSelectAll + sleep 2 + + try + SlideShowInteraction + catch + warnlog "SlideshowInteraction diasabled :-(" + endcatch + Kontext "TabInteraktion" + AktionBeiMausklick.select 5 'Sprung zur letzten Seite + printlog AktionBeiMausKlick.GetSelText + TabInteraktion.OK + sleep 1 + Kontext "NavigatorDraw" + if Not Liste.GetSelIndex = 1 Then Warnlog "- jumped to wrong slide" + + kontext "DocumentImpress" + Call hRechteckErstellen 20,20,50,50 + sleep 1 + EditSelectAll + sleep 1 + try + FormatGroupGroup + catch + warnlog "GROUP?" + endcatch + sleep 1 + + SlideShowInteraction + Kontext "TabInteraktion" + AktionBeiMausklick.select 6 'Sprung zu Seite oder Objekt + printlog AktionBeiMausKlick.GetSelText + sleep 2 + if Not ListeSprungZuSeiteObjekt.IsVisible Then Warnlog " list seems to be invisible" + Seite.SetText S2 + Suchen.Click + if ListeSprungZuSeiteObjekt.GetSelIndex <> 3 Then Warnlog " Search does not work" + printlog ListeSprungZuSeiteObjekt.GetSelIndex + TabInteraktion.OK + sleep 1 + + Kontext "DocumentImpress" + gMouseClick 90,90 + gMouseClick 25,25, + sleep 2 + Kontext "NavigatorDraw" + if Liste.GetSelIndex <> 2 Then Warnlog "- Jumped to wrong destination" + printlog Liste.GetSelIndex + Liste.Select 4 + Kontext "DocumentImpress" + EditSelectAll + sleep 1 + + Kontext "DocumentImpress" + EditSelectAll + sleep 1 + SlideShowInteraction + Kontext "TabInteraktion" + sleep 1 + AktionBeiMausKlick.Select 7 'Sprung zu Dokument + Printlog AktionBeiMausKlick.GetSelText + " chosen" + try + Durchsuchen.Click + sleep 1 + Kontext "OeffnenDlg" + sleep 1 + Dateiname.SetText ConvertPath (gTesttoolPath + "graphics\required\input\recht_49.sxi") + Oeffnen.Click + sleep 10 + ' check if the document is writable + if fIsDocumentWritable = false then + ' 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 + catch + Warnlog "- Search button could not be accessed" + endcatch + sleep 1 + Kontext "TabInteraktion" + sleep 1 + TabInteraktion.OK + sleep 3 + Kontext "DocumentImpress" + DocumentImpress.MouseDown 90,90 + DocumentImpress.MouseUp 90,90 + sleep 2 + Kontext "DocumentImpress" + DocumentImpress.Mousedown 30,30 + kontext + b115364 = false + if messagebox.exists then + printlog "baeh: '" + messagebox.gettext + "'" + try + messagebox.ok ' was default in so7 + catch + warnlog "behaviour changed #115364# mother document gets closed :-(" + if fileExists(ConvertPath (gOfficePath + "user\work\bug115364.sxi")) then + kill ConvertPath (gOfficePath + "user\work\bug115364.sxi") + endif + messagebox.yes ' don't save changes, before going on! + b115364 = true + kontext "SpeichernDlg" + Dateiname.setText ConvertPath (gOfficePath + "user\work\bug115364.sxi") + Speichern.click + sleep 10 + endcatch + else + printlog "OK :-)" + endif + Kontext "DocumentImpress" + DocumentImpress.MouseUp 30,30 + + try + ViewDrawing + sleep 1 + Kontext "DocumentImpress" + DocumentImpress.MouseDown 25,25 + DocumentImpress.MouseUp 25,25 + catch + Warnlog "- Jump to document did not work or preview window did not appear" + endcatch + sleep 2 + if (not b115364) then + Call hCloseDocument + else + Call hCloseDocument + hDateiOeffnen (ConvertPath (gOfficePath + "user\work\bug115364.sxi")) + endif + sleep 5 + + Kontext "NavigatorDraw" + sleep 1 + Naechste.click + + Kontext "DocumentImpress" + EditSelectAll + sleep 1 + + SlideShowInteraction + Kontext "TabInteraktion" + sleep 1 + AktionBeiMausKlick.Select 9 + Printlog AktionBeiMausKlick.GetSelText + " chosen" + sleep 1 + Tabinteraktion.OK + sleep 2 + + SlideShowInteraction + Kontext "TabInteraktion" + sleep 1 + if not AktionBeiMausKlick.GetSelIndex = 9 Then Warnlog "- Not the right action chosen" + sleep 1 + AktionBeiMausKlick.Select 9 'Klang abspielen + Printlog AktionBeiMausKlick.GetSelText + "- chosen" + sleep 1 + Tabinteraktion.OK + sleep 2 + Kontext "NavigatorDraw" + sleep 1 + Liste.Select 2 + Kontext "DocumentImpress" + EditSelectAll + sleep 1 + SlideShowInteraction + Kontext "TabInteraktion" + sleep 1 + Durchsuchen.Click + sleep 1 + Kontext "OeffnenDlg" + sleep 1 + Dateiname.SetText ConvertPath (gTesttoolPath + "graphics\required\input\blip.wav") + sleep 1 + Oeffnen.Click + sleep 1 + Kontext "Active" + if Active.Exists Then + Warnlog Active.GetText + " Gallery might be empty" + Active.OK + sleep 1 + Kontext "OeffnenDlg" + OeffnenDlg.Cancel + sleep 1 + end if + Kontext "TabInteraktion" + SetClipboard Klangwahl.GetText + TabInteraktion.OK + sleep 1 + SlideShowInteraction + Kontext "TabInteraktion" + sleep 1 + if Klangwahl.GetText <> GetClipboardText then Warnlog "- Not the right sound chosen" + TabInteraktion.OK + sleep 1 + InsertGraphicsFromFile + sleep 1 + Kontext "GrafikeinfuegenDlg" + sleep 1 + if Verknuepfen.IsChecked then Verknuepfen.UnCheck + Dateiname.SetText ConvertPath (gTesttoolPath + "global\input\graf_inp\enter.bmp") + Oeffnen.Click + sleep 3 + Kontext "NavigatorDraw" + sleep 1 + Liste.Select 4 + sleep 1 + SlideShowInteraction + Kontext "TabInteraktion" + sleep 1 + AktionBeiMausKlick.Select 11 'Objektaktion ausfuehren + Printlog AktionBeiMausKlick.GetSelText + " chosen" + sleep 1 + Zaehler=Effekt.GetItemCount + for i=1 to Zaehler + Effekt.Select i + Printlog Effekt.GetSelText + " chosen" + if i=1 Then + if Langsam.IsEnabled Then Warnlog "- Control should not be enabled, because no effect chosen" + if Mittel.IsEnabled Then Warnlog "- Control should not be enabled, because no effect chosen" + if Schnell.IsEnabled Then Warnlog "- Control should not be enabled, because no effect chosen" + end if + sleep 1 + + TabInteraktion.OK + sleep 1 + SlideShowInteraction + Kontext "TabInteraktion" + sleep 1 + next i + TabInteraktion.OK + sleep 1 + SlideShowInteraction + Kontext "TabInteraktion" + sleep 1 + AktionBeiMausKlick.Select 10 'Objekt ausblenden + Printlog AktionBeiMausKlick.GetSelText + " chosen" + ListeObjektAktion.Select 1 + sleep 1 + TabInteraktion.OK + sleep 1 + gMouseClick 90,90 + sleep 1 + gMouseClick 55,55 + sleep 1 + Kontext "DocumentImage" + + SlideShowInteraction + Kontext "TabInteraktion" + sleep 1 + AktionBeiMausKlick.Select 13 'Makro + Printlog AktionBeiMausKlick.GetSelText + " chosen" + sleep 2 + Durchsuchen.Click + sleep 5 + Kontext "Makro" + sleep 5 + Makro.Cancel + sleep 2 + Kontext "TabInteraktion" + sleep 1 + TabInteraktion.OK + sleep 3 + + SlideShowInteraction + Kontext "TabInteraktion" + sleep 2 + if not AktionBeiMausKlick.GetSelIndex = 12 Then Warnlog "- Wrong action used" + sleep 1 + AktionBeiMausKlick.Select 14 'Praesentation beenden + Printlog AktionBeiMausKlick.GetSelText + Tabinteraktion.OK + sleep 1 + + SlideShowPresentationSettings + Kontext "Bildschirmpraesentation" + if not Fenster.IsChecked Then Fenster.Check + BildschirmPraesentation.OK + sleep 2 + Kontext "DocumentImpress" + DocumentImpress.TypeKeys "<MOD1 F2>" + sleep 5 + Kontext "DocumentPresentation" + sleep 2 + DocumentPresentation.MouseDown 50,50 + DocumentPresentation.MouseUp 50,50 + sleep 5 + try + Kontext "DocumentImpress" + EditSelectAll + Printlog "- Slideshow ended at right point" + catch + Warnlog "- Program is still in slideshow mode" + Kontext "DocumentPresentation" + DocumentPresentation.TypeKeys "<ESCAPE>" + endcatch + + Kontext "DocumentImpress" + DocumentImpress.TypeKeys "<SHIFT MOD1 F5>" + sleep 3 + setStartCurrentPage(TRUE) printlog "Set "start with current page to ON = Default" + Call hCloseDocument +endcase 'tSlideShowInteraction + +'------------------------------------------------------------------------------- + +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...'" + 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(2) + else + bError = true + warnlog "Impress:Tasks Pane:Custom Animation:TabMotionPaths tabPage doesn't work." + endif + 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 + 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
\ No newline at end of file diff --git a/testautomation/graphics/optional/includes/impress/i_pengine1.inc b/testautomation/graphics/optional/includes/impress/i_pengine1.inc new file mode 100644 index 000000000000..ff4d2a035ef0 --- /dev/null +++ b/testautomation/graphics/optional/includes/impress/i_pengine1.inc @@ -0,0 +1,1360 @@ +'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@oracle.com +'* +'* short description : Tests the Engine for Presentation +'* +'******************************************************************* + +testcase tiPengineTabEntrance + + dim bError as boolean + dim e as integer + dim d as integer + dim i as integer + dim l as integer + dim o as integer + dim p as integer + dim q as integer + dim s as integer + dim t as integer + dim u as integer + dim w as integer + dim Effectname1 as string + dim StartName1 as string + dim PropertyName1 as string + dim UsedEffect as string + dim NewEffect as string + + printlog "open application" + Call hNewDocument + printlog "create textbox with text" + Call hTextrahmenErstellen ("Test text to test text effects", 35, 35, 70, 70 ) + printlog "Slide Show->Custom Animation..." + SlideShowCustomAnimation + Kontext "Tasks" + printlog "click button 'Add...'" + 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) + AutomaticPreview.UnCheck + Printlog "Testing effects in - TabEntrance" + i = Effects.GetItemCount + For o = 1 to 1'2 + p = 7555 + Effects.TypeKeys "<HOME>" + For e = 1 to i + sleep 1 + Printlog "Effect Nr: " + (Effects.GetSelIndex -1) + ". Name: " + Effects.GetSelText + Effectname1 = Effects.GetSelText + NewEffect = Effectname1 + + if UsedEffect = NewEffect then + Warnlog "Wrong effect? The recently tested Effect was: " + Effects.GetSelIndex + ": " + UsedEffect + " and the new one: " + Effects.GetSelIndex + ": " + NewEffect + endif + UsedEffect = NewEffect + + if AutomaticPreview.IsChecked = TRUE then sleep 1 + d = Effects.GetSelIndex + TabEntrance.Ok + Kontext "Tasks" + if EffectStart.isEnabled then + t = EffectStart.GetItemCount + for u = 1 to 1't + EffectStart.Select u + printlog "EffectStart selected " + EffectStart.GetSelText + StartName1 = EffectStart.GetSelText + if EffectProperty.Exists then + if EffectProperty.isEnabled then + if EffectProperty.isVisible then + printlog "EffectProperty.!" + w = EffectProperty.GetItemCount + if w > 0 then + for l = 1 to w + EffectProperty.Select l + sleep 1 + PropertyName1 = EffectProperty.GetSelText + printlog "Properties for the effect: " + PropertyName1 +' EffectSlideShow.Click +' Sleep (2) +' kontext "DocumentPresentation" +' if DocumentPresentation.Exists (15) then +' DocumentPresentation.TypeKeys "<Space>" +' if DocumentPresentation.Exists (15) then +' DocumentPresentation.TypeKeys "<Space>" +' endif +' Sleep (3) +' if DocumentPresentation.Exists (15) then +' DocumentPresentation.TypeKeys "<Escape>" +' endif +' else +' Warnlog "Effect: " + Effectname1 + " didn't work when it started with: " + StartName1 + "and ended with: " + PropertyName1 +' endif +' sleep (2) + Kontext "Tasks" + Next l + endif + endif '1 + endif '2 + elseif EffectDirection.Exists then + if EffectDirection.isEnabled then + if EffectDirection.isVisible then + w = EffectDirection.GetItemCount + if w > 0 then + for l = 1 to 1'w + EffectDirection.Select l + PropertyName1 = EffectDirection.GetSelText + printlog "Properties for the effect: " + PropertyName1 + sleep (5) +' EffectSlideShow.Click +' Sleep (2) +' kontext "DocumentPresentation" +' if DocumentPresentation.Exists (15) then +' DocumentPresentation.TypeKeys "<Space>" +' if DocumentPresentation.Exists (15) then +' DocumentPresentation.TypeKeys "<Space>" +' endif +' Sleep (3) +' if DocumentPresentation.Exists (15) then +' DocumentPresentation.TypeKeys "<Escape>" +' endif +' else +' warnlog "Effect: " + Effectname1 + " didn't work when it started with: " + StartName1 + "and ended with: " + PropertyName1 +' endif + Kontext "Tasks" + sleep (2) + Next l + else + warnlog "EffectDirection.isEnabled AND EffectDirection.isVisible, but no items selectable? Effect was: " + Effectname1 + endif + endif '1 + endif '2 + endif '3 + kontext "EffectProperty" + Next u + Endif + + Kontext "Tasks" + if Tasks.Exists then + EffectChange.Click + else + Printlog "Presentation didn't end. Error?" + endif + kontext "TabEntrance" + printlog "Select the next entry" + Effects.TypeKeys "<DOWN>", e + p = Effects.GetSelIndex + If p = d Then e = i + Next e + kontext "TabEntrance" + + e = 0 + if Speed.GetItemCount = 0 then + warnlog " 'Speed' has 0 entries. Check it." + else + do while (e < 1) + e = Int(Speed.GetItemCount * Rnd) + loop + try + Speed.Select (e) + catch + qaerrorlog "#i89498, Custom animation speed field is greyed out" + endcatch + endif + Printlog "Test of Entrance-list ended." + Next o + kontext + + printlog "Switch to TabPage: Entrance" + active.setPage(TabEntrance) + kontext "TabEntrance" + if TabEntrance.exists(5) then + Effects.Select 4 + printlog "Close dialog 'Custom Animation' with 'OK'" + TabEntrance.OK + else + warnlog "Error when switching Tab" + endif + bError = false + else + bError = true + warnlog "Impress:Tasks Pane:Custom Animation:Add... button didnt work." + endif + kontext "Tasks" + EffectAutomaticPreview.Check + printlog "click button 'Remove'" + EffectRemove.Click + printlog "close application" + Call hCloseDocument +endcase 'tiPengineTabEntrance + +'------------------------------------------------------------------------------- + +testcase tiPengineTabEmphasis + + dim bError as boolean + dim e as integer + dim d as integer + dim i as integer + dim l as integer + dim o as integer + dim p as integer + dim q as integer + dim s as integer + dim t as integer + dim u as integer + dim w as integer + dim Effectname1 as string + dim StartName1 as string + dim PropertyName1 as string + dim UsedEffect as string + dim NewEffect as string + + printlog "open application" + Call hNewDocument + printlog "create textbox with text" + Call hTextrahmenErstellen ("Test text to test text effects", 35, 35, 70, 70 ) + printlog "Slide Show->Custom Animation..." + SlideShowCustomAnimation + Kontext "Tasks" + printlog "click button 'Add...'" + EffectAdd.click + printlog "Dialog 'Custom Animation' comes up" + kontext + + printlog "Switch to TabPage: Emphasis" + kontext + active.setPage(TabEmphasis) + kontext "TabEmphasis" + if TabEmphasis.exists(10) then + Printlog "Testing effects in - TabEmphasis" + i = Effects.GetItemCount + For o = 1 to 2 + p = 7555 + Effects.TypeKeys "<HOME>" + For e = 1 to 1'i + sleep 2 + Printlog "Effect Nr: " + (Effects.GetSelIndex -1) + ". Name: " + Effects.GetSelText + Effectname1 = Effects.GetSelText + if AutomaticPreview.IsChecked = TRUE then sleep 1 + d = Effects.GetSelIndex + TabEmphasis.Ok + Kontext "Tasks" + if EffectStart.isEnabled then + t = EffectStart.GetItemCount + for u = 1 to t + EffectStart.Select u + StartName1 = EffectStart.GetSelText + printlog "EffectStart selected " + StartName1 + + if EffectProperty.Exists then + if EffectProperty.isEnabled then + if EffectProperty.isVisible then + w = EffectProperty.GetItemCount + if w > 0 then + for l = 1 to 1'w + EffectProperty.Select l + PropertyName1 = EffectProperty.GetSelText + printlog "Properties for the effect: " + PropertyName1 + sleep 1 +' EffectSlideShow.Click +' Sleep (2) +' kontext "DocumentPresentation" +' if DocumentPresentation.Exists (15) then +' DocumentPresentation.TypeKeys "<Space>" +' if DocumentPresentation.Exists (15) then +' DocumentPresentation.TypeKeys "<Space>" +' endif +' Sleep (3) +' if DocumentPresentation.Exists (15) then +' DocumentPresentation.TypeKeys "<Escape>" +' endif +' else +' Warnlog "Effect: " + Effectname1 + " didn't work when it started with: " + StartName1 + "and ended with: " + PropertyName1 +' endif +' sleep (2) + Kontext "Tasks" + Next l + endif + Else + Printlog "No effect properties for " + StartName1 + sleep 1 +' EffectSlideShow.Click +' Sleep (2) +' kontext "DocumentPresentation" +' if DocumentPresentation.Exists (15) then +' DocumentPresentation.TypeKeys "<Space>" +' if DocumentPresentation.Exists (15) then +' DocumentPresentation.TypeKeys "<Space>" +' endif +' Sleep (3) +' if DocumentPresentation.Exists (15) then +' DocumentPresentation.TypeKeys "<Escape>" +' endif +' else +' Warnlog "Effect: " + Effectname1 + " didn't work when it started with: " + StartName1 +' endif +' sleep (2) + Kontext "Tasks" + Endif + endif + endif + Next u + Endif + Kontext "Tasks" + if Tasks.Exists then + EffectChange.Click + else + Printlog "Presentation didn't end. Error?" + endif + printlog "Switch to TabPage: Emphasis" + kontext + active.setPage(TabEmphasis) + kontext "TabEmphasis" + printlog "Select the next entry" + Effects.TypeKeys "<DOWN>", e + 1 + p = Effects.GetSelIndex + If p = d Then e = i + Next e + kontext "TabEmphasis" + + e = 0 + if Speed.GetItemCount = 0 then + warnlog " 'Speed' has 0 entries. Check it." + else + do while (e < 1) + e = Int(Speed.GetItemCount * Rnd) + loop + Speed.Select (e) + endif + + Printlog "Test of Entrance-list ended." + Next o + else + bError = true + warnlog "Impress:Tasks Pane:Custom Animation:TabExit tabPage doesnt work." + endif + kontext + + printlog "Switch to TabPage: Entrance" + active.setPage(TabEntrance) + kontext "TabEntrance" + if TabEntrance.exists(5) then + Effects.Select 4 + printlog "Close dialog 'Custom Animation' with 'OK'" + TabEntrance.OK + else + warnlog "Error when switching Tab" + endif + bError = false + kontext "Tasks" + EffectAutomaticPreview.Check + printlog "click button 'Remove'" + EffectRemove.Click + printlog "close application" + Call hCloseDocument +endcase 'tiPengineTabEmphasis + +'------------------------------------------------------------------------------- + +testcase tiPengineTabExit + + dim bError as boolean + dim e as integer + dim d as integer + dim i as integer + dim l as integer + dim o as integer + dim p as integer + dim q as integer + dim s as integer + dim t as integer + dim u as integer + dim w as integer + dim Effectname1 as string + dim StartName1 as string + dim PropertyName1 as string + dim UsedEffect as string + dim NewEffect as string + + printlog "open application" + Call hNewDocument + printlog "create textbox with text" + Call hTextrahmenErstellen ("Test text to test text effects", 35, 35, 70, 70 ) + printlog "Slide Show->Custom Animation..." + SlideShowCustomAnimation + Kontext "Tasks" + printlog "click button 'Add...'" + EffectAdd.click + printlog "Dialog 'Custom Animation' comes up" + kontext + + printlog "Switch to TabPage: Exit" + active.setPage(TabExit) + kontext "TabExit" + if TabExit.exists(5) then + Printlog "Testing effects in - TabExit" + i = Effects.GetItemCount + For o = 1 to 2 + p = 7555 + Effects.TypeKeys "<HOME>" + For e = 1 to 1'i + sleep 1 + Printlog "Effect Nr: " + (Effects.GetSelIndex -1) + ". Name: " + Effects.GetSelText + Effectname1 = Effects.GetSelText + if AutomaticPreview.IsChecked = TRUE then sleep 1 + d = Effects.GetSelIndex + TabExit.Ok + Kontext "Tasks" + + if EffectStart.isEnabled then + t = EffectStart.GetItemCount + for u = 1 to 1't + EffectStart.Select u + StartName1 = EffectStart.GetSelText + printlog "EffectStart selected " + StartName1 + + if EffectProperty.isEnabled then + if EffectProperty.isVisible then + if EffectProperty.isVisible then + w = EffectProperty.GetItemCount + if w > 0 then + for l = 1 to 1'w + EffectProperty.Select l + PropertyName1 = EffectProperty.GetSelText + printlog "Properties for the effect: " + PropertyName1 + sleep 1 +' EffectSlideShow.Click +' Sleep 2 +' kontext "DocumentPresentation" +' if DocumentPresentation.Exists (5) then +' DocumentPresentation.TypeKeys "<Space>" +' if DocumentPresentation.Exists (15) then +' DocumentPresentation.TypeKeys "<Space>" +' endif +' if DocumentPresentation.Exists (15) then +' DocumentPresentation.TypeKeys "<Escape>" +' endif +' else +' Warnlog "Effect: " + Effectname1 + " didn't work when it started with: " + StartName1 + "and ended with: " + PropertyName1 +' endif +' sleep (2) + Kontext "Tasks" + Next l + endif + Else +' Printlog "No effect properties for " + StartName1 + sleep 1 +' EffectSlideShow.Click +' Sleep 2 +' kontext "DocumentPresentation" +' if DocumentPresentation.Exists (5) then +' DocumentPresentation.TypeKeys "<Space>" +' Sleep 2 +' DocumentPresentation.TypeKeys "<Space>" +' DocumentPresentation.TypeKeys "<Escape>" +' else +' Warnlog "Effect: " + Effectname1 + " didn't work when it started with: " + StartName1 +' endif +' sleep (2) + Kontext "Tasks" + Endif + Endif + Endif + Next u + Endif + + Kontext "Tasks" + if Tasks.Exists then + EffectChange.Click + else + Printlog "Presentation didn't end. Error?" + endif + kontext + printlog "Switch to TabPage: Exit" + active.setPage(TabExit) + kontext "TabExit" + printlog "Select the next entry" + Effects.TypeKeys "<DOWN>", e + 1 + p = Effects.GetSelIndex + If p = d Then e = i 'p > 2 AND + Next e + randomize + + kontext "TabExit" + Speed.Typekeys "<DOWN>", (Int(Speed.GetItemCount * Rnd) + 1) + Printlog "Test of Entrance-list ended." + Next o + bError = false + else + bError = true + warnlog "Impress:Tasks Pane:Custom Animation:TabExit tabPage doesnt work." + endif + kontext + + printlog "Switch to TabPage: Entrance" + active.setPage(TabEntrance) + kontext "TabEntrance" + if TabEntrance.exists(5) then + Effects.Select 4 + printlog "Close dialog 'Custom Animation' with 'OK'" + TabEntrance.OK + else + warnlog "Error when switching Tab" + endif + bError = false + kontext "Tasks" + EffectAutomaticPreview.Check + printlog "click button 'Remove'" + EffectRemove.Click + printlog "close application" + Call hCloseDocument + +endcase 'tiPengineTabExit + +'------------------------------------------------------------------------------- + +testcase tiPengineTabMotionPaths + + dim bError as boolean + dim e as integer + dim d as integer + dim i as integer + dim l as integer + dim o as integer + dim p as integer + dim q as integer + dim s as integer + dim t as integer + dim u as integer + dim w as integer + dim Effectname1 as string + dim StartName1 as string + dim PropertyName1 as string + dim UsedEffect as string + dim NewEffect as string + + printlog "open application" + Call hNewDocument + printlog "create textbox with text" + Call hTextrahmenErstellen ("Test text to test text effects", 35, 35, 70, 70 ) + printlog "Slide Show->Custom Animation..." + SlideShowCustomAnimation + Kontext "Tasks" + printlog "click button 'Add...'" + EffectAdd.click + printlog "Dialog 'Custom Animation' comes up" + kontext + + printlog "Switch to TabPage: Motion Paths" + active.setPage(TabMotionPaths) + kontext "TabMotionPaths" + if TabMotionPaths.exists(5) then + Printlog "Testing effects in - TabMotionPaths" + i = Effects.GetItemCount + For o = 1 to 1'2 + p = 7555 + Effects.TypeKeys "<DOWN>",4 + For e = 1 to 1'i + sleep 1 + Printlog "Effect Nr: " + (Effects.GetSelIndex -1) + ". Name: " + Effects.GetSelText + Effectname1 = Effects.GetSelText + if AutomaticPreview.IsChecked = TRUE then sleep 1 + d = Effects.GetSelIndex + TabMotionPaths.Ok + Kontext "Tasks" + + if EffectStart.isEnabled then + t = EffectStart.GetItemCount + for u = 1 to 1 't + EffectStart.Select u + StartName1 = EffectStart.GetSelText + printlog "EffectStart selected " + StartName1 + if EffectProperty.isEnabled then + if EffectProperty.isVisible then + if EffectProperty.isVisible then + w = EffectProperty.GetItemCount + if w > 0 then + for l = 1 to 1'w + EffectProperty.Select l + PropertyName1 = EffectProperty.GetSelText + sleep 1 + printlog "Properties for the effect: " + PropertyName1 +' EffectSlideShow.Click +' Sleep (2) +' kontext "DocumentPresentation" +' if DocumentPresentation.Exists (15) then +' DocumentPresentation.TypeKeys "<Space>" +' Sleep (2) +' if DocumentPresentation.Exists (15) then +' DocumentPresentation.TypeKeys "<Space>" +' endif +' if DocumentPresentation.Exists (15) then +' DocumentPresentation.TypeKeys "<Escape>" +' endif +' else +' Warnlog "Effect: " + Effectname1 + " didn't work when it started with: " + StartName1 + "and ended with: " + PropertyName1 +' endif +' sleep (2) + Kontext "Tasks" + Next l + endif + Else +' Printlog "No effect properties for " + StartName1 + sleep 1 +' EffectSlideShow.Click +' Sleep (2) +' kontext "DocumentPresentation" +' if DocumentPresentation.Exists (15) then +' DocumentPresentation.TypeKeys "<Space>" +' Sleep (2) +' if DocumentPresentation.Exists (15) then +' DocumentPresentation.TypeKeys "<Space>" +' endif +' if DocumentPresentation.Exists (15) then +' DocumentPresentation.TypeKeys "<Escape>" +' endif +' else +' Warnlog "Effect: " + Effectname1 + " didn't work when it started with: " + StartName1 +' endif + Kontext "Tasks" +' sleep (2) + Endif + Endif + Endif + Next u + Endif + kontext "DocumentImpress" + if DocumentImpress.Exists (15) then + printlog "Returned to the Impress Edit-mode." + endif + + Kontext "Tasks" + if Tasks.Exists then + EffectChange.Click + else + Printlog "Presentation didn't end. Error?" + endif + kontext + printlog "Switch to TabPage: Motion Paths" + active.setPage(TabMotionPaths) + kontext "TabMotionPaths" + Effects.TypeKeys "<DOWN>", e + 1 + printlog "Select the next entry" +' if p = 2 then Effects.TypeKeys "<DOWN>" + p = Effects.GetSelIndex + If p = d Then e = i 'p > 2 AND + Next e + + kontext "TabMotionPaths" + Speed.Typekeys "<DOWN>", (Int(Speed.GetItemCount * Rnd) + 1) + Printlog "Test of Entrance-list ended." + Next o + bError = false + else + bError = true + warnlog "Impress:Tasks Pane:Custom Animation:TabMotionPaths tabPage doesn't work." + endif + kontext + + printlog "Switch to TabPage: Entrance" + active.setPage(TabEntrance) + kontext "TabEntrance" + if TabEntrance.exists(5) then + Effects.Select 4 + printlog "Close dialog 'Custom Animation' with 'OK'" + TabEntrance.OK + else + warnlog "Error when switching Tab" + endif + bError = false + kontext "Tasks" + EffectAutomaticPreview.Check + printlog "click button 'Remove'" + EffectRemove.Click + printlog "close application" + Call hCloseDocument +endcase 'tiPengineTabMotionPaths + +'-------------------------------------------------------------------------------------------------------------------------------------------------- + +testcase tiPengineSlideTransition + + dim a as integer + dim b as integer + dim i as integer + dim lala as integer + dim iCount as integer + dim Soundposition as integer + + printlog "open application" + Call hNewDocument + printlog "create rectangle" + Call hRechteckErstellen ( 10, 10, 20, 40 ) + sleep 1 + printlog "Insert a second slide" + InsertSlide + sleep 2 + hTypeKeys "<Pagedown>" + sleep 2 + printlog "create textframe with quotes; Simple: 39; Double: 34;" + hTextrahmenErstellen ( "Hallo",20,20,60,30) + printlog "Insert a third slide" + InsertSlide + sleep 2 + hTypekeys "<Pagedown>" + sleep 2 + 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 every entry in the Listbox 'Apply to Selected Slides'" + printlog "Then select the next Speed for Transition and retest all the effects" + printlog "Redo until all effects has been tested with all speeds" + lala = TransitionApplyToSelectedSlide.GetItemCount + Printlog "Count of effects : " + TransitionApplyToSelectedSlide.GetItemCount + Printlog "Count of Speeds : " + TransitionSpeed.GetItemCount + For b = 1 to 1 'i + TransitionSpeed.Typekeys "<DOWN>", (Int(TransitionSpeed.GetItemCount * Rnd)) + Printlog "Current speed is: " + TransitionSpeed.GetSelText + For iCount = 50 to lala + TransitionApplyToSelectedSlide.Select (iCount) + TransitionPlay.Click + sleep 5 ' takes some time, until it is running + Printlog "Selected effect is: " + TransitionApplyToSelectedSlide.GetSelText + Next iCount + Next b + Printlog "Count of Sounds : " + TransitionSound.GetItemCount + printlog "One Entry of the Listbox 'Sound' is 'Other sound...', select it" +' iCount = TransitionSound.GetItemCount + TransitionSound.TypeKeys "<HOME>" + i = 0 + randomize +' for a = 1 to 1 'iCount + TransitionSound.Select (Int(TransitionSound.GetItemCount * Rnd) + 1) + Printlog "The Transition Sound tested is: " + TransitionSound.GetSelText + " ( " + TransitionSound.GetSelIndex + " )." + Soundposition = TransitionSound.GetSelIndex + 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'" + sleep 1 + OeffnenDlg.cancel + kontext "Tasks" + if TransitionSound.GetSelIndex <> 1 then + Warnlog "TransitionSound didn't go back to the " + Soundposition + " position after pressing cancel in dialogue" + endif + endif + kontext "Tasks" + ' the Checkbox is disabled on the first three entries: <No Sound>, <Stop previous sound>... + if (TransitionLoopUntilNextSound.IsEnabled AND (TransitionSound.GetSelIndex<4)) then + qaErrorLog "May be Language specific -> Evaluation of TBO; " + TransitionSound.GetSelText + "( " + TransitionSound.GetSelIndex + " )." + endif +' next a + + sleep 5 + kontext "Tasks" + + printlog "check checkbox 'Automatically after'" + TransitionAutomaticallyAfter.Check + sleep 5 + printlog "press key 'Page Up' in box" + TransitionAutomaticallyAfterTime.TypeKeys "<PageUp>" + sleep 5 + printlog "check the standard checkbox 'On mouse click'" + TransitionOnMouseClick.Check + sleep 5 + printlog "press button 'Apply to All Slides'" + TransitionApplyToAllSlides.Click + sleep 5 + printlog "press button 'Play'" + TransitionPlay.Click + printlog "press button 'Slide Show'" + sleep (10) + TransitionSlideShow.Click + sleep (3) + kontext "DocumentPresentation" + if DocumentPresentation.Exists (5) then + printlog "Presentation started :-)" + if DocumentPresentation.Exists (15) then + DocumentPresentation.TypeKeys "<Space>" + endif + if DocumentPresentation.Exists (15) then + DocumentPresentation.TypeKeys "<Space>" + endif + if DocumentPresentation.Exists (15) then + DocumentPresentation.TypeKeys "<Escape>" + endif + 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 + TransitionAutomaticPreview.UnCheck + sleep 1 + TransitionAutomaticPreview.Check + printlog "close application" + Call hCloseDocument +endcase 'tiPengineSlideTransition + +'testcase +' Two different objects for two different effects. Does it work? +'Endcase + +'Further ideas... +'testcase tipEngineUserFunctionTest +' Insert some extra slides and see if they changes on themselves. (chain-reaction) +' Save file, close, open again and see if everything is as it were. (Random effects) +'Endcase + +'------------------------------------------------------------------------------- + +testcase tiPengineTabpageEntrance2 + + dim bError as boolean + dim e as integer + dim d as integer + dim i as integer + dim l as integer + dim o as integer + dim p as integer + dim q as integer + dim s as integer + dim t as integer + dim u as integer + dim w as integer + dim Effectname1 as string + dim StartName1 as string + dim PropertyName1 as string + + printlog "open application" + Call hNewDocument + printlog "create textbox with text" + Call hTextrahmenErstellen ("Test text to test text effects", 35, 35, 70, 70 ) + printlog "Slide Show->Custom Animation..." + SlideShowCustomAnimation + Kontext "Tasks" + printlog "Uncheck AutomaticPreview" + EffectAutomaticPreview.UnCheck + printlog "click button 'Add...'" + 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) + AutomaticPreview.UnCheck + Printlog "Testing effects in - TabEntrance" + i = Effects.GetItemCount + For o = 1 to 2 + p = 7555 + Effects.TypeKeys "<HOME>" + For e = 1 to i + sleep 1 + Printlog "Effect Nr: " + (Effects.GetSelIndex -1) + ". Name: " + Effects.GetSelText + Effectname1 = Effects.GetSelText + if AutomaticPreview.IsChecked = TRUE then sleep 1 + d = Effects.GetSelIndex + TabEntrance.Ok + Kontext "Tasks" + EffectPlay.Click + Sleep 5 +' EffectSlideShow.Click +' Sleep (2) +' kontext "DocumentPresentation" +' if DocumentPresentation.Exists (15) then +' DocumentPresentation.TypeKeys "<Space>" +' Sleep (2) +' DocumentPresentation.TypeKeys "<Space>" +' if DocumentPresentation.Exists (15) then +' DocumentPresentation.TypeKeys "<Space>" +' endif +' if DocumentPresentation.Exists (15) then +' DocumentPresentation.TypeKeys "<Escape>" +' endif +' else +' Warnlog "Effect: " + Effectname1 + " didn't work when it started with: " + StartName1 + "and ended with: " + PropertyName1 +' endif +' sleep (2) + Kontext "Tasks" + if Tasks.Exists(5) then + EffectChange.Click + else + Printlog "Presentation didn't end. Error?" + endif + kontext "TabEntrance" + printlog "Select the next entry" + Effects.TypeKeys "<DOWN>", e + p = Effects.GetSelIndex + If p = d Then e = i + Next e + + kontext "DocumentPresentation" + EditSelectAll + kontext "TabEntrance" + try + Speed.Typekeys "<DOWN>", (Int(Speed.GetItemCount * Rnd)) + catch + printlog "Speed doesn't seem to work with the effect: " + Effectname1 + ". Check if this is ok." + endcatch + + Printlog "Test of Entrance-list ended." + Next o + + kontext + printlog "Switch to TabPage: Entrance" + active.setPage(TabEntrance) + kontext "TabEntrance" + if TabEntrance.exists(5) then + Effects.Select 4 + printlog "Close dialog 'Custom Animation' with 'OK'" + TabEntrance.OK + else + warnlog "Error when switching Tab" + endif + bError = false + else + bError = true + warnlog "Impress:Tasks Pane:Custom Animation:Add... button didnt work." + endif + kontext "Tasks" + EffectAutomaticPreview.Check + printlog "click button 'Remove'" + EffectRemove.Click + printlog "close application" + Call hCloseDocument +endcase 'tiPengineTabpageEntrance2 + +'------------------------------------------------------------------------------------------------------------------------------------------------------ + +testcase tiPengineTabPageEmphasis2 + + dim bError as boolean + dim e as integer + dim d as integer + dim i as integer + dim l as integer + dim o as integer + dim p as integer + dim q as integer + dim s as integer + dim t as integer + dim u as integer + dim w as integer + dim Effectname1 as string + dim StartName1 as string + dim PropertyName1 as string + + printlog "open application" + Call hNewDocument + printlog "create textbox with text" + Call hTextrahmenErstellen ("Test text to test text effects", 35, 35, 70, 70 ) + printlog "Slide Show->Custom Animation..." + SlideShowCustomAnimation + Kontext "Tasks" + printlog "Uncheck AutomaticPreview" + EffectAutomaticPreview.UnCheck + printlog "click button 'Add...'" + EffectAdd.click + printlog "Dialog 'Custom Animation' comes up" + kontext + + printlog "Switch to TabPage: Emphasis" + kontext + active.setPage(TabEmphasis) + kontext "TabEmphasis" + if TabEmphasis.exists(5) then + kontext + active.setPage(TabEmphasis) + Printlog "Testing effects in - TabEmphasis" + kontext "TabEmphasis" + i = Effects.GetItemCount + For o = 1 to 2 + p = 7555 + Effects.TypeKeys "<HOME>" + For e = 1 to i + sleep 1 + Printlog "Effect Nr: " + (Effects.GetSelIndex -1) + ". Name: " + Effects.GetSelText + Effectname1 = Effects.GetSelText + if AutomaticPreview.IsChecked = TRUE then sleep 1 + d = Effects.GetSelIndex + TabEmphasis.Ok + Kontext "Tasks" +' EffectSlideShow.Click +' Sleep (1) +' kontext "DocumentPresentation" +' if DocumentPresentation.Exists (15) then +' DocumentPresentation.TypeKeys "<Space>" +' Sleep (1) +' if DocumentPresentation.Exists (10) then +' DocumentPresentation.TypeKeys "<Space>" +' Sleep (1) +' endif +' if DocumentPresentation.Exists (10) then +' DocumentPresentation.TypeKeys "<Escape>" +' endif +' else +' Warnlog "Effect: " + Effectname1 + " didn't work when it started with: " + StartName1 + "and ended with: " + PropertyName1 +' endif +' sleep (5) + Kontext "Tasks" + if Tasks.Exists then + EffectChange.Click + else + Printlog "Presentation didn't end. Error?" + endif + kontext + active.setPage(TabEmphasis) + Printlog "Testing effects in - TabEmphasis" + kontext "TabEmphasis" + printlog "Select the next entry" + Effects.TypeKeys "<DOWN>", e + 1 + p = Effects.GetSelIndex + If p = d Then e = i 'p > 2 AND + Next e + kontext + active.setPage(TabEmphasis) + kontext "TabEmphasis" + + e = 0 + if Speed.GetItemCount = 0 then + warnlog " 'Speed' has 0 entries. Check it." + else + do while (e < 1) + e = Int(Speed.GetItemCount * Rnd) + loop + Speed.Select (e) + endif + Printlog "Test of Entrance-list ended." + Next o + else + bError = true + warnlog "Impress:Tasks Pane:Custom Animation:TabExit tabPage doesnt work." + endif + + kontext + printlog "Switch to TabPage: Entrance" + active.setPage(TabEntrance) + kontext "TabEntrance" + if TabEntrance.exists(5) then + Effects.Select 4 + printlog "Close dialog 'Custom Animation' with 'OK'" + TabEntrance.OK + else + warnlog "Error when switching Tab" + endif + bError = false + kontext "Tasks" + EffectAutomaticPreview.Check + printlog "click button 'Remove'" + EffectRemove.Click + printlog "close application" + Call hCloseDocument +endcase 'tiPengineTabPageEmphasis2 + +'------------------------------------------------------------------------------------ + +testcase tiPengineTabPageExit2 + + dim bError as boolean + dim e as integer + dim d as integer + dim i as integer + dim l as integer + dim o as integer + dim p as integer + dim q as integer + dim s as integer + dim t as integer + dim u as integer + dim w as integer + dim Effectname1 as string + dim StartName1 as string + dim PropertyName1 as string + +printlog "open application" +Call hNewDocument +printlog "create textbox with text" +Call hTextrahmenErstellen ("Test text to test text effects", 35, 35, 70, 70 ) +printlog "Slide Show->Custom Animation..." +SlideShowCustomAnimation + Kontext "Tasks" + printlog "Uncheck AutomaticPreview" + EffectAutomaticPreview.UnCheck + printlog "click button 'Add...'" + EffectAdd.click + printlog "Dialog 'Custom Animation' comes up" + kontext + + printlog "Switch to TabPage: Exit" + active.setPage(TabExit) + kontext "TabExit" + if TabExit.exists(5) then + Printlog "Testing effects in - TabExit" + i = Effects.GetItemCount + For o = 1 to 2 + p = 7555 + Effects.TypeKeys "<HOME>" + For e = 1 to i + sleep 1 + Printlog "Effect Nr: " + (Effects.GetSelIndex -1) + ". Name: " + Effects.GetSelText + Effectname1 = Effects.GetSelText + if AutomaticPreview.IsChecked = TRUE then sleep 1 + d = Effects.GetSelIndex + TabExit.Ok + Kontext "Tasks" +' EffectSlideShow.Click +' Sleep (3) +' kontext "DocumentPresentation" +' if DocumentPresentation.Exists (15) then +' DocumentPresentation.TypeKeys "<Space>" +' Sleep (7) +' if DocumentPresentation.Exists (15) then +' DocumentPresentation.TypeKeys "<Space>" +' endif +' if DocumentPresentation.Exists (15) then +' DocumentPresentation.TypeKeys "<Escape>" +' endif +' if DocumentPresentation.Exists (15) then +' DocumentPresentation.TypeKeys "<Escape>" +' endif +' else +' Warnlog "Effect: " + Effectname1 + " didn't work when it started with: " + StartName1 + "and ended with: " + PropertyName1 +' endif +' sleep (5) + kontext "DocumentImpress" + if DocumentImpress.Exists (15) then + printlog "Returned to the Impress Edit-mode." + else + kontext "DocumentPresentation" + DocumentPresentation.TypeKeys "<Escape>" + sleep (4) + endif + + Kontext "Tasks" + if Tasks.Exists then + EffectChange.Click + else + Printlog "Presentation didn't end. Error?" + endif + kontext + printlog "Switch to TabPage: Exit" + active.setPage(TabExit) + kontext "TabExit" + printlog "Select the next entry" + Effects.TypeKeys "<DOWN>", e + 1 + p = Effects.GetSelIndex + If p = d Then e = i 'p > 2 AND + Next e + kontext + printlog "Switch to TabPage: Exit" + active.setPage(TabExit) + kontext "TabExit" + e = 0 + if Speed.GetItemCount = 0 then + warnlog " 'Speed' has 0 entries. Check it." + else + do while (e < 1) + e = Int(Speed.GetItemCount * Rnd) + loop + Speed.Select (e) + endif + + Printlog "Test of Entrance-list ended." + Next o + bError = false + else + bError = true + warnlog "Impress:Tasks Pane:Custom Animation:TabExit tabPage doesnt work." + endif + + kontext + printlog "Switch to TabPage: Entrance" + active.setPage(TabEntrance) + kontext "TabEntrance" + if TabEntrance.exists(5) then + Effects.Select 4 + printlog "Close dialog 'Custom Animation' with 'OK'" + TabEntrance.OK + else + warnlog "Error when switching Tab" + endif + bError = false + kontext "Tasks" + EffectAutomaticPreview.Check + printlog "click button 'Remove'" + EffectRemove.Click + printlog "close application" + Call hCloseDocument +endcase 'tiPengineTabPageExit2 + +'-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- + +testcase tiPengineTabPageMotionPaths2 + + dim bError as boolean + dim e as integer + dim d as integer + dim i as integer + dim l as integer + dim o as integer + dim p as integer + dim q as integer + dim s as integer + dim t as integer + dim u as integer + dim w as integer + dim Effectname1 as string + dim StartName1 as string + dim PropertyName1 as string + + printlog "open application" + Call hNewDocument + printlog "create textbox with text" + Call hTextrahmenErstellen ("Test text to test text effects", 35, 35, 70, 70 ) + printlog "Slide Show->Custom Animation..." + SlideShowCustomAnimation + Kontext "Tasks" + printlog "Uncheck AutomaticPreview" + EffectAutomaticPreview.UnCheck + printlog "click button 'Add...'" + EffectAdd.click + printlog "Dialog 'Custom Animation' comes up" + kontext + + printlog "Switch to TabPage: Motion Paths" + active.setPage(TabMotionPaths) + kontext "TabMotionPaths" + if TabMotionPaths.exists(5) then + Printlog "Testing effects in - TabMotionPaths" + i = Effects.GetItemCount + For o = 1 to 2 + p = 7555 + Effects.TypeKeys "<DOWN>",4 + For e = 4 to i '1 when adepted. + sleep 1 + Printlog "Effect Nr: " + (Effects.GetSelIndex -1) + ". Name: " + Effects.GetSelText + Effectname1 = Effects.GetSelText + if AutomaticPreview.IsChecked = TRUE then sleep 1 + d = Effects.GetSelIndex + TabMotionPaths.Ok + Kontext "Tasks" +' EffectSlideShow.Click +' Sleep (4) +' kontext "DocumentPresentation" +' if DocumentPresentation.Exists (15) then +' DocumentPresentation.TypeKeys "<Space>" +' Sleep (7) +' if DocumentPresentation.Exists (15) then +' DocumentPresentation.TypeKeys "<Space>" +' endif +' if DocumentPresentation.Exists (15) then +' DocumentPresentation.TypeKeys "<Escape>" +' endif +' else +' Warnlog "Effect: " + Effectname1 + " didn't work when it started with: " + StartName1 + "and ended with: " + PropertyName1 +' endif +' sleep (2) + kontext "DocumentPresentation" + EditSelectAll ' (Select the text again) + Kontext "Tasks" + if Tasks.Exists then + EffectChange.Click + else + Printlog "Presentation didn't end. Error?" + endif + kontext + printlog "Switch to TabPage: Motion Paths" + active.setPage(TabMotionPaths) + kontext "TabMotionPaths" + printlog "Select the next entry" + Effects.TypeKeys "<DOWN>", e + 1 + p = Effects.GetSelIndex + If p = d Then e = i 'p > 2 AND + Next e + kontext + printlog "Switch to TabPage: Motion Paths" + active.setPage(TabMotionPaths) + kontext "TabMotionPaths" + + e = 0 + if Speed.GetItemCount = 0 then + warnlog " 'Speed' has 0 entries. Check it." + else + do while (e < 1) + e = Int(Speed.GetItemCount * Rnd) + loop + Speed.Select (e) + endif + + Printlog "Test of Entrance-list ended." + Next o + bError = false + else + bError = true + warnlog "Impress:Tasks Pane:Custom Animation:TabMotionPaths tabPage doesn't work." + endif + kontext + printlog "Switch to TabPage: Entrance" + active.setPage(TabEntrance) + kontext "TabEntrance" + if TabEntrance.exists(5) then + Effects.Select 4 + printlog "Close dialog 'Custom Animation' with 'OK'" + TabEntrance.OK + else + warnlog "Error when switching Tab" + endif + bError = false + kontext "Tasks" + EffectAutomaticPreview.Check + printlog "click button 'Remove'" + EffectRemove.Click + printlog "close application" + Call hCloseDocument +endcase 'tiPengineTabPageMotionPaths2 + +'--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
\ No newline at end of file diff --git a/testautomation/graphics/optional/includes/impress/i_pengine2.inc b/testautomation/graphics/optional/includes/impress/i_pengine2.inc new file mode 100644 index 000000000000..56d15f6eee37 --- /dev/null +++ b/testautomation/graphics/optional/includes/impress/i_pengine2.inc @@ -0,0 +1,604 @@ +'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@oracle.com +'* +'* short description : Tests the Presentation-Engines effects +'* +'******************************************************************* + +testcase tiPengineAnimationEffectsPreview + dim bError as boolean + + printlog "open application" + Call hNewDocument + printlog "create textbox with text" + Call hTextrahmenErstellen ("Test text to test text effects", 35, 35, 70, 70 ) + printlog "Slide Show->Custom Animation..." + SlideShowCustomAnimation + Kontext "Tasks" + printlog "click button 'Add...'" + 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) + TestAnimations + printlog "Switch to TabPage: Emphasis" + kontext + active.setPage(TabEmphasis) + kontext "TabEmphasis" + if TabEmphasis.exists(5) then + DialogTest(TabEmphasis) + TestAnimations + 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) + TestAnimations + 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) + TestAnimations + else + bError = true + warnlog "Impress:Tasks Pane:Custom Animation:TabMotionPaths tabPage doesn't work." + endif + kontext + + printlog "Switch to TabPage: Entrance" + active.setPage(TabEntrance) + kontext "TabEntrance" + if TabEntrance.exists(5) then + Effects.Select 4 + printlog "Close dialog 'Custom Animation' with 'OK'" + TabEntrance.OK + else + warnlog "Error when switching Tab" + endif + 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.IsVisible 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 + sleep (3) + EffectSlideShow.Click + sleep (1) + kontext "DocumentPresentation" + if DocumentPresentation.Exists (15) then + printlog "Presentation started :-)" + DocumentPresentation.TypeKeys "<SPACE>" + if DocumentPresentation.Exists (15) then + DocumentPresentation.TypeKeys "<SPACE>" + endif + if DocumentPresentation.Exists (15) then + DocumentPresentation.TypeKeys "<ESCAPE>" + endif + else + warnlog "Impress:Tasks Pane:Custom Animation:Slide Show button doesn't start slideshow!" + endif + sleep (2) + kontext "Tasks" + EffectAutomaticPreview.Check + printlog "click button 'Remove'" + EffectRemove.Click + endif + sleep (2) + printlog "close application" + Call hCloseDocument +endcase 'tiPengineAnimationEffectsPreview + +'------------------------------------------------------------------------------ + +testcase tiPengineAnimationEffectsOptions + + dim bError as boolean + dim e as integer + dim d as integer + dim i as integer + dim l as integer + dim o as integer + dim p as integer + dim q as integer + dim s as integer + dim t as integer + dim u as integer + dim y as integer + dim w as integer + dim numberx as integer + dim Effectname1 as string + dim StartName1 as string + dim PropertyName1 as string + + printlog "open application" + Call hNewDocument + printlog "create textbox with text" + Call hTextrahmenErstellen ("Test text to test text effects", 35, 35, 70, 70 ) + printlog "Slide Show->Custom Animation..." + SlideShowCustomAnimation + printlog "Dialog 'Custom Animation' comes up" + Kontext "Tasks" + printlog "Click button 'Add...' to add an effect to the text" + EffectAdd.click + kontext + printlog "Switch to TabPage: Entrance" + active.setPage(TabEntrance) + kontext "TabEntrance" + if TabEntrance.exists(5) then + AutomaticPreview.UnCheck + Printlog "Testing effects in - TabEntrance" + i = Effects.GetItemCount + p = 7555 + Effects.TypeKeys "<HOME DOWN>" + Randomize + printlog "Choose ten random effects, and test them." + For e = 1 to 10 + randomize + for y = 1 to 1 + randomize + numberx = Int((i*Rnd)) + if (numberx<1) OR (numberx>i) then ' Just so we get it between 1 and the amount of items. + y = y - 1 + endif + next y + printlog numberx ' Log what effect were about to select. Just for debugging. + Effects.TypeKeys "<HOME>" + Effects.TypeKeys "<DOWN>", numberx ' Select the effect. + sleep 1 + Printlog "Effect Nr: " + (Effects.GetSelIndex -1) + ". Name: " + Effects.GetSelText ' Log the number and effect-name. + Effectname1 = Effects.GetSelText + if AutomaticPreview.IsChecked = TRUE then sleep 1 ' Sleep one sec to at least let the preview start. + d = Effects.GetSelIndex + TabEntrance.Ok + optionstest2 ' Do the optionstest for this effect. + Kontext "Tasks" + if Tasks.Exists then + EffectChange.Click + else + Warnlog "Something wrong when exiting Impress:Tasks Pane:Custom Animation: ... (options)" + endif + kontext "TabEntrance" + printlog "Select the next entry" + Effects.TypeKeys "<DOWN>", e + p = Effects.GetSelIndex + If p = d Then e = i + sleep 2 + if Speed.isVisible then + if Speed.isEnabled then + s = Speed.GetItemCount + For q = 1 to s + try + Speed.Select q + catch + warnlog "The speed nr: " + q + " had some kind of problem. Check it." + endcatch + Next q + endif + else + Warnlog "Speed in Effect Options were not to be found." + endif + Next e + kontext "TabEntrance" + Printlog "Test of Entrance-list ended." + AutomaticPreview.Check + TabEntrance.Ok + else + bError = true + warnlog "Impress:Tasks Pane:Custom Animation:Add... button didnt work." + endif + kontext "Tasks" + EffectAutomaticPreview.Check + printlog "click button 'Remove'" + EffectRemove.Click + printlog "close application" + Call hCloseDocument +endcase 'tiPengineAnimationEffectsOptions + +'------------------------------------------------------------------------------- + +testcase tiPengineAllShapesAndEffects + + dim sFileName as string + + printlog "the Presentation-Engine consists of showing the presentation, with all it's effects." + + printlog "Create a new presentation." + Call hNewDocument + Sleep (1) + + printlog "Open the test-file." + Call hFileOpen (gTesttoolpath + "graphics\required\input\allshapes2.odp") 'effects.odp") + + printlog "Start the slideshow." + Call hTypeKeys "<F5>" + sleep (10) + kontext "DocumentPresentation" + while DocumentPresentation.exists() + DocumentPresentation.TypeKeys "<SPACE>" + sleep(10) + wend + + Kontext "DocumentImpress" + if (DocumentImpress.exists(1)) then + 'nothing + else + warnlog "presentation not ended." + endif + + Call hCloseDocument + + sleep (1) + printlog "Open the test-file." + Call hFileOpen (gTesttoolpath + "graphics\required\input\effects.odp") + Sleep (10) + + printlog "Start the slideshow." + CALL hTypeKeys "<F5>" + Sleep (10) + printlog "Press Space again, to continue with slide two." + kontext "DocumentPresentation" + while DocumentPresentation.exists() + DocumentPresentation.TypeKeys "<SPACE>" + sleep(10) + wend + + printlog "End of eleventh page." + if DocumentPresentation.Exists then + warnlog "DocumentPresentation shouldnt be visible right now." + DocumentPresentation.TypeKeys "<SPACE>" + else + printlog "Presentation ended correctly." + kontext "DocumentImpress" + end if + +printlog "Close Application" + Call hCloseDocument + Printlog "Finished Optional-test for Presentation-Engine" +endcase 'tiPengineAllShapesAndEffects + +'------------------------------------------------------------------------------- + +testcase tiPengine2ObjectsGetsEffects + + dim i as integer + dim t as integer + dim q as integer + dim e as integer + dim sFileName as string + + printlog "the Presentation-Engine consists of showing the presentation, with all it's effects." + + printlog "Create a new presentation." + Call hNewDocument + Call sSelectEmptyLayout + sleep (1) + + kontext "Toolbar" + sleep (1) + printlog "From the toolbar: Insert three objects:" + printlog "insert a Smiley." + kontext "Toolbar" + if Toolbar.Exists then + if Toolbar.IsVisible then + sleep (1) + try + SymbolShapes.TearOff + catch + warnlog "Issue for GH; .tearoff doesnt tell success" + endcatch + sleep (1) + kontext "SymbolShapes" + SymbolShapesSmiley.Click + sleep (1) + + gMouseDown (40,40) + gMouseMove (40,40,60,60) + gMouseUp (60,60) + + sleep (1) + kontext "SymbolShapes" + SymbolShapes.Close + + printlog "Unmark all objects" + hTypeKeys "<ESCAPE>" + + printlog "Mark the Smiley" + hTypeKeys "<TAB>" + else + warnlog "No toolbar visible, please notify the test-administrator" + end if + else + warnlog "toolbar not visible" + end if + + printlog "Smiley inserted, time to add some effects." + + printlog "Effect no 1" + + printlog "Slide Show->Custom Animation..." + SlideShowCustomAnimation + Kontext "Tasks" + printlog "Click button 'Add...'" + 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 "Find 'Dissolve-in'." + TabEntrance.TypeKeys "<DOWN>", 6 + Sleep (3) + TabEntrance.Ok + Printlog "Added effect 'Dissolve-in'" + else + warnlog "Tab Entrance does not exist?" + end if + Kontext "Tasks" + + printlog "Effect no 2" + + printlog "Add a second effect to the object" + EffectAdd.click + + printlog "Dialog 'Custom Animation' comes up" + printlog "Switch to TabPage: Emphasis" + kontext + active.setPage(TabEmphasis) + kontext "TabEmphasis" + if TabEmphasis.exists(5) then + DialogTest(TabEmphasis) + Effects.Select 5 'Transparency + Sleep (3) + printlog "Close dialog 'Custom Animation' with 'OK'" + TabEmphasis.OK + Printlog "Added effect 'Transparency'" + else + warnlog "Error when switching Tab" + end if + Kontext "Tasks" + printlog "Effect no 3" + printlog "Insert new slide" + InsertSlide + Printlog "Inserted new Slide" + + kontext "Slides" + printlog "Make sure the last slide is selcted" + SlidesControl.TypeKeys "<TAB>" + SlidesControl.TypeKeys "<PAGEDOWN>", 3 + Sleep (1) + + printlog "Insert new object" + Call hTextrahmenErstellen ("Test text for the second slide to test the PresentationEngine", 35, 35, 70, 70) + + printlog "Add the Transformation-Effect 'put on the brakes'" + SlideShowCustomAnimation + Kontext "Tasks" + printlog "Click button 'Add...'" + EffectAdd.click + printlog "Dialog 'Custom Animation' comes up" + kontext + printlog "Switch to TabPage: Entrance" + active.setPage(TabEntrance) + kontext "TabEntrance" + if TabEntrance.exists(5) then + printlog "Add Transformation-Effect: 'Put on the Breaks'" + TabEntrance.TypeKeys "<DOWN>", 30 + Sleep (3) + TabEntrance.Ok + Printlog "Added effect 'Put on the Breaks'" + else + warnlog "Impress:Tasks Pane:Custom Animation:Add... button didn't work." + end if + Kontext "Tasks" + + printlog "Effect no 4" + printlog "Click button 'Add...'" + EffectAdd.click + printlog "Dialog 'Custom Animation' comes up" + kontext + printlog "Switch to TabPage: Motion Paths" + active.setPage(TabMotionPaths) + kontext "TabMotionPaths" + if TabMotionPaths.exists(5) then + printlog "Add motion-path-effect: 'schwosch'" + TabMotionPaths.TypeKeys "<DOWN>", 66 + Sleep (3) + TabMotionPaths.Ok + Printlog "Added effect 'Schwosch'" + kontext "Tasks" + else + warnlog "Couldn't find the Tabpage: MotionPaths. Check why." + end if + + printlog "Press 'PageUp' to get to the first slide" + hTypeKeys "<PAGEUP>" + + printlog "Run the slideshow with F5." + hTypeKeys "<F5>" + Sleep (5) + kontext "DocumentPresentation" + if DocumentPresentation.Exists (15) then + Printlog "Presentation started, calling 1st effect, 1st object." + DocumentPresentation.TypeKeys "<SPACE>" + sleep (5) + else + warnlog "Slideshow didn't start. Check why." + end if + printlog "calling 2nd effect, 1st object." + DocumentPresentation.TypeKeys "<SPACE>" + Sleep (5) + printlog "calling 2nd slide." + DocumentPresentation.TypeKeys "<SPACE>" + Sleep (5) + printlog "calling 1st effect, 2nd object" + DocumentPresentation.TypeKeys "<SPACE>" + Sleep (5) + printlog "calling 2nd effect, 2nd object" + DocumentPresentation.TypeKeys "<SPACE>" + Sleep (5) + printlog "ending presentation" + DocumentPresentation.TypeKeys "<SPACE>" + Sleep (5) + Kontext "DocumentPresentation" + printlog "getting back to edit view." + DocumentPresentation.TypeKeys "<SPACE>" + + if DocumentPresentation.Exists(5) then + warnlog "Presentation should have ended. Check why it didn't." + end if + + Kontext "DocumentImpress" + + printlog "Close the document" + Call hCloseDocument + Printlog "Finished Optional-test for Presentation-Engine" +endcase 'tiPengine2ObjectsGetsEffects + +'------------------------------------------------------------------------------- + +Function TestAnimations + + printlog "Function: TestAnimations: select in the listbox 'Effects' the second entry" + + Dim i as Integer + Dim s as Integer + Dim q as Integer + Dim e as Integer + Dim o as Integer + Dim p as Integer + + i = Effects.GetItemCount + s = Speed.GetItemCount + AutomaticPreview.Check + Effects.TypeKeys "<HOME>" + For e = 1 to i + If e <> p Then + if AutomaticPreview.isChecked = TRUE then sleep 1 + Printlog "Effect has position Nr: " + Effects.GetSelIndex + ". Name of effect: " + Effects.GetSelText + printlog "Select the next entry" + Effects.TypeKeys "<DOWN>" + p = Effects.GetSelIndex + Else + Printlog "Test of effects ended." + e = i + Endif + Next e + if Speed.IsEnabled then + For q = 1 to s + Speed.Select q + sleep 1 + Next q + endif + AutomaticPreview.Check + sleep 1 + AutomaticPreview.Check + Kontext +end Function
\ No newline at end of file diff --git a/testautomation/graphics/optional/includes/impress/i_saveloadlayout.inc b/testautomation/graphics/optional/includes/impress/i_saveloadlayout.inc new file mode 100644 index 000000000000..06a7ac89cf9d --- /dev/null +++ b/testautomation/graphics/optional/includes/impress/i_saveloadlayout.inc @@ -0,0 +1,175 @@ +'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@oracle.com +'* +'* short description: Save & Load testing of Layout -templates. +'* +'************************************************************************************** + +testcase tSaveLoadLayoutEmpty + Dim NewFileDir as String + NewFileDir = ConvertPath (gOfficePath + "user\work\LayoutTest\") + + printlog "Create New folder in the Work-directory" + printlog " Will try to create the directory: " + NewFileDir + app.mkdir NewFileDir + + printlog "Create a new document, add an empty Layout, Save the document in all available Formats, and open the saved files." + + printlog "Make new Presentation" + gApplication = "IMPRESS" + Call hNewDocument + + printlog "Choose and Insert an empty Layout." + printlog " Choose and Insert an empty Layout." + FormatModifyPage + sleep (1) + kontext "Tasks" + LayoutsPreview.TypeKeys "<HOME>" + kontext "Pagelayout_UndoDeleteWarning" + if Pagelayout_UndoDeleteWarning.exists then + Pagelayout_UndoDeleteWarning.ok + end if + kontext "Tasks" + printlog "Press Enter to use the layout on the current slide" + LayoutsPreview.TypeKeys "<RETURN>" + sleep (5) + + printlog "Save the document in different formats..." + printlog "Close the file." + printlog "Load the different files." + call fSaveLoadAllFormats (NewFileDir) 'Runs the Function below. + + printlog "Delete the different files." + printlog " Will try to delete the directory: " + NewFileDir + app.rmDir NewFileDir + + printlog "tSaveLoadLayoutEmpty ended." + printlog "End the test" +endcase 'tSaveLoadLayoutEmpty + +'**************************************************************************************************** + +testcase tSaveLoadLayoutText + printlog "Testing layout with text." + Dim NewFileDir as String + NewFileDir = ConvertPath (gOfficePath + "user\work\LayoutTest\") + + printlog "Create New folder in the Work-directory" + printlog " Will try to create the directory: " + NewFileDir + app.mkdir NewFileDir + + printlog "Create a new document, add a Layout with a Textfield, Save the document in all available Formats, and open the saved files." + + printlog "Make new Presentation" + gApplication = "IMPRESS" + Call hNewDocument + + printlog "Choose and Insert an Layout with a Text-field." + FormatModifyPage + sleep (1) + kontext "Tasks" + LayoutsPreview.TypeKeys "<HOME>" + kontext "Pagelayout_UndoDeleteWarning" + if Pagelayout_UndoDeleteWarning.exists then + Pagelayout_UndoDeleteWarning.ok + end if + kontext "Tasks" + printlog "select the Text placeholder and activate it with [Return]" + LayoutsPreview.TypeKeys ("<RIGHT>",5) + sleep (1) + LayoutsPreview.TypeKeys ("<Return>") + sleep (1) + kontext "DocumentImpress" + DocumentImpress.TypeKeys ("<TAB>") + DocumentImpress.TypeKeys ("<Return>") + DocumentImpress.TypeKeys ("<ESCAPE>") + sleep (5) + + printlog "Save the document in all available formats..." + printlog "Close the file." + printlog "Load the different files." + call fSaveLoadAllFormats (NewFileDir) 'Runs the Function below. + + printlog "Delete the different files." + printlog "Will try to delete the directory: " + NewFileDir + app.rmDir NewFileDir + + printlog "tSaveLoadLayoutText ended." +endcase 'tSaveLoadLayoutText + +'**************************************************************************************************** + +testcase tSaveLoadLayoutContent + Dim NewFileDir as String + NewFileDir = ConvertPath (gOfficePath + "user\work\LayoutTest\") + + printlog "Create New folder in the Work-directory" + printlog " Will try to create the directory: " + NewFileDir + app.mkdir NewFileDir + + printlog "Create a new document, add a Layout with a Content-field, Save the document in all available Formats, and open the saved files." + + printlog "Make new Presentation" + gApplication = "IMPRESS" + Call hNewDocument + + printlog "Choose and Insert an Layout with a Content-field." + FormatModifyPage + sleep (1) + kontext "Tasks" + LayoutsPreview.TypeKeys "<HOME>" + kontext "Pagelayout_UndoDeleteWarning" + if Pagelayout_UndoDeleteWarning.exists then + Pagelayout_UndoDeleteWarning.ok + end if + kontext "Tasks" + printlog "select the Picture placeholder and activate it with [Return]" + LayoutsPreview.TypeKeys ("<RIGHT>",2) + sleep (1) + LayoutsPreview.TypeKeys ("<Return>") + sleep (1) + kontext "DocumentImpress" + DocumentImpress.TypeKeys ("<TAB><TAB>") + DocumentImpress.TypeKeys ("<Return>") + DocumentImpress.TypeKeys ("<ESCAPE>") + sleep (5) + + printlog "Save the document in all available formats." + printlog "Close the file." + printlog "Load the different files." + call fSaveLoadAllFormats (NewFileDir) 'Runs the Function below. + + printlog "Delete the different files." + printlog " Will try to delete the directory: " + NewFileDir + app.rmDir NewFileDir 'ConvertPath (gOfficePath + "user\work\LayoutTest\") + + printlog "tSaveLoadLayoutPicture ended." +endcase 'tSaveLoadLayoutPicture + +'**************************************************************************************************** diff --git a/testautomation/graphics/optional/includes/impress/i_shape.inc b/testautomation/graphics/optional/includes/impress/i_shape.inc new file mode 100644 index 000000000000..c33c92f2ec0f --- /dev/null +++ b/testautomation/graphics/optional/includes/impress/i_shape.inc @@ -0,0 +1,89 @@ +'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 : owner : wolfram.garten@oracle.com +'* +'* short description : import presentations with shapes in .ppt format +'* +'************************************************************************ +'* +' #1 t_import_shapes ' Load all shapes with .ppt format one time +'* +'\*********************************************************************** + +testcase t_import_shapes + dim i as integer + dim iOldState as integer + dim iDocuments as integer + dim lDocuments(100) as string + dim sPage as string + + iOldState = hSetMacroSecurity ( 0 ) + iDocuments = GetFileList(convertPath(gTesttoolPath + "graphics/required/input/shapes"),"*.ppt",lDocuments()) + for i = 1 to iDocuments + printlog "(" + i + "/" + iDocuments + "): " + lDocuments(i) + printlog "------------------------------------------------------" + hFileOpen(lDocuments(i)) + + ' check if the document is writable + if fIsDocumentWritable = false then + ' 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 + + kontext "DocumentImpress" + DocumentImpress.typeKeys("<home>") + while (sPage <> DocumentImpress.StatusGetText(DocumentImpress.StatusGetItemID(6))) + printlog "------------" + sleep 1 + DocumentImpress.typeKeys("<tab>") + sleep 1 ' loop while empty: break after 10 minutes + DocumentImpress.typeKeys("<tab>") + FormatPositionAndSize + kontext + active.setpage TabPositionAndSize + kontext "TabPositionAndSize" + printlog "w: '" + Width.getText + "'; h: '" + Height.getText + "'" + TabPositionAndSize.cancel + kontext "DocumentImpress" + DocumentImpress.typeKeys("<F2>") + editSelectAll + editCopy + printlog getClipboard + sPage = DocumentImpress.StatusGetText(DocumentImpress.StatusGetItemID(6)) + printlog sPage + DocumentImpress.typeKeys("<escape><pageDown>") + sleep 5 + wend + hCloseDocument + next i +hSetMacroSecurity ( iOldState ) +endcase + diff --git a/testautomation/graphics/optional/includes/impress/i_slidecopy.inc b/testautomation/graphics/optional/includes/impress/i_slidecopy.inc new file mode 100644 index 000000000000..4de5505fe0a1 --- /dev/null +++ b/testautomation/graphics/optional/includes/impress/i_slidecopy.inc @@ -0,0 +1,967 @@ +'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@oracle.com +'* +'* short description: includefile for Slidecopy-testing +'* +'\****************************************************************************** + +testcase tiSlideCopyNewPresentation + + const MENUITEM_RENAME = 27027 + + Dim value1 as string + Dim value2 as string + Dim value12 as string + Dim value13 as string + + printlog "This test copies one slide from one presentation to another." + printlog "Make new presentation" + Call hNewDocument + Call sSelectEmptyLayout + printlog "Insert three objects: Connector, Door-plate, and Smiley." + + printlog "First we Insert a Connector." + kontext "Toolbar" + sleep 1 + try + Verbinder.TearOff + printlog "Tearing off Connector bar.." + catch + warnlog "bug for GH from FHA; .tearoff doesnt tell success" + endcatch + kontext "Connectorsbar" + sleep 2 + Verbinder.click + sleep 5 + gMouseDown (10,10) + gMouseMove (10,10,30,30) + gMouseUp (30,30) + kontext "Connectorsbar" + Connectorsbar.Close + hTypeKeys "<ESCAPE>" + hTypeKeys "<TAB>", 1 + printlog "We rename the object via the contextmenu." + sleep (1) + DocumentImpress.TypeKeys "<SHIFT F10>" + sleep (2) + printlog "then Choose rename." + if hMenuFindSelect( MENUITEM_RENAME, true, 14) = false then + Warnlog "Context-Menu-entry `Rename` was not found. Therefore the test ends." + Call hCloseDocument + Goto Endsub + endif + + kontext "NameDlgObject" + if ( NameDlgObject.exists( 2 ) ) then + NameField.SetText "First" + NameDlgObject.OK + else + warnlog( "<NameDlgObject> failed to open" ) + endif + + kontext "DocumentImpress" + hMouseClick DocumentImpress, 90, 90 + '----------------------------------------------------------------------------1 + printlog "Then we insert the second object: a Door-plate." + + kontext "Toolbar" + sleep 2 + try + StarShapes.TearOff + printlog "Tearing off StarShapes Bar..." + catch + warnlog( "<StarShapes.TearOff> failed" ) + goto endsub + endcatch + + kontext "StarShapes" + sleep 2 + if ( StarShapes.exists( 2 ) ) then + StarShapesDoorplate.click + else + warnlog( "<StarShapesDoorplate> could not be clicked" ) + endif + + sleep (5) + gMouseDown (40,40) + gMouseMove (40,40,60,60) + gMouseUp (60,60) + + kontext "StarShapes" + hCloseDialog( StarShapes, "close" ) + + hTypeKeys "<ESCAPE>" + hTypeKeys "<TAB>", 2 + printlog "And then we rename the object." + sleep (1) + DocumentImpress.TypeKeys "<SHIFT F10>" + sleep 2 + if hMenuFindSelect( MENUITEM_RENAME, true, 15) = false then + Warnlog "Context-Menu-entry `Rename` was not found. Therefore the test ends." + Call hCloseDocument + Goto Endsub + endif + kontext "NameDlgObject" + if ( NameDlgObject.exists( 2 ) ) then + NameField.SetText "Second" + NameDlgObject.OK + else + warnlog( "<NameDlgObject> could not be accessed" ) + endif + + kontext "DocumentImpress" + hMouseClick DocumentImpress, 90, 90 + '----------------------------------------------------------------------------2 + printlog "Then we insert the thrid object: a Smiley." + kontext "Toolbar" + sleep 1 + try + SymbolShapes.TearOff + catch + warnlog "bug for GH from FHA; .tearoff doesnt tell success" + endcatch + kontext "SymbolShapes" + sleep 1 + SymbolShapesSmiley.Click + sleep 2 + gMouseDown (70,70) + gMouseMove (70,70,89,89) + gMouseUp (89,89) + kontext "SymbolShapes" + SymbolShapes.Close + hTypeKeys "<ESCAPE>" + hTypeKeys "<TAB>", 3 + printlog "We rename the object via the Context-menu." + DocumentImpress.TypeKeys "<SHIFT F10>" + sleep (2) + 'Choose rename. + if hMenuFindSelect( MENUITEM_RENAME, true, 15) = false then + Warnlog "Context-Menu-entry `Rename` was not found. Therefore the test ends." + Call hCloseDocument + Goto Endsub + endif + kontext "NameDlgObject" + NameField.SetText "Third" + NameDlgObject.OK + kontext "DocumentImpress" + hMouseClick DocumentImpress, 90, 90 + '---------------------------------------------------------------------------3 + printlog "Copy the slide to the clipboard" + kontext "Slides" + SlidesControl.TypeKeys "<PAGEUP>" + sleep (1) + SlidesControl.TypeKeys "<SHIFT F10>" + sleep 2 + printlog "We copy the object via the Context-menu." + + if hMenuFindSelect(5711, true, 10) = false then + Warnlog "Context-Menu-entry `Copy` was not found. Therefore the test ends." + Call hCloseDocument + Goto Endsub + endif + printlog "Close the presentation-window" + Call hCloseDocument + printlog "Open a new presentation" + Call hNewDocument + printlog "Paste the slide from the clipboard!" + kontext "Slides" + hUseAsyncSlot( "EditPaste" ) + printlog "Delete the first slide" + hUseAsyncSlot( "EditDeleteSlide" ) + printlog "Check if all three objects exists, and has the right values" + kontext "DocumentImpress" + hTypeKeys "<ESCAPE>" + hTypeKeys "<TAB>", 1 'Select the first object. + 'Bring up the kontext-menu for the object + sleep (1) + DocumentImpress.TypeKeys "<SHIFT F10>" + sleep 2 + printlog "We rename the object via the Context-menu." + if hMenuFindSelect( MENUITEM_RENAME, true, 14) = false then + Warnlog "Context-Menu-entry `Rename` was not found. Therefore the test ends." + Call hCloseDocument + Goto Endsub + endif + printlog "Read out what the name is, and checks if it's correct." + kontext "NameDlgObject" + value1 = NameField.GetText + NameDlgObject.OK + if value1 = "First" then + printlog "First object was found correctly" + else + Warnlog "Wrong object or object-name! The name found was: " + value1 + endif + kontext "DocumentImpress" + hMouseClick DocumentImpress, 90, 90 + DocumentImpress.TypeKeys "<TAB TAB>" 'Select the second object. + 'Bring up the kontext-menu for the object + sleep (1) + DocumentImpress.TypeKeys "<SHIFT F10>" + sleep 2 + printlog "We rename the object via the Context-menu." + if hMenuFindSelect( MENUITEM_RENAME, true, 15) = false then + Warnlog "Context-Menu-entry `Rename` was not found. Therefore the test ends." + Call hCloseDocument + Goto Endsub + endif + printlog "Read out what the name is, and check if it's correct." + sleep 1 + kontext "NameDlgObject" + value12 = NameField.GetText + NameDlgObject.OK + + if value12 = "Second" then + printlog "Second object was found correctly" + else + Warnlog "Wrong object or object-name! The name found was: " + value12 + endif + + kontext "DocumentImpress" + hMouseClick DocumentImpress, 90, 90 + DocumentImpress.TypeKeys "<TAB TAB TAB>" 'Select the third object. + 'Bring up the kontext-menu for the object + sleep (2) + DocumentImpress.TypeKeys "<SHIFT F10>" + sleep 2 + printlog "We rename the object via the Context-menu." + if hMenuFindSelect( MENUITEM_RENAME, true, 15) = false then + Warnlog "Context-Menu-entry `Rename` was not found. Therefore the test ends." + Call hCloseDocument + Goto Endsub + endif + printlog "Read out what the name is, and check if it's correct." + kontext "NameDlgObject" + value13 = NameField.GetText + NameDlgObject.OK + + if value13 = "Third" then + printlog "Third object was found correctly" + else + Warnlog "Wrong object or object-name! The name found was: " + value13 + endif + + printlog "Close the bars we opened before." + kontext "Connectorsbar" + if Connectorsbar.Exists then Connectorsbar.Close + kontext "SymbolShapes" + if SymbolShapes.Exists then SymbolShapes.Close + kontext "StarShapes" + if StarShapes.Exists then StarShapes.Close + + printlog "Close Presentation. End testcase" + Call hCloseDocument +endcase 'tiSlideCopyNewPresentation + +'------------------------------------------------------------------------- + +testcase tiSlideCopyDuplicate + Dim value1 as string + Dim value2 as string + Dim value12 as string + Dim value13 as string + dim i as integer + printlog "Make new presentation" + Call hNewDocument + Call sSelectEmptyLayout + printlog "Insert Connector." + kontext "Toolbar" + sleep 1 + try + Verbinder.TearOff ' insert connector + catch + warnlog "bug for GH from FHA; .tearoff doesnt tell success" + endcatch + kontext "Connectorsbar" + sleep 1 + Verbinder.click + sleep 1 + kontext "DocumentImpress" + gMouseDown (10,10) + gMouseMove (10,10,30,30) + gMouseUp (30,30) + + hTypeKeys "<ESCAPE>" + hTypeKeys "<TAB>", 1 + sleep (1) + + printlog "rename object" + DocumentImpress.TypeKeys "<SHIFT F10>" + sleep 1 + + printlog "Choose rename" + if hMenuFindSelect(27027, true, 14) = false then + Warnlog "Context-Menu-entry `Rename` was not found. Therefore the test ends." + Call hCloseDocument + Goto Endsub + endif + kontext "NameDlgObject" + NameField.SetText "First" + NameDlgObject.OK + sleep 1 + + kontext "DocumentImpress" + hMouseClick DocumentImpress, 90, 90 + + printlog "2 Insert Door-plate" + kontext "Toolbar" + sleep 1 + try + StarShapes.TearOff + catch + warnlog "bug for GH from FHA; .tearoff doesnt tell success" + endcatch + kontext "StarShapes" + sleep 1 + StarShapesDoorplate.click + sleep 1 + kontext "DocumentImpress" + gMouseDown (40,40) + gMouseMove (40,40,60,60) + gMouseUp (60,60) + + hTypeKeys "<ESCAPE>" + hTypeKeys "<TAB>", 2 + sleep (1) + + printlog "Rename object" + kontext "DocumentImpress" + DocumentImpress.TypeKeys "<SHIFT F10>" + sleep (1) + printlog "Choose rename." + if hMenuFindSelect(27027, true, 15) = false then + Warnlog "Context-Menu-entry `Rename` was not found. Therefore the test ends." + Call hCloseDocument + Goto Endsub + endif + kontext "NameDlgObject" + NameField.SetText "Second" + NameDlgObject.OK + sleep 1 + + kontext "DocumentImpress" + hMouseClick DocumentImpress, 90, 90 + + printlog "Insert Smiley." + kontext "Toolbar" + sleep 1 + try + SymbolShapes.TearOff + catch + warnlog "bug for GH from FHA; .tearoff doesnt tell success" + endcatch + kontext "SymbolShapes" + sleep 1 + SymbolShapesSmiley.Click + sleep 1 + gMouseDown (70,70) + gMouseMove (70,70,89,89) + gMouseUp (89,89) + + hTypeKeys "<ESCAPE>" + hTypeKeys "<TAB>", 3 + sleep (1) + + printlog "rename object" + DocumentImpress.TypeKeys "<SHIFT F10>" + sleep (1) + printlog "Choose rename" + if hMenuFindSelect(27027, true, 15) = false then + Warnlog "Context-Menu-entry `Rename` was not found. Therefore the test ends." + Call hCloseDocument + Goto Endsub + endif + kontext "NameDlgObject" + NameField.SetText "Third" + NameDlgObject.OK + sleep 1 + + kontext "DocumentImpress" + hMouseClick DocumentImpress, 90, 90 + + printlog "Close the bars we opened before." + kontext "Connectorsbar" + if Connectorsbar.Exists then Connectorsbar.Close + kontext "SymbolShapes" + if SymbolShapes.Exists then SymbolShapes.Close + kontext "StarShapes" + if StarShapes.Exists then StarShapes.Close + + printlog "Copy the slide to the clipboard" + kontext "Slides" + SlidesControl.TypeKeys "<PAGEUP>" + sleep (1) + SlidesControl.TypeKeys "<SHIFT F10>" + sleep (1) + printlog "Choose `Copy`" + if hMenuFindSelect(5711, true, 10) = false then + Warnlog "Context-Menu-entry `Copy` was not found.Therefore the test ends." + Call hCloseDocument + Goto Endsub + endif + + printlog "Paste the content from the Clipboard" + kontext "Slides" + printlog "open context-menu choose 'paste'" + + EditPaste + + kontext "InsertPaste" + if InsertPaste.Exists(1) then + After.Check + InsertPaste.OK + endif + sleep (2) + printlog "Check if we have two slides, and that the objects exists, and has the right values " + + kontext "Slides" + SlidesControl.TypeKeys "<PAGEUP>" + + for i = 1 to 2 + Printlog "Checking objects the " + i + " + time." + kontext "DocumentImpress" + hMouseClick DocumentImpress, 90, 90 + DocumentImpress.TypeKeys "<TAB>" + sleep (1) + + DocumentImpress.TypeKeys "<SHIFT F10>" + sleep 1 + printlog "Choose rename" + if hMenuFindSelect(27027, true, 14) = false then + Warnlog "Context-Menu-entry `Rename` was not found. Therefore the test ends." + Call hCloseDocument + Goto Endsub + endif + + printlog "Read out what the name is, and check if its correct." + kontext "NameDlgObject" + value1 = NameField.GetText + NameDlgObject.OK + + if value1 = "First" then + printlog "First object was found correctly" + else + Warnlog "Wrong object or object-name! The name found was: " + value1 + endif + + hTypeKeys "<ESCAPE>" + DocumentImpress.TypeKeys "<TAB>", 2 + sleep (1) + DocumentImpress.TypeKeys "<SHIFT F10>" + + printlog "Choose rename" + if hMenuFindSelect(27027, true, 15) = false then + Warnlog "Context-Menu-entry `Rename` was not found. Therefore the test ends." + Call hCloseDocument + Goto Endsub + endif + + printlog "Read out what the name is, and check if its correct." + kontext "NameDlgObject" + value12 = NameField.GetText + NameDlgObject.OK + + if value12 = "Second" then + printlog "Second object was found correctly" + else + Warnlog "Wrong object or object-name! The name found was: " + value12 + endif + + hTypeKeys "<ESCAPE>" + printlog "Select the third object." + hTypeKeys "<TAB>", 3 + sleep (1) + + printlog "Bring up the kontext-menu for the object" + DocumentImpress.TypeKeys "<SHIFT F10>" + sleep 1 + printlog "Choose rename" + if hMenuFindSelect(27027, true, 15) = false then + Warnlog "Context-Menu-entry `Rename` was not found. Therefore the test ends." + Call hCloseDocument + Goto Endsub + endif + + printlog "Read out what the name is, and check if its correct." + kontext "NameDlgObject" + value13 = NameField.GetText + NameDlgObject.OK + + if value13 = "Third" then + printlog "Third object was found correctly" + else + Warnlog "Wrong object or object-name! The name found was: " + value13 + endif + kontext "Slides" + SlidesControl.TypeKeys "<DOWN>" + next i + + printlog " Close Presentation. End testcase " + Call hCloseDocument +endcase 'tiSlidecopyDuplicate + +'----------------------------------------------------------------------- + +testcase tiSlideCopyPasteSpecial + qaerrorlog "#i93377#: Paste special dialog does not come up with kontext on slide pane" + goto endsub + + Dim value1 as string + Dim value2 as string + Dim value3 as string + printlog "Copies slide, and pastes it with Paste Special" + printlog "just to see if the office can handle it" + printlog "Make new presentation" + Call hNewDocument + printlog "Insert three objects: Connector, Door-plate, and Smiley" + + printlog "Insert Connector" + kontext "Toolbar" + sleep 1 + try + Verbinder.TearOff + catch + warnlog "bug for GH from FHA; .tearoff doesnt tell success" + endcatch + kontext "Connectorsbar" + sleep 1 + Verbinder.click + sleep 1 + gMouseDown (10,10) + gMouseMove (10,10,30,30) + gMouseUp (30,30) + + kontext "DocumentImpress" + hMouseClick DocumentImpress, 90, 90 + + printlog "Insert Door-plate" + kontext "Toolbar" + sleep 1 + try + StarShapes.TearOff + catch + warnlog "bug for GH from FHA; .tearoff doesnt tell success" + endcatch + kontext "StarShapes" + sleep 1 + StarShapesDoorplate.click + sleep 1 + gMouseDown (40,40) + gMouseMove (40,40,60,60) + gMouseUp (60,60) + + kontext "DocumentImpress" + hMouseClick DocumentImpress, 90, 90 + + printlog "Insert Smiley" + kontext "Toolbar" + sleep 1 + try + SymbolShapes.TearOff + catch + warnlog "bug for GH from FHA; .tearoff doesnt tell success" + endcatch + kontext "SymbolShapes" + sleep 1 + SymbolShapesSmiley.Click + sleep 1 + gMouseDown (70,70) + gMouseMove (70,70,89,89) + gMouseUp (89,89) + + printlog "Copy the slide to the clipboard" + kontext "Slides" + SlidesControl.TypeKeys "<PAGEUP>" + SlidesControl.TypeKeys "<SHIFT F10>" + sleep 1 + 'Choose `Copy` + if hMenuFindSelect(5711, true, 10) = false then + Warnlog "Context-Menu-entry `Copy` was not found. Therefore the test ends." + Call hCloseDocument + Goto Endsub + endif + + printlog "Try to paste special. And check that the office still stays alive" + EditPasteSpecial + kontext "InhaltEinfuegen" + InhaltEinfuegen.OK + + printlog "Close the bars we opened before" + kontext "Connectorsbar" + if Connectorsbar.Exists then Connectorsbar.Close + kontext "SymbolShapes" + if SymbolShapes.Exists then SymbolShapes.Close + kontext "StarShapes" + if StarShapes.Exists then StarShapes.Close + + sleep 1 + kontext "DocumentImpress" + printlog "Close Presentation. End testcase" + + Call hCloseDocument +endcase 'tiSlideCopyPasteSpecial + +'----------------------------------------------------------------------- + +testcase tiSlideCopyInSlideSorter + qaerrorlog "#i58418#: Pasting in slide sorter sets slide to wrong position" + goto endsub + + Dim value1 as string + Dim value2 as string + Dim value3 as string + printlog "Copies slides within the slidesorter, and makes sure they are pasted on the correct position" + printlog "Make new presentation" + Call hNewDocument + printlog "Insert an object: Connector, on the first slide" + kontext "Toolbar" + sleep 1 + try + Verbinder.TearOff + catch + warnlog "bug for GH from FHA; .tearoff doesnt tell success" + endcatch + kontext "Connectorsbar" + sleep 1 + Verbinder.click + Verbinder.click + Verbinder.click + sleep 1 + kontext "DocumentImpress" + gMouseDown (10,10) + gMouseMove (10,10,30,30) + gMouseUp (30,30) + Printlog " Inserted a Connector-object." + hTypeKeys "<ESCAPE>" + hTypeKeys "<TAB>", 1 + DocumentImpress.TypeKeys "<SHIFT F10>" + if hMenuFindSelect(27027, true, 14) = false then + Warnlog "Context-Menu-entry `Rename` was not found. Therefore the test ends." + Call hCloseDocument + Goto Endsub + endif + kontext "NameDlgObject" + NameField.SetText "First" + NameDlgObject.OK + sleep 1 + Printlog "Renamed a the object to 'First'" + + sleep 3 + printlog "Rename slide to 1" + kontext "Slides" + SlidesControl.TypeKeys "<PAGEUP>" + SlidesControl.TypeKeys "<SHIFT F10>" + sleep 3 + if hMenuFindSelect(27268, true, 2) = false then + Warnlog "Context-Menu-entry `Rename` was not found. Therefore the test ends." + Call hCloseDocument + Goto Endsub + endif + + kontext "NameDlgPage" + NameField.SetText "1" + NameDlgPage.OK + sleep 1 + Printlog "Renamed the Slide to '1'" + + kontext "DocumentImpress" + hMouseClick DocumentImpress, 90, 90 + sleep 3 + + printlog "Insert a new slide" + kontext "Slides" + SlidesControl.TypeKeys "<TAB><PAGEDOWN>" + SlidesControl.OpenContextMenu + sleep 3 + if hMenuFindSelect(27014, true, 1) = false then + Warnlog "Context-Menu-entry `Insert slide` was not found. Therefore the test ends." + Call hCloseDocument + Goto Endsub + endif + Printlog "Inserted a new slide." + printlog "Insert an object: Door-plate, on the second slide" + kontext "Toolbar" + sleep 1 + try + StarShapes.TearOff + catch + warnlog "bug for GH from FHA; .tearoff doesnt tell success" + endcatch + kontext "StarShapes" + sleep 1 + StarShapesDoorplate.click + sleep 1 + kontext "DocumentImpress" + gMouseDown (40,40) + gMouseMove (40,40,60,60) + gMouseUp (60,60) + Printlog "Inserted a Door-Plate-object." + hTypeKeys "<ESCAPE>" + hTypeKeys "<TAB>", 2 + hTypeKeys "<SHIFT F10>" + if hMenuFindSelect(27027, true, 15) = false then + Warnlog "Context-Menu-entry `Rename` was not found. Therefore the test ends." + Call hCloseDocument + Goto Endsub + endif + + kontext "NameDlgObject" + NameField.SetText "Second" + NameDlgObject.OK + sleep 1 + Printlog "Renamed a the object to 'Second'" + + kontext "DocumentImpress" + hMouseClick DocumentImpress, 90, 90 + sleep 2 + printlog "Rename slide to 2" + kontext "Slides" + SlidesControl.OpenContextMenu + sleep 3 + if hMenuFindSelect(27268, true, 3) = false then + Warnlog "Context-Menu-entry `Rename` was not found. Therefore the test ends." + Call hCloseDocument + Goto Endsub + endif + kontext "NameDlgPage" + NameField.SetText "2" + NameDlgPage.OK + sleep 1 + Printlog " Renamed the slide '2'" + + printlog "Insert a new slide" + kontext "Slides" + Slidescontrol.TypeKeys "<PAGEDOWN>", 2 + Slidescontrol.TypeKeys "<SHIFT F10>" + sleep 3 + if hMenuFindSelect(27014, true, 1) = false then + Warnlog "Context-Menu-entry `Insert slide` was not found. Therefore the test ends." + Call hCloseDocument + Goto Endsub + endif + Printlog "Inserted a new slide." + printlog "Insert an object: Smiley, on the second slide" + kontext "Toolbar" + sleep 1 + try + SymbolShapes.TearOff + catch + warnlog "bug for GH from FHA; .tearoff doesnt tell success" + endcatch + kontext "SymbolShapes" + sleep 1 + SymbolShapesSmiley.Click + sleep 1 + gMouseDown (70,70) + gMouseMove (70,70,89,89) + gMouseUp (89,89) + Printlog " Inserted a Smiley-object." + hTypeKeys "<ESCAPE>" + hTypeKeys "<TAB>", 2 + hTypeKeys "<SHIFT F10>" + if hMenuFindSelect(27027, true, 15) = false then + Warnlog "Context-Menu-entry `Rename` was not found. Therefore the test ends." + Call hCloseDocument + Goto Endsub + endif + kontext "NameDlgObject" + NameField.SetText "Third" + NameDlgObject.OK + Printlog " Renamed a the object to 'Third'" + printlog "Rename slide to 3" + kontext "Slides" + Slidescontrol.TypeKeys "<PAGEDOWN>", 2 + SlidesControl.OpenContextMenu + sleep 3 + if hMenuFindSelect(27268, true, 3) = false then + Warnlog "Context-Menu-entry `Rename` was not found. Therefore the test ends." + Call hCloseDocument + Goto Endsub + endif + + kontext "NameDlgPage" + NameField.SetText "3" + NameDlgPage.OK + sleep 1 + Printlog " Renamed the slide '3'" + + printlog "Close the bars we opened before." + kontext "Connectorsbar" + if Connectorsbar.Exists then Connectorsbar.Close + kontext "SymbolShapes" + if SymbolShapes.Exists then SymbolShapes.Close + kontext "StarShapes" + if StarShapes.Exists then StarShapes.Close + + printlog "Change to Slidesorter" + kontext "DocumentImpress" + ViewSlideSorter + + printlog "Now we have changed view to the slidesorter" + + kontext "Slides" + Printlog "Changed view to 'SlideSorter'" + printlog "Make sure the last slide is selcted" + SlidesControl.TypeKeys "<TAB>" + SlidesControl.TypeKeys "<PAGEDOWN>", 3 + + printlog "Cut the last slide" + SlidesControl.TypeKeys "<MOD1 X>" + + printlog "Make sure the first slide is selected" + SlidesControl.TypeKeys "<TAB>" + SlidesControl.TypeKeys "<PAGEUP>", 2 + sleep 1 + + printlog "Paste the Slide" + kontext "Slides" + SlidesControl.TypeKeys "<MOD1 V>" + + printlog "choose Before as specification for where" + Kontext "InsertPaste" + if InsertPaste.Exists(3) then + Before.Check + InsertPaste.OK + Printlog " Pasted slide 'Before'" + else + warnlog "Problem when copying/pasting slide." + endif + + printlog "Check where the slide ended up" + kontext "Slides" + SlidesControl.TypeKeys "<TAB>" + SlidesControl.TypeKeys "<PAGEUP>", 3 'to get to the first slide + SlidesControl.TypeKeys "<SHIFT F10>" + sleep 3 + if hMenuFindSelect(27268, true, 3) = false then + Warnlog "Context-Menu-entry `Rename` was not found. Therefore the test ends." + Call hCloseDocument + Goto Endsub + endif + + kontext "NameDlgPage" + if NameField.GetText <> "3" then + Warnlog "Wrong slide found! Expected nr 3, but found " + NameField.GetText + "." + else + Printlog " Slide nr 3 was found correctly." + endif + NameDlgPage.OK + sleep 1 + + kontext "Slides" + printlog "Choose the slide in the middle (named 1)" + SlidesControl.TypeKeys "<TAB>" + printlog "to get to the last slide" + SlidesControl.TypeKeys "<PAGEDOWN>", 3 + printlog "to go back one step" + SlidesControl.TypeKeys "<PAGEUP>" + SlidesControl.OpenContextMenu (true) + printlog "Check the name of that slide (via Rename)" + if hMenuFindSelect(27268, true, 3) = false then + Warnlog "Context-Menu-entry `Rename` was not found. Therefore the test ends." + Call hCloseDocument + Goto Endsub + endif + + kontext "NameDlgPage" + if NameField.GetText <> "1" then + Warnlog "Wrong slide found! Expected nr 1, but found " + NameField.GetText + "." + else + Printlog " Slide nr 1 was found correctly in the middle position." + endif + NameDlgPage.OK + sleep 1 + kontext "Slides" + + printlog "Cut the slide" + SlidesControl.TypeKeys "<SHIFT F10>" + sleep 3 + if hMenuFindSelect(5710, true, 10) = false then + Warnlog "Context-Menu-entry `Cut` was not found. Therefore the test ends." + Call hCloseDocument + Goto Endsub + endif + + printlog "Make sure we have selected the last slide" + SlidesControl.TypeKeys "<TAB>" + SlidesControl.TypeKeys "<PAGEDOWN>", 2 + + printlog "Place the mousepointer to the left of the first slide" + sleep 1 + kontext "Slides" + SlidesControl.MouseMove 2, 3 + SlidesControl.OpenContextMenu true + sleep 3 + + printlog "Paste the Slide" + if hMenuFindSelect(5712, true, 12) = false then + Warnlog "Context-Menu-entry `Paste` were not found. Therefore the test ends." + Call hCloseDocument + Goto Endsub + endif + sleep 1 + + printlog "Choose After as specification for where" + Kontext "InsertPaste" + if InsertPaste.Exists(3) then + After.Check + InsertPaste.OK + Printlog " Pasted slide 'After'" + else + warnlog " Problem when copying/pasting slide." + endif + + printlog "Check where the slide ended up. Should have showed up at the last position" + kontext "Slides" + SlidesControl.TypeKeys "<TAB>" + printlog "to get to the last slide" + SlidesControl.TypeKeys "<PAGEDOWN>", 3 + printlog "open context menu" + SlidesControl.TypeKeys "<SHIFT F10>" + sleep 3 + printlog "Rename" + if hMenuFindSelect(27268, true, 3) = false then + Warnlog "Context-Menu-entry `Rename` was not found. Therefore the test ends." + Call hCloseDocument + Goto Endsub + endif + + kontext "NameDlgPage" + if NameField.GetText <> "1" then + Warnlog "Wrong slide found! Expected nr 1, but found " + NameField.GetText + "." + else + Printlog " Slide nr 1 was found correctly." + endif + NameDlgPage.OK + sleep 1 + + printlog "Close Presentation. End testcase" + Call hCloseDocument +endcase 'tiSlideCopyInSlideSorter + +'------------------------------------------------------------------------ diff --git a/testautomation/graphics/optional/includes/impress/i_slidelayer.inc b/testautomation/graphics/optional/includes/impress/i_slidelayer.inc new file mode 100644 index 000000000000..508394144663 --- /dev/null +++ b/testautomation/graphics/optional/includes/impress/i_slidelayer.inc @@ -0,0 +1,527 @@ +'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@oracle.com +'* +'* short description : +'* +'********************************************************************* + +' Dateiname.SetText ConvertPath (gTesttoolPath + "global\input\graf_inp\enter.bmp") +' Inhalt.SetText ConvertPath (gTesttoolPath + "graphics\required\input\leer.sxd") + +'------------------------------------------------------------------------------- +testcase tiInsertExpandSlide + + dim i,x as integer + dim sTemp as string + dim b116350 as boolean + + printlog "open application " + Call hNewDocument + Call sSelectEmptyLayout + printlog "create presupposition" + printlog "View->Master View->Outline View " + ViewWorkspaceOutlineView + Sleep 1 + Kontext "DocumentImpressOutlineView" + 'create a slide with some levels...and some more slides with just one level... " + 'it should look like this: " + '-------------------------------------------------- " + 'Slide 1" + ' - A " + '- - B" + ' - - - C" + ' - - - - D" + ' - - - - - - F" + ' - B" + ' - C" + ' - D" + ' Slide 2 " + ' Slide 3 " + ' Slide 4 " + ' Slide 5 " + '-------------------------------------------------- " + DocumentImpressOutlineView.TypeKeys "Slide 1" + for i = 1 to 6 + DocumentImpressOutlineView.TypeKeys "<return><tab>" + DocumentImpressOutlineView.TypeKeys chr(64+i) + next i + DocumentImpressOutlineView.TypeKeys "<return>" + DocumentImpressOutlineView.TypeKeys ("<shift tab>",5) + for i = 1 to 3 + DocumentImpressOutlineView.TypeKeys chr(65+i) + DocumentImpressOutlineView.TypeKeys "<return>" + next i + DocumentImpressOutlineView.TypeKeys ("<shift tab>") + for i = 2 to 5 + DocumentImpressOutlineView.TypeKeys "Slide " + i + DocumentImpressOutlineView.TypeKeys "<return>" + next i + DocumentImpressOutlineView.TypeKeys "<backspace>" + printlog " View->Master View->Drawing View " + ViewWorkspaceDrawingView + Sleep 1 + printlog "there have to be 5 slides now " + fGetSlideCount (5) + + printlog "goto the first slide " + hTypeKeys "<home>" + printlog "Insert->Expand Slide" + InsertExpandSlide + ' usually the content of the new pages is the same as the curren, there is a slide created for every part in the first outline level (gliederungsebene) + Sleep 1 + if (8 = fGetSlideCount (8)) then + printlog "Insert Expand Slide accomplished correctly" + else + warnLog "Bug with Insert Expand Slide" + endif + printlog " check slide content " + hTypeKeys ("<TAB><F2>" + EditSelectAll + EditCopy + sTemp = GetClipboard() + if (sTemp <> "A") then + Warnlog "wrong slide content, expected: '" + "Slide 1" + "'; but got: '" + sTemp + "'" + else + Printlog "OK :-)" + endif + for i = 2 to 4 + hTypeKeys "<pagedown>" + hTypeKeys ("<TAB><F2>") + EditSelectAll + EditCopy + sTemp = GetClipboard() + if (sTemp <> chr(64+i)) then + Warnlog "Wrong slide content, expected: '" + chr(64+i) + "'; but got: '" + sTemp + "'" + else + Printlog "OK :-)" + endif + next i + for i = 2 to 5 + hTypeKeys "<pagedown>" 'If the first slide existed, this is where it would have been. + hTypeKeys ("<TAB><F2>") + EditSelectAll + EditCopy + sTemp = GetClipboard() + if (sTemp <> ("Slide "+i)) then + Warnlog "Wrong slide content, expected: '" + "Slide "+i + "'; but got: '" + sTemp + "'" + else + Printlog "OK :-)" + endif + next i + + hTypeKeys "<escape><home>" + printlog "Insert->Expand Slide" + InsertExpandSlide + printlog "And since the Second slide now should be named B, we check that first " + hTypeKeys ("<TAB><F2>") + EditSelectAll + try + EditCopy + catch + printlog "Something wrong when trying to select Slide-name." + endcatch + sTemp = GetClipboard() + if (sTemp <> "B") then + Warnlog "Wrong slide content, expected: 'B'; but got: '" + sTemp + "'" + else + Printlog "OK :-)" + endif + hTypeKeys "<pagedown>" + hTypeKeys ("<TAB><F2>") + EditSelectAll + for i = 2 to 4 + try + EditCopy + catch + printlog "Something wrong when trying to select Slide-name." + endcatch + sTemp = GetClipboard() + if (sTemp <> chr(64+i)) then + Warnlog "Wrong slide content, expected: '" + chr(64+i) + "'; but got: '" + sTemp + "'" + else + Printlog "OK :-)" + endif + hTypeKeys "<pagedown>" + hTypeKeys ("<TAB><F2>") + EditSelectAll + next i + for i = 2 to 5 + EditCopy + sTemp = GetClipboard() + if (sTemp <> ("Slide "+i)) then + Warnlog "Wrong slide content, expected: '" + "Slide "+i + "'; but got: '" + sTemp + "'" + else + Printlog "OK :-)" + endif + hTypeKeys "<pagedown>" 'If the first slide existed, this is where it would have been. + hTypeKeys ("<TAB><F2>") + EditSelectAll + next i + + printlog "close application " + Call hCloseDocument +endcase 'tiInsertExpandSlide + +'------------------------------------------------------------------------------- +testcase tiInsertSummarySlide + + dim i as integer + dim sTemp as string + dim saText (10) as string + + for i = 1 to 7 + saText (i) = chr(64+i) + next i + saText (5) = "" + saText (7) = "" + + printlog "Open application." + Call hNewDocument + + printlog "Presupposition : on the slide has to be something from the outline view AND i have to be on such a slide!" + printlog "View->Master View->Outline View." + ViewWorkspaceOutlineView + Sleep 1 + Kontext "DocumentImpressOutlineView" + DocumentImpressOutlineView.TypeKeys "<home>" + printlog "+ create 7 slides like this:" + printlog "+--------------------------------------------------" + printlog "+ A " + printlog "+ B" + printlog "+ C" + printlog "+ D" + printlog "+ " + printlog "+ F" + printlog "+ " + printlog "+--------------------------------------------------" + for i = 1 to 7 + DocumentImpressOutlineView.TypeKeys (saText(i) + "<return>") + next i + + printlog "View->Master View->Drawing View ." + ViewWorkspaceDrawingView + Sleep 1 + printlog "Goto first slide by typing [home]" + hTypeKeys "<Home>" + printlog "test menue entries" + printlog "Insert->Summery Slide." + try + InsertSummerySlide + catch + warnlog "InsertSummerySlide didnt work. Check why." + endcatch + Sleep 1 + printlog "slide is appended after the last slide" + printlog "the content of the slide depends on from which slide the function was called!" + printlog "it is only from the actual slide to the end of the presentation" + printlog "it is aloowed to have a slide without the outline stuff inbetween" + printlog "check slide content" + hTypeKeys "<Tab>" + wait 50 + htypekeys "<Tab>" + wait 50 + htypekeys "<F2>" + wait 50 + htypekeys "<mod1 Home>" + wait 50 + for i = 1 to 7 + hTypeKeys "<Shift End>" + EditCopy + sTemp = GetClipboardText + if (saText(i) <> sTemp) then + if ((i=5) OR (i=7)) then + if (saText(6) <> sTemp) then + Warnlog "WRONG: is: '" + sTemp + "'; should: '" + saText(6) + "'" + else + Printlog "is: '" + sTemp + "'; should: '" + saText(i) + "'" + endif + else + Warnlog "WRONG: is: '" + sTemp + "'; should: '" + saText(i) + "'" + endif + else + Printlog "is: '" + sTemp + "'; should: '" + saText(i) + "'" + endif + hTypeKeys "<down><home>" + next i + printlog "close application" + Call hCloseDocument +endcase 'tiInsertSummarySlide + +'------------------------------------------------------------------------------ +testcase tiFormatSeitenlayout + + qaerrorlog "outcommented due to bug" + goto endsub + + Printlog "Format/Page Layout" + printlog "new impress document " + Call hNewDocument + + printlog "format page " + FormatPage + Kontext "Tasks" + sleep 5 + printlog "get page name " + SetClipboard LayoutsPreview.GetText + printlog "change page name " + SeitenName.SetText "Test" + sleep 1 + printlog "check background " + if Hintergrund.IsChecked=False Then + Hintergrund.Check + else + Hintergrund.UnCheck + if Hintergrund.IsChecked=False Then PrintLog " Background is deactivated" + end if + + printlog "change status of objects on background " + if ObjekteAufDemHintergrund.IsChecked = True Then + PrintLog " Object on background is activated" + ObjekteAufDemHintergrund.UnCheck + if ObjekteAufDemHintergrund.IsChecked = False Then PrintLog " Objects on background are deactivated" + else + ObjekteAufDemHintegrund.Check + PrintLog " Object on background is activated" + end if + printlog "close dialog " + Seitenlayout.OK + sleep 1 + printlog "reopen dialog " + FormatPage + Kontext "LayoutsPreview" + sleep 2 + if GetClipboardText <> SeitenName.GetText Then + PrintLog " Page name is correct" + else + WarnLog " Page name is not correct" + end if + sleep 2 + printlog "assign different page layout " + LayoutsPreview.TypeKeys "<TAB>" + LayoutsPreview.TypeKeys "<DOWN>" ,2 + LayoutsPreview.TypeKeys "<Return>" + sleep 2 + Kontext + if Active.Exists (5) then + printlog "active (1): "+active.gettext + Active.OK + else + kontext "Pagelayout_UndoDeleteWarning" + Pagelayout_UndoDeleteWarning.OK + printlog "Can't redo this action! Apply template? -> OK (1) " + 'DontShowAgain.check ' since it's a level2 test i COULD do this .-) TBO + endif + Kontext "DocumentImpress" + sleep 3 + DocumentImpress.MouseDoubleClick 25,60 + sleep 3 + printlog "check in document if layout has changed " + Kontext "GrafikEinfuegenDlg" + sleep 2 + if GrafikEinfuegenDlg.exists (5) then + try + DateiName.SetText ConvertPath (gTesttoolPath + "global\input\graf_inp\baer.tif") + sleep 3 + Preview.Check + sleep 3 + Oeffnen.Click + sleep 3 + Kontext "Active" + if Active.Exists Then + Warnlog Active.GetText + Active.OK + end if + catch + WarnLog " LayoutsPreview did not work" + endcatch + else + warnlog "Clicked beside :-( I tried to click into the dokument, to insert a graphic, but missed the right point :-(" + endif + sleep 3 + Kontext "DocumentImpress" + printlog "close document " + Call hCloseDocument + endcase 'tiFormatSeitenlayout + +'------------------------------------------------------------------------------ +testcase t114174 + + printlog "resulting from regression in #111862# " + dim sReference(2) as string + dim sText(2) as string + dim i as integer + dim sFile as string + + if gApplication = "IMPRESS" then + ExtensionString = "odp" + else + ExtensionString = "odg" + end if + printlog "Used extension string is: " & ExtensionString + sFile = convertPath(gOfficePath + "user/work/" + getTestcaseName & "." & ExtensionString) + printlog "Filepath is: " & sFile + if Dir (sFile) <> "" then kill (sFile) + + sReference(1) = "Koelle" + sReference(2) = "Alaaf!" + printlog "open application " + Call hNewDocument + + printlog "Format->Modify Layout " + FormatPage + Kontext "Tasks" + LayoutsPreview.TypeKeys "<TAB>" + LayoutsPreview.TypeKeys "<Home><Right>" + + kontext "Pagelayout_UndoDeleteWarning" + if Pagelayout_UndoDeleteWarning.exists then + Pagelayout_UndoDeleteWarning.ok + endif + Kontext "Tasks" + LayoutsPreview.TypeKeys "<Return>" + printlog "(a) setting title and body text" + for i = 1 to 2 + hTypeKeys("<Tab><F2>") + hTypeKeys(sReference(i)) + EditSelectAll + EditCopy + sText(i) = getClipboardText() + printlog sText(i) + hTypeKeys("<Escape>") + if (sText(i) <> sReference(i)) then + warnlog "(1) selected text '" + sText(i) + "' is different from inserted text '" + sReference(i) + "'" + endif + next i + + printlog "deselect all by typing key 'ESCAPE' again " + hTypeKeys("<Escape>") + + hFileSaveAsKill(sFile) + sleep 5 + + printlog "(b) checking title and body text" + for i = 1 to 2 + hTypeKeys("<Tab><F2>") + EditSelectAll + try + EditCopy + sText(i) = getClipboardText() + catch + sText(i) = "" + endcatch + if (sText(i) <> sReference(i)) then + warnlog " (2) selected text '" + sText(i) + "' is different from inserted text '" + sReference(i) + "'" + endif + hTypeKeys("<Escape>") + next i + + hCloseDocument() + + printlog " (c) checking title and body text of saved document" + hFileOpen(sFile) + sleep 5 + for i = 1 to 2 + hTypeKeys("<Tab><F2>") + EditSelectAll + try + EditCopy + sText(i) = getClipboardText() + catch + sText(i) = "" + endcatch + hTypeKeys("<Escape>") + if (sText(i) <> sReference(i)) then + warnlog " (3) selected text '" + sText(i) + "' is different from inserted text '" + sReference(i) + "'" + endif + next i + + hCloseDocument() +endcase 't114174 + +'------------------------------------------------------------------------------ +testcase t111862 + + qaerrorlog "outcommented due to bug" + goto endsub + dim sReference(2) as string + dim sText(2) as string + dim i as integer + dim sFile as string + + sFile = convertPath(gOfficePath + "/user/work/" + getTestcaseName + ".sxi") + + if FileExists(sFile) then + kill sFile + endif + + sReference(1) = "Koelle" + sReference(2) = "Alaaf!" + printlog "open application " + Call hNewDocument + + printlog "Format->Modify Layout " + Formatpage + Kontext "Tasks" + LayoutsPreview.TypeKeys "<TAB>" + LayoutsPreview.TypeKeys "<Home>" + LayoutsPreview.TypeKeys "<Return>" + Kontext "Pagelayout_UndoDeleteWarning" + if Pagelayout_UndoDeleteWarning.exists(5) then + Pagelayout_UndoDeleteWarning.OK + endif + Kontext "Tasks" + LayoutsPreview.TypeKeys "<Right>" + LayoutsPreview.TypeKeys "<Return>" + Kontext "Pagelayout_UndoDeleteWarning" + if Pagelayout_UndoDeleteWarning.exists(5) then + Pagelayout_UndoDeleteWarning.OK + endif + Kontext "Tasks" + LayoutsPreview.TypeKeys "<Right>" + LayoutsPreview.TypeKeys "<Return>" + Kontext "Pagelayout_UndoDeleteWarning" + if Pagelayout_UndoDeleteWarning.exists(5) then + Pagelayout_UndoDeleteWarning.OK + endif + + EditSelectAll + i=0 + gMouseMove2(30,1) + while ((getMouseStyle <> 6) AND (i<100)) + inc (i) + gMouseMove2(30,i) + 'printlog getMouseStyle + wend + + gMouseMove(30, i, 70, i+20) + + hCloseDocument() + +endcase 't111862 +'------------------------------------------------------------------------------
\ No newline at end of file diff --git a/testautomation/graphics/optional/includes/impress/i_slideshow.inc b/testautomation/graphics/optional/includes/impress/i_slideshow.inc new file mode 100644 index 000000000000..da96b13cc47d --- /dev/null +++ b/testautomation/graphics/optional/includes/impress/i_slideshow.inc @@ -0,0 +1,1245 @@ +'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@oracle.com +'* +'* short description : +'* +'\****************************************************************** + +testcase tSlideShowSlideShow + + dim bLoaded as boolean + dim i as integer + dim testfile as string + dim localtestfile as string + + printlog "open file 'graphics\input\diashow.odp' " + testfile = ( gTesttoolPath + "graphics\required\input\diashow.odp" ) + hFileOpenLocally( testfile ) + sleep 30 + + bLoaded = false + + Kontext "Navigator" + if Navigator.Exists then Navigator.Close + + printlog "Deactivate Start with current page in ToolsOptions " + setStartCurrentPage(FALSE) + + try + printlog "SlideShow->Slide Show Settings... " + SlideShowPresentationSettings + bLoaded = true + catch + warnlog "SlideShowPresentationSettings could not be run, because document didn't get loaded in time ??! :-(" + endcatch + if bLoaded then + Kontext "Bildschirmpraesentation" + + printlog "check Radio button 'Type': 'Window' " + Fenster.Check + printlog "close dialog 'Slide Show' with OK " + Bildschirmpraesentation.OK + sleep 3 + printlog "start the slideshow with 'Slide Show->Slide Show' " + SlideShowSlideshow + sleep 3 + Kontext "DocumentPresentation" + sleep 5 + printlog "end the presentation by typing [ESCAPE] " + DocumentPresentation.TypeKeys "<ESCAPE>" + sleep 3 + try + hTypeKeys "<TAB>" + Printlog "- Slideshow ended using 'ESCAPE'" + catch + Warnlog "- Slideshow did not end" + DocumentPresentation.TypeKeys "<ESCAPE>" + sleep 3 + endcatch + + printlog "start the slideshow with 'Slide Show->Slide Show' " + SlideShowSlideshow + Kontext "DocumentPresentation" + Printlog "- Check if slideshow runs" + sleep 5 + try + DocumentPresentation.TypeKeys "<pagedown>" + catch + Warnlog "Presentation is not running !" + endcatch + sleep 5 + printlog "type the key [SHIFT + F5] to open the navigator " + DocumentPresentation.TypeKeys "<MOD1 SHIFT F5>" + Kontext "NavigatorDraw" + sleep 1 + printlog "check in list, if the page changed " + if Liste.GetSelIndex <> 2 Then Warnlog "- pagedown not working: '" + Liste.GetSelText+"'" + Kontext "DocumentPresentation" + printlog "press key [cursor right] 3 times " + for i = 1 to 3 + sleep 3 + DocumentPresentation.TypeKeys "<right>" + next i + sleep (3) + DocumentPresentation.MouseDown 50,50 + DocumentPresentation.MouseUp 50,50 + sleep 10 + try + Kontext "DocumentPresentation" + DocumentPresentation.MouseDown 50,50 + DocumentPresentation.MouseUp 50,50 + Warnlog "- Slideshow still running" + DocumentPresentation.TypeKeys "<ESCAPE>" + catch + Printlog "- Slideshow ended at the right time" + endcatch + sleep 2 + else + warnlog "Document didn't get loaded" + endif + Kontext "DocumentImpress" + printlog " Close the Navigator " + DocumentImpress.TypeKeys "<MOD1 SHIFT F5>" + printlog "Set Start with current page back to default = on, in ToolsOptions " + setStartCurrentPage(TRUE) + printlog "close the application " + Call hCloseDocument + localtestfile = hFileGetLocalPath( gTesttoolPath + "diashow.odp" ) + printlog localtestfile + if (FileExists (localtestfile)) then + app.kill (localtestfile) + printlog "Deleting used file." + else + warnlog "File is missing." + endif +endcase 'tSlideShowSlideShow + +'------------------------------------------------------------------------------- + +testcase tSlideShowRehearseTimings + + qaerrorlog "#i64783# - tSlideShowRehearseTimings outcommented due to bug" + goto endsub + + dim bLoaded as boolean + dim i as integer + + printlog "open file 'graphics\input\diashow.odp' " + hFileOpen ConvertPath (gTesttoolPath + "graphics\required\input\diashow.odp") + 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 + Kontext "Navigator" + if Navigator.Exists then Navigator.Close + bLoaded = false + try + printlog "SlideShow->Slide Show Settings... " + SlideShowPresentationSettings + bLoaded = true + catch + warnlog "SlideShowPresentationSettings could not be run, because document didn't get loaded in time ( ?? ) :-(" + endcatch + if bLoaded then + Kontext "Bildschirmpraesentation" + printlog "check Radio button 'Type': 'Window' " + Fenster.Check + printlog "close dialog 'Slide Show' with OK " + Bildschirmpraesentation.OK + sleep 3 + printlog "start the slideshow with 'Slide Show->Rehearse Timings' " + SlideShowRehearseTimings + Kontext "DocumentPresentation" + if DocumentPresentation.Exists then + printlog "OK" + else + warnlog "bah" + endif + printlog "press key [return] 5 times " + for i = 1 to 5 + sleep 5 + DocumentPresentation.TypeKeys "<return>" + next i + sleep 5 + try + gMouseClick 50,50 + Printlog "- Slideshow ended " + catch + Kontext "DocumentPresentation" + Warnlog "- Slideshow still running" + DocumentPresentation.TypeKeys "<ESCAPE>" + sleep 3 + endcatch + sleep 2 + else + warnlog "Documnet didn't get loaded" + endif + + printlog " check state of navigator ! expected: closed " + Kontext "Navigator" + if Navigator.exists then + printlog " close navigator ! " + Navigator.Close + else + printlog "Navigator: NOT available" + endif + printlog "close the application " + Call hCloseDocument + +endcase 'tSlideShowRehearseTimings + +'------------------------------------------------------------------------------- +testcase tSlideShowSlideShowSettings + + dim bLoaded as boolean + dim i as integer + dim x as integer + dim sTemp as string + dim saSlideNames(4) as string + dim bCurrentPage as boolean + dim sTestfile as string + dim sLocaltestfile as string + + S1 = glLocale (2) + " 1" + S2 = glLocale (2) + " 2" + S3 = glLocale (2) + " 3" + S4 = glLocale (2) + " 4" + saSlideNames(1) = S1 + saSlideNames(2) = S2 + saSlideNames(3) = S3 + saSlideNames(4) = S4 + + ' the navigator you open during a presentation is closed after the last slide (in full screen mode) + ' the state of the navigator in the normal view is not affected + ' the navigator that is open in normal view, is not visible in windows presenattions + + printlog "open application " + Call hNewDocument + + printlog " check state of navigator ! expected: closed " + Kontext "Navigator" + if Navigator.exists then + printlog "close navigator ! " + Navigator.Close + QaErrorLog "Navigator was open. Check earlier tests. Now closed." + else + printlog "Navigator: NOT available. Good." + endif + + printlog "Slide Show -> Slide Show Settings " + SlideShowPresentationSettings + Kontext "Bildschirmpraesentation" + printlog "check checkbox in section 'Range' - 'From: " + AbDia.Check + printlog "get count of slides from listbox 'From:' " + x = AbDiaName.GetItemCount + printlog "check if count in listbox 'from' is '0' " + if (x = 1) Then + Printlog " - Slide count in the list: '" + x + "'" + else + Warnlog " - unexpected slide count; should be '1'; is '" + x + "'" + end if + printlog "close dialog 'Slide Show' with OK " + Bildschirmpraesentation.OK + printlog "Insert->Slide... " + InsertSlide + sleep 2 + hTypekeys "<Pagedown>" + sleep 2 + printlog "Slide Show -> Slide Show Settings " + SlideShowPresentationSettings + Kontext "Bildschirmpraesentation" + Printlog "check if count in listbox 'from' increased" + i = AbDiaName.GetItemCount + if ((i -1) = x) Then + Printlog " - Slide appears in the list; count : '" + i + "'" + else + Warnlog " - Slide not added; is '" + i + "' should: '" + x + "'" + end if + printlog "close dialog 'Slide Show' with CANCEL " + Bildschirmpraesentation.Cancel + printlog "close application " + Call hCloseDocument + sleep 5 + + bLoaded = false + printlog "open file 'graphics\input\diashow.odp' (Slide Show with 4 Slides) " + sTestfile = ( gTesttoolPath + "graphics\required\input\diashow.odp" ) + hFileOpenLocally( sTestfile ) + sleep 10 + + try + Kontext "DocumentImpress" + printlog "Slide Show -> Slide Show Settings " + Printlog "'--------------------------------------------------------------------------" + SlideShowPresentationSettings + bLoaded = true + catch + warnlog "SlideShowPresentationSettings could not be run, because document didn't get loaded in time ( ?? ) :-(" + endcatch + if bLoaded then + Kontext "Bildschirmpraesentation" + if (AlleDias.IsChecked = FALSE) then + Warnlog "'All Slides' is not checked :-(" + endif + if (Standard.IsChecked = FALSE) then + Warnlog "'Default' is not checked :-(" + endif + if (NavigatorSichtbar.IsChecked) then + Warnlog "'Navigator visible' is checked :-(" + endif + printlog "check checkbox 'All Slides'" + AlleDias.Check + printlog "check checkbox 'Window" + Fenster.Check + printlog "check checkbox 'Navigator visible" + NavigatorSichtbar.Check + printlog "close dialog 'Slide Show' with OK " + Bildschirmpraesentation.OK + printlog "start the slideshow with 'Slide Show->Slide Show' " + SlideShowSlideshow + Printlog "'---------------------------- START P -- All -- Window -- Navigator -------------------------" + sleep 5 + printlog " check state of navigator ! expected: open " + Kontext "Navigator" + if Navigator.exists then + Printlog "Navigator: open :-)" + else + Warnlog "Navigator: NOT available :-( will be opened now!" + Kontext "DocumentPresentation" + DocumentPresentation.TypeKeys "<MOD1 SHIFT F5>" + endif + sleep 1 + Kontext "DocumentPresentation" + try + printlog "press pagedown " + DocumentPresentation.TypeKeys "<pagedown>" + catch + Warnlog "presentation is not running !" + endcatch + sleep 5 + Kontext "NavigatorDraw" + if Liste.GetSelIndex <> 2 Then + warnlog "Wrong slide." + endif + printlog "press the key [Page Down] 3 times " + printlog "check in Navigator list, if the slide is number: (times key pressed) " + for i = 2 to 4 + Kontext "Navigator" + if Navigator.exists then + printlog "Navigator was there, good." + else + Warnlog "The Navigator should have been activated, but was not. Opening now." + Kontext "DocumentPresentation" + DocumentPresentation.TypeKeys "<MOD1 SHIFT F5>" + endif + fGetSlideName(saSlideNames(i)) + kontext "DocumentPresentation" + DocumentPresentation.TypeKeys "<pagedown>" + next i + sleep (2) + printlog "press the key [Page Down] to exit presentation " + DocumentPresentation.TypeKeys "<pagedown>" + sleep (5) + try + gMouseClick 50,50 ' this one works to recognice the not ending ! TBO + Printlog "- Slideshow ended at the right time" + catch + Warnlog "- Slideshow still running " + DocumentPresentation.TypeKeys "<ESCAPE>" + endcatch + sleep 2 + printlog " check state of navigator ! expected: open " + Kontext "Navigator" + if Navigator.exists then + printlog "close navigator ! " + Navigator.Close + else + printlog "Navigator: NOT available" + endif + Printlog "'---------------------------------------------------------------" + + Kontext "DocumentPresentation" + printlog "type the key [MOD1 SHIFT F5] to open the navigator " + hTypeKeys "<MOD1 SHIFT F5>" + printlog "Slide Show -> Slide Show Settings " + SlideShowPresentationSettings + Kontext "Bildschirmpraesentation" + if (AlleDias.IsChecked = FALSE) then + Warnlog "'All Slides' is not checked :-(" + endif + if (Fenster.IsChecked = FALSE) then + Warnlog "'Window' is not checked :-(" + endif + if (NavigatorSichtbar.IsChecked = FALSE) then + Warnlog "'Navigator visible' is not checked :-(" + endif + if (DiawechselAufHintergrund.IsChecked = FALSE) then + Warnlog "'Change slides by clicking on background' is not checked :-(" + endif + printlog "check checkbox in section 'Range' - 'From:" + AbDia.Check + printlog "select the 3rd item from the top from listbox 'From:' -> 2 slides to go " + AbDiaName.Select 3 + sTemp = AbDiaName.GetSelText + Printlog " - From '" + sTemp + "' will be shown" + printlog "check checkbox 'Default'" + Standard.Check + printlog "UNcheck checkbox 'Navigator visible'" + NavigatorSichtbar.UnCheck + printlog "UNcheck checkbox 'Change slides by clicking on background'" + DiawechselAufHintergrund.UnCheck + printlog "close dialog 'Slide Show' with OK " + Bildschirmpraesentation.OK + sleep 3 + Kontext "DocumentPresentation" + printlog "start the slideshow with 'Slide Show->Slide Show' " + SlideShowSlideshow + Printlog "'---------------------------- START P -- From -- Default -- Click on Bg -----------------------" + sleep 5 + printlog " check state of navigator ! expected: closed " + Kontext "Navigator" + if Navigator.exists then + printlog "close navigator ! " + Navigator.Close + Warnlog "Navigator: closed" + else + Printlog "Navigator: NOT available. Good." + endif + sleep 1 + printlog "type the key [MOD1 SHIFT F5] to open the navigator " + Kontext "DocumentPresentation" + DocumentPresentation.TypeKeys "<MOD1 SHIFT F5>" + sleep 3 + printlog "check in Navigator list, if the page is THREE! " + fGetSlideName(S3) + printlog "click right mouse button " + sleep 5 + DocumentPresentation.MouseDown 50,50 + DocumentPresentation.MouseUp 50,50 + printlog "check in Navigator list, if the page is still THREE. If so, change slide with PageDown " + if (fGetSlideName(S3) <> S3) then + Warnlog "'Change slides by clicking on background' disable did not work :-(" + else + DocumentPresentation.TypeKeys "<PAGEDOWN>" + endif + printlog "check in Navigator list, if the page is FOUR " + fGetSlideName(S4) + sleep 5 + printlog "press the key [Page Down] " + DocumentPresentation.TypeKeys "<pagedown>" + sleep 5 + printlog "press the key [Space] to exit presentation " + DocumentPresentation.TypeKeys "<Space>" + sleep 10 + try + ViewZoom '-----------!!!!!1 TBO: Make function!!! ----------------------- works! TBO + Kontext "Massstab" + Massstab.OK + catch + Kontext "DocumentPresentation" + DocumentPresentation.TypeKeys "<ESCAPE>" + Warnlog " - Program was still in slideshow mode - ended now ?" + endcatch + printlog " check state of navigator ! expected: open " + Kontext "Navigator" + if Navigator.exists then + printlog "close navigator ! " + Navigator.Close + printlog "Navigator: closed" + else + warnlog "Navigator: NOT available" + endif + Printlog "'--------------------------------------------------------------------------" + + printlog "Slide Show -> Slide Show Settings " + SlideShowPresentationSettings + Kontext "Bildschirmpraesentation" + if (AbDia.IsChecked = FALSE) then + Warnlog "'From' is not checked :-(" + endif + if (Standard.IsChecked = FALSE) then + Warnlog "'Default' is not checked :-(" + endif + if (AbDiaName.GetSelText <> sTemp ) then + Warnlog "'From Slide' has wrong value :-(; should be: '" + sTemp + "' ; is: '" + AbDiaName.GetSelText + "'" + endif + if (DiawechselAufHintergrund.IsChecked) then + Warnlog "'Change slides by clicking in background' is checked :-(" + endif + printlog "check checkbox 'All Slides' " + AlleDias.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.SetText "00:00:05" + printlog "check check box 'Show logo' " + LogoAnzeigen.Check + printlog "check checkbox 'Change slides by clicking on background'" + DiawechselAufHintergrund.Check + printlog "close dialog 'Slide Show' with OK " + Bildschirmpraesentation.OK + printlog "start the slideshow with 'Slide Show->Slide Show' " + SlideShowSlideshow + Printlog "'---------------------------- START P -- All -- Auto -- :05 -- Logo -----------------------------" + sleep 3 + Kontext "DocumentPresentation" + printlog "type the key [MOD1 SHIFT F5] to open the navigator " + DocumentPresentation.TypeKeys "<MOD1 SHIFT F5>" + printlog "press the key [Space] 4 times " + printlog "check in Navigator list, if the slide is number: [(times key pressed) -1 ] " + for i = 1 to 4 + fGetSlideName(saSlideNames(i)) + DocumentPresentation.TypeKeys "<Space>" + sleep 5 + next i + printlog "wait until autopause ended (5 secs) " + sleep 10 + if (fGetSlideName(saSlideNames(1)) = saSlideNames(1)) then + Printlog " - Enless loop works" + else + Warnlog " Enless loop does NOT work" + end if + sleep 2 + printlog "type key [excape] to exit presentation " + Kontext "DocumentPresentation" + DocumentPresentation.TypeKeys "<ESCAPE>" + sleep 5 + try + SlideShowPresentationSettings + Kontext "Bildschirmpraesentation" + Bildschirmpraesentation.OK + catch + Warnlog " - Still in slideshow mode, tries to end again..." + Kontext "DocumentPresentation" + DocumentImpress.TypeKeys "<ESCAPE>" + sleep 5 + endcatch + printlog " check state of navigator ! expected: closed " + Kontext "Navigator" + if Navigator.exists then + Navigator.Close + warnlog "Navigator: closed" + else + printlog "Navigator: NOT available" + endif + Printlog "'--------------------------------------------------------------------------" + + Kontext "DocumentImpress" + printlog "Slide Show -> Slide Show Settings " + SlideShowPresentationSettings + Kontext "BildschirmPraesentation" + printlog "check checkbox 'default' " + Standard.Check + printlog "check checkbox 'Change slides maually'" + ' to check this i need an automatic transition somewhere in the presentation ! + DiawechselManuel.Check + printlog "check checkbox 'Mouse pointer as pen'" + MauszeigerAlsStift.Check + printlog "close dialog 'Slide Show' with OK " + BildschirmPraesentation.Ok + sleep 1 + + printlog "goto the first slide by typing [strg home] " + hTypeKeys "<mod1 home>" + printlog "SlideShow->SlideTransition " + SlideShowSlideTransition + Kontext "Tasks" + printlog "click button 'Extras' " + sleep 1 + printlog "click button 'Automatic Transition' " + TransitionAutomaticallyAfter.Check 'click + printlog " Set Time to '00:00:01' " + TransitionAutomaticallyAfterTime.SetText "2" + printlog " click button 'Assign' " + TransitionApplyToAllSlides.Click + printlog "close dialog 'Slide Transition' " + sleep 3 + + printlog "start the slideshow with keys [STRG F2] " + Kontext "DocumentImpress" + DocumentImpress.TypeKeys "<MOD1 F2>" + Printlog "'---------------------------- START P -- Default -- Manuel ------------------------------" + printlog "wait 10 seconds (to get the dia changed automatical has not to happen !) " + sleep 10 + Kontext "DocumentPresentation" + printlog "type the key [MOD1 SHIFT F5] to open the navigator " + DocumentPresentation.TypeKeys "<MOD1 SHIFT F5>" + printlog "press key [cursor right] 3 times " + for i = 1 to 4 + sleep 5 + fGetSlideName(saSlideNames(i)) + printlog "use the left mouse button, to use the pen drawing function " + DocumentPresentation.MouseDown (10, 10) + DocumentPresentation.MouseMove (10, 90) + DocumentPresentation.MouseUp (10, 90) + DocumentPresentation.TypeKeys "<right>" + next i + printlog "press the key [Page Down] to exit presentation " + sleep (2) + DocumentPresentation.TypeKeys "<pagedown>" + sleep (2) + if DocumentPresentation.Exists then + Warnlog "- Slideshow still running " + DocumentPresentation.TypeKeys "<ESCAPE>" + else + Printlog "- Slideshow ended at the right time" + endif + sleep 2 + printlog " check state of navigator ! expected: closed " + Kontext "Navigator" + if Navigator.exists then + printlog "close navigator ! " + Navigator.Close + warnlog "Navigator: closed" + else + printlog "Navigator: NOT available" + endif + Printlog "'--------------------------------------------------------------------------" + + Kontext "DocumentImpress" + printlog "Slide Show -> Slide Show Settings " + SlideShowPresentationSettings + Kontext "BildschirmPraesentation" + printlog "check checkbox 'default' " + Standard.Check + printlog "UNcheck checkbox 'Change slides manually'" + DiawechselManuel.UNCheck + printlog "UNcheck checkbox 'Mouse pointer as pen' " + MauszeigerAlsStift.UNCheck + printlog "close dialog 'Slide Show' with OK " + BildschirmPraesentation.Ok + sleep 1 + printlog "goto the first slide by typing [strg home] " + hTypeKeys "<MOD1 HOME>" + printlog "Set all slides to 'wait 10 seconds' to get the slide changed automatically " + printlog "SlideShow->SlideTransition " + SlideShowSlideTransition + Kontext "Tasks" + printlog "click button 'Extras' " + sleep 1 + printlog "click button 'Automatic Transition' " + TransitionAutomaticallyAfter.Check 'click + printlog "Set Time to '10sec' " + TransitionAutomaticallyAfterTime.SetText "10" + printlog "click button 'Apply to all Slides' " + TransitionApplyToAllSlides.Click + printlog "close dialog 'Slide Transition' " + sleep (1) + printlog "start the slideshow with keys [STRG F2] " + Kontext "DocumentImpress" + DocumentImpress.TypeKeys "<MOD1 F2>" + Printlog "'---------------------------- START P -- Default -- Automatic -----------------------------" + printlog "Wait 6 seconds to see if the Automatic Transition changes the slide. " + sleep 6 + Kontext "DocumentPresentation" + printlog "type the key [MOD1 SHIFT F5] to open the navigator " + DocumentPresentation.TypeKeys "<MOD1 SHIFT F5>" + printlog "press key [cursor right] 3 times " + for i = 2 to 4 + sleep (5) + fGetSlideName(saSlideNames(i)) + DocumentPresentation.TypeKeys "<right>" + next i + printlog "press the key [Page Down] to exit presentation " + sleep (2) + DocumentPresentation.TypeKeys "<PAGEDOWN>" + sleep (2) + if DocumentPresentation.Exists then + Warnlog "- Slideshow still running " + DocumentPresentation.TypeKeys "<ESCAPE>" + else + Printlog "- Slideshow ended at the right time" + endif + sleep 2 + printlog " check state of navigator ! expected: closed " + Kontext "Navigator" + if Navigator.exists then + printlog "close navigator ! " + Navigator.Close + endif + else + warnlog "document didn't get loaded" + endif + printlog "Set Start with current page back to default = on, in ToolsOptions " + setStartCurrentPage(TRUE) + printlog "Close the document " + call hCloseDocument + sLocaltestfile = hFileGetLocalPath( gTesttoolPath + "diashow.odp" ) + printlog sLocaltestfile + if (FileExists (sLocaltestfile)) then + app.kill (sLocaltestfile) + printlog "Deleting used file." + else + warnlog "File is missing." + endif + +endcase 'tSlideShowSlideShowSettings + +'------------------------------------------------------------------------------- +testcase tSlideShowCustomSlideShow + + Dim Seite as string + dim i as integer + dim x as integer + dim sTemp as string + + Seite = s1 + printlog "open application " + Call hNewDocument + + Kontext "Navigator" + if Navigator.Exists then Navigator.Close + printlog "Deactivate Start with current page in ToolsOptions " + setStartCurrentPage(FALSE) + + printlog "create a rectangle " + hRechteckErstellen 30,30,60,60 + printlog "do 2 times : " + for i = 1 to 2 + printlog "Insert->Slide... " + InsertSlide + sleep 2 + hTypekeys "<Pagedown>" + sleep 2 + printlog "create a rectangle " + hRechteckErstellen 30,30,70,70 + next i + + printlog "Slide Show -> Slide Show Settings " + SlideShowPresentationSettings + Kontext "Bildschirmpraesentation" + if (Fenster.IsChecked = False) Then Fenster.Check + printlog "close dialog 'Slide Show' with OK " + Bildschirmpraesentation.OK + + printlog "Slide Show -> Custom Slide Show... " + SlideShowCustomSlideshow + Kontext "IndividuellePraesentation" + printlog "click button 'New...' " + Neu.Click + + Kontext "IndividuellePraesentationDefinieren" + printlog "type something in 'Name' " + PraesentationName.SetText "Individually 1" + printlog "select the first entry in the list 'Existing Slides' " + SeitenPraesentation.Select 1 + printlog "click button '>>' " + Hinzufuegen.Click + i = SelectedSlides.GetItemCount + if (i <> 1) Then + Warnlog "- Number of slides 'Selected Slides' is not correct. It should be = '1', but it is = '" + i + "'" + endif + printlog "close dialog 'Define Custom Slide Show' with OK " + IndividuellePraesentationDefinieren.OK + Kontext "IndividuellePraesentation" + printlog "click button 'Edit...'" + Bearbeiten.Click + Kontext "IndividuellePraesentationDefinieren" + printlog "select an entry in the list 'Selected Slides' " + SelectedSlides.TypeKeys "<pagedown>" + printlog "click button '<<' " + Entfernen.Click + i = SelectedSlides.GetItemCount + if (i <> 0) Then + Warnlog " Removing slides from list 'Selected Slides' does not work It should be = '1', but it is = '" + i + "'" + endif + 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 "check checkbox 'Use Custom Slide Show'" + IndividuellePraesentationBenutzen.Check + printlog "click button 'Start..." + Starten.Click + sleep 2 + Kontext "DocumentPresentation" + printlog "press key [space] 2 times " + DocumentPresentation.TypeKeys "<space>" + sleep 2 + DocumentPresentation.TypeKeys "<space>" + sleep 5 + try + Kontext "IndividuellePraesentation" + printlog "close dialog 'Custom Slide Shows' with button 'Close' " + IndividuellePraesentation.Close + catch + Warnlog "- Slideshow did not end after slide 1" + DocumentPresentation.TypeKeys "<space>" + sleep 2 + endcatch + printlog "Slide Show -> Custom Slide Show... " + SlideShowCustomSlideshow + Kontext "IndividuellePraesentation" + 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 + i = SelectedSlides.GetItemCount + if (i <> 0) Then + Warnlog "- Add and remove slides does not work properly. It should be '0', but it is = '"+i+"'" + endif + printlog "select the first entry in the list 'Existing Slides' " + SeitenPraesentation.Select 1 + printlog "click button '>>' 4 times " + for i =1 to 4 + Hinzufuegen.Click + next i + for i =1 to 4 + SelectedSlides.Select i + sTemp = SelectedSlides.GetSelText + If (sTemp <> Seite) then + Warnlog "- Wrong slide added to individual slideshow. Instead of '" + Seite + "', '" + sTemp + "' was added" + endif + next i + printlog "close dialog 'Define Custom Slide Show' with OK " + IndividuellePraesentationDefinieren.OK + sleep 1 + Kontext "IndividuellePraesentation" + + printlog "UNcheck checkbox 'Use Custom Slide Show'" + IndividuellePraesentationBenutzen.UnCheck + printlog "click button 'Start...' " + Starten.Click + printlog "press key [space] 4 times " + kontext "DocumentPresentation" + for i = 1 to 4 + sleep 3 + DocumentPresentation.TypeKeys "<space>" + next i + sleep 10 + kontext "IndividuellePraesentation" + printlog "close dialog 'Custom Slide Shows' with button 'Close' " + if IndividuellePraesentation.exists then + IndividuellePraesentation.Close + else + Warnlog "'IndividuellePraesentation' was closed :-(" + end if + + printlog "Set Start with current page back to default = on, in ToolsOptions " + setStartCurrentPage(TRUE) + printlog "close the application " + Kontext "Navigator" + if Navigator.exists then + printlog "close navigator ! " + Navigator.Close + else + printlog "Navigator: NOT available" + end if + Call hCloseDocument + +endcase 'tSlideShowCustomSlideShow + +'------------------------------------------------------------------------------- +testcase tSlideShowSlideTransition + + dim i as integer + dim x as integer + dim q as integer + dim sTemp as string + dim TimerValue as string + dim sFile as string + dim sEffect (3) as string + + sFile = ConvertPath (gOfficePath + "user\work\diashow") + + printlog "open application " + call hNewDocument + + printlog "close the navigator" + Kontext "Navigator" + if Navigator.Exists then Navigator.Close + WaitSlot (3000) + printlog "create 3 slides with a rectangle " + hRechteckErstellen (30,30,60,60) + for i = 1 to 2 + printlog " Insert->Slide " + WaitSlot (1000) + InsertSlide + WaitSlot (2000) + hTypekeys "<Pagedown>" + WaitSlot (2000) + printlog " insert rectangle" + hRechteckErstellen (30,30,60,60) + next i + Printlog "created 3 slides" + printlog "for all 3 slides do: " + for i = 1 to 3 + printlog "open navigator with shortcutkey [MOD1 SHIFT F5] " + hTypeKeys "<MOD1 SHIFT F5>" + Sleep (3) + Kontext "NavigatorDraw" + printlog "select the next slide in the list " + if Liste.GetItemCount < 3 then + warnlog "We have " + Liste.GetItemCount + " entries in the Navigator." + hTypeKeys "<MOD1 SHIFT F5>" + hTypeKeys "<MOD1 SHIFT F5>" + Kontext "NavigatorDraw" + end if + Liste.Select i + printlog "press key [return] " + Liste.TypeKeys "<return>" + Kontext "Navigator" + printlog "close Navigator " + Navigator.Close + printlog " SlideShow->SlideTransition " + SlideShowSlideTransition + Kontext "Tasks" '"SlideTransition"' "OL_DIA_Diawechsel" 'OL_DIA_Diawechsel + TransitionAutomaticPreview.UnCheck + printlog "click button 'Effects' " + TransitionApplyToSelectedSlide.typekeys "<pagedown>" + Sleep (1) + printlog "in the listbox 'speed' select the i. one from the top " + TransitionSpeed.Select i + printlog "Select an effect-group from the listbox " + TransitionApplyToSelectedSlide.typekeys "<home>" + for q= 1 to (i+2) + Sleep (2) + TransitionApplyToSelectedSlide.typekeys "<down>" + Sleep (2) + next q + sEffect(i) = TransitionApplyToSelectedSlide.GetSelText + printlog "click button 'Extras' " + Sleep (2) + printlog "click button 'Automatic Transition' " + select case i + case 1: + TransitionAutomaticallyAfter.Check + printlog " Set Time to '00:00:01' OR " + TransitionAutomaticallyAfterTime.ToMin 'SetText "1" '"00:00:01" + TransitionAutomaticallyAfterTime.More + TransitionApplyToSelectedSlide.typekeys "<DOWN>" + TransitionApplyToSelectedSlide.typekeys "<UP>" + TransitionAutomaticallyAfter.Check + Tasks.TypeKeys "<TAB><TAB><TAB>" + TimerValue = TransitionAutomaticallyAfterTime.GetText + printlog "TimerValue is now: " + TimerValue + case else: printlog "click button 'SemiAutomatic Transition' OR " + TransitionOnMouseClick.Check + end select + Sleep (3) + next i + Printlog "assigned transitions to all slides" + + Kontext "DocumentImpress" + Sleep (3) + printlog "SlideShow->Slide Show Settings... " + SlideShowPresentationSettings + Kontext "Bildschirmpraesentation" + WaitSlot (2000) + printlog "check Radio button 'Type': 'Window' " + Fenster.Check + printlog "close dialog 'Slide Show' " + Bildschirmpraesentation.OK + WaitSlot (5000) + Kontext "DocumentImpress" + Printlog "printlog SlideShow->Slide Show" + SlideShowSlideshow + printlog "wait 10 sec " + sleep (10) + Kontext "DocumentPresentation" + printlog "type key [ESCAPE] " + DocumentPresentation.TypeKeys "<ESCAPE>" + WaitSlot (3000) + try + printlog "type key [F11] to open the stylist (to check ending of presenation) " + if lcase(gPlatform) = "osx" then + hTypekeys "<mod1 t>" + else + hTypeKeys "<F11>" + endif + Sleep (3) + Kontext "Gestalter" + Sleep (3) + printlog "close Stylist " + Gestalter.Close + Printlog "- Slideshow worked" + catch + Kontext "DocumentPresentation" + DocumentPresentation.TypeKeys "<ESCAPE>" + Warnlog "slideshow somehow didn't end :-(" + Sleep (2) + endcatch + + printlog "close the navigator" + Kontext "Navigator" + if Navigator.Exists then Navigator.Close + Printlog "check the settings in SlideView in the Dia object bar " + for i = 1 to 3 + Printlog " --------------------- " + i + " ---------------------------" + printlog " open navigator with shortcutkey [MOD1 SHIFT F5] " + hTypeKeys "<MOD1 SHIFT F5>" + sleep (3) + Kontext "NavigatorDraw" + printlog " select the next slide in the list " + Liste.Select i + printlog " press key [return] " + Liste.TypeKeys "<return>" + Kontext "Navigator" + printlog " close Navigator " + Navigator.Close + printlog " View->Master View->Slides View " + Sleep (2) + Kontext "Tasks" + printlog " check 'speed' " + if Tasks.Exists = TRUE AND Tasks.IsVisible = TRUE then + x = TransitionSpeed.GetSelIndex 'TransitionSpeed + if (x <> i) then + Warnlog "Speed changed :-( is: '" + x + "' should be: '" + i + "'" + end if + printlog " check 'Transition' " + x = TransitionApplyToSelectedSlide.GetSelIndex 'Diawechsel.GetSelIndex + if (x <> (i+3)) then + Warnlog "Transition changed :-( is: '" + x + "' should be: '" + (i+3) + "'" + sTemp = TransitionAutomaticallyAfterTime.GetText + if ((sTemp <> TimerValue)) then '"00:00:01" '(i = 3) AND + Warnlog "Time is different :-( is: '" + sTemp + "' should: '" + TimerValue + "'" '"00:00:01" + end if + end if + + printlog " check 'effect group' " + sTemp = TransitionApplyToSelectedSlide.GetSelText + x = inStr (sTemp,sEffect(i)) + Printlog " Effect tried :-) '" + x + "'" + if (x < 1) then + printlog "the string '" + sTemp + "' should contain the words(s): '" + sEffect(i) + "'" + end if + else + warnlog " SlideViewObjectbar doesnt exists or isnt visible" + end if + next i + printlog "save file as presentation with name 'user\work\diashow)' " + + hFileSaveAsWithFilterKill ((sFile + ".odp") , "impress8" ) + + Printlog " saved presentation: '" + sFile + "'" '." + gImpressFilter + " + printlog "close application" + hCloseDocument () + WaitSlot (10000) + printlog "load file again " + hFileOpen (sFile + ".odp") + WaitSlot (5000) + Printlog "check setings for every slide in the transition dialog " + printlog " for all 3 slides do: " + for i = 1 to 3 + Printlog " --------------------- " + i + " ---------------------------" + printlog " open navigator with shortcutkey [MOD1 SHIFT F5] " + hTypeKeys "<MOD1 SHIFT F5>" + Sleep (3) + Kontext "NavigatorDraw" + printlog " select the next slide in the list " + Liste.Select i + printlog " press key [return] " + Liste.TypeKeys "<return>" + Kontext "Navigator" + printlog " close Navigator " + Navigator.Close + printlog " select the grafik with the key [TAB] " + hTypeKeys ("<tab>") + printlog " SlideShow->SlideTransition " + SlideShowSlideTransition + Kontext "Tasks" + Sleep (1) + printlog " check 'speed' " + x = TransitionSpeed.GetSelIndex + if (x <> i) then + Warnlog " Speed changed :-( is: '" + x + "' should: '" + i + "'" + end if + printlog " check 'effect group' " + x = TransitionApplyToSelectedSlide.GetSelIndex + if (x <> (i+3)) then + Warnlog " Effect changed :-( is: '" + x + "' should: '" + (i+3) + "'" + end if + sleep (1) + select case i + case 1: printlog " click button 'Automatic Transition' " + if (TransitionAutomaticallyAfter.IsEnabled) then + printlog " Check Time '1' OR " + sTemp = TransitionAutomaticallyAfterTime.GetText + if (sTemp <> TimerValue) then + Warnlog " Time is different :-( is: '" + sTemp + "' should be: '" + TimerValue + "'" '"00:00:01" + end if + else + Warnlog " button 'Automatic Transition' not pressed ?" + end if + case 2: if (TransitionAutomaticallyAfter.IsChecked <> FALSE) then + printlog " check button 'SemiAutomatic Transition' OR " + Warnlog " button 'Automatic Transition' is pressed ?" + end if + case 3: if (TransitionAutomaticallyAfter.IsChecked <> FALSE) then + printlog "click button 'Manual Transition' " + Warnlog " button 'Automatic Transition' is pressed ?" + end if + end select + Sleep (3) + next i + TransitionAutomaticPreview.Check + printlog "Set Start with current page back to default = on, in ToolsOptions " + setStartCurrentPage(TRUE) + Kontext "Navigator" + if Navigator.exists then + printlog " close navigator ! " + Navigator.Close + else + printlog "Navigator: NOT available" + end if + printlog "Close the document " + call hCloseDocument + +endcase 'tSlideShowSlideTransition + +'------------------------------------------------------------------------------------- +testcase tSlideShowShowHideSlide + + dim saSlideNames(4) as string + dim i as integer + + S1 = glLocale (2) + " 1" + S2 = glLocale (2) + " 2" + S3 = glLocale (2) + " 3" + S4 = glLocale (2) + " 4" + saSlideNames(1) = S1 + saSlideNames(2) = S2 + saSlideNames(3) = S3 + saSlideNames(4) = S4 + + printlog "Open file 'graphics\input\diashow.odp' (Slide Show with 4 Slides)" + hFileOpen ConvertPath (gTesttoolPath + "graphics\required\input\diashow.odp") + 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 + Kontext "Navigator" + if Navigator.exists then + printlog "close navigator" + Navigator.Close + else + printlog "Navigator: NOT available" + endif + printlog "View->Workspace->Slides View" + ViewWorkspaceSlidesView + sleep (1) + Kontext "Slides" + printlog "Selecting 2nd slide" + SlidesControl.TypeKeys "<PAGEDOWN>" + printlog "Hiding 2nd slide" + SlideShowHideSlide + printlog "Selecting 4th slide" + SlidesControl.TypeKeys "<PAGEDOWN>" ,2 + printlog "Hiding 4th slide" + SlideShowHideSlide + + sleep (2) + printlog "View->Workspace->Drawing View" + ViewWorkspaceDrawingView + kontext "DocumentImpress" + DocumentImpress.TypeKeys "<HOME>" + sleep (2) + printlog "SlideShow->Slide Show Settings..." + SlideShowPresentationSettings + Kontext "Bildschirmpraesentation" + sleep (2) + printlog "check Radio button 'Type': 'Window'" + Fenster.Check + sleep (1) + printlog "close dialog 'Slide Show' with OK " + Bildschirmpraesentation.OK + printlog "start the slideshow with 'Slide Show->Slide Show'" + SlideShowSlideshow + sleep (1) + kontext "DocumentPresentation" + printlog "type the key [MOD1 SHIFT F5] to open the navigator" + DocumentPresentation.TypeKeys "<MOD1 SHIFT F5>" + sleep (1) + kontext "NavigatorDraw" + for i = 1 to 2 + if ((i mod 2) = 1) then ' for all odd numbers (ungerade) do + printlog "Getting slide names" + fGetSlideName(saSlideNames(i)) + kontext "DocumentPresentation" + DocumentPresentation.TypeKeys "<pagedown>" + sleep (3) + endif + Kontext "NavigatorDraw" + if NavigatorDraw.exists (5) then + sleep 1 + printlog "check in list, if the page changed" + if ((i mod 2) = 1) then ' for all odd numbers (ungerade) do + if i = Liste.GetSelIndex then + qaerrorlog "the Navigator didn't update!" + endif + endif + else + warnlog " Navigator doesn't exist?!?!?" + endif + sleep (1) + next i + sleep (3) + Kontext "DocumentPresentation" + DocumentPresentation.TypeKeys "<pagedown>" + sleep (2) + DocumentPresentation.TypeKeys "<pagedown>" + sleep (5) + try + DocumentPresentation.MouseDown 50,50 + DocumentPresentation.MouseUp 50,50 'This one works to recognice the not ending. + warnlog " Presentation did NOT END!!!" + catch + printlog " ended right." + endcatch + sleep (2) + Kontext "Navigator" + if Navigator.exists then + printlog "close navigator !" + Navigator.Close + else + printlog "Navigator: NOT available" + endif + Call hCloseDocument + +endcase 'tSlideShowShowHideSlide + +'------------------------------------------------------------------------------
\ No newline at end of file diff --git a/testautomation/graphics/optional/includes/impress/i_slideshow2.inc b/testautomation/graphics/optional/includes/impress/i_slideshow2.inc new file mode 100644 index 000000000000..6274a5e7238f --- /dev/null +++ b/testautomation/graphics/optional/includes/impress/i_slideshow2.inc @@ -0,0 +1,1045 @@ +'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@oracle.com +'* +'* short description : +'* +'******************************************************************* + +testcase tPraesentationAnimation + + Dim i + + Printlog "- Slideshow/Animation" + printlog "new document " + Call hNewDocument + Call sSelectEmptyLayout + sleep 2 + printlog "insert graphic" + InsertGraphicsFromFile + Kontext "OeffnenDlg" + Dateiname.SetText ConvertPath (gTesttoolPath + "global/input/graf_inp/desp.bmp") + sleep 2 + Oeffnen.Click + sleep 2 + + printlog "deselect graphic" + gMouseClick 90,90 + + printlog "insert 2nd graphic" + InsertGraphicsFromFile + Kontext "OeffnenDlg" + Dateiname.SetText ConvertPath (gTesttoolPath + "global/input/graf_inp/borabora.jpg") + sleep 2 + Oeffnen.Click + sleep 2 + + Call hTypekeys "<TAB>" + + printlog "open animation dialogue" + Opl_SD_EffekteZulassen + Kontext "Animation" + + for i=1 to 10 + printlog "add graphic 10 times" + BildAufnehmen.Click + next i + + sleep 1 + printlog "get number of frames (should be 10) " + if AnzahlBilder.GetText <> "10" Then + WarnLog " - Adding pictures did not work" + else + PrintLog " Pictures added" + end if + + if AlleAufnehmen.IsEnabled Then WarnLog " - Add all should not be enabled because only 1 object is selected" + + Kontext "DocumentImpress" + printlog "select both graphics in document " + EditSelectAll + + Kontext "Animation" + + printlog "add them 5 times (10 frames)" + for i=1 to 5 + printlog i + AlleAufnehmen.Click + next i + + sleep 1 + printlog "compare total numbers of frame" + if AnzahlBilder.GetText <> "20" Then + WarnLog " - Adding pics does not work" + else + PrintLog " all pics added" + end if + + printlog "jump to 1st frame" + ErstesBild.Click + + printlog "get number index of selected frame" + if AnzahlBilder.GetText <> "1" Then + WarnLog " - Jump back to beginning does not work" + else + PrintLog " Jump back to beginning works" + end if + + printlog "jump to last frame" + LetztesBild.Click + + printlog "control number index of selected frame" + if AnzahlBilder.GetText <> "20" Then + WarnLog " - Jump to end does not work" + else + PrintLog " Jumped to end" + end if + sleep 1 + printlog "play animation" + Abspielen.Click + sleep 10 + Kontext "DocumentImpress" + printlog "delete graphics in document " + EditSelectAll + DocumentImpress.TypeKeys "<DELETE>" + sleep 2 + Kontext "Animation" + printlog "create animation" + Erstellen.Click + sleep 10 + + Kontext "DocumentImpress" + try + printlog "try to copy created animation to make sure it is created" + EditCopy + PrintLog " Animation created" + catch + WarnLog " - Animation not created" + endcatch + + Kontext "Animation" + + printlog "set duration time of frames" + if AnimationsgruppeGruppenobjekt.IsChecked = True Then + try + AnzeigedauerProBild.SetText "1" + WarnLog " - Control should be disabled" + catch + PrintLog " Control disabled because Groupobjekt = " + AnimationsgruppeGruppenobjekt.IsChecked + endcatch + end if + + printlog "check group object" + AnimationsgruppeBitmapobjekt.Check + + printlog "set frame visibility time to 3" + AnzeigedauerProBild.SetText "3" + SetClipboard AnzeigedauerProBild.GetText + printlog "raise value for frame time" + AnzeigedauerProBild.More + if AnzeigedauerProBild.GetText<> GetClipboardText Then + PrintLog " Duration per frame works" + else + WarnLog " - Duration could not be changed" + end if + + Dim Zaehler + printlog "test different settings for pass amount" + Zaehler = AnzahlDurchlaeufe.GetItemCount + for i=1 to Zaehler + AnzahlDurchlaeufe.Select i + next i + PrintLog " Number of loops is set" + + Dim ZaehlerAnpassung + ZaehlerAnpassung=Anpassung.GetItemCount + for i=1 to ZaehlerAnpassung + Anpassung.Select i + next i + + printlog "delete 1 frame" + BildLoeschen.Click + if AnzahlBilder = "20" Then + WarnLog " - Deleting pictures does not work" + else + PrintLog " Picture No.20 deleted" + end if + + printlog "delete all frames" + AlleLoeschen.Click + Kontext "Active" + Active.Yes + sleep 3 + + Kontext "Animation" + printlog "check if play button is still active" + if Abspielen.IsEnabled = true Then + WarnLog " - Not all pics are deleted" + else + PrintLog " All pics deleted" + end if + sleep 2 + printlog "close animation flyer" + Animation.Close + sleep 2 + printlog "close document " + Call hCloseDocument +endcase 'tPraesentationAnimation + +'--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- + +testcase tPraesentationEffekt + + qaerrorlog "Test not yet ready." + goto endsub + + + Dim i + Dim j + Dim k + Dim l + Dim m + Dim n + Dim Zaehler + Dim ZaehlerKmh + Dim ZaehlerText + Dim ZaehlerTon + Dim Zufall + + Printlog "- Slideshow/Effect" + printlog "new document " + Call hNewDocument + printlog " check state of navigator ! expected: closed" + Kontext "Navigator" + if Navigator.exists then + printlog " close navigator !" + Navigator.Close + Warnlog "Navigator was open. Check earlier tests. Now closed." + else + printlog "Navigator: NOT available. Good." + endif + sleep 2 + kontext "DocumentImpress" + gMouseClick 50,50 + printlog "create rectangle" + hRechteckErstellen (20,20,50,50) + sleep 3 + Kontext "Effekt" + Printlog " - Test effects" + printlog "deselect rectangle" + gMouseClick 90,90 + sleep 1 + printlog "select rectangle " + DocumentImpress.TypeKeys "<TAB>" + sleep 1 + printlog "go into text edit mode (F2)" + DocumentImpress.TypeKeys "<F2>" + sleep 1 + printlog "type text into the rectangle" + DocumentImpress.TypeKeys "test text to test text effects" + sleep 1 + DocumentImpress.TypeKeys "<ESCAPE>" + sleep 2 + DocumentImpress.TypeKeys "<TAB>" + sleep 1 + SlideShowEffects + Kontext "Effekt" + sleep 3 + Effekte.Click + Zaehler=Effekteliste.GetItemCount + printlog "Start from the second entry since the first one is No effect" + for i=2 to Zaehler + Effekteliste.Select i + SetClipboard Effekteliste.GetSelText + Effekt.TypeKeys "<TAB>" + Effekteauswahl.TypeKeys "<RIGHT>" ,2 + sleep 1 + Zuweisen.Click + sleep 1 + Effekt.Close + sleep 1 + PraesentationEffekt + Kontext "Effekt" + sleep 1 + if GetClipboardText<>Effekteliste.GetSelText Then Warnlog " - Invisible color not changed" + sleep 1 + next i + sleep 1 + Printlog " - Test speed setting" + sleep 1 + Texteffekte.Click + + sleep 1 + ZaehlerKmh=Geschwindigkeit.GetItemCount + for j=1 to ZaehlerKmh + Geschwindigkeit.Select j + SetClipboard Geschwindigkeit.GetSelText + Zuweisen.Click + Effekt.Close + sleep 1 + SlideShowEffects + Kontext "Effekt" + sleep 1 + if GetClipboardText <> Geschwindigkeit.GetSelText Then Warnlog " - Speed setting did not change" + next j + Printlog " - Test text effects" + Texteffekte.Click + sleep 1 + ZaehlerText=TexteffekteListe.GetItemCount + for k=1 to ZaehlerText + TexteffekteListe.Select k + SetClipboard TexteffekteListe.GetSelText + Effekt.TypeKeys "<TAB>" + Texteffektauswahl.TypeKeys "<RIGHT>" ,2 + Zuweisen.Click + sleep 1 + Effekt.Close + gMouseClick 90,90 + sleep 2 + gmouseClick 40,40 + PraesentationEffekt + Kontext "Effekt" + sleep 1 + Texteffekte.Click + sleep 1 + next k + Printlog " - Test invisible color" + Effekte.Click + Effekteliste.Select 1 + Effekteauswahl.TypeKeys "<RIGHT>" ,2 + Zuweisen.Click + sleep 2 + try + Extras.Click + catch + Warnlog "- Extras Button not active" + endcatch + sleep 1 + randomize + Zufall=((2*Rnd)+1) + for l=1 to 5 + if (NOT Abblendfarbe.IsEnabled) then + MitFarbeAbblenden.Click + endif + sleep 1 + if Abblendfarbe.IsEnabled = False Then Warnlog " - Control should not be enabled" + sleep 1 + Zuweisen.Click + Effekt.Close + SlideShowEffects + Kontext "Effekt" + sleep 1 + Effekte.Click + Effekteliste.Select 1 + Effekteauswahl.TypeKeys "<RIGHT>" ,3 + try + Zuweisen.Click + catch + Effekteauswahl.TypeKeys "<RIGHT>" + Zuweisen.Click + endcatch + sleep 2 + Extras.Click + next l + Printlog " - Test blend with color" + MitFarbeAbblenden.Click + try + for m=1 to 5 + sleep 2 + Abblendfarbe.Select Zufall + SetClipboard Abblendfarbe.GetSelText + Zuweisen.Click + next m + catch + MitFarbeAbblenden.Click + for m=1 to 5 + sleep 2 + Abblendfarbe.Select Zufall + SetClipboard Abblendfarbe.GetSelText + Zuweisen.Click + next m + endcatch + Printlog " - Test order" + Effekte.Click + Effekteliste.Select 2 + Zuweisen.Click + Reihenfolge.Click + sleep 1 + Printlog " - Test preview" + Vorschaufenster.Click + sleep 1 + Kontext "Vorschau" + if Vorschau.Exists = False Then Warnlog " - Preview window does not exist" + Vorschau.Close + Kontext "Effekt" + Effekte.Click + UseBindings + sleep 1 + Extras.Click + sleep 1 + if NOT klang.Exists then + warnlog "- Control Sound does not exist" + end if + if Klangliste.Exists = false Then Klang.Click + sleep 1 + ZaehlerTon = Klangliste.GetItemCount + for n=1 to ZaehlerTon + + Klangliste.Select n + SetClipboard Klangliste.GetSelText + VollstaendigAbspielen.Click + Effekt.Close + sleep 1 + Kontext "DocumentImpress" + gMouseClick 40,40 + sleep 1 + PraesentationEffekt + Kontext "Effekt" + sleep 1 + Effekte.Click + sleep 1 + Extras.Click + if Klangliste.IsVisible = False Then Klang.Click + next n + Effekt.Close + sleep 1 + Call hCloseDocument +endcase 'tPraesentationEffekt + +'--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- + +testcase tSlideShowInteraction + Dim Datei$ + Dim i as integer + Dim Zaehler as integer + dim b115364 as boolean + + Datei$ = ConvertPath (gOfficePath + "user\work\interac.odp") + + printlog "open application" + Call hNewDocument + Call sSelectEmptyLayout + sleep 5 + printlog "Set start with current page to ON" + setStartCurrentPage(TRUE) + + printlog "call 'Insert->Slide' three times and name the slides 2, 3, 4 and create a rectangle on it " + printlog "we now have 4 slides" + Kontext "DocumentImpress" + for i = 2 to 4 + InsertSlide + sleep 2 + hTypekeys "<Pagedown>" , 10 ' workaround for issue i56267. Has to be removed when cws impress73 has be integrated + sleep 2 + Kontext "DocumentImpress" + gMouseClick 50,50 + Call hRechteckErstellen (i*10,i*10,i*20,i*20) + sleep 2 + next i + + printlog " check state of navigator ! expected: closed -> open navigator" + Kontext "Navigator" + if Navigator.exists then + qaerrorlog "Navigator: already open :-(" + else + printlog "Navigator: NOT available :-) will be opened now." + Kontext "DocumentImpress" + DocumentImpress.TypeKeys "<MOD1 SHIFT F5>" +' ViewNavigator + endif + sleep 3 + + printlog "Slide Show->Interaction" + SlideShowInteraction + Kontext "TabInteraktion" + sleep 1 + if AktionBeiMausklick.GetItemCount = 11 Then + Printlog "- List is complete" + else + Warnlog "- Number of possible actions is wrong. It should be: 11, but it is: " + AktionBeiMausklick.GetItemCount + end if + sleep 1 + + AktionBeiMausklick.Select 1 'Keine Aktion bei Mausclick + Printlog (AktionBeiMausklick.GetSelText + " chosen") + If Durchsuchen.IsVisible then Warnlog "- Control should be invisible because AktionBeiMausklick = " + AktionBeiMausKlick.GetSelText + sleep 1 + + Kontext "TabInteraktion" + AktionBeiMausklick.Select 2 'Go to previous Slide + Printlog (AktionBeiMausklick.GetSelText + " chosen") + if Durchsuchen.IsVisible Then Warnlog "- Control should be invisible, beacause Action = " + AktionBeiMausKlick.GetSelText + TabInteraktion.OK + sleep 2 + Kontext "DocumentImpress" + gMouseClick 90,90 + sleep 1 + gMouseClick 50,50 + sleep 2 + + Kontext "NavigatorDraw" + sleep 2 + if Not Liste.GetSelIndex = 3 Then + Warnlog "- jumped to wrong slide" + else + Printlog "- jumped to correct slide" + end if + sleep 1 + + Kontext "DocumentImpress" + EditSelectAll + sleep 1 + + SlideShowInteraction + sleep 2 + Kontext "TabInteraktion" + AktionBeiMausklick.select 3 'Go to next Slide + Printlog (AktionBeiMausKlick.GetSelText + " chosen") + TabInteraktion.OK + sleep 1 + Kontext "DocumentImpress" + gMouseClick 90,90 + sleep 1 + gMouseClick 50,50 + sleep 2 + gMouseClick 90,90 + Kontext "NavigatorDraw" + if Liste.GetSelIndex <> 4 Then + Warnlog "- Jumped to wrong slide. Jumped to " + Liste.GetSelIndex + " instead of 4." + else + Printlog " Jumped to correct slide" + end if + sleep 1 + kontext "DocumentImpress" + EditSelectAll + sleep 1 + + SlideShowInteraction + sleep 1 + Kontext "TabInteraktion" + AktionBeiMausklick.select 4 'Go to first Slide + Printlog AktionBeiMausKlick.GetSelText + sleep 1 + TabInteraktion.OK + sleep 1 + Kontext "DocumentImpress" + gMouseClick 90,90 + sleep 1 + gMouseClick 50,50 + sleep 1 + gMouseClick 90,90 + Kontext "NavigatorDraw" + if Liste.GetSelIndex <> 1 Then Warnlog "- jumped to wrong slide. Jumped to " + Liste.GetSelIndex + " instead of 1." + Letzte.Click 'Liste.Select 4 + Kontext "DocumentImpress" + EditSelectAll + sleep 2 + + try + SlideShowInteraction + catch + warnlog "SlideshowInteraction diasabled :-(" + endcatch + Kontext "TabInteraktion" + AktionBeiMausklick.select 5 'Go to last page + printlog AktionBeiMausKlick.GetSelText + TabInteraktion.OK + sleep 1 + Kontext "NavigatorDraw" + if Not Liste.GetSelIndex = 1 Then Warnlog "- jumped to wrong slide" + + kontext "DocumentImpress" + gMouseClick 90,90 + sleep 1 + hMouseClick DocumentImpress,50,50 + Call hRechteckErstellen 20,20,50,50 + sleep 1 + EditSelectAll + sleep 1 + try + FormatGroupGroup + catch + warnlog "GROUP?" + endcatch + sleep 1 + + SlideShowInteraction + Kontext "TabInteraktion" + AktionBeiMausklick.select 6 'Sprung zu Seite oder Objekt + printlog AktionBeiMausKlick.GetSelText + sleep 2 + if Not ListeSprungZuSeiteObjekt.IsVisible Then Warnlog " list seems to be invisible" + Seite.SetText S2 + Suchen.Click + if ListeSprungZuSeiteObjekt.GetSelIndex <> 3 Then + Warnlog " Search does not work. Current slide is: " + ListeSprungZuSeiteObjekt.GetSelText + endif + TabInteraktion.OK + sleep 1 + + Kontext "DocumentImpress" + gMouseClick 90,90 + sleep 1 + gMouseClick 25,25 + sleep 2 + Kontext "NavigatorDraw" + if Liste.GetSelIndex <> 2 Then + Warnlog "- Jumped to wrong destination" + printlog Liste.GetSelIndex + Liste.Select 4 + Liste.TypeKeys "<RETURN>" + endif + Kontext "DocumentImpress" + EditSelectAll + sleep 1 + + Kontext "DocumentImpress" + EditSelectAll + sleep 1 + SlideShowInteraction + Kontext "TabInteraktion" + sleep 1 + AktionBeiMausKlick.Select 7 'Go to Document + Printlog AktionBeiMausKlick.GetSelText + " chosen" + try + Durchsuchen.Click + sleep 1 + Kontext "OeffnenDlg" + sleep 1 + Dateiname.SetText ConvertPath (gTesttoolPath + "graphics\required\input\recht_49.odp") + Oeffnen.Click + sleep 10 + Kontext "TabInteraktion" + sleep 1 + TabInteraktion.OK + sleep 3 + Kontext "DocumentImpress" + catch + Warnlog "- Search button could not be accessed" + endcatch + sleep 1 + DocumentImpress.MouseDown 90,90 + DocumentImpress.MouseUp 90,90 + sleep 2 + Kontext "DocumentImpress" + DocumentImpress.Mousedown 30,30 + kontext + b115364 = false + if messagebox.exists then + printlog "baeh: '" + messagebox.gettext + "'" + try + messagebox.ok ' was default in so7 + catch + warnlog "behaviour changed #115364# mother document gets closed :-(" + if fileExists(ConvertPath (gOfficePath + "user\work\bug115364.odp")) then + kill ConvertPath (gOfficePath + "user\work\bug115364.odp") + endif + messagebox.yes ' don't save changes, before going on! + b115364 = true + kontext "SpeichernDlg" + Dateiname.setText ConvertPath (gOfficePath + "user\work\bug115364.odp") + Speichern.click + sleep 10 + endcatch + else + printlog "OK :-)" + endif + Kontext "DocumentImpress" + DocumentImpress.MouseUp 30,30 + sleep 2 + try + ViewDrawing + sleep 1 + Kontext "DocumentImpress" + DocumentImpress.MouseDown 25,25 + DocumentImpress.MouseUp 25,25 + catch + Warnlog "- Jump to document did not work or preview window did not appear" + endcatch + sleep 2 + if (not b115364) then + Call hCloseDocument + else + Call hCloseDocument + hFileOpen (ConvertPath (gOfficePath + "user\work\bug115364.odp")) + endif + sleep 6 + + printlog "Do Page down + Page up due to focusing-problems" + kontext "Slides" + hTypeKeys "<PAGEDOWN>" + hTypeKeys "<PAGEUP>" + Kontext "NavigatorDraw" + if NavigatorDraw.Exists = FALSE then + qaerrorlog "Navigator: NOT available :-( will be opened now!" + Kontext "DocumentImpress" + DocumentImpress.TypeKeys "<MOD1 SHIFT F5>" + else + printlog "Navigator: already open :-)" + endif + Kontext "NavigatorDraw" + sleep 1 + if Naechste.IsEnabled then + Naechste.Click + else + warnlog "'Next' wasn't visible. Clicking 'First' + Two 'Next'." + Erste.Click + sleep 2 + Naechste.Click + Naechste.Click + sleep 2 + endif + + Kontext "DocumentImpress" + EditSelectAll + sleep 1 + + SlideShowInteraction + Kontext "TabInteraktion" + sleep 1 + AktionBeiMausKlick.Select 8 + Printlog AktionBeiMausKlick.GetSelText + " chosen" + sleep 1 + Tabinteraktion.OK + sleep 2 + SlideShowInteraction + Kontext "TabInteraktion" + sleep 1 + if not AktionBeiMausKlick.GetSelIndex = 8 Then Warnlog "- Not the right action chosen" + sleep 1 + AktionBeiMausKlick.Select 8 'Play sound + Printlog AktionBeiMausKlick.GetSelText + "- chosen" + sleep 1 + Tabinteraktion.OK + sleep 2 + Kontext "NavigatorDraw" + sleep 1 + Liste.Select 2 + Kontext "DocumentImpress" + EditSelectAll + sleep 1 + SlideShowInteraction + Kontext "TabInteraktion" + sleep 1 + Durchsuchen.Click + sleep 1 + Kontext "OeffnenDlg" + sleep 1 + Dateiname.SetText ConvertPath (gTesttoolPath + "graphics\required\input\blip.wav") + sleep 1 + Oeffnen.Click + sleep 1 + Kontext "Active" + if Active.Exists Then + Warnlog Active.GetText + " Gallery might be empty" + Active.OK + sleep 1 + Kontext "OeffnenDlg" + OeffnenDlg.Cancel + sleep 1 + end if + Kontext "TabInteraktion" + SetClipboard Klangwahl.GetText + TabInteraktion.OK + sleep 1 + SlideShowInteraction + Kontext "TabInteraktion" + sleep 1 + if Klangwahl.GetText <> GetClipboardText then Warnlog "- Not the right sound chosen" + TabInteraktion.OK + sleep 1 + InsertGraphicsFromFile + sleep 1 + Kontext "GrafikeinfuegenDlg" + sleep 1 + if Verknuepfen.IsChecked then Verknuepfen.UnCheck + Dateiname.SetText ConvertPath (gTesttoolPath + "global\input\graf_inp\enter.bmp") + Oeffnen.Click + sleep 3 + Kontext "NavigatorDraw" + sleep 1 + Liste.Select 4 + sleep 1 + SlideShowInteraction + Kontext "TabInteraktion" + sleep 1 + AktionBeiMausKlick.Select 9 'Objektaktion ausfuehren + Printlog AktionBeiMausKlick.GetSelText + " chosen" + sleep 1 + Zaehler=Effekt.GetItemCount + for i=1 to Zaehler + Effekt.Select i + Printlog Effekt.GetSelText + " chosen" + + TabInteraktion.OK + sleep 1 + SlideShowInteraction + Kontext "TabInteraktion" + sleep 1 + next i + TabInteraktion.OK + sleep 1 + SlideShowInteraction + Kontext "TabInteraktion" + sleep 1 + AktionBeiMausKlick.Select 11 'Macro + Printlog AktionBeiMausKlick.GetSelText + " chosen" + sleep 2 + Durchsuchen.Click + sleep 5 + Kontext "ScriptSelector" + sleep 5 + ScriptSelector.Cancel + sleep 2 + Kontext "TabInteraktion" + sleep 1 + TabInteraktion.OK + sleep 3 + + SlideShowInteraction + Kontext "TabInteraktion" + sleep 2 + if not AktionBeiMausKlick.GetSelIndex = 11 Then Warnlog "- Wrong action used" + sleep 1 + AktionBeiMausKlick.Select 12 'End Presentation + Printlog AktionBeiMausKlick.GetSelText + Tabinteraktion.OK + sleep 1 + + SlideShowPresentationSettings + Kontext "Bildschirmpraesentation" + if not Fenster.IsChecked Then Fenster.Check + BildschirmPraesentation.OK + sleep 2 + Kontext "DocumentImpress" + DocumentImpress.TypeKeys "<F5>" + sleep 5 + Kontext "DocumentPresentation" + sleep 2 + DocumentPresentation.MouseDown 50,50 + DocumentPresentation.MouseUp 50,50 + sleep 3 + if DocumentPresentation.Exists then + qaerrorlog "#i51418# Sound played instead of ending presentation" + DocumentPresentation.TypeKeys "<ESCAPE>" + sleep 3 + endif + try + Kontext "DocumentImpress" + EditSelectAll + Printlog "- Slideshow ended at right point" + catch + Warnlog "- Program is still in slideshow mode" + Kontext "DocumentPresentation" + DocumentPresentation.TypeKeys "<ESCAPE>" + endcatch + + Kontext "DocumentImpress" + printlog "Close the Navigator" + DocumentImpress.TypeKeys "<MOD1 SHIFT F5>" + sleep 3 + printlog "Set start with current page to ON = Default" + setStartCurrentPage(TRUE) + Call hCloseDocument +endcase 'tSlideShowInteraction + +'--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- + +testcase tAendernObjektBenennen + Printlog "- Context/Name object" + printlog "new document " + Call hNewDocument + Call sSelectEmptyLayout + + sleep 1 + Kontext "DocumentImpress" + if NOT DocumentImpress.Exists then + Warnlog "- Due to Bug 91799 the document disappeared right after loading" + Call hNewDocument + sleep 1 + end if + sleep 1 + hRechteckErstellen (20,20,30,30) + sleep 1 + hRechteckErstellen (60,60,80,80) + + gMouseMove (10,10,90,90) + Printlog " - check if menu entry is disabled for normal objects" + try + ContextNameObject + Warnlog " function should be only enabled for graphics, ole objects and groups" + catch + Printlog " Function disabled" + endcatch + EditSelectAll + Kontext "DocumentImpress" + FormatGroupGroup + sleep 2 + gMouseClick 25,25 + ContextNameObject + sleep (2) + Kontext "NameDlgObject" + NameField.SetText "Test" + NameDlgObject.OK + sleep 1 + Printlog " - Name object worked" + Kontext "DocumentImpress" + EditSelectAll + DocumentImpress.TypeKeys "<DEL>" + InsertGraphicsFromFile + Kontext "GrafikEinfuegenDlg" + Dateiname.SetText ConvertPath (gTesttoolPath + "global\input\graf_inp\enter.bmp") + sleep 3 + Preview.Check + sleep 1 + Oeffnen.Click + sleep 1 + printlog " - Name a graphic file" + try + ContextNameObject + Kontext "NameDlgObject" + Namefield.SetText "Grafik" + NameDlgObject.OK + sleep 1 + Printlog " - Name a graphic object did work" + catch + Warnlog " - Function should have been enabled" + endcatch + sleep 2 + Call hCloseDocument + sleep 2 +endcase 'tAendernObjektBenennen + +'--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- + +testcase tSlideshowBackgroundAllSlides + Dim Datei$ as string + Dim Background$ as string + Dim i as integer + Dim Zaehler as integer + Background$ = ConvertPath(gOfficeBasisPath + "share\gallery\www-back\chocolate.jpg") + Datei$ = ConvertPath (gOfficePath + "user\work\background.odp") + + printlog "Create a new document" + Printlog "- SlideshowBackground" + Call hNewDocument + + printlog "Insert a new Slide" + Kontext "DocumentImpress" + InsertSlide + + printlog "Open the Contextmenu" + DocumentImpress.OpenContextMenu + + printlog "Select the entry Slide" + hMenuFindSelect (".uno:PageMenu", true, 1, true) + printlog "Select the entry Background" + hMenuSelectNr (4) + + printlog "In the open-file dialogue, choose and open a graphic-file you wish to have as a background" + kontext "GrafikEinfuegenDlg" + If GrafikEinfuegenDlg.Exists Then + DateiName.SetText (Background$) + Oeffnen.Click + Else + warnlog "GrafikEinfuegenDlg not existent... check why." + End if + + printlog "If an active-message shows up, press yes to apply this background to all slides." + kontext "Active" + if Active.Exists then + Active.Yes + else + QaErrorLog "No dialogue considering if we wish to apply the background to all slides." + end if + + printlog "Save the document" + Call hFileSaveAsKill (Datei$) + printlog "Close the document" + Call hCloseDocument + printlog "Open the document" + Call hFileOpen (Datei$) + printlog "Close the document" + Call hCloseDocument +endcase 'tSlideshowBackgroundAllSlides + +'--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- + +testcase tSlideshowBackgroundSelectedSlide + + Dim Datei$ as string + Dim Background$ as string + Dim i as integer + Dim Zaehler as integer + Background$ = ConvertPath(gOfficeBasisPath + "share\gallery\www-back\chocolate.jpg") + Datei$ = ConvertPath (gOfficePath + "user\work\background.odp") + + printlog "Create a new document" + Printlog "- SlideshowBackground" + Call hNewDocument + + printlog "Insert a new Slide" + Kontext "DocumentImpress" + InsertSlide + + printlog "Open the Contextmenu" + DocumentImpress.OpenContextMenu + + printlog "Select the entry Slide" + hMenuFindSelect (".uno:PageMenu", true, 1, true) + printlog "Select the entry Background" + hMenuSelectNr (4) + + printlog "In the open-file dialogue, choose and open a graphic-file you wish to have as a background" + kontext "GrafikEinfuegenDlg" + If GrafikEinfuegenDlg.Exists Then + DateiName.SetText (Background$) + Oeffnen.Click + Else + warnlog "GrafikEinfuegenDlg not existent... check why." + End if + + printlog "If an active-message shows up, press No to only apply this background to the selected slide." + kontext "Active" + if Active.Exists then + Active.No + else + QaErrorLog "No dialogue considering if we wish to apply the background to all slides." + end if + + printlog "Save the document" + Call hFileSaveAsKill (Datei$) + printlog "Close the document" + Call hCloseDocument + printlog "Open the document" + Call hFileOpen (Datei$) + printlog "Close the document" + Call hCloseDocument +endcase 'tSlideshowBackgroundSelectedSlide + +'--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- diff --git a/testautomation/graphics/optional/includes/impress/i_slideshow3.inc b/testautomation/graphics/optional/includes/impress/i_slideshow3.inc new file mode 100644 index 000000000000..756eef806aa2 --- /dev/null +++ b/testautomation/graphics/optional/includes/impress/i_slideshow3.inc @@ -0,0 +1,1193 @@ +'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@oracle.com +'* +'* short description : +'* +'******************************************************************* + +testcase tExtrasInteraktion + + Dim i + Dim Zaehler + + + Printlog " - SlideShow/Interaction" + Call hNewDocument + Call sSelectEmptyLayout + sleep 1 + printlog "create textbox" + Call hTextrahmenErstellen ("Seite 1",10,10,40,40) + printlog "Set slide show settings" + SlideShowPresentationSettings + Kontext "Bildschirmpraesentation" + printlog "Navigator visible" + NavigatorSichtbar.Check + Bildschirmpraesentation.OK + printlog "open Interaction" + SlideShowInteraction + Kontext "Interaktion" + if Interaktion.exists(5)then + printlog "Select Go to previous slide" + AktionBeiMausklick.Select 1 + else + Print "Interaction doesnt exist, something is wrong here." + endif + Interaktion.OK + Kontext "DocumentImpress" + printlog "Run slideshow" + SlideShowSlideshow + Sleep (2) + Kontext "DokumentPraesentation" + DokumentPraesentation.TypeKeys "<ESCAPE>" + Sleep 2 + Kontext "DocumentImpress" + gMouseClick 20,20 + EditSelectAll + try + EditCopy + Printlog " Interaction ->No action works" + Kontext "DocumentImpress" + catch + Warnlog " - Interaction->does not work properly: Should be: Page 2 but it is: " + GetClipboardText + DocumentImpress.TypeKeys "<ESCAPE>" + Kontext "DocumentImpress" + endcatch + hCloseDocument + + Call hNewDocument + Call sSelectEmptyLayout + printlog "create rectangle" + Call hRechteckErstellen (50,50,80,80) + SlideShowInteraction + Kontext "Interaktion" + Zaehler=AktionBeiMausklick.GetItemCount + For i=2 to Zaehler + printlog "select actions" + AktionBeiMausklick.Select i + SetClipboard AktionBeiMausklick.GetSelText + Interaktion.OK + Kontext "DocumentImpress" + EditSelectAll + SlideShowInteraction + Kontext "Interaktion" + printlog "control if action is saved (closing reopening dialog)" + if GetClipboardText<>AktionBeiMausklick.GetSelText Then + Warnlog " Action at mouseclick - " + GetClipboardText + " - not taken" + else + Printlog " Action at mouseclick - " + GetClipboardText + " - runs" + end if + next i + Interaktion.OK + sleep 1 + printlog "close document" + Call hCloseDocument +endcase 'tExtrasInteraktion + +'------------------------------------------------------------------------------- + +testcase tExtrasEffekt + qaerrorlog "Test not yet ready." + goto endsub + Dim i + Dim j + Dim k + Dim l + Dim m + Dim n + Dim Zaehler + Dim ZaehlerKmh + Dim ZaehlerText + Dim ZaehlerTon + Dim Zufall + + printlog "New impress document" + Call hNewDocument + + printlog " check state of navigator ! expected: closed" + Kontext "Navigator" + if Navigator.exists then + printlog " close navigator !" + Navigator.Close + Warnlog "Navigator was open. Check earlier tests. Now closed." + else + printlog "Navigator: NOT available. Good." + endif + + gMouseClick 50,50 + printlog "create rectangle" + hRechteckErstellen (20,20,50,50) + sleep 2 + DocumentImpress.TypeKeys "<F2>" + DocumentImpress.TypeKeys "- This is text to test the text effects of the Effects flyer" + sleep 1 + printlog "deselect rectangle" + gMouseClick 90,90 + printlog "reselect rectangle" + DocumentImpress.TypeKeys "<TAB>" + + sleep 1 + Kontext "Effekt" + Printlog " - Test effect flyer" + + printlog "Open effect flyer" + SlideShowEffects + Kontext "ExtrasEffekt" + sleep 1 + Effekte.Click + printlog "select each effect 1 time, assign effect and close dialog" + Zaehler=Effekteliste.GetItemCount + printlog "reopen dialog and check if the effect is still there" + for i=1 to Zaehler + Effekteliste.Select i + SetClipboard Effekteliste.GetSelText + Effekt.TypeKeys "<TAB>" + Effekteauswahl.TypeKeys "<RIGHT>" ,2 + sleep 1 + Zuweisen.Click + Effekt.Close + SlideShowEffects + Kontext "Effekt" + sleep 1 + if GetClipboardText<>Effekteliste.GetSelText Then Warnlog " - Invisible color not chosen" + printlog GetClipboardText + " should be " + Effekteliste.GetSelText + + sleep 1 + next i + sleep 2 + printlog "test text effects" + Texteffekte.Click + sleep 1 + ZaehlerKmh=Geschwindigkeit.GetItemCount + for j=1 to ZaehlerKmh + Geschwindigkeit.Select j + SetClipboard Geschwindigkeit.GetSelText + Zuweisen.Click + Effekt.Close + SlideShowEffects + Kontext "Effekt" + sleep 1 + if GetClipboardText<>Geschwindigkeit.GetSelText Then Warnlog " - Speed not taken over" + next j + Printlog " - Speed test ok" + + Printlog " - Test text effects" + Texteffekte.Click + sleep 1 + ZaehlerText=TexteffekteListe.GetItemCount + for k=1 to ZaehlerText + TexteffekteListe.Select k + printlog TexteffekteListe.GetSelText + "-effect choosen" + SetClipboard TexteffekteListe.GetSelText + Effekt.TypeKeys "<TAB>" + Texteffektauswahl.TypeKeys "<RIGHT>" ,2 + N: Zuweisen.Click + sleep 1 + Effekt.Close + SlideShowEffects + Kontext "Effekt" + sleep 1 + Texteffekte.Click + printlog "and when we closed the window and opened again... " + TexteffekteListe.GetSelText + " was choosen" + sleep 1 + if GetClipboardText<>TexteffekteListe.GetSelText Then Warnlog " - Texteffect did not changed" + sleep 1 + next k + Printlog " - Test invisible color" + Effekte.Click + Effekteliste.Select 1 + Effekteauswahl.TypeKeys "<RIGHT>",2 + Zuweisen.Click + sleep 1 + Extras.Click + sleep 1 + randomize + Zufall=((2*Rnd)+1) + for l=1 to 4 + UnsichtbarMachen.Click + sleep 1 + if Abblendfarbe.IsEnabled=True Then Warnlog " - control shouldn't be enabled" + Zuweisen.Click + Effekt.Close + SlideShowEffects + Kontext "Effekt" + sleep 1 + Effekteauswahl.TypeKeys "<RIGHT>",2 + printlog "test extras" + Extras.Click + sleep 1 + UnsichtbarMachen.Click + sleep 1 + Zuweisen.Click + sleep 1 + next l + Printlog " - Blend with color" + sleep 2 + for m=1 to 5 + MitFarbeAbblenden.Click + sleep 2 + Abblendfarbe.Select Zufall + SetClipboard Abblendfarbe.GetSelText + Zuweisen.Click + Effekt.Close + SlideShowEffects + Kontext "Effekt" + sleep 1 + Effekteauswahl.TypeKeys "<RIGHT>",3 + sleep 1 + Extras.Click + sleep 1 + MitFarbeAbblenden.Click + sleep 1 + Zuweisen.Click + sleep 1 +' if GetClipboardText<>Abblendfarbe.GetSelText Then Warnlog " - Blendingcolor did not take over" + next m + Printlog " - Test order" + Effekte.Click + sleep 1 + Effekteliste.Select 2 + Zuweisen.Click + Reihenfolge.Click + sleep 1 + sleep 1 + Printlog " - test preview window" + printlog "open preview window" + Vorschaufenster.Click + sleep 1 + Kontext "Vorschau" + if Vorschau.Exists = False Then Warnlog " - Preview window not opened" + Vorschau.Close + Kontext "Effekt" + Extras.Click + printlog "insert sound" + if not Klangliste.IsEnabled Then Klang.Click + sleep 1 + ' ZaehlerTon=Klangliste.GetItemCount + for n=1 to 5 + SetClipboard Klangliste.GetSelText + Klangliste.Select n + VollstaendigAbspielen.Click + Effekt.Close + SlideShowEffects + Kontext "Effekt" + sleep 1 + Extras.Click + sleep 1 + if GetClipboardText<>Klangliste.GetSelText Then Warnlog " - sound did not change" + next n + Effekt.Close + sleep 1 + printlog "close document" + Call hCloseDocument +endcase 'tExtrasEffekt + +'------------------------------------------------------------------------------- + +testcase tExtrasPraesentationseinstellungen + + dim waschecked as boolean + + Printlog " - SlideShow/Slideshow settings" + printlog "New impress document" + Call hNewDocument + printlog "Set ToolsOptions - Presentation - StartCurrentPage = off" + setStartCurrentPage(FALSE) + printlog " check state of navigator ! expected: closed" + Kontext "Navigator" + if Navigator.exists then + printlog " close navigator !" + Navigator.Close + Warnlog "Navigator was open. Check earlier tests. Now closed." + else + printlog "Navigator: NOT available. Good." + endif + Kontext "DocumentImpress" + ExtrasPraesentationseinstellung + Kontext "Bildschirmpraesentation" + AbDia.Check + SetClipboard AbDiaName.GetItemCount + Bildschirmpraesentation.OK + printlog "insert slide" + InsertSlide + sleep 2 + hTypekeys "<Pagedown>" + sleep 2 + printlog "slideshow settings" + SlideShowPresentationSettings + Kontext "Bildschirmpraesentation" + if AbDiaName.GetItemCount <> GetClipboardText Then + Printlog " - Added page appears in list" + else + Warnlog " - Page not added to the list" + end if + printlog "check all dias" + AlleDias.Check + Printlog " - Test all slides" + Bildschirmpraesentation.OK + printlog "close document" + hCloseDocument + printlog "open document (diashow.odp)" + DateiOeffnen + Kontext "OeffnenDlg" + if OeffnenDlg.Exists(10) then + Dateiname.SetText ConvertPath (gTesttoolPath + "graphics\required\input\diashow.odp") + else + Warnlog "Took more then 10 seconds to get the file-open -dialogue open. Ending Test." + goto endsub + endif + Oeffnen.Click + sleep (60) + 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 + Kontext "DocumentImpress" + sleep 1 + SlideShowPresentationSettings + Kontext "Bildschirmpraesentation" + printlog "slideshow runs in window mode checked" + if Fenster.IsChecked = False Then + Fenster.Check + Printlog " - Slideshow in window mode" + else + Printlog " - Slideshow in window mode checked" + end if + Bildschirmpraesentation.OK + + Printlog " - Testing slide show" + printlog "run slideshow" + SlideShowSlideshow + sleep (3) + Kontext "DocumentPresentation" + DocumentPresentation.TypeKeys "<pagedown>" + try + Kontext "DocumentImpress" + printlog "try using menue entrees (should be disabled while slideshow is running)" + ViewZoom + Warnlog " - In slide show mode controls shouldn't be enabled" + Kontext "Massstab" + Massstab.OK + catch + Kontext "DocumentPresentation" + Printlog " - Slideshow runs" + endcatch + sleep 2 + DocumentPresentation.TypeKeys "<pagedown>" + sleep 2 + DocumentPresentation.TypeKeys "<pagedown>" + sleep 2 + DocumentPresentation.TypeKeys "<pagedown>" + sleep 2 + DocumentPresentation.TypeKeys "<pagedown>" + sleep (5) + + kontext "DocumentPresentation" + printlog "test if application is still in slideshow mode" + if DocumentPresentation.Exists(3) then + warnlog " - We are still in slideshow mode" + DocumentPresentation.TypeKeys "<ESCAPE>" + else + Printlog " - Test Abdia page 3 ended" + endif + + Printlog " - From slides test" + printlog "open slideshow settings" + SlideShowPresentationSettings + Kontext "Bildschirmpraesentation" + printlog "check slideshow in window mode" + Fenster.Check + AbDia.Check + printlog "slideshow begins at dia 3" + AbDiaName.Select 3 + Printlog " - From " + AbDiaName.GetSelText + " was the slides shown" + Bildschirmpraesentation.OK + printlog "run slideshow" + SlideShowSlideshow + sleep (3) + Kontext "DocumentPresentation" + DocumentPresentation.TypeKeys "<pagedown>" 'to get to 4 + sleep 2 + DocumentPresentation.TypeKeys "<pagedown>" ' to get to the end + sleep 2 + printlog "Click once more to get out of presentation-mode" + DocumentPresentation.TypeKeys "<pagedown>" 'out + sleep (3) + kontext "DocumentPresentation" + if DocumentPresentation.Exists(3) then + warnlog " - We are still in slideshow mode" + DocumentPresentation.TypeKeys "<ESCAPE>" + else + Printlog " - Test Abdia page 3 ended" + endif + Printlog " - Repeat endless" + + Kontext "DocumentImpress" + printlog "open slideshow settings" + SlideShowPresentationSettings + Kontext "Bildschirmpraesentation" + if AbDia.IsChecked=True Then AlleDias.Check + if Auto.IsChecked=False Then Auto.Check + Bildschirmpraesentation.OK + sleep (1) + SlideShowSlideshow 'start from 1 + sleep (3) + Kontext "DocumentPresentation" + DocumentPresentation.TypeKeys "<pagedown>" 'to 2 + sleep 2 + DocumentPresentation.TypeKeys "<pagedown>" 'to 3 + sleep 2 + DocumentPresentation.TypeKeys "<pagedown>" 'to 4 + sleep 2 + DocumentPresentation.TypeKeys "<pagedown>" 'to pause + sleep 2 + DocumentPresentation.TypeKeys "<pagedown>" 'to 1 + sleep 2 + DocumentPresentation.TypeKeys "<pagedown>" 'to 2 + sleep 2 + DocumentPresentation.TypeKeys "<pagedown>" 'to 3 + sleep 2 + printlog "Open the navigator" + DocumentPresentation.TypeKeys "<MOD1 SHIFT F5>" + sleep 2 + DocumentPresentation.TypeKeys "<pagedown>" 'to 4 + sleep 2 + DocumentPresentation.TypeKeys "<pagedown>" 'to pause + sleep 2 + DocumentPresentation.TypeKeys "<pagedown>" 'to 1 + sleep 3 + DocumentPresentation.TypeKeys "<pagedown>" 'to 2 + sleep 3 + DocumentPresentation.TypeKeys "<pagedown>" 'to 3 + sleep 3 + Kontext "NavigatorDraw" + if NavigatorDraw.Exists then + Printlog " The navigator is open. good." + else + Warnlog " The navigator should be accessable. Opening now." + Kontext "DocumentImpress" + DocumentImpress.TypeKeys "<MOD1 SHIFT F5>" + Kontext "NavigatorDraw" + end if + sleep 2 + if Liste.GetSelIndex <> 3 then + Warnlog " - Diashow not repeated: We should be at page no 3, but we are at page no: " + Liste.GetSelIndex + Kontext "DocumentPresentation" + printlog "Close the Navigator-window" + DocumentPresentation.TypeKeys "<MOD1 SHIFT F5>" + else + Printlog " - Repeat endless does work" + Kontext "DocumentPresentation" + printlog "Close the Navigator-window" + DocumentPresentation.TypeKeys "<MOD1 SHIFT F5>" + sleep 2 + endif + Kontext "DocumentPresentation" + DocumentPresentation.TypeKeys "<ESCAPE>" + sleep 2 + Kontext "DocumentImpress" + gMouseClick 80,80 + try + printlog "test endless repeating setting" + SlideShowPresentationSettings + Kontext "Bildschirmpraesentation" + Bildschirmpraesentation.OK + Printlog " - Repeat endless" + catch + Warnlog " - We are still in slideshow mode" + DocumentPresentation.TypeKeys "<ESCAPE>" + sleep 5 + endcatch + Kontext "DocumentImpress" + SlideShowPresentationSettings + Kontext "BildschirmPraesentation" + Fenster.Check + printlog "test dia switch manual" + Printlog " - Test slide switching manually" + if DiawechselManuel.IsChecked = False Then DiawechselManuel.Check + BildschirmPraesentation.Ok + sleep 1 + Kontext "DocumentImpress" + DocumentImpress.TypeKeys "<MOD1 F2>" + try + ViewZoom + Kontext "Massstab" + Warnlog " - No slide show mode with 'Ctrl+F2'" + catch + Printlog " - Slide show started using 'Ctrl F2'" + endcatch + Kontext "DocumentPresentation" + DocumentPresentation.TypeKeys "<pagedown>" + sleep 1 + DocumentPresentation.TypeKeys "<MOD1 SHIFT F5>" +' Kontext "NavigatorDraw" + sleep 3 + DocumentPresentation.TypeKeys "<pagedown>" + sleep 3 + DocumentPresentation.TypeKeys "<MOD1 SHIFT F5>" + Kontext "Navigator" + sleep 5 + + printlog " Check state of navigator ! Expected: closed" + Kontext "Navigator" + if Navigator.exists then + printlog " Close Navigator !" + Navigator.Close + Warnlog "Navigator: Should have been closed. Closing now." + else + printlog "Navigator: not available - Good" + endif + Kontext "DokumentPraesentation" + printlog "Exit presentation-mode" + DokumentPraesentation.TypeKeys "<ESCAPE>" + Kontext "DocumentImpress" + printlog "close document" + Call hCloseDocument +endcase 'tExtrasPraesentationseinstellungen + +'------------------------------------------------------------------------------- + +testcase tExtrasIndividuellePraesentation + Printlog "- Slideshow/Individual slideshow" + Call hNewDocument + printlog "new impress document" + Call sSelectEmptyLayout + printlog "Deactivate Start with current page in ToolsOptions" + setStartCurrentPage(FALSE) + printlog " check state of navigator ! expected: closed" + Kontext "Navigator" + if Navigator.exists then + printlog " close navigator !" + Navigator.Close + Warnlog "Navigator was open. Check earlier tests. Now closed." + else + printlog "Navigator: NOT available. Good." + endif + Printlog " - insert 3 slides for the individual slide show" + printlog "open slide show settings" + SlideShowPresentationSettings + Kontext "Bildschirmpraesentation" + Fenster.Check + Bildschirmpraesentation.OK + printlog "insert slide" + InsertSlide + sleep 2 + Call sSelectEmptyLayout + hTypekeys "<Pagedown>" + sleep 2 + InsertSlide + sleep 2 + Call sSelectEmptyLayout + hTypekeys "<Pagedown>" + sleep 2 + printlog "insert another slide" + InsertSlide + sleep 2 + Call sSelectEmptyLayout + hTypekeys "<Pagedown>" + sleep 2 + Printlog " - Slides added" + sleep 1 + Kontext "DocumentImpress" + printlog "open navigator" + DocumentImpress.TypeKeys "<MOD1 SHIFT F5>" + sleep 1 + Kontext "NavigatorDraw" + if NavigatorDraw.Exists Then + Printlog " - Navigator exists" + printlog "switch to 1st slide" + Erste.Click + Kontext "DocumentImpress" + printlog "Make a click onto the slide to focus onto that" + DocumentImpress.MouseDown ( 50, 50 ) + DocumentImpress.MouseUp ( 50, 50 ) + printlog "create rectangle" + hRechteckErstellen (10,10,20,20) + Kontext "NavigatorDraw" + printlog "switch to 2nd slide" + Naechste.Click + Kontext "DocumentImpress" + printlog "create another rectangle" + hRechteckErstellen (30,30,40,40) + Kontext "NavigatorDraw" + printlog "switch to 3rd slide" + Naechste.Click + Kontext "DocumentImpress" + printlog "create rectangle" + hRechteckErstellen (40,40,50,50) + Kontext "NavigatorDraw" + printlog "switch to next slide" + Naechste.Click + Kontext "DocumentImpress" + printlog "create rectangle" + hRechteckErstellen (50,50,60,60) + Printlog " - Created rectangles on all slides" + else + Warnlog " No Navigator" + end if + sleep 1 + printlog "open custom slideshow" + SlideShowCustomSlideshow + Kontext "IndividuellePraesentation" + printlog "create new individual slideshow" + Neu.Click + Kontext "IndividuellePraesentationDefinieren" + printlog "set name of individiual slideshow to Test 1" + PraesentationName.SetText "Test 1" + Dim i + Dim Zaehler + printlog "add slides to presentation" + Zaehler=SeitenPraesentation.GetItemCount + For i=1 to Zaehler + SeitenPraesentation.SetNoSelection + SeitenPraesentation.Select i + Hinzufuegen.Click + if SelectedSlides.GetItemCount=i Then + Printlog " - slide added to slideshow" + else + Warnlog " Count does not match selection. Should be: "+ i + " but is: "+ IndividuellePraesentation.GetItemCount + end if + next i + Printlog " - Add slides using multiple selections" + SeitenPraesentation.Select 1 + Hinzufuegen.Click + SeitenPraesentation.Select 2 + Hinzufuegen.Click + SeitenPraesentation.Select 3 + Hinzufuegen.Click + SeitenPraesentation.Select 4 + Hinzufuegen.Click + + printlog "control number of added slides" + if SelectedSlides.GetItemCount=8 Then + Printlog " - slides has been added, multiple selection is working" + else + Warnlog " Multiple selection does not work" + end if + + IndividuellePraesentationDefinieren.OK + sleep 2 +>>>>>>> ooo/DEV300_m101 + Kontext "IndividuellePraesentation" + if IndividuellePraesentationBenutzen.IsChecked=False Then IndividuellePraesentationBenutzen.Check + sleep 2 + printlog "run presentation" + Starten.Click + Printlog " - Individual slideshow started" + sleep 5 + printlog "Check if the navigator exists, if so - close it" + Kontext "Navigator" + if Navigator.Exists Then + Printlog " - Navigator exists, we close it" + printlog "close navigator" + Navigator.Close + sleep 2 + end if + Kontext "DocumentPresentation" + sleep 3 + DocumentPresentation.TypeKeys "<RETURN>" + sleep 2 + DocumentPresentation.TypeKeys "<RETURN>" + sleep 2 + DocumentPresentation.TypeKeys "<RETURN>" + sleep 2 + DocumentPresentation.TypeKeys "<RETURN>" + sleep 2 + DocumentPresentation.TypeKeys "<RETURN>" + sleep 2 + DocumentPresentation.TypeKeys "<RETURN>" + sleep 2 + DocumentPresentation.TypeKeys "<RETURN>" + sleep 2 + DocumentPresentation.TypeKeys "<RETURN>" + sleep 2 + DocumentPresentation.TypeKeys "<ESCAPE>" + sleep 5 + Kontext "IndividuellePraesentation" + if IndividuellePraesentation.IsVisible=False Then + Warnlog " Slideshow should have ended" + Kontext "DocumentPresentation" + DocumentPresentation.TypeKeys "<ESCAPE>" + else + printlog " Presentation seems to have ended successfully" + end if + + sleep 2 + + Kontext "IndividuellePraesentation" + printlog "Close custom slideshow" + IndividuellePraesentation.Close + + printlog "Navigator: Control if right slide is displayed" + Kontext "NavigatorDraw" + printlog " Now we switch to the navigator again" + printlog "Unless -Start on first slide- is activated? Default = No" + if Liste.GetSelIndex <> 4 then + Warnlog " This is not the right slide, it should be 4 but is: " + Liste.GetSelIndex + else + Printlog " - Individual slideshow seems to work" + end if + printlog "open custom slideshow" + SlideShowCustomSlideshow + printlog "Set Start with current page back to default = on, in ToolsOptions" + Kontext "IndividuellePraesentation" + if IndividuellePraesentationBenutzen.IsChecked=False Then IndividuellePraesentationBenutzen.Check + IndividuellePraesentation.Close + sleep 2 + Kontext "Navigator" 'Draw + if Navigator.exists then + printlog "Close the Navigator" + Navigator.Close + Kontext "NavigatorDraw" + if NavigatorDraw.exists then + NavigatorDraw.Close + endif + else + printlog "Navigator: NOT available. Good." + endif + Kontext "DocumentImpress" + setStartCurrentPage(TRUE) + printlog "close document" + Call hCloseDocument +endcase 'tExtrasIndividuellePraesentation + +'------------------------------------------------------------------------------- + +testcase tSlideshowContextMenuOneSlide + + qaerrorlog "Test not yet ready." + goto endsub + + dim NumberOfEntries as Integer + + Printlog "- ContextMenu in Slideshow" + printlog "New Impress Document" + Call hNewDocument + + printlog "Start the Slideshow." + hTypeKeys "<F5>" + printlog "Check that the right mousebutton brings up the Context-Menu." + Kontext "DocumentPresentation" + DocumentPresentation.MouseDown 50, 50, 3 + DocumentPresentation.MouseUp 50, 50, 3 + printlog "Check that the right-click brought up a Context-Menu." + printlog "And check the number of Menu-Positions (there should be XXX of them )" + NumberOfEntries = 0 + sleep 2 + try + NumberOfEntries = MenuGetItemCount + catch + warnlog " No ContextMenu found? Please inform the Automatic Tester" + kontext "DocumentImpress" + hOpenContextMenu + NumberOfEntries = MenuGetItemCount + endcatch + if (NumberOfEntries = 0) then + Warnlog " the Context-Menu doesnt contain any entries, or were not up. Test ends." + Goto Endsub + endif + if NumberOfEntries <> 3 then + warnlog " Expected three entries in this Menu, but found " + NumberOfEntries + ' if NumberOfEntries <> 6 then + ' warnlog " Expected six entries in this Menu, but found " + NumberOfEntries + else + printlog " Number of Entries was: " + NumberOfEntries + endif + printlog "Check that every position contains the expected Undermenu. (Screen: Black/White. and End Slideshow)" + printlog "And check that Menu-Item one opens an undermenu." + Printlog " We open number one: " + MenuGetItemText(MenuGetItemID(1)) + hMenuSelectNr (1) + sleep 2 + NumberOfEntries = MenuGetItemCount + printlog " Menu-entries: " + MenuGetItemCount + if (NumberOfEntries <> 2) then + Warnlog " the third Context-Menu-entry was NOT 'Screen'." + else + Printlog " We open the next number one: " + MenuGetItemText(MenuGetItemID(1)) + hMenuSelectNr (1) + endif + DocumentPresentation.MouseDown 50, 50, 3 + DocumentPresentation.MouseUp 50, 50, 3 + printlog "Open the Screen -menu." + hMenuSelectNr (1) + sleep 2 + Printlog " We open number two: " + MenuGetItemText(MenuGetItemID(MenuGetItemCount)) + printlog "Choose White" + hMenuSelectNr (2) + sleep 2 + + 'TODO - Due to existing bug, function not yet available. + printlog "Change to slideshow-ending. Check that the Context-Menu also comes up here." + 'DocumentPresentation. + hTypeKeys "<SPACE>" + Kontext "DocumentPresentation" + DocumentPresentation.MouseDown 50, 50, 3 + DocumentPresentation.MouseUp 50, 50, 3 + sleep 2 + NumberOfEntries = 0 + NumberOfEntries = MenuGetItemCount + if NumberOfEntries <> 0 then + printlog " Menu-entries: " + MenuGetItemCount + else + warnlog " No context-menu at Slideshow-endpage." + DocumentPresentation.TypeKeys "<ESCAPE>" + endif + + printlog "And that one can go back." + hMenuSelectNr (1) 'Open the Goto Slide -menu. + sleep 2 + Printlog " We open number one (should be 'Goto First Slide'): " + MenuGetItemText(MenuGetItemID(1)) + hMenuSelectNr (2) 'Choose "Back" 'TODO ;: but now we just end the slideshow + sleep 2 + + Kontext "DocumentPresentation" + DocumentPresentation.TypeKeys "<ESCAPE>" + DocumentPresentation.TypeKeys "<ESCAPE>" + Kontext "DocumentImpress" + InsertSlide + + printlog "Start the Slideshow." + hTypeKeys "<F5>" + printlog "Check that the right mousebutton brings up the Context-Menu." + Kontext "DocumentPresentation" + DocumentPresentation.MouseDown 50, 50, 3 + DocumentPresentation.MouseUp 50, 50, 3 + sleep 2 + + printlog "Check that Menu-Item (three) really finishes the presentation." + Printlog " We open the last entry (End Show): " + MenuGetItemText(MenuGetItemID(MenuGetItemCount)) + hMenuSelectNr (4) 'MenuGetItemCount) 'End Slideshow + if DocumentPresentation.Exists then + Warnlog "either wrong position for 'End Slideshow', or the command didnt work." + else + printlog "The presentation was closed, good." + endif + + printlog "Check that one can step one step forward, even if there is no more than one slide." + printlog "Start the Slideshow." + hTypeKeys "<F5>" + printlog "Check that the right mousebutton brings up the Context-Menu." + sleep (2) + Kontext "DocumentPresentation" + DocumentPresentation.MouseDown 50, 50, 3 + DocumentPresentation.MouseUp 50, 50, 3 + sleep 2 + + printlog "Open the Goto Slide -menu" + hMenuSelectNr (2) + printlog "Select the 'one step forward' -entry" + hMenuSelectNr (1) + + printlog "Check that we're on the last slide" + Kontext "DocumentPresentation" + DocumentPresentation.MouseDown 50, 50, 3 + DocumentPresentation.MouseUp 50, 50, 3 + sleep 2 + + hMenuSelectNr (2) + if MenuIsItemEnabled (MenugetItemID(4)) then + printlog "Jumped to the right slide" + else + warnlog "possibly the 'jump to slide' -menu didnt quite work" + endif + + printlog "Close the Context-Menu" + hMenuSelectNr (0) + Kontext "DocumentPresentation" + + printlog "Check if the context-menu also comes up at the very last page (slideshow-ending)" + DocumentPresentation.TypeKeys "<SPACE>" + sleep 1 + Kontext "DocumentPresentation" + DocumentPresentation.MouseDown 50, 50, 3 + DocumentPresentation.MouseUp 50, 50, 3 + sleep 2 + + if MenuGetItemText (MenuGetItemID(1)) <> "" then + Printlog "Context-menu came up at the last page: correct." + else + Warnlog "Context-menu did NOT come up correctly at the last page: false." + endif + + printlog "Check if we from here, via the context menu, can go back to the first page" + hMenuSelectNr (2) 'Open the Goto Slide -menu. + sleep 1 + hMenuSelectNr (1) 'First Slide + + printlog "Check that we're on the first slide" + Kontext "DocumentPresentation" + DocumentPresentation.MouseDown 50, 50, 3 + DocumentPresentation.MouseUp 50, 50, 3 + sleep 2 + + hMenuSelectNr (2) 'Open the Goto Slide -menu. + if MenuIsItemEnabled (MenugetItemID(3)) then + printlog "Jumped to the right slide" + else + warnlog "possibly the 'jump to slide' -menu didnt quite work from the last slide" + endif + + printlog "Close the Context-Menu" + MenuSelect (0) + printlog "Close the Presentation" + hTypeKeys "<ESCAPE>" + printlog "Close Document" + Call hCloseDocument +endcase 'tSlideshowContextMenuOneSlide + +'------------------------------------------------------------------------------- + +testcase tSlideshowContextMenuMoreSlides + + qaerrorlog "Test not yet ready." + goto endsub + + dim NumberOfEntries as Integer + + Printlog "- ContextMenu in Slideshow" + printlog "New Impress Document" + Call hNewDocument + printlog "Insert three new Slides" + InsertSlide + InsertSlide + InsertSlide + printlog "Start the Slideshow." + hTypeKeys "<F5>" + sleep (3) + printlog "Check that the right mousebutton brings up the Context-Menu." + Kontext "DocumentPresentation" + DocumentPresentation.MouseDown 50, 50, 3 + DocumentPresentation.MouseUp 50, 50, 3 + printlog "Check that the right-click brought up a Context-Menu." + printlog "And check the number of Menu-Positions (there should be XXX of them )" + NumberOfEntries = 0 + sleep 2 + try + NumberOfEntries = MenuGetItemCount + catch + warnlog " No ContextMenu found? Please inform the Automatic Tester" + kontext "DocumentImpress" + hOpenContextMenu + NumberOfEntries = MenuGetItemCount + endcatch + if (NumberOfEntries = 0) then + Warnlog " the Context-Menu doesnt contain any entries, or were not up. Test ends." + Goto Endsub + endif + if NumberOfEntries <> 6 then + warnlog " Expected six entries in this Menu, but found " + NumberOfEntries + else + printlog " Number of Entries was: " + NumberOfEntries + endif + printlog "Check that every position contains the expected Undermenu. (Screen: Black/White. and End Slideshow)" + printlog "And check that Menu-Item one opens an undermenu." + Printlog " We open number four: " + MenuGetItemText(MenuGetItemID(4)) + hMenuSelectNr (3) + sleep 2 + NumberOfEntries = MenuGetItemCount + printlog " Menu-entries: " + MenuGetItemCount + if (NumberOfEntries <> 2) then + Warnlog " the first Context-Menu-entry was NOT 'Screen'." + else + Printlog " We open the next number one: " + MenuGetItemText(MenuGetItemID(1)) + hMenuSelectNr (1) + endif + DocumentPresentation.MouseDown 50, 50, 3 + DocumentPresentation.MouseUp 50, 50, 3 + hMenuSelectNr (3) 'Open the Screen -menu. + sleep 2 + Printlog " We open number two: " + MenuGetItemText(MenuGetItemID(MenuGetItemCount)) + hMenuSelectNr (2) 'Choose "White" + sleep 2 + + 'TODO - Due to existing bug, function not yet available. + printlog "Change to slideshow-ending. Check that the Context-Menu also comes up here." + 'DocumentPresentation. + hTypeKeys "<SPACE>" + Kontext "DocumentPresentation" + DocumentPresentation.MouseDown 50, 50, 3 + DocumentPresentation.MouseUp 50, 50, 3 + sleep 2 + NumberOfEntries = 0 + NumberOfEntries = MenuGetItemCount + if NumberOfEntries <> 0 then + printlog " Menu-entries: " + MenuGetItemCount + else + warnlog " No context-menu at Slideshow-endpage." + DocumentPresentation.TypeKeys "<ESCAPE>" + endif + + printlog "And that one can go back." + hMenuSelectNr (2) 'Open the Goto Slide -menu. + sleep 2 + Printlog " We open number one (should be 'Goto First Slide'): " + MenuGetItemText(MenuGetItemID(1)) + hMenuSelectNr (2) 'Choose "Back" 'TODO ;: but now we just end the slideshow + sleep 2 + + Kontext "DocumentPresentation" + DocumentPresentation.TypeKeys "<ESCAPE>" + DocumentPresentation.TypeKeys "<ESCAPE>" + Kontext "DocumentImpress" + + printlog "Start the Slideshow." + hTypeKeys "<F5>" + printlog "Check that the right mousebutton brings up the Context-Menu." + Kontext "DocumentPresentation" + DocumentPresentation.MouseDown 50, 50, 3 + DocumentPresentation.MouseUp 50, 50, 3 + sleep 2 + + printlog "Check that Menu-Item (three) really finishes the presentation." + Printlog " We open the last entry (End Show): " + MenuGetItemText(MenuGetItemID(MenuGetItemCount)) + hMenuSelectNr (4)'MenuGetItemCount) 'End Slideshow + sleep 4 + if DocumentPresentation.Exists then + Warnlog "either wrong position for 'End Slideshow', or the command didnt work." + Kontext "DocumentPresentation" + DocumentPresentation.MouseDown 50, 50, 3 + DocumentPresentation.MouseUp 50, 50, 3 + sleep 2 + Printlog " We open the last entry (End Show): " + MenuGetItemText(MenuGetItemID(MenuGetItemCount)) + hMenuSelectNr (4)'MenuGetItemCount) 'End Slideshow + else + printlog "The presentation was closed, good." + endif + + printlog "Check that one can step one step forward, even if there is no more than one slide." + printlog "Start the Slideshow." + hTypeKeys "<F5>" + sleep (3) + printlog "Check that the right mousebutton brings up the Context-Menu." + Kontext "DocumentPresentation" + DocumentPresentation.MouseDown 50, 50, 3 + DocumentPresentation.MouseUp 50, 50, 3 + sleep 2 + + hMenuSelectNr (2) 'Open the Goto Slide -menu. + + printlog "Select the 'one step forward' -entry" + hMenuSelectNr (1) + + printlog "Check that we're on the last slide" + Kontext "DocumentPresentation" + DocumentPresentation.MouseDown 50, 50, 3 + DocumentPresentation.MouseUp 50, 50, 3 + sleep 2 + + hMenuSelectNr (2) 'Open the Goto Slide -menu. + if MenuIsItemEnabled (MenugetItemID(4)) then + printlog "Jumped to the right slide" + else + warnlog "possibly the 'jump to slide' -menu didnt quite work" + endif + + printlog "Close the Context-Menu" + hMenuSelectNr (0) + Kontext "DocumentPresentation" + + printlog "Check if the context-menu also comes up at the very last page (slideshow-ending)" + DocumentPresentation.TypeKeys "<SPACE>" + sleep 1 + Kontext "DocumentPresentation" + DocumentPresentation.MouseDown 50, 50, 3 + DocumentPresentation.MouseUp 50, 50, 3 + sleep 2 + + if MenuGetItemText (MenuGetItemID(1)) <> "" then + Printlog "Context-menu came up at the last page: correct." + else + Warnlog "Context-menu did NOT come up correctly at the last page: false." + endif + + printlog "Check if we from here, via the context menu, can go back to the first page" + hMenuSelectNr (2) 'Open the Goto Slide -menu. + sleep 1 + hMenuSelectNr (1) 'First Slide + + printlog "Check that we're on the first slide" + Kontext "DocumentPresentation" + DocumentPresentation.MouseDown 50, 50, 3 + DocumentPresentation.MouseUp 50, 50, 3 + sleep 2 + + hMenuSelectNr (2) 'Open the Goto Slide -menu. + if MenuIsItemEnabled (MenugetItemID(3)) then + printlog "Jumped to the right slide" + else + warnlog "possibly the 'jump to slide' -menu didnt quite work from the last slide" + endif + + printlog "Close the Context-Menu" + MenuSelect (0) + printlog "Close the Presentation" + hTypeKeys "<ESCAPE>" + printlog "Close Document" + Call hCloseDocument +endcase 'tSlideshowContextMenuMoreSlides + +'------------------------------------------------------------------------------- + +testcase tiMousePointerHides + + qaerrorlog "Test not yet ready." + goto endsub + + dim i as Integer + + Printlog "- ContextMenu in Slideshow" + printlog "New Impress Document" + Call hNewDocument + + printlog "Start the Slideshow." + hTypeKeys "<F5>" + sleep 1 + i = 0 + while ((getMouseStyle = 0) AND (i<20)) + sleep 1 + inc (i) + printlog getMouseStyle + if (getMouseStyle <> 0) then i = 20 + wend + if (getMouseStyle <> 0) then + printlog "Mousepointer disappeared like it should have" + else + warnlog "the mousepointer was still visible, after 20 seconds." + endif + + hTypeKeys "<ESCAPE>" + hTypeKeys "<ESCAPE>" + + printlog "Close Document" + Call hCloseDocument +endcase 'tiMousePointerHides + +'------------------------------------------------------------------------------- diff --git a/testautomation/graphics/optional/includes/impress/i_stylist.inc b/testautomation/graphics/optional/includes/impress/i_stylist.inc new file mode 100644 index 000000000000..1ef1773a5c55 --- /dev/null +++ b/testautomation/graphics/optional/includes/impress/i_stylist.inc @@ -0,0 +1,152 @@ +'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@oracle.com +'* +'* short description : +'* +'\******************************************************************* + +testcase tFormatStylistBackground + printlog " special test for BUG # 96364 Background style looses functionality over PPT Ex/import" + dim sFilter (50) as string + dim sFileList (30) as string + dim i as integer + dim x as integer + dim y as integer + dim iColor as integer + dim sFileName as string + dim Exlist(20) as string + + sFilter (0) = 0 + + if bAsianLan then + QaErrorLog "This testcase does not support Asian languages. Test ends." + goto endsub + end if + + if (glLocale(5) = "") then + qaErrorLog("Language dependant string 'Background' is missing; get it from the stylist and insert it into the locale-file mentioned in the .bas file!") + goto endsub + endif + + printlog " if not exists : gOfficePath + '\\user\\impress\\optional\\', create it" + if app.dir (ConvertPath ( gOfficePath + "user/work/impress") ) = "" then + app.mkdir ConvertPath ( gOfficePath + "user/work/impress") + endif + if app.dir (ConvertPath ( gOfficePath + "user/work/impress/optional")) = "" then + app.mkdir ConvertPath ( gOfficePath + "user/work/impress/optional") + endif + + printlog " open application" + Call hNewDocument + + iColor = 10 + printlog " change background color via stylist" + if (iColor <> fGetSetPageBackground (iColor,0)) then + warnlog "Stylist background was not changed as expected :-( "+iColor + endif + printlog " check if it is the same in Format -> Page" + if fGetSetPageBackground (0,1) <> iColor then + warnlog " First stage error! Difference between stylist and menu entry :-( "+iColor + endif + + printlog " save this in 3 formats:" + printlog "+ - StarImpress 5.0" + printlog "+ - StarOffice 6.0 Presentation" + printlog "+ - Microsoft PowerPoint 97/2000/XP" + FileSaveAs + sleep 2 + Kontext "SpeichernDlg" + for i = 0 to 2 + if i=0 then x = Dateityp.GetItemCount + if (i) then ' set border, whenm start from beginning/end + y = ((i-1)*2)+1 ' set filter from beginning + else + y = x-3 ' set filter from end + endif + ListAppend(sFilter(), Dateityp.GetItemText (y)) + next i + SpeichernDlg.Cancel + + sFileName = convertpath( gOfficePath + "user/work/impress/optional") + GetFileList ( sFileName, "isty_*.*", Exlist() ) + KillFileList ( Exlist() ) + + for i = 1 to (ListCount(sFilter())) + sleep 1 + printlog "Going to save: '"+sFileName+"isty_"+(i)+"'..." + sleep 1 + hFileSaveAsWithFilterKill (sFileName+"isty_"+(i), "impress8" ) + printlog " saved with filter ("+i+"/3): "+ sFilter(i) + next i + + printlog "close impress" + FileClose + sleep 1 + kontext + if active.exists (5) then active.yes + sleep 10 + + printlog " open just saved files" + sFileName = ConvertPath ( gOfficePath + "user/work/impress/optional/" ) + GetFileList ( sFileName, "isty_*", sFileList() ) + + x = ListCount ( sFileList() ) + for i = 1 to x + printlog "("+i+"/"+x+"): "+sFileList(i) + hFileOpen ( sFileList(i) ) + Sleep 5 + If hIsNamedDocLoaded (sFileList(i)) Then + printlog "used filter: " + hGetUsedFilter() + else + warnlog "document didn't get loaded" + endif + sleep 5 + printlog " check if stylist, menue and prediction are as expected" + iColor = 10 + if ((fGetSetPageBackground (0,0) <> iColor) OR (fGetSetPageBackground (0,1) <> iColor)) then + warnlog "Background was not as expected on loading :-( "+iColor + endif + iColor = 20 + printlog " change background in stylist" + if (fGetSetPageBackground (iColor,0) <> iColor) then + warnlog "Stylist background was not changed as expected :-( "+iColor + endif + sleep 1 + printlog " check if background is same in format menu" + if (fGetSetPageBackground (0,1) <> iColor) then + warnlog "Format menu background is wrong :-( "+iColor + endif + + hCloseDocument + sleep 2 + next i +endcase 'tFormatStylistBackground + +'------------------------------------------------------------------------------ + diff --git a/testautomation/graphics/optional/includes/impress/i_us2_present.inc b/testautomation/graphics/optional/includes/impress/i_us2_present.inc new file mode 100644 index 000000000000..9ec6ceffeba4 --- /dev/null +++ b/testautomation/graphics/optional/includes/impress/i_us2_present.inc @@ -0,0 +1,353 @@ +'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@oracle.com +'* +'* short description : Impress User-Scenario: Beginner makes presentation. +'* +'\************************************************************************** + +testcase i_us2_pres1 + + dim Result1, Result2 as integer + dim iPictures as integer + dim PresentationFile1 as string + PresentationFile1 = (ConvertPath (gOfficePath + "user\work\PwrPres1.odp")) + + kontext "DocumentImpress" + printlog "Starting with New - Wizard - Presentation." + FileAutopilotPresentation + printlog "Called File-Autopilot-Presentation, create from template." + kontext "AutoPilotPraesentation1" + FromTemplate.Check + if gOOO = TRUE then + TemplateRegion.Select (1) + printlog "Choose a Presentation" + TemplateList.Select (2) + else + TemplateRegion.Select (1) + if TemplateList.GetItemCount < 40 then + TemplateRegion.Select (2) + if TemplateList.GetItemCount < 40 then + TemplateRegion.Select (3) + if TemplateList.GetItemCount < 40 then + Warnlog "No Templates selectable in the wizard. Please check." + goto endsub + endif + endif + endif + printlog "Choose a Presentation" + TemplateList.Select (4) + endif + printlog "Next" + Nextbutton.Click + sleep (1) + Backbutton.Click + sleep (1) + Nextbutton.Click + + printlog "Switched to the second Wizard-page." + sleep (1) + printlog "Presentations" + kontext "AutoPilotPraesentation2" + printlog "Output: Screen" + if gOOO = TRUE then + Background.Select (2) + if Backgroundchoice.GetItemCount < 2 then + Background.Select (1) + if Backgroundchoice.GetItemCount = 0 then + Warnlog "No Backgrounds selectable in the wizard. Please check." + goto endsub + endif + endif + Backgroundchoice.Select (2) + else + Background.Select (3) + if Backgroundchoice.GetItemCount < 10 then + Background.Select (2) + if Backgroundchoice.GetItemCount < 10 then + Background.Select (3) + if Backgroundchoice.GetItemCount < 10 then + Warnlog "No Backgrounds selectable in the wizard. Please check." + goto endsub + endif + endif + endif + Backgroundchoice.Select (5) + endif + Screen.Check + printlog "Next" + Nextbutton.Click + + printlog "Switched to the third Wizard-page." + sleep (1) + kontext "AutoPilotPraesentation3" + printlog "Random Effect. Random Speed. Click through every choice." + Effect.Select (15) + Speed.Select (3) + WaitSlot (5000) + Automatic.Check + Timebutton.SetText "00:00:15" + Break.SetText "00:00:20" + Logo.Check + printlog "Next" + Nextbutton.Click + + printlog "Switched to the fourth Wizard-page." + sleep (1) + kontext "AutoPilotPraesentation4" + printlog "Fill in some company-name-subject-text" + AddName.SetText "Lala1" + AddTopic.SetText "Lala2" + Askinformation.SetText "Lala3" + printlog "Next" + Nextbutton.Click + printlog " Switched to the fifth Wizard-page." + sleep (1) + kontext "AutoPilotPraesentation5" + Summary.Check + printlog "Create" + WaitSlot (2000) + AutoPilotPraesentation5.OK + + sleep (1) + printlog "Pressed 'Create'." + printlog "Add a Slide via Insert - Slide." + Kontext "DocumentImpress" + DocumentImpress.UseMenu + hMenuSelectNr (4) + hMenuSelectNr (1) + + Kontext "DocumentImpress" + DocumentImpress.UseMenu + hMenuSelectNr (5) + hMenuSelectNr (13) + printlog "Changing focus to TaskPane." + kontext "Tasks" + sleep (1) + printlog "Selecting 5th layout." + LayoutsPreview.TypeKeys "<HOME>" + sleep (1) + LayoutsPreview.TypeKeys "<RIGHT>", 4 + LayoutsPreview.TypeKeys "<RETURN>" + sleep (1) + kontext "DocumentImpress" + + sleep (1) + hTypeKeys "What we will talk about" + gMouseClick 1,1 + + kontext "Slides" + SlidesControl.TypeKeys "<HOME>" + kontext "DocumentImpress" + DocumentImpress.TypeKeys "<TAB>" + DocumentImpress.TypeKeys "Text we just wrote..." + DocumentImpress.TypeKeys "<ESCAPE>" + printlog "Switch to the second slide." + kontext "Slides" + SlidesControl.TypeKeys "<DOWN>" + kontext "DocumentImpress" + printlog "Insert three lines with text, all with different formatting." + sleep (1) + call hTextrahmenErstellen ("First line with text",20,50,70,50) + sleep (1) + call hTextrahmenErstellen ("Second line with text",20,60,70,60) + sleep (1) + call hTextrahmenErstellen ("Third line with text",20,70,70,70) + printlog "Go down to the third slide." + kontext "Slides" + SlidesControl.TypeKeys "<HOME>" + SlidesControl.TypeKeys "<PAGEDOWN>", 3 + printlog "Insert Smiley, + two circles around the eyes, + two new pupils," + printlog "placed at some interesteing place inside the circles." + Kontext "Toolbar" + SymbolShapes.TearOff + sleep (1) + kontext "SymbolShapes" + SymbolShapesSmiley.Click + sleep (1) + kontext "DrawingObjectbar" + AreaFilling.TypeKeys "<HOME>" + AreaFilling.TypeKeys "<DOWN>", 10 + printlog "Select (11) 'Lime-Green" + AreaFilling.TypeKeys "<RETURN>" + sleep (1) + gMouseMove (53,50,90,80) + Kontext "Toolbar" + Ellipsen.Click + kontext "SymbolShapes" + SymbolShapes.Close + Kontext "DocumentImpress" + gMouseMove (60,43,70,65) + hTypeKeys "<Escape>" + Kontext "Toolbar" + Ellipsen.Click + gMouseMove (65,57,69,63) + hTypeKeys "<Escape>" + Kontext "Toolbar" + Ellipsen.Click + gMouseMove (70,50,82,65) + hTypeKeys "<Escape>" + Kontext "Toolbar" + Ellipsen.Click + gMouseMove (77,57,80,63) + hTypeKeys "<Escape>" + sleep (1) + + kontext "Slides" + printlog "get to the last slide." + SlidesControl.TypeKeys "<PAGEDOWN>", 3 + printlog "Insert 4th slide." + SlidesControl.TypeKeys "<RETURN>" + printlog "Delete everything on the page." + kontext "DocumentImpress" + gMouseClick 1,1 + EditSelectAll + DocumentImpress.TypeKeys "<DELETE>" + printlog "Insert-Picture-From File. (some crazy picture which fits the theme)" + InsertGraphicsFromFile + Kontext "GrafikEinfuegenDlg" + printlog "Open graphic" + Dateiname.SetText ConvertPath (gTesttoolPath + "global\input\graf_inp\ball.eps") + Oeffnen.Click + gMouseClick 1,1 + printlog "Add a text above the picture. 'There is movement..." + call hTextrahmenErstellen ("There is movement...",20,40,70,30) + + printlog "Add a new slide." + InsertSlide + printlog "Inserted new slide." + kontext "DocumentImpress" + printlog "Bla bla about everything..." + DocumentImpress.TypeKeys "<TAB>" + DocumentImpress.TypeKeys "Bla bla about everything..." + DocumentImpress.TypeKeys "<ESCAPE>",2 + + printlog "Add a new slide." + InsertSlide + printlog " Inserted new slide." + kontext "DocumentImpress" + printlog "Write text: Q & A" + DocumentImpress.TypeKeys "<TAB>" + DocumentImpress.TypeKeys "Q & A" + DocumentImpress.TypeKeys "<ESCAPE>",2 + sleep (1) + + printlog "Add a new slide." + InsertSlide + kontext "DocumentImpress" + + printlog "Thanks for listening, time for coffee... (ending)" + DocumentImpress.TypeKeys "<TAB>" + DocumentImpress.TypeKeys "Class dismissed..." + DocumentImpress.TypeKeys "<ESCAPE>",2 + + printlog "Save Document" + call hFileSaveAsKill (PresentationFile1) + printlog "OK, saved at ", PresentationFile1 + sleep (1) + + printlog "Close Document" + Call hCloseDocument +endcase 'i_us2_pres1 + +'------------------------------------------------------------------------------ + +testcase i_us2_pres2 + qaerrorlog "not yet ready." + goto endsub + dim Result1, Result2 as integer + dim iPictures as integer + dim PresentationFile1, PresentationFile2, PresentationFileToBeLoaded as string + PresentationFile1 = (ConvertPath (gTesttoolPath + "graphics\required\input\rightfont.odp")) + PresentationFile2 = (ConvertPath (gOfficePath + "user\work\xxxxxx9.odp")) + kontext "DocumentImpress" + printlog "New - Wizard - Presentation" + FileAutopilotPresentation + printlog " Called File-Autopilot-Presentation." + printlog "Create from Template" + kontext "AutoPilotPraesentation1" + EmptyPresentation.Check + AutoPilotPraesentation1.TypeKeys "<DOWN>" + sleep (3) + AutoPilotPraesentation1.TypeKeys "<DOWN>" + if Existingpresentation.IsChecked(5) then + printlog " Pressing down worked fine" + else + warnlog " Pressing down didnt work as expected." + endif + printlog "Click the Open-button" + ExistingOpen.Click + printlog "Check if the Open-dialogue is there" + kontext "GeneralFileDialog" + if GeneralFileDialog.Exists(10) = FALSE then + warnlog " Open-file-dialogue didnt show up." + else + GeneralFileDialog.Cancel + endif + sleep (3) + kontext "AutoPilotPraesentation1" + AutoPilotPraesentation1.TypeKeys "<SHIFT TAB>" + AutoPilotPraesentation1.TypeKeys "<UP>" + AutoPilotPraesentation1.TypeKeys "<DOWN>" + AutoPilotPraesentation1.TypeKeys "<TAB><TAB>" + sleep (1) + Existinglist.TypeKeys "<HOME>" + sleep (1) + Existinglist.TypeKeys "<DOWN>" + sleep (3) + if Existinglist.GetSelText = "" then + Warnlog " No entries in the recently-opened-files-list. Check if it's correct." + else + PresentationFileToBeLoaded = Existinglist.GetSelText + AutoPilotPraesentation1.OK + endif + + kontext "DocumentImpress" + if DocumentImpress.Exists(10) = FALSE then + if DocumentImpress.StatusIsProgress = FALSE then + sleep (10) + if DocumentImpress.StatusIsProgress then + warnlog " Took over 20 seconds to load the document Document: " + PresentationFileToBeLoaded + ". Stalled?" + endif + goto endsub + endif + else + printlog " Document " + PresentationFileToBeLoaded + " seemed to have been loaded correctly." + endif + sleep (3) + if DocumentImpress.StatusIsProgress then + sleep (5) + endif + printlog "Save Document" + call hFileSaveAsKill (PresentationFile2) + printlog "OK saved at ", PresentationFile2 + sleep (1) + + printlog "Close Document" + Call hCloseDocument +endcase 'i_us2_pres2 diff --git a/testautomation/graphics/optional/includes/impress/i_us_present.inc b/testautomation/graphics/optional/includes/impress/i_us_present.inc new file mode 100644 index 000000000000..ea0d1ff3af2d --- /dev/null +++ b/testautomation/graphics/optional/includes/impress/i_us_present.inc @@ -0,0 +1,591 @@ +'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@oracle.com +'* +'* short description : Include-file for impress User-Scenario: Presentation. +'* +'\******************************************************************** + +testcase i_us_presentation + + dim iPictures as integer 'variable for the number of the used picture gallery theme + dim iAnimations as Integer 'variable used for the number of the used animation gallery theme + dim iSize as integer 'step variable + dim sFileName as string 'name for ppt export file + dim iKeyStroke as integer 'counter variable for hitting space in running presentation + dim PresentationFile as string 'variable for the file name + + + PresentationFile = ConvertPath( gOfficePath + "user\work\PowerPres1.odp" ) + printlog "Setting up an impress document in several steps..." + printlog "1. New impress document" + Call hNewDocument + Kontext "DocumentImpress" + printlog "Selecting layout: Centered Text" + DocumentImpress.UseMenu + hMenuSelectNr (5) + hMenuSelectNr (13) + printlog "Changing focus to TaskPane." + sleep 1 + Kontext "Tasks" + printlog "to get to the very first position" + LayoutsPreview.TypeKeys "<HOME>" + printlog "'to get to the right position" + LayoutsPreview.TypeKeys "<RIGHT>", 5 + LayoutsPreview.TypeKeys "<RETURN>" + WaitSlot (2000) + kontext "DocumentImpress" + printlog "Add a second Master-Page " + ViewMasterPage + kontext "Slides" + SlidesControl.OpenContextMenu(true) + sleep (2) + printlog "New master" + MenuSelect(MenuGetItemID(1)) + sleep (1) + printlog "Inserted second Master-Slide" + + printlog "set background to picture(Gallery)" + Kontext "Gallery" + + if Gallery.Exists(2) then + warnlog "The Gallery was already visible. Check earlier ran tests for inconsistency." + sleep (2) + else + ToolsGallery + WaitSlot (2000) + end if + + if gOOO = TRUE then 'OpenOffice.org + select case iSprache + case 01 : iPictures = 1 'English + case else : iPictures = 1 'Unknown + warnlog "Please insert the entrienumbers for 'Backgrounds'. Language: " + iSprache + end select + + else ' StarOffice... + select case iSprache + case 01 : iPictures = 21 'English + case 07 : iPictures = 28 'Russian + case 31 : iPictures = 04 'Netherlands + case 33 : iPictures = 22 'French + case 34 : iPictures = 12 'Spanish + case 36 : iPictures = 17 'Hungaria + case 39 : iPictures = 23 'Italian + case 46 : iPictures = 09 'Swedish + case 48 : iPictures = 20 'Polish + case 49 : iPictures = 11 'German + case 55 : iPictures = 16 'Portuguese + case 81 : iPictures = 22 'Japanese + case 82 : iPictures = 04 'Korean + case 86 : iPictures = 06 'Simplified + case 88 : iPictures = 17 'Traditional + case else : iPictures = 21 'Unknown + warnlog "Please insert the entrienumbers for 'Backgrounds'. Language: " + iSprache + end select + end if + + kontext "Gallery" + Gallerys.Select (iPictures) + View.TypeKeys "<HOME><RIGHT><RIGHT>" + printlog "OpenContextMenu" + View.TypeKeys "<SHIFT F10>" + sleep (2) + MenuSelect(MenuGetItemID(1)) + sleep (2) + MenuSelect(MenuGetItemID(1)) + sleep (2) + printlog "Check that we really got a copy of the object" + kontext "DocumentImpress" + DocumentImpress.OpenContextMenu(true) + sleep (2) + MenuSelect 27353 + sleep (2) + Kontext "ExportierenDlg" + + if ExportierenDlg.IsVisible(5) then + printlog "Gallery-object correctly copied into Slide." + ExportierenDlg.Close + WaitSlot (2000) + end if + + kontext "GraphicObjectbar" + + if GraphicObjectbar.Exists(5) = FALSE then + kontext "DocumentImpress" + ViewToolbarsPicture + end if + + kontext "GraphicObjectbar" + printlog "50% Transparency" + WaitSlot (2000) + kontext "GraphicObjectbar" + Transparenz.SetText "50" + sleep (1) + printlog "Mosaic 16px x 16px" + Filter.TearOff + sleep (1) + kontext "GraphicFilterBar" + Mosaic.Click + kontext "Mosaic" + if ( Mosaic.exists( 2 ) ) then + Width.SetText "16" + Height.SetText "16" + Mosaic.OK + else + warnlog "Dialog did not came up." + endif + kontext "GraphicFilterBar" + printlog "Closing dialog and Gallery." + GraphicFilterBar.Close + ToolsGallery + WaitSlot (1000) + kontext "DocumentImpress" + gMouseClick 50,50 + sleep (1) + FormatPositionAndSize + kontext + if ( Active.exists( 2 ) ) then + active.setPage(TabPositionAndSize) + kontext "TabPositionAndSize" + Width.SetText "28" + Height.SetText "21" + SizePosition.TypeKeys "<RIGHT><DOWN>" + TabPositionAndSize.OK + else + warnlog( "Page <TabPositionAndSize> did not open" ) + endif + + printlog "Close Master" + hUseAsyncSlot( "ViewNormal" ) + kontext "DocumentImpress" + printlog "Inserting title on first slide." + DocumentImpress.TypeKeys "<TAB>" + DocumentImpress.TypeKeys "<RETURN>" + DocumentImpress.TypeKeys "WELCOME!" + DocumentImpress.TypeKeys "<ESCAPE>", 2 + sleep 1 + printlog "Save Document" + call hFileSaveAsKill (PresentationFile) + ActiveDeactivateCTLSupport (FALSE) + printlog "Close Document" + hFileCloseAll() + + printlog "-------------------------------------------------------------------------------" + + printlog "2. Loading file again..." + if ( FileExists(PresentationFile) ) then 'if file exists... + hFileOpen (PresentationFile) + else + warnlog "Testdoc is missing or did not get saved." + goto endsub + end if + sleep (2) + printlog "New Slide" + kontext "slides" + SlidesControl.TypeKeys( "<PAGEDOWN>", 3 ) + SlidesControl.TypeKeys "<SHIFT F10>" 'OpenContextMenu(true) + sleep (1) + MenuSelect(MenuGetItemID(1)) 'New Slide 'No 2 + printlog "Inserted second normal Slide" + printlog "Select 4th Layout: Title and 2 Content blocks" + Kontext "Tasks" + printlog "to get to the very first position" + LayoutsPreview.TypeKeys "<HOME>" + printlog "'to get to the right position" + LayoutsPreview.TypeKeys "<RIGHT>", 3 + LayoutsPreview.TypeKeys "<RETURN>" + hUseAsyncSlot( "ViewNormal" ) + printlog "Hide Slidepane (Oops! The user were too fast: accidently hide the pane)" + kontext "Slides" + SlidesControl.FadeOut + WaitSlot (1000) + printlog "Restore Pane." + SlidesControl.FadeIn + printlog "Did the 'mistake' to FadeIn/Out the Slidepane" + InsertGraphicsFromFile + Kontext "GrafikEinfuegenDlg" + if GrafikEinfuegenDlg.exists(5) then + printlog " The Insertgraphics-dialogue showed up correctly." + sleep (5) + else + warnlog " The Insertgraphics-dialogue didn't show up." + endif + + printlog "Graphics-Import-dialogue. Select i_us_large.jpg" + Kontext "GrafikEinfuegenDlg" + + if ( GrafikEinfuegenDlg.exists( 2 ) ) then + Dateiname.SetText ConvertPath (gTesttoolPath + "graphics\required\input\i_us_large.jpg") + Oeffnen.Click + Kontext "DocumentImpress" + printlog "Deselect graphic" + DocumentImpress.TypeKeys "<ESCAPE>" + printlog "Inserted Graphic into the second Slide" + printlog "Change text on the two text-boxes" + DocumentImpress.TypeKeys "<TAB>" 'First text. + DocumentImpress.TypeKeys "<RETURN>" 'To get into edit-mode. + DocumentImpress.TypeKeys "The World has just become easier now.." + DocumentImpress.TypeKeys "<ESCAPE><ESCAPE>" + DocumentImpress.TypeKeys "<TAB><TAB><TAB>" + DocumentImpress.TypeKeys "<RETURN>" + DocumentImpress.TypeKeys "100% Recyclable" + DocumentImpress.TypeKeys "<RETURN>" + DocumentImpress.TypeKeys "Very durable" + DocumentImpress.TypeKeys "<RETURN>" + DocumentImpress.TypeKeys "Priced lower!" + DocumentImpress.TypeKeys "<RETURN>" + DocumentImpress.TypeKeys "Astonishing!" + DocumentImpress.TypeKeys "<RETURN>" + DocumentImpress.TypeKeys "Energy-efficient" + DocumentImpress.TypeKeys "<ESCAPE><ESCAPE>" + else + warnlog( "Failed to open <Insert Graphics> dialog" ) + endif + + printlog "Save Document" + call hFileSaveAsKill (PresentationFile) + printlog "Close Document" + hFileCloseAll() + + printlog "-------------------------------------------------------------------------------" + + printlog "3. Loading file again.." + if ( FileExists(PresentationFile) ) then 'if file exists... + hFileOpen(PresentationFile) + else + warnlog "Testdoc is missing or did not get saved." + goto endsub + end if + + printlog "Insert New Slide, 3rd one" + kontext "slides" + SlidesControl.TypeKeys( "<PAGEDOWN>", 3 ) + kontext "DocumentImpress" + InsertSlide + printlog "5. Layout. Title only" + kontext "Tasks" + LayoutsPreview.TypeKeys "<HOME>" 'to get to the very first position + LayoutsPreview.TypeKeys "<RIGHT>", 4 'to get to the right position + LayoutsPreview.TypeKeys "<RETURN>" + hUseAsyncSlot( "ViewNormal" ) + kontext "DocumentImpress" + Call gMouseClick 50,50 + DocumentImpress.TypeKeys "<TAB><RETURN>" + DocumentImpress.TypeKeys "A new form" + DocumentImpress.TypeKeys "<ESCAPE>", 2 + printlog "6. (Fat picture) InsertPictureFromFile: (empty slide) (ev size-fit)" + printlog "insert graphic file (i_us_large.jpg)" + InsertGraphicsFromFile + WaitSlot (1000) + Kontext "GrafikEinfuegenDlg" + Dateiname.SetText ConvertPath (gTesttoolPath + "graphics\required\input\i_us_large.jpg") + sleep (2) + Oeffnen.Click + WaitSlot (2000) + Kontext "DocumentImpress" + printlog "The user corrects the picture" + DocumentImpress.MouseDown 50,50 + DocumentImpress.MouseUp 50,50 + DocumentImpress.TypeKeys "<DOWN>", 30 + printlog "Deselect graphic" + DocumentImpress.MouseDoubleClick 90,90 + printlog "Wrote Text, Inserted Graphic, and moved it in the third Slide" + printlog "Save Document" + call hFileSaveAsKill (PresentationFile) + printlog "Close Document" + hFileCloseAll() + + printlog "-------------------------------------------------------------------------------" + + printlog "4. reopening file..." + select case iSprache + case 01 : iAnimations = 01 'English + case 07 : iAnimations = 01 'Russian + case 31 : iAnimations = 03 'Netherlands + case 33 : iAnimations = 01 'French + case 34 : iAnimations = 01 'Spanish + case 36 : iAnimations = 01 'Hungaria + case 39 : iAnimations = 01 'Italian + case 46 : iAnimations = 01 'Swedish + case 48 : iAnimations = 01 'Polish + case 49 : iAnimations = 01 'German + case 55 : iAnimations = 01 'Portuguese + case 81 : iAnimations = 02 'Japanese + case 82 : iAnimations = 17 'Korean + case 86 : iAnimations = 07 'Simplified + case 88 : iAnimations = 15 'Traditional + case else : iAnimations = 01 'Unknown + warnlog "Please insert the entrienumbers for 'Backgrounds'. Language: " + iSprache + end select + + if ( FileExists(PresentationFile) ) then 'if file exists... + hFileOpen( PresentationFile) + else + warnlog "Testdoc is missing or did not get saved." + goto endsub + end if + + kontext "slides" + SlidesControl.TypeKeys( "<PAGEDOWN>", 5 ) + kontext "DocumentImpress" + printlog "insert slide no 4" + hUseAsyncSlot( "InsertSlide" ) + printlog "Background: picture (Gallery)" + Kontext "Gallery" + + if ( Not Gallery.Exists() ) then + ToolsGallery + end if + + kontext "Gallery" + + if ( Gallery.exists( 2 ) ) then + Gallerys.Select (iAnimations) + + kontext "Gallery" + View.TypeKeys "<HOME><RIGHT><RIGHT>" + sleep 1 + View.TypeKeys "<SHIFT F10>" 'OpenContextMenu + sleep 1 + MenuSelect(MenuGetItemID(1)) 'Insert + sleep 1 + MenuSelect(MenuGetItemID(1)) 'Copy + else + warnlog( "Could not access Gallery" ) + endif + + sleep 1 + kontext "DocumentImpress" + DocumentImpress.TypeKeys "<UP>", 75 + DocumentImpress.TypeKeys "<LEFT>", 100 + printlog "Deselect graphic" + DocumentImpress.MouseDoubleClick 90,90 + printlog "Close the Gallery" + ToolsGallery + printlog "Change Text on slide" + DocumentImpress.TypeKeys "<TAB>" + DocumentImpress.TypeKeys "<RETURN>" + DocumentImpress.TypeKeys "The process starts here.." + DocumentImpress.TypeKeys "<ESCAPE><ESCAPE>" + gMouseClick 50,50 + printlog( "Decrease..." ) + + for iSize = 80 to 20 step -20 + CreateTextSetEffectAndAngle + DocumentImpress.TypeKeys "<DOWN>", 70 + DocumentImpress.TypeKeys "<LEFT>", iSize + gMouseClick 90,90 + next iSize + + printlog( "Increase..." ) + + for iSize = 20 to 80 step 20 + CreateTextSetEffectAndAngle + DocumentImpress.TypeKeys "<DOWN>", 70 + DocumentImpress.TypeKeys "<RIGHT>", iSize + gMouseClick 90,90 + next iSize + + printlog "Inserted fourth slide with Gallery-object." + printlog "Switching back task pane to default..." + Kontext "DocumentImpress" + DocumentImpress.UseMenu + hMenuSelectNr (5) + hMenuSelectNr (13) + printlog "Save Document" + call hFileSaveAsKill (PresentationFile) + printlog "Close Document" + hFileCloseAll() + + printlog "-------------------------------------------------------------------------------" + + printlog "5. reloading file..." + if ( FileExists(PresentationFile) ) then + hFileOpen(PresentationFile) + else + warnlog "Testdoc is missing or did not get saved." + goto endsub + end if + + kontext "slides" + SlidesControl.TypeKeys( "<PAGEDOWN>", 7 ) + kontext "DocumentImpress" + printlog "New Slide. (Insert Menu) (Duplicate slide)" + InsertDuplicateSlide + printlog "Change the text in some way. (the user is making a joke with the audience)" + gMouseClick 90,90 + DocumentImpress.TypeKeys "<TAB>" + DocumentImpress.TypeKeys "<RETURN>" + hUseAsyncSlot( "EditSelectAll" ) + DocumentImpress.TypeKeys "And does it with strength..." + printlog "Inserted fifth slide with audience-joke." + printlog "Save Document" + call hFileSaveAsKill (PresentationFile) + printlog "Close Document" + hFileCloseAll() + + printlog "-------------------------------------------------------------------------------" + + printlog "6. reloading file..." + if ( FileExists(PresentationFile) ) then 'if file exists... + hFileOpen(PresentationFile) + else + warnlog "Testdoc is missing or did not get saved." + goto endsub + end if + + kontext "slides" + SlidesControl.TypeKeys( "<PAGEDOWN>", 6 ) + kontext "DocumentImpress" + printlog "Q&A Slide" + InsertSlide + WaitSlot (1000) + kontext "DocumentImpress" + DocumentImpress.TypeKeys "<TAB>" + DocumentImpress.TypeKeys "<RETURN>" + DocumentImpress.TypeKeys "Q&A" + DocumentImpress.TypeKeys "<SHIFT HOME>" + wait( 500 ) + Kontext "TextObjectbar" + + if ( not TextObjectbar.Exists() ) then + ViewToolbarsTextFormatting + end if + + Kontext "TextObjectbar" + wait( 500 ) + Printlog "Change size of font" + Schriftgroesse.Select "26" + Schriftgroesse.TypeKeys "<RETURN>" + Fett.Click + kontext "DocumentImpress" + DocumentImpress.TypeKeys "<ESCAPE><ESCAPE>" + kontext "Toolbar" + Auswahl.Click + gMouseClick 60,60 + hUseAsyncSlot( "EditSelectAll" ) + DocumentImpress.TypeKeys "<DOWN>", 50 + kontext "DocumentImpress" + printlog "Inserted sixth slide with Q&A." + printlog "Save Document" + call hFileSaveAsKill (PresentationFile) + printlog "Close Document" + hFileCloseAll() + + printlog "-------------------------------------------------------------------------------" + + printlog "7. reloading file..." + sFileName = ConvertPath( gOfficePath + "user\work\export-test.ppt" ) + + if ( FileExists(PresentationFile) ) then 'if file exists... + hFileOpen(PresentationFile) + else + warnlog "Testdoc is missing or did not get saved." + goto endsub + end if + + kontext "slides" + SlidesControl.TypeKeys( "<PAGEDOWN>",7) + kontext "DocumentImpress" + printlog "inserting Ending Slide" + InsertSlide 'No 7 + DocumentImpress.TypeKeys "End" + printlog "Inserted ending -slide." + Kontext "Gallery" + + if Gallery.Exists(2) then + warnlog "The Gallery was visible. Closed it. Check earlier ran tests for inconsistency." + ToolsGallery + WaitSlot (2000) + end if + + kontext "slides" + + for i = 1 to 8 + sleep 1 + SlidesControl.TypeKeys "<PAGEUP>" + next i + + hTypeKeys "<F5>" + kontext "DocumentPresentation" + + for iKeyStroke = 1 to 8 + wait( 3000 ) + DocumentPresentation.TypeKeys "<PAGEDOWN>" + wait( 2000 ) + next iKeyStroke + + kontext "DocumentPresentation" + + if ( DocumentPresentation.notExists( 5 ) ) then + printlog( "Presentation closed. Good." ) + else + warnlog " Presentation not finished, fullscreen view still open." + DocumentPresentation.typeKeys "<ESC>" + + kontext "DocumentPresentation" + if ( DocumentPresentation.notExists( 3 ) ) then + printlog( "Recovery attempt successful" ) + else + goto endsub + endif + end if + + kontext "DocumentImpress" + printlog "Save Document" + call hFileSaveAsKill (PresentationFile) + printlog( "Save as Powerpoint-file (Using filter at pos. 5 in the filter list)" ) + FileSaveAs + Kontext "SpeichernDlg" + + if ( SpeichernDlg.exists( 2 ) ) then + Dateiname.SetText sFileName + Dateityp.Select 5 ' Powerpoint (possibly) + printlog "Trying to save with filter: " + Dateityp.GetSelText + Speichern.Click + + Kontext "Messagebox" + hCloseDialog( Messagebox, "Yes, optional" ) + + Kontext "AlienWarning" + hCloseDialog( AlienWarning, "ok, optional" ) + else + warnlog( "<FileSaveAs> dialog did not open" ) + endif + + printlog "Close all open documents" + hFileCloseAll() + printlog( "Reload file: " & sFileName ) + hFileOpen sFileName + sleep( 3 ) + printlog "Close the office-session" + printlog "Close Documents" + hFileCloseAll() + +endcase 'i_us_presentation
\ No newline at end of file diff --git a/testautomation/graphics/optional/includes/impress/i_view.inc b/testautomation/graphics/optional/includes/impress/i_view.inc new file mode 100644 index 000000000000..214676c3b1a0 --- /dev/null +++ b/testautomation/graphics/optional/includes/impress/i_view.inc @@ -0,0 +1,328 @@ +'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@oracle.com +'* +'* short description : +'* +'********************************************************************* +' #1 tAnsichtHintergrundNotizen +' #1 tViewWorkspaceHandoutView +' #1 tViewWorkspaceOutlineView +' #1 tViewWorkspaceDrawingView +' #1 tAnsichtEbene +'\******************************************************************** + +'Datei$ = ConvertPath (gOfficePath + "user\work\test.sxi") + +testcase tAnsichtHintergrundNotizen + Printlog "- View background notes" + printlog "new document" + Call hNewDocument + try + printlog "view background notes" + ViewNotes + sleep 3 + catch + Warnlog "View-Notes could not be accessed" + endcatch + ViewWorkspaceDrawingView + sleep 1 + printlog "close document" + Call hCloseDocument + sleep 1 +endcase 'tAnsichtHintergrundNotizen + +'------------------------------------------------------------------------------- + +testcase tViewWorkspaceHandoutView + Printlog "- View background handout" + printlog "new document" + Call hNewDocument + sleep 2 + Kontext "DocumentImpress" + DocumentImpress.UseMenu + hMenuSelectNr (5) + hMenuSelectNr (13) + Printlog " ViewWorkspaceHandoutView" + ViewWorkspaceHandoutView + sleep 2 + Kontext "Tasks" + sleep 2 + if LayoutsPreview.GetItemCount <> 6 Then + Warnlog " this doesn't seem to be a handout ?: should be: 6 layouts in the Preview window, but are: " + LayoutsPreview.GetItemCount + else + Printlog " ViewWorkspaceHandoutView works" + end if + Printlog "ViewWorkspaceHandoutView closed" + printlog "back to view background drawing" + ViewWorkspaceDrawingView + printlog "close document" + Call hCloseDocument +endcase 'tViewWorkspaceHandoutView + +'------------------------------------------------------------------------------- + +testcase tViewWorkspaceOutlineView + qaerrorlog "Outcommenting tViewWorkspaceOutlineView due to unreability. - FHA" + goto endsub + dim sFile as string + dim i as integer + + printlog "load a document with heading styles in writer and use the function 'writer:'File->Send->Outline to presentation' to get it into the presentation" + ' all 'heading 1' are new slides + + printlog "document used : graphics\\required\\input\\outlinefromwriter.sxw -> you get into writer" + sFile = ConvertPath (gTesttoolPath + "graphics\required\input\outlinefromwriter.sxw") + hDateiOeffnen (sFile) + sleep 10 + printlog "with 'File->Send->Outline to presentation' you get into impress" + FileSendOutlineToPresentation + sleep 10 + Printlog "printlog View->Workspace->Outline View" + ViewWorkspaceOutlineView + sleep 1 + printlog "go to the line with the 'I' (via 'search & replace' function)" + hTypeKeys "<STRG HOME>" + EditSelectAll + hFindeImDokument ("I") + + printlog "expected level/style: 'Outline 8'" + printlog "get last character from selected style in stylist (expect a number of the outline(heading level)" + fGetPresentationStyle ("8") + + printlog "type keys [home] [tab] to go one level down" + Kontext "DocumentImpressOutlineView" + DocumentImpressOutlineView.TypeKeys "<Home><Tab>" + + printlog "expected level/style: 'Outline 9'" + fGetPresentationStyle ("9") + + Kontext "DocumentImpressOutlineView" + printlog "Edit - Select All to go select the whole text" + EditSelectAll + printlog "type keys [shift]+[tab] eight times, to get all lines to the highest, except the one with the 'I'" + DocumentImpressOutlineView.TypeKeys ("<Shift Tab>", 8) + +hPrepareSearchBUG + hTypeKeys "<STRG HOME>" + EditSelectAll + hFindeImDokument ("I") + printlog "expected level/style: 'Outline 1" + fGetPresentationStyle ("1") + + printlog "type keys [shift]+[tab] to get the last line to the highest level, too" + Kontext "DocumentImpressOutlineView" + DocumentImpressOutlineView.TypeKeys ("<Shift Tab>", 1) + printlog "expected level/style: 'Title'" + fGetPresentationStyle (0) + + Kontext "DocumentImpressOutlineView" + DocumentImpressOutlineView.TypeKeys ("<escape>", 1) + Printlog "call 'Edit->Undo' nine times" + for i = 1 to 9 + editundo + next i + +hPrepareSearchBUG + hFindeImDokument ("I") + printlog "expected level/style: 'Outline 9'" + fGetPresentationStyle (9) + + Printlog "call 'Edit->Redo' nine times " + for i = 1 to 9 + editredo + next i + try + editredo + Warnlog "NOT OK :-(" + catch + Printlog "OK" + endcatch + +hPrepareSearchBUG + hTypeKeys "<STRG HOME>" + EditSelectAll + hFindeImDokument ("I") + printlog "expected level/style: 'Title'" + fGetPresentationStyle (0) + + Printlog "call 'Edit->Undo' nine times" + for i = 1 to 9 + editundo + next i + +hPrepareSearchBUG + hTypeKeys "<STRG HOME>" + EditSelectAll + hFindeImDokument ("I") + printlog "expected level/style: 'Outline 9" + fGetPresentationStyle (9) + + printlog "type keys [strg]+[A]" + Kontext "DocumentImpressOutlineView" + EditSelectAll + printlog "type keys [strg]+[X]" + DocumentImpressOutlineView.TypeKeys "<mod1 X>" + + kontext + if messagebox.exists (5) then + Printlog "active about deleting pages with graphic objects: '" + messagebox.GetText + "'" + Messagebox.ok + else + Warnlog "messagebox missing ! (about deleting pages with graphic objects:)" + endif + + printlog "'Edit->Undo'" + editundo + printlog "'Edit->Redo'" + editredo + printlog "'Edit->Undo'" + editundo + + printlog "type keys [strg]+[A]" + Kontext "DocumentImpressOutlineView" + EditSelectAll + printlog "type keys [strg]+[X]" + DocumentImpressOutlineView.TypeKeys "<mod1 X>" + + kontext + if messagebox.exists (5) then + Printlog "active about deleting pages with graphic objects: '" + messagebox.GetText + "'" + Messagebox.ok + else + Warnlog "messagebox missing ! (about deleting pages with graphic objects:)" + endif + + printlog "type keys [strg]+[V]" + Kontext "DocumentImpressOutlineView" + DocumentImpressOutlineView.TypeKeys "<mod1 V>" + + printlog "'Edit->Undo'" + editundo + printlog "'Edit->Redo'" + editredo + + printlog "type keys [strg]+[End]" + Kontext "DocumentImpressOutlineView" + DocumentImpressOutlineView.TypeKeys "<mod1 End>" + printlog "type keys [strg]+[V]" + DocumentImpressOutlineView.TypeKeys "<mod1 V>" + printlog "type keys [strg]+[A]" + EditSelectAll + printlog "type keys [delete]" + DocumentImpressOutlineView.TypeKeys "<delete>" + + kontext + if messagebox.exists (5) then + Printlog "active-box about deleting pages with graphic objects: '" + messagebox.GetText + "'" + Printlog "SAY CANCEL TO DIALOG!" + Messagebox.Cancel + else + Warnlog "messagebox missing ! (about deleting pages with graphic objects:)" + endif + + printlog "type keys [strg]+[A]" + Kontext "DocumentImpressOutlineView" + EditSelectAll + try + editcopy + Printlog "OK" + catch + Warnlog "error 4711 TBO :-(" + endcatch + + printlog "type keys [delete]" + Kontext "DocumentImpressOutlineView" + DocumentImpressOutlineView.TypeKeys "<delete>" + + kontext + if messagebox.exists (5) then + Printlog "Active-box about deleting pages with graphic objects: '" + messagebox.GetText + "'" + Messagebox.ok + else + Warnlog "Messagebox missing ! (about deleting pages with graphic objects:)" + endif + + Kontext "DocumentImpressOutlineView" + EditSelectAll + try + editcopy + Warnlog "Didn't work!" + Printlog "'" + getclipboard() + "'" + catch + Printlog "OK" + endcatch + + ViewWorkspaceDrawingView + printlog "close document" + Call hCloseDocument +endcase 'tViewWorkspaceOutlineView + +'------------------------------------------------------------------------------- + +testcase tViewWorkspaceDrawingView + Printlog "- View/Background-drawing" + printlog "new document" + Call hNewDocument + sleep 2 + printlog "view background drawing" + ViewDrawing + try + printlog "create rectangle" + hRechteckErstellen ( 20,20,40,40 ) + sleep 1 + Printlog " - rectangle created" + catch + Warnlog " Rectangle could not be created" + endcatch + printlog "close document" + Call hCloseDocument +endcase 'tViewWorkspaceDrawingView + +'------------------------------------------------------------------------------- + +testcase tAnsichtEbene + printLog "- View/Layer" + + printlog "new document-autopilot" + FileAutopilotPresentation + Kontext "AutopilotPraesentation1" + sleep 5 + AutopilotPraesentation1.Ok + sleep 2 + sleep 2 + printlog "back to view slide" + ViewSlide + Sleep 2 + + printlog "close document" + Call hCloseDocument + +endcase 'tAnsichtEbene + +'------------------------------------------------------------------------------- diff --git a/testautomation/graphics/optional/includes/impress/options.inc b/testautomation/graphics/optional/includes/impress/options.inc new file mode 100644 index 000000000000..d67eaea8d195 --- /dev/null +++ b/testautomation/graphics/optional/includes/impress/options.inc @@ -0,0 +1,262 @@ +'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@oracle.com +'* +'* short description : Tests the Presentation-Engines effects +'* +'******************************************************************* +'* +' #1 tiPEngineOptionsTest +' #1 tiPEngineOptionsTest2 +'* +'\******************************************************************* + +function tiPEngineOptionsTest + dim filedialogue as boolean + dim lala, optsound, os, oa, odc, ota, ets, etspeed, etrep, etshap, etgt as integer + + Kontext "Tasks" + printlog "CLick on button '...' (Options)" + EffectOptions.Click + kontext "TabEffect" + if TabEffect.Exists(5) then + optsound = Sound.GetItemCount + for os = 1 to optsound + Sound.Select os + kontext "OeffnenDlg" + if OeffnenDlg.Exists (5) then + filedialogue = TRUE + OeffnenDlg.Close + kontext "TabEffect" + else + kontext "TabEffect" + endif + next os + if AfterAnimation.isEnabled AND AfterAnimation.isVisible then + for oa = 1 to AfterAnimation.GetItemCount + AfterAnimation.Select oa + if DimColor.isEnabled then + for odc = 1 to DimColor.GetItemCount + DimColor.Select odc + next odc + endif + if DelayBetweenCharacters.isEnabled then + for odc = 1 to DelayBetweenCharacters.GetItemCount + DelayBetweenCharacters.Select odc + next odc + endif + next oa + else + if DelayBetweenCharacters.isEnabled then + for odc = 1 to DelayBetweenCharacters.GetItemCount + DelayBetweenCharacters.Select odc + next odc + endif + endif + for ota = 1 to TextAnimation.GetItemCount + TextAnimation.Select ota + next ota + printlog "switch to TabPage 'Timing'" + Kontext + Active.SetPage TabTiming + kontext "TabTiming" + if TabTiming.Exists(5) then + for ets = 1 to TimingStart.GetItemCount + TimingStart.Select ets + next ets + if Delay.isVisible AND Delay.isEnabled then + Delay.GetText + else + Warnlog "Delay in Effect Options were not to be found." + endif + if Speed.isVisible AND Speed.isEnabled then + for etspeed = 1 to Speed.GetItemCount + Speed.Select etspeed + next etspeed + else + printlog " No Speed-entry for this effect." + endif + if Repeat.isVisible AND Repeat.isEnabled then + for etrep = 1 to Speed.GetItemCount + Repeat.Select etrep + next etrep + else + Printlog "Repeat in Effect Options were not to be found." + endif + Rewind.Check + Rewind.UnCheck + TriggerAnimate.IsChecked + TriggerStart.IsChecked + if Shape.isVisible AND Shape.isEnabled then + for etshap = 1 to Shape.GetItemCount + Shape.Select etshap + next etshap + else + Warnlog "Shape in Effect Options were not to be found." + endif + 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 + lala = GroupText.GetItemCount + for etgt = 1 to lala + GroupText.Select etgt + if AutomaticallyAfter.IsEnabled then + AutomaticallyAfter.Check + AutomaticallyAfter.TypeKeys "<UP>" + endif + if AnimateAttachedShape.IsEnabled then + AnimateAttachedShape.Check + if AnimateAttachedShape.IsChecked = FALSE then + Warnlog "AnimateAttachedShape should have been checked" + endif + endif + if InreverseOrder.IsEnabled then + InreverseOrder.Check + if InreverseOrder.IsChecked = FALSE then + Warnlog "InreverseOrder should have been checked" + endif + endif + next etgt + 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" +end function 'tiPEngineOptionsTest + +'------------------------------------------------------------------------------- + +function optionstest2 + dim filedialogue as boolean + dim lala, optsound, os, oa, odc, ota, ets, etspeed, etrep, etshap, etgt as integer + + Kontext "Tasks" + EffectOptions.Click + kontext "TabEffect" + if TabEffect.Exists(5) then + Sound.Select 5 + AfterAnimation.Select 2 + if DimColor.isEnabled then + DimColor.Select 5 + else + Warnlog "DimColor should have been enabled" + endif + TextAnimation.Select 3 + if DelayBetweenCharacters.isEnabled then + DelayBetweenCharacters.More 5 + else + Warnlog "DelayBetweenCharacters should have been enabled" + endif + printlog "switch to TabPage 'Timing'" + Kontext + Active.SetPage TabTiming + kontext "TabTiming" + if TabTiming.Exists(5) then + TimingStart.Select 2 + if Delay.isVisible AND Delay.isEnabled then + Delay.More 5 + else + Warnlog "Delay in Effect Options were not to be found." + endif + if Speed.isVisible AND Speed.isEnabled then + Speed.Select 3 + else + Printlog "Speed in Effect Options were not to be found." + endif + if Repeat.isVisible AND Repeat.isEnabled then + for etrep = 1 to Speed.GetItemCount + Repeat.Select etrep + next etrep + else + Warnlog "Repeat in Effect Options were not to be found." + endif + if Rewind.isVisible AND Rewind.isEnabled then + Rewind.Check + else + Printlog "Rewind in Effect Options were not to be found." + endif + if Rewind.isVisible AND Rewind.isEnabled then + Rewind.Check + Rewind.UnCheck + else + Warnlog "Rewind in Effect Options were not to be found." + endif + TriggerAnimate.IsChecked + TriggerStart.IsChecked + if Shape.isVisible AND Shape.isEnabled then + for etshap = 1 to Shape.GetItemCount + Shape.Select etshap + next etshap + else + Warnlog "Shape in Effect Options were not to be found." + endif + 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 + lala = GroupText.GetItemCount + for etgt = 1 to lala + GroupText.Select etgt + if AutomaticallyAfter.IsEnabled then + AutomaticallyAfter.Check + AutomaticallyAfter.TypeKeys "<UP>" + endif + if AnimateAttachedShape.IsEnabled then + AnimateAttachedShape.Check + if AnimateAttachedShape.IsChecked = FALSE then + Warnlog "AnimateAttachedShape should have been checked" + endif + endif + if InreverseOrder.IsEnabled then + InreverseOrder.Check + if InreverseOrder.IsChecked = FALSE then + Warnlog "InreverseOrder should have been checked" + endif + endif + next etgt + 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" +end function 'optionstest2
\ No newline at end of file |