1 'encoding UTF-8 Do not remove or change this line!
2 '**************************************************************************
3 '* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
5 '* Copyright 2008 by Sun Microsystems, Inc.
7 '* OpenOffice.org - a multi-platform office productivity suite
9 '* $RCSfile: im_007_.inc,v $
13 '* last change: $Author: jsi $ $Date: 2008-06-16 10:43:01 $
15 '* This file is part of OpenOffice.org.
17 '* OpenOffice.org is free software: you can redistribute it and/or modify
18 '* it under the terms of the GNU Lesser General Public License version 3
19 '* only, as published by the Free Software Foundation.
21 '* OpenOffice.org is distributed in the hope that it will be useful,
22 '* but WITHOUT ANY WARRANTY; without even the implied warranty of
23 '* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
24 '* GNU Lesser General Public License version 3 for more details
25 '* (a copy is included in the LICENSE file that accompanied this code).
27 '* You should have received a copy of the GNU Lesser General Public License
28 '* version 3 along with OpenOffice.org. If not, see
29 '* <http://www.openoffice.org/license.html>
30 '* for a copy of the LGPLv3 License.
32 '/************************************************************************
34 '* Owner : wolfram.garten@sun.com
36 '* short description : Impress Required Test Library (7)
38 '\*****************************************************************
40 testcase tSlideShowSlideShow
42 printlog "open application "
44 printlog "Slide Show->Slide Show Settings "
45 SlideShowPresentationSettings
46 Kontext "Bildschirmpraesentation"
47 printlog "check if 'type' 'default' is checked, it has to be the default !"
48 if standard.IsChecked then
49 if LogoAnzeigen.isEnabled then
50 Warnlog "'Show Logo' is Enabled :-("
53 Warnlog "type 'default' is not checked as default :-("
55 printlog "check checkbox 'Window' "
57 Printlog "- Presentation in window mode is checked"
58 printlog "close dialog with OK 'Slide Show' "
59 Bildschirmpraesentation.Ok
61 printlog "Slide Show->Slide Show "
65 Kontext "DocumentPresentation"
67 printlog "Press <Esc> to leave presentation mode "
68 DocumentPresentation.Typekeys ("<Escape>")
70 Kontext "DocumentImpress"
71 DocumentImpress.MouseDoubleClick ( 50, 50 )
75 warnlog "had to catch <the ball> :-( "
76 ' Kontext "Messagebox"
77 ' if Messagebox.Exists (5) Then Messagebox.No
83 ' if Office.Exists(2) then Resetapplication
84 ' Warnlog "Slide didn't end, application wasn't in document edit mode"
86 printlog "close application "
89 endcase 'tSlideShowSlideShow
90 '-------------------------------------------------------------------------------
91 testcase tSlideShowRehearseTimings
94 printlog "open application "
96 printlog "Slide Show->Slide Show Settings "
97 SlideShowPresentationSettings
98 Kontext "Bildschirmpraesentation"
99 printlog "check checkbox 'Window' "
101 printlog "close dialog with OK 'Slide Show' "
102 Bildschirmpraesentation.Ok
103 printlog "Slide Show->Rehearse Timings "
104 SlideShowRehearseTimings
106 Kontext "DocumentPresentation"
107 printlog "Press <Esc> to leave presentation mode "
108 if DocumentPresentation.Exists (5) then
109 DocumentPresentation.Typekeys ("<Escape>")
111 Warnlog "SlideShowRehearseTimings mode not accessible"
114 if DocumentPresentation.Exists then ' the kontext hasnt to be available, else ERROR
115 DocumentPresentation.TypeKeys "<ESCAPE>" ' => I mustn't be here ever !
116 Warnlog "- Slide show mode should have ended"
118 printlog "SlideShowRehearseTimings mode not accessible :-) "
122 Kontext "DocumentImpress"
123 DocumentImpress.MouseDoubleClick ( 50, 50 )
127 warnlog "Had to catch <the ball> :-( "
130 printlog "close application "
133 endcase 'tSlideShowRehearseTimings
134 '-------------------------------------------------------------------------------
135 testcase tSlideShowSlideShowSettings
137 printlog "open application "
140 printlog "Slide Show->Slide Show Settings "
141 SlideShowPresentationSettings
142 Kontext "Bildschirmpraesentation"
143 call Dialogtest (Bildschirmpraesentation)
144 printlog "check checkbox in section 'Range' - 'From: "
146 printlog "select the 3rd item from the top from listbox 'From:' "
148 printlog "check checkbox 'All Slides' "
150 '" RangeCustomSlideShow ' gets tested in tSlideShowCustomSlideShow "
151 ' IndividuellePraesentationName
152 printlog "check checkbox 'window'"
154 printlog "check checkbox 'default' "
156 printlog "check check box 'Auto' -> implies looping of slideshow in fullscreen mode"
158 printlog "set duration of pause to '00:00:05' "
160 printlog "check check box 'Show logo' "
162 printlog "check checkbox 'Change slides maually'"
163 DiawechselManuel.Check
164 printlog "check checkbox 'Mouse pointer as pen'"
165 MauszeigerAlsStift.Check
166 printlog "UNcheck checkbox 'Mouse pointer visible'"
167 MauszeigerSichtbar.UnCheck
168 printlog "check checkbox 'Navigator visible'"
169 NavigatorSichtbar.Check
170 printlog "UNcheck checkbox 'animations allowed'"
171 AnimationenZulassen.UnCheck
172 printlog "UNcheck checkbox 'Change slides by clicking on background'"
173 DiaWechselAufHintergrund.UnCheck
174 printlog "check checkbox 'Presentation always on top'"
175 PraesentationImmerImVordergrund.Check
176 printlog "cancel dialog 'Slide Show' "
177 Bildschirmpraesentation.Cancel
178 printlog "close application "
181 endcase 'tSlideShowSlideShowSettings
182 '-------------------------------------------------------------------------------
183 testcase tSlideShowCustomSlideShow
185 printlog "open application "
188 printlog "Slide Show->Custom Slide Show "
189 SlideShowCustomSlideshow
190 Kontext "IndividuellePraesentation"
191 call Dialogtest (IndividuellePraesentation)
192 printlog "click button 'New' "
194 Kontext "IndividuellePraesentationDefinieren"
195 Call DialogTest (IndividuellePraesentationDefinieren)
196 printlog "select the first entry in the list 'Existing Slides' "
197 SeitenPraesentation.Select 1
198 printlog "click button '>>' "
200 printlog "close dialog 'Define Custom Slide Show' with OK "
201 IndividuellePraesentationDefinieren.OK
202 Kontext "IndividuellePraesentation"
203 printlog "click button 'Copy' "
205 printlog "click button 'Delete' "
207 printlog "click button 'Edit' "
209 Kontext "IndividuellePraesentationDefinieren"
210 printlog "select 1st entry in the list 'Selected Slides' "
211 SelectedSlides.Select 1
212 printlog "click button '<<' "
214 printlog "close dialog 'Define Custom Slide Show' with Cancel "
215 IndividuellePraesentationDefinieren.Cancel
216 Kontext "IndividuellePraesentation"
217 printlog "check checkbox 'Use Custom Slide Show' "
218 IndividuellePraesentationBenutzen.Check
220 printlog "+ UNcheck checkbox 'Use Custom Slide Show' "
221 IndividuellePraesentationBenutzen.UnCheck
222 printlog "click button 'Start...' "
225 printlog "press key [space] 2 times "
226 kontext "DocumentPresentation"
227 DocumentPresentation.TypeKeys "<space>"
229 DocumentPresentation.TypeKeys "<space>"
231 printlog "close dialog 'Custom Slide Shows' "
232 ' IndividuellePraesentation.Close ' slide show ends dialog !
233 printlog "Slide Show->Slide Show Settings "
235 SlideShowPresentationSettings
237 warnlog "Presentation did not end :-("
238 DocumentPresentation.TypeKeys "<escape>"
240 Kontext "Bildschirmpraesentation"
241 if Bildschirmpraesentation.exists (5) then
242 printlog "check checkbox 'Custom Slide Show' "
243 RangeCustomSlideShow.Check
244 printlog "check: '" + IndividuellePraesentationName.GetSelText + "'"
245 printlog "cancel dialog 'Slide Show' "
246 Bildschirmpraesentation.Cancel
248 warnlog "Dialog not open? SlideShowPresentationSettings"
250 printlog "Slide Show->Custom Slide Show "
251 SlideShowCustomSlideshow
252 Kontext "IndividuellePraesentation"
253 if (IndividuellePraesentation.exists (5)) then
254 printlog "click button 'Delete' "
256 printlog "close dialog 'Custom Slide Shows' "
257 IndividuellePraesentation.Close
259 warnlog "Dialog not open? SlideShowCustomSlideshow"
261 printlog "close application "
264 endcase 'tSlideShowCustomSlideShow
265 '------------------------------------------------------------------------------
266 testcase tSlideShowSlideTransition
270 dim iCount as integer
272 printlog "open application "
274 printlog "create rectangle "
275 Call hRechteckErstellen ( 10, 10, 20, 40 )
277 printlog "Slide Show->Slide Transition "
278 SlideShowSlideTransition
280 printlog "The 'Slide Transition' in the right 'Tasks' Pane has to come up "
282 printlog "Select the second entry from teh Listbox 'Applay to selected slides' "
283 TransitionApplyToSelectedSlide.select (2)
284 sleep 5 ' takes some time, until it is run
285 Printlog "Count of effects : "+TransitionApplyToSelectedSlide.GetItemCount
286 Printlog "Count of Speeds : "+TransitionSpeed.GetItemCount
287 iCount = TransitionSound.GetItemCount
288 Printlog "Count of Sounds : " + iCount
290 printlog "One Entry of the Listbox 'Sound' is 'Other sound...', select it "
291 TransitionSound.typeKeys "<home>"
294 TransitionSound.select (a)
296 if (OeffnenDlg.exists (5)) then
298 ' remember when dialog came up
302 warnlog "File Open Dialog comes up a second time!"
307 ' the Checkbox is disabled on teh first three entries: <No Sound>, <Stop previous sound>...
308 if (TransitionLoopUntilNextSound.isEnabled AND (a<4)) then
309 qaErrorLog "May be Language specific -> Evaluation of TBO; " + a
312 TransitionSound.select (i)
313 printlog "The dialog 'Open' comes up"
316 if (OeffnenDlg.exists (5)) then
317 printlog "Read all entries in Listbox 'File type' "
318 for i = 1 to Dateityp.getItemCount
319 printlog "" + i + ":" + Dateityp.getItemText(i)
321 printlog "cancel dialog 'Open' "
324 warnlog "Impress:Tasks Pane:Slide Transition:Sound:Other sound... disdn't bring up teh File Open Dialog!"
328 printlog "check checkbox 'Automatically after' "
329 TransitionAutomaticallyAfter.check
331 printlog "press key 'Page Up' in box "
332 TransitionAutomaticallyAfterTime.typeKeys "<PageUp>"
334 printlog "check the standard checkbox 'On mouse click' "
335 TransitionOnMouseClick.check
337 printlog "press button 'Apply to All Slides' "
338 TransitionApplyToAllSlides.click
340 printlog "press button 'Play' "
343 printlog "press button 'Slide Show' "
344 TransitionSlideShow.click
346 kontext "DocumentPresentation"
347 if DocumentPresentation.exists (10) then
348 printlog "Presentation started :-)"
349 DocumentPresentation.typeKeys "<escape>"
351 warnlog "Impress:Tasks Pane:Slide Transition:Slide Show button doesn't start slideshow!"
355 printlog "uncheck and check Checkbox 'Automatic Preview' "
356 printlog "default is checked "
357 if (NOT TransitionAutomaticPreview.isChecked) then
358 warnlog "Impress:Tasks Pane:Slide Transition: Automatic preview has to be checked by default, wasn't!"
361 TransitionAutomaticPreview.unCheck
363 TransitionAutomaticPreview.Check
364 printlog "close application "
367 endcase 'tSlideShowSlideTransition
368 '-------------------------------------------------------------------------------
369 testcase tSlideShowShowHideSlide
371 printlog "open application "
373 printlog "create rectangle "
374 Call hRechteckErstellen ( 10, 10, 20, 40 )
375 printlog "View->Master View->Slides View "
376 ViewWorkspaceSlidesView
378 printlog "Slide Show->Hide Slide "
381 printlog "Slide Show->Show Slide "
383 printlog "close application "
387 testcase tSlideShowAnimation
388 printlog "open application "
391 printlog "create rectangle "
392 Call hRechteckErstellen ( 10, 10, 20, 40 )
394 printlog "Insert ->Animated image "
395 Opl_SD_EffekteZulassen
398 printlog "click button 'Apply Object' "
399 BildAufnehmen.Click 'BildAufnehmen
400 printlog "click button 'Create' "
403 printlog "Select 1st entry from top in 'Alignment' "
406 printlog "click button 'Create' "
409 printlog "click button 'Apply Objects Individually' "
412 printlog "click button 'First Image' "
415 printlog "click button 'Last Image' "
418 printlog "click button 'BAckwards' "
421 printlog "click button 'Play' "
424 printlog "click in Number field 'Image Number' Less - More "
429 printlog "check 'Bitmap Object' "
430 AnimationsgruppeBitmapobjekt.Check
432 printlog "Type '10' into the field 'Duration' "
433 AnzeigedauerProBild.SetText "10"
434 printlog "click button 'Play' "
436 printlog "wait 5 seconds "
438 printlog "click button 'Stop' "
442 warnlog "Stopbutton doesn't work"
445 printlog "Select 1st entry from top in 'Loop Count' "
446 AnzahlDurchlaeufe.Select 1
448 printlog "click button 'Delete Current Image' "
451 printlog "check 'Group Object' "
452 AnimationsgruppeGruppenobjekt.Check
454 printlog "click button 'Delete All Images' "
457 printlog "there has to be a messagebox 'Really delete?' say YES!; else ERROR "
458 if Messagebox.exists (5) then
461 warnlog "No one cares about my data :-( No one asked if all shall be deleted :-( "
465 printlog "close dialog 'Animation' "
467 printlog "close application "
470 endcase 'tSlideShowShowHideSlide
471 '-------------------------------------------------------------------------------
472 testcase tSlideShowCustomAnimation
474 dim bError as boolean
476 printlog "open application"
478 printlog "create textbox with text"
479 Call hTextrahmenErstellen ("Test text to test text effects", 10, 10, 20, 40 )
480 printlog "Slide Show->Custom Animation..."
481 SlideShowCustomAnimation
483 printlog "click button 'Add...'printlog "
485 printlog "Dialog 'Custom Animation' comes up"
487 printlog "Switch to TabPage: Entrance"
488 active.setPage(TabEntrance)
489 kontext "TabEntrance"
490 if TabEntrance.exists(5) then
491 DialogTest(TabEntrance)
492 printlog "select in the listbox 'Effects' the second entry"
495 AutomaticPreview.unCheck
497 AutomaticPreview.Check
500 printlog "Switch to TabPage: Emphasis"
501 active.setPage(TabEmphasis)
502 kontext "TabEmphasis"
503 if TabEmphasis.exists(5) then
504 DialogTest(TabEmphasis)
507 warnlog "Impress:Tasks Pane:Custom Animation:TabEmphasis tabPage doesn't work."
511 printlog "Switch to TabPage: Exit"
512 active.setPage(TabExit)
514 if TabExit.exists(5) then
518 warnlog "Impress:Tasks Pane:Custom Animation:TabExit tabPage doesn't work."
522 printlog "Switch to TabPage: Motion Paths"
523 active.setPage(TabMotionPaths)
524 kontext "TabMotionPaths"
525 if TabMotionPaths.exists(5) then
526 DialogTest(TabMotionPaths)
530 warnlog "Impress:Tasks Pane:Custom Animation:TabMotionPaths tabPage doesn't work."
533 '-----------------------------------------------------------------------
534 'printlog "Switch to tabpage: Misc Effects"
535 'active.setPage(TabMiscEffects)
536 'kontext "TabMiscEffects"
537 'if TabMiscEffects.exists(5) then
538 ' DialogTest(TabMiscEffects)
541 ' warnlog "Impress:TaskPane:CustomAnimation:TabMiscEffects tabPage does not work."
544 '-----------------------------------------------------------------------
545 printlog "Close dialog 'Custom Animation' with 'OK'"
550 warnlog "Impress:Tasks Pane:Custom Animation:Add... button didn't work."
555 printlog "click button 'Change...'"
557 printlog "Dialog 'Custom Animation' comes up"
559 printlog "Switch to TabPage: Entrance"
560 active.setPage(TabEntrance)
561 kontext "TabEntrance"
562 if (NOT TabEntrance.exists(5)) then
563 warnlog "Impress:Tasks Pane:Custom Animation:Change... button didn't work."
567 EffectStart.getItemCount
568 if EffectProperty.isEnabled then
569 EffectProperty.getItemCount
571 printlog "Click on button '...' (Options)"
574 if TabEffect.exists(5) then
575 dialogTest(TabEffect)
577 AfterAnimation.getItemCount
578 printlog "switch to TabPage 'Timing'"
580 active.setPage TabTiming
582 if TabTiming.exists(5) then
583 dialogTest(TabTiming)
584 TimingStart.getItemCount
589 TriggerAnimate.isChecked
590 TriggerStart.isChecked
593 warnlog "Impress:Tasks Pane:Custom Animation:Effect Options: Timing TabPage didn't work."
595 printlog "switch to TabPage 'Timing'"
597 active.setPage TabTextAnimation
598 kontext "TabTextAnimation"
599 if TabTextAnimation.exists(5) then
600 dialogTest(TabTextAnimation)
601 GroupText.getItemCount
602 AnimateAttachedShape.isChecked
603 TabTextAnimation.cancel
605 warnlog "Impress:Tasks Pane:Custom Animation:Effect Options: TextAnimation TabPage didn't work."
608 warnlog "Impress:Tasks Pane:Custom Animation:... button didn't work."
611 EffectSpeed.getItemCount
612 EffectList.getItemCount
614 printlog "Wait five seconds so the Playfunction has ended "
616 EffectSlideShow.click
618 kontext "DocumentPresentation"
619 if DocumentPresentation.exists (5) then
620 printlog "Presentation started :-)"
621 DocumentPresentation.typeKeys "<escape>"
623 warnlog "Impress:Tasks Pane:Custom Animation:Slide Show button doesn't start slideshow!"
626 EffectAutomaticPreview.isChecked
627 printlog "click button 'Remove'"
630 printlog "close application"
633 endcase 'tSlideShowCustomAnimation
634 '-------------------------------------------------------------------------------
635 testcase tSlideShowInteraction
637 printlog "open application "
640 printlog "create rectangle "
641 Call hRechteckErstellen (10, 10, 20, 20)
643 printlog "Slide Show->Interaction "
645 Kontext "TabInteraktion"
646 Call DialogTest (TabInteraktion, 1)
647 printlog "+ Select 6th entry from top in 'Action at mouse click' : 'Go to page or object' "
648 AktionBeiMausklick.select 6
649 Printlog AktionBeiMausklick.GetSelText + " chosen"
650 Call DialogTest (TabInteraktion, 2)
651 printlog "+ click button 'Find' "
654 Kontext "TabInteraktion"
655 printlog "Select 7th entry from top in 'Action at mouse click' : 'Go to document' "
657 AktionBeiMausklick.select 7
659 Printlog AktionBeiMausklick.GetSelText + " chosen"
660 Kontext "TabInteraktion"
661 Call DialogTest (TabInteraktion, 3)
662 printlog "+ click button 'Browse...' "
666 call Dialogtest (OeffnenDlg)
667 printlog "+ cancel dialog 'open' "
669 Kontext "TabInteraktion"
671 printlog "Select 9th entry from top in 'Action at mouse click' : 'Play Sound' "
672 AktionBeiMausklick.select 8
673 Printlog AktionBeiMausklick.GetSelText + " chosen"
674 Call DialogTest (TabInteraktion, 4)
675 printlog "+ click button 'Browse...' "
679 Call dialogTest (OeffnenDlg)
680 printlog "cancel dialog 'open' "
683 Kontext "TabInteraktion"
684 printlog "Select 8th entry from top in 'Action at mouse click' : 'Run Program' "
685 AktionBeiMausklick.select 9
686 Printlog AktionBeiMausklick.GetSelText + " chosen"
687 Call DialogTest (TabInteraktion, 7)
688 Kontext "TabInteraktion"
689 printlog "+ click button 'Browse...' "
693 Call dialogTest (OeffnenDlg)
694 printlog "+ cancel dialog 'open' "
697 printlog "Select 9th entry from top in 'Action at mouse click' : 'Run Macro' "
698 Kontext "TabInteraktion"
699 AktionBeiMausklick.select 10
700 Printlog AktionBeiMausklick.GetSelText + " chosen"
702 Call DialogTest (TabInteraktion, 6)
703 printlog "+ click button 'Browse...' "
706 Kontext "ScriptSelector"
708 Call DialogTest ( ScriptSelector, 1)
710 printlog "+ cancel dialog 'ScriptSelector' "
711 ScriptSelector.Cancel
713 printlog "Select 10th entry from top in 'Action at mouse click' : 'Exit Presentation' "
714 Kontext "TabInteraktion"
715 AktionBeiMausklick.select 11
716 Printlog AktionBeiMausklick.GetSelText + " chosen"
717 Call DialogTest (TabInteraktion, 7)
718 Kontext "TabInteraktion"
719 printlog "close dialog 'Interaction' "
722 printlog "close application "
725 endcase 'tSlideShowInteraction