diff options
Diffstat (limited to 'testautomation/graphics')
44 files changed, 4285 insertions, 4384 deletions
diff --git a/testautomation/graphics/optional/includes/global/export_graphic.inc b/testautomation/graphics/optional/includes/global/export_graphic.inc index 7c16129e41ae..e1d1479f5ee1 100644 --- a/testautomation/graphics/optional/includes/global/export_graphic.inc +++ b/testautomation/graphics/optional/includes/global/export_graphic.inc @@ -27,106 +27,81 @@ '* '* Owner : wolfram.garten@sun.com '* -'* short description : Graphics Export A-tests. (More durable ones) -'* -'******************************************************************************* -'* -' #1 tEPS -' #1 tGIF -' #1 tJPEG -' #1 tPBM -' #1 tPCT -' #1 tPGM -' #1 tPPM -' #1 tRAS -' #1 tTIFF -' #1 tXPM +'* short description : Graphics Export A-tests '* '\****************************************************************************** + testcase tEPS dim x as integer dim i as integer - dim sFilter as string - dim sExt as string - sFilter = "EPS - Encapsulated PostScript (.eps)" - sExt = ".eps" + const sFilter = "EPS - Encapsulated PostScript (.eps)" + const sExt = ".eps" printlog "open the document" - hFileOpen ConvertPath ( gTesttoolPath + "graphics\required\input\graphicexport."+ExtensionString) + hFileOpen( gTesttoolPath + "graphics\required\input\graphicexport." + ExtensionString ) - if hCallExport (OutputGrafikTBO , sFilter ) = TRUE then + if ( hCallExport ( OutputGrafikTBO , sFilter ) ) then Kontext "EPSOptionen" - if EPSOptionen.Exists (2) then + if ( EPSOptionen.Exists( 2 ) ) then printlog "check if all properties have the right count, and depend on each other" ' they do not affect annything, i can check (TBO) ' VorschauTIF.Check ' InterchangeEPSI.Check Level1.Check if Farbe.IsEnabled then warnlog " :-(" - if Graustufen.IsEnabled then warnlog " :-(" - if LZWKodierung.IsEnabled then warnlog " :-(" - if Keine.IsEnabled then warnlog " :-(" - ' if (TextEinstellungen.IsEnabled <> TRUE) then warnlog " :-(" - Level2.Check - if (Farbe.IsEnabled <> TRUE) then warnlog " :-(" - if (Graustufen.IsEnabled <> TRUE) then warnlog " :-(" - if (LZWKodierung.IsEnabled <> TRUE) then warnlog " :-(" - if (Keine.IsEnabled <> TRUE) then warnlog " :-(" - ' if (TextEinstellungen.IsEnabled <> TRUE) then warnlog " :-(" - printlog "'Color Resolution' listbox contains eight items" - ' x = TextEinstellungen.GetItemCount - ' if x <> 2 then warnlog "'TextEinstellungen' Count is wrong; should:2, is:" + x - ' for i = 1 to x - ' TextEinstellungen.Select i - ' sleep 1 - ' Printlog " - " + i + ": '" +TextEinstellungen.GetSelText + "'" - ' next i - printlog "leave dialog with cancel -> there has to be no file created!" - EPSOptionen.Cancel - sleep 5 - if ( dir(OutputGrafikTBO+sExt) = "") then ' inspired by bug #99932 Graphic is exported though cancel is pressed - Printlog "Ok :-)" - else - warnlog "Dialog was canceled, but file got saved, too :-( - i35177" - endif - else - Warnlog "No '" + sFilter + "'-Option-Dialog!" - i=5 - end if - sleep 2 - Kontext "Active" - if Active.Exists(2) then - Warnlog "'" + sFilter + "' has a problem" - Active.OK - end if - end if - printlog " now save it realy and load the file afterwards" - if hCallExport (OutputGrafikTBO , sFilter ) = TRUE then - Kontext "EPSOptionen" - if EPSOptionen.Exists (2) then - printlog "TextEinstellungen.select 2" - EPSOptionen.OK - sleep 5 - endif - if ( dir(OutputGrafikTBO+sExt) <> "") then - Printlog "Ok :-) Saved as: '" + OutputGrafikTBO+sExt + "'" - else - warnlog "File didn't get saved :-(" - endif - hCloseDocument () - sleep 5 - hNewDocument() - sleep 5 - if ( lcase( gPlatform ) <> "osx" ) then - Call hGrafikEinfuegen ( OutputGrafikTBO+sExt ) - else - qaErrorLog "#i100253# crash on MacOS X 10.4" + if Graustufen.IsEnabled then warnlog " :-(" + if LZWKodierung.IsEnabled then warnlog " :-(" + if Keine.IsEnabled then warnlog " :-(" + ' if (TextEinstellungen.IsEnabled <> TRUE) then warnlog " :-(" + Level2.Check + if (Farbe.IsEnabled <> TRUE) then warnlog " :-(" + if (Graustufen.IsEnabled <> TRUE) then warnlog " :-(" + if (LZWKodierung.IsEnabled <> TRUE) then warnlog " :-(" + if (Keine.IsEnabled <> TRUE) then warnlog " :-(" + ' if (TextEinstellungen.IsEnabled <> TRUE) then warnlog " :-(" + printlog "'Color Resolution' listbox contains eight items" + ' x = TextEinstellungen.GetItemCount + ' if x <> 2 then warnlog "'TextEinstellungen' Count is wrong; should:2, is:" + x + ' for i = 1 to x + ' TextEinstellungen.Select i + ' sleep 1 + ' Printlog " - " + i + ": '" +TextEinstellungen.GetSelText + "'" + ' next i + printlog "leave dialog with cancel -> there has to be no file created!" + hCloseDialog( EPSOptionen, "cancel" ) + + if ( FileExists( OutputGrafikTBO+sExt ) ) then ' inspired by bug #99932 Graphic is exported though cancel is pressed + warnlog "Dialog was canceled, but file got saved, too :-( - i35177" + endif + else + warnlog( "No export options dialog was displayed" ) + end if + + Kontext "Active" + if Active.Exists(2) then + Warnlog "'" + sFilter + "' has a problem" + Active.OK + end if + end if + + printlog( "Save the file" ) + if ( hCallExport( OutputGrafikTBO, sFilter ) ) then + + Kontext "EPSOptionen" + if ( EPSOptionen.Exists( 2 ) ) then + printlog "TextEinstellungen.select 2" + hCloseDialog( EPSOptionen, "ok" ) + else + warnlog( "No export options dialog was displayed" ) + endif + + printlog( "Close file and re-insert graphics into new document" ) + hInsertGraphicsToNewFile( OutputGrafikTBO + sExt ) ' local helper function, see bottom of this file endif - endif - call hCloseDocument + call hCloseDocument endcase 'tEPS '------------------------------------------------------------------------- @@ -135,8 +110,6 @@ testcase tPCT dim x as integer dim i as integer dim iWaitIndex as integer - dim sFilter as string - dim sExt as string dim bTemp as boolean dim sX as string dim sY as string @@ -144,224 +117,205 @@ testcase tPCT dim sX2 as string dim sY2 as string dim sDocument as string + dim sOutputFile as string + + const FILE_WRITE_TIMEOUT = 200 ' seconds - sFilter = "PCT - Mac Pict (.pct;.pict)" - sExt = ".pct" + const sFilter = "PCT - Mac Pict (.pct;.pict)" + const sExt = ".pct" printlog "open the document" - sDocument = ConvertPath ( gTesttoolPath + "graphics\required\input\graphicexport."+ExtensionString) - hFileOpen sDocument + sDocument = convertpath( gTesttoolPath + "graphics\required\input\graphicexport." + ExtensionString ) + hFileOpen( sDocument ) + + if ( hCallExport( OutputGrafikTBO , sFilter ) ) then - if hCallExport (OutputGrafikTBO , sFilter ) = TRUE then Kontext "PICTOptionen" - if PICTOptionen.Exists (2) then + printlog( "Export options dialog" ) + if ( PICTOptionen.Exists( 2 ) ) then + printlog "check if all properties have the right count, and depend on each other" Original.Check if Breite.IsEnabled then warnlog " :-(" - if Hoehe.IsEnabled then warnlog " :-(" - Groesse.Check - Breite.More - Hoehe.Less - printlog "leave dialog with cancel -> there has to be no file created!" - PICTOptionen.Cancel - sleep 5 - if ( dir(OutputGrafikTBO+sExt) = "") then - Printlog "Ok :-)" - else - warnlog "Dialog was canceled, but file got saved, too :-( - i35177" - endif - else - Warnlog "No '" + sFilter + "' -Dialog!" - i=5 - end if - sleep 2 - Kontext "Active" - if Active.Exists(2) then - Warnlog " '" + sFilter + "' has a problem" - Active.OK - end if - end if - printlog " now save it realy and load the file afterwards" - if hCallExport (OutputGrafikTBO , sFilter ) = TRUE then - Kontext "PICTOptionen" - if PICTOptionen.Exists (2) then - Groesse.Check - Breite.Less - Hoehe.More - PICTOptionen.OK - iWaitIndex = 0 - do while PICTOptionen.Exists AND iWaitIndex < 30 - sleep (1) - iWaitIndex = iWaitIndex + 1 - loop - endif - i=0 - while ((NOT fileExists(OutputGrafikTBO+sExt)) AND (i<36)) - inc(i) - sleep(5) - wend - if ( dir(OutputGrafikTBO+sExt) <> "") then - Printlog "Ok :-) Saved as: '" + OutputGrafikTBO+sExt + "'" - else - warnlog "File didn't get saved :-(" - endif - hCloseDocument () - sleep 5 - hNewDocument() - sleep 5 - Call hGrafikEinfuegen ( OutputGrafikTBO+sExt ) - endif - hCloseDocument () - printlog " now save a SELECTION in ORIGINAL SIZE and load the file afterwards" - hFileOpen (sDocument) - sleep (10) - - printlog "check if the document is writable" - if fIsDocumentWritable = false then - printlog "make the document writable and check if it's succesfull" - if fMakeDocumentWritable = false then - warnlog "The document can't be make writeable. Test stopped." - goto endsub - endif + if Hoehe.IsEnabled then warnlog " :-(" + Groesse.Check + Breite.More + Hoehe.Less + + printlog "leave dialog with cancel -> there has to be no file created!" + hCloseDialog( PICTOptionen, "cancel" ) + + if ( FileExists( OutputGrafikTBO + sExt ) ) then + warnlog( "#i35177# - dialog <PictOptions> canceled, still the file was saved" ) endif + else + warnlog( "No export options dialog was displayed" ) + end if + + Kontext "Active" + if Active.Exists(2) then + Warnlog " '" + sFilter + "' has a problem" + Active.OK + end if - hTypeKeys ("<escape><tab>") - fGetSizeXY sx1, sY, TRUE - if hCallExport (OutputGrafikTBO + "1" , sFilter, TRUE ) = TRUE then - Kontext "PICTOptionen" - if PICTOptionen.Exists (2) then - Original.Check - PICTOptionen.OK - iWaitIndex = 0 - do while PICTOptionen.Exists AND iWaitIndex < 30 - sleep (1) - iWaitIndex = iWaitIndex + 1 - loop - endif - i=0 - while ((NOT fileExists(OutputGrafikTBO+ "1"+sExt)) AND (i<36)) - inc(i) - sleep(5) - wend - if ( dir(OutputGrafikTBO + "1"+sExt) <> "") then - Printlog "Ok :-) Saved as: '" + OutputGrafikTBO + "1"+sExt + "'" + end if + + printlog " now save it realy and load the file afterwards" + if ( hCallExport( OutputGrafikTBO, sFilter ) ) then + + Kontext "PICTOptionen" + printlog( "Export options dialog" ) + if ( PICTOptionen.Exists( 2 ) ) then + Groesse.Check + Breite.Less + Hoehe.More + hCloseDialog( PICTOptionen, "ok" ) + else + warnlog( "No export options dialog was displayed" ) + endif + + sOutputFile = OutputGrafikTBO+sExt + + if ( hWaitForOutputFile( sOutputFile ) ) then + + printlog( "Close file and re-insert graphics into new document" ) + hInsertGraphicsToNewFile( sOutputFile ) ' local helper function, see bottom of this file + else + warnlog( "File was not saved: " & sOutputFile ) + endif + + endif + + hFileReOpen( sDocument ) + + printlog "check if the document is writable" + if ( not fIsDocumentWritable ) then + printlog( "Document is write protected, changing state" ) + if ( not fMakeDocumentWritable ) then + warnlog "The document can't be make writeable. Test stopped." + goto endsub + endif + endif + + hTypeKeys ("<escape><tab>") + fGetSizeXY sx1, sY, TRUE + + if ( hCallExport( OutputGrafikTBO + "1", sFilter, TRUE ) ) then + + Kontext "PICTOptionen" + printlog( "Export options dialog" ) + if ( PICTOptionen.Exists( 2 ) ) then + Original.Check + hCloseDialog( PICTOptionen, "ok" ) + else + warnlog( "No export options dialog was displayed" ) + endif + + sOutputFile = OutputGrafikTBO + "1" + sExt + if ( hWaitForOutputFile( sOutputFile ) ) then + printlog( "Close file and re-insert graphics into new document" ) + hInsertGraphicsToNewFile( sOutputFile ) ' local helper function, see bottom of this file + else + warnlog( "File was not saved: " & sOutputFile ) + endif + + bTemp = fGetSizeXY( sx1, sY, bTemp ) + if (bTemp = FALSE) then + warnlog "Selected original size NOT OK :-(" + endif + endif + + hFileReOpen( "" ) + hRechteckErstellen ( 10, 10, 30, 40 ) + + if ( hCallExport( OutputGrafikTBO + "2" , sFilter, TRUE ) ) then + + Kontext "PICTOptionen" + printlog( "Export options dialog" ) + if ( PICTOptionen.Exists( 2 ) ) then + Groesse.Check + Breite.SetText "9" + Hoehe.SetText "9" + Groesse.Check + + printlog "Check 'Size' one more time to make the change go through" + sx1 = Breite.GetText + sY = Hoehe.GetText + hCloseDialog( PICTOptionen, "ok" ) + else + warnlog( "No export options dialog was displayed" ) + endif + + sOutputFile = OutputGrafikTBO + "2" + sExt + + if ( not hWaitForOutputFile( sOutputFile ) ) then + warnlog( "File was not saved: " & sOutputFile ) + endif + + printlog( "Reload file if it exists. Warn if not" ) + hFileReOpen( sOutputFile ) + + kontext "DocumentDraw" + DocumentDraw.TypeKeys ("<escape><tab>") + ContextOriginalSize + bTemp = fGetSizeXY( sx1, sY, bTemp ) + if ( not bTemp ) then warnlog "Selected original size NOT OK :-(" + endif + + if ( hCallExport( OutputGrafikTBO + "3", sFilter, TRUE ) ) then + + Kontext "PICTOptionen" + printlog( "Export options dialog" ) + if ( PICTOptionen.Exists( 2 ) ) then + Groesse.Check + sX2 = Breite.GetText + if (LiberalMeasurement(sx1, sX2)) <> TRUE then + if (val(str(StrToDouble(sx1)+5)) >= StrToDouble(sX2) ) AND (val(str(StrToDouble ( sx1 )-5)) <= StrToDouble ( sX2 )) then + Printlog "Width was ok. Expected: " + sx1 + "' was: '" + sX2 + "'" else - warnlog "File didn't get saved :-(" - endif - hCloseDocument () - sleep 5 - hNewDocument() - sleep 5 - Call hGrafikEinfuegen ( OutputGrafikTBO + "1"+sExt ) - bTemp = FALSE - fGetSizeXY sx1, sY, bTemp - if (bTemp = FALSE) then - warnlog "Selected original size NOT OK :-(" + warnLog "Width is different expected: '" + sx1 + "' is: '" + sX2 + "'" endif endif - hCloseDocument () - printlog " now CREATE a rectangle, select it, save it in SIZE and load the file afterwards" - hNewDocument() - hRechteckErstellen ( 10, 10, 30, 40 ) - if hCallExport (OutputGrafikTBO + "2" , sFilter, TRUE ) = TRUE then - Kontext "PICTOptionen" - if PICTOptionen.Exists (2) then - Groesse.Check - Breite.SetText "9" - Hoehe.SetText "9" - Groesse.Check - printlog "Check 'Size' one more time to make the change go through" - sx1 = Breite.GetText - sY = Hoehe.GetText - PICTOptionen.OK - iWaitIndex = 0 - do while PICTOptionen.Exists AND iWaitIndex < 30 - sleep (1) - iWaitIndex = iWaitIndex + 1 - loop - endif - i=0 - while ((NOT fileExists(OutputGrafikTBO+ "2"+sExt)) AND (i<36)) - inc(i) - sleep(5) - wend - if ( dir(OutputGrafikTBO + "2"+sExt) <> "") then - Printlog "Ok :-) Saved as: '" + OutputGrafikTBO + "2"+sExt + "'" + sY2 = Hoehe.GetText + if (LiberalMeasurement(sY, sY2)) <> TRUE then + if ( val(str(StrToDouble(sY)+5)) >= StrToDouble(sY2) ) AND (val(str(StrToDouble ( sY )-5)) <= StrToDouble ( sY2 )) then + Printlog "Height was ok. Expected: " + sY + "' was: '" + sY2 + "'" else - warnlog "File didn't get saved :-(" - endif - hCloseDocument () - sleep 5 - hFileOpen (OutputGrafikTBO + "2"+sExt) - kontext "DocumentDraw" - DocumentDraw.TypeKeys ("<escape><tab>") - ContextOriginalSize - bTemp = FALSE - fGetSizeXY sx1, sY, bTemp - if (bTemp = FALSE) then - warnlog "Selected original size NOT OK :-(" - endif - endif - if hCallExport (OutputGrafikTBO + "3" , sFilter, TRUE ) = TRUE then - Kontext "PICTOptionen" - if PICTOptionen.Exists (2) then - Groesse.Check - sX2 = Breite.GetText - if (LiberalMeasurement(sx1, sX2)) <> TRUE then - if (val(str(StrToDouble(sx1)+5)) >= StrToDouble(sX2) ) AND (val(str(StrToDouble ( sx1 )-5)) <= StrToDouble ( sX2 )) then - Printlog "Width was ok. Expected: " + sx1 + "' was: '" + sX2 + "'" - else - warnLog "Width is different expected: '" + sx1 + "' is: '" + sX2 + "'" - endif - endif - sY2 = Hoehe.GetText - if (LiberalMeasurement(sY, sY2)) <> TRUE then - if ( val(str(StrToDouble(sY)+5)) >= StrToDouble(sY2) ) AND (val(str(StrToDouble ( sY )-5)) <= StrToDouble ( sY2 )) then - Printlog "Height was ok. Expected: " + sY + "' was: '" + sY2 + "'" - else - warnLog "Height is different expected: '" + sY + "' is: '" + sY2 + "'" - endif - endif - PICTOptionen.Cancel - sleep 5 + warnLog "Height is different expected: '" + sY + "' is: '" + sY2 + "'" endif endif + hCloseDialog( PICTOptionen, "cancel" ) + else + warnlog( "No export options dialog was displayed" ) + endif + endif - call hCloseDocument + call hCloseDocument endcase 'tPCT '------------------------------------------------------------------------------- testcase tPBM - dim x as integer - dim i as integer - dim sFilter as string - dim sExt as string - - sFilter = "PBM - Portable Bitmap (.pbm)" - sExt = ".pbm" + const sFilter = "PBM - Portable Bitmap (.pbm)" + const sExt = ".pbm" printlog "Open the document" - hFileOpen (ConvertPath ( gTesttoolPath + "graphics\required\input\graphicexport."+ExtensionString )) + hFileOpen( gTesttoolPath + "graphics\required\input\graphicexport."+ExtensionString ) printlog "Save it" - if hCallExport (OutputGrafikTBO , sFilter ) = TRUE then + if ( hCallExport (OutputGrafikTBO , sFilter ) ) then + Kontext "PBMOptionen" - if PBMOptionen.Exists (2) then + if ( PBMOptionen.Exists( 2 ) ) then Ascii.Check - PBMOptionen.OK - sleep 5 - endif - if ( dir(OutputGrafikTBO+sExt) <> "") then - Printlog "Ok :-) Saved as: '" + OutputGrafikTBO+sExt + "'" + hCloseDialog( PBMOptionen, "ok" ) else - warnlog "File didn't get saved :-(" + warnlog( "No export options dialog was displayed" ) endif - hCloseDocument () - sleep 5 - hNewDocument() - sleep 5 - Call hGrafikEinfuegen ( OutputGrafikTBO+sExt ) + + printlog( "Close file and re-insert graphics into new document" ) + hInsertGraphicsToNewFile( OutputGrafikTBO + sExt ) ' local helper function, see bottom of this file + endif call hCloseDocument @@ -370,35 +324,26 @@ endcase 'tPBM '------------------------------------------------------------------------------- testcase tPGM - dim x as integer - dim i as integer - dim sFilter as string - dim sExt as string - - sFilter = "PGM - Portable Graymap (.pgm)" - sExt = ".pgm" + const sFilter = "PGM - Portable Graymap (.pgm)" + const sExt = ".pgm" printlog "Open the document" - hFileOpen (ConvertPath ( gTesttoolPath + "graphics\required\input\graphicexport."+ExtensionString )) + hFileOpen( gTesttoolPath + "graphics\required\input\graphicexport." + ExtensionString ) printlog "Save it" - if hCallExport (OutputGrafikTBO , sFilter ) = TRUE then + if ( hCallExport (OutputGrafikTBO , sFilter ) ) then + Kontext "PGMOptionen" - if PGMOptionen.Exists (2) then + if ( PGMOptionen.Exists( 2 ) ) then Ascii.Check - PGMOptionen.OK - sleep 5 - endif - if ( dir(OutputGrafikTBO+sExt) <> "") then - Printlog "Ok :-) Saved as: '" + OutputGrafikTBO+sExt + "'" + hCloseDialog( PGMOptionen, "ok" ) else - warnlog "File didn't get saved :-(" + warnlog( "No export options dialog was displayed" ) endif - hCloseDocument () - sleep 5 - hNewDocument() - sleep 5 - Call hGrafikEinfuegen ( OutputGrafikTBO+sExt ) + + printlog( "Close file and re-insert graphics into new document" ) + hInsertGraphicsToNewFile( OutputGrafikTBO + sExt ) ' local helper function, see bottom of this file + endif call hCloseDocument @@ -407,35 +352,26 @@ endcase 'tPGM '------------------------------------------------------------------------------- testcase tPPM - dim x as integer - dim i as integer - dim sFilter as string - dim sExt as string - - sFilter = "PPM - Portable Pixelmap (.ppm)" - sExt = ".ppm" + const sFilter = "PPM - Portable Pixelmap (.ppm)" + const sExt = ".ppm" printlog "Open the document" - hFileOpen (ConvertPath ( gTesttoolPath + "graphics\required\input\graphicexport."+ExtensionString )) + hFileOpen( gTesttoolPath + "graphics\required\input\graphicexport." + ExtensionString ) printlog "Save it" - if hCallExport (OutputGrafikTBO , sFilter ) = TRUE then + if ( hCallExport (OutputGrafikTBO , sFilter ) ) then + Kontext "PPMOptionen" - if PPMOptionen.Exists (2) then + if ( PPMOptionen.Exists( 2 ) ) then Ascii.Check - PPMOptionen.OK - sleep 5 - endif - if ( dir(OutputGrafikTBO+sExt) <> "") then - Printlog "Ok :-) Saved as: '" + OutputGrafikTBO+sExt + "'" + hCloseDialog( PPMOptionen, "ok" ) else - warnlog "File didn't get saved :-(" + warnlog( "No export options dialog was displayed" ) endif - hCloseDocument () - sleep 5 - hNewDocument() - sleep 5 - Call hGrafikEinfuegen ( OutputGrafikTBO+sExt ) + + printlog( "Close file and re-insert graphics into new document" ) + hInsertGraphicsToNewFile( OutputGrafikTBO + sExt ) ' local helper function, see bottom of this file + endif call hCloseDocument @@ -444,29 +380,18 @@ endcase 'tPPM '------------------------------------------------------------------------------ testcase tRAS - dim x as integer - dim i as integer - dim sFilter as string - dim sExt as string - - sFilter = "RAS - Sun Raster Image (.ras)" - sExt = ".ras" + const sFilter = "RAS - Sun Raster Image (.ras)" + const sExt = ".ras" printlog "Open the document" - hFileOpen (ConvertPath ( gTesttoolPath + "graphics\required\input\graphicexport."+ExtensionString )) + hFileOpen( gTesttoolPath + "graphics\required\input\graphicexport." + ExtensionString ) printlog "Save it" - if hCallExport (OutputGrafikTBO , sFilter ) = TRUE then - if ( dir(OutputGrafikTBO+sExt) <> "") then - Printlog "Ok :-) Saved as: '" + OutputGrafikTBO+sExt + "'" - hCloseDocument () - sleep 5 - hNewDocument() - sleep 5 - Call hGrafikEinfuegen ( OutputGrafikTBO+sExt ) - else - warnlog "File didn't get saved :-(" - endif + if ( hCallExport( OutputGrafikTBO, sFilter ) ) then + printlog( "Close file and re-insert graphics into new document" ) + hInsertGraphicsToNewFile( OutputGrafikTBO + sExt ) ' local helper function, see bottom of this file + else + warnlog( "No export options dialog was displayed" ) endif call hCloseDocument @@ -477,27 +402,19 @@ testcase tTIFF dim x as integer dim i as integer - dim sFilter as string - dim sExt as string - sFilter = "TIFF - Tagged Image File Format (.tif;.tiff)" - sExt = ".tif" + const sFilter = "TIFF - Tagged Image File Format (.tif;.tiff)" + const sExt = ".tif" printlog "Open the document" hFileOpen (ConvertPath ( gTesttoolPath + "graphics\required\input\graphicexport."+ExtensionString )) printlog "Save it" - if hCallExport (OutputGrafikTBO , sFilter ) = TRUE then - if ( dir(OutputGrafikTBO+sExt) <> "") then - Printlog "Ok :-) Saved as: '" + OutputGrafikTBO+sExt + "'" - hCloseDocument () - sleep 5 - hNewDocument() - sleep 5 - Call hGrafikEinfuegen ( OutputGrafikTBO+sExt ) - else - warnlog "File didn't get saved :-(" - endif + if ( hCallExport (OutputGrafikTBO , sFilter ) ) then + printlog( "Close file and re-insert graphics into new document" ) + hInsertGraphicsToNewFile( OutputGrafikTBO + sExt ) ' local helper function, see bottom of this file + else + warnlog( "No export options dialog was displayed" ) endif call hCloseDocument @@ -506,29 +423,18 @@ endcase 'tTIFF '------------------------------------------------------------------------------ testcase tXPM - dim x as integer - dim i as integer - dim sFilter as string - dim sExt as string - - sFilter = "XPM - X PixMap (.xpm)" - sExt = ".xpm" + const sFilter = "XPM - X PixMap (.xpm)" + const sExt = ".xpm" printlog "Open the document" - hFileOpen (ConvertPath ( gTesttoolPath + "graphics\required\input\graphicexport."+ExtensionString )) + hFileOpen( gTesttoolPath + "graphics\required\input\graphicexport." + ExtensionString ) printlog "save it" if hCallExport (OutputGrafikTBO , sFilter ) = TRUE then - if ( dir(OutputGrafikTBO+sExt) <> "") then - Printlog "Ok :-) Saved as: '" + OutputGrafikTBO+sExt + "'" - hCloseDocument () - sleep 5 - hNewDocument() - sleep 5 - Call hGrafikEinfuegen ( OutputGrafikTBO+sExt ) - else - warnlog "File didn't get saved :-(" - endif + printlog( "Close file and re-insert graphics into new document" ) + hInsertGraphicsToNewFile( OutputGrafikTBO + sExt ) ' local helper function, see bottom of this file + else + warnlog( "No export options dialog was displayed" ) endif call hCloseDocument @@ -537,36 +443,27 @@ endcase 'tXPM '------------------------------------------------------------------------------- testcase tGIF - dim x as integer - dim i as integer - dim sFilter as string - dim sExt as string - - sFilter = "GIF - Graphics Interchange Format (.gif)" - sExt = ".gif" + const sFilter = "GIF - Graphics Interchange Format (.gif)" + const sExt = ".gif" printlog "open the document" - hFileOpen (ConvertPath ( gTesttoolPath + "graphics\required\input\graphicexport."+ExtensionString) + hFileOpen( gTesttoolPath + "graphics\required\input\graphicexport." + ExtensionString ) printlog "save it" - if hCallExport (OutputGrafikTBO , sFilter ) = TRUE then + if ( hCallExport( OutputGrafikTBO, sFilter ) ) then + Kontext "GIFOptionen" if GIFOptionen.Exists (2) then Interlace.Uncheck TransparentSpeichern.UnCheck - GIFOptionen.OK - sleep 5 - endif - if ( dir(OutputGrafikTBO+sExt) <> "") then - Printlog "Ok :-) Saved as: '" + OutputGrafikTBO+sExt + "'" + hCloseDialog( GIFOptionen, "ok" ) else - warnlog "File didn't get saved :-(" + warnlog( "No export options dialog was displayed" ) endif - hCloseDocument () - sleep 5 - hNewDocument() - sleep 5 - Call hGrafikEinfuegen ( OutputGrafikTBO+sExt ) + + printlog( "Close file and re-insert graphics into new document" ) + hInsertGraphicsToNewFile( OutputGrafikTBO + sExt ) ' local helper function, see bottom of this file + endif call hCloseDocument @@ -575,39 +472,92 @@ endcase 'tGIF '------------------------------------------------------------------------------- testcase tJPEG - dim x as integer - dim i as integer - dim sFilter as string - dim sExt as string - - sFilter = "JPEG - Joint Photographic Experts Group (.jpg;.jpeg;.jfif;.jif;.jpe)" - sExt = ".jpg" + const sFilter = "JPEG - Joint Photographic Experts Group (.jpg;.jpeg;.jfif;.jif;.jpe)" + const sExt = ".jpg" printlog "Open the document" - hFileOpen (ConvertPath ( gTesttoolPath + "graphics\required\input\graphicexport."+ExtensionString) + hFileOpen( gTesttoolPath + "graphics\required\input\graphicexport." + ExtensionString ) printlog " save it " - if hCallExport (OutputGrafikTBO , sFilter ) = TRUE then + if ( hCallExport( OutputGrafikTBO , sFilter ) ) then + Kontext "JpegOptionen" - if JpegOptionen.Exists (2) then + if ( JpegOptionen.Exists( 2 ) ) then Echtfarben.Check Qualitaet.ToMin - JpegOptionen.OK - sleep 5 - endif - if ( dir(OutputGrafikTBO+sExt) <> "") then - Printlog "Ok :-) Saved as: '" + OutputGrafikTBO+sExt + "'" + hCloseDialog( JpegOptionen, "ok" ) else - warnlog "File didn't get saved :-(" + warnlog( "No export options dialog was displayed" ) endif - hCloseDocument () - sleep 5 - hNewDocument() - sleep 5 - Call hGrafikEinfuegen ( OutputGrafikTBO+sExt ) + + printlog( "Close file and re-insert graphics into new document" ) + hInsertGraphicsToNewFile( OutputGrafikTBO + sExt ) ' local helper function, see bottom of this file + endif call hCloseDocument endcase 'tJPEG -'------------------------------------------------------------------------- + +'******************************************************************************* + +function hInsertGraphicsToNewFile( sOutputFile as string ) + + if ( FileExists( sOutputFile ) ) then + hFileReOpen( "" ) + Call hGrafikEinfuegen( sOutputFile ) + else + warnlog( "File not saved: " & sOutputFile ) + endif + +end function + +'******************************************************************************* + +function hFileReOpen( cFile as string ) as boolean + + dim iDocumentCount as integer : iDocumentCount = getDocumentCount + hFileReopen() = false + + hCloseDocument() + + if ( cFile = "" ) then + hNewDocument() + else + if ( FileExists( cFile ) ) then + hFileOpen( cFile ) + else + warnlog( "hFileReOpen(): File does not exist: " & cFile ) + endif + endif + + if ( getDocumentCount = iDocumentCount ) then hFileReOpen() = true + +end function + +'******************************************************************************* + +function hWaitForOutputFile( sOutputFile as string ) as boolean + + const FILE_WRITE_TIMEOUT = 30 + dim iWait as integer : iWait = 0 + + for iWait = 1 to FILE_WRITE_TIMEOUT + + ' File found + if ( FileExists( sOutputFile ) ) then + hWaitForOutputFile() = true + exit function + endif + + ' Timeout + if ( iWait = FILE_WRITE_TIMEOUT ) then + hWaitForOutputFile() = false + exit function + endif + + wait( 1000 ) + + next iWait + +end function diff --git a/testautomation/graphics/optional/includes/global/export_graphic_2.inc b/testautomation/graphics/optional/includes/global/export_graphic_2.inc index 67c456201b45..2a2cbac2020a 100644 --- a/testautomation/graphics/optional/includes/global/export_graphic_2.inc +++ b/testautomation/graphics/optional/includes/global/export_graphic_2.inc @@ -1430,3 +1430,91 @@ testcase tWMF endcase 'tWMF '------------------------------------------------------------------------- + +function fGetFileText (sFilename as string, iCount as long) as string +'/// This function is for getting the first or last n characters of a file +'///+<u>Input</u>:<ul><li>filename</li><li>number</li></ul>If the number greater 0 then get n characters from start. +'///+A number smaller 0 get from end of file. +'///+<u>Output</u>:<ul><li>string with <b><i>n</i></b> characters</li></ul> + + dim iFile as integer ' filehandle + dim iTem as integer ' get 2 bytes of the file + dim iTemByte(2) as integer ' move 1 byte from iTem in each item + dim sTemp as string ' string of file + dim iSize as long ' size in bytes of file + dim i as long ' runner :-) + + iFile = FreeFile +' Printlog "FreeFile: " + iFile + if (dir (sFilename) <> "") then +' Printlog "FileLen: " + FileLen(sFile) + Open sFilename For binary access read shared As #iFile +' Printlog "Loc: " + Loc(#iFile) ' LONG! where am i in the file? + + iSize = Lof(#iFile) ' get size in bytes of file + if (iSize > 65530) then '65536 = 64kB + 'Warnlog "fGetFileText: file '" + sFilename + "' might get problems on reading it? size is > 65530 Byte: '" + iSize + "'" + else +' printlog "iSize: " + iSize + endif + + sTemp = "" + if (iCount >= 0) then ' get bytes from file start + get iFile,1,sTemp ' get max 64kByte; but not the 1st 2 bytes :-( + get iFile,1,iTem ' get the first 2 bytes of the file + iTemByte(2) = (iTem AND &H0000FF00) \ &H100 ' and seperate the bytes + iTemByte(1) = (iTem AND &H000000FF) + sTemp = chr(iTemByte(1)) + chr(iTemByte(2)) + sTemp ' put them together + else ' get bytes from file end + if ((iSize+iCount) > 0) then + select case (iSize+iCount) + case 1: get iFile,1,sTemp ' take bytes from the end of the file + get iFile,1,iTem ' get the first 2 bytes of the file + sTemp = chr(iTemByte(2)) + sTemp ' put them together + case else: get iFile,(iSize+iCount)-1,sTemp ' take bytes from the end of the file + end select + else + get iFile,1,sTemp ' take bytes from the end of the file + get iFile,1,iTem ' get the first 2 bytes of the file + iTemByte(2) = (iTem AND &H0000FF00) \ &H100 ' and seperate the bytes + iTemByte(1) = (iTem AND &H000000FF) + sTemp = chr(iTemByte(1)) + chr(iTemByte(2)) + sTemp ' put them together + endif + endif +' printlog "'"+left(sTemp,iSize)+"'" ' gotcha! + + if (iSize-(Abs(iCount)) >= 0) then + fGetFileText = left(sTemp,Abs(iCount)) + else + 'Warnlog "fGetFileText: file '" + sFilename + "' isn't as big as expected; will only return '" + iSize+ "' bytes fom: " + iCount + fGetFileText = left(sTemp,iSize) + endif + + ' debugging routine -------------------------------------- + ' iSize = Lof(#iFile) + ' printlog "iSize: " + iSize + ' sTemp = "" + ' if iSize > 0 then + ' printlog "iSize \ 2: " + (iSize \ 2) + ' for i = 0 to ((iSize \ 2)-1) + ' get iFile,(i*2)+1,iTem + ' Printlog "i: " + i + ": 0x" + hex(iTem) + ' iTemByte(2) = (iTem AND &H0000FF00) \ &H100 + ' iTemByte(1) = (iTem AND &H000000FF) + ' sTemp = sTemp + chr(iTemByte(1)) + chr(iTemByte(2)) + ' next i + ' if (iSize MOD 2) = 1 then + ' get iFile,iSize,iTem + ' Printlog "i: " + iSize + ": 0x" + hex(iTem) + ' iTemByte(1) = (iTem AND &H000000FF) + ' sTemp = sTemp + chr(iTemByte(1)) + ' endif + ' endif + ' printlog "'"+sTemp+"'" + ' debugging routine -------------------------------------- + Close #iFile + else ' does file exist + Warnlog "fGetFileText: file '" + sFilename + "' doesn't exist" + fGetFileText = "" + endif +end function diff --git a/testautomation/graphics/optional/includes/global/g_arrangealign.inc b/testautomation/graphics/optional/includes/global/g_arrangealign.inc index f9fab5625905..16f0ca213d26 100644 --- a/testautomation/graphics/optional/includes/global/g_arrangealign.inc +++ b/testautomation/graphics/optional/includes/global/g_arrangealign.inc @@ -29,16 +29,7 @@ '* '* short description : '* -'************************************************************************************** -' #1 tiDatei_Fuer_Anordnen_Erstellen -' #1 tdContextSendBackward -' #1 tdContextBringForward -' #1 tdContextSendToBack -' #1 tdContextBringToFront -' #1 tdContextReverse -' #1 tdContextInFrontOfObject -' #1 tdContextBehindObject -'\************************************************************************************* +'\****************************************************************************** testcase tiDatei_Fuer_Anordnen_Erstellen dim sTemp as string diff --git a/testautomation/graphics/optional/includes/global/g_autocorrection.inc b/testautomation/graphics/optional/includes/global/g_autocorrection.inc index 7653d391243f..447808b4bc8e 100644 --- a/testautomation/graphics/optional/includes/global/g_autocorrection.inc +++ b/testautomation/graphics/optional/includes/global/g_autocorrection.inc @@ -147,7 +147,7 @@ testcase tToolsAutocorrectCustomQuotes(bSimple as boolean) sFileName = (ConvertPath ( gTesttoolPath + "graphics\required\input\rightfont." + ExtensionString)) endif - if hFileExists ( sFileName ) = FALSE then + if FileExists ( sFileName ) = FALSE then warnlog "The language-file was not found or accessible! The test ends." goto endsub endif diff --git a/testautomation/graphics/optional/includes/global/g_ole.inc b/testautomation/graphics/optional/includes/global/g_ole.inc index 3d30cf52ca85..84ff10294e6d 100644 --- a/testautomation/graphics/optional/includes/global/g_ole.inc +++ b/testautomation/graphics/optional/includes/global/g_ole.inc @@ -29,10 +29,6 @@ '* '* short description: includefile for Ole-testing '* -'************************************************************************************** -' #1 tOLE_Copy -' #1 tOLE_SaveLoad -' #1 tiOpenOLECrash '\************************************************************************************* testcase tOLE_Copy @@ -274,16 +270,18 @@ testcase tOLE_SaveLoad MenuSelect (0) printlog "Save the File." FileSaveAs - sleep 1 Kontext "SpeichernDlg" - Dateiname.Settext (filename) - printlog "Saving as: " & filename - Speichern.Click + if ( SpeichernDlg.exists( 1 ) ) then + Dateiname.Settext (filename) + printlog "Saving as: " & filename + Speichern.Click + else + warnlog( "<FileSaveAs> dialog did not open" ) + endif printlog "If the file already exists - press yes to overwrite it." - Sleep 3 kontext "Messagebox" - if Messagebox.exists then + if ( Messagebox.exists( 3 ) ) then Messagebox.Yes endif Sleep 3 @@ -364,20 +362,31 @@ testcase tiOpenOLECrash FileSaveAs Kontext "SpeichernDlg" - sFileodp = (ConvertPath(gOfficePath + "user\work\generic_de")) - Dateiname.SetText (sFileodp) - Dateityp.Select (1) - Speichern.Click - Kontext "Messagebox" - if Messagebox.Exists(2) then - Messagebox.Yes - Kontext "AlienWarning" - if AlienWarning.Exists(2) then - Warnlog "Should not be any alienwarning when saving in our own format!" - AlienWarning.OK - end if - printlog "Saved as: " + sFileodp - end if + if ( SpeichernDlg.exists( 2 ) ) then + sFileodp = (ConvertPath(gOfficePath + "user\work\generic_de")) + Dateiname.SetText (sFileodp) + Dateityp.Select (1) + Speichern.Click + Kontext "Messagebox" + if Messagebox.Exists(2) then + try + Messagebox.Yes + catch + warnlog( "#i110938 - Failure to save certain impress documents" ) + Messagebox.ok() + goto endsub + endcatch + Kontext "AlienWarning" + if AlienWarning.Exists(2) then + Warnlog "Should not be any alienwarning when saving in our own format!" + AlienWarning.OK + end if + printlog "Saved as: " + sFileodp + end if + else + warnlog( "<FileSaveAs> dislog did not open" ) + goto endsub + endif Sleep 3 kontext "DocumentImpress" printlog "3. Close Impress." diff --git a/testautomation/graphics/optional/includes/global/g_stylist.inc b/testautomation/graphics/optional/includes/global/g_stylist.inc index dc8663425e87..fe9a1e28dabb 100755..100644 --- a/testautomation/graphics/optional/includes/global/g_stylist.inc +++ b/testautomation/graphics/optional/includes/global/g_stylist.inc @@ -29,18 +29,6 @@ '* '* short description : '* -'******************************************************************* -'* -' #1 tFormatStylistFlyer -' #1 tFormatStylistDocuments -' #1 tFormatStylistTemplatesUse -' #1 tFormatStylistTemplateCreate -' #1 tFormatStylistTemplateSelect -' #1 tFormatStylistTemplateNew -' #1 tiFormatStylist -' #1 tFormatStylist -' #1 hWalkTheStyles -'* '\******************************************************************* testcase tFormatStylistFlyer @@ -147,7 +135,7 @@ testcase tFormatStylistFlyer '/// close stylist ///' Gestalter.Close Call hCloseDocument - + endcase 'tFormatStylistFlyer '-------------------------------------------------------- testcase tFormatStylistDocuments @@ -169,11 +157,9 @@ testcase tFormatStylistDocuments endif printlog " - Close all documents, reopen 1" - FileClose - Sleep 2 - FileClose - Sleep 2 - hNewDocument + hFileCloseAll() + hNewDocument() + Kontext "Gestalter" if (Gestalter.NotExists) then warnlog " There is no stylist in the new document" @@ -190,12 +176,9 @@ testcase tFormatStylistDocuments endif printlog " - Close all documents, reopen one and check the docked stylist" - FileClose - Sleep 2 - FileClose - Sleep 2 - Kontext "Gestalter" - hNewDocument + hFileCloseAll() + hNewDocument() + Kontext "Gestalter" if NOT Gestalter.IsDocked then warnlog " In the new document is the stylist not docked" @@ -215,7 +198,7 @@ testcase tFormatStylistDocuments Gestalter.Close end if Call hCloseDocument - + endcase 'tFormatStylistDocuments '-------------------------------------------------------- testcase tFormatStylistTemplatesUse @@ -234,7 +217,7 @@ testcase tFormatStylistTemplatesUse FormatStylist endif printlog " - Presentation-templates" - if (Lcase (gApplication) = "IMPRESS") then + if ( gApplication = "IMPRESS") then TBGestalter.Click Praesentationsvorlagen endif save = Gruppenliste.GetSelIndex @@ -253,11 +236,11 @@ testcase tFormatStylistTemplatesUse sleep 1 Gruppenliste.Select save - Gestalter.Close + kontext "Gestalter" + hCloseDialog( Gestalter, "Close" ) + + hFileCloseAll() - sleep 3 - Call hCloseDocument - endcase 'tFormatStylistTemplatesUse '-------------------------------------------------------- testcase tFormatStylistTemplateCreate @@ -299,10 +282,10 @@ testcase tFormatStylistTemplateCreate zaehler=Ansicht.getItemCount i=0 do - inc i + inc i loop while ((Ansicht.getItemText(i) <> "ATesttool") AND (i <= zaehler)) if i>zaehler then - warnlog " error" + warnlog " error" endif Ansicht.Select i sleep 1 @@ -317,10 +300,8 @@ testcase tFormatStylistTemplateCreate sleep 1 Kontext "DocumentDraw" gMouseClick 90,90 - sleep 1 - Call hCloseDocument - sleep 1 - + hFileCloseAll() + endcase 'tFormatStylistTemplateCreate '-------------------------------------------------------- testcase tFormatStylistTemplateSelect @@ -400,7 +381,7 @@ testcase tFormatStylistTemplateSelect TabArea.OK sleep 2 hCloseDocument - + endcase 'tFormatStylistTemplateSelect '--------------------------------------------------------- testcase tFormatStylistTemplateNew @@ -484,14 +465,14 @@ testcase tFormatStylistTemplateNew Vorlagenliste.TypeKeys "<End>" i = 0 do - inc i - sTemp = Vorlagenliste.GetText - Vorlagenliste.TypeKeys "<Up>" + inc i + sTemp = Vorlagenliste.GetText + Vorlagenliste.TypeKeys "<Up>" loop while (("Testtool" <> sTemp) AND (i<20)) Vorlagenliste.TypeKeys "<Return>" Kontext "Gestalter" Gestalter.Close - + Printlog " - check template" FormatCharacter Kontext @@ -677,8 +658,8 @@ testcase tiFormatStylist sleep 1 Kontext "Gestalter" if Gestalter.Exists Then Warnlog "- Stylist could not be closed pressing F11" - Call hCloseDocument - + Call hCloseDocument + endcase 'tiFormatStylist '--------------------------------------------------------- sub hWalkTheStyles (optional a as integer,optional b as integer) @@ -686,115 +667,115 @@ sub hWalkTheStyles (optional a as integer,optional b as integer) dim i as integer if isMissing (a) then a=1 - if isMissing (b) then b=2 - i=1 - if a <= i AND i <= b then - Kontext - Messagebox.SetPage TabLinie - kontext "TabLinie" - Call DialogTest ( TabLinie ) - Kontext - Messagebox.SetPage TabArea - kontext "TabArea" - Call DialogTest ( TabArea, 1 ) - FillOptions.Select 1 ' NoFill.Check - Call DialogTest ( TabArea, 1 ) - FillOptions.Select 2 - Call DialogTest ( TabArea, 2 ) - FillOptions.Select 3 - Call DialogTest ( TabArea, 3 ) - FillOptions.Select 4 - Call DialogTest ( TabArea, 4 ) - FillOptions.Select 5 - Call DialogTest ( TabArea, 5 ) - Kontext - Messagebox.SetPage TabSchatten - kontext "TabSchatten" - Anzeigen.check - Call DialogTest ( TabSchatten ) - Kontext - Messagebox.SetPage TabTransparenz - kontext "TabTransparenz" - KeineTransparenz.Check - LineareTransparenz.Check - Transparenzverlauf.Check - Kontext - Messagebox.SetPage TabFont - kontext "TabFont" - Call DialogTest ( TabFont ) - Kontext - Messagebox.SetPage TabFontEffects - kontext "TabFontEffects" - Kontext - Messagebox.SetPage TabEinzuegeUndAbstaende - kontext "TabEinzuegeUndAbstaende" - Call DialogTest ( TabEinzuegeUndAbstaende ) - endif - i=2 - if a <= i AND i <= b then - Kontext - Messagebox.SetPage TabVerwalten - kontext "TabVerwalten" - Call DialogTest ( TabVerwalten ) - Kontext - Messagebox.SetPage TabText - Kontext "TabText" - Call DialogTest ( TabText ) - Kontext - Messagebox.SetPage TabLauftext - Kontext "TabLauftext" - Call DialogTest ( TabLauftext ) - Kontext - Messagebox.SetPage TabBemassung - Kontext "TabBemassung" - Call DialogTest ( TabBemassung ) - Kontext - Messagebox.setpage TabVerbinder - Kontext "TabVerbinder" - Call Dialogtest ( TabVerbinder ) - Kontext - Messagebox.setpage TabAusrichtungAbsatz - Kontext "TabAusrichtungAbsatz" - Links.Check - Rechts.Check - Zentriert.Check - Blocksatz.Check - Kontext - Messagebox.setpage TabTabulator - Kontext "TabTabulator" - Neu.click - AlleLoeschen.click - Neu.click - Loeschen.click - endif - i=3 - if a <= i AND i <= b then - Kontext - Messagebox.SetPage TabBullet - Kontext "TabBullet" - sleep 1 - Call DialogTest (TabBullet) - sleep 1 - Kontext - Messagebox.SetPage TabNumerierungsart - Kontext "TabNumerierungsart" - sleep 1 - Call DialogTest (TabNumerierungsart) - sleep 1 - Kontext - Messagebox.SetPage TabGrafiken - Kontext "TabGrafiken" - sleep 1 - Call DialogTest (TabGrafiken) - sleep 1 - Kontext - Messagebox.SetPage TabOptionenNumerierung - Kontext "TabOptionenNumerierung" - sleep 1 - Call DialogTest (TabOptionenNumerierung) - sleep 1 - endif - + if isMissing (b) then b=2 + i=1 + if a <= i AND i <= b then + Kontext + Messagebox.SetPage TabLinie + kontext "TabLinie" + Call DialogTest ( TabLinie ) + Kontext + Messagebox.SetPage TabArea + kontext "TabArea" + Call DialogTest ( TabArea, 1 ) + FillOptions.Select 1 ' NoFill.Check + Call DialogTest ( TabArea, 1 ) + FillOptions.Select 2 + Call DialogTest ( TabArea, 2 ) + FillOptions.Select 3 + Call DialogTest ( TabArea, 3 ) + FillOptions.Select 4 + Call DialogTest ( TabArea, 4 ) + FillOptions.Select 5 + Call DialogTest ( TabArea, 5 ) + Kontext + Messagebox.SetPage TabSchatten + kontext "TabSchatten" + Anzeigen.check + Call DialogTest ( TabSchatten ) + Kontext + Messagebox.SetPage TabTransparenz + kontext "TabTransparenz" + KeineTransparenz.Check + LineareTransparenz.Check + Transparenzverlauf.Check + Kontext + Messagebox.SetPage TabFont + kontext "TabFont" + Call DialogTest ( TabFont ) + Kontext + Messagebox.SetPage TabFontEffects + kontext "TabFontEffects" + Kontext + Messagebox.SetPage TabEinzuegeUndAbstaende + kontext "TabEinzuegeUndAbstaende" + Call DialogTest ( TabEinzuegeUndAbstaende ) + endif + i=2 + if a <= i AND i <= b then + Kontext + Messagebox.SetPage TabVerwalten + kontext "TabVerwalten" + Call DialogTest ( TabVerwalten ) + Kontext + Messagebox.SetPage TabText + Kontext "TabText" + Call DialogTest ( TabText ) + Kontext + Messagebox.SetPage TabLauftext + Kontext "TabLauftext" + Call DialogTest ( TabLauftext ) + Kontext + Messagebox.SetPage TabBemassung + Kontext "TabBemassung" + Call DialogTest ( TabBemassung ) + Kontext + Messagebox.setpage TabVerbinder + Kontext "TabVerbinder" + Call Dialogtest ( TabVerbinder ) + Kontext + Messagebox.setpage TabAusrichtungAbsatz + Kontext "TabAusrichtungAbsatz" + Links.Check + Rechts.Check + Zentriert.Check + Blocksatz.Check + Kontext + Messagebox.setpage TabTabulator + Kontext "TabTabulator" + Neu.click + AlleLoeschen.click + Neu.click + Loeschen.click + endif + i=3 + if a <= i AND i <= b then + Kontext + Messagebox.SetPage TabBullet + Kontext "TabBullet" + sleep 1 + Call DialogTest (TabBullet) + sleep 1 + Kontext + Messagebox.SetPage TabNumerierungsart + Kontext "TabNumerierungsart" + sleep 1 + Call DialogTest (TabNumerierungsart) + sleep 1 + Kontext + Messagebox.SetPage TabGrafiken + Kontext "TabGrafiken" + sleep 1 + Call DialogTest (TabGrafiken) + sleep 1 + Kontext + Messagebox.SetPage TabOptionenNumerierung + Kontext "TabOptionenNumerierung" + sleep 1 + Call DialogTest (TabOptionenNumerierung) + sleep 1 + endif + end sub 'hWalkTheStyles '--------------------------------------------------------- testcase tFormatStylist @@ -889,7 +870,7 @@ testcase tFormatStylist endif endif Call hCloseDocument - + endcase 'tFormatStylist '-------------------------------------------------------- function hSelectInList (window, sEntry as String) as Boolean @@ -901,16 +882,16 @@ function hSelectInList (window, sEntry as String) as Boolean window.TypeKeys "<End>" sTemp = "" do - sLastTemp = sTemp - sTemp = window.GetText - window.TypeKeys "<Up>" -loop while ((sEntry <> sTemp) AND (sLastTemp <> sTemp)) -if (sEntry = sTemp) then - window.TypeKeys "<Return>" - hSelectInList = TRUE -else - hSelectInList = FALSE -endif + sLastTemp = sTemp + sTemp = window.GetText + window.TypeKeys "<Up>" + loop while ((sEntry <> sTemp) AND (sLastTemp <> sTemp)) + if (sEntry = sTemp) then + window.TypeKeys "<Return>" + hSelectInList = TRUE + else + hSelectInList = FALSE + endif end function 'hSelectInList '--------------------------------------------------------- diff --git a/testautomation/graphics/optional/includes/global/g_tables.inc b/testautomation/graphics/optional/includes/global/g_tables.inc index 1414a857b598..ca5fc625c4ab 100644 --- a/testautomation/graphics/optional/includes/global/g_tables.inc +++ b/testautomation/graphics/optional/includes/global/g_tables.inc @@ -29,13 +29,6 @@ '* '* short description : Testing of impress tables '* -'******************************************************************* -'* -' #1 tiInsertTableUsingMenu -' #1 tiInsertTableUsingButton -' #1 tiTableObjectBar -' #1 tiInsertTableUsingToolbarbuttonView -'* '\****************************************************************** 'Variables: @@ -50,7 +43,7 @@ testcase tiInsertTableUsingMenu printlog "Inserting table into doc using the menu." Call hNewDocument printlog "Switching between Draw/Impress" - if (UCase(gApplication)) = "IMPRESS" then + if ( gApplication = "IMPRESS" ) then DocumentImpress.UseMenu hMenuSelectNr(4) hMenuSelectNr(14) @@ -213,7 +206,7 @@ testcase tiTableObjectBar printlog "Inserting table into doc using the menu." Call hNewDocument printlog "Switching between Draw/Impress" - if (UCase(gApplication)) = "IMPRESS" then + if ( gApplication = "IMPRESS" ) then DocumentImpress.UseMenu hMenuSelectNr(4) hMenuSelectNr(14) @@ -229,7 +222,7 @@ testcase tiTableObjectBar printlog "Selecting table for geeting the TableObjectBar." printlog "Switching between Draw/Impress" - if (UCase(gApplication)) = "IMPRESS" then + if ( gApplication = "IMPRESS" )then Kontext "DocumentImpress" DocumentImpress.TypeKeys "<TAB>",3 else @@ -258,7 +251,7 @@ testcase tiTableObjectBar Kontext "TableObjectBar" TableObjectBar.Close - if (UCase(gApplication)) = "IMPRESS" then + if ( gApplication = "IMPRESS" ) then Kontext "DocumentImpress" else Kontext "DocumentDraw" @@ -278,7 +271,7 @@ testcase tiTableObjectBar endif Kontext "TableObjectBar" TableObjectBar.Close - if (UCase(gApplication)) = "IMPRESS" then + if ( gApplication = "IMPRESS" ) then Kontext "DocumentImpress" else Kontext "DocumentDraw" @@ -295,7 +288,7 @@ testcase tiTableObjectBar else warnlog "BordersTB is not up!" endif - if (UCase(gApplication)) = "IMPRESS" then + if ( gApplication = "IMPRESS" ) then Kontext "DocumentImpress" else Kontext "DocumentDraw" @@ -303,7 +296,7 @@ testcase tiTableObjectBar printlog "Checking merge cells." printlog "Inserting something into cell and select." - if (UCase(gApplication)) = "IMPRESS" then + if ( gApplication = "IMPRESS" ) then DocumentImpress.TypeKeys ("a") DocumentImpress.TypeKeys "<SHIFT RIGHT>" else @@ -312,29 +305,46 @@ testcase tiTableObjectBar endif Kontext "TableObjectBar" if TableObjectBar.NotExists(2) then ViewToolbarsTable + + printlog( "Merge cells" ) + Wait( 1000 ) ZellenVerbinden.Click - printlog "Cells merged." - printlog "Checking split cells." + printlog( "Split cells" ) + Wait( 1000 ) ZelleTeilen.Click - printlog "Cells split." + Kontext "ZellenTeilen" - WaitSlot(1000) - printlog "SplitCells dialog open." - Anzahl.ToMax - printlog "Maximum SplitCellCount is " & Anzahl.GetText & "." - Anzahl.ToMin - printlog "Minimum SplitCellCount is " & Anzahl.GetText & "." - if Horizontal.IsChecked = TRUE then - printlog "Horizontally is clicked." + if ( ZellenTeilen.exists( 2 ) ) then + + printlog "SplitCells dialog open." + + printlog( "Set number to maximum" ) + Anzahl.ToMax + printlog "Maximum SplitCellCount is " & Anzahl.GetText & "." + + printlog( "Set number to minimum" ) + Anzahl.ToMin + printlog "Minimum SplitCellCount is " & Anzahl.GetText & "." + + printlog( "<Horizontal> should be checked" ) + if ( Horizontal.IsChecked ) then + printlog "Horizontally is clicked." + else + warnlog "Horizontally should be clicked by default!" + endif + + printlog( "Distribute/Split equally" ) + GleichmaessigTeilen.Check + + printlog( "Check <Vertically>" ) + Vertikal.Check + + printlog( "Close dialog <Split Cells>" ) + hCloseDialog( ZellenTeilen, "close" ) else - warnlog "Horizontally should be clicked by default!" + warnlog( "Dialog <Split Cells> did not open" ) endif - GleichmaessigTeilen.Check - printlog "Split Equal checked." - Vertikal.Check - printlog "Cells vertically checked." - ZellenTeilen.OK printlog " Checking optimize button 'ToDo: button not working" 'Kontext "TableObjectBar" 'Optimieren.TearOff @@ -364,7 +374,7 @@ testcase tiTableObjectBar tabledesign.Click printlog "Checking for Table Design in Impress TaskBar or for Dialog in Draw." - if (UCase(gApplication)) = "IMPRESS" then + if ( gApplication = "IMPRESS" ) then kontext "Tasks" if (NOT Tasks.exists) then warnlog "Tasks Panel not visible. Opening now." @@ -395,6 +405,20 @@ testcase tiTableObjectBar kontext "TabFont" printlog "Checking Fonts Box." + + if ( Font.exists() ) then + printlog( "Western dialog layout -> good" ) + else + if ( FontWest.exists() ) then + warnlog( "<FontWest> exists, asian support is enabled which this test cannot handle" ) + else + warnlog( "Unknown error while trying to access <Font> listbox" ) + endif + hCloseDialog( TabFont, "close" ) + hFileCloseAll() + goto endsub + endif + iItemCount = Font.GetItemCount printlog "Fontbox has " & iItemCount & " entries." for iItemIndex = 1 to iItemCount diff --git a/testautomation/graphics/optional/includes/global/id_001.inc b/testautomation/graphics/optional/includes/global/id_001.inc index 1525074e027f..2bbca902b249 100644 --- a/testautomation/graphics/optional/includes/global/id_001.inc +++ b/testautomation/graphics/optional/includes/global/id_001.inc @@ -29,20 +29,6 @@ '* '* short description : '* -'*********************************************************************************** -' #1 tiFileSaveAs -' #1 tiFileReload (sFileIn as string) -' #1 tiFileVersion (sFileIn as string) -' #1 tiFilePassword -' #1 tiFileTemplates -' #1 tmFileNewFromTemplate -' #1 tmFileOpen -' #1 tmFileClose -' #1 tmFileSave -' #1 tmFileSaveAs -' #1 tmFileSaveAll -' #1 tmFileProperties -' #1 tmFilePrinterSetting '\********************************************************************************** @@ -141,7 +127,7 @@ testcase tiFileSaveAs printlog "("+i+"/"+x+"): "+sFilter(i) hFileOpen ( sFilter(i) ) WaitSlot (3000) - If hIsNamedDocLoaded (sFilter(i), true) Then + If hIsNamedDocLoaded (sFilter(i)) Then printlog " used filter: " + hGetUsedFilter() else sTemp = left(right(sFilter(i),2),1) diff --git a/testautomation/graphics/optional/includes/global/id_002.inc b/testautomation/graphics/optional/includes/global/id_002.inc index aed9631b4cd6..feca54dac85e 100644 --- a/testautomation/graphics/optional/includes/global/id_002.inc +++ b/testautomation/graphics/optional/includes/global/id_002.inc @@ -29,22 +29,6 @@ '* '* short description : '* -'*********************************************************************************** -' #1 tiEditUndoRedo -' #1 tiEditRepeat -' #1 tiEditCutPasteCopySelectall -' #1 tiEditPasteSpecial -' #1 tiEditSearchAndReplace -' #1 tiEditDuplicate -' #1 tiEditFields -' #1 tdEditDeleteSlide -' #1 tiEditLinks -' #1 tiEditImageMap -' #1 tiEditObjectProperties -' #1 tiEditObjectEdit -' #1 tiEditPlugIn -' #1 tiEditHyperlink -' #1 tEditPoints '\********************************************************************************** testcase tiEditUndoRedo @@ -247,9 +231,9 @@ testcase tiEditLinks Link.Check Dateiname.SetText ConvertPath (gTesttoolPath + "global\input\graf_inp\desp.bmp") Oeffnen.Click - sleep 2 + kontext "Messagebox" - if Messagebox.Exists then + if Messagebox.Exists( 2 ) then Warnlog Messagebox.GetText Messagebox.OK sleep 1 @@ -277,9 +261,9 @@ testcase tiEditImageMap Call hNewDocument EditImageMap + Kontext "ImageMapEditor" - sleep (1) - if ImageMapEditor.Exists (2) then + if ImageMapEditor.Exists( 5 ) then printlog "- ImageMap exists" DialogTest ( ImageMapEditor ) try @@ -319,7 +303,6 @@ testcase tiEditObjectProperties WaitSlot (1000) Kontext "TabEigenschaften" DialogTest ( TabEigenschaften ) - sleep(1) Oeffnen.Click Kontext "OeffnenDlg" Call DialogTest ( OeffnenDlg ) @@ -410,40 +393,48 @@ endcase testcase tiEditHyperlink hNewDocument InsertHyperlink - WaitSlot (5000) - Kontext "Hyperlink" - Auswahl.MouseDown 50, 5 - Auswahl.MouseUp 50, 5 - Auswahl.typekeys "<PAGEDOWN><PAGEUP>" - Auswahl.typekeys "<TAB>" - sleep 3 - Kontext "TabHyperlinkInternet" - - 'Workaround to get rid of a Focusing-problem... - NameText.Typekeys "alal <RETURN>" - NameText.Typekeys "<MOD1 A><DELETE>" - TabHyperlinkInternet.Typekeys "<TAB>", 6 - TabHyperlinkInternet.Typekeys "<LEFT>", 3 - 'End of workaround... - - Internet.Check 'Just to make sure the radio-button is addressable. - ZielUrl.Settext "http://www.liegerad-fahrer.de" - Kontext "Hyperlink" - Uebernehmen.Click - Hyperlink.Close - hTypeKeys "<TAB><F2>" - EditSelectAll - try - EditHyperlinkDraw + + kontext "HyperlinkDialog" + if ( HyperlinkDialog.exists( 2 ) ) then Kontext "Hyperlink" - if Hyperlink.Exists then - Hyperlink.Close - else - Warnlog "- Hyperlinkdialog not up" - end if - catch - Warnlog "- Not able to edit Hyperlink!" - endcatch + Auswahl.MouseDown 50, 5 + Auswahl.MouseUp 50, 5 + Auswahl.typekeys "<PAGEDOWN><PAGEUP>" + Auswahl.typekeys "<TAB>" + sleep( 1 ) + Kontext "TabHyperlinkInternet" + + 'Workaround to get rid of a Focusing-problem... + NameText.Typekeys "alal <RETURN>" + NameText.Typekeys "<MOD1 A><DELETE>" + TabHyperlinkInternet.Typekeys "<TAB>", 6 + TabHyperlinkInternet.Typekeys "<LEFT>", 3 + 'End of workaround... + + Internet.Check 'Just to make sure the radio-button is addressable. + ZielUrl.Settext "http://www.liegerad-fahrer.de" + + Uebernehmen.Click() + + kontext "HyperlinkDialog" + HyperlinkDialog.Close() + + hTypeKeys "<TAB><F2>" + EditSelectAll + try + EditHyperlinkDraw + Kontext "HyperlinkDialog" + if ( HyperlinkDialog.Exists( 1 ) ) then + HyperlinkDialog.Close() + else + Warnlog "- Hyperlinkdialog not up" + end if + catch + Warnlog "- Not able to edit Hyperlink!" + endcatch + else + warnlog( "Failed to open <HyperlinkDialog>" ) + endif Call hCloseDocument endcase diff --git a/testautomation/graphics/optional/includes/global/id_003.inc b/testautomation/graphics/optional/includes/global/id_003.inc index 27004c582828..371b0699fc8f 100644 --- a/testautomation/graphics/optional/includes/global/id_003.inc +++ b/testautomation/graphics/optional/includes/global/id_003.inc @@ -29,14 +29,6 @@ '* '* short description : '* -'*********************************************************************************** -' #1 tiViewNavigator -' #1 tiViewZoom -' #1 tiViewToolbar -' #1 tiViewDisplayQuality -' #1 tiViewLayer -' #1 tViewSnapLines -' #1 tViewGrid '\********************************************************************************** testcase tiViewNavigator diff --git a/testautomation/graphics/optional/includes/global/id_004.inc b/testautomation/graphics/optional/includes/global/id_004.inc index b1034c331ded..ff1317ce5d01 100644 --- a/testautomation/graphics/optional/includes/global/id_004.inc +++ b/testautomation/graphics/optional/includes/global/id_004.inc @@ -29,25 +29,6 @@ '* '* short description : '* -'*********************************************************************************** -' #1 tiInsertSlide -' #1 tiInsertDuplicateSlide -' #1 tiInsertField -' #1 tiInsertSpecialCharacter -' #1 tiInsertHyperlink -' #1 tiInsertGraphic -' #1 tiInsertObjectSound -' #1 tiInsertObjectVideo -' #1 tiInsertChart -' #1 tiInsertObjectOLEObjects -' #1 tiInsertSpreadsheet -' #1 tiInsertFormula -' #1 tiInsertFloatingFrame -' #1 tiInsertFile -' #1 tiInsertPlugin -' #1 tiInsertScan -' #1 tiInsertSnappointLine -' #1 tdInsertLayer '\********************************************************************************** @@ -129,26 +110,30 @@ testcase tiInsertSpecialCharacter hTextrahmenErstellen ("This is a testtext",30,40,60,50) sleep 2 InsertSpecialCharacterDraw - WaitSlot (2000) + Kontext "Sonderzeichen" - Call DialogTest (Sonderzeichen) - Sonderzeichen.Cancel - sleep 2 + if ( Sonderzeichen.exists( 2 ) ) then + Call DialogTest (Sonderzeichen) + hCloseDialog( Sonderzeichen, "Cancel" ) + else + warnlog( "<Special Characters> dialog not open" ) + endif Call hCloseDocument endcase testcase tiInsertHyperlink + Call hNewDocument InsertHyperlink - WaitSlot (5000) - Kontext "Hyperlink" - if Hyperlink.exists (5) then + + kontext "HyperlinkDialog" + if ( HyperlinkDialog.exists( 2 ) ) then + + Kontext "TabHyperlinkInternet" Auswahl.MouseDown 50, 5 Auswahl.MouseUp 50, 5 Auswahl.typekeys "<PAGEDOWN><PAGEUP>" Auswahl.typekeys "<TAB>" - sleep 3 - Kontext "TabHyperlinkInternet" 'Workaround to get rid of a Focusing-problem... NameText.Typekeys "alal <RETURN>" @@ -158,12 +143,14 @@ testcase tiInsertHyperlink 'End of workaround... Internet.Check - ZielUrl.Settext "http://mahler" - Kontext "Hyperlink" - Uebernehmen.Click - Hyperlink.Close + ZielUrl.SetText( "http://www.nowhere.com" ) + Uebernehmen.Click() + + kontext "HyperlinkDialog" + HyperlinkDialog.Close() + else - warnlog "Failed to open hyperlink ??!!" + warnlog "Failed to open <HyperlinkDialog>" end if Call hCloseDocument endcase @@ -231,12 +218,11 @@ endcase testcase tiInsertChart Call hNewDocument InsertChart - WaitSlot (2000) + Kontext "Messagebox" - if Messagebox.Exists then + if ( Messagebox.Exists( 2 ) ) then Warnlog Messagebox.GetText - Messagebox.OK - sleep 1 + hCloseDialog( Messagebox, "OK" ) end if gMouseClick 1,1 sleep 2 @@ -274,9 +260,8 @@ testcase tiInsertSpreadsheet Kontext "Messagebox" if Messagebox.Exists (5) then Warnlog Messagebox.GetText - Messagebox.OK + hCloseDialog( Messagebox, "ok" ) end if - sleep 2 gMouseClick 1,1 sleep 1 hTypekeys "<Tab><Delete>" @@ -287,12 +272,11 @@ endcase testcase tiInsertFormula Call hNewDocument InsertObjectFormulaDraw - WaitSlot (2000) + Kontext "Messagebox" - if Messagebox.Exists then + if ( Messagebox.Exists( 2 ) ) then Warnlog Messagebox.GetText - Messagebox.OK - sleep 1 + hCloseDialog( Messagebox, "ok" ) end if gMouseClick 1,1 sleep 1 @@ -308,8 +292,7 @@ testcase tiInsertFloatingFrame Dialogtest (TabEigenschaften) Oeffnen.Click Kontext "OeffnenDlg" - sleep 1 - OeffnenDlg.Cancel + hCloseDialog( OeffnenDlg, "Cancel" ) Kontext "TabEigenschaften" TabEigenschaften.Cancel Call hCloseDocument @@ -343,7 +326,6 @@ testcase tiInsertPlugin end if Kontext "OeffnenDlG" if OeffnenDlG.exists (5) then - sleep 1 OeffnenDLG.Cancel end if Kontext "PluginEinfuegen" diff --git a/testautomation/graphics/optional/includes/global/id_006.inc b/testautomation/graphics/optional/includes/global/id_006.inc index d959d1cf828f..d41b0c08e688 100644 --- a/testautomation/graphics/optional/includes/global/id_006.inc +++ b/testautomation/graphics/optional/includes/global/id_006.inc @@ -104,7 +104,7 @@ testcase tiToolsThesaurus else sFileName = (ConvertPath (gTesttoolPath + "graphics\required\input\engtext.odg")) end if - if hFileExists ( sFileName ) = FALSE then + if FileExists ( sFileName ) = FALSE then warnlog "The language-file was not found or accessible! The test ends." goto endsub end if diff --git a/testautomation/graphics/optional/includes/impress/i_slidecopy.inc b/testautomation/graphics/optional/includes/impress/i_slidecopy.inc index 73971c2e889f..1a9590b9856f 100644 --- a/testautomation/graphics/optional/includes/impress/i_slidecopy.inc +++ b/testautomation/graphics/optional/includes/impress/i_slidecopy.inc @@ -29,20 +29,19 @@ '* '* short description: includefile for Slidecopy-testing '* -'******************************************************************************* -' #1 tiSlideCopyNewPresentation -' #1 tiSlideCopyDuplicate -' #1 tiSlideCopyPasteSpecial -' #1 tiSlideCopyInSlideSorter '\****************************************************************************** testcase tiSlideCopyNewPresentation + + const MENUITEM_RENAME = 27027 + Dim value1 as string Dim value2 as string Dim value12 as string Dim value13 as string - printlog "This test copies one slide from one presentation to another." - printlog "Make new presentation" + + printlog "This test copies one slide from one presentation to another." + printlog "Make new presentation" Call hNewDocument Call sSelectEmptyLayout printlog "Insert three objects: Connector, Door-plate, and Smiley." @@ -52,209 +51,228 @@ testcase tiSlideCopyNewPresentation sleep 1 try Verbinder.TearOff - catch + catch warnlog "bug for GH from FHA; .tearoff doesnt tell success" - endcatch - kontext "Connectorsbar" - sleep 2 - Verbinder.click - sleep 5 - gMouseDown (10,10) - gMouseMove (10,10,30,30) - gMouseUp (30,30) - kontext "Connectorsbar" - Connectorsbar.Close - hTypeKeys "<ESCAPE>" - hTypeKeys "<TAB>", 1 - printlog "We rename the object via the contextmenu." - sleep (1) - DocumentImpress.TypeKeys "<SHIFT F10>" - sleep (2) - printlog "then Choose rename." - if hMenuFindSelect(27027, true, 14) = false then + endcatch + kontext "Connectorsbar" + sleep 2 + Verbinder.click + sleep 5 + gMouseDown (10,10) + gMouseMove (10,10,30,30) + gMouseUp (30,30) + kontext "Connectorsbar" + Connectorsbar.Close + hTypeKeys "<ESCAPE>" + hTypeKeys "<TAB>", 1 + printlog "We rename the object via the contextmenu." + sleep (1) + DocumentImpress.TypeKeys "<SHIFT F10>" + sleep (2) + printlog "then Choose rename." + if hMenuFindSelect( MENUITEM_RENAME, true, 14) = false then Warnlog "Context-Menu-entry `Rename` was not found. Therefore the test ends." Call hCloseDocument Goto Endsub - endif - sleep 2 - kontext "NameDlgObject" - NameField.SetText "First" - NameDlgObject.OK - kontext "DocumentImpress" - hMouseClick DocumentImpress, 90, 90 -'----------------------------------------------------------------------------1 - printlog "Then we insert the second object: a Door-plate." - kontext "Toolbar" - sleep 2 - try + endif + + kontext "NameDlgObject" + if ( NameDlgObject.exists( 2 ) ) then + NameField.SetText "First" + NameDlgObject.OK + else + warnlog( "<NameDlgObject> failed to open" ) + endif + + kontext "DocumentImpress" + hMouseClick DocumentImpress, 90, 90 + '----------------------------------------------------------------------------1 + printlog "Then we insert the second object: a Door-plate." + + kontext "Toolbar" + sleep 2 + try StarShapes.TearOff - catch - warnlog "bug for GH from FHA; .tearoff doesnt tell success" - endcatch - sleep 2 - kontext "StarShapes" - StarShapesDoorplate.click - sleep (3) - gMouseDown (40,40) - gMouseMove (40,40,60,60) - gMouseUp (60,60) + catch + warnlog( "<StarShapes.TearOff> failed" ) + goto endsub + endcatch + kontext "StarShapes" - StarShapes.Close - hTypeKeys "<ESCAPE>" - hTypeKeys "<TAB>", 2 - printlog "And then we rename the object." - sleep (1) - DocumentImpress.TypeKeys "<SHIFT F10>" - sleep 2 - if hMenuFindSelect(27027, true, 15) = false then + if ( StarShapes.exists( 2 ) ) then + StarShapesDoorplate.click + else + warnlog( "<StarShapesDoorplate> could not be clicked" ) + endif + + sleep (3) + gMouseDown (40,40) + gMouseMove (40,40,60,60) + gMouseUp (60,60) + + kontext "StarShapes" + hCloseDialog( StarShapes, "close" ) + + hTypeKeys "<ESCAPE>" + hTypeKeys "<TAB>", 2 + printlog "And then we rename the object." + sleep (1) + DocumentImpress.TypeKeys "<SHIFT F10>" + sleep 2 + if hMenuFindSelect( MENUITEM_RENAME, true, 15) = false then Warnlog "Context-Menu-entry `Rename` was not found. Therefore the test ends." Call hCloseDocument Goto Endsub - endif - kontext "NameDlgObject" - NameField.SetText "Second" - NameDlgObject.OK - kontext "DocumentImpress" - hMouseClick DocumentImpress, 90, 90 -'----------------------------------------------------------------------------2 - printlog "Then we insert the thrid object: a Smiley." - kontext "Toolbar" - sleep 1 - try + endif + kontext "NameDlgObject" + if ( NameDlgObject.exists( 2 ) ) then + NameField.SetText "Second" + NameDlgObject.OK + else + warnlog( "<NameDlgObject> could not be accessed" ) + endif + + kontext "DocumentImpress" + hMouseClick DocumentImpress, 90, 90 + '----------------------------------------------------------------------------2 + printlog "Then we insert the thrid object: a Smiley." + kontext "Toolbar" + sleep 1 + try SymbolShapes.TearOff - catch + catch warnlog "bug for GH from FHA; .tearoff doesnt tell success" - endcatch - kontext "SymbolShapes" - sleep 1 - SymbolShapesSmiley.Click - sleep 2 - gMouseDown (70,70) - gMouseMove (70,70,89,89) - gMouseUp (89,89) - kontext "SymbolShapes" - SymbolShapes.Close - hTypeKeys "<ESCAPE>" - hTypeKeys "<TAB>", 3 - printlog "We rename the object via the Context-menu." - DocumentImpress.TypeKeys "<SHIFT F10>" - sleep (2) - 'Choose rename. - if hMenuFindSelect(27027, true, 15) = false then + endcatch + kontext "SymbolShapes" + sleep 1 + SymbolShapesSmiley.Click + sleep 2 + gMouseDown (70,70) + gMouseMove (70,70,89,89) + gMouseUp (89,89) + kontext "SymbolShapes" + SymbolShapes.Close + hTypeKeys "<ESCAPE>" + hTypeKeys "<TAB>", 3 + printlog "We rename the object via the Context-menu." + DocumentImpress.TypeKeys "<SHIFT F10>" + sleep (2) + 'Choose rename. + if hMenuFindSelect( MENUITEM_RENAME, true, 15) = false then Warnlog "Context-Menu-entry `Rename` was not found. Therefore the test ends." Call hCloseDocument Goto Endsub - endif - kontext "NameDlgObject" - NameField.SetText "Third" - NameDlgObject.OK - kontext "DocumentImpress" - hMouseClick DocumentImpress, 90, 90 -'---------------------------------------------------------------------------3 - '/// Copy the slide to the clipboard ///' - kontext "Slides" - SlidesControl.TypeKeys "<PAGEUP>" - sleep (1) - SlidesControl.TypeKeys "<SHIFT F10>" - sleep 2 - printlog "We copy the object via the Context-menu." - - if hMenuFindSelect(5711, true, 10) = false then + endif + kontext "NameDlgObject" + NameField.SetText "Third" + NameDlgObject.OK + kontext "DocumentImpress" + hMouseClick DocumentImpress, 90, 90 + '---------------------------------------------------------------------------3 + '/// Copy the slide to the clipboard ///' + kontext "Slides" + SlidesControl.TypeKeys "<PAGEUP>" + sleep (1) + SlidesControl.TypeKeys "<SHIFT F10>" + sleep 2 + printlog "We copy the object via the Context-menu." + + if hMenuFindSelect(5711, true, 10) = false then Warnlog "Context-Menu-entry `Copy` was not found. Therefore the test ends." Call hCloseDocument - Goto Endsub - endif - '/// Close the presentation-window ///' - Call hCloseDocument - '/// Open a new presentation ///' - Call hNewDocument - '/// Paste the slide from the clipboard ///' - kontext "Slides" - EditPaste - '/// Delete the first slide ///' - EditDeleteSlide - '/// Check if all three objects exists, and has the right values ///' - kontext "DocumentImpress" - hTypeKeys "<ESCAPE>" - hTypeKeys "<TAB>", 1 'Select the first object. - 'Bring up the kontext-menu for the object - sleep (1) - DocumentImpress.TypeKeys "<SHIFT F10>" - sleep 2 - printlog "We rename the object via the Context-menu." - if hMenuFindSelect(27027, true, 14) = false then + Goto Endsub + endif + '/// Close the presentation-window ///' + Call hCloseDocument + '/// Open a new presentation ///' + Call hNewDocument + '/// Paste the slide from the clipboard ///' + kontext "Slides" + hUseAsyncSlot( "EditPaste" ) + '/// Delete the first slide ///' + hUseAsyncSlot( "EditDeleteSlide" ) + '/// Check if all three objects exists, and has the right values ///' + kontext "DocumentImpress" + hTypeKeys "<ESCAPE>" + hTypeKeys "<TAB>", 1 'Select the first object. + 'Bring up the kontext-menu for the object + sleep (1) + DocumentImpress.TypeKeys "<SHIFT F10>" + sleep 2 + printlog "We rename the object via the Context-menu." + if hMenuFindSelect( MENUITEM_RENAME, true, 14) = false then Warnlog "Context-Menu-entry `Rename` was not found. Therefore the test ends." Call hCloseDocument Goto Endsub - endif - printlog "Read out what the name is, and checks if it's correct." - kontext "NameDlgObject" - value1 = NameField.GetText - NameDlgObject.OK - if value1 = "First" then + endif + printlog "Read out what the name is, and checks if it's correct." + kontext "NameDlgObject" + value1 = NameField.GetText + NameDlgObject.OK + if value1 = "First" then printlog "First object was found correctly" - else + else Warnlog "Wrong object or object-name! The name found was: " + value1 - endif - kontext "DocumentImpress" - hMouseClick DocumentImpress, 90, 90 - DocumentImpress.TypeKeys "<TAB TAB>" 'Select the second object. - 'Bring up the kontext-menu for the object - sleep (1) - DocumentImpress.TypeKeys "<SHIFT F10>" - sleep 2 - printlog "We rename the object via the Context-menu." - if hMenuFindSelect(27027, true, 15) = false then + endif + kontext "DocumentImpress" + hMouseClick DocumentImpress, 90, 90 + DocumentImpress.TypeKeys "<TAB TAB>" 'Select the second object. + 'Bring up the kontext-menu for the object + sleep (1) + DocumentImpress.TypeKeys "<SHIFT F10>" + sleep 2 + printlog "We rename the object via the Context-menu." + if hMenuFindSelect( MENUITEM_RENAME, true, 15) = false then Warnlog "Context-Menu-entry `Rename` was not found. Therefore the test ends." Call hCloseDocument Goto Endsub - endif - printlog "Read out what the name is, and check if it's correct." - sleep 1 - kontext "NameDlgObject" - value12 = NameField.GetText - NameDlgObject.OK - - if value12 = "Second" then + endif + printlog "Read out what the name is, and check if it's correct." + sleep 1 + kontext "NameDlgObject" + value12 = NameField.GetText + NameDlgObject.OK + + if value12 = "Second" then printlog "Second object was found correctly" - else + else Warnlog "Wrong object or object-name! The name found was: " + value12 - endif - - kontext "DocumentImpress" - hMouseClick DocumentImpress, 90, 90 - DocumentImpress.TypeKeys "<TAB TAB TAB>" 'Select the third object. - 'Bring up the kontext-menu for the object - sleep (2) - DocumentImpress.TypeKeys "<SHIFT F10>" - sleep 2 - printlog "We rename the object via the Context-menu." - if hMenuFindSelect(27027, true, 15) = false then + endif + + kontext "DocumentImpress" + hMouseClick DocumentImpress, 90, 90 + DocumentImpress.TypeKeys "<TAB TAB TAB>" 'Select the third object. + 'Bring up the kontext-menu for the object + sleep (2) + DocumentImpress.TypeKeys "<SHIFT F10>" + sleep 2 + printlog "We rename the object via the Context-menu." + if hMenuFindSelect( MENUITEM_RENAME, true, 15) = false then Warnlog "Context-Menu-entry `Rename` was not found. Therefore the test ends." Call hCloseDocument Goto Endsub - endif - printlog "Read out what the name is, and check if it's correct." - kontext "NameDlgObject" - value13 = NameField.GetText - NameDlgObject.OK + endif + printlog "Read out what the name is, and check if it's correct." + kontext "NameDlgObject" + value13 = NameField.GetText + NameDlgObject.OK - if value13 = "Third" then + if value13 = "Third" then printlog "Third object was found correctly" - else + else Warnlog "Wrong object or object-name! The name found was: " + value13 - endif + endif - '/// Close the bars we opened before. ///' - kontext "Connectorsbar" - if Connectorsbar.Exists then Connectorsbar.Close - kontext "SymbolShapes" - if SymbolShapes.Exists then SymbolShapes.Close - kontext "StarShapes" - if StarShapes.Exists then StarShapes.Close + '/// Close the bars we opened before. ///' + kontext "Connectorsbar" + if Connectorsbar.Exists then Connectorsbar.Close + kontext "SymbolShapes" + if SymbolShapes.Exists then SymbolShapes.Close + kontext "StarShapes" + if StarShapes.Exists then StarShapes.Close - '/// Close Presentation. End testcase ///' - Call hCloseDocument + '/// Close Presentation. End testcase ///' + Call hCloseDocument endcase 'tiSlideCopyNewPresentation '------------------------------------------------------------------------- @@ -273,17 +291,17 @@ testcase tiSlideCopyDuplicate sleep 1 try Verbinder.TearOff ' insert connector - catch + catch warnlog "bug for GH from FHA; .tearoff doesnt tell success" - endcatch - kontext "Connectorsbar" - sleep 1 - Verbinder.click - sleep 1 - kontext "DocumentImpress" - gMouseDown (10,10) - gMouseMove (10,10,30,30) - gMouseUp (30,30) + endcatch + kontext "Connectorsbar" + sleep 1 + Verbinder.click + sleep 1 + kontext "DocumentImpress" + gMouseDown (10,10) + gMouseMove (10,10,30,30) + gMouseUp (30,30) hTypeKeys "<ESCAPE>" hTypeKeys "<TAB>", 1 @@ -298,14 +316,14 @@ testcase tiSlideCopyDuplicate Warnlog "Context-Menu-entry `Rename` was not found. Therefore the test ends." Call hCloseDocument Goto Endsub - endif - kontext "NameDlgObject" - NameField.SetText "First" - NameDlgObject.OK - sleep 1 + endif + kontext "NameDlgObject" + NameField.SetText "First" + NameDlgObject.OK + sleep 1 - kontext "DocumentImpress" - hMouseClick DocumentImpress, 90, 90 + kontext "DocumentImpress" + hMouseClick DocumentImpress, 90, 90 printlog "2 Insert Door-plate" kontext "Toolbar" @@ -314,19 +332,19 @@ testcase tiSlideCopyDuplicate StarShapes.TearOff catch warnlog "bug for GH from FHA; .tearoff doesnt tell success" - endcatch - kontext "StarShapes" - sleep 1 - StarShapesDoorplate.click - sleep 1 - kontext "DocumentImpress" - gMouseDown (40,40) - gMouseMove (40,40,60,60) - gMouseUp (60,60) - - hTypeKeys "<ESCAPE>" - hTypeKeys "<TAB>", 2 - sleep (1) + endcatch + kontext "StarShapes" + sleep 1 + StarShapesDoorplate.click + sleep 1 + kontext "DocumentImpress" + gMouseDown (40,40) + gMouseMove (40,40,60,60) + gMouseUp (60,60) + + hTypeKeys "<ESCAPE>" + hTypeKeys "<TAB>", 2 + sleep (1) printlog "Rename object" kontext "DocumentImpress" @@ -337,14 +355,14 @@ testcase tiSlideCopyDuplicate Warnlog "Context-Menu-entry `Rename` was not found. Therefore the test ends." Call hCloseDocument Goto Endsub - endif - kontext "NameDlgObject" - NameField.SetText "Second" - NameDlgObject.OK - sleep 1 + endif + kontext "NameDlgObject" + NameField.SetText "Second" + NameDlgObject.OK + sleep 1 - kontext "DocumentImpress" - hMouseClick DocumentImpress, 90, 90 + kontext "DocumentImpress" + hMouseClick DocumentImpress, 90, 90 printlog "Insert Smiley." kontext "Toolbar" @@ -353,18 +371,18 @@ testcase tiSlideCopyDuplicate SymbolShapes.TearOff catch warnlog "bug for GH from FHA; .tearoff doesnt tell success" - endcatch - kontext "SymbolShapes" - sleep 1 - SymbolShapesSmiley.Click - sleep 1 - gMouseDown (70,70) - gMouseMove (70,70,89,89) - gMouseUp (89,89) - - hTypeKeys "<ESCAPE>" - hTypeKeys "<TAB>", 3 - sleep (1) + endcatch + kontext "SymbolShapes" + sleep 1 + SymbolShapesSmiley.Click + sleep 1 + gMouseDown (70,70) + gMouseMove (70,70,89,89) + gMouseUp (89,89) + + hTypeKeys "<ESCAPE>" + hTypeKeys "<TAB>", 3 + sleep (1) printlog "rename object" DocumentImpress.TypeKeys "<SHIFT F10>" @@ -374,14 +392,14 @@ testcase tiSlideCopyDuplicate Warnlog "Context-Menu-entry `Rename` was not found. Therefore the test ends." Call hCloseDocument Goto Endsub - endif - kontext "NameDlgObject" - NameField.SetText "Third" - NameDlgObject.OK - sleep 1 + endif + kontext "NameDlgObject" + NameField.SetText "Third" + NameDlgObject.OK + sleep 1 - kontext "DocumentImpress" - hMouseClick DocumentImpress, 90, 90 + kontext "DocumentImpress" + hMouseClick DocumentImpress, 90, 90 printlog "Close the bars we opened before." kontext "Connectorsbar" @@ -402,24 +420,24 @@ testcase tiSlideCopyDuplicate Warnlog "Context-Menu-entry `Copy` was not found.Therefore the test ends." Call hCloseDocument Goto Endsub - endif + endif printlog "Paste the content from the Clipboard" kontext "Slides" printlog "open context-menu choose 'paste'" - EditPaste + EditPaste - kontext "InsertPaste" - if InsertPaste.Exists(1) then + kontext "InsertPaste" + if InsertPaste.Exists(1) then After.Check InsertPaste.OK endif sleep (2) printlog "Check if we have two slides, and that the objects exists, and has the right values " - kontext "Slides" - SlidesControl.TypeKeys "<PAGEUP>" + kontext "Slides" + SlidesControl.TypeKeys "<PAGEUP>" for i = 1 to 2 Printlog "Checking objects the " + i + " + time." @@ -443,21 +461,21 @@ testcase tiSlideCopyDuplicate NameDlgObject.OK if value1 = "First" then - printlog "First object was found correctly" + printlog "First object was found correctly" else - Warnlog "Wrong object or object-name! The name found was: " + value1 + Warnlog "Wrong object or object-name! The name found was: " + value1 endif hTypeKeys "<ESCAPE>" DocumentImpress.TypeKeys "<TAB>", 2 - sleep (1) + sleep (1) DocumentImpress.TypeKeys "<SHIFT F10>" printlog "Choose rename" if hMenuFindSelect(27027, true, 15) = false then - Warnlog "Context-Menu-entry `Rename` was not found. Therefore the test ends." - Call hCloseDocument - Goto Endsub + Warnlog "Context-Menu-entry `Rename` was not found. Therefore the test ends." + Call hCloseDocument + Goto Endsub endif printlog "Read out what the name is, and check if its correct." @@ -466,9 +484,9 @@ testcase tiSlideCopyDuplicate NameDlgObject.OK if value12 = "Second" then - printlog "Second object was found correctly" + printlog "Second object was found correctly" else - Warnlog "Wrong object or object-name! The name found was: " + value12 + Warnlog "Wrong object or object-name! The name found was: " + value12 endif hTypeKeys "<ESCAPE>" @@ -481,9 +499,9 @@ testcase tiSlideCopyDuplicate sleep 1 printlog "Choose rename" if hMenuFindSelect(27027, true, 15) = false then - Warnlog "Context-Menu-entry `Rename` was not found. Therefore the test ends." - Call hCloseDocument - Goto Endsub + Warnlog "Context-Menu-entry `Rename` was not found. Therefore the test ends." + Call hCloseDocument + Goto Endsub endif printlog "Read out what the name is, and check if its correct." @@ -492,13 +510,13 @@ testcase tiSlideCopyDuplicate NameDlgObject.OK if value13 = "Third" then - printlog "Third object was found correctly" + printlog "Third object was found correctly" else - Warnlog "Wrong object or object-name! The name found was: " + value13 + Warnlog "Wrong object or object-name! The name found was: " + value13 endif kontext "Slides" SlidesControl.TypeKeys "<DOWN>" - next i + next i printlog " Close Presentation. End testcase " Call hCloseDocument @@ -507,453 +525,453 @@ endcase 'tiSlidecopyDuplicate '----------------------------------------------------------------------- testcase tiSlideCopyPasteSpecial -qaerrorlog "#i93377#: Paste special dialog does not come up with kontext on slide pane" -goto endsub - + qaerrorlog "#i93377#: Paste special dialog does not come up with kontext on slide pane" + goto endsub + Dim value1 as string Dim value2 as string Dim value3 as string - '/// Copies slide, and pastes it with "Paste Special", ///' - '/// just to see if the office can handle it ///' - '/// Make new presentation ///' - Call hNewDocument - '/// Insert three objects: Connector, Door-plate, and Smiley ///' + '/// Copies slide, and pastes it with "Paste Special", ///' + '/// just to see if the office can handle it ///' + '/// Make new presentation ///' + Call hNewDocument + '/// Insert three objects: Connector, Door-plate, and Smiley ///' - '1 Insert Connector. - kontext "Toolbar" - sleep 1 - try + '1 Insert Connector. + kontext "Toolbar" + sleep 1 + try Verbinder.TearOff ' insert connector - catch + catch warnlog "bug for GH from FHA; .tearoff doesnt tell success" - endcatch - kontext "Connectorsbar" - sleep 1 - Verbinder.click - sleep 1 - gMouseDown (10,10) - gMouseMove (10,10,30,30) - gMouseUp (30,30) - - kontext "DocumentImpress" - hMouseClick DocumentImpress, 90, 90 - - '2 Insert Door-plate. - kontext "Toolbar" - sleep 1 - try + endcatch + kontext "Connectorsbar" + sleep 1 + Verbinder.click + sleep 1 + gMouseDown (10,10) + gMouseMove (10,10,30,30) + gMouseUp (30,30) + + kontext "DocumentImpress" + hMouseClick DocumentImpress, 90, 90 + + '2 Insert Door-plate. + kontext "Toolbar" + sleep 1 + try StarShapes.TearOff ' insert connector - catch + catch warnlog "bug for GH from FHA; .tearoff doesnt tell success" - endcatch - kontext "StarShapes" - sleep 1 - StarShapesDoorplate.click - sleep 1 - gMouseDown (40,40) - gMouseMove (40,40,60,60) - gMouseUp (60,60) - - kontext "DocumentImpress" - hMouseClick DocumentImpress, 90, 90 - - '3 Insert Smiley. - kontext "Toolbar" - sleep 1 - try + endcatch + kontext "StarShapes" + sleep 1 + StarShapesDoorplate.click + sleep 1 + gMouseDown (40,40) + gMouseMove (40,40,60,60) + gMouseUp (60,60) + + kontext "DocumentImpress" + hMouseClick DocumentImpress, 90, 90 + + '3 Insert Smiley. + kontext "Toolbar" + sleep 1 + try SymbolShapes.TearOff ' insert connector - catch + catch warnlog "bug for GH from FHA; .tearoff doesnt tell success" - endcatch - kontext "SymbolShapes" - sleep 1 - SymbolShapesSmiley.Click - sleep 1 - gMouseDown (70,70) - gMouseMove (70,70,89,89) - gMouseUp (89,89) - - '/// Copy the slide to the clipboard ///' - kontext "Slides" - SlidesControl.TypeKeys "<PAGEUP>" - SlidesControl.TypeKeys "<SHIFT F10>" - sleep 1 - 'Choose `Copy` - if hMenuFindSelect(5711, true, 10) = false then + endcatch + kontext "SymbolShapes" + sleep 1 + SymbolShapesSmiley.Click + sleep 1 + gMouseDown (70,70) + gMouseMove (70,70,89,89) + gMouseUp (89,89) + + '/// Copy the slide to the clipboard ///' + kontext "Slides" + SlidesControl.TypeKeys "<PAGEUP>" + SlidesControl.TypeKeys "<SHIFT F10>" + sleep 1 + 'Choose `Copy` + if hMenuFindSelect(5711, true, 10) = false then Warnlog "Context-Menu-entry `Copy` was not found. Therefore the test ends." Call hCloseDocument Goto Endsub - endif - - '/// Try to paste special. And check that the office still stays alive ///' - EditPasteSpecial - kontext "InhaltEinfuegen" - InhaltEinfuegen.OK - - '/// Close the bars we opened before. ///' - kontext "Connectorsbar" - if Connectorsbar.Exists then Connectorsbar.Close - kontext "SymbolShapes" - if SymbolShapes.Exists then SymbolShapes.Close - kontext "StarShapes" - if StarShapes.Exists then StarShapes.Close + endif + + '/// Try to paste special. And check that the office still stays alive ///' + EditPasteSpecial + kontext "InhaltEinfuegen" + InhaltEinfuegen.OK + + '/// Close the bars we opened before. ///' + kontext "Connectorsbar" + if Connectorsbar.Exists then Connectorsbar.Close + kontext "SymbolShapes" + if SymbolShapes.Exists then SymbolShapes.Close + kontext "StarShapes" + if StarShapes.Exists then StarShapes.Close - sleep 1 - kontext "DocumentImpress" - '/// Close Presentation. End testcase ///' + sleep 1 + kontext "DocumentImpress" + '/// Close Presentation. End testcase ///' - Call hCloseDocument + Call hCloseDocument endcase 'tiSlideCopyPasteSpecial '----------------------------------------------------------------------- testcase tiSlideCopyInSlideSorter -qaerrorlog "#i58418#: Pasting in slide sorter sets slide to wrong position" -goto endsub - + qaerrorlog "#i58418#: Pasting in slide sorter sets slide to wrong position" + goto endsub + Dim value1 as string Dim value2 as string Dim value3 as string - '/// Copies slides within the slidesorter, and makes sure they are pasted on the correct position ///' - '/// Make new presentation ///' - Call hNewDocument - '/// Insert an object: Connector, on the first slide ///' - kontext "Toolbar" - sleep 1 - try + '/// Copies slides within the slidesorter, and makes sure they are pasted on the correct position ///' + '/// Make new presentation ///' + Call hNewDocument + '/// Insert an object: Connector, on the first slide ///' + kontext "Toolbar" + sleep 1 + try Verbinder.TearOff - catch + catch warnlog "bug for GH from FHA; .tearoff doesnt tell success" - endcatch - kontext "Connectorsbar" - sleep 1 - Verbinder.click - Verbinder.click - Verbinder.click - sleep 1 - kontext "DocumentImpress" - gMouseDown (10,10) - gMouseMove (10,10,30,30) - gMouseUp (30,30) - Printlog " Inserted a Connector-object." - 'Rename object - hTypeKeys "<ESCAPE>" - hTypeKeys "<TAB>", 1 - DocumentImpress.TypeKeys "<SHIFT F10>" - - 'Rename - if hMenuFindSelect(27027, true, 14) = false then + endcatch + kontext "Connectorsbar" + sleep 1 + Verbinder.click + Verbinder.click + Verbinder.click + sleep 1 + kontext "DocumentImpress" + gMouseDown (10,10) + gMouseMove (10,10,30,30) + gMouseUp (30,30) + Printlog " Inserted a Connector-object." + 'Rename object + hTypeKeys "<ESCAPE>" + hTypeKeys "<TAB>", 1 + DocumentImpress.TypeKeys "<SHIFT F10>" + + 'Rename + if hMenuFindSelect(27027, true, 14) = false then Warnlog "Context-Menu-entry `Rename` was not found. Therefore the test ends." Call hCloseDocument Goto Endsub - endif - kontext "NameDlgObject" - NameField.SetText "First" - NameDlgObject.OK - sleep 1 - Printlog " Renamed a the object to 'First'" - - sleep 3 - '/// Rename slide to "1" ///' - kontext "Slides" - SlidesControl.TypeKeys "<PAGEUP>" - SlidesControl.TypeKeys "<SHIFT F10>" - sleep 3 - 'Rename - if hMenuFindSelect(27268, true, 2) = false then + endif + kontext "NameDlgObject" + NameField.SetText "First" + NameDlgObject.OK + sleep 1 + Printlog " Renamed a the object to 'First'" + + sleep 3 + '/// Rename slide to "1" ///' + kontext "Slides" + SlidesControl.TypeKeys "<PAGEUP>" + SlidesControl.TypeKeys "<SHIFT F10>" + sleep 3 + 'Rename + if hMenuFindSelect(27268, true, 2) = false then Warnlog "Context-Menu-entry `Rename` was not found. Therefore the test ends." Call hCloseDocument Goto Endsub - endif - - kontext "NameDlgPage" - NameField.SetText "1" - NameDlgPage.OK - sleep 1 - Printlog " Renamed the Slide to '1'" - - kontext "DocumentImpress" - hMouseClick DocumentImpress, 90, 90 - sleep 3 - - '/// Insert a new slide ///' - kontext "Slides" - SlidesControl.TypeKeys "<TAB><PAGEDOWN>" - SlidesControl.OpenContextMenu - sleep 3 - 'Insert slide - if hMenuFindSelect(27014, true, 1) = false then + endif + + kontext "NameDlgPage" + NameField.SetText "1" + NameDlgPage.OK + sleep 1 + Printlog " Renamed the Slide to '1'" + + kontext "DocumentImpress" + hMouseClick DocumentImpress, 90, 90 + sleep 3 + + '/// Insert a new slide ///' + kontext "Slides" + SlidesControl.TypeKeys "<TAB><PAGEDOWN>" + SlidesControl.OpenContextMenu + sleep 3 + 'Insert slide + if hMenuFindSelect(27014, true, 1) = false then Warnlog "Context-Menu-entry `Insert slide` was not found. Therefore the test ends." Call hCloseDocument Goto Endsub - endif - Printlog " Inserted a new slide." - '/// Insert an object: Door-plate, on the second slide ///' - kontext "Toolbar" - sleep 1 - try + endif + Printlog " Inserted a new slide." + '/// Insert an object: Door-plate, on the second slide ///' + kontext "Toolbar" + sleep 1 + try StarShapes.TearOff - catch + catch warnlog "bug for GH from FHA; .tearoff doesnt tell success" - endcatch - kontext "StarShapes" - sleep 1 - StarShapesDoorplate.click - sleep 1 - kontext "DocumentImpress" - gMouseDown (40,40) - gMouseMove (40,40,60,60) - gMouseUp (60,60) - Printlog " Inserted a Door-Plate-object." - - hTypeKeys "<ESCAPE>" - hTypeKeys "<TAB>", 2 - hTypeKeys "<SHIFT F10>" - - ' Rename - if hMenuFindSelect(27027, true, 15) = false then + endcatch + kontext "StarShapes" + sleep 1 + StarShapesDoorplate.click + sleep 1 + kontext "DocumentImpress" + gMouseDown (40,40) + gMouseMove (40,40,60,60) + gMouseUp (60,60) + Printlog " Inserted a Door-Plate-object." + + hTypeKeys "<ESCAPE>" + hTypeKeys "<TAB>", 2 + hTypeKeys "<SHIFT F10>" + + ' Rename + if hMenuFindSelect(27027, true, 15) = false then Warnlog "Context-Menu-entry `Rename` was not found. Therefore the test ends." Call hCloseDocument Goto Endsub - endif - - kontext "NameDlgObject" - NameField.SetText "Second" - NameDlgObject.OK - sleep 1 - Printlog " Renamed a the object to 'Second'" - - kontext "DocumentImpress" - hMouseClick DocumentImpress, 90, 90 - sleep 2 - '/// Rename slide to "2" ///' - kontext "Slides" - SlidesControl.OpenContextMenu - sleep 3 - ' Rename - if hMenuFindSelect(27268, true, 3) = false then + endif + + kontext "NameDlgObject" + NameField.SetText "Second" + NameDlgObject.OK + sleep 1 + Printlog " Renamed a the object to 'Second'" + + kontext "DocumentImpress" + hMouseClick DocumentImpress, 90, 90 + sleep 2 + '/// Rename slide to "2" ///' + kontext "Slides" + SlidesControl.OpenContextMenu + sleep 3 + ' Rename + if hMenuFindSelect(27268, true, 3) = false then Warnlog "Context-Menu-entry `Rename` was not found. Therefore the test ends." Call hCloseDocument Goto Endsub - endif - kontext "NameDlgPage" - NameField.SetText "2" - NameDlgPage.OK - sleep 1 - Printlog " Renamed the slide '2'" - - '/// Insert a new slide ///' - kontext "Slides" - Slidescontrol.TypeKeys "<PAGEDOWN>", 2 - Slidescontrol.TypeKeys "<SHIFT F10>" - sleep 3 - 'Insert slide - if hMenuFindSelect(27014, true, 1) = false then + endif + kontext "NameDlgPage" + NameField.SetText "2" + NameDlgPage.OK + sleep 1 + Printlog " Renamed the slide '2'" + + '/// Insert a new slide ///' + kontext "Slides" + Slidescontrol.TypeKeys "<PAGEDOWN>", 2 + Slidescontrol.TypeKeys "<SHIFT F10>" + sleep 3 + 'Insert slide + if hMenuFindSelect(27014, true, 1) = false then Warnlog "Context-Menu-entry `Insert slide` was not found. Therefore the test ends." Call hCloseDocument Goto Endsub - endif - Printlog " Inserted a new slide." + endif + Printlog " Inserted a new slide." - '/// Insert an object: Smiley, on the second slide ///' - kontext "Toolbar" - sleep 1 - try + '/// Insert an object: Smiley, on the second slide ///' + kontext "Toolbar" + sleep 1 + try SymbolShapes.TearOff - catch + catch warnlog "bug for GH from FHA; .tearoff doesnt tell success" - endcatch - kontext "SymbolShapes" - sleep 1 - SymbolShapesSmiley.Click - sleep 1 - gMouseDown (70,70) - gMouseMove (70,70,89,89) - gMouseUp (89,89) - Printlog " Inserted a Smiley-object." - - 'Rename object - hTypeKeys "<ESCAPE>" - hTypeKeys "<TAB>", 2 - hTypeKeys "<SHIFT F10>" - - 'Choose rename. - if hMenuFindSelect(27027, true, 15) = false then + endcatch + kontext "SymbolShapes" + sleep 1 + SymbolShapesSmiley.Click + sleep 1 + gMouseDown (70,70) + gMouseMove (70,70,89,89) + gMouseUp (89,89) + Printlog " Inserted a Smiley-object." + + 'Rename object + hTypeKeys "<ESCAPE>" + hTypeKeys "<TAB>", 2 + hTypeKeys "<SHIFT F10>" + + 'Choose rename. + if hMenuFindSelect(27027, true, 15) = false then Warnlog "Context-Menu-entry `Rename` was not found. Therefore the test ends." Call hCloseDocument Goto Endsub - endif - kontext "NameDlgObject" - NameField.SetText "Third" - NameDlgObject.OK - Printlog " Renamed a the object to 'Third'" - - '/// Rename slide to "3" ///' - kontext "Slides" - Slidescontrol.TypeKeys "<PAGEDOWN>", 2 - SlidesControl.OpenContextMenu - sleep 3 - ' Rename - if hMenuFindSelect(27268, true, 3) = false then + endif + kontext "NameDlgObject" + NameField.SetText "Third" + NameDlgObject.OK + Printlog " Renamed a the object to 'Third'" + + '/// Rename slide to "3" ///' + kontext "Slides" + Slidescontrol.TypeKeys "<PAGEDOWN>", 2 + SlidesControl.OpenContextMenu + sleep 3 + ' Rename + if hMenuFindSelect(27268, true, 3) = false then Warnlog "Context-Menu-entry `Rename` was not found. Therefore the test ends." Call hCloseDocument Goto Endsub - endif + endif + + kontext "NameDlgPage" + NameField.SetText "3" + NameDlgPage.OK + sleep 1 + Printlog " Renamed the slide '3'" + + '/// Close the bars we opened before. ///' + kontext "Connectorsbar" + if Connectorsbar.Exists then Connectorsbar.Close + kontext "SymbolShapes" + if SymbolShapes.Exists then SymbolShapes.Close + kontext "StarShapes" + if StarShapes.Exists then StarShapes.Close - kontext "NameDlgPage" - NameField.SetText "3" - NameDlgPage.OK - sleep 1 - Printlog " Renamed the slide '3'" + '/// Change to Slidesorter ///' + kontext "DocumentImpress" + ViewSlideSorter - '/// Close the bars we opened before. ///' - kontext "Connectorsbar" - if Connectorsbar.Exists then Connectorsbar.Close - kontext "SymbolShapes" - if SymbolShapes.Exists then SymbolShapes.Close - kontext "StarShapes" - if StarShapes.Exists then StarShapes.Close + '/// Now we have changed view to the slidesorter ///' - '/// Change to Slidesorter ///' - kontext "DocumentImpress" - ViewSlideSorter + kontext "Slides" + Printlog " Changed view to 'SlideSorter'" + '/// Make sure the last slide is selcted ///' + SlidesControl.TypeKeys "<TAB>" + SlidesControl.TypeKeys "<PAGEDOWN>", 3 - '/// Now we have changed view to the slidesorter ///' - - kontext "Slides" - Printlog " Changed view to 'SlideSorter'" - '/// Make sure the last slide is selcted ///' - SlidesControl.TypeKeys "<TAB>" - SlidesControl.TypeKeys "<PAGEDOWN>", 3 - - '/// Cut the last slide ///' - SlidesControl.TypeKeys "<MOD1 X>" + '/// Cut the last slide ///' + SlidesControl.TypeKeys "<MOD1 X>" - '/// Make sure the first slide is selected ///' - SlidesControl.TypeKeys "<TAB>" - SlidesControl.TypeKeys "<PAGEUP>", 2 - sleep 1 + '/// Make sure the first slide is selected ///' + SlidesControl.TypeKeys "<TAB>" + SlidesControl.TypeKeys "<PAGEUP>", 2 + sleep 1 - '/// Paste the Slide ///' - kontext "Slides" - SlidesControl.TypeKeys "<MOD1 V>" + '/// Paste the Slide ///' + kontext "Slides" + SlidesControl.TypeKeys "<MOD1 V>" - '/// choose "Before" as specification for where - Kontext "InsertPaste" - if InsertPaste.Exists(3) then + '/// choose "Before" as specification for where + Kontext "InsertPaste" + if InsertPaste.Exists(3) then Before.Check InsertPaste.OK Printlog " Pasted slide 'Before'" - else + else warnlog " Problem when copying/pasting slide." - endif - - '/// Check where the slide ended up ///' - kontext "Slides" - SlidesControl.TypeKeys "<TAB>" - SlidesControl.TypeKeys "<PAGEUP>", 3 'to get to the first slide - SlidesControl.TypeKeys "<SHIFT F10>" - sleep 3 - ' Rename - if hMenuFindSelect(27268, true, 3) = false then + endif + + '/// Check where the slide ended up ///' + kontext "Slides" + SlidesControl.TypeKeys "<TAB>" + SlidesControl.TypeKeys "<PAGEUP>", 3 'to get to the first slide + SlidesControl.TypeKeys "<SHIFT F10>" + sleep 3 + ' Rename + if hMenuFindSelect(27268, true, 3) = false then Warnlog "Context-Menu-entry `Rename` was not found. Therefore the test ends." Call hCloseDocument Goto Endsub - endif + endif - kontext "NameDlgPage" - if NameField.GetText <> "3" then + kontext "NameDlgPage" + if NameField.GetText <> "3" then Warnlog "Wrong slide found! Expected nr 3, but found " + NameField.GetText + "." - else + else Printlog " Slide nr 3 was found correctly." - endif - NameDlgPage.OK - sleep 1 - - kontext "Slides" - '/// Choose the slide in the middle (named "1") ///' - SlidesControl.TypeKeys "<TAB>" - SlidesControl.TypeKeys "<PAGEDOWN>", 3 'to get to the last slide - SlidesControl.TypeKeys "<PAGEUP>" 'to go back one step - SlidesControl.OpenContextMenu (true) - ' Check the name of that slide (via Rename) - if hMenuFindSelect(27268, true, 3) = false then + endif + NameDlgPage.OK + sleep 1 + + kontext "Slides" + '/// Choose the slide in the middle (named "1") ///' + SlidesControl.TypeKeys "<TAB>" + SlidesControl.TypeKeys "<PAGEDOWN>", 3 'to get to the last slide + SlidesControl.TypeKeys "<PAGEUP>" 'to go back one step + SlidesControl.OpenContextMenu (true) + ' Check the name of that slide (via Rename) + if hMenuFindSelect(27268, true, 3) = false then Warnlog "Context-Menu-entry `Rename` was not found. Therefore the test ends." Call hCloseDocument Goto Endsub - endif + endif - kontext "NameDlgPage" - if NameField.GetText <> "1" then + kontext "NameDlgPage" + if NameField.GetText <> "1" then Warnlog "Wrong slide found! Expected nr 1, but found " + NameField.GetText + "." - else + else Printlog " Slide nr 1 was found correctly in the middle position." - endif - NameDlgPage.OK - sleep 1 - kontext "Slides" - - '/// Cut the slide ///' - SlidesControl.TypeKeys "<SHIFT F10>" - sleep 3 - if hMenuFindSelect(5710, true, 10) = false then + endif + NameDlgPage.OK + sleep 1 + kontext "Slides" + + '/// Cut the slide ///' + SlidesControl.TypeKeys "<SHIFT F10>" + sleep 3 + if hMenuFindSelect(5710, true, 10) = false then Warnlog "Context-Menu-entry `Cut` was not found. Therefore the test ends." Call hCloseDocument Goto Endsub - endif + endif - '/// Make sure we have selected the last slide ///' - SlidesControl.TypeKeys "<TAB>" - SlidesControl.TypeKeys "<PAGEDOWN>", 2 + '/// Make sure we have selected the last slide ///' + SlidesControl.TypeKeys "<TAB>" + SlidesControl.TypeKeys "<PAGEDOWN>", 2 - '/// Place the mousepointer to the left of the first slide ///' - sleep 1 - kontext "Slides" - SlidesControl.MouseMove 2, 3 - SlidesControl.OpenContextMenu true - sleep 3 + '/// Place the mousepointer to the left of the first slide ///' + sleep 1 + kontext "Slides" + SlidesControl.MouseMove 2, 3 + SlidesControl.OpenContextMenu true + sleep 3 - '/// Paste the Slide ///' - if hMenuFindSelect(5712, true, 12) = false then + '/// Paste the Slide ///' + if hMenuFindSelect(5712, true, 12) = false then Warnlog "Context-Menu-entry `Paste` were not found. Therefore the test ends." Call hCloseDocument Goto Endsub - endif - sleep 1 + endif + sleep 1 - '/// Choose "After" as specification for where ///' - Kontext "InsertPaste" - if InsertPaste.Exists(3) then + '/// Choose "After" as specification for where ///' + Kontext "InsertPaste" + if InsertPaste.Exists(3) then After.Check InsertPaste.OK Printlog " Pasted slide 'After'" - else + else warnlog " Problem when copying/pasting slide." - endif - - '/// Check where the slide ended up. Should have showed up at the last position ///' - kontext "Slides" - SlidesControl.TypeKeys "<TAB>" - SlidesControl.TypeKeys "<PAGEDOWN>", 3 'to get to the last slide - SlidesControl.TypeKeys "<SHIFT F10>" '= open context menu - sleep 3 - ' Rename - if hMenuFindSelect(27268, true, 3) = false then + endif + + '/// Check where the slide ended up. Should have showed up at the last position ///' + kontext "Slides" + SlidesControl.TypeKeys "<TAB>" + SlidesControl.TypeKeys "<PAGEDOWN>", 3 'to get to the last slide + SlidesControl.TypeKeys "<SHIFT F10>" '= open context menu + sleep 3 + ' Rename + if hMenuFindSelect(27268, true, 3) = false then Warnlog "Context-Menu-entry `Rename` was not found. Therefore the test ends." Call hCloseDocument Goto Endsub - endif + endif - kontext "NameDlgPage" - if NameField.GetText <> "1" then + kontext "NameDlgPage" + if NameField.GetText <> "1" then Warnlog "Wrong slide found! Expected nr 1, but found " + NameField.GetText + "." - else + else Printlog " Slide nr 1 was found correctly." - endif - NameDlgPage.OK - sleep 1 + endif + NameDlgPage.OK + sleep 1 - '/// Close Presentation. End testcase ///' - Call hCloseDocument + '/// Close Presentation. End testcase ///' + Call hCloseDocument endcase 'tiSlideCopyInSlideSorter '------------------------------------------------------------------------ diff --git a/testautomation/graphics/optional/includes/impress/i_us2_present.inc b/testautomation/graphics/optional/includes/impress/i_us2_present.inc index 6c8fede6a530..6b2b64881987 100644 --- a/testautomation/graphics/optional/includes/impress/i_us2_present.inc +++ b/testautomation/graphics/optional/includes/impress/i_us2_present.inc @@ -29,9 +29,6 @@ '* '* short description : Impress User-Scenario: Beginner makes presentation. '* -'*************************************************************************** -' #1 i_us2_pres1 -' #1 i_us2_pres2 '\************************************************************************** testcase i_us2_pres1 @@ -43,218 +40,217 @@ testcase i_us2_pres1 kontext "DocumentImpress" printlog "New - Wizard - Presentation." FileAutopilotPresentation - printlog "Called File-Autopilot-Presentation." - printlog "Create from Template" - kontext "AutoPilotPraesentation1" - FromTemplate.Check - 'This part is for language-indepencancy - if gOOO = TRUE then - TemplateRegion.Select (1) - printlog "Choose a Presentation" - TemplateList.Select (2) - else - TemplateRegion.Select (1) - if TemplateList.GetItemCount < 40 then + printlog "Called File-Autopilot-Presentation." + printlog "Create from Template" + kontext "AutoPilotPraesentation1" + FromTemplate.Check + 'This part is for language-indepencancy + if gOOO = TRUE then + TemplateRegion.Select (1) + printlog "Choose a Presentation" + TemplateList.Select (2) + else + TemplateRegion.Select (1) + if TemplateList.GetItemCount < 40 then TemplateRegion.Select (2) if TemplateList.GetItemCount < 40 then - TemplateRegion.Select (3) - if TemplateList.GetItemCount < 40 then - Warnlog " No Templates selectable in the wizard. Please check." - goto endsub - endif + TemplateRegion.Select (3) + if TemplateList.GetItemCount < 40 then + Warnlog " No Templates selectable in the wizard. Please check." + goto endsub + endif endif - endif - printlog "Choose a Presentation" - TemplateList.Select (4) - endif - printlog "Next" - Nextbutton.Click - sleep (1) - Backbutton.Click - sleep (1) - Nextbutton.Click + endif + printlog "Choose a Presentation" + TemplateList.Select (4) + endif + printlog "Next" + Nextbutton.Click + sleep (1) + Backbutton.Click + sleep (1) + Nextbutton.Click - printlog " Switched to the second Wizard-page." - sleep (1) - printlog "Presentations" - kontext "AutoPilotPraesentation2" - printlog "Output: Screen" - if gOOO = TRUE then 'OpenOffice.org - Background.Select (2) - if Backgroundchoice.GetItemCount < 2 then + printlog " Switched to the second Wizard-page." + sleep (1) + printlog "Presentations" + kontext "AutoPilotPraesentation2" + printlog "Output: Screen" + if gOOO = TRUE then 'OpenOffice.org + Background.Select (2) + if Backgroundchoice.GetItemCount < 2 then Background.Select (1) if Backgroundchoice.GetItemCount = 0 then - Warnlog " No Backgrounds selectable in the wizard. Please check." - goto endsub + Warnlog " No Backgrounds selectable in the wizard. Please check." + goto endsub endif - endif - Backgroundchoice.Select (2) - else 'StarOffice - Background.Select (3) - if Backgroundchoice.GetItemCount < 10 then + endif + Backgroundchoice.Select (2) + else 'StarOffice + Background.Select (3) + if Backgroundchoice.GetItemCount < 10 then Background.Select (2) if Backgroundchoice.GetItemCount < 10 then - Background.Select (3) - if Backgroundchoice.GetItemCount < 10 then - Warnlog " No Backgrounds selectable in the wizard. Please check." - goto endsub - endif + Background.Select (3) + if Backgroundchoice.GetItemCount < 10 then + Warnlog " No Backgrounds selectable in the wizard. Please check." + goto endsub + endif endif - endif - Backgroundchoice.Select (5) - endif - Screen.Check - printlog "Next" - Nextbutton.Click + endif + Backgroundchoice.Select (5) + endif + Screen.Check + printlog "Next" + Nextbutton.Click - printlog " Switched to the third Wizard-page." - sleep (1) - kontext "AutoPilotPraesentation3" - printlog "Random Effect. Random Speed. Click through every choice." - Effect.Select (15) - Speed.Select (3) - WaitSlot (5000) - Automatic.Check - Timebutton.SetText "00:00:15" - Break.SetText "00:00:20" - Logo.Check - printlog "Next" - Nextbutton.Click + printlog " Switched to the third Wizard-page." + sleep (1) + kontext "AutoPilotPraesentation3" + printlog "Random Effect. Random Speed. Click through every choice." + Effect.Select (15) + Speed.Select (3) + WaitSlot (5000) + Automatic.Check + Timebutton.SetText "00:00:15" + Break.SetText "00:00:20" + Logo.Check + printlog "Next" + Nextbutton.Click - printlog " Switched to the fourth Wizard-page." - sleep (1) - kontext "AutoPilotPraesentation4" - printlog "Fill in some company-name-subject-text" - AddName.SetText "Lala1" - AddTopic.SetText "Lala2" - Askinformation.SetText "Lala3" - printlog "Next" - Nextbutton.Click - printlog " Switched to the fifth Wizard-page." - sleep (1) - kontext "AutoPilotPraesentation5" - Summary.Check - printlog "Create" - WaitSlot (2000) - AutoPilotPraesentation5.OK + printlog " Switched to the fourth Wizard-page." + sleep (1) + kontext "AutoPilotPraesentation4" + printlog "Fill in some company-name-subject-text" + AddName.SetText "Lala1" + AddTopic.SetText "Lala2" + Askinformation.SetText "Lala3" + printlog "Next" + Nextbutton.Click + printlog " Switched to the fifth Wizard-page." + sleep (1) + kontext "AutoPilotPraesentation5" + Summary.Check + printlog "Create" + WaitSlot (2000) + AutoPilotPraesentation5.OK - sleep (1) - printlog " Pressed 'Create'." - printlog "Add a Slide via Insert - Slide." - Kontext "DocumentImpress" - hTypeKeys "What we will talk about" - gMouseClick 1,1 - Kontext "DocumentImpress" - DocumentImpress.UseMenu - hMenuSelectNr (4) - hMenuSelectNr (1) - sleep (1) + sleep (1) + printlog " Pressed 'Create'." + printlog "Add a Slide via Insert - Slide." + Kontext "DocumentImpress" + hTypeKeys "What we will talk about" + gMouseClick 1,1 + Kontext "DocumentImpress" + DocumentImpress.UseMenu + hMenuSelectNr (4) + hMenuSelectNr (1) + sleep (1) - kontext "Slides" - SlidesControl.TypeKeys "<HOME><RETURN>" - kontext "DocumentImpress" - DocumentImpress.TypeKeys "<TAB>Text we just wrote..." - printlog "Switch to the second slide." - kontext "Slides" - SlidesControl.TypeKeys "<DOWN><RETURN>" - SlidesControl.TypeKeys "<RETURN>" - kontext "DocumentImpress" - printlog "Insert three lines with text, all with different formatting." - call hTextrahmenErstellen ("First line with text",20,50,70,50) - call hTextrahmenErstellen ("Second line with text",20,60,70,60) - call hTextrahmenErstellen ("Third line with text",20,70,70,70) - printlog "Go down to the eleventh slide." - kontext "Slides" - SlidesControl.TypeKeys "<HOME>" - SlidesControl.TypeKeys "<PAGEDOWN>", 10 - SlidesControl.TypeKeys "<RETURN>" -call sSelectEmptyLayout - printlog "Insert Smiley, + two circles around the eyes, + two new pupils," - printlog "placed at some interesteing place inside the circles." - Kontext "Toolbar" - SymbolShapes.TearOff - sleep (1) - kontext "SymbolShapes" - SymbolShapesSmiley.Click - sleep (1) - kontext "DrawingObjectbar" - AreaFilling.TypeKeys "<HOME>" - AreaFilling.TypeKeys "<DOWN>", 10 - printlog "Select (11) 'Lime-Green" - AreaFilling.TypeKeys "<RETURN>" - sleep (1) - gMouseMove (53,50,90,80) - Kontext "Toolbar" - Ellipsen.Click - kontext "SymbolShapes" - SymbolShapes.Close - Kontext "DocumentImpress" - gMouseMove (60,43,70,65) - hTypeKeys "<Escape>" - Kontext "Toolbar" - Ellipsen.Click - gMouseMove (65,57,69,63) - hTypeKeys "<Escape>" - Kontext "Toolbar" - Ellipsen.Click - gMouseMove (70,50,82,65) - hTypeKeys "<Escape>" - Kontext "Toolbar" - Ellipsen.Click - gMouseMove (77,57,80,63) - hTypeKeys "<Escape>" - sleep (1) + kontext "Slides" + SlidesControl.TypeKeys "<HOME><RETURN>" + kontext "DocumentImpress" + DocumentImpress.TypeKeys "<TAB>Text we just wrote..." + printlog "Switch to the second slide." + kontext "Slides" + SlidesControl.TypeKeys "<DOWN><RETURN>" + SlidesControl.TypeKeys "<RETURN>" + kontext "DocumentImpress" + printlog "Insert three lines with text, all with different formatting." + call hTextrahmenErstellen ("First line with text",20,50,70,50) + call hTextrahmenErstellen ("Second line with text",20,60,70,60) + call hTextrahmenErstellen ("Third line with text",20,70,70,70) + printlog "Go down to the eleventh slide." + kontext "Slides" + SlidesControl.TypeKeys "<HOME>" + SlidesControl.TypeKeys "<PAGEDOWN>", 10 + SlidesControl.TypeKeys "<RETURN>" + printlog "Insert Smiley, + two circles around the eyes, + two new pupils," + printlog "placed at some interesteing place inside the circles." + Kontext "Toolbar" + SymbolShapes.TearOff + sleep (1) + kontext "SymbolShapes" + SymbolShapesSmiley.Click + sleep (1) + kontext "DrawingObjectbar" + AreaFilling.TypeKeys "<HOME>" + AreaFilling.TypeKeys "<DOWN>", 10 + printlog "Select (11) 'Lime-Green" + AreaFilling.TypeKeys "<RETURN>" + sleep (1) + gMouseMove (53,50,90,80) + Kontext "Toolbar" + Ellipsen.Click + kontext "SymbolShapes" + SymbolShapes.Close + Kontext "DocumentImpress" + gMouseMove (60,43,70,65) + hTypeKeys "<Escape>" + Kontext "Toolbar" + Ellipsen.Click + gMouseMove (65,57,69,63) + hTypeKeys "<Escape>" + Kontext "Toolbar" + Ellipsen.Click + gMouseMove (70,50,82,65) + hTypeKeys "<Escape>" + Kontext "Toolbar" + Ellipsen.Click + gMouseMove (77,57,80,63) + hTypeKeys "<Escape>" + sleep (1) - printlog "Insert new slide." - kontext "Slides" - printlog "get to the last slide." - SlidesControl.TypeKeys "<PAGEDOWN>", 15 - SlidesControl.TypeKeys "<RETURN>" - printlog "Delete the two fields the stylist has." - kontext "DocumentImpress" - gMouseClick 1,1 - EditSelectAll - DocumentImpress.TypeKeys "<DELETE>" - printlog "Insert-Picture-From File. (some crazy picture which fits the theme)" - InsertGraphicsFromFile - Kontext "GrafikEinfuegenDlg" - printlog "Open graphic" - Dateiname.SetText ConvertPath (gTesttoolPath + "global\input\graf_inp\ball.eps") - Oeffnen.Click - gMouseClick 1,1 - printlog "Add a text above the picture. 'There is movement..." - call hTextrahmenErstellen ("There is movement...",20,20,70,30) + printlog "Insert new slide." + kontext "Slides" + printlog "get to the last slide." + SlidesControl.TypeKeys "<PAGEDOWN>", 15 + SlidesControl.TypeKeys "<RETURN>" + printlog "Delete the two fields the stylist has." + kontext "DocumentImpress" + gMouseClick 1,1 + EditSelectAll + DocumentImpress.TypeKeys "<DELETE>" + printlog "Insert-Picture-From File. (some crazy picture which fits the theme)" + InsertGraphicsFromFile + Kontext "GrafikEinfuegenDlg" + printlog "Open graphic" + Dateiname.SetText ConvertPath (gTesttoolPath + "global\input\graf_inp\ball.eps") + Oeffnen.Click + gMouseClick 1,1 + printlog "Add a text above the picture. 'There is movement..." + call hTextrahmenErstellen ("There is movement...",20,20,70,30) - printlog "Add a new slide." - InsertSlide - printlog " Inserted new slide." - kontext "DocumentImpress" - printlog "Bla bla about everything..." - call hTextrahmenErstellen ("Bla bla about everything...",20,20,70,30) + printlog "Add a new slide." + InsertSlide + printlog " Inserted new slide." + kontext "DocumentImpress" + printlog "Bla bla about everything..." + call hTextrahmenErstellen ("Bla bla about everything...",20,20,70,30) - printlog "Add a new slide." - InsertSlide - printlog " Inserted new slide." - kontext "DocumentImpress" - printlog "Write text: Q & A" - call hTextrahmenErstellen ("Q & A",20,20,70,30) - DocumentImpress.TypeKeys "<SHIFT HOME>" - sleep (1) + printlog "Add a new slide." + InsertSlide + printlog " Inserted new slide." + kontext "DocumentImpress" + printlog "Write text: Q & A" + call hTextrahmenErstellen ("Q & A",20,20,70,30) + DocumentImpress.TypeKeys "<SHIFT HOME>" + sleep (1) - printlog "Add a new slide." - InsertSlide - kontext "DocumentImpress" + printlog "Add a new slide." + InsertSlide + kontext "DocumentImpress" - printlog "Thanks for listening, time for coffee... (ending)" - call hTextrahmenErstellen ("Class dismissed...",20,20,70,30) + printlog "Thanks for listening, time for coffee... (ending)" + call hTextrahmenErstellen ("Class dismissed...",20,20,70,30) - printlog "Save Document" - call hFileSaveAsKill (PresentationFile1) - printlog "OK saved at ", PresentationFile1 - sleep (1) + printlog "Save Document" + call hFileSaveAsKill (PresentationFile1) + printlog "OK saved at ", PresentationFile1 + sleep (1) - printlog "Close Document" - Call hCloseDocument + printlog "Close Document" + Call hCloseDocument endcase 'i_us2_pres1 '------------------------------------------------------------------------------ @@ -262,74 +258,74 @@ endcase 'i_us2_pres1 testcase i_us2_pres2 qaerrorlog "not yet ready." goto endsub - dim Result1, Result2 as integer - dim iPictures as integer - dim PresentationFile1, PresentationFile2, PresentationFileToBeLoaded as string - PresentationFile1 = (ConvertPath (gTesttoolPath + "graphics\required\input\rightfont.odp")) - PresentationFile2 = (ConvertPath (gOfficePath + "user\work\xxxxxx9.odp")) - kontext "DocumentImpress" - printlog "New - Wizard - Presentation" - FileAutopilotPresentation - printlog " Called File-Autopilot-Presentation." - printlog "Create from Template" - kontext "AutoPilotPraesentation1" - EmptyPresentation.Check - AutoPilotPraesentation1.TypeKeys "<DOWN>" - sleep (3) - AutoPilotPraesentation1.TypeKeys "<DOWN>" - if Existingpresentation.IsChecked(5) then - printlog " Pressing down worked fine" - else - warnlog " Pressing down didnt work as expected." - endif - printlog "Click the Open-button" - ExistingOpen.Click - printlog "Check if the Open-dialogue is there" - kontext "GeneralFileDialog" - if GeneralFileDialog.Exists(10) = FALSE then - warnlog " Open-file-dialogue didnt show up." - else - GeneralFileDialog.Cancel - endif - sleep (3) - kontext "AutoPilotPraesentation1" - AutoPilotPraesentation1.TypeKeys "<SHIFT TAB>" - AutoPilotPraesentation1.TypeKeys "<UP>" - AutoPilotPraesentation1.TypeKeys "<DOWN>" - AutoPilotPraesentation1.TypeKeys "<TAB><TAB>" - sleep (1) - Existinglist.TypeKeys "<HOME>" - sleep (1) - Existinglist.TypeKeys "<DOWN>" - sleep (3) - if Existinglist.GetSelText = "" then - Warnlog " No entries in the recently-opened-files-list. Check if it's correct." - else - PresentationFileToBeLoaded = Existinglist.GetSelText - AutoPilotPraesentation1.OK - endif + dim Result1, Result2 as integer + dim iPictures as integer + dim PresentationFile1, PresentationFile2, PresentationFileToBeLoaded as string + PresentationFile1 = (ConvertPath (gTesttoolPath + "graphics\required\input\rightfont.odp")) + PresentationFile2 = (ConvertPath (gOfficePath + "user\work\xxxxxx9.odp")) + kontext "DocumentImpress" + printlog "New - Wizard - Presentation" + FileAutopilotPresentation + printlog " Called File-Autopilot-Presentation." + printlog "Create from Template" + kontext "AutoPilotPraesentation1" + EmptyPresentation.Check + AutoPilotPraesentation1.TypeKeys "<DOWN>" + sleep (3) + AutoPilotPraesentation1.TypeKeys "<DOWN>" + if Existingpresentation.IsChecked(5) then + printlog " Pressing down worked fine" + else + warnlog " Pressing down didnt work as expected." + endif + printlog "Click the Open-button" + ExistingOpen.Click + printlog "Check if the Open-dialogue is there" + kontext "GeneralFileDialog" + if GeneralFileDialog.Exists(10) = FALSE then + warnlog " Open-file-dialogue didnt show up." + else + GeneralFileDialog.Cancel + endif + sleep (3) + kontext "AutoPilotPraesentation1" + AutoPilotPraesentation1.TypeKeys "<SHIFT TAB>" + AutoPilotPraesentation1.TypeKeys "<UP>" + AutoPilotPraesentation1.TypeKeys "<DOWN>" + AutoPilotPraesentation1.TypeKeys "<TAB><TAB>" + sleep (1) + Existinglist.TypeKeys "<HOME>" + sleep (1) + Existinglist.TypeKeys "<DOWN>" + sleep (3) + if Existinglist.GetSelText = "" then + Warnlog " No entries in the recently-opened-files-list. Check if it's correct." + else + PresentationFileToBeLoaded = Existinglist.GetSelText + AutoPilotPraesentation1.OK + endif - kontext "DocumentImpress" - if DocumentImpress.Exists(10) = FALSE then - if DocumentImpress.StatusIsProgress = FALSE then - sleep (10) - if DocumentImpress.StatusIsProgress then - warnlog " Took over 20 seconds to load the document Document: " + PresentationFileToBeLoaded + ". Stalled?" - endif - goto endsub - endif - else - printlog " Document " + PresentationFileToBeLoaded + " seemed to have been loaded correctly." - endif - sleep (3) - if DocumentImpress.StatusIsProgress then - sleep (5) - endif - printlog "Save Document" - call hFileSaveAsKill (PresentationFile2) - printlog "OK saved at ", PresentationFile2 - sleep (1) + kontext "DocumentImpress" + if DocumentImpress.Exists(10) = FALSE then + if DocumentImpress.StatusIsProgress = FALSE then + sleep (10) + if DocumentImpress.StatusIsProgress then + warnlog " Took over 20 seconds to load the document Document: " + PresentationFileToBeLoaded + ". Stalled?" + endif + goto endsub + endif + else + printlog " Document " + PresentationFileToBeLoaded + " seemed to have been loaded correctly." + endif + sleep (3) + if DocumentImpress.StatusIsProgress then + sleep (5) + endif + printlog "Save Document" + call hFileSaveAsKill (PresentationFile2) + printlog "OK saved at ", PresentationFile2 + sleep (1) - printlog "Close Document" - Call hCloseDocument + printlog "Close Document" + Call hCloseDocument endcase 'i_us2_pres2 diff --git a/testautomation/graphics/optional/includes/impress/i_us_present.inc b/testautomation/graphics/optional/includes/impress/i_us_present.inc index 26a17b3a80be..da63e3cf0966 100644 --- a/testautomation/graphics/optional/includes/impress/i_us_present.inc +++ b/testautomation/graphics/optional/includes/impress/i_us_present.inc @@ -29,25 +29,21 @@ '* '* short description : Include-file for impress User-Scenario: Presentation. '* -'*************************************************************************** -' #1 i_us_presentation1 -' #1 i_us_presentation2 -' #1 i_us_presentation3 -' #1 i_us_presentation4 -' #1 i_us_presentation5 -' #1 i_us_presentation6 -' #1 i_us_presentation7 '\******************************************************************** testcase i_us_presentation1 - dim iPictures as integer + + dim iPictures as integer dim PresentationFile1 as string - PresentationFile1 = ConvertPath ((ConvertPath (gOfficePath + "user\work\PowerPes1.odp"))) + + PresentationFile1 = ConvertPath( gOfficePath + "user\work\PowerPes1.odp" ) + printlog "New impress document" Call hNewDocument Call sSelectEmptyLayout WaitSlot (2000) kontext "DocumentImpress" + printlog "Add second Master-Page " ViewMasterPage kontext "Slides" @@ -64,6 +60,7 @@ testcase i_us_presentation1 sleep (1) printlog " Inserted second Master-Slide" + printlog "set background to picture(Gallery)" Kontext "Gallery" if Gallery.Exists(2) then @@ -76,32 +73,32 @@ testcase i_us_presentation1 if gOOO = TRUE then 'OpenOffice.org select case iSprache - case 01 : iPictures = 1 'English - case else : iPictures = 1 'Unknown - warnlog "Please insert the entrienumbers for 'Backgrounds'. Language: " + iSprache + case 01 : iPictures = 1 'English + case else : iPictures = 1 'Unknown + warnlog "Please insert the entrienumbers for 'Backgrounds'. Language: " + iSprache end select else ' StarOffice... select case iSprache - case 01 : iPictures = 21 'English - case 07 : iPictures = 28 'Russian - case 31 : iPictures = 04 'Netherlands - case 33 : iPictures = 22 'French - case 34 : iPictures = 12 'Spanish - case 36 : iPictures = 17 'Hungaria - case 39 : iPictures = 23 'Italian - case 46 : iPictures = 09 'Swedish - case 48 : iPictures = 20 'Polish - case 49 : iPictures = 11 'German - case 55 : iPictures = 16 'Portuguese - case 81 : iPictures = 22 'Japanese - case 82 : iPictures = 04 'Korean - case 86 : iPictures = 06 'Simplified - case 88 : iPictures = 17 'Traditional - case else : iPictures = 21 'Unknown - warnlog "Please insert the entrienumbers for 'Backgrounds'. Language: " + iSprache + case 01 : iPictures = 21 'English + case 07 : iPictures = 28 'Russian + case 31 : iPictures = 04 'Netherlands + case 33 : iPictures = 22 'French + case 34 : iPictures = 12 'Spanish + case 36 : iPictures = 17 'Hungaria + case 39 : iPictures = 23 'Italian + case 46 : iPictures = 09 'Swedish + case 48 : iPictures = 20 'Polish + case 49 : iPictures = 11 'German + case 55 : iPictures = 16 'Portuguese + case 81 : iPictures = 22 'Japanese + case 82 : iPictures = 04 'Korean + case 86 : iPictures = 06 'Simplified + case 88 : iPictures = 17 'Traditional + case else : iPictures = 21 'Unknown + warnlog "Please insert the entrienumbers for 'Backgrounds'. Language: " + iSprache end select - end if + end if kontext "Gallery" Gallerys.Select (iPictures) @@ -123,6 +120,33 @@ testcase i_us_presentation1 if ExportierenDlg.IsVisible(5) then printlog " Gallery-object correctly copied into Slide." ExportierenDlg.Close + ToolsGallery + WaitSlot (2000) + end if + kontext "GraphicObjectbar" + if GraphicObjectbar.Exists(5) = FALSE then + kontext "DocumentImpress" + ViewToolbarsPicture + end if + Kontext "Gallery" + View.TypeKeys "<HOME><RIGHT><RIGHT>" + printlog "'OpenContextMenu" + View.TypeKeys "<SHIFT F10>" + sleep (2) + MenuSelect(MenuGetItemID(1)) 'Insert + sleep (2) + MenuSelect(MenuGetItemID(1)) 'Copy + sleep (2) + printlog "Check that we really got a copy of the object " + kontext "DocumentImpress" + DocumentImpress.OpenContextMenu(true) + sleep (2) + MenuSelect 27353 + sleep (2) + Kontext "ExportierenDlg" + if ExportierenDlg.IsVisible(5) then + printlog " Gallery-object correctly copied into Slide." + ExportierenDlg.Close else warnlog " Doesn't seem like we copied anything from the Gallery... ?" end if @@ -131,41 +155,13 @@ testcase i_us_presentation1 kontext "DocumentImpress" ViewToolbarsPicture end if - - Kontext "Gallery" - View.TypeKeys "<HOME><RIGHT><RIGHT>" - printlog "'OpenContextMenu" - View.TypeKeys "<SHIFT F10>" - sleep (2) - MenuSelect(MenuGetItemID(1)) 'Insert - sleep (2) - MenuSelect(MenuGetItemID(1)) 'Copy - sleep (2) - printlog "Check that we really got a copy of the object " - kontext "DocumentImpress" - DocumentImpress.OpenContextMenu(true) - sleep (2) - MenuSelect 27353 - sleep (2) - Kontext "ExportierenDlg" - if ExportierenDlg.IsVisible(5) then - printlog " Gallery-object correctly copied into Slide." - ExportierenDlg.Close - else - warnlog " Doesn't seem like we copied anything from the Gallery... ?" - end if - kontext "GraphicObjectbar" - if GraphicObjectbar.Exists(5) = FALSE then - kontext "DocumentImpress" - ViewToolbarsPicture - end if - + kontext "Gallery" + Gallerys.Select (iPictures) printlog " 50% Transparency" WaitSlot (2000) kontext "GraphicObjectbar" Transparenz.SetText "50" sleep (1) - printlog "Mosaic 16px x 16px" Filter.TearOff sleep (1) @@ -176,66 +172,86 @@ testcase i_us_presentation1 Width.SetText "16" Height.SetText "16" Mosaic.OK - kontext "GraphicFilterBar" GraphicFilterBar.Close - ToolsGallery WaitSlot (1000) kontext "DocumentImpress" hTypeKeys "<TAB>" + sleep (1) + + kontext "GraphicFilterBar" + Mosaic.Click + + kontext "Mosaic" + if ( Mosaic.exists( 2 ) ) then + Width.SetText "16" + Height.SetText "16" + Mosaic.OK + else + warnlog( "Dialog <Mosaic> did not open" ) + endif + + kontext "GraphicFilterBar" + GraphicFilterBar.Close + + ToolsGallery + WaitSlot (1000) + kontext "DocumentImpress" + gMouseClick 50,50 sleep (1) + FormatPositionAndSize - WaitSlot (1000) + kontext - active.setPage(TabPositionAndSize) - kontext "TabPositionAndSize" - Width.SetText "800" - Height.SetText "600" - SizePosition.TypeKeys "<RIGHT><DOWN>" - TabPositionAndSize.OK + if ( Active.exists( 2 ) ) then + active.setPage(TabPositionAndSize) + kontext "TabPositionAndSize" + Width.SetText "800" + Height.SetText "600" + SizePosition.TypeKeys "<RIGHT><DOWN>" + TabPositionAndSize.OK + else + warnlog( "Page <TabPositionAndSize> did not open" ) + endif printlog "Close Master" - ViewNormal - WaitSlot (1000) + hUseAsyncSlot( "ViewNormal" ) printlog "Save Document" call hFileSaveAsKill (PresentationFile1) - printlog "OK saved at ", PresentationFile1 - WaitSlot (1000) ActiveDeactivateCTLSupport (FALSE) - WaitSlot (2000) + printlog "Close Document" - Call hCloseDocument + hFileCloseAll() + endcase 'i_us_presentation1 '------------------------------------------------------------------------------- + testcase i_us_presentation2 + dim PresentationFile1 as string dim PresentationFile2 as string - PresentationFile1 = ConvertPath ((ConvertPath (gOfficePath + "user\work\PowerPes1.odp"))) - PresentationFile2 = ConvertPath ((ConvertPath (gOfficePath + "user\work\PowerPes2.odp"))) - if Dir(PresentationFile1) <> "" then 'if file exists... - hFileOpen (PresentationFile1) - WaitSlot (10000) + PresentationFile1 = ConvertPath( gOfficePath + "user\work\PowerPes1.odp" ) + PresentationFile2 = ConvertPath( gOfficePath + "user\work\PowerPes2.odp" ) + + if ( FileExists( PresentationFile1 ) ) then 'if file exists... + hFileOpen (PresentationFile1) else warnlog " This test is supposed to run after the previous testcase has been run. Notify the Automatic-tester." - printlog "New impress document" - Call hNewDocument - WaitSlot (2000) + goto endsub end if printlog "New Slide" kontext "slides" - SlidesControl.TypeKeys "<PAGEDOWN>" - SlidesControl.TypeKeys "<PAGEDOWN>" - SlidesControl.TypeKeys "<PAGEDOWN>" - + SlidesControl.TypeKeys( "<PAGEDOWN>", 3 ) SlidesControl.TypeKeys "<SHIFT F10>" 'OpenContextMenu(true) sleep (1) + MenuSelect(MenuGetItemID(1)) 'New Slide 'No 2 printlog " Inserted second normal Slide" @@ -244,11 +260,10 @@ testcase i_us_presentation2 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>", 9 LayoutsPreview.TypeKeys "<RETURN>" - Sleep (1) - ViewNormal + hUseAsyncSlot( "ViewNormal" ) printlog "3. Hide Slidepane (Oops! The user were too fast: accidently hide the pane)" kontext "Slides" @@ -259,7 +274,7 @@ testcase i_us_presentation2 SlidesControl.FadeIn printlog " Did the 'mistake' to FadeIn/Out the Slidepane" - + printlog "activating the input picture area" kontext "DocumentImpress" DocumentImpress.TypeKeys "<TAB>",2 @@ -268,68 +283,67 @@ testcase i_us_presentation2 printlog "Graphics-Import-dialogue. Select i_us_large.jpg" Kontext "GrafikEinfuegenDlg" - sleep (2) - Dateiname.SetText ConvertPath (gTesttoolPath + "graphics\required\input\i_us_large.jpg") - sleep (2) - Oeffnen.Click - WaitSlot (1000) - Kontext "DocumentImpress" + if ( GrafikEinfuegenDlg.exists( 2 ) ) then - printlog "Deselect graphic" - DocumentImpress.MouseDoubleClick 90,90 - printlog " Inserted Graphic into the second Slide" + Dateiname.SetText ConvertPath (gTesttoolPath + "graphics\required\input\i_us_large.jpg") + Oeffnen.Click - 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 "<ESCAPE><ESCAPE>" - DocumentImpress.TypeKeys "<TAB><TAB><TAB>" - DocumentImpress.TypeKeys "<RETURN>" - DocumentImpress.TypeKeys "100% Recyclable" - DocumentImpress.TypeKeys "<RETURN>" - DocumentImpress.TypeKeys "Very durable" - DocumentImpress.TypeKeys "<RETURN>" - DocumentImpress.TypeKeys "Priced lower than its predecessor!" - DocumentImpress.TypeKeys "<RETURN>" - DocumentImpress.TypeKeys "Sexy" - DocumentImpress.TypeKeys "<RETURN>" - DocumentImpress.TypeKeys "Energy-efficient" - DocumentImpress.TypeKeys "<ESCAPE><ESCAPE>" + Kontext "DocumentImpress" + printlog "Deselect graphic" + DocumentImpress.MouseDoubleClick 90,90 + 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 "<ESCAPE><ESCAPE>" + DocumentImpress.TypeKeys "<TAB><TAB><TAB>" + DocumentImpress.TypeKeys "<RETURN>" + DocumentImpress.TypeKeys "100% Recyclable" + DocumentImpress.TypeKeys "<RETURN>" + DocumentImpress.TypeKeys "Very durable" + DocumentImpress.TypeKeys "<RETURN>" + DocumentImpress.TypeKeys "Priced lower than its predecessor!" + DocumentImpress.TypeKeys "<RETURN>" + DocumentImpress.TypeKeys "Sexy" + DocumentImpress.TypeKeys "<RETURN>" + DocumentImpress.TypeKeys "Energy-efficient" + DocumentImpress.TypeKeys "<ESCAPE><ESCAPE>" + else + warnlog( "Failed to open <Insert Graphics> dialog" ) + endif printlog "Save Document" call hFileSaveAsKill (PresentationFile2) - printlog "OK saved at ", PresentationFile1 - sleep (1) ActiveDeactivateCTLSupport (FALSE) - sleep (2) + printlog "Close Document" - Call hCloseDocument + hFileCloseAll() + endcase 'i_us_presentation2 '------------------------------------------------------------------------------- + testcase i_us_presentation3 + dim PresentationFile2 as string dim PresentationFile3 as string - PresentationFile2 = ConvertPath ((ConvertPath (gOfficePath + "user\work\PowerPes2.odp"))) - PresentationFile3 = ConvertPath ((ConvertPath (gOfficePath + "user\work\PowerPes3.odp"))) - if Dir(PresentationFile2) <> "" then 'if file exists... - hFileOpen (PresentationFile2) - WaitSlot (10000) + PresentationFile2 = ConvertPath( gOfficePath + "user\work\PowerPes2.odp" ) + PresentationFile3 = ConvertPath( gOfficePath + "user\work\PowerPes3.odp" ) + + if ( FileExists( PresentationFile2 ) ) then 'if file exists... + hFileOpen( PresentationFile2 ) else warnlog " This test is supposed to run after the previous testcase has been run. Notify the Automatic-tester." - printlog "New impress document" - Call hNewDocument - WaitSlot (2000) + goto endsub end if printlog "Insert New Slide" kontext "slides" - SlidesControl.TypeKeys "<PAGEDOWN>" - SlidesControl.TypeKeys "<PAGEDOWN>" - SlidesControl.TypeKeys "<PAGEDOWN>" + SlidesControl.TypeKeys( "<PAGEDOWN>", 3 ) kontext "DocumentImpress" InsertSlide 'No 3 @@ -340,8 +354,7 @@ testcase i_us_presentation3 LayoutsPreview.TypeKeys "<RIGHT>", 4 'to get to the right position LayoutsPreview.TypeKeys "<RETURN>" - sleep (1) - ViewNormal + hUseAsyncSlot( "ViewNormal" ) kontext "DocumentImpress" Call gMouseClick 50,50 @@ -353,10 +366,10 @@ testcase i_us_presentation3 InsertGraphicsFromFile WaitSlot (1000) Kontext "GrafikEinfuegenDlg" - Dateiname.SetText ConvertPath (gTesttoolPath + "graphics\required\input\i_us_large.jpg") - sleep (2) - Oeffnen.Click - WaitSlot (2000) + Dateiname.SetText ConvertPath (gTesttoolPath + "graphics\required\input\i_us_large.jpg") + sleep (2) + Oeffnen.Click + WaitSlot (2000) Kontext "DocumentImpress" printlog "The user corrects the picture" @@ -371,101 +384,97 @@ testcase i_us_presentation3 printlog "Save Document" call hFileSaveAsKill (PresentationFile3) - printlog "OK saved at ", PresentationFile3 - sleep (1) ActiveDeactivateCTLSupport (FALSE) - sleep (2) + printlog "Close Document" - Call hCloseDocument + hFileCloseAll() + endcase 'i_us_presentation3 '------------------------------------------------------------------------------- + testcase i_us_presentation4 + dim PresentationFile3 as string dim PresentationFile4 as string dim iAnimations as Integer - PresentationFile3 = ConvertPath ((ConvertPath (gOfficePath + "user\work\PowerPes3.odp"))) - PresentationFile4 = ConvertPath ((ConvertPath (gOfficePath + "user\work\PowerPes4.odp"))) + dim iSize as integer + + PresentationFile3 = ConvertPath( gOfficePath + "user\work\PowerPes3.odp" ) + PresentationFile4 = ConvertPath( gOfficePath + "user\work\PowerPes4.odp" ) - if Dir(PresentationFile3) <> "" then 'if file exists... - hFileOpen (PresentationFile3) - WaitSlot (10000) + select case iSprache + case 01 : iAnimations = 01 'English + case 07 : iAnimations = 01 'Russian + case 31 : iAnimations = 03 'Netherlands + case 33 : iAnimations = 01 'French + case 34 : iAnimations = 01 'Spanish + case 36 : iAnimations = 01 'Hungaria + case 39 : iAnimations = 01 'Italian + case 46 : iAnimations = 01 'Swedish + case 48 : iAnimations = 01 'Polish + case 49 : iAnimations = 01 'German + case 55 : iAnimations = 01 'Portuguese + case 81 : iAnimations = 02 'Japanese + case 82 : iAnimations = 17 'Korean + case 86 : iAnimations = 07 'Simplified + case 88 : iAnimations = 15 'Traditional + case else : iAnimations = 01 'Unknown + warnlog "Please insert the entrienumbers for 'Backgrounds'. Language: " + iSprache + end select + + if ( FileExists( PresentationFile3 ) ) then 'if file exists... + hFileOpen( PresentationFile3 ) else warnlog " This test is supposed to run after the previous testcase has been run. Notify the Automatic-tester." - printlog "New impress document" - Call hNewDocument - WaitSlot (2000) + goto endsub end if kontext "slides" - SlidesControl.TypeKeys "<PAGEDOWN>" - SlidesControl.TypeKeys "<PAGEDOWN>" - SlidesControl.TypeKeys "<PAGEDOWN>" - SlidesControl.TypeKeys "<PAGEDOWN>" - SlidesControl.TypeKeys "<PAGEDOWN>" - kontext "DocumentImpress" + SlidesControl.TypeKeys( "<PAGEDOWN>", 5 ) -printlog "insert slide no 4" -InsertSlide + kontext "DocumentImpress" + printlog "insert slide no 4" + hUseAsyncSlot( "InsertSlide" ) printlog "Background: picture (Gallery)" Kontext "Gallery" - if Gallery.Exists(2) then - warnlog " The Gallery was already visible. Check earlier ran tests for inconsistency." - sleep (2) - else + if ( Not Gallery.Exists() ) then ToolsGallery - WaitSlot (2000) end if - select case iSprache - case 01 : iAnimations = 01 'English - case 07 : iAnimations = 01 'Russian - case 31 : iAnimations = 03 'Netherlands - case 33 : iAnimations = 01 'French - case 34 : iAnimations = 01 'Spanish - case 36 : iAnimations = 01 'Hungaria - case 39 : iAnimations = 01 'Italian - case 46 : iAnimations = 01 'Swedish - case 48 : iAnimations = 01 'Polish - case 49 : iAnimations = 01 'German - case 55 : iAnimations = 01 'Portuguese - case 81 : iAnimations = 02 'Japanese - case 82 : iAnimations = 17 'Korean - case 86 : iAnimations = 07 'Simplified - case 88 : iAnimations = 15 'Traditional - case else : iAnimations = 01 'Unknown - warnlog "Please insert the entrienumbers for 'Backgrounds'. Language: " + iSprache - end select - kontext "Gallery" - Gallerys.Select (iAnimations) + if ( Gallery.exists( 2 ) ) then + Gallerys.Select (iAnimations) - kontext "Gallery" + kontext "Gallery" View.TypeKeys "<HOME><RIGHT><RIGHT>" - sleep (1) + wait( 200 ) View.TypeKeys "<SHIFT F10>" 'OpenContextMenu - sleep (1) + wait( 200 ) MenuSelect(MenuGetItemID(1)) 'Insert - sleep (1) + wait( 200 ) MenuSelect(MenuGetItemID(1)) 'Copy + else + warnlog( "Could not access Gallery" ) + endif - printlog "Check that we really got a copy of the object" - kontext "DocumentImpress" - DocumentImpress.OpenContextMenu(true) - WaitSlot (1000) - MenuSelect 27353 + printlog "Check that we really got a copy of the object" + kontext "DocumentImpress" + DocumentImpress.OpenContextMenu(true) + WaitSlot (1000) + MenuSelect 27353 Kontext "ExportierenDlg" - if ExportierenDlg.IsVisible(5) then + 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" + kontext "DocumentImpress" DocumentImpress.TypeKeys "<UP>", 82 DocumentImpress.TypeKeys "<LEFT>", 130 @@ -484,84 +493,53 @@ InsertSlide ActiveDeactivateCTLSupport (TRUE) - CreateTextSetEffectAndAngle - DocumentImpress.TypeKeys "<DOWN>", 80 - DocumentImpress.TypeKeys "<LEFT>", 100 - gMouseClick 90,90 - - CreateTextSetEffectAndAngle - DocumentImpress.TypeKeys "<DOWN>", 80 - DocumentImpress.TypeKeys "<LEFT>", 75 - gMouseClick 90,90 - - CreateTextSetEffectAndAngle - DocumentImpress.TypeKeys "<DOWN>", 80 - DocumentImpress.TypeKeys "<LEFT>", 50 - gMouseClick 90,90 - - CreateTextSetEffectAndAngle - DocumentImpress.TypeKeys "<DOWN>", 80 - DocumentImpress.TypeKeys "<LEFT>", 25 - gMouseClick 90,90 - - CreateTextSetEffectAndAngle - DocumentImpress.TypeKeys "<DOWN>", 80 - DocumentImpress.TypeKeys "<RIGHT>", 25 - gMouseClick 90,90 - - CreateTextSetEffectAndAngle - DocumentImpress.TypeKeys "<DOWN>", 80 - DocumentImpress.TypeKeys "<RIGHT>", 50 - gMouseClick 90,90 - - CreateTextSetEffectAndAngle - DocumentImpress.TypeKeys "<DOWN>", 80 - DocumentImpress.TypeKeys "<RIGHT>", 75 - gMouseClick 90,90 - - CreateTextSetEffectAndAngle - DocumentImpress.TypeKeys "<DOWN>", 80 - DocumentImpress.TypeKeys "<RIGHT>", 100 - gMouseClick 90,90 + printlog( "Decrease..." ) + for iSize = 100 to 25 step -25 + CreateTextSetEffectAndAngle + DocumentImpress.TypeKeys "<DOWN>", 80 + DocumentImpress.TypeKeys "<LEFT>", iSize + gMouseClick 90,90 + next iSize + + printlog( "Increase..." ) + for iSize = 25 to 100 step 25 + CreateTextSetEffectAndAngle + DocumentImpress.TypeKeys "<DOWN>", 80 + DocumentImpress.TypeKeys "<LEFT>", iSize + gMouseClick 90,90 + next iSize printlog " Inserted fourth slide with Gallery-object." printlog "Save Document" call hFileSaveAsKill (PresentationFile4) - printlog "OK saved at ", PresentationFile4 - sleep (1) ActiveDeactivateCTLSupport (FALSE) - sleep (2) + printlog "Close Document" - Call hCloseDocument + hFileCloseAll() + endcase 'i_us_presentation4 '------------------------------------------------------------------------------- + testcase i_us_presentation5 + dim PresentationFile4 as string dim PresentationFile5 as string - PresentationFile4 = ConvertPath ((ConvertPath (gOfficePath + "user\work\PowerPes4.odp"))) - PresentationFile5 = ConvertPath ((ConvertPath (gOfficePath + "user\work\PowerPes5.odp"))) - if Dir(PresentationFile4) <> "" then 'if file exists... - hFileOpen (PresentationFile4) - WaitSlot (10000) + PresentationFile4 = ConvertPath( gOfficePath + "user\work\PowerPes4.odp" ) + PresentationFile5 = ConvertPath( gOfficePath + "user\work\PowerPes5.odp" ) + + if ( FileExists( PresentationFile4 ) ) then 'if file exists... + hFileOpen( PresentationFile4 ) else warnlog " This test is supposed to run after the previous testcase has been run. Notify the Automatic-tester." - printlog "New impress document" - Call hNewDocument - WaitSlot (2000) + goto endsub end if kontext "slides" - SlidesControl.TypeKeys "<PAGEDOWN>" - SlidesControl.TypeKeys "<PAGEDOWN>" - SlidesControl.TypeKeys "<PAGEDOWN>" - SlidesControl.TypeKeys "<PAGEDOWN>" - SlidesControl.TypeKeys "<PAGEDOWN>" - SlidesControl.TypeKeys "<PAGEDOWN>" - SlidesControl.TypeKeys "<PAGEDOWN>" + SlidesControl.TypeKeys( "<PAGEDOWN>", 7 ) kontext "DocumentImpress" printlog "8. New Slide. (Insert Menu) (Duplicate slide)" @@ -570,119 +548,109 @@ testcase i_us_presentation5 gMouseClick 90,90 DocumentImpress.TypeKeys "<TAB>" DocumentImpress.TypeKeys "<RETURN>" - EditSelectAll + hUseAsyncSlot( "EditSelectAll" ) DocumentImpress.TypeKeys "And does it with strength..." printlog " Inserted fifth slide with audience-joke." printlog "Save Document" call hFileSaveAsKill (PresentationFile5) - printlog "OK saved at ", PresentationFile5 - sleep (1) ActiveDeactivateCTLSupport (FALSE) - sleep (2) + printlog "Close Document" - Call hCloseDocument + hFileCloseAll() + endcase 'i_us_presentation5 '------------------------------------------------------------------------------- + testcase i_us_presentation6 + dim PresentationFile5 as string dim PresentationFile6 as string - PresentationFile5 = ConvertPath ((ConvertPath (gOfficePath + "user\work\PowerPes5.odp"))) - PresentationFile6 = ConvertPath ((ConvertPath (gOfficePath + "user\work\PowerPes6.odp"))) - if Dir(PresentationFile5) <> "" then 'if file exists... - hFileOpen (PresentationFile5) - WaitSlot (10000) + PresentationFile5 = ConvertPath( gOfficePath + "user\work\PowerPes5.odp" ) + PresentationFile6 = ConvertPath( gOfficePath + "user\work\PowerPes6.odp" ) + + if ( FileExists( PresentationFile5 ) ) then 'if file exists... + hFileOpen( PresentationFile5 ) else warnlog " This test is supposed to run after the previous testcase has been run. Notify the Automatic-tester." - printlog "New impress document" - Call hNewDocument - WaitSlot (2000) + goto endsub end if kontext "slides" - SlidesControl.TypeKeys "<PAGEDOWN>" - SlidesControl.TypeKeys "<PAGEDOWN>" - SlidesControl.TypeKeys "<PAGEDOWN>" - SlidesControl.TypeKeys "<PAGEDOWN>" - SlidesControl.TypeKeys "<PAGEDOWN>" - SlidesControl.TypeKeys "<PAGEDOWN>" + SlidesControl.TypeKeys( "<PAGEDOWN>", 6 ) kontext "DocumentImpress" printlog "9. Q&A Slide" - InsertSlide + InsertSlide WaitSlot (1000) kontext "DocumentImpress" DocumentImpress.TypeKeys "<TAB>" DocumentImpress.TypeKeys "<RETURN>" DocumentImpress.TypeKeys "Q&A" - WaitSlot (1000) - kontext "DocumentImpress" DocumentImpress.TypeKeys "<SHIFT HOME>" + wait( 500 ) + Kontext "TextObjectbar" - if TextObjectbar.Exists = FALSE then - ViewToolbarsTextFormatting - end if - WaitSlot (2000) - Printlog "- Change size of font" - Schriftgroesse.Select "26" - Schriftgroesse.TypeKeys "<RETURN>" - Fett.Click + if ( not TextObjectbar.Exists() ) then + ViewToolbarsTextFormatting + end if + + Kontext "TextObjectbar" + wait( 500 ) + Printlog "- Change size of font" + Schriftgroesse.Select "26" + Schriftgroesse.TypeKeys "<RETURN>" + Fett.Click kontext "DocumentImpress" DocumentImpress.TypeKeys "<ESCAPE><ESCAPE>" kontext "Toolbar" - Auswahl.Click + Auswahl.Click gMouseClick 60,60 - EditSelectAll - WaitSlot (1000) + hUseAsyncSlot( "EditSelectAll" ) + DocumentImpress.TypeKeys "<DOWN>", 50 kontext "DocumentImpress" printlog " Inserted sixth slide with Q&A." printlog "Save Document" call hFileSaveAsKill (PresentationFile6) - printlog "OK saved at ", PresentationFile6 - sleep (1) ActiveDeactivateCTLSupport (FALSE) - WaitSlot (2000) + printlog "Close Document" - Call hCloseDocument + hFileCloseAll() + endcase 'i_us_presentation6 '------------------------------------------------------------------------------- + testcase i_us_presentation7 + const KEY_STROKE_REPEAT = 8 + dim sFilter as string dim sFileName as string dim PresentationFile6 as string dim PresentationFile7 as string - PresentationFile6 = ConvertPath ((ConvertPath (gOfficePath + "user\work\PowerPes6.odp"))) - PresentationFile7 = ConvertPath ((ConvertPath (gOfficePath + "user\work\PowerPes7.odp"))) - sFileName = (ConvertPath (gOfficePath + "user\work\export-test.ppt")) + dim iKeyStroke as integer + + PresentationFile6 = ConvertPath( gOfficePath + "user\work\PowerPes6.odp" ) + PresentationFile7 = ConvertPath( gOfficePath + "user\work\PowerPes7.odp" ) + sFileName = ConvertPath( gOfficePath + "user\work\export-test.ppt" ) - if Dir(PresentationFile6) <> "" then 'if file exists... - hFileOpen (PresentationFile6) - WaitSlot (10000) + if ( FileExists( PresentationFile6 ) ) then 'if file exists... + hFileOpen( PresentationFile6 ) else warnlog " This test is supposed to run after the previous testcase has been run. Notify the Automatic-tester." - printlog "New impress document" - Call hNewDocument - WaitSlot (2000) + goto endsub end if kontext "slides" - SlidesControl.TypeKeys "<PAGEDOWN>" - SlidesControl.TypeKeys "<PAGEDOWN>" - SlidesControl.TypeKeys "<PAGEDOWN>" - SlidesControl.TypeKeys "<PAGEDOWN>" - SlidesControl.TypeKeys "<PAGEDOWN>" - SlidesControl.TypeKeys "<PAGEDOWN>" - SlidesControl.TypeKeys "<PAGEDOWN>" - SlidesControl.TypeKeys "<PAGEDOWN>" + SlidesControl.TypeKeys( "<PAGEDOWN>", KEY_STROKE_REPEAT ) kontext "DocumentImpress" printlog " inserting Ending Slide" @@ -705,62 +673,64 @@ testcase i_us_presentation7 SlidesControl.TypeKeys "<RETURN>" 'At the first slide hTypeKeys "<F5>" + + kontext "DocumentPresentation" + for iKeyStroke = 1 to KEY_STROKE_REPEAT + wait( 3000 ) + DocumentPresentation.TypeKeys "<PAGEDOWN>" + wait( 2000 ) + next iKeyStroke + kontext "DocumentPresentation" - sleep (5) - DocumentPresentation.TypeKeys "<PAGEDOWN>" - sleep (5) - DocumentPresentation.TypeKeys "<PAGEDOWN>" - sleep (5) - DocumentPresentation.TypeKeys "<PAGEDOWN>" - sleep (10) - DocumentPresentation.TypeKeys "<PAGEDOWN>" - sleep (10) - DocumentPresentation.TypeKeys "<PAGEDOWN>" - sleep (5) - DocumentPresentation.TypeKeys "<PAGEDOWN>" - sleep (5) - DocumentPresentation.TypeKeys "<PAGEDOWN>" - sleep (5) - DocumentPresentation.TypeKeys "<PAGEDOWN>" - - if DocumentPresentation.Exists(5) then - hTypeKeys "<ESC>" - warnlog " Presentation should have ended. Please inform Automatic Tester." + if ( DocumentPresentation.notExists( 5 ) ) then + printlog( "Presentation closed. Good." ) + else + warnlog " Presentation not finished, fullscreen view still open." + DocumentPresentation.typeKeys "<ESC>" + + kontext "DocumentPresentation" + if ( DocumentPresentation.notExists( 3 ) ) then + printlog( "Recovery attempt successful" ) + else + goto endsub + endif end if - kontext "DocumentImpress" + kontext "DocumentImpress" printlog "Save Document" call hFileSaveAsKill (PresentationFile7) - printlog "OK saved at ", PresentationFile7 - sleep (1) - printlog "Save as Powerpoint-file" + printlog( "Save as Powerpoint-file (Using filter at pos. 5 in the filter list)" ) FileSaveAs - Kontext "SpeichernDlg" + + Kontext "SpeichernDlg" + if ( SpeichernDlg.exists( 2 ) ) then + Dateiname.SetText sFileName - Dateityp.Select 5 ' Powerpoint + Dateityp.Select 5 ' Powerpoint (possibly) printlog "Trying to save with filter: " + Dateityp.GetSelText + sFilter(5) Speichern.Click + Kontext "Messagebox" - if Messagebox.Exists(2) then Messagebox.Yes + hCloseDialog( Messagebox, "Yes, optional" ) + Kontext "AlienWarning" - if AlienWarning.Exists(2) then AlienWarning.OK - printlog "Saved as: " + sFileName - sleep (3) - - printlog "Close the office and reload the file" - FileClose - Kontext "Messagebox" - if Messagebox.Exists(2) then Messagebox.Yes - sleep (3) - printlog "Open the saved file" + hCloseDialog( AlienWarning, "ok, optional" ) + else + warnlog( "<FileSaveAs> dialog did not open" ) + endif + + printlog "Close all open documents" + hFileCloseAll() + + printlog( "Reload file: " & sFileName ) hFileOpen sFileName - printlog "File opened: " + sFileName - sleep (3) + sleep( 3 ) printlog "Close the office-session" ActiveDeactivateCTLSupport (FALSE) - sleep (2) - printlog "Close Document" - Call hCloseDocument + + printlog "Close Documents" + hFileCloseAll() + endcase 'i_us_presentation7 diff --git a/testautomation/graphics/optional/includes/impress/im_007_.inc b/testautomation/graphics/optional/includes/impress/im_007_.inc index fcd80a8d8f5a..15c9e8609b5d 100644 --- a/testautomation/graphics/optional/includes/impress/im_007_.inc +++ b/testautomation/graphics/optional/includes/impress/im_007_.inc @@ -33,52 +33,52 @@ ' this menue is only in impress availble testcase tSlideShowSlideShow -'/// open application ///' - Call hNewDocument -'/// Slide Show->Slide Show Settings ///' + '/// open application ///' + Call hNewDocument + '/// Slide Show->Slide Show Settings ///' SlideShowPresentationSettings - Kontext "Bildschirmpraesentation" - '/// check if 'type' 'default' is checked, it has to be the default !///' - if standard.IsChecked then - if LogoAnzeigen.isEnabled then - Warnlog "'Show Logo' is Enabled :-(" - endif - else - Warnlog "type 'default' is not checked as default :-(" - endif - '/// check checkbox 'Window' ///' - Fenster.Check - Printlog "- Presentation in window mode is checked" - '/// close dialog with OK 'Slide Show' ///' + Kontext "Bildschirmpraesentation" + '/// check if 'type' 'default' is checked, it has to be the default !///' + if standard.IsChecked then + if LogoAnzeigen.isEnabled then + Warnlog "'Show Logo' is Enabled :-(" + endif + else + Warnlog "type 'default' is not checked as default :-(" + endif + '/// check checkbox 'Window' ///' + Fenster.Check + Printlog "- Presentation in window mode is checked" + '/// close dialog with OK 'Slide Show' ///' Bildschirmpraesentation.Ok sleep 3 -'/// Slide Show->Slide Show ///' + '/// Slide Show->Slide Show ///' SlideShowSlideshow Sleep 5 try - Kontext "DocumentPresentation" - sleep 3 -'/// Press <Esc> to leave presentation mode ///' - DocumentPresentation.Typekeys ("<Escape>") - Sleep 3 - Kontext "DocumentImpress" - DocumentImpress.MouseDoubleClick ( 50, 50 ) - Sleep 3 + Kontext "DocumentPresentation" + sleep 3 + '/// Press <Esc> to leave presentation mode ///' + DocumentPresentation.Typekeys ("<Escape>") + Sleep 3 + Kontext "DocumentImpress" + DocumentImpress.MouseDoubleClick ( 50, 50 ) + Sleep 3 catch -' FileClose - warnlog "had to catch <the ball> :-( " -' Kontext "Messagebox" -' if Messagebox.Exists (5) Then Messagebox.No -' Kontext -' sleep (12) -' start sAppExe$ -' sleep (6) -' Kontext -' if Office.Exists(2) then Resetapplication -' Warnlog "Slide didn't end, application wasn't in document edit mode" + ' FileClose + warnlog "had to catch <the ball> :-( " + ' Kontext "Messagebox" + ' if Messagebox.Exists (5) Then Messagebox.No + ' Kontext + ' sleep (12) + ' start sAppExe$ + ' sleep (6) + ' Kontext + ' if Office.Exists(2) then Resetapplication + ' Warnlog "Slide didn't end, application wasn't in document edit mode" endcatch -'/// close application ///' - Call hCloseDocument + '/// close application ///' + Call hCloseDocument endcase testcase tSlideShowRehearseTimings @@ -97,157 +97,157 @@ testcase tSlideShowRehearseTimings sleep 2 Kontext "DocumentPresentation" '/// Press <Esc> to leave presentation mode ///' - if DocumentPresentation.Exists (5) then - DocumentPresentation.Typekeys ("<Escape>") - else - Warnlog "SlideShowRehearseTimings mode not accessible" - endif - Sleep 3 - if DocumentPresentation.Exists then ' the kontext hasnt to be available, else ERROR - DocumentPresentation.TypeKeys "<ESCAPE>" ' => I mustn't be here ever ! - Warnlog "- Slide show mode should have ended" - else - printlog "SlideShowRehearseTimings mode not accessible :-) " - end if - sleep 3 - try - Kontext "DocumentImpress" - DocumentImpress.MouseDoubleClick ( 50, 50 ) + if DocumentPresentation.Exists (5) then + DocumentPresentation.Typekeys ("<Escape>") + else + Warnlog "SlideShowRehearseTimings mode not accessible" + endif + Sleep 3 + if DocumentPresentation.Exists then ' the kontext hasnt to be available, else ERROR + DocumentPresentation.TypeKeys "<ESCAPE>" ' => I mustn't be here ever ! + Warnlog "- Slide show mode should have ended" + else + printlog "SlideShowRehearseTimings mode not accessible :-) " + end if + sleep 3 + try + Kontext "DocumentImpress" + DocumentImpress.MouseDoubleClick ( 50, 50 ) - sleep 3 - catch - warnlog "Had to catch <the ball> :-( " - endcatch + sleep 3 + catch + warnlog "Had to catch <the ball> :-( " + endcatch sleep 3 -'/// close application ///' - Call hCloseDocument + '/// close application ///' + Call hCloseDocument endcase testcase tSlideShowSlideShowSettings -'/// open application ///' - Call hNewDocument - sleep 2 -'/// Slide Show->Slide Show Settings ///' - SlideShowPresentationSettings - Kontext "Bildschirmpraesentation" - call Dialogtest (Bildschirmpraesentation) - '/// check checkbox in section 'Range' - 'From: ///' - AbDia.Check - '/// select the 3rd item from the top from listbox 'From:' ///' - AbDiaName.GetSelText - '/// check checkbox 'All Slides' ///' - AlleDias.Check -'///' RangeCustomSlideShow ' gets tested in tSlideShowCustomSlideShow ///' -' IndividuellePraesentationName - '///<b> check checkbox 'window' </b>///' - Fenster.Check - '/// check checkbox 'default' ///' - Standard.Check - '///<b> check check box 'Auto' -> implies looping of slideshow in fullscreen mode </b>///' - Auto.Check - '/// set duration of pause to '00:00:05' ///' - Zeit.GetText - '/// check check box 'Show logo' ///' - LogoAnzeigen.Check - '///<b> check checkbox 'Change slides maually' </b>///' - DiawechselManuel.Check - '///<b> check checkbox 'Mouse pointer as pen' </b>///' - MauszeigerAlsStift.Check - '///<b> UNcheck checkbox 'Mouse pointer visible' </b>///' - MauszeigerSichtbar.UnCheck - '///<b> check checkbox 'Navigator visible' </b>///' - NavigatorSichtbar.Check - '///<b> UNcheck checkbox 'animations allowed' </b>///' - AnimationenZulassen.UnCheck - '///<b> UNcheck checkbox 'Change slides by clicking on background' </b>///' - DiaWechselAufHintergrund.UnCheck - '///<b> check checkbox 'Presentation always on top' </b>///' - PraesentationImmerImVordergrund.Check - '/// cancel dialog 'Slide Show' ///' - Bildschirmpraesentation.Cancel -'/// close application ///' - Call hCloseDocument + '/// open application ///' + Call hNewDocument + sleep 2 + '/// Slide Show->Slide Show Settings ///' + SlideShowPresentationSettings + Kontext "Bildschirmpraesentation" + call Dialogtest (Bildschirmpraesentation) + '/// check checkbox in section 'Range' - 'From: ///' + AbDia.Check + '/// select the 3rd item from the top from listbox 'From:' ///' + AbDiaName.GetSelText + '/// check checkbox 'All Slides' ///' + AlleDias.Check + '///' RangeCustomSlideShow ' gets tested in tSlideShowCustomSlideShow ///' + ' IndividuellePraesentationName + '///<b> check checkbox 'window' </b>///' + Fenster.Check + '/// check checkbox 'default' ///' + Standard.Check + '///<b> check check box 'Auto' -> implies looping of slideshow in fullscreen mode </b>///' + Auto.Check + '/// set duration of pause to '00:00:05' ///' + Zeit.GetText + '/// check check box 'Show logo' ///' + LogoAnzeigen.Check + '///<b> check checkbox 'Change slides maually' </b>///' + DiawechselManuel.Check + '///<b> check checkbox 'Mouse pointer as pen' </b>///' + MauszeigerAlsStift.Check + '///<b> UNcheck checkbox 'Mouse pointer visible' </b>///' + MauszeigerSichtbar.UnCheck + '///<b> check checkbox 'Navigator visible' </b>///' + NavigatorSichtbar.Check + '///<b> UNcheck checkbox 'animations allowed' </b>///' + AnimationenZulassen.UnCheck + '///<b> UNcheck checkbox 'Change slides by clicking on background' </b>///' + DiaWechselAufHintergrund.UnCheck + '///<b> check checkbox 'Presentation always on top' </b>///' + PraesentationImmerImVordergrund.Check + '/// cancel dialog 'Slide Show' ///' + Bildschirmpraesentation.Cancel + '/// close application ///' + Call hCloseDocument endcase testcase tSlideShowCustomSlideShow - '/// open application ///' - Call hNewDocument - sleep 2 - '/// Slide Show->Custom Slide Show ///' - SlideShowCustomSlideshow - Kontext "IndividuellePraesentation" - call Dialogtest (IndividuellePraesentation) - '/// click button 'New' ///' - Neu.Click - Kontext "IndividuellePraesentationDefinieren" - Call DialogTest (IndividuellePraesentationDefinieren) - '/// select the first entry in the list 'Existing Slides' ///' - SeitenPraesentation.Select 1 - '/// click button '>>' ///' - Hinzufuegen.Click - '/// close dialog 'Define Custom Slide Show' with OK ///' - IndividuellePraesentationDefinieren.OK - Kontext "IndividuellePraesentation" - '/// click button 'Copy' ///' - Kopieren.Click - '/// click button 'Delete' ///' - Loeschen.Click - '/// click button 'Edit' ///' - Bearbeiten.Click - Kontext "IndividuellePraesentationDefinieren" - '/// select 1st entry in the list 'Selected Slides' ///' - SelectedSlides.Select 1 - '/// click button '<<' ///' - Entfernen.Click - '/// close dialog 'Define Custom Slide Show' with Cancel ///' - IndividuellePraesentationDefinieren.Cancel - Kontext "IndividuellePraesentation" - '/// check checkbox 'Use Custom Slide Show' ///' - IndividuellePraesentationBenutzen.Check - sleep 1 - '///+ UNcheck checkbox 'Use Custom Slide Show' ///' - IndividuellePraesentationBenutzen.UnCheck - '/// click button 'Start...' ///' - Starten.Click - sleep 5 - '/// press key [space] 2 times ///' - kontext "DocumentPresentation" - DocumentPresentation.TypeKeys "<space>" - sleep 1 - DocumentPresentation.TypeKeys "<space>" - sleep 1 - '/// close dialog 'Custom Slide Shows' ///' -' IndividuellePraesentation.Close ' slide show ends dialog ! - '/// Slide Show->Slide Show Settings ///' - try - SlideShowPresentationSettings - catch - warnlog "Presentation did not end :-(" - DocumentPresentation.TypeKeys "<escape>" - endcatch - Kontext "Bildschirmpraesentation" - if Bildschirmpraesentation.exists (5) then - '/// check checkbox 'Custom Slide Show' ///' - RangeCustomSlideShow.Check - printlog "check: '" + IndividuellePraesentationName.GetSelText + "'" - '/// cancel dialog 'Slide Show' ///' - Bildschirmpraesentation.Cancel - else - warnlog "Dialog not open? SlideShowPresentationSettings" - endif - '/// Slide Show->Custom Slide Show ///' - SlideShowCustomSlideshow - Kontext "IndividuellePraesentation" - if (IndividuellePraesentation.exists (5)) then - '/// click button 'Delete' ///' - Loeschen.Click - '/// close dialog 'Custom Slide Shows' ///' - IndividuellePraesentation.Close - else - warnlog "Dialog not open? SlideShowCustomSlideshow" - endif - '/// close application ///' - Call hCloseDocument + '/// open application ///' + Call hNewDocument + sleep 2 + '/// Slide Show->Custom Slide Show ///' + SlideShowCustomSlideshow + Kontext "IndividuellePraesentation" + call Dialogtest (IndividuellePraesentation) + '/// click button 'New' ///' + Neu.Click + Kontext "IndividuellePraesentationDefinieren" + Call DialogTest (IndividuellePraesentationDefinieren) + '/// select the first entry in the list 'Existing Slides' ///' + SeitenPraesentation.Select 1 + '/// click button '>>' ///' + Hinzufuegen.Click + '/// close dialog 'Define Custom Slide Show' with OK ///' + IndividuellePraesentationDefinieren.OK + Kontext "IndividuellePraesentation" + '/// click button 'Copy' ///' + Kopieren.Click + '/// click button 'Delete' ///' + Loeschen.Click + '/// click button 'Edit' ///' + Bearbeiten.Click + Kontext "IndividuellePraesentationDefinieren" + '/// select 1st entry in the list 'Selected Slides' ///' + SelectedSlides.Select 1 + '/// click button '<<' ///' + Entfernen.Click + '/// close dialog 'Define Custom Slide Show' with Cancel ///' + IndividuellePraesentationDefinieren.Cancel + Kontext "IndividuellePraesentation" + '/// check checkbox 'Use Custom Slide Show' ///' + IndividuellePraesentationBenutzen.Check + sleep 1 + '///+ UNcheck checkbox 'Use Custom Slide Show' ///' + IndividuellePraesentationBenutzen.UnCheck + '/// click button 'Start...' ///' + Starten.Click + sleep 5 + '/// press key [space] 2 times ///' + kontext "DocumentPresentation" + DocumentPresentation.TypeKeys "<space>" + sleep 1 + DocumentPresentation.TypeKeys "<space>" + sleep 1 + '/// close dialog 'Custom Slide Shows' ///' + ' IndividuellePraesentation.Close ' slide show ends dialog ! + '/// Slide Show->Slide Show Settings ///' + try + SlideShowPresentationSettings + catch + warnlog "Presentation did not end :-(" + DocumentPresentation.TypeKeys "<escape>" + endcatch + Kontext "Bildschirmpraesentation" + if Bildschirmpraesentation.exists (5) then + '/// check checkbox 'Custom Slide Show' ///' + RangeCustomSlideShow.Check + printlog "check: '" + IndividuellePraesentationName.GetSelText + "'" + '/// cancel dialog 'Slide Show' ///' + Bildschirmpraesentation.Cancel + else + warnlog "Dialog not open? SlideShowPresentationSettings" + endif + '/// Slide Show->Custom Slide Show ///' + SlideShowCustomSlideshow + Kontext "IndividuellePraesentation" + if (IndividuellePraesentation.exists (5)) then + '/// click button 'Delete' ///' + Loeschen.Click + '/// close dialog 'Custom Slide Shows' ///' + IndividuellePraesentation.Close + else + warnlog "Dialog not open? SlideShowCustomSlideshow" + endif + '/// close application ///' + Call hCloseDocument endcase testcase tSlideShowSlideTransition @@ -266,191 +266,191 @@ testcase tSlideShowSlideTransition sleep 2 '/// The 'Slide Transition' in the right 'Tasks' Pane has to come up ///' Kontext "Tasks" - '/// Select the second entry from teh Listbox 'Applay to selected slides' ///' - TransitionApplyToSelectedSlide.select (2) - sleep 5 ' takes some time, until it is run - Printlog "Count of effects : "+TransitionApplyToSelectedSlide.GetItemCount - Printlog "Count of Speeds : "+TransitionSpeed.GetItemCount - iCount = TransitionSound.GetItemCount - Printlog "Count of Sounds : " + iCount + '/// Select the second entry from teh Listbox 'Applay to selected slides' ///' + TransitionApplyToSelectedSlide.select (2) + sleep 5 ' takes some time, until it is run + Printlog "Count of effects : "+TransitionApplyToSelectedSlide.GetItemCount + Printlog "Count of Speeds : "+TransitionSpeed.GetItemCount + iCount = TransitionSound.GetItemCount + Printlog "Count of Sounds : " + iCount - '/// One Entry of the Listbox 'Sound' is 'Other sound...', select it ///' - TransitionSound.typeKeys "<home>" - i = 0 - for a = 1 to iCount - TransitionSound.select (a) - kontext "OeffnenDlg" - if (OeffnenDlg.exists (5)) then - if (0=i) then - ' remember when dialog came up - i = a - OeffnenDlg.cancel - else - warnlog "File Open Dialog comes up a second time!" - OeffnenDlg.cancel - endif - endif - kontext "Tasks" - ' the Checkbox is disabled on teh first three entries: <No Sound>, <Stop previous sound>... - if (TransitionLoopUntilNextSound.isEnabled AND (a<4)) then - qaErrorLog "May be Language specific -> Evaluation of TBO; " + a - endif - next a - TransitionSound.select (i) - '/// The dialog 'Open' comes up///' - sleep 1 + '/// One Entry of the Listbox 'Sound' is 'Other sound...', select it ///' + TransitionSound.typeKeys "<home>" + i = 0 + for a = 1 to iCount + TransitionSound.select (a) kontext "OeffnenDlg" if (OeffnenDlg.exists (5)) then - '/// Read all entries in Listbox 'File type' ///' - for i = 1 to Dateityp.getItemCount - printlog "" + i + ":" + Dateityp.getItemText(i) - next i - '/// cancel dialog 'Open' ///' - OeffnenDlg.cancel - else - warnlog "Impress:Tasks Pane:Slide Transition:Sound:Other sound... disdn't bring up teh File Open Dialog!" + if (0=i) then + ' remember when dialog came up + i = a + OeffnenDlg.cancel + else + warnlog "File Open Dialog comes up a second time!" + OeffnenDlg.cancel + endif endif kontext "Tasks" - sleep (2) - '/// check checkbox 'Automatically after' ///' - TransitionAutomaticallyAfter.check - sleep (2) - '/// press key 'Page Up' in box ///' - TransitionAutomaticallyAfterTime.typeKeys "<PageUp>" - sleep 9 - '/// check the standard checkbox 'On mouse click' ///' - TransitionOnMouseClick.check - sleep (2) - '/// press button 'Apply to All Slides' ///' - TransitionApplyToAllSlides.click - sleep (2) - '/// press button 'Play' ///' - TransitionPlay.click - sleep 10 - '/// press button 'Slide Show' ///' - TransitionSlideShow.click - sleep 2 - kontext "DocumentPresentation" - if DocumentPresentation.exists (10) then - printlog "Presentation started :-)" - DocumentPresentation.typeKeys "<escape>" - else - warnlog "Impress:Tasks Pane:Slide Transition:Slide Show button doesn't start slideshow!" + ' the Checkbox is disabled on teh first three entries: <No Sound>, <Stop previous sound>... + if (TransitionLoopUntilNextSound.isEnabled AND (a<4)) then + qaErrorLog "May be Language specific -> Evaluation of TBO; " + a endif - kontext "Tasks" + next a + TransitionSound.select (i) + '/// The dialog 'Open' comes up///' + sleep 1 + kontext "OeffnenDlg" + if (OeffnenDlg.exists (5)) then + '/// Read all entries in Listbox 'File type' ///' + for i = 1 to Dateityp.getItemCount + printlog "" + i + ":" + Dateityp.getItemText(i) + next i + '/// cancel dialog 'Open' ///' + OeffnenDlg.cancel + else + warnlog "Impress:Tasks Pane:Slide Transition:Sound:Other sound... disdn't bring up teh File Open Dialog!" + endif + kontext "Tasks" + sleep (2) + '/// check checkbox 'Automatically after' ///' + TransitionAutomaticallyAfter.check + sleep (2) + '/// press key 'Page Up' in box ///' + TransitionAutomaticallyAfterTime.typeKeys "<PageUp>" + sleep 9 + '/// check the standard checkbox 'On mouse click' ///' + TransitionOnMouseClick.check + sleep (2) + '/// press button 'Apply to All Slides' ///' + TransitionApplyToAllSlides.click + sleep (2) + '/// press button 'Play' ///' + TransitionPlay.click + sleep 10 + '/// press button 'Slide Show' ///' + TransitionSlideShow.click + sleep 2 + kontext "DocumentPresentation" + if DocumentPresentation.exists (10) then + printlog "Presentation started :-)" + DocumentPresentation.typeKeys "<escape>" + else + warnlog "Impress:Tasks Pane:Slide Transition:Slide Show button doesn't start slideshow!" + endif + kontext "Tasks" - '/// uncheck and check Checkbox 'Automatic Preview' ///' - '/// default is checked ///' - if (NOT TransitionAutomaticPreview.isChecked) then - warnlog "Impress:Tasks Pane:Slide Transition: Automatic preview has to be checked by default, wasn't!" - endif - sleep (2) - TransitionAutomaticPreview.unCheck - sleep (2) - TransitionAutomaticPreview.Check + '/// uncheck and check Checkbox 'Automatic Preview' ///' + '/// default is checked ///' + if (NOT TransitionAutomaticPreview.isChecked) then + warnlog "Impress:Tasks Pane:Slide Transition: Automatic preview has to be checked by default, wasn't!" + endif + sleep (2) + TransitionAutomaticPreview.unCheck + sleep (2) + TransitionAutomaticPreview.Check '/// close application ///' Call hCloseDocument endcase testcase tSlideShowShowHideSlide -'/// open application ///' - Call hNewDocument -'/// create rectangle ///' - Call hRechteckErstellen ( 10, 10, 20, 40 ) -'/// View->Master View->Slides View ///' - ViewWorkspaceSlidesView - sleep 1 -'/// Slide Show->Hide Slide ///' - SlideShowHideSlide - sleep 1 -'/// Slide Show->Show Slide ///' - SlideShowShowSlide -'/// close application ///' - Call hCloseDocument + '/// open application ///' + Call hNewDocument + '/// create rectangle ///' + Call hRechteckErstellen ( 10, 10, 20, 40 ) + '/// View->Master View->Slides View ///' + ViewWorkspaceSlidesView + sleep 1 + '/// Slide Show->Hide Slide ///' + SlideShowHideSlide + sleep 1 + '/// Slide Show->Show Slide ///' + SlideShowShowSlide + '/// close application ///' + Call hCloseDocument endcase testcase tSlideShowAnimation -'/// open application ///' - Call hNewDocument - sleep 1 -'/// create rectangle ///' - Call hRechteckErstellen ( 10, 10, 20, 40 ) - sleep 1 -'/// Insert ->Animated image ///' - Opl_SD_EffekteZulassen - Kontext "Animation" - sleep 1 -'/// click button 'Apply Object' ///' - BildAufnehmen.Click 'BildAufnehmen -'/// click button 'Create' ///' - Erstellen.Click - sleep 1 -'/// Select 1st entry from top in 'Alignment' ///' - Anpassung.Select 1 - sleep 1 -'/// click button 'Create' ///' - Erstellen.Click - sleep 1 -'/// click button 'Apply Objects Individually' ///' - AlleAufnehmen.Click - sleep 1 -'/// click button 'First Image' ///' - ErstesBild.Click - sleep 1 -'/// click button 'Last Image' ///' - LetztesBild.Click - sleep 1 -'/// click button 'BAckwards' ///' - Rueckwaerts.Click - sleep 1 -'/// click button 'Play' ///' - Abspielen.Click - sleep 1 -'/// click in Number field 'Image Number' Less - More ///' - AnzahlBilder.Less - sleep 1 - AnzahlBilder.More - sleep 1 -'/// check 'Bitmap Object' ///' - AnimationsgruppeBitmapobjekt.Check - sleep 1 -'/// Type '10' into the field 'Duration' ///' - AnzeigedauerProBild.SetText "10" -'/// click button 'Play' ///' - Abspielen.Click -'/// wait 5 seconds ///' - sleep 5 -'/// click button 'Stop' ///' - try + '/// open application ///' + Call hNewDocument + sleep 1 + '/// create rectangle ///' + Call hRechteckErstellen ( 10, 10, 20, 40 ) + sleep 1 + '/// Insert ->Animated image ///' + Opl_SD_EffekteZulassen + Kontext "Animation" + sleep 1 + '/// click button 'Apply Object' ///' + BildAufnehmen.Click 'BildAufnehmen + '/// click button 'Create' ///' + Erstellen.Click + sleep 1 + '/// Select 1st entry from top in 'Alignment' ///' + Anpassung.Select 1 + sleep 1 + '/// click button 'Create' ///' + Erstellen.Click + sleep 1 + '/// click button 'Apply Objects Individually' ///' + AlleAufnehmen.Click + sleep 1 + '/// click button 'First Image' ///' + ErstesBild.Click + sleep 1 + '/// click button 'Last Image' ///' + LetztesBild.Click + sleep 1 + '/// click button 'BAckwards' ///' + Rueckwaerts.Click + sleep 1 + '/// click button 'Play' ///' + Abspielen.Click + sleep 1 + '/// click in Number field 'Image Number' Less - More ///' + AnzahlBilder.Less + sleep 1 + AnzahlBilder.More + sleep 1 + '/// check 'Bitmap Object' ///' + AnimationsgruppeBitmapobjekt.Check + sleep 1 + '/// Type '10' into the field 'Duration' ///' + AnzeigedauerProBild.SetText "10" + '/// click button 'Play' ///' + Abspielen.Click + '/// wait 5 seconds ///' + sleep 5 + '/// click button 'Stop' ///' + try Stopp.Click - catch + catch warnlog "Stopbutton doesn't work" - endcatch - sleep 1 -'/// Select 1st entry from top in 'Loop Count' ///' - AnzahlDurchlaeufe.Select 1 - sleep 1 -'/// click button 'Delete Current Image' ///' - BildLoeschen.Click - sleep 1 -'/// check 'Group Object' ///' - AnimationsgruppeGruppenobjekt.Check - sleep 1 -'/// click button 'Delete All Images' ///' - AlleLoeschen.Click - kontext "Messagebox" -'/// there has to be a messagebox 'Really delete?' say YES!; else ERROR ///' - if Messagebox.exists (5) then - Messagebox.YES - else - warnlog "No one cares about my data :-( No one asked if all shall be deleted :-( " - endif - sleep 1 - kontext "Animation" -'/// close dialog 'Animation' ///' - Animation.Close -'/// close application ///' - Call hCloseDocument + endcatch + sleep 1 + '/// Select 1st entry from top in 'Loop Count' ///' + AnzahlDurchlaeufe.Select 1 + sleep 1 + '/// click button 'Delete Current Image' ///' + BildLoeschen.Click + sleep 1 + '/// check 'Group Object' ///' + AnimationsgruppeGruppenobjekt.Check + sleep 1 + '/// click button 'Delete All Images' ///' + AlleLoeschen.Click + kontext "Messagebox" + '/// there has to be a messagebox 'Really delete?' say YES!; else ERROR ///' + if Messagebox.exists (5) then + Messagebox.YES + else + warnlog "No one cares about my data :-( No one asked if all shall be deleted :-( " + endif + sleep 1 + kontext "Animation" + '/// close dialog 'Animation' ///' + Animation.Close + '/// close application ///' + Call hCloseDocument endcase testcase tSlideShowCustomAnimation @@ -462,229 +462,229 @@ testcase tSlideShowCustomAnimation Call hTextrahmenErstellen ("Test text to test text effects", 10, 10, 20, 40 ) '/// Slide Show->Custom Animation... ///' SlideShowCustomAnimation - Kontext "Tasks" - '/// click button 'Add...' ///' - EffectAdd.click + Kontext "Tasks" + '/// click button 'Add...' ///' + EffectAdd.click + '/// Dialog 'Custom Animation' comes up ///' + kontext + '/// Switch to TabPage: Entrance ///' + active.setPage(TabEntrance) + kontext "TabEntrance" + if TabEntrance.exists(5) then + DialogTest(TabEntrance) + '/// select in the listbox 'Effects' the second entry///' + Effects.select(2) + Speed.getItemCount + AutomaticPreview.unCheck + sleep 1 + AutomaticPreview.Check + kontext + '/// Switch to TabPage: Emphasis ///' + active.setPage(TabEmphasis) + kontext "TabEmphasis" + if TabEmphasis.exists(5) then + DialogTest(TabEmphasis) + else + bError = true + warnlog "Impress:Tasks Pane:Custom Animation:TabEmphasis tabPage doesn't work." + endif + kontext + '/// Switch to TabPage: Exit ///' + active.setPage(TabExit) + kontext "TabExit" + if TabExit.exists(5) then + DialogTest(TabExit) + else + bError = true + warnlog "Impress:Tasks Pane:Custom Animation:TabExit tabPage doesn't work." + endif + kontext + '/// Switch to TabPage: Motion Paths ///' + active.setPage(TabMotionPaths) + kontext "TabMotionPaths" + if TabMotionPaths.exists(5) then + DialogTest(TabMotionPaths) + Effects.select(7) + else + bError = true + warnlog "Impress:Tasks Pane:Custom Animation:TabMotionPaths tabPage doesn't work." + endif + '/// Close dialog 'Custom Animation' with 'OK' ///' + TabMotionPaths.OK + bError = false + else + bError = true + warnlog "Impress:Tasks Pane:Custom Animation:Add... button didn't work." + endif + Kontext "Tasks" + if (NOT bError) then + '/// click button 'Change...' ///' + EffectChange.click '/// Dialog 'Custom Animation' comes up ///' kontext '/// Switch to TabPage: Entrance ///' active.setPage(TabEntrance) kontext "TabEntrance" - if TabEntrance.exists(5) then - DialogTest(TabEntrance) - '/// select in the listbox 'Effects' the second entry///' - Effects.select(2) - Speed.getItemCount - AutomaticPreview.unCheck - sleep 1 - AutomaticPreview.Check - kontext - '/// Switch to TabPage: Emphasis ///' - active.setPage(TabEmphasis) - kontext "TabEmphasis" - if TabEmphasis.exists(5) then - DialogTest(TabEmphasis) - else - bError = true - warnlog "Impress:Tasks Pane:Custom Animation:TabEmphasis tabPage doesn't work." - endif - kontext - '/// Switch to TabPage: Exit ///' - active.setPage(TabExit) - kontext "TabExit" - if TabExit.exists(5) then - DialogTest(TabExit) + if (NOT TabEntrance.exists(5)) then + warnlog "Impress:Tasks Pane:Custom Animation:Change... button didn't work." + endif + TabEntrance.cancel + Kontext "Tasks" + EffectStart.getItemCount + if EffectProperty.isEnabled then + EffectProperty.getItemCount + endif + '/// CLick on button '...' (Options) ///' + EffectOptions.click + kontext "TabEffect" + if TabEffect.exists(5) then + dialogTest(TabEffect) + Sound.getItemCount + AfterAnimation.getItemCount + '/// switch to TabPage 'Timing' ///' + Kontext + active.setPage TabTiming + kontext "TabTiming" + if TabTiming.exists(5) then + dialogTest(TabTiming) + TimingStart.getItemCount + Delay.getText + Speed.getItemCount + Repeat.getItemCount + Rewind.ischecked + TriggerAnimate.isChecked + TriggerStart.isChecked + Shape.getItemCount else - bError = true - warnlog "Impress:Tasks Pane:Custom Animation:TabExit tabPage doesn't work." + warnlog "Impress:Tasks Pane:Custom Animation:Effect Options: Timing TabPage didn't work." endif - kontext - '/// Switch to TabPage: Motion Paths ///' - active.setPage(TabMotionPaths) - kontext "TabMotionPaths" - if TabMotionPaths.exists(5) then - DialogTest(TabMotionPaths) - Effects.select(7) + '/// switch to TabPage 'Timing' ///' + Kontext + active.setPage TabTextAnimation + kontext "TabTextAnimation" + if TabTextAnimation.exists(5) then + dialogTest(TabTextAnimation) + GroupText.getItemCount + AnimateAttachedShape.isChecked + TabTextAnimation.cancel else - bError = true - warnlog "Impress:Tasks Pane:Custom Animation:TabMotionPaths tabPage doesn't work." + warnlog "Impress:Tasks Pane:Custom Animation:Effect Options: TextAnimation TabPage didn't work." endif - '/// Close dialog 'Custom Animation' with 'OK' ///' - TabMotionPaths.OK - bError = false else - bError = true - warnlog "Impress:Tasks Pane:Custom Animation:Add... button didn't work." + warnlog "Impress:Tasks Pane:Custom Animation:... button didn't work." endif Kontext "Tasks" - if (NOT bError) then - '/// click button 'Change...' ///' - EffectChange.click - '/// Dialog 'Custom Animation' comes up ///' - kontext - '/// Switch to TabPage: Entrance ///' - active.setPage(TabEntrance) - kontext "TabEntrance" - if (NOT TabEntrance.exists(5)) then - warnlog "Impress:Tasks Pane:Custom Animation:Change... button didn't work." - endif - TabEntrance.cancel - Kontext "Tasks" - EffectStart.getItemCount - if EffectProperty.isEnabled then - EffectProperty.getItemCount - endif - '/// CLick on button '...' (Options) ///' - EffectOptions.click - kontext "TabEffect" - if TabEffect.exists(5) then - dialogTest(TabEffect) - Sound.getItemCount - AfterAnimation.getItemCount - '/// switch to TabPage 'Timing' ///' - Kontext - active.setPage TabTiming - kontext "TabTiming" - if TabTiming.exists(5) then - dialogTest(TabTiming) - TimingStart.getItemCount - Delay.getText - Speed.getItemCount - Repeat.getItemCount - Rewind.ischecked - TriggerAnimate.isChecked - TriggerStart.isChecked - Shape.getItemCount - else - warnlog "Impress:Tasks Pane:Custom Animation:Effect Options: Timing TabPage didn't work." - endif - '/// switch to TabPage 'Timing' ///' - Kontext - active.setPage TabTextAnimation - kontext "TabTextAnimation" - if TabTextAnimation.exists(5) then - dialogTest(TabTextAnimation) - GroupText.getItemCount - AnimateAttachedShape.isChecked - TabTextAnimation.cancel - else - warnlog "Impress:Tasks Pane:Custom Animation:Effect Options: TextAnimation TabPage didn't work." - endif - else - warnlog "Impress:Tasks Pane:Custom Animation:... button didn't work." - endif - Kontext "Tasks" - EffectSpeed.getItemCount - EffectList.getItemCount - EffectPlay.click - '/// Wait five seconds so the Playfunction has ended ///' - sleep 5 - EffectSlideShow.click - sleep 1 - kontext "DocumentPresentation" - if DocumentPresentation.exists (5) then - printlog "Presentation started :-)" - DocumentPresentation.typeKeys "<escape>" - else - warnlog "Impress:Tasks Pane:Custom Animation:Slide Show button doesn't start slideshow!" - endif - kontext "Tasks" - EffectAutomaticPreview.isChecked - '/// click button 'Remove' ///' - EffectRemove.click + EffectSpeed.getItemCount + EffectList.getItemCount + EffectPlay.click + '/// Wait five seconds so the Playfunction has ended ///' + sleep 5 + EffectSlideShow.click + sleep 1 + kontext "DocumentPresentation" + if DocumentPresentation.exists (5) then + printlog "Presentation started :-)" + DocumentPresentation.typeKeys "<escape>" + else + warnlog "Impress:Tasks Pane:Custom Animation:Slide Show button doesn't start slideshow!" endif + kontext "Tasks" + EffectAutomaticPreview.isChecked + '/// click button 'Remove' ///' + EffectRemove.click + endif '/// close application ///' Call hCloseDocument endcase testcase tSlideShowInteraction -'/// open application ///' - Call hNewDocument - sleep 2 -'/// create rectangle ///' - Call hRechteckErstellen (10, 10, 20, 20) - sleep 3 -'/// Slide Show->Interaction ///' - SlideShowInteraction - Kontext "TabInteraktion" - Call DialogTest (TabInteraktion, 1) - '///+ Select 6th entry from top in 'Action at mouse click' : 'Go to page or object' ///' - AktionBeiMausklick.select 6 - Printlog AktionBeiMausklick.GetSelText + " chosen" - Call DialogTest (TabInteraktion, 2) - '///+ click button 'Find' ///' - sleep 1 - suchen.click - Kontext "TabInteraktion" -'/// Select 7th entry from top in 'Action at mouse click' : 'Go to document' ///' - sleep 1 - AktionBeiMausklick.select 7 - sleep 1 - Printlog AktionBeiMausklick.GetSelText + " chosen" - Kontext "TabInteraktion" - Call DialogTest (TabInteraktion, 3) - '///+ click button 'Browse...' ///' - Durchsuchen.click - sleep 1 - kontext "OeffnenDlg" - call Dialogtest (OeffnenDlg) - '///+ cancel dialog 'open' ///' - OeffnenDlg.cancel - Kontext "TabInteraktion" - sleep 1 -'/// Select 9th entry from top in 'Action at mouse click' : 'Play Sound' ///' - AktionBeiMausklick.select 8 - Printlog AktionBeiMausklick.GetSelText + " chosen" - Call DialogTest (TabInteraktion, 4) - '///+ click button 'Browse...' ///' - Durchsuchen.click - sleep 1 - Kontext "OeffnenDlg" - Call dialogTest (OeffnenDlg) - '///+ cancel dialog 'open' ///' - OeffnenDlg.Cancel - sleep 1 - Kontext "TabInteraktion" -'/// Select 8th entry from top in 'Action at mouse click' : 'Run Program' ///' - AktionBeiMausklick.select 9 - Printlog AktionBeiMausklick.GetSelText + " chosen" - Call DialogTest (TabInteraktion, 7) - Kontext "TabInteraktion" - '///+ click button 'Browse...' ///' - Durchsuchen.Click - sleep 1 - Kontext "OeffnenDlg" - Call dialogTest (OeffnenDlg) - '///+ cancel dialog 'open' ///' - OeffnenDlg.Cancel - sleep 1 -'/// Select 9th entry from top in 'Action at mouse click' : 'Run Macro' ///' - Kontext "TabInteraktion" - AktionBeiMausklick.select 10 - Printlog AktionBeiMausklick.GetSelText + " chosen" - sleep 3 - Call DialogTest (TabInteraktion, 6) - '///+ click button 'Browse...' ///' - Durchsuchen.Click - sleep 1 - Kontext "ScriptSelector" - sleep 1 - Call DialogTest ( ScriptSelector, 1) - sleep 1 - '///+ cancel dialog 'ScriptSelector' ///' - ScriptSelector.Cancel - sleep 1 -'/// Select 10th entry from top in 'Action at mouse click' : 'Exit Presentation' ///' - Kontext "TabInteraktion" - AktionBeiMausklick.select 11 - Printlog AktionBeiMausklick.GetSelText + " chosen" - Call DialogTest (TabInteraktion, 7) - Kontext "TabInteraktion" -'/// close dialog 'Interaction' ///' - TabInteraktion.Close - sleep 2 -'/// close application ///' - Call hCloseDocument + '/// open application ///' + Call hNewDocument + sleep 2 + '/// create rectangle ///' + Call hRechteckErstellen (10, 10, 20, 20) + sleep 3 + '/// Slide Show->Interaction ///' + SlideShowInteraction + Kontext "TabInteraktion" + Call DialogTest (TabInteraktion, 1) + '///+ Select 6th entry from top in 'Action at mouse click' : 'Go to page or object' ///' + AktionBeiMausklick.select 6 + Printlog AktionBeiMausklick.GetSelText + " chosen" + Call DialogTest (TabInteraktion, 2) + '///+ click button 'Find' ///' + sleep 1 + suchen.click + Kontext "TabInteraktion" + '/// Select 7th entry from top in 'Action at mouse click' : 'Go to document' ///' + sleep 1 + AktionBeiMausklick.select 7 + sleep 1 + Printlog AktionBeiMausklick.GetSelText + " chosen" + Kontext "TabInteraktion" + Call DialogTest (TabInteraktion, 3) + '///+ click button 'Browse...' ///' + Durchsuchen.click + sleep 1 + kontext "OeffnenDlg" + call Dialogtest (OeffnenDlg) + '///+ cancel dialog 'open' ///' + OeffnenDlg.cancel + Kontext "TabInteraktion" + sleep 1 + '/// Select 9th entry from top in 'Action at mouse click' : 'Play Sound' ///' + AktionBeiMausklick.select 8 + Printlog AktionBeiMausklick.GetSelText + " chosen" + Call DialogTest (TabInteraktion, 4) + '///+ click button 'Browse...' ///' + Durchsuchen.click + sleep 1 + Kontext "OeffnenDlg" + Call dialogTest (OeffnenDlg) + '///+ cancel dialog 'open' ///' + OeffnenDlg.Cancel + sleep 1 + Kontext "TabInteraktion" + '/// Select 8th entry from top in 'Action at mouse click' : 'Run Program' ///' + AktionBeiMausklick.select 9 + Printlog AktionBeiMausklick.GetSelText + " chosen" + Call DialogTest (TabInteraktion, 7) + Kontext "TabInteraktion" + '///+ click button 'Browse...' ///' + Durchsuchen.Click + sleep 1 + Kontext "OeffnenDlg" + Call dialogTest (OeffnenDlg) + '///+ cancel dialog 'open' ///' + OeffnenDlg.Cancel + sleep 1 + '/// Select 9th entry from top in 'Action at mouse click' : 'Run Macro' ///' + Kontext "TabInteraktion" + AktionBeiMausklick.select 10 + Printlog AktionBeiMausklick.GetSelText + " chosen" + sleep 3 + Call DialogTest (TabInteraktion, 6) + '///+ click button 'Browse...' ///' + Durchsuchen.Click + sleep 1 + Kontext "ScriptSelector" + sleep 1 + Call DialogTest ( ScriptSelector, 1) + sleep 1 + '///+ cancel dialog 'ScriptSelector' ///' + ScriptSelector.Cancel + sleep 1 + '/// Select 10th entry from top in 'Action at mouse click' : 'Exit Presentation' ///' + Kontext "TabInteraktion" + AktionBeiMausklick.select 11 + Printlog AktionBeiMausklick.GetSelText + " chosen" + Call DialogTest (TabInteraktion, 7) + Kontext "TabInteraktion" + '/// close dialog 'Interaction' ///' + TabInteraktion.Close + sleep 2 + '/// close application ///' + Call hCloseDocument endcase diff --git a/testautomation/graphics/required/d_updt.bas b/testautomation/graphics/required/d_updt.bas index d191f2adea1c..6c5fdbe74472 100644 --- a/testautomation/graphics/required/d_updt.bas +++ b/testautomation/graphics/required/d_updt.bas @@ -55,13 +55,13 @@ sub main use "graphics\required\includes\draw\d_005_.inc" use "graphics\required\includes\draw\d_007.inc" - Call D_003_ + Call d_003 call id_002 call id_011 - Call D_002_ + Call d_002 call id_003 call id_004 - Call D_005_ + Call d_005 call id_005 call id_Tools call d_007 diff --git a/testautomation/graphics/required/includes/draw/d_002_.inc b/testautomation/graphics/required/includes/draw/d_002_.inc index d3d0ee81a9c3..cf37b87ffee4 100644 --- a/testautomation/graphics/required/includes/draw/d_002_.inc +++ b/testautomation/graphics/required/includes/draw/d_002_.inc @@ -31,6 +31,14 @@ '* '\***************************************************************** +sub d_002 + + call tdEditCrossFading() + call tdEditLayer() + +end sub + +'******************************************************************************* testcase tdEditCrossFading diff --git a/testautomation/graphics/required/includes/draw/d_003_.inc b/testautomation/graphics/required/includes/draw/d_003_.inc index 3a7c7da12c38..246e0db05fc9 100644 --- a/testautomation/graphics/required/includes/draw/d_003_.inc +++ b/testautomation/graphics/required/includes/draw/d_003_.inc @@ -31,6 +31,15 @@ '* '\***************************************************************** +sub d_003 + + call tdViewPagePane() + call tdViewSlide() + +end sub + +'******************************************************************************* + testcase tdViewPagePane printlog " open application " diff --git a/testautomation/graphics/required/includes/draw/d_005_.inc b/testautomation/graphics/required/includes/draw/d_005_.inc index 046e0bd76a30..998a42cdc093 100644 --- a/testautomation/graphics/required/includes/draw/d_005_.inc +++ b/testautomation/graphics/required/includes/draw/d_005_.inc @@ -31,6 +31,14 @@ '* '\***************************************************************** +sub d_005 + + call tiFormatLayer() + +end sub + +'******************************************************************************* + testcase tiFormatLayer printlog " open application " diff --git a/testautomation/graphics/required/includes/draw/d_007.inc b/testautomation/graphics/required/includes/draw/d_007.inc index 6582ff2c34c1..ce36abf03b59 100644 --- a/testautomation/graphics/required/includes/draw/d_007.inc +++ b/testautomation/graphics/required/includes/draw/d_007.inc @@ -31,6 +31,14 @@ '* '\***************************************************************** +sub d_007 + + call tdModifyRotate() + +end sub + +'******************************************************************************* + testcase tdModifyRotate printlog " open application " diff --git a/testautomation/graphics/required/includes/global/gallery.inc b/testautomation/graphics/required/includes/global/gallery.inc index 5019884973ac..c6f3e2daae7d 100644 --- a/testautomation/graphics/required/includes/global/gallery.inc +++ b/testautomation/graphics/required/includes/global/gallery.inc @@ -29,20 +29,7 @@ '* '* short description : Global Required/resource test: Checking the gallery '* -'******************************************************************* -'* -' #1 tGallery_DialogTest ' Open gallery, pin - unpin, dock - undock, close gallery -' #1 tGallery_ActivateAndUpdateAllThemes ' Activate all gallery-themes and update this theme -' #1 tGallery_CheckNames ' Check the names for all themes depends on language -' #1 tGallery_CheckContextMenuForGalleryThemes ' Test the context menu on themes window -' #1 tGallery_CreateAndWorkWithANewGalleryThemes ' Create a new theme, add graphics and work with it -' #1 tGallery_GalleryView_Preview ' Preview-feature in Gallery Beamer-window -' #1 tGallery_GalleryView_Insert ' Insert gallery objects in all applications -' #1 tGallery_GalleryView_Delete ' Delete gallery objects out of Beamer window -' #0 hOpenGallery ' Open the gallery -' #1 tGallery_Quick_check -'* -'\****************************************************************** +'\****************************************************************************** testcase tGallery_DialogTest '///Open a new Writer document '///Tools / Gallery diff --git a/testautomation/graphics/required/includes/global/gallery2.inc b/testautomation/graphics/required/includes/global/gallery2.inc index a38e797502cc..1028503a0830 100644 --- a/testautomation/graphics/required/includes/global/gallery2.inc +++ b/testautomation/graphics/required/includes/global/gallery2.inc @@ -40,7 +40,7 @@ ' #1 tSettingsToCM 'Measurement unit for textdocuments to cm ' #1 tResetSettings 'Resetting the measurement unit for textdocuments. '* -'\**************************************************************** +'\****************************************************************************** testcase tSettingsToCM diff --git a/testautomation/graphics/required/includes/global/id_001.inc b/testautomation/graphics/required/includes/global/id_001.inc index af835e16fec1..96d2b276eeaf 100644 --- a/testautomation/graphics/required/includes/global/id_001.inc +++ b/testautomation/graphics/required/includes/global/id_001.inc @@ -29,21 +29,7 @@ '* '* short description : '* -'*********************************************************************************** -' #1 tiFileSaveAs -' #1 tiFileReload (sFileIn as string) -' #1 tiFileVersion (sFileIn as string) -' #1 tiFilePassword -' #1 tiFileTemplates -' #1 tmFileNewFromTemplate -' #1 tmFileOpen -' #1 tmFileClose -' #1 tmFileSave -' #1 tmFileSaveAs -' #1 tmFileSaveAll -' #1 tmFileProperties -' #1 tmFilePrinterSetting -'\********************************************************************************** +'\****************************************************************************** testcase tiFileSaveAs diff --git a/testautomation/graphics/required/includes/global/id_002.inc b/testautomation/graphics/required/includes/global/id_002.inc index 8c729871cbb3..5880fc968806 100644 --- a/testautomation/graphics/required/includes/global/id_002.inc +++ b/testautomation/graphics/required/includes/global/id_002.inc @@ -29,23 +29,7 @@ '* '* short description : '* -'*********************************************************************************** -' #1 tiEditUndoRedo -' #1 tiEditRepeat -' #1 tiEditCutPasteCopySelectall -' #1 tiEditPasteSpecial -' #1 tiEditSearchAndReplace -' #1 tiEditDuplicate -' #1 tiEditFields -' #1 tdEditDeleteSlide -' #1 tiEditLinks -' #1 tiEditImageMap -' #1 tiEditObjectProperties -' #1 tiEditObjectEdit -' #1 tiEditPlugIn -' #1 tiEditHyperlink -' #1 tEditPoints -'\********************************************************************************** +'\****************************************************************************** testcase tiEditUndoRedo printlog " open application" @@ -101,22 +85,15 @@ testcase tiEditCutPasteCopySelectall call hTBOtypeInDoc - EditCut - sleep (1) - EditPaste - sleep (1) - EditCopy - sleep (1) - EditPaste - sleep (1) - EditSelectAll - sleep (1) - EditCut - sleep (1) - EditPaste - sleep (1) - EditDeleteContents - sleep (1) + hUseAsyncSlot( "EditCut" ) + hUseAsyncSlot( "EditPaste" ) + hUseAsyncSlot( "EditCopy" ) + hUseAsyncSlot( "EditPaste" ) + hUseAsyncSlot( "EditSelectAll" ) + hUseAsyncSlot( "EditCut" ) + hUseAsyncSlot( "EditPaste" ) + hUseAsyncSlot( "EditDeleteContents" ) + printlog " close application" Call hCloseDocument @@ -131,14 +108,18 @@ testcase tiEditPasteSpecial SetClipboard "This is a Text in the Clipboard" printlog " Edit->PasteSpecial" - EditPasteSpecial - WaitSlot (1000) + hUseAsyncSlot( "EditPasteSpecial" ) + Kontext "InhaltEinfuegen" + if ( InhaltEinfuegen.exists( 2 ) ) then DialogTest ( InhaltEinfuegen ) printlog " close the dialog without inserting something" - InhaltEinfuegen.Cancel - WaitSlot (1000) + hCloseDialog( InhaltEinfuegen, "Cancel" ) + else + warnlog( "Dialog <InhalteEinfuegen> did not open" ) + endif + printlog " close application" Call hCloseDocument @@ -534,27 +515,35 @@ testcase tiEditHyperlink Call sSelectEmptyLayout printlog " Insert->Hyperlink" InsertHyperlink - WaitSlot (5000) - Kontext "Hyperlink" + + kontext "HyperlinkDialog" + if ( HyperlinkDialog.exists( 2 ) ) then + + Kontext "Hyperlink" Auswahl.MouseDown 50, 5 Auswahl.MouseUp 50, 5 Auswahl.typekeys "<PAGEDOWN><PAGEUP>" Auswahl.typekeys "<TAB>" - sleep 3 + sleep 1 + Kontext "TabHyperlinkInternet" + printlog "Workaround to get rid of a Focusing-problem..." + NameText.Typekeys "alal <RETURN>" + NameText.Typekeys "<MOD1 A><DELETE>" + TabHyperlinkInternet.Typekeys "<TAB>", 6 + TabHyperlinkInternet.Typekeys "<LEFT>", 3 + printlog "End of workaround" + + Internet.Check + ZielUrl.SetText( "http://www.liegerad-fahrer.de" ) + + Uebernehmen.Click() - printlog "Workaround to get rid of a Focusing-problem..." - NameText.Typekeys "alal <RETURN>" - NameText.Typekeys "<MOD1 A><DELETE>" - TabHyperlinkInternet.Typekeys "<TAB>", 6 - TabHyperlinkInternet.Typekeys "<LEFT>", 3 - printlog "End of workaround" - - Internet.Check 'Just to make sure the radio-button is addressable. - ZielUrl.Settext "http://www.liegerad-fahrer.de" - Kontext "Hyperlink" - Uebernehmen.Click - Hyperlink.Close + kontext "HyperlinkDialog" + HyperlinkDialog.Close() + else + warnlog( "Failed to open <HyperlinkDialog>" ) + endif printlog " presupposition to enable edit->hyperlink: <TAB><F2><STRG+a>" hTypeKeys "<TAB>" hTypeKeys "<F2>" @@ -563,13 +552,14 @@ testcase tiEditHyperlink try printlog " Edit->Hyperlink " EditHyperlinkDraw - Kontext "Hyperlink" - if Hyperlink.Exists then - printlog " close dialog 'Hyperlink'" - Hyperlink.Close - else - Warnlog "- Hyperlinkdialog not up" - end if + + Kontext "HyperlinkDialog" + if ( HyperlinkDialog.Exists( 2 ) ) then + printlog " close dialog 'Hyperlink'" + HyperlinkDialog.Close() + else + Warnlog "- Hyperlinkdialog not up" + end if catch Warnlog "- Not able to edit Hyperlink!" endcatch diff --git a/testautomation/graphics/required/includes/global/id_003.inc b/testautomation/graphics/required/includes/global/id_003.inc index 5720d4cab791..16aa9f27bcd6 100644 --- a/testautomation/graphics/required/includes/global/id_003.inc +++ b/testautomation/graphics/required/includes/global/id_003.inc @@ -29,15 +29,7 @@ '* '* short description : '* -'*********************************************************************************** -' #1 tiViewNavigator -' #1 tiViewZoom -' #1 tiViewToolbar -' #1 tiViewDisplayQuality -' #1 tiViewLayer -' #1 tViewSnapLines -' #1 tViewGrid -'\********************************************************************************** +'\****************************************************************************** testcase tiViewNavigator printlog " open application " diff --git a/testautomation/graphics/required/includes/global/id_004.inc b/testautomation/graphics/required/includes/global/id_004.inc index 2fb21db18373..e6f154f169c8 100644 --- a/testautomation/graphics/required/includes/global/id_004.inc +++ b/testautomation/graphics/required/includes/global/id_004.inc @@ -29,26 +29,7 @@ '* '* short description : '* -'*********************************************************************************** -' #1 tiInsertSlide -' #1 tiInsertDuplicateSlide -' #1 tiInsertField -' #1 tiInsertSpecialCharacter -' #1 tiInsertHyperlink -' #1 tiInsertGraphic -' #1 tiInsertObjectSound -' #1 tiInsertObjectVideo -' #1 tiInsertChart -' #1 tiInsertObjectOLEObjects -' #1 tiInsertSpreadsheet -' #1 tiInsertFormula -' #1 tiInsertFloatingFrame -' #1 tiInsertFile -' #1 tiInsertPlugin -' #1 tiInsertScan -' #1 tiInsertSnappointLine -' #1 tdInsertLayer -'\********************************************************************************** +'\****************************************************************************** testcase tiInsertSlide printlog "Dateiname.settext Convertpath (gTesttoolPath + global\input\graf_inp\stabler.tif) " @@ -177,15 +158,16 @@ testcase tiInsertHyperlink Call hNewDocument printlog "Insert->Hyperlink " InsertHyperlink - WaitSlot (5000) - Kontext "Hyperlink" - if Hyperlink.exists (5) then + + kontext "HyperlinkDialog" + if ( HyperlinkDialog.exists( 2 ) ) then + + Kontext "TabHyperlinkInternet" + Auswahl.MouseDown 50, 5 Auswahl.MouseUp 50, 5 Auswahl.typekeys "<PAGEDOWN><PAGEUP>" Auswahl.typekeys "<TAB>" - sleep 3 - Kontext "TabHyperlinkInternet" printlog "Workaround to get rid of a Focusing-problem..." NameText.Typekeys "alal <RETURN>" @@ -195,10 +177,13 @@ testcase tiInsertHyperlink printlog "End of workaround..." Internet.Check - ZielUrl.Settext "http://mahler" - Kontext "Hyperlink" - Uebernehmen.Click - Hyperlink.Close + ZielUrl.Settext "http://www.nowhere.com" + + Uebernehmen.Click() + + kontext "HyperlinkDialog" + HyperlinkDialog.Close() + else warnlog "Failed to open hyperlink ??!!" end if diff --git a/testautomation/graphics/required/includes/global/id_005.inc b/testautomation/graphics/required/includes/global/id_005.inc index 94898e620e46..97fea2b33dae 100644 --- a/testautomation/graphics/required/includes/global/id_005.inc +++ b/testautomation/graphics/required/includes/global/id_005.inc @@ -29,27 +29,7 @@ '* '* short description : '* -'*********************************************************************************** -' #1 tiFormatDefault -' #1 tiFormatLine -' #1 tdFormatArea -' #1 tiFormatText -' #1 tiFormatPositionAndSize -' #1 tiFormatCharacter -' #1 tiFormatControlForm -' #1 tiFormatDimensions -' #1 tiFormatConnector -' #1 tiFormat3D_Effects -' #1 tiFormatNumberingBullets -' #1 tiFormatCaseCharacter -' #1 tiFormatParagraph -' #1 tiFormatPage -' #1 tiFormatStylesAndFormatting -' #1 tiFormatStylesSlideDesign -' #1 tiFormatFontwork -' #1 tiFormatGroup -' #1 hWalkTheStyles -'\********************************************************************************** +'\****************************************************************************** testcase tiFormatDefault printlog "open application" diff --git a/testautomation/graphics/required/includes/global/id_006.inc b/testautomation/graphics/required/includes/global/id_006.inc index 8e16f5ef5593..c7de07588367 100644 --- a/testautomation/graphics/required/includes/global/id_006.inc +++ b/testautomation/graphics/required/includes/global/id_006.inc @@ -29,17 +29,6 @@ '* '* short description : '* -'*********************************************************************************** -' #1 tiToolsSpellchecking -' #1 tiToolsSpellcheckingAutomatic -' #1 tiToolsThesaurus -' #1 tiToolsHyphenation -' #1 tiToolsAutoCorrect -' #1 tChineseTranslation -' #1 tiToolsMacro -' #1 tiToolsGallery -' #1 tiToolsEyedropper -' #1 tiToolsOptions '\********************************************************************************** '------------------------------------------------------------------------------ @@ -206,7 +195,52 @@ testcase tiToolsThesaurus if Thesaurus.Exists(3) then Thesaurus.Cancel else - warnlog "the thesaurus does not appear" + sFileName = (ConvertPath (gTesttoolPath + "graphics\required\input\engtext.odg")) + end if + if FileExists ( sFileName ) = FALSE then + warnlog "The language-file was not found or accessible! The test ends." + goto endsub + end if + Call hFileOpen (sFileName) + + sleep (2) + + hTypeKeys "<TAB><RETURN>" + hTypeKeys "<END><SHIFT HOME>" + + ' Call hTextrahmenErstellen ("SimpleTest" + "<Mod1 Shift left>", 10, 10, 30, 40) + try + '/// Tools->Thesaurus ///' + ExtrasThesaurusDraw + Kontext "Thesaurus" + Call DialogTest ( Thesaurus ) + '/// click button 'language' ///' + Sprache.Click + Kontext "SpracheAuswaehlen" + Call DialogTest ( SpracheAuswaehlen ) + '/// cancel dialog 'select language' ///' + SpracheAuswaehlen.cancel + Kontext "Thesaurus" + '/// click button 'search' ///' + Nachschlagen.Click + kontext + '/// if messagebox exist, say OK; (word not found) ///' + if Messagebox.exists (5) then + printlog "Messagebox: word not in thesaurus: '"+Messagebox.gettext+"'" + Messagebox.ok + end if + sleep 1 + Kontext "Thesaurus" + '/// cancel dialog 'Thesaurus' ///' + Thesaurus.Cancel + catch + warnlog "Thesaurus didn't work :-(" + endcatch + sleep 1 + '/// close application ///' + Call hCloseDocument + else + goto endsub endif Call hCloseDocument diff --git a/testautomation/graphics/required/includes/global/id_007.inc b/testautomation/graphics/required/includes/global/id_007.inc index 242a87f1fce4..7fd278bc702c 100644 --- a/testautomation/graphics/required/includes/global/id_007.inc +++ b/testautomation/graphics/required/includes/global/id_007.inc @@ -29,25 +29,6 @@ '* '* short description : '* -'*********************************************************************************** -' #1 tdModifyFlipVertikal -' #1 tdModifyFlipHorizontal -' #1 tdContextConvertIntoCurve -' #1 tdContextConvertIntoPolygon -' #1 tdContextConvertIntoContour -' #1 tdContextConvertInto3D -' #1 tdContextConvertIntoRotationObject -' #1 tdContextConvertIntoBitmap -' #1 tdContextConvertIntoMetaFile -' #1 tdModifyArrange -' #1 tdModifyArrangeObjects -' #1 tdModifyAlignment -' #1 tdContextDistribution -' #1 tdContextDescriptionObject -' #1 tdContextNameObject -' #1 tdModifyConnectBreak -' #1 tdModifyShapes -' #1 tdModifyCombineSplit '\********************************************************************************** testcase tdModifyFlipVertikal diff --git a/testautomation/graphics/required/includes/global/id_008.inc b/testautomation/graphics/required/includes/global/id_008.inc index 887f99dc7a05..0697e82260b7 100644 --- a/testautomation/graphics/required/includes/global/id_008.inc +++ b/testautomation/graphics/required/includes/global/id_008.inc @@ -29,9 +29,6 @@ '* '* short description : '* -'****************************************************************** -' #1 tiWindowNewWindow -' #1 tidWindow123 'wrn:2 '\***************************************************************** testcase tiWindowNewWindow diff --git a/testautomation/graphics/required/includes/global/id_009.inc b/testautomation/graphics/required/includes/global/id_009.inc index 6aa35a1dc23d..bbd9481430ab 100644 --- a/testautomation/graphics/required/includes/global/id_009.inc +++ b/testautomation/graphics/required/includes/global/id_009.inc @@ -29,14 +29,7 @@ '* '* short description : Testcases to test the Help-Menu. '* -'*********************************************************************************** -' #1 tmHelpHelpAgent -' #1 tmHelpTips -' #1 tmHelpExtendedTips -' #1 tmHelpAboutStarOffice -' #1 tmHelpContents -' #1 tCheckIfTheHelpExists -'\********************************************************************************** +'\****************************************************************************** ' testcase tmHelpHelpAgent diff --git a/testautomation/graphics/required/includes/global/id_011.inc b/testautomation/graphics/required/includes/global/id_011.inc index 98d574c0f78c..a0e3e680709d 100644 --- a/testautomation/graphics/required/includes/global/id_011.inc +++ b/testautomation/graphics/required/includes/global/id_011.inc @@ -29,13 +29,7 @@ '* '* short description : '* -'*********************************************************************************** -' #1 tiTextToolbar -' #1 tiDrawObjectBar -' #1 tiGraphicsObjectBar -' #1 tiGluepointToolbar -' #1 tdBezierToolbar -'\********************************************************************************** +'\****************************************************************************** testcase tiTextToolbar @@ -1137,12 +1131,15 @@ testcase tdBezierToolbar '/// Click button 'Delete points' on 'Object Toolbar' ///' Kontext "Bezierobjectbar" Printlog "- Break curve" - try - Loeschen.Click - sleep 2 - catch - warnlog "Delete didn't work... why?" - endcatch + if ( hClickButton( Loeschen ) = -1 ) then + warnlog( "Unable to click button <Loeschen>" ) + endif + 'try + ' Loeschen.Click + ' sleep 2 + 'catch + ' warnlog "Delete didn't work... why?" + 'endcatch '/// Uncheck on the symbol 'Curve' on the toolbar 'Main Toolbar' ///' Kontext "Toolbar" diff --git a/testautomation/graphics/required/includes/global/id_opt_1.inc b/testautomation/graphics/required/includes/global/id_opt_1.inc index 0f0b4bdb9069..6df5ccdfdddf 100644 --- a/testautomation/graphics/required/includes/global/id_opt_1.inc +++ b/testautomation/graphics/required/includes/global/id_opt_1.inc @@ -29,12 +29,7 @@ '* '* short description : '* -'************************************************************************************** -' #1 tToolsOptionsDrawGeneral 'wrn:1 -' #1 tToolsOptionsDrawView -' #1 tToolsOptionsDrawGrid -' #1 tToolsOptionsDrawPrint -'\************************************************************************************* +'\****************************************************************************** testcase tToolsOptionsDrawGeneral (sApplication as string) dim irgendwas(9) as boolean diff --git a/testautomation/graphics/required/includes/global/id_opt_2.inc b/testautomation/graphics/required/includes/global/id_opt_2.inc index dd01a3522847..6fa722e09dd9 100644 --- a/testautomation/graphics/required/includes/global/id_opt_2.inc +++ b/testautomation/graphics/required/includes/global/id_opt_2.inc @@ -29,9 +29,7 @@ '* '* short description : '* -'************************************************************************************ -' #1 tToolsOptionsMeasurementUnit -'\*********************************************************************************** +'\****************************************************************************** testcase tToolsOptionsMeasurementUnit (sApplication as string) dim i as integer diff --git a/testautomation/graphics/required/includes/impress/i_opt_1_.inc b/testautomation/graphics/required/includes/impress/i_opt_1_.inc index f648ee8b5cd5..ad62c64acf50 100644 --- a/testautomation/graphics/required/includes/impress/i_opt_1_.inc +++ b/testautomation/graphics/required/includes/impress/i_opt_1_.inc @@ -29,9 +29,15 @@ '* '* short description : '* -'******************************************************************* -' #1 tiAlwaysWithCurrentPage -'\****************************************************************** +'\****************************************************************************** + +sub i_opt_1_.inc + + call tiAlwaysWithCurrentPage() + +end sub + +'******************************************************************************* testcase tiAlwaysWithCurrentPage() dim i as integer @@ -40,7 +46,7 @@ testcase tiAlwaysWithCurrentPage() printlog "Open file 'impdraw\required\input\diashow.od?" hFileOpen ConvertPath (gTesttoolPath + "graphics\required\input\diashow.odp") WaitSlot(10000) 'sleep 10 - + printlog "Check if the document is writable" if fIsDocumentWritable = false then printlog "Make the document writable and check if it's succesfull" @@ -49,8 +55,8 @@ testcase tiAlwaysWithCurrentPage() goto endsub endif endif - - printlog "Test with default option." + + printlog "Test with default option." printlog "Checking: 'Always with current page' - default" printlog "Setting Options to start with current page." @@ -69,7 +75,7 @@ testcase tiAlwaysWithCurrentPage() if (i<>1) then warnlog "Presupposition not met. After loading the file not the first slide is up. It is number: " + i endif - + printlog "Press Key [Page Down] two times to get to slide number three. We are on slide one." hTypeKeys ("<home><PageDown><PageDown>") printlog "Start the slideshow with 'Slide Show->Slide Show." @@ -82,7 +88,7 @@ testcase tiAlwaysWithCurrentPage() ViewNavigator endif printlog "The slideshow has to start on slide 3." - printlog "running routine for slide 3 and 4." + printlog "running routine for slide 3 and 4." for i = 3 to 4 Kontext "NavigatorDraw" printlog "Checking for navigator.." @@ -97,7 +103,7 @@ testcase tiAlwaysWithCurrentPage() DocumentPresentation.TypeKeys "<pagedown>" WaitSlot (5000) 'sleep (5) next i - + printlog "Trying to end presentation with mouseclick on black endscreen." try DocumentPresentation.mousedown (50,50,1) @@ -105,7 +111,7 @@ testcase tiAlwaysWithCurrentPage() catch warnlog "TimeOut on pressing mouse button." endcatch - + printlog "Trying to recognize if slideshow did not end.." try gMouseClick 50,50 ' this one works to recognice the not ending ! @@ -174,7 +180,7 @@ testcase tiAlwaysWithCurrentPage() printlog "Ending running presentation with ESC." DocumentPresentation.TypeKeys "<ESCAPE>" endcatch - + Kontext "NavigatorDraw" printlog "Checking if navigator is open." if (not NavigatorDraw.exists(5)) then @@ -183,7 +189,7 @@ testcase tiAlwaysWithCurrentPage() printlog "Checking if we are on slide 3." i = fGetSlideNumber() if (i<>3) then - warnlog "We are on the wrong slide! Should be 3 but it is: " & i + warnlog "We are on the wrong slide! Should be 3 but it is: " & i endif printlog "Close the navigator View->Navigator." diff --git a/testautomation/graphics/required/includes/impress/im_002_.inc b/testautomation/graphics/required/includes/impress/im_002_.inc index f4741210ce12..bd101e4413f4 100644 --- a/testautomation/graphics/required/includes/impress/im_002_.inc +++ b/testautomation/graphics/required/includes/impress/im_002_.inc @@ -31,22 +31,27 @@ '* '\***************************************************************** +sub im_002_ + + call tiEditDeleteSlide() + +end sub + +'******************************************************************************* + testcase tiEditDeleteSlide -printlog "open application" - Call hNewDocument -printlog "Insert->Slide; press 'OK' " - InsertSlide - sleep 2 - hTypekeys "<Pagedown>" - sleep 2 -printlog "Edit->Delete Slide " - try - EditDeleteSlide - catch - warnlog "Error when deleting slide" - endcatch - Call hCloseDocument -printlog "close application " + + printlog "open application" + Call hNewDocument + printlog "Insert->Slide; press 'OK' " + InsertSlide + WaitSlot( 2000 ) + hTypekeys "<Pagedown>" + printlog "Edit->Delete Slide " + hUseAsyncSlot( "EditDeleteSlide" ) + Call hCloseDocument + printlog "close application " + endcase diff --git a/testautomation/graphics/required/includes/impress/im_003_.inc b/testautomation/graphics/required/includes/impress/im_003_.inc index da2f09187694..87052558b8f9 100644 --- a/testautomation/graphics/required/includes/impress/im_003_.inc +++ b/testautomation/graphics/required/includes/impress/im_003_.inc @@ -29,22 +29,30 @@ '* '* short description : Impress Resource Test: View Menu '* -'*********************************************************************************** -' #1 tiViewPanes -' #1 tiViewMasterView -' #1 tiViewSlideMaster -' #1 tiViewToolbar_1 -'\********************************************************************************** +'\****************************************************************************** + +sub im_003_ + + call tiViewPanes() + call tiViewMasterView() + call tiViewSlideMaster() + call tiViewToolbar_1() + +end sub + +'******************************************************************************* + testcase tiViewPanes + qaerrorlog( "This test is disabled, it needs rewriting" ) goto endsub 'TODO WG, tiViewPanes outcommented due to reconstruction of test dim bState as boolean printlog "open application " Call hCloseDocument Call hNewDocument - sleep 1 + kontext "Tasks" - if (NOT Tasks.exists) then + if ( not Tasks.exists( 2 ) ) then warnlog "Tasks Panel not visible on opening application. Opening now." ViewTaskPane endif @@ -110,7 +118,7 @@ testcase tiViewPanes endif catch warnlog "View->Slide Pane couldn't get executed" - endcatch + endcatch printlog "Reactivate all pages in the Task-panel " kontext "Tasks" @@ -120,131 +128,141 @@ testcase tiViewPanes hMenuSelectNr (3) View.OpenMenu hMenuSelectNr (4) - + endcase 'tiViewPanes '--------------------------------------------------------- testcase tiViewMasterView printlog "open application" Call hNewDocument + printlog "View->Master View->Drawing View" - sleep 1 - ViewWorkspaceDrawingView - sleep 5 + hUseAsyncSlot( "ViewWorkspaceDrawingView" ) + printlog "View->Master View->Outline View " - ViewWorkspaceOutlineView - sleep 1 + hUseAsyncSlot( "ViewWorkspaceOutlineView" ) + printlog "View->Master View->Slides View " - ViewWorkspaceSlidesView - sleep 1 + hUseAsyncSlot( "ViewWorkspaceSlidesView" ) + printlog "View->Master View->Notes View " - ViewWorkspaceNotesView - sleep 1 + hUseAsyncSlot( "ViewWorkspaceNotesView" ) + printlog "View->Master View->Handout View " - ViewWorkspaceHandoutView - sleep 1 + hUseAsyncSlot( "ViewWorkspaceHandoutView" ) + printlog "View->Master View->Drawing View " - ViewWorkspaceDrawingView + hUseAsyncSlot( "ViewWorkspaceDrawingView" ) + printlog "close application " - sleep 1 Call hCloseDocument - + endcase 'tiViewMasterView '--------------------------------------------------------- testcase tiViewSlideMaster - + printlog "open application with : File->Autopilot->Presentation; OK; OK " FileAutopilotPresentation ' to get a title :-) - sleep 2 Kontext "AutopilotPraesentation1" - AutopilotPraesentation1.Ok - sleep 1 + if ( AutopilotPraesentation1.exists( 2 ) ) then + hCloseDialog( AutopilotPraesentation1, "ok" ) + else + warnlog( "Dialog <AutopilotPraesentation1> did not open" ) + endif Kontext "Seitenlayout" ' aka: Modify Slide - if Seitenlayout.exists(5) then + + if ( Seitenlayout.exists( 5 ) ) then warnlog "Slidelayout has to vanish; moved to sidebar" - Seitenlayout.OK + hCloseDialog( Seitenlayout, "ok" ) endif + kontext "DocumentImpress" - sleep 1 printlog "View->Slide " - ViewSlide - Sleep 1 + hUseAsyncSlot( "ViewSlide" ) + printlog "View->Master->Drawing " - ViewDrawing - Sleep 1 + hUseAsyncSlot( "ViewDrawing" ) + printlog "View->Slide " - ViewSlide - Sleep 1 + hUseAsyncSlot( "ViewSlide" ) + printlog "View->Master->Title " try - ViewTitle - Errorlog "View - Master - Title Slide Master should NOT be accessable" + ViewTitle + Errorlog "View - Master - Title Slide Master should NOT be accessable" catch - printlog "View - Master - Title Slide Master not accessable - good" + printlog "View - Master - Title Slide Master not accessable - good" endcatch - Sleep 1 + printlog "View->Slide " - ViewSlide - Sleep 1 + hUseAsyncSlot( "ViewSlide" ) + printlog "View->Master->Handout " - ViewHandout - Sleep 1 - ' ViewSlide - Sleep 1 + hUseAsyncSlot( "ViewHandout" ) + printlog "View->Master->Notes " - ViewNotes + hUseAsyncSlot( "ViewNotes" ) kontext "DocumentImpress" - Sleep 1 + printlog "View->Slide " - ViewSlide - Sleep 1 + hUseAsyncSlot( "ViewSlide" ) + printlog "close application " Call hCloseDocument - + endcase 'tiViewSlideMaster '-------------------------------------------------------- testcase tiViewToolbar_1 - - Dim Zaehler as integer - Dim i as integer - + + const DEFAULT_DELAY = 3 + + Dim NumberOfGraphicModes as integer + Dim iCurrentGraphicsMode as integer + + dim TestFile as string + TestFile = ConvertPath (gTesttoolPath + "global\input\graf_inp\desp.bmp") + printlog "open application " Call hNewDocument - sleep 2 + printlog "Insert->Graphic... : global\input\graf_inp\desp.bmp " - InsertGraphicsFromFile - sleep 2 + hUseAsyncSlot( "InsertGraphicsFromFile" ) + Kontext "GrafikEinfuegenDlg" - sleep 1 - Dateiname.SetText ConvertPath (gTesttoolPath + "global\input\graf_inp\desp.bmp") - sleep 1 - Oeffnen.Click - sleep 3 - Kontext "Messagebox" - if Messagebox.Exists then - Warnlog Messagebox.GetText - Messagebox.OK - end if - Kontext "DocumentImpress" - printlog "select graphic " - hTypeKeys "<TAB>", 3 - sleep 2 - Kontext "GraphicObjectbar" - sleep 1 - printlog "The Graphics Toolbar has to be visible now; If not -> ERROR " - if GraphicObjectbar.Exists Then - Printlog "- graphic object toolbar exists" - Zaehler=Grafikmodus.GetItemCount - for i = 1 to Zaehler - Printlog "- access all controls in the toolbar (" +i+"/"+Zaehler+")" - Grafikmodus.Select i - sleep 3 - next i - sleep 3 + if ( GrafikEinfuegenDlg.exists( DEFAULT_DELAY ) ) then + Dateiname.SetText( TestFile ) + Oeffnen.Click + + Kontext "Messagebox" + if ( Messagebox.Exists( DEFAULT_DELAY ) ) then + Warnlog Messagebox.GetText + hCloseDialog( Messagebox, "ok" ) + end if + + Kontext "DocumentImpress" + printlog "select graphic " + hUseAsyncSlot( "EditSelectAll" ) + + Kontext "GraphicObjectbar" + printlog "The Graphics Toolbar has to be visible now; If not -> ERROR " + if ( GraphicObjectbar.Exists( DEFAULT_DELAY ) ) Then + + Printlog "- graphic object toolbar exists" + NumberOfGraphicModes=Grafikmodus.GetItemCount + + for iCurrentGraphicsMode = 1 to NumberOfGraphicModes + Printlog( "- access all controls in the toolbar (" & iCurrentGraphicsMode & "/" & NumberOfGraphicModes & ")" ) + Grafikmodus.Select( iCurrentGraphicsMode ) + sleep ( DEFAULT_DELAY ) + next iCurrentGraphicsMode + else + Warnlog "- No graphic function toolbar visible" + end if else - Warnlog "- No graphic function toolbar visible" - end if + warnlog( "Insert Graphics dialog did not open" ) + endif + printlog "close application " Call hCloseDocument - + endcase 'tiViewToolbar_1 diff --git a/testautomation/graphics/required/includes/impress/im_004_.inc b/testautomation/graphics/required/includes/impress/im_004_.inc index f33a75f12a19..28f11a778864 100644 --- a/testautomation/graphics/required/includes/impress/im_004_.inc +++ b/testautomation/graphics/required/includes/impress/im_004_.inc @@ -31,26 +31,34 @@ '* '\***************************************************************** +sub im_004_ + + call tiInsertSlideExpandSummary() + +end sub + +'******************************************************************************* + testcase tiInsertSlideExpandSummary -printlog "open application " - Call hNewDocument -printlog "View->Master View->Outline View " - ViewWorkspaceOutlineView - Sleep 1 - Kontext "DocumentImpressOutlineView" -printlog "Type 2 rows " - DocumentImpressOutlineView.TypeKeys "Herbert<Return>Rudi" -printlog "View->Master View->Drawing View " - ViewWorkspaceDrawingView - Sleep 1 -printlog "Insert->Summery Slide " - InsertSummerySlide - Sleep 1 -printlog "Insert->Expand Slide " - InsertExpandSlide - Sleep 2 -printlog "close application " - Call hCloseDocument + printlog "open application " + Call hNewDocument + printlog "View->Master View->Outline View " + ViewWorkspaceOutlineView + WaitSlot() + Kontext "DocumentImpressOutlineView" + printlog "Type 2 rows " + DocumentImpressOutlineView.TypeKeys "Herbert<Return>Rudi" + printlog "View->Master View->Drawing View " + ViewWorkspaceDrawingView + WaitSlot() + printlog "Insert->Summery Slide " + InsertSummerySlide + WaitSlot() + printlog "Insert->Expand Slide " + InsertExpandSlide + WaitSlot( 3000 ) + printlog "close application " + Call hCloseDocument endcase diff --git a/testautomation/graphics/required/includes/impress/im_005_.inc b/testautomation/graphics/required/includes/impress/im_005_.inc index b651dcea9cae..5a8b9fb9a518 100644 --- a/testautomation/graphics/required/includes/impress/im_005_.inc +++ b/testautomation/graphics/required/includes/impress/im_005_.inc @@ -31,19 +31,33 @@ '* '\***************************************************************** +sub im_005_ + + call tiFormatModifyLayout() + +end sub + +'******************************************************************************* + testcase tiFormatModifyLayout printlog "open application " Call hNewDocument - printlog "Impress: Format->Modify Layout " - printlog "Draw : kontext menu: Slide-> Modify Slide (always disabled :-( ?" - FormatPage + + printlog( "Format/Page" ) + FormatPage + Kontext "SeitenLayout" - DialogTest ( SeitenLayout ) - sleep 1 - printlog "cancel dialog 'Page Setup' " - SeitenLayout.Cancel - printlog "close application " + if ( SeitenLayout.exists( 2 ) ) then + DialogTest ( SeitenLayout ) + + printlog "cancel dialog 'Page Setup' " + hCloseDialog( SeitenLayout, "Cancel" ) + else + warnlog( "Dialog <SeitenLayout> did not open" ) + endif + + printlog "close application" Call hCloseDocument - + endcase 'tiFormatModifyLayout diff --git a/testautomation/graphics/required/includes/impress/im_007_.inc b/testautomation/graphics/required/includes/impress/im_007_.inc index 7248b0a2eca5..9d4860a0ba56 100644 --- a/testautomation/graphics/required/includes/impress/im_007_.inc +++ b/testautomation/graphics/required/includes/impress/im_007_.inc @@ -31,6 +31,21 @@ '* '\***************************************************************** +sub im_007_ + + call tSlideShowSlideShow() + call tSlideShowRehearseTimings() + call tSlideShowSlideShowSettings() + call tSlideShowCustomSlideShow() + call tSlideShowSlideTransition() + call tSlideShowShowHideSlide() + call tSlideShowCustomAnimation() + call tSlideShowInteraction() + +end sub + +'******************************************************************************* + testcase tSlideShowSlideShow printlog "open application " @@ -65,22 +80,22 @@ testcase tSlideShowSlideShow DocumentImpress.MouseDoubleClick ( 50, 50 ) Sleep 3 catch -' FileClose + ' FileClose warnlog "had to catch <the ball> :-( " -' Kontext "Messagebox" -' if Messagebox.Exists (5) Then Messagebox.No -' Kontext -' sleep (12) -' start sAppExe$ -' sleep (6) -' Kontext -' if Office.Exists(2) then Resetapplication -' Warnlog "Slide didn't end, application wasn't in document edit mode" + ' Kontext "Messagebox" + ' if Messagebox.Exists (5) Then Messagebox.No + ' Kontext + ' sleep (12) + ' start sAppExe$ + ' sleep (6) + ' Kontext + ' if Office.Exists(2) then Resetapplication + ' Warnlog "Slide didn't end, application wasn't in document edit mode" endcatch printlog "close application " Call hCloseDocument - endcase 'tSlideShowSlideShow +endcase 'tSlideShowSlideShow '------------------------------------------------------------------------------- testcase tSlideShowRehearseTimings @@ -99,32 +114,32 @@ testcase tSlideShowRehearseTimings sleep 2 Kontext "DocumentPresentation" printlog "Press <Esc> to leave presentation mode " - if DocumentPresentation.Exists (5) then - DocumentPresentation.Typekeys ("<Escape>") - else - Warnlog "SlideShowRehearseTimings mode not accessible" - endif - Sleep 3 - if DocumentPresentation.Exists then ' the kontext hasnt to be available, else ERROR - DocumentPresentation.TypeKeys "<ESCAPE>" ' => I mustn't be here ever ! - Warnlog "- Slide show mode should have ended" - else - printlog "SlideShowRehearseTimings mode not accessible :-) " - end if - sleep 3 - try - Kontext "DocumentImpress" - DocumentImpress.MouseDoubleClick ( 50, 50 ) + if DocumentPresentation.Exists (5) then + DocumentPresentation.Typekeys ("<Escape>") + else + Warnlog "SlideShowRehearseTimings mode not accessible" + endif + Sleep 3 + if DocumentPresentation.Exists then ' the kontext hasnt to be available, else ERROR + DocumentPresentation.TypeKeys "<ESCAPE>" ' => I mustn't be here ever ! + Warnlog "- Slide show mode should have ended" + else + printlog "SlideShowRehearseTimings mode not accessible :-) " + end if + sleep 3 + try + Kontext "DocumentImpress" + DocumentImpress.MouseDoubleClick ( 50, 50 ) - sleep 3 - catch - warnlog "Had to catch <the ball> :-( " - endcatch + sleep 3 + catch + warnlog "Had to catch <the ball> :-( " + endcatch sleep 3 printlog "close application " Call hCloseDocument - endcase 'tSlideShowRehearseTimings +endcase 'tSlideShowRehearseTimings '------------------------------------------------------------------------------- testcase tSlideShowSlideShowSettings @@ -171,11 +186,11 @@ testcase tSlideShowSlideShowSettings Bildschirmpraesentation.Cancel printlog "close application " Call hCloseDocument - + endcase 'tSlideShowSlideShowSettings '------------------------------------------------------------------------------- testcase tSlideShowCustomSlideShow - + printlog "open application " Call hNewDocument sleep 2 @@ -225,36 +240,36 @@ testcase tSlideShowCustomSlideShow printlog "close dialog 'Custom Slide Shows' " ' IndividuellePraesentation.Close ' slide show ends dialog ! printlog "Slide Show->Slide Show Settings " - try - SlideShowPresentationSettings - catch - warnlog "Presentation did not end :-(" - DocumentPresentation.TypeKeys "<escape>" - endcatch - Kontext "Bildschirmpraesentation" - if Bildschirmpraesentation.exists (5) then - printlog "check checkbox 'Custom Slide Show' " - RangeCustomSlideShow.Check - printlog "check: '" + IndividuellePraesentationName.GetSelText + "'" - printlog "cancel dialog 'Slide Show' " - Bildschirmpraesentation.Cancel - else - warnlog "Dialog not open? SlideShowPresentationSettings" - endif - printlog "Slide Show->Custom Slide Show " - SlideShowCustomSlideshow - Kontext "IndividuellePraesentation" - if (IndividuellePraesentation.exists (5)) then - printlog "click button 'Delete' " - Loeschen.Click - printlog "close dialog 'Custom Slide Shows' " - IndividuellePraesentation.Close - else - warnlog "Dialog not open? SlideShowCustomSlideshow" - endif - printlog "close application " - Call hCloseDocument - + try + SlideShowPresentationSettings + catch + warnlog "Presentation did not end :-(" + DocumentPresentation.TypeKeys "<escape>" + endcatch + Kontext "Bildschirmpraesentation" + if Bildschirmpraesentation.exists (5) then + printlog "check checkbox 'Custom Slide Show' " + RangeCustomSlideShow.Check + printlog "check: '" + IndividuellePraesentationName.GetSelText + "'" + printlog "cancel dialog 'Slide Show' " + Bildschirmpraesentation.Cancel + else + warnlog "Dialog not open? SlideShowPresentationSettings" + endif + printlog "Slide Show->Custom Slide Show " + SlideShowCustomSlideshow + Kontext "IndividuellePraesentation" + if (IndividuellePraesentation.exists (5)) then + printlog "click button 'Delete' " + Loeschen.Click + printlog "close dialog 'Custom Slide Shows' " + IndividuellePraesentation.Close + else + warnlog "Dialog not open? SlideShowCustomSlideshow" + endif + printlog "close application " + Call hCloseDocument + endcase 'tSlideShowCustomSlideShow '------------------------------------------------------------------------------ testcase tSlideShowSlideTransition @@ -273,95 +288,95 @@ testcase tSlideShowSlideTransition sleep 2 printlog "The 'Slide Transition' in the right 'Tasks' Pane has to come up " Kontext "Tasks" - printlog "Select the second entry from teh Listbox 'Applay to selected slides' " - TransitionApplyToSelectedSlide.select (2) - sleep 5 ' takes some time, until it is run - Printlog "Count of effects : "+TransitionApplyToSelectedSlide.GetItemCount - Printlog "Count of Speeds : "+TransitionSpeed.GetItemCount - iCount = TransitionSound.GetItemCount - Printlog "Count of Sounds : " + iCount + printlog "Select the second entry from teh Listbox 'Applay to selected slides' " + TransitionApplyToSelectedSlide.select (2) + sleep 5 ' takes some time, until it is run + Printlog "Count of effects : "+TransitionApplyToSelectedSlide.GetItemCount + Printlog "Count of Speeds : "+TransitionSpeed.GetItemCount + iCount = TransitionSound.GetItemCount + Printlog "Count of Sounds : " + iCount - printlog "One Entry of the Listbox 'Sound' is 'Other sound...', select it " - TransitionSound.typeKeys "<home>" - i = 0 - for a = 1 to iCount - TransitionSound.select (a) - kontext "OeffnenDlg" - if (OeffnenDlg.exists (5)) then - if (0=i) then - ' remember when dialog came up - i = a - OeffnenDlg.cancel - else - warnlog "File Open Dialog comes up a second time!" - OeffnenDlg.cancel - endif - endif - kontext "Tasks" - ' the Checkbox is disabled on teh first three entries: <No Sound>, <Stop previous sound>... - if (TransitionLoopUntilNextSound.isEnabled AND (a<4)) then - qaErrorLog "May be Language specific -> Evaluation of TBO; " + a - endif - next a - TransitionSound.select (i) - printlog "The dialog 'Open' comes up" - sleep 1 + printlog "One Entry of the Listbox 'Sound' is 'Other sound...', select it " + TransitionSound.typeKeys "<home>" + i = 0 + for a = 1 to iCount + TransitionSound.select (a) kontext "OeffnenDlg" if (OeffnenDlg.exists (5)) then - printlog "Read all entries in Listbox 'File type' " - for i = 1 to Dateityp.getItemCount - printlog "" + i + ":" + Dateityp.getItemText(i) - next i - printlog "cancel dialog 'Open' " - OeffnenDlg.cancel - else - warnlog "Impress:Tasks Pane:Slide Transition:Sound:Other sound... disdn't bring up teh File Open Dialog!" + if (0=i) then + ' remember when dialog came up + i = a + OeffnenDlg.cancel + else + warnlog "File Open Dialog comes up a second time!" + OeffnenDlg.cancel + endif endif kontext "Tasks" - sleep (2) - printlog "check checkbox 'Automatically after' " - TransitionAutomaticallyAfter.check - sleep (2) - printlog "press key 'Page Up' in box " - TransitionAutomaticallyAfterTime.typeKeys "<PageUp>" - sleep 9 - printlog "check the standard checkbox 'On mouse click' " - TransitionOnMouseClick.check - sleep (2) - printlog "press button 'Apply to All Slides' " - TransitionApplyToAllSlides.click - sleep (2) - printlog "press button 'Play' " - TransitionPlay.click - sleep 10 - printlog "press button 'Slide Show' " - TransitionSlideShow.click - sleep 2 - kontext "DocumentPresentation" - if DocumentPresentation.exists (10) then - printlog "Presentation started :-)" - DocumentPresentation.typeKeys "<escape>" - else - warnlog "Impress:Tasks Pane:Slide Transition:Slide Show button doesn't start slideshow!" + ' the Checkbox is disabled on teh first three entries: <No Sound>, <Stop previous sound>... + if (TransitionLoopUntilNextSound.isEnabled AND (a<4)) then + qaErrorLog "May be Language specific -> Evaluation of TBO; " + a endif - kontext "Tasks" + next a + TransitionSound.select (i) + printlog "The dialog 'Open' comes up" + sleep 1 + kontext "OeffnenDlg" + if (OeffnenDlg.exists (5)) then + printlog "Read all entries in Listbox 'File type' " + for i = 1 to Dateityp.getItemCount + printlog "" + i + ":" + Dateityp.getItemText(i) + next i + printlog "cancel dialog 'Open' " + OeffnenDlg.cancel + else + warnlog "Impress:Tasks Pane:Slide Transition:Sound:Other sound... disdn't bring up teh File Open Dialog!" + endif + kontext "Tasks" + sleep (2) + printlog "check checkbox 'Automatically after' " + TransitionAutomaticallyAfter.check + sleep (2) + printlog "press key 'Page Up' in box " + TransitionAutomaticallyAfterTime.typeKeys "<PageUp>" + sleep 9 + printlog "check the standard checkbox 'On mouse click' " + TransitionOnMouseClick.check + sleep (2) + printlog "press button 'Apply to All Slides' " + TransitionApplyToAllSlides.click + sleep (2) + printlog "press button 'Play' " + TransitionPlay.click + sleep 10 + printlog "press button 'Slide Show' " + TransitionSlideShow.click + sleep 2 + kontext "DocumentPresentation" + if DocumentPresentation.exists (10) then + printlog "Presentation started :-)" + DocumentPresentation.typeKeys "<escape>" + else + warnlog "Impress:Tasks Pane:Slide Transition:Slide Show button doesn't start slideshow!" + endif + kontext "Tasks" - printlog "uncheck and check Checkbox 'Automatic Preview' " - printlog "default is checked " - if (NOT TransitionAutomaticPreview.isChecked) then - warnlog "Impress:Tasks Pane:Slide Transition: Automatic preview has to be checked by default, wasn't!" - endif - sleep (2) - TransitionAutomaticPreview.unCheck - sleep (2) - TransitionAutomaticPreview.Check + printlog "uncheck and check Checkbox 'Automatic Preview' " + printlog "default is checked " + if (NOT TransitionAutomaticPreview.isChecked) then + warnlog "Impress:Tasks Pane:Slide Transition: Automatic preview has to be checked by default, wasn't!" + endif + sleep (2) + TransitionAutomaticPreview.unCheck + sleep (2) + TransitionAutomaticPreview.Check printlog "close application " Call hCloseDocument - + endcase 'tSlideShowSlideTransition '------------------------------------------------------------------------------- testcase tSlideShowShowHideSlide - + printlog "open application " Call hNewDocument printlog "create rectangle " @@ -376,9 +391,9 @@ testcase tSlideShowShowHideSlide SlideShowShowSlide printlog "close application " Call hCloseDocument - endcase - - testcase tSlideShowAnimation +endcase + +testcase tSlideShowAnimation printlog "open application " Call hNewDocument sleep 1 @@ -431,9 +446,9 @@ testcase tSlideShowShowHideSlide sleep 5 printlog "click button 'Stop' " try - Stopp.Click + Stopp.Click catch - warnlog "Stopbutton doesn't work" + warnlog "Stopbutton doesn't work" endcatch sleep 1 printlog "Select 1st entry from top in 'Loop Count' " @@ -450,9 +465,9 @@ testcase tSlideShowShowHideSlide kontext "Messagebox" printlog "there has to be a messagebox 'Really delete?' say YES!; else ERROR " if Messagebox.exists (5) then - Messagebox.YES + Messagebox.YES else - warnlog "No one cares about my data :-( No one asked if all shall be deleted :-( " + warnlog "No one cares about my data :-( No one asked if all shall be deleted :-( " endif sleep 1 kontext "Animation" @@ -460,7 +475,7 @@ testcase tSlideShowShowHideSlide Animation.Close printlog "close application " Call hCloseDocument - + endcase 'tSlideShowShowHideSlide '------------------------------------------------------------------------------- testcase tSlideShowCustomAnimation @@ -490,7 +505,7 @@ testcase tSlideShowCustomAnimation sleep 1 AutomaticPreview.Check kontext - + printlog "Switch to TabPage: Emphasis" active.setPage(TabEmphasis) kontext "TabEmphasis" @@ -501,129 +516,129 @@ testcase tSlideShowCustomAnimation warnlog "Impress:Tasks Pane:Custom Animation:TabEmphasis tabPage doesn't work." endif kontext - - printlog "Switch to TabPage: Exit" - active.setPage(TabExit) - kontext "TabExit" - if TabExit.exists(5) then - DialogTest(TabExit) - else - bError = true - warnlog "Impress:Tasks Pane:Custom Animation:TabExit tabPage doesn't work." - endif - kontext - - printlog "Switch to TabPage: Motion Paths" - active.setPage(TabMotionPaths) - kontext "TabMotionPaths" - if TabMotionPaths.exists(5) then - DialogTest(TabMotionPaths) - Effects.select(7) - else - bError = true - warnlog "Impress:Tasks Pane:Custom Animation:TabMotionPaths tabPage doesn't work." - endif - kontext - '----------------------------------------------------------------------- - 'printlog "Switch to tabpage: Misc Effects" - 'active.setPage(TabMiscEffects) - 'kontext "TabMiscEffects" - 'if TabMiscEffects.exists(5) then - ' DialogTest(TabMiscEffects) - 'else - ' bError = true - ' warnlog "Impress:TaskPane:CustomAnimation:TabMiscEffects tabPage does not work." - 'endif - 'kontext - '----------------------------------------------------------------------- - printlog "Close dialog 'Custom Animation' with 'OK'" - TabMotionPaths.OK - bError = false + + printlog "Switch to TabPage: Exit" + active.setPage(TabExit) + kontext "TabExit" + if TabExit.exists(5) then + DialogTest(TabExit) + else + bError = true + warnlog "Impress:Tasks Pane:Custom Animation:TabExit tabPage doesn't work." + endif + kontext + + printlog "Switch to TabPage: Motion Paths" + active.setPage(TabMotionPaths) + kontext "TabMotionPaths" + if TabMotionPaths.exists(5) then + DialogTest(TabMotionPaths) + Effects.select(7) else bError = true - warnlog "Impress:Tasks Pane:Custom Animation:Add... button didn't work." + warnlog "Impress:Tasks Pane:Custom Animation:TabMotionPaths tabPage doesn't work." endif + kontext + '----------------------------------------------------------------------- + 'printlog "Switch to tabpage: Misc Effects" + 'active.setPage(TabMiscEffects) + 'kontext "TabMiscEffects" + 'if TabMiscEffects.exists(5) then + ' DialogTest(TabMiscEffects) + 'else + ' bError = true + ' warnlog "Impress:TaskPane:CustomAnimation:TabMiscEffects tabPage does not work." + 'endif + 'kontext + '----------------------------------------------------------------------- + printlog "Close dialog 'Custom Animation' with 'OK'" + TabMotionPaths.OK + bError = false + else + bError = true + warnlog "Impress:Tasks Pane:Custom Animation:Add... button didn't work." + endif + Kontext "Tasks" + if (NOT bError) then + printlog "click button 'Change...'" + EffectChange.click + printlog "Dialog 'Custom Animation' comes up" + kontext + printlog "Switch to TabPage: Entrance" + active.setPage(TabEntrance) + kontext "TabEntrance" + if (NOT TabEntrance.exists(5)) then + warnlog "Impress:Tasks Pane:Custom Animation:Change... button didn't work." + endif + TabEntrance.cancel Kontext "Tasks" - if (NOT bError) then - printlog "click button 'Change...'" - EffectChange.click - printlog "Dialog 'Custom Animation' comes up" - kontext - printlog "Switch to TabPage: Entrance" - active.setPage(TabEntrance) - kontext "TabEntrance" - if (NOT TabEntrance.exists(5)) then - warnlog "Impress:Tasks Pane:Custom Animation:Change... button didn't work." - endif - TabEntrance.cancel - Kontext "Tasks" - EffectStart.getItemCount - if EffectProperty.isEnabled then - EffectProperty.getItemCount - endif - printlog "Click on button '...' (Options)" - EffectOptions.click - kontext "TabEffect" - if TabEffect.exists(5) then - dialogTest(TabEffect) - Sound.getItemCount - AfterAnimation.getItemCount - printlog "switch to TabPage 'Timing'" - Kontext - active.setPage TabTiming - kontext "TabTiming" - if TabTiming.exists(5) then - dialogTest(TabTiming) - TimingStart.getItemCount - Delay.getText - Speed.getItemCount - Repeat.getItemCount - Rewind.ischecked - TriggerAnimate.isChecked - TriggerStart.isChecked - Shape.getItemCount - else - warnlog "Impress:Tasks Pane:Custom Animation:Effect Options: Timing TabPage didn't work." - endif - printlog "switch to TabPage 'Timing'" - Kontext - active.setPage TabTextAnimation - kontext "TabTextAnimation" - if TabTextAnimation.exists(5) then - dialogTest(TabTextAnimation) - GroupText.getItemCount - AnimateAttachedShape.isChecked - TabTextAnimation.cancel - else - warnlog "Impress:Tasks Pane:Custom Animation:Effect Options: TextAnimation TabPage didn't work." - endif + EffectStart.getItemCount + if EffectProperty.isEnabled then + EffectProperty.getItemCount + endif + printlog "Click on button '...' (Options)" + EffectOptions.click + kontext "TabEffect" + if TabEffect.exists(5) then + dialogTest(TabEffect) + Sound.getItemCount + AfterAnimation.getItemCount + printlog "switch to TabPage 'Timing'" + Kontext + active.setPage TabTiming + kontext "TabTiming" + if TabTiming.exists(5) then + dialogTest(TabTiming) + TimingStart.getItemCount + Delay.getText + Speed.getItemCount + Repeat.getItemCount + Rewind.ischecked + TriggerAnimate.isChecked + TriggerStart.isChecked + Shape.getItemCount else - warnlog "Impress:Tasks Pane:Custom Animation:... button didn't work." + warnlog "Impress:Tasks Pane:Custom Animation:Effect Options: Timing TabPage didn't work." endif - Kontext "Tasks" - EffectSpeed.getItemCount - EffectList.getItemCount - EffectPlay.click - printlog "Wait five seconds so the Playfunction has ended " - sleep 5 - EffectSlideShow.click - sleep 1 - kontext "DocumentPresentation" - if DocumentPresentation.exists (5) then - printlog "Presentation started :-)" - DocumentPresentation.typeKeys "<escape>" + printlog "switch to TabPage 'Timing'" + Kontext + active.setPage TabTextAnimation + kontext "TabTextAnimation" + if TabTextAnimation.exists(5) then + dialogTest(TabTextAnimation) + GroupText.getItemCount + AnimateAttachedShape.isChecked + TabTextAnimation.cancel else - warnlog "Impress:Tasks Pane:Custom Animation:Slide Show button doesn't start slideshow!" + warnlog "Impress:Tasks Pane:Custom Animation:Effect Options: TextAnimation TabPage didn't work." endif - kontext "Tasks" - EffectAutomaticPreview.isChecked - printlog "click button 'Remove'" - EffectRemove.click + else + warnlog "Impress:Tasks Pane:Custom Animation:... button didn't work." endif + Kontext "Tasks" + EffectSpeed.getItemCount + EffectList.getItemCount + EffectPlay.click + printlog "Wait five seconds so the Playfunction has ended " + sleep 5 + EffectSlideShow.click + sleep 1 + kontext "DocumentPresentation" + if DocumentPresentation.exists (5) then + printlog "Presentation started :-)" + DocumentPresentation.typeKeys "<escape>" + else + warnlog "Impress:Tasks Pane:Custom Animation:Slide Show button doesn't start slideshow!" + endif + kontext "Tasks" + EffectAutomaticPreview.isChecked + printlog "click button 'Remove'" + EffectRemove.click + endif printlog "close application" Call hCloseDocument - + endcase 'tSlideShowCustomAnimation '------------------------------------------------------------------------------- testcase tSlideShowInteraction @@ -715,5 +730,5 @@ testcase tSlideShowInteraction sleep 2 printlog "close application " Call hCloseDocument - + endcase 'tSlideShowInteraction diff --git a/testautomation/graphics/required/includes/impress/im_011_.inc b/testautomation/graphics/required/includes/impress/im_011_.inc index 876ca7aa9a56..084be5223b10 100644 --- a/testautomation/graphics/required/includes/impress/im_011_.inc +++ b/testautomation/graphics/required/includes/impress/im_011_.inc @@ -31,12 +31,20 @@ '* '\***************************************************************** +sub m_011_ + + call tiDiaLeiste() + +end sub + +'******************************************************************************* + testcase tiDiaLeiste - + ' only in IMPRESS dim sTemp as string Dim i,x as integer - + printlog " open application " Call hNewDocument sleep 1 @@ -46,7 +54,7 @@ testcase tiDiaLeiste MitAktuellerSeite.Uncheck Kontext "ExtrasOptionenDlg" ExtrasOptionenDlg.OK - + printlog " insert a graphic: global\input\graf_inp\desp.bmp) " Printlog "- Insert graphic from file so there is something for the slide mode" hGrafikEinfuegen ConvertPath (gTesttoolPath + "global\input\graf_inp\desp.bmp") @@ -66,19 +74,19 @@ testcase tiDiaLeiste Printlog "- Test blend effect" Kontext "SlideViewObjectbar" ' CORRECT sleep 5 - + if Ueberblendeffekt.GetItemCount <> 57 then warnlog "these are not 57: " + Ueberblendeffekt.GetItemCount printlog " select last entry 'Automatic (random)' in listbox 'Slide Effects' on object toolbar " Ueberblendeffekt.Select (Ueberblendeffekt.GetItemCount) Printlog " select last effect (random effect): " + Ueberblendeffekt.GetSelText - + ' Printlog Geschwindigkeit.GetRT ' 341 listbox ' Printlog Diawechsel.GetRT ' 341 listbox ' Printlog Zeit.GetRT ' 353 spinfield ' Printlog DiasProReihe.GetRT ' 353 spinfield ' Printlog PraesentationMitZeitnahme.GetRT doesn't work, but behave as button ' Printlog DiaAnzeigen.GetRT doesn't work, but behave as button - + '-------------------------------- Geschwindigkeit ----------------------------------------- Printlog "- Check different speed settings" Kontext "SlideViewObjectbar" @@ -116,21 +124,21 @@ testcase tiDiaLeiste sleep 2 Kontext "DocumentPresentation" if DocumentPresentation.exists (5) then - sleep 5 - printlog " wait some seconds and click with mouse " - DocumentPresentation.MouseDown 50,50 - DocumentPresentation.MouseUp 50,50 - sleep 2 - printlog " wait some seconds and click with mouse " - DocumentPresentation.MouseDown 50,50 - DocumentPresentation.MouseUp 50,50 - sleep 3 + sleep 5 + printlog " wait some seconds and click with mouse " + DocumentPresentation.MouseDown 50,50 + DocumentPresentation.MouseUp 50,50 + sleep 2 + printlog " wait some seconds and click with mouse " + DocumentPresentation.MouseDown 50,50 + DocumentPresentation.MouseUp 50,50 + sleep 3 else - warnlog "Didn't switch into presentation mode :-(" + warnlog "Didn't switch into presentation mode :-(" endif Kontext "DocumentPresentation" if DocumentPresentation.exists (5) then - warnlog "We are still in presentation mode :-( WHY!!!!???" + warnlog "We are still in presentation mode :-( WHY!!!!???" endif '------------------------------- Dia anzeigen ja/nein -------------------------------------- Printlog "- Show slide yes/no" @@ -168,5 +176,5 @@ testcase tiDiaLeiste printlog " close application " Call hCloseDocument sleep 2 - + endcase 'tiDiaLeiste diff --git a/testautomation/graphics/tools/id_tools.inc b/testautomation/graphics/tools/id_tools.inc index e71c9f7653f0..2940c0f35e3e 100644 --- a/testautomation/graphics/tools/id_tools.inc +++ b/testautomation/graphics/tools/id_tools.inc @@ -31,45 +31,6 @@ '* '\****************************************************************************** -'Functions: -' #1 hFindSpellHypLanguage -' #1 GetDecimalSeperator -' #1 LiberalMeasurement -' #1 GetMeasUnit -' #1 StrToDouble -' #1 fGetPositionX -' #1 setStartCurrentPage -' #1 fIsDocumentWritable -' #1 fIsDocumentWritable -' #1 fGetSizeXY -' #1 hCallExport -' #1 checkexppdfwaitmax10sec -' #1 fCompareTwoValues -' #1 fConvertBackslashToSlash -' #1 hScreenFontAntialiasing -' #1 fSaveLoadAllFormats -' #1 setCharacterLanguage -' #1 toggleGermanSpellchecking -' #1 sAnalyseContextMenu -' #1 sLongToBinary -' #1 sBinaryToLong -' #1 fGetIntoDictionary -' #1 hSelectInList -' #1 hWalkTheStyles2 -' #1 fGetSlideNumber -' #1 fGetSlideCount -' #1 fGetSlideName -' #1 fGetSetPageBackground -' #1 CreateTextSetEffectAndAngle -' #1 fGetPresentationStyle -' #1 hPrepareSearchBUG -' #1 makeNumOutOfText -' #1 wIgnorierenlisteLoeschen -' #1 optionstest -' #1 optionstest2 - - -'\***************************************************************** function hFindSpellHypLanguage (optional sBooks()) as string printlog "print all available languages that have a language module" dim iListLength as integer @@ -98,8 +59,7 @@ function hFindSpellHypLanguage (optional sBooks()) as string ModuleBearbeiten.Close Kontext "ExtrasOptionenDlg" printlog "close dialog 'Options - '" - ExtrasOptionenDlg.OK - sleep 1 + hCloseDialog( ExtrasOptionenDlg, "ok" ) endif end function @@ -109,7 +69,7 @@ function GetDecimalSeperator ( sDummy$ ) as String printlog "Input : number with fractionmark from 'NumericField' as String " printlog "+ Output: '.' or ',' as String " dim i1, i2 as integer - + printlog "get position of fraction mark / get IT" i1 = instr (sDummy$, ",") i2 = instr (sDummy$, ".") @@ -128,10 +88,10 @@ function LiberalMeasurement ( sShould$, sActual$) as Boolean printlog "+ there are also some rounding errors because of the internal representatio of floating point numbers in computers " printlog "+ now lets try to get rid of them and have a nicer output in tests... " printlog " measurement units are defined in http://gsl.openoffice.org/source/browse/gsl/vcl/source/src/units.src " - + dim iTolerance as Double - LiberalMeasurement = False + LiberalMeasurement = False if (sShould$ = sActual$) then LiberalMeasurement = True @@ -143,12 +103,12 @@ function LiberalMeasurement ( sShould$, sActual$) as Boolean printlog "set factor for liberality" printlog "took units from http://gsl.openoffice.org/source/browse/gsl/vcl/source/src/units.src" select case GetMeasUnit(sShould$) - case "mm", "ミリ", "公厘" : iTolerance = 2.0 '01, 81, 88 - case "cm","センチ","厘米","公分" : iTolerance = 0.5 '01, 81, 86, 88 - case chr$(34) : iTolerance = 2.5 - case "pi","ピクセル" : iTolerance = 2.5 '01, 81 - case "pt", "ポイント" : iTolerance = 2.5 '01, 81 - case "" : iTolerance = 1.5 ' cm is presubposition in old functions + case "mm", "ミリ", "公厘" : iTolerance = 2.0 '01, 81, 88 + case "cm","センチ","厘米","公分" : iTolerance = 0.5 '01, 81, 86, 88 + case chr$(34) : iTolerance = 2.5 + case "pi","ピクセル" : iTolerance = 2.5 '01, 81 + case "pt", "ポイント" : iTolerance = 2.5 '01, 81 + case "" : iTolerance = 1.5 ' cm is presubposition in old functions case else iTolerance = 2.5 qaErrorLog "This Unit is not available in this function. '" + GetMeasUnit(sShould$) + "'" @@ -156,7 +116,7 @@ function LiberalMeasurement ( sShould$, sActual$) as Boolean printlog "have to get the measurem unit, cause the offset is different for each" printlog "!!! val(str()) is important because of double calculating actions !!! #110996#" if ( val(str(StrToDouble(sShould$)+iTolerance)) >= StrToDouble(sActual$) ) AND (val(str(StrToDouble ( sShould$ )-iTolerance)) <= StrToDouble ( sActual$ )) then - LiberalMeasurement = True + LiberalMeasurement = True else LiberalMeasurement = False end if @@ -202,52 +162,54 @@ function StrToDouble ( sWert$ ) as Double printlog "get rid of measure unit, the only single character is '' all others are two chars" printlog "there was a problem, if there is NO meas.unit!!" - if (isNumeric (sWert$) = FALSE) then - if ( StrComp (right (sWert$, 1), chr$(34) ) = 0 ) then - sDummy$ = Left ( sWert$, Len(sWert$)-1 ) - else - sDummy$ = Left ( sWert$, Len(sWert$)-2 ) - endif + if (isNumeric (sWert$) = FALSE) then + if ( StrComp (right (sWert$, 1), chr$(34) ) = 0 ) then + sDummy$ = Left ( sWert$, Len(sWert$)-1 ) else - sDummy$ = sWert$ + sDummy$ = Left ( sWert$, Len(sWert$)-2 ) endif + else + sDummy$ = sWert$ + endif printlog "get position of fraction mark" i1 = instr (sDummy$, ",") ' wrong output i2 = instr (sDummy$, ".") if i1 > i2 then i = i1 else i = i2 - printlog " in front of decimal seperator:" - try - a = val (left (sDummy$,i-1)) - catch + printlog " in front of decimal seperator:" + try + a = val (left (sDummy$,i-1)) + catch 'printlog sWert$ + ":" + sDummy$ + ":" + i + ":" + i1+ ":" + i2 - endcatch - printlog "after the decimal seperator" - n = (len (sDummy$)-i) - b = val (right (sDummy$, n) ) - c = b * 10 ^ -n - 'printlog "-------------- :"+sWert$ +" :'"+a+"' :"+n+" :"+b+" :'"+c+"':" - ' !!! val(str()) is important because of double calculating actions !!! #110996# - StrToDouble = val(str(a + c)) + endcatch + printlog "after the decimal seperator" + n = (len (sDummy$)-i) + b = val (right (sDummy$, n) ) + c = b * 10 ^ -n + 'printlog "-------------- :"+sWert$ +" :'"+a+"' :"+n+" :"+b+" :'"+c+"':" + ' !!! val(str()) is important because of double calculating actions !!! #110996# + StrToDouble = val(str(a + c)) end function '------------------------------------------------------------------------------- function fGetPositionX () as string - fGetPositionX = "" - try - ContextPositionAndSize - catch - warnlog "couldn't call 'ContextPositionAndSize' no object selected ?" - endcatch - kontext - active.SetPage TabPositionAndSize - kontext "TabPositionAndSize" - if TabPositionAndSize.exists (5) then - fGetPositionX = PositionX.GetText - TabPositionAndSize.OK - else - warnlog "Couldn't switch tab page :-( " - endif + fGetPositionX = "" + try + ContextPositionAndSize + + kontext + active.SetPage TabPositionAndSize + kontext "TabPositionAndSize" + if ( TabPositionAndSize.exists( 5 ) ) then + fGetPositionX = PositionX.GetText() + TabPositionAndSize.OK() + else + warnlog( "Couldn't switch to <TabPositionAndSize>" ) + endif + catch + warnlog "couldn't call 'ContextPositionAndSize' no object selected ?" + endcatch + end function '------------------------------------------------------------------------------- @@ -257,173 +219,181 @@ function setStartCurrentPage(optional bState as boolean) as boolean ToolsOptions printlog "+ select in section 'Presentation' tabpage 'general' " hToolsOptions ("IMPRESS","General") - printlog "+ check the checkbox 'Always with current page' " - setStartCurrentPage = MitAktuellerSeite.isChecked - if bState then - MitAktuellerSeite.Check - else - MitAktuellerSeite.UnCheck - endif + printlog "+ check the checkbox 'Always with current page' " + setStartCurrentPage = MitAktuellerSeite.isChecked + if bState then + MitAktuellerSeite.Check + else + MitAktuellerSeite.UnCheck + endif Kontext "ExtrasOptionenDlg" printlog "+ close dialog 'Options - Presenation - General' with OK " - ExtrasOptionenDlg.OK + hCloseDialog( ExtrasOptionenDlg, "ok" ) end function '------------------------------------------------------------------------------- function fIsDocumentWritable() as boolean - printlog " check if a document is writeable" - printlog " <u>parameter:</u>" - printlog " <u>return:</u>" - printlog " true if the document is writeable otherwise false" - Kontext "Standardbar" - if Bearbeiten.GetState(2) <> 1 then - fIsDocumentWritable = false - else - fIsDocumentWritable = true - endif + if Bearbeiten.GetState( 2 ) <> 1 then + fIsDocumentWritable = false + else + fIsDocumentWritable = true + endif end function '------------------------------------------------------------------------------- function fMakeDocumentWritable() as boolean - 'make a document is writeable - 'parameter:</u> - '<u>return:</u> - 'true if the document can make writeable otherwise false + printlog( "Remove write protection from current file" ) Kontext "Standardbar" - sleep (1) - if Bearbeiten.GetState(2) <> 1 then - Bearbeiten.Click - Kontext - if Active.Exists(1) then - Active.Yes - fMakeDocumentWritable = true - else - warnlog "No messagebox after making document editable?" - fMakeDocumentWritable = false - endif - else - printlog "Document is allready writable." + sleep ( 1 ) + if Bearbeiten.GetState(2) <> 1 then + Bearbeiten.Click + Kontext + if Active.Exists(1) then + Active.Yes fMakeDocumentWritable = true + else + warnlog "No messagebox after making document editable?" + fMakeDocumentWritable = false endif - sleep (1) + else + printlog "Document is already writable." + fMakeDocumentWritable = true + endif + end function '------------------------------------------------------------------------------- -function fGetSizeXY (sX as string, sY as string, bGet as boolean) as Boolean - dim sTx as string - dim sTy as string - dim bReturn as boolean - - bReturn = True - try - ContextPositionAndSize - catch - warnlog "couldn't call 'ContextPositionAndSize' no object selected ?" - endcatch - kontext - active.SetPage TabPositionAndSize - kontext "TabPositionAndSize" - if TabPositionAndSize.exists (5) then - sTx = Width.GetText - sTy = Height.GetText - TabPositionAndSize.OK - else - warnlog "Couldn't switch tab page :-( " - endif - if bGet then ' Get the Values only - sY = sTy - sX = sTx - else ' Get the Values and COMPARE them - if (LiberalMeasurement (sX,sTx) <> TRUE) then - warnlog "width is different :-( should: '"+sX+"' is: '"+sTx+"'" + "eventually a result of i35519" - bReturn = False - endif - if (LiberalMeasurement (sY,sTy) <> TRUE) then - warnlog "hight is different :-( should: '"+sY+"' is: '"+sTy+"'" + "eventually a result of i35519" - bReturn = False - endif - bGet = bReturn - endif +function fGetSizeXY (sX as string, sY as string, bRetrieveOnly as boolean) as Boolean + + const RC_FAILURE = -1 + + dim sTx as string + dim sTy as string + + fGetSizeXY() = True + + if ( hUseAsyncSlot( "ContextPositionAndSize" ) <> RC_FAILURE ) then + + kontext + active.SetPage TabPositionAndSize + + kontext "TabPositionAndSize" + if ( TabPositionAndSize.exists( 2 ) ) then + sTx = Width.GetText() + sTy = Height.GetText() + hCloseDialog( TabPositionAndSize, "ok" ) + else + warnlog "Couldn't switch tab page :-( " + endif + + if ( bRetrieveOnly ) then ' Get the Values only + sY = sTy + sX = sTx + else ' Get the Values and compare them + if ( not LiberalMeasurement (sX,sTx) ) then + warnlog "width is different :-( should: '"+sX+"' is: '"+sTx+"'" + "eventually a result of i35519" + fGetSizeXY() = False + endif + if (not LiberalMeasurement (sY,sTy) ) then + warnlog "hight is different :-( should: '"+sY+"' is: '"+sTy+"'" + "eventually a result of i35519" + fGetSizeXY() = False + endif + endif + else + warnlog( "Failed to open <Position And Size> dialog" ) + endif + end function '------------------------------------------------------------------------- -function hCallExport ( HyWhatsYourName as String , sFilter as String, optional bSelection as boolean ) as Boolean - hCallExport = TRUE - Printlog "Will try to select export filter: '" + sFilter + "'" + "" - try - FileExport - catch - Sleep 10 - Warnlog "It takes to much time to export the graphic (>10 sec.). Please check the problem, maybe it's a bug!" - FileExport - endcatch - - Sleep (3) - Kontext "ExportierenDlg" - try - Dateityp.Select sFilter - catch - Warnlog "'" + sFilter + "' is missing!" - dim iAll, counter as integer - iAll = Dateityp.GetItemCount - printlog " List of entries in the menu:" - for counter = 1 to iAll - printlog " " + counter + "/" + iAll + ": " + Dateityp.GetItemText(counter) - next counter - hCallExport = FALSE - ExportierenDlg.Cancel - exit function - endcatch - if ((IsMissing(bSelection) = FALSE) AND (bSelection = TRUE)) then - sleep 2 - Selektion.Check - else - if (Selektion.isEnabled) then - Selektion.UnCheck - endif - endif - - if AutomatischeDateinamenserweiterung.Exists then - QAErrorLog "OBSOLETE: Automatic file extension check-box in file dialog will be removed soon!" - AutomatischeDateinamenserweiterung.check - endif - - Dateiname.SetText ( HyWhatsYourName ) - sleep 2 - Speichern.Click - sleep 2 - kontext "AlienWarning" - if AlienWarning.exists(5) then - warnlog "#i41983# Alien Warning on export not allowed" - AlienWarning.OK - endif - Kontext "Active" - if Active.Exists then Active.Yes - Sleep 3 +function hCallExport ( cFileName as String , sFilter as String, optional bSelection as boolean ) as Boolean + + const RC_FAILURE = -1 + dim bExportSelectionOnly as boolean + + hCallExport() = false + + printlog( "Exporting file with provided filter" ) + + ' Handle infamous optional parameter + if ( IsMissing( bSelection ) ) then + bExportSelectionOnly = false + else + bExportSelectionOnly = bSelection + endif + + if ( hUseAsyncSlot( "FileExport" ) <> RC_FAILURE ) then + + Kontext "ExportierenDlg" + if ( ExportierenDlg.exists( 3 ) ) then + try + Dateityp.Select sFilter + + if ( selektion.exists() ) then + if ( selektion.isEnabled() ) then + if ( bExportSelectionOnly ) then + selektion.check() + else + selektion.unCheck() + endif + else + printlog( "Cannot set <seletion>, it is disabled" ) + endif + else + if ( bExportSelectionOnly ) then + warnlog( "It was requested to export only the current selection but the option is disabled" ) + endif + endif + + AutomatischeDateinamenserweiterung.check() + Dateiname.SetText( cFileName ) + Speichern.Click() + + kontext "AlienWarning" + if AlienWarning.exists(5) then + warnlog "#i41983# Alien Warning on export not allowed" + hCloseDialog( AlienWarning, "ok" ) + endif + + Kontext "Active" + hCloseDialog( Active, "yes,optional" ) + + hCallExport = true + catch + warnlog( "Filter could not be selectd, it might be missing: " & sFilter ) + hCloseDialog( ExportierenDlg, "cancel" ) + endcatch + else + warnlog( "<ExportierenDlg> not open" ) + endif + else + warnlog( "Slot <FileExport> is blocked" ) + endif + end function '------------------------------------------------------------------------- function checkexppdfwaitmax10sec - dim i as integer + dim i as integer kontext "Standardbar" - i = 0 - do - i = i + 1 - sleep 1 - if (ExportAsPDF.isEnabled = TRUE) then i = 15 - loop while ((i < 15)) - if (ExportAsPDF.isEnabled = FALSE) then - Warnlog "ExportAsPDF was NOT ok. Waited " + i + " seconds." - endif - sleep (3) + i = 0 + do + i = i + 1 + sleep 1 + if (ExportAsPDF.isEnabled = TRUE) then i = 15 + loop while ((i < 15)) + if (ExportAsPDF.isEnabled = FALSE) then + Warnlog "ExportAsPDF was NOT ok. Waited " + i + " seconds." + endif + sleep (3) end function '------------------------------------------------------------------------------- @@ -439,21 +409,21 @@ end function '------------------------------------------------------------------------------- function fConvertBackslashToSlash (sInput as string) as string - dim i as integer - dim sTemp as string - dim sI as string - dim x as integer - - sTemp = "" - x = len (sInput) - for i = 1 to x - sI = mid(sInput, i, 1) - if (sI = "\") then - sI = "/" - endif - sTemp = sTemp + sI - next i - fConvertBackslashToSlash = sTemp + dim i as integer + dim sTemp as string + dim sI as string + dim x as integer + + sTemp = "" + x = len (sInput) + for i = 1 to x + sI = mid(sInput, i, 1) + if (sI = "\") then + sI = "/" + endif + sTemp = sTemp + sI + next i + fConvertBackslashToSlash = sTemp end function '------------------------------------------------------------------------------- @@ -477,13 +447,13 @@ function fSaveLoadAllFormats (NewFileDir as String) Dim iFileTypeCounter as Integer Dim SavedFile(30) as String Dim iCounter as Integer - + printlog "Save the document in different formats..." FileSaveAs kontext "ExportierenDlg" For iFileTypeCounter = 1 to Dateityp.GetItemCount sleep (1) - if iFileTypeCounter > 1 then + if iFileTypeCounter > 1 then WaitSlot (2000) FileSaveAs kontext "ExportierenDlg" @@ -524,38 +494,38 @@ function setCharacterLanguage(sLanguage as string) as boolean Kontext Messagebox.SetPage TabFont kontext "TabFont" - sleep 1 - printlog "sLanguage = " + sLanguage - if (bAsianLan) then 'Eastern languages 'OR - try - printlog "LanguageWest.GetSelText = " + LanguageWest.GetSelText - LanguageWest.select (sLanguage) 'East - catch - printlog "Language.GetSelText = " + Language.GetSelText - Language.select (sLanguage) 'East - endcatch + sleep 1 + printlog "sLanguage = " + sLanguage + if (bAsianLan) then 'Eastern languages 'OR + try + printlog "LanguageWest.GetSelText = " + LanguageWest.GetSelText + LanguageWest.select (sLanguage) 'East + catch + printlog "Language.GetSelText = " + Language.GetSelText + Language.select (sLanguage) 'East + endcatch - setCharacterLanguage = TRUE - elseif (iSprache = 07) then + setCharacterLanguage = TRUE + elseif (iSprache = 07) then + printlog "LanguageWest.GetSelText = " + LanguageWest.GetSelText + LanguageWest.select (sLanguage) + else + try printlog "LanguageWest.GetSelText = " + LanguageWest.GetSelText LanguageWest.select (sLanguage) - else - try - printlog "LanguageWest.GetSelText = " + LanguageWest.GetSelText - LanguageWest.select (sLanguage) - catch - printlog "Language.GetSelText = " + Language.GetSelText - Language.select (sLanguage) - endcatch - setCharacterLanguage = TRUE - end if + catch + printlog "Language.GetSelText = " + Language.GetSelText + Language.select (sLanguage) + endcatch + setCharacterLanguage = TRUE + end if TabFont.Ok sleep 1 end function '------------------------------------------------------------------------------- function toggleGermanSpellchecking as string - + printlog " activate old german spellchecking " printlog "+ Tools->Options " ToolsOptions @@ -615,23 +585,23 @@ function sAnalyseContextMenu(iItems as integer, optional iError as long) as inte printlog " If the string vnd.sun.search:SubMenu (the SunSearch-menu) is found in the menu, we'll skip that word. " - 'Get first entry. + 'Get first entry. f = MenuGetItemCommand (MenuGetItemID (1)) printlog "f = '" + f + "'." 'If it's "vnd.sun.search:SubMenu" , then skip the word. Printlog "Word not underlined, Search-Toolbar active." - if f <> "vnd.sun.search:SubMenu" then + if f <> "vnd.sun.search:SubMenu" then try ' WorkAround ## editcopy sCandidates(2) = getClipboardText() - ' printlog "******************* " + getclipboardtext() + ' printlog "******************* " + getclipboardtext() catch sCandidates(2) = "" - ' printlog "###################################################" + ' printlog "###################################################" endcatch ' if (1) is different from nonempty (2) then the wrong word is selected if (sCandidates(1) <> sCandidates(2)) then if ("" <> sCandidates(2)) then - ' printlog "############ " + sCandidates(1) + " ################## " + sCandidates(2) + " #####################" + ' printlog "############ " + sCandidates(1) + " ################## " + sCandidates(2) + " #####################" bDifferent = TRUE iError1 = iError1 + (2^i) else @@ -639,7 +609,7 @@ function sAnalyseContextMenu(iItems as integer, optional iError as long) as inte ' no word is selected... a) not underlined b) no context menu open end if else - ' printlog "******************* " + sCandidates(1) + ' printlog "******************* " + sCandidates(1) bDifferent = FALSE end if ' check if context menu opened @@ -652,11 +622,11 @@ function sAnalyseContextMenu(iItems as integer, optional iError as long) as inte bNoContextMenu = true iError2 = iError2 + (2^i) ' in writer it would work... :-( #i23568# - ' warnlog ""+i+" C: " + x + ";------ " + getClipboardText + " -------- " + ' warnlog ""+i+" C: " + x + ";------ " + getClipboardText + " -------- " endcatch ' if context menu open do.... if (not bNoContextMenu) then - ' printlog ""+i+" C: " + x + ";------ " + getClipboardText + " -------- " + hMenuItemGetText(1) + ' printlog ""+i+" C: " + x + ";------ " + getClipboardText + " -------- " + hMenuItemGetText(1) printlog " analyze context menu entries " for y = 1 to x z = hMenuGetItemId(y) @@ -668,12 +638,12 @@ function sAnalyseContextMenu(iItems as integer, optional iError as long) as inte printlog " close Context Menu " if (iSlot <> 10456) then if (not bDifferent) then ' WorkAround ## - ' qaerrorlog "" + iSlot + " UNDERLINED" + ' qaerrorlog "" + iSlot + " UNDERLINED" iTemp = iTemp + (2^i) end if call hMenuClose() else - ' printlog "" + iSlot + " not underlined" + ' printlog "" + iSlot + " not underlined" 'InsertSpecialCharacterDraw hMenuSelectNr(iSpecialCharacterEntry) ' because of bug #112919# kontext "Sonderzeichen" @@ -756,20 +726,20 @@ function fGetIntoDictionary as boolean dim bFound as boolean dim iBooks as integer dim i as integer - + iBooks = Benutzerwoerterbuch.GetItemCount i=0 bFound=TRUE while (bFound AND (i < iBooks)) - inc i - Benutzerwoerterbuch.select i - printlog Benutzerwoerterbuch.getSelText + i - try - Bearbeiten.Click - bFound = FALSE - catch - printLog "wIgLi" + i - endcatch + inc i + Benutzerwoerterbuch.select i + printlog Benutzerwoerterbuch.getSelText + i + try + Bearbeiten.Click + bFound = FALSE + catch + printLog "wIgLi" + i + endcatch wend fGetIntoDictionary = bFound end function @@ -777,10 +747,10 @@ end function '------------------------------------------------------------------------------- function hSelectInList (window, sEntry as String) as Boolean -printlog " alternativ method to 'hDoubleClickInList' (without mouse) " -printlog "+ window: name of list " -printlog "+ sEntry: string to find in list " -printlog "+ ReturnValue: if found: TRUE; else FALSE " + printlog " alternativ method to 'hDoubleClickInList' (without mouse) " + printlog "+ window: name of list " + printlog "+ sEntry: string to find in list " + printlog "+ ReturnValue: if found: TRUE; else FALSE " Dim i as Integer Dim sTemp as String Dim sLastTemp as String @@ -811,7 +781,7 @@ function hWalkTheStyles2 (atemp) dim itemp dim bSet dim aSettings(5,5) -' dim atemp + ' dim atemp printlog " Organizer " i=1 @@ -833,7 +803,7 @@ function hWalkTheStyles2 (atemp) atemp.check else -' aSettings(i,1).Uncheck + ' aSettings(i,1).Uncheck endif i=2 Kontext @@ -914,33 +884,33 @@ function hWalkTheStyles2 (atemp) Messagebox.setpage TabTabulator Kontext "TabTabulator" -' printlog " switch to tabpage 'Bullets' " -' Messagebox.SetPage TabBullet -' Kontext "TabBullet" -' sleep 1 -' Call DialogTest (TabBullet) -' sleep 1 -' Kontext -' printlog " switch to tabpage 'Numbering Type' " -' Messagebox.SetPage TabNumerierungsart -' Kontext "TabNumerierungsart" -' sleep 1 -' Call DialogTest (TabNumerierungsart) -' sleep 1 -' Kontext -' printlog " switch to tabpage 'Graphics' " -' Messagebox.SetPage TabGrafiken -' Kontext "TabGrafiken" -' sleep 1 -' Call DialogTest (TabGrafiken) -' sleep 1 -' Kontext -' printlog " switch to tabpage 'Customize' " -' Messagebox.SetPage TabOptionenNumerierung -' Kontext "TabOptionenNumerierung" -' sleep 1 -' Call DialogTest (TabOptionenNumerierung) -' sleep 1 + ' printlog " switch to tabpage 'Bullets' " + ' Messagebox.SetPage TabBullet + ' Kontext "TabBullet" + ' sleep 1 + ' Call DialogTest (TabBullet) + ' sleep 1 + ' Kontext + ' printlog " switch to tabpage 'Numbering Type' " + ' Messagebox.SetPage TabNumerierungsart + ' Kontext "TabNumerierungsart" + ' sleep 1 + ' Call DialogTest (TabNumerierungsart) + ' sleep 1 + ' Kontext + ' printlog " switch to tabpage 'Graphics' " + ' Messagebox.SetPage TabGrafiken + ' Kontext "TabGrafiken" + ' sleep 1 + ' Call DialogTest (TabGrafiken) + ' sleep 1 + ' Kontext + ' printlog " switch to tabpage 'Customize' " + ' Messagebox.SetPage TabOptionenNumerierung + ' Kontext "TabOptionenNumerierung" + ' sleep 1 + ' Call DialogTest (TabOptionenNumerierung) + ' sleep 1 end function '------------------------------------------------------------------------------- @@ -960,7 +930,7 @@ function fGetSlideNumber (optional sCompare as integer) as integer ViewNavigator sleep 3 printlog " check in list, if the page changed " - + else printlog "If Navigator is not open, opening it now." ViewNavigator @@ -987,28 +957,28 @@ function fGetSlideCount (optional iCount as integer) as integer printlog "+ output : number of slides in presentation " dim i as integer - printlog " open navigator " - Kontext "Navigator" - if Navigator.exists then - Printlog "Navigator: open :-)" - else - Printlog "Navigator: NOT available :-( will be opened now!" - ViewNavigator - endif - Sleep 1 - printlog " count rows in list of navigator: usually number of slides " - Kontext "NavigatorDraw" - i = Liste.GetItemCount - if (isMissing(iCount) = FALSE) then - if (i <> iCount) then - Warnlog "Error! Expected slides: '" + iCount + "'; but are '" + i +"'" - else - Printlog "ok" - endif - endif - printlog " close navigator " - ViewNavigator - fGetSlideCount = i + printlog " open navigator " + Kontext "Navigator" + if Navigator.exists then + Printlog "Navigator: open :-)" + else + Printlog "Navigator: NOT available :-( will be opened now!" + ViewNavigator + endif + Sleep 1 + printlog " count rows in list of navigator: usually number of slides " + Kontext "NavigatorDraw" + i = Liste.GetItemCount + if (isMissing(iCount) = FALSE) then + if (i <> iCount) then + Warnlog "Error! Expected slides: '" + iCount + "'; but are '" + i +"'" + else + Printlog "ok" + endif + endif + printlog " close navigator " + ViewNavigator + fGetSlideCount = i end function '------------------------------------------------------------------------------- @@ -1021,115 +991,115 @@ function fGetSlideName (optional sCompare as string) as string printlog "+ EXIT: kontext on DocumentPresentation " Kontext "NavigatorDraw" - if NavigatorDraw.exists (5) then - sleep 3 - printlog "check in list, if the page changed" - fGetSlideName = Liste.GetSelText - else - warnlog "Navigator not open! in function fGetSlideName TBO" - Kontext "NavigatorDraw" - fGetSlideName = "" - endif - if (isMissing (sCompare) = False) then ' if optional parameter exists - printlog "fGetSlideName is: " & fGetSlideName - printlog "sCompare is: " & sCompare - if fGetSlideName <> sCompare then - warnlog " Slide Name is '" + fGetSlideName + "'; should be: '" + sCompare + "'" - endif - endif - Kontext "DocumentPresentation" + if NavigatorDraw.exists (5) then + sleep 3 + printlog "check in list, if the page changed" + fGetSlideName = Liste.GetSelText + else + warnlog "Navigator not open! in function fGetSlideName TBO" + Kontext "NavigatorDraw" + fGetSlideName = "" + endif + if (isMissing (sCompare) = False) then ' if optional parameter exists + printlog "fGetSlideName is: " & fGetSlideName + printlog "sCompare is: " & sCompare + if fGetSlideName <> sCompare then + warnlog " Slide Name is '" + fGetSlideName + "'; should be: '" + sCompare + "'" + endif + endif + Kontext "DocumentPresentation" end function '------------------------------------------------------------------------------ function fGetSetPageBackground (iSelect as integer, iWhere as integer) as integer - + printlog " Get or Set the Page Background via stylist (iWhere = 0) or format menue (...= 1) " printlog "+ if iSelect > 0 then set, else get " printlog "+ return selected color number or -1 on error " if (iWhere = 0) then - printlog " Stylist -> Background -> Kontext menu -> modify -> Area -> Color " - fGetSetPageBackground = -1 ' worst case - Kontext "Stylist" - if Stylist.NotExists (5) then - FormatStylist + printlog " Stylist -> Background -> Kontext menu -> modify -> Area -> Color " + fGetSetPageBackground = -1 ' worst case Kontext "Stylist" - if Stylist.NotExists (5) then warnlog "Could not open stylist :-(" - end if - Praesentationsvorlagen.Click - sleep 1 - Vorlagenliste.TypeKeys "<PAGEDOWN>" - hDoubleClickInList (vorlagenliste, glLocale(5), TRUE) - sleep 1 - vorlagenliste.OpenContextMenu - sleep 1 - hMenuSelectNr (1) - else - printlog " Format -> Page -> Background -> Color "'FormatPage - sleep 1 - try ' this was just paranoia to find a not mentioned messagebox - FormatSlideDraw + if Stylist.NotExists (5) then + FormatStylist + Kontext "Stylist" + if Stylist.NotExists (5) then warnlog "Could not open stylist :-(" + end if + Praesentationsvorlagen.Click + sleep 1 + Vorlagenliste.TypeKeys "<PAGEDOWN>" + hDoubleClickInList (vorlagenliste, glLocale(5), TRUE) + sleep 1 + vorlagenliste.OpenContextMenu + sleep 1 + hMenuSelectNr (1) + else + printlog " Format -> Page -> Background -> Color "'FormatPage + sleep 1 + try ' this was just paranoia to find a not mentioned messagebox + FormatSlideDraw catch - warnlog "slooooow slot TBO :-(" - exit function - endcatch - sleep 1 - Kontext - if (active.getrt = 373) then - Active.SetPage TabArea - else - warnlog active.getrt - if (active.getrt = 304) then - warnlog active.gettext - endif - endif ' paranoia end ---------------------------------------------- - endif - - kontext "TabArea" - if TabArea.exists then - FillOptions.Select 2 ' Select "Colour" - if (iSelect > 1) then ' Select the entry -' Color.Check - if (iSelect < ColourList.GetItemCount) then - ColourList.Select iSelect - else - warnlog "Select entry is larger than list :-(" - endif - fGetSetPageBackground = ColourList.GetSelIndex - if fGetSetPageBackground = 0 then - warnlog "There were no color selected in the list." - endif - TabArea.OK - sleep 2 - kontext - if (active.exists (2)) then - warnlog "active about <changing the background for all pages ?>: '" + active.gettext + "'" - active.yes - else - printlog "No message about 'changing the background for all pages ?' :-(" - endif - else ' yust read the selected entry - if FillOptions.GetSelIndex = 2 then + warnlog "slooooow slot TBO :-(" + exit function + endcatch + sleep 1 + Kontext + if (active.getrt = 373) then + Active.SetPage TabArea + else + warnlog active.getrt + if (active.getrt = 304) then + warnlog active.gettext + endif + endif ' paranoia end ---------------------------------------------- + endif + + kontext "TabArea" + if TabArea.exists then + FillOptions.Select 2 ' Select "Colour" + if (iSelect > 1) then ' Select the entry + ' Color.Check + if (iSelect < ColourList.GetItemCount) then + ColourList.Select iSelect + else + warnlog "Select entry is larger than list :-(" + endif fGetSetPageBackground = ColourList.GetSelIndex - TabArea.Cancel - else - warnlog "Can't get value, because something different than color is selected :-(" - endif - endif - else - kontext "TabFont" - if TabFont.exists then - Warnlog "Something wrong with the word " + glLocale(5) + ". It was either not found or wrong." - else - warnlog "Error: Can't get context menu ?" - endif - endif - - if (iWhere = 0) then + if fGetSetPageBackground = 0 then + warnlog "There were no color selected in the list." + endif + TabArea.OK + sleep 2 + kontext + if (active.exists (2)) then + warnlog "active about <changing the background for all pages ?>: '" + active.gettext + "'" + active.yes + else + printlog "No message about 'changing the background for all pages ?' :-(" + endif + else ' yust read the selected entry + if FillOptions.GetSelIndex = 2 then + fGetSetPageBackground = ColourList.GetSelIndex + TabArea.Cancel + else + warnlog "Can't get value, because something different than color is selected :-(" + endif + endif + else + kontext "TabFont" + if TabFont.exists then + Warnlog "Something wrong with the word " + glLocale(5) + ". It was either not found or wrong." + else + warnlog "Error: Can't get context menu ?" + endif + endif + + if (iWhere = 0) then sleep 1 ' ABSOLUT NECESSARY !!! (TBO) else crash on UNIX on following command!!!! FormatStylist ' closing - endif - sleep 4 + endif + sleep 4 end function '------------------------------------------------------------------------------ @@ -1139,31 +1109,31 @@ function CreateTextSetEffectAndAngle SetClipBoard "Revenue" DocumentImpress.TypeKeys "<MOD1 V>" SlideShowCustomAnimation - Kontext "Tasks" - WaitSlot (1000) - EffectAdd.Click - kontext - printlog " Switch to TabPage: Entrance " - active.setPage(TabEntrance) - kontext "TabEntrance" - if TabEntrance.exists(5) then - printlog " select in the listbox 'Effects' the second entry" - Effects.select (24) - printlog " select speed 'Fast' -> fourth item in list " - Speed.Select 2 - TabEntrance.OK - end if - kontext "tasks" - EffectStart.TypeKeys "<HOME><DOWN>" 'Select the second entry. + Kontext "Tasks" + WaitSlot (1000) + EffectAdd.Click + kontext + printlog " Switch to TabPage: Entrance " + active.setPage(TabEntrance) + kontext "TabEntrance" + if TabEntrance.exists(5) then + printlog " select in the listbox 'Effects' the second entry" + Effects.select (24) + printlog " select speed 'Fast' -> fourth item in list " + Speed.Select 2 + TabEntrance.OK + end if + kontext "tasks" + EffectStart.TypeKeys "<HOME><DOWN>" 'Select the second entry. - kontext "DocumentImpress" - FormatPositionAndSize - WaitSlot (1000) - kontext - active.setPage(TabDrehung) - kontext "TabDrehung" + kontext "DocumentImpress" + FormatPositionAndSize + WaitSlot (1000) + kontext + active.setPage(TabDrehung) + kontext "TabDrehung" - Winkel.TypeKeys "45" + Winkel.TypeKeys "45" TabDrehung.OK WaitSlot (1000) kontext "DocumentImpress" @@ -1177,29 +1147,29 @@ function fGetPresentationStyle (optional sCompare as integer) as integer printlog "+ RETURN: LAST CHARACTER of the actual selected style in the stylist " dim sTemp as integer dim sTemp0 as string - + sTemp = (-1) printlog " open stylist if not already open: Format->Stylist " kontext "Stylist" if (Stylist.exists = FALSE) then - try - FormatStylist - catch - sleep 1 - endcatch + try + FormatStylist + catch + sleep 1 + endcatch endif kontext "Stylist" if Stylist.exists(5) then - sTemp0 = Vorlagenliste.GetSeltext - sTemp = val(right (sTemp0, 1)) - if (isMissing (sCompare) = False) then ' if optional parameter exists - if sTemp <> sCompare then - Warnlog "Style Name's last character is '" + sTemp + "'; should be: '" + sCompare + "'" - endif - endif - FormatStylist + sTemp0 = Vorlagenliste.GetSeltext + sTemp = val(right (sTemp0, 1)) + if (isMissing (sCompare) = False) then ' if optional parameter exists + if sTemp <> sCompare then + Warnlog "Style Name's last character is '" + sTemp + "'; should be: '" + sCompare + "'" + endif + endif + FormatStylist else - Warnlog "The Stylist could not be opened for unknown reasons :-(" + Warnlog "The Stylist could not be opened for unknown reasons :-(" endif fGetPresentationStyle = sTemp end function @@ -1243,23 +1213,23 @@ function wIgnorierenlisteLoeschen as boolean exit function end if Kontext "BenutzerwoerterbuchBearbeiten" - sleep 1 - iBooks = Buch.GetItemCount - for i = 1 to iBooks - Buch.Select i - if Left$(Buch.GetSelText,13)="IgnoreAllList" then - sleep 2 - while (Loeschen.IsEnabled) - Loeschen.Click - sleep 1 - wend - end if - next i + sleep 1 + iBooks = Buch.GetItemCount + for i = 1 to iBooks + Buch.Select i + if Left$(Buch.GetSelText,13)="IgnoreAllList" then + sleep 2 + while (Loeschen.IsEnabled) + Loeschen.Click + sleep 1 + wend + end if + next i Kontext "BenutzerwoerterbuchBearbeiten" - BenutzerwoerterbuchBearbeiten.Cancel + BenutzerwoerterbuchBearbeiten.Cancel Kontext "ExtrasOptionenDlg" - ExtrasOptionenDlg.OK - wIgnorierenlisteLoeschen = TRUE + ExtrasOptionenDlg.OK + wIgnorierenlisteLoeschen = TRUE end function '------------------------------------------------------------------------------- @@ -1278,121 +1248,121 @@ function optionstest dim etshap as integer dim etgt as integer - Kontext "Tasks" - EffectOptions.Click - kontext "TabEffect" - if TabEffect.Exists(5) then - optsound = Sound.GetItemCount - for os = 1 to optsound - Sound.Select os - kontext "OeffnenDlg" - if OeffnenDlg.Exists (5) then - filedialogue = TRUE - OeffnenDlg.Close - kontext "TabEffect" - else - kontext "TabEffect" - endif - next os - if AfterAnimation.isEnabled AND AfterAnimation.isVisible then - for oa = 1 to AfterAnimation.GetItemCount - AfterAnimation.Select oa - if DimColor.isEnabled then - for odc = 1 to DimColor.GetItemCount - DimColor.Select odc - next odc - endif - if DelayBetweenCharacters.isEnabled then - for odc = 1 to DelayBetweenCharacters.GetItemCount - DelayBetweenCharacters.Select odc - next odc - endif - next oa - else - if DelayBetweenCharacters.isEnabled then - for odc = 1 to DelayBetweenCharacters.GetItemCount - DelayBetweenCharacters.Select odc - next odc - endif - endif - for ota = 1 to TextAnimation.GetItemCount - TextAnimation.Select ota - next ota - printlog " switch to TabPage 'Timing' " - Kontext - Active.SetPage TabTiming - kontext "TabTiming" - if TabTiming.Exists(5) then - for ets = 1 to TimingStart.GetItemCount - TimingStart.Select ets - next ets - if Delay.isVisible AND Delay.isEnabled then - Delay.GetText - else - Warnlog "Delay in Effect Options were not to be found." - endif - if Speed.isVisible AND Speed.isEnabled then - for etspeed = 1 to Speed.GetItemCount - Speed.Select etspeed - next etspeed - else - printlog " No Speed-entry for this effect." - endif - if Repeat.isVisible AND Repeat.isEnabled then - for etrep = 1 to Speed.GetItemCount - Repeat.Select etrep - next etrep - else - Printlog "Repeat in Effect Options were not to be found." - endif - Rewind.Check - Rewind.UnCheck - TriggerAnimate.IsChecked - TriggerStart.IsChecked - if Shape.isVisible AND Shape.isEnabled then - for etshap = 1 to Shape.GetItemCount - Shape.Select etshap - next etshap - else - Warnlog "Shape in Effect Options were not to be found." - endif - else - warnlog "Impress:Tasks Pane:Custom Animation:Effect Options: Timing TabPage didn't work." - endif - printlog " switch to TabPage 'Timing' " - Kontext - active.setPage TabTextAnimation - kontext "TabTextAnimation" - if TabTextAnimation.Exists(5) then - lala = GroupText.GetItemCount - for etgt = 1 to lala - GroupText.Select etgt - if AutomaticallyAfter.IsEnabled then - AutomaticallyAfter.Check - AutomaticallyAfter.TypeKeys "<UP>" - endif - if AnimateAttachedShape.IsEnabled then - AnimateAttachedShape.Check - if AnimateAttachedShape.IsChecked = FALSE then + Kontext "Tasks" + EffectOptions.Click + kontext "TabEffect" + if TabEffect.Exists(5) then + optsound = Sound.GetItemCount + for os = 1 to optsound + Sound.Select os + kontext "OeffnenDlg" + if OeffnenDlg.Exists (5) then + filedialogue = TRUE + OeffnenDlg.Close + kontext "TabEffect" + else + kontext "TabEffect" + endif + next os + if AfterAnimation.isEnabled AND AfterAnimation.isVisible then + for oa = 1 to AfterAnimation.GetItemCount + AfterAnimation.Select oa + if DimColor.isEnabled then + for odc = 1 to DimColor.GetItemCount + DimColor.Select odc + next odc + endif + if DelayBetweenCharacters.isEnabled then + for odc = 1 to DelayBetweenCharacters.GetItemCount + DelayBetweenCharacters.Select odc + next odc + endif + next oa + else + if DelayBetweenCharacters.isEnabled then + for odc = 1 to DelayBetweenCharacters.GetItemCount + DelayBetweenCharacters.Select odc + next odc + endif + endif + for ota = 1 to TextAnimation.GetItemCount + TextAnimation.Select ota + next ota + printlog " switch to TabPage 'Timing' " + Kontext + Active.SetPage TabTiming + kontext "TabTiming" + if TabTiming.Exists(5) then + for ets = 1 to TimingStart.GetItemCount + TimingStart.Select ets + next ets + if Delay.isVisible AND Delay.isEnabled then + Delay.GetText + else + Warnlog "Delay in Effect Options were not to be found." + endif + if Speed.isVisible AND Speed.isEnabled then + for etspeed = 1 to Speed.GetItemCount + Speed.Select etspeed + next etspeed + else + printlog " No Speed-entry for this effect." + endif + if Repeat.isVisible AND Repeat.isEnabled then + for etrep = 1 to Speed.GetItemCount + Repeat.Select etrep + next etrep + else + Printlog "Repeat in Effect Options were not to be found." + endif + Rewind.Check + Rewind.UnCheck + TriggerAnimate.IsChecked + TriggerStart.IsChecked + if Shape.isVisible AND Shape.isEnabled then + for etshap = 1 to Shape.GetItemCount + Shape.Select etshap + next etshap + else + Warnlog "Shape in Effect Options were not to be found." + endif + else + warnlog "Impress:Tasks Pane:Custom Animation:Effect Options: Timing TabPage didn't work." + endif + printlog " switch to TabPage 'Timing' " + Kontext + active.setPage TabTextAnimation + kontext "TabTextAnimation" + if TabTextAnimation.Exists(5) then + lala = GroupText.GetItemCount + for etgt = 1 to lala + GroupText.Select etgt + if AutomaticallyAfter.IsEnabled then + AutomaticallyAfter.Check + AutomaticallyAfter.TypeKeys "<UP>" + endif + if AnimateAttachedShape.IsEnabled then + AnimateAttachedShape.Check + if AnimateAttachedShape.IsChecked = FALSE then Warnlog "AnimateAttachedShape should have been checked" - endif - endif - if InreverseOrder.IsEnabled then - InreverseOrder.Check - if InreverseOrder.IsChecked = FALSE then + endif + endif + if InreverseOrder.IsEnabled then + InreverseOrder.Check + if InreverseOrder.IsChecked = FALSE then Warnlog "InreverseOrder should have been checked" - endif - endif - next etgt - TabTextAnimation.Cancel - else - warnlog "Impress:Tasks Pane:Custom Animation:Effect Options: TextAnimation TabPage didn't work." - endif + endif + endif + next etgt + TabTextAnimation.Cancel else - warnlog "Impress:Tasks Pane:Custom Animation:... button didn't work." + warnlog "Impress:Tasks Pane:Custom Animation:Effect Options: TextAnimation TabPage didn't work." endif - Kontext "Tasks" - + else + warnlog "Impress:Tasks Pane:Custom Animation:... button didn't work." + endif + Kontext "Tasks" + end function '------------------------------------------------------------------------------- @@ -1411,124 +1381,124 @@ function optionstest2 dim etshap as integer dim etgt as integer - Kontext "Tasks" - EffectOptions.Click - kontext "TabEffect" - if TabEffect.Exists(5) then - Sound.Select 5 - sleep 4 - if Play.IsEnabled then - Play.Click - else - warnlog "Play should have been enabled after selecting a sound." - endif - AfterAnimation.Select 2 - if DimColor.isEnabled then - DimColor.Select 5 - else - Warnlog "DimColor should have been enabled" - endif - TextAnimation.Select 3 - if DelayBetweenCharacters.isEnabled then - DelayBetweenCharacters.More 5 - else - Warnlog "DelayBetweenCharacters should have been enabled" - endif - printlog " switch to TabPage 'Timing' " - Kontext - Active.SetPage TabTiming - kontext "TabTiming" - if TabTiming.Exists(5) then - TimingStart.Select 2 - if Delay.isVisible AND Delay.isEnabled then - Delay.More 5 - else - Warnlog "Delay in Effect Options were not to be found." - endif - if Speed.isVisible AND Speed.isEnabled then - Speed.Select 3 - else - Printlog "Speed in Effect Options were not to be found." - endif - if Repeat.isVisible then - if Repeat.isEnabled then + Kontext "Tasks" + EffectOptions.Click + kontext "TabEffect" + if TabEffect.Exists(5) then + Sound.Select 5 + sleep 4 + if Play.IsEnabled then + Play.Click + else + warnlog "Play should have been enabled after selecting a sound." + endif + AfterAnimation.Select 2 + if DimColor.isEnabled then + DimColor.Select 5 + else + Warnlog "DimColor should have been enabled" + endif + TextAnimation.Select 3 + if DelayBetweenCharacters.isEnabled then + DelayBetweenCharacters.More 5 + else + Warnlog "DelayBetweenCharacters should have been enabled" + endif + printlog " switch to TabPage 'Timing' " + Kontext + Active.SetPage TabTiming + kontext "TabTiming" + if TabTiming.Exists(5) then + TimingStart.Select 2 + if Delay.isVisible AND Delay.isEnabled then + Delay.More 5 + else + Warnlog "Delay in Effect Options were not to be found." + endif + if Speed.isVisible AND Speed.isEnabled then + Speed.Select 3 + else + Printlog "Speed in Effect Options were not to be found." + endif + if Repeat.isVisible then + if Repeat.isEnabled then for etrep = 1 to Speed.GetItemCount Repeat.Select etrep next etrep - else + else Warnlog "Repeat in Effect Options were not enabled." - endif - else - Warnlog "Repeat in Effect Options were not visible." - endif - if Rewind.isVisible then - if Rewind.isEnabled then + endif + else + Warnlog "Repeat in Effect Options were not visible." + endif + if Rewind.isVisible then + if Rewind.isEnabled then Rewind.Check - else + else Printlog "Rewind in Effect Options were not to be found." - endif - else - Printlog "Rewind in Effect Options were not to be found." - endif - if Rewind.isVisible then - if Rewind.isEnabled then + endif + else + Printlog "Rewind in Effect Options were not to be found." + endif + if Rewind.isVisible then + if Rewind.isEnabled then Rewind.Check Rewind.UnCheck - else + else Warnlog "Rewind in Effect Options were not enabled." - endif - else - Warnlog "Rewind in Effect Options were not visible." - endif - TriggerAnimate.IsChecked - TriggerStart.IsChecked - if Shape.isVisible then - if Shape.isEnabled then + endif + else + Warnlog "Rewind in Effect Options were not visible." + endif + TriggerAnimate.IsChecked + TriggerStart.IsChecked + if Shape.isVisible then + if Shape.isEnabled then for etshap = 1 to Shape.GetItemCount Shape.Select etshap next etshap - else + else Warnlog "Shape in Effect Options were not to be found." - endif - else - Warnlog "Shape in Effect Options were not to be found." - endif - else - warnlog "Impress:Tasks Pane:Custom Animation:Effect Options: Timing TabPage didn't work." - endif - printlog " switch to TabPage 'Timing' " - Kontext - active.setPage TabTextAnimation - kontext "TabTextAnimation" - if TabTextAnimation.Exists(5) then - lala = GroupText.GetItemCount - for etgt = 1 to lala - GroupText.Select etgt - if AutomaticallyAfter.IsEnabled then - AutomaticallyAfter.Check - AutomaticallyAfter.TypeKeys "<UP>" - endif - if AnimateAttachedShape.IsEnabled then - AnimateAttachedShape.Check - if AnimateAttachedShape.IsChecked = FALSE then + endif + else + Warnlog "Shape in Effect Options were not to be found." + endif + else + warnlog "Impress:Tasks Pane:Custom Animation:Effect Options: Timing TabPage didn't work." + endif + printlog " switch to TabPage 'Timing' " + Kontext + active.setPage TabTextAnimation + kontext "TabTextAnimation" + if TabTextAnimation.Exists(5) then + lala = GroupText.GetItemCount + for etgt = 1 to lala + GroupText.Select etgt + if AutomaticallyAfter.IsEnabled then + AutomaticallyAfter.Check + AutomaticallyAfter.TypeKeys "<UP>" + endif + if AnimateAttachedShape.IsEnabled then + AnimateAttachedShape.Check + if AnimateAttachedShape.IsChecked = FALSE then Warnlog "AnimateAttachedShape should have been checked" - endif - endif - if InreverseOrder.IsEnabled then - InreverseOrder.Check - if InreverseOrder.IsChecked = FALSE then + endif + endif + if InreverseOrder.IsEnabled then + InreverseOrder.Check + if InreverseOrder.IsChecked = FALSE then Warnlog "InreverseOrder should have been checked" - endif - endif - next etgt - TabTextAnimation.Cancel - else - warnlog "Impress:Tasks Pane:Custom Animation:Effect Options: TextAnimation TabPage didn't work." - endif + endif + endif + next etgt + TabTextAnimation.Cancel else - warnlog "Impress:Tasks Pane:Custom Animation:... button didn't work." + warnlog "Impress:Tasks Pane:Custom Animation:Effect Options: TextAnimation TabPage didn't work." endif - Kontext "Tasks" - + else + warnlog "Impress:Tasks Pane:Custom Animation:... button didn't work." + endif + Kontext "Tasks" + end function '------------------------------------------------------------------------------- diff --git a/testautomation/graphics/tools/id_tools_2.inc b/testautomation/graphics/tools/id_tools_2.inc index 681a5ec7161a..e2d1a1497e9a 100644 --- a/testautomation/graphics/tools/id_tools_2.inc +++ b/testautomation/graphics/tools/id_tools_2.inc @@ -31,58 +31,6 @@ '* '\****************************************************************************** -'Subs: -' #1 sFileExport -' #1 callAutocorrectOptions -' #1 sCheckCheck -' #1 sCheckUnderlined -' #1 sCheckSupperscript -' #1 sCheckDash -' #1 sPrintCheckOrder -' #1 writertest -' #1 calctest -' #1 tClipboardFromDrawTest -' #1 Select_Copy -' #1 SaveMeasurementSetFirst -' #1 MeasurementSetFirst -' #1 ResetMeasurement -' #1 SetKontextApplication -' #1 hSetSpellHypLanguage -' #1 hTBOtypeInDoc -' #1 Position_Vergleichen -' #1 g_demoguide -' #1 sFormatTextDrawAnimation -' #1 mouseclickinpresentation -' #1 im_002_ -' #1 im_003_ -' #1 im_004_ -' #1 im_005_ -' #1 im_007_ -' #1 im_011_ -' #1 D_002_ -' #1 D_003_ -' #1 D_005_ -' #1 d_007 -' #1 hOpenGallery -' #1 LoadGraphic -' #1 CheckGraphic -' #1 GetOnlyGraphics -' #1 tSettingsToCM -' #1 tResetSettings -' #1 id_001 -' #1 id_002 -' #1 id_003 -' #1 id_004 -' #1 id_005 -' #1 id_006 -' #1 id_007 -' #1 id_008 -' #1 id_009 -' #1 id_011 -' #1 hWalkTheStyles - -'\***************************************************************** - sub sFileExport printlog " just exporting is done in qatesttool/framework/first test: 'tGraphicExport' but there is no loading, " @@ -90,11 +38,11 @@ sub sFileExport Dim ExZaehler as Integer Dim ExPath as String Dim Liste( 50 ) as String - - if (gApplication = "IMPRESS") then - ExtensionString = "odp" + + if (gApplication = "IMPRESS") then + ExtensionString = "odp" else - ExtensionString = "odg" + ExtensionString = "odg" end if printlog "- all files are saved in [StarOfficePath]/user/work/[application]/export " @@ -102,19 +50,19 @@ sub sFileExport OutputGrafikTBO = ExPath & "expo" Printlog "Create the export-dir for the graphics ( + ExPath + )" try - app.mkDir ( ExPath ) - ExZaehler = GetFileList ( ExPath , "*.*" , Liste() ) - if ExZaehler <> 0 then - Printlog "The export-dir exists. The test want to delete all Files ( " + ExZaehler + " )!" - if KillFileList ( Liste() ) = FALSE then - Warnlog "Not all files can be deleted. " + ListCount ( Liste() ) + " files exists!" - end if - end if + app.mkDir ( ExPath ) + ExZaehler = GetFileList ( ExPath , "*.*" , Liste() ) + if ExZaehler <> 0 then + Printlog "The export-dir exists. The test want to delete all Files ( " + ExZaehler + " )!" + if KillFileList ( Liste() ) = FALSE then + Warnlog "Not all files can be deleted. " + ListCount ( Liste() ) + " files exists!" + end if + end if catch - Warnlog "An error at creating the export-dir, the test ends!" - exit sub + Warnlog "An error at creating the export-dir, the test ends!" + exit sub endcatch - + printlog "+ open the test document qatesttool/graphics/required/input/graphicexport.od ? ] " end sub @@ -134,22 +82,22 @@ sub sCheckCheck (i, Pruefung$, bEnabled) hTextrahmenErstellen (Pruefung$,20,20,60,40) select case i -' Disabled sCheckUnderlined due to start of external program (web-browser) - FHA - case 5: bEnabled 'sCheckUnderlined (bEnabled) - case 6: sCheckDash (bEnabled) - case 8: sCheckSupperscript (bEnabled) - case else: - hTypeKeys "<Home><Shift End>" - EditCopy - if (GetClipboardText = Pruefung$) then ' not replaced - if bEnabled then ' not as expected - warnlog "- replacement failed" - endif - else ' replaced - if not bEnabled then ' not as expected - warnlog "- replacement failed : '" + Pruefung$ + "' - '" + GetClipboardText + "'" - endif + ' Disabled sCheckUnderlined due to start of external program (web-browser) - FHA + case 5: bEnabled 'sCheckUnderlined (bEnabled) + case 6: sCheckDash (bEnabled) + case 8: sCheckSupperscript (bEnabled) + case else: + hTypeKeys "<Home><Shift End>" + EditCopy + if (GetClipboardText = Pruefung$) then ' not replaced + if bEnabled then ' not as expected + warnlog "- replacement failed" endif + else ' replaced + if not bEnabled then ' not as expected + warnlog "- replacement failed : '" + Pruefung$ + "' - '" + GetClipboardText + "'" + endif + endif end select hTypeKeys "<Home><Shift End><Delete>" @@ -207,65 +155,65 @@ end sub '------------------------------------------------------------------------------- sub sPrintCheckOrder (optional bcheck as boolean) - dim sTemp as string - dim sTemp2 as string - dim i as integer - printlog " deselect all " - Printlog "-----------------------------------" - printlog " select in default order and take Position X in mind ;-) " - hTypeKeys ("<escape><escape>") - for i = 1 to 3 - hTypeKeys ("<TAB>") - sTemp = fGetPositionX() - Printlog " - " + i +": " + sTemp - if ((isMissing(bcheck) <> FALSE) AND (bcheck = TRUE)) then - Select Case i + dim sTemp as string + dim sTemp2 as string + dim i as integer + printlog " deselect all " + Printlog "-----------------------------------" + printlog " select in default order and take Position X in mind ;-) " + hTypeKeys ("<escape><escape>") + for i = 1 to 3 + hTypeKeys ("<TAB>") + sTemp = fGetPositionX() + Printlog " - " + i +": " + sTemp + if ((isMissing(bcheck) <> FALSE) AND (bcheck = TRUE)) then + Select Case i Case 1: sTemp2 = Ueber_Text_1 Case 2: sTemp2 = Ueber_Text_2 Case 3: sTemp2 = Ueber_Text_3 - End Select - if sTemp <> sTemp2 then - warnlog " + " + i + " Arrangement is wrong; is: "+sTemp+"; should: "+sTemp2+";" - end if - endif - next i - hTypeKeys ("<escape><escape>") - Printlog "-----------------------------------" + End Select + if sTemp <> sTemp2 then + warnlog " + " + i + " Arrangement is wrong; is: "+sTemp+"; should: "+sTemp2+";" + end if + endif + next i + hTypeKeys ("<escape><escape>") + Printlog "-----------------------------------" end sub '--------------------------- Tests for Writer ---------------------------------- sub writertest - try - call Make_And_Check_Formatted_Text_Line_From_Application - catch - warnlog "Something went wrong with testing writertest" - endcatch - - try - call Make_Rectangle_From_Application - call Full_test_Draw - call Full_test_Impress - call Full_test_Writer - call Full_test_Calc - catch - warnlog "something wrong with testing writertest" - endcatch + try + call Make_And_Check_Formatted_Text_Line_From_Application + catch + warnlog "Something went wrong with testing writertest" + endcatch + + try + call Make_Rectangle_From_Application + call Full_test_Draw + call Full_test_Impress + call Full_test_Writer + call Full_test_Calc + catch + warnlog "something wrong with testing writertest" + endcatch end sub ' big one '---------------------------- Tests for Calc ----------------------------------- sub calctest -try - call Make_Rectangle_From_Application - call Full_test_Draw - call Full_test_Impress - call Full_test_Writer - call Full_test_Calc -catch - warnlog "something wrong with calctest" -endcatch - printlog "currently no specific tests from Calc" + try + call Make_Rectangle_From_Application + call Full_test_Draw + call Full_test_Impress + call Full_test_Writer + call Full_test_Calc + catch + warnlog "something wrong with calctest" + endcatch + printlog "currently no specific tests from Calc" end sub '------------------------------------------------------------------------------- @@ -274,146 +222,116 @@ sub tClipboardFromDrawTest EnableQAErrors = false FromApp2 = gApplication printlog "gApplication = " + gApplication + + select case( gApplication ) + case "WRITER" : call writertest() + case "CALC" : call calctest() + case else : warnlog( "Unsupported gApplication provided: " & gApplication ) + end select - if gApplication = "WRITER" then - call writertest - exit sub - end if - - if gApplication = "CALC" then - call calctest - exit sub - end if end sub '------------------------------------------------------------------------------- sub Select_Copy - printlog " Select and copy " - Sleep 10 - if gApplication = "DRAW" then - EditSelectAll - printlog " We just ran EditSelectAll - Application is Draw" - end if - if gApplication = "IMPRESS" then - EditSelectAll - printlog " We just ran EditSelectAll - Application is Impress" - end if - Sleep 2 - EditCopy - Sleep 2 - printlog " Copied object" + hUseAsyncSlot( "EditSelectAll" ) + hUseAsyncSlot( "EditCopy" ) + end Sub '------------------------------------------------------------------------------- sub SaveMeasurementSetFirst - if (gApplication = "DRAW") then - sApplication = "DRAWING" - elseIf (gApplication = "IMPRESS") then - sApplication = "IMPRESS" - elseIf (gApplication = "WRITER") then - sApplication = "WRITER" - elseIf (gApplication = "CALC") then - sApplication = "CALC" - endif + select case( gApplication ) + case "DRAW" : sApplication = "DRAWING" + case "IMPRESS" : sApplication = "IMPRESS" + case "WRITER" : sApplication = "WRITER" + case "CALC" : sApplication = "CALC" + case else : printlog( "Provided gApplication is not supported: " & gApplication ) + end select + printlog " - save states " ToolsOptions - hToolsOptions (sApplication,"General") - ReferenceOld = Masseinheit.GetSelText - Masseinheit.TypeKeys= "<HOME>" '(first entry) - ReferenceNew = Masseinheit.GetSelText - Kontext "ExtrasOptionenDlg" - ExtrasOptionenDlg.OK + hToolsOptions (sApplication,"General") + ReferenceOld = Masseinheit.GetSelText + Masseinheit.TypeKeys= "<HOME>" '(first entry) + ReferenceNew = Masseinheit.GetSelText + Kontext "ExtrasOptionenDlg" + hCloseDialog( ExtrasOptionenDlg, "ok" ) + end Sub '------------------------------------------------------------------------------- sub MeasurementSetFirst dim f as integer - if (gApplication = "DRAW") then - sApplication = "DRAWING" - elseIf (gApplication = "IMPRESS") then - sApplication = "IMPRESS" - elseIf (gApplication = "WRITER") then - sApplication = "WRITER" - elseIf (gApplication = "CALC") then - sApplication = "CALC" - endif + + select case( gApplication ) + case "DRAW" : sApplication = "DRAWING" + case "IMPRESS" : sApplication = "IMPRESS" + case "WRITER" : sApplication = "WRITER" + case "CALC" : sApplication = "CALC" + case else : printlog( "Provided gApplication is not supported: " & gApplication ) + end select + ToolsOptions - hToolsOptions (sApplication,"General") - if Masseinheit.GetSelText <> ReferenceNew then 'find the right one. + hToolsOptions (sApplication,"General") + if Masseinheit.GetSelText <> ReferenceNew then 'find the right one. Masseinheit.TypeKeys "<HOME>" for f = 1 to Masseinheit.GetItemCount if Masseinheit.GetSelText = ReferenceNew then - i = Masseinheit.GetItemCount 'find the right one. + i = Masseinheit.GetItemCount 'find the right one. else - Masseinheit.TypeKeys "<DOWN>" + Masseinheit.TypeKeys "<DOWN>" endif next f - endif - Kontext "ExtrasOptionenDlg" - ExtrasOptionenDlg.OK + endif + Kontext "ExtrasOptionenDlg" + hCloseDialog( ExtrasOptionenDlg, "ok" ) + end Sub '------------------------------------------------------------------------------- sub ResetMeasurement dim f as integer - if (gApplication = "DRAW") then - sApplication = "DRAWING" - elseIf (gApplication = "IMPRESS") then - sApplication = "IMPRESS" - elseIf (gApplication = "WRITER") then - sApplication = "WRITER" - elseIf (gApplication = "CALC") then - sApplication = "CALC" - endif + + select case( gApplication ) + case "DRAW" : sApplication = "DRAWING" + case "IMPRESS" : sApplication = "IMPRESS" + case "WRITER" : sApplication = "WRITER" + case "CALC" : sApplication = "CALC" + case else : printlog( "Provided gApplication is not supported: " & gApplication ) + end select + printlog " - Reset states back to what they were before " ToolsOptions - hToolsOptions (sApplication,"General") - if Masseinheit.GetSelText <> ReferenceOld then 'find the right one. + hToolsOptions (sApplication,"General") + if Masseinheit.GetSelText <> ReferenceOld then 'find the right one. Masseinheit.TypeKeys "<HOME>" for f = 1 to Masseinheit.GetItemCount if Masseinheit.GetSelText = ReferenceOld then - i = Masseinheit.GetItemCount 'find the right one. + i = Masseinheit.GetItemCount 'find the right one. else - Masseinheit.TypeKeys "<DOWN>" + Masseinheit.TypeKeys "<DOWN>" endif next f - endif - Kontext "ExtrasOptionenDlg" + endif + Kontext "ExtrasOptionenDlg" ExtrasOptionenDlg.OK end Sub '------------------------------------------------------------------------------- sub SetKontextApplication - sleep 1 - Select Case gApplication - Case "DRAW" - Kontext "DocumentDraw" - 'Printlog "gApplication / Kontext is now: DocumentDraw" - sleep 1 - Case "IMPRESS" - Kontext "DocumentImpress" - 'Printlog "gApplication / Kontext is now is now: DocumentImpress" - sleep 1 - Case "WRITER" - Kontext "DocumentWriter" - 'Printlog "gApplication / Kontext is now is now: DocumentWriter" - sleep 1 - Case "CALC" - Kontext "DocumentCalc" - 'Printlog "gApplication / Kontext is now is now: DocumentCalc" - sleep 1 - end select - sleep 1 + + hSetDocumentContext() ' Global routine exists + end sub '------------------------------------------------------------------------------- sub hSetSpellHypLanguage -printlog " select a language with a dictionary, used for spellcheck, thesaurus and hyphenation " + printlog " select a language with a dictionary, used for spellcheck, thesaurus and hyphenation " dim sTrieit as string ' only for asian languages i need to set the default language for the current document to 'English(USA)' @@ -450,7 +368,7 @@ printlog " select a language with a dictionary, used for spellcheck, thesaurus a qaErrorLog "Sorry no spellbook found: id_tools.inc::hSetSpellHypLanguage" endif else - printlog " if a Language is already defined in the textfile " + printlog " if a Language is already defined in the textfile " printlog glLocale (4) try printlog " select it in section 'Default languages for document' listbox 'Western' " @@ -466,11 +384,11 @@ printlog " select a language with a dictionary, used for spellcheck, thesaurus a qaw = glLocale (4) endcatch endif - try - printlog "selected: '" + Westlich.GetSelText + "'" - catch - printlog "selected: '" + Asiatisch.GetSelText + "'" - endcatch + try + printlog "selected: '" + Westlich.GetSelText + "'" + catch + printlog "selected: '" + Asiatisch.GetSelText + "'" + endcatch Kontext "ExtrasOptionenDlg" printlog "+ close dialog 'Options - ' with OK " ExtrasOptionenDlg.OK @@ -480,7 +398,7 @@ end sub '------------------------------------------------------------------------------- sub hTBOtypeInDoc - hRechteckErstellen ( 10, 10, 30, 40 ) + hRechteckErstellen ( 10, 10, 30, 40 ) end sub '------------------------------------------------------------------------------- @@ -501,9 +419,9 @@ sub Position_Vergleichen (Ueber_Text_1 as string,Ueber_Text_2 as string,Ueber_Te if TabPositionAndSize.exists (5) then printlog "Yo!" printlog "What?" if Dummy_Text = Ueber_Text_1 then - Printlog Ueber_Text_2 + Printlog Ueber_Text_2 else - warnlog Ueber_Text_3,": is: ", Dummy_Text,"; should be: ", Ueber_Text_1 + warnlog Ueber_Text_3,": is: ", Dummy_Text,"; should be: ", Ueber_Text_1 end if end sub @@ -511,7 +429,7 @@ end sub sub g_demoguide printlog "------------------- g_demoguide.inc ------------------------" - + call t_Introduction call t_Interoperability call t_DrawingEngine @@ -538,107 +456,98 @@ end sub '------------------------------------------------------------------------------- sub mouseclickinpresentation - Kontext "DocumentPresentation" - autoexecute=false - DocumentPresentation.MouseDown ( 50, 50 ) - printlog " switch slides using mouse clicks " - DocumentPresentation.MouseUp ( 50, 50 ) - autoexecute=true + Kontext "DocumentPresentation" + autoexecute=false + DocumentPresentation.MouseDown ( 50, 50 ) + printlog " switch slides using mouse clicks " + DocumentPresentation.MouseUp ( 50, 50 ) + autoexecute=true end sub '------------------------------------------------------------------------------- -sub im_002_ +sub im_002 + printLog Chr(13) + "--------- im_002_ ---------- $Date: 2008-06-16 10:43:16 $ $Revision: 1.1 $ " - printLog Chr(13) + "--------- im_002_ ---------- $Date: 2008-06-16 10:43:16 $ $Revision: 1.1 $ " - - Call tiEditDeleteSlide + Call tiEditDeleteSlide end sub '------------------------------------------------------------------------------- -sub im_003_ - - printLog Chr(13) + "--------- im_003_ ----------" +sub im_003 + printLog Chr(13) + "--------- im_003_ ----------" Call tiViewMasterView Call tiViewSlideMaster Call tiViewPanes -'TODO: TBO not necessary here, move to optional + 'TODO: TBO not necessary here, move to optional Call tiViewToolbar_1 end sub '------------------------------------------------------------------------------- -sub im_004_ - - printLog Chr(13) + "--------- im_004_ ----------" +sub im_004 + printLog Chr(13) + "--------- im_004_ ----------" - Call tiInsertSlideExpandSummary + Call tiInsertSlideExpandSummary end sub '------------------------------------------------------------------------------- -sub im_005_ +sub im_005 + printLog Chr(13) + "--------- im_005_ ---------- " - printLog Chr(13) + "--------- im_005_ ---------- " - - Call tiFormatModifyLayout ' impress only + Call tiFormatModifyLayout ' impress only end sub '------------------------------------------------------------------------------- -sub im_007_ - - printLog Chr(13) + "--------- im_007_ ---------- " +sub im_007 + printLog Chr(13) + "--------- im_007_ ---------- " - Call tSlideShowSlideShow - Call tSlideShowRehearseTimings - Call tSlideShowSlideShowSettings - Call tSlideShowCustomSlideShow - Call tSlideShowSlideTransition + Call tSlideShowSlideShow + Call tSlideShowRehearseTimings + Call tSlideShowSlideShowSettings + Call tSlideShowCustomSlideShow + Call tSlideShowSlideTransition -Call tSlideShowShowHideSlide - Call tSlideShowAnimation - Call tSlideShowCustomAnimation - Call tSlideShowInteraction + Call tSlideShowShowHideSlide + Call tSlideShowAnimation + Call tSlideShowCustomAnimation + Call tSlideShowInteraction end sub '------------------------------------------------------------------------------- -sub im_011_ - - printLog Chr(13) + "--------- im_011_ ---------- " +sub im_011 + printLog Chr(13) + "--------- im_011_ ---------- " - Call tiDiaLeiste ' only IMPRESS + Call tiDiaLeiste ' only IMPRESS end sub '------------------------------------------------------------------------------- -sub D_002_ +sub D_002 + printLog Chr(13) + "--------- D_002_ ---------- " - printLog Chr(13) + "--------- D_002_ ---------- " - - Call tdEditCrossFading - Call tdEditLayer + Call tdEditCrossFading + Call tdEditLayer end sub '------------------------------------------------------------------------------- -sub D_003_ - - printLog Chr(13) + "--------- D_003_ ---------- " +sub D_003 + printLog Chr(13) + "--------- D_003_ ---------- " - call tdViewSlide - call tdViewPagePane + call tdViewSlide + call tdViewPagePane end sub '------------------------------------------------------------------------------- -sub D_005_ - - printLog Chr(13) + "--------- D_005_ ---------- " +sub D_005 + printLog Chr(13) + "--------- D_005_ ---------- " - call tiFormatLayer ' only in draw !!!!! + call tiFormatLayer ' only in draw !!!!! end sub '------------------------------------------------------------------------------- sub d_007 - printLog Chr(13) + "--------- d_007 ---------- " + printLog Chr(13) + "--------- d_007 ---------- " - call tdModifyRotate + call tdModifyRotate end sub '------------------------------------------------------------------------------- @@ -648,10 +557,10 @@ sub hOpenGallery ToolsGallery WaitSlot (2000) Kontext "Gallery" - if Gallery.NotExists(2) then - ToolsGallery - WaitSlot (2000) - end if + if Gallery.NotExists(2) then + ToolsGallery + WaitSlot (2000) + end if end sub '------------------------------------------------------------------------- @@ -667,27 +576,27 @@ sub LoadGraphic ( sFile as String, bOK as Boolean ) as boolean Kontext Active.SetPage TabType Kontext "TabType" - OriginalSize.Click - iW = Val ( makeNumOutOfText ( Width.GetText ) ) - iH = Val ( makeNumOutOfText ( Height.GetText ) - if instr ( sFile, "photo" ) <> 0 then - iWMax = 22 - iHMax = 25 - else - iWMax = 17 - iHMax = 25 - end if - if iW > iWMax OR iH > iHMax then - printlog sFile + " :" - warnlog "Size is too big ( max should be '" + iWMax + "' cm* '" + iHMax + "'cm DinA4 with default borders ), but it is '" + iW + "' * '" + iH + "'" - LoadGraphic = false - end if - TabType.OK - sleep (1) + OriginalSize.Click + iW = Val ( makeNumOutOfText ( Width.GetText ) ) + iH = Val ( makeNumOutOfText ( Height.GetText ) + if instr ( sFile, "photo" ) <> 0 then + iWMax = 22 + iHMax = 25 + else + iWMax = 17 + iHMax = 25 + end if + if iW > iWMax OR iH > iHMax then + printlog sFile + " :" + warnlog "Size is too big ( max should be '" + iWMax + "' cm* '" + iHMax + "'cm DinA4 with default borders ), but it is '" + iW + "' * '" + iH + "'" + LoadGraphic = false + end if + TabType.OK + sleep (1) Kontext "DocumentWriter" - DocumentWriter.TypeKeys "<Delete>" - sleep (1) - bOK = TRUE + DocumentWriter.TypeKeys "<Delete>" + sleep (1) + bOK = TRUE end sub '------------------------------------------------------------------------- @@ -715,30 +624,30 @@ end sub '------------------------------------------------------------------------- sub id_001 - printLog Chr(13) + "--------- id_001 ----------" - - qaerrorlog "#74988# tiFilePassword outcommented due to bug. -FHA" - call tiFilePassword - call tiFileSaveAs - call tiFileReload - call tiFileVersion - printlog " File->Send not possible to test, because extrnal prg get's called!" - call tiFileTemplates -' Call tiFileNew instead i call: - call tmFileNewFromTemplate - call tmFileOpen - call tmFileClose - call tmFileSave - call tmFileSaveAs - call tmFileExit - - call tmFileSaveAll - call tmFileProperties - call tdFileExport - call tmFilePrinterSetting - ' special cases - ' Call AutoPilot 'inc\desktop\autopilo.inc - call tmFileExit ' don't test because unpredictable behaviour + printLog Chr(13) + "--------- id_001 ----------" + + qaerrorlog "#74988# tiFilePassword outcommented due to bug. -FHA" + call tiFilePassword + call tiFileSaveAs + call tiFileReload + call tiFileVersion + printlog " File->Send not possible to test, because extrnal prg get's called!" + call tiFileTemplates + ' Call tiFileNew instead i call: + call tmFileNewFromTemplate + call tmFileOpen + call tmFileClose + call tmFileSave + call tmFileSaveAs + call tmFileExit + + call tmFileSaveAll + call tmFileProperties + call tdFileExport + call tmFilePrinterSetting + ' special cases + ' Call AutoPilot 'inc\desktop\autopilo.inc + call tmFileExit ' don't test because unpredictable behaviour end sub '------------------------------------------------------------------------------ @@ -766,73 +675,91 @@ end sub '------------------------------------------------------------------------- sub id_003 - printLog Chr(13) + "--------- id_003 ----------" + printLog Chr(13) + "--------- id_003 ----------" - call tiViewNavigator - call tiViewZoom - call tiViewToolbar - Call tToolsCustomize 'global\required\include - call tiViewDisplayQuality - call tiViewLayer - call tViewSnapLines - call tViewGrid + call tiViewNavigator + call tiViewZoom + call tiViewToolbar + Call tToolsCustomize 'global\required\include + call tiViewDisplayQuality + call tiViewLayer + call tViewSnapLines + call tViewGrid end sub '------------------------------------------------------------------------- sub id_004 - printLog Chr(13) + "--------- id_004 ----------" + printLog Chr(13) + "--------- id_004 ----------" - call tiInsertSlide - call tiInsertDuplicateSlide + call tiInsertSlide + call tiInsertDuplicateSlide ' v expand slide ' v summary slide - call tiInsertField - call tiInsertSpecialCharacter - call tiInsertHyperlink - call tiInsertScan - call tiInsertGraphic - call tiInsertObjectSound - call tiInsertObjectVideo - call tiInsertObjectSound - call tiInsertObjectVideo - call tiInsertChart - call tiInsertObjectOLEObjects - call tiInsertSpreadsheet - call tiInsertFormula - call tiInsertFloatingFrame - call tiInsertFile - call tiInsertPlugin - call tiInsertSnappointLine - call tdInsertLayer ' IMPRESS: Edit->Layer->Insert + call tiInsertField + call tiInsertSpecialCharacter + call tiInsertHyperlink + call tiInsertScan + call tiInsertGraphic + call tiInsertObjectSound + call tiInsertObjectVideo + call tiInsertObjectSound + call tiInsertObjectVideo + call tiInsertChart + call tiInsertObjectOLEObjects + call tiInsertSpreadsheet + call tiInsertFormula + call tiInsertFloatingFrame + call tiInsertFile + call tiInsertPlugin + call tiInsertSnappointLine + call tdInsertLayer ' IMPRESS: Edit->Layer->Insert end sub '------------------------------------------------------------------------------ sub id_005 - printLog Chr(13) + "--------- id_005 ----------" - - call tiFormatDefault - call tiFormatLine - call tdFormatArea - call tiFormatText - call tiFormatPositionAndSize - call tiFormatCharacter - call tiFormatControlForm -' ^ Form - call tiFormatDimensions - call tiFormatConnector - call tiFormat3D_Effects - call tiFormatNumberingBullets - call tiFormatCaseCharacter - call tiFormatParagraph - call tiFormatPage - call tiFormatStylesAndFormatting - call tiFormatStylesSlideDesign - call tiFormatFontwork - call tiFormatGroup - printlog " format->group is also modify->group " -' tiFormatLayer ' not in impress + printLog Chr(13) + "--------- id_005 ----------" + + call tiFormatDefault + call tiFormatLine + call tdFormatArea + call tiFormatText + call tiFormatPositionAndSize + call tiFormatCharacter + call tiFormatControlForm + ' ^ Form + call tiFormatDimensions + call tiFormatConnector + call tiFormat3D_Effects + call tiFormatNumberingBullets + call tiFormatCaseCharacter + call tiFormatParagraph + call tiFormatPage + call tiFormatStylesAndFormatting + call tiFormatStylesSlideDesign + call tiFormatFontwork + call tiFormatGroup + printlog " format->group is also modify->group " + ' tiFormatLayer ' not in impress +end sub + +'------------------------------------------------------------------------------ +sub id_006 + + printLog Chr(13) + "--------- id_006 ----------" + + call tiToolsSpellchecking + call tiToolsSpellcheckingAutomatic + call tiToolsThesaurus + call tiToolsHyphenation + call tiToolsAutoCorrect + call tChineseTranslation + call tiToolsMacro + call tiToolsGallery + call tiToolsEyedropper + call tiToolsOptions ' get just called one time here... + Call tToolsOptionsTest ' global one end sub '------------------------------------------------------------------------------- @@ -864,16 +791,16 @@ end sub '------------------------------------------------------------------------------- sub id_008 - printLog Chr(13) + "--------- id_008 ----------" + printLog Chr(13) + "--------- id_008 ----------" - Call tiWindowNewWindow - call tidWindow123 + Call tiWindowNewWindow + call tidWindow123 end sub '------------------------------------------------------------------------------ sub id_009 - printLog Chr(13) + "--------- id_009 ----------" + printLog Chr(13) + "--------- id_009 ----------" call tCheckIfTheHelpExists Call tmHelpContents @@ -889,165 +816,169 @@ sub id_011 printLog Chr(13) + "--------- id_011 ----------" - call tdBezierToolbar + call tdBezierToolbar call tiDrawObjectBar call tiTextToolbar call tiGraphicsObjectBar call tiGluepointToolbar - end sub +end sub '-------------------------------------------------------------------------------' sub hWalkTheStyles (optional a as integer,optional b as integer) dim i as integer - + if isMissing (a) then a=1 if isMissing (b) then b=2 i=1 if a <= i AND i <= b then - Kontext - printlog " switch to tabpage 'Line' " - Messagebox.SetPage TabLinie - kontext "TabLinie" - Call DialogTest ( TabLinie ) - Kontext - printlog " switch to tabpage 'Area' " - Messagebox.SetPage TabArea - kontext "TabArea" - Call DialogTest ( TabArea ) - printlog " select radio button 'none' " - NoFill.Check - Call DialogTest ( TabArea, 1 ) - printlog " select radio button 'color' " - Color.Check - Call DialogTest ( TabArea, 2 ) - printlog " select radio button 'gradient' " - Gradient.Check - Call DialogTest ( TabArea, 3 ) - printlog " select radio button 'hatching' " - Hatching.Check - Call DialogTest ( TabArea, 4 ) - printlog " select radio button 'bitmap' " - Bitmap.Check - Call DialogTest ( TabArea, 5 ) - Kontext - printlog " switch to tabpage 'shadowing' " - Messagebox.SetPage TabSchatten - kontext "TabSchatten" - printlog " check 'use shadow' " - Anzeigen.check - Call DialogTest ( TabSchatten ) - Kontext - printlog " switch to tabpage 'Transparency' " - Messagebox.SetPage TabTransparenz - kontext "TabTransparenz" - printlog " check 'No transparency' " - KeineTransparenz.Check - printlog " check 'Transparency' " - LineareTransparenz.Check - printlog " check 'Gradient' " - Transparenzverlauf.Check - Kontext - printlog " switch to tabpage 'Font' " - Messagebox.SetPage TabFont - kontext "TabFont" - Call DialogTest ( TabFont ) - Kontext - printlog " switch to tabpage 'Font Effect' " - Messagebox.SetPage TabFontEffects - kontext "TabFontEffects" - Kontext - printlog " switch to tabpage 'indents & spacing' " - Messagebox.SetPage TabEinzuegeUndAbstaende - kontext "TabEinzuegeUndAbstaende" - Call DialogTest ( TabEinzuegeUndAbstaende ) + Kontext + printlog " switch to tabpage 'Line' " + Messagebox.SetPage TabLinie + kontext "TabLinie" + Call DialogTest ( TabLinie ) + Kontext + printlog " switch to tabpage 'Area' " + Messagebox.SetPage TabArea + kontext "TabArea" + Call DialogTest ( TabArea ) + printlog " select radio button 'none' " + NoFill.Check + Call DialogTest ( TabArea, 1 ) + printlog " select radio button 'color' " + Color.Check + Call DialogTest ( TabArea, 2 ) + printlog " select radio button 'gradient' " + Gradient.Check + Call DialogTest ( TabArea, 3 ) + printlog " select radio button 'hatching' " + Hatching.Check + Call DialogTest ( TabArea, 4 ) + printlog " select radio button 'bitmap' " + Bitmap.Check + Call DialogTest ( TabArea, 5 ) + Kontext + printlog " switch to tabpage 'shadowing' " + Messagebox.SetPage TabSchatten + kontext "TabSchatten" + printlog " check 'use shadow' " + Anzeigen.check + Call DialogTest ( TabSchatten ) + Kontext + printlog " switch to tabpage 'Transparency' " + Messagebox.SetPage TabTransparenz + kontext "TabTransparenz" + printlog " check 'No transparency' " + KeineTransparenz.Check + printlog " check 'Transparency' " + LineareTransparenz.Check + printlog " check 'Gradient' " + Transparenzverlauf.Check + Kontext + printlog " switch to tabpage 'Font' " + Messagebox.SetPage TabFont + kontext "TabFont" + Call DialogTest ( TabFont ) + Kontext + printlog " switch to tabpage 'Font Effect' " + Messagebox.SetPage TabFontEffects + kontext "TabFontEffects" + Kontext + printlog " switch to tabpage 'indents & spacing' " + Messagebox.SetPage TabEinzuegeUndAbstaende + kontext "TabEinzuegeUndAbstaende" + Call DialogTest ( TabEinzuegeUndAbstaende ) endif i=2 if a <= i AND i <= b then - Kontext - printlog " switch to tabpage 'Organize' " - Messagebox.SetPage TabVerwalten - kontext "TabVerwalten" - Call DialogTest ( TabVerwalten ) - Kontext - printlog " switch to tabpage 'text' " - Messagebox.SetPage TabText - Kontext "TabText" - Call DialogTest ( TabText ) - Kontext - printlog " switch to tabpage 'text animation' " - Messagebox.SetPage TabLauftext - Kontext "TabLauftext" - Call DialogTest ( TabLauftext ) - Kontext - printlog " switch to tabpage 'dimension' " - Messagebox.SetPage TabBemassung - Kontext "TabBemassung" - Call DialogTest ( TabBemassung ) - Kontext - printlog " switch to tabpage 'connector' " - Messagebox.setpage TabVerbinder - Kontext "TabVerbinder" - Call Dialogtest ( TabVerbinder ) - Kontext - printlog " switch to tabpage 'alignment' " - Messagebox.setpage TabAusrichtungAbsatz - Kontext "TabAusrichtungAbsatz" - Links.Check - Rechts.Check - Zentriert.Check - Blocksatz.Check - Kontext - printlog " switch to tabpage 'Tabs' " - Messagebox.setpage TabTabulator - Kontext "TabTabulator" - printlog " click 'new' " - Neu.click - printlog " ' MAYBE CHECK COUNT OF THIS ?? Position svx:MetricBox:RID_SVXPAGE_TABULATOR:ED_TABPOS " - printlog " click 'delete all' " - AlleLoeschen.click - printlog " click 'new' " - Neu.click - printlog " click 'delete' " - Loeschen.click + Kontext + printlog " switch to tabpage 'Organize' " + Messagebox.SetPage TabVerwalten + kontext "TabVerwalten" + Call DialogTest ( TabVerwalten ) + Kontext + printlog " switch to tabpage 'text' " + Messagebox.SetPage TabText + Kontext "TabText" + Call DialogTest ( TabText ) + Kontext + printlog " switch to tabpage 'text animation' " + Messagebox.SetPage TabLauftext + Kontext "TabLauftext" + Call DialogTest ( TabLauftext ) + Kontext + printlog " switch to tabpage 'dimension' " + Messagebox.SetPage TabBemassung + Kontext "TabBemassung" + Call DialogTest ( TabBemassung ) + Kontext + printlog " switch to tabpage 'connector' " + Messagebox.setpage TabVerbinder + Kontext "TabVerbinder" + Call Dialogtest ( TabVerbinder ) + Kontext + printlog " switch to tabpage 'alignment' " + Messagebox.setpage TabAusrichtungAbsatz + Kontext "TabAusrichtungAbsatz" + Links.Check + Rechts.Check + Zentriert.Check + Blocksatz.Check + Kontext + printlog " switch to tabpage 'Tabs' " + Messagebox.setpage TabTabulator + Kontext "TabTabulator" + printlog " click 'new' " + Neu.click + printlog " ' MAYBE CHECK COUNT OF THIS ?? Position svx:MetricBox:RID_SVXPAGE_TABULATOR:ED_TABPOS " + printlog " click 'delete all' " + AlleLoeschen.click + printlog " click 'new' " + Neu.click + printlog " click 'delete' " + Loeschen.click endif i=3 if a <= i AND i <= b then - Kontext - printlog " switch to tabpage 'Bullets' " - Messagebox.SetPage TabBullet - Kontext "TabBullet" - sleep 1 - Call DialogTest (TabBullet) - sleep 1 - Kontext - printlog " switch to tabpage 'Numbering Type' " - Messagebox.SetPage TabNumerierungsart - Kontext "TabNumerierungsart" - sleep 1 - Call DialogTest (TabNumerierungsart) - sleep 1 - Kontext - printlog " switch to tabpage 'Graphics' " - Messagebox.SetPage TabGrafiken - Kontext "TabGrafiken" - sleep 1 - Call DialogTest (TabGrafiken) - sleep 1 - Kontext - printlog " switch to tabpage 'Customize' " - Messagebox.SetPage TabOptionenNumerierung - Kontext "TabOptionenNumerierung" - sleep 1 - Call DialogTest (TabOptionenNumerierung) - sleep 1 + Kontext + printlog " switch to tabpage 'Bullets' " + Messagebox.SetPage TabBullet + Kontext "TabBullet" + sleep 1 + Call DialogTest (TabBullet) + sleep 1 + Kontext + printlog " switch to tabpage 'Numbering Type' " + Messagebox.SetPage TabNumerierungsart + Kontext "TabNumerierungsart" + sleep 1 + Call DialogTest (TabNumerierungsart) + sleep 1 + Kontext + printlog " switch to tabpage 'Graphics' " + Messagebox.SetPage TabGrafiken + Kontext "TabGrafiken" + sleep 1 + Call DialogTest (TabGrafiken) + sleep 1 + Kontext + printlog " switch to tabpage 'Customize' " + Messagebox.SetPage TabOptionenNumerierung + Kontext "TabOptionenNumerierung" + sleep 1 + Call DialogTest (TabOptionenNumerierung) + sleep 1 endif end sub '--------------------------------------------------------------------------------------- sub sSelectEmptyLayout if gApplication = "IMPRESS" then + Kontext "DocumentImpress" + DocumentImpress.UseMenu + hMenuSelectNr (5) + hMenuSelectNr (13) printlog "Changing focus to TaskPane." kontext "Tasks" sleep (1) |