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:42:42 $
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 ' this menue is only in impress availble
41 testcase tSlideShowSlideShow
42 '/// open application ///'
44 '/// Slide Show->Slide Show Settings ///'
45 SlideShowPresentationSettings
46 Kontext "Bildschirmpraesentation"
47 '/// 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 '/// check checkbox 'Window' ///'
57 Printlog "- Presentation in window mode is checked"
58 '/// close dialog with OK 'Slide Show' ///'
59 Bildschirmpraesentation.Ok
61 '/// Slide Show->Slide Show ///'
65 Kontext "DocumentPresentation"
67 '/// 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 '/// close application ///'
90 testcase tSlideShowRehearseTimings
92 '/// open application ///'
94 '/// Slide Show->Slide Show Settings ///'
95 SlideShowPresentationSettings
96 Kontext "Bildschirmpraesentation"
97 '/// check checkbox 'Window' ///'
99 '/// close dialog with OK 'Slide Show' ///'
100 Bildschirmpraesentation.Ok
101 '/// Slide Show->Rehearse Timings ///'
102 SlideShowRehearseTimings
104 Kontext "DocumentPresentation"
105 '/// Press <Esc> to leave presentation mode ///'
106 if DocumentPresentation.Exists (5) then
107 DocumentPresentation.Typekeys ("<Escape>")
109 Warnlog "SlideShowRehearseTimings mode not accessible"
112 if DocumentPresentation.Exists then ' the kontext hasnt to be available, else ERROR
113 DocumentPresentation.TypeKeys "<ESCAPE>" ' => I mustn't be here ever !
114 Warnlog "- Slide show mode should have ended"
116 printlog "SlideShowRehearseTimings mode not accessible :-) "
120 Kontext "DocumentImpress"
121 DocumentImpress.MouseDoubleClick ( 50, 50 )
125 warnlog "Had to catch <the ball> :-( "
128 '/// close application ///'
132 testcase tSlideShowSlideShowSettings
133 '/// open application ///'
136 '/// Slide Show->Slide Show Settings ///'
137 SlideShowPresentationSettings
138 Kontext "Bildschirmpraesentation"
139 call Dialogtest (Bildschirmpraesentation)
140 '/// check checkbox in section 'Range' - 'From: ///'
142 '/// select the 3rd item from the top from listbox 'From:' ///'
144 '/// check checkbox 'All Slides' ///'
146 '///' RangeCustomSlideShow ' gets tested in tSlideShowCustomSlideShow ///'
147 ' IndividuellePraesentationName
148 '///<b> check checkbox 'window' </b>///'
150 '/// check checkbox 'default' ///'
152 '///<b> check check box 'Auto' -> implies looping of slideshow in fullscreen mode </b>///'
154 '/// set duration of pause to '00:00:05' ///'
156 '/// check check box 'Show logo' ///'
158 '///<b> check checkbox 'Change slides maually' </b>///'
159 DiawechselManuel.Check
160 '///<b> check checkbox 'Mouse pointer as pen' </b>///'
161 MauszeigerAlsStift.Check
162 '///<b> UNcheck checkbox 'Mouse pointer visible' </b>///'
163 MauszeigerSichtbar.UnCheck
164 '///<b> check checkbox 'Navigator visible' </b>///'
165 NavigatorSichtbar.Check
166 '///<b> UNcheck checkbox 'animations allowed' </b>///'
167 AnimationenZulassen.UnCheck
168 '///<b> UNcheck checkbox 'Change slides by clicking on background' </b>///'
169 DiaWechselAufHintergrund.UnCheck
170 '///<b> check checkbox 'Presentation always on top' </b>///'
171 PraesentationImmerImVordergrund.Check
172 '/// cancel dialog 'Slide Show' ///'
173 Bildschirmpraesentation.Cancel
174 '/// close application ///'
178 testcase tSlideShowCustomSlideShow
179 '/// open application ///'
182 '/// Slide Show->Custom Slide Show ///'
183 SlideShowCustomSlideshow
184 Kontext "IndividuellePraesentation"
185 call Dialogtest (IndividuellePraesentation)
186 '/// click button 'New' ///'
188 Kontext "IndividuellePraesentationDefinieren"
189 Call DialogTest (IndividuellePraesentationDefinieren)
190 '/// select the first entry in the list 'Existing Slides' ///'
191 SeitenPraesentation.Select 1
192 '/// click button '>>' ///'
194 '/// close dialog 'Define Custom Slide Show' with OK ///'
195 IndividuellePraesentationDefinieren.OK
196 Kontext "IndividuellePraesentation"
197 '/// click button 'Copy' ///'
199 '/// click button 'Delete' ///'
201 '/// click button 'Edit' ///'
203 Kontext "IndividuellePraesentationDefinieren"
204 '/// select 1st entry in the list 'Selected Slides' ///'
205 SelectedSlides.Select 1
206 '/// click button '<<' ///'
208 '/// close dialog 'Define Custom Slide Show' with Cancel ///'
209 IndividuellePraesentationDefinieren.Cancel
210 Kontext "IndividuellePraesentation"
211 '/// check checkbox 'Use Custom Slide Show' ///'
212 IndividuellePraesentationBenutzen.Check
214 '///+ UNcheck checkbox 'Use Custom Slide Show' ///'
215 IndividuellePraesentationBenutzen.UnCheck
216 '/// click button 'Start...' ///'
219 '/// press key [space] 2 times ///'
220 kontext "DocumentPresentation"
221 DocumentPresentation.TypeKeys "<space>"
223 DocumentPresentation.TypeKeys "<space>"
225 '/// close dialog 'Custom Slide Shows' ///'
226 ' IndividuellePraesentation.Close ' slide show ends dialog !
227 '/// Slide Show->Slide Show Settings ///'
229 SlideShowPresentationSettings
231 warnlog "Presentation did not end :-("
232 DocumentPresentation.TypeKeys "<escape>"
234 Kontext "Bildschirmpraesentation"
235 if Bildschirmpraesentation.exists (5) then
236 '/// check checkbox 'Custom Slide Show' ///'
237 RangeCustomSlideShow.Check
238 printlog "check: '" + IndividuellePraesentationName.GetSelText + "'"
239 '/// cancel dialog 'Slide Show' ///'
240 Bildschirmpraesentation.Cancel
242 warnlog "Dialog not open? SlideShowPresentationSettings"
244 '/// Slide Show->Custom Slide Show ///'
245 SlideShowCustomSlideshow
246 Kontext "IndividuellePraesentation"
247 if (IndividuellePraesentation.exists (5)) then
248 '/// click button 'Delete' ///'
250 '/// close dialog 'Custom Slide Shows' ///'
251 IndividuellePraesentation.Close
253 warnlog "Dialog not open? SlideShowCustomSlideshow"
255 '/// close application ///'
259 testcase tSlideShowSlideTransition
260 goto endsub '"#149943# - Outcommented tSlideShowSlideTransition due to bug."
263 dim iCount as integer
265 '/// open application ///'
267 '/// create rectangle ///'
268 Call hRechteckErstellen ( 10, 10, 20, 40 )
270 '/// Slide Show->Slide Transition ///'
271 SlideShowSlideTransition
273 '/// The 'Slide Transition' in the right 'Tasks' Pane has to come up ///'
275 '/// Select the second entry from teh Listbox 'Applay to selected slides' ///'
276 TransitionApplyToSelectedSlide.select (2)
277 sleep 5 ' takes some time, until it is run
278 Printlog "Count of effects : "+TransitionApplyToSelectedSlide.GetItemCount
279 Printlog "Count of Speeds : "+TransitionSpeed.GetItemCount
280 iCount = TransitionSound.GetItemCount
281 Printlog "Count of Sounds : " + iCount
283 '/// One Entry of the Listbox 'Sound' is 'Other sound...', select it ///'
284 TransitionSound.typeKeys "<home>"
287 TransitionSound.select (a)
289 if (OeffnenDlg.exists (5)) then
291 ' remember when dialog came up
295 warnlog "File Open Dialog comes up a second time!"
300 ' the Checkbox is disabled on teh first three entries: <No Sound>, <Stop previous sound>...
301 if (TransitionLoopUntilNextSound.isEnabled AND (a<4)) then
302 qaErrorLog "May be Language specific -> Evaluation of TBO; " + a
305 TransitionSound.select (i)
306 '/// The dialog 'Open' comes up///'
309 if (OeffnenDlg.exists (5)) then
310 '/// Read all entries in Listbox 'File type' ///'
311 for i = 1 to Dateityp.getItemCount
312 printlog "" + i + ":" + Dateityp.getItemText(i)
314 '/// cancel dialog 'Open' ///'
317 warnlog "Impress:Tasks Pane:Slide Transition:Sound:Other sound... disdn't bring up teh File Open Dialog!"
321 '/// check checkbox 'Automatically after' ///'
322 TransitionAutomaticallyAfter.check
324 '/// press key 'Page Up' in box ///'
325 TransitionAutomaticallyAfterTime.typeKeys "<PageUp>"
327 '/// check the standard checkbox 'On mouse click' ///'
328 TransitionOnMouseClick.check
330 '/// press button 'Apply to All Slides' ///'
331 TransitionApplyToAllSlides.click
333 '/// press button 'Play' ///'
336 '/// press button 'Slide Show' ///'
337 TransitionSlideShow.click
339 kontext "DocumentPresentation"
340 if DocumentPresentation.exists (10) then
341 printlog "Presentation started :-)"
342 DocumentPresentation.typeKeys "<escape>"
344 warnlog "Impress:Tasks Pane:Slide Transition:Slide Show button doesn't start slideshow!"
348 '/// uncheck and check Checkbox 'Automatic Preview' ///'
349 '/// default is checked ///'
350 if (NOT TransitionAutomaticPreview.isChecked) then
351 warnlog "Impress:Tasks Pane:Slide Transition: Automatic preview has to be checked by default, wasn't!"
354 TransitionAutomaticPreview.unCheck
356 TransitionAutomaticPreview.Check
357 '/// close application ///'
361 testcase tSlideShowShowHideSlide
362 '/// open application ///'
364 '/// create rectangle ///'
365 Call hRechteckErstellen ( 10, 10, 20, 40 )
366 '/// View->Master View->Slides View ///'
367 ViewWorkspaceSlidesView
369 '/// Slide Show->Hide Slide ///'
372 '/// Slide Show->Show Slide ///'
374 '/// close application ///'
378 testcase tSlideShowAnimation
379 '/// open application ///'
382 '/// create rectangle ///'
383 Call hRechteckErstellen ( 10, 10, 20, 40 )
385 '/// Insert ->Animated image ///'
386 Opl_SD_EffekteZulassen
389 '/// click button 'Apply Object' ///'
390 BildAufnehmen.Click 'BildAufnehmen
391 '/// click button 'Create' ///'
394 '/// Select 1st entry from top in 'Alignment' ///'
397 '/// click button 'Create' ///'
400 '/// click button 'Apply Objects Individually' ///'
403 '/// click button 'First Image' ///'
406 '/// click button 'Last Image' ///'
409 '/// click button 'BAckwards' ///'
412 '/// click button 'Play' ///'
415 '/// click in Number field 'Image Number' Less - More ///'
420 '/// check 'Bitmap Object' ///'
421 AnimationsgruppeBitmapobjekt.Check
423 '/// Type '10' into the field 'Duration' ///'
424 AnzeigedauerProBild.SetText "10"
425 '/// click button 'Play' ///'
427 '/// wait 5 seconds ///'
429 '/// click button 'Stop' ///'
433 warnlog "Stopbutton doesn't work"
436 '/// Select 1st entry from top in 'Loop Count' ///'
437 AnzahlDurchlaeufe.Select 1
439 '/// click button 'Delete Current Image' ///'
442 '/// check 'Group Object' ///'
443 AnimationsgruppeGruppenobjekt.Check
445 '/// click button 'Delete All Images' ///'
448 '/// there has to be a messagebox 'Really delete?' say YES!; else ERROR ///'
449 if Messagebox.exists (5) then
452 warnlog "No one cares about my data :-( No one asked if all shall be deleted :-( "
456 '/// close dialog 'Animation' ///'
458 '/// close application ///'
462 testcase tSlideShowCustomAnimation
463 dim bError as boolean
465 '/// open application ///'
467 '/// create textbox with text ///'
468 Call hTextrahmenErstellen ("Test text to test text effects", 10, 10, 20, 40 )
469 '/// Slide Show->Custom Animation... ///'
470 SlideShowCustomAnimation
472 '/// click button 'Add...' ///'
474 '/// Dialog 'Custom Animation' comes up ///'
476 '/// Switch to TabPage: Entrance ///'
477 active.setPage(TabEntrance)
478 kontext "TabEntrance"
479 if TabEntrance.exists(5) then
480 DialogTest(TabEntrance)
481 '/// select in the listbox 'Effects' the second entry///'
484 AutomaticPreview.unCheck
486 AutomaticPreview.Check
488 '/// Switch to TabPage: Emphasis ///'
489 active.setPage(TabEmphasis)
490 kontext "TabEmphasis"
491 if TabEmphasis.exists(5) then
492 DialogTest(TabEmphasis)
495 warnlog "Impress:Tasks Pane:Custom Animation:TabEmphasis tabPage doesn't work."
498 '/// Switch to TabPage: Exit ///'
499 active.setPage(TabExit)
501 if TabExit.exists(5) then
505 warnlog "Impress:Tasks Pane:Custom Animation:TabExit tabPage doesn't work."
508 '/// Switch to TabPage: Motion Paths ///'
509 active.setPage(TabMotionPaths)
510 kontext "TabMotionPaths"
511 if TabMotionPaths.exists(5) then
512 DialogTest(TabMotionPaths)
516 warnlog "Impress:Tasks Pane:Custom Animation:TabMotionPaths tabPage doesn't work."
518 '/// Close dialog 'Custom Animation' with 'OK' ///'
523 warnlog "Impress:Tasks Pane:Custom Animation:Add... button didn't work."
527 '/// click button 'Change...' ///'
529 '/// Dialog 'Custom Animation' comes up ///'
531 '/// Switch to TabPage: Entrance ///'
532 active.setPage(TabEntrance)
533 kontext "TabEntrance"
534 if (NOT TabEntrance.exists(5)) then
535 warnlog "Impress:Tasks Pane:Custom Animation:Change... button didn't work."
539 EffectStart.getItemCount
540 if EffectProperty.isEnabled then
541 EffectProperty.getItemCount
543 '/// CLick on button '...' (Options) ///'
546 if TabEffect.exists(5) then
547 dialogTest(TabEffect)
549 AfterAnimation.getItemCount
550 '/// switch to TabPage 'Timing' ///'
552 active.setPage TabTiming
554 if TabTiming.exists(5) then
555 dialogTest(TabTiming)
556 TimingStart.getItemCount
561 TriggerAnimate.isChecked
562 TriggerStart.isChecked
565 warnlog "Impress:Tasks Pane:Custom Animation:Effect Options: Timing TabPage didn't work."
567 '/// switch to TabPage 'Timing' ///'
569 active.setPage TabTextAnimation
570 kontext "TabTextAnimation"
571 if TabTextAnimation.exists(5) then
572 dialogTest(TabTextAnimation)
573 GroupText.getItemCount
574 AnimateAttachedShape.isChecked
575 TabTextAnimation.cancel
577 warnlog "Impress:Tasks Pane:Custom Animation:Effect Options: TextAnimation TabPage didn't work."
580 warnlog "Impress:Tasks Pane:Custom Animation:... button didn't work."
583 EffectSpeed.getItemCount
584 EffectList.getItemCount
586 '/// Wait five seconds so the Playfunction has ended ///'
588 EffectSlideShow.click
590 kontext "DocumentPresentation"
591 if DocumentPresentation.exists (5) then
592 printlog "Presentation started :-)"
593 DocumentPresentation.typeKeys "<escape>"
595 warnlog "Impress:Tasks Pane:Custom Animation:Slide Show button doesn't start slideshow!"
598 EffectAutomaticPreview.isChecked
599 '/// click button 'Remove' ///'
602 '/// close application ///'
606 testcase tSlideShowInteraction
607 '/// open application ///'
610 '/// create rectangle ///'
611 Call hRechteckErstellen (10, 10, 20, 20)
613 '/// Slide Show->Interaction ///'
615 Kontext "TabInteraktion"
616 Call DialogTest (TabInteraktion, 1)
617 '///+ Select 6th entry from top in 'Action at mouse click' : 'Go to page or object' ///'
618 AktionBeiMausklick.select 6
619 Printlog AktionBeiMausklick.GetSelText + " chosen"
620 Call DialogTest (TabInteraktion, 2)
621 '///+ click button 'Find' ///'
624 Kontext "TabInteraktion"
625 '/// Select 7th entry from top in 'Action at mouse click' : 'Go to document' ///'
627 AktionBeiMausklick.select 7
629 Printlog AktionBeiMausklick.GetSelText + " chosen"
630 Kontext "TabInteraktion"
631 Call DialogTest (TabInteraktion, 3)
632 '///+ click button 'Browse...' ///'
636 call Dialogtest (OeffnenDlg)
637 '///+ cancel dialog 'open' ///'
639 Kontext "TabInteraktion"
641 '/// Select 9th entry from top in 'Action at mouse click' : 'Play Sound' ///'
642 AktionBeiMausklick.select 8
643 Printlog AktionBeiMausklick.GetSelText + " chosen"
644 Call DialogTest (TabInteraktion, 4)
645 '///+ click button 'Browse...' ///'
649 Call dialogTest (OeffnenDlg)
650 '///+ cancel dialog 'open' ///'
653 Kontext "TabInteraktion"
654 '/// Select 8th entry from top in 'Action at mouse click' : 'Run Program' ///'
655 AktionBeiMausklick.select 9
656 Printlog AktionBeiMausklick.GetSelText + " chosen"
657 Call DialogTest (TabInteraktion, 7)
658 Kontext "TabInteraktion"
659 '///+ click button 'Browse...' ///'
663 Call dialogTest (OeffnenDlg)
664 '///+ cancel dialog 'open' ///'
667 '/// Select 9th entry from top in 'Action at mouse click' : 'Run Macro' ///'
668 Kontext "TabInteraktion"
669 AktionBeiMausklick.select 10
670 Printlog AktionBeiMausklick.GetSelText + " chosen"
672 Call DialogTest (TabInteraktion, 6)
673 '///+ click button 'Browse...' ///'
676 Kontext "ScriptSelector"
678 Call DialogTest ( ScriptSelector, 1)
680 '///+ cancel dialog 'ScriptSelector' ///'
681 ScriptSelector.Cancel
683 '/// Select 10th entry from top in 'Action at mouse click' : 'Exit Presentation' ///'
684 Kontext "TabInteraktion"
685 AktionBeiMausklick.select 11
686 Printlog AktionBeiMausklick.GetSelText + " chosen"
687 Call DialogTest (TabInteraktion, 7)
688 Kontext "TabInteraktion"
689 '/// close dialog 'Interaction' ///'
692 '/// close application ///'