diff options
Diffstat (limited to 'testautomation/graphics/optional/includes/impress/i_us_present.inc')
-rw-r--r-- | testautomation/graphics/optional/includes/impress/i_us_present.inc | 388 |
1 files changed, 147 insertions, 241 deletions
diff --git a/testautomation/graphics/optional/includes/impress/i_us_present.inc b/testautomation/graphics/optional/includes/impress/i_us_present.inc index 599f89abe4f1..ea0d1ff3af2d 100644 --- a/testautomation/graphics/optional/includes/impress/i_us_present.inc +++ b/testautomation/graphics/optional/includes/impress/i_us_present.inc @@ -31,20 +31,36 @@ '* '\******************************************************************** -testcase i_us_presentation1 +testcase i_us_presentation - dim iPictures as integer - dim PresentationFile1 as string + dim iPictures as integer 'variable for the number of the used picture gallery theme + dim iAnimations as Integer 'variable used for the number of the used animation gallery theme + dim iSize as integer 'step variable + dim sFileName as string 'name for ppt export file + dim iKeyStroke as integer 'counter variable for hitting space in running presentation + dim PresentationFile as string 'variable for the file name - PresentationFile1 = ConvertPath( gOfficePath + "user\work\PowerPes1.odp" ) - printlog "New impress document" + PresentationFile = ConvertPath( gOfficePath + "user\work\PowerPres1.odp" ) + printlog "Setting up an impress document in several steps..." + printlog "1. New impress document" Call hNewDocument - Call sSelectEmptyLayout + Kontext "DocumentImpress" + printlog "Selecting layout: Centered Text" + DocumentImpress.UseMenu + hMenuSelectNr (5) + hMenuSelectNr (13) + printlog "Changing focus to TaskPane." + sleep 1 + Kontext "Tasks" + printlog "to get to the very first position" + LayoutsPreview.TypeKeys "<HOME>" + printlog "'to get to the right position" + LayoutsPreview.TypeKeys "<RIGHT>", 5 + LayoutsPreview.TypeKeys "<RETURN>" WaitSlot (2000) kontext "DocumentImpress" - - printlog "Add second Master-Page " + printlog "Add a second Master-Page " ViewMasterPage kontext "Slides" SlidesControl.OpenContextMenu(true) @@ -56,6 +72,7 @@ testcase i_us_presentation1 printlog "set background to picture(Gallery)" Kontext "Gallery" + if Gallery.Exists(2) then warnlog "The Gallery was already visible. Check earlier ran tests for inconsistency." sleep (2) @@ -110,20 +127,22 @@ testcase i_us_presentation1 MenuSelect 27353 sleep (2) Kontext "ExportierenDlg" + if ExportierenDlg.IsVisible(5) then printlog "Gallery-object correctly copied into Slide." ExportierenDlg.Close WaitSlot (2000) end if + kontext "GraphicObjectbar" + if GraphicObjectbar.Exists(5) = FALSE then kontext "DocumentImpress" ViewToolbarsPicture end if - kontext "Gallery" - Gallerys.Select (iPictures) - printlog " 50% Transparency" + kontext "GraphicObjectbar" + printlog "50% Transparency" WaitSlot (2000) kontext "GraphicObjectbar" Transparenz.SetText "50" @@ -139,9 +158,10 @@ testcase i_us_presentation1 Height.SetText "16" Mosaic.OK else - warnlog( "Dialog <Mosaic> did not open" ) + warnlog "Dialog did not came up." endif kontext "GraphicFilterBar" + printlog "Closing dialog and Gallery." GraphicFilterBar.Close ToolsGallery WaitSlot (1000) @@ -149,13 +169,12 @@ testcase i_us_presentation1 gMouseClick 50,50 sleep (1) FormatPositionAndSize - kontext if ( Active.exists( 2 ) ) then active.setPage(TabPositionAndSize) kontext "TabPositionAndSize" - Width.SetText "15" - Height.SetText "11" + Width.SetText "28" + Height.SetText "21" SizePosition.TypeKeys "<RIGHT><DOWN>" TabPositionAndSize.OK else @@ -164,31 +183,26 @@ testcase i_us_presentation1 printlog "Close Master" hUseAsyncSlot( "ViewNormal" ) - + kontext "DocumentImpress" + printlog "Inserting title on first slide." + DocumentImpress.TypeKeys "<TAB>" + DocumentImpress.TypeKeys "<RETURN>" + DocumentImpress.TypeKeys "WELCOME!" + DocumentImpress.TypeKeys "<ESCAPE>", 2 + sleep 1 printlog "Save Document" - call hFileSaveAsKill (PresentationFile1) - + call hFileSaveAsKill (PresentationFile) ActiveDeactivateCTLSupport (FALSE) - printlog "Close Document" hFileCloseAll() -endcase 'i_us_presentation1 - -'------------------------------------------------------------------------------- + printlog "-------------------------------------------------------------------------------" -testcase i_us_presentation2 - - dim PresentationFile1 as string - dim PresentationFile2 as string - - PresentationFile1 = ConvertPath( gOfficePath + "user\work\PowerPes1.odp" ) - PresentationFile2 = ConvertPath( gOfficePath + "user\work\PowerPes2.odp" ) - - if ( FileExists( PresentationFile1 ) ) then 'if file exists... - hFileOpen (PresentationFile1) + printlog "2. Loading file again..." + if ( FileExists(PresentationFile) ) then 'if file exists... + hFileOpen (PresentationFile) else - warnlog " This test is supposed to run after the previous testcase has been run. Notify the Automatic-tester." + warnlog "Testdoc is missing or did not get saved." goto endsub end if sleep (2) @@ -197,55 +211,46 @@ testcase i_us_presentation2 SlidesControl.TypeKeys( "<PAGEDOWN>", 3 ) SlidesControl.TypeKeys "<SHIFT F10>" 'OpenContextMenu(true) sleep (1) - MenuSelect(MenuGetItemID(1)) 'New Slide 'No 2 - printlog " Inserted second normal Slide" - call sSelectEmptyLayout - printlog "2. Layouts: Text. Bild: Gallery: Animation - Gif" + printlog "Inserted second normal Slide" + printlog "Select 4th Layout: Title and 2 Content blocks" Kontext "Tasks" printlog "to get to the very first position" LayoutsPreview.TypeKeys "<HOME>" printlog "'to get to the right position" - LayoutsPreview.TypeKeys "<RIGHT>", 9 + LayoutsPreview.TypeKeys "<RIGHT>", 3 LayoutsPreview.TypeKeys "<RETURN>" - hUseAsyncSlot( "ViewNormal" ) - - printlog "3. Hide Slidepane (Oops! The user were too fast: accidently hide the pane)" + printlog "Hide Slidepane (Oops! The user were too fast: accidently hide the pane)" kontext "Slides" SlidesControl.FadeOut WaitSlot (1000) - - printlog "4. Restore Pane." + printlog "Restore Pane." SlidesControl.FadeIn - - printlog " Did the 'mistake' to FadeIn/Out the Slidepane" - -InsertGraphicsFromFile -Kontext "GrafikEinfuegenDlg" -if GrafikEinfuegenDlg.exists(5) then -printlog " The Insertgraphics-dialogue showed up correctly." -sleep (5) -else -warnlog " The Insertgraphics-dialogue didn't show up." -endif + printlog "Did the 'mistake' to FadeIn/Out the Slidepane" + InsertGraphicsFromFile + Kontext "GrafikEinfuegenDlg" + if GrafikEinfuegenDlg.exists(5) then + printlog " The Insertgraphics-dialogue showed up correctly." + sleep (5) + else + warnlog " The Insertgraphics-dialogue didn't show up." + endif printlog "Graphics-Import-dialogue. Select i_us_large.jpg" Kontext "GrafikEinfuegenDlg" - if ( GrafikEinfuegenDlg.exists( 2 ) ) then + if ( GrafikEinfuegenDlg.exists( 2 ) ) then Dateiname.SetText ConvertPath (gTesttoolPath + "graphics\required\input\i_us_large.jpg") Oeffnen.Click - Kontext "DocumentImpress" printlog "Deselect graphic" - DocumentImpress.MouseDoubleClick 90,90 - printlog " Inserted Graphic into the second Slide" - + DocumentImpress.TypeKeys "<ESCAPE>" + printlog "Inserted Graphic into the second Slide" printlog "Change text on the two text-boxes" DocumentImpress.TypeKeys "<TAB>" 'First text. DocumentImpress.TypeKeys "<RETURN>" 'To get into edit-mode. - DocumentImpress.TypeKeys "The World has just become a bit easier" + DocumentImpress.TypeKeys "The World has just become easier now.." DocumentImpress.TypeKeys "<ESCAPE><ESCAPE>" DocumentImpress.TypeKeys "<TAB><TAB><TAB>" DocumentImpress.TypeKeys "<RETURN>" @@ -253,9 +258,9 @@ endif DocumentImpress.TypeKeys "<RETURN>" DocumentImpress.TypeKeys "Very durable" DocumentImpress.TypeKeys "<RETURN>" - DocumentImpress.TypeKeys "Priced lower than its predecessor!" + DocumentImpress.TypeKeys "Priced lower!" DocumentImpress.TypeKeys "<RETURN>" - DocumentImpress.TypeKeys "Sexy" + DocumentImpress.TypeKeys "Astonishing!" DocumentImpress.TypeKeys "<RETURN>" DocumentImpress.TypeKeys "Energy-efficient" DocumentImpress.TypeKeys "<ESCAPE><ESCAPE>" @@ -264,52 +269,36 @@ endif endif printlog "Save Document" - call hFileSaveAsKill (PresentationFile2) - - ActiveDeactivateCTLSupport (FALSE) - + call hFileSaveAsKill (PresentationFile) printlog "Close Document" hFileCloseAll() -endcase 'i_us_presentation2 - -'------------------------------------------------------------------------------- + printlog "-------------------------------------------------------------------------------" -testcase i_us_presentation3 - - dim PresentationFile2 as string - dim PresentationFile3 as string - - PresentationFile2 = ConvertPath( gOfficePath + "user\work\PowerPes2.odp" ) - PresentationFile3 = ConvertPath( gOfficePath + "user\work\PowerPes3.odp" ) - - if ( FileExists( PresentationFile2 ) ) then 'if file exists... - hFileOpen( PresentationFile2 ) + printlog "3. Loading file again.." + if ( FileExists(PresentationFile) ) then 'if file exists... + hFileOpen(PresentationFile) else - warnlog " This test is supposed to run after the previous testcase has been run. Notify the Automatic-tester." + warnlog "Testdoc is missing or did not get saved." goto endsub end if - printlog "Insert New Slide" + printlog "Insert New Slide, 3rd one" kontext "slides" SlidesControl.TypeKeys( "<PAGEDOWN>", 3 ) - kontext "DocumentImpress" - InsertSlide 'No 3 - - printlog "5. Layout. Clip/Text" + InsertSlide + printlog "5. Layout. Title only" kontext "Tasks" LayoutsPreview.TypeKeys "<HOME>" 'to get to the very first position LayoutsPreview.TypeKeys "<RIGHT>", 4 'to get to the right position LayoutsPreview.TypeKeys "<RETURN>" - hUseAsyncSlot( "ViewNormal" ) - kontext "DocumentImpress" Call gMouseClick 50,50 DocumentImpress.TypeKeys "<TAB><RETURN>" DocumentImpress.TypeKeys "A new form" - + DocumentImpress.TypeKeys "<ESCAPE>", 2 printlog "6. (Fat picture) InsertPictureFromFile: (empty slide) (ev size-fit)" printlog "insert graphic file (i_us_large.jpg)" InsertGraphicsFromFile @@ -320,39 +309,21 @@ testcase i_us_presentation3 Oeffnen.Click WaitSlot (2000) Kontext "DocumentImpress" - printlog "The user corrects the picture" DocumentImpress.MouseDown 50,50 DocumentImpress.MouseUp 50,50 DocumentImpress.TypeKeys "<DOWN>", 30 - printlog "Deselect graphic" DocumentImpress.MouseDoubleClick 90,90 - - printlog " Wrote Text, Inserted Graphic, and moved it in the third Slide" - + printlog "Wrote Text, Inserted Graphic, and moved it in the third Slide" printlog "Save Document" - call hFileSaveAsKill (PresentationFile3) - - ActiveDeactivateCTLSupport (FALSE) - + call hFileSaveAsKill (PresentationFile) printlog "Close Document" hFileCloseAll() -endcase 'i_us_presentation3 - -'------------------------------------------------------------------------------- - -testcase i_us_presentation4 - - dim PresentationFile3 as string - dim PresentationFile4 as string - dim iAnimations as Integer - dim iSize as integer - - PresentationFile3 = ConvertPath( gOfficePath + "user\work\PowerPes3.odp" ) - PresentationFile4 = ConvertPath( gOfficePath + "user\work\PowerPes4.odp" ) + printlog "-------------------------------------------------------------------------------" + printlog "4. reopening file..." select case iSprache case 01 : iAnimations = 01 'English case 07 : iAnimations = 01 'Russian @@ -373,167 +344,126 @@ testcase i_us_presentation4 warnlog "Please insert the entrienumbers for 'Backgrounds'. Language: " + iSprache end select - if ( FileExists( PresentationFile3 ) ) then 'if file exists... - hFileOpen( PresentationFile3 ) + if ( FileExists(PresentationFile) ) then 'if file exists... + hFileOpen( PresentationFile) else - warnlog " This test is supposed to run after the previous testcase has been run. Notify the Automatic-tester." + warnlog "Testdoc is missing or did not get saved." goto endsub end if kontext "slides" SlidesControl.TypeKeys( "<PAGEDOWN>", 5 ) - kontext "DocumentImpress" printlog "insert slide no 4" hUseAsyncSlot( "InsertSlide" ) - printlog "Background: picture (Gallery)" Kontext "Gallery" + if ( Not Gallery.Exists() ) then ToolsGallery end if kontext "Gallery" + if ( Gallery.exists( 2 ) ) then Gallerys.Select (iAnimations) kontext "Gallery" View.TypeKeys "<HOME><RIGHT><RIGHT>" - wait( 200 ) + sleep 1 View.TypeKeys "<SHIFT F10>" 'OpenContextMenu - wait( 200 ) + sleep 1 MenuSelect(MenuGetItemID(1)) 'Insert - wait( 200 ) + sleep 1 MenuSelect(MenuGetItemID(1)) 'Copy else warnlog( "Could not access Gallery" ) endif - printlog "Check that we really got a copy of the object" + sleep 1 kontext "DocumentImpress" - DocumentImpress.OpenContextMenu(true) - WaitSlot (1000) - MenuSelect 27353 - - Kontext "ExportierenDlg" - if ( ExportierenDlg.exists( 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 - + DocumentImpress.TypeKeys "<UP>", 75 + DocumentImpress.TypeKeys "<LEFT>", 100 printlog "Deselect graphic" DocumentImpress.MouseDoubleClick 90,90 - printlog "Close the Gallery" ToolsGallery - printlog "Change Text on slide" DocumentImpress.TypeKeys "<TAB>" DocumentImpress.TypeKeys "<RETURN>" - DocumentImpress.TypeKeys "The process starts to flourish" + DocumentImpress.TypeKeys "The process starts here.." DocumentImpress.TypeKeys "<ESCAPE><ESCAPE>" gMouseClick 50,50 - - ActiveDeactivateCTLSupport (TRUE) - printlog( "Decrease..." ) - for iSize = 100 to 25 step -25 + + for iSize = 80 to 20 step -20 CreateTextSetEffectAndAngle - DocumentImpress.TypeKeys "<DOWN>", 80 + DocumentImpress.TypeKeys "<DOWN>", 70 DocumentImpress.TypeKeys "<LEFT>", iSize gMouseClick 90,90 next iSize printlog( "Increase..." ) - for iSize = 25 to 100 step 25 + + for iSize = 20 to 80 step 20 CreateTextSetEffectAndAngle - DocumentImpress.TypeKeys "<DOWN>", 80 - DocumentImpress.TypeKeys "<LEFT>", iSize + DocumentImpress.TypeKeys "<DOWN>", 70 + DocumentImpress.TypeKeys "<RIGHT>", iSize gMouseClick 90,90 next iSize - printlog " Inserted fourth slide with Gallery-object." - + printlog "Inserted fourth slide with Gallery-object." + printlog "Switching back task pane to default..." + Kontext "DocumentImpress" + DocumentImpress.UseMenu + hMenuSelectNr (5) + hMenuSelectNr (13) printlog "Save Document" - call hFileSaveAsKill (PresentationFile4) - - ActiveDeactivateCTLSupport (FALSE) - + call hFileSaveAsKill (PresentationFile) printlog "Close Document" hFileCloseAll() -endcase 'i_us_presentation4 + printlog "-------------------------------------------------------------------------------" -'------------------------------------------------------------------------------- - -testcase i_us_presentation5 - - dim PresentationFile4 as string - dim PresentationFile5 as string - - PresentationFile4 = ConvertPath( gOfficePath + "user\work\PowerPes4.odp" ) - PresentationFile5 = ConvertPath( gOfficePath + "user\work\PowerPes5.odp" ) - - if ( FileExists( PresentationFile4 ) ) then 'if file exists... - hFileOpen( PresentationFile4 ) + printlog "5. reloading file..." + if ( FileExists(PresentationFile) ) then + hFileOpen(PresentationFile) else - warnlog " This test is supposed to run after the previous testcase has been run. Notify the Automatic-tester." + warnlog "Testdoc is missing or did not get saved." goto endsub end if kontext "slides" SlidesControl.TypeKeys( "<PAGEDOWN>", 7 ) - kontext "DocumentImpress" - printlog "8. New Slide. (Insert Menu) (Duplicate slide)" - InsertDuplicateSlide 'No 5 + printlog "New Slide. (Insert Menu) (Duplicate slide)" + InsertDuplicateSlide printlog "Change the text in some way. (the user is making a joke with the audience)" gMouseClick 90,90 DocumentImpress.TypeKeys "<TAB>" DocumentImpress.TypeKeys "<RETURN>" hUseAsyncSlot( "EditSelectAll" ) DocumentImpress.TypeKeys "And does it with strength..." - - printlog " Inserted fifth slide with audience-joke." - + printlog "Inserted fifth slide with audience-joke." printlog "Save Document" - call hFileSaveAsKill (PresentationFile5) - - ActiveDeactivateCTLSupport (FALSE) - + call hFileSaveAsKill (PresentationFile) printlog "Close Document" hFileCloseAll() -endcase 'i_us_presentation5 - -'------------------------------------------------------------------------------- - -testcase i_us_presentation6 - - dim PresentationFile5 as string - dim PresentationFile6 as string + printlog "-------------------------------------------------------------------------------" - PresentationFile5 = ConvertPath( gOfficePath + "user\work\PowerPes5.odp" ) - PresentationFile6 = ConvertPath( gOfficePath + "user\work\PowerPes6.odp" ) - - if ( FileExists( PresentationFile5 ) ) then 'if file exists... - hFileOpen( PresentationFile5 ) + printlog "6. reloading file..." + if ( FileExists(PresentationFile) ) then 'if file exists... + hFileOpen(PresentationFile) else - warnlog " This test is supposed to run after the previous testcase has been run. Notify the Automatic-tester." + warnlog "Testdoc is missing or did not get saved." goto endsub end if kontext "slides" SlidesControl.TypeKeys( "<PAGEDOWN>", 6 ) - kontext "DocumentImpress" - printlog "9. Q&A Slide" + printlog "Q&A Slide" InsertSlide WaitSlot (1000) kontext "DocumentImpress" @@ -542,15 +472,15 @@ testcase i_us_presentation6 DocumentImpress.TypeKeys "Q&A" DocumentImpress.TypeKeys "<SHIFT HOME>" wait( 500 ) - Kontext "TextObjectbar" + if ( not TextObjectbar.Exists() ) then ViewToolbarsTextFormatting end if Kontext "TextObjectbar" wait( 500 ) - Printlog "- Change size of font" + Printlog "Change size of font" Schriftgroesse.Select "26" Schriftgroesse.TypeKeys "<RETURN>" Fett.Click @@ -560,77 +490,59 @@ testcase i_us_presentation6 Auswahl.Click gMouseClick 60,60 hUseAsyncSlot( "EditSelectAll" ) - DocumentImpress.TypeKeys "<DOWN>", 50 kontext "DocumentImpress" - printlog " Inserted sixth slide with Q&A." - + printlog "Inserted sixth slide with Q&A." printlog "Save Document" - call hFileSaveAsKill (PresentationFile6) - - ActiveDeactivateCTLSupport (FALSE) - + call hFileSaveAsKill (PresentationFile) printlog "Close Document" hFileCloseAll() -endcase 'i_us_presentation6 - -'------------------------------------------------------------------------------- - -testcase i_us_presentation7 - - const KEY_STROKE_REPEAT = 8 + printlog "-------------------------------------------------------------------------------" - dim sFilter as string - dim sFileName as string - dim PresentationFile6 as string - dim PresentationFile7 as string - dim iKeyStroke as integer + printlog "7. reloading file..." + sFileName = ConvertPath( gOfficePath + "user\work\export-test.ppt" ) - PresentationFile6 = ConvertPath( gOfficePath + "user\work\PowerPes6.odp" ) - PresentationFile7 = ConvertPath( gOfficePath + "user\work\PowerPes7.odp" ) - sFileName = ConvertPath( gOfficePath + "user\work\export-test.ppt" ) - - if ( FileExists( PresentationFile6 ) ) then 'if file exists... - hFileOpen( PresentationFile6 ) + if ( FileExists(PresentationFile) ) then 'if file exists... + hFileOpen(PresentationFile) else - warnlog " This test is supposed to run after the previous testcase has been run. Notify the Automatic-tester." + warnlog "Testdoc is missing or did not get saved." goto endsub end if kontext "slides" - SlidesControl.TypeKeys( "<PAGEDOWN>", KEY_STROKE_REPEAT ) - + SlidesControl.TypeKeys( "<PAGEDOWN>",7) kontext "DocumentImpress" - printlog " inserting Ending Slide" + printlog "inserting Ending Slide" InsertSlide 'No 7 - DocumentImpress.TypeKeys "Ende" - printlog " Inserted ending -slide." - + DocumentImpress.TypeKeys "End" + printlog "Inserted ending -slide." Kontext "Gallery" + if Gallery.Exists(2) then - warnlog " The Gallery was visible. Closed it. Check earlier ran tests for inconsistency." + 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 + + for i = 1 to 8 sleep 1 SlidesControl.TypeKeys "<PAGEUP>" next i - SlidesControl.TypeKeys "<RETURN>" 'At the first slide hTypeKeys "<F5>" - kontext "DocumentPresentation" - for iKeyStroke = 1 to KEY_STROKE_REPEAT + + for iKeyStroke = 1 to 8 wait( 3000 ) DocumentPresentation.TypeKeys "<PAGEDOWN>" wait( 2000 ) next iKeyStroke kontext "DocumentPresentation" + if ( DocumentPresentation.notExists( 5 ) ) then printlog( "Presentation closed. Good." ) else @@ -647,17 +559,15 @@ testcase i_us_presentation7 kontext "DocumentImpress" printlog "Save Document" - call hFileSaveAsKill (PresentationFile7) - + call hFileSaveAsKill (PresentationFile) printlog( "Save as Powerpoint-file (Using filter at pos. 5 in the filter list)" ) FileSaveAs - Kontext "SpeichernDlg" - if ( SpeichernDlg.exists( 2 ) ) then + if ( SpeichernDlg.exists( 2 ) ) then Dateiname.SetText sFileName Dateityp.Select 5 ' Powerpoint (possibly) - printlog "Trying to save with filter: " + Dateityp.GetSelText + sFilter(5) + printlog "Trying to save with filter: " + Dateityp.GetSelText Speichern.Click Kontext "Messagebox" @@ -671,15 +581,11 @@ testcase i_us_presentation7 printlog "Close all open documents" hFileCloseAll() - printlog( "Reload file: " & sFileName ) hFileOpen sFileName sleep( 3 ) - printlog "Close the office-session" - ActiveDeactivateCTLSupport (FALSE) - printlog "Close Documents" hFileCloseAll() -endcase 'i_us_presentation7 +endcase 'i_us_presentation
\ No newline at end of file |