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: i_slideshow.inc,v $
13 '* last change: $Author: rt $ $Date: 2008-08-28 11:44:27 $
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 :
38 '*******************************************************************
40 ' #1 tSlideShowSlideShow
41 ' #1 tSlideShowRehearseTimings
42 ' #1 tSlideShowSlideShowSettings
43 ' #1 tSlideShowCustomSlideShow
44 ' #1 tSlideShowSlideTransition
45 ' #1 tSlideShowShowHideSlide
47 '\******************************************************************
48 testcase tSlideShowSlideShow
50 dim bLoaded as boolean
53 '/// open file 'graphics\\input\\diashow.odp' ///'
54 hFileOpen ConvertPath (gTesttoolPath + "graphics\required\input\diashow.odp")
57 printlog "check if the document is writable"
58 sMakeReadOnlyDocumentEditable
63 if Navigator.Exists then Navigator.Close
65 '/// Deactivate "Start with current page" in ToolsOptions ///'
66 setStartCurrentPage(FALSE)
69 '/// SlideShow->Slide Show Settings... ///'
70 SlideShowPresentationSettings
73 warnlog "SlideShowPresentationSettings could not be run, because document didn't get loaded in time ??! :-("
76 Kontext "Bildschirmpraesentation"
78 '/// check Radio button 'Type': 'Window' ///'
80 '/// close dialog 'Slide Show' with OK ///'
81 Bildschirmpraesentation.OK
83 '/// start the slideshow with 'Slide Show->Slide Show' ///'
86 Kontext "DocumentPresentation"
88 '/// end the presentation by typing [ESCAPE] ///'
89 DocumentPresentation.TypeKeys "<ESCAPE>"
93 Printlog "- Slideshow ended using 'ESCAPE'"
95 Warnlog "- Slideshow did not end"
96 DocumentPresentation.TypeKeys "<ESCAPE>"
100 '/// start the slideshow with 'Slide Show->Slide Show' ///'
102 Kontext "DocumentPresentation"
103 Printlog "- Check if slideshow runs"
106 DocumentPresentation.TypeKeys "<pagedown>"
108 Warnlog "Presentation is not running !"
111 '/// type the key [SHIFT + F5] to open the navigator ///'
112 DocumentPresentation.TypeKeys "<MOD1 SHIFT F5>"
113 Kontext "NavigatorDraw"
115 '/// check in list, if the page changed ///'
116 if Liste.GetSelIndex <> 2 Then Warnlog "- pagedown not working: '" + Liste.GetSelText+"'"
117 Kontext "DocumentPresentation"
118 '/// press key [cursor right] 3 times ///'
121 DocumentPresentation.TypeKeys "<right>"
124 DocumentPresentation.MouseDown 50,50
125 DocumentPresentation.MouseUp 50,50
128 Kontext "DocumentPresentation"
129 DocumentPresentation.MouseDown 50,50
130 DocumentPresentation.MouseUp 50,50
131 Warnlog "- Slideshow still running"
132 DocumentPresentation.TypeKeys "<ESCAPE>"
134 Printlog "- Slideshow ended at the right time"
138 warnlog "Document didn't get loaded"
140 Kontext "DocumentImpress"
141 '/// Close the Navigator ///'
142 DocumentImpress.TypeKeys "<MOD1 SHIFT F5>"
143 '/// Set "Start with current page" back to default = on, in ToolsOptions ///'
144 setStartCurrentPage(TRUE)
145 '/// close the application ///'
148 endcase 'tSlideShowSlideShow
150 '-------------------------------------------------------------------------------
152 testcase tSlideShowRehearseTimings
153 qaerrorlog "#i64783# - tSlideShowRehearseTimings outcommented due to bug"
155 dim bLoaded as boolean
158 '/// open file 'graphics\\input\\diashow.odp' ///'
159 hFileOpen ConvertPath (gTesttoolPath + "graphics\required\input\diashow.odp")
161 ' check if the document is writable
162 if fIsDocumentWritable = false then
163 ' make the document writable and check if it's succesfull
164 if fMakeDocumentWritable = false then
165 warnlog "The document can't be make writeable. Test stopped."
170 if Navigator.Exists then Navigator.Close
173 '/// SlideShow->Slide Show Settings... ///'
174 SlideShowPresentationSettings
177 warnlog "SlideShowPresentationSettings could not be run, because document didn't get loaded in time ( ?? ) :-("
180 Kontext "Bildschirmpraesentation"
181 '/// check Radio button 'Type': 'Window' ///'
183 '/// close dialog 'Slide Show' with OK ///'
184 Bildschirmpraesentation.OK
186 '/// start the slideshow with 'Slide Show->Rehearse Timings' ///'
187 SlideShowRehearseTimings
188 Kontext "DocumentPresentation"
189 if DocumentPresentation.Exists then
194 '/// press key [return] 5 times ///'
197 DocumentPresentation.TypeKeys "<return>"
202 Printlog "- Slideshow ended "
204 Kontext "DocumentPresentation"
205 Warnlog "- Slideshow still running"
206 DocumentPresentation.TypeKeys "<ESCAPE>"
211 warnlog "Documnet didn't get loaded"
214 '/// check state of navigator ! expected: closed ///'
216 if Navigator.exists then
217 '///+ close navigator ! ///'
220 printlog "Navigator: NOT available"
222 '/// close the application ///'
225 endcase 'tSlideShowRehearseTimings
227 '-------------------------------------------------------------------------------
228 testcase tSlideShowSlideShowSettings
230 dim bLoaded as boolean
234 dim saSlideNames(4) as string
235 dim bCurrentPage as boolean
237 S1 = glLocale (2) + " 1"
238 S2 = glLocale (2) + " 2"
239 S3 = glLocale (2) + " 3"
240 S4 = glLocale (2) + " 4"
246 ' the navigator you open during a presentation is closed after the last slide (in full screen mode)
247 ' the state of the navigator in the normal view is not affected
248 ' the navigator that is open in normal view, is not visible in windows presenattions
250 '/// open application ///'
253 '/// check state of navigator ! expected: closed ///'
255 if Navigator.exists then
256 '///+ close navigator ! ///'
258 QaErrorLog "Navigator was open. Check earlier tests. Now closed."
260 printlog "Navigator: NOT available. Good."
263 '/// Slide Show -> Slide Show Settings ///'
264 SlideShowPresentationSettings
265 Kontext "Bildschirmpraesentation"
266 '/// check checkbox in section 'Range' - 'From: ///'
268 '/// get count of slides from listbox 'From:' ///'
269 x = AbDiaName.GetItemCount
270 '/// check if count in listbox 'from' is '0' ///'
272 Printlog " - Slide count in the list: '" + x + "'"
274 Warnlog " - unexpected slide count; should be '1'; is '" + x + "'"
276 '/// close dialog 'Slide Show' with OK ///'
277 Bildschirmpraesentation.OK
278 '/// Insert->Slide... ///'
281 hTypekeys "<Pagedown>"
283 '/// Slide Show -> Slide Show Settings ///'
284 SlideShowPresentationSettings
285 Kontext "Bildschirmpraesentation"
286 Printlog "'///<b> check if count in listbox 'from' increased </b>///'"
287 i = AbDiaName.GetItemCount
289 Printlog " - Slide appears in the list; count : '" + i + "'"
291 Warnlog " - Slide not added; is '" + i + "' should: '" + x + "'"
293 '/// close dialog 'Slide Show' with CANCEL ///'
294 Bildschirmpraesentation.Cancel
295 '/// close application ///'
300 '/// open file 'graphics\\input\\diashow.odp' (Slide Show with 4 Slides) ///'
301 hFileOpen ConvertPath (gTesttoolPath + "graphics\required\input\diashow.odp")
303 printlog "check if the document is writable"
304 sMakeReadOnlyDocumentEditable
307 Kontext "DocumentImpress"
308 '/// Slide Show -> Slide Show Settings ///'
309 Printlog "'--------------------------------------------------------------------------"
310 SlideShowPresentationSettings
313 warnlog "SlideShowPresentationSettings could not be run, because document didn't get loaded in time ( ?? ) :-("
316 Kontext "Bildschirmpraesentation"
317 if (AlleDias.IsChecked = FALSE) then
318 Warnlog "'All Slides' is not checked :-("
320 if (Standard.IsChecked = FALSE) then
321 Warnlog "'Default' is not checked :-("
323 if (NavigatorSichtbar.IsChecked) then
324 Warnlog "'Navigator visible' is checked :-("
326 '///<b> check checkbox 'All Slides' </b>///'
328 '///<b> check checkbox 'Window' </b>///'
330 '///<b> check checkbox 'Navigator visible' </b>///'
331 NavigatorSichtbar.Check '--------------------------------------------------------------------------
332 '/// close dialog 'Slide Show' with OK ///'
333 Bildschirmpraesentation.OK
334 '/// start the slideshow with 'Slide Show->Slide Show' ///'
336 Printlog "'---------------------------- START P -- All -- Window -- Navigator -------------------------"
338 '/// check state of navigator ! expected: open ///'
340 if Navigator.exists then
341 Printlog "Navigator: open :-)"
343 Warnlog "Navigator: NOT available :-( will be opened now!"
344 Kontext "DocumentPresentation"
345 DocumentPresentation.TypeKeys "<MOD1 SHIFT F5>"
348 Kontext "DocumentPresentation"
350 '/// press pagedown ///'
351 DocumentPresentation.TypeKeys "<pagedown>"
353 Warnlog "presentation is not running !"
356 Kontext "NavigatorDraw"
357 if Liste.GetSelIndex <> 2 Then
358 warnlog "Wrong slide."
360 '/// press the key [Page Down] 3 times ///'
361 '///+ check in Navigator list, if the slide is number: (times key pressed) ///'
364 if Navigator.exists then
365 printlog "Navigator was there, good."
367 Warnlog "The Navigator should have been activated, but was not. Opening now."
368 Kontext "DocumentPresentation"
369 DocumentPresentation.TypeKeys "<MOD1 SHIFT F5>"
371 fGetSlideName(saSlideNames(i))
372 kontext "DocumentPresentation"
373 DocumentPresentation.TypeKeys "<pagedown>"
376 '/// press the key [Page Down] to exit presentation ///'
377 DocumentPresentation.TypeKeys "<pagedown>"
380 gMouseClick 50,50 ' this one works to recognice the not ending ! TBO
381 Printlog "- Slideshow ended at the right time"
383 Warnlog "- Slideshow still running "
384 DocumentPresentation.TypeKeys "<ESCAPE>"
387 '/// check state of navigator ! expected: open ///'
389 if Navigator.exists then
390 '///+ close navigator ! ///'
393 printlog "Navigator: NOT available"
395 Printlog "'--------------------------------------------------------------------------"
397 Kontext "DocumentPresentation"
398 '/// type the key [MOD1 SHIFT F5] to open the navigator ///' '--------------------------------------------------------------------------
399 hTypeKeys "<MOD1 SHIFT F5>"
400 '/// Slide Show -> Slide Show Settings ///'
401 SlideShowPresentationSettings
402 Kontext "Bildschirmpraesentation"
403 if (AlleDias.IsChecked = FALSE) then
404 Warnlog "'All Slides' is not checked :-("
406 if (Fenster.IsChecked = FALSE) then
407 Warnlog "'Window' is not checked :-("
409 if (NavigatorSichtbar.IsChecked = FALSE) then
410 Warnlog "'Navigator visible' is not checked :-("
412 if (DiawechselAufHintergrund.IsChecked = FALSE) then
413 Warnlog "'Change slides by clicking on background' is not checked :-("
415 '///<b> check checkbox in section 'Range' - 'From: </b>///'
417 '/// select the 3rd item from the top from listbox 'From:' -> 2 slides to go ///'
419 sTemp = AbDiaName.GetSelText
420 Printlog " - From '" + sTemp + "' will be shown"
421 '///<b> check checkbox 'Default' </b>///'
423 '/// UNcheck checkbox 'Navigator visible'///'
424 NavigatorSichtbar.UnCheck
425 '/// UNcheck checkbox 'Change slides by clicking on background'///'
426 DiawechselAufHintergrund.UnCheck
427 '/// close dialog 'Slide Show' with OK ///'
428 Bildschirmpraesentation.OK
430 Kontext "DocumentPresentation"
431 '/// start the slideshow with 'Slide Show->Slide Show' ///'
433 Printlog "'---------------------------- START P -- From -- Default -- Click on Bg -----------------------"
435 '/// check state of navigator ! expected: closed ///'
437 if Navigator.exists then
438 '///+ close navigator ! ///'
440 Warnlog "Navigator: closed"
442 Printlog "Navigator: NOT available. Good."
445 '/// type the key [MOD1 SHIFT F5] to open the navigator ///' '--------------------------------------------------------------------------
446 Kontext "DocumentPresentation"
447 DocumentPresentation.TypeKeys "<MOD1 SHIFT F5>"
449 '/// check in Navigator list, if the page is THREE! ///'
451 '/// click right mouse button ///'
453 DocumentPresentation.MouseDown 50,50
454 DocumentPresentation.MouseUp 50,50
455 '/// check in Navigator list, if the page is still THREE. If so, change slide with PageDown ///'
456 if (fGetSlideName(S3) <> S3) then
457 Warnlog "'Change slides by clicking on background' disable did not work :-("
459 DocumentPresentation.TypeKeys "<PAGEDOWN>"
461 '/// check in Navigator list, if the page is FOUR ///'
464 '/// press the key [Page Down] ///'
465 DocumentPresentation.TypeKeys "<pagedown>"
467 '/// press the key [Space] to exit presentation ///'
468 DocumentPresentation.TypeKeys "<Space>"
471 ViewZoom '-----------!!!!!1 TBO: Make function!!! ----------------------- works! TBO
475 Kontext "DocumentPresentation"
476 DocumentPresentation.TypeKeys "<ESCAPE>"
477 Warnlog " - Program was still in slideshow mode - ended now ?"
479 '/// check state of navigator ! expected: open ///'
481 if Navigator.exists then
482 '///+ close navigator ! ///'
484 printlog "Navigator: closed"
486 warnlog "Navigator: NOT available"
488 Printlog "'--------------------------------------------------------------------------"
490 '/// Slide Show -> Slide Show Settings ///'
491 SlideShowPresentationSettings
492 Kontext "Bildschirmpraesentation"
493 if (AbDia.IsChecked = FALSE) then
494 Warnlog "'From' is not checked :-("
496 if (Standard.IsChecked = FALSE) then
497 Warnlog "'Default' is not checked :-("
499 if (AbDiaName.GetSelText <> sTemp ) then
500 Warnlog "'From Slide' has wrong value :-(; should be: '" + sTemp + "' ; is: '" + AbDiaName.GetSelText + "'"
502 if (DiawechselAufHintergrund.IsChecked) then
503 Warnlog "'Change slides by clicking in background' is checked :-("
505 '/// check checkbox 'All Slides' ///'
507 '///<b> check check box 'Auto' -> implies looping of slideshow in fullscreen mode </b>///'
509 '/// set duration of pause to '00:00:05' ///'
510 Zeit.SetText "00:00:05"
511 '/// check check box 'Show logo' ///'
513 '/// check checkbox 'Change slides by clicking on background'///'
514 DiawechselAufHintergrund.Check
515 '/// close dialog 'Slide Show' with OK ///'
516 Bildschirmpraesentation.OK
517 '/// start the slideshow with 'Slide Show->Slide Show' ///'
519 Printlog "'---------------------------- START P -- All -- Auto -- :05 -- Logo -----------------------------"
521 Kontext "DocumentPresentation"
522 '/// type the key [MOD1 SHIFT F5] to open the navigator ///' '--------------------------------------------------------------------------
523 DocumentPresentation.TypeKeys "<MOD1 SHIFT F5>"
524 '/// press the key [Space] 4 times ///'
525 '///+ check in Navigator list, if the slide is number: [(times key pressed) -1 ] ///'
527 fGetSlideName(saSlideNames(i))
528 DocumentPresentation.TypeKeys "<Space>"
531 '/// wait until autopause ended (5 secs) ///'
533 if (fGetSlideName(saSlideNames(1)) = saSlideNames(1)) then
534 Printlog " - Enless loop works"
536 Warnlog " Enless loop does NOT work"
539 '/// type key [excape] to exit presentation ///'
540 Kontext "DocumentPresentation"
541 DocumentPresentation.TypeKeys "<ESCAPE>"
544 SlideShowPresentationSettings
545 Kontext "Bildschirmpraesentation"
546 Bildschirmpraesentation.OK
548 Warnlog " - Still in slideshow mode, tries to end again..."
549 Kontext "DocumentPresentation"
550 DocumentImpress.TypeKeys "<ESCAPE>"
553 '/// check state of navigator ! expected: closed ///'
555 if Navigator.exists then
557 warnlog "Navigator: closed"
559 printlog "Navigator: NOT available"
561 Printlog "'--------------------------------------------------------------------------"
563 Kontext "DocumentImpress"
564 '/// Slide Show -> Slide Show Settings ///'
565 SlideShowPresentationSettings
566 Kontext "BildschirmPraesentation"
567 '/// check checkbox 'default' ///'
569 '///<b> check checkbox 'Change slides maually' </b>///'
570 ' to check this i need an automatic transition somewhere in the presentation !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
571 DiawechselManuel.Check
572 '///<b> check checkbox 'Mouse pointer as pen' </b>///'
573 MauszeigerAlsStift.Check
574 '/// close dialog 'Slide Show' with OK ///'
575 BildschirmPraesentation.Ok
578 '/// goto the first slide by typing [strg home] ///'
579 hTypeKeys "<mod1 home>"
580 '///+ - SlideShow->SlideTransition ///'
581 SlideShowSlideTransition
583 '///+ - click button 'Extras' ///'
585 '///+ - + click button 'Automatic Transition' ///'
586 TransitionAutomaticallyAfter.Check 'click
587 '///+ - + + Set Time to '00:00:01' ///'
588 TransitionAutomaticallyAfterTime.SetText "2"
589 '///+ - click button 'Assign' ///'
590 TransitionApplyToAllSlides.Click
591 '///+ - close dialog 'Slide Transition' ///'
594 '/// start the slideshow with keys [STRG F2] ///'
595 Kontext "DocumentImpress"
596 DocumentImpress.TypeKeys "<MOD1 F2>"
597 Printlog "'---------------------------- START P -- Default -- Manuel ------------------------------"
598 '/// wait 10 seconds (to get the dia changed automatical has not to happen !) ///'
600 Kontext "DocumentPresentation"
601 '/// type the key [MOD1 SHIFT F5] to open the navigator ///' '--------------------------------------------------------------------------
602 DocumentPresentation.TypeKeys "<MOD1 SHIFT F5>"
603 '/// press key [cursor right] 3 times ///'
606 fGetSlideName(saSlideNames(i))
607 '///+ use the left mouse button, to use the pen drawing function ///'
608 DocumentPresentation.MouseDown (10, 10)
609 DocumentPresentation.MouseMove (10, 90)
610 DocumentPresentation.MouseUp (10, 90)
611 DocumentPresentation.TypeKeys "<right>"
613 '/// press the key [Page Down] to exit presentation ///'
615 DocumentPresentation.TypeKeys "<pagedown>"
617 if DocumentPresentation.Exists then
618 Warnlog "- Slideshow still running "
619 DocumentPresentation.TypeKeys "<ESCAPE>"
621 Printlog "- Slideshow ended at the right time"
624 '/// check state of navigator ! expected: closed ///'
626 if Navigator.exists then
627 '///+ close navigator ! ///'
629 warnlog "Navigator: closed"
631 printlog "Navigator: NOT available"
633 Printlog "'--------------------------------------------------------------------------"
635 Kontext "DocumentImpress"
636 '/// Slide Show -> Slide Show Settings ///'
637 SlideShowPresentationSettings
638 Kontext "BildschirmPraesentation"
639 '/// check checkbox 'default' ///'
641 '///<b> UNcheck checkbox 'Change slides manually' </b>///'
642 DiawechselManuel.UNCheck
643 '/// UNcheck checkbox 'Mouse pointer as pen' ///'
644 MauszeigerAlsStift.UNCheck
645 '/// close dialog 'Slide Show' with OK ///'
646 BildschirmPraesentation.Ok
648 '/// goto the first slide by typing [strg home] ///'
649 hTypeKeys "<MOD1 HOME>"
650 '/// Set all slides to 'wait 10 seconds' to get the slide changed automatically ///'
651 '///+ - SlideShow->SlideTransition ///'
652 SlideShowSlideTransition
654 '///+ - click button 'Extras' ///'
656 '///+ - + click button 'Automatic Transition' ///'
657 TransitionAutomaticallyAfter.Check 'click
658 '///+ - + + Set Time to '10sec' ///'
659 TransitionAutomaticallyAfterTime.SetText "10"
660 '///+ - click button 'Apply to all Slides' ///'
661 TransitionApplyToAllSlides.Click
662 '///+ - close dialog 'Slide Transition' ///'
664 '/// start the slideshow with keys [STRG F2] ///'
665 Kontext "DocumentImpress"
666 DocumentImpress.TypeKeys "<MOD1 F2>"
667 Printlog "'---------------------------- START P -- Default -- Automatic -----------------------------"
668 '/// Wait 6 seconds to see if the Automatic Transition changes the slide. ///'
670 Kontext "DocumentPresentation"
671 '/// type the key [MOD1 SHIFT F5] to open the navigator ///' '--------------------------------------------------------------------------
672 DocumentPresentation.TypeKeys "<MOD1 SHIFT F5>"
673 '/// press key [cursor right] 3 times ///'
676 fGetSlideName(saSlideNames(i))
677 DocumentPresentation.TypeKeys "<right>"
679 '/// press the key [Page Down] to exit presentation ///'
681 DocumentPresentation.TypeKeys "<PAGEDOWN>"
683 if DocumentPresentation.Exists then
684 Warnlog "- Slideshow still running "
685 DocumentPresentation.TypeKeys "<ESCAPE>"
687 Printlog "- Slideshow ended at the right time"
690 '/// check state of navigator ! expected: closed ///'
692 if Navigator.exists then
693 '///+ close navigator ! ///'
697 warnlog "document didn't get loaded"
699 '/// Set "Start with current page" back to default = on, in ToolsOptions ///'
700 setStartCurrentPage(TRUE)
701 '/// Close the document ///'
704 endcase 'tSlideShowSlideShowSettings
706 '-------------------------------------------------------------------------------
707 testcase tSlideShowCustomSlideShow
715 '/// open application ///'
719 if Navigator.Exists then Navigator.Close
720 '/// Deactivate "Start with current page" in ToolsOptions ///'
721 setStartCurrentPage(FALSE)
723 '/// create a rectangle ///'
724 hRechteckErstellen 30,30,60,60
725 '/// do 2 times : ///'
727 '///+ Insert->Slide... ///'
730 hTypekeys "<Pagedown>"
732 '///+ create a rectangle ///'
733 hRechteckErstellen 30,30,70,70
736 '/// Slide Show -> Slide Show Settings ///'
737 SlideShowPresentationSettings
738 Kontext "Bildschirmpraesentation"
739 if (Fenster.IsChecked = False) Then Fenster.Check
740 '/// close dialog 'Slide Show' with OK ///'
741 Bildschirmpraesentation.OK
743 '/// Slide Show -> Custom Slide Show... ///'
744 SlideShowCustomSlideshow
745 Kontext "IndividuellePraesentation"
746 '///<b> click button 'New...' </b>///'
749 Kontext "IndividuellePraesentationDefinieren"
750 '/// type something in 'Name' ///'
751 PraesentationName.SetText "Individually 1"
752 '/// select the first entry in the list 'Existing Slides' ///'
753 SeitenPraesentation.Select 1
754 '/// click button '>>' ///'
756 i = SelectedSlides.GetItemCount
758 Warnlog "- Number of slides 'Selected Slides' is not correct. It should be = '1', but it is = '" + i + "'"
760 '/// close dialog 'Define Custom Slide Show' with OK ///'
761 IndividuellePraesentationDefinieren.OK
762 Kontext "IndividuellePraesentation"
763 '///<b> click button 'Edit...' </b>///'
765 Kontext "IndividuellePraesentationDefinieren"
766 '/// select an entry in the list 'Selected Slides' ///'
767 SelectedSlides.TypeKeys "<pagedown>"
768 '/// click button '<<' ///'
770 i = SelectedSlides.GetItemCount
772 Warnlog " Removing slides from list 'Selected Slides' does not work It should be = '1', but it is = '" + i + "'"
774 '/// select the first entry in the list 'Existing Slides' ///'
775 SeitenPraesentation.Select 1
776 '/// click button '>>' ///'
778 '/// close dialog 'Define Custom Slide Show' with OK ///'
779 IndividuellePraesentationDefinieren.OK
780 Kontext "IndividuellePraesentation"
782 '///<b> check checkbox 'Use Custom Slide Show' </b>///' '-------------------------------------------------------
783 IndividuellePraesentationBenutzen.Check
784 '///<b> click button 'Start...' </b>///'
787 Kontext "DocumentPresentation"
788 '/// press key [space] 2 times ///'
789 DocumentPresentation.TypeKeys "<space>"
791 DocumentPresentation.TypeKeys "<space>"
794 Kontext "IndividuellePraesentation"
795 '/// close dialog 'Custom Slide Shows' with button 'Close' ///'
796 IndividuellePraesentation.Close
798 Warnlog "- Slideshow did not end after slide 1"
799 DocumentPresentation.TypeKeys "<space>"
802 '/// Slide Show -> Custom Slide Show... ///'
803 SlideShowCustomSlideshow
804 Kontext "IndividuellePraesentation"
805 '/// click button 'Edit...' ///'
807 Kontext "IndividuellePraesentationDefinieren"
808 '/// select 1st entry in the list 'Selected Slides' ///'
809 SelectedSlides.Select 1
810 '/// click button '<<' ///'
812 i = SelectedSlides.GetItemCount
814 Warnlog "- Add and remove slides does not work properly. It should be '0', but it is = '"+i+"'"
816 '/// select the first entry in the list 'Existing Slides' ///'
817 SeitenPraesentation.Select 1
818 '/// click button '>>' 4 times ///'
823 SelectedSlides.Select i
824 sTemp = SelectedSlides.GetSelText
825 If (sTemp <> Seite) then
826 Warnlog "- Wrong slide added to individual slideshow. Instead of '" + Seite + "', '" + sTemp + "' was added"
829 '/// close dialog 'Define Custom Slide Show' with OK ///'
830 IndividuellePraesentationDefinieren.OK
832 Kontext "IndividuellePraesentation"
834 '///<b> UNcheck checkbox 'Use Custom Slide Show' </b>///'
835 IndividuellePraesentationBenutzen.UnCheck
836 '/// click button 'Start...' ///'
837 Starten.Click '---------------------------- START P ----------------------------------------------
838 '/// press key [space] 4 times ///'
839 kontext "DocumentPresentation"
842 DocumentPresentation.TypeKeys "<space>"
845 kontext "IndividuellePraesentation"
846 '/// close dialog 'Custom Slide Shows' with button 'Close' ///'
847 if IndividuellePraesentation.exists then
848 IndividuellePraesentation.Close
850 Warnlog "'IndividuellePraesentation' was closed :-("
853 '/// Set "Start with current page" back to default = on, in ToolsOptions ///'
854 setStartCurrentPage(TRUE)
855 '/// close the application ///'
857 if Navigator.exists then
858 '///+ close navigator ! ///'
861 printlog "Navigator: NOT available"
865 endcase 'tSlideShowCustomSlideShow
867 '-------------------------------------------------------------------------------
868 testcase tSlideShowSlideTransition
874 dim TimerValue as string
876 dim sEffect (3) as string
878 sFile = ConvertPath (gOfficePath + "user\work\diashow")
880 ' '/// open application ///'
883 '/// close the navigator///'
885 if Navigator.Exists then Navigator.Close
887 '/// create 3 slides with a rectangle ///'
888 hRechteckErstellen (30,30,60,60)
890 '///+ - Insert->Slide ///'
894 hTypekeys "<Pagedown>"
896 '///+ - insert rectangle///'
897 hRechteckErstellen (30,30,60,60)
899 Printlog "created 3 slides"
900 '/// for all 3 slides do: ///'
902 '///+ - open navigator with shortcutkey [MOD1 SHIFT F5] ///'
903 hTypeKeys "<MOD1 SHIFT F5>"
905 Kontext "NavigatorDraw"
906 '///+ - select the next slide in the list ///'
907 if Liste.GetItemCount < 3 then
908 warnlog "We have " + Liste.GetItemCount + " entries in the Navigator."
909 hTypeKeys "<MOD1 SHIFT F5>"
910 hTypeKeys "<MOD1 SHIFT F5>"
911 Kontext "NavigatorDraw"
914 '///+ - press key [return] ///'
915 Liste.TypeKeys "<return>"
917 '///+ - close Navigator ///'
919 '///+ - SlideShow->SlideTransition ///'
920 SlideShowSlideTransition
921 Kontext "Tasks" '"SlideTransition"' "OL_DIA_Diawechsel" 'OL_DIA_Diawechsel
922 TransitionAutomaticPreview.UnCheck
923 '///+ - click button 'Effects' ///'
924 TransitionApplyToSelectedSlide.typekeys "<pagedown>"
926 '///+ - in the listbox 'speed' select the i. one from the top ///'
927 TransitionSpeed.Select i
928 '///+ - Select an effect-group from the listbox ///'
929 TransitionApplyToSelectedSlide.typekeys "<home>"
932 TransitionApplyToSelectedSlide.typekeys "<down>"
935 sEffect(i) = TransitionApplyToSelectedSlide.GetSelText
936 '///+ - click button 'Extras' ///'
939 case 1: '///+ - + click button 'Automatic Transition' ///'
940 TransitionAutomaticallyAfter.Check
941 '///+ - + + Set Time to '00:00:01' OR ///'
942 TransitionAutomaticallyAfterTime.ToMin 'SetText "1" '"00:00:01"
943 TransitionAutomaticallyAfterTime.More
944 TransitionApplyToSelectedSlide.typekeys "<DOWN>"
945 TransitionApplyToSelectedSlide.typekeys "<UP>"
946 TransitionAutomaticallyAfter.Check
947 Tasks.TypeKeys "<TAB><TAB><TAB>"
948 TimerValue = TransitionAutomaticallyAfterTime.GetText
949 printlog " TimerValue is now: " + TimerValue
950 case else: '///+ - + click button 'SemiAutomatic Transition' OR ///'
951 TransitionOnMouseClick.Check
955 Printlog "assigned transitions to all slides"
957 Kontext "DocumentImpress"
959 '/// SlideShow->Slide Show Settings... ///'
960 SlideShowPresentationSettings
961 Kontext "Bildschirmpraesentation"
963 '/// check Radio button 'Type': 'Window' ///'
965 '/// close dialog 'Slide Show' ///'
966 Bildschirmpraesentation.OK
968 Kontext "DocumentImpress"
969 Printlog "'/// SlideShow->Slide Show ///'"
971 '/// wait 10 sec ///'
972 sleep (10) 'WaitSlot (10000)
973 Kontext "DocumentPresentation"
974 '/// type key [ESCAPE] ///'
975 DocumentPresentation.TypeKeys "<ESCAPE>"
978 '/// type key [F11] to open the stylist (to check ending of presenation) ///'
983 '/// close Stylist ///'
985 Printlog "- Slideshow worked"
987 Kontext "DocumentPresentation"
988 DocumentPresentation.TypeKeys "<ESCAPE>"
989 Warnlog "slideshow somehow didn't end :-("
993 '/// close the navigator///'
995 if Navigator.Exists then Navigator.Close
996 Printlog "'///+ check the settings in SlideView in the Dia object bar ///'"
998 Printlog " --------------------- " + i + " ---------------------------"
999 '///+ - open navigator with shortcutkey [MOD1 SHIFT F5] ///'
1000 hTypeKeys "<MOD1 SHIFT F5>"
1002 Kontext "NavigatorDraw"
1003 '///+ - select the next slide in the list ///'
1005 '///+ - press key [return] ///'
1006 Liste.TypeKeys "<return>"
1008 '///+ - close Navigator ///'
1010 '///+ - View->Master View->Slides View ///'
1011 ' ViewWorkspaceSlidesView
1013 Kontext "Tasks" 'SlideViewObjectbar"
1014 '///+ - check 'speed' ///'
1015 if Tasks.Exists = TRUE AND Tasks.IsVisible = TRUE then
1016 x = TransitionSpeed.GetSelIndex 'TransitionSpeed
1018 Warnlog "Speed changed :-( is: '" + x + "' should be: '" + i + "'"
1020 '///+ - check 'Transition' ///'
1021 x = TransitionApplyToSelectedSlide.GetSelIndex 'Diawechsel.GetSelIndex
1022 if (x <> (i+3)) then
1023 Warnlog "Transition changed :-( is: '" + x + "' should be: '" + (i+3) + "'"
1024 sTemp = TransitionAutomaticallyAfterTime.GetText
1025 if ((sTemp <> TimerValue)) then '"00:00:01" '(i = 3) AND
1026 Warnlog "Time is different :-( is: '" + sTemp + "' should: '" + TimerValue + "'" '"00:00:01"
1030 '///+ - check 'effect group' ///'
1031 sTemp = TransitionApplyToSelectedSlide.GetSelText
1032 x = inStr (sTemp,sEffect(i))
1033 Printlog " Effect tried :-) '" + x + "'"
1035 printlog "the string '" + sTemp + "' should contain the words(s): '" + sEffect(i) + "'"
1037 ' ViewWorkspaceDrawingView
1039 warnlog " SlideViewObjectbar doesnt exists or isnt visible"
1042 '/// save file as presentation with name '"user\\work\\diashow")' ///'
1044 hFileSaveAsWithFilterKill ((sFile + ".odp") , "impress8" )
1046 Printlog " saved presentation: '" + sFile + "'" '." + gImpressFilter + "
1047 '/// close application///'
1050 '/// load file again ///'
1051 hFileOpen (sFile + ".odp")
1053 Printlog " '/// check setings for every slide in the transition dialog ///'"
1054 '///+ for all 3 slides do: ///'
1056 Printlog " --------------------- " + i + " ---------------------------"
1057 '///+ - open navigator with shortcutkey [MOD1 SHIFT F5] ///'
1058 hTypeKeys "<MOD1 SHIFT F5>"
1060 Kontext "NavigatorDraw"
1061 '///+ - select the next slide in the list ///'
1063 '///+ - press key [return] ///'
1064 Liste.TypeKeys "<return>"
1066 '///+ - close Navigator ///'
1068 '///+ - select the grafik with the key [TAB] ///'
1070 '///+ - SlideShow->SlideTransition ///'
1071 SlideShowSlideTransition
1074 '///+ - check 'speed' ///'
1075 x = TransitionSpeed.GetSelIndex
1077 Warnlog " Speed changed :-( is: '" + x + "' should: '" + i + "'"
1079 '///+ - check 'effect group' ///'
1080 x = TransitionApplyToSelectedSlide.GetSelIndex
1081 if (x <> (i+3)) then
1082 Warnlog " Effect changed :-( is: '" + x + "' should: '" + (i+3) + "'"
1086 case 1: '///+ - click button 'Automatic Transition' ///'
1087 if (TransitionAutomaticallyAfter.IsEnabled) then
1088 '///+ - + + Check Time '1' OR ///'
1089 sTemp = TransitionAutomaticallyAfterTime.GetText
1090 if (sTemp <> TimerValue) then
1091 Warnlog " Time is different :-( is: '" + sTemp + "' should be: '" + TimerValue + "'" '"00:00:01"
1094 Warnlog " button 'Automatic Transition' not pressed ?"
1096 case 2: if (TransitionAutomaticallyAfter.IsChecked <> FALSE) then
1097 '///+ - + check button 'SemiAutomatic Transition' OR ///'
1098 Warnlog " button 'Automatic Transition' is pressed ?"
1100 case 3: if (TransitionAutomaticallyAfter.IsChecked <> FALSE) then
1101 '///+ - + click button 'Manual Transition' ///'
1102 Warnlog " button 'Automatic Transition' is pressed ?"
1107 TransitionAutomaticPreview.Check
1108 '/// Set "Start with current page" back to default = on, in ToolsOptions ///'
1109 setStartCurrentPage(TRUE)
1111 if Navigator.exists then
1112 '///+ close navigator ! ///'
1115 printlog "Navigator: NOT available"
1117 '/// Close the document ///'
1120 endcase 'tSlideShowSlideTransition
1122 '-------------------------------------------------------------------------------------
1123 testcase tSlideShowShowHideSlide
1125 dim saSlideNames(4) as string
1128 S1 = glLocale (2) + " 1"
1129 S2 = glLocale (2) + " 2"
1130 S3 = glLocale (2) + " 3"
1131 S4 = glLocale (2) + " 4"
1132 saSlideNames(1) = S1
1133 saSlideNames(2) = S2
1134 saSlideNames(3) = S3
1135 saSlideNames(4) = S4
1137 printlog "Open file 'graphics\\input\\diashow.odp' (Slide Show with 4 Slides)"
1138 hFileOpen ConvertPath (gTesttoolPath + "graphics\required\input\diashow.odp")
1140 printlog "check if the document is writable"
1141 if fIsDocumentWritable = false then
1142 printlog "make the document writable and check if it's succesfull"
1143 if fMakeDocumentWritable = false then
1144 warnlog " The document can't be make writeable. Test stopped."
1149 if Navigator.exists then
1150 printlog "close navigator"
1153 printlog "Navigator: NOT available"
1155 printlog "View->Workspace->Slides View"
1156 ViewWorkspaceSlidesView
1159 printlog "Selecting 2nd slide"
1160 SlidesControl.TypeKeys "<PAGEDOWN>"
1161 printlog "Hiding 2nd slide"
1163 printlog "Selecting 4th slide"
1164 SlidesControl.TypeKeys "<PAGEDOWN>" ,2
1165 printlog "Hiding 4th slide"
1169 printlog "View->Workspace->Drawing View"
1170 ViewWorkspaceDrawingView
1171 kontext "DocumentImpress"
1172 DocumentImpress.TypeKeys "<HOME>"
1174 printlog "SlideShow->Slide Show Settings..."
1175 SlideShowPresentationSettings
1176 Kontext "Bildschirmpraesentation"
1178 printlog "check Radio button 'Type': 'Window'"
1181 printlog "close dialog 'Slide Show' with OK "
1182 Bildschirmpraesentation.OK
1183 printlog "start the slideshow with 'Slide Show->Slide Show'"
1186 kontext "DocumentPresentation"
1187 printlog "type the key [MOD1 SHIFT F5] to open the navigator" '--------------------------------------------------------------------------
1188 DocumentPresentation.TypeKeys "<MOD1 SHIFT F5>"
1190 kontext "NavigatorDraw"
1192 if ((i mod 2) = 1) then ' for all odd numbers (ungerade) do
1193 printlog "Getting slide names"
1194 fGetSlideName(saSlideNames(i))
1195 kontext "DocumentPresentation"
1196 DocumentPresentation.TypeKeys "<pagedown>"
1199 Kontext "NavigatorDraw"
1200 if NavigatorDraw.exists (5) then
1202 printlog "check in list, if the page changed"
1203 if ((i mod 2) = 1) then ' for all odd numbers (ungerade) do
1204 if i = Liste.GetSelIndex then
1205 qaerrorlog "the Navigator didn't update!"
1209 warnlog " Navigator doesn't exist?!?!?"
1214 Kontext "DocumentPresentation"
1215 DocumentPresentation.TypeKeys "<pagedown>"
1217 DocumentPresentation.TypeKeys "<pagedown>"
1220 DocumentPresentation.MouseDown 50,50
1221 DocumentPresentation.MouseUp 50,50 'This one works to recognice the not ending.
1222 warnlog " Presentation did NOT END!!!"
1224 printlog " ended right."
1228 if Navigator.exists then
1229 printlog "close navigator !"
1232 printlog "Navigator: NOT available"
1236 endcase 'tSlideShowShowHideSlide
1238 '------------------------------------------------------------------------------