diff options
Diffstat (limited to 'testautomation/graphics/optional/includes/impress')
23 files changed, 12151 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 100755 index 000000000000..6c341de80e59 --- /dev/null +++ b/testautomation/graphics/optional/includes/impress/i_animation.inc @@ -0,0 +1,192 @@ +'encoding UTF-8 Do not remove or change this line! +'************************************************************************** +'* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. +'* +'* Copyright 2008 by Sun Microsystems, Inc. +'* +'* OpenOffice.org - a multi-platform office productivity suite +'* +'* $RCSfile: i_animation.inc,v $ +'* +'* $Revision: 1.1 $ +'* +'* last change: $Author: jsi $ $Date: 2008-06-16 10:42:41 $ +'* +'* This file is part of OpenOffice.org. +'* +'* OpenOffice.org is free software: you can redistribute it and/or modify +'* it under the terms of the GNU Lesser General Public License version 3 +'* only, as published by the Free Software Foundation. +'* +'* OpenOffice.org is distributed in the hope that it will be useful, +'* but WITHOUT ANY WARRANTY; without even the implied warranty of +'* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +'* GNU Lesser General Public License version 3 for more details +'* (a copy is included in the LICENSE file that accompanied this code). +'* +'* You should have received a copy of the GNU Lesser General Public License +'* version 3 along with OpenOffice.org. If not, see +'* <http://www.openoffice.org/license.html> +'* for a copy of the LGPLv3 License. +'* +'/************************************************************************ +'* +'* Owner : wolfram.garten@sun.com +'* +'* short description : +'* +'********************************************************************* +' #1 tExtrasAnimation +'\******************************************************************** + +' Dateiname.SetText ConvertPath (gTesttoolPath + "global\input\graf_inp\enter.bmp") +' Dateiname.SetText ConvertPath (gTesttoolPath + "global\input\graf_inp\grafix3.ras") + +testcase tExtrasAnimation + Printlog "- Tools/Animation" + Dim i + Call hNewDocument '/// New impress document ///' + sleep 2 + InsertGraphicsFromFile '/// insert graphic file (sample.bmp) ///' + sleep 1 + Kontext "GrafikEinfuegenDlg" + sleep 2 + + Dateiname.SetText ConvertPath (gTesttoolPath + "global\input\graf_inp\enter.bmp") + sleep 2 + Oeffnen.Click + sleep 2 + Kontext "DocumentImpress" + DocumentImpress.MouseDoubleClick 90,90 '/// Deselect graphic ///' + 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" + + for i=1 to 10 + BildAufnehmen.Click '/// add selected picture 10 times into the animation ///' + next i + sleep 1 + if AnzahlBilder.GetText <> "10" Then '/// compare frame number in animation dialog ///' + WarnLog " - Adding graphics did not work" + else + PrintLog " Pictures added" + end if + + if AlleAufnehmen.IsEnabled Then WarnLog " - Add all should not be enabled, there is only 1 graphic selected" '/// test if Add all is eneabled (shouldn't be because of only 1 object selected) ///' + Kontext "DocumentImpress" + EditSelectAll '/// Select both pictures ///' + + Kontext "Animation" + + for i=1 to 5 + AlleAufnehmen.Click '/// Add all (5 times) ///' + next i + sleep 1 + if AnzahlBilder.GetText <> "20" Then '/// check if number of frames is now 20 ///' + WarnLog " - Adding pics did not work" + else + PrintLog " All pics added" + end if + + ErstesBild.Click '/// Click First Picture ///' + + if AnzahlBilder.GetText <> "1" Then '/// Control if we are at frame 1 ///' + WarnLog " - Jump back to start did not work" + else + PrintLog " Jumped back to first picture" + end if + + LetztesBild.Click '/// Go to last picture ///' + + if AnzahlBilder.GetText <> "20" Then '/// Control frame number ///' + WarnLog " - Jump to end did not work" + else + PrintLog " Jump to end did work" + end if + + Abspielen.Click '/// Play animation ///' + sleep 3 + Kontext "DocumentImpress" + EditSelectAll '/// Select all in document ///' + DocumentImpress.TypeKeys "<DELETE>" '/// Delete content ///' + + Kontext "Animation" + Erstellen.Click '/// /Create animation //' + sleep 10 + + Kontext "DocumentImpress" + try + EditCopy '/// Try to copy ccreated animation into clipboard ///' + PrintLog " animation created" + catch + WarnLog " - Animation not created" + endcatch + + Kontext "Animation" + + if AnimationsgruppeGruppenobjekt.IsChecked=True Then + try + AnzeigedauerProBild.SetText "1" '/// Try setting duration per frame ///' + WarnLog " - Edit field should be disabled" + catch + PrintLog " Edit field not enabled because groupobject status is = " + AnimationsgruppeGruppenobjekt.IsChecked + endcatch + end if + + + AnimationsgruppeBitmapobjekt.Check '/// check animation group object ///' + + AnzeigedauerProBild.SetText "3" '/// Set duration per frame to 3///' + SetClipboard AnzeigedauerProBild.GetText + AnzeigedauerProBild.More '/// Raise value for duration ///' + if AnzeigedauerProBild.GetText <> GetClipboardText Then + PrintLog " Time per pic could be edited" + else + WarnLog " - Time per pic could be edited" + end if + + Dim Zaehler + Zaehler = AnzahlDurchlaeufe.GetItemCount + for i=1 to Zaehler '/// Change number of plays ///' + AnzahlDurchlaeufe.Select i + next i + PrintLog " Number of loops checked" + + + Dim ZaehlerAnpassung + ZaehlerAnpassung=Anpassung.GetItemCount '/// change ZaehlerAnpassung ///' + for i=1 to ZaehlerAnpassung + Anpassung.Select i + next i + PrintLog " Loop count changed" + + BildLoeschen.Click '/// Delete 1 frame ///' + if AnzahlBilder = "20" Then + WarnLog " - Delete pictures from animation did not work" + else + PrintLog " Picture No20 deleted" + end if + + AlleLoeschen.Click '/// Delete all frames ///' + 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 + Call hCloseDocument '/// close document///' +endcase diff --git a/testautomation/graphics/optional/includes/impress/i_headerfooter.inc b/testautomation/graphics/optional/includes/impress/i_headerfooter.inc new file mode 100755 index 000000000000..3fa33c2ad06a --- /dev/null +++ b/testautomation/graphics/optional/includes/impress/i_headerfooter.inc @@ -0,0 +1,691 @@ +'encoding UTF-8 Do not remove or change this line! +'************************************************************************** +'* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. +'* +'* Copyright 2008 by Sun Microsystems, Inc. +'* +'* OpenOffice.org - a multi-platform office productivity suite +'* +'* $RCSfile: i_headerfooter.inc,v $ +'* +'* $Revision: 1.1 $ +'* +'* last change: $Author: jsi $ $Date: 2008-06-16 10:42:41 $ +'* +'* This file is part of OpenOffice.org. +'* +'* OpenOffice.org is free software: you can redistribute it and/or modify +'* it under the terms of the GNU Lesser General Public License version 3 +'* only, as published by the Free Software Foundation. +'* +'* OpenOffice.org is distributed in the hope that it will be useful, +'* but WITHOUT ANY WARRANTY; without even the implied warranty of +'* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +'* GNU Lesser General Public License version 3 for more details +'* (a copy is included in the LICENSE file that accompanied this code). +'* +'* You should have received a copy of the GNU Lesser General Public License +'* version 3 along with OpenOffice.org. If not, see +'* <http://www.openoffice.org/license.html> +'* for a copy of the LGPLv3 License. +'* +'/************************************************************************ +'* +'* Owner : wolfram.garten@sun.com +'* +'* short description : Tests the header-footer-function in Impress +'* +'******************************************************************* +'* +' #1 tiHeaderFooterSlide +' #1 tiHeaderFooterNotesHandout +'* +'\******************************************************************* + +dim numbervalue1 as integer +dim value2 as String +dim value3 as String + +'------------------------------------------------------------------------------ + +testcase tiHeaderFooterSlide + '/// This part checks the first Tabpage of the Header and Footer Dialog + + Call hNewDocument '/// Open New document + kontext "drawimpress" + try + ViewHeaderAndFooter '/// View - Header And Footer + sleep(1) + catch + warnlog " Could'nt open ViewHeaderAndFooter!" '/// Warnlog for not opening dialog + endcatch + + printlog " Testing TabHeaderFooterSlide." + kontext "TabHeaderFooterSlide" + + '/// Check Date And Time on first tab + if DateTime.Exists = TRUE AND DateTimeFixed.isVisible = TRUE then '/// Testing date and time checkbox + 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 + + '/// 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 + + '/// 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 + + '/// 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 + + '/// 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 "" + + '/// 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 + + '/// 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 + + '/// Checking DateTimeFormat box + if DateTimeFormat.exists = TRUE AND DateTimeFormat.isVisible = TRUE then + numbervalue1 = DateTimeFormat.getitemcount '/// Get the number of choices + printlog " DateTimeFormat equals: " + numbervalue1 + value2 = DateTimeFormat.getseltext '/// Get the text for the choosen entry + printlog " Tries to get ", numbervalue1 & "." + DateTimeFormat.select ( numbervalue1 - 1 ) '/// Select the last entry + value3 = DateTimeFormat.getseltext '/// Get the text for the last entry + printlog " DateTimeFormat is: " + value3 + + if value2 = value3 then + errorlog " More options for Date should exist!" '/// Check if the first and last are the same. + DateTimeFormat.select value2 '/// Choose the original state + else + printlog " DateTimeFormat box works." + endif + + '/// 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 + + '/// Checking DateTimeLanguage box + if DateTimeLanguage.exists = TRUE AND DateTimeLanguage.isVisible = TRUE then + numbervalue1 = DateTimeLanguage.GetItemCount '/// Get the number of choices + DateTimeFormat.select 1 '/// Choose the first entry + value2 = DateTimeLanguage.GetSelText '/// Get the text for the choosen entry + DateTimeLanguage.select ( numbervalue1 - 1 ) '/// Select the last entry + value3 = DateTimeLanguage.GetSelText '/// Get the text for the last entry + + if value2 = value3 then + errorlog " More options for Date should exist!" '/// Check if the first and last aare the same. + DateTimeLanguage.select value2 '/// Choose the original state + value3 = DateTimeLanguage.GetSelText + else + printlog " DateTimeLanguage box works." + endif + + '/// 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 + + '/// 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 + + '/// 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 + + '/// 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 + + '/// 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 "" + + '/// 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 + + '/// 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 + + '/// 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 + + '/// 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 + + '/// Closing dialog with cancel + sleep 1 + TabHeaderFooterSlide.Cancel + sleep 1 + kontext "drawimpress" + sleep 1 + + '/// Close document + Call hCloseDocument + +endcase + +'---------------------------------------------------------------------------- + +testcase tiHeaderFooterNotesHandout + '/// This part checks the second Tabpage of the Header and Footer Dialog for notes and handout + + Call hNewDocument '/// Open New document + kontext "drawimpress" + try + ViewHeaderAndFooter '/// View - Header And Footer + sleep(1) + catch + warnlog " Could'nt open ViewHeaderAndFooter!" '/// Warnlog for not opening dialog + endcatch 'goto endcase + kontext " TabHeaderFooterSlide" + + '/// Change tabpage to HeaderFooterNotesHandout + printlog " Testing TabHeaderFooterNotesHandout." + sleep 2 + kontext + active.setpage TabHeaderFooterNotesHandout + sleep 2 + kontext "TabHeaderFooterNotesHandout" + + '/// 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 + + '/// 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 + + '/// 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 + + '/// 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 "" + + '/// 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 + + '/// 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 + + '/// 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 + + '/// 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 + + '/// 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 + + '/// 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 + + '/// 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 + + '/// Checking format dropdown box + numbervalue1 = DateTimeFormat.getitemcount '/// Get the number of choices + printlog " DateTimeFormat equals: " + numbervalue1 + value2 = DateTimeFormat.getseltext '/// Get the text for the choosen entry + printlog " Tries to get ", numbervalue1 + + if DateTimeFormat.exists = TRUE AND DateTimeFormat.isVisible = TRUE then + DateTimeFormat.select ( numbervalue1 - 1 ) '/// Select the last entry + value3 = DateTimeFormat.getseltext '/// Get the text for the last entry + printlog " DateTimeFormat is: " + value3 + + if value2 = value3 then + errorlog " More options for Date should exist." '/// Check if the first and last are the same. + DateTimeFormat.select value2 '/// Choose the original state + else + printlog " DateTimeFormat works." + endif + + '/// 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 + numbervalue1 = DateTimeLanguage.getitemcount '/// Get the number of choices + DateTimeFormat.select 1 '/// Choose the first entry + value2 = DateTimeLanguage.getseltext '/// Get the text for the choosen entry + DateTimeLanguage.select ( numbervalue1 - 1 ) '/// Select the last entry + value3 = DateTimeLanguage.getseltext '/// Get the text for the last entry + + if value2 = value3 then + errorlog " More options for Date should exist!" '/// Check if the first and last are the same. + else + printlog " Footer works." + endif + + '/// 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 + + '/// 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 + + '///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 + + + + '/// 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 + + '///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 + + '/// 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 + + '/// 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 + + '/// Close dialog with cancel + sleep 1 + TabHeaderFooterNotesHandout.Cancel + sleep 1 + kontext "drawimpress" + sleep 1 + + '/// Close document + Call hCloseDocument + +endcase + +'------------------------------------------------------------------------------- diff --git a/testautomation/graphics/optional/includes/impress/i_pengine.inc b/testautomation/graphics/optional/includes/impress/i_pengine.inc new file mode 100755 index 000000000000..7f4432fb16ac --- /dev/null +++ b/testautomation/graphics/optional/includes/impress/i_pengine.inc @@ -0,0 +1,768 @@ +'encoding UTF-8 Do not remove or change this line! +'************************************************************************** +'* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. +'* +'* Copyright 2008 by Sun Microsystems, Inc. +'* +'* OpenOffice.org - a multi-platform office productivity suite +'* +'* $RCSfile: i_pengine.inc,v $ +'* +'* $Revision: 1.1 $ +'* +'* last change: $Author: jsi $ $Date: 2008-06-16 10:42:41 $ +'* +'* This file is part of OpenOffice.org. +'* +'* OpenOffice.org is free software: you can redistribute it and/or modify +'* it under the terms of the GNU Lesser General Public License version 3 +'* only, as published by the Free Software Foundation. +'* +'* OpenOffice.org is distributed in the hope that it will be useful, +'* but WITHOUT ANY WARRANTY; without even the implied warranty of +'* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +'* GNU Lesser General Public License version 3 for more details +'* (a copy is included in the LICENSE file that accompanied this code). +'* +'* You should have received a copy of the GNU Lesser General Public License +'* version 3 along with OpenOffice.org. If not, see +'* <http://www.openoffice.org/license.html> +'* for a copy of the LGPLv3 License. +'* +'/************************************************************************ +'* +'* Owner : wolfram.garten@sun.com +'* +'* short description : 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 + +'/// the Presentation-Engine consists of showing the presentation, with all it's effects. ///' + +'/// Create a new presentation. ///' + Call hNewDocument + sleep 1 + + + '/// Open the test-file. ///' + Call hDateiOeffnen (gTesttoolpath + "graphics\required\input\allshapes.odp") 'effects.odp") + + '/// Start the slideshow. ///' + CALL hTypeKeys "<F5>" + sleep (5) + kontext "DocumentPresentation" + DocumentPresentation.TypeKeys "<SPACE>" + '/// 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) + '/// 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) + '/// And press "Space" again, to exit the presentation-mode. ///' + DocumentPresentation.TypeKeys "<SPACE>" + + FileClose + + Call hNewDocument + sleep 1 + '/// Open the test-file. ///' + Call hDateiOeffnen (gTesttoolpath + "graphics\required\input\effects.odp") + '/// Start the slideshow. ///' + CALL hTypeKeys "<F5>" + sleep (200) + '/// 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 + +'/// Insert a new slide. ///' +' InsertSlide +' sleep 2 +' hTypekeys "<Pagedown>" +' sleep 2 + +'/// 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 + +'/// Slideshow Settings: Range: test all three alternatives. ///' +'/// Test if the Slideshow-types (Default, Window, Auto) works. ///' +'/// Check if the checkboxes works. ///' +'/// Close dialogue. ///' +'/// Add an object. ///' +'/// Custom Animation: Add an Animation to the object. ///' +'/// Run the slideshow. ///' + +'/// Change to the next effect and continue through every animation in ///' +'/// Entrance, Emphasis, Exit and Motion Paths. ///' +'/// While testing - test the speed-choices for every kind of animation. ///' +'/// Check if the "Change" and "Remove"-buttons. ///' +'/// Check the Start, "Direction" and "Speed" variables. ///' +'/// Add two effects to one object and change the order. ///' +'/// Try the Play and "Slide Show"-button. ///' +'/// Try the Automatic preview-button. ///' + +'/// Slidetransition. ///' +'/// Go through every kind of effect, speed, and sound. ///' +'/// Check loop until next sound. ///' +'/// Check the Advance slide with mouseclick-function. ///' +'/// Check the "Apply to all slides", "Play", and "Slide Show"-buttons. ///' +'/// Check Automatic preview. ///' + +'/// Some effects doesnt have a right / left orientation. Test these. ///' +'/// Possibility: check random effects and see if something hangs. ///' + +'/// Load/Save-test: Does the settings last? ///' + +'/// Are two different objects dependant or independent from each other? ///' + +'/// Close Application ///' + Call hCloseDocument + Printlog "Finished Optional-test for Presentation-Engine" +endcase + + +testcase tSlideShowInteraction + Dim Datei$ + Dim i as integer + Dim Zaehler as integer + dim b115364 as boolean + + Datei$ =ConvertPath (gOfficePath + "user\work\interac.sxi") + +' '/// save file as presentation with name '"user\\work\\diashow.sxi")' ///' +' hFileSaveAsWithFilterKill ( sFile , gImpressFilter, FALSE ) +' Printlog "saved presetation: '" + sFile + "'" + + '/// open application ///' + Call hNewDocument + sleep 5 + setStartCurrentPage(FALSE) '/// Set "start with current page to OFF ///' + + '/// call 'Insert->Slide' three times and name the slides 2, 3, 4 and create a rectangle on it ///' + '///+ we now have 4 slides ?! :-) ///' + 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 + + '/// 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 + + '/// 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) '/// Set "start with current page to ON = Default ///' + Call hCloseDocument +endcase + +' Slideshow menu 5 - Custom Animation + +testcase tSlideShowCustomAnimation + dim bError as boolean + + '/// open application ///' + Call hNewDocument + '/// create textbox with text ///' + Call hTextrahmenErstellen ("Test text to test text effects", 10, 10, 20, 40 ) + '/// Slide Show->Custom Animation... ///' + SlideShowCustomAnimation + Kontext "Tasks" + '/// click button 'Add...' ///' + EffectAdd.click + '/// Dialog 'Custom Animation' comes up ///' + kontext + '/// Switch to TabPage: Entrance ///' + active.setPage(TabEntrance) + kontext "TabEntrance" + if TabEntrance.exists(5) then + DialogTest(TabEntrance) + '/// select in the listbox 'Effects' the second entry ///' + Effects.select(2) + Speed.getItemCount + AutomaticPreview.unCheck + sleep 1 + AutomaticPreview.Check + kontext + '/// 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 + '/// 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 + '/// 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 + '/// 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 + '/// click button 'Change...' ///' + EffectChange.click + '/// Dialog 'Custom Animation' comes up ///' + kontext + '/// 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 + '/// CLick on button '...' (Options) ///' + EffectOptions.click + kontext "TabEffect" + if TabEffect.exists(5) then + dialogTest(TabEffect) + Sound.getItemCount + AfterAnimation.getItemCount + '/// 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 + '/// 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 + '/// click button 'Remove' ///' + EffectRemove.click + endif + '/// close application ///' + Call hCloseDocument +endcase + diff --git a/testautomation/graphics/optional/includes/impress/i_pengine1.inc b/testautomation/graphics/optional/includes/impress/i_pengine1.inc new file mode 100755 index 000000000000..11281d03d678 --- /dev/null +++ b/testautomation/graphics/optional/includes/impress/i_pengine1.inc @@ -0,0 +1,1362 @@ +'encoding UTF-8 Do not remove or change this line! +'************************************************************************** +'* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. +'* +'* Copyright 2008 by Sun Microsystems, Inc. +'* +'* OpenOffice.org - a multi-platform office productivity suite +'* +'* $RCSfile: i_pengine1.inc,v $ +'* +'* $Revision: 1.2 $ +'* +'* last change: $Author: rt $ $Date: 2008-08-28 11:43:41 $ +'* +'* This file is part of OpenOffice.org. +'* +'* OpenOffice.org is free software: you can redistribute it and/or modify +'* it under the terms of the GNU Lesser General Public License version 3 +'* only, as published by the Free Software Foundation. +'* +'* OpenOffice.org is distributed in the hope that it will be useful, +'* but WITHOUT ANY WARRANTY; without even the implied warranty of +'* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +'* GNU Lesser General Public License version 3 for more details +'* (a copy is included in the LICENSE file that accompanied this code). +'* +'* You should have received a copy of the GNU Lesser General Public License +'* version 3 along with OpenOffice.org. If not, see +'* <http://www.openoffice.org/license.html> +'* for a copy of the LGPLv3 License. +'* +'/************************************************************************ +'* +'* Owner : wolfram.garten@sun.com +'* +'* short description : Tests the Engine for Presentation +'* +'******************************************************************* +'* +' #1 tiPengineTabEntrance +' #1 tiPengineTabEmphasis +' #1 tiPengineTabExit +' #1 tiPengineTabMotionPaths +' #1 tiPengineSlideTransition +' #1 tiPengineTabpageEntrance2 +' #1 tiPengineTabPageEmphasis2 +' #1 tiPengineTabPageExit2 +' #1 tiPengineTabPageMotionPaths2 +'* +'\******************************************************************* + +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 + +'/// open application ///' +Call hNewDocument +'/// create textbox with text ///' +Call hTextrahmenErstellen ("Test text to test text effects", 35, 35, 70, 70 ) +'/// Slide Show->Custom Animation... ///' +SlideShowCustomAnimation + Kontext "Tasks" + '/// click button 'Add...' ///' + EffectAdd.click + '/// Dialog 'Custom Animation' comes up ///' + kontext + + '/// 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" + Effects.TypeKeys "<DOWN>", e '/// Select the next entry ///' + 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 + + '/// Switch to TabPage: Entrance ///' + active.setPage(TabEntrance) + kontext "TabEntrance" + if TabEntrance.exists(5) then + Effects.Select 4 + '/// 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 + '/// click button 'Remove' ///' + EffectRemove.Click + '/// close application ///' + Call hCloseDocument +endcase + +'------------------------------------------------------------------------------------------------------------------------------------------------------------------------ + +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 + + '/// open application ///' + Call hNewDocument + '/// create textbox with text ///' + Call hTextrahmenErstellen ("Test text to test text effects", 35, 35, 70, 70 ) + '/// Slide Show->Custom Animation... ///' + SlideShowCustomAnimation + Kontext "Tasks" + '/// click button 'Add...' ///' + EffectAdd.click + '/// Dialog 'Custom Animation' comes up ///' + kontext + + '/// 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 + '/// Switch to TabPage: Emphasis ///' + kontext + active.setPage(TabEmphasis) + kontext "TabEmphasis" + Effects.TypeKeys "<DOWN>", e + 1 '/// Select the next entry ///' + 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 + + '/// Switch to TabPage: Entrance ///' + active.setPage(TabEntrance) + kontext "TabEntrance" + if TabEntrance.exists(5) then + Effects.Select 4 + '/// Close dialog 'Custom Animation' with 'OK' ///' + TabEntrance.OK + else + warnlog "Error when switching Tab" + endif + bError = false + kontext "Tasks" + EffectAutomaticPreview.Check + '/// click button 'Remove' ///' + EffectRemove.Click + '/// close application ///' + Call hCloseDocument +endcase + +'------------------------------------------------------------------------------------------------------------------------------------------------------------------------ + +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 + + '/// open application ///' + Call hNewDocument + '/// create textbox with text ///' + Call hTextrahmenErstellen ("Test text to test text effects", 35, 35, 70, 70 ) + '/// Slide Show->Custom Animation... ///' + SlideShowCustomAnimation + Kontext "Tasks" + '/// click button 'Add...' ///' + EffectAdd.click + '/// Dialog 'Custom Animation' comes up ///' + kontext + + '/// 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 + '/// Switch to TabPage: Exit ///' + active.setPage(TabExit) + kontext "TabExit" + Effects.TypeKeys "<DOWN>", e + 1 '/// Select the next entry ///' + 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 + + '/// Switch to TabPage: Entrance ///' + active.setPage(TabEntrance) + kontext "TabEntrance" + if TabEntrance.exists(5) then + Effects.Select 4 + '/// Close dialog 'Custom Animation' with 'OK' ///' + TabEntrance.OK + else + warnlog "Error when switching Tab" + endif + bError = false + kontext "Tasks" + EffectAutomaticPreview.Check + '/// click button 'Remove' ///' + EffectRemove.Click + '/// close application ///' + Call hCloseDocument +endcase + +'------------------------------------------------------------------------------------------------------------------------------------------------------------------------ + +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 + + '/// open application ///' + Call hNewDocument + '/// create textbox with text ///' + Call hTextrahmenErstellen ("Test text to test text effects", 35, 35, 70, 70 ) + '/// Slide Show->Custom Animation... ///' + SlideShowCustomAnimation + Kontext "Tasks" + '/// click button 'Add...' ///' + EffectAdd.click + '/// Dialog 'Custom Animation' comes up ///' + kontext + + '/// 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 + '/// Switch to TabPage: Motion Paths ///' + active.setPage(TabMotionPaths) + kontext "TabMotionPaths" + Effects.TypeKeys "<DOWN>", e + 1 '/// 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 + + '/// Switch to TabPage: Entrance ///' + active.setPage(TabEntrance) + kontext "TabEntrance" + if TabEntrance.exists(5) then + Effects.Select 4 + '/// Close dialog 'Custom Animation' with 'OK' ///' + TabEntrance.OK + else + warnlog "Error when switching Tab" + endif + bError = false + kontext "Tasks" + EffectAutomaticPreview.Check + '/// click button 'Remove' ///' + EffectRemove.Click + '/// close application ///' + Call hCloseDocument +endcase + +'-------------------------------------------------------------------------------------------------------------------------------------------------- + +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 + + '/// open application ///' + Call hNewDocument + '/// create rectangle ///' + Call hRechteckErstellen ( 10, 10, 20, 40 ) + sleep 1 + '/// Insert a second slide ///' + InsertSlide + sleep 2 + hTypekeys "<Pagedown>" + sleep 2 + '/// create textframe with quotes; Simple: 39; Double: 34; ///' + hTextrahmenErstellen ( "Hallo",20,20,60,30) + '/// Insert a third slide ///' + InsertSlide + sleep 2 + hTypekeys "<Pagedown>" + sleep 2 + '/// Slide Show->Slide Transition ///' + SlideShowSlideTransition + sleep 2 + '/// The 'Slide Transition' in the right 'Tasks' Pane has to come up ///' + Kontext "Tasks" + '/// Select every entry in the Listbox 'Apply to Selected Slides' ///' + '/// Then select the next Speed for Transition and retest all the effects ///' + '/// 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 + '/// 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 + '/// Read all entries in Listbox 'File type' ///' + for i = 1 to Dateityp.getItemCount + printlog "" + i + ":" + Dateityp.getItemText(i) + next i + '/// 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" + + '/// check checkbox 'Automatically after' ///' + TransitionAutomaticallyAfter.Check + sleep 5 + '/// press key 'Page Up' in box ///' + TransitionAutomaticallyAfterTime.TypeKeys "<PageUp>" + sleep 5 + '/// check the standard checkbox 'On mouse click' ///' + TransitionOnMouseClick.Check + sleep 5 + '/// press button 'Apply to All Slides' ///' + TransitionApplyToAllSlides.Click + sleep 5 + '/// press button 'Play' ///' + TransitionPlay.Click + '/// 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" + + '/// uncheck and check Checkbox 'Automatic Preview' ///' + '/// 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 + '/// close application ///' + Call hCloseDocument +endcase + +'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 + +'/// open application ///' +Call hNewDocument +'/// create textbox with text ///' +Call hTextrahmenErstellen ("Test text to test text effects", 35, 35, 70, 70 ) +'/// Slide Show->Custom Animation... ///' +SlideShowCustomAnimation + Kontext "Tasks" + '/// Uncheck AutomaticPreview ///' + EffectAutomaticPreview.UnCheck + '/// click button 'Add...' ///' + EffectAdd.click + '/// Dialog 'Custom Animation' comes up ///' + kontext + + '/// 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" + Effects.TypeKeys "<DOWN>", e '/// Select the next entry ///' + 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 + '/// Switch to TabPage: Entrance ///' + active.setPage(TabEntrance) + kontext "TabEntrance" + if TabEntrance.exists(5) then + Effects.Select 4 + '/// 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 + '/// click button 'Remove' ///' + EffectRemove.Click + '/// close application ///' + Call hCloseDocument +endcase + +'------------------------------------------------------------------------------------------------------------------------------------------------------ + +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 + +'/// open application ///' +Call hNewDocument +'/// create textbox with text ///' +Call hTextrahmenErstellen ("Test text to test text effects", 35, 35, 70, 70 ) +'/// Slide Show->Custom Animation... ///' +SlideShowCustomAnimation + Kontext "Tasks" + '/// Uncheck AutomaticPreview ///' + EffectAutomaticPreview.UnCheck + '/// click button 'Add...' ///' + EffectAdd.click + '/// Dialog 'Custom Animation' comes up ///' + kontext + + '/// 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" + Effects.TypeKeys "<DOWN>", e + 1 '/// Select the next entry ///' + 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 + '/// Switch to TabPage: Entrance ///' + active.setPage(TabEntrance) + kontext "TabEntrance" + if TabEntrance.exists(5) then + Effects.Select 4 + '/// Close dialog 'Custom Animation' with 'OK' ///' + TabEntrance.OK + else + warnlog "Error when switching Tab" + endif + bError = false + kontext "Tasks" + EffectAutomaticPreview.Check + '/// click button 'Remove' ///' + EffectRemove.Click + '/// close application ///' + Call hCloseDocument +endcase + +'------------------------------------------------------------------------------------ + +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 + +'/// open application ///' +Call hNewDocument +'/// create textbox with text ///' +Call hTextrahmenErstellen ("Test text to test text effects", 35, 35, 70, 70 ) +'/// Slide Show->Custom Animation... ///' +SlideShowCustomAnimation + Kontext "Tasks" + '/// Uncheck AutomaticPreview ///' + EffectAutomaticPreview.UnCheck + '/// click button 'Add...' ///' + EffectAdd.click + '/// Dialog 'Custom Animation' comes up ///' + kontext + + '/// 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 + '/// Switch to TabPage: Exit ///' + active.setPage(TabExit) + kontext "TabExit" + Effects.TypeKeys "<DOWN>", e + 1 '/// Select the next entry ///' + p = Effects.GetSelIndex + If p = d Then e = i 'p > 2 AND + Next e + kontext + '/// 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 + '/// Switch to TabPage: Entrance ///' + active.setPage(TabEntrance) + kontext "TabEntrance" + if TabEntrance.exists(5) then + Effects.Select 4 + '/// Close dialog 'Custom Animation' with 'OK' ///' + TabEntrance.OK + else + warnlog "Error when switching Tab" + endif + bError = false + kontext "Tasks" + EffectAutomaticPreview.Check + '/// click button 'Remove' ///' + EffectRemove.Click + '/// close application ///' + Call hCloseDocument +endcase + +'-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- + +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 + + '/// open application ///' + Call hNewDocument + '/// create textbox with text ///' + Call hTextrahmenErstellen ("Test text to test text effects", 35, 35, 70, 70 ) + '/// Slide Show->Custom Animation... ///' + SlideShowCustomAnimation + Kontext "Tasks" + '/// Uncheck AutomaticPreview ///' + EffectAutomaticPreview.UnCheck + '/// click button 'Add...' ///' + EffectAdd.click + '/// Dialog 'Custom Animation' comes up ///' + kontext + + '/// 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 + '/// Switch to TabPage: Motion Paths ///' + active.setPage(TabMotionPaths) + kontext "TabMotionPaths" + Effects.TypeKeys "<DOWN>", e + 1 '/// Select the next entry ///' + p = Effects.GetSelIndex + If p = d Then e = i 'p > 2 AND + Next e + kontext + '/// 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 + '/// Switch to TabPage: Entrance ///' + active.setPage(TabEntrance) + kontext "TabEntrance" + if TabEntrance.exists(5) then + Effects.Select 4 + '/// Close dialog 'Custom Animation' with 'OK' ///' + TabEntrance.OK + else + warnlog "Error when switching Tab" + endif + bError = false + kontext "Tasks" + EffectAutomaticPreview.Check + '/// click button 'Remove' ///' + EffectRemove.Click + '/// close application ///' + Call hCloseDocument +endcase + +'-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- + + diff --git a/testautomation/graphics/optional/includes/impress/i_pengine2.inc b/testautomation/graphics/optional/includes/impress/i_pengine2.inc new file mode 100755 index 000000000000..303b8c9e96d8 --- /dev/null +++ b/testautomation/graphics/optional/includes/impress/i_pengine2.inc @@ -0,0 +1,614 @@ +'encoding UTF-8 Do not remove or change this line! +'************************************************************************** +'* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. +'* +'* Copyright 2008 by Sun Microsystems, Inc. +'* +'* OpenOffice.org - a multi-platform office productivity suite +'* +'* $RCSfile: i_pengine2.inc,v $ +'* +'* $Revision: 1.1 $ +'* +'* last change: $Author: jsi $ $Date: 2008-06-16 10:42:41 $ +'* +'* This file is part of OpenOffice.org. +'* +'* OpenOffice.org is free software: you can redistribute it and/or modify +'* it under the terms of the GNU Lesser General Public License version 3 +'* only, as published by the Free Software Foundation. +'* +'* OpenOffice.org is distributed in the hope that it will be useful, +'* but WITHOUT ANY WARRANTY; without even the implied warranty of +'* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +'* GNU Lesser General Public License version 3 for more details +'* (a copy is included in the LICENSE file that accompanied this code). +'* +'* You should have received a copy of the GNU Lesser General Public License +'* version 3 along with OpenOffice.org. If not, see +'* <http://www.openoffice.org/license.html> +'* for a copy of the LGPLv3 License. +'* +'/************************************************************************ +'* +'* Owner : wolfram.garten@sun.com +'* +'* short description : Tests the Presentation-Engines effects +'* +'******************************************************************* +'* +' #1 tiPengineAnimationEffectsPreview +' #1 tiPengineAnimationEffectsOptions +' #1 tiPengineAllShapesAndEffects +' #1 tiPengine2ObjectsGetsEffects +'* +'\******************************************************************* + +testcase tiPengineAnimationEffectsPreview + dim bError as boolean + + '/// open application ///' + Call hNewDocument + '/// create textbox with text ///' + Call hTextrahmenErstellen ("Test text to test text effects", 35, 35, 70, 70 ) + '/// Slide Show->Custom Animation... ///' + SlideShowCustomAnimation + Kontext "Tasks" + '/// click button 'Add...' ///' + EffectAdd.click + '/// Dialog 'Custom Animation' comes up ///' + kontext + '/// Switch to TabPage: Entrance ///' + active.setPage(TabEntrance) + kontext "TabEntrance" + if TabEntrance.exists(5) then + DialogTest(TabEntrance) + TestAnimations + '/// 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 + + '/// 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 + + '/// 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 + + '/// Switch to TabPage: Entrance ///' + active.setPage(TabEntrance) + kontext "TabEntrance" + if TabEntrance.exists(5) then + Effects.Select 4 + '/// 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 + '/// click button 'Change...' ///' + EffectChange.click + '/// Dialog 'Custom Animation' comes up ///' + kontext + + '/// 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 + '/// CLick on button '...' (Options) ///' + EffectOptions.Click + kontext "TabEffect" + if TabEffect.Exists(5) then + dialogTest(TabEffect) + Sound.GetItemCount + AfterAnimation.GetItemCount + + '/// 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 + + '/// 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 + '/// click button 'Remove' ///' + EffectRemove.Click + endif + sleep (2) + '/// 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 + +'/// open application ///' +Call hNewDocument +'/// create textbox with text ///' +Call hTextrahmenErstellen ("Test text to test text effects", 35, 35, 70, 70 ) +'/// Slide Show->Custom Animation... ///' +SlideShowCustomAnimation + '/// Dialog 'Custom Animation' comes up ///' + Kontext "Tasks" + '/// Click button 'Add...' to add an effect to the text ///' + EffectAdd.click + kontext + '/// 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 + '/// 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" + '/// 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 + '/// click button 'Remove' ///' + EffectRemove.Click + '/// close application ///' + Call hCloseDocument +endcase 'tiPengineAnimationEffectsOptions + +'------------------------------------------------------------------------------------------------------------------------------------------------------ + +testcase tiPengineAllShapesAndEffects + dim sFileName as string + +'/// the Presentation-Engine consists of showing the presentation, with all it's effects. ///' + + '/// Create a new presentation. ///' + Call hNewDocument + Sleep (1) + + '/// Open the test-file. ///' + Call hFileOpen (gTesttoolpath + "graphics\required\input\allshapes2.odp") 'effects.odp") + + '/// 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) + '/// Open the test-file. ///' + Call hFileOpen (gTesttoolpath + "graphics\required\input\effects.odp") + Sleep (10) + + '/// Start the slideshow. ///' + CALL hTypeKeys "<F5>" + Sleep (10) + '/// 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 + +'/// 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 + sleep (1) + + kontext "Toolbar" + sleep (1) + printlog "insert a Smiley." + 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 + '/// 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 + '/// 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 diff --git a/testautomation/graphics/optional/includes/impress/i_saveloadlayout.inc b/testautomation/graphics/optional/includes/impress/i_saveloadlayout.inc new file mode 100755 index 000000000000..de212977d7e2 --- /dev/null +++ b/testautomation/graphics/optional/includes/impress/i_saveloadlayout.inc @@ -0,0 +1,409 @@ +'encoding UTF-8 Do not remove or change this line! +'************************************************************************** +'* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. +'* +'* Copyright 2008 by Sun Microsystems, Inc. +'* +'* OpenOffice.org - a multi-platform office productivity suite +'* +'* $RCSfile: i_saveloadlayout.inc,v $ +'* +'* $Revision: 1.1 $ +'* +'* last change: $Author: jsi $ $Date: 2008-06-16 10:42:42 $ +'* +'* This file is part of OpenOffice.org. +'* +'* OpenOffice.org is free software: you can redistribute it and/or modify +'* it under the terms of the GNU Lesser General Public License version 3 +'* only, as published by the Free Software Foundation. +'* +'* OpenOffice.org is distributed in the hope that it will be useful, +'* but WITHOUT ANY WARRANTY; without even the implied warranty of +'* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +'* GNU Lesser General Public License version 3 for more details +'* (a copy is included in the LICENSE file that accompanied this code). +'* +'* You should have received a copy of the GNU Lesser General Public License +'* version 3 along with OpenOffice.org. If not, see +'* <http://www.openoffice.org/license.html> +'* for a copy of the LGPLv3 License. +'* +'/************************************************************************ +'* +'* Owner : wolfram.garten@sun.com +'* +'* short description: Save & Load testing of Layout -templates. +'* +'************************************************************************************** +' #1 tSaveLoadLayoutEmpty +' #1 tSaveLoadLayoutOLE +' #1 tSaveLoadLayoutText +' #1 tSaveLoadLayoutOutline +' #1 tSaveLoadLayoutPicture +' #1 tSaveLoadLayoutChart +' #1 tSaveLoadLayoutSpreadsheet +'\************************************************************************************* + +testcase tSaveLoadLayoutEmpty + goto endsub + Dim NewFileDir as String + NewFileDir = ConvertPath (gOfficePath + "user\work\LayoutTest\") + + '/// Create New folder in the Work-directory ///' + printlog " Will try to create the directory: " + NewFileDir + app.mkdir NewFileDir + + '/// Create a new document, add an empty Layout, Save the document in all available Formats, and open the saved files. ///' + + '/// Make new Presentation ///' + gApplication = "IMPRESS" + Call hNewDocument + + '/// 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" + '/// Press "Enter" to use the layout on the current slide ///' + LayoutsPreview.TypeKeys "<RETURN>" + sleep (5) + + '/// Save the document in different formats... ///' + '/// Close the file. ///' + '/// Load the different files. ///' + call fSaveLoadAllFormats (NewFileDir) 'Runs the Function below. + + '/// Delete the different files. ///' + printlog " Will try to delete the directory: " + NewFileDir + app.rmDir NewFileDir + + printlog "tSaveLoadLayoutEmpty ended." + '/// End the test ///' +endcase 'tSaveLoadLayoutEmpty + +'**************************************************************************************************** + +testcase tSaveLoadLayoutOLE + Dim NewFileDir as String + NewFileDir = ConvertPath (gOfficePath + "user\work\LayoutTest\") + + '/// Create New folder in the Work-directory ///' + printlog " Will try to create the directory: " + NewFileDir + app.mkdir NewFileDir + + '/// Create a new document, add a Layout with an OLE-field, Save the document in all available Formats, and open the saved files. ///' + + '/// Make new Presentation ///' + gApplication = "IMPRESS" + Call hNewDocument + + '/// Choose and Insert an Layout with an OLE. ///' + printlog " Choose and Insert an Layout with an OLE." + FormatModifyPage + sleep (1) + kontext "Tasks" + LayoutsPreview.TypeKeys "<HOME>" + kontext "Pagelayout_UndoDeleteWarning" + if Pagelayout_UndoDeleteWarning.exists then + Pagelayout_UndoDeleteWarning.ok + end if + kontext "Tasks" + '/// select the OLE placeholder and activate it with [Return] ///' + LayoutsPreview.TypeKeys ("<RIGHT>",13) + sleep (1) + LayoutsPreview.TypeKeys ("<Return>") + sleep (1) + kontext "DocumentImpress" + DocumentImpress.TypeKeys ("<TAB><TAB><TAB>") + DocumentImpress.TypeKeys ("<Return>") + try + sleep (2) + kontext "OLEObjektInsert" + sleep (1) + OLEObjektInsert.Cancel + Printlog " Correctly inserted a layout with an 'Insert OLE-Object'-frame." + catch + warnlog "Ole wasn't selected :-(" + CALL hCloseDocument + Goto Endsub + endcatch + sleep (5) + + '/// Save the document in all available formats... ///' + '/// Close the file. ///' + '/// Load the different files. ///' + call fSaveLoadAllFormats (NewFileDir) 'Runs the Function below. + + '/// Delete the different files. ///' + printlog " Will try to delete the directory: " + NewFileDir + app.rmDir NewFileDir + + printlog "tSaveLoadLayoutOLE ended." + '/// End the test ///' +endcase 'tSaveLoadLayoutOLE + +'**************************************************************************************************** + +testcase tSaveLoadLayoutText + Dim NewFileDir as String + NewFileDir = ConvertPath (gOfficePath + "user\work\LayoutTest\") + + '/// Create New folder in the Work-directory ///' + printlog " Will try to create the directory: " + NewFileDir + app.mkdir NewFileDir + + '/// Create a new document, add a Layout with a Textfield, Save the document in all available Formats, and open the saved files. ///' + + '/// Make new Presentation ///' + gApplication = "IMPRESS" + Call hNewDocument + + '/// Choose and Insert an Layout with a Text-field. ///' + 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" + '/// select the Text placeholder and activate it with [Return] ///' + LayoutsPreview.TypeKeys ("<RIGHT>") + sleep (1) + LayoutsPreview.TypeKeys ("<Return>") + sleep (1) + kontext "DocumentImpress" + DocumentImpress.TypeKeys ("<TAB><TAB><TAB>") + DocumentImpress.TypeKeys ("<Return>") + DocumentImpress.TypeKeys ("<ESCAPE>") +' LayoutsPreview.TypeKeys "<RETURN>" + sleep (5) + + '/// Save the document in all available formats... ///' + '/// Close the file. ///' + '/// Load the different files. ///' + call fSaveLoadAllFormats (NewFileDir) 'Runs the Function below. + + '/// Delete the different files. ///' + printlog " Will try to delete the directory: " + NewFileDir + app.rmDir NewFileDir + + printlog "tSaveLoadLayoutText ended." + '/// End the test ///' +endcase 'tSaveLoadLayoutText + +'**************************************************************************************************** + +testcase tSaveLoadLayoutOutline + Dim NewFileDir as String + NewFileDir = ConvertPath (gOfficePath + "user\work\LayoutTest\") + + '/// Create New folder in the Work-directory ///' + printlog " Will try to create the directory: " + NewFileDir + app.mkdir NewFileDir + + '/// Create a new document, add a Layout with an Outline-field, Save the document in all available Formats, and open the saved files. ///' + + '/// Make new Presentation ///' + gApplication = "IMPRESS" + Call hNewDocument + + '/// Choose and Insert an Layout with a Outline-field. ///' + printlog " Choose and Insert an Layout with a Outline-field." + FormatModifyPage + sleep (1) + kontext "Tasks" + LayoutsPreview.TypeKeys "<HOME>" + kontext "Pagelayout_UndoDeleteWarning" + if Pagelayout_UndoDeleteWarning.exists then + Pagelayout_UndoDeleteWarning.ok + end if + kontext "Tasks" + '/// select the Outline placeholder and activate it with [Return] ///' + LayoutsPreview.TypeKeys ("<RIGHT>",3) + sleep (1) + LayoutsPreview.TypeKeys ("<Return>") + sleep (1) + kontext "DocumentImpress" + DocumentImpress.TypeKeys ("<TAB><TAB><TAB>") + DocumentImpress.TypeKeys ("<Return>") + DocumentImpress.TypeKeys ("<ESCAPE>") + sleep (5) + + '/// Save the document in all available formats... ///' + '/// Close the file. ///' + '/// Load the different files. ///' + call fSaveLoadAllFormats (NewFileDir) 'Runs the Function below. + + '/// Delete the different files. ///' + printlog " Will try to delete the directory: " + NewFileDir + app.rmDir NewFileDir + + printlog "tSaveLoadLayoutOutline ended." + '/// End the test ///' +endcase 'tSaveLoadLayoutOutline + +'**************************************************************************************************** + +testcase tSaveLoadLayoutPicture + Dim NewFileDir as String + NewFileDir = ConvertPath (gOfficePath + "user\work\LayoutTest\") + + '/// Create New folder in the Work-directory ///' + printlog " Will try to create the directory: " + NewFileDir + app.mkdir NewFileDir + + '/// Create a new document, add a Layout with a Graphic-field, Save the document in all available Formats, and open the saved files. ///' + + '/// Make new Presentation ///' + gApplication = "IMPRESS" + Call hNewDocument + + '/// Choose and Insert an Layout with a Graphic-field. ///' + printlog " Choose and Insert an Layout with a Graphic-field." + FormatModifyPage + sleep (1) + kontext "Tasks" + LayoutsPreview.TypeKeys "<HOME>" + kontext "Pagelayout_UndoDeleteWarning" + if Pagelayout_UndoDeleteWarning.exists then + Pagelayout_UndoDeleteWarning.ok + end if + kontext "Tasks" + '/// select the Picture placeholder and activate it with [Return] ///' + LayoutsPreview.TypeKeys ("<RIGHT>",8) + sleep (1) + LayoutsPreview.TypeKeys ("<Return>") + sleep (1) + kontext "DocumentImpress" + DocumentImpress.TypeKeys ("<TAB><TAB><TAB>") + DocumentImpress.TypeKeys ("<Return>") + DocumentImpress.TypeKeys ("<ESCAPE>") + sleep (5) + + '/// Save the document in all available formats. ///' + '/// Close the file. ///' + '/// Load the different files. ///' + call fSaveLoadAllFormats (NewFileDir) 'Runs the Function below. + + '/// Delete the different files. ///' + printlog " Will try to delete the directory: " + NewFileDir + app.rmDir NewFileDir 'ConvertPath (gOfficePath + "user\work\LayoutTest\") + + printlog "tSaveLoadLayoutPicture ended." + '/// End the test ///' +endcase 'tSaveLoadLayoutPicture + +'**************************************************************************************************** + +testcase tSaveLoadLayoutChart + Dim NewFileDir as String + NewFileDir = ConvertPath (gOfficePath + "user\work\LayoutTest\") + + '/// Create New folder in the Work-directory ///' + printlog " Will try to create the directory: " + NewFileDir + app.mkdir NewFileDir + + '/// Create a new document, add a Layout for a Chart, Save the document in all available formats, and open the saved files. ///' + + '/// Make new Presentation ///' + gApplication = "IMPRESS" + Call hNewDocument + + '/// Choose and Insert an Layout with a Chart-field. ///' + printlog " Choose and Insert an Layout with a Chart-field." + FormatModifyPage + sleep (1) + kontext "Tasks" + LayoutsPreview.TypeKeys "<HOME>" + kontext "Pagelayout_UndoDeleteWarning" + if Pagelayout_UndoDeleteWarning.exists then + Pagelayout_UndoDeleteWarning.ok + end if + kontext "Tasks" + '/// select the Chart placeholder and activate it with [Return] ///' + LayoutsPreview.TypeKeys ("<RIGHT>",6) + sleep (1) + LayoutsPreview.TypeKeys ("<Return>") + sleep (1) + kontext "DocumentImpress" + DocumentImpress.TypeKeys ("<TAB><TAB><TAB>") + DocumentImpress.TypeKeys ("<Return>") + DocumentImpress.TypeKeys ("<ESCAPE>") + sleep (5) + + '/// Save the document in all available formats. ///' + '/// Close the file. ///' + '/// Load the different files. ///' + call fSaveLoadAllFormats (NewFileDir) 'Runs the Function below. + + '/// Delete the different files. ///' + printlog " Will try to delete the directory: " + NewFileDir + app.rmDir NewFileDir + + printlog "tSaveLoadLayoutChart ended." + '/// End the test ///' +endcase 'tSaveLoadLayoutChart + +'**************************************************************************************************** + +testcase tSaveLoadLayoutSpreadsheet + Dim NewFileDir as String + NewFileDir = ConvertPath (gOfficePath + "user\work\LayoutTest\") + + '/// Create New folder in the Work-directory ///' + printlog " Will try to create the directory: " + NewFileDir + app.mkdir NewFileDir + + '/// Create a new document, add a Layout containing a Spreadsheet, Save the document in all available Formats, and open the saved files. ///' + + '/// Make new Presentation ///' + gApplication = "IMPRESS" + Call hNewDocument + + '/// Choose and Insert an Layout with a Spreadsheet-field. ///' + printlog " Choose and Insert an Layout with a Spreadsheet-field." + FormatModifyPage + sleep 1 + kontext "Tasks" + LayoutsPreview.TypeKeys "<HOME>" + kontext "Pagelayout_UndoDeleteWarning" + if Pagelayout_UndoDeleteWarning.exists then + Pagelayout_UndoDeleteWarning.ok + end if + kontext "Tasks" + '/// select the Spreadsheet placeholder and activate it with [Return] ///' + LayoutsPreview.TypeKeys ("<RIGHT>",7) + sleep (1) + LayoutsPreview.TypeKeys ("<Return>") + sleep (1) + kontext "DocumentImpress" + DocumentImpress.TypeKeys ("<TAB><TAB><TAB>") + DocumentImpress.TypeKeys ("<Return>") + DocumentImpress.TypeKeys ("<ESCAPE>") + sleep (5) + + '/// Save the document in all available formats. ///' + '/// Close the file. ///' + '/// Load the different files. ///' + call fSaveLoadAllFormats (NewFileDir) 'Runs the Function below. + + '/// Delete the different files. ///' + printlog " Will try to delete the directory: " + NewFileDir + app.rmDir NewFileDir 'ConvertPath (gOfficePath + "user\work\LayoutTest\") + + printlog "tSaveLoadLayoutSpreadsheet ended." + '/// End the test ///' +endcase 'tSaveLoadLayoutSpreadsheet + +'------------------------------------------------------------------------------- + diff --git a/testautomation/graphics/optional/includes/impress/i_shape.inc b/testautomation/graphics/optional/includes/impress/i_shape.inc new file mode 100755 index 000000000000..9630351aaeff --- /dev/null +++ b/testautomation/graphics/optional/includes/impress/i_shape.inc @@ -0,0 +1,95 @@ +'encoding UTF-8 Do not remove or change this line! +'************************************************************************** +'* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. +'* +'* Copyright 2008 by Sun Microsystems, Inc. +'* +'* OpenOffice.org - a multi-platform office productivity suite +'* +'* $RCSfile: i_shape.inc,v $ +'* +'* $Revision: 1.1 $ +'* +'* last change: $Author: jsi $ $Date: 2008-06-16 10:42:42 $ +'* +'* 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@sun.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 100755 index 000000000000..e80b2f5fe171 --- /dev/null +++ b/testautomation/graphics/optional/includes/impress/i_slidecopy.inc @@ -0,0 +1,966 @@ +'encoding UTF-8 Do not remove or change this line! +'************************************************************************** +'* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. +'* +'* Copyright 2008 by Sun Microsystems, Inc. +'* +'* OpenOffice.org - a multi-platform office productivity suite +'* +'* $RCSfile: i_slidecopy.inc,v $ +'* +'* $Revision: 1.3 $ +'* +'* last change: $Author: rt $ $Date: 2008-09-04 09:17:52 $ +'* +'* This file is part of OpenOffice.org. +'* +'* OpenOffice.org is free software: you can redistribute it and/or modify +'* it under the terms of the GNU Lesser General Public License version 3 +'* only, as published by the Free Software Foundation. +'* +'* OpenOffice.org is distributed in the hope that it will be useful, +'* but WITHOUT ANY WARRANTY; without even the implied warranty of +'* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +'* GNU Lesser General Public License version 3 for more details +'* (a copy is included in the LICENSE file that accompanied this code). +'* +'* You should have received a copy of the GNU Lesser General Public License +'* version 3 along with OpenOffice.org. If not, see +'* <http://www.openoffice.org/license.html> +'* for a copy of the LGPLv3 License. +'* +'/************************************************************************ +'* +'* Owner : wolfram.garten@sun.com +'* +'* short description: includefile for Slidecopy-testing +'* +'******************************************************************************* +' #1 tiSlideCopyNewPresentation +' #1 tiSlideCopyDuplicate +' #1 tiSlideCopyPasteSpecial +' #1 tiSlideCopyInSlideSorter +'\****************************************************************************** + +testcase tiSlideCopyNewPresentation + 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 + printlog "Insert three objects: Connector, Door-plate, and Smiley." + + printlog "First we Insert a Connector." + kontext "Toolbar" + sleep 1 + try + Verbinder.TearOff + 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(27027, true, 14) = false then + Warnlog "Context-Menu-entry `Rename` was not found. Therefore the test ends." + Call hCloseDocument + Goto Endsub + endif + sleep 2 + kontext "NameDlgObject" + NameField.SetText "First" + NameDlgObject.OK + kontext "DocumentImpress" + hMouseClick DocumentImpress, 90, 90 +'----------------------------------------------------------------------------1 + printlog "Then we insert the second object: a Door-plate." + kontext "Toolbar" + sleep 2 + try + StarShapes.TearOff + catch + warnlog "bug for GH from FHA; .tearoff doesnt tell success" + endcatch + sleep 2 + kontext "StarShapes" + StarShapesDoorplate.click + sleep (3) + gMouseDown (40,40) + gMouseMove (40,40,60,60) + gMouseUp (60,60) + kontext "StarShapes" + StarShapes.Close + hTypeKeys "<ESCAPE>" + hTypeKeys "<TAB>", 2 + printlog "And then we rename the object." + sleep (1) + DocumentImpress.TypeKeys "<SHIFT F10>" + sleep 2 + 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 + 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(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 + kontext "DocumentImpress" + hMouseClick DocumentImpress, 90, 90 +'---------------------------------------------------------------------------3 + '/// 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 + '/// Close the presentation-window ///' + Call hCloseDocument + '/// Open a new presentation ///' + Call hNewDocument + '/// Paste the slide from the clipboard ///' + kontext "Slides" + EditPaste + '/// Delete the first slide ///' + EditDeleteSlide + '/// 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(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 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(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 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(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 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 + + '/// 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 + + '/// 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 + '/// Make a duplicate of a slide. In the same presentation ///' + '/// Make new presentation ///' + Call hNewDocument + '/// Insert three objects: Connector, Door-plate, and Smiley ///' + '1 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) + + 'rename object + DocumentImpress.TypeKeys "<SHIFT F10>" + sleep 1 + + '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 + + '2 Insert Door-plate. + kontext "Toolbar" + sleep 1 + try + StarShapes.TearOff ' insert connector + 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) + + 'Rename object + kontext "DocumentImpress" + DocumentImpress.TypeKeys "<SHIFT F10>" + sleep (1) + '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 + + '3 Insert Smiley. + kontext "Toolbar" + sleep 1 + try + SymbolShapes.TearOff ' insert connector + 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) + + 'rename object + DocumentImpress.TypeKeys "<SHIFT F10>" + sleep (1) + '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 + + '/// 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 + + '/// Copy the slide to the clipboard ///' + kontext "Slides" + SlidesControl.TypeKeys "<PAGEUP>" + sleep (1) + 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 + + '/// Paste the content from the Clipboard ///' + kontext "Slides" + 'open context-menu choose 'paste' + + EditPaste + + kontext "InsertPaste" + if InsertPaste.Exists(1) then + After.Check + InsertPaste.OK + endif + sleep (2) + '/// 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 ' we have two slides, so we do this two times to check everything. + Printlog "Checking objects the " + i + " + time." + kontext "DocumentImpress" + hMouseClick DocumentImpress, 90, 90 + DocumentImpress.TypeKeys "<TAB>" 'Select the first object. + sleep (1) + 'Bring up the kontext-menu for the object + DocumentImpress.TypeKeys "<SHIFT F10>" + sleep 1 + '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 + + 'Read out what the name is, and check if its correct. + kontext "NameDlgObject" '"LinieName" "NameDlgPage" + value1 = NameField.GetText + NameDlgObject.OK 'TypeKeys "<Enter>" + + 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>" + + '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 + + '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>" + hTypeKeys "<TAB>", 3 'Select the third object. + sleep (1) + + 'Bring up the kontext-menu for the object + DocumentImpress.TypeKeys "<SHIFT F10>" + sleep 1 + '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 + + '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 + + '/// 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 + '/// Copies slide, and pastes it with "Paste Special", ///' + '/// just to see if the office can handle it ///' + '/// Make new presentation ///' + Call hNewDocument + '/// Insert three objects: Connector, Door-plate, and Smiley ///' + + '1 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 + gMouseDown (10,10) + gMouseMove (10,10,30,30) + gMouseUp (30,30) + + kontext "DocumentImpress" + hMouseClick DocumentImpress, 90, 90 + + '2 Insert Door-plate. + kontext "Toolbar" + sleep 1 + try + StarShapes.TearOff ' insert connector + 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 + + '3 Insert Smiley. + kontext "Toolbar" + sleep 1 + try + SymbolShapes.TearOff ' insert connector + 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) + + '/// 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 + + '/// Try to paste special. And check that the office still stays alive ///' + EditPasteSpecial + kontext "InhaltEinfuegen" + InhaltEinfuegen.OK + + '/// 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" + '/// 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 + '/// Copies slides within the slidesorter, and makes sure they are pasted on the correct position ///' + '/// Make new presentation ///' + Call hNewDocument + '/// 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." + 'Rename object + hTypeKeys "<ESCAPE>" + hTypeKeys "<TAB>", 1 + DocumentImpress.TypeKeys "<SHIFT F10>" + + '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 + Printlog " Renamed a the object to 'First'" + + sleep 3 + '/// Rename slide to "1" ///' + kontext "Slides" + SlidesControl.TypeKeys "<PAGEUP>" + SlidesControl.TypeKeys "<SHIFT F10>" + sleep 3 + 'Rename + 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 + + '/// Insert a new slide ///' + kontext "Slides" + SlidesControl.TypeKeys "<TAB><PAGEDOWN>" + SlidesControl.OpenContextMenu + sleep 3 + 'Insert slide + 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." + '/// 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>" + + ' 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 + Printlog " Renamed a the object to 'Second'" + + kontext "DocumentImpress" + hMouseClick DocumentImpress, 90, 90 + sleep 2 + '/// Rename slide to "2" ///' + kontext "Slides" + SlidesControl.OpenContextMenu + sleep 3 + ' 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" + NameField.SetText "2" + NameDlgPage.OK + sleep 1 + Printlog " Renamed the slide '2'" + + '/// Insert a new slide ///' + kontext "Slides" + Slidescontrol.TypeKeys "<PAGEDOWN>", 2 + Slidescontrol.TypeKeys "<SHIFT F10>" + sleep 3 + 'Insert slide + 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." + + '/// 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." + + 'Rename object + hTypeKeys "<ESCAPE>" + hTypeKeys "<TAB>", 2 + hTypeKeys "<SHIFT F10>" + + '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 + Printlog " Renamed a the object to 'Third'" + + '/// Rename slide to "3" ///' + kontext "Slides" + Slidescontrol.TypeKeys "<PAGEDOWN>", 2 + SlidesControl.OpenContextMenu + sleep 3 + ' 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" + NameField.SetText "3" + NameDlgPage.OK + sleep 1 + Printlog " Renamed the slide '3'" + + '/// 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 + + '/// Change to Slidesorter ///' + kontext "DocumentImpress" + ViewSlideSorter + + '/// Now we have changed view to the slidesorter ///' + + kontext "Slides" + Printlog " Changed view to 'SlideSorter'" + '/// Make sure the last slide is selcted ///' + SlidesControl.TypeKeys "<TAB>" + SlidesControl.TypeKeys "<PAGEDOWN>", 3 + + '/// Cut the last slide ///' + SlidesControl.TypeKeys "<MOD1 X>" + + '/// Make sure the first slide is selected ///' + SlidesControl.TypeKeys "<TAB>" + SlidesControl.TypeKeys "<PAGEUP>", 2 + sleep 1 + + '/// Paste the Slide ///' + kontext "Slides" + SlidesControl.TypeKeys "<MOD1 V>" + + '/// 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 + + '/// 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 + ' 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 <> "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" + '/// Choose the slide in the middle (named "1") ///' + SlidesControl.TypeKeys "<TAB>" + SlidesControl.TypeKeys "<PAGEDOWN>", 3 'to get to the last slide + SlidesControl.TypeKeys "<PAGEUP>" 'to go back one step + SlidesControl.OpenContextMenu (true) + ' 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" + + '/// 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 + + '/// Make sure we have selected the last slide ///' + SlidesControl.TypeKeys "<TAB>" + SlidesControl.TypeKeys "<PAGEDOWN>", 2 + + '/// Place the mousepointer to the left of the first slide ///' + sleep 1 + kontext "Slides" + SlidesControl.MouseMove 2, 3 + SlidesControl.OpenContextMenu true + sleep 3 + + '/// 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 + + '/// 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 + + '/// Check where the slide ended up. Should have showed up at the last position ///' + kontext "Slides" + SlidesControl.TypeKeys "<TAB>" + SlidesControl.TypeKeys "<PAGEDOWN>", 3 'to get to the last slide + SlidesControl.TypeKeys "<SHIFT F10>" '= open context menu + sleep 3 + ' 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 + + '/// Close Presentation. End testcase ///' + Call hCloseDocument +endcase 'tiSlideCopyInSlideSorter + +'------------------------------------------------------------------------ + +'TODO FHA - Check the objects after pasting them. diff --git a/testautomation/graphics/optional/includes/impress/i_slidelayer.inc b/testautomation/graphics/optional/includes/impress/i_slidelayer.inc new file mode 100755 index 000000000000..50ddc4e93200 --- /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 2008 by Sun Microsystems, Inc. +'* +'* OpenOffice.org - a multi-platform office productivity suite +'* +'* $RCSfile: i_slidelayer.inc,v $ +'* +'* $Revision: 1.2 $ +'* +'* last change: $Author: rt $ $Date: 2008-08-28 11:44:12 $ +'* +'* This file is part of OpenOffice.org. +'* +'* OpenOffice.org is free software: you can redistribute it and/or modify +'* it under the terms of the GNU Lesser General Public License version 3 +'* only, as published by the Free Software Foundation. +'* +'* OpenOffice.org is distributed in the hope that it will be useful, +'* but WITHOUT ANY WARRANTY; without even the implied warranty of +'* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +'* GNU Lesser General Public License version 3 for more details +'* (a copy is included in the LICENSE file that accompanied this code). +'* +'* You should have received a copy of the GNU Lesser General Public License +'* version 3 along with OpenOffice.org. If not, see +'* <http://www.openoffice.org/license.html> +'* for a copy of the LGPLv3 License. +'* +'/************************************************************************ +'* +'* Owner : wolfram.garten@sun.com +'* +'* short description : +'* +'********************************************************************* +' #1 tiInsertExpandSlide +' #1 tiInsertSummarySlide +' #1 tiFormatSeitenlayout +' #1 t114174 +' #1 t111862 +'\******************************************************************** + +' Dateiname.SetText ConvertPath (gTesttoolPath + "global\input\graf_inp\enter.bmp") +' Inhalt.SetText ConvertPath (gTesttoolPath + "graphics\required\input\leer.sxd") '/// auto.sdd choosen ///' + +'------------------------------------------------------------------------------- +testcase tiInsertExpandSlide + + dim i,x as integer + dim sTemp as string + dim b116350 as boolean + + '/// open application ///' + Call hNewDocument + '/// create presupposition /// + '///+ 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>" + '///+ View->Master View->Drawing View ///' + ViewWorkspaceDrawingView + Sleep 1 + '///+ there have to be 5 slides now ///' + fGetSlideCount (5) + + '/// goto the first slide ///' + hTypeKeys "<home>" + '///<b> Insert->Expand Slide </b>///' + 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 + '///+ 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>" + '///<b> Insert->Expand Slide </b>///' + InsertExpandSlide + '/// 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 + + '/// 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" + Call hNewDocument '/// new impress document ///' + + FormatPage '/// format page ///' + Kontext "Tasks" + sleep 5 + SetClipboard LayoutsPreview.GetText '/// get page name ///' + SeitenName.SetText "Test" '/// change page name ///' + sleep 1 + if Hintergrund.IsChecked=False Then '/// check background ///' + Hintergrund.Check + else + Hintergrund.UnCheck + if Hintergrund.IsChecked=False Then PrintLog " Background is deactivated" + end if + + if ObjekteAufDemHintergrund.IsChecked = True Then '/// change status of objects on background ///' + 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 + Seitenlayout.OK '/// close dialog ///' + sleep 1 + FormatPage '/// reopen dialog ///' + 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 + LayoutsPreview.TypeKeys "<TAB>" '/// assign different page layout ///' + 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 + Kontext "GrafikEinfuegenDlg" '/// check in document if layout has changed ///' + 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" + Call hCloseDocument '/// close document ///' + endcase 'tiFormatSeitenlayout + +'------------------------------------------------------------------------------ +testcase t114174 + + '/// 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!" + '/// open application ///' + Call hNewDocument + + '/// 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 + + '/// 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!" + '/// open application ///' + Call hNewDocument + + '/// 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 +'------------------------------------------------------------------------------ diff --git a/testautomation/graphics/optional/includes/impress/i_slideshow.inc b/testautomation/graphics/optional/includes/impress/i_slideshow.inc new file mode 100755 index 000000000000..157388e7106f --- /dev/null +++ b/testautomation/graphics/optional/includes/impress/i_slideshow.inc @@ -0,0 +1,1238 @@ +'encoding UTF-8 Do not remove or change this line! +'************************************************************************** +'* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. +'* +'* Copyright 2008 by Sun Microsystems, Inc. +'* +'* OpenOffice.org - a multi-platform office productivity suite +'* +'* $RCSfile: i_slideshow.inc,v $ +'* +'* $Revision: 1.2 $ +'* +'* last change: $Author: rt $ $Date: 2008-08-28 11:44:27 $ +'* +'* This file is part of OpenOffice.org. +'* +'* OpenOffice.org is free software: you can redistribute it and/or modify +'* it under the terms of the GNU Lesser General Public License version 3 +'* only, as published by the Free Software Foundation. +'* +'* OpenOffice.org is distributed in the hope that it will be useful, +'* but WITHOUT ANY WARRANTY; without even the implied warranty of +'* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +'* GNU Lesser General Public License version 3 for more details +'* (a copy is included in the LICENSE file that accompanied this code). +'* +'* You should have received a copy of the GNU Lesser General Public License +'* version 3 along with OpenOffice.org. If not, see +'* <http://www.openoffice.org/license.html> +'* for a copy of the LGPLv3 License. +'* +'/************************************************************************ +'* +'* Owner : wolfram.garten@sun.com +'* +'* short description : +'* +'******************************************************************* +'* +' #1 tSlideShowSlideShow +' #1 tSlideShowRehearseTimings +' #1 tSlideShowSlideShowSettings +' #1 tSlideShowCustomSlideShow +' #1 tSlideShowSlideTransition +' #1 tSlideShowShowHideSlide +'* +'\****************************************************************** +testcase tSlideShowSlideShow + + dim bLoaded as boolean + dim i as integer + + '/// open file 'graphics\\input\\diashow.odp' ///' + hFileOpen ConvertPath (gTesttoolPath + "graphics\required\input\diashow.odp") + sleep 30 + + printlog "check if the document is writable" + sMakeReadOnlyDocumentEditable + + bLoaded = false + + Kontext "Navigator" + if Navigator.Exists then Navigator.Close + + '/// Deactivate "Start with current page" in ToolsOptions ///' + setStartCurrentPage(FALSE) + + try + '/// 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" + + '/// check Radio button 'Type': 'Window' ///' + Fenster.Check + '/// close dialog 'Slide Show' with OK ///' + Bildschirmpraesentation.OK + sleep 3 + '/// start the slideshow with 'Slide Show->Slide Show' ///' + SlideShowSlideshow + sleep 3 + Kontext "DocumentPresentation" + sleep 5 + '/// 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 + + '/// 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 + '/// type the key [SHIFT + F5] to open the navigator ///' + DocumentPresentation.TypeKeys "<MOD1 SHIFT F5>" + Kontext "NavigatorDraw" + sleep 1 + '/// check in list, if the page changed ///' + if Liste.GetSelIndex <> 2 Then Warnlog "- pagedown not working: '" + Liste.GetSelText+"'" + Kontext "DocumentPresentation" + '/// 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" + '/// Close the Navigator ///' + DocumentImpress.TypeKeys "<MOD1 SHIFT F5>" + '/// Set "Start with current page" back to default = on, in ToolsOptions ///' + setStartCurrentPage(TRUE) + '/// close the application ///' + Call hCloseDocument + +endcase 'tSlideShowSlideShow + +'------------------------------------------------------------------------------- + +testcase tSlideShowRehearseTimings + qaerrorlog "#i64783# - tSlideShowRehearseTimings outcommented due to bug" + goto endsub + dim bLoaded as boolean + dim i as integer + + '/// open file 'graphics\\input\\diashow.odp' ///' + hFileOpen ConvertPath (gTesttoolPath + "graphics\required\input\diashow.odp") + 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 + Kontext "Navigator" + if Navigator.Exists then Navigator.Close + bLoaded = false + try + '/// 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" + '/// check Radio button 'Type': 'Window' ///' + Fenster.Check + '/// close dialog 'Slide Show' with OK ///' + Bildschirmpraesentation.OK + sleep 3 + '/// start the slideshow with 'Slide Show->Rehearse Timings' ///' + SlideShowRehearseTimings + Kontext "DocumentPresentation" + if DocumentPresentation.Exists then + printlog "OK" + else + warnlog "bah" + endif + '/// 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 + + '/// check state of navigator ! expected: closed ///' + Kontext "Navigator" + if Navigator.exists then + '///+ close navigator ! ///' + Navigator.Close + else + printlog "Navigator: NOT available" + endif + '/// 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 + + 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 + + '/// open application ///' + Call hNewDocument + +'/// check state of navigator ! expected: closed ///' + Kontext "Navigator" + if Navigator.exists then + '///+ close navigator ! ///' + Navigator.Close + QaErrorLog "Navigator was open. Check earlier tests. Now closed." + else + printlog "Navigator: NOT available. Good." + endif + + '/// Slide Show -> Slide Show Settings ///' + SlideShowPresentationSettings + Kontext "Bildschirmpraesentation" + '/// check checkbox in section 'Range' - 'From: ///' + AbDia.Check + '/// get count of slides from listbox 'From:' ///' + x = AbDiaName.GetItemCount + '/// 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 + '/// close dialog 'Slide Show' with OK ///' + Bildschirmpraesentation.OK + '/// Insert->Slide... ///' + InsertSlide + sleep 2 + hTypekeys "<Pagedown>" + sleep 2 + '/// Slide Show -> Slide Show Settings ///' + SlideShowPresentationSettings + Kontext "Bildschirmpraesentation" + Printlog "'///<b> check if count in listbox 'from' increased </b>///'" + 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 + '/// close dialog 'Slide Show' with CANCEL ///' + Bildschirmpraesentation.Cancel + '/// close application ///' + Call hCloseDocument + sleep 5 + + bLoaded = false + '/// 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" + sMakeReadOnlyDocumentEditable + + try + Kontext "DocumentImpress" + '/// 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 + '///<b> check checkbox 'All Slides' </b>///' + AlleDias.Check + '///<b> check checkbox 'Window' </b>///' + Fenster.Check + '///<b> check checkbox 'Navigator visible' </b>///' + NavigatorSichtbar.Check '-------------------------------------------------------------------------- + '/// close dialog 'Slide Show' with OK ///' + Bildschirmpraesentation.OK + '/// start the slideshow with 'Slide Show->Slide Show' ///' + SlideShowSlideshow + Printlog "'---------------------------- START P -- All -- Window -- Navigator -------------------------" + sleep 5 + '/// 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 + '/// 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 + '/// press the key [Page Down] 3 times ///' + '///+ 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) + '/// 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 + '/// check state of navigator ! expected: open ///' + Kontext "Navigator" + if Navigator.exists then + '///+ close navigator ! ///' + Navigator.Close + else + printlog "Navigator: NOT available" + endif + Printlog "'--------------------------------------------------------------------------" + + Kontext "DocumentPresentation" + '/// type the key [MOD1 SHIFT F5] to open the navigator ///' '-------------------------------------------------------------------------- + hTypeKeys "<MOD1 SHIFT F5>" + '/// 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 + '///<b> check checkbox in section 'Range' - 'From: </b>///' + AbDia.Check + '/// 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" + '///<b> check checkbox 'Default' </b>///' + Standard.Check + '/// UNcheck checkbox 'Navigator visible'///' + NavigatorSichtbar.UnCheck + '/// UNcheck checkbox 'Change slides by clicking on background'///' + DiawechselAufHintergrund.UnCheck + '/// close dialog 'Slide Show' with OK ///' + Bildschirmpraesentation.OK + sleep 3 + Kontext "DocumentPresentation" + '/// start the slideshow with 'Slide Show->Slide Show' ///' + SlideShowSlideshow + Printlog "'---------------------------- START P -- From -- Default -- Click on Bg -----------------------" + sleep 5 + '/// check state of navigator ! expected: closed ///' + Kontext "Navigator" + if Navigator.exists then + '///+ close navigator ! ///' + Navigator.Close + Warnlog "Navigator: closed" + else + Printlog "Navigator: NOT available. Good." + endif + sleep 1 + '/// type the key [MOD1 SHIFT F5] to open the navigator ///' '-------------------------------------------------------------------------- + Kontext "DocumentPresentation" + DocumentPresentation.TypeKeys "<MOD1 SHIFT F5>" + sleep 3 + '/// check in Navigator list, if the page is THREE! ///' + fGetSlideName(S3) + '/// click right mouse button ///' + sleep 5 + DocumentPresentation.MouseDown 50,50 + DocumentPresentation.MouseUp 50,50 + '/// 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 + '/// check in Navigator list, if the page is FOUR ///' + fGetSlideName(S4) + sleep 5 + '/// press the key [Page Down] ///' + DocumentPresentation.TypeKeys "<pagedown>" + sleep 5 + '/// 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 + '/// check state of navigator ! expected: open ///' + Kontext "Navigator" + if Navigator.exists then + '///+ close navigator ! ///' + Navigator.Close + printlog "Navigator: closed" + else + warnlog "Navigator: NOT available" + endif + 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 + '/// check checkbox 'All Slides' ///' + AlleDias.Check + '///<b> check check box 'Auto' -> implies looping of slideshow in fullscreen mode </b>///' + Auto.Check + '/// set duration of pause to '00:00:05' ///' + Zeit.SetText "00:00:05" + '/// check check box 'Show logo' ///' + LogoAnzeigen.Check + '/// check checkbox 'Change slides by clicking on background'///' + DiawechselAufHintergrund.Check + '/// close dialog 'Slide Show' with OK ///' + Bildschirmpraesentation.OK + '/// start the slideshow with 'Slide Show->Slide Show' ///' + SlideShowSlideshow + Printlog "'---------------------------- START P -- All -- Auto -- :05 -- Logo -----------------------------" + sleep 3 + Kontext "DocumentPresentation" + '/// type the key [MOD1 SHIFT F5] to open the navigator ///' '-------------------------------------------------------------------------- + DocumentPresentation.TypeKeys "<MOD1 SHIFT F5>" + '/// press the key [Space] 4 times ///' + '///+ 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 + '/// 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 + '/// 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 + '/// 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" + '/// Slide Show -> Slide Show Settings ///' + SlideShowPresentationSettings + Kontext "BildschirmPraesentation" + '/// check checkbox 'default' ///' + Standard.Check + '///<b> check checkbox 'Change slides maually' </b>///' + ' to check this i need an automatic transition somewhere in the presentation !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! + DiawechselManuel.Check + '///<b> check checkbox 'Mouse pointer as pen' </b>///' + MauszeigerAlsStift.Check + '/// close dialog 'Slide Show' with OK ///' + BildschirmPraesentation.Ok + sleep 1 + + '/// goto the first slide by typing [strg home] ///' + hTypeKeys "<mod1 home>" + '///+ - SlideShow->SlideTransition ///' + SlideShowSlideTransition + Kontext "Tasks" + '///+ - click button 'Extras' ///' + sleep 1 + '///+ - + click button 'Automatic Transition' ///' + TransitionAutomaticallyAfter.Check 'click + '///+ - + + Set Time to '00:00:01' ///' + TransitionAutomaticallyAfterTime.SetText "2" + '///+ - click button 'Assign' ///' + TransitionApplyToAllSlides.Click + '///+ - close dialog 'Slide Transition' ///' + sleep 3 + + '/// start the slideshow with keys [STRG F2] ///' + Kontext "DocumentImpress" + DocumentImpress.TypeKeys "<MOD1 F2>" + Printlog "'---------------------------- START P -- Default -- Manuel ------------------------------" + '/// wait 10 seconds (to get the dia changed automatical has not to happen !) ///' + sleep 10 + Kontext "DocumentPresentation" + '/// type the key [MOD1 SHIFT F5] to open the navigator ///' '-------------------------------------------------------------------------- + DocumentPresentation.TypeKeys "<MOD1 SHIFT F5>" + '/// press key [cursor right] 3 times ///' + for i = 1 to 4 + sleep 5 + fGetSlideName(saSlideNames(i)) + '///+ 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 + '/// 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 + '/// check state of navigator ! expected: closed ///' + Kontext "Navigator" + if Navigator.exists then + '///+ close navigator ! ///' + Navigator.Close + warnlog "Navigator: closed" + else + printlog "Navigator: NOT available" + endif + Printlog "'--------------------------------------------------------------------------" + + Kontext "DocumentImpress" + '/// Slide Show -> Slide Show Settings ///' + SlideShowPresentationSettings + Kontext "BildschirmPraesentation" + '/// check checkbox 'default' ///' + Standard.Check + '///<b> UNcheck checkbox 'Change slides manually' </b>///' + DiawechselManuel.UNCheck + '/// UNcheck checkbox 'Mouse pointer as pen' ///' + MauszeigerAlsStift.UNCheck + '/// close dialog 'Slide Show' with OK ///' + BildschirmPraesentation.Ok + sleep 1 + '/// goto the first slide by typing [strg home] ///' + hTypeKeys "<MOD1 HOME>" + '/// Set all slides to 'wait 10 seconds' to get the slide changed automatically ///' + '///+ - SlideShow->SlideTransition ///' + SlideShowSlideTransition + Kontext "Tasks" + '///+ - click button 'Extras' ///' + sleep 1 + '///+ - + click button 'Automatic Transition' ///' + TransitionAutomaticallyAfter.Check 'click + '///+ - + + Set Time to '10sec' ///' + TransitionAutomaticallyAfterTime.SetText "10" + '///+ - click button 'Apply to all Slides' ///' + TransitionApplyToAllSlides.Click + '///+ - close dialog 'Slide Transition' ///' + sleep (1) + '/// start the slideshow with keys [STRG F2] ///' + Kontext "DocumentImpress" + DocumentImpress.TypeKeys "<MOD1 F2>" + Printlog "'---------------------------- START P -- Default -- Automatic -----------------------------" + '/// Wait 6 seconds to see if the Automatic Transition changes the slide. ///' + sleep 6 + Kontext "DocumentPresentation" + '/// type the key [MOD1 SHIFT F5] to open the navigator ///' '-------------------------------------------------------------------------- + DocumentPresentation.TypeKeys "<MOD1 SHIFT F5>" + '/// press key [cursor right] 3 times ///' + for i = 2 to 4 + sleep (5) + fGetSlideName(saSlideNames(i)) + DocumentPresentation.TypeKeys "<right>" + next i + '/// 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 + '/// check state of navigator ! expected: closed ///' + Kontext "Navigator" + if Navigator.exists then + '///+ close navigator ! ///' + Navigator.Close + endif + else + warnlog "document didn't get loaded" + endif + '/// Set "Start with current page" back to default = on, in ToolsOptions ///' + setStartCurrentPage(TRUE) + '/// Close the document ///' + call hCloseDocument + +endcase 'tSlideShowSlideShowSettings + +'------------------------------------------------------------------------------- +testcase tSlideShowCustomSlideShow + + Dim Seite as string + dim i as integer + dim x as integer + dim sTemp as string + + Seite = s1 + '/// open application ///' + Call hNewDocument + + Kontext "Navigator" + if Navigator.Exists then Navigator.Close + '/// Deactivate "Start with current page" in ToolsOptions ///' + setStartCurrentPage(FALSE) + + '/// create a rectangle ///' + hRechteckErstellen 30,30,60,60 + '/// do 2 times : ///' + for i = 1 to 2 + '///+ Insert->Slide... ///' + InsertSlide + sleep 2 + hTypekeys "<Pagedown>" + sleep 2 + '///+ create a rectangle ///' + hRechteckErstellen 30,30,70,70 + next i + + '/// Slide Show -> Slide Show Settings ///' + SlideShowPresentationSettings + Kontext "Bildschirmpraesentation" + if (Fenster.IsChecked = False) Then Fenster.Check + '/// close dialog 'Slide Show' with OK ///' + Bildschirmpraesentation.OK + + '/// Slide Show -> Custom Slide Show... ///' + SlideShowCustomSlideshow + Kontext "IndividuellePraesentation" + '///<b> click button 'New...' </b>///' + Neu.Click + + Kontext "IndividuellePraesentationDefinieren" + '/// type something in 'Name' ///' + PraesentationName.SetText "Individually 1" + '/// select the first entry in the list 'Existing Slides' ///' + SeitenPraesentation.Select 1 + '/// 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 + '/// close dialog 'Define Custom Slide Show' with OK ///' + IndividuellePraesentationDefinieren.OK + Kontext "IndividuellePraesentation" + '///<b> click button 'Edit...' </b>///' + Bearbeiten.Click + Kontext "IndividuellePraesentationDefinieren" + '/// select an entry in the list 'Selected Slides' ///' + SelectedSlides.TypeKeys "<pagedown>" + '/// 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 + '/// select the first entry in the list 'Existing Slides' ///' + SeitenPraesentation.Select 1 + '/// click button '>>' ///' + Hinzufuegen.Click + '/// close dialog 'Define Custom Slide Show' with OK ///' + IndividuellePraesentationDefinieren.OK + Kontext "IndividuellePraesentation" + + '///<b> check checkbox 'Use Custom Slide Show' </b>///' '------------------------------------------------------- + IndividuellePraesentationBenutzen.Check + '///<b> click button 'Start...' </b>///' + Starten.Click + sleep 2 + Kontext "DocumentPresentation" + '/// press key [space] 2 times ///' + DocumentPresentation.TypeKeys "<space>" + sleep 2 + DocumentPresentation.TypeKeys "<space>" + sleep 5 + try + Kontext "IndividuellePraesentation" + '/// 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 + '/// Slide Show -> Custom Slide Show... ///' + SlideShowCustomSlideshow + Kontext "IndividuellePraesentation" + '/// click button 'Edit...' ///' + Bearbeiten.Click + Kontext "IndividuellePraesentationDefinieren" + '/// select 1st entry in the list 'Selected Slides' ///' + SelectedSlides.Select 1 + '/// 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 + '/// select the first entry in the list 'Existing Slides' ///' + SeitenPraesentation.Select 1 + '/// 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 + '/// close dialog 'Define Custom Slide Show' with OK ///' + IndividuellePraesentationDefinieren.OK + sleep 1 + Kontext "IndividuellePraesentation" + + '///<b> UNcheck checkbox 'Use Custom Slide Show' </b>///' + IndividuellePraesentationBenutzen.UnCheck + '/// click button 'Start...' ///' + Starten.Click '---------------------------- START P ---------------------------------------------- + '/// press key [space] 4 times ///' + kontext "DocumentPresentation" + for i = 1 to 4 + sleep 3 + DocumentPresentation.TypeKeys "<space>" + next i + sleep 10 + kontext "IndividuellePraesentation" + '/// close dialog 'Custom Slide Shows' with button 'Close' ///' + if IndividuellePraesentation.exists then + IndividuellePraesentation.Close + else + Warnlog "'IndividuellePraesentation' was closed :-(" + end if + + '/// Set "Start with current page" back to default = on, in ToolsOptions ///' + setStartCurrentPage(TRUE) + '/// close the application ///' + Kontext "Navigator" + if Navigator.exists then + '///+ 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") + +' '/// open application ///' + call hNewDocument + + '/// close the navigator///' + Kontext "Navigator" + if Navigator.Exists then Navigator.Close + WaitSlot (3000) + '/// create 3 slides with a rectangle ///' + hRechteckErstellen (30,30,60,60) + for i = 1 to 2 + '///+ - Insert->Slide ///' + WaitSlot (1000) + InsertSlide + WaitSlot (2000) + hTypekeys "<Pagedown>" + WaitSlot (2000) + '///+ - insert rectangle///' + hRechteckErstellen (30,30,60,60) + next i + Printlog "created 3 slides" + '/// for all 3 slides do: ///' + for i = 1 to 3 + '///+ - open navigator with shortcutkey [MOD1 SHIFT F5] ///' + hTypeKeys "<MOD1 SHIFT F5>" + Sleep (3) + Kontext "NavigatorDraw" + '///+ - 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 + '///+ - press key [return] ///' + Liste.TypeKeys "<return>" + Kontext "Navigator" + '///+ - close Navigator ///' + Navigator.Close + '///+ - SlideShow->SlideTransition ///' + SlideShowSlideTransition + Kontext "Tasks" '"SlideTransition"' "OL_DIA_Diawechsel" 'OL_DIA_Diawechsel + TransitionAutomaticPreview.UnCheck + '///+ - click button 'Effects' ///' + TransitionApplyToSelectedSlide.typekeys "<pagedown>" + Sleep (1) + '///+ - in the listbox 'speed' select the i. one from the top ///' + TransitionSpeed.Select i + '///+ - 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 + '///+ - click button 'Extras' ///' + Sleep (2) + select case i + case 1: '///+ - + click button 'Automatic Transition' ///' + TransitionAutomaticallyAfter.Check + '///+ - + + 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: '///+ - + click button 'SemiAutomatic Transition' OR ///' + TransitionOnMouseClick.Check + end select + Sleep (3) + next i + Printlog "assigned transitions to all slides" + + Kontext "DocumentImpress" + Sleep (3) + '/// SlideShow->Slide Show Settings... ///' + SlideShowPresentationSettings + Kontext "Bildschirmpraesentation" + WaitSlot (2000) + '/// check Radio button 'Type': 'Window' ///' + Fenster.Check + '/// close dialog 'Slide Show' ///' + Bildschirmpraesentation.OK + WaitSlot (5000) + Kontext "DocumentImpress" + Printlog "'/// SlideShow->Slide Show ///'" + SlideShowSlideshow + '/// wait 10 sec ///' + sleep (10) 'WaitSlot (10000) + Kontext "DocumentPresentation" + '/// type key [ESCAPE] ///' + DocumentPresentation.TypeKeys "<ESCAPE>" + WaitSlot (3000) + try + '/// type key [F11] to open the stylist (to check ending of presenation) ///' + hTypeKeys "<F11>" + Sleep (3) + Kontext "Gestalter" + Sleep (3) + '/// close Stylist ///' + Gestalter.Close + Printlog "- Slideshow worked" + catch + Kontext "DocumentPresentation" + DocumentPresentation.TypeKeys "<ESCAPE>" + Warnlog "slideshow somehow didn't end :-(" + Sleep (2) + endcatch + + '/// 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 + " ---------------------------" + '///+ - open navigator with shortcutkey [MOD1 SHIFT F5] ///' + hTypeKeys "<MOD1 SHIFT F5>" + sleep (3) + Kontext "NavigatorDraw" + '///+ - select the next slide in the list ///' + Liste.Select i + '///+ - press key [return] ///' + Liste.TypeKeys "<return>" + Kontext "Navigator" + '///+ - close Navigator ///' + Navigator.Close + '///+ - View->Master View->Slides View ///' +' ViewWorkspaceSlidesView + Sleep (2) + Kontext "Tasks" 'SlideViewObjectbar" + '///+ - 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 + '///+ - 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 + + '///+ - 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 +' ViewWorkspaceDrawingView + else + warnlog " SlideViewObjectbar doesnt exists or isnt visible" + end if + next i + '/// save file as presentation with name '"user\\work\\diashow")' ///' + + hFileSaveAsWithFilterKill ((sFile + ".odp") , "impress8" ) + + Printlog " saved presentation: '" + sFile + "'" '." + gImpressFilter + " + '/// close application///' + hCloseDocument () + WaitSlot (10000) + '/// load file again ///' + hFileOpen (sFile + ".odp") + WaitSlot (5000) + Printlog " '/// check setings for every slide in the transition dialog ///'" + '///+ for all 3 slides do: ///' + for i = 1 to 3 + Printlog " --------------------- " + i + " ---------------------------" + '///+ - open navigator with shortcutkey [MOD1 SHIFT F5] ///' + hTypeKeys "<MOD1 SHIFT F5>" + Sleep (3) + Kontext "NavigatorDraw" + '///+ - select the next slide in the list ///' + Liste.Select i + '///+ - press key [return] ///' + Liste.TypeKeys "<return>" + Kontext "Navigator" + '///+ - close Navigator ///' + Navigator.Close + '///+ - select the grafik with the key [TAB] ///' + hTypeKeys ("<tab>") + '///+ - SlideShow->SlideTransition ///' + SlideShowSlideTransition + Kontext "Tasks" + Sleep (1) + '///+ - check 'speed' ///' + x = TransitionSpeed.GetSelIndex + if (x <> i) then + Warnlog " Speed changed :-( is: '" + x + "' should: '" + i + "'" + end if + '///+ - 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: '///+ - click button 'Automatic Transition' ///' + if (TransitionAutomaticallyAfter.IsEnabled) then + '///+ - + + 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 + '///+ - + check button 'SemiAutomatic Transition' OR ///' + Warnlog " button 'Automatic Transition' is pressed ?" + end if + case 3: if (TransitionAutomaticallyAfter.IsChecked <> FALSE) then + '///+ - + click button 'Manual Transition' ///' + Warnlog " button 'Automatic Transition' is pressed ?" + end if + end select + Sleep (3) + next i + TransitionAutomaticPreview.Check + '/// Set "Start with current page" back to default = on, in ToolsOptions ///' + setStartCurrentPage(TRUE) + Kontext "Navigator" + if Navigator.exists then + '///+ close navigator ! ///' + Navigator.Close + else + printlog "Navigator: NOT available" + end if + '/// 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 + +'------------------------------------------------------------------------------ diff --git a/testautomation/graphics/optional/includes/impress/i_slideshow2.inc b/testautomation/graphics/optional/includes/impress/i_slideshow2.inc new file mode 100755 index 000000000000..5d37b2e53132 --- /dev/null +++ b/testautomation/graphics/optional/includes/impress/i_slideshow2.inc @@ -0,0 +1,1013 @@ +'encoding UTF-8 Do not remove or change this line! +'************************************************************************** +'* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. +'* +'* Copyright 2008 by Sun Microsystems, Inc. +'* +'* OpenOffice.org - a multi-platform office productivity suite +'* +'* $RCSfile: i_slideshow2.inc,v $ +'* +'* $Revision: 1.1 $ +'* +'* last change: $Author: jsi $ $Date: 2008-06-16 10:42:42 $ +'* +'* This file is part of OpenOffice.org. +'* +'* OpenOffice.org is free software: you can redistribute it and/or modify +'* it under the terms of the GNU Lesser General Public License version 3 +'* only, as published by the Free Software Foundation. +'* +'* OpenOffice.org is distributed in the hope that it will be useful, +'* but WITHOUT ANY WARRANTY; without even the implied warranty of +'* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +'* GNU Lesser General Public License version 3 for more details +'* (a copy is included in the LICENSE file that accompanied this code). +'* +'* You should have received a copy of the GNU Lesser General Public License +'* version 3 along with OpenOffice.org. If not, see +'* <http://www.openoffice.org/license.html> +'* for a copy of the LGPLv3 License. +'* +'/************************************************************************ +'* +'* Owner : wolfram.garten@sun.com +'* +'* short description : +'* +'******************************************************************* +'* +' #1 tPraesentationAnimation +' #1 tPraesentationEffekt +' #1 tSlideShowInteraction +' #1 tAendernObjektBenennen +' #1 tSlideshowBackgroundAllSlides +' #1 tSlideshowBackgroundSelectedSlide +'* +'\****************************************************************** + +testcase tPraesentationAnimation + Dim i + Printlog "- Slideshow/Animation" + + Call hNewDocument '/// new document ///' + sleep 2 + InsertGraphicsFromFile '/// insert graphic ///' + Kontext "OeffnenDlg" + Dateiname.SetText ConvertPath (gTesttoolPath + "global/input/graf_inp/desp.bmp") + sleep 2 + Oeffnen.Click + sleep 2 + + gMouseClick 90,90 '/// deselect graphic ///' + + InsertGraphicsFromFile '/// insert 2nd graphic ///' + Kontext "OeffnenDlg" + Dateiname.SetText ConvertPath (gTesttoolPath + "global/input/graf_inp/borabora.jpg") + sleep 2 + Oeffnen.Click + sleep 2 + + Call hTypekeys "<TAB>" + + Opl_SD_EffekteZulassen '/// open animation dialogue ///' + Kontext "Animation" + + for i=1 to 10 + BildAufnehmen.Click '/// add graphic 10 times ///' + next i + + sleep 1 + if AnzahlBilder.GetText <> "10" Then '/// get number of frames (should be 10) ///' + 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" + EditSelectAll '/// select both graphics in document ///' + + Kontext "Animation" + + for i=1 to 5 + printlog i + AlleAufnehmen.Click '/// add them 5 times (10 frames) ///' + next i + + sleep 1 + if AnzahlBilder.GetText <> "20" Then '/// compare total numbers of frame ///' + WarnLog " - Adding pics does not work" + else + PrintLog " all pics added" + end if + + ErstesBild.Click '/// jump to 1st frame ///' + + if AnzahlBilder.GetText <> "1" Then '/// get number index of selected frame ///' + WarnLog " - Jump back to beginning does not work" + else + PrintLog " Jump back to beginning works" + end if + + LetztesBild.Click '/// jump to last frame ///' + + if AnzahlBilder.GetText <> "20" Then '/// control number index of selected frame ///' + WarnLog " - Jump to end does not work" + else + PrintLog " Jumped to end" + end if + sleep 1 + Abspielen.Click '/// play animation ///' + sleep 10 + Kontext "DocumentImpress" + EditSelectAll '/// delete graphics in document ///' + DocumentImpress.TypeKeys "<DELETE>" + sleep 2 + Kontext "Animation" + Erstellen.Click '/// create animation ///' + sleep 10 + + Kontext "DocumentImpress" + try + EditCopy '/// try to copy created animation to make sure it is created ///' + PrintLog " Animation created" + catch + WarnLog " - Animation not created" + endcatch + + Kontext "Animation" + + if AnimationsgruppeGruppenobjekt.IsChecked = True Then '/// set duration time of frames ///' + try + AnzeigedauerProBild.SetText "1" + WarnLog " - Control should be disabled" + catch + PrintLog " Control disabled because Groupobjekt = " + AnimationsgruppeGruppenobjekt.IsChecked + endcatch + end if + + AnimationsgruppeBitmapobjekt.Check '/// check group object ///' + + AnzeigedauerProBild.SetText "3" '/// set frame visibility time to 3 ///' + SetClipboard AnzeigedauerProBild.GetText + AnzeigedauerProBild.More '/// raise value for frame time ///' + if AnzeigedauerProBild.GetText<> GetClipboardText Then + PrintLog " Duration per frame works" + else + WarnLog " - Duration could not be changed" + end if + + Dim Zaehler + Zaehler = AnzahlDurchlaeufe.GetItemCount '/// test different settings for pass amount ///' + 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 + + BildLoeschen.Click '/// delete 1 frame ///' + if AnzahlBilder = "20" Then + WarnLog " - Deleting pictures does not work" + else + PrintLog " Picture No.20 deleted" + end if + + AlleLoeschen.Click '/// delete all frames ///' + Kontext "Active" + Active.Yes + sleep 3 + + Kontext "Animation" + if Abspielen.IsEnabled = true Then '/// check if play button is still active ///' + WarnLog " - Not all pics are deleted" + else + PrintLog " All pics deleted" + end if + sleep 2 + Animation.Close '/// close animation flyer ///' + sleep 2 + Call hCloseDocument '/// close document ///' +endcase + +'--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- + +testcase tPraesentationEffekt + qaerrorlog "Test not yet ready." + goto endsub + Printlog "- Slideshow/Effect" + Dim i + Dim j + Dim k + Dim l + Dim m + Dim n + Dim Zaehler + Dim ZaehlerKmh + Dim ZaehlerText + Dim ZaehlerTon + Dim Zufall + Call hNewDocument '/// new document ///' + '/// check state of navigator ! expected: closed ///' + Kontext "Navigator" + if Navigator.exists then + '///+ 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 + hRechteckErstellen (20,20,50,50) '/// create rectangle ///' + sleep 3 + Kontext "Effekt" + Printlog " - Test effects" + gMouseClick 90,90 '/// deselect rectangle ///' + sleep 1 + DocumentImpress.TypeKeys "<TAB>" '/// select rectangle ///' + sleep 1 + DocumentImpress.TypeKeys "<F2>" '/// go into text edit mode (F2) ///' + sleep 1 + DocumentImpress.TypeKeys "test text to test text effects" '/// type text into the rectangle ///' + sleep 1 + DocumentImpress.TypeKeys "<ESCAPE>" + sleep 2 + DocumentImpress.TypeKeys "<TAB>" + sleep 1 + SlideShowEffects + Kontext "Effekt" + sleep 3 + Effekte.Click + Zaehler=Effekteliste.GetItemCount + for i=2 to Zaehler '/// Start from the second entry since the first one is "No effect" ///' + 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 + +'--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- + +testcase tSlideShowInteraction + Dim Datei$ + Dim i as integer + Dim Zaehler as integer + dim b115364 as boolean + + Datei$ = ConvertPath (gOfficePath + "user\work\interac.odp") + + '/// open application ///' + Call hNewDocument + sleep 5 + setStartCurrentPage(TRUE) '/// Set "start with current page to ON ///' + + '/// call 'Insert->Slide' three times and name the slides 2, 3, 4 and create a rectangl� on it ///' + '///+ 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 + + '/// 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 + + '/// 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 + + '/// 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" + '/// Close the Navigator ///' + DocumentImpress.TypeKeys "<MOD1 SHIFT F5>" + sleep 3 + '/// Set "start with current page to ON = Default ///' + setStartCurrentPage(TRUE) + Call hCloseDocument +endcase + +'--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- + +testcase tAendernObjektBenennen + Printlog "- Context/Name object" + Call hNewDocument + 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 + +'--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- + +testcase tSlideshowBackgroundAllSlides + Dim Datei$ as string + Dim Background$ as string + Dim i as integer + Dim Zaehler as integer + Background$ = ConvertPath(gOfficeBasisPath + "share\gallery\emoticons\grin.gif") + Datei$ = ConvertPath (gOfficePath + "user\work\background.odp") + + '/// Create a new document ///' + Printlog "- SlideshowBackground" + Call hNewDocument + + '/// Insert a new Slide ///' + Kontext "DocumentImpress" + InsertSlide + + '/// Open the Contextmenu ///' + DocumentImpress.OpenContextMenu + + '/// Select the entry "Slide" ///' + hMenuFindSelect (".uno:PageMenu", true, 1, true) + '/// Select the entry "Background" ///' + hMenuSelectNr (4) + + '/// 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 + + '/// 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 + + '/// Save the document ///' + Call hFileSaveAsKill (Datei$) + '/// Close the document ///' + Call hCloseDocument + '/// Open the document ///' + Call hFileOpen (Datei$) + '/// Close the document ///' + Call hCloseDocument +endcase + +'--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- + +testcase tSlideshowBackgroundSelectedSlide + Dim Datei$ as string + Dim Background$ as string + Dim i as integer + Dim Zaehler as integer + Background$ = ConvertPath(gOfficeBasisPath + "share\gallery\emoticons\grin.gif") + Datei$ = ConvertPath (gOfficePath + "user\work\background.odp") + + '/// Create a new document ///' + Printlog "- SlideshowBackground" + Call hNewDocument + + '/// Insert a new Slide ///' + Kontext "DocumentImpress" + InsertSlide + + '/// Open the Contextmenu ///' + DocumentImpress.OpenContextMenu + + '/// Select the entry "Slide" ///' + hMenuFindSelect (".uno:PageMenu", true, 1, true) + '/// Select the entry "Background" ///' + hMenuSelectNr (4) + + '/// 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 + + '/// 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 + + '/// Save the document ///' + Call hFileSaveAsKill (Datei$) + '/// Close the document ///' + Call hCloseDocument + '/// Open the document ///' + Call hFileOpen (Datei$) + '/// Close the document ///' + Call hCloseDocument +endcase + +'--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- diff --git a/testautomation/graphics/optional/includes/impress/i_slideshow3.inc b/testautomation/graphics/optional/includes/impress/i_slideshow3.inc new file mode 100755 index 000000000000..dc6277f7b608 --- /dev/null +++ b/testautomation/graphics/optional/includes/impress/i_slideshow3.inc @@ -0,0 +1,1107 @@ +'encoding UTF-8 Do not remove or change this line! +'************************************************************************** +'* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. +'* +'* Copyright 2008 by Sun Microsystems, Inc. +'* +'* OpenOffice.org - a multi-platform office productivity suite +'* +'* $RCSfile: i_slideshow3.inc,v $ +'* +'* $Revision: 1.1 $ +'* +'* last change: $Author: jsi $ $Date: 2008-06-16 10:42:42 $ +'* +'* This file is part of OpenOffice.org. +'* +'* OpenOffice.org is free software: you can redistribute it and/or modify +'* it under the terms of the GNU Lesser General Public License version 3 +'* only, as published by the Free Software Foundation. +'* +'* OpenOffice.org is distributed in the hope that it will be useful, +'* but WITHOUT ANY WARRANTY; without even the implied warranty of +'* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +'* GNU Lesser General Public License version 3 for more details +'* (a copy is included in the LICENSE file that accompanied this code). +'* +'* You should have received a copy of the GNU Lesser General Public License +'* version 3 along with OpenOffice.org. If not, see +'* <http://www.openoffice.org/license.html> +'* for a copy of the LGPLv3 License. +'* +'/************************************************************************ +'* +'* Owner : wolfram.garten@sun.com +'* +'* short description : +'* +'******************************************************************* +' #1 tExtrasInteraktion +' #1 tExtrasEffekt +' #1 tExtrasPraesentationseinstellungen +' #1 tExtrasIndividuellePraesentation +' #1 tExtrasInteraktion +' #1 tSlideshowContextMenuOneSlide +' #1 tSlideshowContextMenuMoreSlides +' #1 tiMousePointerHides +'\****************************************************************** + +testcase tExtrasInteraktion + Printlog " - SlideShow/Interaction" + Call hNewDocument + sleep 1 + Call hTextrahmenErstellen ("Seite 1",10,10,40,40) '/// create textbox ///' + SlideShowPresentationSettings '/// Set slide show settings ///' + Kontext "Bildschirmpraesentation" + NavigatorSichtbar.Check '/// Navigator visible ///' + Bildschirmpraesentation.OK + SlideShowInteraction '/// open Interaction ///' + Kontext "Interaktion" + if Interaktion.exists(5)then + AktionBeiMausklick.Select 1 '/// Select "Go to previous slide" ///' + else + Print "Interaction doesnt exist, something is wrong here." + endif + Interaktion.OK + Kontext "DocumentImpress" + SlideShowSlideshow '/// Run slideshow ///' + 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 hRechteckErstellen (50,50,80,80) '/// create rectangle ///' + SlideShowInteraction + Kontext "Interaktion" + Dim i + Dim Zaehler + Zaehler=AktionBeiMausklick.GetItemCount + For i=2 to Zaehler + AktionBeiMausklick.Select i '/// select actions ///' + SetClipboard AktionBeiMausklick.GetSelText + Interaktion.OK + Kontext "DocumentImpress" + EditSelectAll + SlideShowInteraction + Kontext "Interaktion" + if GetClipboardText<>AktionBeiMausklick.GetSelText Then + Warnlog " Action at mouseclick - " + GetClipboardText + " - not taken" '/// control if action is saved (closing reopening dialog) ///' + else + Printlog " Action at mouseclick - " + GetClipboardText + " - runs" + end if + next i + Interaktion.OK + sleep 1 + Call hCloseDocument '/// close document ///' +endcase + +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 + Call hNewDocument '/// New impress document ///' + + '/// check state of navigator ! expected: closed ///' + Kontext "Navigator" + if Navigator.exists then + '///+ close navigator ! ///' + Navigator.Close + Warnlog "Navigator was open. Check earlier tests. Now closed." + else + printlog "Navigator: NOT available. Good." + endif + + gMouseClick 50,50 + hRechteckErstellen (20,20,50,50) '/// create rectangle ///' + sleep 2 + DocumentImpress.TypeKeys "<F2>" + DocumentImpress.TypeKeys "- This is text to test the text effects of the Effects flyer" + sleep 1 + gMouseClick 90,90 '/// deselect rectangle ///' + DocumentImpress.TypeKeys "<TAB>" '/// reselect rectangle ///' + + sleep 1 + Kontext "Effekt" + Printlog " - Test effect flyer" + + SlideShowEffects '/// Open effect flyer ///' + Kontext "ExtrasEffekt" + sleep 1 + Effekte.Click + Zaehler=Effekteliste.GetItemCount '/// select each effect 1 time, assign effect and close dialog ///' + for i=1 to Zaehler '/// reopen dialog and check if the effect is still there ///' + 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 + Texteffekte.Click '/// test text effects ///' + 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 + Extras.Click '/// test extras ///' + 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" + Vorschaufenster.Click '/// open preview window ///' + sleep 1 + Kontext "Vorschau" + if Vorschau.Exists = False Then Warnlog " - Preview window not opened" + Vorschau.Close + Kontext "Effekt" + Extras.Click + if not Klangliste.IsEnabled Then Klang.Click '/// insert sound ///' + 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 + Call hCloseDocument '/// close document ///' +endcase + +testcase tExtrasPraesentationseinstellungen +dim waschecked as boolean + Printlog " - SlideShow/Slideshow settings" + Call hNewDocument '/// New impress document ///' + setStartCurrentPage(FALSE) '/// Set ToolsOptions - Presentation - StartCurrentPage = off ///' + '/// check state of navigator ! expected: closed ///' + Kontext "Navigator" + if Navigator.exists then + '///+ 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 + InsertSlide '/// insert slide ///' + sleep 2 + hTypekeys "<Pagedown>" + sleep 2 + SlideShowPresentationSettings '/// slideshow settings ///' + Kontext "Bildschirmpraesentation" + if AbDiaName.GetItemCount <> GetClipboardText Then + Printlog " - Added page appears in list" + else + Warnlog " - Page not added to the list" + end if + AlleDias.Check '/// check all dias///' + Printlog " - Test all slides" + Bildschirmpraesentation.OK + hCloseDocument '/// close document ///' + DateiOeffnen '/// open document (diashow.odp) ///' + 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) + ' 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" + sleep 1 + SlideShowPresentationSettings + Kontext "Bildschirmpraesentation" + if Fenster.IsChecked = False Then '/// slideshow runs in window mode checked ///' + Fenster.Check + Printlog " - Slideshow in window mode" + else + Printlog " - Slideshow in window mode checked" + end if + Bildschirmpraesentation.OK + + Printlog " - Testing slide show" + SlideShowSlideshow '/// run slideshow ///' + sleep (3) + Kontext "DocumentPresentation" + DocumentPresentation.TypeKeys "<pagedown>" + try + Kontext "DocumentImpress" + ViewZoom '/// try using menue entrees (should be disabled while slideshow is running) ///' + 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" + if DocumentPresentation.Exists(3) then '/// test if application is still in slideshow mode ///' + warnlog " - We are still in slideshow mode" + DocumentPresentation.TypeKeys "<ESCAPE>" + else + Printlog " - Test Abdia page 3 ended" + endif + + Printlog " - From slides test" + SlideShowPresentationSettings '/// open slideshow settings ///' + Kontext "Bildschirmpraesentation" + Fenster.Check '/// check slideshow in window mode ///' + AbDia.Check + AbDiaName.Select 3 '/// slideshow begins at dia 3///' + Printlog " - From " + AbDiaName.GetSelText + " was the slides shown" + Bildschirmpraesentation.OK + SlideShowSlideshow '/// run slideshow ///' + sleep (3) + Kontext "DocumentPresentation" + DocumentPresentation.TypeKeys "<pagedown>" 'to get to 4 + sleep 2 + DocumentPresentation.TypeKeys "<pagedown>" ' to get to the end + sleep 2 + '/// 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" + SlideShowPresentationSettings '/// open slideshow settings ///' + 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 + DocumentPresentation.TypeKeys "<MOD1 SHIFT F5>" '/// Open the navigator ///' + 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" + DocumentPresentation.TypeKeys "<MOD1 SHIFT F5>" '/// Close the Navigator-window ///' + else + Printlog " - Repeat endless does work" + Kontext "DocumentPresentation" + DocumentPresentation.TypeKeys "<MOD1 SHIFT F5>" '/// Close the Navigator-window ///' + sleep 2 + endif + Kontext "DocumentPresentation" + DocumentPresentation.TypeKeys "<ESCAPE>" + sleep 2 + Kontext "DocumentImpress" + gMouseClick 80,80 + try + SlideShowPresentationSettings '/// test endless repeating setting ///' + 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 slide switching manually" '/// test dia switch manual ///' + 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 + + '/// Check state of navigator ! Expected: closed ///' + Kontext "Navigator" + if Navigator.exists then + '///+ Close Navigator ! ///' + Navigator.Close + Warnlog "Navigator: Should have been closed. Closing now." + else + printlog "Navigator: not available - Good" + endif + Kontext "DokumentPraesentation" + DokumentPraesentation.TypeKeys "<ESCAPE>" '/// Exit presentation-mode ///' + Kontext "DocumentImpress" + Call hCloseDocument '/// close document ///' +endcase + +testcase tExtrasIndividuellePraesentation + Printlog "- Slideshow/Individual slideshow" + Call hNewDocument '/// new impress document ///' + '/// Deactivate "Start with current page" in ToolsOptions ///' + setStartCurrentPage(FALSE) + '/// check state of navigator ! expected: closed ///' + Kontext "Navigator" + if Navigator.exists then + '///+ 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" + SlideShowPresentationSettings '/// open slide show settings ///' + Kontext "Bildschirmpraesentation" + Fenster.Check + Bildschirmpraesentation.OK + InsertSlide '/// insert slide ///' + sleep 2 + hTypekeys "<Pagedown>" + sleep 2 + InsertSlide + sleep 2 + hTypekeys "<Pagedown>" + sleep 2 + InsertSlide '/// insert another slide ///' + sleep 2 + hTypekeys "<Pagedown>" + sleep 2 + Printlog " - Slides added" + sleep 1 + Kontext "DocumentImpress" + DocumentImpress.TypeKeys "<MOD1 SHIFT F5>" '/// open navigator ///' + sleep 1 + Kontext "NavigatorDraw" + if NavigatorDraw.Exists Then + Printlog " - Navigator exists" + Erste.Click '/// switch to 1st slide ///' + Kontext "DocumentImpress" + DocumentImpress.MouseDown ( 50, 50 ) '/// Make a click onto the slide to focus onto that ///' + DocumentImpress.MouseUp ( 50, 50 ) + hRechteckErstellen (10,10,20,20) '/// create rectangle ///' + Kontext "NavigatorDraw" + Naechste.Click '/// switch to 2nd slide ///' + Kontext "DocumentImpress" + hRechteckErstellen (30,30,40,40) '/// create another rectangle ///' + Kontext "NavigatorDraw" + Naechste.Click '/// switch to 3rd slide ///' + Kontext "DocumentImpress" + hRechteckErstellen (40,40,50,50) '/// create rectangle ///' + Kontext "NavigatorDraw" + Naechste.Click '/// switch to next slide ///' + Kontext "DocumentImpress" + hRechteckErstellen (50,50,60,60) '/// create rectangle ///' + Printlog " - Created rectangles on all slides" + else + Warnlog " No Navigator" + end if + sleep 1 + SlideShowCustomSlideshow '/// open custom slideshow ///' + Kontext "IndividuellePraesentation" + Printlog " - Create new slideshow" + Neu.Click '/// create new individual slideshow ///' + Kontext "IndividuellePraesentationDefinieren" + PraesentationName.SetText "Test 1" '/// set name of individiual slideshow to Test 1 ///' + Dim i + Dim Zaehler + Zaehler=SeitenPraesentation.GetItemCount '/// add slides to presentation ///' + 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 + + if SelectedSlides.GetItemCount=8 Then '/// control number of added slides ///' + Printlog " - slides has been added, multiple selection is working" + else + Warnlog " Multiple selection does not work" + end if + + IndividuellePraesentationDefinieren.OK + sleep 2 + Kontext "IndividuellePraesentation" + if IndividuellePraesentationBenutzen.IsChecked=False Then IndividuellePraesentationBenutzen.Check + sleep 2 + Starten.Click '/// run presentation ///' + Printlog " - Individual slideshow started" + sleep 5 + Kontext "Navigator" '/// Check if the navigator exists, if so - close it ///' + if Navigator.Exists Then + Printlog " - Navigator exists, we close it" + Navigator.Close '/// close navigator ///' + 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" + IndividuellePraesentation.Close '/// Close custom slideshow ///' + + Kontext "NavigatorDraw" '/// Navigator: Control if right slide is displayed ///' + printlog " Now we switch to the navigator again" + if Liste.GetSelIndex <> 4 then '/// Unless -Start on first slide- is activated? Default = No ///' + Warnlog " This is not the right slide, it should be 4 but is: " + Liste.GetSelIndex + else + Printlog " - Individual slideshow seems to work" + end if + SlideShowCustomSlideshow '/// open custom slideshow ///' + '/// 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 + Navigator.Close '/// Close the Navigator ///' + Kontext "NavigatorDraw" + if NavigatorDraw.exists then + NavigatorDraw.Close + endif + else + printlog "Navigator: NOT available. Good." + endif + Kontext "DocumentImpress" + setStartCurrentPage(TRUE) + Call hCloseDocument '/// close document ///' +endcase + +'**************************************************************************************************** + +testcase tSlideshowContextMenuOneSlide + qaerrorlog "Test not yet ready." + goto endsub + dim NumberOfEntries as Integer + Printlog "- ContextMenu in Slideshow" + '/// New Impress Document ///' + Call hNewDocument + + '/// Start the Slideshow. ///' + hTypeKeys "<F5>" + '/// Check that the right mousebutton brings up the Context-Menu. ///' + Kontext "DocumentPresentation" + DocumentPresentation.MouseDown 50, 50, 3 + DocumentPresentation.MouseUp 50, 50, 3 + '/// Check that the right-click brought up a Context-Menu. ///' + '/// 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 + '/// Check that every position contains the expected Undermenu. ("Screen": Black/White. and "End Slideshow") ///' + '/// 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 + hMenuSelectNr (1) '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. + '/// 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 + + '/// 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 + + '/// Start the Slideshow. ///' + hTypeKeys "<F5>" + '/// Check that the right mousebutton brings up the Context-Menu. ///' + Kontext "DocumentPresentation" + DocumentPresentation.MouseDown 50, 50, 3 + DocumentPresentation.MouseUp 50, 50, 3 + sleep 2 + + '/// 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 + + '/// Check that one can step one step forward, even if there is no more than one slide. ///' + '/// Start the Slideshow. ///' + hTypeKeys "<F5>" + '/// 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 + + hMenuSelectNr (2) 'Open the Goto Slide -menu. + + '/// Select the 'one step forward' -entry ///' + hMenuSelectNr (1) + + '/// 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 + + '/// Close the Context-Menu ///' + hMenuSelectNr (0) + Kontext "DocumentPresentation" + + '/// Check if the context-menu also comes up at the very last page (slideshow-ending) ///' + DocumentPresentation.TypeKeys "<SPACE>" +' 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 + + '/// 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 + + '/// 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 + + '/// Close the Context-Menu ///' + MenuSelect (0) + '/// Close the Presentation ///' + hTypeKeys "<ESCAPE>" + '/// Close Document ///' + Call hCloseDocument +endcase 'tSlideshowContextMenuOneSlide + +'**************************************************************************************************** + +testcase tSlideshowContextMenuMoreSlides + qaerrorlog "Test not yet ready." + goto endsub + dim NumberOfEntries as Integer + Printlog "- ContextMenu in Slideshow" + '/// New Impress Document ///' + Call hNewDocument + '/// Insert three new Slides ///' + InsertSlide + InsertSlide + InsertSlide + '/// Start the Slideshow. ///' + hTypeKeys "<F5>" + sleep (3) + '/// Check that the right mousebutton brings up the Context-Menu. ///' + Kontext "DocumentPresentation" + DocumentPresentation.MouseDown 50, 50, 3 + DocumentPresentation.MouseUp 50, 50, 3 + '/// Check that the right-click brought up a Context-Menu. ///' + '/// 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 + '/// Check that every position contains the expected Undermenu. ("Screen": Black/White. and "End Slideshow") ///' + '/// 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. + '/// 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 + + '/// 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" + + '/// Start the Slideshow. ///' + hTypeKeys "<F5>" + '/// Check that the right mousebutton brings up the Context-Menu. ///' + Kontext "DocumentPresentation" + DocumentPresentation.MouseDown 50, 50, 3 + DocumentPresentation.MouseUp 50, 50, 3 + sleep 2 + + '/// 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 + + '/// Check that one can step one step forward, even if there is no more than one slide. ///' + '/// Start the Slideshow. ///' + hTypeKeys "<F5>" + sleep (3) + '/// 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. + + '/// Select the 'one step forward' -entry ///' + hMenuSelectNr (1) + + '/// 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 + + '/// Close the Context-Menu ///' + hMenuSelectNr (0) + Kontext "DocumentPresentation" + + '/// 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 + + '/// 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 + + '/// 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 + + '/// Close the Context-Menu ///' + MenuSelect (0) + '/// Close the Presentation ///' + hTypeKeys "<ESCAPE>" + '/// Close Document ///' + Call hCloseDocument +endcase 'tSlideshowContextMenuMoreSlides + +'**************************************************************************************************** + +testcase tiMousePointerHides + qaerrorlog "Test not yet ready." + goto endsub + dim i as Integer + Printlog "- ContextMenu in Slideshow" + '/// New Impress Document ///' + Call hNewDocument + + '/// 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>" + + '/// Close Document ///' + Call hCloseDocument +endcase 'tSlideshowContextMenuMoreSlides + +'**************************************************************************************************** + diff --git a/testautomation/graphics/optional/includes/impress/i_stylist.inc b/testautomation/graphics/optional/includes/impress/i_stylist.inc new file mode 100755 index 000000000000..045732663436 --- /dev/null +++ b/testautomation/graphics/optional/includes/impress/i_stylist.inc @@ -0,0 +1,163 @@ +'encoding UTF-8 Do not remove or change this line! +'************************************************************************** +'* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. +'* +'* Copyright 2008 by Sun Microsystems, Inc. +'* +'* OpenOffice.org - a multi-platform office productivity suite +'* +'* $RCSfile: i_stylist.inc,v $ +'* +'* $Revision: 1.2 $ +'* +'* last change: $Author: rt $ $Date: 2008-08-28 11:44:45 $ +'* +'* This file is part of OpenOffice.org. +'* +'* OpenOffice.org is free software: you can redistribute it and/or modify +'* it under the terms of the GNU Lesser General Public License version 3 +'* only, as published by the Free Software Foundation. +'* +'* OpenOffice.org is distributed in the hope that it will be useful, +'* but WITHOUT ANY WARRANTY; without even the implied warranty of +'* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +'* GNU Lesser General Public License version 3 for more details +'* (a copy is included in the LICENSE file that accompanied this code). +'* +'* You should have received a copy of the GNU Lesser General Public License +'* version 3 along with OpenOffice.org. If not, see +'* <http://www.openoffice.org/license.html> +'* for a copy of the LGPLv3 License. +'* +'/************************************************************************ +'* +'* Owner : wolfram.garten@sun.com +'* +'* short description : +'* +'******************************************************************* +'* +' #1 tFormatStylistBackground +' #1 fGetSetPageBackground +'* +'\******************************************************************* + +testcase tFormatStylistBackground +'/// 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 + + '/// 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 + + '/// open application ///' + Call hNewDocument + + iColor = 10 + '/// change background color via stylist ///' + if (iColor <> fGetSetPageBackground (iColor,0)) then + warnlog "Stylist background was not changed as expected :-( "+iColor + endif + '/// 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 + + '/// save this in 3 formats: ///' + '///+ - StarImpress 5.0 ///' + '///+ - StarOffice 6.0 Presentation ///' + '///+ - 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 + + '/// close impress ///' + FileClose + sleep 1 + kontext ' active about information loss ? + if active.exists (5) then active.yes + sleep 10 + + '/// 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 + '/// 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 + '/// change background in stylist ///' + if (fGetSetPageBackground (iColor,0) <> iColor) then + warnlog "Stylist background was not changed as expected :-( "+iColor + endif + sleep 1 + '/// 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 + +'------------------------------------------------------------------------------ + 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 100755 index 000000000000..8a557a4b2197 --- /dev/null +++ b/testautomation/graphics/optional/includes/impress/i_us2_present.inc @@ -0,0 +1,345 @@ +'encoding UTF-8 Do not remove or change this line! +'************************************************************************** +'* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. +'* +'* Copyright 2008 by Sun Microsystems, Inc. +'* +'* OpenOffice.org - a multi-platform office productivity suite +'* +'* $RCSfile: i_us2_present.inc,v $ +'* +'* $Revision: 1.1 $ +'* +'* last change: $Author: jsi $ $Date: 2008-06-16 10:42:42 $ +'* +'* This file is part of OpenOffice.org. +'* +'* OpenOffice.org is free software: you can redistribute it and/or modify +'* it under the terms of the GNU Lesser General Public License version 3 +'* only, as published by the Free Software Foundation. +'* +'* OpenOffice.org is distributed in the hope that it will be useful, +'* but WITHOUT ANY WARRANTY; without even the implied warranty of +'* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +'* GNU Lesser General Public License version 3 for more details +'* (a copy is included in the LICENSE file that accompanied this code). +'* +'* You should have received a copy of the GNU Lesser General Public License +'* version 3 along with OpenOffice.org. If not, see +'* <http://www.openoffice.org/license.html> +'* for a copy of the LGPLv3 License. +'* +'/************************************************************************** +'* +'* Owner : wolfram.garten@sun.com +'* +'* short description : Impress User-Scenario: Beginner makes presentation. +'* +'*************************************************************************** +' #1 i_us2_pres1 +' #1 i_us2_pres2 +'\************************************************************************** + +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 "New - Wizard - Presentation." + FileAutopilotPresentation + printlog "Called File-Autopilot-Presentation." + printlog "Create from Template" + kontext "AutoPilotPraesentation1" + FromTemplate.Check + 'This part is for language-indepencancy + 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 'OpenOffice.org + 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 'StarOffice + 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" + hTypeKeys "What we will talk about" + gMouseClick 1,1 + Kontext "DocumentImpress" + DocumentImpress.UseMenu + hMenuSelectNr (4) + hMenuSelectNr (1) + sleep (1) + + kontext "Slides" + SlidesControl.TypeKeys "<HOME><RETURN>" + kontext "DocumentImpress" + DocumentImpress.TypeKeys "<TAB>Text we just wrote..." + printlog "Switch to the second slide." + kontext "Slides" + SlidesControl.TypeKeys "<DOWN><RETURN>" + SlidesControl.TypeKeys "<RETURN>" + kontext "DocumentImpress" + printlog "Insert three lines with text, all with different formatting." + call hTextrahmenErstellen ("First line with text",20,50,70,50) + call hTextrahmenErstellen ("Second line with text",20,60,70,60) + call hTextrahmenErstellen ("Third line with text",20,70,70,70) + printlog "Go down to the eleventh slide." + kontext "Slides" + SlidesControl.TypeKeys "<HOME>" + SlidesControl.TypeKeys "<PAGEDOWN>", 10 + SlidesControl.TypeKeys "<RETURN>" + 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) + + printlog "Insert new slide." + kontext "Slides" + printlog "get to the last slide." + SlidesControl.TypeKeys "<PAGEDOWN>", 15 + SlidesControl.TypeKeys "<RETURN>" + printlog "Delete the two fields the stylist has." + 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,20,70,30) + + printlog "Add a new slide." + InsertSlide + printlog " Inserted new slide." + kontext "DocumentImpress" + EditSelectAll + DocumentImpress.TypeKeys "<DELETE>" + printlog "Bla bla about everything..." + call hTextrahmenErstellen ("Bla bla about everything...",20,20,70,30) + + printlog "Add a new slide." + InsertSlide + printlog " Inserted new slide." + kontext "DocumentImpress" + EditSelectAll + DocumentImpress.TypeKeys "<DELETE>" + printlog "Write text: Q & A" + call hTextrahmenErstellen ("Q & A",20,20,70,30) + DocumentImpress.TypeKeys "<SHIFT HOME>" + sleep (1) + + printlog "Add a new slide." + InsertSlide + kontext "DocumentImpress" + EditSelectAll + DocumentImpress.TypeKeys "<DELETE>" + printlog "Thanks for listening, time for coffee... (ending)" + call hTextrahmenErstellen ("Class dismissed...",20,20,70,30) + + 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 100755 index 000000000000..26afac12e190 --- /dev/null +++ b/testautomation/graphics/optional/includes/impress/i_us_present.inc @@ -0,0 +1,745 @@ +'encoding UTF-8 Do not remove or change this line! +'************************************************************************** +'* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. +'* +'* Copyright 2008 by Sun Microsystems, Inc. +'* +'* OpenOffice.org - a multi-platform office productivity suite +'* +'* $RCSfile: i_us_present.inc,v $ +'* +'* $Revision: 1.1 $ +'* +'* last change: $Author: jsi $ $Date: 2008-06-16 10:42:42 $ +'* +'* This file is part of OpenOffice.org. +'* +'* OpenOffice.org is free software: you can redistribute it and/or modify +'* it under the terms of the GNU Lesser General Public License version 3 +'* only, as published by the Free Software Foundation. +'* +'* OpenOffice.org is distributed in the hope that it will be useful, +'* but WITHOUT ANY WARRANTY; without even the implied warranty of +'* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +'* GNU Lesser General Public License version 3 for more details +'* (a copy is included in the LICENSE file that accompanied this code). +'* +'* You should have received a copy of the GNU Lesser General Public License +'* version 3 along with OpenOffice.org. If not, see +'* <http://www.openoffice.org/license.html> +'* for a copy of the LGPLv3 License. +'* +'/************************************************************************** +'* +'* Owner : wolfram.garten@sun.com +'* +'* short description : Include-file for impress User-Scenario: Presentation. +'* +'*************************************************************************** +' #1 i_us_presentation1 +' #1 i_us_presentation2 +' #1 i_us_presentation3 +' #1 i_us_presentation4 +' #1 i_us_presentation5 +' #1 i_us_presentation6 +' #1 i_us_presentation7 +'\******************************************************************** + +testcase i_us_presentation1 + dim iPictures as integer + dim PresentationFile1 as string + PresentationFile1 = ConvertPath ((ConvertPath (gOfficePath + "user\work\PowerPes1.odp"))) + Call hNewDocument '/// New impress document ///' + WaitSlot (2000) + kontext "DocumentImpress" + '/// 1. ViewMaster: 2nd master - Background: picture (Gallery) ///' + '/// - 50% Transparency ///' + '/// - Mosaic 16px x 16px ///' + '/// - Close Master ///' + + '/// Add second Master-Page ///' + ViewMasterPage + kontext "Slides" + SlidesControl.OpenContextMenu(true) + sleep (2) + MenuSelect(MenuGetItemID(1)) 'New Master + sleep (1) + printlog " Inserted second Master-Slide" + + '/// - Background: 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>" + View.TypeKeys "<SHIFT F10>" 'OpenContextMenu(true) + sleep (2) + MenuSelect(MenuGetItemID(1)) 'Insert + sleep (2) + MenuSelect(MenuGetItemID(1)) 'Copy + sleep (2) + '/// 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 + else + warnlog " Doesn't seem like we copied anything from the Gallery... ?" + end if + kontext "GraphicObjectbar" + if GraphicObjectbar.Exists(5) = FALSE then + kontext "DocumentImpress" + ViewToolbarsPicture + end if + + '/// - 50% Transparency ///' + WaitSlot (2000) + kontext "GraphicObjectbar" ' the one with Transparency + Transparenz.SetText "50" + sleep (1) + + '/// - Mosaic 16px x 16px ///' + Filter.TearOff + sleep (1) + kontext "GraphicFilterBar" + Mosaic.Click + WaitSlot (2000) + kontext "Mosaic" + Width.SetText "16" + Height.SetText "16" + Mosaic.OK + + kontext "GraphicFilterBar" + GraphicFilterBar.Close + + ToolsGallery + WaitSlot (1000) + kontext "DocumentImpress" + gMouseClick 50,50 + sleep (1) +' DocumentImpress.TypeKeys "<TAB>", 6 + FormatPositionAndSize + WaitSlot (1000) + kontext + active.setPage(TabPositionAndSize) + kontext "TabPositionAndSize" + Width.SetText "800" + Height.SetText "600" + SizePosition.TypeKeys "<RIGHT><DOWN>" + TabPositionAndSize.OK + + '/// - Close Master ///' + ViewNormal + WaitSlot (1000) + + '/// Save Document ///' + call hFileSaveAsKill (PresentationFile1) + printlog "OK saved at ", PresentationFile1 + WaitSlot (1000) + + ActiveDeactivateCTLSupport (FALSE) + WaitSlot (2000) + '/// Close Document ///' + Call hCloseDocument +endcase + +'00oo...//==---...---...---...---....---...---...---...---...---...---...--..--.--.-.-.-.-....---.... + +testcase i_us_presentation2 + dim PresentationFile1 as string + dim PresentationFile2 as string + PresentationFile1 = ConvertPath ((ConvertPath (gOfficePath + "user\work\PowerPes1.odp"))) + PresentationFile2 = ConvertPath ((ConvertPath (gOfficePath + "user\work\PowerPes2.odp"))) + + if Dir(PresentationFile1) <> "" then 'if file exists... + hFileOpen (PresentationFile1) + WaitSlot (10000) + else + warnlog " This test is supposed to run after the previous testcase has been run. Notify the Automatic-tester." + '/// New impress document ///' + Call hNewDocument + WaitSlot (2000) + end if + + '/// New Slide ///' + kontext "slides" + SlidesControl.TypeKeys "<PAGEDOWN>" + SlidesControl.TypeKeys "<PAGEDOWN>" + SlidesControl.TypeKeys "<PAGEDOWN>" + + SlidesControl.TypeKeys "<SHIFT F10>" 'OpenContextMenu(true) + sleep (1) + MenuSelect(MenuGetItemID(1)) 'New Slide 'No 2 + printlog " Inserted second normal Slide" + + '/// 2. Layouts: Text. Bild: Gallery: Animation - Gif ///' + Kontext "Tasks" + LayoutsPreview.TypeKeys "<HOME>" 'to get to the very first position + LayoutsPreview.TypeKeys "<RIGHT>", 9 'to get to the right position + LayoutsPreview.TypeKeys "<RETURN>" + + Sleep (1) + ViewNormal + + '/// 3. Hide Slidepane (Oops! The user were too fast: accidently hide the pane) ///' + kontext "Slides" + SlidesControl.FadeOut + WaitSlot (1000) + + '/// 4. Restore Pane. ///' + SlidesControl.FadeIn + + printlog " Did the 'mistake' to FadeIn/Out the Slidepane" + + printlog "activating the input picture area" + kontext "DocumentImpress" + DocumentImpress.TypeKeys "<TAB>",2 + DocumentImpress.TypeKeys "<RETURN>" + sleep (1) + + '/// Graphics-Import-dialogue. Select "i_us_large.jpg" ///' + Kontext "GrafikEinfuegenDlg" + sleep (2) + Dateiname.SetText ConvertPath (gTesttoolPath + "graphics\required\input\i_us_large.jpg") + sleep (2) + Oeffnen.Click + WaitSlot (1000) + Kontext "DocumentImpress" + + '/// Deselect graphic ///' + DocumentImpress.MouseDoubleClick 90,90 + printlog " Inserted Graphic into the second Slide" + + '/// 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 a bit easier" + 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 than its predecessor!" + DocumentImpress.TypeKeys "<RETURN>" + DocumentImpress.TypeKeys "Sexy" + DocumentImpress.TypeKeys "<RETURN>" + DocumentImpress.TypeKeys "Energy-efficient" + DocumentImpress.TypeKeys "<ESCAPE><ESCAPE>" + + '/// Save Document ///' + call hFileSaveAsKill (PresentationFile2) + printlog "OK saved at ", PresentationFile1 + sleep (1) + + ActiveDeactivateCTLSupport (FALSE) + sleep (2) + '/// Close Document ///' + Call hCloseDocument +endcase 'i_us_presentation2 + +'00oo...//==---...---...---...---....---...---...---...---...---...---...--..--.--.-.-.-.-....---.... + +testcase i_us_presentation3 + dim PresentationFile2 as string + dim PresentationFile3 as string + PresentationFile2 = ConvertPath ((ConvertPath (gOfficePath + "user\work\PowerPes2.odp"))) + PresentationFile3 = ConvertPath ((ConvertPath (gOfficePath + "user\work\PowerPes3.odp"))) + + if Dir(PresentationFile2) <> "" then 'if file exists... + hFileOpen (PresentationFile2) + WaitSlot (10000) + else + warnlog " This test is supposed to run after the previous testcase has been run. Notify the Automatic-tester." + '/// New impress document ///' + Call hNewDocument + WaitSlot (2000) + end if + + '/// Insert New Slide ///' + kontext "slides" + SlidesControl.TypeKeys "<PAGEDOWN>" + SlidesControl.TypeKeys "<PAGEDOWN>" + SlidesControl.TypeKeys "<PAGEDOWN>" + + kontext "DocumentImpress" + InsertSlide 'No 3 + + '/// 5. Layout. Clip/Text ///' + 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>" + + sleep (1) + ViewNormal + + kontext "DocumentImpress" + Call gMouseClick 50,50 + DocumentImpress.TypeKeys "<TAB><RETURN>" + DocumentImpress.TypeKeys "A new form" + + '/// 6. (Fat picture) InsertPictureFromFile: (empty slide) (ev size-fit) ///' + InsertGraphicsFromFile '/// insert graphic file (i_us_large.jpg) ///' + WaitSlot (1000) + Kontext "GrafikEinfuegenDlg" + Dateiname.SetText ConvertPath (gTesttoolPath + "graphics\required\input\i_us_large.jpg") + sleep (2) + Oeffnen.Click + WaitSlot (2000) + Kontext "DocumentImpress" + + '/// The user corrects the picture ///' + DocumentImpress.MouseDown 50,50 + DocumentImpress.MouseUp 50,50 + DocumentImpress.TypeKeys "<DOWN>", 30 + + '/// Deselect graphic ///' + DocumentImpress.MouseDoubleClick 90,90 + + printlog " Wrote Text, Inserted Graphic, and moved it in the third Slide" + + '/// Save Document ///' + call hFileSaveAsKill (PresentationFile3) + printlog "OK saved at ", PresentationFile3 + sleep (1) + + ActiveDeactivateCTLSupport (FALSE) + sleep (2) + '/// Close Document ///' + Call hCloseDocument +endcase 'i_us_presentation3 + +'00oo...//==---...---...---...---....---...---...---...---...---...---...--..--.--.-.-.-.-....---.... + +testcase i_us_presentation4 + dim PresentationFile3 as string + dim PresentationFile4 as string + dim iAnimations as Integer + PresentationFile3 = ConvertPath ((ConvertPath (gOfficePath + "user\work\PowerPes3.odp"))) + PresentationFile4 = ConvertPath ((ConvertPath (gOfficePath + "user\work\PowerPes4.odp"))) + + if Dir(PresentationFile3) <> "" then 'if file exists... + hFileOpen (PresentationFile3) + WaitSlot (10000) + else + warnlog " This test is supposed to run after the previous testcase has been run. Notify the Automatic-tester." + '/// New impress document ///' + Call hNewDocument + WaitSlot (2000) + end if + + kontext "slides" + SlidesControl.TypeKeys "<PAGEDOWN>" + SlidesControl.TypeKeys "<PAGEDOWN>" + SlidesControl.TypeKeys "<PAGEDOWN>" + SlidesControl.TypeKeys "<PAGEDOWN>" + SlidesControl.TypeKeys "<PAGEDOWN>" + kontext "DocumentImpress" + + InsertSlide 'No 4 + + '/// - Background: 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 + + 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 + + kontext "Gallery" + 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 + + '/// Check that we really got a copy of the object ///' + kontext "DocumentImpress" + DocumentImpress.OpenContextMenu(true) + WaitSlot (1000) + MenuSelect 27353 + + Kontext "ExportierenDlg" + if ExportierenDlg.IsVisible(5) then + printlog " Gallery-object correctly copied into Slide." + ExportierenDlg.Close + else + warnlog " Doesn't seem like we copied anything from the Gallery... ?" + end if + kontext "DocumentImpress" + + DocumentImpress.TypeKeys "<UP>", 82 + DocumentImpress.TypeKeys "<LEFT>", 130 + + '/// Deselect graphic ///' + DocumentImpress.MouseDoubleClick 90,90 + + '/// Close the Gallery ///' + ToolsGallery + + '/// Change Text on slide ///' + DocumentImpress.TypeKeys "<TAB>" + DocumentImpress.TypeKeys "<RETURN>" + DocumentImpress.TypeKeys "The process starts to flourish" + DocumentImpress.TypeKeys "<ESCAPE><ESCAPE>" + gMouseClick 50,50 + + ActiveDeactivateCTLSupport (TRUE) + + CreateTextSetEffectAndAngle + DocumentImpress.TypeKeys "<DOWN>", 80 + DocumentImpress.TypeKeys "<LEFT>", 100 + gMouseClick 90,90 + + CreateTextSetEffectAndAngle + DocumentImpress.TypeKeys "<DOWN>", 80 + DocumentImpress.TypeKeys "<LEFT>", 75 + gMouseClick 90,90 + + CreateTextSetEffectAndAngle + DocumentImpress.TypeKeys "<DOWN>", 80 + DocumentImpress.TypeKeys "<LEFT>", 50 + gMouseClick 90,90 + + CreateTextSetEffectAndAngle + DocumentImpress.TypeKeys "<DOWN>", 80 + DocumentImpress.TypeKeys "<LEFT>", 25 + gMouseClick 90,90 + + CreateTextSetEffectAndAngle + DocumentImpress.TypeKeys "<DOWN>", 80 + DocumentImpress.TypeKeys "<RIGHT>", 25 + gMouseClick 90,90 + + CreateTextSetEffectAndAngle + DocumentImpress.TypeKeys "<DOWN>", 80 + DocumentImpress.TypeKeys "<RIGHT>", 50 + gMouseClick 90,90 + + CreateTextSetEffectAndAngle + DocumentImpress.TypeKeys "<DOWN>", 80 + DocumentImpress.TypeKeys "<RIGHT>", 75 + gMouseClick 90,90 + + CreateTextSetEffectAndAngle + DocumentImpress.TypeKeys "<DOWN>", 80 + DocumentImpress.TypeKeys "<RIGHT>", 100 + gMouseClick 90,90 + + printlog " Inserted fourth slide with Gallery-object." + + '/// Save Document ///' + call hFileSaveAsKill (PresentationFile4) + printlog "OK saved at ", PresentationFile4 + sleep (1) + + ActiveDeactivateCTLSupport (FALSE) + sleep (2) + '/// Close Document ///' + Call hCloseDocument +endcase 'i_us_presentation4 + +'00oo...//==---...---...---...---....---...---...---...---...---...---...--..--.--.-.-.-.-....---.... + +testcase i_us_presentation5 + dim PresentationFile4 as string + dim PresentationFile5 as string + PresentationFile4 = ConvertPath ((ConvertPath (gOfficePath + "user\work\PowerPes4.odp"))) + PresentationFile5 = ConvertPath ((ConvertPath (gOfficePath + "user\work\PowerPes5.odp"))) + + if Dir(PresentationFile4) <> "" then 'if file exists... + hFileOpen (PresentationFile4) + WaitSlot (10000) + else + warnlog " This test is supposed to run after the previous testcase has been run. Notify the Automatic-tester." + '/// New impress document ///' + Call hNewDocument + WaitSlot (2000) + end if + + kontext "slides" + SlidesControl.TypeKeys "<PAGEDOWN>" + SlidesControl.TypeKeys "<PAGEDOWN>" + SlidesControl.TypeKeys "<PAGEDOWN>" + SlidesControl.TypeKeys "<PAGEDOWN>" + SlidesControl.TypeKeys "<PAGEDOWN>" + SlidesControl.TypeKeys "<PAGEDOWN>" + SlidesControl.TypeKeys "<PAGEDOWN>" + + kontext "DocumentImpress" + '/// 8. New Slide. (Insert Menu) (Duplicate slide) ///' + InsertDuplicateSlide 'No 5 + 'Change the text in some way. (the user is making a joke with the audience) + gMouseClick 90,90 + DocumentImpress.TypeKeys "<TAB>" + DocumentImpress.TypeKeys "<RETURN>" + EditSelectAll 'DocumentImpress.TypeKeys "<MOD1 A>" + DocumentImpress.TypeKeys "And does it with strength..." + + printlog " Inserted fifth slide with audience-joke." + + '/// Save Document ///' + call hFileSaveAsKill (PresentationFile5) + printlog "OK saved at ", PresentationFile5 + sleep (1) + + ActiveDeactivateCTLSupport (FALSE) + sleep (2) + '/// Close Document///' + Call hCloseDocument +endcase 'i_us_presentation5 + +'00oo...//==---...---...---...---....---...---...---...---...---...---...--..--.--.-.-.-.-....---.... + +testcase i_us_presentation6 + dim PresentationFile5 as string + dim PresentationFile6 as string + PresentationFile5 = ConvertPath ((ConvertPath (gOfficePath + "user\work\PowerPes5.odp"))) + PresentationFile6 = ConvertPath ((ConvertPath (gOfficePath + "user\work\PowerPes6.odp"))) + + if Dir(PresentationFile5) <> "" then 'if file exists... + hFileOpen (PresentationFile5) + WaitSlot (10000) + else + warnlog " This test is supposed to run after the previous testcase has been run. Notify the Automatic-tester." + '/// New impress document ///' + Call hNewDocument + WaitSlot (2000) + end if + + kontext "slides" + SlidesControl.TypeKeys "<PAGEDOWN>" + SlidesControl.TypeKeys "<PAGEDOWN>" + SlidesControl.TypeKeys "<PAGEDOWN>" + SlidesControl.TypeKeys "<PAGEDOWN>" + SlidesControl.TypeKeys "<PAGEDOWN>" + SlidesControl.TypeKeys "<PAGEDOWN>" + + kontext "DocumentImpress" + '/// 9. Q&A Slide ///' + InsertSlide 'No 6 + WaitSlot (1000) + kontext "DocumentImpress" + DocumentImpress.TypeKeys "<TAB>" + DocumentImpress.TypeKeys "<RETURN>" + DocumentImpress.TypeKeys "Q&A" + WaitSlot (1000) + kontext "DocumentImpress" + DocumentImpress.TypeKeys "<SHIFT HOME>" + Kontext "TextObjectbar" + if TextObjectbar.Exists = FALSE then + ViewToolbarsTextFormatting + end if + WaitSlot (2000) + 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 + EditSelectAll + WaitSlot (1000) + DocumentImpress.TypeKeys "<DOWN>", 50 + kontext "DocumentImpress" + printlog " Inserted sixth slide with Q&A." + + '/// Save Document ///' + call hFileSaveAsKill (PresentationFile6) + printlog "OK saved at ", PresentationFile6 + sleep (1) + + ActiveDeactivateCTLSupport (FALSE) + WaitSlot (2000) + '/// Close Document ///' + Call hCloseDocument +endcase 'i_us_presentation6 + +'00oo...//==---...---...---...---....---...---...---...---...---...---...--..--.--.-.-.-.-....---.... + +testcase i_us_presentation7 + + dim sFilter as string + dim sFileName as string + dim PresentationFile6 as string + dim PresentationFile7 as string + PresentationFile6 = ConvertPath ((ConvertPath (gOfficePath + "user\work\PowerPes6.odp"))) + PresentationFile7 = ConvertPath ((ConvertPath (gOfficePath + "user\work\PowerPes7.odp"))) + sFileName = (ConvertPath (gOfficePath + "user\work\export-test.ppt")) + + if Dir(PresentationFile6) <> "" then 'if file exists... + hFileOpen (PresentationFile6) + WaitSlot (10000) + else + warnlog " This test is supposed to run after the previous testcase has been run. Notify the Automatic-tester." + '/// New impress document ///' + Call hNewDocument + WaitSlot (2000) + end if + + kontext "slides" + SlidesControl.TypeKeys "<PAGEDOWN>" + SlidesControl.TypeKeys "<PAGEDOWN>" + SlidesControl.TypeKeys "<PAGEDOWN>" + SlidesControl.TypeKeys "<PAGEDOWN>" + SlidesControl.TypeKeys "<PAGEDOWN>" + SlidesControl.TypeKeys "<PAGEDOWN>" + SlidesControl.TypeKeys "<PAGEDOWN>" + SlidesControl.TypeKeys "<PAGEDOWN>" + + kontext "DocumentImpress" + '/// 10. Ending Slide ///' + InsertSlide 'No 7 + DocumentImpress.TypeKeys "Ende" + 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 7 + sleep 1 + SlidesControl.TypeKeys "<PAGEUP>" + next i + SlidesControl.TypeKeys "<RETURN>" 'At the first slide + + hTypeKeys "<F5>" + kontext "DocumentPresentation" + sleep (3) + DocumentPresentation.TypeKeys "<PAGEDOWN>" + sleep (2) + DocumentPresentation.TypeKeys "<PAGEDOWN>" + sleep (2) + DocumentPresentation.TypeKeys "<PAGEDOWN>" + DocumentPresentation.TypeKeys "<PAGEDOWN>" + DocumentPresentation.TypeKeys "<PAGEDOWN>" + sleep (10) + DocumentPresentation.TypeKeys "<PAGEDOWN>" + DocumentPresentation.TypeKeys "<PAGEDOWN>" + sleep (2) + DocumentPresentation.TypeKeys "<PAGEDOWN>" + DocumentPresentation.TypeKeys "<PAGEDOWN>" + sleep (2) + DocumentPresentation.TypeKeys "<PAGEDOWN>" + DocumentPresentation.TypeKeys "<PAGEDOWN>" + sleep (2) + DocumentPresentation.TypeKeys "<ESCAPE>" + if DocumentPresentation.Exists(5) then + warnlog " Presentation should have ended. Please inform Automatic Tester." + end if + kontext "DocumentImpress" + + '/// Save Document ///' + call hFileSaveAsKill (PresentationFile7) + printlog "OK saved at ", PresentationFile7 + sleep (1) + + '/// Save as Powerpoint-file ///' + FileSaveAs + Kontext "SpeichernDlg" + Dateiname.SetText sFileName + Dateityp.Select 5 ' Powerpoint + printlog "Trying to save with filter: " + Dateityp.GetSelText + sFilter(5) + Speichern.Click + Kontext "Messagebox" + if Messagebox.Exists(2) then Messagebox.Yes + Kontext "AlienWarning" + if AlienWarning.Exists(2) then AlienWarning.OK + printlog "Saved as: " + sFileName + sleep (3) + + '/// Close the office and reload the file ///' + FileClose + Kontext "Messagebox" + if Messagebox.Exists(2) then Messagebox.Yes + sleep (3) + '/// Open the saved file ///' + hFileOpen sFileName + printlog "File opened: " + sFileName + sleep (3) + + '/// Close the office-session ///' + ActiveDeactivateCTLSupport (FALSE) + sleep (2) + '/// Close Document ///' + Call hCloseDocument +endcase 'i_us_presentation7 + +'00oo...//==---...---...---...---....---...---...---...---...---...---...--..--.--.-.-.-.-....---.... diff --git a/testautomation/graphics/optional/includes/impress/i_view.inc b/testautomation/graphics/optional/includes/impress/i_view.inc new file mode 100755 index 000000000000..fc494c794fff --- /dev/null +++ b/testautomation/graphics/optional/includes/impress/i_view.inc @@ -0,0 +1,324 @@ +'encoding UTF-8 Do not remove or change this line! +'************************************************************************** +'* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. +'* +'* Copyright 2008 by Sun Microsystems, Inc. +'* +'* OpenOffice.org - a multi-platform office productivity suite +'* +'* $RCSfile: i_view.inc,v $ +'* +'* $Revision: 1.1 $ +'* +'* last change: $Author: jsi $ $Date: 2008-06-16 10:42:42 $ +'* +'* This file is part of OpenOffice.org. +'* +'* OpenOffice.org is free software: you can redistribute it and/or modify +'* it under the terms of the GNU Lesser General Public License version 3 +'* only, as published by the Free Software Foundation. +'* +'* OpenOffice.org is distributed in the hope that it will be useful, +'* but WITHOUT ANY WARRANTY; without even the implied warranty of +'* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +'* GNU Lesser General Public License version 3 for more details +'* (a copy is included in the LICENSE file that accompanied this code). +'* +'* You should have received a copy of the GNU Lesser General Public License +'* version 3 along with OpenOffice.org. If not, see +'* <http://www.openoffice.org/license.html> +'* for a copy of the LGPLv3 License. +'* +'/************************************************************************ +'* +'* Owner : wolfram.garten@sun.com +'* +'* short description : +'* +'********************************************************************* +' #1 tAnsichtHintergrundNotizen +' #1 tViewWorkspaceHandoutView +' #1 tViewWorkspaceOutlineView +' #1 tViewWorkspaceDrawingView +' #1 tAnsichtEbene +'\******************************************************************** + +'Datei$ = ConvertPath (gOfficePath + "user\work\test.sxi") + +testcase tAnsichtHintergrundNotizen + Printlog "- View background notes" + Call hNewDocument '/// new document ///' + try + ViewNotes '/// view background notes ///' + sleep 3 + catch + Warnlog "View-Notes could not be accessed" + endcatch + ViewWorkspaceDrawingView + sleep 1 + Call hCloseDocument '/// close document ///' + sleep 1 +endcase + +'------------------------------------------------------------------------------- + +testcase tViewWorkspaceHandoutView + Printlog "- View background handout" + Call hNewDocument '/// new document ///' + sleep 2 + Kontext "DocumentImpress" + if NOT documentImpress.Exists then + hNewDocument + sleep 1 + end if + sleep 2 + Printlog " ViewWorkspaceHandoutView" + ViewWorkspaceHandoutView '/// view background handout ///' + 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" + ViewWorkspaceDrawingView '/// back to view background drawing ///' + Call hCloseDocument '/// close document ///' +endcase + +'------------------------------------------------------------------------------- + +testcase tViewWorkspaceOutlineView + qaerrorlog "Outcommenting tViewWorkspaceOutlineView due to unreability. - FHA" + goto endsub + dim sFile as string + dim i as integer + + '/// 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 + + '/// document used : "graphics\\required\\input\\outlinefromwriter.sxw" -> you get into writer ///' + sFile = ConvertPath (gTesttoolPath + "graphics\required\input\outlinefromwriter.sxw") + hDateiOeffnen (sFile) + sleep 10 + '///+ with 'File->Send->Outline to presentation' you get into impress ///' + FileSendOutlineToPresentation + sleep 10 + Printlog "'/// View->Workspace->Outline View ///'" + ViewWorkspaceOutlineView + sleep 1 + '/// go to the line with the 'I' (via 'search & replace' function) ///' + hTypeKeys "<STRG HOME>" + EditSelectAll + hFindeImDokument ("I") + + '///<b> expected level/style: 'Outline 8' </b>///' + '/// get last character from selected style in stylist (expect a number of the outline(heading level) ///' + fGetPresentationStyle ("8") + + '/// type keys [home] [tab] to go one level down ///' + Kontext "DocumentImpressOutlineView" + DocumentImpressOutlineView.TypeKeys "<Home><Tab>" + + '///<b> expected level/style: 'Outline 9' </b>///' + fGetPresentationStyle ("9") + + Kontext "DocumentImpressOutlineView" + '/// Edit - "Select All" to go select the whole text ///' + EditSelectAll + '/// 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") + '///<b> expected level/style: 'Outline 1' </b>///' + fGetPresentationStyle ("1") + + '/// type keys [shift]+[tab] to get the last line to the highest level, too ///' + Kontext "DocumentImpressOutlineView" + DocumentImpressOutlineView.TypeKeys ("<Shift Tab>", 1) + '///<b> expected level/style: 'Title' </b>///' + fGetPresentationStyle (0) + + Kontext "DocumentImpressOutlineView" + DocumentImpressOutlineView.TypeKeys ("<escape>", 1) + Printlog "'///<b> call 'Edit->Undo' nine times </b>///'" + for i = 1 to 9 + editundo + next i + +hPrepareSearchBUG + hFindeImDokument ("I") + '///<b> expected level/style: 'Outline 9' </b>///' + fGetPresentationStyle (9) + + Printlog "'///<b> call 'Edit->Redo' nine times </b>///'" + for i = 1 to 9 + editredo + next i + try + editredo + Warnlog "NOT OK :-(" + catch + Printlog "OK" + endcatch + +hPrepareSearchBUG + hTypeKeys "<STRG HOME>" + EditSelectAll + hFindeImDokument ("I") + '///<b> expected level/style: 'Title' </b>///' + fGetPresentationStyle (0) + + Printlog "'///<b> call 'Edit->Undo' nine times </b>///'" + for i = 1 to 9 + editundo + next i + +hPrepareSearchBUG + hTypeKeys "<STRG HOME>" + EditSelectAll + hFindeImDokument ("I") + '///<b> expected level/style: 'Outline 9' </b>///' + fGetPresentationStyle (9) + + '/// type keys [strg]+[A] ///' + Kontext "DocumentImpressOutlineView" + EditSelectAll + '/// 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 + + '/// 'Edit->Undo' ///' + editundo + '/// 'Edit->Redo' ///' + editredo + '/// 'Edit->Undo' ///' + editundo + + '/// type keys [strg]+[A] ///' + Kontext "DocumentImpressOutlineView" + EditSelectAll + '/// 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 + + '/// type keys [strg]+[V] ///' + Kontext "DocumentImpressOutlineView" + DocumentImpressOutlineView.TypeKeys "<mod1 V>" + + '/// 'Edit->Undo' ///' + editundo + '/// 'Edit->Redo' ///' + editredo + + '/// type keys [strg]+[End] ///' + Kontext "DocumentImpressOutlineView" + DocumentImpressOutlineView.TypeKeys "<mod1 End>" + '/// type keys [strg]+[V] ///' + DocumentImpressOutlineView.TypeKeys "<mod1 V>" + '/// type keys [strg]+[A] ///' + EditSelectAll + '/// 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 + + '/// type keys [strg]+[A] ///' + Kontext "DocumentImpressOutlineView" + EditSelectAll + try + editcopy + Printlog "OK" + catch + Warnlog "error 4711 TBO :-(" + endcatch + + '/// 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 + Call hCloseDocument '/// close document ///' + Call hCloseDocument '/// close document ///' +endcase + +'------------------------------------------------------------------------------- + +testcase tViewWorkspaceDrawingView + Printlog "- View/Background-drawing" + Call hNewDocument '/// new document ///' + sleep 2 + ViewDrawing '/// view background drawing ///' + try + hRechteckErstellen ( 20,20,40,40 ) '/// create rectangle ///' + sleep 1 + Printlog " - rectangle created" + catch + Warnlog " Rectangle could not be created" + endcatch + Call hCloseDocument '/// close document ///' +endcase + +'------------------------------------------------------------------------------- + +testcase tAnsichtEbene + printLog "- View/Layer" '/// view layer ///' + + + FileAutopilotPresentation '/// new document-autopilot ///' + Kontext "AutopilotPraesentation1" + sleep 5 + AutopilotPraesentation1.Ok + sleep 2 + sleep 2 + ViewSlide '/// back to view slide ///' + Sleep 2 + + Call hCloseDocument '/// close document ///' + +endcase + +'------------------------------------------------------------------------------- diff --git a/testautomation/graphics/optional/includes/impress/im_002_.inc b/testautomation/graphics/optional/includes/impress/im_002_.inc new file mode 100755 index 000000000000..464cc89e1788 --- /dev/null +++ b/testautomation/graphics/optional/includes/impress/im_002_.inc @@ -0,0 +1,58 @@ +'encoding UTF-8 Do not remove or change this line! +'************************************************************************** +'* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. +'* +'* Copyright 2008 by Sun Microsystems, Inc. +'* +'* OpenOffice.org - a multi-platform office productivity suite +'* +'* $RCSfile: im_002_.inc,v $ +'* +'* $Revision: 1.1 $ +'* +'* last change: $Author: jsi $ $Date: 2008-06-16 10:42:42 $ +'* +'* This file is part of OpenOffice.org. +'* +'* OpenOffice.org is free software: you can redistribute it and/or modify +'* it under the terms of the GNU Lesser General Public License version 3 +'* only, as published by the Free Software Foundation. +'* +'* OpenOffice.org is distributed in the hope that it will be useful, +'* but WITHOUT ANY WARRANTY; without even the implied warranty of +'* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +'* GNU Lesser General Public License version 3 for more details +'* (a copy is included in the LICENSE file that accompanied this code). +'* +'* You should have received a copy of the GNU Lesser General Public License +'* version 3 along with OpenOffice.org. If not, see +'* <http://www.openoffice.org/license.html> +'* for a copy of the LGPLv3 License. +'* +'/************************************************************************ +'* +'* Owner : wolfram.garten@sun.com +'* +'* short description : Impress Required Test Library (2) +'* +'\***************************************************************** + +testcase tiEditDeleteSlide +'/// open application ///' + Call hNewDocument +'/// Insert->Slide; press 'OK' ///' + InsertSlide + sleep 2 + hTypekeys "<Pagedown>" + sleep 2 +'/// Edit->Delete Slide ///' + try + EditDeleteSlide + catch + warnlog "Error when deleting slide" + endcatch + Call hCloseDocument +'/// close application ///' +endcase + + diff --git a/testautomation/graphics/optional/includes/impress/im_003_.inc b/testautomation/graphics/optional/includes/impress/im_003_.inc new file mode 100755 index 000000000000..71059752189e --- /dev/null +++ b/testautomation/graphics/optional/includes/impress/im_003_.inc @@ -0,0 +1,260 @@ +'encoding UTF-8 Do not remove or change this line! +'************************************************************************** +'* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. +'* +'* Copyright 2008 by Sun Microsystems, Inc. +'* +'* OpenOffice.org - a multi-platform office productivity suite +'* +'* $RCSfile: im_003_.inc,v $ +'* +'* $Revision: 1.1 $ +'* +'* last change: $Author: jsi $ $Date: 2008-06-16 10:42:42 $ +'* +'* This file is part of OpenOffice.org. +'* +'* OpenOffice.org is free software: you can redistribute it and/or modify +'* it under the terms of the GNU Lesser General Public License version 3 +'* only, as published by the Free Software Foundation. +'* +'* OpenOffice.org is distributed in the hope that it will be useful, +'* but WITHOUT ANY WARRANTY; without even the implied warranty of +'* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +'* GNU Lesser General Public License version 3 for more details +'* (a copy is included in the LICENSE file that accompanied this code). +'* +'* You should have received a copy of the GNU Lesser General Public License +'* version 3 along with OpenOffice.org. If not, see +'* <http://www.openoffice.org/license.html> +'* for a copy of the LGPLv3 License. +'* +'/************************************************************************ +'* +'* Owner : wolfram.garten@sun.com +'* +'* short description : Impress Resource Test: View Menu +'* +'*********************************************************************************** +' #1 tiViewPanes +' #1 tiViewMasterView +' #1 tiViewSlideMaster +' #1 tiViewToolbar_1 +'\********************************************************************************** + +testcase tiViewPanes + goto endsub 'TODO WG, tiViewPanes outcommented due to reconstruction of test + dim bState as boolean + '/// open application ///' + Call hCloseDocument + Call hNewDocument + sleep 1 + kontext "Tasks" + if (NOT Tasks.exists) then + warnlog "Tasks Panel not visible on opening application. Opening now." + ViewTaskPane + endif + kontext "Slides" + if (NOT Slides.exists) then + warnlog "Slides Panel not visible on opening application. Opening now." + ViewTaskSlide + endif + kontext "Tasks" + '/// Deactivate all but "masterpages" ///' + View.OpenMenu + hMenuSelectNr (2) + View.OpenMenu + hMenuSelectNr (3) + View.OpenMenu + hMenuSelectNr (4) + + sleep 1 + + Tasks.TypeKeys ("<RIGHT><RIGHT><RIGHT>") + + try + kontext "recentlyUsed" + printlog "Toggeling Master Pages now with <space>" + kontext "MasterPages" + MasterPages.typeKeys "<space>" + kontext "recentlyUsed" + if (recentlyUsed.IsVisible = FALSE) then 'exists = FALSE) then + warnlog "View-menu didn't work" + endif + kontext "Tasks" + sleep 1 + '/// View->Task Pane ///' + ViewTaskPane + sleep 1 + if (Tasks.exists) then + warnlog "View->Task Panel failed" + ViewTaskPane + endif + '/// View->Task Pane ///' + ViewTaskPane + sleep 1 + if (NOT Tasks.exists) then + warnlog "View->Task Panel failed" + ViewTaskPane + endif + catch + warnlog "View->Task Pane couldn't get executed" + endcatch + kontext "Slides" + try + ViewTaskSlide + if (Slides.exists) then + warnlog "View->Slide Panel failed." + ViewTaskSlide + endif + '/// View->Slide Pane ///' + ViewTaskSlide + sleep 1 + if (NOT Slides.exists) then + warnlog "View->Slide Panel failed." + ViewTaskSlide + endif + catch + warnlog "View->Slide Pane couldn't get executed" + endcatch + + '/// Reactivate all pages in the Task-panel ///' + kontext "Tasks" + View.OpenMenu + hMenuSelectNr (2) + View.OpenMenu + hMenuSelectNr (3) + View.OpenMenu + hMenuSelectNr (4) +endcase + +testcase tiViewMasterView +'/// open application ///' + Call hNewDocument +'/// View->Master View->Drawing View ///' + sleep 1 + ViewWorkspaceDrawingView +' Kontext "DocumentImpress" +' gMouseClick 70,70 + sleep 5 +'/// View->Master View->Outline View ///' + ViewWorkspaceOutlineView +' Kontext "DocumentImpressOutlineView" +' DocumentImpressOutlineView.MouseDown 70,70 +' DocumentImpressOutlineView.MouseUp 70,70 + sleep 1 +'/// View->Master View->Slides View ///' + ViewWorkspaceSlidesView +' Kontext "DocumentImpressSlideView" +' DocumentImpressSlideView.MouseDown 70,70 +' DocumentImpressSlideView.MouseUp 70,70 + sleep 1 +'/// View->Master View->Notes View ///' + ViewWorkspaceNotesView + sleep 1 +'/// View->Master View->Handout View ///' + ViewWorkspaceHandoutView + sleep 1 +'/// View->Master View->Drawing View ///' + ViewWorkspaceDrawingView +'/// close application ///' + sleep 1 + Call hCloseDocument +endcase + +testcase tiViewSlideMaster +'/// open application with : File->Autopilot->Presentation; OK; OK ///' +' Call hNewDocument + FileAutopilotPresentation ' to get a title :-) + sleep 2 + Kontext "AutopilotPraesentation1" + AutopilotPraesentation1.Ok + sleep 1 + Kontext "Seitenlayout" ' aka: Modify Slide + if Seitenlayout.exists(5) then + warnlog "Slidelayout has to vanish; moved to sidebar" + Seitenlayout.OK + endif + kontext "DocumentImpress" + sleep 1 +'/// View->Slide ///' + ViewSlide + Sleep 1 +'/// View->Master->Drawing ///' + ViewDrawing + Sleep 1 +'/// View->Slide ///' + ViewSlide + Sleep 1 +'/// View->Master->Title ///' + try + ViewTitle + Errorlog "View - Master - Title Slide Master should NOT be accessable" + catch + printlog "View - Master - Title Slide Master not accessable - good" + endcatch + Sleep 1 +'/// View->Slide ///' + ViewSlide + Sleep 1 +'/// View->Master->Handout ///' + ViewHandout + Sleep 1 +' ViewSlide + Sleep 1 +'/// View->Master->Notes ///' + ViewNotes + kontext "DocumentImpress" + Sleep 1 +'/// View->Slide ///' + ViewSlide + Sleep 1 +'/// close application ///' + Call hCloseDocument +endcase + +testcase tiViewToolbar_1 + Dim Zaehler as integer + Dim i as integer + +'/// open application ///' + Call hNewDocument + sleep 2 +'/// Insert->Graphic... : "global\input\graf_inp\desp.bmp" ///' + InsertGraphicsFromFile + sleep 2 + Kontext "GrafikEinfuegenDlg" + sleep 1 + Dateiname.SetText ConvertPath (gTesttoolPath + "global\input\graf_inp\desp.bmp") + sleep 1 + Oeffnen.Click + sleep 3 + Kontext "Messagebox" + if Messagebox.Exists then + Warnlog Messagebox.GetText + Messagebox.OK + end if + Kontext "DocumentImpress" +'/// select graphic ///' + EditSelectAll + sleep 2 + Kontext "GraphicObjectbar" + sleep 1 +'/// The Graphics Toolbar has to be visible now; If not -> ERROR ///' + if GraphicObjectbar.Exists Then + Printlog "- graphic object toolbar exists" + Zaehler=Grafikmodus.GetItemCount + for i = 1 to Zaehler + Printlog "- access all controls in the toolbar (" +i+"/"+Zaehler+")" + Grafikmodus.Select i + sleep 3 + next i + sleep 3 + else + Warnlog "- No graphic function toolbar visible" + end if +'/// close application ///' + Call hCloseDocument +endcase + + diff --git a/testautomation/graphics/optional/includes/impress/im_004_.inc b/testautomation/graphics/optional/includes/impress/im_004_.inc new file mode 100755 index 000000000000..4474e012b198 --- /dev/null +++ b/testautomation/graphics/optional/includes/impress/im_004_.inc @@ -0,0 +1,64 @@ +'encoding UTF-8 Do not remove or change this line! +'************************************************************************** +'* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. +'* +'* Copyright 2008 by Sun Microsystems, Inc. +'* +'* OpenOffice.org - a multi-platform office productivity suite +'* +'* $RCSfile: im_004_.inc,v $ +'* +'* $Revision: 1.1 $ +'* +'* last change: $Author: jsi $ $Date: 2008-06-16 10:42:42 $ +'* +'* This file is part of OpenOffice.org. +'* +'* OpenOffice.org is free software: you can redistribute it and/or modify +'* it under the terms of the GNU Lesser General Public License version 3 +'* only, as published by the Free Software Foundation. +'* +'* OpenOffice.org is distributed in the hope that it will be useful, +'* but WITHOUT ANY WARRANTY; without even the implied warranty of +'* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +'* GNU Lesser General Public License version 3 for more details +'* (a copy is included in the LICENSE file that accompanied this code). +'* +'* You should have received a copy of the GNU Lesser General Public License +'* version 3 along with OpenOffice.org. If not, see +'* <http://www.openoffice.org/license.html> +'* for a copy of the LGPLv3 License. +'* +'/************************************************************************ +'* +'* Owner : wolfram.garten@sun.com +'* +'* short description : Impress Required Test Library (4) +'* +'\***************************************************************** + +testcase tiInsertSlideExpandSummary + +'/// open application ///' + Call hNewDocument + ' presupposition +'/// View->Master View->Outline View ///' + ViewWorkspaceOutlineView + Sleep 1 + Kontext "DocumentImpressOutlineView" +'/// Type 2 rows ///' + DocumentImpressOutlineView.TypeKeys "Herbert<Return>Rudi" +'/// View->Master View->Drawing View ///' + ViewWorkspaceDrawingView + Sleep 1 + ' test menue entries +'/// Insert->Summery Slide ///' + InsertSummerySlide + Sleep 1 +'/// Insert->Expand Slide ///' + InsertExpandSlide + Sleep 2 +'/// close application ///' + Call hCloseDocument +endcase + diff --git a/testautomation/graphics/optional/includes/impress/im_005_.inc b/testautomation/graphics/optional/includes/impress/im_005_.inc new file mode 100755 index 000000000000..97ca3b91ad05 --- /dev/null +++ b/testautomation/graphics/optional/includes/impress/im_005_.inc @@ -0,0 +1,56 @@ +'encoding UTF-8 Do not remove or change this line! +'************************************************************************** +'* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. +'* +'* Copyright 2008 by Sun Microsystems, Inc. +'* +'* OpenOffice.org - a multi-platform office productivity suite +'* +'* $RCSfile: im_005_.inc,v $ +'* +'* $Revision: 1.1 $ +'* +'* last change: $Author: jsi $ $Date: 2008-06-16 10:42:42 $ +'* +'* This file is part of OpenOffice.org. +'* +'* OpenOffice.org is free software: you can redistribute it and/or modify +'* it under the terms of the GNU Lesser General Public License version 3 +'* only, as published by the Free Software Foundation. +'* +'* OpenOffice.org is distributed in the hope that it will be useful, +'* but WITHOUT ANY WARRANTY; without even the implied warranty of +'* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +'* GNU Lesser General Public License version 3 for more details +'* (a copy is included in the LICENSE file that accompanied this code). +'* +'* You should have received a copy of the GNU Lesser General Public License +'* version 3 along with OpenOffice.org. If not, see +'* <http://www.openoffice.org/license.html> +'* for a copy of the LGPLv3 License. +'* +'/************************************************************************ +'* +'* Owner : wolfram.garten@sun.com +'* +'* short description : Impress Required Test Library (5) +'* +'\***************************************************************** + +testcase tiFormatModifyLayout + +'/// open application ///' + Call hNewDocument +'/// Impress: Format->Modify Layout ///' +'/// Draw : kontext menu: Slide-> Modify Slide (always disabled :-( ?///' + FormatPage ' 27046 SID_MODIFYPAGE + Kontext "SeitenLayout" + DialogTest ( SeitenLayout ) + sleep 1 +'/// cancel dialog 'Page Setup' ///' + SeitenLayout.Cancel +'/// close application ///' + Call hCloseDocument +endcase + + diff --git a/testautomation/graphics/optional/includes/impress/im_007_.inc b/testautomation/graphics/optional/includes/impress/im_007_.inc new file mode 100755 index 000000000000..6669f413d36d --- /dev/null +++ b/testautomation/graphics/optional/includes/impress/im_007_.inc @@ -0,0 +1,699 @@ +'encoding UTF-8 Do not remove or change this line! +'************************************************************************** +'* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. +'* +'* Copyright 2008 by Sun Microsystems, Inc. +'* +'* OpenOffice.org - a multi-platform office productivity suite +'* +'* $RCSfile: im_007_.inc,v $ +'* +'* $Revision: 1.1 $ +'* +'* last change: $Author: jsi $ $Date: 2008-06-16 10:42:42 $ +'* +'* This file is part of OpenOffice.org. +'* +'* OpenOffice.org is free software: you can redistribute it and/or modify +'* it under the terms of the GNU Lesser General Public License version 3 +'* only, as published by the Free Software Foundation. +'* +'* OpenOffice.org is distributed in the hope that it will be useful, +'* but WITHOUT ANY WARRANTY; without even the implied warranty of +'* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +'* GNU Lesser General Public License version 3 for more details +'* (a copy is included in the LICENSE file that accompanied this code). +'* +'* You should have received a copy of the GNU Lesser General Public License +'* version 3 along with OpenOffice.org. If not, see +'* <http://www.openoffice.org/license.html> +'* for a copy of the LGPLv3 License. +'* +'/************************************************************************ +'* +'* Owner : wolfram.garten@sun.com +'* +'* short description : Impress Required Test Library (7) +'* +'\***************************************************************** + +' this menue is only in impress availble +testcase tSlideShowSlideShow +'/// open application ///' + Call hNewDocument +'/// Slide Show->Slide Show Settings ///' + SlideShowPresentationSettings + Kontext "Bildschirmpraesentation" + '/// check if 'type' 'default' is checked, it has to be the default !///' + if standard.IsChecked then + if LogoAnzeigen.isEnabled then + Warnlog "'Show Logo' is Enabled :-(" + endif + else + Warnlog "type 'default' is not checked as default :-(" + endif + '/// check checkbox 'Window' ///' + Fenster.Check + Printlog "- Presentation in window mode is checked" + '/// close dialog with OK 'Slide Show' ///' + Bildschirmpraesentation.Ok + sleep 3 +'/// Slide Show->Slide Show ///' + SlideShowSlideshow + Sleep 5 + try + Kontext "DocumentPresentation" + sleep 3 +'/// Press <Esc> to leave presentation mode ///' + DocumentPresentation.Typekeys ("<Escape>") + Sleep 3 + Kontext "DocumentImpress" + DocumentImpress.MouseDoubleClick ( 50, 50 ) + Sleep 3 + catch +' FileClose + warnlog "had to catch <the ball> :-( " +' Kontext "Messagebox" +' if Messagebox.Exists (5) Then Messagebox.No +' Kontext +' sleep (12) +' start sAppExe$ +' sleep (6) +' Kontext +' if Office.Exists(2) then Resetapplication +' Warnlog "Slide didn't end, application wasn't in document edit mode" + endcatch +'/// close application ///' + Call hCloseDocument +endcase + +testcase tSlideShowRehearseTimings + goto endsub + '/// open application ///' + Call hNewDocument + '/// Slide Show->Slide Show Settings ///' + SlideShowPresentationSettings + Kontext "Bildschirmpraesentation" + '/// check checkbox 'Window' ///' + Fenster.Check + '/// close dialog with OK 'Slide Show' ///' + Bildschirmpraesentation.Ok + '/// Slide Show->Rehearse Timings ///' + SlideShowRehearseTimings + sleep 2 + Kontext "DocumentPresentation" + '/// Press <Esc> to leave presentation mode ///' + if DocumentPresentation.Exists (5) then + DocumentPresentation.Typekeys ("<Escape>") + else + Warnlog "SlideShowRehearseTimings mode not accessible" + endif + Sleep 3 + if DocumentPresentation.Exists then ' the kontext hasnt to be available, else ERROR + DocumentPresentation.TypeKeys "<ESCAPE>" ' => I mustn't be here ever ! + Warnlog "- Slide show mode should have ended" + else + printlog "SlideShowRehearseTimings mode not accessible :-) " + end if + sleep 3 + try + Kontext "DocumentImpress" + DocumentImpress.MouseDoubleClick ( 50, 50 ) + + sleep 3 + catch + warnlog "Had to catch <the ball> :-( " + endcatch + sleep 3 +'/// close application ///' + Call hCloseDocument +endcase + +testcase tSlideShowSlideShowSettings +'/// open application ///' + Call hNewDocument + sleep 2 +'/// Slide Show->Slide Show Settings ///' + SlideShowPresentationSettings + Kontext "Bildschirmpraesentation" + call Dialogtest (Bildschirmpraesentation) + '/// check checkbox in section 'Range' - 'From: ///' + AbDia.Check + '/// select the 3rd item from the top from listbox 'From:' ///' + AbDiaName.GetSelText + '/// check checkbox 'All Slides' ///' + AlleDias.Check +'///' RangeCustomSlideShow ' gets tested in tSlideShowCustomSlideShow ///' +' IndividuellePraesentationName + '///<b> check checkbox 'window' </b>///' + Fenster.Check + '/// check checkbox 'default' ///' + Standard.Check + '///<b> check check box 'Auto' -> implies looping of slideshow in fullscreen mode </b>///' + Auto.Check + '/// set duration of pause to '00:00:05' ///' + Zeit.GetText + '/// check check box 'Show logo' ///' + LogoAnzeigen.Check + '///<b> check checkbox 'Change slides maually' </b>///' + DiawechselManuel.Check + '///<b> check checkbox 'Mouse pointer as pen' </b>///' + MauszeigerAlsStift.Check + '///<b> UNcheck checkbox 'Mouse pointer visible' </b>///' + MauszeigerSichtbar.UnCheck + '///<b> check checkbox 'Navigator visible' </b>///' + NavigatorSichtbar.Check + '///<b> UNcheck checkbox 'animations allowed' </b>///' + AnimationenZulassen.UnCheck + '///<b> UNcheck checkbox 'Change slides by clicking on background' </b>///' + DiaWechselAufHintergrund.UnCheck + '///<b> check checkbox 'Presentation always on top' </b>///' + PraesentationImmerImVordergrund.Check + '/// cancel dialog 'Slide Show' ///' + Bildschirmpraesentation.Cancel +'/// close application ///' + Call hCloseDocument +endcase + +testcase tSlideShowCustomSlideShow + '/// open application ///' + Call hNewDocument + sleep 2 + '/// Slide Show->Custom Slide Show ///' + SlideShowCustomSlideshow + Kontext "IndividuellePraesentation" + call Dialogtest (IndividuellePraesentation) + '/// click button 'New' ///' + Neu.Click + Kontext "IndividuellePraesentationDefinieren" + Call DialogTest (IndividuellePraesentationDefinieren) + '/// select the first entry in the list 'Existing Slides' ///' + SeitenPraesentation.Select 1 + '/// click button '>>' ///' + Hinzufuegen.Click + '/// close dialog 'Define Custom Slide Show' with OK ///' + IndividuellePraesentationDefinieren.OK + Kontext "IndividuellePraesentation" + '/// click button 'Copy' ///' + Kopieren.Click + '/// click button 'Delete' ///' + Loeschen.Click + '/// click button 'Edit' ///' + Bearbeiten.Click + Kontext "IndividuellePraesentationDefinieren" + '/// select 1st entry in the list 'Selected Slides' ///' + SelectedSlides.Select 1 + '/// click button '<<' ///' + Entfernen.Click + '/// close dialog 'Define Custom Slide Show' with Cancel ///' + IndividuellePraesentationDefinieren.Cancel + Kontext "IndividuellePraesentation" + '/// check checkbox 'Use Custom Slide Show' ///' + IndividuellePraesentationBenutzen.Check + sleep 1 + '///+ UNcheck checkbox 'Use Custom Slide Show' ///' + IndividuellePraesentationBenutzen.UnCheck + '/// click button 'Start...' ///' + Starten.Click + sleep 5 + '/// press key [space] 2 times ///' + kontext "DocumentPresentation" + DocumentPresentation.TypeKeys "<space>" + sleep 1 + DocumentPresentation.TypeKeys "<space>" + sleep 1 + '/// close dialog 'Custom Slide Shows' ///' +' IndividuellePraesentation.Close ' slide show ends dialog ! + '/// Slide Show->Slide Show Settings ///' + try + SlideShowPresentationSettings + catch + warnlog "Presentation did not end :-(" + DocumentPresentation.TypeKeys "<escape>" + endcatch + Kontext "Bildschirmpraesentation" + if Bildschirmpraesentation.exists (5) then + '/// check checkbox 'Custom Slide Show' ///' + RangeCustomSlideShow.Check + printlog "check: '" + IndividuellePraesentationName.GetSelText + "'" + '/// cancel dialog 'Slide Show' ///' + Bildschirmpraesentation.Cancel + else + warnlog "Dialog not open? SlideShowPresentationSettings" + endif + '/// Slide Show->Custom Slide Show ///' + SlideShowCustomSlideshow + Kontext "IndividuellePraesentation" + if (IndividuellePraesentation.exists (5)) then + '/// click button 'Delete' ///' + Loeschen.Click + '/// close dialog 'Custom Slide Shows' ///' + IndividuellePraesentation.Close + else + warnlog "Dialog not open? SlideShowCustomSlideshow" + endif + '/// close application ///' + Call hCloseDocument +endcase + +testcase tSlideShowSlideTransition + goto endsub '"#149943# - Outcommented tSlideShowSlideTransition due to bug." + dim i as integer + dim a as integer + dim iCount as integer + + '/// open application ///' + Call hNewDocument + '/// create rectangle ///' + Call hRechteckErstellen ( 10, 10, 20, 40 ) + sleep 1 + '/// Slide Show->Slide Transition ///' + SlideShowSlideTransition + sleep 2 + '/// The 'Slide Transition' in the right 'Tasks' Pane has to come up ///' + Kontext "Tasks" + '/// Select the second entry from teh Listbox 'Applay to selected slides' ///' + TransitionApplyToSelectedSlide.select (2) + sleep 5 ' takes some time, until it is run + Printlog "Count of effects : "+TransitionApplyToSelectedSlide.GetItemCount + Printlog "Count of Speeds : "+TransitionSpeed.GetItemCount + iCount = TransitionSound.GetItemCount + Printlog "Count of Sounds : " + iCount + + '/// One Entry of the Listbox 'Sound' is 'Other sound...', select it ///' + TransitionSound.typeKeys "<home>" + i = 0 + for a = 1 to iCount + TransitionSound.select (a) + kontext "OeffnenDlg" + if (OeffnenDlg.exists (5)) then + if (0=i) then + ' remember when dialog came up + i = a + OeffnenDlg.cancel + else + warnlog "File Open Dialog comes up a second time!" + OeffnenDlg.cancel + endif + endif + kontext "Tasks" + ' the Checkbox is disabled on teh first three entries: <No Sound>, <Stop previous sound>... + if (TransitionLoopUntilNextSound.isEnabled AND (a<4)) then + qaErrorLog "May be Language specific -> Evaluation of TBO; " + a + endif + next a + TransitionSound.select (i) + '/// The dialog 'Open' comes up///' + sleep 1 + kontext "OeffnenDlg" + if (OeffnenDlg.exists (5)) then + '/// Read all entries in Listbox 'File type' ///' + for i = 1 to Dateityp.getItemCount + printlog "" + i + ":" + Dateityp.getItemText(i) + next i + '/// cancel dialog 'Open' ///' + OeffnenDlg.cancel + else + warnlog "Impress:Tasks Pane:Slide Transition:Sound:Other sound... disdn't bring up teh File Open Dialog!" + endif + kontext "Tasks" + sleep (2) + '/// check checkbox 'Automatically after' ///' + TransitionAutomaticallyAfter.check + sleep (2) + '/// press key 'Page Up' in box ///' + TransitionAutomaticallyAfterTime.typeKeys "<PageUp>" + sleep 9 + '/// check the standard checkbox 'On mouse click' ///' + TransitionOnMouseClick.check + sleep (2) + '/// press button 'Apply to All Slides' ///' + TransitionApplyToAllSlides.click + sleep (2) + '/// press button 'Play' ///' + TransitionPlay.click + sleep 10 + '/// press button 'Slide Show' ///' + TransitionSlideShow.click + sleep 2 + kontext "DocumentPresentation" + if DocumentPresentation.exists (10) then + printlog "Presentation started :-)" + DocumentPresentation.typeKeys "<escape>" + else + warnlog "Impress:Tasks Pane:Slide Transition:Slide Show button doesn't start slideshow!" + endif + kontext "Tasks" + + '/// uncheck and check Checkbox 'Automatic Preview' ///' + '/// default is checked ///' + if (NOT TransitionAutomaticPreview.isChecked) then + warnlog "Impress:Tasks Pane:Slide Transition: Automatic preview has to be checked by default, wasn't!" + endif + sleep (2) + TransitionAutomaticPreview.unCheck + sleep (2) + TransitionAutomaticPreview.Check + '/// close application ///' + Call hCloseDocument +endcase + +testcase tSlideShowShowHideSlide +'/// open application ///' + Call hNewDocument +'/// create rectangle ///' + Call hRechteckErstellen ( 10, 10, 20, 40 ) +'/// View->Master View->Slides View ///' + ViewWorkspaceSlidesView + sleep 1 +'/// Slide Show->Hide Slide ///' + SlideShowHideSlide + sleep 1 +'/// Slide Show->Show Slide ///' + SlideShowShowSlide +'/// close application ///' + Call hCloseDocument +endcase + +testcase tSlideShowAnimation +'/// open application ///' + Call hNewDocument + sleep 1 +'/// create rectangle ///' + Call hRechteckErstellen ( 10, 10, 20, 40 ) + sleep 1 +'/// Insert ->Animated image ///' + Opl_SD_EffekteZulassen + Kontext "Animation" + sleep 1 +'/// click button 'Apply Object' ///' + BildAufnehmen.Click 'BildAufnehmen +'/// click button 'Create' ///' + Erstellen.Click + sleep 1 +'/// Select 1st entry from top in 'Alignment' ///' + Anpassung.Select 1 + sleep 1 +'/// click button 'Create' ///' + Erstellen.Click + sleep 1 +'/// click button 'Apply Objects Individually' ///' + AlleAufnehmen.Click + sleep 1 +'/// click button 'First Image' ///' + ErstesBild.Click + sleep 1 +'/// click button 'Last Image' ///' + LetztesBild.Click + sleep 1 +'/// click button 'BAckwards' ///' + Rueckwaerts.Click + sleep 1 +'/// click button 'Play' ///' + Abspielen.Click + sleep 1 +'/// click in Number field 'Image Number' Less - More ///' + AnzahlBilder.Less + sleep 1 + AnzahlBilder.More + sleep 1 +'/// check 'Bitmap Object' ///' + AnimationsgruppeBitmapobjekt.Check + sleep 1 +'/// Type '10' into the field 'Duration' ///' + AnzeigedauerProBild.SetText "10" +'/// click button 'Play' ///' + Abspielen.Click +'/// wait 5 seconds ///' + sleep 5 +'/// click button 'Stop' ///' + try + Stopp.Click + catch + warnlog "Stopbutton doesn't work" + endcatch + sleep 1 +'/// Select 1st entry from top in 'Loop Count' ///' + AnzahlDurchlaeufe.Select 1 + sleep 1 +'/// click button 'Delete Current Image' ///' + BildLoeschen.Click + sleep 1 +'/// check 'Group Object' ///' + AnimationsgruppeGruppenobjekt.Check + sleep 1 +'/// click button 'Delete All Images' ///' + AlleLoeschen.Click + kontext "Messagebox" +'/// there has to be a messagebox 'Really delete?' say YES!; else ERROR ///' + if Messagebox.exists (5) then + Messagebox.YES + else + warnlog "No one cares about my data :-( No one asked if all shall be deleted :-( " + endif + sleep 1 + kontext "Animation" +'/// close dialog 'Animation' ///' + Animation.Close +'/// close application ///' + Call hCloseDocument +endcase + +testcase tSlideShowCustomAnimation + dim bError as boolean + + '/// open application ///' + Call hNewDocument + '/// create textbox with text ///' + Call hTextrahmenErstellen ("Test text to test text effects", 10, 10, 20, 40 ) + '/// Slide Show->Custom Animation... ///' + SlideShowCustomAnimation + Kontext "Tasks" + '/// click button 'Add...' ///' + EffectAdd.click + '/// Dialog 'Custom Animation' comes up ///' + kontext + '/// Switch to TabPage: Entrance ///' + active.setPage(TabEntrance) + kontext "TabEntrance" + if TabEntrance.exists(5) then + DialogTest(TabEntrance) + '/// select in the listbox 'Effects' the second entry///' + Effects.select(2) + Speed.getItemCount + AutomaticPreview.unCheck + sleep 1 + AutomaticPreview.Check + kontext + '/// 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 + '/// 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 + '/// Switch to TabPage: Motion Paths ///' + active.setPage(TabMotionPaths) + kontext "TabMotionPaths" + if TabMotionPaths.exists(5) then + DialogTest(TabMotionPaths) + Effects.select(7) + else + bError = true + warnlog "Impress:Tasks Pane:Custom Animation:TabMotionPaths tabPage doesn't work." + endif + '/// 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 + '/// click button 'Change...' ///' + EffectChange.click + '/// Dialog 'Custom Animation' comes up ///' + kontext + '/// 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 + '/// CLick on button '...' (Options) ///' + EffectOptions.click + kontext "TabEffect" + if TabEffect.exists(5) then + dialogTest(TabEffect) + Sound.getItemCount + AfterAnimation.getItemCount + '/// 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 + '/// 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 + '/// Wait five seconds so the Playfunction has ended ///' + sleep 5 + EffectSlideShow.click + sleep 1 + kontext "DocumentPresentation" + if DocumentPresentation.exists (5) then + printlog "Presentation started :-)" + DocumentPresentation.typeKeys "<escape>" + else + warnlog "Impress:Tasks Pane:Custom Animation:Slide Show button doesn't start slideshow!" + endif + kontext "Tasks" + EffectAutomaticPreview.isChecked + '/// click button 'Remove' ///' + EffectRemove.click + endif + '/// close application ///' + Call hCloseDocument +endcase + +testcase tSlideShowInteraction +'/// open application ///' + Call hNewDocument + sleep 2 +'/// create rectangle ///' + Call hRechteckErstellen (10, 10, 20, 20) + sleep 3 +'/// Slide Show->Interaction ///' + SlideShowInteraction + Kontext "TabInteraktion" + Call DialogTest (TabInteraktion, 1) + '///+ Select 6th entry from top in 'Action at mouse click' : 'Go to page or object' ///' + AktionBeiMausklick.select 6 + Printlog AktionBeiMausklick.GetSelText + " chosen" + Call DialogTest (TabInteraktion, 2) + '///+ click button 'Find' ///' + sleep 1 + suchen.click + Kontext "TabInteraktion" +'/// Select 7th entry from top in 'Action at mouse click' : 'Go to document' ///' + sleep 1 + AktionBeiMausklick.select 7 + sleep 1 + Printlog AktionBeiMausklick.GetSelText + " chosen" + Kontext "TabInteraktion" + Call DialogTest (TabInteraktion, 3) + '///+ click button 'Browse...' ///' + Durchsuchen.click + sleep 1 + kontext "OeffnenDlg" + call Dialogtest (OeffnenDlg) + '///+ cancel dialog 'open' ///' + OeffnenDlg.cancel + Kontext "TabInteraktion" + sleep 1 +'/// Select 9th entry from top in 'Action at mouse click' : 'Play Sound' ///' + AktionBeiMausklick.select 8 + Printlog AktionBeiMausklick.GetSelText + " chosen" + Call DialogTest (TabInteraktion, 4) + '///+ click button 'Browse...' ///' + Durchsuchen.click + sleep 1 + Kontext "OeffnenDlg" + Call dialogTest (OeffnenDlg) + '///+ cancel dialog 'open' ///' + OeffnenDlg.Cancel + sleep 1 + Kontext "TabInteraktion" +'/// Select 8th entry from top in 'Action at mouse click' : 'Run Program' ///' + AktionBeiMausklick.select 9 + Printlog AktionBeiMausklick.GetSelText + " chosen" + Call DialogTest (TabInteraktion, 7) + Kontext "TabInteraktion" + '///+ click button 'Browse...' ///' + Durchsuchen.Click + sleep 1 + Kontext "OeffnenDlg" + Call dialogTest (OeffnenDlg) + '///+ cancel dialog 'open' ///' + OeffnenDlg.Cancel + sleep 1 +'/// Select 9th entry from top in 'Action at mouse click' : 'Run Macro' ///' + Kontext "TabInteraktion" + AktionBeiMausklick.select 10 + Printlog AktionBeiMausklick.GetSelText + " chosen" + sleep 3 + Call DialogTest (TabInteraktion, 6) + '///+ click button 'Browse...' ///' + Durchsuchen.Click + sleep 1 + Kontext "ScriptSelector" + sleep 1 + Call DialogTest ( ScriptSelector, 1) + sleep 1 + '///+ cancel dialog 'ScriptSelector' ///' + ScriptSelector.Cancel + sleep 1 +'/// Select 10th entry from top in 'Action at mouse click' : 'Exit Presentation' ///' + Kontext "TabInteraktion" + AktionBeiMausklick.select 11 + Printlog AktionBeiMausklick.GetSelText + " chosen" + Call DialogTest (TabInteraktion, 7) + Kontext "TabInteraktion" +'/// close dialog 'Interaction' ///' + TabInteraktion.Close + sleep 2 +'/// close application ///' + Call hCloseDocument +endcase + + + + + diff --git a/testautomation/graphics/optional/includes/impress/im_011_.inc b/testautomation/graphics/optional/includes/impress/im_011_.inc new file mode 100755 index 000000000000..b7a1bf39c711 --- /dev/null +++ b/testautomation/graphics/optional/includes/impress/im_011_.inc @@ -0,0 +1,179 @@ +'encoding UTF-8 Do not remove or change this line! +'************************************************************************** +'* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. +'* +'* Copyright 2008 by Sun Microsystems, Inc. +'* +'* OpenOffice.org - a multi-platform office productivity suite +'* +'* $RCSfile: im_011_.inc,v $ +'* +'* $Revision: 1.1 $ +'* +'* last change: $Author: jsi $ $Date: 2008-06-16 10:42:42 $ +'* +'* This file is part of OpenOffice.org. +'* +'* OpenOffice.org is free software: you can redistribute it and/or modify +'* it under the terms of the GNU Lesser General Public License version 3 +'* only, as published by the Free Software Foundation. +'* +'* OpenOffice.org is distributed in the hope that it will be useful, +'* but WITHOUT ANY WARRANTY; without even the implied warranty of +'* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +'* GNU Lesser General Public License version 3 for more details +'* (a copy is included in the LICENSE file that accompanied this code). +'* +'* You should have received a copy of the GNU Lesser General Public License +'* version 3 along with OpenOffice.org. If not, see +'* <http://www.openoffice.org/license.html> +'* for a copy of the LGPLv3 License. +'* +'/************************************************************************ +'* +'* Owner : wolfram.garten@sun.com +'* +'* short description : Impress Required Test Library (11) +'* +'\***************************************************************** + +testcase tiDiaLeiste + +' only in IMPRESS + dim sTemp as string + Dim i,x as integer + +'/// open application ///' + Call hNewDocument + sleep 1 +'/// Change options so the presentation won't start from the current, but the first slide. ///' + ToolsOptions + hToolsOptions ( "IMPRESS", "General" ) + MitAktuellerSeite.Uncheck + Kontext "ExtrasOptionenDlg" + ExtrasOptionenDlg.OK + +'/// insert a graphic: "global\input\graf_inp\desp.bmp") ///' + Printlog "- Insert graphic from file so there is something for the slide mode" + hGrafikEinfuegen ConvertPath (gTesttoolPath + "global\input\graf_inp\desp.bmp") + sleep 3 +'///+ Insert->Slide ///' + InsertSlide + sleep 2 + hTypekeys "<Pagedown>" + sleep 2 +'///+ insert a graphic: "global\input\graf_inp\desp.bmp") ///' + hGrafikeinfuegen ConvertPath (gTesttoolPath + "global\input\graf_inp\desp.bmp") + sleep 3 +'///+ View->Master View->Slides View ///' + ViewWorkspaceSlidesView + sleep 2 +'-------------------------------- Ueberblendeffekt ---------------------------------------- + Printlog "- Test blend effect" + Kontext "SlideViewObjectbar" ' CORRECT + sleep 5 + + if Ueberblendeffekt.GetItemCount <> 57 then warnlog "these are not 57: " + Ueberblendeffekt.GetItemCount +'/// select last entry 'Automatic (random)' in listbox 'Slide Effects' on object toolbar ///' + Ueberblendeffekt.Select (Ueberblendeffekt.GetItemCount) + Printlog " select last effect (random effect): " + Ueberblendeffekt.GetSelText + +' Printlog Geschwindigkeit.GetRT ' 341 listbox +' Printlog Diawechsel.GetRT ' 341 listbox +' Printlog Zeit.GetRT ' 353 spinfield +' Printlog DiasProReihe.GetRT ' 353 spinfield +' Printlog PraesentationMitZeitnahme.GetRT doesn't work, but behave as button +' Printlog DiaAnzeigen.GetRT doesn't work, but behave as button + +'-------------------------------- Geschwindigkeit ----------------------------------------- + Printlog "- Check different speed settings" + Kontext "SlideViewObjectbar" +'/// select every item in list 'Transition Speed' ///' + x = Geschwindigkeit.GetItemCount + for i = 1 to x + Geschwindigkeit.Select i + Printlog " changed to: " + Geschwindigkeit.GetSelText + next i +'-------------------------------- Diawechsel ---------------------------------------------- + Printlog "- Style of slide change" + Kontext "SlideViewObjectbar" +'/// select every item in list 'Auto Transition' ///' + x = Diawechsel.GetItemCount + for i = 1 to x + Diawechsel.Select i + Printlog " Changed to: " + Diawechsel.GetSelText + "; is time enabled ?: "+Zeit.IsEnabled + next i +'-------------------------------- Diawechsel Zeitintervall -------------------------------- + Printlog "- Zeitintervall testen" + Kontext "SlideViewObjectbar" +'/// select last entry 'Automatic' in listbox 'Auto Transition' ///' + Diawechsel.Select (Diawechsel.GetItemCount) ' automatic is usually the last one + sleep 1 + if (Zeit.IsEnabled = FALSE) Then Warnlog "- Time should be editable, if automatic is chosen" +'/// type "15" into the field 'Time' ///' + Zeit.SetText "15" + sleep 1 + Printlog " Time set to: " + Zeit.GetText +'-------------------------------- Praesentation mit Zeitnahme ------------------------------ + Printlog "- Presentation with rehearsed timings" + Kontext "SlideViewObjectbar" +'/// click button 'Rehearse Timings' ///' + PraesentationMitZeitnahme.Click + sleep 2 + Kontext "DocumentPresentation" + if DocumentPresentation.exists (5) then + sleep 5 +'/// wait some seconds and click with mouse ///' + DocumentPresentation.MouseDown 50,50 + DocumentPresentation.MouseUp 50,50 + sleep 2 +'/// wait some seconds and click with mouse ///' + DocumentPresentation.MouseDown 50,50 + DocumentPresentation.MouseUp 50,50 + sleep 3 + else + warnlog "Didn't switch into presentation mode :-(" + endif + Kontext "DocumentPresentation" + if DocumentPresentation.exists (5) then + warnlog "We are still in presentation mode :-( WHY!!!!???" + endif +'------------------------------- Dia anzeigen ja/nein -------------------------------------- + Printlog "- Show slide yes/no" + Kontext "SlideViewObjectbar" +'/// click button 'Show/Hide Slide' ///' + DiaAnzeigen.Click + sleep 3 +'/// click button 'Show/Hide Slide' ///' + DiaAnzeigen.Click +'------------------------------- Dias pro Reihe -------------------------------------------- + Printlog "- Presentation with rehearsed timings" + Kontext "SlideViewObjectbar" + sTemp = DiasProReihe.GetText +'/// press button 'less' in field 'Slides Per Row' ///' + DiasProReihe.Less + if sTemp = DiasProReihe.GetText then warnlog " nothing changed (less)" + sTemp = DiasProReihe.GetText +'/// press button 'more' in field 'Slides Per Row' ///' + DiasProReihe.more + if sTemp = DiasProReihe.GetText then warnlog " nothing changed (more 1)" + sTemp = DiasProReihe.GetText +'/// press button 'more' in field 'Slides Per Row' ///' + DiasProReihe.more + if sTemp = DiasProReihe.GetText then warnlog " nothing changed (more 2)" + kontext + if active.exists then + warnlog "active (1): '"+active.gettext+"'" + endif +'/// Restore default settings in ToolsOptions ///' + ToolsOptions + hToolsOptions ( "IMPRESS", "General" ) + MitAktuellerSeite.Check + Kontext "ExtrasOptionenDlg" + ExtrasOptionenDlg.OK +'/// close application ///' + Call hCloseDocument + sleep 2 +endcase + + diff --git a/testautomation/graphics/optional/includes/impress/options.inc b/testautomation/graphics/optional/includes/impress/options.inc new file mode 100755 index 000000000000..9addf3f45ed2 --- /dev/null +++ b/testautomation/graphics/optional/includes/impress/options.inc @@ -0,0 +1,276 @@ +'encoding UTF-8 Do not remove or change this line! +'************************************************************************** +'* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. +'* +'* Copyright 2008 by Sun Microsystems, Inc. +'* +'* OpenOffice.org - a multi-platform office productivity suite +'* +'* $RCSfile: options.inc,v $ +'* +'* $Revision: 1.1 $ +'* +'* last change: $Author: jsi $ $Date: 2008-06-16 10:42:42 $ +'* +'* This file is part of OpenOffice.org. +'* +'* OpenOffice.org is free software: you can redistribute it and/or modify +'* it under the terms of the GNU Lesser General Public License version 3 +'* only, as published by the Free Software Foundation. +'* +'* OpenOffice.org is distributed in the hope that it will be useful, +'* but WITHOUT ANY WARRANTY; without even the implied warranty of +'* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +'* GNU Lesser General Public License version 3 for more details +'* (a copy is included in the LICENSE file that accompanied this code). +'* +'* You should have received a copy of the GNU Lesser General Public License +'* version 3 along with OpenOffice.org. If not, see +'* <http://www.openoffice.org/license.html> +'* for a copy of the LGPLv3 License. +'* +'/************************************************************************ +'* +'* Owner : wolfram.garten@sun.com +'* +'* short description : 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" +' if (NOT bError) then + '/// 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" +' if play.isEnabled then +' try +' play.click +' catch +' warnlog Sound.GetSelText + " wasn't played correctly." +' endcatch +' endif + 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 + '/// 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 + '/// 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 + + + +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 + '/// 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 + '/// 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 |