From 6ed1958b83babfda36cef3512198dfeba98d5894 Mon Sep 17 00:00:00 2001 From: Ivo Hinkelmann Date: Wed, 17 Jun 2009 11:36:51 +0000 Subject: CWS-TOOLING: integrate CWS automation006 2009-05-26 13:25:30 +0200 jsk r272296 : #i102088# - final cosmetic touch 2009-05-25 14:40:06 +0200 jsk r272244 : #i102202# - quite a chunk. 2009-05-25 05:29:48 +0200 jsk r272215 : #i102202# - Cleanup, code refactored, indention and headers fixed 2009-05-25 04:55:58 +0200 jsk r272214 : #i102088# - update .bas-files to load call GetOLEDefaultNames from external file 2009-05-20 12:55:18 +0200 jsk r272116 : #i102088# Replace old OLE stuff, get it from API, localized --- .../graphics/optional/d_export_graphic_a.bas | 14 +- .../graphics/optional/d_export_graphic_b.bas | 14 +- .../graphics/optional/export_graphic_a.bas | 14 +- .../graphics/optional/export_graphic_b.bas | 16 +- .../graphics/optional/g_accessability.bas | 12 +- testautomation/graphics/optional/g_area.bas | 10 +- .../graphics/optional/g_arrangealign.bas | 38 +- .../graphics/optional/g_autocorrection.bas | 5 +- testautomation/graphics/optional/g_character.bas | 18 +- testautomation/graphics/optional/g_clipboard.bas | 35 +- testautomation/graphics/optional/g_clipexport.bas | 32 +- testautomation/graphics/optional/g_convertto.bas | 30 +- testautomation/graphics/optional/g_crossfading.bas | 14 +- .../graphics/optional/g_customshapes.bas | 6 +- testautomation/graphics/optional/g_demoguide.bas | 4 +- testautomation/graphics/optional/g_dimensions.bas | 6 +- testautomation/graphics/optional/g_edit.bas | 25 +- testautomation/graphics/optional/g_export_html.bas | 9 +- testautomation/graphics/optional/g_findreplace.bas | 29 +- testautomation/graphics/optional/g_format.bas | 28 +- testautomation/graphics/optional/g_group.bas | 6 +- testautomation/graphics/optional/g_imagemap.bas | 20 +- testautomation/graphics/optional/g_insert.bas | 17 +- testautomation/graphics/optional/g_line.bas | 10 +- testautomation/graphics/optional/g_load_save.bas | 55 +- testautomation/graphics/optional/g_mediaplayer.bas | 4 +- testautomation/graphics/optional/g_navigator.bas | 30 +- testautomation/graphics/optional/g_ole.bas | 2 +- testautomation/graphics/optional/g_paneview.bas | 12 +- testautomation/graphics/optional/g_paragraph.bas | 6 +- testautomation/graphics/optional/g_print.bas | 6 +- .../graphics/optional/g_savepictureas.bas | 6 +- testautomation/graphics/optional/g_shaddow.bas | 27 +- testautomation/graphics/optional/g_slidelayer.bas | 30 +- testautomation/graphics/optional/g_spellcheck.bas | 18 +- testautomation/graphics/optional/g_stylist.bas | 47 +- testautomation/graphics/optional/g_tables.bas | 24 +- testautomation/graphics/optional/g_toolbars.bas | 26 +- testautomation/graphics/optional/g_tools.bas | 21 +- testautomation/graphics/optional/g_zoom.bas | 6 +- testautomation/graphics/optional/gallery.bas | 10 +- testautomation/graphics/optional/gallery2.bas | 12 +- testautomation/graphics/optional/i_animation.bas | 2 +- .../graphics/optional/i_headerfooter.bas | 6 +- testautomation/graphics/optional/i_only_updt_1.bas | 38 +- testautomation/graphics/optional/i_only_updt_2.bas | 2 +- testautomation/graphics/optional/i_pengine.bas | 23 +- .../graphics/optional/i_saveloadlayout.bas | 18 +- testautomation/graphics/optional/i_shape.bas | 2 +- testautomation/graphics/optional/i_slidecopy.bas | 18 +- testautomation/graphics/optional/i_slideshow.bas | 7 +- .../graphics/optional/i_us_presentation.bas | 24 +- testautomation/graphics/optional/i_view.bas | 26 +- .../optional/includes/global/export_graphic.inc | 934 +++++----- .../optional/includes/global/export_graphic_2.inc | 1766 +++++++++---------- .../optional/includes/global/g_accessability.inc | 497 +++--- .../graphics/optional/includes/global/g_area.inc | 641 ++++--- .../optional/includes/global/g_arrangealign.inc | 385 ++--- .../optional/includes/global/g_autocorrection.inc | 387 ++--- .../optional/includes/global/g_character.inc | 734 ++++---- .../optional/includes/global/g_clipboard.inc | 453 +++-- .../optional/includes/global/g_clipexport.inc | 600 +++---- .../optional/includes/global/g_clipexport2.inc | 87 +- .../optional/includes/global/g_clipexport3.inc | 1235 +++++++------ .../optional/includes/global/g_convertto.inc | 421 ++--- .../optional/includes/global/g_crossfading.inc | 366 ++-- .../optional/includes/global/g_customshapes.inc | 1407 ++++++++------- .../optional/includes/global/g_demoguide.inc | 185 +- .../optional/includes/global/g_dimensions.inc | 136 +- .../graphics/optional/includes/global/g_edit.inc | 333 ++-- .../optional/includes/global/g_export_html.inc | 1171 ++++++------- .../optional/includes/global/g_find_replace.inc | 306 ++-- .../graphics/optional/includes/global/g_format.inc | 1789 +++++++++---------- .../graphics/optional/includes/global/g_group.inc | 115 +- .../optional/includes/global/g_imagemap.inc | 167 +- .../graphics/optional/includes/global/g_insert.inc | 1814 ++++++++++---------- .../graphics/optional/includes/global/g_line.inc | 597 +++---- .../optional/includes/global/g_load_save.inc | 1000 +++++------ .../optional/includes/global/g_mediaplayer.inc | 343 ++-- .../optional/includes/global/g_navigator.inc | 260 ++- .../graphics/optional/includes/global/g_ole.inc | 157 +- .../optional/includes/global/g_paneview.inc | 952 +++++----- .../optional/includes/global/g_paragraph.inc | 244 ++- .../graphics/optional/includes/global/g_print.inc | 148 +- .../optional/includes/global/g_savepictureas.inc | 1231 +++++++------ .../optional/includes/global/g_shaddow.inc | 882 +++++----- .../optional/includes/global/g_slidelayer.inc | 113 +- .../optional/includes/global/g_spellcheck.inc | 204 +-- .../optional/includes/global/g_stylist.inc | 1251 ++++++-------- .../graphics/optional/includes/global/g_tables.inc | 146 +- .../optional/includes/global/g_toolbars.inc | 573 +++---- .../graphics/optional/includes/global/g_tools.inc | 431 +++-- .../graphics/optional/includes/global/g_zoom.inc | 165 +- .../graphics/optional/includes/global/gallery.inc | 1081 ++++++------ .../graphics/optional/includes/global/gallery2.inc | 162 +- .../graphics/optional/includes/global/id_001.inc | 1289 +++++++------- .../graphics/optional/includes/global/id_002.inc | 364 ++-- .../graphics/optional/includes/global/id_003.inc | 125 +- .../graphics/optional/includes/global/id_004.inc | 316 ++-- .../graphics/optional/includes/global/id_005.inc | 975 ++++------- .../graphics/optional/includes/global/id_006.inc | 417 ++--- .../graphics/optional/includes/global/id_007.inc | 340 +--- .../graphics/optional/includes/global/id_008.inc | 41 +- .../graphics/optional/includes/global/id_009.inc | 360 ++-- .../graphics/optional/includes/global/id_011.inc | 1705 +++++++++--------- 105 files changed, 14802 insertions(+), 17919 deletions(-) (limited to 'testautomation/graphics/optional') diff --git a/testautomation/graphics/optional/d_export_graphic_a.bas b/testautomation/graphics/optional/d_export_graphic_a.bas index 574eb2807f2b..4b498f42be63 100755 --- a/testautomation/graphics/optional/d_export_graphic_a.bas +++ b/testautomation/graphics/optional/d_export_graphic_a.bas @@ -1,7 +1,7 @@ 'encoding UTF-8 Do not remove or change this line! '************************************************************************** '* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. -'* +'* '* Copyright 2008 by Sun Microsystems, Inc. '* '* OpenOffice.org - a multi-platform office productivity suite @@ -44,17 +44,17 @@ global ExtensionString as String sub main Printlog "--------------------- Graphics Export Test ------------------- " - Call hStatusIn ( "Graphics","d_export_graphic_a.bas", "Graphics Export Test" ) + Call hStatusIn ( "Graphics","d_export_graphic_a.bas" ) use "graphics\tools\id_tools.inc" use "graphics\tools\id_tools_2.inc" use "graphics\optional\includes\global\export_graphic.inc" -if bAsianLan then - qaErrorLog "#i71631# - Test deactivated with Asian languages due to bug" - Call hStatusOut - exit sub -endif + if bAsianLan then + qaErrorLog "#i71631# - Test deactivated with Asian languages due to bug" + Call hStatusOut + exit sub + endif Call sFileExport 'OBSERVE - This line must run before the following testcases! Call tEPS '///+- Encapsulated PostScript ///' diff --git a/testautomation/graphics/optional/d_export_graphic_b.bas b/testautomation/graphics/optional/d_export_graphic_b.bas index 4fe60ab26acd..a3c08448f38a 100755 --- a/testautomation/graphics/optional/d_export_graphic_b.bas +++ b/testautomation/graphics/optional/d_export_graphic_b.bas @@ -1,7 +1,7 @@ 'encoding UTF-8 Do not remove or change this line! '************************************************************************** '* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. -'* +'* '* Copyright 2008 by Sun Microsystems, Inc. '* '* OpenOffice.org - a multi-platform office productivity suite @@ -43,17 +43,17 @@ global ExtensionString as String sub main Printlog "--------------------- Graphics Export Test ------------------- " - Call hStatusIn ( "Graphics","d_export_graphic_b.bas", "Graphics Export Test" ) + Call hStatusIn ( "Graphics","d_export_graphic_b.bas" ) use "graphics\tools\id_tools.inc" use "graphics\tools\id_tools_2.inc" use "graphics\optional\includes\global\export_graphic_2.inc" -if bAsianLan then - qaErrorLog "#i71631# - Test deactivated with Asian languages due to bug" - Call hStatusOut - exit sub -endif + if bAsianLan then + qaErrorLog "#i71631# - Test deactivated with Asian languages due to bug" + Call hStatusOut + exit sub + endif Call sFileExport 'OBSERVE - This line must run before the following testcases! Call tPNG '///+- Portable Network Graphic ///' diff --git a/testautomation/graphics/optional/export_graphic_a.bas b/testautomation/graphics/optional/export_graphic_a.bas index df405ba9f8a8..85372c058ebe 100755 --- a/testautomation/graphics/optional/export_graphic_a.bas +++ b/testautomation/graphics/optional/export_graphic_a.bas @@ -1,7 +1,7 @@ 'encoding UTF-8 Do not remove or change this line! '************************************************************************** '* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. -'* +'* '* Copyright 2008 by Sun Microsystems, Inc. '* '* OpenOffice.org - a multi-platform office productivity suite @@ -43,17 +43,17 @@ global ExtensionString as String sub main Printlog "--------------------- Graphics Export Test ------------------- " - Call hStatusIn ( "Graphics","export_graphic_a.bas", "Graphics Export Test A" ) + Call hStatusIn ( "Graphics","export_graphic_a.bas" ) use "graphics\tools\id_tools.inc" use "graphics\tools\id_tools_2.inc" use "graphics\optional\includes\global\export_graphic.inc" -if bAsianLan then - qaErrorLog "#i71631# - Test deactivated with Asian languages due to bug" - Call hStatusOut - exit sub -endif + if bAsianLan then + qaErrorLog "#i71631# - Test deactivated with Asian languages due to bug" + Call hStatusOut + exit sub + endif Call sFileExport 'OBSERVE - This line must run before the following testcases! Call tEPS '///+- Encapsulated PostScript ///' diff --git a/testautomation/graphics/optional/export_graphic_b.bas b/testautomation/graphics/optional/export_graphic_b.bas index bf1f78512bb8..036853919ebd 100755 --- a/testautomation/graphics/optional/export_graphic_b.bas +++ b/testautomation/graphics/optional/export_graphic_b.bas @@ -1,7 +1,7 @@ 'encoding UTF-8 Do not remove or change this line! '************************************************************************** '* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. -'* +'* '* Copyright 2008 by Sun Microsystems, Inc. '* '* OpenOffice.org - a multi-platform office productivity suite @@ -43,17 +43,17 @@ global ExtensionString as String sub main Printlog "--------------------- Graphics Export Test ------------------- " - Call hStatusIn ( "Graphics","export_graphic_b.bas", "Graphics Export Test B" ) + Call hStatusIn ( "Graphics","export_graphic_b.bas" ) use "graphics\tools\id_tools.inc" use "graphics\tools\id_tools_2.inc" use "graphics\optional\includes\global\export_graphic_2.inc" -if bAsianLan then - qaErrorLog "#i71631# - Test deactivated with Asian languages due to bug" - Call hStatusOut - exit sub -endif + if bAsianLan then + qaErrorLog "#i71631# - Test deactivated with Asian languages due to bug" + Call hStatusOut + exit sub + endif Call sFileExport 'OBSERVE - This line must run before the following testcases! Call tPDF '///+- Portable Document Format ///' @@ -66,7 +66,7 @@ endif Call tMET '///+- OS/2 Metafile ///' Call tWMF '///+- Windows Metafile ///' Call tSWF '///+- Macromedia Flash (SWF) (.swf) ///' - + Call hStatusOut end sub diff --git a/testautomation/graphics/optional/g_accessability.bas b/testautomation/graphics/optional/g_accessability.bas index aaff8f00b90d..986de876fde3 100755 --- a/testautomation/graphics/optional/g_accessability.bas +++ b/testautomation/graphics/optional/g_accessability.bas @@ -1,7 +1,7 @@ 'encoding UTF-8 Do not remove or change this line! '************************************************************************** '* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. -'* +'* '* Copyright 2008 by Sun Microsystems, Inc. '* '* OpenOffice.org - a multi-platform office productivity suite @@ -45,14 +45,14 @@ sub main use "graphics\optional\includes\global\g_accessability.inc" PrintLog "-------------------------" + gApplication + "-------------------" - Call tEis1581 ' impress only - Call tEis1549 - Call tEis1523 + Call tEis1581 ' impress only + Call tEis1549 + Call tEis1523 gApplication = "DRAW" PrintLog "-------------------------" + gApplication + "-------------------" - Call tEis1549 - Call tEis1523 + Call tEis1549 + Call tEis1523 Call hStatusOut end sub diff --git a/testautomation/graphics/optional/g_area.bas b/testautomation/graphics/optional/g_area.bas index 99fe74639b9d..c5ee143e8cd6 100755 --- a/testautomation/graphics/optional/g_area.bas +++ b/testautomation/graphics/optional/g_area.bas @@ -1,7 +1,7 @@ 'encoding UTF-8 Do not remove or change this line! '************************************************************************** '* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. -'* +'* '* Copyright 2008 by Sun Microsystems, Inc. '* '* OpenOffice.org - a multi-platform office productivity suite @@ -44,13 +44,13 @@ sub main use "graphics\optional\includes\global\g_area.inc" PrintLog "-------------------------" + gApplication + "-------------------" - Call tiFormatArea - Call tdFormatArea1 + Call tiFormatArea + Call tdFormatArea1 gApplication = "DRAW" PrintLog "-------------------------" + gApplication + "-------------------" - Call tiFormatArea - Call tdFormatArea1 + Call tiFormatArea + Call tdFormatArea1 Call hStatusOut end sub diff --git a/testautomation/graphics/optional/g_arrangealign.bas b/testautomation/graphics/optional/g_arrangealign.bas index 92ed54205dd2..922e8a27e146 100755 --- a/testautomation/graphics/optional/g_arrangealign.bas +++ b/testautomation/graphics/optional/g_arrangealign.bas @@ -1,7 +1,7 @@ 'encoding UTF-8 Do not remove or change this line! '************************************************************************** '* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. -'* +'* '* Copyright 2008 by Sun Microsystems, Inc. '* '* OpenOffice.org - a multi-platform office productivity suite @@ -52,27 +52,27 @@ sub main gApplication = "IMPRESS" PrintLog "-------------------------" + gApplication + "-------------------" - Datei = ConvertPath (gOfficePath + "user\work\" + "anord.odp") - Call tiDatei_Fuer_Anordnen_Erstellen ' is needed for the following test :-( ueber vars are set here - Call tdContextSendBackward - Call tdContextBringForward - Call tdContextSendToBack - Call tdContextBringToFront - Call tdContextInFrontOfObject - Call tdContextBehindObject - Call tdContextReverse + Datei = ConvertPath (gOfficePath + "user\work\" + "anord.odp") + Call tiDatei_Fuer_Anordnen_Erstellen ' is needed for the following test :-( ueber vars are set here + Call tdContextSendBackward + Call tdContextBringForward + Call tdContextSendToBack + Call tdContextBringToFront + Call tdContextInFrontOfObject + Call tdContextBehindObject + Call tdContextReverse gApplication = "DRAW" PrintLog "-------------------------" + gApplication + "-------------------" - Datei = ConvertPath (gOfficePath + "user\work\" + "anord.odg") - Call tiDatei_Fuer_Anordnen_Erstellen ' is needed for the following test :-( ueber vars are set here - Call tdContextSendBackward - Call tdContextBringForward - Call tdContextSendToBack - Call tdContextBringToFront - Call tdContextInFrontOfObject - Call tdContextBehindObject - Call tdContextReverse + Datei = ConvertPath (gOfficePath + "user\work\" + "anord.odg") + Call tiDatei_Fuer_Anordnen_Erstellen ' is needed for the following test :-( ueber vars are set here + Call tdContextSendBackward + Call tdContextBringForward + Call tdContextSendToBack + Call tdContextBringToFront + Call tdContextInFrontOfObject + Call tdContextBehindObject + Call tdContextReverse Call hStatusOut end sub diff --git a/testautomation/graphics/optional/g_autocorrection.bas b/testautomation/graphics/optional/g_autocorrection.bas index fa7e30b23fb2..930af7c778e9 100755 --- a/testautomation/graphics/optional/g_autocorrection.bas +++ b/testautomation/graphics/optional/g_autocorrection.bas @@ -1,7 +1,7 @@ 'encoding UTF-8 Do not remove or change this line! '************************************************************************** '* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. -'* +'* '* Copyright 2008 by Sun Microsystems, Inc. '* '* OpenOffice.org - a multi-platform office productivity suite @@ -48,12 +48,11 @@ sub main use "graphics\tools\id_tools_2.inc" use "graphics\optional\includes\global\g_autocorrection.inc" - GetOLEDefaultNames hSetLocaleStrings ( gTesttoolPath + "graphics\tools\locale_1.txt" , glLocale () ) gApplication = "IMPRESS" PrintLog "-------------------------" + gApplication + "-------------------" -'qaErrorLog "#i76832# - tToolsAutocorrectCustomQuotes (x4) outcommented due to Bug." + 'qaErrorLog "#i76832# - tToolsAutocorrectCustomQuotes (x4) outcommented due to Bug." Call tToolsAutocorrectCustomQuotes (TRUE) Call tToolsAutocorrectCustomQuotes (FALSE) Call tToolsAutocorrectOption diff --git a/testautomation/graphics/optional/g_character.bas b/testautomation/graphics/optional/g_character.bas index 85cff92a27ba..ce14ca025890 100755 --- a/testautomation/graphics/optional/g_character.bas +++ b/testautomation/graphics/optional/g_character.bas @@ -1,7 +1,7 @@ 'encoding UTF-8 Do not remove or change this line! '************************************************************************** '* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. -'* +'* '* Copyright 2008 by Sun Microsystems, Inc. '* '* OpenOffice.org - a multi-platform office productivity suite @@ -47,19 +47,19 @@ sub main PrintLog "-------------------------" + gApplication + "-------------------" - Call tDialogCharacter - Call tFormatCharacter - Call tSetFormatCharacter - Call tGetFormatCharacter + Call tDialogCharacter + Call tFormatCharacter + Call tSetFormatCharacter + Call tGetFormatCharacter gApplication = "DRAW" PrintLog "-------------------------" + gApplication + "-------------------" - Call tDialogCharacter - Call tFormatCharacter + Call tDialogCharacter + Call tFormatCharacter - Call tSetFormatCharacter - Call tGetFormatCharacter + Call tSetFormatCharacter + Call tGetFormatCharacter Call hStatusOut end sub diff --git a/testautomation/graphics/optional/g_clipboard.bas b/testautomation/graphics/optional/g_clipboard.bas index 13fb611ca854..1d3c8e9d6898 100755 --- a/testautomation/graphics/optional/g_clipboard.bas +++ b/testautomation/graphics/optional/g_clipboard.bas @@ -1,7 +1,7 @@ 'encoding UTF-8 Do not remove or change this line! '************************************************************************** '* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. -'* +'* '* Copyright 2008 by Sun Microsystems, Inc. '* '* OpenOffice.org - a multi-platform office productivity suite @@ -48,29 +48,28 @@ sub main use "graphics\tools\id_tools_2.inc" use "graphics\optional\includes\global\g_clipboard.inc" - GetOLEDefaultNames hSetLocaleStrings ( gTesttoolPath + "graphics\tools\locale_1.txt" , glLocale () ) PrintLog "-------------------------" + gApplication + "-------------------" - Call tiEditPasteSpecial - Call tiEditUndo - Call tiEditRedo - Call tiEditClipboard - Call tiEditPasteSpecial_HTML - Call tdEditPasteSpecial_Text - Call tdEditPasteSpecial_Graphic - Call tdEditPasteSpecial_Circle + Call tiEditPasteSpecial + Call tiEditUndo + Call tiEditRedo + Call tiEditClipboard + Call tiEditPasteSpecial_HTML + Call tdEditPasteSpecial_Text + Call tdEditPasteSpecial_Graphic + Call tdEditPasteSpecial_Circle gApplication = "DRAW" PrintLog "-------------------------" + gApplication + "-------------------" - Call tiEditPasteSpecial - Call tiEditUndo - Call tiEditRedo - Call tiEditClipboard - Call tiEditPasteSpecial_HTML - Call tdEditPasteSpecial_Text - Call tdEditPasteSpecial_Graphic - Call tdEditPasteSpecial_Circle + Call tiEditPasteSpecial + Call tiEditUndo + Call tiEditRedo + Call tiEditClipboard + Call tiEditPasteSpecial_HTML + Call tdEditPasteSpecial_Text + Call tdEditPasteSpecial_Graphic + Call tdEditPasteSpecial_Circle Call hStatusOut end sub diff --git a/testautomation/graphics/optional/g_clipexport.bas b/testautomation/graphics/optional/g_clipexport.bas index 8f14289658ee..338dcdb93772 100755 --- a/testautomation/graphics/optional/g_clipexport.bas +++ b/testautomation/graphics/optional/g_clipexport.bas @@ -1,7 +1,7 @@ 'encoding UTF-8 Do not remove or change this line! '************************************************************************** '* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. -'* +'* '* Copyright 2008 by Sun Microsystems, Inc. '* '* OpenOffice.org - a multi-platform office productivity suite @@ -38,7 +38,7 @@ '\****************************************************************** sub main - Call hStatusIn ( "Graphics","g_clipexport.bas") + Call hStatusIn ( "Graphics","g_clipexport.bas") use "graphics\tools\id_tools.inc" use "graphics\tools\id_tools_2.inc" @@ -51,24 +51,24 @@ sub main gApplication = "IMPRESS" PrintLog "-------------------------" + gApplication + "-------------------" - Call tClipboardFromDrawTest + Call tClipboardFromDrawTest -'TODO FHA - Find and write bugs for exporting to writer and calc. -' gApplication = "WRITER" -' PrintLog "-------------------------" + gApplication + "-------------------" -' Call tClipboardFromDrawTest + 'TODO FHA - Find and write bugs for exporting to writer and calc. + ' gApplication = "WRITER" + ' PrintLog "-------------------------" + gApplication + "-------------------" + ' Call tClipboardFromDrawTest -' gApplication = "CALC" -' PrintLog "-------------------------" + gApplication + "-------------------" -' Call tClipboardFromDrawTest + ' gApplication = "CALC" + ' PrintLog "-------------------------" + gApplication + "-------------------" + ' Call tClipboardFromDrawTest - Call hStatusOut + Call hStatusOut end sub sub LoadIncludeFiles - use "global\system\includes\master.inc" - use "global\system\includes\gvariabl.inc" - use "global\tools\includes\required\t_menu.inc" 'Window-control - gApplication = "DRAW" - Call GetUseFiles + use "global\system\includes\master.inc" + use "global\system\includes\gvariabl.inc" + use "global\tools\includes\required\t_menu.inc" 'Window-control + gApplication = "DRAW" + Call GetUseFiles end sub diff --git a/testautomation/graphics/optional/g_convertto.bas b/testautomation/graphics/optional/g_convertto.bas index d453025659a6..11c926e034ef 100755 --- a/testautomation/graphics/optional/g_convertto.bas +++ b/testautomation/graphics/optional/g_convertto.bas @@ -1,7 +1,7 @@ 'encoding UTF-8 Do not remove or change this line! '************************************************************************** '* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. -'* +'* '* Copyright 2008 by Sun Microsystems, Inc. '* '* OpenOffice.org - a multi-platform office productivity suite @@ -49,23 +49,23 @@ sub main use "graphics\optional\includes\global\g_convertto.inc" PrintLog "-------------------------" + gApplication + "-------------------" - Call tiModifyConvertToPolygon - Call tdContextConvertIntoBitmap - Call tiAendernUmwandelnInKurve - Call tiAendernUmwandelnInPolygonGrafik - Call tiAendernUmwandelnIn3D - Call tiAendernUmwandelnIn3DRotationsKoerper - Call tiAendernUmwandelnInMetaFile + Call tiModifyConvertToPolygon + Call tdContextConvertIntoBitmap + Call tiAendernUmwandelnInKurve + Call tiAendernUmwandelnInPolygonGrafik + Call tiAendernUmwandelnIn3D + Call tiAendernUmwandelnIn3DRotationsKoerper + Call tiAendernUmwandelnInMetaFile gApplication = "DRAW" PrintLog "-------------------------" + gApplication + "-------------------" - Call tiModifyConvertToPolygon - Call tdContextConvertIntoBitmap - Call tiAendernUmwandelnInKurve - Call tiAendernUmwandelnInPolygonGrafik - Call tiAendernUmwandelnIn3D - Call tiAendernUmwandelnIn3DRotationsKoerper - Call tiAendernUmwandelnInMetaFile + Call tiModifyConvertToPolygon + Call tdContextConvertIntoBitmap + Call tiAendernUmwandelnInKurve + Call tiAendernUmwandelnInPolygonGrafik + Call tiAendernUmwandelnIn3D + Call tiAendernUmwandelnIn3DRotationsKoerper + Call tiAendernUmwandelnInMetaFile Call hStatusOut end sub diff --git a/testautomation/graphics/optional/g_crossfading.bas b/testautomation/graphics/optional/g_crossfading.bas index 3967f71937b1..b14c43a59e6f 100755 --- a/testautomation/graphics/optional/g_crossfading.bas +++ b/testautomation/graphics/optional/g_crossfading.bas @@ -1,7 +1,7 @@ 'encoding UTF-8 Do not remove or change this line! '************************************************************************** '* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. -'* +'* '* Copyright 2008 by Sun Microsystems, Inc. '* '* OpenOffice.org - a multi-platform office productivity suite @@ -45,18 +45,18 @@ sub main use "graphics\optional\includes\global\g_crossfading.inc" PrintLog "-------------------------" + gApplication + "-------------------" - Call tCrossfading + Call tCrossfading gApplication = "IMPRESS" PrintLog "-------------------------" + gApplication + "-------------------" - Call tCrossfading + Call tCrossfading Call hStatusOut end sub sub LoadIncludeFiles - use "global\system\includes\master.inc" - use "global\system\includes\gvariabl.inc" - gApplication = "DRAW" - Call GetUseFiles + use "global\system\includes\master.inc" + use "global\system\includes\gvariabl.inc" + gApplication = "DRAW" + Call GetUseFiles end sub diff --git a/testautomation/graphics/optional/g_customshapes.bas b/testautomation/graphics/optional/g_customshapes.bas index 6a99f090ad04..acd377085258 100755 --- a/testautomation/graphics/optional/g_customshapes.bas +++ b/testautomation/graphics/optional/g_customshapes.bas @@ -1,7 +1,7 @@ 'encoding UTF-8 Do not remove or change this line! '************************************************************************** '* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. -'* +'* '* Copyright 2008 by Sun Microsystems, Inc. '* '* OpenOffice.org - a multi-platform office productivity suite @@ -50,8 +50,8 @@ sub main gApplication = "DRAW" PrintLog "--------------------- " + gApplication + " -------------------" - Call tFormatPaintbrush - Call tCustomshapes + Call tFormatPaintbrush + Call tCustomshapes Call hStatusOut end sub diff --git a/testautomation/graphics/optional/g_demoguide.bas b/testautomation/graphics/optional/g_demoguide.bas index 819cfa73d062..687f9105c32f 100755 --- a/testautomation/graphics/optional/g_demoguide.bas +++ b/testautomation/graphics/optional/g_demoguide.bas @@ -1,7 +1,7 @@ 'encoding UTF-8 Do not remove or change this line! '************************************************************************** '* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. -'* +'* '* Copyright 2008 by Sun Microsystems, Inc. '* '* OpenOffice.org - a multi-platform office productivity suite @@ -50,7 +50,7 @@ sub main call t_Introduction call t_Interoperability call t_DrawingEngine - + Call hStatusOut end sub diff --git a/testautomation/graphics/optional/g_dimensions.bas b/testautomation/graphics/optional/g_dimensions.bas index 33a4f42ed0a9..16191e5a2faa 100755 --- a/testautomation/graphics/optional/g_dimensions.bas +++ b/testautomation/graphics/optional/g_dimensions.bas @@ -1,7 +1,7 @@ 'encoding UTF-8 Do not remove or change this line! '************************************************************************** '* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. -'* +'* '* Copyright 2008 by Sun Microsystems, Inc. '* '* OpenOffice.org - a multi-platform office productivity suite @@ -44,11 +44,11 @@ sub main use "graphics\optional\includes\global\g_dimensions.inc" PrintLog "-------------------------" + gApplication + "-------------------" - Call testFormatDimensioning + Call testFormatDimensioning gApplication = "DRAW" PrintLog "-------------------------" + gApplication + "-------------------" - Call testFormatDimensioning + Call testFormatDimensioning Call hStatusOut end sub diff --git a/testautomation/graphics/optional/g_edit.bas b/testautomation/graphics/optional/g_edit.bas index 22d37329bf8e..57027be7b396 100755 --- a/testautomation/graphics/optional/g_edit.bas +++ b/testautomation/graphics/optional/g_edit.bas @@ -1,7 +1,7 @@ 'encoding UTF-8 Do not remove or change this line! '************************************************************************** '* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. -'* +'* '* Copyright 2008 by Sun Microsystems, Inc. '* '* OpenOffice.org - a multi-platform office productivity suite @@ -48,20 +48,20 @@ sub main GetOLEDefaultNames PrintLog "-------------------------" + gApplication + "-------------------" - Call tEditDuplicate - Call tEditFields - Call tEditDeleteSlide - Call tEditLinks - Call tEditObjectEdit + Call tEditDuplicate + Call tEditFields + Call tEditDeleteSlide + Call tEditLinks + Call tEditObjectEdit gApplication = "DRAW" PrintLog "-------------------------" + gApplication + "-------------------" - Call tEditDuplicate - Call tEditFields - Call tEditDeleteSlide - Call tEditLinks - Call tdEditDeleteLayer - Call tEditObjectEdit + Call tEditDuplicate + Call tEditFields + Call tEditDeleteSlide + Call tEditLinks + Call tdEditDeleteLayer + Call tEditObjectEdit Call hStatusOut end sub @@ -69,6 +69,7 @@ end sub sub LoadIncludeFiles use "global\system\includes\master.inc" use "global\system\includes\gvariabl.inc" + use "global\tools\includes\optional\t_ole.inc" Call GetUseFiles gApplication = "IMPRESS" end sub diff --git a/testautomation/graphics/optional/g_export_html.bas b/testautomation/graphics/optional/g_export_html.bas index 43fff300041c..487b93722738 100755 --- a/testautomation/graphics/optional/g_export_html.bas +++ b/testautomation/graphics/optional/g_export_html.bas @@ -1,7 +1,7 @@ 'encoding UTF-8 Do not remove or change this line! '************************************************************************** '* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. -'* +'* '* Copyright 2008 by Sun Microsystems, Inc. '* '* OpenOffice.org - a multi-platform office productivity suite @@ -46,16 +46,15 @@ sub main use "graphics\tools\id_tools.inc" use "graphics\optional\includes\global\g_export_html.inc" - GetOLEDefaultNames hSetLocaleStrings ( gTesttoolPath + "graphics\tools\locale_1.txt" , glLocale () ) PrintLog "-------------------------" + gApplication + "-------------------" - Call tHTMLExport - Call tHtmlExport_Webcast + Call tHTMLExport + Call tHtmlExport_Webcast gApplication = "DRAW" PrintLog "-------------------------" + gApplication + "-------------------" - Call tHTMLExport + Call tHTMLExport Call hStatusOut end sub diff --git a/testautomation/graphics/optional/g_findreplace.bas b/testautomation/graphics/optional/g_findreplace.bas index cf013a01f2c8..d38945373b4e 100755 --- a/testautomation/graphics/optional/g_findreplace.bas +++ b/testautomation/graphics/optional/g_findreplace.bas @@ -1,7 +1,7 @@ 'encoding UTF-8 Do not remove or change this line! '************************************************************************** '* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. -'* +'* '* Copyright 2008 by Sun Microsystems, Inc. '* '* OpenOffice.org - a multi-platform office productivity suite @@ -40,28 +40,27 @@ public glLocale (15*20) as string sub main - Call hStatusIn ( "Graphics","g_findreplace.bas") + Call hStatusIn ( "Graphics","g_findreplace.bas") use "graphics\tools\id_tools.inc" use "graphics\optional\includes\global\g_find_replace.inc" - GetOLEDefaultNames - hSetLocaleStrings ( gTesttoolPath + "graphics\tools\locale_1.txt" , glLocale () ) + hSetLocaleStrings ( gTesttoolPath + "graphics\tools\locale_1.txt" , glLocale () ) - PrintLog "-------------------------" + gApplication + "-------------------" - Call tiEditSearchAndReplace - Call tiEditSearchAndReplaceBUGS + PrintLog "-------------------------" + gApplication + "-------------------" + Call tiEditSearchAndReplace + Call tiEditSearchAndReplaceBUGS - gApplication = "DRAW" - PrintLog "-------------------------" + gApplication + "-------------------" - Call tiEditSearchAndReplace + gApplication = "DRAW" + PrintLog "-------------------------" + gApplication + "-------------------" + Call tiEditSearchAndReplace - Call hStatusOut + Call hStatusOut end sub sub LoadIncludeFiles - use "global\system\includes\master.inc" - use "global\system\includes\gvariabl.inc" - gApplication = "IMPRESS" - Call GetUseFiles + use "global\system\includes\master.inc" + use "global\system\includes\gvariabl.inc" + gApplication = "IMPRESS" + Call GetUseFiles end sub diff --git a/testautomation/graphics/optional/g_format.bas b/testautomation/graphics/optional/g_format.bas index bd2bc0fee601..e1ac1c84d503 100755 --- a/testautomation/graphics/optional/g_format.bas +++ b/testautomation/graphics/optional/g_format.bas @@ -1,7 +1,7 @@ 'encoding UTF-8 Do not remove or change this line! '************************************************************************** '* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. -'* +'* '* Copyright 2008 by Sun Microsystems, Inc. '* '* OpenOffice.org - a multi-platform office productivity suite @@ -48,22 +48,22 @@ sub main use "graphics\optional\includes\global\g_format.inc" PrintLog "-------------------------" + gApplication + "-------------------" - Call tiFormatText - Call tiFormatPositionAndSize - Call tdFormatConnector - Call tiFormat3D_Effekte - Call tiFormatAufzaehlungszeichen - Call tdFormatTemplates + Call tiFormatText + Call tiFormatPositionAndSize + Call tdFormatConnector + Call tiFormat3D_Effekte + Call tiFormatAufzaehlungszeichen + Call tdFormatTemplates gApplication = "DRAW" PrintLog "-------------------------" + gApplication + "-------------------" - Call tiFormatText - Call tdFormatLayer - Call tiFormatPositionAndSize - Call tdFormatConnector - Call tiFormat3D_Effekte - Call tiFormatAufzaehlungszeichen - Call tdFormatTemplates + Call tiFormatText + Call tdFormatLayer + Call tiFormatPositionAndSize + Call tdFormatConnector + Call tiFormat3D_Effekte + Call tiFormatAufzaehlungszeichen + Call tdFormatTemplates Call hStatusOut end sub diff --git a/testautomation/graphics/optional/g_group.bas b/testautomation/graphics/optional/g_group.bas index 7841eee6f843..e55e7180cde9 100755 --- a/testautomation/graphics/optional/g_group.bas +++ b/testautomation/graphics/optional/g_group.bas @@ -1,7 +1,7 @@ 'encoding UTF-8 Do not remove or change this line! '************************************************************************** '* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. -'* +'* '* Copyright 2008 by Sun Microsystems, Inc. '* '* OpenOffice.org - a multi-platform office productivity suite @@ -45,11 +45,11 @@ sub main use "graphics\optional\includes\global\g_group.inc" PrintLog "-------------------------" + gApplication + "-------------------" - Call tiGruppierung + Call tiGruppierung gApplication = "DRAW" PrintLog "-------------------------" + gApplication + "-------------------" - Call tiGruppierung + Call tiGruppierung Call hStatusOut end sub diff --git a/testautomation/graphics/optional/g_imagemap.bas b/testautomation/graphics/optional/g_imagemap.bas index d358f9d60270..0e333a61a35a 100755 --- a/testautomation/graphics/optional/g_imagemap.bas +++ b/testautomation/graphics/optional/g_imagemap.bas @@ -1,7 +1,7 @@ 'encoding UTF-8 Do not remove or change this line! '************************************************************************** '* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. -'* +'* '* Copyright 2008 by Sun Microsystems, Inc. '* '* OpenOffice.org - a multi-platform office productivity suite @@ -45,20 +45,20 @@ sub main use "graphics\optional\includes\global\g_imagemap.inc" PrintLog "-------------------------" + gApplication + "-------------------" - Call tEditImageMap - Call tEditImageMapProperties + Call tEditImageMap + Call tEditImageMapProperties gApplication = "DRAW" PrintLog "-------------------------" + gApplication + "-------------------" - Call tEditImageMap - Call tEditImageMapProperties - + Call tEditImageMap + Call tEditImageMapProperties + Call hStatusOut end sub sub LoadIncludeFiles - use "global\system\includes\master.inc" - use "global\system\includes\gvariabl.inc" - gApplication = "IMPRESS" - Call GetUseFiles + use "global\system\includes\master.inc" + use "global\system\includes\gvariabl.inc" + gApplication = "IMPRESS" + Call GetUseFiles end sub diff --git a/testautomation/graphics/optional/g_insert.bas b/testautomation/graphics/optional/g_insert.bas index 2abe9d6e1978..c63ce708198f 100755 --- a/testautomation/graphics/optional/g_insert.bas +++ b/testautomation/graphics/optional/g_insert.bas @@ -1,7 +1,7 @@ 'encoding UTF-8 Do not remove or change this line! '************************************************************************** '* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. -'* +'* '* Copyright 2008 by Sun Microsystems, Inc. '* '* OpenOffice.org - a multi-platform office productivity suite @@ -48,7 +48,6 @@ sub main use "graphics\tools\id_tools_2.inc" use "graphics\optional\includes\global\g_insert.inc" - GetOLEDefaultNames hSetLocaleStrings ( gTesttoolPath + "graphics\tools\locale_1.txt" , glLocale () ) PrintLog "-------------------------" + gApplication + "-------------------" @@ -71,8 +70,8 @@ sub main Call tInsertFloatingFrame Call tInsertFields -QaErrorLog "#79794 - tdInsertObjectOleObjects outcommented due to bug." -' Call tdInsertObjectOleObjects + QaErrorLog "#79794 - tdInsertObjectOleObjects outcommented due to bug." + ' Call tdInsertObjectOleObjects Printlog "Disabled SnappPointLine test, because of unpredictable mouse moves (07/2002 TBO)" 'Call tdInsertSnappoint_Line @@ -86,15 +85,15 @@ QaErrorLog "#79794 - tdInsertObjectOleObjects outcommented due to bug." Call tInsertObjectPlugIn ' Doesn't exist in the VCL Call tInsertObjectApplet Call tInsertObjectFormula ' Is in the VCL in InsertObjectOLEObject -' Call tInsertChart + ' Call tInsertChart Call tdInsertFile Call hStatusOut end sub sub LoadIncludeFiles - use "global\system\includes\master.inc" - use "global\system\includes\gvariabl.inc" - gApplication = "IMPRESS" - Call GetUseFiles + use "global\system\includes\master.inc" + use "global\system\includes\gvariabl.inc" + gApplication = "IMPRESS" + Call GetUseFiles end sub diff --git a/testautomation/graphics/optional/g_line.bas b/testautomation/graphics/optional/g_line.bas index d6e8501c0340..c30e6ea5c705 100755 --- a/testautomation/graphics/optional/g_line.bas +++ b/testautomation/graphics/optional/g_line.bas @@ -1,7 +1,7 @@ 'encoding UTF-8 Do not remove or change this line! '************************************************************************** '* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. -'* +'* '* Copyright 2008 by Sun Microsystems, Inc. '* '* OpenOffice.org - a multi-platform office productivity suite @@ -44,13 +44,13 @@ sub main use "graphics\optional\includes\global\g_line.inc" PrintLog "-------------------------" + gApplication + "-------------------" - Call tiFormatLine - Call tLineConnect + Call tiFormatLine + Call tLineConnect gApplication = "DRAW" PrintLog "-------------------------" + gApplication + "-------------------" - Call tiFormatLine - Call tLineConnect + Call tiFormatLine + Call tLineConnect Call hStatusOut diff --git a/testautomation/graphics/optional/g_load_save.bas b/testautomation/graphics/optional/g_load_save.bas index 2800bd8512f1..67fa20dec497 100755 --- a/testautomation/graphics/optional/g_load_save.bas +++ b/testautomation/graphics/optional/g_load_save.bas @@ -1,7 +1,7 @@ 'encoding UTF-8 Do not remove or change this line! '************************************************************************** '* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. -'* +'* '* Copyright 2008 by Sun Microsystems, Inc. '* '* OpenOffice.org - a multi-platform office productivity suite @@ -49,39 +49,38 @@ sub main use "graphics\tools\id_tools_2.inc" use "graphics\optional\includes\global\g_load_save.inc" - GetOLEDefaultNames hSetLocaleStrings ( gTesttoolPath + "graphics\tools\locale_1.txt" , glLocale () ) PrintLog "-------------------------" + gApplication + "-------------------" - Call tFileOpenSaveEtc - Call tFileProperties - Call tFilePassword52 - Call tFileOpenImport - Call tTestDXF255CharBug - Call tDeletedTemplate - call tSaveLoadLayoutEmpty - call tSaveLoadLayoutOLE - call tSaveLoadLayoutText - call tSaveLoadLayoutOutline - call tSaveLoadLayoutPicture - call tSaveLoadLayoutChart - call tSaveLoadLayoutSpreadsheet + Call tFileOpenSaveEtc + Call tFileProperties + Call tFilePassword52 + Call tFileOpenImport + Call tTestDXF255CharBug + Call tDeletedTemplate + call tSaveLoadLayoutEmpty + call tSaveLoadLayoutOLE + call tSaveLoadLayoutText + call tSaveLoadLayoutOutline + call tSaveLoadLayoutPicture + call tSaveLoadLayoutChart + call tSaveLoadLayoutSpreadsheet gApplication = "IMPRESS" PrintLog "-------------------------" + gApplication + "-------------------" - Call tFileOpenSaveEtc - Call tFileProperties - Call tFilePassword52 - Call tFileOpenImport - Call tTestDXF255CharBug - Call tDeletedTemplate - call tSaveLoadLayoutEmpty - call tSaveLoadLayoutOLE - call tSaveLoadLayoutText - call tSaveLoadLayoutOutline - call tSaveLoadLayoutPicture - call tSaveLoadLayoutChart - call tSaveLoadLayoutSpreadsheet + Call tFileOpenSaveEtc + Call tFileProperties + Call tFilePassword52 + Call tFileOpenImport + Call tTestDXF255CharBug + Call tDeletedTemplate + call tSaveLoadLayoutEmpty + call tSaveLoadLayoutOLE + call tSaveLoadLayoutText + call tSaveLoadLayoutOutline + call tSaveLoadLayoutPicture + call tSaveLoadLayoutChart + call tSaveLoadLayoutSpreadsheet Call hStatusOut end sub diff --git a/testautomation/graphics/optional/g_mediaplayer.bas b/testautomation/graphics/optional/g_mediaplayer.bas index bc143d7d68f9..f66b65a125b8 100755 --- a/testautomation/graphics/optional/g_mediaplayer.bas +++ b/testautomation/graphics/optional/g_mediaplayer.bas @@ -1,7 +1,7 @@ 'encoding UTF-8 Do not remove or change this line! '************************************************************************** '* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. -'* +'* '* Copyright 2008 by Sun Microsystems, Inc. '* '* OpenOffice.org - a multi-platform office productivity suite @@ -47,7 +47,7 @@ sub main PrintLog "-------------------------" + gApplication + "-------------------" call g_mediaplayer gApplication = "DRAW" - + PrintLog "-------------------------" + gApplication + "-------------------" call g_mediaplayer diff --git a/testautomation/graphics/optional/g_navigator.bas b/testautomation/graphics/optional/g_navigator.bas index b0a2caa83c1e..f6464a0c237e 100755 --- a/testautomation/graphics/optional/g_navigator.bas +++ b/testautomation/graphics/optional/g_navigator.bas @@ -1,7 +1,7 @@ 'encoding UTF-8 Do not remove or change this line! '************************************************************************** '* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. -'* +'* '* Copyright 2008 by Sun Microsystems, Inc. '* '* OpenOffice.org - a multi-platform office productivity suite @@ -41,30 +41,30 @@ sub main use "graphics\tools\id_tools.inc" use "graphics\tools\id_tools_2.inc" use "graphics\optional\includes\global\g_navigator.inc" - + PrintLog "------------------------- g_navigator test -------------------------" Call hStatusIn ( "Graphics","g_navigator.bas") PrintLog "-------------------------" + gApplication + "-------------------" - Call tViewNavigatorZOrder - Call tdViewNavigator - Call tViewNavigatorGroupedObjects - Call tViewNavigatorNameActivated + Call tViewNavigatorZOrder + Call tdViewNavigator + Call tViewNavigatorGroupedObjects + Call tViewNavigatorNameActivated gApplication = "DRAW" PrintLog "-------------------------" + gApplication + "-------------------" - Call tViewNavigatorZOrder - Call tdViewNavigator - Call tViewNavigatorGroupedObjects - Call tViewNavigatorNameActivated + Call tViewNavigatorZOrder + Call tdViewNavigator + Call tViewNavigatorGroupedObjects + Call tViewNavigatorNameActivated Call hStatusOut end sub sub LoadIncludeFiles - use "global\system\includes\master.inc" - use "global\system\includes\gvariabl.inc" - - gApplication = "IMPRESS" - Call GetUseFiles + use "global\system\includes\master.inc" + use "global\system\includes\gvariabl.inc" + + gApplication = "IMPRESS" + Call GetUseFiles end sub diff --git a/testautomation/graphics/optional/g_ole.bas b/testautomation/graphics/optional/g_ole.bas index 4f75f10508c1..652ae4fd044e 100755 --- a/testautomation/graphics/optional/g_ole.bas +++ b/testautomation/graphics/optional/g_ole.bas @@ -1,7 +1,7 @@ 'encoding UTF-8 Do not remove or change this line! '************************************************************************** '* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. -'* +'* '* Copyright 2008 by Sun Microsystems, Inc. '* '* OpenOffice.org - a multi-platform office productivity suite diff --git a/testautomation/graphics/optional/g_paneview.bas b/testautomation/graphics/optional/g_paneview.bas index 04955496744e..cc24a437eab0 100755 --- a/testautomation/graphics/optional/g_paneview.bas +++ b/testautomation/graphics/optional/g_paneview.bas @@ -1,7 +1,7 @@ 'encoding UTF-8 Do not remove or change this line! '************************************************************************** '* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. -'* +'* '* Copyright 2008 by Sun Microsystems, Inc. '* '* OpenOffice.org - a multi-platform office productivity suite @@ -48,14 +48,14 @@ sub main use "graphics\optional\includes\global\g_paneview.inc" PrintLog "-------------------------" + gApplication + "-------------------" - call tiMinimize_Maximize_Docking_SlidePane - call tiMinimize_Maximize_Docking_TaskPane - call tiPaneview_LoadSave_Windowsstate + call tiMinimize_Maximize_Docking_SlidePane + call tiMinimize_Maximize_Docking_TaskPane + call tiPaneview_LoadSave_Windowsstate gApplication = "DRAW" PrintLog "-------------------------" + gApplication + "-------------------" - call tdMinimize_Maximize_Docking_Pagepane - call tdPaneview_LoadSave_Windowsstate + call tdMinimize_Maximize_Docking_Pagepane + call tdPaneview_LoadSave_Windowsstate Call hStatusOut end sub diff --git a/testautomation/graphics/optional/g_paragraph.bas b/testautomation/graphics/optional/g_paragraph.bas index 52bfc72c1dd0..dd8023cce503 100755 --- a/testautomation/graphics/optional/g_paragraph.bas +++ b/testautomation/graphics/optional/g_paragraph.bas @@ -1,7 +1,7 @@ 'encoding UTF-8 Do not remove or change this line! '************************************************************************** '* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. -'* +'* '* Copyright 2008 by Sun Microsystems, Inc. '* '* OpenOffice.org - a multi-platform office productivity suite @@ -45,11 +45,11 @@ sub main use "graphics\tools\id_tools.inc" PrintLog "-------------------------" + gApplication + "-------------------" - Call tdFormatParagraph + Call tdFormatParagraph gApplication = "DRAW" PrintLog "-------------------------" + gApplication + "-------------------" - Call tdFormatParagraph + Call tdFormatParagraph Call hStatusOut end sub diff --git a/testautomation/graphics/optional/g_print.bas b/testautomation/graphics/optional/g_print.bas index a08905c7ae99..73ec23a9fef6 100755 --- a/testautomation/graphics/optional/g_print.bas +++ b/testautomation/graphics/optional/g_print.bas @@ -1,7 +1,7 @@ 'encoding UTF-8 Do not remove or change this line! '************************************************************************** '* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. -'* +'* '* Copyright 2008 by Sun Microsystems, Inc. '* '* OpenOffice.org - a multi-platform office productivity suite @@ -47,11 +47,11 @@ sub main use "graphics\optional\includes\global\g_print.inc" PrintLog "-------------------------" + gApplication + "-------------------" - call tFilePrint + call tFilePrint gApplication = "DRAW" PrintLog "-------------------------" + gApplication + "-------------------" - call tFilePrint + call tFilePrint Call hStatusOut end sub diff --git a/testautomation/graphics/optional/g_savepictureas.bas b/testautomation/graphics/optional/g_savepictureas.bas index b6fed70b9f53..b43029c164f0 100755 --- a/testautomation/graphics/optional/g_savepictureas.bas +++ b/testautomation/graphics/optional/g_savepictureas.bas @@ -1,7 +1,7 @@ 'encoding UTF-8 Do not remove or change this line! '************************************************************************** '* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. -'* +'* '* Copyright 2008 by Sun Microsystems, Inc. '* '* OpenOffice.org - a multi-platform office productivity suite @@ -42,7 +42,7 @@ global Document as string sub main Printlog "--------------------- Graphics Export Test ------------------- " - Call hStatusIn ( "Graphics","g_savepictureas.bas", "Save Picture As -Test" ) + Call hStatusIn ( "Graphics","g_savepictureas.bas" ) use "graphics\tools\id_tools.inc" use "graphics\optional\includes\global\g_savepictureas.inc" @@ -51,7 +51,7 @@ sub main Call tContextSaveAsPicture Call tContextSavePictureLinkAsPicture Call Mnemonickey - + gApplication = "DRAW" PrintLog "-------------------------" + gApplication + "-------------------" Call tContextSaveAsPicture diff --git a/testautomation/graphics/optional/g_shaddow.bas b/testautomation/graphics/optional/g_shaddow.bas index 1231ab4c51dc..2453aa60867e 100755 --- a/testautomation/graphics/optional/g_shaddow.bas +++ b/testautomation/graphics/optional/g_shaddow.bas @@ -1,7 +1,7 @@ 'encoding UTF-8 Do not remove or change this line! '************************************************************************** '* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. -'* +'* '* Copyright 2008 by Sun Microsystems, Inc. '* '* OpenOffice.org - a multi-platform office productivity suite @@ -41,27 +41,26 @@ global glLocale (15*20) as string public ExtensionString as String sub main - Call hStatusIn ( "Graphics","g_shaddow.bas", "Shaddow-Optional Test" ) - GetOLEDefaultNames + Call hStatusIn ( "Graphics","g_shaddow.bas" ) use "graphics\tools\id_tools.inc" use "graphics\tools\id_tools_2.inc" use "graphics\optional\includes\global\g_shaddow.inc" - gApplication = "IMPRESS" - PrintLog "------------------------- " + gApplication + " Shaddow-Optional Test -------------------" - Call tiShaddow + gApplication = "IMPRESS" + PrintLog "------------------------- " + gApplication + " Shaddow-Optional Test -------------------" + Call tiShaddow - gApplication = "DRAW" - PrintLog "------------------------- " + gApplication + " Shaddow-Optional Test -------------------" - Call tiShaddow + gApplication = "DRAW" + PrintLog "------------------------- " + gApplication + " Shaddow-Optional Test -------------------" + Call tiShaddow - Call hStatusOut + Call hStatusOut end sub sub LoadIncludeFiles - use "global\system\includes\master.inc" - use "global\system\includes\gvariabl.inc" - gApplication = "DRAW" - Call GetUseFiles + use "global\system\includes\master.inc" + use "global\system\includes\gvariabl.inc" + gApplication = "DRAW" + Call GetUseFiles end sub diff --git a/testautomation/graphics/optional/g_slidelayer.bas b/testautomation/graphics/optional/g_slidelayer.bas index 8a243323932c..2b51d72a3762 100755 --- a/testautomation/graphics/optional/g_slidelayer.bas +++ b/testautomation/graphics/optional/g_slidelayer.bas @@ -1,7 +1,7 @@ 'encoding UTF-8 Do not remove or change this line! '************************************************************************** '* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. -'* +'* '* Copyright 2008 by Sun Microsystems, Inc. '* '* OpenOffice.org - a multi-platform office productivity suite @@ -50,26 +50,26 @@ sub main use "graphics\optional\includes\impress\i_slidelayer.inc" PrintLog "-------------------------" + gApplication + "-------------------" - Call tInsertSlide - Call tInsertDuplicateSlide - Call tiInsertExpandSlide ' only in impress - Call tiInsertSummarySlide ' only in impress - Call tiFormatSeitenlayout ' only in impress - Call t114174 ' only in impress - Call t111862 + Call tInsertSlide + Call tInsertDuplicateSlide + Call tiInsertExpandSlide ' only in impress + Call tiInsertSummarySlide ' only in impress + Call tiFormatSeitenlayout ' only in impress + Call t114174 ' only in impress + Call t111862 gApplication = "DRAW" PrintLog "-------------------------" + gApplication + "-------------------" - Call tInsertSlide - Call tInsertDuplicateSlide - Call tInsertLayer ' in impress not here, instead Edit->Layer->Insert + Call tInsertSlide + Call tInsertDuplicateSlide + Call tInsertLayer ' in impress not here, instead Edit->Layer->Insert Call hStatusOut end sub sub LoadIncludeFiles - use "global\system\includes\master.inc" - use "global\system\includes\gvariabl.inc" - gApplication = "IMPRESS" - Call GetUseFiles + use "global\system\includes\master.inc" + use "global\system\includes\gvariabl.inc" + gApplication = "IMPRESS" + Call GetUseFiles end sub diff --git a/testautomation/graphics/optional/g_spellcheck.bas b/testautomation/graphics/optional/g_spellcheck.bas index 4b06ae014b26..697e47b0828e 100755 --- a/testautomation/graphics/optional/g_spellcheck.bas +++ b/testautomation/graphics/optional/g_spellcheck.bas @@ -1,7 +1,7 @@ 'encoding UTF-8 Do not remove or change this line! '************************************************************************** '* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. -'* +'* '* Copyright 2008 by Sun Microsystems, Inc. '* '* OpenOffice.org - a multi-platform office productivity suite @@ -50,17 +50,17 @@ sub main hSetLocaleStrings ( gTesttoolPath + "graphics\tools\locale_1.txt" , glLocale () ) PrintLog "-------------------------" + gApplication + "-------------------" - Call tiToolsSpellcheckCorrect - Call tiToolsSpellcheckError - Call tiToolsSpellcheckCheck - Call tToolsSpellcheckAutoSpellcheck + Call tiToolsSpellcheckCorrect + Call tiToolsSpellcheckError + Call tiToolsSpellcheckCheck + Call tToolsSpellcheckAutoSpellcheck gApplication = "DRAW" PrintLog "-------------------------" + gApplication + "-------------------" - Call tiToolsSpellcheckCorrect - Call tiToolsSpellcheckError - Call tiToolsSpellcheckCheck - Call tToolsSpellcheckAutoSpellcheck + Call tiToolsSpellcheckCorrect + Call tiToolsSpellcheckError + Call tiToolsSpellcheckCheck + Call tToolsSpellcheckAutoSpellcheck Call hStatusOut end sub diff --git a/testautomation/graphics/optional/g_stylist.bas b/testautomation/graphics/optional/g_stylist.bas index 6ec8d4f4be7b..699679bc752e 100755 --- a/testautomation/graphics/optional/g_stylist.bas +++ b/testautomation/graphics/optional/g_stylist.bas @@ -1,7 +1,7 @@ 'encoding UTF-8 Do not remove or change this line! '************************************************************************** '* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. -'* +'* '* Copyright 2008 by Sun Microsystems, Inc. '* '* OpenOffice.org - a multi-platform office productivity suite @@ -42,7 +42,6 @@ public glLocale (15*20) as string sub main PrintLog "------------------------- Stylist Test -------------------" Call hStatusIn ( "Graphics","g_stylist.bas" ) - GetOLEDefaultNames use "graphics\tools\id_tools.inc" use "graphics\tools\id_tools_2.inc" @@ -60,24 +59,24 @@ sub main Call tFormatStylistDocuments Call tFormatStylistTemplatesUse Call tFormatStylistTemplateCreate -if iSprache <> "82" then - Call tFormatStylistTemplateSelect - Call tFormatStylistTemplateNew -else - qaerrorlog "#i65490# - Deactivated tFormatStylistTemplateSelect, tFormatStylistTemplateNew due to bug." -endif + if iSprache <> "82" then + Call tFormatStylistTemplateSelect + Call tFormatStylistTemplateNew + else + qaerrorlog "#i65490# - Deactivated tFormatStylistTemplateSelect, tFormatStylistTemplateNew due to bug." + endif call tiFormatStylist call tFormatStylist -if iSprache <> "81" then - if iSprache <> "82" then - Call tFormatStylistBackground - else - qaerrorlog "#i65534# - Deactivated tFormatStylistBackground due to bug under Korean." - endif -else - qaerrorlog "Deactivated tFormatStylistBackground due to string-name-difficulties." -endif + if iSprache <> "81" then + if iSprache <> "82" then + Call tFormatStylistBackground + else + qaerrorlog "#i65534# - Deactivated tFormatStylistBackground due to bug under Korean." + endif + else + qaerrorlog "Deactivated tFormatStylistBackground due to string-name-difficulties." + endif gApplication = "DRAW" PrintLog "-------------------------" + gApplication + "-------------------" @@ -85,13 +84,13 @@ endif Call tFormatStylistFlyer Call tFormatStylistDocuments Call tFormatStylistTemplatesUse -' Call tFormatStylistTemplateCreate -if iSprache <> "82" then - Call tFormatStylistTemplateSelect - Call tFormatStylistTemplateNew -else - qaerrorlog "#i65490# - Deactivated tFormatStylistTemplateSelect, tFormatStylistTemplateNew due to bug." -endif + ' Call tFormatStylistTemplateCreate + if iSprache <> "82" then + Call tFormatStylistTemplateSelect + Call tFormatStylistTemplateNew + else + qaerrorlog "#i65490# - Deactivated tFormatStylistTemplateSelect, tFormatStylistTemplateNew due to bug." + endif call tiFormatStylist call tFormatStylist diff --git a/testautomation/graphics/optional/g_tables.bas b/testautomation/graphics/optional/g_tables.bas index f585b343be70..0ebad8bc7506 100755 --- a/testautomation/graphics/optional/g_tables.bas +++ b/testautomation/graphics/optional/g_tables.bas @@ -1,7 +1,7 @@ 'encoding UTF-8 Do not remove or change this line! '************************************************************************** '* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. -'* +'* '* Copyright 2008 by Sun Microsystems, Inc. '* '* OpenOffice.org - a multi-platform office productivity suite @@ -40,25 +40,25 @@ sub main Printlog "------------------- Impress Tables Test -------------------------" call hStatusIn ("Graphics","i_tables.bas") - + use "graphics\optional\includes\global\g_tables.inc" - + PrintLog "-------------------------" + gApplication + "-------------------" - + call tiInsertTableUsingMenu - call tiInsertTableUsingButton + call tiInsertTableUsingButton call tiInsertTableUsingToolbarbutton - call tiTableObjectBar + call tiTableObjectBar gApplication = "DRAW" - + PrintLog "-------------------------" + gApplication + "-------------------" - + call tiInsertTableUsingMenu - call tiInsertTableUsingButton - call tiTableObjectBar - + call tiInsertTableUsingButton + call tiTableObjectBar + call hStatusOut - + end sub '---------------------------------------------- diff --git a/testautomation/graphics/optional/g_toolbars.bas b/testautomation/graphics/optional/g_toolbars.bas index f1dbbda362ae..810d99dccb70 100755 --- a/testautomation/graphics/optional/g_toolbars.bas +++ b/testautomation/graphics/optional/g_toolbars.bas @@ -1,7 +1,7 @@ 'encoding UTF-8 Do not remove or change this line! '************************************************************************** '* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. -'* +'* '* Copyright 2008 by Sun Microsystems, Inc. '* '* OpenOffice.org - a multi-platform office productivity suite @@ -43,25 +43,25 @@ sub main use "graphics\tools\id_tools.inc" use "graphics\optional\includes\global\g_toolbars.inc" - + PrintLog "-------------------------" + gApplication + "-------------------" Call Toolboxen_Rechtecke - Call Toolboxen_Kreise - Call Toolboxen_3DObjekte - Call Toolboxen_Kurven - Call Toolboxen_Linien - Call tToolsCustomize 'global\required\includes + Call Toolboxen_Kreise + Call Toolboxen_3DObjekte + Call Toolboxen_Kurven + Call Toolboxen_Linien + Call tToolsCustomize 'global\required\includes gApplication = "DRAW" PrintLog "-------------------------" + gApplication + "-------------------" - Call Toolboxen_Rechtecke - Call Toolboxen_Kreise - Call Toolboxen_3DObjekte - Call Toolboxen_Kurven - Call Toolboxen_Linien - Call tToolsCustomize 'global\required\includes + Call Toolboxen_Rechtecke + Call Toolboxen_Kreise + Call Toolboxen_3DObjekte + Call Toolboxen_Kurven + Call Toolboxen_Linien + Call tToolsCustomize 'global\required\includes Call hStatusOut end sub diff --git a/testautomation/graphics/optional/g_tools.bas b/testautomation/graphics/optional/g_tools.bas index 65e3227dd8eb..6b2ad5174351 100755 --- a/testautomation/graphics/optional/g_tools.bas +++ b/testautomation/graphics/optional/g_tools.bas @@ -1,7 +1,7 @@ 'encoding UTF-8 Do not remove or change this line! '************************************************************************** '* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. -'* +'* '* Copyright 2008 by Sun Microsystems, Inc. '* '* OpenOffice.org - a multi-platform office productivity suite @@ -45,23 +45,22 @@ sub main use "graphics\tools\id_tools.inc" use "graphics\optional\includes\global\g_tools.inc" - GetOLEDefaultNames hSetLocaleStrings ( gTesttoolPath + "graphics\tools\locale_1.txt" , glLocale () ) PrintLog "-------------------------" + gApplication + "-------------------" - Call tiToolsThesaurus - Call tiToolsHyphenation1 - Call tiToolsHyphenation2 - Call tToolsMacro + Call tiToolsThesaurus + Call tiToolsHyphenation1 + Call tiToolsHyphenation2 + Call tToolsMacro gApplication = "DRAW" PrintLog "-------------------------" + gApplication + "-------------------" - Call tiToolsThesaurus - Call tiToolsHyphenation1 - Call tiToolsHyphenation2 - Call tToolsMacro + Call tiToolsThesaurus + Call tiToolsHyphenation1 + Call tiToolsHyphenation2 + Call tToolsMacro - Call hStatusOut + Call hStatusOut end sub sub LoadIncludeFiles diff --git a/testautomation/graphics/optional/g_zoom.bas b/testautomation/graphics/optional/g_zoom.bas index 0e7e4779967d..81eefeae2659 100755 --- a/testautomation/graphics/optional/g_zoom.bas +++ b/testautomation/graphics/optional/g_zoom.bas @@ -1,7 +1,7 @@ 'encoding UTF-8 Do not remove or change this line! '************************************************************************** '* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. -'* +'* '* Copyright 2008 by Sun Microsystems, Inc. '* '* OpenOffice.org - a multi-platform office productivity suite @@ -46,11 +46,11 @@ sub main use "graphics\optional\includes\global\g_zoom.inc" PrintLog "-------------------------" + gApplication + "-------------------" - Call tViewZoom + Call tViewZoom gApplication = "DRAW" PrintLog "-------------------------" + gApplication + "-------------------" - Call tViewZoom + Call tViewZoom Call hStatusOut end sub diff --git a/testautomation/graphics/optional/gallery.bas b/testautomation/graphics/optional/gallery.bas index e8a23ac2f616..81b97beb68da 100755 --- a/testautomation/graphics/optional/gallery.bas +++ b/testautomation/graphics/optional/gallery.bas @@ -1,7 +1,7 @@ 'encoding UTF-8 Do not remove or change this line! '************************************************************************** '* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. -'* +'* '* Copyright 2008 by Sun Microsystems, Inc. '* '* OpenOffice.org - a multi-platform office productivity suite @@ -62,10 +62,10 @@ end sub '------------------------------------------------------------------------- sub LoadIncludeFiles - use "global\system\includes\master.inc" - use "global\system\includes\gvariabl.inc" - gApplication = "WRITER" - call GetUseFiles + use "global\system\includes\master.inc" + use "global\system\includes\gvariabl.inc" + gApplication = "WRITER" + call GetUseFiles end sub '------------------------------------------------------------------------- diff --git a/testautomation/graphics/optional/gallery2.bas b/testautomation/graphics/optional/gallery2.bas index a8b434b1edc6..d8f5be67daca 100755 --- a/testautomation/graphics/optional/gallery2.bas +++ b/testautomation/graphics/optional/gallery2.bas @@ -1,7 +1,7 @@ 'encoding UTF-8 Do not remove or change this line! '************************************************************************** '* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. -'* +'* '* Copyright 2008 by Sun Microsystems, Inc. '* '* OpenOffice.org - a multi-platform office productivity suite @@ -39,7 +39,7 @@ dim iSaveSetting as Integer sub main - call hStatusIn ( "Graphics", "gallery2.bas", "Test of all gallery themes" ) + call hStatusIn ( "Graphics", "gallery2.bas" ) use "graphics\tools\id_tools.inc" use "graphics\tools\id_tools_2.inc" @@ -58,10 +58,10 @@ end sub '------------------------------------------------------------------------- sub LoadIncludeFiles - use "global\system\includes\master.inc" - use "global\system\includes\gvariabl.inc" - gApplication = "WRITER" - call GetUseFiles + use "global\system\includes\master.inc" + use "global\system\includes\gvariabl.inc" + gApplication = "WRITER" + call GetUseFiles end sub '------------------------------------------------------------------------- diff --git a/testautomation/graphics/optional/i_animation.bas b/testautomation/graphics/optional/i_animation.bas index fc63b3bdc304..496eb663717e 100755 --- a/testautomation/graphics/optional/i_animation.bas +++ b/testautomation/graphics/optional/i_animation.bas @@ -1,7 +1,7 @@ 'encoding UTF-8 Do not remove or change this line! '************************************************************************** '* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. -'* +'* '* Copyright 2008 by Sun Microsystems, Inc. '* '* OpenOffice.org - a multi-platform office productivity suite diff --git a/testautomation/graphics/optional/i_headerfooter.bas b/testautomation/graphics/optional/i_headerfooter.bas index 453a3c206caf..b742556a9a88 100755 --- a/testautomation/graphics/optional/i_headerfooter.bas +++ b/testautomation/graphics/optional/i_headerfooter.bas @@ -1,7 +1,7 @@ 'encoding UTF-8 Do not remove or change this line! '************************************************************************** '* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. -'* +'* '* Copyright 2008 by Sun Microsystems, Inc. '* '* OpenOffice.org - a multi-platform office productivity suite @@ -46,8 +46,8 @@ sub main PrintLog "-------------------------" + gApplication + "-------------------" - call tiHeaderFooterSlide - call tiHeaderFooterNotesHandout + call tiHeaderFooterSlide + call tiHeaderFooterNotesHandout Call hStatusOut end sub diff --git a/testautomation/graphics/optional/i_only_updt_1.bas b/testautomation/graphics/optional/i_only_updt_1.bas index 2088da2dc5ed..d891ea2e3719 100755 --- a/testautomation/graphics/optional/i_only_updt_1.bas +++ b/testautomation/graphics/optional/i_only_updt_1.bas @@ -1,7 +1,7 @@ 'encoding UTF-8 Do not remove or change this line! '************************************************************************** '* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. -'* +'* '* Copyright 2008 by Sun Microsystems, Inc. '* '* OpenOffice.org - a multi-platform office productivity suite @@ -44,15 +44,15 @@ sub main Printlog " -------------------- Impress-Only-Required-Test -----------------------------" Call hStatusIn ( "Graphics","i_only_updt_1.bas") - use "graphics\tools\id_tools.inc" - use "graphics\tools\id_tools_2.inc" - use "graphics\required\includes\global\id_002.inc" 'Edit - use "graphics\required\includes\global\id_003.inc" 'View - use "graphics\required\includes\global\id_004.inc" 'Insert - use "graphics\required\includes\global\id_005.inc" 'Format - use "graphics\required\includes\global\id_006.inc" 'Tools - use "graphics\required\includes\impress\im_003_.inc" 'Ansicht - use "graphics\required\includes\impress\im_004_.inc" 'Einfuegen + use "graphics\tools\id_tools.inc" + use "graphics\tools\id_tools_2.inc" + use "graphics\required\includes\global\id_002.inc" 'Edit + use "graphics\required\includes\global\id_003.inc" 'View + use "graphics\required\includes\global\id_004.inc" 'Insert + use "graphics\required\includes\global\id_005.inc" 'Format + use "graphics\required\includes\global\id_006.inc" 'Tools + use "graphics\required\includes\impress\im_003_.inc" 'Ansicht + use "graphics\required\includes\impress\im_004_.inc" 'Einfuegen if hSetLocaleStrings ( gTesttoolPath + "graphics\tools\locale_1.txt" , glLocale () ) = FALSE then qaErrorLog "Locales doesn't exist in file : "+gTesttoolPath + "graphics\tools\locale_1.txt" ' this is needed for spellchecking. @@ -66,18 +66,18 @@ sub main call id_005 call id_006 - Call hStatusOut + Call hStatusOut end sub '---------------------------------------------- sub LoadIncludeFiles - use "global\system\includes\master.inc" - use "global\system\includes\gvariabl.inc" - use "global\required\includes\g_option.inc" - use "global\required\includes\g_customize.inc" - use "global\required\includes\g_001.inc" - use "global\required\includes\g_009.inc" - gApplication = "IMPRESS" - Call GetUseFiles() + use "global\system\includes\master.inc" + use "global\system\includes\gvariabl.inc" + use "global\required\includes\g_option.inc" + use "global\required\includes\g_customize.inc" + use "global\required\includes\g_001.inc" + use "global\required\includes\g_009.inc" + gApplication = "IMPRESS" + Call GetUseFiles() end sub diff --git a/testautomation/graphics/optional/i_only_updt_2.bas b/testautomation/graphics/optional/i_only_updt_2.bas index 476543875ac6..350cd9d39f4d 100755 --- a/testautomation/graphics/optional/i_only_updt_2.bas +++ b/testautomation/graphics/optional/i_only_updt_2.bas @@ -1,7 +1,7 @@ 'encoding UTF-8 Do not remove or change this line! '************************************************************************** '* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. -'* +'* '* Copyright 2008 by Sun Microsystems, Inc. '* '* OpenOffice.org - a multi-platform office productivity suite diff --git a/testautomation/graphics/optional/i_pengine.bas b/testautomation/graphics/optional/i_pengine.bas index 6e6440e5a390..5b62bccf2876 100755 --- a/testautomation/graphics/optional/i_pengine.bas +++ b/testautomation/graphics/optional/i_pengine.bas @@ -1,7 +1,7 @@ 'encoding UTF-8 Do not remove or change this line! '************************************************************************** '* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. -'* +'* '* Copyright 2008 by Sun Microsystems, Inc. '* '* OpenOffice.org - a multi-platform office productivity suite @@ -40,8 +40,7 @@ global glLocale (15*20) as string sub main - Call hStatusIn ( "Graphics","i_pengine.bas", "Presentation-Engine-Optional Test" ) - GetOLEDefaultNames + Call hStatusIn ( "Graphics","i_pengine.bas" ) use "graphics\tools\id_tools.inc" use "graphics\tools\id_tools_2.inc" @@ -50,7 +49,7 @@ sub main use "graphics\optional\includes\impress\options.inc" - PrintLog "------------------------- " + gApplication + " Presentation-Engine-Optional Test -------------------" + PrintLog "------------------------- " + gApplication + " Presentation-Engine-Optional Test -------------------" Call tiPengineAllShapesAndEffects Call tiPengine2ObjectsGetsEffects @@ -58,13 +57,13 @@ sub main Call tiPengineTabEntrance Call tiPengineTabpageEntrance2 - if bAsianLan <> TRUE then + if bAsianLan <> TRUE then Call tiPengineTabEmphasis Call tiPengineTabPageEmphasis2 Call tiPengineTabExit Call tiPengineTabPageExit2 Call tiPengineTabMotionPaths - Call tiPengineTabPageMotionPaths2 + Call tiPengineTabPageMotionPaths2 Call tiPengineAnimationEffectsOptions else qaerrorlog "Deactivated tiPengineAnimationEffectsSlideshow and tiPengineAnimationEffectsOptions, due to strange results under Asian language." @@ -73,13 +72,13 @@ sub main Call tiPengineAnimationEffectsPreview Call tiPengineSlideTransition - Call hStatusOut + Call hStatusOut end sub sub LoadIncludeFiles - use "global\system\includes\master.inc" - use "global\system\includes\gvariabl.inc" - use "global\tools\includes\optional\t_ui_filters.inc" - gApplication = "IMPRESS" - Call GetUseFiles + use "global\system\includes\master.inc" + use "global\system\includes\gvariabl.inc" + use "global\tools\includes\optional\t_ui_filters.inc" + gApplication = "IMPRESS" + Call GetUseFiles end sub diff --git a/testautomation/graphics/optional/i_saveloadlayout.bas b/testautomation/graphics/optional/i_saveloadlayout.bas index d90fa4369ad3..b0236e361dbb 100755 --- a/testautomation/graphics/optional/i_saveloadlayout.bas +++ b/testautomation/graphics/optional/i_saveloadlayout.bas @@ -1,7 +1,7 @@ 'encoding UTF-8 Do not remove or change this line! '************************************************************************** '* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. -'* +'* '* Copyright 2008 by Sun Microsystems, Inc. '* '* OpenOffice.org - a multi-platform office productivity suite @@ -44,16 +44,14 @@ sub main use "graphics\tools\id_tools_2.inc" use "graphics\optional\includes\impress\i_saveloadlayout.inc" - GetOLEDefaultNames - PrintLog "-------------------------" + gApplication + "-------------------" - Call tSaveLoadLayoutEmpty - Call tSaveLoadLayoutText - Call tSaveLoadLayoutPicture - Call tSaveLoadLayoutOutline - Call tSaveLoadLayoutChart - Call tSaveLoadLayoutSpreadsheet - Call tSaveLoadLayoutOLE + Call tSaveLoadLayoutEmpty + Call tSaveLoadLayoutText + Call tSaveLoadLayoutPicture + Call tSaveLoadLayoutOutline + Call tSaveLoadLayoutChart + Call tSaveLoadLayoutSpreadsheet + Call tSaveLoadLayoutOLE Call hStatusOut end sub diff --git a/testautomation/graphics/optional/i_shape.bas b/testautomation/graphics/optional/i_shape.bas index 8ac1f0c5f3c6..891aa7b363b1 100755 --- a/testautomation/graphics/optional/i_shape.bas +++ b/testautomation/graphics/optional/i_shape.bas @@ -1,7 +1,7 @@ 'encoding UTF-8 Do not remove or change this line! '************************************************************************** '* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. -'* +'* '* Copyright 2008 by Sun Microsystems, Inc. '* '* OpenOffice.org - a multi-platform office productivity suite diff --git a/testautomation/graphics/optional/i_slidecopy.bas b/testautomation/graphics/optional/i_slidecopy.bas index 7c5aa61caf0b..c2f407b28bf6 100755 --- a/testautomation/graphics/optional/i_slidecopy.bas +++ b/testautomation/graphics/optional/i_slidecopy.bas @@ -1,7 +1,7 @@ 'encoding UTF-8 Do not remove or change this line! '************************************************************************** '* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. -'* +'* '* Copyright 2008 by Sun Microsystems, Inc. '* '* OpenOffice.org - a multi-platform office productivity suite @@ -47,14 +47,14 @@ sub main use "graphics\optional\includes\impress\i_slidecopy.inc" PrintLog "-------------------------" + gApplication + "-------------------" -if gOOo = false then - call tiSlideCopyNewPresentation -else - qaErrorLog "#i76226# - The test tiSlideCopyNewPresentation was outcommented since a button does not remain pressed in OpenOffice.org" -endif - call tiSlideCopyDuplicate - call tiSlideCopyInSlideSorter - call tiSlideCopyPasteSpecial + if gOOo = false then + call tiSlideCopyNewPresentation + else + qaErrorLog "#i76226# - The test tiSlideCopyNewPresentation was outcommented since a button does not remain pressed in OpenOffice.org" + endif + call tiSlideCopyDuplicate + call tiSlideCopyInSlideSorter + call tiSlideCopyPasteSpecial Call hStatusOut end sub diff --git a/testautomation/graphics/optional/i_slideshow.bas b/testautomation/graphics/optional/i_slideshow.bas index 54dbfde3dd5e..713842be4ee3 100755 --- a/testautomation/graphics/optional/i_slideshow.bas +++ b/testautomation/graphics/optional/i_slideshow.bas @@ -1,7 +1,7 @@ 'encoding UTF-8 Do not remove or change this line! '************************************************************************** '* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. -'* +'* '* Copyright 2008 by Sun Microsystems, Inc. '* '* OpenOffice.org - a multi-platform office productivity suite @@ -53,9 +53,10 @@ sub main use "graphics\optional\includes\impress\i_slideshow2.inc" use "graphics\optional\includes\impress\i_slideshow3.inc" - GetOLEDefaultNames hSetLocaleStrings ( gTesttoolPath + "graphics\tools\locale_1.txt" , glLocale () ) - if glLocale (2) = "" then warnlog "Add 'slide' to FILE /input/impress/locale_1.txt (take string from below)!!!" + if glLocale (2) = "" then + warnlog "Add 'slide' to FILE /input/impress/locale_1.txt (take string from below)!!!" + endif '/// LOCALE Slide - 2 ///' S1 = glLocale (2) + " 1" diff --git a/testautomation/graphics/optional/i_us_presentation.bas b/testautomation/graphics/optional/i_us_presentation.bas index 5b9bf47f9b3d..1e0438a8972a 100755 --- a/testautomation/graphics/optional/i_us_presentation.bas +++ b/testautomation/graphics/optional/i_us_presentation.bas @@ -1,7 +1,7 @@ 'encoding UTF-8 Do not remove or change this line! '************************************************************************** '* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. -'* +'* '* Copyright 2008 by Sun Microsystems, Inc. '* '* OpenOffice.org - a multi-platform office productivity suite @@ -40,7 +40,7 @@ public i as integer sub main Call hStatusIn ( "Graphics","i_us_presentation.bas") - + use "graphics\tools\id_tools.inc" use "graphics\tools\id_tools_2.inc" use "graphics\optional\includes\impress\i_us_present.inc" @@ -48,17 +48,17 @@ sub main PrintLog "------------ Graphics User-scenario-test: PowerUser creates a Presentation ------------" - Call i_us_presentation1 ' User-Scenario: Pro. - Call i_us_presentation2 - Call i_us_presentation3 - Call i_us_presentation4 - Call i_us_presentation5 - Call i_us_presentation6 - Call i_us_presentation7 + Call i_us_presentation1 ' User-Scenario: Pro. + Call i_us_presentation2 + Call i_us_presentation3 + Call i_us_presentation4 + Call i_us_presentation5 + Call i_us_presentation6 + Call i_us_presentation7 + + Call i_us2_pres1 ' User-Scenario: Beginner. + Call i_us2_pres2 - Call i_us2_pres1 ' User-Scenario: Beginner. - Call i_us2_pres2 - Call hStatusOut end sub diff --git a/testautomation/graphics/optional/i_view.bas b/testautomation/graphics/optional/i_view.bas index 9a10da11ee97..2e24e61cf574 100755 --- a/testautomation/graphics/optional/i_view.bas +++ b/testautomation/graphics/optional/i_view.bas @@ -1,7 +1,7 @@ 'encoding UTF-8 Do not remove or change this line! '************************************************************************** '* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. -'* +'* '* Copyright 2008 by Sun Microsystems, Inc. '* '* OpenOffice.org - a multi-platform office productivity suite @@ -41,26 +41,26 @@ public glLocale (15*20) as string sub main PrintLog "------------------------- i_view test -------------------------" - Call hStatusIn ( "Graphics","i_view.bas") + Call hStatusIn ( "Graphics","i_view.bas") use "graphics\tools\id_tools.inc" use "graphics\tools\id_tools_2.inc" use "graphics\optional\includes\impress\i_view.inc" - hSetLocaleStrings ( gTesttoolPath + "graphics\tools\locale_1.txt" , glLocale () ) + hSetLocaleStrings ( gTesttoolPath + "graphics\tools\locale_1.txt" , glLocale () ) - Call tAnsichtHintergrundNotizen - Call tViewWorkspaceHandoutView - Call tViewWorkspaceOutlineView - Call tViewWorkspaceDrawingView - Call tAnsichtEbene + Call tAnsichtHintergrundNotizen + Call tViewWorkspaceHandoutView + Call tViewWorkspaceOutlineView + Call tViewWorkspaceDrawingView + Call tAnsichtEbene - Call hStatusOut + Call hStatusOut end sub sub LoadIncludeFiles - use "global\system\includes\master.inc" - use "global\system\includes\gvariabl.inc" - gApplication = "IMPRESS" - Call GetUseFiles + use "global\system\includes\master.inc" + use "global\system\includes\gvariabl.inc" + gApplication = "IMPRESS" + Call GetUseFiles end sub diff --git a/testautomation/graphics/optional/includes/global/export_graphic.inc b/testautomation/graphics/optional/includes/global/export_graphic.inc index ad1bdb1fdb2c..ef6baa9030cf 100755 --- a/testautomation/graphics/optional/includes/global/export_graphic.inc +++ b/testautomation/graphics/optional/includes/global/export_graphic.inc @@ -1,7 +1,7 @@ 'encoding UTF-8 Do not remove or change this line! '************************************************************************** '* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. -'* +'* '* Copyright 2008 by Sun Microsystems, Inc. '* '* OpenOffice.org - a multi-platform office productivity suite @@ -50,7 +50,7 @@ '* '\****************************************************************************** testcase tEPS - + dim x as integer dim i as integer dim sFilter as string @@ -59,388 +59,388 @@ testcase tEPS sFilter = "EPS - Encapsulated PostScript (.eps)" sExt = ".eps" - printlog "open the document" - hFileOpen ConvertPath ( gTesttoolPath + "graphics\required\input\graphicexport."+ExtensionString) - - if hCallExport (OutputGrafikTBO , sFilter ) = TRUE then - Kontext "EPSOptionen" - 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 + printlog "open the document" + hFileOpen ConvertPath ( gTesttoolPath + "graphics\required\input\graphicexport."+ExtensionString) + + if hCallExport (OutputGrafikTBO , sFilter ) = TRUE then + Kontext "EPSOptionen" + 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 - Call hGrafikEinfuegen ( OutputGrafikTBO+sExt ) - endif - - call hCloseDocument + 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 + Call hGrafikEinfuegen ( OutputGrafikTBO+sExt ) + endif + + call hCloseDocument endcase 'tEPS '------------------------------------------------------------------------- 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 - dim sx1 as string - dim sX2 as string - dim sY2 as string - dim sDocument as string - - sFilter = "PCT - Mac Pict (.pct;.pict)" - sExt = ".pct" - - printlog "open the document" - sDocument = ConvertPath ( gTesttoolPath + "graphics\required\input\graphicexport."+ExtensionString) - hFileOpen sDocument - - if hCallExport (OutputGrafikTBO , sFilter ) = TRUE then - Kontext "PICTOptionen" - if PICTOptionen.Exists (2) then - printlog "check if all properties have the right count, and depend on each other" - Original.Check + 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 + dim sx1 as string + dim sX2 as string + dim sY2 as string + dim sDocument as string + + sFilter = "PCT - Mac Pict (.pct;.pict)" + sExt = ".pct" + + printlog "open the document" + sDocument = ConvertPath ( gTesttoolPath + "graphics\required\input\graphicexport."+ExtensionString) + hFileOpen sDocument + + if hCallExport (OutputGrafikTBO , sFilter ) = TRUE then + Kontext "PICTOptionen" + 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 - endif + 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 + endif - hTypeKeys ("") - 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 + "'" - 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 :-(" - 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 + "'" - else - warnlog "File didn't get saved :-(" - endif - hCloseDocument () - sleep 5 - hFileOpen (OutputGrafikTBO + "2"+sExt) - kontext "DocumentDraw" - DocumentDraw.TypeKeys ("") - 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 + hTypeKeys ("") + 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 + "'" + 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 :-(" + 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 + "'" + else + warnlog "File didn't get saved :-(" + endif + hCloseDocument () + sleep 5 + hFileOpen (OutputGrafikTBO + "2"+sExt) + kontext "DocumentDraw" + DocumentDraw.TypeKeys ("") + ContextOriginalSize + bTemp = FALSE + fGetSizeXY sx1, sY, bTemp + if (bTemp = FALSE) then + warnlog "Selected original size NOT OK :-(" + 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 + 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 + endif endif - PICTOptionen.Cancel - sleep 5 - 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 + dim x as integer + dim i as integer + dim sFilter as string + dim sExt as string - sFilter = "PBM - Portable Bitmap (.pbm)" - sExt = ".pbm" + sFilter = "PBM - Portable Bitmap (.pbm)" + sExt = ".pbm" - printlog "Open the document" - hFileOpen (ConvertPath ( gTesttoolPath + "graphics\required\input\graphicexport."+ExtensionString )) + printlog "Open the document" + hFileOpen (ConvertPath ( gTesttoolPath + "graphics\required\input\graphicexport."+ExtensionString )) - printlog "Save it" - if hCallExport (OutputGrafikTBO , sFilter ) = TRUE then - Kontext "PBMOptionen" - if PBMOptionen.Exists (2) then + printlog "Save it" + if hCallExport (OutputGrafikTBO , sFilter ) = TRUE then + Kontext "PBMOptionen" + if PBMOptionen.Exists (2) then Ascii.Check - PBMOptionen.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 - Call hGrafikEinfuegen ( OutputGrafikTBO+sExt ) - endif - - call hCloseDocument + PBMOptionen.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 + Call hGrafikEinfuegen ( OutputGrafikTBO+sExt ) + endif + + call hCloseDocument endcase 'tPBM '------------------------------------------------------------------------------- testcase tPGM - dim x as integer - dim i as integer - dim sFilter as string - dim sExt as string + dim x as integer + dim i as integer + dim sFilter as string + dim sExt as string - sFilter = "PGM - Portable Graymap (.pgm)" - sExt = ".pgm" + sFilter = "PGM - Portable Graymap (.pgm)" + sExt = ".pgm" - printlog "Open the document" - hFileOpen (ConvertPath ( gTesttoolPath + "graphics\required\input\graphicexport."+ExtensionString )) + printlog "Open the document" + hFileOpen (ConvertPath ( gTesttoolPath + "graphics\required\input\graphicexport."+ExtensionString )) - printlog "Save it" - if hCallExport (OutputGrafikTBO , sFilter ) = TRUE then - Kontext "PGMOptionen" - if PGMOptionen.Exists (2) then + printlog "Save it" + if hCallExport (OutputGrafikTBO , sFilter ) = TRUE then + Kontext "PGMOptionen" + if PGMOptionen.Exists (2) then Ascii.Check - PGMOptionen.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 - Call hGrafikEinfuegen ( OutputGrafikTBO+sExt ) - endif - - call hCloseDocument + PGMOptionen.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 + Call hGrafikEinfuegen ( OutputGrafikTBO+sExt ) + endif + + call hCloseDocument endcase 'tPGM '------------------------------------------------------------------------------- testcase tPPM - dim x as integer - dim i as integer - dim sFilter as string - dim sExt as string + dim x as integer + dim i as integer + dim sFilter as string + dim sExt as string - sFilter = "PPM - Portable Pixelmap (.ppm)" - sExt = ".ppm" + sFilter = "PPM - Portable Pixelmap (.ppm)" + sExt = ".ppm" - printlog "Open the document" - hFileOpen (ConvertPath ( gTesttoolPath + "graphics\required\input\graphicexport."+ExtensionString )) + printlog "Open the document" + hFileOpen (ConvertPath ( gTesttoolPath + "graphics\required\input\graphicexport."+ExtensionString )) - printlog "Save it" - if hCallExport (OutputGrafikTBO , sFilter ) = TRUE then - Kontext "PPMOptionen" - if PPMOptionen.Exists (2) then + printlog "Save it" + if hCallExport (OutputGrafikTBO , sFilter ) = TRUE then + Kontext "PPMOptionen" + if PPMOptionen.Exists (2) then Ascii.Check - PPMOptionen.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 - Call hGrafikEinfuegen ( OutputGrafikTBO+sExt ) - endif - - call hCloseDocument + PPMOptionen.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 + Call hGrafikEinfuegen ( OutputGrafikTBO+sExt ) + endif + + call hCloseDocument endcase 'tPPM '------------------------------------------------------------------------------ @@ -450,28 +450,28 @@ testcase tRAS dim i as integer dim sFilter as string dim sExt as string - + sFilter = "RAS - Sun Raster Image (.ras)" sExt = ".ras" - - 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 - endif - - call hCloseDocument + + 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 + endif + + call hCloseDocument endcase 'tRAS '------------------------------------------------------------------------------ @@ -481,28 +481,28 @@ testcase tTIFF dim i as integer dim sFilter as string dim sExt as string - + sFilter = "TIFF - Tagged Image File Format (.tif;.tiff)" 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 - endif - - call hCloseDocument + + 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 + endif + + call hCloseDocument endcase 'tTIFF '------------------------------------------------------------------------------ @@ -512,104 +512,104 @@ testcase tXPM dim i as integer dim sFilter as string dim sExt as string - + sFilter = "XPM - X PixMap (.xpm)" sExt = ".xpm" - - 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 - endif - - call hCloseDocument + + 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 + endif + + call hCloseDocument endcase 'tXPM '------------------------------------------------------------------------------- testcase tGIF - dim x as integer - dim i as integer - dim sFilter as string - dim sExt as string + dim x as integer + dim i as integer + dim sFilter as string + dim sExt as string - sFilter = "GIF - Graphics Interchange Format (.gif)" - sExt = ".gif" + sFilter = "GIF - Graphics Interchange Format (.gif)" + sExt = ".gif" - printlog "open the document" - hFileOpen (ConvertPath ( gTesttoolPath + "graphics\required\input\graphicexport."+ExtensionString) + printlog "open the document" + hFileOpen (ConvertPath ( gTesttoolPath + "graphics\required\input\graphicexport."+ExtensionString) - printlog "save it" - if hCallExport (OutputGrafikTBO , sFilter ) = TRUE then - Kontext "GIFOptionen" - if GIFOptionen.Exists (2) then + printlog "save it" + if hCallExport (OutputGrafikTBO , sFilter ) = TRUE 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 + "'" - else - warnlog "File didn't get saved :-(" - endif - hCloseDocument () - sleep 5 - hNewDocument() - sleep 5 - Call hGrafikEinfuegen ( OutputGrafikTBO+sExt ) - endif - - call hCloseDocument + GIFOptionen.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 + Call hGrafikEinfuegen ( OutputGrafikTBO+sExt ) + endif + + call hCloseDocument 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" - - printlog "Open the document" - hFileOpen (ConvertPath ( gTesttoolPath + "graphics\required\input\graphicexport."+ExtensionString) - - printlog " save it " - if hCallExport (OutputGrafikTBO , sFilter ) = TRUE then - Kontext "JpegOptionen" - 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 + "'" - else - warnlog "File didn't get saved :-(" - endif - hCloseDocument () - sleep 5 - hNewDocument() - sleep 5 - Call hGrafikEinfuegen ( OutputGrafikTBO+sExt ) - endif - - call hCloseDocument + 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" + + printlog "Open the document" + hFileOpen (ConvertPath ( gTesttoolPath + "graphics\required\input\graphicexport."+ExtensionString) + + printlog " save it " + if hCallExport (OutputGrafikTBO , sFilter ) = TRUE then + Kontext "JpegOptionen" + 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 + "'" + else + warnlog "File didn't get saved :-(" + endif + hCloseDocument () + sleep 5 + hNewDocument() + sleep 5 + Call hGrafikEinfuegen ( OutputGrafikTBO+sExt ) + endif + + call hCloseDocument endcase 'tJPEG '------------------------------------------------------------------------- diff --git a/testautomation/graphics/optional/includes/global/export_graphic_2.inc b/testautomation/graphics/optional/includes/global/export_graphic_2.inc index 50909fcaff62..f8fa012473cf 100755 --- a/testautomation/graphics/optional/includes/global/export_graphic_2.inc +++ b/testautomation/graphics/optional/includes/global/export_graphic_2.inc @@ -1,7 +1,7 @@ 'encoding UTF-8 Do not remove or change this line! '************************************************************************** '* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. -'* +'* '* Copyright 2008 by Sun Microsystems, Inc. '* '* OpenOffice.org - a multi-platform office productivity suite @@ -35,138 +35,122 @@ '* '* short description : Graphics Export B-tests. (the usual suspects) '* -'************************************************************************ -'Neu -' #1 tPNG -' #1 tSVM -' #1 tPDF -' #1 tPDF_Creator -' #1 tSVG -' #1 tBMP -' #1 tEMF -' #1 tMET -' #1 tSWF -' #1 tWMF -'* '\****************************************************************************** testcase tPNG - dim x as integer - dim i as integer - dim iWaitIndex as integer - dim sFilter as string - dim sExt as string + dim x as integer + dim i as integer + dim iWaitIndex as integer + dim sFilter as string + dim sExt as string - sFilter = "PNG - Portable Network Graphic (.png)" - sExt = ".png" + sFilter = "PNG - Portable Network Graphic (.png)" + sExt = ".png" - '/// open the document - hFileOpen (ConvertPath ( gTesttoolPath + "graphics\required\input\graphicexport."+ExtensionString )) + hFileOpen( gTesttoolPath & "graphics\required\input\graphicexport." & ExtensionString ) - '/// save it ///' - if hCallExport (OutputGrafikTBO , sFilter ) = TRUE then - Kontext "PNGOptionen" - if PNGOptionen.Exists (2) then + if hCallExport (OutputGrafikTBO , sFilter ) = TRUE then + Kontext "PNGOptionen" + if PNGOptionen.Exists (2) then Kompression.ToMax Interlaced.UnCheck - PNGOptionen.OK - iWaitIndex = 0 - do while PNGOptionen.Exists AND iWaitIndex < 30 - sleep (1) - iWaitIndex = iWaitIndex + 1 - loop - 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 - Call hGrafikEinfuegen ( OutputGrafikTBO+sExt ) - endif - - call hCloseDocument + PNGOptionen.OK + iWaitIndex = 0 + do while PNGOptionen.Exists AND iWaitIndex < 30 + sleep (1) + iWaitIndex = iWaitIndex + 1 + loop + 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 + Call hGrafikEinfuegen ( OutputGrafikTBO+sExt ) + endif + + call hCloseDocument endcase '------------------------------------------------------------------------------- testcase tSVM - dim x as integer - dim i as integer - dim sFilter as string - dim sExt as string - dim bTemp as boolean - dim sX as string - dim sY as string - dim sx1 as string - dim sX2 as string - dim sY2 as string - dim sDocument as string - - sFilter = "SVM - StarView Metafile (.svm)" - sExt = ".svm" - - '/// open the document - sDocument = ConvertPath ( gTesttoolPath + "graphics\required\input\graphicexport." + ExtensionString) - hFileOpen sDocument - - if hCallExport (OutputGrafikTBO , sFilter ) = TRUE then - Kontext "SVMOptionen" - if SVMOptionen.Exists (2) then - '/// 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 + dim x as integer + dim i as integer + dim sFilter as string + dim sExt as string + dim bTemp as boolean + dim sX as string + dim sY as string + dim sx1 as string + dim sX2 as string + dim sY2 as string + dim sDocument as string + + sFilter = "SVM - StarView Metafile (.svm)" + sExt = ".svm" + + sDocument = ConvertPath ( gTesttoolPath & "graphics\required\input\graphicexport." & ExtensionString) + hFileOpen sDocument + + if hCallExport (OutputGrafikTBO , sFilter ) = TRUE then + Kontext "SVMOptionen" + if SVMOptionen.Exists (2) then + Original.Check + if Breite.IsEnabled then + warnlog " :-(" + endif + if Hoehe.IsEnabled then + warnlog " :-(" + endif + Groesse.Check Breite.More Hoehe.Less - '/// leave dialog with cancel -> there has to be no file created! ///' - SVMOptionen.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 + "' -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 "SVMOptionen" - if SVMOptionen.Exists (2) then - Groesse.Check + SVMOptionen.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 & "' -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 + if hCallExport (OutputGrafikTBO , sFilter ) = TRUE then + Kontext "SVMOptionen" + if SVMOptionen.Exists (2) then + Groesse.Check Breite.Less Hoehe.More - SVMOptionen.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 - Call hGrafikEinfuegen ( OutputGrafikTBO+sExt ) - endif - hCloseDocument () - Printlog "'/// now save a SELECTION in ORIGINAL SIZE and load the file afterwards ///'" - hFileOpen (sDocument) - sleep (10) + SVMOptionen.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 + Call hGrafikEinfuegen ( OutputGrafikTBO+sExt ) + endif + hCloseDocument () + hFileOpen (sDocument) + sleep (10) ' check if the document is writable if fIsDocumentWritable = false then @@ -177,96 +161,95 @@ testcase tSVM endif endif - hTypeKeys ("") - fGetSizeXY sx1, sY, TRUE - if hCallExport (OutputGrafikTBO + "1" , sFilter, TRUE ) = TRUE then - Kontext "SVMOptionen" - if SVMOptionen.Exists (2) then - Original.Check - SVMOptionen.OK - sleep 5 - endif - if ( dir(OutputGrafikTBO + "1"+sExt) <> "") then - Printlog "Ok :-) Saved as: '" + OutputGrafikTBO + "1"+sExt + "'" - 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 :-(" - 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 "SVMOptionen" - if SVMOptionen.Exists (2) then - Groesse.Check + hTypeKeys ("") + fGetSizeXY sx1, sY, TRUE + if hCallExport (OutputGrafikTBO & "1" , sFilter, TRUE ) = TRUE then + Kontext "SVMOptionen" + if SVMOptionen.Exists (2) then + Original.Check + SVMOptionen.OK + sleep 5 + endif + if ( dir(OutputGrafikTBO & "1" & sExt) <> "") then + Printlog "Ok :-) Saved as: '" & OutputGrafikTBO & "1" & sExt & "'" + 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 :-(" + endif + endif + hCloseDocument () + hNewDocument() + hRechteckErstellen ( 10, 10, 30, 40 ) + if hCallExport (OutputGrafikTBO & "2" , sFilter, TRUE ) = TRUE then + Kontext "SVMOptionen" + if SVMOptionen.Exists (2) then + Groesse.Check Breite.SetText "9" Hoehe.SetText "9" Groesse.Check 'Check to make settings go throught sx1 = Breite.GetText sY = Hoehe.GetText - SVMOptionen.OK - sleep 5 - endif - if ( dir(OutputGrafikTBO + "2"+sExt) <> "") then - Printlog "Ok :-) Saved as: '" + OutputGrafikTBO + "2"+sExt + "'" - else - warnlog "File didn't get saved :-(" - endif - hCloseDocument () - sleep 5 - hFileOpen (OutputGrafikTBO + "2"+sExt) - kontext "Filterauswahl" - if Filterauswahl.exists then - Warnlog "Error when loading the file. The Filter-dialogue came up. Test aborted." - Filterauswahl.Cancel - goto endsub - endif - kontext "DocumentDraw" - DocumentDraw.TypeKeys ("") - 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 "SVMOptionen" - if SVMOptionen.Exists (2) then - Groesse.Check + SVMOptionen.OK + sleep 5 + endif + if ( dir(OutputGrafikTBO & "2" & sExt) <> "") then + Printlog "Ok :-) Saved as: '" & OutputGrafikTBO & "2" & sExt & "'" + else + warnlog "File didn't get saved :-(" + endif + hCloseDocument () + sleep 5 + hFileOpen (OutputGrafikTBO & "2" & sExt) + kontext "Filterauswahl" + if Filterauswahl.exists then + Warnlog "Error when loading the file. The Filter-dialogue came up. Test aborted." + Filterauswahl.Cancel + goto endsub + endif + kontext "DocumentDraw" + DocumentDraw.TypeKeys ("") + 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 "SVMOptionen" + if SVMOptionen.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 + 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 + 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 - SVMOptionen.Cancel - sleep 5 - endif - endif + SVMOptionen.Cancel + sleep 5 + endif + endif - call hCloseDocument + call hCloseDocument endcase '------------------------------------------------------------------------------- @@ -277,18 +260,13 @@ testcase tPDF dim iFileSize(12) as long dim i as integer - '/// Export the file 12 times: ///' - '///+ every compression level (3) and every range (3), check if button in toolbar uses last settings (6) (-> 12) ///' - hFileOpen (ConvertPath ( gTesttoolPath + "graphics\required\input\graphicexport_pdf."+ExtensionString )) + hFileOpen ( gTesttoolPath & "graphics\required\input\graphicexport_pdf." & ExtensionString ) sleep (10) '--------------------------------------------------------------------------------------------------------------------------------------------------------- '###### all / Screen optimized ###### - '/// File->Export as PDF document printlog "File->Export as PDF document" - '///+ range = All printlog " range = All" - '///+ compression = Screen optimized printlog " compression = Screen optimized" kontext "Standardbar" @@ -297,9 +275,7 @@ testcase tPDF '--------------------------------------------------------- Output the first file --------------------------------------------------------------- hExportAsPDFmulti (3, TRUE, OutputGrafikTBO + 1, TRUE, FALSE, 1, 1) - '/// Export using Button in toolbar printlog "Export using Button in toolbar" - '///+ use the settings from the export before printlog " use the settings from the export before" kontext "Standardbar" @@ -310,11 +286,8 @@ testcase tPDF hExportAsPDFmulti (1, TRUE, OutputGrafikTBO + 2, TRUE, FALSE, 1, 1) ' button in toolbar -> last settings have to be used '###### range / Screen optimized ###### - '/// File->Export as PDF document printlog "File->Export as PDF document" - '///+ range = Range printlog " range = Range" - '///+ compression = Screen optimized printlog " compression = Screen optimized" kontext "Standardbar" @@ -324,9 +297,7 @@ testcase tPDF hExportAsPDFmulti (3, TRUE, OutputGrafikTBO + 3, TRUE, FALSE, 2, 1, "2") - '/// Export using Button in toolbar printlog "Export using Button in toolbar" - '///+ use the settings from the export before printlog " use the settings from the export before" kontext "Standardbar" @@ -337,11 +308,8 @@ testcase tPDF hExportAsPDFmulti (1, TRUE, OutputGrafikTBO + 4, TRUE, FALSE, 2, 1) ' button in toolbar -> last settings have to be used '###### all / Print optimized ###### - '/// File->Export as PDF document printlog "File->Export as PDF document" - '///+ range = all printlog " range = all" - '///+ compression = Print optimized printlog " compression = Print optimized" kontext "Standardbar" @@ -351,9 +319,7 @@ testcase tPDF hExportAsPDFmulti (3, TRUE, OutputGrafikTBO + 5, TRUE, FALSE, 1, 2) - '/// Export using Button in toolbar printlog "Export using Button in toolbar" - '///+ use the settings from the export before printlog " use the settings from the export before" kontext "Standardbar" @@ -364,11 +330,8 @@ testcase tPDF hExportAsPDFmulti (1, TRUE, OutputGrafikTBO + 6, TRUE, FALSE, 1, 2) ' button in toolbar -> last settings have to be used '###### range / Print optimized ###### - '/// File->Export as PDF document printlog "File->Export as PDF document" - '///+ range = Range printlog " range = Range" - '///+ compression = Screen optimized printlog " compression = Screen optimized" kontext "Standardbar" @@ -378,9 +341,7 @@ testcase tPDF hExportAsPDFmulti (3, TRUE, OutputGrafikTBO + 7, TRUE, FALSE, 2, 2, "2") - '/// Export using Button in toolbar printlog "Export using Button in toolbar" -' '///+ use the settings from the export before printlog " use the settings from the export before" kontext "Standardbar" @@ -391,11 +352,8 @@ testcase tPDF hExportAsPDFmulti (1, TRUE, OutputGrafikTBO + 8, TRUE, FALSE, 2, 2) ' button in toolbar -> last settings have to be used '###### all / Press optimized ###### - '/// File->Export as PDF document ///' printlog "File->Export as PDF document ///'" - '///+ range = all printlog " range = all" - '///+ compression = Press optimized printlog " compression = Press optimized" kontext "Standardbar" @@ -404,8 +362,6 @@ testcase tPDF '------------------------------------------------------------ Output the ninth file ---------------------------------------------------------------- hExportAsPDFmulti (3, TRUE, OutputGrafikTBO + 9, TRUE, FALSE, 1, 3) - '/// Export using Button in toolbar - '///+ use the settings from the export before kontext "Standardbar" checkexppdfwaitmax10sec @@ -415,11 +371,8 @@ testcase tPDF hExportAsPDFmulti (1, TRUE, OutputGrafikTBO + 10, TRUE, FALSE, 1, 3) ' button in toolbar -> last settings have to be used '###### range / Press optimized ###### - '/// File->Export as PDF document ///' printlog "File->Export as PDF document ///'" - '///+ range = all printlog " range = all" - '///+ compression = Press optimized printlog " compression = Press optimized" kontext "Standardbar" @@ -428,8 +381,6 @@ testcase tPDF '----------------------------------------------------------- Output the eleventh file ------------------------------------------------------------- hExportAsPDFmulti (3, TRUE, OutputGrafikTBO + 11, TRUE, FALSE, 2, 3, "2") - '/// Export using Button in toolbar - '///+ use the settings from the export before kontext "Standardbar" checkexppdfwaitmax10sec @@ -445,23 +396,21 @@ testcase tPDF for i=1 to 12 sPath = OutputGrafikTBO - sPath = sPath + i + ".pdf" + sPath = sPath + i & ".pdf" iFileSize(i) = app.FileLen(sPath) - Printlog (" - " + i + ": " + " " + iFileSize(i) + " " + sPath + Printlog (" - " & i & ": " & " " & iFileSize(i) & " " & sPath if (dir(sPath) <> "") then sleep(1) - '/// the first line has to be '%PDF-1.4' ///' sTemp = fGetFileText(sPath, 8) if (sTemp <> "%PDF-1.4") then - Warnlog "File doesn't start with '%PDF-1.4' it is: '" + sTemp + "'" + Warnlog "File doesn't start with '%PDF-1.4' it is: '" & sTemp & "'" endif - '/// the last line has to be '%%EOF' ///' sTemp = left(fGetFileText(sPath, -6),5) if (sTemp <> "%%EOF") then - Warnlog "File doesn't end with '%%EOF' it is: '" + sTemp + "'" + Warnlog "File doesn't end with '%%EOF' it is: '" & sTemp & "'" endif else - Warnlog "File was not exported to PDF :-( '" + sPath + "'" + Warnlog "File was not exported to PDF :-( '" & sPath & "'" endif next i @@ -482,10 +431,10 @@ testcase tPDF 'Warnlog ("Difference in filesize for file 9 and 10") endif - + if (iFileSize(1) > iFileSize(5)) then - qaerrorlog "i100919: pdf export: different file size when exporting with file/export or button" + qaerrorlog "i100919: pdf export: different file size when exporting with file/export or button" 'Warnlog ("Filesize for file 1 is greater then for file 5. The compression level doesn't work.") endif if (iFileSize(5) > iFileSize(9)) then @@ -510,24 +459,22 @@ testcase tPDF_Creator dim sTextFiltername as String dim sExtension() as String - sTemp = ConvertPath ( gTesttoolPath + "graphics\required\input\export_graphic3." + ExtensionString ) + sTemp = gTesttoolPath & "graphics\required\input\export_graphic3." & ExtensionString hFileOpen (sTemp) sleep (30) sPath = OutputGrafikTBO sTemp = sPath - sPath = sPath + "L.pdf" + sPath = sPath & "L.pdf" sleep(1) hExportAsPDFmulti (1, TRUE, sPath, TRUE, FALSE, 1, 1) - name sPath as sTemp+"L.txt" + name sPath as sTemp&"L.txt" sleep (30) - iFileSize(3) = app.FileLen(sTemp+"L.txt") + iFileSize(3) = app.FileLen(sTemp&"L.txt") iCreatorOffset = 0 sleep 5 - '/// load file in writer as text ///' - hFileOpen(sTemp+"L.txt") + hFileOpen(sTemp&"L.txt") - '/// if dialog 'AsciiFilterOptionen' comes up, say OK ///' Kontext "AsciiFilterOptionen" If AsciiFilterOptionen.Exists(3) then AsciiFilterOptionen.OK @@ -555,11 +502,11 @@ testcase tPDF_Creator sTemp = left(sTemp, inStr(sTemp, ">")-1) sTemp2 = "" for i = 0 to (len(sTemp)/4)-1 - sTemp2 = sTemp2 + chr("&H"+mid(sTemp,(i*4)+1, 4)) + sTemp2 = sTemp2 + chr(" & H" & mid(sTemp,(i*4)+1, 4)) next i - printlog sTemp + " -- " + len(sTemp) + " ::: '" + sTemp2 + "'" + printlog sTemp & " -- " & len(sTemp) & " ::: '" & sTemp2 & "'" if (lCase(sapp) <> lCase(right(sTemp2, len(stemp2)-1))) then - warnlog "Application is different from Creator; is: '" + lCase(sTemp2) + "' should: '" + lCase(sapp) + "'" + warnlog "Application is different from Creator; is: '" & lCase(sTemp2) & "' should: '" & lCase(sapp) & "'" endif iCreatorOffset = iCreatorOffset + len(sTemp) ' /Producer @@ -575,21 +522,21 @@ testcase tPDF_Creator sTemp = left(sTemp, inStr(sTemp, ">")-1) sTemp2 = "" for i = 0 to (len(sTemp)/4)-1 - sTemp2 = sTemp2 + chr("&H"+mid(sTemp,(i*4)+1, 4)) + sTemp2 = sTemp2 + chr(" & H" & mid(sTemp,(i*4)+1, 4)) next i - printlog sTemp + " -- " + len(sTemp) + " ::: '" + sTemp2 + "'" + printlog sTemp & " -- " & len(sTemp) & " ::: '" & sTemp2 & "'" if gOOO then iCreatorOffset = iCreatorOffset + len(sTemp) else if bAsianLan then iCreatorOffset = iCreatorOffset + 48 if (len(sTemp) <> 48) then - warnlog "Producer is different from 'StarSuite 8'; is: '" + sTemp2 + "'" + warnlog "Producer is different from 'StarSuite 8'; is: '" & sTemp2 & "'" endif else iCreatorOffset = iCreatorOffset + 52 if (len(sTemp) <> 52) then - warnlog "Producer is different from 'StarOffice 8'; is: '" + sTemp2 + "'" + warnlog "Producer is different from 'StarOffice 8'; is: '" & sTemp2 & "'" endif endif endif @@ -604,10 +551,10 @@ testcase tPDF_Creator editcopy sTemp = getClipboardText() sTemp = left(sTemp, inStr(sTemp, ")")-1) - printlog sTemp + " -- " + len(sTemp) + printlog sTemp & " -- " & len(sTemp) iCreatorOffset = iCreatorOffset + (len(sTemp) - 23) if (len(sTemp) <> 23) then - warnlog "Date is longer than expected; is: '" + sTemp2 + "'" + warnlog "Date is longer than expected; is: '" & sTemp2 & "'" endif gApplication = sApp call hCloseDocument @@ -617,35 +564,32 @@ endcase '------------------------------------------------------------------------------- testcase tSVG - dim x as integer - dim i as integer - dim sFilter as string - dim sExt as string - dim bTemp as boolean - dim sTemp as string - dim sTextFilter as string - dim sExtension() as string - dim sTextFiltername as string + dim x as integer + dim i as integer + dim sFilter as string + dim sExt as string + dim bTemp as boolean + dim sTemp as string + dim sTextFilter as string + dim sExtension() as string + dim sTextFiltername as string - sFilter = "SVG - Scalable Vector Graphics (.svg)" - sExt = ".svg" + sFilter = "SVG - Scalable Vector Graphics (.svg)" + sExt = ".svg" - '/// open the document - hFileOpen (ConvertPath ( gTesttoolPath + "graphics\required\input\graphicexport."+ExtensionString )) + hFileOpen ( gTesttoolPath & "graphics\required\input\graphicexport." & ExtensionString ) - '/// save it ///' '------------------------\ if hCallExport (OutputGrafikTBO , sFilter ) = TRUE then '------------------------\ if ( dir(OutputGrafikTBO+sExt) <> "") then - Printlog "Ok :-) Saved as: '" + OutputGrafikTBO+sExt + "'" + Printlog "Ok :-) Saved as: '" & OutputGrafikTBO+sExt & "'" '------------------------\ if (iSprache <> 82) then hCloseDocument () sleep 5 - '/// load file in writer as text ///' sTextFilter = "Text" - + hFileOpenWithFilter (OutputGrafikTBO+sExt, sTextFiltername, FALSE) printlog "if dialog 'AsciiFilterOptionen' comes up, say OK" Kontext "AsciiFilterOptionen" @@ -659,7 +603,7 @@ testcase tSVG sTemp = gApplication gApplication = "WRITER" sleep 5 ' wait for document to be loaded - bTemp = hFindeImDokument ("",true) + bTemp = hFindeImDokument ("",true) '-------------------------------\ if (bTemp = TRUE) then Printlog "OK" @@ -672,7 +616,7 @@ testcase tSVG qaerrorlog "disabled for 82: #111017#" endif '--------------------------/ - else + else warnlog "File didn't get saved :-(" endif '------------------------/ @@ -684,299 +628,258 @@ testcase tSVG endcase '------------------------------------------------------------------------------- testcase tBMP -qaerrorlog - dim x as integer - dim i as integer - dim bTemp as boolean - dim sX as string - dim sY as string - dim sx1 as string - dim sX2 as string - dim sY2 as string - dim sDocument as string - - '/// open the document - sDocument = ConvertPath ( gTesttoolPath + "graphics\required\input\graphicexport."+ExtensionString) + qaerrorlog + dim x as integer + dim i as integer + dim bTemp as boolean + dim sX as string + dim sY as string + dim sx1 as string + dim sX2 as string + dim sY2 as string + dim sDocument as string + + sDocument = gTesttoolPath & "graphics\required\input\graphicexport." & ExtensionString hFileOpen sDocument - if hCallExport (OutputGrafikTBO , "BMP - Windows Bitmap (.bmp)" ) = TRUE then - Kontext "BMPOptionen" - if BMPOptionen.Exists (2) then - '/// check if all properties have the right count, and depend on each other ///' - '/// 'Color Resolution' listbox contains eight items ///' - x = Farbaufloesung.GetItemCount - if x <> 8 then warnlog "Color Resolution Count is wrong; should be:8, is:" + x - for i = 1 to x - Farbaufloesung.Select i - sleep 1 - Printlog " - " + i + ": '" +Farbaufloesung.GetSelText + "'" - '/// checkbox RLE coding has to be enabled only for '4 and 8 bit' color palettes ///' - if ((i > 3) AND (i < 8)) then - if RLEKodierung.IsEnabled <> TRUE then warnlog "'RLE coding' is not checkable :-(" - else - if RLEKodierung.IsEnabled <> FALSE then warnlog "'RLE coding' is checkable :-(" + if hCallExport (OutputGrafikTBO , "BMP - Windows Bitmap (.bmp)" ) = TRUE then + Kontext "BMPOptionen" + if BMPOptionen.Exists (2) then + x = Farbaufloesung.GetItemCount + if x <> 8 then + warnlog "Color Resolution Count is wrong; should be:8, is:" & x + endif + for i = 1 to x + Farbaufloesung.Select i + sleep 1 + Printlog " - " & i & ": '" &Farbaufloesung.GetSelText & "'" + if ((i > 3) AND (i < 8)) then + if ( RLEKodierung.IsEnabled() ) then + warnlog "'RLE coding' is not checkable :-(" + else + warnlog "'RLE coding' is checkable :-(" + endif + endif + + next i + Original.Check + if DPI.IsEnabled then + warnlog " :-(" endif - next i - '/// if Mode 'original' is selected, DPI///' - Original.Check - if DPI.IsEnabled then warnlog " :-(" - if Breite.IsEnabled then warnlog " :-(" - if Hoehe.IsEnabled then warnlog " :-(" - Aufloesung.Check + if Breite.IsEnabled then + warnlog " :-(" + endif + if Hoehe.IsEnabled then + warnlog " :-(" + endif + Aufloesung.Check x = DPI.GetItemCount - '/// 'DPI' listbox contains eight items ///' - if x <> 4 then warnlog "'DPI' Count is wrong; should be:4, is:" + x + if x <> 4 then + warnlog "'DPI' Count is wrong; should be:4, is:" & x + endif for i = 1 to x - DPI.Select i - Printlog " - " + i + ": '" +DPI.GetSelText + "'" + DPI.Select i + Printlog " - " & i & ": '" &DPI.GetSelText & "'" next i - if Breite.IsEnabled then warnlog " :-(" - if Hoehe.IsEnabled then warnlog " :-(" - Groesse.Check - if DPI.IsEnabled then warnlog " :-(" + if Breite.IsEnabled then + warnlog " :-(" + endif + if Hoehe.IsEnabled then + warnlog " :-(" + endif + Groesse.Check + if DPI.IsEnabled then + warnlog " :-(" + endif Breite.More Hoehe.Less - Sleep 1 - '/// leave dialog with cancel -> there has to be no file created! ///' - BMPOptionen.Cancel - sleep 5 - if ( dir(OutputGrafikTBO+".bmp") = "") 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 BMP-Option-Dialog!" - i=5 - end if - sleep 2 - Kontext "Active" - if Active.Exists(2) then - Warnlog "BMP-Exportfilter has a problem" - Active.OK - end if - end if - Printlog "'/// now save it realy and load the file afterwards ///'" - if hCallExport (OutputGrafikTBO , "BMP - Windows Bitmap (.bmp)" ) = TRUE then - Kontext "BMPOptionen" - if BMPOptionen.Exists (2) then - Farbaufloesung.Select 7 - RLEKodierung.Check - Aufloesung.Check - DPI.Select 3 - BMPOptionen.OK - sleep 5 - endif - if ( dir(OutputGrafikTBO+".bmp") <> "") then - Printlog "Ok :-) Saved as: '" + OutputGrafikTBO+".bmp" + "'" - else - warnlog "File didn't get saved :-(" - endif - hCloseDocument () - sleep 5 - hNewDocument() - sleep 5 - Call hGrafikEinfuegen ( OutputGrafikTBO+".bmp" ) - endif - hCloseDocument () - Printlog "'/// now save a SELECTION in ORIGINAL SIZE and load the file afterwards ///'" - qaerrorlog "#i93258#" - 'hFileOpen (sDocument) - 'kontext "Filterauswahl" - 'if Filterauswahl.exists(10) then - ' Warnlog "Error when loading the file. The Filter-dialogue came up. Test aborted." - ' Filterauswahl.Cancel - ' goto endsub - 'endif - - '' check if the document is writable - 'if fIsDocumentWritable = false then - ' ' 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 - 'endif - - 'hTypeKeys ("") - 'fGetSizeXY sx1, sy, TRUE - 'if hCallExport (OutputGrafikTBO + "1" , "BMP - Windows Bitmap (.bmp)", TRUE ) = TRUE then - ' Kontext "BMPOptionen" - ' if BMPOptionen.Exists (2) then - ' Original.Check - ' BMPOptionen.OK - ' sleep 5 - ' endif - ' if ( dir(OutputGrafikTBO + "1"+".bmp") <> "") then - ' Printlog "Ok :-) Saved as: '" + OutputGrafikTBO + "1"+".bmp" + "'" - ' else - ' warnlog "File didn't get saved :-(" - ' endif - - ' qaerrorlog "#i92902: Export to bmp: bmp options not respected" - 'sleep 5 - 'hNewDocument() - 'sleep 5 - 'Call hGrafikEinfuegen ( OutputGrafikTBO + "1"+".bmp" ) - 'bTemp = FALSE - 'fGetSizeXY sx1, sY, bTemp - 'if (bTemp = FALSE) then - ' warnlog "Selected original size NOT OK :-(" - 'endif - 'endif - 'hCloseDocument () - Printlog "'/// now CREATE a rectangle, select it, save it in SIZE and load the file afterwards ///'" - hNewDocument() - hTypeKeys "" - gMouseClick 50, 50 - hRechteckErstellen ( 10, 10, 30, 40 ) - if hCallExport (OutputGrafikTBO + "2" , "BMP - Windows Bitmap (.bmp)", TRUE ) = TRUE then - Kontext "BMPOptionen" - if BMPOptionen.Exists (2) then - Groesse.Check + Sleep 1 + BMPOptionen.Cancel + sleep 5 + if ( dir(OutputGrafikTBO&".bmp") = "") 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 BMP-Option-Dialog!" + i=5 + end if + sleep 2 + Kontext "Active" + if Active.Exists(2) then + Warnlog "BMP-Exportfilter has a problem" + Active.OK + end if + end if + if hCallExport (OutputGrafikTBO , "BMP - Windows Bitmap (.bmp)" ) = TRUE then + Kontext "BMPOptionen" + if BMPOptionen.Exists (2) then + Farbaufloesung.Select 7 + RLEKodierung.Check + Aufloesung.Check + DPI.Select 3 + BMPOptionen.OK + sleep 5 + endif + if ( dir(OutputGrafikTBO&".bmp") <> "") then + Printlog "Ok :-) Saved as: '" & OutputGrafikTBO&".bmp" & "'" + else + warnlog "File didn't get saved :-(" + endif + hCloseDocument () + sleep 5 + hNewDocument() + sleep 5 + Call hGrafikEinfuegen ( OutputGrafikTBO&".bmp" ) + endif + hCloseDocument () + qaerrorlog "#i93258#" + + hNewDocument() + hTypeKeys "" + gMouseClick 50, 50 + hRechteckErstellen ( 10, 10, 30, 40 ) + if hCallExport (OutputGrafikTBO & "2" , "BMP - Windows Bitmap (.bmp)", TRUE ) = TRUE then + Kontext "BMPOptionen" + if BMPOptionen.Exists (2) then + Groesse.Check Breite.SetText "9" Hoehe.SetText "9" Groesse.Check 'Press "Size" one more time in order to make the change go through" sx1 = Breite.GetText sY = Hoehe.GetText - BMPOptionen.OK - sleep 5 - endif - if ( dir(OutputGrafikTBO + "2"+".bmp") <> "") then - Printlog "Ok :-) Saved as: '" + OutputGrafikTBO + "2"+".bmp" + "'" - else - warnlog "File didn't get saved :-(" - endif - hCloseDocument () - sleep 5 - hFileOpen (OutputGrafikTBO + "2"+".bmp") - kontext "Filterauswahl" - if Filterauswahl.exists then - Warnlog "Error when loading the file. The Filter-dialogue came up. Test aborted." - Filterauswahl.Cancel - goto endsub - endif - kontext "DocumentDraw" - DocumentDraw.TypeKeys ("") - - qaerrorlog "#i92902: Export to bmp: bmp options not respected" - 'ContextOriginalSize - 'bTemp = FALSE - 'fGetSizeXY sx1, sY, bTemp - 'if (bTemp = FALSE) then - ' warnlog "Selected original size NOT OK :-(" - 'endif - - endif - if hCallExport (OutputGrafikTBO + "3" , "BMP - Windows Bitmap (.bmp)", TRUE ) = TRUE then - Kontext "BMPOptionen" - if BMPOptionen.Exists (2) then - Groesse.Check + BMPOptionen.OK + sleep 5 + endif + if ( dir(OutputGrafikTBO & "2" & ".bmp") <> "") then + Printlog "Ok :-) Saved as: '" & OutputGrafikTBO & "2" & ".bmp" & "'" + else + warnlog "File didn't get saved :-(" + endif + hCloseDocument () + sleep 5 + hFileOpen (OutputGrafikTBO & "2" & ".bmp") + kontext "Filterauswahl" + if Filterauswahl.exists then + Warnlog "Error when loading the file. The Filter-dialogue came up. Test aborted." + Filterauswahl.Cancel + goto endsub + endif + kontext "DocumentDraw" + DocumentDraw.TypeKeys ("") + + qaerrorlog "#i92902: Export to bmp: bmp options not respected" + + endif + if hCallExport (OutputGrafikTBO & "3" , "BMP - Windows Bitmap (.bmp)", TRUE ) = TRUE then + Kontext "BMPOptionen" + if BMPOptionen.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 + 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 + 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 - BMPOptionen.Cancel - sleep 5 - endif - endif + BMPOptionen.Cancel + sleep 5 + endif + endif - call hCloseDocument + call hCloseDocument endcase '------------------------------------------------------------------------------- testcase tEMF - dim x as integer - dim i as integer - dim sFilter as string - dim sExt as string - dim bTemp as boolean - dim sX as string - dim sY as string - dim sx1 as string - dim sX2 as string - dim sY2 as string - dim sDocument as string - - sFilter = "EMF - Enhanced Metafile (.emf)" - sExt = ".emf" - - '/// open the document - sDocument = ConvertPath ( gTesttoolPath + "graphics\required\input\graphicexport."+ExtensionString) - hFileOpen sDocument - - if hCallExport (OutputGrafikTBO , sFilter ) = TRUE then - Kontext "SVMOptionen" - if SVMOptionen.Exists (2) then - '/// 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 + dim x as integer + dim i as integer + dim sFilter as string + dim sExt as string + dim bTemp as boolean + dim sX as string + dim sY as string + dim sx1 as string + dim sX2 as string + dim sY2 as string + dim sDocument as string + + sFilter = "EMF - Enhanced Metafile (.emf)" + sExt = ".emf" + + sDocument = gTesttoolPath & "graphics\required\input\graphicexport." & ExtensionString + hFileOpen sDocument + + if hCallExport (OutputGrafikTBO , sFilter ) = TRUE then + Kontext "SVMOptionen" + if SVMOptionen.Exists (2) then + Original.Check + if Breite.IsEnabled then + warnlog " :-(" + endif + if Hoehe.IsEnabled then + warnlog " :-(" + endif + Groesse.Check Breite.More Hoehe.Less - '/// leave dialog with cancel -> there has to be no file created! ///' - SVMOptionen.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 + "' -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 "SVMOptionen" - if SVMOptionen.Exists (2) then - Groesse.Check + SVMOptionen.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 & "' -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 + if hCallExport (OutputGrafikTBO , sFilter ) = TRUE then + Kontext "SVMOptionen" + if SVMOptionen.Exists (2) then + Groesse.Check Breite.Less Hoehe.More - SVMOptionen.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 - Call hGrafikEinfuegen ( OutputGrafikTBO+sExt ) - endif - hCloseDocument () - Printlog "'/// now save a SELECTION in ORIGINAL SIZE and load the file afterwards ///'" - hFileOpen (sDocument) - kontext "Filterauswahl" - if Filterauswahl.Exists(10) then - Warnlog "Error when loading the file. The Filter-dialogue came up. Test aborted." - Filterauswahl.Cancel - goto endsub - endif + SVMOptionen.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 + Call hGrafikEinfuegen ( OutputGrafikTBO+sExt ) + endif + hCloseDocument () + hFileOpen (sDocument) + kontext "Filterauswahl" + if Filterauswahl.Exists(10) then + Warnlog "Error when loading the file. The Filter-dialogue came up. Test aborted." + Filterauswahl.Cancel + goto endsub + endif ' check if the document is writable if fIsDocumentWritable = false then ' make the document writable and check if it's succesfull @@ -986,124 +889,125 @@ testcase tEMF endif endif - hTypeKeys ("") - fGetSizeXY sx1, sY, TRUE - if hCallExport (OutputGrafikTBO + "1" , sFilter, TRUE ) = TRUE then - Kontext "SVMOptionen" - if SVMOptionen.Exists (2) then - Original.Check - SVMOptionen.OK - sleep 5 - endif - if ( dir(OutputGrafikTBO + "1"+sExt) <> "") then - Printlog "Ok :-) saved as: '" + OutputGrafikTBO + "1"+sExt + "'" - 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 :-(" - 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 "SVMOptionen" - if SVMOptionen.Exists (2) then - Groesse.Check + hTypeKeys ("") + fGetSizeXY sx1, sY, TRUE + if hCallExport (OutputGrafikTBO & "1" , sFilter, TRUE ) = TRUE then + Kontext "SVMOptionen" + if SVMOptionen.Exists (2) then + Original.Check + SVMOptionen.OK + sleep 5 + endif + if ( dir(OutputGrafikTBO & "1" & sExt) <> "") then + Printlog "Ok :-) saved as: '" & OutputGrafikTBO & "1" & sExt & "'" + 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 :-(" + endif + endif + hCloseDocument () + hNewDocument() + hRechteckErstellen ( 10, 10, 30, 40 ) + if hCallExport (OutputGrafikTBO & "2" , sFilter, TRUE ) = TRUE then + Kontext "SVMOptionen" + if SVMOptionen.Exists (2) then + Groesse.Check Breite.SetText "9" Hoehe.SetText "9" Groesse.Check 'Press "Size" one more time to make the change go through" sx1 = Breite.GetText sY = Hoehe.GetText - SVMOptionen.OK - sleep 5 - endif - if ( dir(OutputGrafikTBO + "2"+sExt) <> "") then - Printlog "Ok :-) saved as: '" + OutputGrafikTBO + "2"+sExt + "'" - else - warnlog "File didn't get saved :-(" - endif - hCloseDocument () - sleep 5 - hFileOpen (OutputGrafikTBO + "2"+sExt) - kontext "DocumentDraw" - DocumentDraw.TypeKeys ("") - ContextOriginalSize - bTemp = FALSE - fGetSizeXY sx1, sY, bTemp - if (bTemp = FALSE) then + SVMOptionen.OK + sleep 5 + endif + if ( dir(OutputGrafikTBO & "2" & sExt) <> "") then + Printlog "Ok :-) saved as: '" & OutputGrafikTBO & "2" & sExt & "'" + else + warnlog "File didn't get saved :-(" + endif + hCloseDocument () + sleep 5 + hFileOpen (OutputGrafikTBO & "2" & sExt) + kontext "DocumentDraw" + DocumentDraw.TypeKeys ("") + 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 + if hCallExport (OutputGrafikTBO & "3" , sFilter, TRUE ) = TRUE then Kontext "SVMOptionen" if SVMOptionen.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 - SVMOptionen.Cancel - sleep 5 + 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 + SVMOptionen.Cancel + sleep 5 endif - endif - endif + endif + endif - call hCloseDocument + call hCloseDocument endcase '------------------------------------------------------------------------------- testcase tMET - dim x as integer - dim i as integer - dim iWaitIndex as integer - dim sFilter, sExt as string - dim bTemp as boolean - dim sX as string - dim sY as string - dim sx1 as string - dim sX2 as string - dim sY2 as string - dim sTemp as string - dim sDocument as string - - sFilter = "MET - OS/2 Metafile (.met)" - sExt = ".met" - - '/// open the document - sDocument = ConvertPath ( gTesttoolPath + "graphics\required\input\graphicexport."+ExtensionString) - hFileOpen sDocument - - if hCallExport (OutputGrafikTBO , sFilter ) = TRUE then - Kontext "METOptionen" - if METOptionen.Exists (2) then - '/// 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 + dim x as integer + dim i as integer + dim iWaitIndex as integer + dim sFilter, sExt as string + dim bTemp as boolean + dim sX as string + dim sY as string + dim sx1 as string + dim sX2 as string + dim sY2 as string + dim sTemp as string + dim sDocument as string + + sFilter = "MET - OS/2 Metafile (.met)" + sExt = ".met" + + sDocument = gTesttoolPath & "graphics\required\input\graphicexport." & ExtensionString + hFileOpen sDocument + + if hCallExport (OutputGrafikTBO , sFilter ) = TRUE then + Kontext "METOptionen" + if METOptionen.Exists (2) then + Original.Check + if Breite.IsEnabled then + warnlog " :-(" + endif + if Hoehe.IsEnabled then + warnlog " :-(" + endif + Groesse.Check sTemp = Breite.getText Breite.More if (sTemp = Breite.getText) then @@ -1116,30 +1020,28 @@ testcase tMET if (sTemp = Hoehe.getText) then warnlog "Height didn't change on pressing button 'Less'" endif - '/// leave dialog with cancel -> there has to be no file created! ///' - METOptionen.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 + "' -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 "METOptionen" - if METOptionen.Exists (2) then - Groesse.Check + METOptionen.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 & "' -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 + if hCallExport (OutputGrafikTBO , sFilter ) = TRUE then + Kontext "METOptionen" + if METOptionen.Exists (2) then + Groesse.Check sTemp = Breite.getText Breite.Less if (sTemp = Breite.getText) then @@ -1152,28 +1054,27 @@ testcase tMET Breite.setText "10" Hoehe.setText "10" endif - METOptionen.OK - iWaitIndex = 0 - do while METOptionen.Exists AND iWaitIndex < 30 - sleep (1) - iWaitIndex = iWaitIndex + 1 - loop - 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 - Call hGrafikEinfuegen ( OutputGrafikTBO+sExt ) - endif - hCloseDocument () - Printlog "'/// now save a SELECTION in ORIGINAL SIZE and load the file afterwards ///'" - hFileOpen (sDocument) - sleep (10) + METOptionen.OK + iWaitIndex = 0 + do while METOptionen.Exists AND iWaitIndex < 30 + sleep (1) + iWaitIndex = iWaitIndex + 1 + loop + 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 + Call hGrafikEinfuegen ( OutputGrafikTBO+sExt ) + endif + hCloseDocument () + hFileOpen (sDocument) + sleep (10) ' check if the document is writable if fIsDocumentWritable = false then @@ -1184,208 +1085,204 @@ testcase tMET endif endif - hTypeKeys ("") - fGetSizeXY sx1, sY, TRUE - if hCallExport (OutputGrafikTBO + "1" , sFilter, TRUE ) = TRUE then - Kontext "METOptionen" - if METOptionen.Exists (2) then - Original.Check - METOptionen.OK - iWaitIndex = 0 - do while METOptionen.Exists AND iWaitIndex < 30 - sleep (1) - iWaitIndex = iWaitIndex + 1 - loop - endif - if ( dir(OutputGrafikTBO + "1"+sExt) <> "") then - Printlog "Ok :-) Saved as: '" + OutputGrafikTBO + "1"+sExt + "'" - 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 :-(" - 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 "METOptionen" - if METOptionen.Exists (2) then - Groesse.Check + hTypeKeys ("") + fGetSizeXY sx1, sY, TRUE + if hCallExport (OutputGrafikTBO & "1" , sFilter, TRUE ) = TRUE then + Kontext "METOptionen" + if METOptionen.Exists (2) then + Original.Check + METOptionen.OK + iWaitIndex = 0 + do while METOptionen.Exists AND iWaitIndex < 30 + sleep (1) + iWaitIndex = iWaitIndex + 1 + loop + endif + if ( dir(OutputGrafikTBO & "1" & sExt) <> "") then + Printlog "Ok :-) Saved as: '" & OutputGrafikTBO & "1" & sExt & "'" + 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 :-(" + endif + endif + hCloseDocument () + hNewDocument() + hRechteckErstellen ( 10, 10, 30, 40 ) + if hCallExport (OutputGrafikTBO & "2" , sFilter, TRUE ) = TRUE then + Kontext "METOptionen" + if METOptionen.Exists (2) then + Groesse.Check Breite.SetText "9" Hoehe.SetText "9" Groesse.Check ' Click "Size" one more time to make the changes go through. sx1 = Breite.GetText sY = Hoehe.GetText - METOptionen.OK - iWaitIndex = 0 - do while METOptionen.Exists AND iWaitIndex < 30 - sleep (1) - iWaitIndex = iWaitIndex + 1 - loop - endif - if ( dir(OutputGrafikTBO + "2"+sExt) <> "") then - Printlog "Ok :-) Saved as: '" + OutputGrafikTBO + "2"+sExt + "'" - else - warnlog "File didn't get saved :-(" - endif - hCloseDocument () - sleep 5 - hFileOpen (OutputGrafikTBO + "2"+sExt) - kontext "DocumentDraw" - DocumentDraw.TypeKeys ("") - 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 "METOptionen" - if METOptionen.Exists (2) then - Groesse.Check + METOptionen.OK + iWaitIndex = 0 + do while METOptionen.Exists AND iWaitIndex < 30 + sleep (1) + iWaitIndex = iWaitIndex + 1 + loop + endif + if ( dir(OutputGrafikTBO & "2" & sExt) <> "") then + Printlog "Ok :-) Saved as: '" & OutputGrafikTBO & "2" & sExt & "'" + else + warnlog "File didn't get saved :-(" + endif + hCloseDocument () + sleep 5 + hFileOpen (OutputGrafikTBO & "2" & sExt) + kontext "DocumentDraw" + DocumentDraw.TypeKeys ("") + 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 "METOptionen" + if METOptionen.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 + 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 + 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 - METOptionen.Cancel - sleep 5 - endif - endif + METOptionen.Cancel + sleep 5 + endif + endif - call hCloseDocument + call hCloseDocument endcase '------------------------------------------------------------------------------- testcase tSWF - dim sFilter as string - dim sExt as string - dim x as integer - dim i as integer + dim sFilter as string + dim sExt as string + dim x as integer + dim i as integer - sFilter = "Macromedia Flash (SWF) (.swf)" - sExt = ".swf" + sFilter = "Macromedia Flash (SWF) (.swf)" + sExt = ".swf" - '/// open the document - hFileOpen (ConvertPath ( gTesttoolPath + "graphics\required\input\graphicexport."+ExtensionString )) + hFileOpen( gTesttoolPath & "graphics\required\input\graphicexport." & ExtensionString ) - '/// save it ///' - if hCallExport (OutputGrafikTBO , sFilter ) = TRUE then - if ( dir(OutputGrafikTBO+sExt) <> "") then - Printlog "Ok :-) Saved as: '" + OutputGrafikTBO+sExt + "'" - sleep 5 - else - warnlog "File didn't get saved :-(" - endif - endif + if hCallExport (OutputGrafikTBO , sFilter ) = TRUE then + if ( dir(OutputGrafikTBO+sExt) <> "") then + Printlog "Ok :-) Saved as: '" & OutputGrafikTBO+sExt & "'" + sleep 5 + else + warnlog "File didn't get saved :-(" + endif + endif - call hCloseDocument + call hCloseDocument endcase '------------------------------------------------------------------------------ testcase tWMF - 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 - dim sx1 as string - dim sX2 as string - dim sY2 as string - dim sDocument as string - - sFilter = "WMF - Windows Metafile (.wmf)" - sExt = ".wmf" - - '/// open the document - sDocument = ConvertPath ( gTesttoolPath + "graphics\required\input\graphicexport."+ExtensionString) - hFileOpen sDocument - - if hCallExport (OutputGrafikTBO , sFilter ) = TRUE then - Kontext "SVMOptionen" - if SVMOptionen.Exists (2) then - '/// 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 + 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 + dim sx1 as string + dim sX2 as string + dim sY2 as string + dim sDocument as string + + sFilter = "WMF - Windows Metafile (.wmf)" + sExt = ".wmf" + + sDocument = gTesttoolPath & "graphics\required\input\graphicexport." & ExtensionString + hFileOpen sDocument + + if hCallExport (OutputGrafikTBO , sFilter ) = TRUE then + Kontext "SVMOptionen" + if SVMOptionen.Exists (2) then + Original.Check + if Breite.IsEnabled then + warnlog " :-(" + endif + if Hoehe.IsEnabled then + warnlog " :-(" + endif + Groesse.Check Breite.More Hoehe.Less - '/// leave dialog with cancel -> there has to be no file created! ///' - SVMOptionen.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 + "' -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 "SVMOptionen" - if SVMOptionen.Exists (2) then - Groesse.Check + SVMOptionen.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 & "' -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 + if hCallExport (OutputGrafikTBO , sFilter ) = TRUE then + Kontext "SVMOptionen" + if SVMOptionen.Exists (2) then + Groesse.Check Breite.Less Hoehe.More - SVMOptionen.OK - iWaitIndex = 0 - do while SVMOptionen.Exists AND iWaitIndex < 30 - sleep (1) - iWaitIndex = iWaitIndex + 1 - loop - 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 - Call hGrafikEinfuegen ( OutputGrafikTBO+sExt ) - endif - hCloseDocument () - Printlog "'/// now save a SELECTION in ORIGINAL SIZE and load the file afterwards ///'" - hFileOpen (sDocument) - sleep (10) + SVMOptionen.OK + iWaitIndex = 0 + do while SVMOptionen.Exists AND iWaitIndex < 30 + sleep (1) + iWaitIndex = iWaitIndex + 1 + loop + 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 + Call hGrafikEinfuegen ( OutputGrafikTBO+sExt ) + endif + hCloseDocument () + hFileOpen (sDocument) + sleep (10) ' check if the document is writable if fIsDocumentWritable = false then @@ -1396,98 +1293,97 @@ testcase tWMF endif endif - hTypeKeys ("") - fGetSizeXY sx1, sY, TRUE - if hCallExport (OutputGrafikTBO + "1" , sFilter, TRUE ) = TRUE then - Kontext "SVMOptionen" - if SVMOptionen.Exists (2) then - Original.Check - SVMOptionen.OK - iWaitIndex = 0 - do while SVMOptionen.Exists AND iWaitIndex < 30 - sleep (1) - iWaitIndex = iWaitIndex + 1 - loop - endif - if ( dir(OutputGrafikTBO + "1"+sExt) <> "") then - Printlog "Ok :-) Saved as: '" + OutputGrafikTBO + "1"+sExt + "'" - 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 :-(" - 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 "SVMOptionen" - if SVMOptionen.Exists (2) then - Groesse.Check + hTypeKeys ("") + fGetSizeXY sx1, sY, TRUE + if hCallExport (OutputGrafikTBO & "1" , sFilter, TRUE ) = TRUE then + Kontext "SVMOptionen" + if SVMOptionen.Exists (2) then + Original.Check + SVMOptionen.OK + iWaitIndex = 0 + do while SVMOptionen.Exists AND iWaitIndex < 30 + sleep (1) + iWaitIndex = iWaitIndex + 1 + loop + endif + if ( dir(OutputGrafikTBO & "1" & sExt) <> "") then + Printlog "Ok :-) Saved as: '" & OutputGrafikTBO & "1" & sExt & "'" + 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 :-(" + endif + endif + hCloseDocument () + hNewDocument() + hRechteckErstellen ( 10, 10, 30, 40 ) + if hCallExport (OutputGrafikTBO & "2" , sFilter, TRUE ) = TRUE then + Kontext "SVMOptionen" + if SVMOptionen.Exists (2) then + Groesse.Check Breite.SetText "9" Hoehe.SetText "9" Groesse.Check 'Check "Size" to make changes really go through. sx1 = Breite.GetText sY = Hoehe.GetText - SVMOptionen.OK - iWaitIndex = 0 - do while SVMOptionen.Exists AND iWaitIndex < 30 - sleep (1) - iWaitIndex = iWaitIndex + 1 - loop - endif - if ( dir(OutputGrafikTBO + "2"+sExt) <> "") then - Printlog "Ok :-) Saved as: '" + OutputGrafikTBO + "2"+sExt + "'" - else - warnlog "File didn't get saved :-(" - endif - hCloseDocument () - sleep 5 - hFileOpen (OutputGrafikTBO + "2"+sExt) - kontext "DocumentDraw" - DocumentDraw.TypeKeys ("") - 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 "SVMOptionen" - if SVMOptionen.Exists (2) then - Groesse.Check + SVMOptionen.OK + iWaitIndex = 0 + do while SVMOptionen.Exists AND iWaitIndex < 30 + sleep (1) + iWaitIndex = iWaitIndex + 1 + loop + endif + if ( dir(OutputGrafikTBO & "2" & sExt) <> "") then + Printlog "Ok :-) Saved as: '" & OutputGrafikTBO & "2" & sExt & "'" + else + warnlog "File didn't get saved :-(" + endif + hCloseDocument () + sleep 5 + hFileOpen (OutputGrafikTBO & "2" & sExt) + kontext "DocumentDraw" + DocumentDraw.TypeKeys ("") + 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 "SVMOptionen" + if SVMOptionen.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 + 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 + 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 - SVMOptionen.Cancel - sleep 5 - endif - endif + SVMOptionen.Cancel + sleep 5 + endif + endif - call hCloseDocument + call hCloseDocument endcase '------------------------------------------------------------------------- diff --git a/testautomation/graphics/optional/includes/global/g_accessability.inc b/testautomation/graphics/optional/includes/global/g_accessability.inc index b4622711a5c5..3b0bdde41147 100755 --- a/testautomation/graphics/optional/includes/global/g_accessability.inc +++ b/testautomation/graphics/optional/includes/global/g_accessability.inc @@ -1,7 +1,7 @@ 'encoding UTF-8 Do not remove or change this line! '************************************************************************** '* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. -'* +'* '* Copyright 2008 by Sun Microsystems, Inc. '* '* OpenOffice.org - a multi-platform office productivity suite @@ -42,288 +42,249 @@ '\************************************************************************************* testcase tEis1549 -'/// 1549: Activating Text Input directly, 1548: Start Text Edit mode with RETURN, ///' -'///+ get into edit mode, with typing a 'printable' character, [F2] or [Return] ///' -'/// open application ///' - call hNewDocument - '/// create a textbox, write text ///' - call hTextrahmenErstellen ("Sun",20,20,70,20) + call hNewDocument + call hTextrahmenErstellen ("Sun",20,20,70,20) - '/// get out of edit mode, by typing [esc][esc] ///' - hTypeKeys ("") - hTypeKeys ("") - try - EditCopy - if GetClipboardText <> "" then - warnlog "Leaving edit mode didn't work :-( '" + GetClipboardText + "'" - endif - catch - Printlog "Left text edit mode :-)" - endcatch - '/// put focus onto textobject/frame with [strg]+[a] ///' - EditSelectAll - '/// type a text -> the chars have to appear in the object ///' - hTypeKeys (" ") - sleep 1 - hTypeKeys ("is") -' hTypeKeys ("") '/// has to insert the text as default at the end ! eis:1550 !!!!!!!!!! Cursor position at Text Edit Mode activation ///' - hTypeKeys ("") - try - EditCopy - if GetClipboardText = "Sun is" then - Printlog "Activating a textobject with 'printable' characters works :-)" - else - warnlog "Activating edit mode didn't work :-( '" + GetClipboardText + "' #99393#" - endif - catch - warnlog "Entering edit mode didn't work :-( '" + GetClipboardText + "'" - endcatch + hTypeKeys ("") + hTypeKeys ("") + try + EditCopy + if GetClipboardText <> "" then + warnlog "Leaving edit mode didn't work :-( '" + GetClipboardText + "'" + endif + catch + Printlog "Left text edit mode :-)" + endcatch + EditSelectAll + hTypeKeys (" ") + sleep 1 + hTypeKeys ("is") + hTypeKeys ("") + try + EditCopy + if GetClipboardText = "Sun is" then + Printlog "Activating a textobject with 'printable' characters works :-)" + else + warnlog "Activating edit mode didn't work :-( '" + GetClipboardText + "' #99393#" + endif + catch + warnlog "Entering edit mode didn't work :-( '" + GetClipboardText + "'" + endcatch - '/// get out of edit mode, by typing [esc][esc] ///' - hTypeKeys ("") - hTypeKeys ("") - try - EditCopy - if GetClipboardText <> "" then - warnlog "Leaving edit mode didn't work :-( '" + GetClipboardText + "'" - endif - catch - Printlog "Left text edit mode :-)" - endcatch - '/// put focus onto textobject/frame with [Tab] ///' - hTypeKeys ("") - '/// go into edit mode with [F2] ///' - hTypeKeys ("") -' hTypeKeys ("") - hTypeKeys ("") - try - EditCopy - if GetClipboardText = "Sun is" then - Printlog "Activating a textobject with works :-)" - else - warnlog "Activating edit mode didn't work :-( '" + GetClipboardText + "' #99393#" - endif - catch - warnlog "Entering edit mode didn't work :-( '" + GetClipboardText + "'" - endcatch + hTypeKeys ("") + hTypeKeys ("") + try + EditCopy + if GetClipboardText <> "" then + warnlog "Leaving edit mode didn't work :-( '" + GetClipboardText + "'" + endif + catch + Printlog "Left text edit mode :-)" + endcatch + hTypeKeys ("") + hTypeKeys ("") + ' hTypeKeys ("") + hTypeKeys ("") + try + EditCopy + if GetClipboardText = "Sun is" then + Printlog "Activating a textobject with works :-)" + else + warnlog "Activating edit mode didn't work :-( '" + GetClipboardText + "' #99393#" + endif + catch + warnlog "Entering edit mode didn't work :-( '" + GetClipboardText + "'" + endcatch - '/// get out of edit mode, by typing [esc][esc] ///' - hTypeKeys ("") - hTypeKeys ("") - try - EditCopy - if GetClipboardText <> "" then - warnlog "Leaving edit mode didn't work :-( '" + GetClipboardText + "'" - endif - catch - Printlog "Left text edit mode :-)" - endcatch - '/// put focus onto textobject/frame with [Tab] ///' - hTypeKeys ("") - '/// go into edit mode with [Return] ///' - hTypeKeys ("") -' hTypeKeys ("") - hTypeKeys ("") - try - EditCopy - if GetClipboardText = "Sun is" then - Printlog "Activating a textobject with works :-)" - else - warnlog "Activating edit mode didn't work :-( '" + GetClipboardText + "' #99393#" - endif - catch - warnlog "Entering edit mode didn't work :-( '" + GetClipboardText + "'" - endcatch + hTypeKeys ("") + hTypeKeys ("") + try + EditCopy + if GetClipboardText <> "" then + warnlog "Leaving edit mode didn't work :-( '" + GetClipboardText + "'" + endif + catch + Printlog "Left text edit mode :-)" + endcatch + hTypeKeys ("") + hTypeKeys ("") + ' hTypeKeys ("") + hTypeKeys ("") + try + EditCopy + if GetClipboardText = "Sun is" then + Printlog "Activating a textobject with works :-)" + else + warnlog "Activating edit mode didn't work :-( '" + GetClipboardText + "' #99393#" + endif + catch + warnlog "Entering edit mode didn't work :-( '" + GetClipboardText + "'" + endcatch -'/// close application ///' - call hCloseDocument + call hCloseDocument endcase testcase tEis1523 -'/// 1523: CTRL-RETURN text object travelling ///' -'///+ get into edit mode, with typing a 'printable' character, [F2], [Return] ///' -'/// open application ///' - call hNewDocument - '/// create 3 textboxes, write text ///' - call hTextrahmenErstellen ("A",20,20,30,30) - hTypeKeys ("") - call hTextrahmenErstellen ("B",10,10,15,15) - hTypeKeys ("") - call hTextrahmenErstellen ("C",40,40,50,50) - hTypeKeys ("") + call hNewDocument + call hTextrahmenErstellen ("A",20,20,30,30) + hTypeKeys ("") + call hTextrahmenErstellen ("B",10,10,15,15) + hTypeKeys ("") + call hTextrahmenErstellen ("C",40,40,50,50) + hTypeKeys ("") - '/// activate first text with [ctrl]+[Return]] ///' - hTypeKeys ("") -' hTypeKeys ("") - hTypeKeys ("") - try - EditCopy - if GetClipboardText <> "A" then - warnlog "First textbox not activated :-( instead '" + GetClipboardText + "'" - endif - catch - warnlog "Unexpected error :-(" - endcatch - '///+ activate second text with [ctrl]+[Return]] ///' - hTypeKeys ("") -' hTypeKeys ("") - hTypeKeys ("") - try - EditCopy - if GetClipboardText <> "B" then - warnlog "First textbox not activated :-( instead '" + GetClipboardText + "'" - endif - catch - warnlog "Unexpected error :-(" - endcatch - '///+ activate third text with [ctrl]+[Return]] ///' - hTypeKeys ("") - hTypeKeys ("") - try - EditCopy - if GetClipboardText <> "C" then - warnlog "First textbox not activated :-( Instead '" + GetClipboardText + "'" - endif - catch - warnlog "Unexpected error :-(" - endcatch + hTypeKeys ("") + ' hTypeKeys ("") + hTypeKeys ("") + try + EditCopy + if GetClipboardText <> "A" then + warnlog "First textbox not activated :-( instead '" + GetClipboardText + "'" + endif + catch + warnlog "Unexpected error :-(" + endcatch + hTypeKeys ("") + ' hTypeKeys ("") + hTypeKeys ("") + try + EditCopy + if GetClipboardText <> "B" then + warnlog "First textbox not activated :-( instead '" + GetClipboardText + "'" + endif + catch + warnlog "Unexpected error :-(" + endcatch + hTypeKeys ("") + hTypeKeys ("") + try + EditCopy + if GetClipboardText <> "C" then + warnlog "First textbox not activated :-( Instead '" + GetClipboardText + "'" + endif + catch + warnlog "Unexpected error :-(" + endcatch - '/// now, since there is no following textobject, insert new page with [ctrl]+[Return]] ///' - hTypeKeys ("") - hTypeKeys ("") - '/// create textbox, write text ///' - call hTextrahmenErstellen ("D",20,20,30,30) - hTypeKeys ("") - hTypeKeys ("") - hTypeKeys ("") - try - EditCopy - if GetClipboardText <> "D" then - warnlog "First textbox not activated :-( instead '" + GetClipboardText + "'" - endif - catch - warnlog "Unexpected error :-(" - endcatch + hTypeKeys ("") + hTypeKeys ("") + call hTextrahmenErstellen ("D",20,20,30,30) + hTypeKeys ("") + hTypeKeys ("") + hTypeKeys ("") + try + EditCopy + if GetClipboardText <> "D" then + warnlog "First textbox not activated :-( instead '" + GetClipboardText + "'" + endif + catch + warnlog "Unexpected error :-(" + endcatch - if (gApplication = "IMPRESS") then - '/// IMPRESS only ///' - '///+ check if Layout placeholders are inherited ///' - '///+ create new page with [ctrl]+[Return]] ///' - hTypeKeys ("") - FormatModifyPage ' ..Layout - sleep 2 - Kontext "Slides" - hTypeKeys ("") - hTypeKeys ("") - kontext "Tasks" - LayoutsPreview.TypeKeys "" - LayoutsPreview.TypeKeys "" - LayoutsPreview.TypeKeys "" - '///+ go into the placeholder with [ctrl]+[Return]] ///' - hTypeKeys ("") - hTypeKeys ("") - try - EditCopy - if GetClipboardText <> "" then - warnlog "No new layout :-( '" + GetClipboardText + "'" - endif - catch - Printlog "Layout accepted :-)" - endcatch - hTypeKeys "Great" - hTypeKeys ("") - try - EditCopy - if GetClipboardText <> "Great" then - warnlog "No new layout 2:-( '" + GetClipboardText + "'" - endif - catch - Printlog "Layout accepted :-)" - endcatch - endif + if (gApplication = "IMPRESS") then + hTypeKeys ("") + FormatModifyPage ' ..Layout + sleep 2 + Kontext "Slides" + hTypeKeys ("") + hTypeKeys ("") + kontext "Tasks" + LayoutsPreview.TypeKeys "" + LayoutsPreview.TypeKeys "" + LayoutsPreview.TypeKeys "" + hTypeKeys ("") + hTypeKeys ("") + try + EditCopy + if GetClipboardText <> "" then + warnlog "No new layout :-( '" + GetClipboardText + "'" + endif + catch + Printlog "Layout accepted :-)" + endcatch + hTypeKeys "Great" + hTypeKeys ("") + try + EditCopy + if GetClipboardText <> "Great" then + warnlog "No new layout 2:-( '" + GetClipboardText + "'" + endif + catch + Printlog "Layout accepted :-)" + endcatch + endif -'/// close application ///' - call hCloseDocument + call hCloseDocument endcase testcase tEis1581 - dim i as integer - '/// ############### IMPRESS only ################## ///' - '/// 1581: Activation of empty presentation object in Impress via Keyboard ///' - '///+ get into edit mode, with typing [Return] for ole's and graphics ///' - '/// open application ///' - call hNewDocument + dim i as integer + call hNewDocument - if (gApplication = "IMPRESS") then - '/// Format -> Layout ///' - FormatModifyPage - '/// choose layout with graphic ///' - sleep 1 - kontext "Tasks" - LayoutsPreview.TypeKeys "" - kontext "Pagelayout_UndoDeleteWarning" - if Pagelayout_UndoDeleteWarning.exists then - Pagelayout_UndoDeleteWarning.ok - endif - for i = 1 to 9 - kontext "Tasks" + if (gApplication = "IMPRESS") then + FormatModifyPage + sleep 1 + kontext "Tasks" + LayoutsPreview.TypeKeys "" + kontext "Pagelayout_UndoDeleteWarning" + if Pagelayout_UndoDeleteWarning.exists then + Pagelayout_UndoDeleteWarning.ok + endif + for i = 1 to 9 + kontext "Tasks" LayoutsPreview.TypeKeys "" - kontext "Pagelayout_UndoDeleteWarning" - if Pagelayout_UndoDeleteWarning.exists then + kontext "Pagelayout_UndoDeleteWarning" + if Pagelayout_UndoDeleteWarning.exists then + warnlog " Undo/Delete-Warning showed up. But it shouldn't have." + Pagelayout_UndoDeleteWarning.ok + endif + next i + kontext "Tasks" + LayoutsPreview.TypeKeys "" + sleep (1) + hTypeKeys ("") + sleep (1) + hTypeKeys ("") + sleep (2) + kontext "GeneralFileDialog" + if GeneralFileDialog.exists then + sleep 1 + GeneralFileDialog.cancel + else + warnlog "Graphic wasn't selected :-(" + endif + kontext "Tasks" + LayoutsPreview.TypeKeys "" + kontext "Pagelayout_UndoDeleteWarning" + if Pagelayout_UndoDeleteWarning.exists then warnlog " Undo/Delete-Warning showed up. But it shouldn't have." - Pagelayout_UndoDeleteWarning.ok - endif - next i - kontext "Tasks" - LayoutsPreview.TypeKeys "" - sleep (1) - '/// select the graphics placeholder and activate it with [Return] ///' - hTypeKeys ("") - sleep (1) - hTypeKeys ("") - sleep (2) - kontext "GeneralFileDialog" - if GeneralFileDialog.exists then - sleep 1 - GeneralFileDialog.cancel - else - warnlog "Graphic wasn't selected :-(" - endif -'/// choose layout with ole ///' - kontext "Tasks" - LayoutsPreview.TypeKeys "" - kontext "Pagelayout_UndoDeleteWarning" - if Pagelayout_UndoDeleteWarning.exists then - warnlog " Undo/Delete-Warning showed up. But it shouldn't have." - Pagelayout_UndoDeleteWarning.ok - endif - sleep (1) - for i = 1 to 17 - kontext "Tasks" - LayoutsPreview.TypeKeys "" - kontext "Pagelayout_UndoDeleteWarning" - if Pagelayout_UndoDeleteWarning.exists then - warnlog " Undo/Delete-Warning showed up. But it shouldn't have." - Pagelayout_UndoDeleteWarning.ok - endif - next i - kontext "Tasks" - LayoutsPreview.TypeKeys "" - sleep (1) - '/// select the ole placeholder and activate it with [Return] ///' - hTypeKeys ("") - sleep (1) - hTypeKeys ("") - try - sleep 2 -' InsertTitle *OLEObjektEinfuegen/OLEObjektInsert SID_INSERT_OBJECT - kontext "OLEObjektInsert" - sleep 1 - OLEObjektInsert.cancel - catch - warnlog "Ole wasn't selected :-(" - endcatch - endif - '/// close application ///' - call hCloseDocument + Pagelayout_UndoDeleteWarning.ok + endif + sleep (1) + for i = 1 to 17 + kontext "Tasks" + LayoutsPreview.TypeKeys "" + kontext "Pagelayout_UndoDeleteWarning" + if Pagelayout_UndoDeleteWarning.exists then + warnlog " Undo/Delete-Warning showed up. But it shouldn't have." + Pagelayout_UndoDeleteWarning.ok + endif + next i + kontext "Tasks" + LayoutsPreview.TypeKeys "" + sleep (1) + hTypeKeys ("") + sleep (1) + hTypeKeys ("") + try + sleep 2 + ' InsertTitle *OLEObjektEinfuegen/OLEObjektInsert SID_INSERT_OBJECT + kontext "OLEObjektInsert" + sleep 1 + OLEObjektInsert.cancel + catch + warnlog "Ole wasn't selected :-(" + endcatch + endif + call hCloseDocument endcase diff --git a/testautomation/graphics/optional/includes/global/g_area.inc b/testautomation/graphics/optional/includes/global/g_area.inc index 8a4f5980c3b8..db56e3252af1 100755 --- a/testautomation/graphics/optional/includes/global/g_area.inc +++ b/testautomation/graphics/optional/includes/global/g_area.inc @@ -1,7 +1,7 @@ 'encoding UTF-8 Do not remove or change this line! '************************************************************************** '* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. -'* +'* '* Copyright 2008 by Sun Microsystems, Inc. '* '* OpenOffice.org - a multi-platform office productivity suite @@ -41,372 +41,333 @@ '\************************************************************************************* testcase tiFormatArea - Dim i - Dim Zaehler - dim Entf$ + Dim i + Dim Zaehler + dim Entf$ - hNewDocument '/// New impress document ///' - hRechteckErstellen (20,20,60,60) '/// create rectangle ///' - Printlog " - Change Format" '/// change format for the rectangle ///' - FormatArea - Kontext - active.SetPage TabArea - Kontext "TabArea" - FillOptions.Select 5 '/// apply bitmap as texture ///' - BitmapList.Select 3 '/// Select "Water" ///' - Tile.Check '/// tile bitmap ///' - Kontext - active.SetPage TabSchatten - kontext "TabSchatten" - Anzeigen.Check '/// apply shadow ///' - Entfernung.SetText "30" '/// set angle to 30ó�����///' - Entf$=Entfernung.GetText '/// change distance ///' - Farbe.Select 15 '/// select color 15///' - TabSchatten.OK '/// close dialog ///' - Sleep 3 + FormatArea + Kontext + active.SetPage TabArea + Kontext "TabArea" + Kontext + active.SetPage TabSchatten + kontext "TabSchatten" + Sleep 3 - Printlog " - Test various formats" - FormatArea '/// Format area, check if changes are saved for this object ///' - Kontext - active.SetPage TabArea - Kontext "TabArea" - if NOT FillOptions.GetSelIndex = 5 then - Warnlog "Bitmap is not checked" - else - if BitmapList.GetSelIndex <> 3 then Warnlog "Wrong bitmap used. "+ BitmapAuswahl.GetSelIndex - if NOT Tile.IsChecked then Warnlog "Tile is not checked" -' if Original.IsChecked then Warnlog "Original is not checked" -' if NOT Relativ.IsChecked then Warnlog "Relative is not checked" -' if Breite.GetText <> "90 %" then Warnlog "Width is not 90%, it is: "+Breite.GetText -' if XOffset.GetText <> "30 %" then Warnlog "XOffset is not 30%, it is: "+XOffset.GetText -' if NOT Zeile.IsChecked then Warnlog "Line is not checked" -' if Verschiebung.GetText <> "20 %" then Warnlog "Displace is not 20%, it is: " + Verschiebung.GetText - Kontext - active.SetPage TabSchatten - kontext "TabSchatten" - if NOT Anzeigen.IsChecked then - Warnlog "Show shadows is not checked" - else - if Entfernung.GetText <> Entf$ then Warnlog "Distance is not " + Entf$ + " it is: "+ Entfernung.GetText - if Farbe.GetSelIndex <> 15 then Warnlog "Wrong color for shadow. It is: "+ Farbe.GetSelIndex - end if - end if - TabSchatten.Cancel + Printlog " - Test various formats" + Kontext + active.SetPage TabArea + Kontext "TabArea" + if NOT FillOptions.GetSelIndex = 5 then + Warnlog "Bitmap is not checked" + else + if BitmapList.GetSelIndex <> 3 then Warnlog "Wrong bitmap used. "+ BitmapAuswahl.GetSelIndex + if NOT Tile.IsChecked then Warnlog "Tile is not checked" + ' if Original.IsChecked then Warnlog "Original is not checked" + ' if NOT Relativ.IsChecked then Warnlog "Relative is not checked" + ' if Breite.GetText <> "90 %" then Warnlog "Width is not 90%, it is: "+Breite.GetText + ' if XOffset.GetText <> "30 %" then Warnlog "XOffset is not 30%, it is: "+XOffset.GetText + ' if NOT Zeile.IsChecked then Warnlog "Line is not checked" + ' if Verschiebung.GetText <> "20 %" then Warnlog "Displace is not 20%, it is: " + Verschiebung.GetText + Kontext + active.SetPage TabSchatten + kontext "TabSchatten" + if NOT Anzeigen.IsChecked then + Warnlog "Show shadows is not checked" + else + if Entfernung.GetText <> Entf$ then Warnlog "Distance is not " + Entf$ + " it is: "+ Entfernung.GetText + if Farbe.GetSelIndex <> 15 then Warnlog "Wrong color for shadow. It is: "+ Farbe.GetSelIndex + end if + end if + TabSchatten.Cancel - hCloseDocument '/// close document ///' endcase testcase tdFormatArea1 -Dim i -Dim j -Dim k -Dim m -Dim n -Dim Winkel_1 as string -Dim ZaehlerFarbe -Dim ZaehlerVerlauf -Dim ZaehlerSchraffur -Dim ZaehlerBitmap -Dim ColorName$ + Dim i + Dim j + Dim k + Dim m + Dim n + Dim Winkel_1 as string + Dim ZaehlerFarbe + Dim ZaehlerVerlauf + Dim ZaehlerSchraffur + Dim ZaehlerBitmap + Dim ColorName$ ColorName$ = "Bullshit" - dim Zaehler as integer + dim Zaehler as integer - Call hNewDocument '/// new document ///' - sleep 3 - Call hRechteckErstellen (30,30,70,70) '/// create rectangle ///' - sleep 2 - FormatArea '/// format area ///' - Kontext - Active.SetPage TabArea - Kontext "TabArea" - FillOptions.Select 1 '/// Select no fill ///' - sleep 2 - TabArea.OK - sleep 1 - FormatArea - Kontext - Active.SetPage TabArea - Kontext "TabArea" - sleep 1 '/// control if changes are still there after closing and reopening dialog ///' - FillOptions.Select 3'/// check gradient and select 1 ///' - ZaehlerVerlauf = GradientList.GetItemCount - for j = 1 To 2 - GradientList.Select j - TabArea.OK - FormatArea - Kontext - Active.SetPage TabArea - Kontext "TabArea" - PrintLog GradientList.GetSelText - next j - FillOptions.Select 4 '/// select hatching, control after closing and reopening dialog if changes are recognized ///' - HatchingList.GetItemCount - ZaehlerSchraffur = HatchingList.GetItemCount - for k=1 to 2'ZaehlerSchraffur - HatchingList.Select k - TabArea.OK - FormatArea - Kontext - Active.SetPage TabArea - Kontext "TabArea" - PrintLog HatchingList.GetSelText - next k - - FillOptions.Select 5 '/// check bitmap, control if changes are permanent after closing and reopening dialog ///' - BitmapList.GetItemCount - ZaehlerBitmap = BitmapList.GetItemCount - for n=1 to ZaehlerBitmap - BitmapList.Select n - TabArea.OK - FormatArea - sleep 1 - Kontext - Active.SetPage TabArea - Kontext "TabArea" - PrintLog BitmapList.GetSelText - next n - - if Tile.IsChecked = False Then Tile.Check '/// check tile ///' -' if Anpassen.IsEnabled = False Then PrintLog " Option Tile activated" -' if Anpassen.IsEnabled = True Then WarnLog " Option Tile not activated" -' if Relativ.IsChecked = False Then -' SetClipboard Breite.GetText -' Relativ.Check -' If Breite.GetText = GetClipboardText Then -' WarnLog " Relative isnt working" -' else -' PrintLog " Relative works" -' end if -' end if -' -' if Kacheln.IsChecked = True Then Kacheln.UnCheck -' Anpassen.Check -' if Relativ.IsEnabled = True Then WarnLog " Option Anpassen konnte nicht aktiviert werden" -' if not Relativ.IsEnabled Then PrintLog " Option Anpassen funktioniert" -' Anpassen.Uncheck -' Original.Check -' if Breite.IsEnabled And Hoehe.IsEnabled = True Then WarnLog " Button Original funktioniert nicht" -' if Breite.IsEnabled And Hoehe.IsEnabled = False Then PrintLog " Button Original funktioniert" -' Kacheln.Check -' setClipboard XOffset.GetText -' XOffset.More 3 -' if XOffset.GetText <> GetClipboardText Then PrintLog " Position XOffset funktioniert" -' if XOffset.GetText = GetClipboardText Then WarnLog " Position XOffset funktioniert nicht" -' SetClipboard YOffset.GetText -' YOffset.More 5 -' if YOffset.GetText <> GetClipboardText Then PrintLog " Position YOffset funktioniert" -' if YOffset.GetText = GetClipboardText Then WarnLog " Position YOffset funktioniert nicht" -' PrintLog " TabArea fertig" - Kontext - Active.SetPage TabSchatten - Kontext "TabSchatten" - sleep 1 - if Anzeigen.IsChecked = True Then Anzeigen.UnCheck '/// uncheck shadow ///' - sleep 1 - if Entfernung.IsEnabled = False Then '/// check if shadow related controls are disabled with no shadow ///' - PrintLog " Show shadow works" - else - WarnLog " Show shadow does not work" - end if - - Anzeigen.Check '/// check shadow ///' - SetClipboard Entfernung.GetText '/// change distance ///' - Entfernung.More 4 - if GetClipboardText = Entfernung.GetText Then - WarnLog " Distance does not work" - else - PrintLog " Distance does work" - end if - Farbe.Select 5 '/// change shadow color ///' + sleep 3 + sleep 2 + Kontext + Active.SetPage TabArea + Kontext "TabArea" + sleep 2 + TabArea.OK + sleep 1 + FormatArea + Kontext + Active.SetPage TabArea + Kontext "TabArea" + ZaehlerVerlauf = GradientList.GetItemCount + for j = 1 To 2 + GradientList.Select j + TabArea.OK + FormatArea + Kontext + Active.SetPage TabArea + Kontext "TabArea" + PrintLog GradientList.GetSelText + next j + HatchingList.GetItemCount + ZaehlerSchraffur = HatchingList.GetItemCount + for k=1 to 2'ZaehlerSchraffur + HatchingList.Select k + TabArea.OK + FormatArea + Kontext + Active.SetPage TabArea + Kontext "TabArea" + PrintLog HatchingList.GetSelText + next k - Kontext - Active.SetPage TabFarben - Kontext "TabFarben" - Farbe.Select 24 - sleep 1 - Farbe.Select 18 - sleep 1 - Farbe.Select 7 - Farbname.SetText "Bullshit" '/// change color ///' - Aendern.Click - sleep 1 - TabFarben.OK - FormatArea - Kontext - Active.SetPage TabArea - Kontext "TabArea" - FillOptions.Select 2 - if ColourList.GetSelText = "Bullshit" Then - PrintLog " Color selection changed " - else - WarnLog " Color selection not changed" - end if - Kontext - Active.SetPage TabFarben - Kontext "TabFarben" - Farbmodell.Select 1 + BitmapList.GetItemCount + ZaehlerBitmap = BitmapList.GetItemCount + for n=1 to ZaehlerBitmap + BitmapList.Select n + TabArea.OK + FormatArea + sleep 1 + Kontext + Active.SetPage TabArea + Kontext "TabArea" + PrintLog BitmapList.GetSelText + next n - Kontext - Active.SetPage TabFarben '/// test RGB color model ///' - Kontext "TabFarben" - Farbmodell.Select 1 '/// switch to RGB values ///' ' 33:RVB,CMJN - printlog " Selected colourmodel RGB?: "+Farbmodell.GetSelText - if left(Farbmodell.GetSelText,1) <> "R" then warnlog "not RGB selected ? :-(" - try - R.SetText "50" - G.SetText "10" - B.SetText "90" - catch - warnlog "RGB text fields are not enabled :-(" - endcatch - Aendern.Click - TabFarben.OK - Kontext "DocumentDraw" - FormatArea - Kontext - Active.SetPage TabFarben - Kontext "TabFarben" - if (R.GetText = "50" And G.GetText = "10" And B.GetText = "90") Then - PrintLog "Changes in RGB done" - else - WarnLog " Chancges in RGB values not recognized, instead of R=50 , G=10 und B=90 it is " +R.GetText + " " + G.GetText + " " + B.GetText - end if - Farbe.Select 10 - FarbName.SetText "Brighter" '/// add a color ///' - Hinzufuegen.Click - Farbe.Select "Brighter" - Loeschen.Click '/// delete color ///' - Kontext "Active" - Active.Yes - Kontext - Active.SetPage TabFarben - Kontext "TabFarben" - Bearbeiten.Click '/// edit color ///' - Kontext "FarbeDlg" - FarbeDlg.OK - sleep 2 - Kontext - Active.SetPage TabFarben - Kontext "TabFarben" - TabFarben.OK - FormatArea - Kontext - Active.SetPage TabFarben - Kontext "TabFarben" - TabFarben.OK + ' if Anpassen.IsEnabled = False Then PrintLog " Option Tile activated" + ' if Anpassen.IsEnabled = True Then WarnLog " Option Tile not activated" + ' if Relativ.IsChecked = False Then + ' SetClipboard Breite.GetText + ' Relativ.Check + ' If Breite.GetText = GetClipboardText Then + ' WarnLog " Relative isnt working" + ' else + ' PrintLog " Relative works" + ' end if + ' end if + ' + ' if Kacheln.IsChecked = True Then Kacheln.UnCheck + ' Anpassen.Check + ' if Relativ.IsEnabled = True Then WarnLog " Option Anpassen konnte nicht aktiviert werden" + ' if not Relativ.IsEnabled Then PrintLog " Option Anpassen funktioniert" + ' Anpassen.Uncheck + ' Original.Check + ' if Breite.IsEnabled And Hoehe.IsEnabled = True Then WarnLog " Button Original funktioniert nicht" + ' if Breite.IsEnabled And Hoehe.IsEnabled = False Then PrintLog " Button Original funktioniert" + ' Kacheln.Check + ' setClipboard XOffset.GetText + ' XOffset.More 3 + ' if XOffset.GetText <> GetClipboardText Then PrintLog " Position XOffset funktioniert" + ' if XOffset.GetText = GetClipboardText Then WarnLog " Position XOffset funktioniert nicht" + ' SetClipboard YOffset.GetText + ' YOffset.More 5 + ' if YOffset.GetText <> GetClipboardText Then PrintLog " Position YOffset funktioniert" + ' if YOffset.GetText = GetClipboardText Then WarnLog " Position YOffset funktioniert nicht" + ' PrintLog " TabArea fertig" + Kontext + Active.SetPage TabSchatten + Kontext "TabSchatten" + sleep 1 + sleep 1 + PrintLog " Show shadow works" +else + WarnLog " Show shadow does not work" +end if - FormatArea - Kontext - Active.SetPage TabFarbverlaeufe - Kontext "TabFarbverlaeufe" - TabFarbverlaeufe.OK - sleep 2 +Entfernung.More 4 +if GetClipboardText = Entfernung.GetText Then + WarnLog " Distance does not work" +else + PrintLog " Distance does work" +end if +Kontext +Active.SetPage TabFarben +Kontext "TabFarben" +Farbe.Select 24 +sleep 1 +Farbe.Select 18 +sleep 1 +Farbe.Select 7 +Aendern.Click +sleep 1 +TabFarben.OK FormatArea - sleep 2 - Kontext - Active.SetPage TabTransparenz - Kontext "TabTransparenz" - KeineTransparenz.Check '/// check if controls are disabled if transparence is disabled ///' - Printlog "- No transparency is checked, all controls should be disabled." - if MFLinTransparenz.IsEnabled Then Warnlog "- Transparency enabled" - if TransparenzverlaufTyp.IsEnabled Then Warnlog "- Graidient enabled" - if MFZentrumX.IsEnabled Then Warnlog "- Center X enabled" - if MFZentrumY.IsEnabled Then Warnlog "- Center Y enabled" - if MFWinkel.IsEnabled Then Warnlog "- Angle enabled" - if MFRand.IsEnabled Then Warnlog "- Border enabled" - if MFStartwert.IsEnabled Then Warnlog "- Start value enabled" - if MFEndwert.IsEnabled Then Warnlog "- End value enabled" - - LineareTransparenz.Check '/// check linear tranparency ///' - Printlog "- Set transparency to linear, all controls should be enabled now" '/// control if related controls are now enabled ///' - sleep 1 - MFLinTransparenz.ToMax '/// change values of controls ///' - if MFLinTransparenz.GetText <>"100%" Then Warnlog "- Maximum value not correct" - MFLinTransparenz.ToMin - if MFLinTransparenz.GetText <>"0%" Then Warnlog "- Minimum value not correct" - if TransparenzverlaufTyp.IsEnabled Then Warnlog "- Gradient enabled" - if MFZentrumX.IsEnabled Then Warnlog "- Centrum X enabled" - if MFZentrumY.IsEnabled Then Warnlog "- Centrum Y enabled" - if MFWinkel.IsEnabled Then Warnlog "- Angle enabled" - if MFRand.IsEnabled Then Warnlog "- Border enabled" - if MFStartwert.IsEnabled Then Warnlog "- Start value enabled" - if MFEndwert.IsEnabled Then Warnlog "- End value enabled" +Kontext +Active.SetPage TabArea +Kontext "TabArea" +FillOptions.Select 2 +if ColourList.GetSelText = "Bullshit" Then + PrintLog " Color selection changed " +else + WarnLog " Color selection not changed" +end if +Kontext +Active.SetPage TabFarben +Kontext "TabFarben" +Farbmodell.Select 1 - Transparenzverlauf.Check - Printlog "- Gradient for transprency enabled" - if MFLinTransparenz.IsEnabled = "false" Then Warnlog "- Transparency disabled" - if TransparenzverlaufTyp.IsEnabled = "false" Then Warnlog "- Gradient disabled" - if MFZentrumX.IsEnabled = "false" Then Warnlog "- Center X disabled" - if MFZentrumY.IsEnabled = "false" Then Warnlog "- Center Y disabled" - if MFWinkel.IsEnabled = "false" Then Warnlog "- Anlge disabled" - if MFRand.IsEnabled = "false" Then Warnlog "- Border disabled" - if MFStartwert.IsEnabled = "false" Then Warnlog "- Start value disabled" - if MFEndwert.IsEnabled = "false" Then Warnlog "- End value disabled" - - Printlog "- Check if changed values are saved" - - Zaehler=TransparenzverlaufTyp.GetItemCount - for i=1 to Zaehler - TransparenzverlaufTyp.Select i - SetClipboard Transparenzverlauftyp.GetSelText - TabTransparenz.OK - sleep 2 +Kontext +Kontext "TabFarben" +printlog " Selected colourmodel RGB?: "+Farbmodell.GetSelText +if left(Farbmodell.GetSelText,1) <> "R" then warnlog "not RGB selected ? :-(" + try + R.SetText "50" + G.SetText "10" + B.SetText "90" + catch + warnlog "RGB text fields are not enabled :-(" + endcatch + Aendern.Click + TabFarben.OK + Kontext "DocumentDraw" FormatArea - sleep 1 - Kontext - Active.SetPage TabTransparenz '/// check if values are saved after closing and reopening dialog ///' - Kontext "TabTransparenz" - if not Transparenzverlauftyp.GetSelIndex = i Then Warnlog "- Values are not correct for gradient transparency" - next i - TransparenzverlaufTyp.Select 2 - if MFZentrumX.IsEnabled Then Warnlog "- Center X should not be enabled" - if MFZentrumY.IsEnabled Then Warnlog "- Center Y should not be enabled" - MFWinkel.SetText "45" - Winkel_1 = MFWinkel.GetText - TabTransparenz.OK - sleep 2 - FormatArea - sleep 2 - Kontext - Active.SetPage TabTransparenz - Kontext "TabTransparenz" - if TransparenzverlaufTyp.GetSelIndex <>2 Then - Warnlog "- Second menu-item is not choosen" + Kontext + Active.SetPage TabFarben + Kontext "TabFarben" + if (R.GetText = "50" And G.GetText = "10" And B.GetText = "90") Then + PrintLog "Changes in RGB done" + else + WarnLog " Chancges in RGB values not recognized, instead of R=50 , G=10 und B=90 it is " +R.GetText + " " + G.GetText + " " + B.GetText end if - TransparenzverlaufTyp.Select 3 - if MFWinkel.GetText <> Winkel_1 then Warnlog "- The inserted value is not accepted" - if MFWinkel.GetText <> Winkel_1 Then TransparenzverlaufTyp.Select 3 - if MFWinkel.IsEnabled Then Warnlog " - Angle should not be active when Radial is choosen" - sleep 1 - MFZentrumX.SetText "30" - MFZentrumY.SetText "30" - TabTransparenz.OK + Farbe.Select 10 + Hinzufuegen.Click + Farbe.Select "Brighter" + Kontext "Active" + Active.Yes + Kontext + Active.SetPage TabFarben + Kontext "TabFarben" + Kontext "FarbeDlg" + FarbeDlg.OK sleep 2 + Kontext + Active.SetPage TabFarben + Kontext "TabFarben" + TabFarben.OK FormatArea - sleep 2 Kontext - Active.SetPage TabTransparenz - Kontext "TabTransparenz" - if MFZentrumX.GetText <> "30%" Then Warnlog "- Setted value for Center X is not applied." - if MFZentrumY.GetText <> "30%" Then Warnlog "- Setted value for Center Y is not applied." - MFRand.SetText "10" - MFStartwert.SetText "20" - MFEndwert.SetText "30" - TabTransparenz.OK + Active.SetPage TabFarben + Kontext "TabFarben" + TabFarben.OK + + FormatArea + Kontext + Active.SetPage TabFarbverlaeufe + Kontext "TabFarbverlaeufe" + TabFarbverlaeufe.OK sleep 2 + FormatArea sleep 2 Kontext Active.SetPage TabTransparenz Kontext "TabTransparenz" - if MFRand.GetText <> "10%" Then Warnlog "- Border-value was not set." - if MFEndwert.GetText <> "30%" Then Warnlog "- End-value was not set." - if MFStartwert.GetText <> "20%" Then Warnlog "- Start-value was not set." - TabTransparenz.OK + Printlog "- No transparency is checked, all controls should be disabled." + if MFLinTransparenz.IsEnabled Then Warnlog "- Transparency enabled" + if TransparenzverlaufTyp.IsEnabled Then Warnlog "- Graidient enabled" + if MFZentrumX.IsEnabled Then Warnlog "- Center X enabled" + if MFZentrumY.IsEnabled Then Warnlog "- Center Y enabled" + if MFWinkel.IsEnabled Then Warnlog "- Angle enabled" + if MFRand.IsEnabled Then Warnlog "- Border enabled" + if MFStartwert.IsEnabled Then Warnlog "- Start value enabled" + if MFEndwert.IsEnabled Then Warnlog "- End value enabled" + + sleep 1 + if MFLinTransparenz.GetText <>"100%" Then Warnlog "- Maximum value not correct" + MFLinTransparenz.ToMin + if MFLinTransparenz.GetText <>"0%" Then Warnlog "- Minimum value not correct" + if TransparenzverlaufTyp.IsEnabled Then Warnlog "- Gradient enabled" + if MFZentrumX.IsEnabled Then Warnlog "- Centrum X enabled" + if MFZentrumY.IsEnabled Then Warnlog "- Centrum Y enabled" + if MFWinkel.IsEnabled Then Warnlog "- Angle enabled" + if MFRand.IsEnabled Then Warnlog "- Border enabled" + if MFStartwert.IsEnabled Then Warnlog "- Start value enabled" + if MFEndwert.IsEnabled Then Warnlog "- End value enabled" + + Transparenzverlauf.Check + Printlog "- Gradient for transprency enabled" + if MFLinTransparenz.IsEnabled = "false" Then Warnlog "- Transparency disabled" + if TransparenzverlaufTyp.IsEnabled = "false" Then Warnlog "- Gradient disabled" + if MFZentrumX.IsEnabled = "false" Then Warnlog "- Center X disabled" + if MFZentrumY.IsEnabled = "false" Then Warnlog "- Center Y disabled" + if MFWinkel.IsEnabled = "false" Then Warnlog "- Anlge disabled" + if MFRand.IsEnabled = "false" Then Warnlog "- Border disabled" + if MFStartwert.IsEnabled = "false" Then Warnlog "- Start value disabled" + if MFEndwert.IsEnabled = "false" Then Warnlog "- End value disabled" + + Printlog "- Check if changed values are saved" + + Zaehler=TransparenzverlaufTyp.GetItemCount + for i=1 to Zaehler + TransparenzverlaufTyp.Select i + SetClipboard Transparenzverlauftyp.GetSelText + TabTransparenz.OK + sleep 2 + FormatArea + sleep 1 + Kontext + Kontext "TabTransparenz" + if not Transparenzverlauftyp.GetSelIndex = i Then Warnlog "- Values are not correct for gradient transparency" + next i + TransparenzverlaufTyp.Select 2 + if MFZentrumX.IsEnabled Then Warnlog "- Center X should not be enabled" + if MFZentrumY.IsEnabled Then Warnlog "- Center Y should not be enabled" + MFWinkel.SetText "45" + Winkel_1 = MFWinkel.GetText + TabTransparenz.OK + sleep 2 + FormatArea + sleep 2 + Kontext + Active.SetPage TabTransparenz + Kontext "TabTransparenz" + if TransparenzverlaufTyp.GetSelIndex <>2 Then + Warnlog "- Second menu-item is not choosen" + end if + TransparenzverlaufTyp.Select 3 + if MFWinkel.GetText <> Winkel_1 then Warnlog "- The inserted value is not accepted" + if MFWinkel.GetText <> Winkel_1 Then TransparenzverlaufTyp.Select 3 + if MFWinkel.IsEnabled Then Warnlog " - Angle should not be active when Radial is choosen" + sleep 1 + MFZentrumX.SetText "30" + MFZentrumY.SetText "30" + TabTransparenz.OK + sleep 2 + FormatArea + sleep 2 + Kontext + Active.SetPage TabTransparenz + Kontext "TabTransparenz" + if MFZentrumX.GetText <> "30%" Then Warnlog "- Setted value for Center X is not applied." + if MFZentrumY.GetText <> "30%" Then Warnlog "- Setted value for Center Y is not applied." + MFRand.SetText "10" + MFStartwert.SetText "20" + MFEndwert.SetText "30" + TabTransparenz.OK + sleep 2 + FormatArea + sleep 2 + Kontext + Active.SetPage TabTransparenz + Kontext "TabTransparenz" + if MFRand.GetText <> "10%" Then Warnlog "- Border-value was not set." + if MFEndwert.GetText <> "30%" Then Warnlog "- End-value was not set." + if MFStartwert.GetText <> "20%" Then Warnlog "- Start-value was not set." + TabTransparenz.OK - Call hCloseDocument '/// close document ///' endcase diff --git a/testautomation/graphics/optional/includes/global/g_arrangealign.inc b/testautomation/graphics/optional/includes/global/g_arrangealign.inc index 9230d69f59a6..667b0e77f427 100755 --- a/testautomation/graphics/optional/includes/global/g_arrangealign.inc +++ b/testautomation/graphics/optional/includes/global/g_arrangealign.inc @@ -1,7 +1,7 @@ 'encoding UTF-8 Do not remove or change this line! '************************************************************************** '* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. -'* +'* '* Copyright 2008 by Sun Microsystems, Inc. '* '* OpenOffice.org - a multi-platform office productivity suite @@ -47,276 +47,217 @@ '\************************************************************************************* testcase tiDatei_Fuer_Anordnen_Erstellen - dim sTemp as string - dim i as integer - dim zaehler as integer - '/// This function creates the document, that will be used as reference and working object inthe following cases :-) ///' - '///'Dim Datei ' somewhere global :-) defined in calling sub! :sub im_107c_ /// - call hNewDocument '/// new document ///' - if Dir(Datei)<>"" then app.Kill(Datei) ' kill old file - for Zaehler = 1 to 3 '/// create 3 overlapping objects ///' - Kontext - Select Case Zaehler + dim sTemp as string + dim i as integer + dim zaehler as integer + if Dir(Datei)<>"" then app.Kill(Datei) ' kill old file + Kontext + Select Case Zaehler Case 1: WL_SD_Wuerfel - gMouseMove (20,5, 80,60) '/// cubicel 20,5, 80,60 /// Printlog " Object start ---------------------- "+ Zaehler +" cubicel " Case 2: WL_SD_RechteckVoll - gMouseMove (40,35, 90,90) '/// rectangel 40,35, 90,90 /// Printlog " Object start ---------------------- "+ Zaehler +" rectangel " Case 3: WL_SD_Torus - gMouseMove (1,35, 60,95) '/// donut ;-) 1,35, 60,95 /// Printlog " Object start ---------------------- "+ Zaehler +" donut " - End Select - sleep (1) - FormatArea '/// assign different area properties for created objects (use rnd function)///' - sleep (1) - kontext - Select Case Zaehler + End Select + sleep (1) + sleep (1) + kontext + Select Case Zaehler Case 1: active.SetPage TabFarbverlaeufe - kontext "TabFarbverlaeufe" - Tabelle.Select Int((Tabelle.GetItemCount * Rnd) + 1) - printlog "test tbo-------------------------------------------------color of object : "+Tabelle.GetSelText - TabFarbverlaeufe.OK + kontext "TabFarbverlaeufe" + Tabelle.Select Int((Tabelle.GetItemCount * Rnd) + 1) + printlog "test tbo-------------------------------------------------color of object : "+Tabelle.GetSelText + TabFarbverlaeufe.OK Case 2: active.SetPage TabSchraffuren - kontext "TabSchraffuren" - Tabelle.Select Int((Tabelle.GetItemCount * Rnd) + 1) - printlog "test tbo-------------------------------------------------color of object : "+Tabelle.GetSelText - TabSchraffuren.OK + kontext "TabSchraffuren" + Tabelle.Select Int((Tabelle.GetItemCount * Rnd) + 1) + printlog "test tbo-------------------------------------------------color of object : "+Tabelle.GetSelText + TabSchraffuren.OK Case 3: active.SetPage TabFarben - kontext "TabFarben" - Farbe.Select Int((Farbe.GetItemCount * Rnd) + 1) - printlog "test tbo-------------------------------------------------color of object : "+Farbe.GetSelText - TabFarben.OK - End Select - sleep 1 - ContextPositionAndSize '/// save position and size values into varialbes ///' - sleep (1) - kontext - active.SetPage TabPositionAndSize - kontext "TabPositionAndSize" - '/// the variables : Ueber_Text_[1-3] get set here ! with x position of object/// + kontext "TabFarben" + Farbe.Select Int((Farbe.GetItemCount * Rnd) + 1) + printlog "test tbo-------------------------------------------------color of object : "+Farbe.GetSelText + TabFarben.OK + End Select + sleep 1 + sleep (1) + kontext + active.SetPage TabPositionAndSize + kontext "TabPositionAndSize" Select Case Zaehler - Case 1: Ueber_Text_1 = PositionX.GetText : printlog "xpos: "+zaehler+": "+PositionX.GetText - Case 2: Ueber_Text_2 = PositionX.GetText : printlog "xpos: "+zaehler+": "+PositionX.GetText - Case 3: Ueber_Text_3 = PositionX.GetText : printlog "xpos: "+zaehler+": "+PositionX.GetText + Case 1: Ueber_Text_1 = PositionX.GetText : printlog "xpos: "+zaehler+": "+PositionX.GetText + Case 2: Ueber_Text_2 = PositionX.GetText : printlog "xpos: "+zaehler+": "+PositionX.GetText + Case 3: Ueber_Text_3 = PositionX.GetText : printlog "xpos: "+zaehler+": "+PositionX.GetText End Select - TabPositionAndSize.OK - gMouseClick 96,5 - next Zaehler - sleep 1 - call hFileSaveAsKill (Datei) '/// save document ///' - printlog "OK saved at ", Datei - sleep 1 - '/// select in default order and take Position X in mind ;-) ///' - '///+ has to be from bottom to top: cubicel, rectangel, donut ///' + TabPositionAndSize.OK + gMouseClick 96,5 + next Zaehler + sleep 1 + printlog "OK saved at ", Datei + sleep 1 sPrintCheckOrder (TRUE) - call hCloseDocument '/// close document ///' endcase '------------------------------------------------------------------------------- testcase tdContextSendBackward - dim sTemp as string - '/// open created document 'with 3 figures' ///' - if (hFileOpen (Datei)) then - sleep 10 - sPrintCheckOrder (TRUE) - '/// select the middle object: rectangle, with keys: [TAB],[TAB] ///' - hTypeKeys ("") - '/// Send Backward / [Strg]+[-] -> one level more to the back ///' - WL_TB_ANORDNUNG_WeiterNachHinten - '///+ has to be from bottom to top: rectangel cubicel donut ///' - sleep 2 - sPrintCheckOrder - '/// deselect all ///' - hTypeKeys ("") - sleep 2 - '/// select the middle object: cubical, with keys: [TAB],[TAB] ///' - hTypeKeys ("") - sleep 2 - sTemp = fGetPositionX - if sTemp <> Ueber_Text_1 then - warnlog "Arrangement is wrong; is: "+sTemp+"; should: "+Ueber_Text_1+";" - end if - '/// close document ///' - Call hCloseDocument - endif - sleep 2 + dim sTemp as string + if (hFileOpen (Datei)) then + sleep 10 + sPrintCheckOrder (TRUE) + hTypeKeys ("") + WL_TB_ANORDNUNG_WeiterNachHinten + sleep 2 + sPrintCheckOrder + hTypeKeys ("") + sleep 2 + hTypeKeys ("") + sleep 2 + sTemp = fGetPositionX + if sTemp <> Ueber_Text_1 then + warnlog "Arrangement is wrong; is: "+sTemp+"; should: "+Ueber_Text_1+";" + end if + Call hCloseDocument + endif + sleep 2 endcase '------------------------------------------------------------------------------- testcase tdContextBringForward - dim sTemp as string - '/// open created document 'with 3 figures' ///' - if (hFileOpen (Datei)) then - sleep 10 - sPrintCheckOrder (TRUE) - '/// select the middle object: rectangle, with keys: [TAB],[TAB] ///' - hTypeKeys ("") - '/// Bring Forward / [Strg]+[+] -> one level more to the front ///' - WL_TB_ANORDNUNG_WeiterNachVorn - '/// has to be from bottom to top: cubicel donut rectangel ///' - sleep 1 - sPrintCheckOrder - '/// select the middle object: donut, with keys: [TAB],[TAB] ///' - hTypeKeys ("") - sleep 2 - sTemp = fGetPositionX - if sTemp <> Ueber_Text_3 then - warnlog "Arrangement is wrong; is: "+sTemp+"; should: "+Ueber_Text_3+";" - end if - sleep 1 - '/// close document ///' - Call hCloseDocument - endif + dim sTemp as string + if (hFileOpen (Datei)) then + sleep 10 + sPrintCheckOrder (TRUE) + hTypeKeys ("") + WL_TB_ANORDNUNG_WeiterNachVorn + sleep 1 + sPrintCheckOrder + hTypeKeys ("") + sleep 2 + sTemp = fGetPositionX + if sTemp <> Ueber_Text_3 then + warnlog "Arrangement is wrong; is: "+sTemp+"; should: "+Ueber_Text_3+";" + end if + sleep 1 + Call hCloseDocument + endif endcase '------------------------------------------------------------------------------- testcase tdContextSendToBack - dim sTemp as string - '/// open created document 'with 3 figures' ///' - if (hFileOpen (Datei)) then - sleep 10 - sPrintCheckOrder (TRUE) - '/// select the top object: donut, with keys: [TAB],[TAB],[TAB] ///' - hTypeKeys ("") - '/// Send to Back / [Strg]+[Shift]+[-] -> backmost object ///' - OL_DRAW_GanzNachHinten - '/// has to be from bottom to top: rectangel cubicel donut ///' - sleep 3 - sPrintCheckOrder - '/// select the middle object: cubical, with keys: [TAB],[TAB] ///' - hTypeKeys ("") - sleep 1 - sTemp = fGetPositionX - if sTemp <> Ueber_Text_1 then - warnlog "Arrangement is wrong; is: "+sTemp+"; should: "+Ueber_Text_1+";" - end if - sleep 3 - '/// close document ///' - Call hCloseDocument - endif + dim sTemp as string + if (hFileOpen (Datei)) then + sleep 10 + sPrintCheckOrder (TRUE) + hTypeKeys ("") + OL_DRAW_GanzNachHinten + sleep 3 + sPrintCheckOrder + hTypeKeys ("") + sleep 1 + sTemp = fGetPositionX + if sTemp <> Ueber_Text_1 then + warnlog "Arrangement is wrong; is: "+sTemp+"; should: "+Ueber_Text_1+";" + end if + sleep 3 + Call hCloseDocument + endif endcase '------------------------------------------------------------------------------- testcase tdContextBringToFront - dim sTemp as string - '/// open created document 'with 3 figures' ///' - if (hFileOpen (Datei)) then - sleep 10 - sPrintCheckOrder (TRUE) - '/// select the bottom object: cubical, with keys: [TAB] ///' - hTypeKeys ("") - '/// Bring to Front / [Strg]+[Shift]+[+] -> frontmost object ///' - OL_DRAW_GanzNachVorn - '/// has to be from bottom to top: rectangel, donut, cubicel ///' - sPrintCheckOrder - '/// select the middle object: donut, with keys: [TAB],[TAB] ///' - hTypeKeys ("") - sleep 1 - sTemp = fGetPositionX - if sTemp <> Ueber_Text_3 then - warnlog "Arrangement is wrong; is: "+sTemp+"; should: "+Ueber_Text_3+";" - end if - sleep 3 - '/// close document ///' - Call hCloseDocument - endif + dim sTemp as string + if (hFileOpen (Datei)) then + sleep 10 + sPrintCheckOrder (TRUE) + hTypeKeys ("") + OL_DRAW_GanzNachVorn + sPrintCheckOrder + hTypeKeys ("") + sleep 1 + sTemp = fGetPositionX + if sTemp <> Ueber_Text_3 then + warnlog "Arrangement is wrong; is: "+sTemp+"; should: "+Ueber_Text_3+";" + end if + sleep 3 + Call hCloseDocument + endif endcase '------------------------------------------------------------------------------- testcase tdContextInFrontOfObject - dim sTemp as string - '/// open created document 'with 3 figures' ///' - if (hFileOpen (Datei)) then - sleep 10 - sPrintCheckOrder (TRUE) - '/// select the top object: donut, with keys: [TAB],[TAB],[TAB] ///' - hTypeKeys ("") - '/// In Front of object ///' - OL_DRAW_VorDasObjekt - '/// left click the cubicel with the mouse ///' - gMouseClick 50,5 - '/// has to be from bottom to top: cubicel, donut, rectangel ///' - sPrintCheckOrder - sleep 1 - '/// select the middle object: donut, with keys: [TAB],[TAB] ///' - hTypeKeys ("") - sTemp = fGetPositionX - if sTemp <> Ueber_Text_3 then - printlog "DISABLED the WARNLOG, because mouseaction is not always the same :-( : Arrangement is wrong; is: "+sTemp+"; should: "+Ueber_Text_3+";" - end if - '/// close document ///' - Call hCloseDocument - endif + dim sTemp as string + if (hFileOpen (Datei)) then + sleep 10 + sPrintCheckOrder (TRUE) + hTypeKeys ("") + OL_DRAW_VorDasObjekt + gMouseClick 50,5 + sPrintCheckOrder + sleep 1 + hTypeKeys ("") + sTemp = fGetPositionX + if sTemp <> Ueber_Text_3 then + printlog "DISABLED the WARNLOG, because mouseaction is not always the same :-( : Arrangement is wrong; is: "+sTemp+"; should: "+Ueber_Text_3+";" + end if + Call hCloseDocument + endif endcase '------------------------------------------------------------------------------- testcase tdContextBehindObject - dim sTemp as string - '/// open created document 'with 3 figures' ///' - if (hFileOpen (Datei)) then - sleep 10 - sPrintCheckOrder (TRUE) - '/// select the top object: donut, with keys: [TAB],[TAB],[TAB] ///' - hTypeKeys ("") - '/// Behind object ///' - OL_DRAW_HinterDasObjekt - sleep 1 - '/// left click the cubicel with the mouse ///' - gMouseClick 50,5 - '/// has to be from bottom to top: donut, cubicel, rectangel ///' - sPrintCheckOrder - sleep 1 - '/// select the bottom object: donut, with keys: [TAB] ///' - hTypeKeys ("") - sTemp = fGetPositionX - if sTemp <> Ueber_Text_3 then - printlog "DISABLED the WARNLOG, because mouseaction is not always tthe same Arrangement is wrong; is: "+sTemp+"; should: "+Ueber_Text_3+";" - end if - '/// close document ///' - Call hCloseDocument - endif + dim sTemp as string + if (hFileOpen (Datei)) then + sleep 10 + sPrintCheckOrder (TRUE) + hTypeKeys ("") + OL_DRAW_HinterDasObjekt + sleep 1 + gMouseClick 50,5 + sPrintCheckOrder + sleep 1 + hTypeKeys ("") + sTemp = fGetPositionX + if sTemp <> Ueber_Text_3 then + printlog "DISABLED the WARNLOG, because mouseaction is not always tthe same Arrangement is wrong; is: "+sTemp+"; should: "+Ueber_Text_3+";" + end if + Call hCloseDocument + endif endcase '------------------------------------------------------------------------------- testcase tdContextReverse - dim sTemp as string - dim sTemp2 as string - dim i as integer - '/// open created document 'with 3 figures' ///' - if (hFileOpen (Datei)) then - sleep 10 - sPrintCheckOrder (TRUE) - '/// Edit->Select All ///' - EditSelectAll - sleep 3 - '/// Reverse ///' - WL_TB_ANORDNUNG_Vertauschen - sPrintCheckOrder - '/// select in default order and take Position X in mind ;-) ///' - hTypeKeys ("") - for i = 1 to 3 - hTypeKeys ("") - sTemp = fGetPositionX + dim sTemp as string + dim sTemp2 as string + dim i as integer + if (hFileOpen (Datei)) then + sleep 10 + sPrintCheckOrder (TRUE) + EditSelectAll + sleep 3 + WL_TB_ANORDNUNG_Vertauschen + sPrintCheckOrder + hTypeKeys ("") + for i = 1 to 3 + hTypeKeys ("") + sTemp = fGetPositionX Select Case i - Case 1: sTemp2 = Ueber_Text_3 - Case 2: sTemp2 = Ueber_Text_2 - Case 3: sTemp2 = Ueber_Text_1 + Case 1: sTemp2 = Ueber_Text_3 + Case 2: sTemp2 = Ueber_Text_2 + Case 3: sTemp2 = Ueber_Text_1 End Select - if sTemp <> sTemp2 then - warnlog " - " + i + " Arrangement is wrong; is: "+sTemp+"; should: "+sTemp2+";" - end if - next i - '/// close document ///' - Call hCloseDocument '/// close document ///' - endif + if sTemp <> sTemp2 then + warnlog " - " + i + " Arrangement is wrong; is: "+sTemp+"; should: "+sTemp2+";" + end if + next i + endif endcase '------------------------------------------------------------------------------- diff --git a/testautomation/graphics/optional/includes/global/g_autocorrection.inc b/testautomation/graphics/optional/includes/global/g_autocorrection.inc index 0ae5980e3f06..21cda12dc6f4 100755 --- a/testautomation/graphics/optional/includes/global/g_autocorrection.inc +++ b/testautomation/graphics/optional/includes/global/g_autocorrection.inc @@ -1,7 +1,7 @@ 'encoding UTF-8 Do not remove or change this line! '************************************************************************** '* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. -'* +'* '* Copyright 2008 by Sun Microsystems, Inc. '* '* OpenOffice.org - a multi-platform office productivity suite @@ -57,34 +57,30 @@ testcase tToolsAutocorrectReplace dim x as integer dim iTemp as integer - '/// open new application ///' Call hNewDocument - '/// Tools->Autocorrect... ///' ToolsAutocorrect - Kontext - '/// select tabpage 'Replace' ///' - active.SetPage TabErsetzung - Kontext "TabErsetzung" - iTemp = WelcheSprache.GetItemCount - for i = 1 to iTemp - WelcheSprache.select i - sleep 1 - x = Liste.getItemCount -' results from an english version: -' - 28: English (UK): 807 -' - 29: English (USA): 807 -' - 38: French (France): 304 -' - 43: German (Germany): 100 -' - 102: Spanish (Spain): 353 - if (x <> 0) then - printlog " - " + i + ": " + WelcheSprache.getSelText + ": " + x - ' printlog " " + Liste.getItemText (5,1) + " - " + Liste.getItemText (5,2) - endif - next i + Kontext + active.SetPage TabErsetzung + Kontext "TabErsetzung" + iTemp = WelcheSprache.GetItemCount + for i = 1 to iTemp + WelcheSprache.select i + sleep 1 + x = Liste.getItemCount + ' results from an english version: + ' - 28: English (UK): 807 + ' - 29: English (USA): 807 + ' - 38: French (France): 304 + ' - 43: German (Germany): 100 + ' - 102: Spanish (Spain): 353 + if (x <> 0) then + printlog " - " + i + ": " + WelcheSprache.getSelText + ": " + x + ' printlog " " + Liste.getItemText (5,1) + " - " + Liste.getItemText (5,2) + endif + next i TabErsetzung.OK - '/// close application ///' hCloseDocument endcase @@ -94,44 +90,40 @@ testcase tToolsAutocorrectExceptions dim y as integer dim iTemp as integer - '/// open new application ///' Call hNewDocument - '/// Tools->Autocorrect... ///' ToolsAutocorrect - Kontext - '/// select tabpage 'Replace' ///' - active.SetPage TabAusnahmen - Kontext "TabAusnahmen" - iTemp = WelcheSprache.GetItemCount - for i = 1 to iTemp - WelcheSprache.select i - sleep 1 - x = AbkuerzungenListe.getItemCount -' results from an english version: -' - 28: English (UK): 120 -' - 28: English (UK): 7 -' - 29: English (USA): 120 -' - 29: English (USA): 7 -' - 38: French (France): 50 -' - 38: French (France): 1 -' - 43: German (Germany): 123 -' - 43: German (Germany): 20 -' - 102: Spanish (Spain): 115 -' - 102: Spanish (Spain): 1 - if (x <> 0) then - printlog " - " + i + ": " + WelcheSprache.getSelText + ": " + x -' printlog " " + AbkuerzungenListe.getItemText (5) - endif - y = WoerterListe.getItemCount - if (y <> 0) then - printlog " - " + i + ": " + WelcheSprache.getSelText + ": " + y -' printlog " " + WoerterListe.getItemText (5) - endif - next i + Kontext + active.SetPage TabAusnahmen + Kontext "TabAusnahmen" + iTemp = WelcheSprache.GetItemCount + for i = 1 to iTemp + WelcheSprache.select i + sleep 1 + x = AbkuerzungenListe.getItemCount + ' results from an english version: + ' - 28: English (UK): 120 + ' - 28: English (UK): 7 + ' - 29: English (USA): 120 + ' - 29: English (USA): 7 + ' - 38: French (France): 50 + ' - 38: French (France): 1 + ' - 43: German (Germany): 123 + ' - 43: German (Germany): 20 + ' - 102: Spanish (Spain): 115 + ' - 102: Spanish (Spain): 1 + if (x <> 0) then + printlog " - " + i + ": " + WelcheSprache.getSelText + ": " + x + ' printlog " " + AbkuerzungenListe.getItemText (5) + endif + y = WoerterListe.getItemCount + if (y <> 0) then + printlog " - " + i + ": " + WelcheSprache.getSelText + ": " + y + ' printlog " " + WoerterListe.getItemText (5) + endif + next i TabAusnahmen.OK - '/// close application ///' hCloseDocument endcase @@ -145,316 +137,253 @@ testcase tToolsAutocorrectCustomQuotes(bSimple as boolean) dim sTemp as string dim sFileName as string - if (gApplication = "IMPRESS") then + if (gApplication = "IMPRESS") then ExtensionString = "odp" else ExtensionString = "odg" end if - '/// No matter the application and platform: open a file which has the same font selected. ///' - if iSprache = "1" OR iSprache = "33" OR iSprache = "34" OR iSprache = "36" OR iSprache = "39" OR iSprache = "46" OR iSprache = "48" OR iSprache = "49" OR iSprache = "55" then - sFileName = (ConvertPath ( gTesttoolPath + "graphics\required\input\rightfont" & iSprache & "." + ExtensionString )) - elseif bAsianLan = true then - Printlog "Language-file for Asian language " & iSprache & " is missing. Using standard instead." - sFileName = (ConvertPath ( gTesttoolPath + "graphics\required\input\rightfont." + ExtensionString)) - else - warnlog "Language-file for language " & iSprache & " is missing. Using standard instead." - sFileName = (ConvertPath ( gTesttoolPath + "graphics\required\input\rightfont." + ExtensionString)) - endif + if iSprache = "1" OR iSprache = "33" OR iSprache = "34" OR iSprache = "36" OR iSprache = "39" OR iSprache = "46" OR iSprache = "48" OR iSprache = "49" OR iSprache = "55" then + sFileName = (ConvertPath ( gTesttoolPath + "graphics\required\input\rightfont" & iSprache & "." + ExtensionString )) + elseif bAsianLan = true then + Printlog "Language-file for Asian language " & iSprache & " is missing. Using standard instead." + sFileName = (ConvertPath ( gTesttoolPath + "graphics\required\input\rightfont." + ExtensionString)) + else + warnlog "Language-file for language " & iSprache & " is missing. Using standard instead." + sFileName = (ConvertPath ( gTesttoolPath + "graphics\required\input\rightfont." + ExtensionString)) + endif if hFileExists ( sFileName ) = FALSE then - warnlog "The language-file was not found or accessible! The test ends." - goto endsub + warnlog "The language-file was not found or accessible! The test ends." + goto endsub endif 'HDE has same problems in w_106a.inc ;-) !!! migrate ?!?! ///' - '/// open new application ///' Call hNewDocument - '/// open file where the right font already is defined. ///' hFileOpen sFileName printlog "File opened: " + sFileName Sleep 3 Call sMakeReadOnlyDocumentEditable - - '/// TBO TODO: put quotes in locale list !!!! (i love UTF8 :-)))///' + if bSimple then Printlog "- Tools/Autocorrect -single quotes" Normal$ = Chr(39) select case iSprache - case 01 : Vorn$ = Chr(8216) : Hinten$ = Chr(8217) - case 03 : Vorn$ = Chr(8216) : Hinten$ = Chr(8217) - case 07 : qaerrorlog "Test impossible. No quotes in russian!" - hCloseDocument - goto endsub - case 31 : Vorn$ = Chr(8218) : Hinten$ = Chr(8216) - case 33 : Vorn$ = Chr(8216) : Hinten$ = Chr(8217) - case 34 : Vorn$ = Chr(8216) : Hinten$ = Chr(8217) - case 36 : Vorn$ = Chr(187) : Hinten$ = Chr(171) - case 39 : Vorn$ = Chr(8216) : Hinten$ = Chr(8217) - case 45 : Vorn$ = Chr(8217) : Hinten$ = Chr(8217) - case 46 : Vorn$ = Chr(8217) : Hinten$ = Chr(8217) - case 48 : Vorn$ = Chr(8216) : Hinten$ = Chr(8217) - case 49 : Vorn$ = Chr(8218) : Hinten$ = Chr(8216) - case 55 : Vorn$ = Chr(8216) : Hinten$ = Chr(8217) - case 81, 82, 86, 88 : Vorn$ = Chr(8216) : Hinten$ = Chr(8217) ' Asian + case 01 : Vorn$ = Chr(8216) : Hinten$ = Chr(8217) + case 03 : Vorn$ = Chr(8216) : Hinten$ = Chr(8217) + case 07 : qaerrorlog "Test impossible. No quotes in russian!" + hCloseDocument + goto endsub + case 31 : Vorn$ = Chr(8218) : Hinten$ = Chr(8216) + case 33 : Vorn$ = Chr(8216) : Hinten$ = Chr(8217) + case 34 : Vorn$ = Chr(8216) : Hinten$ = Chr(8217) + case 36 : Vorn$ = Chr(187) : Hinten$ = Chr(171) + case 39 : Vorn$ = Chr(8216) : Hinten$ = Chr(8217) + case 45 : Vorn$ = Chr(8217) : Hinten$ = Chr(8217) + case 46 : Vorn$ = Chr(8217) : Hinten$ = Chr(8217) + case 48 : Vorn$ = Chr(8216) : Hinten$ = Chr(8217) + case 49 : Vorn$ = Chr(8218) : Hinten$ = Chr(8216) + case 55 : Vorn$ = Chr(8216) : Hinten$ = Chr(8217) + case 81, 82, 86, 88 : Vorn$ = Chr(8216) : Hinten$ = Chr(8217) ' Asian case else : Warnlog "- Nothing prepared for this language, but I run: take the warnlogs an insert the numbers here.: "+iSprache - Vorn$ = Chr(8216) : Hinten$ = Chr(8217) + Vorn$ = Chr(8216) : Hinten$ = Chr(8217) end select else Printlog "- Tools/Autocorrect -double quotes" Normal$ = Chr(34) select case iSprache - case 01 : Vorn$ = Chr(8220) : Hinten$ = Chr(8221) - case 03 : Vorn$ = Chr(8220) : Hinten$ = Chr(8221) - case 07 : qaerrorlog "Test not possible. No quotes in russian !" - Call hCloseDocument - goto endsub - case 31 : Vorn$ = Chr(8222) : Hinten$ = Chr(8220) - case 33 : Vorn$ = Chr(171) : Hinten$ = Chr(187) - case 34 : Vorn$ = Chr(8220) : Hinten$ = Chr(8221) - case 36 : Vorn$ = Chr(8222) : Hinten$ = Chr(8221) - case 39 : Vorn$ = Chr(8220) : Hinten$ = Chr(8221) - case 45 : Vorn$ = Chr(8221) : Hinten$ = Chr(8221) - case 46 : Vorn$ = Chr(8221) : Hinten$ = Chr(8221) - case 48 : Vorn$ = Chr(8222) : Hinten$ = Chr(8221) - case 49 : Vorn$ = Chr(8222) : Hinten$ = Chr(8220) - case 55 : Vorn$ = Chr(8220) : Hinten$ = Chr(8221) - case 81, 82, 86, 88 : Vorn$ = Chr(8220) : Hinten$ = Chr(8221) ' Asian + case 01 : Vorn$ = Chr(8220) : Hinten$ = Chr(8221) + case 03 : Vorn$ = Chr(8220) : Hinten$ = Chr(8221) + case 07 : qaerrorlog "Test not possible. No quotes in russian !" + Call hCloseDocument + goto endsub + case 31 : Vorn$ = Chr(8222) : Hinten$ = Chr(8220) + case 33 : Vorn$ = Chr(171) : Hinten$ = Chr(187) + case 34 : Vorn$ = Chr(8220) : Hinten$ = Chr(8221) + case 36 : Vorn$ = Chr(8222) : Hinten$ = Chr(8221) + case 39 : Vorn$ = Chr(8220) : Hinten$ = Chr(8221) + case 45 : Vorn$ = Chr(8221) : Hinten$ = Chr(8221) + case 46 : Vorn$ = Chr(8221) : Hinten$ = Chr(8221) + case 48 : Vorn$ = Chr(8222) : Hinten$ = Chr(8221) + case 49 : Vorn$ = Chr(8222) : Hinten$ = Chr(8220) + case 55 : Vorn$ = Chr(8220) : Hinten$ = Chr(8221) + case 81, 82, 86, 88 : Vorn$ = Chr(8220) : Hinten$ = Chr(8221) ' Asian case else : Warnlog "- Nothing prepared for this language: "+iSprache - goto endsub + goto endsub end select endif Printlog " - replace quotes" '------------------------------------------------------------------------------------------ - '/// check default item for beginn and end. type them as normal and look how it get's replaced ///' - '/// Tools->Autocorrect... ///' ToolsAutocorrect - Kontext - '/// select tabpage 'Custom Quotes' ///' - active.SetPage TabTypografisch - Kontext "TabTypografisch" - '/// check checkbox 'Replace'; Simple: ; Double: click button 'Default'; ///' - if bSimple then - EinfacheErsetzen.Check - else - DoppelteErsetzen.Check - DoppeltStandard.Click - endif - '/// close dialog 'AutoCorrect' with OK ///' + Kontext + active.SetPage TabTypografisch + Kontext "TabTypografisch" + if bSimple then + EinfacheErsetzen.Check + else + DoppelteErsetzen.Check + DoppeltStandard.Click + endif TabTypografisch.OK sleep 5 gMouseClick 50,50 sleep 5 - '/// create textframe with quotes; Simple: 39; Double: 34; ///' hTextrahmenErstellen ( Normal$ + "Hallo" + Normal$ + " ",20,20,60,30) sleep 5 - '/// press keys [Home][Shift + Right] to select the start quote ///' hTypeKeys ("") sleep 5 - '/// Edit->Copy ///' EditCopy sTemp = GetClipboardText - '/// compare quote to reference start quote ///' if (sTemp <> Vorn$) then Warnlog "The beginning quote seems wrong. Should be :'" + Vorn$ +"':"+ASC(vorn$)+ ": but it is = :'" + sTemp +"':"+ASC(sTemp)+":" endif sleep 1 - '/// press keys [End][Left][Shift + Left] to select the end quote ///' hTypeKeys "" Sleep 1 EditCopy sTemp = GetClipboardText - '/// compare quote to reference end quote ///' if (sTemp <> Hinten$) then Warnlog "The end quote seems wrong. Should be :" + Hinten$ +":"+ASC(Hinten$) +": but it is :" + sTemp + ":"+ASC(sTemp)+":" endif - '/// type keys [Home][Shift + End][Delete] to remove text hTypeKeys "" Printlog " - dont replace quotes" '------------------------------------------------------------------------------------------ - '/// Tools->Autocorrect... ///' ToolsAutocorrect Kontext - '/// select tabpage 'Custom Quotes' ///' - Active.SetPage TabTypografisch - Kontext "TabTypografisch" - '/// UNcheck checkbox 'Replace' ///' - if bSimple then - EinfacheErsetzen.Uncheck - else - DoppelteErsetzen.Uncheck - endif - '/// close dialog 'AutoCorrect' with OK ///' + Active.SetPage TabTypografisch + Kontext "TabTypografisch" + if bSimple then + EinfacheErsetzen.Uncheck + else + DoppelteErsetzen.Uncheck + endif TabTypografisch.OK sleep 1 gMouseClick 50,50 sleep 1 - '/// create textframe with quotes; Simple: 39; Double: 34; ///' hTextrahmenErstellen ( Normal$ + "Hello" + Normal$ + " ",20,20,60,30) sleep 1 - '/// press keys [Home][Shift + Right] to select the start quote ///' hTypeKeys "" Sleep 1 - '/// Edit->Copy ///' EditCopy sTemp = GetClipboardText - '/// check if quote got modified; it hasn't got. ///' if (sTemp <> Normal$) then Warnlog "The beginning quote seems wrong. Should be :'" + Vorn$ +"':"+ASC(vorn$)+ ": but it is = :'" + sTemp +"':"+ASC(sTemp)+":" endif - '/// press keys [End][Left][Shift + Left] to select the end quote ///' hTypeKeys "" Sleep 1 - '/// Edit->Copy ///' EditCopy sTemp = GetClipboardText - '/// check if quote got modified; it hasn't got. ///' if (sTemp <> Normal$) then Warnlog "The end quote seems wrong. Should be :" + Hinten$ +":"+ASC(Hinten$) +": but it is :" + sTemp + ":"+ASC(sTemp)+":" endif - '/// type keys [Home][Shift + End][Delete] to remove text hTypeKeys "" Printlog " - replace quotes" '------------------------------------------------------------------------------------------ - '/// set to a value, and check if that value is used///' - '/// Tools->Autocorrect... ///' ToolsAutocorrect Kontext - '/// select tabpage 'Custom Quotes' ///' - active.SetPage TabTypografisch - Kontext "TabTypografisch" - '/// check checkbox 'Replace'; click button Start quote: '"/'' ///' - if bSimple then - EinfacheErsetzen.Check - EinfachWortAnfang.Click - else - DoppelteErsetzen.Check - DoppeltWortAnfang.Click - endif - Kontext "Sonderzeichen" - sleep 1 - '/// on dialog 'Start Quote' in character list press [Home] 91*[Right] ///' - Schriftliste.TypeKeys "" - Schriftliste.TypeKeys "", 91 '123 - sleep 1 - '/// close dialog 'Start Quote' with OK ///' - Sonderzeichen.OK - - Kontext "TabTypografisch" - '/// click button End Quote: '"/'' ///' - if bSimple then - EinfachWortEnde.Click - else - DoppeltWortEnde.Click - endif - Kontext "Sonderzeichen" - sleep 1 - '/// on dialog 'End Quote' in character list press [Home] 93*[Right] ///' - Schriftliste.TypeKeys "" - Schriftliste.TypeKeys "", 93 '125 - sleep 1 - '/// close dialog 'End Quote' with OK ///' - Sonderzeichen.OK - - Kontext "TabTypografisch" - '/// close dialog 'AutoCorrect' with OK ///' + active.SetPage TabTypografisch + Kontext "TabTypografisch" + if bSimple then + EinfacheErsetzen.Check + EinfachWortAnfang.Click + else + DoppelteErsetzen.Check + DoppeltWortAnfang.Click + endif + Kontext "Sonderzeichen" + sleep 1 + Schriftliste.TypeKeys "" + Schriftliste.TypeKeys "", 91 '123 + sleep 1 + Sonderzeichen.OK + + Kontext "TabTypografisch" + if bSimple then + EinfachWortEnde.Click + else + DoppeltWortEnde.Click + endif + Kontext "Sonderzeichen" + sleep 1 + Schriftliste.TypeKeys "" + Schriftliste.TypeKeys "", 93 '125 + sleep 1 + Sonderzeichen.OK + + Kontext "TabTypografisch" TabTypografisch.OK sleep 5 gMouseClick 50,50 sleep 5 - '/// create textframe with quotes; Simple: 39; Double: 34; ///' hTextrahmenErstellen ( Normal$ + "Hello" + Normal$ + " ",20,20,60,30) sleep 2 - '/// press keys [Home][Shift + Right] to select the start quote ///' hTypeKeys "" Sleep 5 - '/// Edit->Copy ///' EditCopy sTemp = GetClipboardText - '/// compare quote to selected start quote ///' if (sTemp <> Chr(123)) then Warnlog "Beginning quote is wrong. It should be :" + Chr (123) + ":123: but it is = " + sTemp +":"+ASC(sTemp)+":" endif - '/// press keys [End][Left][Shift + Left] to select the end quote ///' hTypeKeys "" Sleep 1 - '/// Edit->Copy ///' EditCopy sTemp = GetClipboardText - '/// compare quote to selected end quote ///' if (sTemp <> Chr(125)) then Warnlog "The end quote is wrong, it should be :" + Chr (125) + ":125: but it is = " + sTemp +":"+ASC(sTemp)+":" endif - '/// type keys [Home][Shift + End][Delete] to remove text hTypeKeys "" Printlog " - back to standard" '------------------------------------------------------------------------------------------ - '/// Tools->Autocorrect... ///' ToolsAutocorrect Kontext - '/// select tabpage 'Custom Quotes' ///' - active.SetPage TabTypografisch - Kontext "TabTypografisch" - '/// check checkbox 'Replace'; click button 'Default'; ///' - if bSimple then - EinfacheErsetzen.Check - EinfachStandard.Click - else - DoppelteErsetzen.Check - DoppeltStandard.Click - endif + active.SetPage TabTypografisch + Kontext "TabTypografisch" + if bSimple then + EinfacheErsetzen.Check + EinfachStandard.Click + else + DoppelteErsetzen.Check + DoppeltStandard.Click + endif - '/// close dialog 'AutoCorrect' with OK ///' TabTypografisch.OK sleep 1 - '/// create textframe with quotes; Simple: 39; Double: 34; ///' hTextrahmenErstellen ( Normal$ + "Hello" + Normal$ + " ",20,20,60,30) sleep 2 - '/// press keys [Home][Shift + Right] to select the start quote ///' hTypeKeys "" Sleep 1 - '/// Edit->Copy ///' EditCopy sTemp = GetClipboardText - '/// compare quote to reference start quote ///' if (sTemp <> Vorn$) then Warnlog "The beginning quote seems wrong. Should be :" + Vorn$ +":"+ASC(vorn$)+ ": but it is = :" + sTemp +":"+ASC(sTemp)+":" endif - '/// press keys [End][Left][Shift + Left] to select the end quote ///' hTypeKeys "" Sleep 1 - '/// Edit->Copy ///' EditCopy sTemp = GetClipboardText - '/// compare quote to reference end quote ///' if (sTemp <> Hinten$) then Warnlog "The end quote seems wrong. Should be :" + Hinten$ +":"+ASC(Hinten$) +": but it is :" + sTemp + ":"+ASC(sTemp)+":" endif - '/// type keys [Home][Shift + End][Delete] to remove text hTypeKeys "" - '/// Tools->Autocorrect... ///' ToolsAutocorrect Kontext - '/// select tabpage 'Custom Quotes' ///' - active.SetPage TabTypografisch - Kontext "TabTypografisch" - '/// UNcheck checkbox 'Replace' ///' - if bSimple then - EinfacheErsetzen.UnCheck - else - DoppelteErsetzen.UnCheck - endif - '/// close dialog 'AutoCorrect' with OK ///' + active.SetPage TabTypografisch + Kontext "TabTypografisch" + if bSimple then + EinfacheErsetzen.UnCheck + else + DoppelteErsetzen.UnCheck + endif TabTypografisch.OK sleep 1 - '/// close application ///' hCloseDocument endcase diff --git a/testautomation/graphics/optional/includes/global/g_character.inc b/testautomation/graphics/optional/includes/global/g_character.inc index 52af1ca97b62..cfb92ba59502 100755 --- a/testautomation/graphics/optional/includes/global/g_character.inc +++ b/testautomation/graphics/optional/includes/global/g_character.inc @@ -1,7 +1,7 @@ 'encoding UTF-8 Do not remove or change this line! '************************************************************************** '* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. -'* +'* '* Copyright 2008 by Sun Microsystems, Inc. '* '* OpenOffice.org - a multi-platform office productivity suite @@ -45,44 +45,35 @@ '\******************************************************************* testcase tFormatCharacter - dim sTemp as string - dim iTemp as integer - - '/// open application ///' - Call hNewDocument - sleep 1 - - '/// create a textframe with content ///' - hTextrahmenErstellen ("This is a check, a check, a check.",10,10,60,30) - '/// type with keys [strg]+[home] [shift]+[end] to select the inserted text ///' - hTypeKeys "" - sleep 1 - - '/// Format->Character ///' - FormatCharacter - sleep 1 - '/// switch to tabpage 'Font' ///' - Kontext - Messagebox.SetPage TabFont - Kontext "TabFont" - sleep 1 - - '/// switch to tabpage 'Font Effects' ///' - Kontext - Messagebox.SetPage TabFontEffects - kontext "TabFontEffects" - sleep 1 - - '/// switch to tabpage 'Position' ///' - Kontext - Messagebox.SetPage TabFontPosition - Kontext "TabFontPosition" - sleep 1 - - '/// close dialog 'Character' with 'OK' ///' - TabFontPosition.OK - '/// close application ///' - Call hCloseDocument + dim sTemp as string + dim iTemp as integer + + Call hNewDocument + sleep 1 + + hTextrahmenErstellen ("This is a check, a check, a check.",10,10,60,30) + hTypeKeys "" + sleep 1 + + FormatCharacter + sleep 1 + Kontext + Messagebox.SetPage TabFont + Kontext "TabFont" + sleep 1 + + Kontext + Messagebox.SetPage TabFontEffects + kontext "TabFontEffects" + sleep 1 + + Kontext + Messagebox.SetPage TabFontPosition + Kontext "TabFontPosition" + sleep 1 + + TabFontPosition.OK + Call hCloseDocument endcase testcase tDialogCharacter @@ -105,264 +96,253 @@ testcase tDialogCharacter ToolsOptions hToolsOptions ( "LanguageSettings", "Languages" ) - if Aktivieren.IsChecked then '/// Check in what state Asian support is ///' - Asiansupportsetting = TRUE - else - Asiansupportsetting = FALSE - Aktivieren.Check '/// Activate if not already activated ///' - end if + Asiansupportsetting = TRUE +else + Asiansupportsetting = FALSE +end if - Kontext "ExtrasOptionenDlg" - ExtrasOptionenDlg.OK - Sleep (3) +Kontext "ExtrasOptionenDlg" +ExtrasOptionenDlg.OK +Sleep (3) - Kontext +Kontext - Call hTextrahmenErstellen ( "Some text in a box.", 20, 20, 50, 50 ) +Call hTextrahmenErstellen ( "Some text in a box.", 20, 20, 50, 50 ) - FormatCharacter - sleep 1 - Kontext '"Active" ' insert this, perhaps another - Active.SetPage TabFont ' tabpage is active at open - Kontext "TabFont" - CountOfThem = FontWest.GetItemCount - for y = 1 to CountOfThem +FormatCharacter +sleep 1 +Kontext '"Active" ' insert this, perhaps another +Active.SetPage TabFont ' tabpage is active at open +Kontext "TabFont" +CountOfThem = FontWest.GetItemCount +for y = 1 to CountOfThem FontWest.Select y Xtext = FontWest.GetSelText -' printlog "This FontWest is: " & Xtext - next y - - CountOfThem = StyleWest.GetItemCount - for y = 1 to CountOfThem - StyleWest.Select y - Xtext = StyleWest.GetSelText -' printlog "This StyleWest is: " & Xtext - next y - - CountOfThem = SizeWest.GetItemCount - for y = 1 to CountOfThem - SizeWest.Select y - Xtext = SizeWest.GetSelText -' printlog "This SizeWest is: " & Xtext - next y - - CountOfThem = LanguageWest.GetItemCount - for y = 1 to CountOfThem - LanguageWest.Select y - Xtext = LanguageWest.GetSelText -' printlog "This LanguageWest is: " & Xtext - next y - - CountOfThem = FontEast.GetItemCount - for y = 1 to CountOfThem - FontEast.Select y - Xtext = FontEast.GetSelText -' printlog "This FontEast is: " & Xtext - next y - - CountOfThem = StyleEast.GetItemCount - for y = 1 to CountOfThem - StyleEast.Select y - Xtext = StyleEast.GetSelText -' printlog "This StyleEast is: " & Xtext - next y - - CountOfThem = SizeEast.GetItemCount - for y = 1 to CountOfThem - SizeEast.Select y - Xtext = SizeEast.GetSelText -' printlog "This SizeEast is: " & Xtext - next y - - CountOfThem = LanguageEast.GetItemCount - for y = 1 to CountOfThem - LanguageEast.Select y - Xtext = LanguageEast.GetSelText -' printlog "This LanguageEast is: " & Xtext - next y - - Kontext - Active.SetPage TabFontEffects - Kontext "TabFontEffects" - if NOT Outline.IsChecked then - Outline.Check - end if - - if NOT Shadow.IsChecked then - Shadow.Check - end if - - CountOfThem = Underline.GetItemCount - CountOfColors = Color.GetItemCount + ' printlog "This FontWest is: " & Xtext +next y + +CountOfThem = StyleWest.GetItemCount +for y = 1 to CountOfThem + StyleWest.Select y + Xtext = StyleWest.GetSelText + ' printlog "This StyleWest is: " & Xtext +next y + +CountOfThem = SizeWest.GetItemCount +for y = 1 to CountOfThem + SizeWest.Select y + Xtext = SizeWest.GetSelText + ' printlog "This SizeWest is: " & Xtext +next y + +CountOfThem = LanguageWest.GetItemCount +for y = 1 to CountOfThem + LanguageWest.Select y + Xtext = LanguageWest.GetSelText + ' printlog "This LanguageWest is: " & Xtext +next y + +CountOfThem = FontEast.GetItemCount +for y = 1 to CountOfThem + FontEast.Select y + Xtext = FontEast.GetSelText + ' printlog "This FontEast is: " & Xtext +next y + +CountOfThem = StyleEast.GetItemCount +for y = 1 to CountOfThem + StyleEast.Select y + Xtext = StyleEast.GetSelText + ' printlog "This StyleEast is: " & Xtext +next y + +CountOfThem = SizeEast.GetItemCount +for y = 1 to CountOfThem + SizeEast.Select y + Xtext = SizeEast.GetSelText + ' printlog "This SizeEast is: " & Xtext +next y + +CountOfThem = LanguageEast.GetItemCount +for y = 1 to CountOfThem + LanguageEast.Select y + Xtext = LanguageEast.GetSelText + ' printlog "This LanguageEast is: " & Xtext +next y + +Kontext +Active.SetPage TabFontEffects +Kontext "TabFontEffects" +if NOT Outline.IsChecked then + Outline.Check +end if + +if NOT Shadow.IsChecked then + Shadow.Check +end if + +CountOfThem = Underline.GetItemCount +CountOfColors = Color.GetItemCount + +for y = 2 to CountOfThem + Underline.Select y + Xtext = Underline.GetSelText + ' printlog "This Underline is: " & Xtext + + for i = 1 to CountOfColors + Color.Select i + TestColorString = Color.GetSelText + ' printlog "This Color is: " & TestColorString + next i +next y - for y = 2 to CountOfThem - Underline.Select y - Xtext = Underline.GetSelText -' printlog "This Underline is: " & Xtext +CountOfThem = StrikeThrough.GetItemCount +for y = 2 to CountOfThem + StrikeThrough.Select y + IndividualWords.UnCheck + Xtext = StrikeThrough.GetSelText + ' printlog "The StrikeThrough is: " & Xtext - for i = 1 to CountOfColors - Color.Select i - TestColorString = Color.GetSelText -' printlog "This Color is: " & TestColorString - next i - next y - - CountOfThem = StrikeThrough.GetItemCount - for y = 2 to CountOfThem - StrikeThrough.Select y - IndividualWords.UnCheck - Xtext = StrikeThrough.GetSelText -' printlog "The StrikeThrough is: " & Xtext - - for i = 1 to CountOfColors - Color.Select i - TestColorString = Color.GetSelText -' printlog "And the Color is: " & TestColorString - next i - next y + for i = 1 to CountOfColors + Color.Select i + TestColorString = Color.GetSelText + ' printlog "And the Color is: " & TestColorString + next i +next y - IndividualWords.Check - printlog "Individual Words = On" +IndividualWords.Check +printlog "Individual Words = On" - CountOfThem = StrikeThrough.GetItemCount - for y = 2 to CountOfThem - StrikeThrough.Select y - Xtext = StrikeThrough.GetSelText -' printlog "The StrikeThrough is: " & Xtext +CountOfThem = StrikeThrough.GetItemCount +for y = 2 to CountOfThem + StrikeThrough.Select y + Xtext = StrikeThrough.GetSelText + ' printlog "The StrikeThrough is: " & Xtext - for i = 1 to CountOfColors - Color.Select i - TestColorString = Color.GetSelText -' printlog "And the Color is: " & TestColorString - next i - next y - - CountOfThem = Emphasis.GetItemCount - for y = 2 to CountOfThem - Emphasis.Select y - Xtext = Emphasis.GetSelText -' printlog "The Emphasis is: " & Xtext - - for i = 1 to CountOfColors - Color.Select i - TestColorString = Color.GetSelText -' printlog "And the Color is: " & TestColorString - next i - next y - - CountOfThem = Position.GetItemCount - for y = 1 to CountOfThem - Position.Select y - Xtext = Position.GetSelText -' printlog "The Position is: " & Xtext - for i = 1 to CountOfColors - Color.Select i - TestColorString = Color.GetSelText -' printlog "And the Color is: " & TestColorString - next i - next y + for i = 1 to CountOfColors + Color.Select i + TestColorString = Color.GetSelText + ' printlog "And the Color is: " & TestColorString + next i +next y - CountOfThem = FontColor.GetItemCount - for z = 1 to CountOfThem - FontColor.Select z - TestColorString = FontColor.GetSelText -' printlog "The FontColor is: " & TestColorString - next z +CountOfThem = Emphasis.GetItemCount +for y = 2 to CountOfThem + Emphasis.Select y + Xtext = Emphasis.GetSelText + ' printlog "The Emphasis is: " & Xtext - CountOfThem = Relief.GetItemCount - TestColorString = Color.GetSelText - for y = 1 to CountOfThem - Relief.Select y - Xtext = Relief.GetSelText + for i = 1 to CountOfColors + Color.Select i TestColorString = Color.GetSelText -' printlog "The Relief is: " & Xtext - next y - - Kontext - Active.SetPage TabFontPosition '/// Changes the active tab to "Position" - Kontext "TabFontPosition" - printlog "TabFontPosition" - SuperScript.Check - Super.Check - RelativeFontSize.ToMin '/// Testing the "Relative Font Size"-Listbox - ThisIsMyTextFromControl = RelativeFontSize.GetText + ' printlog "And the Color is: " & TestColorString + next i +next y + +CountOfThem = Position.GetItemCount +for y = 1 to CountOfThem + Position.Select y + Xtext = Position.GetSelText + ' printlog "The Position is: " & Xtext + for i = 1 to CountOfColors + Color.Select i + TestColorString = Color.GetSelText + ' printlog "And the Color is: " & TestColorString + next i +next y + +CountOfThem = FontColor.GetItemCount +for z = 1 to CountOfThem + FontColor.Select z + TestColorString = FontColor.GetSelText + ' printlog "The FontColor is: " & TestColorString +next z + +CountOfThem = Relief.GetItemCount +TestColorString = Color.GetSelText +for y = 1 to CountOfThem + Relief.Select y + Xtext = Relief.GetSelText + TestColorString = Color.GetSelText + ' printlog "The Relief is: " & Xtext +next y + +Kontext +Kontext "TabFontPosition" +printlog "TabFontPosition" +SuperScript.Check +Super.Check +ThisIsMyTextFromControl = RelativeFontSize.GetText ' printlog "The Relative Font Size minimum is: " & ThisIsMyTextFromControl - for y = 1 to 99 - RelativeFontSize.TypeKeys "" - ThisIsMyTextFromControl = RelativeFontSize.GetText -' printlog "The Relative Font Size is: " & ThisIsMyTextFromControl - next y - - Automatic.Check - ScaleWith.ToMin '/// Testing the "Scale With"-Listbox - ThisIsMyTextFromControl = ScaleWith.GetText - printlog "ScaleWith minimum is:" & ThisIsMyTextFromControl - ' ScaleWith.TypeKeys "" - for y = 1 to 100 - ScaleWith.TypeKeys "" - ThisIsMyTextFromControl = ScaleWith.GetText -' printlog "ScaleWith is:" & ThisIsMyTextFromControl - next y - - Normal.Check - Subscript.Check - - RelativeFontSize.ToMin '/// Testing the "Reliative Font Size"-Listbox again but this time - ThisIsMyTextFromControl = RelativeFontSize.GetText '/// with "Subscript" and "Normal" Checked - printlog "The Relative Font Size minimum is: " & ThisIsMyTextFromControl - for y = 1 to 99 - RelativeFontSize.TypeKeys "" - ThisIsMyTextFromControl = RelativeFontSize.GetText -' printlog "The Relative Font Size is: " & ThisIsMyTextFromControl - next y - - Automatic.Check - - ScaleWith.ToMin '/// Testing the "ScaleWith"-Listbox +for y = 1 to 99 + RelativeFontSize.TypeKeys "" + ThisIsMyTextFromControl = RelativeFontSize.GetText + ' printlog "The Relative Font Size is: " & ThisIsMyTextFromControl +next y + +Automatic.Check +ThisIsMyTextFromControl = ScaleWith.GetText +printlog "ScaleWith minimum is:" & ThisIsMyTextFromControl +' ScaleWith.TypeKeys "" +for y = 1 to 100 + ScaleWith.TypeKeys "" ThisIsMyTextFromControl = ScaleWith.GetText - printlog "The ScaleWith Size is: " & ThisIsMyTextFromControl - for y = 1 to 100 - ScaleWith.TypeKeys "" - ThisIsMyTextFromControl = ScaleWith.GetText -' printlog "The ScaleWith Size is: " & ThisIsMyTextFromControl - next y - - ThisIsMyTextFromControl = Spacing.GetSelText '/// Testing the "Spacing"-ListBox - printlog "The Spacing is first: " & ThisIsMyTextFromControl - for y = 2 to 3 - Spacing.Select y - ThisIsMyTextFromControl = Spacing.GetSelText - printlog "The Spacing is: " & ThisIsMyTextFromControl - ThisIsMyTextFromControl = SpacingBy.GetText '/// Testing the "Spacing By"-Scrollbox -' printlog "The SpacingBy Size minimum is: " & ThisIsMyTextFromControl - SpacingBy.ToMin - for z = 1 to 4 - SpacingBy.More - ThisIsMyTextFromControl = SpacingBy.GetText -' printlog "The SpacingBy Size is: " & ThisIsMyTextFromControl - next z - PairKerning.Check - next y + ' printlog "ScaleWith is:" & ThisIsMyTextFromControl +next y - Kontext "TabFontPosition" - TabFontPosition.Ok +Normal.Check +Subscript.Check - if Asiansupportsetting = FALSE then - kontext - ToolsOptions - hToolsOptions ( "LanguageSettings", "Languages" ) - Aktivieren.UnCheck '/// Deactivate if not already deactivated ///' - Printlog "Reseted the Asiansupport-value to it's original state" +printlog "The Relative Font Size minimum is: " & ThisIsMyTextFromControl +for y = 1 to 99 + RelativeFontSize.TypeKeys "" + ThisIsMyTextFromControl = RelativeFontSize.GetText + ' printlog "The Relative Font Size is: " & ThisIsMyTextFromControl +next y - Kontext "ExtrasOptionenDlg" - ExtrasOptionenDlg.OK - Sleep (3) +Automatic.Check -' ActiveDeactivateAsianSupport = FALSE - end if +ThisIsMyTextFromControl = ScaleWith.GetText +printlog "The ScaleWith Size is: " & ThisIsMyTextFromControl +for y = 1 to 100 + ScaleWith.TypeKeys "" + ThisIsMyTextFromControl = ScaleWith.GetText + ' printlog "The ScaleWith Size is: " & ThisIsMyTextFromControl +next y + +printlog "The Spacing is first: " & ThisIsMyTextFromControl +for y = 2 to 3 + Spacing.Select y + ThisIsMyTextFromControl = Spacing.GetSelText + printlog "The Spacing is: " & ThisIsMyTextFromControl + ' printlog "The SpacingBy Size minimum is: " & ThisIsMyTextFromControl + SpacingBy.ToMin + for z = 1 to 4 + SpacingBy.More + ThisIsMyTextFromControl = SpacingBy.GetText + ' printlog "The SpacingBy Size is: " & ThisIsMyTextFromControl + next z + PairKerning.Check +next y + +Kontext "TabFontPosition" +TabFontPosition.Ok + +if Asiansupportsetting = FALSE then + kontext + ToolsOptions + hToolsOptions ( "LanguageSettings", "Languages" ) + Printlog "Reseted the Asiansupport-value to it's original state" - Printlog "DialogCharacter Ends" - Call hCloseDocument + Kontext "ExtrasOptionenDlg" + ExtrasOptionenDlg.OK + Sleep (3) + + ' ActiveDeactivateAsianSupport = FALSE +end if + +Printlog "DialogCharacter Ends" +Call hCloseDocument endcase testcase tSetFormatCharacter @@ -380,117 +360,93 @@ testcase tSetFormatCharacter dim sFile as string dim sTemp as string - if (gApplication = "IMPRESS") then - ExtensionString = "odp" - else - ExtensionString = "odg" - end if + if (gApplication = "IMPRESS") then + ExtensionString = "odp" + else + ExtensionString = "odg" + end if sFile = convertPath(gTesttoolpath + "graphics\required\input\spellb_" + iSprache + "."+ExtensionString) - '/// create document, if it doesn't exist, else skip this case :-) ///' if (dir(sFile)="") then - '/// open application ///' Call hNewDocument - '/// activate all languages in options ///' - '///+ Tools->Options ///' ToolsOptions - '///+ select tabpage 'Languages' from set 'Language Settings' ///' hToolsOptions("LANGUAGESETTINGS","Languages") kontext "TabSprachen" - '///+ save state and check checkbox 'Asian languages support' ///' - '/// if the language is Asian, skip this part ///' printlog "iSprache = " + iSprache if bAsianLan = FALSE then - bAsian = Aktivieren.isEnabled - Aktivieren.check + bAsian = Aktivieren.isEnabled + Aktivieren.check endif - '///+ save state and check checkbox 'Complex text layout (CTL) support' ///' bComplex = ComplexScriptEnabled.isEnabled ComplexScriptEnabled.check - '///+ close dialog 'Options' with OK ///' Kontext "ExtrasOptionenDlg" ExtrasOptionenDlg.OK - '/// get count of languages ///' - '///+ Format->Character ///' FormatCharacter sleep 1 Kontext - '///+ switch to tabpage 'Font' ///' Messagebox.SetPage TabFont kontext "TabFont" sleep 1 - '///+ get count of languages for Western/Asian/CTL fonts ///' iWest = LanguageWest.getItemCount iAsian = LanguageEast.getItemCount iComplex = LanguageCTL.getItemCount if bAsianLan = True then - if (iWest <> 144) then - Warnlog "Western text font languages count wrong; expected: '113' is: '" + iWest + "'" - else - Printlog "Western text font languages count: " + iWest - endif - if (iAsian <> 8) then - Warnlog "Asian text font languages count wrong; expected: '9' is: '" + iAsian + "'" - else - Printlog "Asian text font languages count : " + iAsian - endif - if (iComplex <> 50) then - Warnlog "CTL font languages count wrong; expected: '30' is: '" + iComplex + "'" - else - Printlog "CTL font languages count : " + iComplex - endif + if (iWest <> 144) then + Warnlog "Western text font languages count wrong; expected: '113' is: '" + iWest + "'" + else + Printlog "Western text font languages count: " + iWest + endif + if (iAsian <> 8) then + Warnlog "Asian text font languages count wrong; expected: '9' is: '" + iAsian + "'" + else + Printlog "Asian text font languages count : " + iAsian + endif + if (iComplex <> 50) then + Warnlog "CTL font languages count wrong; expected: '30' is: '" + iComplex + "'" + else + Printlog "CTL font languages count : " + iComplex + endif else - if (iWest <> 113) then - Warnlog "Western text font languages count wrong; expected: '113' is: '" + iWest + "'" - else - Printlog "Western text font languages count: " + iWest - endif - if (iAsian <> 9) then - Warnlog "Asian text font languages count wrong; expected: '9' is: '" + iAsian + "'" - else - Printlog "Asian text font languages count : " + iAsian - endif - if (iComplex <> 30) then - Warnlog "CTL font languages count wrong; expected: '30' is: '" + iComplex + "'" - else - Printlog "CTL font languages count : " + iComplex - endif + if (iWest <> 113) then + Warnlog "Western text font languages count wrong; expected: '113' is: '" + iWest + "'" + else + Printlog "Western text font languages count: " + iWest + endif + if (iAsian <> 9) then + Warnlog "Asian text font languages count wrong; expected: '9' is: '" + iAsian + "'" + else + Printlog "Asian text font languages count : " + iAsian + endif + if (iComplex <> 30) then + Warnlog "CTL font languages count wrong; expected: '30' is: '" + iComplex + "'" + else + Printlog "CTL font languages count : " + iComplex + endif endif - '///+ close dialog 'Character' with OK ///' TabFont.Ok WL_SD_TextEinfuegenDraw gMouseMove ( 1, 1, 100, 100 ) - '///+ print the language counts into the first line of the document ///' hTypeKeys(" "+iWest+" "+iAsian+" "+iComplex+"") - '/// set all languages to '[None]' ///' - '///+ Format->Character ///' FormatCharacter kontext "TabFont" - '///+ select '[None]' (should be the first entry in every listbox) ///' LanguageWest.select 1 LanguageEast.select 1 LanguageCTL.select 1 - '///+ close dialog 'Character' with OK ///' TabFont.Ok - '/// print one line with language formated text for every language ///' for i = 1 to iWest - '///+ Format->Character ///' FormatCharacter - kontext "TabFont" - '///+ select the next language ///' - LanguageWest.select i - sTemp = LanguageWest.getItemText (i) - ListAppend(sLanguage(), sTemp) - '///+ close dialog 'Character' with OK ///' + kontext "TabFont" + LanguageWest.select i + sTemp = LanguageWest.getItemText (i) + ListAppend(sLanguage(), sTemp) TabFont.Ok - '///+ type [return][number of language in list][Tab][Language name][Tab] ///' hTypeKeys(""+i+""+sTemp+"") next i @@ -503,11 +459,11 @@ testcase tSetFormatCharacter for i = 1 to iAsian FormatCharacter - Kontext - kontext "TabFont" - LanguageEast.select i - sTemp = LanguageEast.getItemText (i) - ListAppend(sLanguage(), sTemp) + Kontext + kontext "TabFont" + LanguageEast.select i + sTemp = LanguageEast.getItemText (i) + ListAppend(sLanguage(), sTemp) TabFont.Ok hTypeKeys(""+i+""+sTemp+"") next i @@ -521,16 +477,15 @@ testcase tSetFormatCharacter for i = 1 to iComplex FormatCharacter - Kontext - kontext "TabFont" - LanguageCTL.select i - sTemp = LanguageCTL.getItemText (i) - ListAppend(sLanguage(), sTemp) + Kontext + kontext "TabFont" + LanguageCTL.select i + sTemp = LanguageCTL.getItemText (i) + ListAppend(sLanguage(), sTemp) TabFont.Ok hTypeKeys(""+i+""+sTemp+"") next i - '/// save the created document & the languages list if they don't exists ///' hFileSaveAs (sFile) qaErrorLog "Created file. Please check it and then commit it! " + sTemp sTemp = convertPath(gTesttoolpath + "graphics\required\input\spellb_" + iSprache + ".txt") @@ -538,29 +493,21 @@ testcase tSetFormatCharacter ListWrite(sLanguage(), sTemp,"utf8") endif - '/// restore the options ///' - '///+ Tools->Options ///' ToolsOptions - '///+ select tabpage 'Languages' from set 'Language Settings' ///' hToolsOptions("LANGUAGESETTINGS","Languages") kontext "TabSprachen" - '///+ restore state of checkbox 'Asian languages support' ///' - '/// if the language is Asian, skip this part ///' if bAsianLan = FALSE then - if (bAsian <> TRUE) then - Aktivieren.UNcheck - endif + if (bAsian <> TRUE) then + Aktivieren.UNcheck + endif endif - '///+ restore state of checkbox 'Complex text layout (CTL) support' ///' if (bComplex <> TRUE) then ComplexScriptEnabled.UNcheck endif - '///+ close dialog 'Options' with OK ///' Kontext "ExtrasOptionenDlg" ExtrasOptionenDlg.OK - '/// close application ///' Call hCloseDocument endif endcase @@ -580,35 +527,26 @@ testcase tGetFormatCharacter dim iTemp as integer dim sSpellBooks(30) as string - if (gApplication = "IMPRESS") then - ExtensionString = "odp" + if (gApplication = "IMPRESS") then + ExtensionString = "odp" else - ExtensionString = "odg" + ExtensionString = "odg" end if - - '/// open the english document with all languages ///' + hDateiOeffnen (convertPath(gTesttoolpath + "graphics\required\input\spellb_" + iSprache + "."+ExtensionString) ListRead(sLanguageR(), convertPath(gTesttoolpath + "graphics\required\input\spellb_1.txt"),"utf8") - '/// activate all languages in options ///' - '///+ Tools->Options ///' ToolsOptions - '///+ select tabpage 'Languages' from set 'Language Settings' ///' hToolsOptions("LANGUAGESETTINGS","Languages") kontext "TabSprachen" - '///+ save state and check checkbox 'Asian languages support' ///' bAsian = Aktivieren.isEnabled Aktivieren.check - '///+ save state and check checkbox 'Complex text layout (CTL) support' ///' bComplex = ComplexScriptEnabled.isEnabled ComplexScriptEnabled.check - '///+ close dialog 'Options' with OK ///' Kontext "ExtrasOptionenDlg" ExtrasOptionenDlg.OK sleep (1) - '/// get count of languages ///' hTypeKeys("") - '///+ first how many are in the reference document (printed in the first line)///' hTypeKeys("") sleep (1) editcopy @@ -619,15 +557,12 @@ testcase tGetFormatCharacter iAsian(1) = mid(sTemp, iTemp+1, iTemp-i) iComplex(1) = right(sTemp, Len(sTemp) - i) sleep (1) - '///+ Format->Character ///' FormatCharacter sleep 1 Kontext - '///+ switch to tabpage 'Font' ///' Messagebox.SetPage TabFont kontext "TabFont" sleep 1 - '///+ get count of languages for Western/Asian/CTL fonts ///' iWest(2) = LanguageWest.getItemCount iAsian(2) = LanguageEast.getItemCount iComplex(2) = LanguageCTL.getItemCount @@ -646,46 +581,42 @@ testcase tGetFormatCharacter else Printlog "CTL font languages count : " + iComplex(2) endif - '///+ close dialog 'Character' with OK ///' TabFont.Ok - '/// write the language for every line in the current language ///' hTypeKeys("") for i = 1 to iWest(2) FormatCharacter - Kontext - kontext "TabFont" - iTemp = LanguageWest.getSelIndex - sTemp = LanguageWest.getSelText - ListAppend(sLanguage(), sTemp) + Kontext + kontext "TabFont" + iTemp = LanguageWest.getSelIndex + sTemp = LanguageWest.getSelText + ListAppend(sLanguage(), sTemp) TabFont.Ok - '///+ type [end][number of language in list][Tab][Language name][down][home] ///' hTypeKeys(""+iTemp+""+sTemp+"") next i for i = 1 to iAsian(2) FormatCharacter - Kontext - kontext "TabFont" - iTemp = LanguageEast.getSelIndex - sTemp = LanguageEast.getSelText - ListAppend(sLanguage(), sTemp) + Kontext + kontext "TabFont" + iTemp = LanguageEast.getSelIndex + sTemp = LanguageEast.getSelText + ListAppend(sLanguage(), sTemp) TabFont.Ok hTypeKeys(""+iTemp+""+sTemp+"") next i for i = 1 to iComplex(2) FormatCharacter - Kontext - kontext "TabFont" - iTemp = LanguageCTL.getSelIndex - sTemp = LanguageCTL.getSelText - ListAppend(sLanguage(), sTemp) + Kontext + kontext "TabFont" + iTemp = LanguageCTL.getSelIndex + sTemp = LanguageCTL.getSelText + ListAppend(sLanguage(), sTemp) TabFont.Ok hTypeKeys(""+iTemp+""+sTemp+"") next i - '/// save the created document & the languages list ///' sTemp = convertPath(gOfficePath + "user\work\spellb_" + iSprache) hFileSaveAsKill (sTemp) sTemp = convertPath(gOfficePath + "user\work\spellb_" + iSprache + ".txt") @@ -696,9 +627,9 @@ testcase tGetFormatCharacter for i = 1 to ListCount(sLanguageR()) select case i - case 1:printlog " * Western text font languages" - case iWest(2)+1:printlog " * Asian text font languages" - case iWest(2)+iAsian(2)+1:printlog " * CTL font languages" + case 1:printlog " * Western text font languages" + case iWest(2)+1:printlog " * Asian text font languages" + case iWest(2)+iAsian(2)+1:printlog " * CTL font languages" end select if (sLanguageR(i) <> sLanguage(i)) then if (instr(sLanguage(i), "[") > 0) then ' [None] - Entry ? @@ -709,7 +640,6 @@ testcase tGetFormatCharacter endif next i - '/// close application ///' Call hCloseDocument endcase diff --git a/testautomation/graphics/optional/includes/global/g_clipboard.inc b/testautomation/graphics/optional/includes/global/g_clipboard.inc index 10a4523f0a23..3a81d41d492a 100755 --- a/testautomation/graphics/optional/includes/global/g_clipboard.inc +++ b/testautomation/graphics/optional/includes/global/g_clipboard.inc @@ -1,7 +1,7 @@ 'encoding UTF-8 Do not remove or change this line! '************************************************************************** '* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. -'* +'* '* Copyright 2008 by Sun Microsystems, Inc. '* '* OpenOffice.org - a multi-platform office productivity suite @@ -50,15 +50,15 @@ testcase tiEditUndo Dim sDatei as string Dim Ueber_Text_1 as string - - if (gApplication = "IMPRESS") then + + if (gApplication = "IMPRESS") then ExtensionString = "odp" else ExtensionString = "odg" end if - + sDatei = gTesttoolPath + "graphics\required\input\leer."+ExtensionString - + hFileOpen ConvertPath (sDatei) sleep 5 printlog "Checking for readonly state. If so, make it editable." @@ -69,18 +69,16 @@ testcase tiEditUndo ContextPositionAndSize Kontext if Messagebox.exists (5) then - Messagebox.SetPage TabPositionAndSize + Messagebox.SetPage TabPositionAndSize else - print "what" + print "what" endif Kontext "TabPositionAndSize" - Ueber_Text_1=PositionX.GetText '/// defining variable for original position of object ///' TabPositionAndSize.Cancel sleep 2 Kontext "Toolbar" Auswahl.Click sleep 1 - ContextArrangeBringBackward '/// Bring Object backward ///' sleep 1 gMouseClick 60,60 sleep 1 @@ -91,56 +89,51 @@ testcase tiEditUndo Kontext "Toolbar" Auswahl.Click sleep 1 - ContextPositionAndSize '/// Open Position and Size dialog, checking position ///' Kontext Messagebox.SetPage TabPositionAndSize Kontext "TabPositionAndSize" if PositionX=0 Then Warnlog " Command was not completely executed, and it could not be undone." - TabPositionAndSize.Cancel - sleep 2 - gMouseClick 60,60 - sleep 1 - - EditUndo '/// Edit Undo for BringBackward ///' - Sleep 2 - gMouseClick 60,60 - sleep 1 - Kontext "Toolbar" - Auswahl.Click - hTypeKeys "" - sleep 1 - Kontext "Toolbar" - Auswahl.Click - ContextPositionAndSize '/// Again checking position using Position and Size dialog ///' - kontext - Messagebox.SetPage TabPositionAndSize - kontext "TabPositionAndSize" - if PositionX.GetText = Ueber_Text_1 then - printlog "OK, last order could be redone" - else - warnlog "Last order could not be redone" - end if - TabPositionAndSize.Cancel - - Call hCloseDocument '/// Close document ///' + TabPositionAndSize.Cancel + sleep 2 + gMouseClick 60,60 + sleep 1 + + Sleep 2 + gMouseClick 60,60 + sleep 1 + Kontext "Toolbar" + Auswahl.Click + hTypeKeys "" + sleep 1 + Kontext "Toolbar" + Auswahl.Click + kontext + Messagebox.SetPage TabPositionAndSize + kontext "TabPositionAndSize" + if PositionX.GetText = Ueber_Text_1 then + printlog "OK, last order could be redone" + else + warnlog "Last order could not be redone" + end if + TabPositionAndSize.Cancel + endcase '------------------------------------------------------------------------------- testcase tiEditRedo - + Dim Datei$ Dim Ueber_Text_1 - - if (gApplication = "IMPRESS") then + + if (gApplication = "IMPRESS") then ExtensionString = "odp" else ExtensionString = "odg" end if - + Datei$ = gTesttoolPath + "graphics\required\input\leer."+ExtensionString - - hFileOpen ConvertPath (Datei$) '/// Open test document (leer.od?) ///' + sleep 3 ' check if the document is writable if fIsDocumentWritable = false then @@ -165,7 +158,6 @@ testcase tiEditRedo sleep 1 hTypeKeys "" sleep 1 - ContextArrangeBringBackward '/// move object behind other object ///' sleep 1 gMouseClick 60,60 sleep 1 @@ -174,44 +166,38 @@ testcase tiEditRedo ContextPositionAndSize sleep 1 Kontext - Messagebox.SetPage TabPositionAndSize '/// checking new position values ///' Kontext "TabPositionAndSize" - if PositionX.GetText = Ueber_Text_1 Then Warnlog " Nothing changed, so nothing can be undone" - TabPositionAndSize.Cancel - sleep 1 - gMouseClick 60,60 - EditUndo '/// Edit Undo///' - sleep 1 - hTypeKeys "" - sleep 1 - ContextPositionAndSize - sleep 1 - kontext - Messagebox.SetPage TabPositionAndSize '/// checking again position ///' - kontext "TabPositionAndSize" - if PositionX.GetText <> Ueber_Text_1 Then Warnlog " Undo didn't worked, so repeat last action wont work either" - TabPositionAndSize.Cancel - sleep 2 - EditRedo '/// Edit Redo ///' - sleep 2 - gMouseClick 60,60 - sleep 2 - hTypeKeys "" - sleep 2 - ContextPositionAndSize - sleep 1 - kontext - Messagebox.SetPage TabPositionAndSize - kontext "TabPositionAndSize" - if PositionX.GetText <> Ueber_Text_1 then '/// checking position ///' - printlog "Action Undo repeated" - else - warnlog "Action Undo not repeated" - end if - TabPositionAndSize.OK - sleep 1 - call hCloseDocument '/// close document ///' - sleep 1 + if PositionX.GetText = Ueber_Text_1 Then Warnlog " Nothing changed, so nothing can be undone" + TabPositionAndSize.Cancel + sleep 1 + gMouseClick 60,60 + sleep 1 + hTypeKeys "" + sleep 1 + ContextPositionAndSize + sleep 1 + kontext + kontext "TabPositionAndSize" + if PositionX.GetText <> Ueber_Text_1 Then Warnlog " Undo didn't worked, so repeat last action wont work either" + TabPositionAndSize.Cancel + sleep 2 + sleep 2 + gMouseClick 60,60 + sleep 2 + hTypeKeys "" + sleep 2 + ContextPositionAndSize + sleep 1 + kontext + Messagebox.SetPage TabPositionAndSize + kontext "TabPositionAndSize" + printlog "Action Undo repeated" + else + warnlog "Action Undo not repeated" + end if + TabPositionAndSize.OK + sleep 1 + sleep 1 endcase '------------------------------------------------------------------------------- @@ -219,81 +205,64 @@ testcase tiEditClipboard Dim Ueber_Text_4 as string dim sTemp as string - - '/// open application ///' + Call hNewDocument sleep 1 SetClipboard "" - '/// Create rectangle ///' Call hRechteckErstellen ( 65, 65, 80, 80 ) sleep 1 - '///+ RightClick onto rectangle///' gMouseClick 70,70 sleep 1 - Ueber_Text_4 = fGetPositionX() '/// Get values for position variables ///' Sleep 1 - '/// Edit->Copy ///' EditCopy - '///+ Type Key [Deletee] ///' hTypeKeys "" - '///+ Edit->Paste ///' EditPaste sleep 1 - '///+ Edit->Select All ///' - EditSelectAll - sTemp = fGetPositionX() - if LiberalMeasurement(sTemp, Ueber_Text_4) then '/// TabPositionAndSize: comparing position with original position ///' - printlog "OK EditCopy and EditPaste" - else - warnlog "- Edit paste did not work; is: '" + sTemp + "' ; should: '" + Ueber_Text_4 + "'" - end if - sleep 1 - '/// Type Keys [escape], + EditSelectAll (to deselect object and to select again) ///' - hTypeKeys "" EditSelectAll - sleep 2 - '/// Edit->Cut ///' - EditCut - sleep 1 - hTypeKeys "" - try - '///+ - Format->Position And Size -> HAS TO FAIL / IS NOT AVAILABLE !!! '///' - ContextPositionAndSize - kontext - '///+ - select TabPage 'Position And Size' ///' - Messagebox.SetPage TabPositionAndSize - Kontext "TabPositionAndSize" - if TabPositionAndSize.NOTexists then - warnlog "TabPositionAndSize isn't up ?!!" - endif - '///+ - Ok dialog 'Position And Size' ///' - TabPositionAndSize.Ok - warnlog "TabPositionAndSize IS up :-( Doesn't have to be, because object should be deleted !!!" - catch - Printlog " - There is no object in the document anymore :-)" - endcatch - sleep 1 - '///+ Edit->Paste ///' - EditPaste - sleep 2 sTemp = fGetPositionX() - if LiberalMeasurement(sTemp, Ueber_Text_4) then - printlog "OK Edit paste" - else - warnlog "- Edit paste did not work; is: '" + sTemp + "' ; should: '" + Ueber_Text_4 + "'" - end if - sleep 3 - '/// close application ///' - Call hCloseDocument + printlog "OK EditCopy and EditPaste" +else + warnlog "- Edit paste did not work; is: '" + sTemp + "' ; should: '" + Ueber_Text_4 + "'" +end if +sleep 1 +hTypeKeys "" +EditSelectAll +sleep 2 +EditCut +sleep 1 +hTypeKeys "" +try + ContextPositionAndSize + kontext + Messagebox.SetPage TabPositionAndSize + Kontext "TabPositionAndSize" + if TabPositionAndSize.NOTexists then + warnlog "TabPositionAndSize isn't up ?!!" + endif + TabPositionAndSize.Ok + warnlog "TabPositionAndSize IS up :-( Doesn't have to be, because object should be deleted !!!" +catch + Printlog " - There is no object in the document anymore :-)" +endcatch +sleep 1 +EditPaste +sleep 2 +sTemp = fGetPositionX() +if LiberalMeasurement(sTemp, Ueber_Text_4) then + printlog "OK Edit paste" +else + warnlog "- Edit paste did not work; is: '" + sTemp + "' ; should: '" + Ueber_Text_4 + "'" +end if +sleep 3 +Call hCloseDocument endcase '------------------------------------------------------------------------------- testcase tiEditPasteSpecial_HTML - + dim Zaehler as integer Kontext "Standardbar" sleep 1 - Call hFileOpen ConvertPath (gTesttoolPath + "graphics\required\input\frame1.htm") '/// Load html document ///' sleep 5 autoexecute=false Kontext "DocumentWriter" @@ -302,173 +271,137 @@ testcase tiEditPasteSpecial_HTML autoexecute=true EditSelectAll sleep 3 - EditCopy '/// Copy selection ///' Sleep 2 - FileClose '/// Close document ///' sleep 3 - Call hNewDocument '/// Create new Impress document ///' sleep 1 - EditPasteSpecial '/// Edit paste special ///' sleep 1 Kontext "InhaltEinfuegen" For Zaehler = 1 to Auswahl.GetItemCount - Auswahl.select Zaehler - printlog Zaehler, ". Selection = ", Auswahl.GetSelText + Auswahl.select Zaehler + printlog Zaehler, ". Selection = ", Auswahl.GetSelText next Zaehler - - if Auswahl.GetItemCount <> 4 then '/// Controlling number of possible formats ///' - warnlog "formats for inserting Html <> 4" - else - printlog "OK 4 formats for HTML-Document" - end if - - sleep 3 - InhaltEinfuegen.OK '/// Paste clipboard content ///' - sleep 3 - try - EditCopy '/// Copy object back into clipboard ///' - catch - Warnlog "- Nothing inserted into document" - endcatch - sleep 3 - Call hCloseDocument '/// Close document ///' - sleep 3 + + warnlog "formats for inserting Html <> 4" +else + printlog "OK 4 formats for HTML-Document" +end if + +sleep 3 +sleep 3 +try +catch + Warnlog "- Nothing inserted into document" +endcatch +sleep 3 +sleep 3 endcase '------------------------------------------------------------------------------- testcase tdEditPasteSpecial_Text - + printlog "Insert Text" - call hNewDocument '/// new document ///' - SetClipboard "I am a cool test-text in the Clipboard" '/// put text into clipboard ///' - EditPasteSpecial '/// edit paste special ///' sleep 1 Kontext "InhaltEinfuegen" - Auswahl.Select 1 '/// select list entree 1 ///' printlog "Selection = ", Auswahl.GetSelText sleep 1 if Auswahl.GetItemCount <> 1 then - warnlog "Selectionformat <> 1" + warnlog "Selectionformat <> 1" else - printlog "Format Text OK" + printlog "Format Text OK" end if - InhaltEinfuegen.OK '/// close dialog ///' sleep 1 - - Call hCloseDocument '/// close document ///' + endcase '------------------------------------------------------------------------------- testcase tdEditPasteSpecial_Graphic - + dim Zaehler as integer - - call hNewDocument '/// ^new document ///' + printlog "Insert graphic file" - InsertGraphicsFromFile '/// insert graphic (sample.bmp)///' - + Kontext "GrafikEinfuegenDlg" - Dateiname.SetText ConvertPath (gTesttoolPath + "global\input\graf_inp\enter.bmp") - Oeffnen.Click + Dateiname.SetText ConvertPath (gTesttoolPath + "global\input\graf_inp\enter.bmp") + Oeffnen.Click sleep 1 - EditSelectAll '/// select graphic ///' - EditCut '/// cut graphic ///' - EditPasteSpecial '/// edit paste special ///' sleep 1 Kontext "InhaltEinfuegen" - For Zaehler = 1 to Auswahl.GetItemCount '/// get item count for Auswahl ///' Auswahl.select Zaehler printlog Zaehler, ". Selection = ", Auswahl.GetSelText - next Zaehler - - if Auswahl.GetItemCount <> 4 then '/// check if item count = 4 ///' - warnlog "Format for insert graphic files should be 4, but is: " + Auswahl.GetItemCount - else - printlog "There are " + Auswahl.GetItemCount + " formats for graphic files" - end if - InhaltEinfuegen.OK '/// insert graphic from clipboard ///' - gMouseClick 90,90 - sleep 1 - Call hCloseDocument '/// close document ///' +next Zaehler + +warnlog "Format for insert graphic files should be 4, but is: " + Auswahl.GetItemCount +else +printlog "There are " + Auswahl.GetItemCount + " formats for graphic files" +end if +gMouseClick 90,90 +sleep 1 endcase '------------------------------------------------------------------------------- testcase tdEditPasteSpecial_Circle - dim Zaehler as integer - call hNewDocument '/// new document ///' - sleep 5 - printlog "Insert circle" '/// create circle ///' - Kontext "Toolbar" - Ellipsen.Click - sleep 3 - gMouseMove (20,20,80,80) - sleep 1 - hTypeKeys "" - sleep 2 - EditSelectAll '/// select circle ///' - sleep 5 - EditCut '/// cut circle ///' - sleep 1 - EditPasteSpecial '/// edit paste special ///' - sleep 1 - Kontext "InhaltEinfuegen" - if EinfuegenAls.IsVisible Then EinfuegenAls.Check '/// check "EinfuegenAls" ///' - For Zaehler = 1 to Auswahl.GetItemCount '/// get item count for Auswahl ///' - Auswahl.select Zaehler - printlog Zaehler, ". Selection = ", Auswahl.GetSelText - next Zaehler - if Auswahl.GetItemCount <> 4 then '/// check if item count = 4 ///' - warnlog "Number of possible formats <> 4" - else - printlog "There are 4 formats for circle" - end if - sleep 1 - InhaltEinfuegen.OK '/// paste circle ///' - sleep 1 - Call hCloseDocument '/// close document ///' + dim Zaehler as integer + sleep 5 + Kontext "Toolbar" + Ellipsen.Click + sleep 3 + gMouseMove (20,20,80,80) + sleep 1 + hTypeKeys "" + sleep 2 + sleep 5 + sleep 1 + sleep 1 + Kontext "InhaltEinfuegen" + Auswahl.select Zaehler + printlog Zaehler, ". Selection = ", Auswahl.GetSelText +next Zaehler +warnlog "Number of possible formats <> 4" +else +printlog "There are 4 formats for circle" +end if +sleep 1 +sleep 1 endcase '------------------------------------------------------------------------------- testcase tiEditPasteSpecial - dim i as integer - dim x as integer -' warnlog "TODOTBO: from draw, impress, math..." - '/// go into writer, type a text, select all, Edit->Cut, close writer ///' - '/// go into application to test, insert every format you can get from Edit->Paste->Special :-) ///' - gApplication = "WRITER" - call hNewDocument - kontext "DocumentWriter" - DocumentWriter.TypeKeys "abc" - editcut - call hCloseDocument - gApplication = "IMPRESS" - call hNewDocument - sleep 1 - - Printlog " get count of possibilities: " - EditPasteSpecial - sleep 1 - Kontext "InhaltEinfuegen" - x = Auswahl.GetItemCount - for i = 1 to x - printlog " - " + i + " - " + Auswahl.GetItemText (i) - next i - InhaltEinfuegen.Cancel - - Printlog " insert every possibility" - for i = 1 to x - Printlog " - processing number: "+i - EditPasteSpecial - sleep 1 - Kontext "InhaltEinfuegen" - Auswahl.Select i - sleep 1 - InhaltEinfuegen.OK - sleep 1 - next i - Call hCloseDocument '/// close document ///' + dim i as integer + dim x as integer + ' warnlog "TODOTBO: from draw, impress, math..." + gApplication = "WRITER" + call hNewDocument + kontext "DocumentWriter" + DocumentWriter.TypeKeys "abc" + editcut + call hCloseDocument + gApplication = "IMPRESS" + call hNewDocument + sleep 1 + + Printlog " get count of possibilities: " + EditPasteSpecial + sleep 1 + Kontext "InhaltEinfuegen" + x = Auswahl.GetItemCount + for i = 1 to x + printlog " - " + i + " - " + Auswahl.GetItemText (i) + next i + InhaltEinfuegen.Cancel + + Printlog " insert every possibility" + for i = 1 to x + Printlog " - processing number: "+i + EditPasteSpecial + sleep 1 + Kontext "InhaltEinfuegen" + Auswahl.Select i + sleep 1 + InhaltEinfuegen.OK + sleep 1 + next i endcase '------------------------------------------------------------------------------- diff --git a/testautomation/graphics/optional/includes/global/g_clipexport.inc b/testautomation/graphics/optional/includes/global/g_clipexport.inc index 776cd69e9af1..87cc868a6a82 100755 --- a/testautomation/graphics/optional/includes/global/g_clipexport.inc +++ b/testautomation/graphics/optional/includes/global/g_clipexport.inc @@ -1,7 +1,7 @@ 'encoding UTF-8 Do not remove or change this line! '************************************************************************** '* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. -'* +'* '* Copyright 2008 by Sun Microsystems, Inc. '* '* OpenOffice.org - a multi-platform office productivity suite @@ -67,218 +67,206 @@ '* '\******************************************************************* - global i as integer - global sApplication as string - global ReferenceOld as string - global ReferenceNew as string - global ToApp as string - global ToAppCounter as integer - global FromApp as string - global FromApp2 as string - global CheckValue1 as integer - global Marker as integer - global WindowsSting (4) as string - global PositionPositionX as string - global PositionPositionY as string - global PositionWidth as string - global PositionHeight as string - -'/// Position ///' - global PositionKeepRatio as string - global PositionProtectPosition as string - global PositionProtectSize as string - global PositionFitWidthText as string - global PositionFitHeightText as string - global PositionAnchorPosition as string - global PositionAnchor as string - global PositionPositionPosition as string - global PositionSizePosition as string - -'/// Area ///' - global AreaNoFillValue as string - global AreaColorValue as string - global AreaColourListValue as string - global AreaGradientValue as string - global AreaGradientListValue as string - global AreaAutomaticValue as string - global AreaHatchingValue as string - global AreaHatchingListValue as string - global AreaBackgroundColourValue as string - global AreaBackgroundColourListValue as string - global AreaIncrementsValue as string - global AreaBitmapValue as string - global AreaBitmapListValue as string - global AreaOriginalListValue as string - global AreaRelativeValue as string - global AreaWidthValue as string - global AreaHeightValue as string - global AreaXOffsetValue as string - global AreaYOffsetValue as string - global AreaTileValue as string - global AreaStretchValue as string - global AreaRowValue as string - global AreaColumnValue as string - global AreaOffsetValue as string - -'/// Shadow ///' - global ShadowUseShadowsValue as string - global ShadowDistanceValue as string - global ShadowColorValue as string - global ShadowTransparencyValue as string - -'/// Transparency ///' - global TransparencyTransparencyValue as string - global TransparencyGradientType as string - global TransparencyMFZentrumX as string - global TransparencyMFZentrumY as string - global TransparencyMFWinkel as string - global TransparencyMFRand as string - global TransparencyMFStartwert as string - global TransparencyMFEndwert as string - -'/// Color ///' - global ColorName as string - global ColorColor as string - global ColorModel as string - global ColorR as string - global ColorG as string - global ColorB as string - global ColorC as string - global ColorM as string - global ColorY as string - global ColorK as string - -'/// Gradients ///' - global GradientsType as string - global GradientsCenterX as string - global GradientsCenterZ as string - global GradientsAngle as string - global GradientsBorder as string - global GradientsFromColor as string - global GradientsFromValue as string - global GradientsToColor as string - global GradientsToValue as string - -'/// Hatching ///' - global HatchingDistance as string - global HatchingAngle as string - global HatchingLineType as string - global HatchingLineColor as string - global HatchingLineTable as string - -'/// TabBitmap ///' - global BitmapForeground as string - global BitmapBackground as string - global BitmapTable as string - -'/// Text Formatting ///' - global Text1 as string - global Text2 as string - global Text3 as integer - global Text4 as string - global Text5 as string - global Text6 as string - global Text7 as string - +global i as integer +global sApplication as string +global ReferenceOld as string +global ReferenceNew as string +global ToApp as string +global ToAppCounter as integer +global FromApp as string +global FromApp2 as string +global CheckValue1 as integer +global Marker as integer +global WindowsSting (4) as string +global PositionPositionX as string +global PositionPositionY as string +global PositionWidth as string +global PositionHeight as string + +global PositionKeepRatio as string +global PositionProtectPosition as string +global PositionProtectSize as string +global PositionFitWidthText as string +global PositionFitHeightText as string +global PositionAnchorPosition as string +global PositionAnchor as string +global PositionPositionPosition as string +global PositionSizePosition as string + +global AreaNoFillValue as string +global AreaColorValue as string +global AreaColourListValue as string +global AreaGradientValue as string +global AreaGradientListValue as string +global AreaAutomaticValue as string +global AreaHatchingValue as string +global AreaHatchingListValue as string +global AreaBackgroundColourValue as string +global AreaBackgroundColourListValue as string +global AreaIncrementsValue as string +global AreaBitmapValue as string +global AreaBitmapListValue as string +global AreaOriginalListValue as string +global AreaRelativeValue as string +global AreaWidthValue as string +global AreaHeightValue as string +global AreaXOffsetValue as string +global AreaYOffsetValue as string +global AreaTileValue as string +global AreaStretchValue as string +global AreaRowValue as string +global AreaColumnValue as string +global AreaOffsetValue as string + +global ShadowUseShadowsValue as string +global ShadowDistanceValue as string +global ShadowColorValue as string +global ShadowTransparencyValue as string + +global TransparencyTransparencyValue as string +global TransparencyGradientType as string +global TransparencyMFZentrumX as string +global TransparencyMFZentrumY as string +global TransparencyMFWinkel as string +global TransparencyMFRand as string +global TransparencyMFStartwert as string +global TransparencyMFEndwert as string + +global ColorName as string +global ColorColor as string +global ColorModel as string +global ColorR as string +global ColorG as string +global ColorB as string +global ColorC as string +global ColorM as string +global ColorY as string +global ColorK as string + +global GradientsType as string +global GradientsCenterX as string +global GradientsCenterZ as string +global GradientsAngle as string +global GradientsBorder as string +global GradientsFromColor as string +global GradientsFromValue as string +global GradientsToColor as string +global GradientsToValue as string + +global HatchingDistance as string +global HatchingAngle as string +global HatchingLineType as string +global HatchingLineColor as string +global HatchingLineTable as string + +global BitmapForeground as string +global BitmapBackground as string +global BitmapTable as string + +global Text1 as string +global Text2 as string +global Text3 as integer +global Text4 as string +global Text5 as string +global Text6 as string +global Text7 as string + '------------------------------- "object"-dependant tests ---------------------- try - call Make_Rectangle_From_Application - call Full_test_Draw - call Full_test_Impress - call Full_test_Writer - call Full_test_Calc + 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 Rectangle" + warnlog "something wrong with testing Rectangle" endcatch try - call Make_Make3dObject_From_Application - call Full_test_Draw - call Small_test_Impress - call Small_test_Calc - call Small_test_Writer + call Make_Make3dObject_From_Application + call Full_test_Draw + call Small_test_Impress + call Small_test_Calc + call Small_test_Writer catch - warnlog "something wrong with testing 3dObject" + warnlog "something wrong with testing 3dObject" endcatch 'qaerrorlog "Make_CurveObject_From_Application needs an overview - FHA" try - call Make_CurveObject_From_Application - call Small_test_Draw - call Small_test_Impress - call Small_test_Calc - call Small_test_Writer + call Make_CurveObject_From_Application + call Small_test_Draw + call Small_test_Impress + call Small_test_Calc + call Small_test_Writer catch - warnlog "something wrong with testing CurveObj" + warnlog "something wrong with testing CurveObj" endcatch try - call Make_ConnectorObject_From_Application - call Small_test_Draw - call Small_test_Impress - call Small_test_Calc - call Small_test_Writer + call Make_ConnectorObject_From_Application + call Small_test_Draw + call Small_test_Impress + call Small_test_Calc + call Small_test_Writer catch - warnlog "something wrong with testing ConnectorObject" + warnlog "something wrong with testing ConnectorObject" endcatch try - call Make_LineObject_From_Application - call Small_test_Draw - call Small_test_Impress -' call Small_test_Calc -' call Small_test_Writer + call Make_LineObject_From_Application + call Small_test_Draw + call Small_test_Impress + ' call Small_test_Calc + ' call Small_test_Writer catch - warnlog "something wrong with testing LineObject" + warnlog "something wrong with testing LineObject" endcatch try - call Make_Objectplugin_From_Application '/// doesn't work to test ///' catch - warnlog "something wrong with testing ConnectorObject" + warnlog "something wrong with testing ConnectorObject" endcatch try - call Make_Circle_From_Application - call Small_test_Draw - call Small_test_Impress - call Small_test_Calc - call Small_test_Writer + call Make_Circle_From_Application + call Small_test_Draw + call Small_test_Impress + call Small_test_Calc + call Small_test_Writer catch - warnlog "something wrong with testing Circle" + warnlog "something wrong with testing Circle" endcatch try - call Make_TextSquare_From_Application - call Small_test_Draw - call Small_test_Impress - call Small_test_Calc - call Small_test_Writer + call Make_TextSquare_From_Application + call Small_test_Draw + call Small_test_Impress + call Small_test_Calc + call Small_test_Writer catch - warnlog "something wrong with testing TextSquare" + warnlog "something wrong with testing TextSquare" endcatch call clear_all_and_close - Printlog "tClipboardFromDrawTest finished" +Printlog "tClipboardFromDrawTest finished" end sub '------------------------------- Objects --------------------------------------- testcase Make_Make3dObject_From_Application - printlog "--- 3D-Object --- from --- " + gApplication - Call hNewDocument '/// Open base application ///' - sleep 1 - call SaveMeasurementSetFirst - SetKontextApplication '/// Create the object which we want to test ///' - sleep 1 - Call Make3dObject - call Select_Copy - Call Get_Position_Size_Attributes - Call Get_Colour_Attributes - Call hCloseDocument + printlog "--- 3D-Object --- from --- " + gApplication + sleep 1 + call SaveMeasurementSetFirst + sleep 1 + Call Make3dObject + call Select_Copy + Call Get_Position_Size_Attributes + Call Get_Colour_Attributes + Call hCloseDocument endcase '------------------------------------------------------------------------------- @@ -286,10 +274,8 @@ testcase Make_Objectplugin_From_Application goto endsub printlog "--- Objectplugin --- from --- " + gApplication - Call hNewDocument '/// Open base application ///' sleep 1 call SaveMeasurementSetFirst - SetKontextApplication '/// Create the object which we want to test ///' sleep 1 Call Objectplugin call Select_Copy @@ -301,224 +287,210 @@ endcase '------------------------------------------------------------------------------- testcase Make_TextSquare_From_Application - printlog "--------- TextSquare --- from --- " + gApplication - Call hNewDocument '/// Open base application ///' - sleep 1 - call SaveMeasurementSetFirst - SetKontextApplication '/// Create the object which we want to test ///' - sleep 1 - Call MakeTextSquare - call Select_Copy - call Get_Position_Size_Attributes -' Call Get_Colour_Attributes - Call hCloseDocument + printlog "--------- TextSquare --- from --- " + gApplication + sleep 1 + call SaveMeasurementSetFirst + sleep 1 + Call MakeTextSquare + call Select_Copy + call Get_Position_Size_Attributes + ' Call Get_Colour_Attributes + Call hCloseDocument endcase '------------------------------------------------------------------------------- testcase Make_Rectangle_From_Application - printlog "--------- Rectangle --- from --- " + gApplication - Call hNewDocument '/// Open base application ///' - sleep 1 - call SaveMeasurementSetFirst - SetKontextApplication '/// Create the object which we want to test ///' - sleep 1 - Call MakeRectangle - call Select_Copy - call Get_Position_Size_Attributes - Call Get_Colour_Attributes - Call hCloseDocument + printlog "--------- Rectangle --- from --- " + gApplication + sleep 1 + call SaveMeasurementSetFirst + sleep 1 + Call MakeRectangle + call Select_Copy + call Get_Position_Size_Attributes + Call Get_Colour_Attributes + Call hCloseDocument endcase '------------------------------------------------------------------------------- testcase Make_Circle_From_Application - printlog "--------- Ellipse Object --- from --- " + gApplication - Call hNewDocument '/// Open base application ///' - sleep 1 - call SaveMeasurementSetFirst - SetKontextApplication '/// Create the object which we want to test ///' - sleep 1 - Call MakeCircle - call Select_Copy - call Get_Position_Size_Attributes - Call Get_Colour_Attributes - Call hCloseDocument + printlog "--------- Ellipse Object --- from --- " + gApplication + sleep 1 + call SaveMeasurementSetFirst + sleep 1 + Call MakeCircle + call Select_Copy + call Get_Position_Size_Attributes + Call Get_Colour_Attributes + Call hCloseDocument endcase '------------------------------------------------------------------------------- testcase Make_CurveObject_From_Application - printlog "--------- Curve-Object --- from --- " + gApplication - Call hNewDocument '/// Open base application ///' - sleep 1 - call SaveMeasurementSetFirst - SetKontextApplication '/// Create the object which we want to test ///' - sleep 1 - Call MakeCurveObject - call Select_Copy - call Get_Position_Size_Attributes -' Call Get_Colour_Attributes - Call hCloseDocument + printlog "--------- Curve-Object --- from --- " + gApplication + sleep 1 + call SaveMeasurementSetFirst + sleep 1 + Call MakeCurveObject + call Select_Copy + call Get_Position_Size_Attributes + ' Call Get_Colour_Attributes + Call hCloseDocument endcase '------------------------------------------------------------------------------- testcase Make_LineObject_From_Application - printlog "--------- Line-Object --- from --- " + gApplication - Call hNewDocument '/// Open base application ///' - sleep 1 - call SaveMeasurementSetFirst - SetKontextApplication '/// Create the object which we want to test ///' - sleep 1 - Call MakeLineObject - call Select_Copy - call Get_Position_Size_Attributes - Call hCloseDocument + printlog "--------- Line-Object --- from --- " + gApplication + sleep 1 + call SaveMeasurementSetFirst + sleep 1 + Call MakeLineObject + call Select_Copy + call Get_Position_Size_Attributes + Call hCloseDocument endcase '------------------------------------------------------------------------------- testcase Make_ConnectorObject_From_Application - printlog "--------- Connector-Object --- from --- " + gApplication - Call hNewDocument '/// Open base application ///' - sleep 1 - call SaveMeasurementSetFirst - SetKontextApplication '/// Create the object which we want to test ///' - sleep 1 - Call MakeConnectorObject - call Select_Copy - Call Get_Position_Size_Attributes -' Call Get_Colour_Attributes - Call hCloseDocument + printlog "--------- Connector-Object --- from --- " + gApplication + sleep 1 + call SaveMeasurementSetFirst + sleep 1 + Call MakeConnectorObject + call Select_Copy + Call Get_Position_Size_Attributes + ' Call Get_Colour_Attributes + Call hCloseDocument endcase '------------------------------------------------------------------------------- testcase Make_And_Check_Formatted_Text_Line_From_Application - printlog "--------- Formatted Text --- from --- " + gApplication - Call hNewDocument '/// Open base application ///' - sleep 1 - call SaveMeasurementSetFirst - SetKontextApplication '/// Create the object which we want to test ///' - sleep 1 - Call MakeFormattedTextLine 'inclusive get variable-info. - call Select_Copy - Call hCloseDocument - 'call New_Draw -' Call Check_Text_Formatting -' Call hCloseDocument - Call New_Impress - Call Check_Text_Formatting - Call hCloseDocument - sleep 10 - Call New_Calc - Call Check_Text_Formatting - Call hCloseDocument - Call New_Writer - Call Check_Text_Formatting - Call hCloseDocument + printlog "--------- Formatted Text --- from --- " + gApplication + sleep 1 + call SaveMeasurementSetFirst + sleep 1 + Call MakeFormattedTextLine 'inclusive get variable-info. + call Select_Copy + Call hCloseDocument + 'call New_Draw + ' Call Check_Text_Formatting + ' Call hCloseDocument + Call New_Impress + Call Check_Text_Formatting + Call hCloseDocument + sleep 10 + Call New_Calc + Call Check_Text_Formatting + Call hCloseDocument + Call New_Writer + Call Check_Text_Formatting + Call hCloseDocument endcase '--------------------------- Part with the different kinds of tests. ----------- testcase Full_test_Draw - call New_Draw - call MeasurementSetFirst - call Check_Position_Size_Attributes - call Check_Colors_Borders_Attributes - gApplication = FromApp2 - Call hCloseDocument + call New_Draw + call MeasurementSetFirst + call Check_Position_Size_Attributes + call Check_Colors_Borders_Attributes + gApplication = FromApp2 + Call hCloseDocument endcase '------------------------------------------------------------------------------- testcase Small_test_Draw - call New_Draw - call MeasurementSetFirst - call Check_Position_Size_Attributes - gApplication = FromApp2 - Call hCloseDocument + call New_Draw + call MeasurementSetFirst + call Check_Position_Size_Attributes + gApplication = FromApp2 + Call hCloseDocument endcase '------------------------------------------------------------------------------- testcase Full_test_Impress - call New_Impress - call MeasurementSetFirst - call Check_Position_Size_Attributes - call Check_Colors_Borders_Attributes - gApplication = FromApp2 - Call hCloseDocument + call New_Impress + call MeasurementSetFirst + call Check_Position_Size_Attributes + call Check_Colors_Borders_Attributes + gApplication = FromApp2 + Call hCloseDocument endcase '------------------------------------------------------------------------------- testcase Small_test_Impress - call New_Impress - call MeasurementSetFirst - call Check_Position_Size_Attributes - gApplication = FromApp2 - Call hCloseDocument + call New_Impress + call MeasurementSetFirst + call Check_Position_Size_Attributes + gApplication = FromApp2 + Call hCloseDocument endcase '------------------------------------------------------------------------------- testcase Full_test_Calc - call New_Calc - call MeasurementSetFirst - call Check_Position_Size_Attributes - call Check_Colors_Borders_Attributes - gApplication = FromApp2 - Call hCloseDocument + call New_Calc + call MeasurementSetFirst + call Check_Position_Size_Attributes + call Check_Colors_Borders_Attributes + gApplication = FromApp2 + Call hCloseDocument endcase '------------------------------------------------------------------------------- testcase Small_test_Calc - call New_Calc - call MeasurementSetFirst - call Check_Position_Size_Attributes - gApplication = FromApp2 - Call hCloseDocument + call New_Calc + call MeasurementSetFirst + call Check_Position_Size_Attributes + gApplication = FromApp2 + Call hCloseDocument endcase '------------------------------------------------------------------------------- testcase Full_test_Writer - call New_Writer - call MeasurementSetFirst - call Check_Position_Size_Attributes - call Check_Colors_Borders_Attributes - gApplication = FromApp2 - Call hCloseDocument + call New_Writer + call MeasurementSetFirst + call Check_Position_Size_Attributes + call Check_Colors_Borders_Attributes + gApplication = FromApp2 + Call hCloseDocument endcase '------------------------------------------------------------------------------- testcase Small_test_Writer - call New_Writer - call MeasurementSetFirst - call Check_Position_Size_Attributes - gApplication = FromApp2 - Call hCloseDocument + call New_Writer + call MeasurementSetFirst + call Check_Position_Size_Attributes + gApplication = FromApp2 + Call hCloseDocument endcase '------------------------------------------------------------------------------- testcase clear_all_and_close goto endsub - printlog " --------------------------------------------------------------" - printlog " All tests done... clearing up everything and finishing" - if gApplication = "WRITER" then - DocumentWriter.TypeKeys "" - else - printlog " gApplication is " + gApplication - EditSelectAll - EditDelete - end if - call ResetMeasurement - Call hCloseDocument + printlog " --------------------------------------------------------------" + printlog " All tests done... clearing up everything and finishing" + if gApplication = "WRITER" then + DocumentWriter.TypeKeys "" + else + printlog " gApplication is " + gApplication + EditSelectAll + EditDelete + end if + call ResetMeasurement + Call hCloseDocument endcase '------------------------------------------------------------------------------- diff --git a/testautomation/graphics/optional/includes/global/g_clipexport2.inc b/testautomation/graphics/optional/includes/global/g_clipexport2.inc index a575c0c75101..afbda0f72fd6 100755 --- a/testautomation/graphics/optional/includes/global/g_clipexport2.inc +++ b/testautomation/graphics/optional/includes/global/g_clipexport2.inc @@ -1,7 +1,7 @@ 'encoding UTF-8 Do not remove or change this line! '************************************************************************** '* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. -'* +'* '* Copyright 2008 by Sun Microsystems, Inc. '* '* OpenOffice.org - a multi-platform office productivity suite @@ -44,33 +44,30 @@ ' #1 MakeCurveObject :Inserts Curve Object if not Writer or Calc ' #1 MakeLineObject :Inserts line object if not writer or calc ' #1 MakeConnectorObject :Inserts Connector object if not wirter or calc -' #1 MakeFormattedTextLine :Insert a formatted text line +' #1 MakeFormattedTextLine :Insert a formatted text line ' #1 Formfunctions :Inserts a push button ' #1 Objectplugin :Inserting a Plugin '* '\******************************************************************* sub MakeTextSquare - '/// Inserts a text frame with content printlog "--------- Testing: TextSquare ---------" Call hTextRahmenErstellen ("This is a text-frame",15,20,40,30) gMouseClick 10,10 SetKontextApplication - + end sub '------------------------------------------------------------------------------- sub MakeRectangle - '/// Inserts a Rectangle printlog "we run rectangle" Call hRechteckErstellen (15,15,30,30) - + end sub '------------------------------------------------------------------------------- sub MakeCircle - '/// Inserts a circle if not Writer or Calc printlog "Create Circle" if gApplication = "WRITER" then @@ -89,12 +86,11 @@ sub MakeCircle gMouseMove (15,15,30,30) gMouseUp (30,30) sleep 1 - + end sub '------------------------------------------------------------------------------- sub Make3dObject -'///Inserts a 3DObject if not Writer or Calc printlog "Create 3dObject" if (Ucase(gApplication) = "CALC") then @@ -113,14 +109,13 @@ sub Make3dObject Kontext "ThreeDObjectsbar" sleep 1 Wuerfel.click - gMouseDown (15,15) + gMouseDown (15,15) gMouseMove (15,15,35,35) gMouseUp (35,35) Kontext "ThreeDObjectsbar" ThreeDObjectsbar.close else if (gApplication = "DRAW") then - Toolbar.OpenContextMenu '/// enable 3d-object-button in menubar sleep 1 hMenuselectNr (1) sleep 1 @@ -131,21 +126,19 @@ sub Make3dObject sleep 1 Wuerfel.click sleep 1 - gMouseDown (15,15) + gMouseDown (15,15) gMouseMove (15,15,35,35) gMouseUp (35,35) Kontext "ThreeDObjectsbar" ThreeDObjectsbar.close sleep 2 kontext "Toolbar" - Toolbar.OpenContextMenu '/// resetting the toolbar on the left ///' sleep 1 hMenuselectNr (1) sleep 1 hMenuItemUnCheck (11) sleep 1 else - Toolbar.OpenContextMenu '/// enable 3d-object-button in menubar sleep 1 hMenuselectNr (1) sleep 1 @@ -156,14 +149,13 @@ sub Make3dObject sleep 1 Wuerfel.click sleep 1 - gMouseDown (15,15) + gMouseDown (15,15) gMouseMove (15,15,35,35) gMouseUp (35,35) Kontext "ThreeDObjectsbar" ThreeDObjectsbar.close sleep 2 kontext "Toolbar" - Toolbar.OpenContextMenu '/// resetting the toolbar on the left ///' sleep 1 hMenuselectNr (1) sleep 1 @@ -171,12 +163,11 @@ sub Make3dObject sleep 1 endif end if - + end sub '------------------------------------------------------------------------------- sub MakeCurveObject - '///Inserts Curve Object if not Writer or Calc if (Ucase(gApplication) = "WRITER") then warnlog "Cant make circle in this application" @@ -184,12 +175,11 @@ sub MakeCurveObject end if if (Ucase(gApplication) = "CALC") then warnlog "Cant make circle in this application" - goto endsub + goto endsub end if printlog "we run Curve-object" kontext "Toolbar" - '/// enable Curves-button in menubar Toolbar.OpenContextMenu sleep 1 hMenuselectNr (1) @@ -198,26 +188,24 @@ sub MakeCurveObject sleep 1 Kurven.Click sleep 1 - gMouseDown (10,25) + gMouseDown (10,25) gMouseMove (10,25,30,35) gMouseUp (30,35) gMouseClick 90,90 sleep 1 kontext "Toolbar" - '/// reset Curves-button in menubar Toolbar.OpenContextMenu sleep 1 hMenuselectNr (1) sleep 1 hMenuItemUnCheck (7) sleep 1 - + end sub '------------------------------------------------------------------------------- sub MakeLineObject - '///Inserts line object if not writer or calc - + if gApplication = "WRITER" then warnlog "Currently no support for line-object in this application" goto endsub @@ -227,7 +215,6 @@ sub MakeLineObject goto endsub end if printlog "we run Line-object" - '/// Insert Line /// sleep 1 Kontext "Toolbar" Linien.TearOff @@ -242,13 +229,12 @@ sub MakeLineObject sleep 1 Kontext "Arrowshapes" Arrowshapes.Close - + end sub '------------------------------------------------------------------------------- sub MakeConnectorObject - '/// Inserts Connector object if not wirter or calc - + if gApplication = "WRITER" then warnlog "Cant make connector in this application" goto endsub @@ -258,7 +244,6 @@ sub MakeConnectorObject goto endsub end if printlog "we run Connector-object" - '/// Insert Connector /// if gApplication = "DRAW" then sleep 1 kontext "Toolbar" @@ -288,21 +273,19 @@ sub MakeConnectorObject gMouseMove (10,17,30,37) gMouseUp (30,37) end if - + end sub '------------------------------------------------------------------------------- sub MakeFormattedTextLine - '///Insert a formatted text line dim Zufall, iWaitIndex as integer - '/// Write a text, make it Bold, Italic and make it size 33. ///' Kontext "TextObjectbar" if TextObjectbar.Exists then - printlog " TextObjectbar.Exists = " + TextObjectbar.Exists + printlog " TextObjectbar.Exists = " + TextObjectbar.Exists else - ViewToolbarsTextFormatting - sleep (2) + ViewToolbarsTextFormatting + sleep (2) end if hTypeKeys "This is a text which we will format in some different ways." @@ -313,54 +296,44 @@ sub MakeFormattedTextLine Zufall=((20*Rnd)+1) 'Schriftart.GetItemcount Text1 = Schriftart.GetSelText - '/// Select any Font you like in the listbox 'Font' on 'Object Toolbar' ///' Printlog " -Font: '" + Schriftart.GetSelText + "' selected." Kontext "TextObjectbar" sleep (2) Printlog " - Change size of Font" - '/// Select any Font you like in the listbox 'Size' on 'Object Toolbar' ///' Schriftgroesse.Select (Zufall) Printlog " - Fontsize set to '" + Schriftgroesse.GetSelText + "'." Text2 = Schriftgroesse.GetSelText Kontext "TextObjectbar" - '/// Click button 'Bold' ///' Fett.Click sleep (2) Printlog " - Font attribute set to bold." Text4 = Fett.GetState(2) - + Kontext "TextObjectbar" - '/// Click button 'Italic' ///' Kursiv.Click sleep (2) Printlog " - Font attribute set to cursive." Text5 = Kursiv.GetState(2) - + Kontext "TextObjectbar" - '/// Click button 'Underline' ///' Unterstrichen.Click sleep (2) Printlog " - Font attribute set to underlined." Text6 = Unterstrichen.GetState(2) - + Kontext "TextObjectbar" - '/// Click button 'Justified' ///' Blocksatz.Click sleep (2) Printlog " - Text set to Justified." Text7 = Blocksatz.GetState(2) - + SetKontextApplication - + end sub 'MakeFormattedTextLine '-------------------------------------------------------------------------------------------------------- sub Formfunctions - '///Inserts a push button - '/// to enable this function, i have to insert the button for forms in the left toolbar (it isn't there by default :-() ///' - '///+ this is done via the context menue of the toolbar ///' - '///+ Tear Off 'Form functions' ///' gMouseMove2 (50, 20) if (Ucase(gApplication) = "IMPRESS") then kontext "Toolbar" @@ -386,34 +359,26 @@ sub Formfunctions printlog " enabled 'forms' button and clicked it" sleep 1 kontext "FormControls" - '///+ click button 'Design mode' to enable it ///' if (Pushbutton.IsEnabled = FALSE) then DesigneModus.click ' use forms menue, go into design mode endif - '///+ click button 'Push button' and insert the control ///' Pushbutton.Click ' use a pushbutton Sleep 1 gMouseDown (50,20) gMouseMove (50, 20,70, 40)' create a pushbutton gMouseUp (70,40) - '///+ now i can call both slots :-) and begin to test what I want :-) ///' - '/// Format->Control ///' FormatControl Kontext "ControlPropertiesDialog" sleep 1 - '/// close dialog 'Properties Button' ///' ControlPropertiesDialog.Close - '/// format->form ///' formatform Kontext "ControlPropertiesDialog" sleep 1 - '/// close dialog 'Form Properties' ///' ControlPropertiesDialog.Close sleep 5 ' needed, otherwise the context menue will get closed... - '/// resetting the toolbar on the left ///' if (Ucase(gApplication) = "IMPRESS") then kontext "Toolbar" Toolbar.OpenContextMenu ' disable forms button in menuebar @@ -429,13 +394,10 @@ end sub '-------------------------------------------------------------------------------------------------------- sub Objectplugin -'///Inserting a Plugin printlog "Insert Object-plugin" - '/// open application ///' 'Call hNewDocument - '/// Insert->Object->Plugin ///' InsertObjectPlugin Kontext "PlugInEinfuegen" 'DialogTest ( PlugInEinfuegen) @@ -450,7 +412,6 @@ sub Objectplugin sleep 5 Kontext "PlugInEinfuegen" if PlugInEinfuegen.exists then - '/// insert a '.mov' file : "graphics\required\input\sample.mov" ///' DateiUrl.SetText (ConvertPath ( gTesttoolpath + "graphics\required\input\sample.mov" )) printlog "Type something into the option field" 'Optionen so3:MultiLineEdit:MD_INSERT_OBJECT_PLUGIN:ED_PLUGINS_OPTIONS diff --git a/testautomation/graphics/optional/includes/global/g_clipexport3.inc b/testautomation/graphics/optional/includes/global/g_clipexport3.inc index 563691496242..0011c5b31d97 100755 --- a/testautomation/graphics/optional/includes/global/g_clipexport3.inc +++ b/testautomation/graphics/optional/includes/global/g_clipexport3.inc @@ -1,7 +1,7 @@ 'encoding UTF-8 Do not remove or change this line! '************************************************************************** '* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. -'* +'* '* Copyright 2008 by Sun Microsystems, Inc. '* '* OpenOffice.org - a multi-platform office productivity suite @@ -53,23 +53,19 @@ '\******************************************************************* Sub Get_Position_Size_Attributes - '///Getting values from the position and size dialog - + Printlog " Get_Position_Size_Attributes Starts" - '/// Bring up the attributes for the object we just created ///' FormatPositionAndSize - '/// Get and save the attributes ///' sleep 1 - '/// Position-values ///' Kontext Select Case gApplication - Case "WRITER" : active.SetPage TabPositionAndSizeWriter - Kontext "TabPositionAndSizeWriter" - Case else : active.SetPage TabPositionAndSize - Kontext "TabPositionAndSize" + Case "WRITER" : active.SetPage TabPositionAndSizeWriter + Kontext "TabPositionAndSizeWriter" + Case else : active.SetPage TabPositionAndSize + Kontext "TabPositionAndSize" End Select sleep 1 @@ -78,717 +74,662 @@ Sub Get_Position_Size_Attributes PositionHeight = Height.GetText if KeepRatio.IsChecked then SetText.PositionKeepRatio = "TRUE" - if ProtectPosition.IsChecked then SetText.PositionProtectPosition = "TRUE" - if ProtectSize.IsChecked then SetText.PositionProtectSize = "TRUE" - sleep 1 + if ProtectPosition.IsChecked then SetText.PositionProtectPosition = "TRUE" + if ProtectSize.IsChecked then SetText.PositionProtectSize = "TRUE" + sleep 1 + + Kontext + Select Case gApplication + Case "WRITER" : active.SetPage TabPositionAndSizeWriter + Kontext "TabPositionAndSizeWriter" + TabPositionAndSizeWriter.OK + Case else : active.SetPage TabPositionAndSize + Kontext "TabPositionAndSize" + TabPositionAndSize.OK + End Select + sleep 1 + SetKontextApplication + sleep 3 + Printlog " Get_Position_Size_Attributes Ends" - '/// Switch back to tabpage 'Position' to avoid problems later ///' - '/// And then close dialog TabPositionAndSize with 'OK' ///' - Kontext - Select Case gApplication - Case "WRITER" : active.SetPage TabPositionAndSizeWriter - Kontext "TabPositionAndSizeWriter" - TabPositionAndSizeWriter.OK - Case else : active.SetPage TabPositionAndSize - Kontext "TabPositionAndSize" - TabPositionAndSize.OK - End Select - sleep 1 - SetKontextApplication - sleep 3 - Printlog " Get_Position_Size_Attributes Ends" - end sub '------------------------------------------------------------------------------- sub Get_Colour_Attributes - '/// Geting Attributes from Area Dialog printlog " Get_Colour_Attributes Starts" - - '/// Open Format-Area and get the values considering colors and borders ///' - FormatArea - Kontext "TabArea" - Kontext - Active.setpage TabArea - Kontext "TabArea" - - + + FormatArea + Kontext "TabArea" + Kontext + Active.setpage TabArea + Kontext "TabArea" + + ' /// Area ///' FillOptions.Select 2 if FillOptions.GetSelIndex <> 2 then Errorlog "Couldnt click on 'Color' in FormatArea" - AreaColourListValue = ColourList.GetSelText - printlog "AreaColourListValue = " + AreaColourListValue - sleep 1 - - '/// Gradient ///' - FillOptions.Select 3 - if FillOptions.GetSelIndex <> 3 then Errorlog "Couldnt click on .Gradient. in FormatArea" - - AreaGradientListValue = GradientList.GetSelText 'AreaGradientValue = "TRUE" - If Automatic.IsVisible then - If Automatic.IsChecked then AreaAutomaticValue = "TRUE" - Else - If Increments.IsVisible then - AreaIncrementsValue = Increments.GetText - End if - End if - - '/// Hatching ///' - FillOptions.Select 4 - if FillOptions.GetSelIndex <> 4 then Errorlog "Couldnt click on 'Hatching' in FormatArea" - - AreaHatchingListValue = HatchingList.GetSelText 'Then = "TRUE" ' lista - If BackgroundColour.IsVisible then - If BackgroundColour.IsChecked then - AreaBackgroundColourValue = BackgroundColour.GetText - End if - End if - If BackgroundColourList.IsVisible then - AreaBackgroundColourListValue = BackgroundColourList.GetSelText - End if - - '/// Increments ///' - FillOptions.Select 5 - if FillOptions.GetSelIndex <> 5 then Errorlog "Couldnt click on 'Hatching' in FormatArea" - - AreaBitmapListValue = BitmapList.GetSelText - - If Original.IsChecked then - AreaOriginalListValue = "TRUE" - Else - If Relative.IsChecked then - AreaRelativeValue = "TRUE" - AreaWidthValue = Width.GetText - AreaHeightValue = Height.GetText - Else - AreaWidthValue = Width.GetText - AreaHeightValue = Height.GetText - End if - End if - - If Tile.IsChecked then AreaTileValue = "TRUE" - If Stretch.IsChecked then AreaStretchValue = "TRUE" - If Row.IsChecked then - AreaRowValue = "TRUE" - AreaOffsetValue = Offset.GetText - End if - If Column.IsChecked then - AreaColumnValue = "TRUE" - AreaOffsetValue = Offset.GetText - End if - - sleep 1 - - - '/// Shadow ///' - Kontext "TabArea" - Kontext - Active.setpage TabSchatten - Kontext "TabSchatten" - - If Anzeigen.IsChecked then - ShadowUseShadowsValue = "TRUE" - ShadowDistanceValue = Entfernung.GetText - ShadowColorValue = Farbe.GetText - ShadowTransparencyValue = Transparenz.GetText - end if - - sleep 1 - - - '/// Transparency ///' - Kontext - Active.SetPage TabTransparenz - Kontext "TabTransparenz" - if KeineTransparenz.IsEnabled = FALSE then - warnlog " Couldnt check 'No transparency' in Area - Transparency'" - else - KeineTransparenz.Check - end if - - If KeineTransparenz.IsChecked then LineareTransparenz.Check - If LineareTransparenz.IsChecked then - TransparencyTransparencyValue = MFLinTransparenz.GetText - End if - - - '/// Gradient ///' - Transparenzverlauf.Check - If Transparenzverlauf.IsChecked then - TransparencyGradientType = TransparenzverlaufTyp.GetItemText - TransparencyMFZentrumX = MFZentrumX.GetText - TransparencyMFZentrumY = MFZentrumY.GetText - TransparencyMFWinkel = MFWinkel.GetText - TransparencyMFRand = MFRand.GetText - TransparencyMFStartwert = MFStartwert.GetText - TransparencyMFEndwert = MFEndwert.GetText - End if - - sleep 1 - - - '/// Colors ///' - Kontext - Active.setpage TabFarben - Kontext "TabFarben" - - ColorName = FarbName.GetText - ColorColor = Farbe.GetItemText - ColorModel = Farbmodell.GetSelText - printlog " The colormodel is: " + ColorModel - - if ColorModel = "RGB" then - ColorR = R.GetText - ColorG = G.GetText - ColorB = B.GetText - elseif ColorModel = "RVB" then - ColorR = R.GetText - ColorG = G.GetText - ColorB = B.GetText - else - ColorC = C.GetText - ColorM = M.GetText - ColorY = Y.GetText - ColorK = K.GetText - endif - - '/// TabFarbverlaeufe ///' - Kontext - Active.setpage TabFarbverlaeufe - Kontext "TabFarbverlaeufe" - - GradientsType = Typ.GetItemText - GradientsCenterX = ZentrumX.GetText - GradientsCenterZ = ZentrumY.GetText - GradientsAngle = Winkel.GetText - GradientsBorder = Rand.GetText - GradientsFromColor = Von.GetItemText - GradientsFromValue = VonWert.GetText - GradientsToColor = Bis.GetItemText - GradientsToValue = BisWert.GetText - - - '/// Hatching ///' - Kontext - Active.setpage TabSchraffuren - Kontext "TabSchraffuren" - - HatchingDistance = Abstand.GetText - HatchingAngle = Winkel.GetText - 'Definition - HatchingLineType = Linientyp.GetSelText - HatchingLineColor = Linienfarbe.GetSelText - HatchingLineTable = Tabelle.GetItemText - - - '/// TabBitmap ///' - Kontext - Active.setpage TabBitmap - Kontext "TabBitmap" - - BitmapForeground = Vordergrund.GetSelText - BitmapBackground = Hintergrund.GetSelText - BitmapTable = Tabelle.GetSelText - - Kontext - Active.setpage TabArea - Kontext "TabArea" - TabArea.Cancel - printlog " Get_Colour_Attributes ends" - + AreaColourListValue = ColourList.GetSelText + printlog "AreaColourListValue = " + AreaColourListValue + sleep 1 + + FillOptions.Select 3 + if FillOptions.GetSelIndex <> 3 then Errorlog "Couldnt click on .Gradient. in FormatArea" + + AreaGradientListValue = GradientList.GetSelText 'AreaGradientValue = "TRUE" + If Automatic.IsVisible then + If Automatic.IsChecked then AreaAutomaticValue = "TRUE" + Else + If Increments.IsVisible then + AreaIncrementsValue = Increments.GetText + End if + End if + + FillOptions.Select 4 + if FillOptions.GetSelIndex <> 4 then Errorlog "Couldnt click on 'Hatching' in FormatArea" + + AreaHatchingListValue = HatchingList.GetSelText 'Then = "TRUE" ' lista + If BackgroundColour.IsVisible then + If BackgroundColour.IsChecked then + AreaBackgroundColourValue = BackgroundColour.GetText + End if + End if + If BackgroundColourList.IsVisible then + AreaBackgroundColourListValue = BackgroundColourList.GetSelText + End if + + FillOptions.Select 5 + if FillOptions.GetSelIndex <> 5 then Errorlog "Couldnt click on 'Hatching' in FormatArea" + + AreaBitmapListValue = BitmapList.GetSelText + + If Original.IsChecked then + AreaOriginalListValue = "TRUE" + Else + If Relative.IsChecked then + AreaRelativeValue = "TRUE" + AreaWidthValue = Width.GetText + AreaHeightValue = Height.GetText + Else + AreaWidthValue = Width.GetText + AreaHeightValue = Height.GetText + End if + End if + + If Tile.IsChecked then AreaTileValue = "TRUE" + If Stretch.IsChecked then AreaStretchValue = "TRUE" + If Row.IsChecked then + AreaRowValue = "TRUE" + AreaOffsetValue = Offset.GetText + End if + If Column.IsChecked then + AreaColumnValue = "TRUE" + AreaOffsetValue = Offset.GetText + End if + + sleep 1 + + + Kontext "TabArea" + Kontext + Active.setpage TabSchatten + Kontext "TabSchatten" + + If Anzeigen.IsChecked then + ShadowUseShadowsValue = "TRUE" + ShadowDistanceValue = Entfernung.GetText + ShadowColorValue = Farbe.GetText + ShadowTransparencyValue = Transparenz.GetText + end if + + sleep 1 + + + Kontext + Active.SetPage TabTransparenz + Kontext "TabTransparenz" + if KeineTransparenz.IsEnabled = FALSE then + warnlog " Couldnt check 'No transparency' in Area - Transparency'" + else + KeineTransparenz.Check + end if + + If KeineTransparenz.IsChecked then LineareTransparenz.Check + If LineareTransparenz.IsChecked then + TransparencyTransparencyValue = MFLinTransparenz.GetText + End if + + + Transparenzverlauf.Check + If Transparenzverlauf.IsChecked then + TransparencyGradientType = TransparenzverlaufTyp.GetItemText + TransparencyMFZentrumX = MFZentrumX.GetText + TransparencyMFZentrumY = MFZentrumY.GetText + TransparencyMFWinkel = MFWinkel.GetText + TransparencyMFRand = MFRand.GetText + TransparencyMFStartwert = MFStartwert.GetText + TransparencyMFEndwert = MFEndwert.GetText + End if + + sleep 1 + + + Kontext + Active.setpage TabFarben + Kontext "TabFarben" + + ColorName = FarbName.GetText + ColorColor = Farbe.GetItemText + ColorModel = Farbmodell.GetSelText + printlog " The colormodel is: " + ColorModel + + if ColorModel = "RGB" then + ColorR = R.GetText + ColorG = G.GetText + ColorB = B.GetText + elseif ColorModel = "RVB" then + ColorR = R.GetText + ColorG = G.GetText + ColorB = B.GetText + else + ColorC = C.GetText + ColorM = M.GetText + ColorY = Y.GetText + ColorK = K.GetText + endif + + Kontext + Active.setpage TabFarbverlaeufe + Kontext "TabFarbverlaeufe" + + GradientsType = Typ.GetItemText + GradientsCenterX = ZentrumX.GetText + GradientsCenterZ = ZentrumY.GetText + GradientsAngle = Winkel.GetText + GradientsBorder = Rand.GetText + GradientsFromColor = Von.GetItemText + GradientsFromValue = VonWert.GetText + GradientsToColor = Bis.GetItemText + GradientsToValue = BisWert.GetText + + + Kontext + Active.setpage TabSchraffuren + Kontext "TabSchraffuren" + + HatchingDistance = Abstand.GetText + HatchingAngle = Winkel.GetText + 'Definition + HatchingLineType = Linientyp.GetSelText + HatchingLineColor = Linienfarbe.GetSelText + HatchingLineTable = Tabelle.GetItemText + + + Kontext + Active.setpage TabBitmap + Kontext "TabBitmap" + + BitmapForeground = Vordergrund.GetSelText + BitmapBackground = Hintergrund.GetSelText + BitmapTable = Tabelle.GetSelText + + Kontext + Active.setpage TabArea + Kontext "TabArea" + TabArea.Cancel + printlog " Get_Colour_Attributes ends" + end sub '------------------------------------------------------------------------------- sub Check_Position_Size_Attributes - '/// Pasting object and comparing attributes with the stored values printlog " Check_Position_Size_Attributes Starts" - - '/// Paste object with EditPaste ///' + sleep 1 - EditPaste + EditPaste sleep (5) - - '/// Bring up the attributes for the object we just created ///' + FormatPositionAndSize - - '/// Get and save the attributes ///' - sleep 1 - if gApplication = "WRITER" then - Kontext "TabPositionAndSizeWriter" - Kontext - active.SetPage TabPositionAndSizeWriter - Kontext - active.SetPage TabPositionAndSizeWriter - Kontext "TabPositionAndSizeWriter" - sleep 1 - - '/// Position-values ///' - - '/// Size-values ///' - If LiberalMeasurement(PositionWidth, Width.GetText) <> TRUE then QaErrorLog "PositionWidth is: " + Width.GetText + " should be: '" + PositionWidth + "'. Possibly caused by i71631." - If LiberalMeasurement(PositionHeight, Height.GetText) <> TRUE then QaErrorLog "PositionHeight is: " + Height.GetText + " should be: '" + PositionHeight + "'. Possibly caused by i71631." - - If PositionKeepRatio = "TRUE" then - If KeepRatio.IsChecked = "FALSE" then Warnlog "KeepRatio isnt checked" - End if - - If PositionProtectPosition = "TRUE" then - If ProtectPosition.IsChecked = "FALSE" then Warnlog "ProtectPosition isnt checked" - End if - - If PositionProtectSize = "TRUE" then - If ProtectSize.IsChecked = "FALSE" then Warnlog "ProtectPosition isnt checked" - End if - sleep 1 - - '/// Switch back to tabpage 'Position' to avoid problems later ///' - Kontext "TabPositionAndSizeWriter" - Kontext - Active.setpage TabPositionAndSizeWriter - Kontext "TabPositionAndSizeWriter" - - '/// Close dialog TabPositionAndSize with 'OK' ///' - TabPositionAndSizeWriter.OK - - else - Kontext - active.SetPage TabPositionAndSize - Kontext "TabPositionAndSize" - sleep 1 - - '/// Position-values ///' - - '/// Size-values ///' - If LiberalMeasurement(PositionWidth, Width.GetText) <> TRUE then QaErrorLog "PositionWidth is: " + Width.GetText + " should be: " + PositionWidth + "'. Possibly caused by i71631." - If LiberalMeasurement(PositionHeight, Height.GetText) <> TRUE then QaErrorLog "PositionHeight is: " + Height.GetText + " should be: " + PositionHeight + "'. Possibly caused by i71631." - - If PositionKeepRatio = "TRUE" then - If KeepRatio.IsChecked = "FALSE" then Warnlog "KeepRatio isnt checked" - End if - - If PositionProtectPosition = "TRUE" then - If ProtectPosition.IsChecked = "FALSE" then Warnlog "ProtectPosition isnt checked" - End if - - If PositionProtectSize = "TRUE" then - If ProtectSize.IsChecked = "FALSE" then Warnlog "ProtectPosition isnt checked" - End if - sleep 1 - - '/// Switch back to tabpage 'Position' to avoid problems later ///' - Kontext "TabPositionAndSize" - Kontext - Active.setpage TabPositionAndSize - Kontext "TabPositionAndSize" - - '/// Close dialog TabPositionAndSize with 'OK' ///' - TabPositionAndSize.OK - endif - - SetKontextApplication - sleep 3 - printlog " Check_Position_Size_Attributes Ends" - + + sleep 1 + if gApplication = "WRITER" then + Kontext "TabPositionAndSizeWriter" + Kontext + active.SetPage TabPositionAndSizeWriter + Kontext + active.SetPage TabPositionAndSizeWriter + Kontext "TabPositionAndSizeWriter" + sleep 1 + + + If LiberalMeasurement(PositionWidth, Width.GetText) <> TRUE then QaErrorLog "PositionWidth is: " + Width.GetText + " should be: '" + PositionWidth + "'. Possibly caused by i71631." + If LiberalMeasurement(PositionHeight, Height.GetText) <> TRUE then QaErrorLog "PositionHeight is: " + Height.GetText + " should be: '" + PositionHeight + "'. Possibly caused by i71631." + + If PositionKeepRatio = "TRUE" then + If KeepRatio.IsChecked = "FALSE" then Warnlog "KeepRatio isnt checked" + End if + + If PositionProtectPosition = "TRUE" then + If ProtectPosition.IsChecked = "FALSE" then Warnlog "ProtectPosition isnt checked" + End if + + If PositionProtectSize = "TRUE" then + If ProtectSize.IsChecked = "FALSE" then Warnlog "ProtectPosition isnt checked" + End if + sleep 1 + + Kontext "TabPositionAndSizeWriter" + Kontext + Active.setpage TabPositionAndSizeWriter + Kontext "TabPositionAndSizeWriter" + + TabPositionAndSizeWriter.OK + + else + Kontext + active.SetPage TabPositionAndSize + Kontext "TabPositionAndSize" + sleep 1 + + + If LiberalMeasurement(PositionWidth, Width.GetText) <> TRUE then QaErrorLog "PositionWidth is: " + Width.GetText + " should be: " + PositionWidth + "'. Possibly caused by i71631." + If LiberalMeasurement(PositionHeight, Height.GetText) <> TRUE then QaErrorLog "PositionHeight is: " + Height.GetText + " should be: " + PositionHeight + "'. Possibly caused by i71631." + + If PositionKeepRatio = "TRUE" then + If KeepRatio.IsChecked = "FALSE" then Warnlog "KeepRatio isnt checked" + End if + + If PositionProtectPosition = "TRUE" then + If ProtectPosition.IsChecked = "FALSE" then Warnlog "ProtectPosition isnt checked" + End if + + If PositionProtectSize = "TRUE" then + If ProtectSize.IsChecked = "FALSE" then Warnlog "ProtectPosition isnt checked" + End if + sleep 1 + + Kontext "TabPositionAndSize" + Kontext + Active.setpage TabPositionAndSize + Kontext "TabPositionAndSize" + + TabPositionAndSize.OK + endif + + SetKontextApplication + sleep 3 + printlog " Check_Position_Size_Attributes Ends" + end sub '---------------------------------------------------------------------------------------------------- sub Check_Text_Formatting - '/// Checking text formatting of pasted object - + printlog " Check_Text_Formatting Starts" - '/// Paste object with EditPaste ///' sleep (1) EditPaste sleep (3) - '/// Select the text and bring up the attributes for it. ///' select case (gApplication) - case "DRAW" : hTypeKeys "" - hTypeKeys "" 'Mark the whole text' - case "IMPRESS" : hTypeKeys "" - hTypeKeys "" 'Mark the whole text' - case "WRITER" : EditSelectAll 'Since there is currently only (should only be) one object (the text) in the document. - case "CALC" : hTypeKeys "" -' hTypeKeys "" 'Mark the whole text' - case else : warnlog " the test has not been configured for this application ( '" + gApplication + "' ). Please notify testwriter." + case "DRAW" : hTypeKeys "" + hTypeKeys "" 'Mark the whole text' + case "IMPRESS" : hTypeKeys "" + hTypeKeys "" 'Mark the whole text' + case "WRITER" : EditSelectAll 'Since there is currently only (should only be) one object (the text) in the document. + case "CALC" : hTypeKeys "" + ' hTypeKeys "" 'Mark the whole text' + case else : warnlog " the test has not been configured for this application ( '" + gApplication + "' ). Please notify testwriter." end select sleep (2) - + Kontext "TextObjectbar" if TextObjectbar.Exists = FALSE then - ViewToolbarsTextFormatting - sleep (1) + ViewToolbarsTextFormatting + sleep (1) endif Printlog " - Check if the Fontname is still the same." if Schriftart.GetSelText <> Text1 then warnlog " Fontname should be: " + Text1 + " but was: " + Schriftart.GetSelText - sleep (2) - Printlog " - Check if the Text still has the same Size." - if Schriftgroesse.GetSelText <> Text2 then warnlog " Fontsize should be: " + Text2 + " but was: " + Schriftgroesse.GetSelText - - Kontext "TextObjectbar" - Printlog " - Check if the Font-attribute is set to Bold." - '/// check state for button 'Bold' ///' - if Fett.GetState(2) <> Text4 then warnlog " Bold should be: " + Text4 + " but was: " + Fett.GetState(2) - - Kontext "TextObjectbar" - Printlog " - Font attribute cursive" - '/// check state for button 'Italic' ///' - if Kursiv.GetState(2) <> Text5 then warnlog " Italic should be: " + Text5 + " but was: " + Kursiv.GetState(2) - - Kontext "TextObjectbar" - Printlog " - Check if the Font-attribute is set to Underlined" - '/// check state for button 'Underline' ///' - sleep (2) - if Unterstrichen.GetState(2) <> Text6 then warnlog " Underline should be: " + Text6 + " but was: " + Unterstrichen.GetState(2) - - Kontext "TextObjectbar" - if (gApplication) = "CALC" then - kontext "FormatObjectBar" - Printlog " - Check if the Font-attribute is set to Justified" - '/// check state for button 'Justified' ///' - if Block.GetState(2) <> Text7 then warnlog " Justified should be: " + Text7 + " but was: " + Blocksatz.GetState(2) - else - if Blocksatz.GetState(2) <> Text7 then warnlog " Justified should be: " + Text7 + " but was: " + Blocksatz.GetState(2) - endif - '/// Set kontext to the application ///' - SetKontextApplication - printlog " Check_Text_Formatting Ends" - -end sub '/// Here ends the Sub "Check_Text_Formatting" ///' - -'---------------------------------------------------------------------------------------------------- + sleep (2) + Printlog " - Check if the Text still has the same Size." + if Schriftgroesse.GetSelText <> Text2 then warnlog " Fontsize should be: " + Text2 + " but was: " + Schriftgroesse.GetSelText + + Kontext "TextObjectbar" + Printlog " - Check if the Font-attribute is set to Bold." + if Fett.GetState(2) <> Text4 then warnlog " Bold should be: " + Text4 + " but was: " + Fett.GetState(2) + + Kontext "TextObjectbar" + Printlog " - Font attribute cursive" + if Kursiv.GetState(2) <> Text5 then warnlog " Italic should be: " + Text5 + " but was: " + Kursiv.GetState(2) + + Kontext "TextObjectbar" + Printlog " - Check if the Font-attribute is set to Underlined" + sleep (2) + if Unterstrichen.GetState(2) <> Text6 then warnlog " Underline should be: " + Text6 + " but was: " + Unterstrichen.GetState(2) + + Kontext "TextObjectbar" + if (gApplication) = "CALC" then + kontext "FormatObjectBar" + Printlog " - Check if the Font-attribute is set to Justified" + if Block.GetState(2) <> Text7 then warnlog " Justified should be: " + Text7 + " but was: " + Blocksatz.GetState(2) + else + if Blocksatz.GetState(2) <> Text7 then warnlog " Justified should be: " + Text7 + " but was: " + Blocksatz.GetState(2) + endif + SetKontextApplication + printlog " Check_Text_Formatting Ends" + + + '---------------------------------------------------------------------------------------------------- sub Check_Colors_Borders_Attributes - '/// printlog " Check_Colors_Borders_Attributes Starts" - - '/// Open Format-Area and get the values considering colors and borders ///' + FormatArea - - Kontext "TabArea" - Kontext - Active.setpage TabArea - Kontext "TabArea" - + + Kontext "TabArea" + Kontext + Active.setpage TabArea + Kontext "TabArea" + ' /// Area ///' FillOptions.Select 2 if FillOptions.GetSelIndex <> 2 then Errorlog "Couldnt click on 'Color' in FormatArea" - - If AreaColourListValue <> ColourList.GetSelText then - WarnLog " Area ColourList doesn't have the right Colour selected." - printlog " AreaColourListValue = " + AreaColourListValue + " should be = " + ColourList.GetSelText - end if - - sleep 1 - - '/// Gradient ///' - FillOptions.Select 3 - if FillOptions.GetSelIndex <> 3 then Errorlog "Couldnt click on 'Gradient.' in FormatArea" - - If AreaGradientListValue <> GradientList.GetSelText then WarnLog "Area GradientList has changed it's value." - If Automatic.IsVisible then - If AreaAutomaticValue = "TRUE" then - If Automatic.IsChecked then - Printlog " Area Automatic Value is correct" - Else - WarnLog " Area Automatic Value wasnt checked. It should have been." - End if - End if - Else - If Increments.IsVisible then - If AreaIncrementsValue <> Increments.GetText then WarnLog "Area Increments has changed." - End if - End if - - '/// Hatching ///' - FillOptions.Select 4 - if FillOptions.GetSelIndex <> 4 then Errorlog "Couldnt click on 'Hatching' in FormatArea" - - If AreaHatchingListValue <> HatchingList.GetSelText then Errorlog "Area HatchingList has changed it's value." - If BackgroundColour.IsVisible then - If BackgroundColour.IsChecked then - If AreaBackgroundColourValue <> BackgroundColour.GetText then Errorlog "Area Background Color has changed it's value." - end if - end if - If BackgroundColourList.IsVisible then - If AreaBackgroundColourListValue <> BackgroundColourList.GetSelText then Errorlog "Area Background ColourList has changed it's value." - End if - - '/// Increments ///' - FillOptions.Select 5 - if FillOptions.GetSelIndex <> 5 then Errorlog "Couldnt click on 'Color' in FormatArea" - - If BitmapList.IsVisible then - If AreaBitmapListValue <> BitmapList.GetSelText then Errorlog "Area Bitmap List has changed it's value." - else - warnlog " No Area-Bitmap-List visible!" - end if - If Original.IsChecked = "TRUE" then - If AreaOriginalListValue <> "TRUE" then Errorlog "Original List has changed it's value." - Else - If Relative.IsChecked = "TRUE" then - If AreaRelativeValue <> "TRUE" then Errorlog "Area Relative has changed it's value." = "TRUE" - If AreaWidthValue <> Width.GetText then Errorlog "AreaWidthValue has changed." - If AreaHeightValue <> Height.GetText then Errorlog "AreaHeightValue has changed." - Else - If AreaWidthValue <> Width.GetText then Errorlog "AreaWidthValue has changed." - If AreaHeightValue <> Height.GetText then Errorlog "AreaHeightValue has changed." - End if - End if - - If Tile.IsChecked then - If AreaTileValue <> "TRUE" then Errorlog "AreaTileValue has changed." - End if - - If Stretch.IsChecked then - If AreaStretchValue <> "TRUE" then Errorlog "AreaStretchValue has changed." - End if - - If Row.IsChecked then - If AreaRowValue <> "TRUE" then Errorlog "AreRowValue has changed." - If AreaOffsetValue <> Offset.GetText then Errorlog "AreaOffsetValue has changed." - End if - - If Column.IsChecked then - If AreaColumnValue <> "TRUE" then Errorlog "AreaColumnValue has changed." - If AreaOffsetValue <> Offset.GetText then Errorlog "AreaOffsetValue has changed." - End if - - sleep 1 - - '/// Tabpage: Shadow ///' - Kontext "TabArea" - Kontext - Active.setpage TabSchatten - Kontext "TabSchatten" - - If Anzeigen.IsChecked then - ShadowUseShadowsValue = "TRUE" - ShadowDistanceValue = Entfernung.GetText - ShadowColorValue = Farbe.GetText - ShadowTransparencyValue = Transparenz.GetText - end if - - sleep 1 - - '/// Tab-page: Transparency ///' - Kontext - Active.SetPage TabTransparenz - Kontext "TabTransparenz" - - if KeineTransparenz.IsEnabled = FALSE then - warnlog " Couldnt check 'No transparency' in Area - Transparency'" - else - KeineTransparenz.Check - end if - - If KeineTransparenz.IsChecked then LineareTransparenz.Check - If LineareTransparenz.IsChecked then - TransparencyTransparencyValue = MFLinTransparenz.GetText + + If AreaColourListValue <> ColourList.GetSelText then + WarnLog " Area ColourList doesn't have the right Colour selected." + printlog " AreaColourListValue = " + AreaColourListValue + " should be = " + ColourList.GetSelText end if - - '/// Gradient ///' - Transparenzverlauf.Check - If Transparenzverlauf.IsChecked then - TransparencyGradientType = TransparenzverlaufTyp.GetItemText - TransparencyMFZentrumX = MFZentrumX.GetText - TransparencyMFZentrumY = MFZentrumY.GetText - TransparencyMFWinkel = MFWinkel.GetText - TransparencyMFRand = MFRand.GetText - TransparencyMFStartwert = MFStartwert.GetText - TransparencyMFEndwert = MFEndwert.GetText - end if - - sleep 1 - - '/// Colors ///' - Kontext - Active.setpage TabFarben - Kontext "TabFarben" - ColorName = FarbName.GetText - ColorColor = Farbe.GetItemText - ColorModel = Farbmodell.GetSelText - printlog " " + ColorModel - - select case iSprache ' Prepared for future language-problematics. - case 33 : If Farbmodell.GetSelIndex = 1 then '/// French ///' - if ColorR <> R.GetText then Warnlog "Wrong R-Color. Should be: " + ColorR + " but was: " + R.GetText - if ColorG <> G.GetText then Warnlog "Wrong V-Color. Should be: " + ColorG + " but was: " + G.GetText - if ColorB <> B.GetText then Warnlog "Wrong B-Color. Should be: " + ColorB + " but was: " + B.GetText - Else - if ColorC <> C.GetText then Warnlog "Wrong C-Color. Should be: " + ColorC + " but was: " + C.GetText - if ColorM <> M.GetText then Warnlog "Wrong M-Color. Should be: " + ColorM + " but was: " + M.GetText - if ColorY <> Y.GetText then Warnlog "Wrong J-Color. Should be: " + ColorY + " but was: " + Y.GetText - if ColorK <> K.GetText then Warnlog "Wrong N-Color. Should be: " + ColorK + " but was: " + K.GetText - End if - case else : If Farbmodell.GetSelIndex = 1 then '/// English ///' - if ColorR <> R.GetText then Warnlog "Wrong R-Color. Should be: " + ColorR + " but was: " + R.GetText - if ColorG <> G.GetText then Warnlog "Wrong G-Color. Should be: " + ColorG + " but was: " + G.GetText - if ColorB <> B.GetText then Warnlog "Wrong B-Color. Should be: " + ColorB + " but was: " + B.GetText - Else - if ColorC <> C.GetText then Warnlog "Wrong C-Color. Should be: " + ColorC + " but was: " + C.GetText - if ColorM <> M.GetText then Warnlog "Wrong M-Color. Should be: " + ColorM + " but was: " + M.GetText - if ColorY <> Y.GetText then Warnlog "Wrong Y-Color. Should be: " + ColorY + " but was: " + Y.GetText - if ColorK <> K.GetText then Warnlog "Wrong K-Color. Should be: " + ColorK + " but was: " + K.GetText - End if - end select - - '/// Tab-Page: Colors ///' - Kontext - Active.setpage TabFarbverlaeufe - Kontext "TabFarbverlaeufe" - - GradientsType = Typ.GetItemText - GradientsCenterX = ZentrumX.GetText - GradientsCenterZ = ZentrumY.GetText - GradientsAngle = Winkel.GetText - GradientsBorder = Rand.GetText - GradientsFromColor = Von.GetItemText - GradientsFromValue = VonWert.GetText - GradientsToColor = Bis.GetItemText - GradientsToValue = BisWert.GetText - - '/// Hatching ///' - Kontext - Active.setpage TabSchraffuren - Kontext "TabSchraffuren" - - HatchingDistance = Abstand.GetText - HatchingAngle = Winkel.GetText - 'Definition - HatchingLineType = Linientyp.GetSelText - HatchingLineColor = Linienfarbe.GetSelText - HatchingLineTable = Tabelle.GetItemText - - '/// TabBitmap ///' - Kontext - Active.setpage TabBitmap - Kontext "TabBitmap" - - BitmapForeground = Vordergrund.GetSelText - BitmapBackground = Hintergrund.GetSelText - BitmapTable = Tabelle.GetSelText - - '/// Close the TabArea-window ///' - Kontext - Active.setpage TabArea - Kontext "TabArea" - TabArea.Cancel - - '/// Set kontext to the application ///' - SetKontextApplication - - printlog "Check_Colors_Borders_Attributes Ends" - - Printlog "End of one application" - -endsub '/// Here ends the Sub "Check_Colors_Borders_Attributes" ///' - -'---------------------------------- Set the Kontext to the current Application ----------------------------------' + + sleep 1 + + FillOptions.Select 3 + if FillOptions.GetSelIndex <> 3 then Errorlog "Couldnt click on 'Gradient.' in FormatArea" + + If AreaGradientListValue <> GradientList.GetSelText then WarnLog "Area GradientList has changed it's value." + If Automatic.IsVisible then + If AreaAutomaticValue = "TRUE" then + If Automatic.IsChecked then + Printlog " Area Automatic Value is correct" + Else + WarnLog " Area Automatic Value wasnt checked. It should have been." + End if + End if + Else + If Increments.IsVisible then + If AreaIncrementsValue <> Increments.GetText then WarnLog "Area Increments has changed." + End if + End if + + FillOptions.Select 4 + if FillOptions.GetSelIndex <> 4 then Errorlog "Couldnt click on 'Hatching' in FormatArea" + + If AreaHatchingListValue <> HatchingList.GetSelText then Errorlog "Area HatchingList has changed it's value." + If BackgroundColour.IsVisible then + If BackgroundColour.IsChecked then + If AreaBackgroundColourValue <> BackgroundColour.GetText then Errorlog "Area Background Color has changed it's value." + end if + end if + If BackgroundColourList.IsVisible then + If AreaBackgroundColourListValue <> BackgroundColourList.GetSelText then Errorlog "Area Background ColourList has changed it's value." + End if + + FillOptions.Select 5 + if FillOptions.GetSelIndex <> 5 then Errorlog "Couldnt click on 'Color' in FormatArea" + + If BitmapList.IsVisible then + If AreaBitmapListValue <> BitmapList.GetSelText then Errorlog "Area Bitmap List has changed it's value." + else + warnlog " No Area-Bitmap-List visible!" + end if + If Original.IsChecked = "TRUE" then + If AreaOriginalListValue <> "TRUE" then Errorlog "Original List has changed it's value." + Else + If Relative.IsChecked = "TRUE" then + If AreaRelativeValue <> "TRUE" then Errorlog "Area Relative has changed it's value." = "TRUE" + If AreaWidthValue <> Width.GetText then Errorlog "AreaWidthValue has changed." + If AreaHeightValue <> Height.GetText then Errorlog "AreaHeightValue has changed." + Else + If AreaWidthValue <> Width.GetText then Errorlog "AreaWidthValue has changed." + If AreaHeightValue <> Height.GetText then Errorlog "AreaHeightValue has changed." + End if + End if + + If Tile.IsChecked then + If AreaTileValue <> "TRUE" then Errorlog "AreaTileValue has changed." + End if + + If Stretch.IsChecked then + If AreaStretchValue <> "TRUE" then Errorlog "AreaStretchValue has changed." + End if + + If Row.IsChecked then + If AreaRowValue <> "TRUE" then Errorlog "AreRowValue has changed." + If AreaOffsetValue <> Offset.GetText then Errorlog "AreaOffsetValue has changed." + End if + + If Column.IsChecked then + If AreaColumnValue <> "TRUE" then Errorlog "AreaColumnValue has changed." + If AreaOffsetValue <> Offset.GetText then Errorlog "AreaOffsetValue has changed." + End if + + sleep 1 + + Kontext "TabArea" + Kontext + Active.setpage TabSchatten + Kontext "TabSchatten" + + If Anzeigen.IsChecked then + ShadowUseShadowsValue = "TRUE" + ShadowDistanceValue = Entfernung.GetText + ShadowColorValue = Farbe.GetText + ShadowTransparencyValue = Transparenz.GetText + end if + + sleep 1 + + Kontext + Active.SetPage TabTransparenz + Kontext "TabTransparenz" + + if KeineTransparenz.IsEnabled = FALSE then + warnlog " Couldnt check 'No transparency' in Area - Transparency'" + else + KeineTransparenz.Check + end if + + If KeineTransparenz.IsChecked then LineareTransparenz.Check + If LineareTransparenz.IsChecked then + TransparencyTransparencyValue = MFLinTransparenz.GetText + end if + + Transparenzverlauf.Check + If Transparenzverlauf.IsChecked then + TransparencyGradientType = TransparenzverlaufTyp.GetItemText + TransparencyMFZentrumX = MFZentrumX.GetText + TransparencyMFZentrumY = MFZentrumY.GetText + TransparencyMFWinkel = MFWinkel.GetText + TransparencyMFRand = MFRand.GetText + TransparencyMFStartwert = MFStartwert.GetText + TransparencyMFEndwert = MFEndwert.GetText + end if + + sleep 1 + + Kontext + Active.setpage TabFarben + Kontext "TabFarben" + ColorName = FarbName.GetText + ColorColor = Farbe.GetItemText + ColorModel = Farbmodell.GetSelText + printlog " " + ColorModel + + select case iSprache ' Prepared for future language-problematics. + if ColorR <> R.GetText then Warnlog "Wrong R-Color. Should be: " + ColorR + " but was: " + R.GetText + if ColorG <> G.GetText then Warnlog "Wrong V-Color. Should be: " + ColorG + " but was: " + G.GetText + if ColorB <> B.GetText then Warnlog "Wrong B-Color. Should be: " + ColorB + " but was: " + B.GetText + Else + if ColorC <> C.GetText then Warnlog "Wrong C-Color. Should be: " + ColorC + " but was: " + C.GetText + if ColorM <> M.GetText then Warnlog "Wrong M-Color. Should be: " + ColorM + " but was: " + M.GetText + if ColorY <> Y.GetText then Warnlog "Wrong J-Color. Should be: " + ColorY + " but was: " + Y.GetText + if ColorK <> K.GetText then Warnlog "Wrong N-Color. Should be: " + ColorK + " but was: " + K.GetText + End if + if ColorR <> R.GetText then Warnlog "Wrong R-Color. Should be: " + ColorR + " but was: " + R.GetText + if ColorG <> G.GetText then Warnlog "Wrong G-Color. Should be: " + ColorG + " but was: " + G.GetText + if ColorB <> B.GetText then Warnlog "Wrong B-Color. Should be: " + ColorB + " but was: " + B.GetText + Else + if ColorC <> C.GetText then Warnlog "Wrong C-Color. Should be: " + ColorC + " but was: " + C.GetText + if ColorM <> M.GetText then Warnlog "Wrong M-Color. Should be: " + ColorM + " but was: " + M.GetText + if ColorY <> Y.GetText then Warnlog "Wrong Y-Color. Should be: " + ColorY + " but was: " + Y.GetText + if ColorK <> K.GetText then Warnlog "Wrong K-Color. Should be: " + ColorK + " but was: " + K.GetText + End if + end select + + Kontext + Active.setpage TabFarbverlaeufe + Kontext "TabFarbverlaeufe" + + GradientsType = Typ.GetItemText + GradientsCenterX = ZentrumX.GetText + GradientsCenterZ = ZentrumY.GetText + GradientsAngle = Winkel.GetText + GradientsBorder = Rand.GetText + GradientsFromColor = Von.GetItemText + GradientsFromValue = VonWert.GetText + GradientsToColor = Bis.GetItemText + GradientsToValue = BisWert.GetText + + Kontext + Active.setpage TabSchraffuren + Kontext "TabSchraffuren" + + HatchingDistance = Abstand.GetText + HatchingAngle = Winkel.GetText + 'Definition + HatchingLineType = Linientyp.GetSelText + HatchingLineColor = Linienfarbe.GetSelText + HatchingLineTable = Tabelle.GetItemText + + Kontext + Active.setpage TabBitmap + Kontext "TabBitmap" + + BitmapForeground = Vordergrund.GetSelText + BitmapBackground = Hintergrund.GetSelText + BitmapTable = Tabelle.GetSelText + + Kontext + Active.setpage TabArea + Kontext "TabArea" + TabArea.Cancel + + SetKontextApplication + + printlog "Check_Colors_Borders_Attributes Ends" + + Printlog "End of one application" + + + '---------------------------------- Set the Kontext to the current Application ----------------------------------' 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: DocumentImpress" - sleep 1 - Case "WRITER" - Kontext "DocumentWriter" - ' Printlog "gApplication / Kontext is now: DocumentWriter" - sleep 1 - Case "CALC" - Kontext "DocumentCalc" - ' Printlog "gApplication / Kontext is now: DocumentCalc" - sleep 1 - end select + Select Case gApplication + Case "DRAW" + Kontext "DocumentDraw" + ' Printlog "gApplication / Kontext is now: DocumentDraw" + sleep 1 + Case "IMPRESS" + Kontext "DocumentImpress" + ' Printlog "gApplication / Kontext is now: DocumentImpress" + sleep 1 + Case "WRITER" + Kontext "DocumentWriter" + ' Printlog "gApplication / Kontext is now: DocumentWriter" + sleep 1 + Case "CALC" + Kontext "DocumentCalc" + ' Printlog "gApplication / Kontext is now: DocumentCalc" + sleep 1 + end select sleep 1 - + end sub '------------------------- Part with "create new windows" --------------------- sub New_Draw - printlog "Copied object from application: " + FromApp2 '/// Since the first application is Draw by default, we'll skip that one. ///' - gApplication = "DRAW" - ToApp = "DRAW" - printlog "to app has changed to: " + gApplication - Call hNewDocument - SetKontextApplication - + gApplication = "DRAW" + ToApp = "DRAW" + printlog "to app has changed to: " + gApplication + Call hNewDocument + SetKontextApplication + end sub '------------------------------------------------------------------------------- sub New_Impress - printlog "Copied object from application: " + FromApp2 - gApplication = "IMPRESS" - ToApp = "IMPRESS" - printlog "to app has changed to: " + gApplication - Call hNewDocument - SetKontextApplication - + printlog "Copied object from application: " + FromApp2 + gApplication = "IMPRESS" + ToApp = "IMPRESS" + printlog "to app has changed to: " + gApplication + Call hNewDocument + SetKontextApplication + end sub '------------------------------------------------------------------------------- sub New_Calc - printlog "Copied object from application: " + FromApp2 - gApplication = "CALC" - ToApp = "CALC" - printlog "to app has changed to: " + gApplication - Call hNewDocument - SetKontextApplication - + printlog "Copied object from application: " + FromApp2 + gApplication = "CALC" + ToApp = "CALC" + printlog "to app has changed to: " + gApplication + Call hNewDocument + SetKontextApplication + end sub '------------------------------------------------------------------------------- sub New_Writer - printlog "Copied object from application: " + FromApp2 - gApplication = "WRITER" - ToApp = "WRITER" - printlog "to app has changed to: " + gApplication - Call hNewDocument - SetKontextApplication - + printlog "Copied object from application: " + FromApp2 + gApplication = "WRITER" + ToApp = "WRITER" + printlog "to app has changed to: " + gApplication + Call hNewDocument + SetKontextApplication + end sub '------------------------------------------------------------------------------- sub Choose_Toapplication - '/// Close the application / switch to the next - - For ToAppCounter = 1 to 4 - - Select case ToAppCounter - case "1" : Call hCloseDocument - printlog "to app: " + gApplication ' Since the first application is Draw by default, we'll skip that one. - ToApp = "DRAW" - case "2" : Call hCloseDocument - gApplication = "IMPRESS" - printlog "to app: " + gApplication - ToApp = "IMPRESS" - case "3" : Call hCloseDocument - gApplication = "CALC" - printlog "to app: " + gApplication - ToApp = "CALC" - case "4" : Call hCloseDocument - gApplication = "WRITER" - printlog "to app: " + gApplication - ToApp = "WRITER" - case else : goto endsub - End select + + For ToAppCounter = 1 to 4 + + Select case ToAppCounter + case "1" : Call hCloseDocument + printlog "to app: " + gApplication ' Since the first application is Draw by default, we'll skip that one. + ToApp = "DRAW" + case "2" : Call hCloseDocument + gApplication = "IMPRESS" + printlog "to app: " + gApplication + ToApp = "IMPRESS" + case "3" : Call hCloseDocument + gApplication = "CALC" + printlog "to app: " + gApplication + ToApp = "CALC" + case "4" : Call hCloseDocument + gApplication = "WRITER" + printlog "to app: " + gApplication + ToApp = "WRITER" + case else : goto endsub + End select next ToAppCounter - '/// Open second application ///' - Call hNewDocument + Call hNewDocument SetKontextApplication - + end sub '-------------------------------------------------------------------------------------------------------- diff --git a/testautomation/graphics/optional/includes/global/g_convertto.inc b/testautomation/graphics/optional/includes/global/g_convertto.inc index 50b4a418c504..dd373d1db08a 100755 --- a/testautomation/graphics/optional/includes/global/g_convertto.inc +++ b/testautomation/graphics/optional/includes/global/g_convertto.inc @@ -1,7 +1,7 @@ 'encoding UTF-8 Do not remove or change this line! '************************************************************************** '* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. -'* +'* '* Copyright 2008 by Sun Microsystems, Inc. '* '* OpenOffice.org - a multi-platform office productivity suite @@ -58,302 +58,257 @@ ' Call tdContextConvertIntoMetaFile testcase tiModifyConvertToPolygon - Dim PosX as string - Dim PosY as string - Dim Maxanzahl as string - Dim Minanzahl as string + Dim PosX as string + Dim PosY as string + Dim Maxanzahl as string + Dim Minanzahl as string - Call hNewDocument - sleep 3 - hTextrahmenErstellen ("This is a text that will be transformed into a Polygon-object", 10,10,60,30) - sleep 1 - hTypeKeys "" - sleep 1 - EditSelectAll - sleep 1 - ContextConvertIntoPolygon - sleep 1 - ContextPositionAndSize - Kontext - Active.SetPage TabPositionAndSize - Kontext "TabPositionAndSize" - PosX = Width.GetText - PosY = Height.GetText - TabPositionAndSize.OK - sleep 1 - FormatCharacter - Kontext - Active.SetPage TabFont - Kontext "TabFont" - sleep 1 - try - Size.SetText "96" - catch - if (gAsianSup OR gCTLSup) then + Call hNewDocument + sleep 3 + hTextrahmenErstellen ("This is a text that will be transformed into a Polygon-object", 10,10,60,30) + sleep 1 + hTypeKeys "" + sleep 1 + EditSelectAll + sleep 1 + ContextConvertIntoPolygon + sleep 1 + ContextPositionAndSize + Kontext + Active.SetPage TabPositionAndSize + Kontext "TabPositionAndSize" + PosX = Width.GetText + PosY = Height.GetText + TabPositionAndSize.OK + sleep 1 + FormatCharacter + Kontext + Active.SetPage TabFont + Kontext "TabFont" + sleep 1 + try + Size.SetText "96" + catch + if (gAsianSup OR gCTLSup) then try - SizeWest.SetText "96" + SizeWest.SetText "96" catch - Warnlog "Asian or ctl support is enabled, but Size of font is not accessable :-(" + Warnlog "Asian or ctl support is enabled, but Size of font is not accessable :-(" endcatch - else + else Warnlog "Asian or ctl support is NOT enabled, but Size of font is not accessable :-(" try - SizeWest.SetText "96" - qaErrorLog "SizeWest. works" + SizeWest.SetText "96" + qaErrorLog "SizeWest. works" catch endcatch try - SizeEast.SetText "96" - qaErrorLog "SizeEast. works" + SizeEast.SetText "96" + qaErrorLog "SizeEast. works" catch endcatch try - Size.SetText "96" - qaErrorLog "Size. works" + Size.SetText "96" + qaErrorLog "Size. works" catch endcatch try - SizeCTL.SetText "96" - qaErrorLog "SizeCTL. works" + SizeCTL.SetText "96" + qaErrorLog "SizeCTL. works" catch endcatch - endif - endcatch - TabFont.OK - sleep 1 - ContextPositionAndSize - Kontext - Active.SetPage TabPositionAndSize - Kontext "TabPositionAndSize" - '/// compare width and heigth to control is it is still text ///' - if ( Width.GetText = PosX or Height.GetText = PosY ) Then - Printlog "- Text converted into polygon" - else - Warnlog "- Convert into polygon does not work." - end if - TabPositionAndSize.OK - sleep 1 + endif + endcatch + TabFont.OK + sleep 1 + ContextPositionAndSize + Kontext + Active.SetPage TabPositionAndSize + Kontext "TabPositionAndSize" + if ( Width.GetText = PosX or Height.GetText = PosY ) Then + Printlog "- Text converted into polygon" + else + Warnlog "- Convert into polygon does not work." + end if + TabPositionAndSize.OK + sleep 1 Call hCloseDocument - Printlog "-------------------------------------------------end" + Printlog "-------------------------------------------------end" - Call hNewDocument - sleep 3 - '/// insert graphic (input\\impress\\grafik\\sample.bmp)///' - Call hGrafikEinfuegen ConvertPath ( gTesttoolPath + "global\input\graf_inp\enter.bmp" ) - sleep 3 - ContextConvertIntoPolygon - Kontext "UmwandelnInPolygon" - Farbanzahl.ToMax - MaxAnzahl = Farbanzahl.GetText - Farbanzahl.More 1 - If Maxanzahl < Farbanzahl.GetText Then Warnlog "- Maximum value could be raised." - Farbanzahl.ToMin '/// set color to min ///' - MinAnzahl = Farbanzahl.GetText - Farbanzahl.Less 1 '/// try to set a value lower than minimum ///' - If Farbanzahl.GetText < Minanzahl then Warnlog "- Minimum value could be lowered." - Farbanzahl.SetText "2" - Vorschau.Click - sleep 5 - UmwandelnInPolygon.OK - sleep 5 - Printlog "- object vectorized." - 'TBO: verify nasty bug about asian/ctl support - ToolsOptions - call hToolsOptions ("Languagesettings", "Languages") - printlog "Asian: '" + Aktivieren.IsChecked + "'" - printlog "CTL : '" + ComplexScriptEnabled.IsChecked + "'" - Kontext "ExtrasOptionenDlg" - ExtrasOptionenDlg.OK - '----------------------------------------------- - Call hCloseDocument + Call hNewDocument + sleep 3 + Call hGrafikEinfuegen ConvertPath ( gTesttoolPath + "global\input\graf_inp\enter.bmp" ) + sleep 3 + ContextConvertIntoPolygon + Kontext "UmwandelnInPolygon" + Farbanzahl.ToMax + MaxAnzahl = Farbanzahl.GetText + Farbanzahl.More 1 + If Maxanzahl < Farbanzahl.GetText Then Warnlog "- Maximum value could be raised." + MinAnzahl = Farbanzahl.GetText + If Farbanzahl.GetText < Minanzahl then Warnlog "- Minimum value could be lowered." + Farbanzahl.SetText "2" + Vorschau.Click + sleep 5 + UmwandelnInPolygon.OK + sleep 5 + Printlog "- object vectorized." + 'TBO: verify nasty bug about asian/ctl support + ToolsOptions + call hToolsOptions ("Languagesettings", "Languages") + printlog "Asian: '" + Aktivieren.IsChecked + "'" + printlog "CTL : '" + ComplexScriptEnabled.IsChecked + "'" + Kontext "ExtrasOptionenDlg" + ExtrasOptionenDlg.OK + '----------------------------------------------- + Call hCloseDocument endcase testcase tdContextConvertIntoBitmap - Call hNewDocument '/// new document ///' - sleep 3 - InsertGraphicsFromFile '/// insert graphic ///' - sleep 3 - kontext "Active" + sleep 3 + sleep 3 + kontext "Active" + if Active.Exists Then + Active.OK + end if + sleep 5 + Kontext "GrafikEinfuegenDlg" + sleep 2 + Dateiname.SetText ConvertPath (gTesttoolPath + "global\input\graf_inp\columbia.dxf") + sleep 2 + Oeffnen.Click + sleep 2 + Kontext "Active" if Active.Exists Then - Active.OK + Warnlog Active.GetText + ", Test will end here because of problems putting graphics into the document" + Active.OK + sleep 2 + Call hCloseDocument + goto endsub end if - sleep 5 - Kontext "GrafikEinfuegenDlg" - sleep 2 -'/// uses input\\impress\\grafik\\columbia.dxf /// - Dateiname.SetText ConvertPath (gTesttoolPath + "global\input\graf_inp\columbia.dxf") - sleep 2 - Oeffnen.Click - sleep 2 - Kontext "Active" - if Active.Exists Then - Warnlog Active.GetText + ", Test will end here because of problems putting graphics into the document" - Active.OK - sleep 2 - Call hCloseDocument - goto endsub - end if - Kontext "DocumentImpress" - try - ContextConvertIntoBitmap '/// convert dxf file to bitmap ///' + Kontext "DocumentImpress" + try sleep 1 Printlog "- Convert into bitmap works" - catch + catch Warnlog "- Convert into bitmap does not work" - endcatch - sleep 2 - Call hCloseDocument '/// close document ///' + endcatch + sleep 2 endcase testcase tiAendernUmwandelnInKurve Printlog " ----- ContextConvertIntoCurve testen" - Call hNewDocument '/// New impress document///' - Call hTextrahmenErstellen ("I test,test,test,test only, if it works for you",20,20,60,30) '/// create textbox///' - sleep 2 - Kontext "DocumentImpress" - gMouseDoubleClick 70,70 '/// deselect textbox ///' - sleep 2 - EditSelectAll '/// select textbox ///' - sleep 2 - ContextConvertIntoCurve '/// convert into curve ///' - sleep 3 - gMouseClick 30,15 + sleep 2 + Kontext "DocumentImpress" + sleep 2 + sleep 2 + sleep 3 + gMouseClick 30,15 - hTypeKeys "",3 '/// try to select 3 letters ///' - try - EditCopy '/// try edit copy to check if its still text ///' + try Warnlog " - Convert into curve, seperate letters should not be selectable anymore" - catch + catch Printlog " - Text converted into a curve" - endcatch + endcatch - Call hCloseDocument '/// close document ///' endcase testcase tiAendernUmwandelnInPolygonGrafik Printlog "- Context/ConvertIntoPolygon" - Call hNewDocument '/// new document ///' - InsertGraphicsFromFile '/// insert graphic (desp.bmp) ///' - Kontext "GrafikEinfuegenDlg" - '///use graphic : input\\impress\\grafik\\desp.bmp /// - Dateiname.SetText ConvertPath ( gTesttoolPath + "global\input\graf_inp\desp.bmp" ) - Oeffnen.Click - sleep 3 - Kontext "DocumentImpress" - EditSelectAll - sleep 1 + Kontext "GrafikEinfuegenDlg" + Dateiname.SetText ConvertPath ( gTesttoolPath + "global\input\graf_inp\desp.bmp" ) + Oeffnen.Click + sleep 3 + Kontext "DocumentImpress" + EditSelectAll + sleep 1 - ContextConvertIntoPolygon '/// convert into polygon ///' - Kontext "UmwandelnInPolygon" - Printlog "- Testing vectorize dialog" - Farbanzahl.ToMax '/// set number of colors to max ///' - if Farbanzahl.GetText <> "32" Then Warnlog "- Maximum value for color depth should be 32, but it is: " + Farbanzahl.GetText - Farbanzahl.ToMin '/// set number of colors to min ///' - sleep 1 - if Farbanzahl.GetText <> "8" Then Warnlog "- Minimum value for color depth should be 8 but it is: " + Farbanzahl.GetText - sleep 2 - Punktreduktion.SetText "50" '/// set point reduction to 50 ///' - sleep 2 - if Punktreduktion.GetText <> "32 Pixel" Then Warnlog "- Maximum value should be 32, but it is: " + Punktreduktion.GetText - sleep 1 - Punktreduktion.SetText "-50" '/// set an out of range value ///' - sleep 1 - if Punktreduktion.GetText <> "0 Pixel" Then Warnlog "- Minimum value should be 0, but it is: " + Punktreduktion.GetText - Loecherfuellen.Uncheck '/// uncheck fill holes ///' - if Not Kachelgroesse.IsEnabled Then - Printlog "- Control disabled." - else - Warnlog "- Control should be disabled if Fill is not checked." - end if - Vorschau.Click '/// open preview ///' - sleep 2 - UmwandelnInPolygon.OK '/// close dialog ///' - sleep 5 - Call hCloseDocument '/// close document ///' + Kontext "UmwandelnInPolygon" + Printlog "- Testing vectorize dialog" + if Farbanzahl.GetText <> "32" Then Warnlog "- Maximum value for color depth should be 32, but it is: " + Farbanzahl.GetText + sleep 1 + if Farbanzahl.GetText <> "8" Then Warnlog "- Minimum value for color depth should be 8 but it is: " + Farbanzahl.GetText + sleep 2 + sleep 2 + if Punktreduktion.GetText <> "32 Pixel" Then Warnlog "- Maximum value should be 32, but it is: " + Punktreduktion.GetText + sleep 1 + sleep 1 + if Punktreduktion.GetText <> "0 Pixel" Then Warnlog "- Minimum value should be 0, but it is: " + Punktreduktion.GetText + if Not Kachelgroesse.IsEnabled Then + Printlog "- Control disabled." + else + Warnlog "- Control should be disabled if Fill is not checked." + end if + sleep 2 + sleep 5 endcase testcase tiAendernUmwandelnIn3D Printlog "- Convert into 3D" - Call hNewDocument - sleep 1 '/// new impress document ///' - hRechteckErstellen (10,10,40,40) '/// create rectangle ///' - '/// convert into 3D ///' - sleep 2 - gMouseclick 35,35 - sleep 1 - try - ContextConvertInto3D '/// try to access convert ito 3d a 2nd time, should be impossible using a 3d object as source ///' - Printlog "- Convert into 3D works" - catch - Warnlog "- Convert into 3D does not work" - endcatch - Call hCloseDocument '/// close document '/// + Call hNewDocument + sleep 2 + gMouseclick 35,35 + sleep 1 + try + Printlog "- Convert into 3D works" + catch + Warnlog "- Convert into 3D does not work" + endcatch endcase testcase tiAendernUmwandelnIn3DRotationskoerper Printlog "- ConvertInto3DRotationobject" - Dim PosX - Dim PosY + Dim PosX + Dim PosY - Call hNewDocument '/// new document '/// - Kontext "DocumentImpress" - hRechteckErstellen (20,20,50,50) '/// create rectangle ///' - sleep 1 - ContextPositionAndSize '/// get position values for the rectangle ///' - Kontext - Active.SetPage TabPositionAndSize - Kontext "TabPositionAndSize" - PosX = PositionX.GetText - PosY = PositionY.GetText - TabPositionAndSize.OK - sleep 1 - Kontext "DocumentImpress" - ContextConvertInto3DRotationObject '/// convert into 3d lathe object ///' - sleep 2 - ContextPositionAndSize - Kontext - Active.SetPage TabPositionAndSize '/// control changes in position values to confirm convert action ///' - Kontext "TabPositionAndSize" - if PositionX.GetText = PosX and PositionY.GetText = PosY Then Warnlog "- No change in position or dimension, converting seemd not to work" - TabPositionAndSize.OK - sleep 1 - Call hCloseDocument '/// close document ///' + Kontext "DocumentImpress" + sleep 1 + Kontext + Active.SetPage TabPositionAndSize + Kontext "TabPositionAndSize" + PosX = PositionX.GetText + PosY = PositionY.GetText + TabPositionAndSize.OK + sleep 1 + Kontext "DocumentImpress" + sleep 2 + ContextPositionAndSize + Kontext + Kontext "TabPositionAndSize" + if PositionX.GetText = PosX and PositionY.GetText = PosY Then Warnlog "- No change in position or dimension, converting seemd not to work" + TabPositionAndSize.OK + sleep 1 endcase testcase tiAendernUmwandelnInMetaFile Printlog "- ConvertIntoMetaFile" - Call hNewDocument '/// new document ///' - sleep 3 - InsertGraphicsFromFile '/// insert graphic ///' - sleep 1 - kontext "Active" - sleep 1 + sleep 3 + sleep 1 + kontext "Active" + sleep 1 if Active.Exists Then - Active.OK + Active.OK end if sleep 1 - Kontext "GrafikEinfuegenDlg" - sleep 2 -'/// uses input\\impress\\grafik\\desp.gif") /// - Dateiname.SetText ConvertPath (gTesttoolPath + "global\input\graf_inp\purzel.gif") - sleep 2 - Oeffnen.Click - sleep 5 - Kontext "DocumentImpress" - try - ContextConvertIntoMetafile '/// convert bitmap into metafile ///' + Kontext "GrafikEinfuegenDlg" + sleep 2 + Dateiname.SetText ConvertPath (gTesttoolPath + "global\input\graf_inp\purzel.gif") + sleep 2 + Oeffnen.Click + sleep 5 + Kontext "DocumentImpress" + try sleep 2 Printlog "- Convert into Metafile does work" - catch + catch Warnlog "- Convert into Metafile does not work" - endcatch - sleep 2 - Call hCloseDocument '/// close document ///' + endcatch + sleep 2 endcase diff --git a/testautomation/graphics/optional/includes/global/g_crossfading.inc b/testautomation/graphics/optional/includes/global/g_crossfading.inc index ad65c0ad2ca6..4872c3671d35 100755 --- a/testautomation/graphics/optional/includes/global/g_crossfading.inc +++ b/testautomation/graphics/optional/includes/global/g_crossfading.inc @@ -1,7 +1,7 @@ 'encoding UTF-8 Do not remove or change this line! '************************************************************************** '* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. -'* +'* '* Copyright 2008 by Sun Microsystems, Inc. '* '* OpenOffice.org - a multi-platform office productivity suite @@ -40,233 +40,153 @@ '\************************************************************************************* testcase tCrossfading - dim X as integer - dim Z as integer - dim Y as integer - dim I as integer - dim CheckX as integer - dim FirstX as integer - dim CounterForX as integer - dim anothercounter as integer + dim X as integer + dim Z as integer + dim Y as integer + dim I as integer + dim CheckX as integer + dim FirstX as integer + dim CounterForX as integer + dim anothercounter as integer - Call hNewDocument '/// New Impress document ///' gMouseClick 50,50 - sleep 1 - Call hRechteckErstellen ( 5, 5, 20, 30 ) '/// Create rectangle ///' - gMouseClick 90,90 - Call hRechteckErstellen ( 30, 30, 70, 70 ) '/// create rectangle ///' - sleep 1 - EditSelectAll '/// Select all ///' - sleep 1 - EditCrossFading '/// Choose Edit / CrossFading ///' - kontext "Ueberblenden" -X = Schritte.GetText ' /// Get counter-value and save it in X ///' -printlog "Steps before we start the test: " + X -printlog "Schritte.GetText= " + Schritte.GetText - -Schritte.ToMin -if Schritte.GetText <> "1" then qaerrorlog "Could not change the step-number to 1." - - for I = 2 to 10 ' /// How many steps do you want? ///' - Schritte.More 1 - if Schritte.GetText <> I then qaerrorlog "Could not change the step-number to" + I - Ueberblenden.OK - sleep 1 - try -FormatUngroupDraw '/// open context menu and ungroup objects ///' - catch - qaerrorlog "Could not ungroup objects" - endcatch - sleep 1 - hTypeKeys "" '/// Should make the first object active ///' - -'/// Get position and dimensions of elements ///' - try - ContextPositionAndSize - catch - qaerrorlog "Couldnt call 'ContextPositionAndSize' - No object selected?" - endcatch - kontext - active.SetPage TabPositionAndSize - sleep 1 - kontext "TabPositionAndSize" - if TabPositionAndSize.exists (5) then - CounterForX=0 - CheckX=0 - FirstX=PositionX.GetText '/// Tet Dimensions of first object ///' - TabPositionAndSize.OK - else - qaerrorlog "Couldn't switch tab page :-( " - endif - - -anothercounter = I+2 '/// How many objects we have on the screen ///' - - for Y = 1 to anothercounter '/// How many times we should step to (hopefully) get back to the first one ///' - if Y > anothercounter then warnlog "Too many steps, something is wrong." - try - hTypeKeys "" '/// Step to the next object ///' - catch - errolog "Could not step to the next object" - endcatch -' Printlog "- Get position and dimensions of elements" - ContextPositionAndSize '/// Open Position and Size for this object ///' - sleep 1 - Kontext - Active.SetPage TabPositionAndSize - Kontext "TabPositionAndSize" - CheckX=PositionX.GetText '/// Get Position X for this object ///' - sleep 1 - TabPositionAndSize.OK - Kontext "DocumentDraw" - CounterForX=CounterForX+1 '/// Up one on the object-counter ///' - if CheckX=FirstX then '/// Check if Position is the same as the first one ///' - if anothercounter = CounterForX then printlog "The first box is at: " + CheckX + " And we're now at " + FirstX + " = Correct steps between the objects, everything's fine." - printlog "We should have " + Y + " objects to go through." '/// Just here for debugging. - FHA -' printlog "anothercounter= " + anothercounter '/// Just here for debugging. - FHA - printlog "Number of objects: " + anothercounter - printlog "" - endif - next Y '/// End or go on with the checking-loop ///' - - EditSelectAll '/// Select all ///' - EditDelete '/// Delete all ///' - sleep 1 - Call hRechteckErstellen ( 5, 5, 20, 30 ) '/// Create rectangle ///' + sleep 1 gMouseClick 90,90 - Call hRechteckErstellen ( 30, 30, 70, 70 ) '/// Create rectangle ///' sleep 1 - EditSelectAll '/// Select all ///' sleep 1 - EditCrossFading '/// Choose Edit / CrossFading ///' - sleep 2 - kontext "Ueberblenden" - next I - -'/// And now we're gonna check if we can separate the object into it's parts ///' -'/// And check if the numbers of steps / objects is correct ///' - -Schritte.ToMin '/// Select minimum value for number of steps ///' -for Z = 1 to X -1 -Schritte.More '/// Raise the value for number of steps with one ///' -next Z -printlog "Value has been restored to: " + Schritte.GetText -printlog "X is now: " + X - Attributierung.UnCheck - Ueberblenden.OK - sleep 1 - Kontext "DocumentDraw" - EditSelectAll '/// Select all ///' - EditDelete '/// Delete all ///' - sleep 1 - Call hRechteckErstellen ( 5, 5, 20, 30 ) '/// Create rectangle ///' - gMouseClick 90,90 - Call hRechteckErstellen ( 30, 30, 70, 70 ) '/// Create second rectangle ///' - EditSelectAll '/// Select all ///' - sleep 1 - EditCrossFading '/// Choose Edit / CrossFading ///' - Kontext "Ueberblenden" - if Attributierung.IsChecked = TRUE then qaerrorlog "Attributierung / was NOT unchecked." - GleicheOrientierung.UnCheck '/// Uncheck "same orienation" ///' -???? - Ueberblenden.OK '/// Close CrossFading-window with "OK" ///' - sleep 1 - Kontext "DocumentDraw" - EditSelectAll '/// Select all ///' - EditDelete '/// Delete all ///' - sleep 1 - Call hRechteckErstellen ( 5, 5, 20, 30 ) '/// Create rectangle ///' - gMouseClick 90,90 - Call hRechteckErstellen ( 30, 30, 70, 70 ) '/// create rectangle ///' - EditSelectAll '/// Select all ///' - sleep 1 - EditCrossFading '/// Choose Edit / CrossFading ///' - Kontext "Ueberblenden" - if GleicheOrientierung.IsChecked = TRUE then qaerrorlog "GleicheOrientierung / was NOT unchecked." - Attributierung.Check '/// Check "Attributing" ///' - ??? - Ueberblenden.OK '/// Close CrossFading-window with "OK" ///' - sleep 1 - Kontext "DocumentDraw" - EditSelectAll '/// Select all ///' - sleep 1 - EditDelete '/// Delete all ///' - sleep 1 - Call hRechteckErstellen ( 5, 5, 20, 30 ) '/// Create rectangle ///' - gMouseClick 90,90 - Call hRechteckErstellen ( 30, 30, 70, 70 ) '/// Create second rectangle ///' - EditSelectAll '/// Select all ///' - sleep 1 - EditCrossFading '/// Choose Edit / CrossFading ///' - Kontext "Ueberblenden" - if Attributierung.IsChecked = FALSE then qaerrorlog "Attributierung / was NOT checked again." - GleicheOrientierung.UnCheck '/// Check "same orientation" ///' -???? - Ueberblenden.OK - sleep 1 - Kontext "DocumentDraw" - EditSelectAll '/// Select all ///' - EditDelete '/// Delete all ///' - sleep 1 - Call hRechteckErstellen ( 5, 5, 20, 30 ) '/// Create rectangle ///' - gMouseClick 90,90 - Call hRechteckErstellen ( 30, 30, 70, 70 ) '/// create rectangle ///' - EditSelectAll '/// Select all ///' - sleep 1 - EditCrossFading '/// Choose Edit / CrossFading ///' - Kontext "Ueberblenden" - if GleicheOrientierung.IsChecked = TRUE then qaerrorlog "GleicheOrientierung / was NOT checked again." - GleicheOrientierung.Check '/// Check "same orientation" ///' -???? - Ueberblenden.OK '/// Close CrossFading-window with "OK" ///' - sleep 1 - Kontext "DocumentDraw" - EditSelectAll '/// Select all ///' - EditDelete '/// Delete all ///' - Call hRechteckErstellen ( 5, 5, 20, 30 ) '/// Create rectangle ///' - gMouseClick 90,90 - Call hRechteckErstellen ( 30, 30, 70, 70 ) '/// create rectangle ///' - EditSelectAll '/// Select all ///' - sleep 1 - EditCrossFading '/// Choose Edit / CrossFading ///' - Kontext "Ueberblenden" - if GleicheOrientierung.IsChecked = FALSE then qaerrorlog "GleicheOrientierung / was NOT checked again." - GleicheOrientierung.Check '/// Check "same orientation" ///' -???? - Ueberblenden.OK '/// Close CrossFading-window with "OK" ///' - sleep 1 - - Kontext "DocumentDraw" '/// EditCrossFading should not be enabled if more than two objects is selected. ///' - EditSelectAll '/// Select all ///' - EditDelete '/// Delete all ///' - - sleep 1 - Call hRechteckErstellen ( 5, 5, 20, 30 ) '/// Create rectangle ///' - gMouseClick 90,90 - Call hRechteckErstellen ( 30, 30, 70, 70 ) '/// Create second rectangle ///' - gMouseClick 90,90 - Call hRechteckErstellen ( 20, 20, 50, 50 ) '/// Create third rectangle ///' - sleep 1 - EditSelectAll '/// Select all ///' - sleep 1 -try - EditCrossFading '/// Choose Edit / CrossFading ///' - sleep 2 - If active = "Ueberblenden" then - qaerrorlog "CrossFading should NOT be selectable since more than two objects is selected." - kontext "Ueberblenden" - Ueberblenden.CANCEL '/// Close CrossFading-window with "CANCEL" ///' - endif - sleep 2 - Kontext "DocumentDraw" -catch - printlog "CrossFading could not be selected when more than two objects selected: Correct." -endcatch - -try - EditSelectAll '/// Select all ///' - EditDelete '/// Delete all ///' -catch - warnlog "Could not select and delete all objects." -endcatch - -printlog "End of test" + kontext "Ueberblenden" + X = Schritte.GetText ' /// Get counter-value and save it in X ///' + printlog "Steps before we start the test: " + X + printlog "Schritte.GetText= " + Schritte.GetText + + Schritte.ToMin + if Schritte.GetText <> "1" then qaerrorlog "Could not change the step-number to 1." + + for I = 2 to 10 ' /// How many steps do you want? ///' + Schritte.More 1 + if Schritte.GetText <> I then qaerrorlog "Could not change the step-number to" + I + Ueberblenden.OK + sleep 1 + try + catch + qaerrorlog "Could not ungroup objects" + endcatch + sleep 1 + + try + ContextPositionAndSize + catch + qaerrorlog "Couldnt call 'ContextPositionAndSize' - No object selected?" + endcatch + kontext + active.SetPage TabPositionAndSize + sleep 1 + kontext "TabPositionAndSize" + if TabPositionAndSize.exists (5) then + CounterForX=0 + CheckX=0 + TabPositionAndSize.OK + else + qaerrorlog "Couldn't switch tab page :-( " + endif + + + + if Y > anothercounter then warnlog "Too many steps, something is wrong." + try + catch + errolog "Could not step to the next object" + endcatch + ' Printlog "- Get position and dimensions of elements" + sleep 1 + Kontext + Active.SetPage TabPositionAndSize + Kontext "TabPositionAndSize" + sleep 1 + TabPositionAndSize.OK + Kontext "DocumentDraw" + if anothercounter = CounterForX then printlog "The first box is at: " + CheckX + " And we're now at " + FirstX + " = Correct steps between the objects, everything's fine." + printlog "Number of objects: " + anothercounter + printlog "" + endif + + sleep 1 + gMouseClick 90,90 + sleep 1 + sleep 1 + sleep 2 + kontext "Ueberblenden" + next I + + + for Z = 1 to X -1 + next Z + printlog "Value has been restored to: " + Schritte.GetText + printlog "X is now: " + X + Attributierung.UnCheck + Ueberblenden.OK + sleep 1 + Kontext "DocumentDraw" + sleep 1 + gMouseClick 90,90 + sleep 1 + Kontext "Ueberblenden" + if Attributierung.IsChecked = TRUE then qaerrorlog "Attributierung / was NOT unchecked." + sleep 1 + Kontext "DocumentDraw" + sleep 1 + gMouseClick 90,90 + sleep 1 + Kontext "Ueberblenden" + if GleicheOrientierung.IsChecked = TRUE then qaerrorlog "GleicheOrientierung / was NOT unchecked." + sleep 1 + Kontext "DocumentDraw" + sleep 1 + sleep 1 + gMouseClick 90,90 + sleep 1 + Kontext "Ueberblenden" + if Attributierung.IsChecked = FALSE then qaerrorlog "Attributierung / was NOT checked again." + Ueberblenden.OK + sleep 1 + Kontext "DocumentDraw" + sleep 1 + gMouseClick 90,90 + sleep 1 + Kontext "Ueberblenden" + if GleicheOrientierung.IsChecked = TRUE then qaerrorlog "GleicheOrientierung / was NOT checked again." + sleep 1 + Kontext "DocumentDraw" + gMouseClick 90,90 + sleep 1 + Kontext "Ueberblenden" + if GleicheOrientierung.IsChecked = FALSE then qaerrorlog "GleicheOrientierung / was NOT checked again." + sleep 1 + + + sleep 1 + gMouseClick 90,90 + gMouseClick 90,90 + sleep 1 + sleep 1 + try + sleep 2 + If active = "Ueberblenden" then + qaerrorlog "CrossFading should NOT be selectable since more than two objects is selected." + kontext "Ueberblenden" + endif + sleep 2 + Kontext "DocumentDraw" + catch + printlog "CrossFading could not be selected when more than two objects selected: Correct." + endcatch + + try + catch + warnlog "Could not select and delete all objects." + endcatch + + printlog "End of test" - Call hCloseDocument '/// Close document ///' endcase diff --git a/testautomation/graphics/optional/includes/global/g_customshapes.inc b/testautomation/graphics/optional/includes/global/g_customshapes.inc index 11383ea62fb2..575b131e61d7 100755 --- a/testautomation/graphics/optional/includes/global/g_customshapes.inc +++ b/testautomation/graphics/optional/includes/global/g_customshapes.inc @@ -1,7 +1,7 @@ 'encoding UTF-8 Do not remove or change this line! '************************************************************************** '* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. -'* +'* '* Copyright 2008 by Sun Microsystems, Inc. '* '* OpenOffice.org - a multi-platform office productivity suite @@ -41,812 +41,759 @@ '\******************************************************************** testcase tCustomshapes - dim counter as Integer - dim MakeInto3Dcounter as Integer + dim counter as Integer + dim MakeInto3Dcounter as Integer - '/// Create new document ///' - Call hNewDocument - if gApplication = "DRAW" then + Call hNewDocument + if gApplication = "DRAW" then Kontext "Documentdraw" - else '(Impress) + else '(Impress) Kontext "DocumentImpress" - endif - kontext "Toolbar" - sleep 1 - printlog "insert a Smiley." - '/// From the toolbar: Insert three objects: ///' - '/// insert a Smiley. ///' - kontext "Toolbar" - if Toolbar.Exists then + endif + kontext "Toolbar" + sleep 1 + printlog "insert a Smiley." + kontext "Toolbar" + if Toolbar.Exists then if Toolbar.IsVisible then - sleep 1 - try - SymbolShapes.TearOff - catch - warnlog "bug for GH from FHA; .tearoff doesnt tell success" - endcatch - sleep 1 - kontext "SymbolShapes" - SymbolShapesSmiley.Click - sleep 1 - - gMouseDown (40,40) - gMouseMove (40,40,60,60) - gMouseUp (60,60) - - sleep 1 - kontext "SymbolShapes" - SymbolShapes.Close - - '/// Unmark all objects ///' - hTypeKeys "" - - '/// Mark the Smiley ///' - hTypeKeys "" - - printlog "Rename the object to 'First'." - '/// Rename the object to 'First' ///" - hOpenContextMenu - sleep 2 - '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 "First" - NameDlgObject.OK - - printlog "Set the object -Title/Description to 'SecondTitle' and 'SecondText'" - '/// Open the Context-menu and set the description of the object to 'First' ///" - hOpenContextMenu - sleep (2) - 'Choose "Description" - if hMenuFindSelect(27033, true, 14) = false then - Warnlog "Context-Menu-entry `Description` was not found. Therefore the test ends." - Call hCloseDocument - Goto Endsub - endif - kontext "DescriptionObject" - DescriptionTitle.SetText "FirstTitle" - DescriptionText.SetText "FirstText" - DescriptionObject.Ok + sleep 1 + try + SymbolShapes.TearOff + catch + warnlog "bug for GH from FHA; .tearoff doesnt tell success" + endcatch + sleep 1 + kontext "SymbolShapes" + SymbolShapesSmiley.Click + sleep 1 + + gMouseDown (40,40) + gMouseMove (40,40,60,60) + gMouseUp (60,60) + + sleep 1 + kontext "SymbolShapes" + SymbolShapes.Close + + hTypeKeys "" + + hTypeKeys "" + + printlog "Rename the object to 'First'." + hOpenContextMenu + sleep 2 + '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 "First" + NameDlgObject.OK + + printlog "Set the object -Title/Description to 'SecondTitle' and 'SecondText'" + hOpenContextMenu + sleep (2) + 'Choose "Description" + if hMenuFindSelect(27033, true, 14) = false then + Warnlog "Context-Menu-entry `Description` was not found. Therefore the test ends." + Call hCloseDocument + Goto Endsub + endif + kontext "DescriptionObject" + DescriptionTitle.SetText "FirstTitle" + DescriptionText.SetText "FirstText" + DescriptionObject.Ok else - warnlog "the Toolbar wasnt visible." + warnlog "the Toolbar wasnt visible." endif - else + else warnlog "the Toolbar didnt exist." - endif - gMouseClick 90, 90 + endif + gMouseClick 90, 90 - printlog "Insert a Triangle." - '/// Insert a Triangle ///' - kontext "Toolbar" - if Toolbar.Exists then + printlog "Insert a Triangle." + kontext "Toolbar" + if Toolbar.Exists then if Toolbar.IsVisible then - try - BasicShapes.TearOff - catch - warnlog "bug for GH from FHA; .tearoff doesnt tell success" - endcatch - kontext "BasicShapes" - sleep 1 - IsoscelesTriangle.click - sleep 1 - - gMouseDown (45,33) - gMouseMove (45,33,55,42) - gMouseUp (55,42) - sleep 1 - kontext "BasicShapes" - BasicShapes.Close - sleep 1 - - '/// Unmark all objects ///' - hTypeKeys "" - '/// Mark the Triangle ///' - hTypeKeys "", 2 - - printlog "Rename the object into 'Second'." - '/// Rename the object into 'Second'. ///' - hOpenContextMenu - sleep 2 - '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 - - sleep 1 - kontext "NameDlgObject" - NameField.SetText "Second" - NameDlgObject.OK - - printlog "Set the object -Title/Description to 'SecondTitle' and 'SecondText'." - '/// Open the Context-menu and set the description of the object to 'SecondTitle' and 'SecondText' ///" - hOpenContextMenu - sleep (2) - 'Choose "Description" - if hMenuFindSelect(27033, true, 14) = false then - Warnlog "Context-Menu-entry `Description` was not found. Therefore the test ends." - Call hCloseDocument - Goto Endsub - endif - kontext "DescriptionObject" - DescriptionTitle.SetText "SecondTitle" - DescriptionText.SetText "SecondText" - DescriptionObject.Ok - else - warnlog "the Toolbar wasnt visible." + try + BasicShapes.TearOff + catch + warnlog "bug for GH from FHA; .tearoff doesnt tell success" + endcatch + kontext "BasicShapes" + sleep 1 + IsoscelesTriangle.click + sleep 1 + + gMouseDown (45,33) + gMouseMove (45,33,55,42) + gMouseUp (55,42) + sleep 1 + kontext "BasicShapes" + BasicShapes.Close + sleep 1 + + hTypeKeys "" + hTypeKeys "", 2 + + printlog "Rename the object into 'Second'." + hOpenContextMenu + sleep 2 + '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 + + sleep 1 + kontext "NameDlgObject" + NameField.SetText "Second" + NameDlgObject.OK + + printlog "Set the object -Title/Description to 'SecondTitle' and 'SecondText'." + hOpenContextMenu + sleep (2) + 'Choose "Description" + if hMenuFindSelect(27033, true, 14) = false then + Warnlog "Context-Menu-entry `Description` was not found. Therefore the test ends." + Call hCloseDocument + Goto Endsub + endif + kontext "DescriptionObject" + DescriptionTitle.SetText "SecondTitle" + DescriptionText.SetText "SecondText" + DescriptionObject.Ok + else + warnlog "the Toolbar wasnt visible." endif - else + else warnlog "the Toolbar didnt exist." - endif - gMouseClick 90, 90 + endif + gMouseClick 90, 90 - printlog "Insert Thinking-cloud." - '/// Insert Thinking-cloud. ///' - kontext "Toolbar" - if Toolbar.Exists then + printlog "Insert Thinking-cloud." + kontext "Toolbar" + if Toolbar.Exists then if Toolbar.IsVisible then - sleep 1 - try - CalloutShapes.TearOff ' insert Thinking-cloud - catch - warnlog "bug for GH from FHA; .tearoff doesnt tell success" - endcatch - kontext "Callouts" - sleep 1 - Cloud.click - sleep 1 - - gMouseDown (1,1) - gMouseMove (1,1,35,30) - gMouseUp (35,30) - sleep 1 - - kontext "Callouts" - Callouts.Close - sleep 1 - - '/// Unmark all objects ///' - hTypeKeys "" - '/// Mark the cloud ///' - hTypeKeys "", 3 - - printlog "Rename the object to 'Third'." - '/// Rename the object to 'Third'. ///' - hOpenContextMenu - sleep 2 - '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 "Set the object -Title/Description to 'ThirdTitle' and 'ThirdText'." - '/// Open the Context-menu and set the description of the object to 'First' ///" - hOpenContextMenu - sleep (2) - 'Choose "Description" - if hMenuFindSelect(27033, true, 14) = false then - Warnlog "Context-Menu-entry `Description` was not found. Therefore the test ends." - Call hCloseDocument - Goto Endsub - endif - kontext "DescriptionObject" - DescriptionTitle.SetText "ThirdTitle" - DescriptionText.SetText "ThirdText" - DescriptionObject.Ok - else - warnlog "the Toolbar wasnt visible." + sleep 1 + try + CalloutShapes.TearOff ' insert Thinking-cloud + catch + warnlog "bug for GH from FHA; .tearoff doesnt tell success" + endcatch + kontext "Callouts" + sleep 1 + Cloud.click + sleep 1 + + gMouseDown (1,1) + gMouseMove (1,1,35,30) + gMouseUp (35,30) + sleep 1 + + kontext "Callouts" + Callouts.Close + sleep 1 + + hTypeKeys "" + hTypeKeys "", 3 + + printlog "Rename the object to 'Third'." + hOpenContextMenu + sleep 2 + '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 "Set the object -Title/Description to 'ThirdTitle' and 'ThirdText'." + hOpenContextMenu + sleep (2) + 'Choose "Description" + if hMenuFindSelect(27033, true, 14) = false then + Warnlog "Context-Menu-entry `Description` was not found. Therefore the test ends." + Call hCloseDocument + Goto Endsub + endif + kontext "DescriptionObject" + DescriptionTitle.SetText "ThirdTitle" + DescriptionText.SetText "ThirdText" + DescriptionObject.Ok + else + warnlog "the Toolbar wasnt visible." endif - else + else warnlog "the Toolbar didnt exist." - endif - gMouseClick 90, 90 + endif + gMouseClick 90, 90 - printlog "Change all objects into 3D." - '/// Change all objects into 3D. ///' - if gApplication = "DRAW" then + printlog "Change all objects into 3D." + if gApplication = "DRAW" then Kontext "Documentdraw" - else '(Impress) + else '(Impress) Kontext "DocumentImpress" - endif - For MakeInto3Dcounter = 1 to 3 - hTypeKeys "", MakeInto3Dcounter - kontext "Toolbar" - if Toolbar.Exists then - if Toolbar.IsVisible then - if ExtrusionOnOff.Exists then - ExtrusionOnOff.Click - sleep (3) - else - sleep (1) - Toolbar.OpenContextMenu ' enable forms button in menuebar - sleep (1) - hMenuselectNr (1) - sleep (1) - if hMenuFindSelect(1024, true, 25) = false then - Warnlog "Context-Menu-entry `Extrusion On/Off` was not found. Therefore the test ends." - Call hCloseDocument - Goto Endsub - endif - sleep (1) - kontext "Toolbar" - ExtrusionOnOff.Click - sleep (3) - endif - Kontext "ExtrusionObjectBar" - if ExtrusionObjectBar.Exists then - if ExtrusionObjectBar.IsVisible then - printlog " Objects got converted into Extrusion-objects, correct." - else - warnlog " No Extrusion-toolbar visible. Eventually a problem making objects into Extrusion-Objects." - endif - endif - endif - else - warnlog " the 'Toolbar' -Toolbar didnt exist." - endif - sleep (1) - hTypeKeys "" - Next MakeInto3Dcounter - - printlog "See if the objects still are Custom Shapes." - '/// See if the objects still are Custom Shapes ///' - '/// We do so by moving the lower part of the the thinking-cloud. ///' - gMouseClick 90, 1 - hTypeKeys "" - - hTypeKeys "" ,9 - if gApplication = "IMPRESS" then + endif + For MakeInto3Dcounter = 1 to 3 + hTypeKeys "", MakeInto3Dcounter + kontext "Toolbar" + if Toolbar.Exists then + if Toolbar.IsVisible then + if ExtrusionOnOff.Exists then + ExtrusionOnOff.Click + sleep (3) + else + sleep (1) + Toolbar.OpenContextMenu ' enable forms button in menuebar + sleep (1) + hMenuselectNr (1) + sleep (1) + if hMenuFindSelect(1024, true, 25) = false then + Warnlog "Context-Menu-entry `Extrusion On/Off` was not found. Therefore the test ends." + Call hCloseDocument + Goto Endsub + endif + sleep (1) + kontext "Toolbar" + ExtrusionOnOff.Click + sleep (3) + endif + Kontext "ExtrusionObjectBar" + if ExtrusionObjectBar.Exists then + if ExtrusionObjectBar.IsVisible then + printlog " Objects got converted into Extrusion-objects, correct." + else + warnlog " No Extrusion-toolbar visible. Eventually a problem making objects into Extrusion-Objects." + endif + endif + endif + else + warnlog " the 'Toolbar' -Toolbar didnt exist." + endif + sleep (1) + hTypeKeys "" + Next MakeInto3Dcounter + + printlog "See if the objects still are Custom Shapes." + gMouseClick 90, 1 + hTypeKeys "" + + hTypeKeys "" ,9 + if gApplication = "IMPRESS" then hTypeKeys "" ,86 hTypeKeys "", 48 - else + else hTypeKeys "" ,131 hTypeKeys "" ,53 - endif - sleep 1 - - gMouseClick 90, 1 - hTypeKeys "" - - printlog "Check the name of the selected object (should be 'First')" - '/// Check the name of the selected object (should be 'First') ///' - hOpenContextMenu - sleep 2 - 'Choose rename. - if hMenuFindSelect(27027, true, 15) = false then + endif + sleep 1 + + gMouseClick 90, 1 + hTypeKeys "" + + printlog "Check the name of the selected object (should be 'First')" + hOpenContextMenu + sleep 2 + '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 + endif - sleep 1 - kontext "NameDlgObject" - if NameField.GetText <> "First" then + sleep 1 + kontext "NameDlgObject" + if NameField.GetText <> "First" then warnlog " Wrong object. Should have been the first, but was the " + NameField.GetText - else + else Printlog " The first object still had the correct name, good." - endif - NameDlgObject.OK - - printlog "Open the Context-menu and check if the description of the object is right" - '/// Open the Context-menu and check if the description of the object is right ///" - hOpenContextMenu - sleep (2) - 'Choose "Description" - if hMenuFindSelect(27033, true, 14) = false then + endif + NameDlgObject.OK + + printlog "Open the Context-menu and check if the description of the object is right" + hOpenContextMenu + sleep (2) + 'Choose "Description" + if hMenuFindSelect(27033, true, 14) = false then Warnlog "Context-Menu-entry `Description` was not found. Therefore the test ends." Call hCloseDocument Goto Endsub - endif - kontext "DescriptionObject" - if DescriptionTitle.GetText <> "FirstTitle" then - Warnlog " The description-title for the first object were not 'FirstTitle', but: " + DescriptionTitle.GetText - endif - if DescriptionText.GetText <> "FirstText" then - Warnlog " The description-text for the first object were not 'FirstText', but: " + DescriptionText.GetText - endif - DescriptionObject.Ok - - Kontext "ExtrusionObjectBar" - if ExtrusionObjectBar.Exists then + endif + kontext "DescriptionObject" + if DescriptionTitle.GetText <> "FirstTitle" then + Warnlog " The description-title for the first object were not 'FirstTitle', but: " + DescriptionTitle.GetText + endif + if DescriptionText.GetText <> "FirstText" then + Warnlog " The description-text for the first object were not 'FirstText', but: " + DescriptionText.GetText + endif + DescriptionObject.Ok + + Kontext "ExtrusionObjectBar" + if ExtrusionObjectBar.Exists then if ExtrusionObjectBar.IsVisible then - printlog " The first object got converted into a 3D-object (Extrusion-Object), correct." + printlog " The first object got converted into a 3D-object (Extrusion-Object), correct." else - warnlog " No Extrusion-Object-toolbar visible. Eventually a problem making the object into 3D." + warnlog " No Extrusion-Object-toolbar visible. Eventually a problem making the object into 3D." endif - endif - - gMouseClick 90, 1 - hTypeKeys "" - '/// Check the name of the selected object (should be 'Second') ///' - hOpenContextMenu - sleep 2 - 'Choose rename. - if hMenuFindSelect(27027, true, 15) = false then + endif + + gMouseClick 90, 1 + hTypeKeys "" + hOpenContextMenu + sleep 2 + '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 + endif - sleep 1 - kontext "NameDlgObject" - if NameField.GetText <> "Second" then + sleep 1 + kontext "NameDlgObject" + if NameField.GetText <> "Second" then warnlog " Wrong object. Should have been the second, but was the " + NameField.GetText - else + else Printlog " The second object still had the correct name, good." - endif - NameDlgObject.OK - - printlog "Open the Context-menu and check if the description of the object is right" - '/// Open the Context-menu and check if the description of the object is right ///" - hOpenContextMenu - sleep (2) - 'Choose "Description" - if hMenuFindSelect(27033, true, 14) = false then + endif + NameDlgObject.OK + + printlog "Open the Context-menu and check if the description of the object is right" + hOpenContextMenu + sleep (2) + 'Choose "Description" + if hMenuFindSelect(27033, true, 14) = false then Warnlog "Context-Menu-entry `Description` was not found. Therefore the test ends." Call hCloseDocument Goto Endsub - endif - kontext "DescriptionObject" - if DescriptionTitle.GetText <> "SecondTitle" then + endif + kontext "DescriptionObject" + if DescriptionTitle.GetText <> "SecondTitle" then Warnlog " The description-title for the second object were not 'SecondTitle', but: " + DescriptionTitle.GetText - else + else printlog " The description-title for the second object were correct" - endif - if DescriptionText.GetText <> "SecondText" then + endif + if DescriptionText.GetText <> "SecondText" then Warnlog " The description-text for the second object were not 'SecondText', but: " + DescriptionText.GetText - else + else printlog " The description-text for the second object were correct" - endif - DescriptionObject.Ok + endif + DescriptionObject.Ok - Kontext "ExtrusionObjectBar" - if ExtrusionObjectBar.Exists then + Kontext "ExtrusionObjectBar" + if ExtrusionObjectBar.Exists then if ExtrusionObjectBar.IsVisible then - printlog " The first second got converted into 3D-object (Extrusion-Object), correct." + printlog " The first second got converted into 3D-object (Extrusion-Object), correct." else - warnlog " No Extrusion-Object-toolbar visible. Eventually a problem making the object into 3D." + warnlog " No Extrusion-Object-toolbar visible. Eventually a problem making the object into 3D." endif - endif - - gMouseClick 90, 1 - hTypeKeys "" - '/// Check the name of the selected object (should be "Third") ///' - hOpenContextMenu - sleep 2 - 'Choose rename. - if hMenuFindSelect(27027, true, 15) = false then + endif + + gMouseClick 90, 1 + hTypeKeys "" + hOpenContextMenu + sleep 2 + '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 + endif - sleep 1 - kontext "NameDlgObject" - if NameField.GetText <> "Third" then + sleep 1 + kontext "NameDlgObject" + if NameField.GetText <> "Third" then warnlog " Wrong object. Should have been the third, but was the " + NameField.GetText - else + else Printlog " The third object still had the correct name, good." - endif - NameDlgObject.OK - - printlog "Open the Context-menu and check if the description of the object is right" - '/// Open the Context-menu and check if the description of the object is right ///" - hOpenContextMenu - sleep (2) - 'Choose "Description" - if hMenuFindSelect(27033, true, 14) = false then + endif + NameDlgObject.OK + + printlog "Open the Context-menu and check if the description of the object is right" + hOpenContextMenu + sleep (2) + 'Choose "Description" + if hMenuFindSelect(27033, true, 14) = false then Warnlog "Context-Menu-entry `Description` was not found. Therefore the test ends." Call hCloseDocument Goto Endsub - endif - kontext "DescriptionObject" - if DescriptionTitle.GetText <> "ThirdTitle" then + endif + kontext "DescriptionObject" + if DescriptionTitle.GetText <> "ThirdTitle" then Warnlog " The description-title for object three were not 'ThirdTitle', but: " + DescriptionTitle.GetText - else + else printlog " The description-title for the second object were correct." - endif - if DescriptionText.GetText <> "ThirdText" then + endif + if DescriptionText.GetText <> "ThirdText" then Warnlog " The description-text for object three were not 'ThirdText', but: " + DescriptionText.GetText - else + else printlog " The description-text for object three were correct." - endif - DescriptionObject.Ok + endif + DescriptionObject.Ok - Kontext "ExtrusionObjectBar" - if ExtrusionObjectBar.Exists then + Kontext "ExtrusionObjectBar" + if ExtrusionObjectBar.Exists then if ExtrusionObjectBar.IsVisible then - printlog " The third object got converted into 3D-object (Extrusion-Object), correct." + printlog " The third object got converted into 3D-object (Extrusion-Object), correct." else - warnlog " No Extrusion-Object-toolbar visible. Eventually a problem making the object into 3D." + warnlog " No Extrusion-Object-toolbar visible. Eventually a problem making the object into 3D." endif - endif + endif - printlog "End of test. Close the document." - Call hCloseDocument '/// Close Document ///' + printlog "End of test. Close the document." endcase '************************************************************************ testcase tFormatPaintbrush - dim counter, ZaehlerVerlauf, j as Integer - '/// Hatching ///' - dim HatchingDistance as string - dim HatchingAngle as string - dim HatchingLineType as string - dim HatchingLineColor as string - - dim position_value as string - dim show_value as boolean - dim distance_value as string - dim color_value as string - dim transparency_value as string - - dim NoTransparency_value as boolean - dim linearTransparency_value as boolean - dim MFLintransparency_value as string - dim Transparencyverlauf_value as boolean - dim TransparencyType_value as string - dim MFCenterX_value as string - dim MFCenterY_value as string - dim MFAngle_value as string - dim MFRand_value as string - dim MFStart_value as string - dim MFEnd_value as string - - dim colorname_value as string - dim color2_value as string - dim colormodel_value as integer - dim R_value as string - dim G_value as string - dim B_value as string - dim C_value as string - dim M_value as string - dim Y_value as string - dim K_value as string - - dim type_value as string - dim centerx_value as string - dim centery_value as string - dim angle_value as string - dim rand_value as string - dim from_value as string - dim fromvalue_value as string - dim to_value as string - dim tovalue_value as string - dim to_wert_value as string - - dim front_value as string - dim background_value as string - - '/// Create new document ///' - Call hNewDocument - '/// Create a new rectangle ///' - hRechteckErstellen ( 10, 10, 30, 30 ) - FormatArea - '/// Switch to Tabpage "Area" ///' - Kontext - Active.SetPage TabArea - Kontext "TabArea" - sleep 1 - FillOptions.Select 4 '/// Select hatching, control after closing and reopening dialog if changes are recognized ///' - '/// Switch to Tabpage "Hatching" ///' - Kontext - Active.setpage TabSchraffuren - Kontext "TabSchraffuren" - - '/// Get the values for the Rectangle ///' - HatchingDistance = Abstand.GetText - HatchingAngle = Winkel.GetText - 'Definition - HatchingLineType = Linientyp.GetSelText - HatchingLineColor = Linienfarbe.GetSelText - - 'TabSchraffuren.OK - sleep 1 - -' FormatArea - '/// Switch to Tabpage "Shaddow" ///' - Kontext - Active.setpage TabSchatten - Kontext "TabSchatten" - - show_value = Anzeigen.isChecked 'Boolean - if Anzeigen.isChecked then - position_value = Position.GetSelText - distance_value = Entfernung.GetSelText - color_value = Farbe.GetSelText - transparency_value = Transparenz.GetSelText - endif - sleep 1 - - '/// Switch to Tabpage "Transparency" ///' - Kontext - Active.SetPage TabTransparenz - Kontext "TabTransparenz" - - NoTransparency_value = KeineTransparenz.isChecked - linearTransparency_value = LineareTransparenz.isChecked - MFLinTransparency_value = MFLinTransparenz.GetText - Transparencyverlauf_value = Transparenzverlauf.isChecked - TransparencyType_value = TransparenzverlaufTyp.GetSelText - MFCenterX_value = MFZentrumX.GetText - MFCenterY_value = MFZentrumY.GetText - MFAngle_value = MFWinkel.GetText - MFRand_value = MFRand.GetText - MFStart_value = MFStartwert.GetText - MFEnd_value = MFEndwert.GetText - - sleep 1 - '/// Switch to Tabpage "Color" ///' - Kontext - Active.setpage TabFarben - Kontext "TabFarben" - - colorname_value = FarbName.GetText - color_value = Farbe.GetSelText - colormodel_value = Farbmodell.GetSelIndex - if colormodel_value = 1 then - R_value = R.GetText - G_value = G.GetText - B_value = B.GetText - else 'farbmodell_value = 2 - C_value = C.GetText - M_value = M.GetText - Y_value = Y.GetText - K_value = K.GetText - endif - sleep 1 - - '/// Switch to Tabpage "Gradient" ///' - Kontext - Active.setpage TabFarbverlaeufe - Kontext "TabFarbverlaeufe" - - type_value = Typ.GetSelText - Centerx_value = ZentrumX.GetText - Centery_value = ZentrumY.GetText - angle_value = Winkel.GetText - rand_value = Rand.GetText - from_value = Von.GetSelText - fromvalue_value = VonWert.GetText - to_value = Bis.GetSelText - tovalue_value = BisWert.GetText - sleep 1 - - '/// Switch to Tabpage "Bitmap" ///' - Kontext - Active.setpage TabBitmap - Kontext "TabBitmap" - - front_value = Vordergrund.GetSelText - background_value = Hintergrund.GetSelText - sleep 1 - '/// Close the FormatArea-dialogue with "OK" ///' - TabBitmap.OK - sleep 2 - - '/// Create a second rectangle, and use the "Paintbrush-icon" to copy the settings for the first rectangle onto the new one ///' - hRechteckErstellen ( 70, 70, 90, 90 ) - if gApplication = "DRAW" then - kontext "Documentdraw" - Documentdraw.Mousedown 20, 20 - Documentdraw.Mouseup 20, 20 - sleep 1 - kontext "Standardbar" - FormatPaintbrush.Click - kontext "Documentdraw" - sleep 1 - Documentdraw.Mousedown 80, 80 - Documentdraw.Mouseup 80, 80 - sleep 1 - else '(Impress) - Kontext "DocumentImpress" - DocumentImpress.Mousedown 20, 20 - DocumentImpress.Mouseup 20, 20 - sleep 1 - kontext "Standardbar" - FormatPaintbrush.Click - kontext "DocumentImpress" - sleep 1 - DocumentImpress.Mousedown 80, 80 - DocumentImpress.Mouseup 80, 80 - sleep 1 - endif - - '/// Check if the Formatting is like the first one. ///' - FormatArea - '/// Switch to Tabpage "Area" ///' - Kontext - Active.SetPage TabArea - Kontext "TabArea" -' if FillOptions.GetSelIndex <> 4 then '/// The selected value should be 'no fill' ///' -' warnlog "The FillOptions-value was not transferred correctly." -' else -' printlog "The FillOptions-value was transferred correctly." -' endif - - sleep 1 '/// control if changes are still there after closing and reopening dialog ///' - FillOptions.Select 4 '/// Select hatching, control after closing and reopening dialog if changes are recognized ///' - '/// Switch to Tabpage "Hatching" ///' - kontext - Active.setpage TabSchraffuren - kontext "TabSchraffuren" - - if HatchingDistance <> Abstand.GetText then - warnlog "Hatching:Distance changed. Should be: " + HatchingDistance + ". Was: " + Abstand.GetText - endif - if HatchingAngle <> Winkel.GetText then - warnlog "Hatching:Angle changed. Should be: " + HatchingAngle + ". Was: " + Winkel.GetText - endif - 'Definition - if HatchingLineType <> Linientyp.GetSelText then - warnlog "Hatching:LineType changed. Should be: " + HatchingLineType + ". Was: " + Linientyp.GetSelText - endif - if HatchingLineColor <> Linienfarbe.GetSelText then - warnlog "Hatching:LineColor changed. Should be: " + HatchingLineColor + ". Was: " + Linienfarbe.GetSelText - endif - sleep 1 - - '/// Switch to Tabpage "Shaddow" ///' - Kontext - Active.setpage TabSchatten - Kontext "TabSchatten" - - if Show_value = true then - if Anzeigen.isChecked <> true then - warnlog "Shaddow:Show had changed! Should have been true, but was " + Anzeigen.isChecked - else - if position_value <> Position.GetSelText then - warnlog "Shaddow:position:value changed. Should be: " + position_value + ". Was: " + Position.GetSelText - endif - if distance_value <> Entfernung.GetSelText then - warnlog "Shaddow:distance:value changed. Should be: " + distance_value + ". Was: " + Entfernung.GetSelText - endif - if color_value <> Farbe.GetSelText then - warnlog "Shaddow:Color:value changed. Should be: " + color_value + ". Was: " + Farbe.GetSelText - endif - if transparency_value <> Transparenz.GetSelText then - warnlog "Shaddow:transparency:value changed. Should be: " + transparency_value + ". Was: " + Transparenz.GetSelText - endif - endif - endif - sleep 1 - - '/// Switch to Tabpage "Transparency" ///' - Kontext - Active.SetPage TabTransparenz - Kontext "TabTransparenz" - if NoTransparency_value <> KeineTransparenz.isChecked then - warnlog "Transparency:NoTransparency -value changed. Should be: " + NoTransparency_value + ". Was: " + KeineTransparenz.isChecked - endif - if linearTransparency_value <> LineareTransparenz.isChecked then - warnlog "Transparency:lineareTransparency -value changed. Should be: " + linearTransparency_value + ". Was: " + LineareTransparenz.isChecked - endif - if MFLinTransparency_value <> MFLinTransparenz.GetText then - warnlog "Transparency:MFLinTransparency -value changed. Should be: " + MFLinTransparency_value + ". Was: " + MFLinTransparenz.GetText - endif - if Transparencyverlauf_value <> Transparenzverlauf.isChecked then - warnlog "Transparency:Transparencyverlauf -value changed. Should be: " + Transparencyverlauf_value + ". Was: " + Transparenzverlauf.isChecked - endif - if TransparencyType_value <> TransparenzverlaufTyp.GetSelText then - warnlog "Transparency:TransparencyType -value changed. Should be: " + TransparencyType_value + ". Was: " + TransparenzverlaufTyp.GetSelText - endif - if MFCenterX_value <> MFZentrumX.GetText then - warnlog "Transparency:MFCenterX -value changed. Should be: " + MFCenterX_value + ". Was: " + MFZentrumX.GetText - endif - if MFCenterY_value <> MFZentrumY.GetText then - warnlog "Transparency:MFCenterY -value changed. Should be: " + MFCenterY_value + ". Was: " + MFZentrumY.GetText - endif - if MFAngle_value <> MFWinkel.GetText then - warnlog "Transparency:MFAngle -value changed. Should be: " + MFAngle_value + ". Was: " + MFWinkel.GetText - endif - if MFRand_value <> MFRand.GetText then - warnlog "Transparency:MFRand -value changed. Should be: " + MFRand_value + ". Was: " + MFRand.GetText - endif - if MFStart_value <> MFStartwert.GetText then - warnlog "Transparency:MFStart -value changed. Should be: " + MFStart_value + ". Was: " + MFStartwert.GetText - endif - if MFEnd_value <> MFEndwert.GetText then - warnlog "Transparency:MFEnd -value changed. Should be: " + MFEnd_value + ". Was: " + MFEndwert.GetText + dim counter, ZaehlerVerlauf, j as Integer + dim HatchingDistance as string + dim HatchingAngle as string + dim HatchingLineType as string + dim HatchingLineColor as string + + dim position_value as string + dim show_value as boolean + dim distance_value as string + dim color_value as string + dim transparency_value as string + + dim NoTransparency_value as boolean + dim linearTransparency_value as boolean + dim MFLintransparency_value as string + dim Transparencyverlauf_value as boolean + dim TransparencyType_value as string + dim MFCenterX_value as string + dim MFCenterY_value as string + dim MFAngle_value as string + dim MFRand_value as string + dim MFStart_value as string + dim MFEnd_value as string + + dim colorname_value as string + dim color2_value as string + dim colormodel_value as integer + dim R_value as string + dim G_value as string + dim B_value as string + dim C_value as string + dim M_value as string + dim Y_value as string + dim K_value as string + + dim type_value as string + dim centerx_value as string + dim centery_value as string + dim angle_value as string + dim rand_value as string + dim from_value as string + dim fromvalue_value as string + dim to_value as string + dim tovalue_value as string + dim to_wert_value as string + + dim front_value as string + dim background_value as string + + Call hNewDocument + hRechteckErstellen ( 10, 10, 30, 30 ) + FormatArea + Kontext + Active.SetPage TabArea + Kontext "TabArea" + sleep 1 + Kontext + Active.setpage TabSchraffuren + Kontext "TabSchraffuren" + + HatchingDistance = Abstand.GetText + HatchingAngle = Winkel.GetText + 'Definition + HatchingLineType = Linientyp.GetSelText + HatchingLineColor = Linienfarbe.GetSelText + + 'TabSchraffuren.OK + sleep 1 + + ' FormatArea + Kontext + Active.setpage TabSchatten + Kontext "TabSchatten" + + show_value = Anzeigen.isChecked 'Boolean + if Anzeigen.isChecked then + position_value = Position.GetSelText + distance_value = Entfernung.GetSelText + color_value = Farbe.GetSelText + transparency_value = Transparenz.GetSelText + endif + sleep 1 + + Kontext + Active.SetPage TabTransparenz + Kontext "TabTransparenz" + + NoTransparency_value = KeineTransparenz.isChecked + linearTransparency_value = LineareTransparenz.isChecked + MFLinTransparency_value = MFLinTransparenz.GetText + Transparencyverlauf_value = Transparenzverlauf.isChecked + TransparencyType_value = TransparenzverlaufTyp.GetSelText + MFCenterX_value = MFZentrumX.GetText + MFCenterY_value = MFZentrumY.GetText + MFAngle_value = MFWinkel.GetText + MFRand_value = MFRand.GetText + MFStart_value = MFStartwert.GetText + MFEnd_value = MFEndwert.GetText + + sleep 1 + Kontext + Active.setpage TabFarben + Kontext "TabFarben" + + colorname_value = FarbName.GetText + color_value = Farbe.GetSelText + colormodel_value = Farbmodell.GetSelIndex + if colormodel_value = 1 then + R_value = R.GetText + G_value = G.GetText + B_value = B.GetText + else 'farbmodell_value = 2 + C_value = C.GetText + M_value = M.GetText + Y_value = Y.GetText + K_value = K.GetText + endif + sleep 1 + + Kontext + Active.setpage TabFarbverlaeufe + Kontext "TabFarbverlaeufe" + + type_value = Typ.GetSelText + Centerx_value = ZentrumX.GetText + Centery_value = ZentrumY.GetText + angle_value = Winkel.GetText + rand_value = Rand.GetText + from_value = Von.GetSelText + fromvalue_value = VonWert.GetText + to_value = Bis.GetSelText + tovalue_value = BisWert.GetText + sleep 1 + + Kontext + Active.setpage TabBitmap + Kontext "TabBitmap" + + front_value = Vordergrund.GetSelText + background_value = Hintergrund.GetSelText + sleep 1 + TabBitmap.OK + sleep 2 + + hRechteckErstellen ( 70, 70, 90, 90 ) + if gApplication = "DRAW" then + kontext "Documentdraw" + Documentdraw.Mousedown 20, 20 + Documentdraw.Mouseup 20, 20 + sleep 1 + kontext "Standardbar" + FormatPaintbrush.Click + kontext "Documentdraw" + sleep 1 + Documentdraw.Mousedown 80, 80 + Documentdraw.Mouseup 80, 80 + sleep 1 + else '(Impress) + Kontext "DocumentImpress" + DocumentImpress.Mousedown 20, 20 + DocumentImpress.Mouseup 20, 20 + sleep 1 + kontext "Standardbar" + FormatPaintbrush.Click + kontext "DocumentImpress" + sleep 1 + DocumentImpress.Mousedown 80, 80 + DocumentImpress.Mouseup 80, 80 + sleep 1 + endif + + FormatArea + Kontext + Active.SetPage TabArea + Kontext "TabArea" + ' warnlog "The FillOptions-value was not transferred correctly." + ' else + ' printlog "The FillOptions-value was transferred correctly." + ' endif + + kontext + Active.setpage TabSchraffuren + kontext "TabSchraffuren" + + if HatchingDistance <> Abstand.GetText then + warnlog "Hatching:Distance changed. Should be: " + HatchingDistance + ". Was: " + Abstand.GetText + endif + if HatchingAngle <> Winkel.GetText then + warnlog "Hatching:Angle changed. Should be: " + HatchingAngle + ". Was: " + Winkel.GetText + endif + 'Definition + if HatchingLineType <> Linientyp.GetSelText then + warnlog "Hatching:LineType changed. Should be: " + HatchingLineType + ". Was: " + Linientyp.GetSelText + endif + if HatchingLineColor <> Linienfarbe.GetSelText then + warnlog "Hatching:LineColor changed. Should be: " + HatchingLineColor + ". Was: " + Linienfarbe.GetSelText + endif + sleep 1 + + Kontext + Active.setpage TabSchatten + Kontext "TabSchatten" + + if Show_value = true then + if Anzeigen.isChecked <> true then + warnlog "Shaddow:Show had changed! Should have been true, but was " + Anzeigen.isChecked + else + if position_value <> Position.GetSelText then + warnlog "Shaddow:position:value changed. Should be: " + position_value + ". Was: " + Position.GetSelText endif - sleep 1 - - '/// Switch to Tabpage "Color" ///' - Kontext - Active.setpage TabFarben - Kontext "TabFarben" - - if colorname_value <> FarbName.GetText then - warnlog "colorname_value changed. Should be: " + colorname_value + ". Was: " + FarbName.GetText + if distance_value <> Entfernung.GetSelText then + warnlog "Shaddow:distance:value changed. Should be: " + distance_value + ". Was: " + Entfernung.GetSelText endif if color_value <> Farbe.GetSelText then - warnlog "color_value changed. Should be: " + color_value + ". Was: " + Farbe.GetSelText - endif - if colormodel_value <> Farbmodell.GetSelIndex then - warnlog "colormodel_value changed. Should be: " + colormodel_value + ". Was: " + Farbmodell.GetSelIndex - endif - if colormodel_value = 1 then - if R_value <> R.GetText then - warnlog "R_value changed. Should be: " + R_value + ". Was: " + R.GetText - endif - if G_value <> G.GetText then - warnlog "G_value changed. Should be: " + G_value + ". Was: " + G.GetText - endif - if B_value <> B.GetText then - warnlog "B_value changed. Should be: " + B_value + ". Was: " + B.GetText - endif - endif - if colormodel_value = 2 then - if C_value <> C.GetText then - warnlog "C_value changed.Should be: " + C_value + ". Was: " + C.GetText - endif - if M_value <> M.GetText then - warnlog "M_value changed. Should be: " + M_value + ". Was: " + M.GetText - endif - if Y_value <> Y.GetText then - warnlog "Y_value changed. Should be: " + Y_value + ". Was: " + Y.GetText - endif - if K_value <> K.GetText then - warnlog "K_value changed. Should be: " + K_value + ". Was: " + K.GetText - endif - endif - sleep 1 - - '/// Switch to Tabpage "Gradient" ///' - Kontext - Active.setpage TabFarbverlaeufe - Kontext "TabFarbverlaeufe" - if type_value <> Typ.GetSelText then - warnlog "type_value changed. Should be: " + type_value + ". Was: " + Typ.GetSelText - endif - if centerx_value <> ZentrumX.GetText then - warnlog "centerx_value changed. Should be: " + centerx_value + ". Was: " + ZentrumX.GetText - endif - if centery_value <> ZentrumY.GetText then - warnlog "centery_value changed. Should be: " + centery_value + ". Was: " + ZentrumY.GetText - endif - if angle_value <> Winkel.GetText then - warnlog "angle_value changed. Should be: " + angle_value + ". Was: " + Winkel.GetText - endif - if rand_value <> Rand.GetText then - warnlog "rand_value changed. Should be: " + rand_value + ". Was: " + Rand.GetText - endif - if from_value <> Von.GetSelText then - warnlog "from_value changed. Should be: " + from_value + ". Was: " + Von.GetSelText + warnlog "Shaddow:Color:value changed. Should be: " + color_value + ". Was: " + Farbe.GetSelText endif - if fromvalue_value <> VonWert.GetText then - warnlog "fromvalue_value changed. Should be: " + fromvalue_value + ". Was: " + VonWert.GetText - endif - if to_value <> Bis.GetSelText then - warnlog "to_value changed. Should be: " + to_value + ". Was: " + Bis.GetSelText - endif - if tovalue_value <> BisWert.GetText then - warnlog "tovalue_value changed. Should be: " + tovalue_value + ". Was: " + BisWert.GetText - endif - sleep 1 - - '/// Switch to Tabpage "Bitmap" ///' - Kontext - Active.setpage TabBitmap - Kontext "TabBitmap" - if front_value <> Vordergrund.GetSelText then - warnlog "vordergrund_value changed. Should be: " + front_value + ". Was: " + Vordergrund.GetSelText + if transparency_value <> Transparenz.GetSelText then + warnlog "Shaddow:transparency:value changed. Should be: " + transparency_value + ". Was: " + Transparenz.GetSelText endif - if background_value <> Hintergrund.GetSelText then - warnlog "background_value changed. Should be: " + background_value + ". Was: " + Hintergrund.GetSelText - endif - sleep 1 - TabBitmap.OK - Call hCloseDocument '/// Close Document ///' + endif + endif + sleep 1 + + Kontext + Active.SetPage TabTransparenz + Kontext "TabTransparenz" + if NoTransparency_value <> KeineTransparenz.isChecked then + warnlog "Transparency:NoTransparency -value changed. Should be: " + NoTransparency_value + ". Was: " + KeineTransparenz.isChecked + endif + if linearTransparency_value <> LineareTransparenz.isChecked then + warnlog "Transparency:lineareTransparency -value changed. Should be: " + linearTransparency_value + ". Was: " + LineareTransparenz.isChecked + endif + if MFLinTransparency_value <> MFLinTransparenz.GetText then + warnlog "Transparency:MFLinTransparency -value changed. Should be: " + MFLinTransparency_value + ". Was: " + MFLinTransparenz.GetText + endif + if Transparencyverlauf_value <> Transparenzverlauf.isChecked then + warnlog "Transparency:Transparencyverlauf -value changed. Should be: " + Transparencyverlauf_value + ". Was: " + Transparenzverlauf.isChecked + endif + if TransparencyType_value <> TransparenzverlaufTyp.GetSelText then + warnlog "Transparency:TransparencyType -value changed. Should be: " + TransparencyType_value + ". Was: " + TransparenzverlaufTyp.GetSelText + endif + if MFCenterX_value <> MFZentrumX.GetText then + warnlog "Transparency:MFCenterX -value changed. Should be: " + MFCenterX_value + ". Was: " + MFZentrumX.GetText + endif + if MFCenterY_value <> MFZentrumY.GetText then + warnlog "Transparency:MFCenterY -value changed. Should be: " + MFCenterY_value + ". Was: " + MFZentrumY.GetText + endif + if MFAngle_value <> MFWinkel.GetText then + warnlog "Transparency:MFAngle -value changed. Should be: " + MFAngle_value + ". Was: " + MFWinkel.GetText + endif + if MFRand_value <> MFRand.GetText then + warnlog "Transparency:MFRand -value changed. Should be: " + MFRand_value + ". Was: " + MFRand.GetText + endif + if MFStart_value <> MFStartwert.GetText then + warnlog "Transparency:MFStart -value changed. Should be: " + MFStart_value + ". Was: " + MFStartwert.GetText + endif + if MFEnd_value <> MFEndwert.GetText then + warnlog "Transparency:MFEnd -value changed. Should be: " + MFEnd_value + ". Was: " + MFEndwert.GetText + endif + sleep 1 + + Kontext + Active.setpage TabFarben + Kontext "TabFarben" + + if colorname_value <> FarbName.GetText then + warnlog "colorname_value changed. Should be: " + colorname_value + ". Was: " + FarbName.GetText + endif + if color_value <> Farbe.GetSelText then + warnlog "color_value changed. Should be: " + color_value + ". Was: " + Farbe.GetSelText + endif + if colormodel_value <> Farbmodell.GetSelIndex then + warnlog "colormodel_value changed. Should be: " + colormodel_value + ". Was: " + Farbmodell.GetSelIndex + endif + if colormodel_value = 1 then + if R_value <> R.GetText then + warnlog "R_value changed. Should be: " + R_value + ". Was: " + R.GetText + endif + if G_value <> G.GetText then + warnlog "G_value changed. Should be: " + G_value + ". Was: " + G.GetText + endif + if B_value <> B.GetText then + warnlog "B_value changed. Should be: " + B_value + ". Was: " + B.GetText + endif + endif + if colormodel_value = 2 then + if C_value <> C.GetText then + warnlog "C_value changed.Should be: " + C_value + ". Was: " + C.GetText + endif + if M_value <> M.GetText then + warnlog "M_value changed. Should be: " + M_value + ". Was: " + M.GetText + endif + if Y_value <> Y.GetText then + warnlog "Y_value changed. Should be: " + Y_value + ". Was: " + Y.GetText + endif + if K_value <> K.GetText then + warnlog "K_value changed. Should be: " + K_value + ". Was: " + K.GetText + endif + endif + sleep 1 + + Kontext + Active.setpage TabFarbverlaeufe + Kontext "TabFarbverlaeufe" + if type_value <> Typ.GetSelText then + warnlog "type_value changed. Should be: " + type_value + ". Was: " + Typ.GetSelText + endif + if centerx_value <> ZentrumX.GetText then + warnlog "centerx_value changed. Should be: " + centerx_value + ". Was: " + ZentrumX.GetText + endif + if centery_value <> ZentrumY.GetText then + warnlog "centery_value changed. Should be: " + centery_value + ". Was: " + ZentrumY.GetText + endif + if angle_value <> Winkel.GetText then + warnlog "angle_value changed. Should be: " + angle_value + ". Was: " + Winkel.GetText + endif + if rand_value <> Rand.GetText then + warnlog "rand_value changed. Should be: " + rand_value + ". Was: " + Rand.GetText + endif + if from_value <> Von.GetSelText then + warnlog "from_value changed. Should be: " + from_value + ". Was: " + Von.GetSelText + endif + if fromvalue_value <> VonWert.GetText then + warnlog "fromvalue_value changed. Should be: " + fromvalue_value + ". Was: " + VonWert.GetText + endif + if to_value <> Bis.GetSelText then + warnlog "to_value changed. Should be: " + to_value + ". Was: " + Bis.GetSelText + endif + if tovalue_value <> BisWert.GetText then + warnlog "tovalue_value changed. Should be: " + tovalue_value + ". Was: " + BisWert.GetText + endif + sleep 1 + + Kontext + Active.setpage TabBitmap + Kontext "TabBitmap" + if front_value <> Vordergrund.GetSelText then + warnlog "vordergrund_value changed. Should be: " + front_value + ". Was: " + Vordergrund.GetSelText + endif + if background_value <> Hintergrund.GetSelText then + warnlog "background_value changed. Should be: " + background_value + ". Was: " + Hintergrund.GetSelText + endif + sleep 1 + TabBitmap.OK endcase diff --git a/testautomation/graphics/optional/includes/global/g_demoguide.inc b/testautomation/graphics/optional/includes/global/g_demoguide.inc index a02c61ebc4ea..bac23cacfead 100755 --- a/testautomation/graphics/optional/includes/global/g_demoguide.inc +++ b/testautomation/graphics/optional/includes/global/g_demoguide.inc @@ -1,7 +1,7 @@ 'encoding UTF-8 Do not remove or change this line! '************************************************************************** '* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. -'* +'* '* Copyright 2008 by Sun Microsystems, Inc. '* '* OpenOffice.org - a multi-platform office productivity suite @@ -40,18 +40,16 @@ ' #1 t_Introduction ' Description ' #1 t_Interoperability ' Description ' #1 t_DrawingEngine ' Description -' +' '* '\*********************************************************************** testcase t_Introduction gApplication = "IMPRESS" - - '///Open new presentation + printlog "Open new presentation" Call hNewDocument - - '///Open the Gallery + printlog "Open the Gallery" ToolsGallery Sleep (1) @@ -59,8 +57,7 @@ testcase t_Introduction if Gallery.NotExists(2) then ToolsGallery end if - - '///Choose computer theme and insert the third image + printlog "Choose an item from the gallery" Gallerys.Select(2) View.TypeKeys "" @@ -70,7 +67,6 @@ testcase t_Introduction sleep 2 MenuSelect(MenuGetItemID(1)) 'Copy sleep 2 - '///+ - Check that we really got a copy of the object ///' kontext "DocumentImpress" DocumentImpress.OpenContextMenu(true) sleep 2 @@ -78,10 +74,10 @@ testcase t_Introduction 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... ?" + printlog " Gallery-object correctly copied into Slide." + ExportierenDlg.Close + else + warnlog " Doesn't seem like we copied anything from the Gallery... ?" endif printlog "Delete the item" kontext "DocumentImpress" @@ -98,15 +94,13 @@ testcase t_Introduction catch Warnlog "Insert graphic doesn't work" endcatch - - '///Resize object + printlog "Resize object" Kontext "DocumentImpress" gMouseClick (10, 10) sleep 1 EditSelectAll sleep 1 - ContextPositionAndSize '/// Format-position and size Kontext Active.SetPage TabPositionAndSize Kontext "TabPositionAndSize" @@ -115,8 +109,7 @@ testcase t_Introduction SizePosition.TypeKeys " " Width.SetText CStr((CInt(Width.GetText)) * 2) TabPositionAndSize.OK - - '///Break object + printlog "Break object" Kontext "DocumentImpress" gMouseClick (10, 10) @@ -124,8 +117,7 @@ testcase t_Introduction EditSelectAll sleep 1 hOpenContextMenu '(when the object is marked) - hMenuSelectNr(13) - '/// Select part of object and make it black + hMenuSelectNr(13) printlog "Select part of object and make it black" DocumentImpress.TypeKeys "" FormatArea @@ -135,15 +127,13 @@ testcase t_Introduction FillOptions.Select 2 ColourList.Select 1 TabArea.OK - - '///Group the objects + printlog "Group the object" kontext "DocumentImpress" DocumentImpress.TypeKeys "" hOpenContextMenu '(when the object is marked) hMenuSelectNr(12) - - '///Add Layout "Title Only" + Printlog "Add Layout" kontext "Tasks" if (NOT Tasks.exists) then @@ -153,23 +143,21 @@ testcase t_Introduction Kontext "LayoutsPreview" LayoutsPreview.TypeKeys " " sleep (5) - '///Add a background Printlog "Add background" - + Kontext "Tasks" printlog "Deselect all tabs from view menu in task pane except the needed." View.OpenMenu - MenuSelect(MenuGetItemID(5)) + MenuSelect(MenuGetItemID(5)) View.OpenMenu - MenuSelect(MenuGetItemID(4)) + MenuSelect(MenuGetItemID(4)) View.OpenMenu MenuSelect(MenuGetItemID(3)) View.OpenMenu MenuSelect(MenuGetItemID(2)) Kontext "AvailableForUsePreview" AvailableForUsePreview.TypeKeys " " - sleep (5) - '///Add a transition effect + sleep (5) Printlog "Add a transition effect" Kontext "Tasks" View.OpenMenu @@ -179,11 +167,10 @@ testcase t_Introduction TransitionSound.GetItemCount 'needed for select Sleep 1 TransitionSound.Select 4 - - '///Close the document + Printlog "Close the document" Call hCloseDocument - + endcase 't_Introduction '-------------------------------------------------------------------- @@ -192,33 +179,32 @@ testcase t_Interoperability Dim sTemplatename as string gApplication = "IMPRESS" - - '///Open PowerPoint presentation + printlog "Open PowerPoint presentation" hFileOpen (Convertpath (gTesttoolPath + "graphics/required/input/dotNetOverview.ppt")) Call sMakeReadOnlyDocumentEditable - + 'Save the name of the origin background (taken from last slide) - Kontext "DocumentImpress" - DocumentImpress.TypeKeys "" - sleep (4) - sTemplatename = DocumentImpress.StatusGetText (6) - printlog " Background = " & sTemplatename 'Debugcode - + Kontext "DocumentImpress" + DocumentImpress.TypeKeys "" + sleep (4) + sTemplatename = DocumentImpress.StatusGetText (6) + printlog " Background = " & sTemplatename 'Debugcode + printlog "Choose a masterpage from right pane" - + Kontext "Tasks" printlog "Deselect all tabs accept the Master Pages" View.OpenMenu - MenuSelect(MenuGetItemID(5)) + MenuSelect(MenuGetItemID(5)) View.OpenMenu - MenuSelect(MenuGetItemID(4)) + MenuSelect(MenuGetItemID(4)) View.OpenMenu MenuSelect(MenuGetItemID(3)) View.OpenMenu MenuSelect(MenuGetItemID(2)) - sleep 2 + sleep 2 Kontext "AvailableForUsePreview" AvailableForUsePreview.TypeKeys " " sleep (5) @@ -226,11 +212,10 @@ testcase t_Interoperability Kontext "DocumentImpress" printlog " Background is " & DocumentImpress.StatusGetText (6) 'Debugcode if DocumentImpress.StatusGetText (6) = sTemplatename then - warnlog "The background is not changed" - else printlog " Background has been changed" + warnlog "The background is not changed" + else printlog " Background has been changed" endif - - '///Switch back to original background + printlog "Switch back to original background" Kontext "Tasks" Kontext "AvailableForUsePreview" @@ -238,11 +223,10 @@ testcase t_Interoperability sleep (5) Kontext "DocumentImpress" if DocumentImpress.StatusGetText (6) = sTemplatename then - printlog " The background has been set back to default" - else warnlog "The background is " & DocumentImpress.StatusGetText (6) & " but should be: " & sTemplatename + printlog " The background has been set back to default" + else warnlog "The background is " & DocumentImpress.StatusGetText (6) & " but should be: " & sTemplatename endif - - '///Resort slides + printlog "Resort slides" Kontext "DocumentImpress" Kontext "Slides" @@ -254,29 +238,28 @@ testcase t_Interoperability Kontext "SlidesControl" SlidesControl.TypeKeys "" kontext "InsertPaste" - if InsertPaste.Exists(1) then + if InsertPaste.Exists(1) then Before.Check InsertPaste.OK - endif - Printlog " Verify that the slide was moved correctly" - Kontext "Slides" - SlidesControl.TypeKeys "" - SlidesControl.TypeKeys "" - if hMenuFindSelect(27268, true, 3) = false then + endif + Printlog " Verify that the slide was moved correctly" + Kontext "Slides" + SlidesControl.TypeKeys "" + SlidesControl.TypeKeys "" + 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" - if NameField.GetText <> ".NET Enterprise Federation" then + endif + kontext "NameDlgPage" + if NameField.GetText <> ".NET Enterprise Federation" then Warnlog "Wrong slide found! Expected no 3, but found " + NameField.GetText + "." - else + else Printlog " The slide was correctly moved" - endif - NameDlgPage.OK - sleep 1 - - '///Switch views + endif + NameDlgPage.OK + sleep 1 + printlog "Switch views" ViewWorkspaceOutlineView sleep (2) @@ -287,8 +270,8 @@ testcase t_Interoperability DocumentImpressOutlineView.TypeKeys "" sleep (5) if getclipboard() <> ".NET Enterprise" then - warnlog " Wrong selection in outlineview. Should be '.NET Enterprise', but is '" & getclipboard() +"'." - else printlog " Switching to Outlineview was successfull" + warnlog " Wrong selection in outlineview. Should be '.NET Enterprise', but is '" & getclipboard() +"'." + else printlog " Switching to Outlineview was successfull" endif catch warnlog "Switching to Outlineview was not successfull" @@ -336,8 +319,7 @@ testcase t_Interoperability catch warnlog "Switching to Drawingview was not successfull" endcatch - - '///Travel through the presentation by left pane + printlog "Travel through the presentation by left pane to slide 7" Kontext "DocumentImpress" DocumentImpress.TypeKeys "" @@ -346,31 +328,31 @@ testcase t_Interoperability Kontext "SlidesControl" SlidesControl.OpenContextMenu if hMenuFindSelect(27268, true, 3) = 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 kontext "NameDlgPage" if NameField.GetText <> "Visual Studio.NET The complete development environment for building distributed applications for Windows and the Web" then - Warnlog "Wrong slide found! Expected no 7, but found " + NameField.GetText + "." - else Printlog " Slide 7 is reached" + Warnlog "Wrong slide found! Expected no 7, but found " + NameField.GetText + "." + else Printlog " Slide 7 is reached" endif NameDlgPage.OK sleep 1 - + printlog "Autoshape support" Kontext "DocumentImpress" DocumentImpress.TypeKeys "" try Kontext "ExtrusionObjectBar" - printlog "Checking if ExtrusionObjectBar is already open." + printlog "Checking if ExtrusionObjectBar is already open." if ExtrusionObjectBar.Exists then - printlog "ExtrusionObjectBar Exists = " & ExtrusionObjectBar.Exists + printlog "ExtrusionObjectBar Exists = " & ExtrusionObjectBar.Exists else - printlog "ExtrusionObjectBar Exists = " & ExtrusionObjectBar.Exists - printlog "Opening ExtrusionObjectBar." - ViewToolbarsThreeDSettings - endif + printlog "ExtrusionObjectBar Exists = " & ExtrusionObjectBar.Exists + printlog "Opening ExtrusionObjectBar." + ViewToolbarsThreeDSettings + endif ExtrusionTiltRight.Click printlog " An autoshape was found and turned right" catch @@ -378,24 +360,22 @@ testcase t_Interoperability endcatch printlog "Close document" Call hCloseDocument - + endcase 't_Interoperability '-------------------------------------------------------------------- testcase t_DrawingEngine -Dim sGroupPosition as string -Dim sObjectPosition as string + Dim sGroupPosition as string + Dim sObjectPosition as string + + gApplication = "DRAW" -gApplication = "DRAW" - - '///Open a drawing printlog "Open a drawing" hFileOpen (Convertpath (gTesttoolPath + "graphics/required/input/Blueprint.odg")) Call sMakeReadOnlyDocumentEditable - '///Select grouped object and enter group printlog "Select group" Kontext "DocumentDraw" DocumentDraw.TypeKeys "" @@ -412,8 +392,7 @@ gApplication = "DRAW" Kontext "DocumentDraw" FormatEditGroupDraw sleep 1 - - '///Select and move single object + printlog "Select and move single object" printlog " Select object" Kontext "DocumentDraw" @@ -424,8 +403,8 @@ gApplication = "DRAW" MenuSelect(MenuGetItemID(15)) 'Select NAME from context kontext "NameDlgObject" if NameField.GetText <> "Chair" then - Warnlog "Wrong object selected!" - else Printlog " The correct object is selected" + Warnlog "Wrong object selected!" + else Printlog " The correct object is selected" endif NameDlgObject.OK sleep 1 @@ -442,13 +421,12 @@ gApplication = "DRAW" DocumentDraw.TypeKeys "" sleep (5) printlog " Verify that the object was moved" - ContextPositionAndSize '/// Format-position and size Kontext Active.SetPage TabPositionAndSize Kontext "TabPositionAndSize" if PositionY.GetText <> sObjectPosition then - printlog " Single object was moved" - else warnlog "The object has not been moved" + printlog " Single object was moved" + else warnlog "The object has not been moved" endif TabPositionAndSize.OK printlog " Exit group" @@ -460,12 +438,11 @@ gApplication = "DRAW" Active.SetPage TabPositionAndSize Kontext "TabPositionAndSize" if PositionY.GetText = sGroupPosition then - printlog " Group is still on position" - else warnlog "Group has moved from " & sGroupPosition & " to " & PositionY.GetText + printlog " Group is still on position" + else warnlog "Group has moved from " & sGroupPosition & " to " & PositionY.GetText endif TabPositionAndSize.OK - - '///Close document + printlog "Close document" Call hCloseDocument diff --git a/testautomation/graphics/optional/includes/global/g_dimensions.inc b/testautomation/graphics/optional/includes/global/g_dimensions.inc index 37df8f687e4b..8cab59c7b049 100755 --- a/testautomation/graphics/optional/includes/global/g_dimensions.inc +++ b/testautomation/graphics/optional/includes/global/g_dimensions.inc @@ -1,7 +1,7 @@ 'encoding UTF-8 Do not remove or change this line! '************************************************************************** '* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. -'* +'* '* Copyright 2008 by Sun Microsystems, Inc. '* '* OpenOffice.org - a multi-platform office productivity suite @@ -43,88 +43,80 @@ Sub testFormatDimensioning -call tdFormatDimensioning + call tdFormatDimensioning End Sub testcase tdFormatDimensioning - Dim ZaehlerMetrik - Dim i + Dim ZaehlerMetrik + Dim i - Call hNewDocument + Call hNewDocument - '/// Set min and max values for dimensioning ///' - FormatDimensioning - Kontext "Bemassung" - LinienDistanz.ToMin - PrintLog LinienDistanz.GetText + " = minimum value" - LinienDistanz.ToMax - PrintLog LinienDistanz.GetText + " = maximum value" + FormatDimensioning + Kontext "Bemassung" + LinienDistanz.ToMin + PrintLog LinienDistanz.GetText + " = minimum value" + LinienDistanz.ToMax + PrintLog LinienDistanz.GetText + " = maximum value" - HLUeberhang.ToMin - PrintLog HLUeberhang.GetText + " = minimum value" - HLUeberhang.ToMax - PrintLog HLUeberhang.GetText + " = maximum value" + HLUeberhang.ToMin + PrintLog HLUeberhang.GetText + " = minimum value" + HLUeberhang.ToMax + PrintLog HLUeberhang.GetText + " = maximum value" - HLDistanz.ToMin - PrintLog HLDistanz.GetText + " = minimum value" - HLDistanz.ToMax - PrintLog HLDistanz.GetText + " = maximum value" + HLDistanz.ToMin + PrintLog HLDistanz.GetText + " = minimum value" + HLDistanz.ToMax + PrintLog HLDistanz.GetText + " = maximum value" - LinkeHL.ToMin - PrintLog LinkeHL.GetText + " = minimum value" - LinkeHL.ToMax - PrintLog LinkeHL.GetText + " = maximum valuet" + LinkeHL.ToMin + PrintLog LinkeHL.GetText + " = minimum value" + LinkeHL.ToMax + PrintLog LinkeHL.GetText + " = maximum valuet" - RechteHL.ToMin - PrintLog RechteHL.GetText + " = minimum value" - RechteHL.ToMax - PrintLog RechteHL.GetText + " = maximum value" + RechteHL.ToMin + PrintLog RechteHL.GetText + " = minimum value" + RechteHL.ToMax + PrintLog RechteHL.GetText + " = maximum value" - '/// set every metric unit ///' - MetrikList.GetItemCount - ZaehlerMetrik=MetrikList.GetItemCount - for i = 1 to ZaehlerMetrik - MetrikList.Select i - PrintLog MetrikList.GetSelText + " set" - next i - '/// check show unit ///' - MetrikAnzeigen.Check - '/// check "below reference edge ///' - AnzeigeUnterhalb.Check - '/// check parallel ///' - AnzeigeParallel.Check - '/// check automatic vertical ///' - AutomatischHorizontal.Check - '/// check automatic horizontal ///' - AutomatischVertikal.Check - sleep 2 - Bemassung.OK + MetrikList.GetItemCount + ZaehlerMetrik=MetrikList.GetItemCount + for i = 1 to ZaehlerMetrik + MetrikList.Select i + PrintLog MetrikList.GetSelText + " set" + next i + MetrikAnzeigen.Check + AnzeigeUnterhalb.Check + AnzeigeParallel.Check + AutomatischHorizontal.Check + AutomatischVertikal.Check + sleep 2 + Bemassung.OK - '/// control value changes and checkbox states ///' - FormatDimensioning - Kontext "Bemassung" - MetrikAnzeigen.GetState - AnzeigeUnterhalb.GetState - AnzeigeParallel.GetState - AutomatischHorizontal.GetState - AutomatischVertikal.GetState - if MetrikAnzeigen.GetState = 1 Then - PrintLog " show metric works" - else - WarnLog " show metric does not work" - end if - if AnzeigeUnterhalb.GetState= 1 Then - PrintLog " AnzeigeUnterhalb does work" - else - WarnLog " TriStateBox AnzeigeUnterhalb does not work" - end if - if AnzeigeParallel.GetState= 1 Then - PrintLog " AnzeigeParallel does work" - else - WarnLog " TriStateBox AnzeigeParallel does not work properly" - end if - Bemassung.OK - Call hCloseDocument + FormatDimensioning + Kontext "Bemassung" + MetrikAnzeigen.GetState + AnzeigeUnterhalb.GetState + AnzeigeParallel.GetState + AutomatischHorizontal.GetState + AutomatischVertikal.GetState + if MetrikAnzeigen.GetState = 1 Then + PrintLog " show metric works" + else + WarnLog " show metric does not work" + end if + if AnzeigeUnterhalb.GetState= 1 Then + PrintLog " AnzeigeUnterhalb does work" + else + WarnLog " TriStateBox AnzeigeUnterhalb does not work" + end if + if AnzeigeParallel.GetState= 1 Then + PrintLog " AnzeigeParallel does work" + else + WarnLog " TriStateBox AnzeigeParallel does not work properly" + end if + Bemassung.OK + Call hCloseDocument endcase diff --git a/testautomation/graphics/optional/includes/global/g_edit.inc b/testautomation/graphics/optional/includes/global/g_edit.inc index 6dbcb9f2cf14..5d646a0f0fc7 100755 --- a/testautomation/graphics/optional/includes/global/g_edit.inc +++ b/testautomation/graphics/optional/includes/global/g_edit.inc @@ -1,7 +1,7 @@ 'encoding UTF-8 Do not remove or change this line! '************************************************************************** '* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. -'* +'* '* Copyright 2008 by Sun Microsystems, Inc. '* '* OpenOffice.org - a multi-platform office productivity suite @@ -45,236 +45,185 @@ '\************************************************************************************* ' sDatei = gTesttoolPath + "graphics\required\input\leer.sx"+left(gApplication,1) -' Call hDateiOeffnen ConvertPath (gTesttoolPath + "graphics\required\input\frame1.htm") '/// Load html document ///' ' sDatei = gTesttoolPath + "graphics\required\input\leer.sx"+left(gApplication,1) ' Dateiname.SetText ConvertPath (gTesttoolPath + "global\input\graf_inp\enter.bmp") testcase tEditDuplicate - dim Ueber_Text_1 - dim Zaehler + dim Ueber_Text_1 + dim Zaehler - Call hNewDocument '/// New Impress document ///' - Call hRechteckErstellen ( 5, 5, 20, 30 ) '/// Create rectangle ///' - EditSelectAll '/// Select rectangle ///' - EditDuplicate '/// Edit-duplicate ///' - Kontext "Duplizieren" - Ueber_Text_1 = AnzahlAnKopien.GetText - AnzahlAnKopien.SetText "50" '/// Set number of copies to 50 ///' - Duplizieren.Cancel '/// Cancel Edit Duplicate ///' - sleep 1 - For Zaehler = 1 to 8 - EditDuplicate '/// Edit Duplicate ///' - sleep 1 - Kontext "Duplizieren" - AnzahlAnKopien.SetText "30" '/// Number of copies = 30 ///' + Kontext "Duplizieren" + Ueber_Text_1 = AnzahlAnKopien.GetText + sleep 1 + For Zaehler = 1 to 8 + sleep 1 + Kontext "Duplizieren" - Select Case Zaehler '/// Setting values for axis and angles ///' - Case 1: XAchse.SetText "0,0" - YAchse.SetText "0,45" - Hoehe.SetText "-0,1" - Breite.SetText "-0,1" - Drehwinkel.SetText "3" - Anfang.Select Int((Anfang.GetItemCount * Rnd)+1) - Case 2,6: XAchse.SetText "0,6" - YAchse.SetText "0,0" - Hoehe.SetText "0,15" - Breite.SetText "0,01" - Drehwinkel.SetText "353" - Case 3,7: XAchse.SetText "0,0" - YAchse.SetText "-0,4" - Hoehe.SetText "-0,1" - Breite.SetText "0,06" - Drehwinkel.SetText "11" - Case 4,8: XAchse.SetText "-0,6" - YAchse.SetText "0,0" - Hoehe.SetText "0,05" - Breite.SetText "-0,08" - Drehwinkel.SetText "347" - Case 5: XAchse.SetText "0,1" - YAchse.SetText "0,48" - Hoehe.SetText "-0,05" - Breite.SetText "-0,05" - Drehwinkel.SetText "355" + Case 1: XAchse.SetText "0,0" + YAchse.SetText "0,45" + Hoehe.SetText "-0,1" + Breite.SetText "-0,1" + Drehwinkel.SetText "3" + Anfang.Select Int((Anfang.GetItemCount * Rnd)+1) + Case 2,6: XAchse.SetText "0,6" + YAchse.SetText "0,0" + Hoehe.SetText "0,15" + Breite.SetText "0,01" + Drehwinkel.SetText "353" + Case 3,7: XAchse.SetText "0,0" + YAchse.SetText "-0,4" + Hoehe.SetText "-0,1" + Breite.SetText "0,06" + Drehwinkel.SetText "11" + Case 4,8: XAchse.SetText "-0,6" + YAchse.SetText "0,0" + Hoehe.SetText "0,05" + Breite.SetText "-0,08" + Drehwinkel.SetText "347" + Case 5: XAchse.SetText "0,1" + YAchse.SetText "0,48" + Hoehe.SetText "-0,05" + Breite.SetText "-0,05" + Drehwinkel.SetText "355" End Select Ende.Select Int((Ende.GetItemCount * Rnd)+1) - Duplizieren.OK '/// Execute Duplicate ///' sleep 1 - Next Zaehler - sleep 2 - Call hCloseDocument '/// Close document ///' +Next Zaehler +sleep 2 endcase testcase tEditFields - Call hNewDocument - sleep 3 - InsertFieldsDateFix '/// Insert Date-Fix ///' - EditSelectAll '/// Select inserted field ///' - sleep 1 - hTypeKeys "" '/// Go into edit mode (F2) ///' - sleep 2 - EditSelectAll '/// Select the date///' - sleep 2 - EditfieldsDraw '/// Edit -fields///' - Kontext "FeldbefehlBearbeitenDraw" - sleep 2 - FeldtypFix.Check '/// check field type fix ///' - If FeldtypFix.Ischecked then + Call hNewDocument + sleep 3 + sleep 1 + sleep 2 + sleep 2 + Kontext "FeldbefehlBearbeitenDraw" + sleep 2 + If FeldtypFix.Ischecked then Printlog "OK FieldtypeFix checkable" - else - warnlog "FieldtypeFix not checkable" - end if - FeldtypVariabel.Check '/// check field type variabel///' - sleep 1 - If FeldtypVariabel.Ischecked then - Printlog "OK FieldtypeVariabel enabled" - else - warnlog "FieldtypeVariabel not enabled" - end if +else + warnlog "FieldtypeFix not checkable" +end if +sleep 1 +If FeldtypVariabel.Ischecked then +Printlog "OK FieldtypeVariabel enabled" +else +warnlog "FieldtypeVariabel not enabled" +end if ' For Zaehler = 1 to FeldtypFormat.GetItemCount ' FeldTypFormat.Select Zaehler ' printlog "OK Format ", Zaehler, " = ", FeldtypFormat.GetSelText ' Next Zaehler - FeldbefehlBearbeitenDraw.OK '/// close edit fields dialog ///' - sleep 2 - Call hCloseDocument '/// close document ///' - sleep 2 +sleep 2 +sleep 2 endcase testcase tEditDeleteSlide - dim Ueber_Text_1 as string - dim Ueber_Text_2 as string - dim Ueber_Text_3 as string - Call hNewDocument '/// New impress document ///' - sleep 3 - Call hRechteckErstellen ( 30, 30, 70, 70 ) '/// create rectangle ///' - sleep 1 - ContextPositionAndSize '/// open Position and Size dialog ///' - kontext - Messagebox.SetPage TabPositionAndSize - kontext "TabPositionAndSize" - Ueber_Text_1 = PositionX.GetText '/// get position values for rectangle ///' - TabPositionAndSize.OK - InsertSlide '/// insert slide ///' - sleep 2 - hTypekeys "" - sleep 2 - Call hRechteckErstellen ( 40, 40, 60, 60 ) '/// create rectangle ///' - sleep 1 - EditDeleteSlide '/// Delete slide ///' - sleep 1 - Ueber_Text_2 = "OK Page was closed" - Ueber_Text_3 = "Page was not closed" - call Position_Vergleichen (Ueber_Text_1,Ueber_Text_2,Ueber_Text_3) '/// compare position of rectange ///' - sleep 1 - Call hCloseDocument '/// close document ///' + dim Ueber_Text_1 as string + dim Ueber_Text_2 as string + dim Ueber_Text_3 as string + sleep 3 + sleep 1 + kontext + Messagebox.SetPage TabPositionAndSize + kontext "TabPositionAndSize" + TabPositionAndSize.OK + sleep 2 + hTypekeys "" + sleep 2 + sleep 1 + sleep 1 + Ueber_Text_2 = "OK Page was closed" + Ueber_Text_3 = "Page was not closed" + sleep 1 endcase testcase tEditLinks - Call hNewDocument '/// New document ///' - InsertGraphicsFromFile '/// insert graphic (sample.bmp) ///' - Kontext "GrafikEinfuegenDlg" - Link.Check '/// check link ///' - Dateiname.SetText ConvertPath (gTesttoolPath + "global\input\graf_inp\enter.bmp") - Oeffnen.Click - sleep 3 - EditLinksDraw '/// edit links ///' - Kontext "VerknuepfungenBearbeiten" - Aktualisieren.Click '/// refresh ///' - sleep 1 - 'Aendern 'kann man noch den Dialog aufrufen... - Loesen.Click - sleep 1 - Kontext - Messagebox.Yes - VerknuepfungenBearbeiten.Close '/// close dialog ///' - sleep 1 - try - EditLinksDraw '/// check if last changes remain in the dialog ///' + Kontext "GrafikEinfuegenDlg" + Dateiname.SetText ConvertPath (gTesttoolPath + "global\input\graf_inp\enter.bmp") + Oeffnen.Click + sleep 3 Kontext "VerknuepfungenBearbeiten" + sleep 1 + 'Aendern 'kann man noch den Dialog aufrufen... Loesen.Click sleep 1 Kontext Messagebox.Yes - VerknuepfungenBearbeiten.Close - warnlog "Break link does not work" - catch - printlog "OK Link broken" - endcatch - Call hCloseDocument '/// close document ///' + sleep 1 + try + Kontext "VerknuepfungenBearbeiten" + Loesen.Click + sleep 1 + Kontext + Messagebox.Yes + VerknuepfungenBearbeiten.Close + warnlog "Break link does not work" + catch + printlog "OK Link broken" + endcatch endcase testcase tdEditDeleteLayer - dim Ueber_Text_1 as string - dim Ueber_Text_2 as string - dim Ueber_Text_3 as string - Call hNewDocument '/// new document ///' - sleep 2 - Call hRechteckErstellen ( 30, 30, 70, 70 ) '/// create rectangle ///' - sleep 1 -'/// View->Layer ///' - ViewLayer - ContextPositionAndSize '/// get position values for rectangle ///' - kontext - active.SetPage TabPositionAndSize - kontext "TabPositionAndSize" - Ueber_Text_1 = PositionX.GetText - TabPositionAndSize.OK - InsertLayer '/// insert layer ///' - Kontext "EbeneEinfuegenDlg" - EbeneEinfuegenDlg.OK - Call hRechteckErstellen ( 10, 40, 90, 60 ) '/// create rectangle on created layer ///' - sleep 1 - EditDeleteLayer '/// delete layer ///' - sleep 1 - Kontext - Active.Yes - sleep 1 - Ueber_Text_2 = "OK Layer was deleted" '/// compare position of selected rectangle with position of created rectangle in deteted layer ///' - Ueber_Text_3 = "Layer was not deleted" - Call Position_Vergleichen (Ueber_Text_1,Ueber_Text_2,Ueber_Text_3) - sleep 1 - Call hCloseDocument '/// close document ///' + dim Ueber_Text_1 as string + dim Ueber_Text_2 as string + dim Ueber_Text_3 as string + sleep 2 + sleep 1 + ViewLayer + kontext + active.SetPage TabPositionAndSize + kontext "TabPositionAndSize" + Ueber_Text_1 = PositionX.GetText + TabPositionAndSize.OK + Kontext "EbeneEinfuegenDlg" + EbeneEinfuegenDlg.OK + sleep 1 + sleep 1 + Kontext + Active.Yes + sleep 1 + Ueber_Text_3 = "Layer was not deleted" + Call Position_Vergleichen (Ueber_Text_1,Ueber_Text_2,Ueber_Text_3) + sleep 1 endcase testcase tEditObjectEdit - Dim Schrieb as string + Dim Schrieb as string - Schrieb = gOLEWriter - if Schrieb = "" then - warnlog " the OLE is not defined :-((( gOLEWriter: " + iSprache - else + Schrieb = gOLEWriter + if Schrieb = "" then + warnlog " the OLE is not defined :-((( gOLEWriter: " + iSprache + else - Call hNewDocument - sleep 1 '/// new document ///' - InsertObjectOLEObject '/// insert writer ole object ///' - Kontext "OLEObjektEinfuegen" - sleep 3 - if ObjektTyp.GetItemCount = 0 Then - Warnlog "- No available Ole-entry in the list, maybe an error in the Install.ini?" - sleep 1 - OleObjektEinfuegen.Cancel - sleep 1 - else + Call hNewDocument + Kontext "OLEObjektEinfuegen" + sleep 3 + if ObjektTyp.GetItemCount = 0 Then + Warnlog "- No available Ole-entry in the list, maybe an error in the Install.ini?" + sleep 1 + OleObjektEinfuegen.Cancel + sleep 1 + else - ObjektTyp.Select Schrieb - sleep 1 - OLEObjektEinfuegen.OK - sleep 3 ' Changed from Sleep 1 to Sleep 3 - gMouseMove 10,10,90,90 - sleep 1 - EditSelectAll + ObjektTyp.Select Schrieb + sleep 1 + OLEObjektEinfuegen.OK + sleep 3 ' Changed from Sleep 1 to Sleep 3 + gMouseMove 10,10,90,90 + sleep 1 + EditSelectAll - try - EditObjectEdit 'keine ID '/// try edit-objects ///' - sleep 2 - catch - Warnlog "- The EditObjectEdit did not work" - endcatch + try + sleep 2 + catch + Warnlog "- The EditObjectEdit did not work" + endcatch - gMouseClick 90,90 + gMouseClick 90,90 end if - sleep 1 - Call hCloseDocument '/// close document ///' - endif + sleep 1 + endif endcase diff --git a/testautomation/graphics/optional/includes/global/g_export_html.inc b/testautomation/graphics/optional/includes/global/g_export_html.inc index 4b76e9b4be52..88a7e3dadc64 100755 --- a/testautomation/graphics/optional/includes/global/g_export_html.inc +++ b/testautomation/graphics/optional/includes/global/g_export_html.inc @@ -1,7 +1,7 @@ 'encoding UTF-8 Do not remove or change this line! '************************************************************************** '* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. -'* +'* '* Copyright 2008 by Sun Microsystems, Inc. '* '* OpenOffice.org - a multi-platform office productivity suite @@ -41,7 +41,7 @@ '\******************************************************************** testcase tHtmlExport - + Dim Autor1 as string Dim Adresse1 as string Dim Liste(50) as string @@ -50,300 +50,249 @@ testcase tHtmlExport dim sTemp as string dim sFile as string - '/// open 'tools->options' and set first/last name and email adress on the page 'StarOffice->UserData' ///' - ToolsOptions - hToolsOptions ("STAROFFICE","USERDATA") - VorName.SetText "Garfield" - ZuName.SetText "Peanuts" - EMail.SetText "recumbent@sun.com" - Kontext "ExtrasOptionenDlg" - ExtrasOptionenDlg.OK + ToolsOptions + hToolsOptions ("STAROFFICE","USERDATA") + VorName.SetText "Garfield" + ZuName.SetText "Peanuts" + EMail.SetText "recumbent@sun.com" + Kontext "ExtrasOptionenDlg" + ExtrasOptionenDlg.OK - '/// create directory if not exists and delete the content, if exists user\\work\\html\\ ///' - app.mkDir ((ConvertPath (gOfficePath + "user\work\html\")) - Liste(0) = 0 - GetFileList ((ConvertPath (gOfficePath + "user\work\html\")), "*.*" , Liste() ) - if (KillFileList (Liste()) <> TRUE) then - for i = 1 to ListCount (Liste()) - Warnlog "File Not deleted: " + i + ": '" + Liste(i) + "'" - next i - endif + app.mkDir ((ConvertPath (gOfficePath + "user\work\html\")) + Liste(0) = 0 + GetFileList ((ConvertPath (gOfficePath + "user\work\html\")), "*.*" , Liste() ) + if (KillFileList (Liste()) <> TRUE) then + for i = 1 to ListCount (Liste()) + Warnlog "File Not deleted: " + i + ": '" + Liste(i) + "'" + next i + endif - '/// open application ///' - Call hNewDocument - WaitSlot (3000) -'---------------------------------- simple document ----------------------------------------------- - '/// create a rectrangle ///' - hTextrahmenErstellen ("This is a test text",10,10,40,20) - WaitSlot (2000) - '/// create another rectrangle ///' - hRechteckErstellen (50,50,70,70) - WaitSlot (3000) -'################################################################################################### - Printlog "'/// test if no file is created, if dialog is canceld ///'" - '/// call 'File->Export'///' - FileExport - Kontext "ExportierenDlg" - WaitSlot (1000) - gHTMLFilter = Dateityp.GetItemText(1) - Dateityp.Select(gHTMLFilter) - '/// set Filename to 'user\\work\\html\\expo0.html' ///' - sFile = ConvertPath (gOfficePath + "user\work\html\expo0") - Dateiname.SetText sFile - WaitSlot (2000) - '/// click button 'Save' ///' - Speichern.Click - WaitSlot (3000) - Kontext "Active" - if Active.Exists Then Active.Yes -'-------------------------------------------------------------------------- - '/// now we are on the dialog -1- 'Assign design' ///' - Kontext "HTMLExport1" - '/// click button 'Cancel' ///' - HTMLExport1.Cancel - WaitSlot (5000) - Liste(0) = 0 - GetFileList ((ConvertPath (gOfficePath + "user\work\html\")), "*.*" , Liste() ) - WaitSlot (1000) - Printlog "used file name: '" + sFile + "'" - if (ListCount (Liste()) > 0) then - warnlog "dialog for export was canceled, but file was created :-(" - for i = 1 to ListCount (Liste()) - Warnlog "File created: " + i + ": '" + Liste(i) + "'" - next i - KillFileList (Liste()) - end if -'################################################################################################### - Printlog "'/// test if files are created ///'" - '/// call 'File->Export'///' - FileExport - Kontext "ExportierenDlg" - WaitSlot (1000) - try - '/// select Filetype 'HTML...' aka 'WebPage' ///' - Dateityp.Select gHTMLFilter - catch - errorlog " Filter not available :-( : '"+gHTMLFilter+"'" - Dateityp.Select 1 '/// Selects the first entry - which should be html ///' - endcatch - WaitSlot (1000) - '/// set Filename to 'user\\work\\html\\expo.html' ///' - sFile = ConvertPath (gOfficePath + "user\work\html\expo.html") - Dateiname.SetText sFile - WaitSlot (2000) - '/// click button 'Save' ///' - Speichern.Click - WaitSlot (3000) - Kontext "Active" - if Active.Exists Then Active.Yes -'-------------------------------------------------------------------------- - Printlog "'/// now we are on the dialog -1- 'Assign design' ///'" - Kontext "HTMLExport1" - '/// 'New design' should be checked ///' - if (NeuesDesign.IsEnabled <> TRUE) then - warnlog "NewDesign is not enabled by default :-(" - endif - '/// click button 'Next >>' ///' - Weiter.Click - WaitSlot (1000) - Printlog "'/// now we are on the dialog -2- 'Publication Type & Options' ///'" - Kontext "HTMLExport2" - '/// checkbox 'Standard HTML Format' is checked by default ///' - if (Standard.IsChecked <> TRUE) then - warnlog "Standard is not enabled by default :-(" - Standard.Check - end if - '/// checkbox 'Title Page' is checked by default ///' - if Not TitelseiteErzeugen.IsChecked Then - TitelSeiteErzeugen.Check - Warnlog "- 'create Titlepage' should be checked as default :-(" - end if - if (gApplication = "IMPRESS") then - '/// if applcation is impress: the checkbox 'Show notes' is enabled by default///' - If (Notizenanzeigen.IsChecked <> TRUE) Then - warnlog "- 'Show notes' checked as default :-(" - Notizenanzeigen.Check - end if - end if - '/// click button 'Next >>' ///' - Weiter.Click - Printlog "'/// now we are on the dialog -3- 'png/gif/jpeg & resolution & sound' ///'" - Kontext "HTMLExport3" - '/// checkbox 'PNG' is checked by default ///' - if (PNG.isChecked <> TRUE) then - warnlog "Save Graphic as 'PNG' is not checked as default :-(" - PNG.Check - end if - '/// Listbox compression '75%' is selected by default ///' - if (Kompressionswert.GetSelText <> "75%") then - warnlog "'Compression' should be '75%', but is: '" + Kompressionswert.GetSelText + "'" - Kompressionswert.Select "75%" - end if - '/// checkbox 'low monitor resolution' is checked by default ///' - if (NiedrigeAufloesung.IsChecked <> TRUE)Then - warnlog "Monitor resolution 'low' is not selected as default :-(" - NiedrigeAufloesung.Check - end if - '/// checkbox 'export sounds' is checked by default ///' - if (KlaengeExportieren.IsChecked <> true) then - warnlog "'Export Sounds' is not checked as default :-(" - KlaengeExportieren.Check - end if - '/// click button 'Next >>' ///' - Weiter.Click - WaitSlot (1000) - Printlog "'/// now we are on the dialog -4- 'Information for the title page' ///'" - Kontext "HTMLExport4" - '/// the names you entered in the options have to appeare here! ///' - sTemp = Autor.GetText - Autor1=Autor.GetText - if (sTemp <> "Garfield Peanuts") then - warnlog "Value for 'Author' is other than expected, should 'Garfield Peanuts', is: '"+sTemp+"'" - end if - sTemp = EMail.GetText - Adresse1=EMail.GetText - if (sTemp <> "recumbent@sun.com") then - warnlog "Value for 'Email' is other than expected, should be 'recumbent@sun.com', is: '"+sTemp+"'" - end if - '/// set text in field 'your homepage' ///' - Homepage.SetText "mahler" - AdditionalInformation.SetText "QualityApprooved" - '/// click button 'Next >>' ///' - Weiter.Click - WaitSlot (2000) - Printlog "'/// now we are on the dialog -5- 'select button style' ///'" - Kontext "HTMLExport5" - WaitSlot (5000) - '/// checkbox 'Text only' should be checked by default ///' - if (NurText.ischecked <> TRUE) then - warnlog "'Text only' is not checked by default :-(" - NurText.check - end if - '/// click button 'Next >>' ///' - Weiter.Click - WaitSlot (1000) - Printlog "'/// now we are on the dialog -6- 'select color scheme' ///'" - Kontext "HTMLExport6" - WaitSlot (2000) - ' maybe check if colour dialog comes up ?! TBO - 'Text - 'Hyperlink - 'AktiverLink - 'GesichteterLink - 'Hintergrund - '/// 'Apply color schemes from document' should be checked per default :-) ///' - if (FarbenAusDok.IsChecked <> TRUE) Then - warnlog "'Apply color schemes from document' should be checked per default :-(" - FarbenAusDok.Check - end if - WaitSlot (2000) - '/// click button 'Create' ///' - HTMLExport6.OK - WaitSlot (5000) - Printlog "'/// now we are on the dialog -7- 'Name HTML Design' ///'" - Kontext "HTMLDesign" - WaitSlot (1000) - Designname.SetText "Lem's Standard" - HTMLDesign.OK - WaitSlot (3000) - Kontext "active" - if active.exists (5) then - printlog " the name for this design already exists : '" + active.GetText+ "'" - printlog " SAY YES!------------------" - active.yes - end if - '/// check number and names of created files ///' - Printlog "used file name: '" + sFile + "'" - Liste(0) = 0 - GetFileList ((ConvertPath (gOfficePath + "user\work\html\")), "*.*" , Liste() ) - WaitSlot (1000) - x = ListCount(Liste()) -' Printlog "gApplication is: " + gApplication ' For debugging - FHA - if gApplication = "DRAW" then - if (x <> "3") then - Warnlog "- Number of files is not correct, it should be:3 but it is: '" + x + "' - Draw" - for i=1 to x - printlog "("+i+"/"+x+"): '"+Liste(i)+"'" - next - end if - else - if (x <> "4") then - Warnlog "- Number of files is not correct, it should be:4 but it is: '" + x + "' - Impress" - for i=1 to x - printlog "("+i+"/"+x+"): '"+Liste(i)+"'" - next - end if - end if - '/// check if fileextension is common - .htm or .html for all files the same ///' - Liste(0) = 0 - GetFileList ((ConvertPath (gOfficePath + "user\work\html\")), "*.htm" , Liste() ) - WaitSlot (1000) - x = ListCount(Liste()) - Liste(0) = 0 - GetFileList ((ConvertPath (gOfficePath + "user\work\html\")), "*.html" , Liste() ) - WaitSlot (1000) - i = ListCount(Liste()) - if ((x > 0) AND (i > 0)) Then - Warnlog " fileextension is different between HTML-files :-( (htm/html)" - Warnlog " htm : " + x - Warnlog " html: " + i - end if -'------------------------------------------------------------------------------------------------------------------------------ - Printlog "'/// check if design is created in dialog ///'" - WaitSlot (3000) - '/// File->Export ///' - FileExport - Kontext "ExportierenDlg" - '/// Set Filename to "user\\work\\html\\expo.html" ///' - Dateiname.SetText sFile - try - '/// select Filetype 'HTML...' aka 'WebPage' ///' - Dateityp.Select gHTMLFilter - catch - errorlog " Filter not available :-( : '"+gHTMLFilter+"'" - endcatch - WaitSlot (1000) - '/// click button 'save' ///' - Speichern.Click - WaitSlot (1000) - Kontext "Active" - ' active about overwriting existing file - if Active.Exists Then Active.Yes -'-------------------------------------------------------------------------- - WaitSlot (1000) - Kontext "HTMLExport1" - WaitSlot (1000) - try - '/// now 'existing design' is checkable -> check it ///' - ExistierendesDesign.Check - WaitSlot (3000) - '/// there has to be 1 design in the list, select and delete it ///' - x = Designliste.GetItemCount - if (x <> 1) then - warnlog "there is an unexpected count on designs in the list, expected 1, but there are : '" + x + "'" - end if - Designliste.Select 1 - sTemp = Designliste.GetSelText - if sTemp = "Lem's Standard" Then - Printlog "- Created design exists in list and will be deleted now" + Call hNewDocument + WaitSlot (3000) + '---------------------------------- simple document ----------------------------------------------- + hTextrahmenErstellen ("This is a test text",10,10,40,20) + WaitSlot (2000) + hRechteckErstellen (50,50,70,70) + WaitSlot (3000) + '################################################################################################### + FileExport + Kontext "ExportierenDlg" + WaitSlot (1000) + gHTMLFilter = Dateityp.GetItemText(1) + Dateityp.Select(gHTMLFilter) + sFile = ConvertPath (gOfficePath + "user\work\html\expo0") + Dateiname.SetText sFile + WaitSlot (2000) + Speichern.Click + WaitSlot (3000) + Kontext "Active" + if Active.Exists Then Active.Yes + '-------------------------------------------------------------------------- + Kontext "HTMLExport1" + HTMLExport1.Cancel + WaitSlot (5000) + Liste(0) = 0 + GetFileList ((ConvertPath (gOfficePath + "user\work\html\")), "*.*" , Liste() ) + WaitSlot (1000) + Printlog "used file name: '" + sFile + "'" + if (ListCount (Liste()) > 0) then + warnlog "dialog for export was canceled, but file was created :-(" + for i = 1 to ListCount (Liste()) + Warnlog "File created: " + i + ": '" + Liste(i) + "'" + next i + KillFileList (Liste()) + end if + '################################################################################################### + FileExport + Kontext "ExportierenDlg" + WaitSlot (1000) + try + Dateityp.Select gHTMLFilter + catch + errorlog " Filter not available :-( : '"+gHTMLFilter+"'" + endcatch + WaitSlot (1000) + sFile = ConvertPath (gOfficePath + "user\work\html\expo.html") + Dateiname.SetText sFile + WaitSlot (2000) + Speichern.Click + WaitSlot (3000) + Kontext "Active" + if Active.Exists Then Active.Yes + '-------------------------------------------------------------------------- + Kontext "HTMLExport1" + if (NeuesDesign.IsEnabled <> TRUE) then + warnlog "NewDesign is not enabled by default :-(" + endif + Weiter.Click + WaitSlot (1000) + Kontext "HTMLExport2" + if (Standard.IsChecked <> TRUE) then + warnlog "Standard is not enabled by default :-(" + Standard.Check + end if + if Not TitelseiteErzeugen.IsChecked Then + TitelSeiteErzeugen.Check + Warnlog "- 'create Titlepage' should be checked as default :-(" + end if + if (gApplication = "IMPRESS") then + If (Notizenanzeigen.IsChecked <> TRUE) Then + warnlog "- 'Show notes' checked as default :-(" + Notizenanzeigen.Check + end if + end if + Weiter.Click + Kontext "HTMLExport3" + if (PNG.isChecked <> TRUE) then + warnlog "Save Graphic as 'PNG' is not checked as default :-(" + PNG.Check + end if + if (Kompressionswert.GetSelText <> "75%") then + warnlog "'Compression' should be '75%', but is: '" + Kompressionswert.GetSelText + "'" + Kompressionswert.Select "75%" + end if + if (NiedrigeAufloesung.IsChecked <> TRUE)Then + warnlog "Monitor resolution 'low' is not selected as default :-(" + NiedrigeAufloesung.Check + end if + if (KlaengeExportieren.IsChecked <> true) then + warnlog "'Export Sounds' is not checked as default :-(" + KlaengeExportieren.Check + end if + Weiter.Click WaitSlot (1000) - DesignLoeschen.Click + Kontext "HTMLExport4" + sTemp = Autor.GetText + Autor1=Autor.GetText + if (sTemp <> "Garfield Peanuts") then + warnlog "Value for 'Author' is other than expected, should 'Garfield Peanuts', is: '"+sTemp+"'" + end if + sTemp = EMail.GetText + Adresse1=EMail.GetText + if (sTemp <> "recumbent@sun.com") then + warnlog "Value for 'Email' is other than expected, should be 'recumbent@sun.com', is: '"+sTemp+"'" + end if + Homepage.SetText "mahler" + AdditionalInformation.SetText "QualityApprooved" + Weiter.Click WaitSlot (2000) - else - Warnlog "- Created design does not appear in the list it is: '"+sTemp+"'" - end if - catch - Warnlog "- List could not be accessed" - endcatch - WaitSlot (5000) - HTMLExport1.OK - kontext "Active" - if Active.Exists then - Active.Yes - end if - Call hCloseDocument - Printlog "used file name: '" + sFile + "'" - ' TBOTODO CHECK files contenet ! + Kontext "HTMLExport5" + WaitSlot (5000) + if (NurText.ischecked <> TRUE) then + warnlog "'Text only' is not checked by default :-(" + NurText.check + end if + Weiter.Click + WaitSlot (1000) + Kontext "HTMLExport6" + WaitSlot (2000) + ' maybe check if colour dialog comes up ?! TBO + 'Text + 'Hyperlink + 'AktiverLink + 'GesichteterLink + 'Hintergrund + if (FarbenAusDok.IsChecked <> TRUE) Then + warnlog "'Apply color schemes from document' should be checked per default :-(" + FarbenAusDok.Check + end if + WaitSlot (2000) + HTMLExport6.OK + WaitSlot (5000) + Kontext "HTMLDesign" + WaitSlot (1000) + Designname.SetText "Lem's Standard" + HTMLDesign.OK + WaitSlot (3000) + Kontext "active" + if active.exists (5) then + printlog " the name for this design already exists : '" + active.GetText+ "'" + printlog " SAY YES!------------------" + active.yes + end if + Printlog "used file name: '" + sFile + "'" + Liste(0) = 0 + GetFileList ((ConvertPath (gOfficePath + "user\work\html\")), "*.*" , Liste() ) + WaitSlot (1000) + x = ListCount(Liste()) + ' Printlog "gApplication is: " + gApplication ' For debugging - FHA + if gApplication = "DRAW" then + if (x <> "3") then + Warnlog "- Number of files is not correct, it should be:3 but it is: '" + x + "' - Draw" + for i=1 to x + printlog "("+i+"/"+x+"): '"+Liste(i)+"'" + next + end if + else + if (x <> "4") then + Warnlog "- Number of files is not correct, it should be:4 but it is: '" + x + "' - Impress" + for i=1 to x + printlog "("+i+"/"+x+"): '"+Liste(i)+"'" + next + end if + end if + Liste(0) = 0 + GetFileList ((ConvertPath (gOfficePath + "user\work\html\")), "*.htm" , Liste() ) + WaitSlot (1000) + x = ListCount(Liste()) + Liste(0) = 0 + GetFileList ((ConvertPath (gOfficePath + "user\work\html\")), "*.html" , Liste() ) + WaitSlot (1000) + i = ListCount(Liste()) + if ((x > 0) AND (i > 0)) Then + Warnlog " fileextension is different between HTML-files :-( (htm/html)" + Warnlog " htm : " + x + Warnlog " html: " + i + end if + '------------------------------------------------------------------------------------------------------------------------------ + WaitSlot (3000) + FileExport + Kontext "ExportierenDlg" + Dateiname.SetText sFile + try + Dateityp.Select gHTMLFilter + catch + errorlog " Filter not available :-( : '"+gHTMLFilter+"'" + endcatch + WaitSlot (1000) + Speichern.Click + WaitSlot (1000) + Kontext "Active" + ' active about overwriting existing file + if Active.Exists Then Active.Yes + '-------------------------------------------------------------------------- + WaitSlot (1000) + Kontext "HTMLExport1" + WaitSlot (1000) + try + ExistierendesDesign.Check + WaitSlot (3000) + x = Designliste.GetItemCount + if (x <> 1) then + warnlog "there is an unexpected count on designs in the list, expected 1, but there are : '" + x + "'" + end if + Designliste.Select 1 + sTemp = Designliste.GetSelText + if sTemp = "Lem's Standard" Then + Printlog "- Created design exists in list and will be deleted now" + WaitSlot (1000) + DesignLoeschen.Click + WaitSlot (2000) + else + Warnlog "- Created design does not appear in the list it is: '"+sTemp+"'" + end if + catch + Warnlog "- List could not be accessed" + endcatch + WaitSlot (5000) + HTMLExport1.OK + kontext "Active" + if Active.Exists then + Active.Yes + end if + Call hCloseDocument + Printlog "used file name: '" + sFile + "'" + ' TBOTODO CHECK files contenet ! endcase 'tHtmlExport '------------------------------------------------------------------------------- @@ -356,400 +305,324 @@ testcase tHtmlExport_Webcast dim Liste ( 200 ) as String dim sFile as string - '/// create directories if not exists and delete the content, if exists user\\work\\html\\[asp|perl]\\ ///' - app.mkDir (ConvertPath (gOfficePath + "user\work\html\asp\")) - app.mkDir (ConvertPath (gOfficePath + "user\work\html\perl\")) - Liste(0) = 0 - GetFileList ((ConvertPath (gOfficePath + "user\work\html\asp\")), "*.*" , Liste() ) - WaitSlot (1000) - if (KillFileList (Liste()) <> TRUE) then - for i = 1 to ListCount (Liste()) - Warnlog "File Not deleted: " + i + ": '" + Liste(i) + "'" - next i - end if - Liste(0) = 0 - GetFileList ((ConvertPath (gOfficePath + "user\work\html\perl\")), "*.*" , Liste() ) - WaitSlot (1000) - if (KillFileList (Liste()) <> TRUE) then - for i = 1 to ListCount (Liste()) - Warnlog "File Not deleted: " + i + ": '" + Liste(i) + "'" - next i - end if + app.mkDir (ConvertPath (gOfficePath + "user\work\html\asp\")) + app.mkDir (ConvertPath (gOfficePath + "user\work\html\perl\")) + Liste(0) = 0 + GetFileList ((ConvertPath (gOfficePath + "user\work\html\asp\")), "*.*" , Liste() ) + WaitSlot (1000) + if (KillFileList (Liste()) <> TRUE) then + for i = 1 to ListCount (Liste()) + Warnlog "File Not deleted: " + i + ": '" + Liste(i) + "'" + next i + end if + Liste(0) = 0 + GetFileList ((ConvertPath (gOfficePath + "user\work\html\perl\")), "*.*" , Liste() ) + WaitSlot (1000) + if (KillFileList (Liste()) <> TRUE) then + for i = 1 to ListCount (Liste()) + Warnlog "File Not deleted: " + i + ": '" + Liste(i) + "'" + next i + end if - '/// File->Autopillot->Presentation... ///'---------------------------------- FileAutopilotPresentation Kontext "Active" if Active.Exists(1) then WarnlogActive.GetText try - Active.OK + Active.OK catch - Active.No + Active.No endcatch goto endsub end if - '/// Page 1 of autopilot///' Kontext "AutopilotPraesentation1" - '/// uncheck 'preview' ///' Preview.Uncheck - '/// click on button 'create' ///' AutopilotPraesentation1.OK WaitSlot (3000) '************************************************************ Page 1 - Printlog "'/// create a presentation and save it for further references ///'" - '/// start creating the presentation now ///'------------------------------- Printlog "- Create presentation" - '/// select 'click to add title' with [TAB] and press [F2] to edit the placeholder title ///' hTypeKeys "" WaitSlot (2000) Select Case Ucase(gApplication) - case "DRAW" : hMouseClick DocumentDraw,50,50 - case "IMPRESS" : hMouseClick DocumentImpress,50,50 + case "DRAW" : hMouseClick DocumentDraw,50,50 + case "IMPRESS" : hMouseClick DocumentImpress,50,50 end select WaitSlot (3000) - '/// Type 'This is a test text', select it. ///' hTextrahmenErstellen ("This is a test text",10,10,40,20) EditSelectAll Kontext "TextObjectbar" - '/// click 'bold text' in object toolbar ///' Fett.Click WaitSlot (2000) - '/// press [esacpe][tab] to get out of edit mode and select the next placeholder ///' hTypeKeys "" WaitSlot (1000) - '/// SlideShow->Effects ///' SlideShowCustomAnimation WaitSlot (1000) Kontext "Tasks" WaitSlot (1000) EffectAdd.Click - '/// Dialog 'Custom Animation' comes up ///' kontext - '/// Switch to TabPage: Entrance ///' active.setPage(TabEntrance) Kontext "TabEntrance" if TabEntrance.Exists (5) then - WaitSlot (1000) - '/// select effect 'ABC v' :-) ///' - Effects.Select(5) - '/// select speed 'slow' -> first item in list ///' - Speed.Select 1 - try - TabEntrance.Ok - catch - errorlog "SlideShowEffects wasnt closed as it should have been" - endcatch - if TabEntrance.Exists then - TabEntrance.Close - warnlog "TabEntrance.Ok didn't seem to close the dialog." - else - printlog "TabEntrance was closed as it should" - end if - kontext "Tasks" - end if - WaitSlot (3000) - '/// activate grafik insert dialog by typing [return] ///' -'Doesnt work, will work when accessability works better - FHA. + WaitSlot (1000) + Effects.Select(5) + Speed.Select 1 + try + TabEntrance.Ok + catch + errorlog "SlideShowEffects wasnt closed as it should have been" + endcatch + if TabEntrance.Exists then + TabEntrance.Close + warnlog "TabEntrance.Ok didn't seem to close the dialog." + else + printlog "TabEntrance was closed as it should" + end if + kontext "Tasks" + end if + WaitSlot (3000) + 'Doesnt work, will work when accessability works better - FHA. -' hTypeKEys "" ' i love accessability feartures .-))))))))))))))))) - InsertGraphicsFromFile - Kontext "GrafikEinfuegenDlg" - if GrafikEinfuegenDlg.Exists <> TRUE then - WaitSlot (1000) - end if - '/// insert grafik: global\\input\\graf_inp\\borabora.jpg ///' - Dateiname.SetText ConvertPath (gTesttoolPath + "global\input\graf_inp\borabora.jpg") - WaitSlot (3000) - Oeffnen.Click - WaitSlot (2000) - '/// select 'click to add an outline' with [TAB] and press [F2] to edit the placeholder ///' - hTypeKeys "" - '/// insert text and select the words by typing [strg a] ///' - hTypeKeys "MecuryVenusEarthMarsJupiterSaturnUranusNeptunePluto" - EditSelectAll - WaitSlot (1000) - '/// format->character ///' - FormatCharacter - WaitSlot (2000) - Kontext - Active.SetPage TabFont - Kontext "TabFont" - '/// set font size to '18' on tabpage 'font' ///' - try - SizeWest.SetText "18" - catch - Size.SetText "18" - endcatch - '/// click button OK ///' - TabFont.OK - WaitSlot (1000) - '/// click 'bold text' in object toolbar ///' - Kontext "TextObjectbar" - try - usebindings - Fett.Click 'culprint - catch - warnlog "Objectbar 'Text' not available :-( / didn't change automatical!" - hTypeKeys "" - WaitSlot (1000) - hTypeKeys "" - hTypeKeys "" - hTypeKeys "" - Kontext "TextObjectbar" - try - usebindings - Fett.Click 'culprint - catch - warnlog "darn again TBO" - endcatch - endcatch - WaitSlot (2000) - '/// SlideShow-> CustomAnimation ///' - SlideShowCustomAnimation - WaitSlot (1000) - Kontext "Tasks" - WaitSlot (1000) - EffectChange.Click - kontext - '/// Switch to TabPage: Entrance ///' - active.setPage(TabEntrance) - kontext "TabEntrance" - Effects.TypeKeys "",8 - Speed.Select 2 - try - TabEntrance.Ok - catch - warnlog "select another effect, assign is not possible" - endcatch -'************************************************************ Page 2 Merkur - '/// create a 2nd slide with: insert->slide ///' - InsertSlide - WaitSlot (2000) - hTypekeys "" - WaitSlot (2000) - '/// select 'click to add title' with [TAB] and press [F2] to edit the placeholder title ///' - hTypeKeys "" - WaitSlot (2000) - '/// Type 'MERKUR', select it via Edit-Select All///' - hTextrahmenErstellen ("MERKUR",10,10,60,30) - EditSelectAll - WaitSlot (2000) - '/// click 'bold text' in object toolbar ///' - Kontext "TextObjectbar" - Fett.Click - WaitSlot (1000) - '/// press [esacpe][tab][return] to get out of edit mode and select the next placeholder and activate grafik insert dialog ///' -' hTypeKeys "" - hTypeKeys "" - InsertGraphicsFromFile - WaitSlot (4000) - '/// insert grafik: global\\input\\graf_inp\\borabora.jpg ///' - Kontext "GrafikEinfuegenDlg" - Dateiname.SetText ConvertPath (gTesttoolPath + "global\input\graf_inp\borabora.jpg") - WaitSlot (3000) - Oeffnen.Click - WaitSlot (2000) - '/// select 'click to add an outline' with [TAB] and press [F2] to edit the placeholder ///' - hTypeKeys "" - '/// insert text and select the words by typing [strg a] ///' - WaitSlot (1000) - hTypeKeys "Reciprocal Mass *5972000Mass (Erde=1) 0,0558Mass in kg 3,30310" - hTypeKeys "Equator-radius (km) 2440Equator-radius (Erde=1)0,382Middle density (kg/m^3) 5400" - hTypeKeys "Gravity acceleration at the equator (m/s^2) 3,78Flightvelocity at the equator (km/s) 4,3Sidereal rotationtime 58,65 Tage" - hTypeKeys "Bias of the equatorplane against the orbitplane 0>Time of circulation 88 daysDistance to the sun Sun (km) 58Mio.Temperatur at the day 350C" - hTypeKeys "Temperatur at night -170CDiameter (km) 4800" - EditSelectAll - WaitSlot (1000) - '/// format->character ///' - FormatCharacter - WaitSlot (2000) - Kontext - Active.SetPage TabFont - Kontext "TabFont" - '/// set font size to '18' on tabpage 'font' ///' - try - SizeWest.SetText "16" - catch - Size.SetText "16" - endcatch - '/// click button OK ///' - TabFont.OK - WaitSlot (2000) - '/// click 'bold text' in object toolbar ///' - Kontext "TextObjectbar" - try - Fett.Click 'culprint - catch - warnlog "Objectbar 'Text' not available :-( / didn't change automatical!" - hTypeKeys "" - WaitSlot (1000) - hTypeKeys "" - hTypeKeys "" - hTypeKeys "" - Kontext "TextObjectbar" - try - Fett.Click 'culprint - catch - warnlog "darn again TBO" - endcatch - endcatch - WaitSlot (2000) - '/// save file with impress filter : "user\\work\\webcast.odp" ///' - sFile = ConvertPath (gOfficePath + "user\work\webcast") - if (Dir (sFile + ".odp") <> "") then app.kill (sFile + ".odp") - WaitSlot (2000) - hFileSaveAsWithFilterKill ((sFile + ".odp") , "impress8" ) - Printlog "saved presentation: '" + sFile + ".odp" -'----------------------------------- Exportieren als ASP Web-Cast - Printlog "'/// export as webcast ASP ///'" - '/// File->SaveAs ///' - FileExport - WaitSlot (2000) - Kontext "ExportierenDlg" - try - '/// select Filetype 'HTML...' aka 'WebPage' ///' - gHTMLFilter = Dateityp.GetItemText(1) - Dateityp.Select(gHTMLFilter) - catch - errorlog " Filter not available :-( : '"+gHTMLFilter+"'" - Dateityp.Select 1 '/// Selects the first entry - which should be html ///' - endcatch - '/// Set Filename to "user\\work\\webcst_asp.html" ///' - sFile = ConvertPath (gOfficePath + "user\work\html\asp\webcast.html") - Dateiname.SetText sFile - '/// click button 'save' ///' - Speichern.Click - WaitSlot (5000) - Kontext "Active"' ????????? TBO - if Active.Exists (5) Then Active.Yes - WaitSlot (3000) - '/// now we are on the dialog -1- 'Assign design' ///' - Kontext "HTMLExport1" - WaitSlot (2000) - '/// click button 'Next >>' ///' - Weiter.Click - WaitSlot (2000) - '/// now we are on the dialog -2- 'Publication Type & Options' ///' - Kontext "HTMLExport2" - WaitSlot (2000) - Printlog "'/// check 'WebCast' ///" - WebCast.Check - WaitSlot (2000) - Printlog "'/// check 'Active Server Pages (ASP)' ///" - ASP.Check - '/// click button 'Next >>' ///' - Weiter.Click - '/// now we are on the dialog -3- 'gif/jpeg & resolution & sound' ///' - Kontext "HTMLExport3" - WaitSlot (2000) - '/// check Save graphics as 'GIF' ///' - Gif.Check - '/// check 'Medium (monitor) Resolution' ///' - MittlereAufloesung.Check - WaitSlot (1000) - '/// click button 'Create' ///' - HTMLExport3.OK - WaitSlot (2000) - '/// now we are on the dialog -7- 'Name HTML Design' ///' - Kontext "HTMLDesign" - '/// click button 'Do Not Save' ///' - if HTMLDesign.Exists Then HTMLDesign.Cancel - iWaitIndex = 0 - do while HTMLDesign.Exists AND iWaitIndex < 30 - WaitSlot (1000) - iWaitIndex = iWaitIndex + 1 - loop - Printlog "- Check number of safed files" - Printlog "file saved: '" + sFile + "'" - Liste(0) = 0 - GetFileList ((ConvertPath (gOfficePath + "user\work\html\asp\")), "*.*" , Liste() ) - WaitSlot (1000) - x = ListCount(Liste()) - if (x <> "11") Then - Warnlog "- Number of files is not correct, it should be:11 but it is: '" + x + "'" - for i=1 to x - printlog "("+i+"/"+x+"): '"+Liste(i)+"'" - next - end if -'----------------------------------- Exportieren als ASP Web-Cast - Printlog "'/// export as webcast PERL ///'" - Kontext "DocumentImpress" - WaitSlot (2000) - '/// File->export ///' - FileExport - WaitSlot (2000) - Kontext "ExportierenDlg" - '/// select Filetype 'HTML...' aka 'WebPage' ///' - try - Dateityp.Select gHTMLFilter - catch - errorlog " Filter not available :-( : '"+gHTMLFilter+"'" - Dateityp.Select 1 ' selects the first one just in case anything else is selected. - printlog "Selected " + Dateityp.GetSelText + " manually." - endcatch - WaitSlot (1000) - '/// Set Filename to "user\\work\\wbcst_p.html" ///' - sFile = ConvertPath (gOfficePath + "user\work\html\perl\webcast") - Dateiname.SetText sFile - '/// click button 'save' ///' - Speichern.Click - WaitSlot (2000) - Kontext "Active" '/// click button 'save' ///' - if Active.Exists Then Active.Yes - WaitSlot (2000) - '/// now we are on the dialog -1- 'Assign design' ///' - Kontext "HTMLExport1" - WaitSlot (2000) - '/// click button 'Next >>' ///' - Weiter.Click - WaitSlot (2000) - '/// now we are on the dialog -2- 'Publication Type & Options' ///' - Kontext "HTMLExport2" - WaitSlot (2000) - Printlog "'/// check 'WebCast' ///" - WebCast.Check - WaitSlot (2000) - Printlog "'/// check 'Perl' ///" - PERL.Check - WaitSlot (1000) - '/// 'URL for listeners' ///' - printlog "URL for listeners compare to to TBO: '"+BeamerURL.GetText+"'" - '/// set 'URL for presentation' to 'wbcst_prl.html' ///' - PraesentationURL.SetText "wbcst_prl" - WaitSlot (1000) - '/// set 'URL for perl scrips' to '/WebCast/cgi-bin/' ///' - ScriptURL.SetText "/WebCast/cgi-bin/" - printlog "presentation url? : "+ (gOfficePath + "/WebCast/cgi-bin/wbcst_prl") - WaitSlot (1000) - '/// click button 'Next >>' ///' - Weiter.Click - WaitSlot (1000) - '/// now we are on the dialog -3- 'gif/jpeg & resolution & sound' ///' - Kontext "HTMLExport3" - WaitSlot (1000) - '/// check Save graphics as 'GIF' ///' - Gif.Check - '/// check 'Medium (monitor) Resolution' ///' - MittlereAufloesung.Check - WaitSlot (3000) - '/// click button 'Create' ///' - HTMLExport3.OK - WaitSlot (3000) - Kontext "HTMLDesign" - if HTMLDesign.Exists Then HTMLDesign.Cancel - Printlog "- Presentation saved and exported into both Webcast formats. all files can be found here: " + gOfficePath + "output\impress\web-cast\" - Printlog "file saved: '" + sFile + ".html'" - WaitSlot (10000) - Liste(0) = 0 - GetFileList ((ConvertPath (gOfficePath + "user\work\html\perl\")), "*.*" , Liste() ) - x = ListCount(Liste()) - if (x <> "12") Then - Warnlog "- Number of files is not correct, it should be:5 but it is: '" + x + "'" - for i=1 to x - printlog "("+i+"/"+x+"): '"+Liste(i)+"'" - next - end if - Call hCloseDocument + ' hTypeKEys "" ' i love accessability feartures .-))))))))))))))))) + InsertGraphicsFromFile + Kontext "GrafikEinfuegenDlg" + if GrafikEinfuegenDlg.Exists <> TRUE then + WaitSlot (1000) + end if + Dateiname.SetText ConvertPath (gTesttoolPath + "global\input\graf_inp\borabora.jpg") + WaitSlot (3000) + Oeffnen.Click + WaitSlot (2000) + hTypeKeys "" + hTypeKeys "MecuryVenusEarthMarsJupiterSaturnUranusNeptunePluto" + EditSelectAll + WaitSlot (1000) + FormatCharacter + WaitSlot (2000) + Kontext + Active.SetPage TabFont + Kontext "TabFont" + try + SizeWest.SetText "18" + catch + Size.SetText "18" + endcatch + TabFont.OK + WaitSlot (1000) + Kontext "TextObjectbar" + try + usebindings + Fett.Click 'culprint + catch + warnlog "Objectbar 'Text' not available :-( / didn't change automatical!" + hTypeKeys "" + WaitSlot (1000) + hTypeKeys "" + hTypeKeys "" + hTypeKeys "" + Kontext "TextObjectbar" + try + usebindings + Fett.Click 'culprint + catch + warnlog "darn again TBO" + endcatch + endcatch + WaitSlot (2000) + SlideShowCustomAnimation + WaitSlot (1000) + Kontext "Tasks" + WaitSlot (1000) + EffectChange.Click + kontext + active.setPage(TabEntrance) + kontext "TabEntrance" + Effects.TypeKeys "",8 + Speed.Select 2 + try + TabEntrance.Ok + catch + warnlog "select another effect, assign is not possible" + endcatch + '************************************************************ Page 2 Merkur + InsertSlide + WaitSlot (2000) + hTypekeys "" + WaitSlot (2000) + hTypeKeys "" + WaitSlot (2000) + hTextrahmenErstellen ("MERKUR",10,10,60,30) + EditSelectAll + WaitSlot (2000) + Kontext "TextObjectbar" + Fett.Click + WaitSlot (1000) + ' hTypeKeys "" + hTypeKeys "" + InsertGraphicsFromFile + WaitSlot (4000) + Kontext "GrafikEinfuegenDlg" + Dateiname.SetText ConvertPath (gTesttoolPath + "global\input\graf_inp\borabora.jpg") + WaitSlot (3000) + Oeffnen.Click + WaitSlot (2000) + hTypeKeys "" + WaitSlot (1000) + hTypeKeys "Reciprocal Mass *5972000Mass (Erde=1) 0,0558Mass in kg 3,30310" + hTypeKeys "Equator-radius (km) 2440Equator-radius (Erde=1)0,382Middle density (kg/m^3) 5400" + hTypeKeys "Gravity acceleration at the equator (m/s^2) 3,78Flightvelocity at the equator (km/s) 4,3Sidereal rotationtime 58,65 Tage" + hTypeKeys "Bias of the equatorplane against the orbitplane 0>Time of circulation 88 daysDistance to the sun Sun (km) 58Mio.Temperatur at the day 350C" + hTypeKeys "Temperatur at night -170CDiameter (km) 4800" + EditSelectAll + WaitSlot (1000) + FormatCharacter + WaitSlot (2000) + Kontext + Active.SetPage TabFont + Kontext "TabFont" + try + SizeWest.SetText "16" + catch + Size.SetText "16" + endcatch + TabFont.OK + WaitSlot (2000) + Kontext "TextObjectbar" + try + Fett.Click 'culprint + catch + warnlog "Objectbar 'Text' not available :-( / didn't change automatical!" + hTypeKeys "" + WaitSlot (1000) + hTypeKeys "" + hTypeKeys "" + hTypeKeys "" + Kontext "TextObjectbar" + try + Fett.Click 'culprint + catch + warnlog "darn again TBO" + endcatch + endcatch + WaitSlot (2000) + sFile = ConvertPath (gOfficePath + "user\work\webcast") + if (Dir (sFile + ".odp") <> "") then app.kill (sFile + ".odp") + WaitSlot (2000) + hFileSaveAsWithFilterKill ((sFile + ".odp") , "impress8" ) + Printlog "saved presentation: '" + sFile + ".odp" + '----------------------------------- Exportieren als ASP Web-Cast + FileExport + WaitSlot (2000) + Kontext "ExportierenDlg" + try + gHTMLFilter = Dateityp.GetItemText(1) + Dateityp.Select(gHTMLFilter) + catch + errorlog " Filter not available :-( : '"+gHTMLFilter+"'" + endcatch + sFile = ConvertPath (gOfficePath + "user\work\html\asp\webcast.html") + Dateiname.SetText sFile + Speichern.Click + WaitSlot (5000) + Kontext "Active"' ????????? TBO + if Active.Exists (5) Then Active.Yes + WaitSlot (3000) + Kontext "HTMLExport1" + WaitSlot (2000) + Weiter.Click + WaitSlot (2000) + Kontext "HTMLExport2" + WaitSlot (2000) + WebCast.Check + WaitSlot (2000) + ASP.Check + Weiter.Click + Kontext "HTMLExport3" + WaitSlot (2000) + Gif.Check + MittlereAufloesung.Check + WaitSlot (1000) + HTMLExport3.OK + WaitSlot (2000) + Kontext "HTMLDesign" + if HTMLDesign.Exists Then HTMLDesign.Cancel + iWaitIndex = 0 + do while HTMLDesign.Exists AND iWaitIndex < 30 + WaitSlot (1000) + iWaitIndex = iWaitIndex + 1 + loop + Printlog "- Check number of safed files" + Printlog "file saved: '" + sFile + "'" + Liste(0) = 0 + GetFileList ((ConvertPath (gOfficePath + "user\work\html\asp\")), "*.*" , Liste() ) + WaitSlot (1000) + x = ListCount(Liste()) + if (x <> "11") Then + Warnlog "- Number of files is not correct, it should be:11 but it is: '" + x + "'" + for i=1 to x + printlog "("+i+"/"+x+"): '"+Liste(i)+"'" + next + end if + '----------------------------------- Exportieren als ASP Web-Cast + Kontext "DocumentImpress" + WaitSlot (2000) + FileExport + WaitSlot (2000) + Kontext "ExportierenDlg" + try + Dateityp.Select gHTMLFilter + catch + errorlog " Filter not available :-( : '"+gHTMLFilter+"'" + Dateityp.Select 1 ' selects the first one just in case anything else is selected. + printlog "Selected " + Dateityp.GetSelText + " manually." + endcatch + WaitSlot (1000) + sFile = ConvertPath (gOfficePath + "user\work\html\perl\webcast") + Dateiname.SetText sFile + Speichern.Click + WaitSlot (2000) + if Active.Exists Then Active.Yes + WaitSlot (2000) + Kontext "HTMLExport1" + WaitSlot (2000) + Weiter.Click + WaitSlot (2000) + Kontext "HTMLExport2" + WaitSlot (2000) + WebCast.Check + WaitSlot (2000) + PERL.Check + WaitSlot (1000) + printlog "URL for listeners compare to to TBO: '"+BeamerURL.GetText+"'" + PraesentationURL.SetText "wbcst_prl" + WaitSlot (1000) + ScriptURL.SetText "/WebCast/cgi-bin/" + printlog "presentation url? : "+ (gOfficePath + "/WebCast/cgi-bin/wbcst_prl") + WaitSlot (1000) + Weiter.Click + WaitSlot (1000) + Kontext "HTMLExport3" + WaitSlot (1000) + Gif.Check + MittlereAufloesung.Check + WaitSlot (3000) + HTMLExport3.OK + WaitSlot (3000) + Kontext "HTMLDesign" + if HTMLDesign.Exists Then HTMLDesign.Cancel + Printlog "- Presentation saved and exported into both Webcast formats. all files can be found here: " + gOfficePath + "output\impress\web-cast\" + Printlog "file saved: '" + sFile + ".html'" + WaitSlot (10000) + Liste(0) = 0 + GetFileList ((ConvertPath (gOfficePath + "user\work\html\perl\")), "*.*" , Liste() ) + x = ListCount(Liste()) + if (x <> "12") Then + Warnlog "- Number of files is not correct, it should be:5 but it is: '" + x + "'" + for i=1 to x + printlog "("+i+"/"+x+"): '"+Liste(i)+"'" + next + end if + Call hCloseDocument - ' TBO: TODO FILECHECK IF EXISTS + ' TBO: TODO FILECHECK IF EXISTS endcase diff --git a/testautomation/graphics/optional/includes/global/g_find_replace.inc b/testautomation/graphics/optional/includes/global/g_find_replace.inc index 656fbe5f5537..49b38dd85713 100755 --- a/testautomation/graphics/optional/includes/global/g_find_replace.inc +++ b/testautomation/graphics/optional/includes/global/g_find_replace.inc @@ -1,7 +1,7 @@ 'encoding UTF-8 Do not remove or change this line! '************************************************************************** '* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. -'* +'* '* Copyright 2008 by Sun Microsystems, Inc. '* '* OpenOffice.org - a multi-platform office productivity suite @@ -43,53 +43,52 @@ '\********************************************************************************** testcase tiEditSearchAndReplace - '/// This test tests the 'Search and Replace' -dialogue. ///' - Dim sFile 'as string - Dim sExpression(2) as string ' Expression to look for: ... Replace with - dim sExt as string + Dim sFile 'as string + Dim sExpression(2) as string ' Expression to look for: ... Replace with + dim sExt as string - Select Case Ucase(gApplication) - case "DRAW" : sExt = ".odg" - case "IMPRESS" : sExt = ".odp" - end select + Select Case Ucase(gApplication) + case "DRAW" : sExt = ".odg" + case "IMPRESS" : sExt = ".odp" + end select - 'First we need some errornes words to replace. (sExpression) - 'sExpression(1) has to be 3 times in the document - select case iSprache - case 01 : sExpression(1) = "Alle" : sExpression(2) = "Allz" - case 03 : sExpression(1) = "empreza" : sExpression(2) = "Emperor" ' Portuguese - case 07 : qaerrorlog "No files for Russian yet, will use english instead." - sExpression(1) = "Alle" : sExpression(2) = "Allz" - case 30 : ' Greek - case 31 : sExpression(1) = "bedoeling" : sExpression(2) = "Bedoling" ' Netherlands - case 33 : sExpression(1) = "projjet" : sExpression(2) = "projete" ' French - case 34 : sExpression(1) = "lazsos" : sExpression(2) = "Lazsi" ' Spanish - case 35 : ' Finnish - case 36 : sExpression(1) = "Bozniai" : sExpression(2) = "Boszniai" ' Hungaria - case 37 : ' Catalan - case 39 : sExpression(1) = "Presentazione" : sExpression(2) = "Raggazi" ' Italian - case 42 : ' Czech - case 43 : ' Slowak - case 44 : ' English (GB) - case 45 : sExpression(1) = "installlere" : sExpression(2) = "installer" ' Danish - case 46 : sExpression(1) = "desa" : sExpression(2) = "ased" ' Swedish - case 47 : ' Norwegian - case 48 : sExpression(1) = "programmu" : sExpression(2) = "programu" ' Polish - case 49 : sExpression(1) = "Texxt" : sExpression(2) = "Schrieb" ' German - case 55 : sExpression(1) = "esktava" : sExpression(2) = "norte" ' Portuguese (Brazil) - case 66 : ' Thai -' case 81 : sExpression(1) = "���" : sExpression(2) = "���" ' Japanese - ' case 82 : ' Korean - ' case 86 : ' Chinese (simplified) - ' case 88 : ' Chinese (traditional) - case 90 : ' Turkish - case 91 : ' Hindi - case 96 : ' Arab - case 97 : ' Hebrew - case else : -' Warnlog "For the language " + iSprache +" nothing is prepared yet: insert text here and create the file" - printlog " :-) Will use English instead" - sExpression(1) = "Alle" : sExpression(2) = "Allz" + 'First we need some errornes words to replace. (sExpression) + 'sExpression(1) has to be 3 times in the document + select case iSprache + case 01 : sExpression(1) = "Alle" : sExpression(2) = "Allz" + case 03 : sExpression(1) = "empreza" : sExpression(2) = "Emperor" ' Portuguese + case 07 : qaerrorlog "No files for Russian yet, will use english instead." + sExpression(1) = "Alle" : sExpression(2) = "Allz" + case 30 : ' Greek + case 31 : sExpression(1) = "bedoeling" : sExpression(2) = "Bedoling" ' Netherlands + case 33 : sExpression(1) = "projjet" : sExpression(2) = "projete" ' French + case 34 : sExpression(1) = "lazsos" : sExpression(2) = "Lazsi" ' Spanish + case 35 : ' Finnish + case 36 : sExpression(1) = "Bozniai" : sExpression(2) = "Boszniai" ' Hungaria + case 37 : ' Catalan + case 39 : sExpression(1) = "Presentazione" : sExpression(2) = "Raggazi" ' Italian + case 42 : ' Czech + case 43 : ' Slowak + case 44 : ' English (GB) + case 45 : sExpression(1) = "installlere" : sExpression(2) = "installer" ' Danish + case 46 : sExpression(1) = "desa" : sExpression(2) = "ased" ' Swedish + case 47 : ' Norwegian + case 48 : sExpression(1) = "programmu" : sExpression(2) = "programu" ' Polish + case 49 : sExpression(1) = "Texxt" : sExpression(2) = "Schrieb" ' German + case 55 : sExpression(1) = "esktava" : sExpression(2) = "norte" ' Portuguese (Brazil) + case 66 : ' Thai + ' case 81 : sExpression(1) = "���" : sExpression(2) = "���" ' Japanese + ' case 82 : ' Korean + ' case 86 : ' Chinese (simplified) + ' case 88 : ' Chinese (traditional) + case 90 : ' Turkish + case 91 : ' Hindi + case 96 : ' Arab + case 97 : ' Hebrew + case else : + ' Warnlog "For the language " + iSprache +" nothing is prepared yet: insert text here and create the file" + printlog " :-) Will use English instead" + sExpression(1) = "Alle" : sExpression(2) = "Allz" end select if ((bAsianLan) OR (iSprache = 07)) then @@ -114,74 +113,61 @@ testcase tiEditSearchAndReplace Messagebox.OK end if sleep 2 - hTypeKeys "" '/// Select the text ///' - '/// Edit-Find & Replace I///' EditSearchAndReplace sleep 1 Kontext "FindAndReplace" - '/// Clap the 'more options'-part open ///' More.Click - '/// verify, that search is done without 'similarity search' !!! ///' if SimilaritySearch.IsChecked = TRUE then SimilaritySearch.UnCheck warnlog "'Similar search' checkbox was enabled! It shouldn't be the default!" end if - SearchFor.SetText sExpression(1) '/// set Search text ///' - ReplaceWith.SetText sExpression(2) '/// set Replace text///' - '/// Word has to be there ONLY three times ///' - SearchNow.Click '/// 1st search for text ///' Kontext "Messagebox" - if Messagebox.Exists(2) then - Printlog Messagebox.GetText - Messagebox.OK - end if + if Messagebox.Exists(2) then + Printlog Messagebox.GetText + Messagebox.OK + end if sleep 1 Kontext "FindAndReplace" - SearchNow.Click '/// 2nd search for text ///' Kontext "Messagebox" - if Messagebox.Exists(2) then - Printlog Messagebox.GetText - Messagebox.OK - end if + if Messagebox.Exists(2) then + Printlog Messagebox.GetText + Messagebox.OK + end if sleep 1 Kontext "FindAndReplace" - SearchNow.Click '/// 3th search for text///' Kontext "Messagebox" - if Messagebox.Exists(2) then - Printlog Messagebox.GetText - Messagebox.OK - end if + if Messagebox.Exists(2) then + Printlog Messagebox.GetText + Messagebox.OK + end if sleep 1 Kontext "FindAndReplace" - SearchNow.Click '/// 4th search for text; but it is no more available!///' sleep 2 kontext "Messagebox" if Messagebox.Exists Then Printlog "- The word was found 3 times: '" + messagebox.gettext + "'" Messagebox.OK else - SearchNow.Click '/// 5th search for word 1///' kontext if Messagebox.Exists (5) Then Printlog "?: "+Messagebox.gettext - Warnlog "- No MsgBox appeared: 'changed'" + Warnlog "- No MsgBox appeared: 'changed'" Messagebox.OK endif Warnlog "- No MsgBox appeared: 'changed'" end if - '/// Replace all ///' Kontext "FindAndReplace" sleep 1 ReplaceAll.Click Kontext "Messagebox" if Not Messagebox.Exists (2) then - ' Warnlog " Not all words are replaced" ' there never was a mesagebox ! (compared to 5.2) + ' Warnlog " Not all words are replaced" ' there never was a mesagebox ! (compared to 5.2) else printlog messagebox.gettext qaerrorlog "^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^" @@ -189,7 +175,6 @@ testcase tiEditSearchAndReplace end if Kontext "FindAndReplace" sleep 2 - SearchNow.Click '/// Search for word 1 to check if all words are replaced ///' Kontext "Messagebox" if Not Messagebox.Exists then Warnlog " Not all words are replaced (Replace All)" @@ -201,17 +186,13 @@ testcase tiEditSearchAndReplace FindAndReplace.Close sleep 3 - '/// Edit-Find & Replace II ///' gMouseClick 50,50 sleep 1 hTypeKeys "" EditSearchAndReplace sleep 1 Kontext "FindAndReplace" - SearchFor.SetText sExpression(2) '/// Search for word 2 ///' - ReplaceWith.SetText sExpression(1) '/// Replace with word 1 ///' - Replace.Click '/// Replace 1 ///' Kontext "Messagebox" if Messagebox.Exists(4) Then Kontext "Messagebox" @@ -223,7 +204,6 @@ testcase tiEditSearchAndReplace Kontext "FindAndReplace" sleep 1 - SearchNow.Click '/// 2nd search for word 2 ///' Kontext "Messagebox" if Messagebox.Exists(2) Then Warnlog " All words got replaced, but only the 1st should have been" @@ -234,7 +214,6 @@ testcase tiEditSearchAndReplace Printlog " Word replaced" end if - '/// Replace all ///' Kontext "FindAndReplace" ReplaceAll.Click kontext "Messagebox" @@ -244,7 +223,6 @@ testcase tiEditSearchAndReplace Printlog "- No messagebox after replace all" end if - '/// Search for word 2 to check if all are replaced ///' Kontext "FindAndReplace" SearchNow.Click kontext "Messagebox" @@ -259,108 +237,98 @@ testcase tiEditSearchAndReplace More.Click FindAndReplace.Close sleep 2 - '/// Close document ///' Call hCloseDocument endcase testcase tiEditSearchAndReplaceBUGS -'/// inspired by bugs: 101974, 101975, 101976 ///' - dim i as integer - dim bTemp as boolean + dim i as integer + dim bTemp as boolean - '/// open application ///' - Call hNewDocument - sleep 3 - '/// Edit->Search and Replace ///' - EditSearchAndReplace - Kontext "FindAndReplace" - if FindAndReplace.Exists (5) then - Printlog "Dialog for Search&Replace could be opened :-)" - else - Warnlog "Dialog for Search&Replace could NOT be opened :-(" - endif + Call hNewDocument + sleep 3 + EditSearchAndReplace + Kontext "FindAndReplace" + if FindAndReplace.Exists (5) then + Printlog "Dialog for Search&Replace could be opened :-)" + else + Warnlog "Dialog for Search&Replace could NOT be opened :-(" + endif - '/// for al 5 views in 'View->Workspace->...' do: ///' - for i = 1 to 6 - Printlog "- " + i + " View->Workspace->... ------------------------------------------------------" - try - select case i + for i = 1 to 6 + Printlog "- " + i + " View->Workspace->... ------------------------------------------------------" + try + select case i case 1:Printlog " Drawing" - ViewWorkspaceDrawingView + ViewWorkspaceDrawingView case 2:Printlog " Outline" - ViewWorkspaceOutlineView + ViewWorkspaceOutlineView case 3:Printlog " Slides" - ViewWorkspaceSlidesView + ViewWorkspaceSlidesView case 4:Printlog " Notes" - ViewWorkspaceNotesView + ViewWorkspaceNotesView case 5:Printlog " Handout" - ' this is done this way, to regcognize BUGID:101975 - ViewWorkspaceHandoutView + ' this is done this way, to regcognize BUGID:101975 + ViewWorkspaceHandoutView case 6:Printlog " Drawing" - ViewWorkspaceDrawingView - end select - catch - Warnlog "Couldn't excecute the last view ^^^^^^^^^ :-(" - Printlog "Will close the search&replace dialog as a workaround and then try to switch to the view again" - Kontext "FindAndReplace" - FindAndReplace.close - sleep 5 - try - select case i - case 1:ViewWorkspaceDrawingView - case 2:ViewWorkspaceOutlineView - case 3:ViewWorkspaceSlidesView - case 4:ViewWorkspaceNotesView - case 5:ViewWorkspaceHandoutView + ViewWorkspaceDrawingView end select - catch - Warnlog "Couldn't really switch the view :-(" - endcatch - endcatch - sleep 5 - Kontext "FindAndReplace" - '///+ if not already open, open. edit->search and replace ///' - if (FindAndReplace.exists <> TRUE) then - try - EditSearchAndReplace - catch - endcatch - endif - if (FindAndReplace.exists <> TRUE) then - if (i=3) then - ' SlideView - else - Warnlog "Search and replace was not open, and could not be opened :-(" - endif - else - Kontext "FindAndReplace" - '///+ set text to look for to "a" ///' - SearchFor.SetText "a" - Printlog "'///+ click button 'find' ///'" - SearchNow.Click - sleep 5 - kontext - '///+ if active exists 'wrap/not found...' say OK ///' - if active.exists(5) then - Printlog "Active: '" + active.GetText + "'" + catch + Warnlog "Couldn't excecute the last view ^^^^^^^^^ :-(" + Printlog "Will close the search&replace dialog as a workaround and then try to switch to the view again" + Kontext "FindAndReplace" + FindAndReplace.close + sleep 5 try - active.ok + select case i + case 1:ViewWorkspaceDrawingView + case 2:ViewWorkspaceOutlineView + case 3:ViewWorkspaceSlidesView + case 4:ViewWorkspaceNotesView + case 5:ViewWorkspaceHandoutView + end select catch - active.yes - sleep 2 - if active.exists(5) then - Printlog "Active: '" + active.GetText + "'" - active.ok - endif + Warnlog "Couldn't really switch the view :-(" endcatch - else - ' this is done this way, to regcognize BUGID:101974 - Warnlog "No message about 'search key not found' :-(" - endif - endif - next i - Kontext "FindAndReplace" - FindAndReplace.cancel - '/// close application ///' - Call hCloseDocument + endcatch + sleep 5 + Kontext "FindAndReplace" + if (FindAndReplace.exists <> TRUE) then + try + EditSearchAndReplace + catch + endcatch + endif + if (FindAndReplace.exists <> TRUE) then + if (i=3) then + ' SlideView + else + Warnlog "Search and replace was not open, and could not be opened :-(" + endif + else + Kontext "FindAndReplace" + SearchFor.SetText "a" + SearchNow.Click + sleep 5 + kontext + if active.exists(5) then + Printlog "Active: '" + active.GetText + "'" + try + active.ok + catch + active.yes + sleep 2 + if active.exists(5) then + Printlog "Active: '" + active.GetText + "'" + active.ok + endif + endcatch + else + ' this is done this way, to regcognize BUGID:101974 + Warnlog "No message about 'search key not found' :-(" + endif + endif + next i + Kontext "FindAndReplace" + FindAndReplace.cancel + Call hCloseDocument endcase diff --git a/testautomation/graphics/optional/includes/global/g_format.inc b/testautomation/graphics/optional/includes/global/g_format.inc index 6ba987346dae..ed738933ad37 100755 --- a/testautomation/graphics/optional/includes/global/g_format.inc +++ b/testautomation/graphics/optional/includes/global/g_format.inc @@ -1,7 +1,7 @@ 'encoding UTF-8 Do not remove or change this line! '************************************************************************** '* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. -'* +'* '* Copyright 2008 by Sun Microsystems, Inc. '* '* OpenOffice.org - a multi-platform office productivity suite @@ -53,266 +53,215 @@ testcase tiFormatText Dim ZaehlerEffekt dim sTemp as string - '/// open application ///' Call hNewDocument - '/// create a textbox with text ///' Call hTextrahmenErstellen ("This is a text, which, I hope, in Staroffice, will be automaticly formatted. Should that not be the case, then it doesn't matter.",20,20,70,20) WaitSlot (1000) - '/// click outside of textbox, to leave edit mode of textbox and deselect it ///' gMouseClick 99,99 - '/// type key [TAB] to select textbox again ///' hTypeKeys "" - '/// Format->Position and Size ///' FormatPositionAndSize - Kontext - '/// select tabpage 'Format and Size' on dialog 'Position and Size' ///' - Active.SetPage TabPositionAndSize - Kontext "TabPositionAndSize" - sleep 2 - '/// get and remember Position: 'Position X' ///' - a = PositionX.GetText - '/// close dialog 'Position and Size' with OK ///' - TabPositionAndSize.OK + Kontext + Active.SetPage TabPositionAndSize + Kontext "TabPositionAndSize" + sleep 2 + a = PositionX.GetText + TabPositionAndSize.OK - '/// Format -> Text... ///' FormatTextDraw - Kontext - '/// select tabpage 'Text' ///' - Active.SetPage TabText - Kontext "TabText" - '/// Check checkbox 'Fit width to text' ///' - BreiteAnTextAnpassen.Check - '/// leave dialog with OK ///' - TabText.OK + Kontext + Active.SetPage TabText + Kontext "TabText" + BreiteAnTextAnpassen.Check + TabText.OK - '/// Dialog should have been resized and moved now! ///' - '/// Format->Position and Size ///' ContextPositionAndSize - Kontext - '/// select tabpage 'Format and Size' on dialog 'Position and Size' ///' - Active.SetPage TabPositionAndSize - Kontext "TabPositionAndSize" - WaitSlot (2000) - '/// compare 'Position X' with saved value - has to be different ///' - sTemp = PositionX.GetText - if (sTemp <> a) Then - Printlog " - Fit to frame does work" - else - warnlog " - Fit to frame doesn't work: expected: '" + a + "' is: '" + + "'" - end if - '/// get and remember Position: 'Position Y' ///' - b=PositionY.GetText - TabPositionAndSize.OK + Kontext + Active.SetPage TabPositionAndSize + Kontext "TabPositionAndSize" + WaitSlot (2000) + sTemp = PositionX.GetText + if (sTemp <> a) Then + Printlog " - Fit to frame does work" + else + warnlog " - Fit to frame doesn't work: expected: '" + a + "' is: '" + + "'" + end if + b=PositionY.GetText + TabPositionAndSize.OK - '/// Format -> Text... ///' FormatTextDraw - Kontext - '/// select tabpage 'Text' ///' - Active.SetPage TabText - Kontext "TabText" - '/// UNCheck checkbox 'Fit width to text' ///' - BreiteAnTextAnpassen.Uncheck - '/// check checkbox 'Fit height to text' ///' - HoeheAnTextAnpassen.Check - '/// if checkbox 'Fit to frame' is enabled: this state only happens, if 'Fit height to text' and 'Fit width to text' are checked ///' - if AmRahmenAnpassen.IsEnabled Then - WarnLog " - checkbox 'Fit to frame' is enabled, which is wrong!" - else - PrintLog " - checkbox 'Fit to frame' is disabled." - end if - WaitSlot (1000) - '/// UNcheck checkbox 'Fit height to text' ///' - HoeheAnTextAnpassen.UnCheck - '/// UNCheck checkbox 'Fit width to text' ///' - BreiteAnTextAnpassen.UnCheck - '/// if checkbox 'Fit to frame' is disabled: this state only happens, if 'Fit height to text' and/or 'Fit width to text' are checked ///' - if AmRahmenAnpassen.IsEnabled Then - PrintLog " - checkbox 'Fit to frame' is enabled." - else - WarnLog " - checkbox 'Fit to frame' is disabled, which is wrong!" - end if -' PrintLog "Full width: " + GanzeBreite.IsChecked - '/// set metric field 'Left' to 10 ///' - Links.SetText "10" - '/// set metric field 'Right' to 10 ///' - Rechts.SetText "10" - '/// set metric field 'Top' to 10 ///' - Oben.SetText "10" - '/// set metric field 'Bottom' to 10 ///' - Unten.SetText "10" - '/// leave dialog with OK ///' - TabText.OK - - '/// Edit -> Select All ///' + Kontext + Active.SetPage TabText + Kontext "TabText" + BreiteAnTextAnpassen.Uncheck + HoeheAnTextAnpassen.Check + if AmRahmenAnpassen.IsEnabled Then + WarnLog " - checkbox 'Fit to frame' is enabled, which is wrong!" + else + PrintLog " - checkbox 'Fit to frame' is disabled." + end if + WaitSlot (1000) + HoeheAnTextAnpassen.UnCheck + BreiteAnTextAnpassen.UnCheck + if AmRahmenAnpassen.IsEnabled Then + PrintLog " - checkbox 'Fit to frame' is enabled." + else + WarnLog " - checkbox 'Fit to frame' is disabled, which is wrong!" + end if + ' PrintLog "Full width: " + GanzeBreite.IsChecked + Links.SetText "10" + Rechts.SetText "10" + Oben.SetText "10" + Unten.SetText "10" + TabText.OK + EditSelectAll - '/// type Keys [Strg]+[x] to cut object ///' hTypeKeys "" - '/// No object exists in dokument right now! ///' - '/// Format -> Text... ///' FormatTextDraw - Kontext - '/// select tabpage 'Text' ///' - Active.SetPage TabText - Kontext "TabText" - '/// check checkbox 'Adjust to contour' ///' - Konturfluss.Check - '/// now every other control on the dialog has to get disabled ///' - if ((AmRahmenAnpassen.IsEnabled=False) And (Links.IsEnabled=False) And (Rechts.IsEnabled=False) And (Oben.IsEnabled=False) And (Unten.IsEnabled =False)) Then - PrintLog " - Adjust to contour is working" - else - WarnLog " - contourflow aktivated doesn't work it's supposed to" - end if - '/// leave dialog with OK ///' - TabText.OK + Kontext + Active.SetPage TabText + Kontext "TabText" + Konturfluss.Check + if ((AmRahmenAnpassen.IsEnabled=False) And (Links.IsEnabled=False) And (Rechts.IsEnabled=False) And (Oben.IsEnabled=False) And (Unten.IsEnabled =False)) Then + PrintLog " - Adjust to contour is working" + else + WarnLog " - contourflow aktivated doesn't work it's supposed to" + end if + TabText.OK - '/// create a textbox with text ///' Call hTextrahmenErstellen ("blablablablablablablablablablablabla",20,20,60,60) WaitSlot (5000) - '/// Format -> Text... ///' FormatTextDraw - Kontext - '/// select tabpage 'Text Animation' ///' - Active.SetPage TabLauftext - Kontext "TabLauftext" + Kontext + Active.SetPage TabLauftext + Kontext "TabLauftext" - ZaehlerEffekt = Effekt.GetItemCount - if (ZaehlerEffekt <> 5) then - qaerrorlog "There are now more or less than 5 Effects - Change testcase! " + ZaehlerEffekt + ZaehlerEffekt = Effekt.GetItemCount + if (ZaehlerEffekt <> 5) then + qaerrorlog "There are now more or less than 5 Effects - Change testcase! " + ZaehlerEffekt + end if + for n=1 to ZaehlerEffekt + Effekt.Select n + printlog "" + n + ": '" + Effekt.getSelText + "' -------------------------------" + if (n > 2) then + for i = 1 to 4 + printlog "" + i + select case i + case 1: NachOben.click + case 2: NachLinks.click + case 3: NachRechts.click + case 4: NachUnten.click + end select + sFormatTextDrawAnimation + next i end if - for n=1 to ZaehlerEffekt - Effekt.Select n - printlog "" + n + ": '" + Effekt.getSelText + "' -------------------------------" - if (n > 2) then - '/// test all directions ///' - for i = 1 to 4 - printlog "" + i - select case i - case 1: NachOben.click - case 2: NachLinks.click - case 3: NachRechts.click - case 4: NachUnten.click - end select - sFormatTextDrawAnimation - next i - end if - if ((n > 1) AND (n < 5)) then - '/// test all Start/End Text visibility ///' - for i = 1 to 4 - printlog "" + i - select case i - case 1: TextSichtbarBeimStarten.check : TextSichtbarBeimBeenden.uncheck - case 2: TextSichtbarBeimBeenden.check - case 3: TextSichtbarBeimStarten.uncheck - case 4: TextSichtbarBeimBeenden.uncheck - end select - sFormatTextDrawAnimation - next i - end if - if ((n > 1) AND (n < 5)) then - '/// test all Animation cycles ///' - for i = 1 to 3 - printlog "" + i - select case i - case 1: Endlos.check - case 2: Endlos.UnCheck : Anzahl.typeKeys ("") - case 3: If Endlos.IsChecked = true then - QaErrorLog "#i74067# - Checkbox checked when it shouldn't have been." - Endlos.UnCheck - end if - Anzahl.setText ("1") - end select - sFormatTextDrawAnimation - next i - end if - if (n > 2) then - '/// test all Increment ///' - for i = 1 to 4 - printlog "" + i - select case i - case 1: Pixel.check : Schrittweite.setText("1") - case 2: printlog "#114551# Loop, if Step greater than object size" - case 3: Pixel.UnCheck : Schrittweite.typeKeys ("") - case 4: printlog "#114551# Loop, if Step greater than object size" - end select - sFormatTextDrawAnimation - next i - end if - if (n > 1) then - '/// test all Delay ///' - for i = 1 to 3 - printlog "" + i - select case i - case 1: Automatisch.check - case 2: Automatisch.UnCheck : Verzoegerung.setText("1") - case 3: Verzoegerung.typeKeys ("") - end select - sFormatTextDrawAnimation - next i - end if - next n - TabLauftext.OK - Call hCloseDocument + if ((n > 1) AND (n < 5)) then + for i = 1 to 4 + printlog "" + i + select case i + case 1: TextSichtbarBeimStarten.check : TextSichtbarBeimBeenden.uncheck + case 2: TextSichtbarBeimBeenden.check + case 3: TextSichtbarBeimStarten.uncheck + case 4: TextSichtbarBeimBeenden.uncheck + end select + sFormatTextDrawAnimation + next i + end if + if ((n > 1) AND (n < 5)) then + for i = 1 to 3 + printlog "" + i + select case i + case 1: Endlos.check + case 2: Endlos.UnCheck : Anzahl.typeKeys ("") + case 3: If Endlos.IsChecked = true then + QaErrorLog "#i74067# - Checkbox checked when it shouldn't have been." + Endlos.UnCheck + end if + Anzahl.setText ("1") + end select + sFormatTextDrawAnimation + next i + end if + if (n > 2) then + for i = 1 to 4 + printlog "" + i + select case i + case 1: Pixel.check : Schrittweite.setText("1") + case 2: printlog "#114551# Loop, if Step greater than object size" + case 3: Pixel.UnCheck : Schrittweite.typeKeys ("") + case 4: printlog "#114551# Loop, if Step greater than object size" + end select + sFormatTextDrawAnimation + next i + end if + if (n > 1) then + for i = 1 to 3 + printlog "" + i + select case i + case 1: Automatisch.check + case 2: Automatisch.UnCheck : Verzoegerung.setText("1") + case 3: Verzoegerung.typeKeys ("") + end select + sFormatTextDrawAnimation + next i + end if +next n +TabLauftext.OK +Call hCloseDocument endcase 'tiFormatText '------------------------------------------------------------------------------- testcase tdFormatLayer - '/// open application ///' Call hNewDocument - '/// Edit->Layer->Insert (in DRAW also via Insert->Layer) ///' InsertLayer - Kontext "EbeneEinfuegenDlg" - EbenenName.SetText " Test 4" - LayerTitle.SetText " Test no 4" - LayerDescription.SetText " This is the Description of the Layer." - EbeneEinfuegenDlg.OK + Kontext "EbeneEinfuegenDlg" + EbenenName.SetText " Test 4" + LayerTitle.SetText " Test no 4" + LayerDescription.SetText " This is the Description of the Layer." + EbeneEinfuegenDlg.OK - '/// Edit->Layer->Modify (in DRAW also via Format->Layer)///' FormatLayer - Kontext "EbeneAendernDlg" - if EbenenName.GetText = " Test 4" Then - EbenenName.SetText "Layer 5" - end if - if LayerTitle.GetText = " Test no 4" Then - LayerTitle.SetText "Layer test 5" - end if - if LayerDescription.GetText = " This is the Description of the Layer." Then - LayerDescription.SetText " This is the changed Description of the Layer." - end if + Kontext "EbeneAendernDlg" + if EbenenName.GetText = " Test 4" Then + EbenenName.SetText "Layer 5" + end if + if LayerTitle.GetText = " Test no 4" Then + LayerTitle.SetText "Layer test 5" + end if + if LayerDescription.GetText = " This is the Description of the Layer." Then + LayerDescription.SetText " This is the changed Description of the Layer." + end if - Sichtbar.Check - Druckbar.Check - Gesperrt.Check - EbeneAendernDlg.OK + Sichtbar.Check + Druckbar.Check + Gesperrt.Check + EbeneAendernDlg.OK - '/// Edit->Layer->Modify (in DRAW also via Format->Layer)///' FormatLayer - Kontext "EbeneAendernDlg" - if EbenenName.GetText <> "Layer 5" Then - WarnLog " Name-Value either didn't change at all, or was empty. Expected: 'Layer 5', but was: " + EbenenName.GetText - end if - if LayerTitle.GetText <> "Layer test 5" Then - WarnLog " Title-Value either didn't change at all, or was empty. Expected: 'Layer test 5', but was: " + LayerTitle.GetText - end if - if LayerDescription.GetText <> " This is the changed Description of the Layer." Then - WarnLog " Description-Value either didn't change at all, or was empty. Expected: ' This is the changed Description of the Layer.', but was: " + LayerDescription.GetText - end if - - if Sichtbar.IsChecked=False Then - WarnLog " Value changed: visible" - end if - if Druckbar.IsChecked=False Then - WarnLog " Value changed: printable" - end if - if Gesperrt.IsChecked=False then - WarnLog " Value changed: locked" - end if - EbeneAendernDlg.OK + Kontext "EbeneAendernDlg" + if EbenenName.GetText <> "Layer 5" Then + WarnLog " Name-Value either didn't change at all, or was empty. Expected: 'Layer 5', but was: " + EbenenName.GetText + end if + if LayerTitle.GetText <> "Layer test 5" Then + WarnLog " Title-Value either didn't change at all, or was empty. Expected: 'Layer test 5', but was: " + LayerTitle.GetText + end if + if LayerDescription.GetText <> " This is the changed Description of the Layer." Then + WarnLog " Description-Value either didn't change at all, or was empty. Expected: ' This is the changed Description of the Layer.', but was: " + LayerDescription.GetText + end if + + if Sichtbar.IsChecked=False Then + WarnLog " Value changed: visible" + end if + if Druckbar.IsChecked=False Then + WarnLog " Value changed: printable" + end if + if Gesperrt.IsChecked=False then + WarnLog " Value changed: locked" + end if + EbeneAendernDlg.OK - '/// close application ///' Call hCloseDocument endcase 'tdFormatLayer @@ -325,36 +274,33 @@ testcase tdFormatConnector dim sTemp as string dim cDecSep as string - if (gApplication = "IMPRESS") then + if (gApplication = "IMPRESS") then ExtensionString = "odp" else ExtensionString = "odg" end if Call hNewDocument - '/// insert connector /// - kontext "Connectorsbar" - if Connectorsbar.Exists then - Connectorsbar.Close - end if - - kontext "Toolbar" - Sleep (1) - try - Verbinder.TearOff ' insert connector - catch - warnlog "bug for GH from TBO; .tearoff doesn't tell success" - endcatch + kontext "Connectorsbar" + if Connectorsbar.Exists then + Connectorsbar.Close + end if + + kontext "Toolbar" + Sleep (1) + try + Verbinder.TearOff ' insert connector + catch + warnlog "bug for GH from TBO; .tearoff doesn't tell success" + endcatch kontext "Connectorsbar" Verbinder.click gMouseMove ( 10,10,30,30) Call hCloseDocument - '/// Open file with a finished scenario ///' - hFileOpen ConvertPath (gTesttoolPath + "graphics\required\input\FormatConnector." + ExtensionString) + hFileOpen ConvertPath (gTesttoolPath + "graphics\required\input\FormatConnector." + ExtensionString) sleep (1) - '/// Check if the document is writable ///' if fIsDocumentWritable = false then ' Make the document writable and check if it's succesfull if fMakeDocumentWritable = false then @@ -364,7 +310,6 @@ testcase tdFormatConnector end if gMouseClick 1,1 - '/// Press TAB three times to select the connector. ///' hTypekeys "" hTypekeys "" hTypekeys "" @@ -374,72 +319,72 @@ testcase tdFormatConnector sleep (3) hMenuSelectNr(2) ' Connector Kontext "Verbinder" - Typ.Select 2 ' the one with 2 from 3 posibilities to set a value... - Sleep (1) - AnfangHorizontal.SetText "1" - Verbinder.TypeKeys "" - AnfangVertikal.SetText "1" + Typ.Select 2 ' the one with 2 from 3 posibilities to set a value... + Sleep (1) + AnfangHorizontal.SetText "1" + Verbinder.TypeKeys "" + AnfangVertikal.SetText "1" + Verbinder.TypeKeys "" + EndeHorizontal.SetText "1" + Verbinder.TypeKeys "" + EndeVertikal.SetText "1" + Verbinder.TypeKeys "" + printlog EndeVertikal.getText + try + Linie1.SetText "10" Verbinder.TypeKeys "" - EndeHorizontal.SetText "1" + sTemp = Linie1.getText + sUnit = GetMeasUnit(sTemp) + cDecSep = GetDecimalSeperator(sTemp) + catch + PrintLog " Lineoffset not activated -> you have to choose another linetype: 1" + endcatch + try + Linie2.SetText "10" Verbinder.TypeKeys "" - EndeVertikal.SetText "1" + catch + PrintLog " Lineoffset not activated -> you have to choose another linetype: 2" + endcatch + try + Linie3.SetText "10" Verbinder.TypeKeys "" - printlog EndeVertikal.getText - try - Linie1.SetText "10" - Verbinder.TypeKeys "" - sTemp = Linie1.getText - sUnit = GetMeasUnit(sTemp) - cDecSep = GetDecimalSeperator(sTemp) - catch - PrintLog " Lineoffset not activated -> you have to choose another linetype: 1" - endcatch - try - Linie2.SetText "10" - Verbinder.TypeKeys "" - catch - PrintLog " Lineoffset not activated -> you have to choose another linetype: 2" - endcatch - try - Linie3.SetText "10" - Verbinder.TypeKeys "" - catch - PrintLog " Lineoffset not activated -> you have to choose another linetype: 3 when will this be enabled ?" - endcatch + catch + PrintLog " Lineoffset not activated -> you have to choose another linetype: 3 when will this be enabled ?" + endcatch Verbinder.OK FormatConnector - Kontext "Verbinder" - sTemp = AnfangHorizontal.GetText + Kontext "Verbinder" + sTemp = AnfangHorizontal.GetText - if fCompareTwoValues(sTemp, "1"+cDecSep+"00"+sUnit) Then - WarnLog " value not changed" - printlog "AnfangHorizontal = is '" + sTemp + "' should: '"+"1"+cDecSep+"00"+sUnit+"'" - end if - if fCompareTwoValues(AnfangVertikal.GetText, "1"+cDecSep+"00"+sUnit) Then - WarnLog " value not changed" - printlog "AnfangVertikal.GetText = " + AnfangVertikal.GetText - end if - if fCompareTwoValues(EndeHorizontal.GetText, "1"+cDecSep+"00"+sUnit) Then - WarnLog " value not changed" - printlog "EndeHorizontal.GetText = " + EndeHorizontal.GetText - end if - if fCompareTwoValues(EndeVertikal.GetText, "1"+cDecSep+"00"+sUnit) Then - WarnLog " value not changed" - printlog "EndeHorizontal.GetText = " + EndeHorizontal.GetText - end if + if fCompareTwoValues(sTemp, "1"+cDecSep+"00"+sUnit) Then + WarnLog " value not changed" + printlog "AnfangHorizontal = is '" + sTemp + "' should: '"+"1"+cDecSep+"00"+sUnit+"'" + end if + if fCompareTwoValues(AnfangVertikal.GetText, "1"+cDecSep+"00"+sUnit) Then + WarnLog " value not changed" + printlog "AnfangVertikal.GetText = " + AnfangVertikal.GetText + end if + if fCompareTwoValues(EndeHorizontal.GetText, "1"+cDecSep+"00"+sUnit) Then + WarnLog " value not changed" + printlog "EndeHorizontal.GetText = " + EndeHorizontal.GetText + end if + if fCompareTwoValues(EndeVertikal.GetText, "1"+cDecSep+"00"+sUnit) Then + WarnLog " value not changed" + printlog "EndeHorizontal.GetText = " + EndeHorizontal.GetText + end if - Zaehler = Typ.GetItemCount - for i = 1 to Zaehler - Typ.Select i - SetClipboard Typ.GetSelText - Verbinder.OK - FormatConnector - Kontext "Verbinder" - if GetClipboardText <> Typ.GetSelText Then - WarnLog " Selection not saved. Was: " + Typ.GetSelText + " . But should have been: " +GetClipboardText - end if - next i + Zaehler = Typ.GetItemCount + for i = 1 to Zaehler + Typ.Select i + SetClipboard Typ.GetSelText + Verbinder.OK + FormatConnector + Kontext "Verbinder" + if GetClipboardText <> Typ.GetSelText Then + WarnLog " Selection not saved. Was: " + Typ.GetSelText + " . But should have been: " +GetClipboardText + end if + next i Verbinder.OK Call hCloseDocument endcase 'tdFormatConnector @@ -453,41 +398,41 @@ testcase tiFormatPositionAndSize Dim b 'Variable fuer Breite Dim r 'Variable fuer Radius Dim w 'Variable fuer Winkel - -printlog "New impress doc" - Call hNewDocument + + printlog "New impress doc" + Call hNewDocument WaitSlot (3000) printlog "RECTANGLE-----1/2" printlog "create rectangle" - Call hRechteckErstellen (20,20,70,30) + Call hRechteckErstellen (20,20,70,30) WaitSlot (1000) gMouseClick 50,25 WaitSlot (1000) printlog "Format-position and size" - ContextPositionAndSize - WaitSlot (1000) - Kontext - printlog "TabPositionAndSize" - Active.SetPage TabPositionAndSize - Kontext "TabPositionAndSize" - printlog "put x and y position into clipboard" - printlog "x = " & PositionX.GetText - printlog "y = " & PositionY.GetText - SetClipboard (PositionX.GetText + PositionY.GetText) - TabPositionAndSize.OK + ContextPositionAndSize + WaitSlot (1000) + Kontext + printlog "TabPositionAndSize" + Active.SetPage TabPositionAndSize + Kontext "TabPositionAndSize" + printlog "put x and y position into clipboard" + printlog "x = " & PositionX.GetText + printlog "y = " & PositionY.GetText + SetClipboard (PositionX.GetText + PositionY.GetText) + TabPositionAndSize.OK WaitSlot (1000) printlog "move rectangle down and right" - hTypeKeys "",10 + hTypeKeys "",10 hTypeKeys "",10 printlog "open PositionAndSize" ContextPositionAndSize - WaitSlot (1000) - Kontext - printlog "TabPositionAndSize" - Active.SetPage TabPositionAndSize - Kontext "TabPositionAndSize" - printlog "control position changes with clipboard content" - if (PositionX.GetText + PositionY.GetText) = GetClipboardText Then WarnLog "Der Dialog hat die Positionsaenderung nicht registriert" + WaitSlot (1000) + Kontext + printlog "TabPositionAndSize" + Active.SetPage TabPositionAndSize + Kontext "TabPositionAndSize" + printlog "control position changes with clipboard content" + if (PositionX.GetText + PositionY.GetText) = GetClipboardText Then WarnLog "Der Dialog hat die Positionsaenderung nicht registriert" printlog "set position of rectange using the edit fields" PositionX.SetText "2" x=PositionX.GetText @@ -496,198 +441,197 @@ printlog "New impress doc" printlog "check protect" ProtectPosition.Check TabPositionAndSize.OK - WaitSlot (1000) - ContextPositionAndSize - WaitSlot (1000) - Kontext - Active.SetPage TabPositionAndSize - Kontext "TabPositionAndSize" - printlog "check if values are correct" - if PositionX.GetText = x And PositionY.GetText = y Then PrintLog " Values could be changed" - printlog "check if protect works" - if PositionX.GetText<> x Then - WarnLog "Protect does not work" - else - PrintLog "Protext works, X axis checked" - end if - if PositionY.GetText<> y Then - WarnLog "Protect does not work" - else - PrintLog " Protext does work, checked y axis" - end if - printlog "uncheck protect" - ProtectPosition.UnCheck - TabPositionAndSize.OK - WaitSlot (1000) - ContextPositionAndSize - WaitSlot (1000) - Kontext - printlog "TabPositionAndSize" - WaitSlot (1000) - Active.SetPage TabPositionAndSize - Kontext "TabPositionAndSize" - printlog "set width to 10" WaitSlot (1000) - Width.SetText "10" - printlog "put value into a variable" - WaitSlot (1000) - b=Width.GetText - printlog "Width is " & b - SetClipboard Width.GetText - '/// set heigth to 5 ///' - Height.SetText "5" - printlog "put value into variable" - WaitSlot (1000) - h=Height.GetText - printlog "Height is " & h - printlog "check protect" - ProtectPosition.Check - printlog "close dialog" - TabPositionAndSize.OK - WaitSlot (1000) - ContextPositionAndSize + ContextPositionAndSize WaitSlot (1000) Kontext Active.SetPage TabPositionAndSize Kontext "TabPositionAndSize" - WaitSlot (2000) - printlog "control size changes" - printlog "Width value is: " & Width.GetText - printlog "Value from Clipboard is: " & GetClipboardText - if Width.GetText = GetClipboardText Then - PrintLog " Size of rectangle could be changed. It is = " + Width.GetText + " but it should be = " + b - else - WarnLog " Controls for height and width do not work" - end if - printlog "Uncheck the Position-Protection, so we can work with this window." - if ProtectPosition.isChecked = FALSE then - printlog "Should be checked since it was checked just 16 rows ago" - ErrorLog "ProtectPosition was not checked - why?" - else - ProtectPosition.Uncheck - end if + printlog "check if values are correct" + if PositionX.GetText = x And PositionY.GetText = y Then PrintLog " Values could be changed" + printlog "check if protect works" + if PositionX.GetText<> x Then + WarnLog "Protect does not work" + else + PrintLog "Protext works, X axis checked" + end if + if PositionY.GetText<> y Then + WarnLog "Protect does not work" + else + PrintLog " Protext does work, checked y axis" + end if + printlog "uncheck protect" + ProtectPosition.UnCheck + TabPositionAndSize.OK + WaitSlot (1000) + ContextPositionAndSize + WaitSlot (1000) + Kontext + printlog "TabPositionAndSize" + WaitSlot (1000) + Active.SetPage TabPositionAndSize + Kontext "TabPositionAndSize" + printlog "set width to 10" + WaitSlot (1000) + Width.SetText "10" + printlog "put value into a variable" + WaitSlot (1000) + b=Width.GetText + printlog "Width is " & b + SetClipboard Width.GetText + Height.SetText "5" + printlog "put value into variable" + WaitSlot (1000) + h=Height.GetText + printlog "Height is " & h + printlog "check protect" + ProtectPosition.Check + printlog "close dialog" + TabPositionAndSize.OK + WaitSlot (1000) + ContextPositionAndSize + WaitSlot (1000) + Kontext + Active.SetPage TabPositionAndSize + Kontext "TabPositionAndSize" + WaitSlot (2000) + printlog "control size changes" + printlog "Width value is: " & Width.GetText + printlog "Value from Clipboard is: " & GetClipboardText + if Width.GetText = GetClipboardText Then + PrintLog " Size of rectangle could be changed. It is = " + Width.GetText + " but it should be = " + b + else + WarnLog " Controls for height and width do not work" + end if + printlog "Uncheck the Position-Protection, so we can work with this window." + if ProtectPosition.isChecked = FALSE then + printlog "Should be checked since it was checked just 16 rows ago" + ErrorLog "ProtectPosition was not checked - why?" + else + ProtectPosition.Uncheck + end if - KeepRatio.Check - printlog "raise value for width" - Width.More 5 - if Height.GetText = h Then - WarnLog " Keep ratio does not work properly" - else - PrintLog " Keep ratio does work" - KeepRatio.UnCheck - end if - TabPositionAndSize.OK - WaitSlot (2000) - gMouseClick 90,90 - WaitSlot (2000) - printlog "Now trying TEXT..." - printlog "create textbox" - Call hTextrahmenErstellen ("Never before have I written such a meaning" ,10,10,60,20) - WaitSlot (2000) - printlog "Format-Postion and Size" - FormatPositionAndSize - WaitSlot (1000) - Kontext - printlog "TabPositionAndSize" - Active.SetPage TabPositionAndSize - Kontext "TabPositionAndSize" - printlog "default value ?: width :-----"+Width.IsEnabled - printlog "check fit width to text" - if Width.IsEnabled then FitWidthText.Check - if Width.IsEnabled = True Then - WarnLog " Fit width does not work" - else - PrintLog " Fit width does work" - end if - printlog "fit heigth to text" - FitHeightText.Check - if Height.IsEnabled = True Then - WarnLog " fit heigth doe not work" - else - PrintLog " fit heigth does work" - end if - ' PrintLog " Fit width to text active: " + FitWidthText.IsChecked - ' PrintLog " Fit heigth to text active: " + FitHeightText.IsChecked - printlog "uncheck fit width to text" - FitWidthText.UnCheck - printlog "uncheck fit heigth to text" - FitHeightText.Uncheck - TabPositionAndSize.OK - WaitSlot (1000) - hTypeKeys "",2 - hTypeKeys "",2 - WaitSlot (1000) - ContextPositionAndSize - WaitSlot (1000) - Kontext - Active.SetPage TabPositionAndSize - Kontext "TabPositionAndSize" - printlog "check x-position of textbox" - SetClipboard PositionX.GetText - WaitSlot (1000) - Kontext - printlog "set rotation angle to 50 and position x and y to 1" - Active.SetPage TabDrehung - Kontext "TabDrehung" - PositionX.SetText "1" - PositionY.SetText "1" - Winkel.SetText "50" - w=Winkel.GetText - TabDrehung.OK - WaitSlot (3000) + KeepRatio.Check + printlog "raise value for width" + Width.More 5 + if Height.GetText = h Then + WarnLog " Keep ratio does not work properly" + else + PrintLog " Keep ratio does work" + KeepRatio.UnCheck + end if + TabPositionAndSize.OK + WaitSlot (2000) + gMouseClick 90,90 + WaitSlot (2000) + printlog "Now trying TEXT..." + printlog "create textbox" + Call hTextrahmenErstellen ("Never before have I written such a meaning" ,10,10,60,20) + WaitSlot (2000) + printlog "Format-Postion and Size" + FormatPositionAndSize + WaitSlot (1000) + Kontext + printlog "TabPositionAndSize" + Active.SetPage TabPositionAndSize + Kontext "TabPositionAndSize" + printlog "default value ?: width :-----"+Width.IsEnabled + printlog "check fit width to text" + if Width.IsEnabled then FitWidthText.Check + if Width.IsEnabled = True Then + WarnLog " Fit width does not work" + else + PrintLog " Fit width does work" + end if + printlog "fit heigth to text" + FitHeightText.Check + if Height.IsEnabled = True Then + WarnLog " fit heigth doe not work" + else + PrintLog " fit heigth does work" + end if + ' PrintLog " Fit width to text active: " + FitWidthText.IsChecked + ' PrintLog " Fit heigth to text active: " + FitHeightText.IsChecked + printlog "uncheck fit width to text" + FitWidthText.UnCheck + printlog "uncheck fit heigth to text" + FitHeightText.Uncheck + TabPositionAndSize.OK + WaitSlot (1000) + hTypeKeys "",2 + hTypeKeys "",2 + WaitSlot (1000) + ContextPositionAndSize + WaitSlot (1000) + Kontext + Active.SetPage TabPositionAndSize + Kontext "TabPositionAndSize" + printlog "check x-position of textbox" + SetClipboard PositionX.GetText + WaitSlot (1000) + Kontext + printlog "set rotation angle to 50 and position x and y to 1" + Active.SetPage TabDrehung + Kontext "TabDrehung" + PositionX.SetText "1" + PositionY.SetText "1" + Winkel.SetText "50" + w=Winkel.GetText + TabDrehung.OK + WaitSlot (3000) - printlog "check position of manipulated textbox" - ContextPositionAndSize - WaitSlot (3000) - Kontext - Active.SetPage TabPositionAndSize - Kontext "TabPositionAndSize" - if PositionX = GetClipboardText Then PrintLog " Position changed due to rotation" - Kontext - Active.SetPage TabDrehung - Kontext "TabDrehung" - WaitSlot (1000) - printlog "check rotation angle" - if Winkel.GetText = w Then PrintLog " Object rotated" - TabDrehung.OK + printlog "check position of manipulated textbox" + ContextPositionAndSize + WaitSlot (3000) + Kontext + Active.SetPage TabPositionAndSize + Kontext "TabPositionAndSize" + if PositionX = GetClipboardText Then PrintLog " Position changed due to rotation" + Kontext + Active.SetPage TabDrehung + Kontext "TabDrehung" + WaitSlot (1000) + printlog "check rotation angle" + if Winkel.GetText = w Then PrintLog " Object rotated" + TabDrehung.OK - printlog "RECTANGLE-----2/2" - printlog "create rectangle" - Call hRechteckErstellen (10,60,70,90) - WaitSlot (2000) - ContextPositionAndSize - WaitSlot (1000) - Kontext - Active.SetPage TabPositionAndSize - Kontext "TabPositionAndSize" - printlog "put x-axis postion of rectangle into clipboard" - SetClipboard PositionX.GetText - Kontext - printlog "set slant angle to 5" - Active.SetPage TabSchraegstellen - Kontext "TabSchraegstellen" - WaitSlot (1000) - printlog "set radius to 5" - Radius.SetText "5" - r=Radius.GetText - Winkel.SetText w - TabSchraegstellen.OK - WaitSlot (1000) - ContextPositionAndSize - Kontext - Active.SetPage TabPositionAndSize - Kontext "TabPositionAndSize" - if PositionX <> GetClipboardText Then PrintLog " Object changed position due to scaling" - printlog "Before we change tab, we set the Position-marker back to checked " - ProtectPosition.Check - Kontext - printlog "check slant angle and radius" - Active.SetPage TabSchraegstellen - Kontext "TabSchraegstellen" - if Radius.GetText = r Then PrintLog " Cornwer radius changed" - if Winkel.GetText =w Then PrintLog " Object rotated over 45°" - TabSchraegstellen.OK - Call hCloseDocument + printlog "RECTANGLE-----2/2" + printlog "create rectangle" + Call hRechteckErstellen (10,60,70,90) + WaitSlot (2000) + ContextPositionAndSize + WaitSlot (1000) + Kontext + Active.SetPage TabPositionAndSize + Kontext "TabPositionAndSize" + printlog "put x-axis postion of rectangle into clipboard" + SetClipboard PositionX.GetText + Kontext + printlog "set slant angle to 5" + Active.SetPage TabSchraegstellen + Kontext "TabSchraegstellen" + WaitSlot (1000) + printlog "set radius to 5" + Radius.SetText "5" + r=Radius.GetText + Winkel.SetText w + TabSchraegstellen.OK + WaitSlot (1000) + ContextPositionAndSize + Kontext + Active.SetPage TabPositionAndSize + Kontext "TabPositionAndSize" + if PositionX <> GetClipboardText Then PrintLog " Object changed position due to scaling" + printlog "Before we change tab, we set the Position-marker back to checked " + ProtectPosition.Check + Kontext + printlog "check slant angle and radius" + Active.SetPage TabSchraegstellen + Kontext "TabSchraegstellen" + if Radius.GetText = r Then PrintLog " Cornwer radius changed" + if Winkel.GetText =w Then PrintLog " Object rotated over 45°" + TabSchraegstellen.OK + Call hCloseDocument endcase 'tiFormatPositionAndSize '------------------------------------------------------------------------------- @@ -705,82 +649,67 @@ testcase tiFormat3D_Effekte Dim Zaehler as integer Dim Posi as string - Call hNewDocument + Call hNewDocument printlog "new document" '-----------------------------------RECTANGLE------------------------------------------------------ - Call hRechteckErstellen (20,20,60,70) '/// create rectangle ///' WaitSlot (1000) - ContextPositionAndSize '/// get position and size of rectangle ///' - Kontext - Active.SetPage TabPositionAndSize - Kontext "TabPositionAndSize" - PositionX.SetText "5" - X=PositionX.GetText - printlog "--- created RECTANGLE; xPosition @ "+ x - TabPositionAndSize.OK - ContextConvertInto3D '/// convert rectangle into 3d ///' + Kontext + Active.SetPage TabPositionAndSize + Kontext "TabPositionAndSize" + PositionX.SetText "5" + X=PositionX.GetText + printlog "--- created RECTANGLE; xPosition @ "+ x + TabPositionAndSize.OK WaitSlot (1000) Kontext "Drei_D_Effekte" if Drei_D_Effekte.exists(3) then - qaerrorlog " The 3D-Effects-dialogue was open. Check why." + qaerrorlog " The 3D-Effects-dialogue was open. Check why." else - Format3D_Effects '/// open 3d flyer///' end if - try - if Perspektive.isvisible then - Perspektive.Click '/// check perspective ///' - else - warnlog "why not in draw?" - end if - catch - warnlog "something is wrong mit perspective" - endcatch - Zuweisen.Click '/// assign perspective ///' - Kontext "DocumentImpress" - gMouseClick 40,40 - ContextPositionAndSize '/// check position and size ///' - Kontext - Active.SetPage TabPositionAndSize - Kontext "TabPositionAndSize" - if PositionX.GetText = X Then - printlog "- Perspective acitvated x: "+PositionX.GetText - else - warnlog "- Perspective seems to have a problem, x value has changed!" - end if - TabPositionAndSize.OK - Kontext "Drei_D_Effekte" - Aktualisieren.Click - Drei_D_Effekte.Close - EditSelectAll '/// delete rectangle ///' + try + if Perspektive.isvisible then + else + warnlog "why not in draw?" + end if + catch + warnlog "something is wrong mit perspective" + endcatch + Kontext "DocumentImpress" + gMouseClick 40,40 + Kontext + Active.SetPage TabPositionAndSize + Kontext "TabPositionAndSize" + if PositionX.GetText = X Then + printlog "- Perspective acitvated x: "+PositionX.GetText + else + warnlog "- Perspective seems to have a problem, x value has changed!" + end if + TabPositionAndSize.OK + Kontext "Drei_D_Effekte" + Aktualisieren.Click + Drei_D_Effekte.Close hTypeKeys "" '-----------------------------------RECTANGLE------------------------------------------------------ - hRechteckErstellen (20,20,60,70) '/// create new rectangle ///' printlog "--- created RECTANGLE 2" - Format3D_Effects '/// open 3d flyer ///' Kontext "Drei_D_Effekte" - Rotationskoerper.Click '/// create lathe object ///' WaitSlot (1000) Kontext "DocumentImpress" - ContextPositionAndSize '/// check position and size ///' - Kontext - Active.SetPage TabPositionAndSize - Kontext "TabPositionAndSize" - if PositionX.GetText = X Then - Warnlog "- Rectangle not converted into a lath object; x: "+PositionX.GetText - else - Printlog "- Creating a lath object seems to work" - end if - TabPositionAndSize.OK + Kontext + Active.SetPage TabPositionAndSize + Kontext "TabPositionAndSize" + if PositionX.GetText = X Then + Warnlog "- Rectangle not converted into a lath object; x: "+PositionX.GetText + else + Printlog "- Creating a lath object seems to work" + end if + TabPositionAndSize.OK EditSelectAll - hTypeKeys "" '/// delete object ///' Sleep (1) '-----------------------------------RECTANGLE------------------------------------------------------ - hRechteckErstellen (20,20,60,70) '/// create rectangle ///' printlog "--- created RECTANGLE 3" Kontext "Drei_D_Effekte" WaitSlot (1000) - In_3D_Umwandeln.Click '/// convert to 3d in 3d flyer ///' WaitSlot (2000) gMouseClick 40,40 qaerrorlog "#i92910: automation: crash when executing tiFormat3D_Effekte in test g_format" @@ -790,219 +719,179 @@ testcase tiFormat3D_Effekte 'gMouseClick 90,90 'select case gApplication ' case "DRAW" : if y = 13 then - ' Printlog "- 3D object created" - ' else + ' Printlog "- 3D object created" + ' else ' Warnlog " Context-menu-entry-number was wrong. Expected 13, but was " + y + "." ' end if - ' case else : if y = 15 then - ' Printlog "- 3D object created" - ' else + ' case else : if y = 15 then + ' Printlog "- 3D object created" + ' else ' Warnlog " Context-menu-entry-number was wrong. Expected 15, but was " + y + "." - ' end if + ' end if 'end select - + EditSelectAll - hTypeKeys "" '/// delete object ///' '-----------------------------------ZYLINDER------------------------------------------------------ Sleep (1) printlog "--- create CYLINDER" - WL_SD_Zylinder '/// create cylinder ///' - gMousemove 30,30,80,80 '/// This affects the Vertical-value down to 15 ///' Sleep (1) hTypeKeys "" Kontext "Drei_D_Effekte" - Geometrie.Click '/// geometry ///' WaitSlot (1000) ' Endwinkel.More - Vert=Vertikale_Segmente.GetText '/// get value for vertical segments (default) ///' - Hor =Horizontale_Segmente.GetText '/// get value for horizontal segments (default) ///' - Rund=Kantenrundung.GetText '/// get value for edge rounding ///' - Skal=Tiefenskalierung.GetText '/// get value for scale ///' - Tief=Tiefe.GetText '/// get value for depth ///' - Winkel=Endwinkel.GetText '/// get value for angle ///' - - '/// Check if every entry has a value <> "" -> an init value is shown. ///' + if Vert ="" then warnlog "Vertical Segment has no init value" - if Hor ="" then warnlog "Horizontal Segment has no init value" - if Rund ="" then warnlog "Rounded edges has no init value" - if Skal ="" then warnlog "Scaled depth has no init value" - if Tief ="" then warnlog "Depth has no init value" - if Winkel="" then printlog "Rotation angle has no init value" + if Hor ="" then warnlog "Horizontal Segment has no init value" + if Rund ="" then warnlog "Rounded edges has no init value" + if Skal ="" then warnlog "Scaled depth has no init value" + if Tief ="" then warnlog "Depth has no init value" + if Winkel="" then printlog "Rotation angle has no init value" - '/// Go back to the 3d-effects-dialogue and change the value for the cylinder ///' - hTypeKeys "" '/// Deselect object and check if 3d controller has default values again ///' - Kontext "Drei_D_Effekte" + Kontext "Drei_D_Effekte" - '/// Check if value for vertical segments has changed in 3d controller ///' - if Vertikale_Segmente.GetText = Vert Then - Printlog "- Vertical segment value read from object's properties in the 3d flyer" - else - Warnlog "- 3D flyer could not read vertical segment information from object. It is = '"+ Vertikale_Segmente.GetText + "' but should be = '" + Vert + "'" - end if + if Vertikale_Segmente.GetText = Vert Then + Printlog "- Vertical segment value read from object's properties in the 3d flyer" + else + Warnlog "- 3D flyer could not read vertical segment information from object. It is = '"+ Vertikale_Segmente.GetText + "' but should be = '" + Vert + "'" + end if - if Horizontale_Segmente.GetText = Hor Then '/// check if value for horizontal segments has changed ///' - Printlog "- Horizontal segment value read from object's properties in the 3d flyer" - else - Warnlog "- 3D flyer not be able to read horizonal segment information from object. It is = '"+ Horizontale_Segmente.GetText + "' but should be = '" + Hor + "'" - end if + Printlog "- Horizontal segment value read from object's properties in the 3d flyer" + else + Warnlog "- 3D flyer not be able to read horizonal segment information from object. It is = '"+ Horizontale_Segmente.GetText + "' but should be = '" + Hor + "'" + end if - if Kantenrundung.GetText = Rund Then '/// check if value for edge rounding has changed ///' - Printlog "- Rounded edges works" - else - Warnlog "- Rounded edges value could not be read by the 3d flyer It is = '" + Kantenrundung.GetText + "' but should be = '" + rund + "'" - end if + Printlog "- Rounded edges works" + else + Warnlog "- Rounded edges value could not be read by the 3d flyer It is = '" + Kantenrundung.GetText + "' but should be = '" + rund + "'" + end if - if Tiefenskalierung.GetText = Skal Then '/// check value for scale ///' - Printlog "- Scaled depth works" - else - Warnlog "- Scale depth value could not be read by the 3d flyer It is = '" + Tiefenskalierung.GetText + "' but should be = '" + skal + "'" - end if + Printlog "- Scaled depth works" + else + Warnlog "- Scale depth value could not be read by the 3d flyer It is = '" + Tiefenskalierung.GetText + "' but should be = '" + skal + "'" + end if - if Tiefe.GetText = Tief Then '/// check value for depth ///' - Printlog "- Depth value could be read by the 3d flyer" - else - Warnlog "- Depth value of object could not be read by the flyer It is = '"+ Tiefe.GetText + "' but should be = '" + tief + "'" - end if - - if Endwinkel.GetText = Winkel Then '/// check value for angle ///' - Printlog "- Angle value could be read by the 3d flyer" - else - Warnlog "- Angle value is not correct" - end if + Printlog "- Depth value could be read by the 3d flyer" + else + Warnlog "- Depth value of object could not be read by the flyer It is = '"+ Tiefe.GetText + "' but should be = '" + tief + "'" + end if - hTypeKeys "" '/// deselect object and check if 3d controller has default values again ///' - Kontext "Drei_D_Effekte" - Sleep (2) - Printlog "- check if 3D flyer goes back to default values if object is deselected" - if Vertikale_Segmente.GetText <> Vert Then Warnlog " Vertical Segment - Default value is wrong is: "+Vertikale_Segmente.GetText+"; should: " +vert - if Horizontale_Segmente.GetText <> Hor Then Warnlog " Horizontal Segment - Default value is wrong" - if Kantenrundung.GetText <> Rund Then Warnlog " Rounded edges - Default value is wrong" - if Tiefenskalierung.GetText <> Skal Then Warnlog " Scaled depth - Default value is wrong" - if Endwinkel.GetText <> Winkel Then Warnlog " Rotation angle - Default value is wrong" - if Tiefe.GetText<>Tief Then Warnlog " Depth - Default value is wrong" + Printlog "- Angle value could be read by the 3d flyer" + else + Warnlog "- Angle value is not correct" + end if - hTypeKeys "" - Kontext "Drei_D_Effekte" + Kontext "Drei_D_Effekte" Sleep (2) - Horizontale_Segmente.SetText "32" '/// change horizontal and vertical segments ///' - Vertikale_Segmente.SetText "32" - Kantenrundung.SetText "100" - Endwinkel.Settext "300" - Tiefenskalierung.SetText "500" - Tiefe.SetText "100" - Zuweisen.Click '/// assign changes ///' - - WaitSlot (1000) '/// check value changes ///' - if Vertikale_Segmente.GetText = Vert Then Warnlog "- Default value is wrong" - if Horizontale_Segmente.GetText = Hor Then Warnlog "- Default value is wrong" - if Kantenrundung.GetText = Rund Then Warnlog "- Default value is wrong" - if Tiefenskalierung.GetText = Skal Then Warnlog "- Default value is wrong" - if Endwinkel.GetText = Winkel Then Warnlog "- Default value is wrong" - if Tiefe.GetText=Tief Then Warnlog "- Default value is wrong" - EditSelectAll - hTypeKeys "" '/// delete cylinder ///' + Printlog "- check if 3D flyer goes back to default values if object is deselected" + if Vertikale_Segmente.GetText <> Vert Then Warnlog " Vertical Segment - Default value is wrong is: "+Vertikale_Segmente.GetText+"; should: " +vert + if Horizontale_Segmente.GetText <> Hor Then Warnlog " Horizontal Segment - Default value is wrong" + if Kantenrundung.GetText <> Rund Then Warnlog " Rounded edges - Default value is wrong" + if Tiefenskalierung.GetText <> Skal Then Warnlog " Scaled depth - Default value is wrong" + if Endwinkel.GetText <> Winkel Then Warnlog " Rotation angle - Default value is wrong" + if Tiefe.GetText<>Tief Then Warnlog " Depth - Default value is wrong" - '-----------------------------------ZYLINDER------------------------------------------------------ - WL_SD_Zylinder '/// create new cylinder ///' - gMouseMove (20,20,60,60) - WaitSlot (3000) - Kontext "Drei_D_Effekte" - Printlog "- Change basic geometric parameters for the object" - Printlog "Segments : Horizontal: 8; Vertical: 8; Rounded edges: 50 %" - Horizontale_Segmente.SetText "8" '/// changing values for cylinder ///' - Vertikale_Segmente.SetText "8" - Kantenrundung.SetText "50 %" - Sleep (1) - Zuweisen.Click - WaitSlot (2000) - gMouseClick 90,90 - Sleep (2) - EditSelectAll '/// select object ///' - WaitSlot (1000) - Kontext "Drei_D_Effekte" '/// control if changes are done ///' - if Horizontale_Segmente.GetText <> "8" Then Warnlog "- Horizontal segment count is not correct "+Horizontale_Segmente.GetText - if Vertikale_Segmente.GetText <> "8" Then Warnlog "- Vertical segment count is not correct "+Vertikale_Segmente.GetText - if Kantenrundung.GetText <> "50 %" Then Warnlog "- Value for rounded edges is not correct "+Kantenrundung.GetText - Darstellung.Click - Zaehler=Modus.GetItemCount '/// get number of pssibole render methods ///' - for i =1 to Zaehler - Modus.Select i - Zuweisen.Click '/// assign every render method ///' - gMouseClick 90,90 - Sleep (1) - EditSelectAll '/// select object ///' - Sleep (1) - Kontext "Drei_D_Effekte" - if Modus.GetSelIndex <> i Then Warnlog "- Value for render modus did not change" '/// check if render method has changed ///' - next i - Printlog "- Check 3d shadow and surface angle" - Drei_DSchatten.Click '/// check 3d shadow ///' - Papierneigung.SetText "90 degree(s)" - vert = Papierneigung.getText - Zuweisen.Click '/// assign shadow ///' - gMouseClick 90,90 '/// deselect object ///' - WaitSlot (1000) - EditSelectAll '/// select object ///' - Kontext "Drei_D_Effekte" - if Papierneigung.GetText <> vert Then Warnlog "- Value for surface angle is not correct" '/// check value changes ///' - Entfernung.SetText "10" '/// set distance to 10 ///' - Sleep (1) - hor = Entfernung.getText - Sleep (1) - Zuweisen.Click - if Entfernung.GetText <> hor Then Warnlog "- Value for distance is not correct; should: "+hor+"; is: "+Entfernung.GetText - WaitSlot (2000) - hTypeKeys "" - Sleep (2) - ContextPositionAndSize - WaitSlot (2000) - Kontext - Active.SetPage TabPositionAndSize - Kontext "TabPositionAndSize" - PositionX.SetText "5,00cm" - Posi=PositionX.GetText - TabPositionAndSize.OK - WaitSlot (1000) - Kontext "Drei_D_Effekte" + hTypeKeys "" + Kontext "Drei_D_Effekte" + Sleep (2) + Vertikale_Segmente.SetText "32" + Kantenrundung.SetText "100" + Endwinkel.Settext "300" + Tiefenskalierung.SetText "500" + Tiefe.SetText "100" - Brennweite.SetText "50" '/// set focval length to 50 ///' - Zuweisen.Click - ContextPositionAndSize '/// check change in position of the object ///' - Kontext - Active.SetPage TabPositionAndSize - Kontext "TabPositionAndSize" - If PositionX.GetText = Posi Then - printlog "- Raising value for focal length has not changed optical appearence of object, ok." - else - warnlog "Problem with focal lenght here!" - endif - TabPositionAndSize.OK - WaitSlot (1000) - Kontext "Drei_D_Effekte" - Brennweite.SetText "5" - Zuweisen.Click - WaitSlot (1000) - EditSelectAll - WaitSlot (3000) - ContextPositionAndSize - WaitSlot (1000) - Kontext - Sleep (1) - Active.SetPage TabPositionAndSize - Kontext "TabPositionAndSize" - Sleep (2) - if PositionX.GetText = Posi Then - printlog "- Lowering focus length value has not changed optical appearence of object, ok." - else - warnlog "problem with focus, check!" - endif - TabPositionAndSize.OK - Kontext "Drei_D_Effekte" - printlog "close document" - Drei_D_Effekte.Close - Call hCloseDocument + if Vertikale_Segmente.GetText = Vert Then Warnlog "- Default value is wrong" + if Horizontale_Segmente.GetText = Hor Then Warnlog "- Default value is wrong" + if Kantenrundung.GetText = Rund Then Warnlog "- Default value is wrong" + if Tiefenskalierung.GetText = Skal Then Warnlog "- Default value is wrong" + if Endwinkel.GetText = Winkel Then Warnlog "- Default value is wrong" + if Tiefe.GetText=Tief Then Warnlog "- Default value is wrong" + EditSelectAll + + '-----------------------------------ZYLINDER------------------------------------------------------ + gMouseMove (20,20,60,60) + WaitSlot (3000) + Kontext "Drei_D_Effekte" + Printlog "- Change basic geometric parameters for the object" + Printlog "Segments : Horizontal: 8; Vertical: 8; Rounded edges: 50 %" + Vertikale_Segmente.SetText "8" + Kantenrundung.SetText "50 %" + Sleep (1) + Zuweisen.Click + WaitSlot (2000) + gMouseClick 90,90 + Sleep (2) + WaitSlot (1000) + if Horizontale_Segmente.GetText <> "8" Then Warnlog "- Horizontal segment count is not correct "+Horizontale_Segmente.GetText + if Vertikale_Segmente.GetText <> "8" Then Warnlog "- Vertical segment count is not correct "+Vertikale_Segmente.GetText + if Kantenrundung.GetText <> "50 %" Then Warnlog "- Value for rounded edges is not correct "+Kantenrundung.GetText + Darstellung.Click + for i =1 to Zaehler + Modus.Select i + gMouseClick 90,90 + Sleep (1) + Sleep (1) + Kontext "Drei_D_Effekte" + next i + Printlog "- Check 3d shadow and surface angle" + Papierneigung.SetText "90 degree(s)" + vert = Papierneigung.getText + WaitSlot (1000) + Kontext "Drei_D_Effekte" + Sleep (1) + hor = Entfernung.getText + Sleep (1) + Zuweisen.Click + if Entfernung.GetText <> hor Then Warnlog "- Value for distance is not correct; should: "+hor+"; is: "+Entfernung.GetText + WaitSlot (2000) + hTypeKeys "" + Sleep (2) + ContextPositionAndSize + WaitSlot (2000) + Kontext + Active.SetPage TabPositionAndSize + Kontext "TabPositionAndSize" + PositionX.SetText "5,00cm" + Posi=PositionX.GetText + TabPositionAndSize.OK + WaitSlot (1000) + Kontext "Drei_D_Effekte" + + Zuweisen.Click + Kontext + Active.SetPage TabPositionAndSize + Kontext "TabPositionAndSize" + If PositionX.GetText = Posi Then + printlog "- Raising value for focal length has not changed optical appearence of object, ok." + else + warnlog "Problem with focal lenght here!" + endif + TabPositionAndSize.OK + WaitSlot (1000) + Kontext "Drei_D_Effekte" + Brennweite.SetText "5" + Zuweisen.Click + WaitSlot (1000) + EditSelectAll + WaitSlot (3000) + ContextPositionAndSize + WaitSlot (1000) + Kontext + Sleep (1) + Active.SetPage TabPositionAndSize + Kontext "TabPositionAndSize" + Sleep (2) + if PositionX.GetText = Posi Then + printlog "- Lowering focus length value has not changed optical appearence of object, ok." + else + warnlog "problem with focus, check!" + endif + TabPositionAndSize.OK + Kontext "Drei_D_Effekte" + printlog "close document" + Drei_D_Effekte.Close + Call hCloseDocument endcase 'tiFormat3D_Effekte '------------------------------------------------------------------ @@ -1010,247 +899,229 @@ testcase tdFormatTemplates qaerrorlog "Not yet ready." goto endsub - dim Zaehler as integer - dim i as integer - dim x as integer - dim iWaitIndex as integer - dim sStyleName as string - dim bDouble as boolean - dim sTemp(2) as string - - Call hNewDocument '/// new impress document ///' - - WaitSlot (5000) - FormatStylesCatalog '/// format-Style catalog///' - iWaitIndex = 0 - do while Vorlagenkatalog.NotExists AND iWaitIndex < 10 + dim Zaehler as integer + dim i as integer + dim x as integer + dim iWaitIndex as integer + dim sStyleName as string + dim bDouble as boolean + dim sTemp(2) as string + + + WaitSlot (5000) + iWaitIndex = 0 + do while Vorlagenkatalog.NotExists AND iWaitIndex < 10 sleep (1) iWaitIndex = iWaitIndex + 1 - loop - - Kontext "Vorlagenkatalog" - Vorlagen.GetItemCount '/// get item count for templates ///' - Vorlagen.Select 2 '/// select template 2 ///' - - if Bereich.GetItemCount = Vorlagen.GetItemCount Then '/// check if area changes when selecting a template ///' - PrintLog " - Area did changed" - else - WarnLog " Number of entrees should be 2, but it is " + Bereich.GetItemCount - end if - - Zaehler = Ansicht.GetItemCount 'Vorlagenliste.GetItemCount - - for i = 1 to Zaehler - Ansicht.TypeKeys "" ,i - SetClipboard Ansicht.GetSelText - WaitSlot (2000) - Vorlagen.Select 1 - PrintLog " "+i+": Offset: '" + Vorlagen.GetSelText+"'" - if Bereich.GetItemCount=Vorlagen.GetItemCount Then WarnLog " Range has not changed" - Vorlagen.Select 2 + loop + + Kontext "Vorlagenkatalog" + + PrintLog " - Area did changed" +else + WarnLog " Number of entrees should be 2, but it is " + Bereich.GetItemCount +end if + +Zaehler = Ansicht.GetItemCount 'Vorlagenliste.GetItemCount + +for i = 1 to Zaehler + Ansicht.TypeKeys "" ,i + SetClipboard Ansicht.GetSelText + WaitSlot (2000) + Vorlagen.Select 1 + PrintLog " "+i+": Offset: '" + Vorlagen.GetSelText+"'" + if Bereich.GetItemCount=Vorlagen.GetItemCount Then WarnLog " Range has not changed" + Vorlagen.Select 2 WaitSlot (1000) Ansicht.TypeKeys "" WaitSlot (1000) - Ansicht.Select 1 + Ansicht.Select 1 WaitSlot (1000) - PrintLog " : Offset: '"+Vorlagen.GetSelText + "'; Opinion: '" + Ansicht.GetSelText+"'" - Vorlagenkatalog.OK - FormatStylesCatalog - Kontext "Vorlagenkatalog" - next i - - Vorlagen.Select 2 - WaitSlot (2000) - Vorlagen.Select 1 '/// select first template ///' - if Neu.IsEnabled =False Then WarnLog " Button must be choosable, but is not" - Ansicht.Select 1 - WaitSlot (1000) - Neu.Click '/// create new template ///' - Kontext - Active.SetPage TabVerwalten - Kontext "TabVerwalten" - sStyleName = VorlagenName.GetText - printlog " created new style: '"+sStyleName +"'" - TabVerwalten.OK - PrintLog " New template created" - Kontext "Vorlagenkatalog" - WaitSlot (1000) - ' find newly created style, because they are alphabetical ordered :-( i have to check every entry :-((((( - Zaehler = Ansicht.GetItemCount - i=1 - Ansicht.TypeKeys "" - bDouble = false - sTemp(1) = Ansicht.GetText - while (sTemp(1) <> sStyleName) AND (i <= Zaehler) - Ansicht.TypeKeys "" - inc i - if (i > Zaehler) then ' here we are only, if we didn't found 'our' template - if bDouble then - qaErrorLog "There are Double Entries in the list! #111652#" - else - warnlog " style not found :-(" ' print out the styles... - end if - Ansicht.TypeKeys "" - for x=0 to zaehler - printlog " "+(x+1)+": "+Ansicht.GetText - if (Loeschen.IsEnabled) then qaErrorLog "^ is delete-able :-)" - Ansicht.TypeKeys "" - next x - end if - sTemp(2) = sTemp(1) - sTemp(1) = Ansicht.GetText - if (sTemp(1) = sTemp(2)) then - bDouble = true - end if - wEnd - if bDouble then - i=1 - Ansicht.TypeKeys "" - sTemp(1) = Ansicht.GetText - while (sTemp(1) <> sStyleName) AND (i <= Zaehler) - printlog " "+(i)+": "+sTemp(1) - Ansicht.TypeKeys "" - inc i - if (i > Zaehler) then ' here we are only, if we didn't found 'our' template - warnlog " style not found :-(" ' print out the styles... - Ansicht.TypeKeys "" - for x=0 to zaehler + PrintLog " : Offset: '"+Vorlagen.GetSelText + "'; Opinion: '" + Ansicht.GetSelText+"'" + Vorlagenkatalog.OK + FormatStylesCatalog + Kontext "Vorlagenkatalog" + next i + + Vorlagen.Select 2 + WaitSlot (2000) + if Neu.IsEnabled =False Then WarnLog " Button must be choosable, but is not" + Ansicht.Select 1 + WaitSlot (1000) + Kontext + Active.SetPage TabVerwalten + Kontext "TabVerwalten" + sStyleName = VorlagenName.GetText + printlog " created new style: '"+sStyleName +"'" + TabVerwalten.OK + PrintLog " New template created" + Kontext "Vorlagenkatalog" + WaitSlot (1000) + ' find newly created style, because they are alphabetical ordered :-( i have to check every entry :-((((( + Zaehler = Ansicht.GetItemCount + i=1 + Ansicht.TypeKeys "" + bDouble = false + sTemp(1) = Ansicht.GetText + while (sTemp(1) <> sStyleName) AND (i <= Zaehler) + Ansicht.TypeKeys "" + inc i + if (i > Zaehler) then ' here we are only, if we didn't found 'our' template + if bDouble then + qaErrorLog "There are Double Entries in the list! #111652#" + else + warnlog " style not found :-(" ' print out the styles... + end if + Ansicht.TypeKeys "" + for x=0 to zaehler printlog " "+(x+1)+": "+Ansicht.GetText if (Loeschen.IsEnabled) then qaErrorLog "^ is delete-able :-)" + Ansicht.TypeKeys "" + next x + end if + sTemp(2) = sTemp(1) + sTemp(1) = Ansicht.GetText + if (sTemp(1) = sTemp(2)) then + bDouble = true + end if + wEnd + if bDouble then + i=1 + Ansicht.TypeKeys "" + sTemp(1) = Ansicht.GetText + while (sTemp(1) <> sStyleName) AND (i <= Zaehler) + printlog " "+(i)+": "+sTemp(1) Ansicht.TypeKeys "" - next x - end if - sTemp(1) = Ansicht.GetText - wEnd - end if - if (i <= Zaehler) then printlog " found created entry for deleting it :-)" - ' Ansicht.TypeKeys "" ,( i + 1 ) '/// control if template list has created template included ///' - WaitSlot (2000) - try - Loeschen.Click '/// delete template ///' - WaitSlot (1000) - Kontext "Active" - if active.exists then - printlog "ac: "+active.gettext - try - Active.Yes - catch - warnlog "active-Yes doesn't exist :-( WorkInProgress TBO" - endcatch - end if - PrintLog " Delete did work" - Kontext "Vorlagenkatalog" - catch - WarnLog " Only a new created template can be deleted" - endcatch - WaitSlot (1000) - UseBindings - Ansicht.Select 1 - WaitSlot (1000) - Aendern.Click '/// modify template ///' - WaitSlot (2000) - Kontext - Active.SetPage TabSchatten - Kontext "TabSchatten" - WaitSlot (2000) - TabSchatten.Cancel - WaitSlot (2000) - Kontext "Vorlagenkatalog" - - Verwalten.Click '/// organize templates ///' - WaitSlot (2000) - Kontext "DVVerwalten" - DVVerwalten.OK - WaitSlot (1000) - try - Kontext "Vorlagenkatalog" - Vorlagenkatalog.OK - catch - Warnlog " - Style Catalog can't close unless the Template Management-dialog is closed" - endcatch - PrintLog " FormatStylesCatalog finished" '/// close template catalog ///' - WaitSlot (2000) - FormatModifyLayout '/// format modify layout ///' - WaitSlot (2000) - Kontext "Seitenvorlage" - if HintergrundseiteAustauschen.IsChecked=True Then HintergrundseiteAustauschen.UnCheck '/// uncheck switch background page ///' - Laden.Click '/// load ///' - WaitSlot (2000) - Kontext "Neu" - Neu.Cancel - Kontext "Seitenvorlage" '/// choose a page layout ///' - 'Waehlen.Click - Seitenvorlage.OK '/// close dialog ///' - - Call hCloseDocument '/// close document ///' + inc i + if (i > Zaehler) then ' here we are only, if we didn't found 'our' template + warnlog " style not found :-(" ' print out the styles... + Ansicht.TypeKeys "" + for x=0 to zaehler + printlog " "+(x+1)+": "+Ansicht.GetText + if (Loeschen.IsEnabled) then qaErrorLog "^ is delete-able :-)" + Ansicht.TypeKeys "" + next x + end if + sTemp(1) = Ansicht.GetText + wEnd + end if + if (i <= Zaehler) then printlog " found created entry for deleting it :-)" + WaitSlot (2000) + try + WaitSlot (1000) + Kontext "Active" + if active.exists then + printlog "ac: "+active.gettext + try + Active.Yes + catch + warnlog "active-Yes doesn't exist :-( WorkInProgress TBO" + endcatch + end if + PrintLog " Delete did work" + Kontext "Vorlagenkatalog" + catch + WarnLog " Only a new created template can be deleted" + endcatch + WaitSlot (1000) + UseBindings + Ansicht.Select 1 + WaitSlot (1000) + WaitSlot (2000) + Kontext + Active.SetPage TabSchatten + Kontext "TabSchatten" + WaitSlot (2000) + TabSchatten.Cancel + WaitSlot (2000) + Kontext "Vorlagenkatalog" + + WaitSlot (2000) + Kontext "DVVerwalten" + DVVerwalten.OK + WaitSlot (1000) + try + Kontext "Vorlagenkatalog" + Vorlagenkatalog.OK + catch + Warnlog " - Style Catalog can't close unless the Template Management-dialog is closed" + endcatch + WaitSlot (2000) + WaitSlot (2000) + Kontext "Seitenvorlage" + WaitSlot (2000) + Kontext "Neu" + Neu.Cancel + 'Waehlen.Click + endcase 'tdFormatTemplates '------------------------------------------------------------------------------- testcase tiFormatAufzaehlungszeichen - + Dim i as Integer PrintLog "- Format/Numbering and Bullets" - + Call hNewDocument WaitSlot (2000) Kontext "DocumentImpress" hTextrahmenErstellen ("Hello ",20,20,60,60) for i=1 to 8 - Kontext "DocumentImpress" - gMouseClick 30,30 - EditSelectAll - WaitSlot (1000) - FormatNumberingBulletsDraw - WaitSlot (2000) - Kontext - Active.SetPage TabBullet - Kontext "TabBullet" - Auswahl.TypeKeys "", i - TabBullet.OK - Kontext "DocumentImpress" + Kontext "DocumentImpress" + gMouseClick 30,30 + EditSelectAll + WaitSlot (1000) + FormatNumberingBulletsDraw + WaitSlot (2000) + Kontext + Active.SetPage TabBullet + Kontext "TabBullet" + Auswahl.TypeKeys "", i + TabBullet.OK + Kontext "DocumentImpress" next i for i=1 to 8 - Kontext "DocumentImpress" - gMouseClick 30,30 - EditSelectAll - WaitSlot (1000) - FormatNumberingBulletsDraw - Kontext - Active.SetPage TabNumerierungsart - Kontext "TabNumerierungsart" - Auswahl.TypeKeys "", i - TabNumerierungsart.OK - Kontext "DocumentImpress" + Kontext "DocumentImpress" + gMouseClick 30,30 + EditSelectAll + WaitSlot (1000) + FormatNumberingBulletsDraw + Kontext + Active.SetPage TabNumerierungsart + Kontext "TabNumerierungsart" + Auswahl.TypeKeys "", i + TabNumerierungsart.OK + Kontext "DocumentImpress" next i for i=1 to 8 - Kontext "DocumentImpress" - gMouseClick 30,30 - EditSelectAll - FormatNumberingBulletsDraw - Kontext - Active.SetPage TabNumerierungsart - Kontext "TabNumerierungsart" - Auswahl.TypeKeys "", i - TabNumerierungsart.OK - Kontext "DocumentImpress" + Kontext "DocumentImpress" + gMouseClick 30,30 + EditSelectAll + FormatNumberingBulletsDraw + Kontext + Active.SetPage TabNumerierungsart + Kontext "TabNumerierungsart" + Auswahl.TypeKeys "", i + TabNumerierungsart.OK + Kontext "DocumentImpress" next i WaitSlot (3000) for i=1 to 29 - WaitSlot (3000) - FormatNumberingBulletsDraw - WaitSlot (3000) - Kontext - Active.SetPage TabGrafiken - Kontext "TabGrafiken" - sleep 1 - Auswahl.TypeKeys "", i - TabGrafiken.OK - Kontext "DocumentImpress" + WaitSlot (3000) + FormatNumberingBulletsDraw + WaitSlot (3000) + Kontext + Active.SetPage TabGrafiken + Kontext "TabGrafiken" + sleep 1 + Auswahl.TypeKeys "", i + TabGrafiken.OK + Kontext "DocumentImpress" next i - + gMouseClick 90,90 - + Call hCloseDocument endcase 'tiFormatAufzaehlungszeichen diff --git a/testautomation/graphics/optional/includes/global/g_group.inc b/testautomation/graphics/optional/includes/global/g_group.inc index 61f5c9d3e31f..3e4e35537a41 100755 --- a/testautomation/graphics/optional/includes/global/g_group.inc +++ b/testautomation/graphics/optional/includes/global/g_group.inc @@ -1,7 +1,7 @@ 'encoding UTF-8 Do not remove or change this line! '************************************************************************** '* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. -'* +'* '* Copyright 2008 by Sun Microsystems, Inc. '* '* OpenOffice.org - a multi-platform office productivity suite @@ -40,73 +40,60 @@ '\******************************************************************** testcase tiGruppierung - Dim PosX 'Variable fuer PositionX + Dim PosX 'Variable fuer PositionX - Call hNewDocument '/// new document ///' - sleep 3 - Kontext "DocumentImpress" - sleep 2 - hRechteckErstellen (20,20,40,40) '/// create rectangle ///' - sleep 1 - hRechteckErstellen (60,60,70,10) '/// create 2nd rectangle ///' - sleep 1 - hRechteckErstellen (50,90,70,40) '/// create 3rd rectangle ///' - sleep 1 + sleep 3 + Kontext "DocumentImpress" + sleep 2 + sleep 1 + sleep 1 + sleep 1 Printlog "- Created 3 rectangles for group testing" - gMouseClick (50,50) '/// Put the mouse-marker in the middle of the screen ///' - EditSelectAll '/// select all rectangles ///' - if (gApplication = "DRAW") then - hOpenContextMenu + if (gApplication = "DRAW") then + hOpenContextMenu sleep(2) hMenuSelectNr(12) ' Select "Group" sleep(2) - else - FormatGroupDraw '/// open context menue and group rectangles ///' - endif - sleep 1 + else + endif + sleep 1 Printlog "- Get position and dimensions of elements" - ContextPositionAndSize '/// get dimensions of group ///' - sleep 1 - Kontext - Active.SetPage TabPositionAndSize - Kontext "TabPositionAndSize" - sleep 1 - PosX=PositionX.GetText - TabPositionAndSize.OK - sleep 1 - Kontext "DocumentImpress" - gMouseClick 35,35 - sleep 1 - hTypeKeys "" '/// entering group using key "F3" ///' - sleep 3 - try - EditCut '/// cut rectangle out of document ///' - sleep 1 - Warnlog "- Entering the group, no object within the group should have been selected" - catch - Printlog "- entered group, nothing selected" - endcatch - gMouseClick (35,35) - gMouseMove (30,30,60,60) - sleep 1 - Printlog "- Exit group" -' DocumentImpress.OpenContextMenu '/// leave group, compare dimensions ///' -' sleep 1 -' hMenuSelectNr (13) - hTypeKeys "" '/// exit group using key "strg F3" ///' - ' would be better to call the slot TBO! - ContextPositionAndSize - sleep 1 - Kontext - Active.SetPage TabPositionAndSize - Kontext "TabPositionAndSize" - sleep 1 - if PosX = PositionX.GetText then - Warnlog "- No change in position for X axis, even we changed position of 1 object within the group" - TabPositionAndSize.OK - else - Printlog "- Moving within the group works" - TabPositionAndSize.OK - end if - Call hCloseDocument '/// close document ///' + sleep 1 + Kontext + Active.SetPage TabPositionAndSize + Kontext "TabPositionAndSize" + sleep 1 + PosX=PositionX.GetText + TabPositionAndSize.OK + sleep 1 + Kontext "DocumentImpress" + gMouseClick 35,35 + sleep 1 + sleep 3 + try + sleep 1 + Warnlog "- Entering the group, no object within the group should have been selected" + catch + Printlog "- entered group, nothing selected" + endcatch + gMouseClick (35,35) + gMouseMove (30,30,60,60) + sleep 1 + Printlog "- Exit group" + ' sleep 1 + ' hMenuSelectNr (13) + ' would be better to call the slot TBO! + ContextPositionAndSize + sleep 1 + Kontext + Active.SetPage TabPositionAndSize + Kontext "TabPositionAndSize" + sleep 1 + if PosX = PositionX.GetText then + Warnlog "- No change in position for X axis, even we changed position of 1 object within the group" + TabPositionAndSize.OK + else + Printlog "- Moving within the group works" + TabPositionAndSize.OK + end if endcase diff --git a/testautomation/graphics/optional/includes/global/g_imagemap.inc b/testautomation/graphics/optional/includes/global/g_imagemap.inc index 51db4ae326b5..08e6575e5cb2 100755 --- a/testautomation/graphics/optional/includes/global/g_imagemap.inc +++ b/testautomation/graphics/optional/includes/global/g_imagemap.inc @@ -1,7 +1,7 @@ 'encoding UTF-8 Do not remove or change this line! '************************************************************************** '* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. -'* +'* '* Copyright 2008 by Sun Microsystems, Inc. '* '* OpenOffice.org - a multi-platform office productivity suite @@ -41,32 +41,28 @@ '\************************************************************************************* testcase tEditImageMap - Call hNewDocument '/// new document ///' - EditImageMap '/// edit image map ///' - Kontext "ImageMapEditor" - sleep 1 - if ImageMapEditor.Exists (2) then '/// test dialog controls ///' - printlog "ImageMap editor exists" - DialogTest ( ImageMapEditor ) - try + Kontext "ImageMapEditor" + sleep 1 + printlog "ImageMap editor exists" + DialogTest ( ImageMapEditor ) + try ImageMapEditor.Close Printlog "ImageMap closed" - catch + catch EditImageMap Printlog "ImageMap closed using the edit-menu entry" - endcatch - else - sleep 2 - DialogTest ( ImageMapEditor ) - try + endcatch +else + sleep 2 + DialogTest ( ImageMapEditor ) + try ImageMapEditor.Close Printlog "ImageMap closed" - catch + catch EditImageMap Printlog "ImageMap closed using the edit-menu entry" - endcatch - end if - Call hCloseDocument '/// close document ///' + endcatch +end if endcase '------------------------------------------------------------------------------------------------------------------------------------ @@ -74,92 +70,79 @@ endcase testcase tEditImageMapProperties qaerrorlog "test not yet ready." goto endsub - Call hNewDocument '/// new document ///' - InsertGraphicsFromFile '/// Insert a graphic and select it ///' sleep (1) Kontext "GrafikEinfuegenDlg" - sleep (2) - Dateiname.SetText ConvertPath (gTesttoolPath + "graphics\required\input\SaveAsPicture\SaveAsPicture.pcx") - sleep (2) - Oeffnen.Click - sleep (2) - EditImageMap '/// Open the image map dialog ///' - Kontext "ImageMapEditor" - sleep (1) - if ImageMapEditor.Exists (2) then '/// test dialog controls ///' - printlog "ImageMap editor exists" - else - warnlog "Something is wrong, the Imagemap didn't show up." - end if + sleep (2) + Dateiname.SetText ConvertPath (gTesttoolPath + "graphics\required\input\SaveAsPicture\SaveAsPicture.pcx") + sleep (2) + Oeffnen.Click + sleep (2) + Kontext "ImageMapEditor" + sleep (1) + printlog "ImageMap editor exists" +else + warnlog "Something is wrong, the Imagemap didn't show up." +end if - Ellipse.Click '/// Insert an 'image map' object ///' - Dokument.MouseDown 50,50 - Dokument.MouseMove 50,50,10,10 - Dokument.MouseUp 10,10 +Dokument.MouseDown 50,50 +Dokument.MouseMove 50,50,10,10 +Dokument.MouseUp 10,10 - Eigenschaften.Click '/// Click on the properties icon to open up the properties for the Object ///' - kontext "ImageMapHyperlink" - sleep (1) - if ImageMapHyperlink.Exists (2) then - printlog "ImageMapHyperlink (properties) editor exists" - else - warnlog "Something is wrong, the ImageMapHyperlink (properties) didn't show up." - end if +kontext "ImageMapHyperlink" +sleep (1) +if ImageMapHyperlink.Exists (2) then + printlog "ImageMapHyperlink (properties) editor exists" +else + warnlog "Something is wrong, the ImageMapHyperlink (properties) didn't show up." +end if - URL.SetText "http://www.cnn.com" '/// Write some text in each field ///' - Frame.SetText "http://www.framed.com" - Objectname.SetText "This is a strange name: Huckillerry Bohaahw" - Alternativetext.SetText "Alternative, the only way to fly..." - Description.SetText "Just a Foney-text... or whatever it's called." - ImageMapHyperlink.Ok '/// Close the Properties-Dialogue with "Ok" ///' - kontext "ImageMapEditor" - Zuweisen.Click - sleep (1) - ImageMapEditor.Close +Frame.SetText "http://www.framed.com" +Objectname.SetText "This is a strange name: Huckillerry Bohaahw" +Alternativetext.SetText "Alternative, the only way to fly..." +Description.SetText "Just a Foney-text... or whatever it's called." +kontext "ImageMapEditor" +Zuweisen.Click +sleep (1) +ImageMapEditor.Close - if gApplication = "DRAW" then - kontext "DocumentDraw" - else - kontext "DocumentImpress" - end if +if gApplication = "DRAW" then + kontext "DocumentDraw" +else + kontext "DocumentImpress" +end if - EditImageMap '/// Check if what we wrote in the Properites-Dialogue still is visible." - Kontext "ImageMapEditor" - sleep (1) - if ImageMapEditor.Exists (2) then - printlog "ImageMap editor exists" - else - warnlog "Something is wrong, the ImageMap Editor didn't show up." - end if +Kontext "ImageMapEditor" +sleep (1) +if ImageMapEditor.Exists (2) then + printlog "ImageMap editor exists" +else + warnlog "Something is wrong, the ImageMap Editor didn't show up." +end if - Dokument.TypeKeys "" - sleep (1) +Dokument.TypeKeys "" +sleep (1) - Eigenschaften.Click '/// Click on the properties icon to open up the properties for the Object ///' - kontext "ImageMapHyperlink" - sleep (1) - if ImageMapHyperlink.Exists (2) then - printlog "ImageMapHyperlink (properties) editor exists" - else - warnlog "Something is wrong, the ImageMapHyperlink (properties) didn't show up." - end if +kontext "ImageMapHyperlink" +sleep (1) +if ImageMapHyperlink.Exists (2) then + printlog "ImageMapHyperlink (properties) editor exists" +else + warnlog "Something is wrong, the ImageMapHyperlink (properties) didn't show up." +end if - '/// Check if the entries we set before has remained the same, with one exception: cnn.com should now have a slash after it. ///' - if URL.GetText <> "http://www.cnn.com/" then warnlog "URL should have been: http://www.cnn.com/ . But was " + URL.GetText -' if Frame.GetSelText <> "http://www.framed.com" then warnlog "Frame should have been: http://www.framed.com. But was " + Frame.GetSelText - if Objectname.GetText <> "This is a strange name: Huckillerry Bohaahw" then warnlog "Objectname. should have been: This is a strange name: Huckillerry Bohaahw. But was " + Objectname.GetText +if URL.GetText <> "http://www.cnn.com/" then warnlog "URL should have been: http://www.cnn.com/ . But was " + URL.GetText + ' if Frame.GetSelText <> "http://www.framed.com" then warnlog "Frame should have been: http://www.framed.com. But was " + Frame.GetSelText + if Objectname.GetText <> "This is a strange name: Huckillerry Bohaahw" then warnlog "Objectname. should have been: This is a strange name: Huckillerry Bohaahw. But was " + Objectname.GetText if Alternativetext.GetText <> "Alternative, the only way to fly..." then warnlog "Alternativetext should have been: . But was " + Alternativetext.GetText - if Description.GetText <> "Just a Foney-text... or whatever it's called." then warnlog "Description. should have been: . But was " + Description.GetText - ImageMapHyperlink.Ok '/// Close the Properties-Dialogue ///' - sleep (1) + if Description.GetText <> "Just a Foney-text... or whatever it's called." then warnlog "Description. should have been: . But was " + Description.GetText + sleep (1) - kontext "ImageMapEditor" - Zuweisen.Click - sleep (1) - ImageMapEditor.Close - sleep (1) + kontext "ImageMapEditor" + Zuweisen.Click + sleep (1) + ImageMapEditor.Close + sleep (1) - Call hCloseDocument '/// close document ///' endcase 'tEditImageMapProperties '------------------------------------------------------------------------------------------------------------------------------------ diff --git a/testautomation/graphics/optional/includes/global/g_insert.inc b/testautomation/graphics/optional/includes/global/g_insert.inc index 984ec7251d4a..7e8a02386bc9 100755 --- a/testautomation/graphics/optional/includes/global/g_insert.inc +++ b/testautomation/graphics/optional/includes/global/g_insert.inc @@ -1,7 +1,7 @@ 'encoding UTF-8 Do not remove or change this line! '************************************************************************** '* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. -'* +'* '* Copyright 2008 by Sun Microsystems, Inc. '* '* OpenOffice.org - a multi-platform office productivity suite @@ -53,117 +53,117 @@ testcase tdInsertObjectOleObjects QaErrorLog "#79794# - tdInsertObjectOleObjects outcommented due to bug." goto endsub - Dim Zaehler as Integer - Dim i as integer - Dim a as integer - Dim Liste (100) as String - - Liste (0) = 0 - printlog " open application " - Call hNewDocument - printlog " Insert->Object->OLE Object... " - InsertObjectOLEObject - Kontext "OLEObjektInsert" - Zaehler = Objekttyp.GetItemCount - - printlog " - there are: --"+Zaehler + "-- possible items to insert" - - ' on lin & sol there are no additional OLE-Types, like on win ??!?!?!?!. - ' first letter is usuallay 'S' from 'Star...', but on windows exists 'Further Objects' as last type. this won't be used. - if (left(Objekttyp.GetItemText (Zaehler),1) <> left (Objekttyp.GetItemText (1),1)) then - PrintLog " "+Zaehler +": '"+Objekttyp.GetItemText (Zaehler) + "' WONT be inserted" - a = Zaehler -1 - else - a = Zaehler - endif - - printlog " insert every object type, except the one, that is the last with the first letter being different from the firts' object' letter " - for i = 1 to a - printlog "+ select object entry in list " - Objekttyp.Select i - sleep 2 - PrintLog " "+i+": '"+Objekttyp.GetSelText + "' will be inserted" - printlog "+ leave dialog 'Insert OLE Object' with OK " - OLEObjektInsert.OK - sleep 2 - printlog "+ leave edit mode by typing key [Escape] " - hTypeKeys "" - printlog "+ Edit -> Select All " - EditSelectAll - sleep 2 - printlog "+ Delete object by typing key [Delete] " - hTypeKeys "" - sleep 2 - printlog "+ Insert->Object->OLE Object... " - InsertObjectOLEObject - Kontext "OLEObjektInsert" - next i - - printlog "+ leave dialog 'Insert OLE Object' with CANCEL " - OLEObjektInsert.Cancel - sleep 1 - printlog " close application " - Call hCloseDocument - + Dim Zaehler as Integer + Dim i as integer + Dim a as integer + Dim Liste (100) as String + + Liste (0) = 0 + printlog " open application " + Call hNewDocument + printlog " Insert->Object->OLE Object... " + InsertObjectOLEObject + Kontext "OLEObjektInsert" + Zaehler = Objekttyp.GetItemCount + + printlog " - there are: --"+Zaehler + "-- possible items to insert" + + ' on lin & sol there are no additional OLE-Types, like on win ??!?!?!?!. + ' first letter is usuallay 'S' from 'Star...', but on windows exists 'Further Objects' as last type. this won't be used. + if (left(Objekttyp.GetItemText (Zaehler),1) <> left (Objekttyp.GetItemText (1),1)) then + PrintLog " "+Zaehler +": '"+Objekttyp.GetItemText (Zaehler) + "' WONT be inserted" + a = Zaehler -1 + else + a = Zaehler + endif + + printlog " insert every object type, except the one, that is the last with the first letter being different from the firts' object' letter " + for i = 1 to a + printlog "+ select object entry in list " + Objekttyp.Select i + sleep 2 + PrintLog " "+i+": '"+Objekttyp.GetSelText + "' will be inserted" + printlog "+ leave dialog 'Insert OLE Object' with OK " + OLEObjektInsert.OK + sleep 2 + printlog "+ leave edit mode by typing key [Escape] " + hTypeKeys "" + printlog "+ Edit -> Select All " + EditSelectAll + sleep 2 + printlog "+ Delete object by typing key [Delete] " + hTypeKeys "" + sleep 2 + printlog "+ Insert->Object->OLE Object... " + InsertObjectOLEObject + Kontext "OLEObjektInsert" + next i + + printlog "+ leave dialog 'Insert OLE Object' with CANCEL " + OLEObjektInsert.Cancel + sleep 1 + printlog " close application " + Call hCloseDocument + endcase 'tdInsertObjectOleObjects '------------------------------------------------------------------------------- testcase tInsertFloatingFrame - dim iWaitIndex as integer + dim iWaitIndex as integer - if (gApplication = "IMPRESS") then + if (gApplication = "IMPRESS") then ExtensionString = "odp" else ExtensionString = "odg" end if - printlog " open application " - Call hNewDocument - printlog " Insert->Floating Frame... " - InsertFloatingFrame - Kontext "TabEigenschaften" - printlog " set 'name' to something " - FrameName.SetText "StarDivision Home" - printlog " set 'Contents' to 'graphics\\input\\leer.od?' " - Inhalt.SetText ConvertPath (gTesttoolPath + "graphics\required\input\leer." + ExtensionString) - printlog " close dialog 'Floating Frames Properties' with OK " - TabEigenschaften.OK + printlog " open application " + Call hNewDocument + printlog " Insert->Floating Frame... " + InsertFloatingFrame + Kontext "TabEigenschaften" + printlog " set 'name' to something " + FrameName.SetText "StarDivision Home" + printlog " set 'Contents' to 'graphics\\input\\leer.od?' " + Inhalt.SetText ConvertPath (gTesttoolPath + "graphics\required\input\leer." + ExtensionString) + printlog " close dialog 'Floating Frames Properties' with OK " + TabEigenschaften.OK iWaitIndex = 0 do while TabEigenschaften.Exists AND iWaitIndex < 10 - sleep (1) - iWaitIndex = iWaitIndex + 1 + sleep (1) + iWaitIndex = iWaitIndex + 1 loop -' gMouseMove 10,10,90,90 - printlog " the object should be selected by default now " - try - printlog " Format->Position And Size " - ContextPositionAndSize - Kontext - Active.SetPage TabPositionAndSize - Kontext "TabPositionAndSize" - If (PositionY.GetText = "") Then - Warnlog "No position for frame available ?!" - endif - printlog " close dialog with OK " - TabPositionAndSize.OK - catch - Warnlog "- Insert Floating Frame did not work, there is nothing in the document?" - endcatch - printlog " delete object by typing Key [Delete] " - hTypekeys "" - sleep 2 - kontext - if (messagebox.exists (5)) then - printlog "messageb: " + messagebox.gettext - messagebox.cancel - else - qaErrorLog "Messagebox missing about changes in inserted document! #103343# 6.y" - endif - sleep 2 - printlog " close application " - Call hCloseDocument - + ' gMouseMove 10,10,90,90 + printlog " the object should be selected by default now " + try + printlog " Format->Position And Size " + ContextPositionAndSize + Kontext + Active.SetPage TabPositionAndSize + Kontext "TabPositionAndSize" + If (PositionY.GetText = "") Then + Warnlog "No position for frame available ?!" + endif + printlog " close dialog with OK " + TabPositionAndSize.OK + catch + Warnlog "- Insert Floating Frame did not work, there is nothing in the document?" + endcatch + printlog " delete object by typing Key [Delete] " + hTypekeys "" + sleep 2 + kontext + if (messagebox.exists (5)) then + printlog "messageb: " + messagebox.gettext + messagebox.cancel + else + qaErrorLog "Messagebox missing about changes in inserted document! #103343# 6.y" + endif + sleep 2 + printlog " close application " + Call hCloseDocument + endcase 'tInsertFloatingFrame '------------------------------------------------------------------------------- @@ -172,14 +172,14 @@ testcase tInsertFields dim sTemp as string dim sFile as string dim i as integer - - if (gApplication = "IMPRESS") then + + if (gApplication = "IMPRESS") then ExtensionString = "odp" else ExtensionString = "odg" end if - - Call hNewDocument + + Call hNewDocument printlog " new document " printlog " open 'tools->options' and set first/last name and email adress on the page 'StarOffice->UserData' " @@ -190,24 +190,24 @@ testcase tInsertFields EMail.SetText "recumbent@sun.com" Kontext "ExtrasOptionenDlg" ExtrasOptionenDlg.OK - + printlog " every item from menue 'Insert->Fields' is inserted, and the keys [Strg]+[A], [Delete] are pressed " - InsertFieldsDateFix + InsertFieldsDateFix printlog " (date fix) " EditSelectAll hTypeKeys "" - - InsertFieldsDateVariable + + InsertFieldsDateVariable printlog " (date variable) " EditSelectAll hTypeKeys "" - - InsertFieldsTimeFix + + InsertFieldsTimeFix printlog " (time fix)" EditSelectAll hTypeKeys "" - - InsertFieldsTimeVariable + + InsertFieldsTimeVariable printlog " (time variable) " EditSelectAll hTypeKeys "" @@ -217,7 +217,7 @@ testcase tInsertFields EditSelectAll hTypeKeys "" - InsertFieldsAuthorDraw + InsertFieldsAuthorDraw printlog " (author) " printlog "+ additional test for author " printlog "+ it has to tbe 'Garfield Peanuts' " @@ -226,9 +226,9 @@ testcase tInsertFields EditCopy sTemp = GetClipboard() if (sTemp <> "Garfield Peanuts") then - Warnlog "wrong author; expected: 'Garfield Peanuts' is: '" + sTemp + "'" + Warnlog "wrong author; expected: 'Garfield Peanuts' is: '" + sTemp + "'" else - Printlog "Author is: '" + sTemp + "'" + Printlog "Author is: '" + sTemp + "'" endif hTypeKeys "" printlog "deleting content" @@ -237,7 +237,7 @@ testcase tInsertFields printlog "+ additional test for pagenumber " for i = 1 to 2 - InsertFieldsPageNumberDraw + InsertFieldsPageNumberDraw printlog "Inserting page number. It has to be '1' and should remain the same when we insert a new slide " hTypeKeys "" EditSelectAll @@ -258,41 +258,41 @@ testcase tInsertFields printlog " Insert->Slide " InsertSlide sleep 2 - next i + next i printlog "And one try when we switch slides manually, deleting slides to start." - EditDeleteSlide - EditDeleteSlide - - for i = 1 to 2 - InsertFieldsPageNumberDraw - printlog " (page number) " - printlog "+ additional test for pagenumber " - printlog "+ it has to change when we insert a new slide and press pagedown " - hTypeKeys "" - EditSelectAll - EditCopy - sTemp = GetClipboard() - if i > 1 then - if (sTemp <> right(str(i),1) ) then - warnlog "Wrong number; expected: '" + i + "' and it was: '" + sTemp + "'" - else - printlog "Good. We expected number: '" + i + "' and it was number: '" + sTemp + "'" - endif - else - if (sTemp <> right(str(i),1) ) then - warnlog "Wrong number; expected: '" + i + "' and it was: '" + sTemp + "'" - else - printlog "Good. We expected number: '" + i + "' and it was number: '" + sTemp + "'" - endif - endif - hTypeKeys "" - EditSelectAll - hTypeKeys "" - printlog " Insert->Slide " - InsertSlide - hTypeKeys "" - sleep 2 + EditDeleteSlide + EditDeleteSlide + + for i = 1 to 2 + InsertFieldsPageNumberDraw + printlog " (page number) " + printlog "+ additional test for pagenumber " + printlog "+ it has to change when we insert a new slide and press pagedown " + hTypeKeys "" + EditSelectAll + EditCopy + sTemp = GetClipboard() + if i > 1 then + if (sTemp <> right(str(i),1) ) then + warnlog "Wrong number; expected: '" + i + "' and it was: '" + sTemp + "'" + else + printlog "Good. We expected number: '" + i + "' and it was number: '" + sTemp + "'" + endif + else + if (sTemp <> right(str(i),1) ) then + warnlog "Wrong number; expected: '" + i + "' and it was: '" + sTemp + "'" + else + printlog "Good. We expected number: '" + i + "' and it was number: '" + sTemp + "'" + endif + endif + hTypeKeys "" + EditSelectAll + hTypeKeys "" + printlog " Insert->Slide " + InsertSlide + hTypeKeys "" + sleep 2 next i printlog "Additional test for Page Count:" InsertFieldsPageCountDraw @@ -320,13 +320,13 @@ testcase tInsertFields else printlog "Page count " & sTemp & " was expected and updated correctly." endif - + hTypeKeys "" printlog "deleting all" EditSelectAll hTypeKeys "" - - InsertFieldsFileName + + InsertFieldsFileName printlog " (file name) " printlog "+ additional test for filename " printlog "+ save file as " + gOfficePath + "user\\work\\fields.od ?" @@ -335,12 +335,12 @@ testcase tInsertFields kill (sFile + "." + ExtensionString) end if - hFileSaveAsKill (sFile) - sleep 5 - hTypeKeys "" - EditSelectAll - EditCopy - sTemp = GetClipboard() + hFileSaveAsKill (sFile) + sleep 5 + hTypeKeys "" + EditSelectAll + EditCopy + sTemp = GetClipboard() if (sTemp <> sFile) then Warnlog "wrong author; expected: '" + sFile + "' is: '" + sTemp + "'" @@ -348,13 +348,13 @@ testcase tInsertFields Printlog "Author is: '" + sTemp + "'" end if - hTypeKeys "" - EditSelectAll - hTypeKeys "" + hTypeKeys "" + EditSelectAll + hTypeKeys "" + + printlog " close application " + hCloseDocument - printlog " close application " - hCloseDocument - endcase 'tInsertFields '------------------------------------------------------------------------------- @@ -378,17 +378,17 @@ testcase tdInsertSnapPoint_Line printlog "+ so i will modify the snap range to the maximum of 50 pixel, to be safe, i hope :-) " printlog " Tools->Options " ToolsOptions - printlog " select Grid tab page in application " - Select Case Ucase(gApplication) - case "DRAW" : hToolsOptions ("Drawing","GRID") - case "IMPRESS" : hToolsOptions ("IMPRESS","GRID") - end select - sGridArea = fangenFangBereich.GetText - printlog " set metric field 'Snap Range' to Maximum " - fangenFangBereich.ToMax - Kontext "ExtrasOptionenDlg" - printlog " close options dialog with OK " - ExtrasOptionenDlg.OK + printlog " select Grid tab page in application " + Select Case Ucase(gApplication) + case "DRAW" : hToolsOptions ("Drawing","GRID") + case "IMPRESS" : hToolsOptions ("IMPRESS","GRID") + end select + sGridArea = fangenFangBereich.GetText + printlog " set metric field 'Snap Range' to Maximum " + fangenFangBereich.ToMax + Kontext "ExtrasOptionenDlg" + printlog " close options dialog with OK " + ExtrasOptionenDlg.OK for i = 1 to 3 printlog " new document " @@ -396,41 +396,41 @@ testcase tdInsertSnapPoint_Line printlog " ContextMenu: Insert SnapPointLine " InsertSnapPointLine - Kontext "NeuesFangobjekt" - printlog "+ check checkbox 'Type: Point' " - select case i - case 1: printlog "------- vertical Snap Object" - Vertikal.Check - case 2: printlog "------- horizontal Snap Object" - Horizontal.Check - case 3: printlog "------- Point Snap Object" - Punkt.Check - end select - printlog "+ set Metric Field 'Position X' to 5 and get entry from field for further reference " - if (1 AND i) then - X.SetText "5" - Wert1=X.GetText - endif - printlog "+ set Metric Field 'Position Y' to 5 and get entry from field for further reference " - if (2 AND i) then - Y.SetText "5" - Wert2=Y.GetText - else - Wert2=Wert1 - endif - sleep 2 - printlog "+ close dialog 'New Snap Object' with OK " - NeuesFangobjekt.OK - Printlog "SnapPoint x: '"+Wert1+"', y: '"+Wert2+"' created" - sleep 2 + Kontext "NeuesFangobjekt" + printlog "+ check checkbox 'Type: Point' " + select case i + case 1: printlog "------- vertical Snap Object" + Vertikal.Check + case 2: printlog "------- horizontal Snap Object" + Horizontal.Check + case 3: printlog "------- Point Snap Object" + Punkt.Check + end select + printlog "+ set Metric Field 'Position X' to 5 and get entry from field for further reference " + if (1 AND i) then + X.SetText "5" + Wert1=X.GetText + endif + printlog "+ set Metric Field 'Position Y' to 5 and get entry from field for further reference " + if (2 AND i) then + Y.SetText "5" + Wert2=Y.GetText + else + Wert2=Wert1 + endif + sleep 2 + printlog "+ close dialog 'New Snap Object' with OK " + NeuesFangobjekt.OK + Printlog "SnapPoint x: '"+Wert1+"', y: '"+Wert2+"' created" + sleep 2 printlog " view->Zoom... " ViewZoom - Kontext "Massstab" - printlog "+ check radiobutton '75%' " - Vergroesserung75.Check - printlog "+ close dialog 'Zoom' with OK " - Massstab.OK + Kontext "Massstab" + printlog "+ check radiobutton '75%' " + Vergroesserung75.Check + printlog "+ close dialog 'Zoom' with OK " + Massstab.OK printlog " create a rectangle " Call hRechteckErstellen (27,27,80,80) @@ -438,25 +438,25 @@ testcase tdInsertSnapPoint_Line printlog " Moove rectangle to test snapping: " printlog "+ Format->Position and SIze... " ContextPositionAndSize - Kontext - printlog "+ select tabpage 'Position and Size' on dialog 'Position and Size' " - Active.SetPage TabPositionAndSize - Kontext "TabPositionAndSize" - printlog "+ enter saved text into metricfields into 'Position X' and 'Position Y' " - printlog "+ press more button on metric fields 'Position X' and 'Position Y' " - if (1 AND i) then - PositionX.SetText Wert1 - sleep 1 - PositionX.More - endif - if (2 AND i) then - PositionY.SetText Wert2 - sleep 1 - PositionY.More - endif - printlog "+ close dialog 'Position and Size' with OK " - TabPositionAndSize.OK - sleep 2 + Kontext + printlog "+ select tabpage 'Position and Size' on dialog 'Position and Size' " + Active.SetPage TabPositionAndSize + Kontext "TabPositionAndSize" + printlog "+ enter saved text into metricfields into 'Position X' and 'Position Y' " + printlog "+ press more button on metric fields 'Position X' and 'Position Y' " + if (1 AND i) then + PositionX.SetText Wert1 + sleep 1 + PositionX.More + endif + if (2 AND i) then + PositionY.SetText Wert2 + sleep 1 + PositionY.More + endif + printlog "+ close dialog 'Position and Size' with OK " + TabPositionAndSize.OK + sleep 2 printlog " move rectangle " iState = 0 @@ -482,36 +482,36 @@ testcase tdInsertSnapPoint_Line qaerrorlog "couldn't find object - the following action may fail..." iPosition = 60 endif - gMousemove (iPosition,iPosition,iPosition + 1,iPosition + 1) + gMousemove (iPosition,iPosition,iPosition + 1,iPosition + 1) sleep 4 printlog " check if object snapped back to snap point " ContextPositionAndSize Kontext - if active.exists (5) then - Active.SetPage TabPositionAndSize + if active.exists (5) then + Active.SetPage TabPositionAndSize + else + warnlog "Couldn't switch tabpage (2), because object was deselected" + hTypeKeys "" + ContextPositionAndSize + Kontext + Active.SetPage TabPositionAndSize + endif + Kontext "TabPositionAndSize" + if (1 AND i) then + if (PositionX.GetText <> Wert1) Then + WarnLog "(1) Rectangle not aligned to snap point. Soll X= "+ Wert1 + " IST= " + PositionX.GetText else - warnlog "Couldn't switch tabpage (2), because object was deselected" - hTypeKeys "" - ContextPositionAndSize - Kontext - Active.SetPage TabPositionAndSize - endif - Kontext "TabPositionAndSize" - if (1 AND i) then - if (PositionX.GetText <> Wert1) Then - WarnLog "(1) Rectangle not aligned to snap point. Soll X= "+ Wert1 + " IST= " + PositionX.GetText - else - PrintLog "(1) Rectangle aligned to snap point. Soll= " + Wert1 + " Ist= " + PositionX.GetText - end if + PrintLog "(1) Rectangle aligned to snap point. Soll= " + Wert1 + " Ist= " + PositionX.GetText end if - if (2 AND i) then - if (PositionY.GetText <> Wert2) Then - WarnLog "(1) Rectangle not aligned to snap point. Soll Y= "+ Wert2 + " IST= " + PositionY.GetText - else - PrintLog "(1) Rectangle aligned to snap point. Soll= " + Wert2 + " Ist= " + PositionY.GetText - end if + end if + if (2 AND i) then + if (PositionY.GetText <> Wert2) Then + WarnLog "(1) Rectangle not aligned to snap point. Soll Y= "+ Wert2 + " IST= " + PositionY.GetText + else + PrintLog "(1) Rectangle aligned to snap point. Soll= " + Wert2 + " Ist= " + PositionY.GetText end if - TabPositionAndSize.OK + end if + TabPositionAndSize.OK sleep 1 printlog " close application " @@ -519,270 +519,270 @@ testcase tdInsertSnapPoint_Line next i ToolsOptions - Select Case Ucase(gApplication) - case "DRAW" : hToolsOptions ("Drawing","GRID") - case "IMPRESS" : hToolsOptions ("IMPRESS","GRID") - end select - fangenFangBereich.SetText sGridArea - Kontext "ExtrasOptionenDlg" - ExtrasOptionenDlg.OK + Select Case Ucase(gApplication) + case "DRAW" : hToolsOptions ("Drawing","GRID") + case "IMPRESS" : hToolsOptions ("IMPRESS","GRID") + end select + fangenFangBereich.SetText sGridArea + Kontext "ExtrasOptionenDlg" + ExtrasOptionenDlg.OK printlog " close application " Call hCloseDocument - + endcase 'tdInsertSnapPoint_Line '------------------------------------------------------------------------------- testcase tdInsertFile - dim sTemp as string - dim sFile as string - dim i as integer - dim iCut as integer + dim sTemp as string + dim sFile as string + dim i as integer + dim iCut as integer - if (gApplication = "IMPRESS") then + if (gApplication = "IMPRESS") then ExtensionString = "odp" else ExtensionString = "odg" end if - printlog " open application " - Call hNewDocument - sleep 1 - printlog " take a text file without .txt extension, to test file regcognition " - printlog " Insert->File " - InsertFileDraw - sleep 1 - Kontext "OeffnenDlg" - printlog " use file: graphics\\optional\\input\\einfg.ini" - sFile = ConvertPath (gTesttoolPath + "graphics\required\input\einfg.ini") - Printlog "file: '" + sFile + "'" - Dateiname.SetText (sFile) - printlog " click button 'Insert' " - Oeffnen.Click - Kontext "SeitenObjekteEinfuegen" - sleep 3 - printlog " expected: dialog 'Insert Slides/Objects' " - if (SeitenObjekteEinfuegen.Exists (5) = False) Then - warnlog "1 - Dialog 'Insert Slides/Objects' does not exist :-(" + printlog " open application " + Call hNewDocument + sleep 1 + printlog " take a text file without .txt extension, to test file regcognition " + printlog " Insert->File " + InsertFileDraw + sleep 1 + Kontext "OeffnenDlg" + printlog " use file: graphics\\optional\\input\\einfg.ini" + sFile = ConvertPath (gTesttoolPath + "graphics\required\input\einfg.ini") + Printlog "file: '" + sFile + "'" + Dateiname.SetText (sFile) + printlog " click button 'Insert' " + Oeffnen.Click + Kontext "SeitenObjekteEinfuegen" + sleep 3 + printlog " expected: dialog 'Insert Slides/Objects' " + if (SeitenObjekteEinfuegen.Exists (5) = False) Then + warnlog "1 - Dialog 'Insert Slides/Objects' does not exist :-(" + kontext + ' Text File Path - do it again :-( + if active.exists (5) then + printlog "ACTIVE: "+active.gettext + active.ok + ' will be wrong next time, bzw support it tooo + printlog "Have to select the text filter manually, to get file loaded" + InsertFileDraw + sleep 1 + Kontext "OeffnenDlg" + Dateiname.SetText ConvertPath (gTesttoolPath + "graphics\required\input\einfg.ini") + Select Case Ucase(gApplication) + case "DRAW" + DateiTyp.Select 6 ' hopefully TEXT! + case "IMPRESS" + DateiTyp.Select 11 ' hopefully TEXT! + end select + printlog "selected filter: "+DateiTyp.GetSelText + Oeffnen.Click kontext - ' Text File Path - do it again :-( if active.exists (5) then - printlog "ACTIVE: "+active.gettext - active.ok - ' will be wrong next time, bzw support it tooo - printlog "Have to select the text filter manually, to get file loaded" - InsertFileDraw - sleep 1 - Kontext "OeffnenDlg" - Dateiname.SetText ConvertPath (gTesttoolPath + "graphics\required\input\einfg.ini") - Select Case Ucase(gApplication) - case "DRAW" - DateiTyp.Select 6 ' hopefully TEXT! - case "IMPRESS" - DateiTyp.Select 11 ' hopefully TEXT! - end select - printlog "selected filter: "+DateiTyp.GetSelText - Oeffnen.Click - kontext - if active.exists (5) then - printlog "ACTIVE: "+active.gettext - active.ok - warnlog "failed to open file? :-(" - endif - ' Text File Path - dialog is there :-( - else - Kontext "AsciiFilterOptionen" - If AsciiFilterOptionen.Exists(3) then - printlog "NO, not loaded (yet): we are in ASCII filter dialog :-(" - AsciiFilterOptionen.OK - else - warnlog "Now there is a problem :-( 1" - endif + printlog "ACTIVE: "+active.gettext + active.ok + warnlog "failed to open file? :-(" endif - sleep 3 - Kontext "SeitenObjekteEinfuegen" - if SeitenObjekteEinfuegen.Exists (5) <> TRUE then - warnlog "Now there is a problem :-( 2" + ' Text File Path - dialog is there :-( + else + Kontext "AsciiFilterOptionen" + If AsciiFilterOptionen.Exists(3) then + printlog "NO, not loaded (yet): we are in ASCII filter dialog :-(" + AsciiFilterOptionen.OK else - Printlog "InsertFile Text-dialogue came up :-) (finaly)" - SeitenObjekteEinfuegen.OK - sleep 3 + warnlog "Now there is a problem :-( 1" endif - ' as expected, file got regcognized and i can select the slides - else ' the good way with ' little strange dialog - '*SeitenObjekteEinfuegen DLG_INSERT_PAGES_OBJS - 'DeleteUnusedBackgrounds sd:CheckBox:DLG_INSERT_PAGES_OBJS:CBX_CHECK_MASTERS - Printlog "1: '" + InsertObjectsList.GetSelText + "'" - printlog " leave dialog 'Insert Slides/Objects' with OK " + endif + sleep 3 + Kontext "SeitenObjekteEinfuegen" + if SeitenObjekteEinfuegen.Exists (5) <> TRUE then + warnlog "Now there is a problem :-( 2" + else + Printlog "InsertFile Text-dialogue came up :-) (finaly)" SeitenObjekteEinfuegen.OK sleep 3 - end if - printlog " select all inserted text, by typing [Strg]+[A] " - EditSelectAll - try - printlog " Edit->Cut " - EditCut - catch - Warnlog "It seems there is nothing inserted :-(" - endcatch - sleep 1 - - printlog " use a presentation file to test extended capability of dialog " - printlog " Insert->File " - InsertFileDraw - sleep 1 - Kontext "OeffnenDlg" - printlog " use file: graphics\required\input\diashow.odp" - sFile = ConvertPath (gTesttoolPath + "graphics\required\input\diashow.odp") - Printlog "file used : '" + sFile + "'" - Dateiname.SetText (sFile) - printlog " click button 'Insert' " - Oeffnen.Click - Kontext "SeitenObjekteEinfuegen" - sleep 3 - printlog " expected: dialog 'Insert Slides/Objects' " - if (SeitenObjekteEinfuegen.Exists (5) = False) Then - warnlog "unexpected error :-(" - else ' the good way with ' little strange dialog - '*SeitenObjekteEinfuegen DLG_INSERT_PAGES_OBJS - 'DeleteUnusedBackgrounds sd:CheckBox:DLG_INSERT_PAGES_OBJS:CBX_CHECK_MASTERS - InsertObjectsList.TypeKeys "" + endif + ' as expected, file got regcognized and i can select the slides + else ' the good way with ' little strange dialog + '*SeitenObjekteEinfuegen DLG_INSERT_PAGES_OBJS + 'DeleteUnusedBackgrounds sd:CheckBox:DLG_INSERT_PAGES_OBJS:CBX_CHECK_MASTERS + Printlog "1: '" + InsertObjectsList.GetSelText + "'" + printlog " leave dialog 'Insert Slides/Objects' with OK " + SeitenObjekteEinfuegen.OK + sleep 3 + end if + printlog " select all inserted text, by typing [Strg]+[A] " + EditSelectAll + try + printlog " Edit->Cut " + EditCut + catch + Warnlog "It seems there is nothing inserted :-(" + endcatch + sleep 1 + + printlog " use a presentation file to test extended capability of dialog " + printlog " Insert->File " + InsertFileDraw + sleep 1 + Kontext "OeffnenDlg" + printlog " use file: graphics\required\input\diashow.odp" + sFile = ConvertPath (gTesttoolPath + "graphics\required\input\diashow.odp") + Printlog "file used : '" + sFile + "'" + Dateiname.SetText (sFile) + printlog " click button 'Insert' " + Oeffnen.Click + Kontext "SeitenObjekteEinfuegen" + sleep 3 + printlog " expected: dialog 'Insert Slides/Objects' " + if (SeitenObjekteEinfuegen.Exists (5) = False) Then + warnlog "unexpected error :-(" + else ' the good way with ' little strange dialog + '*SeitenObjekteEinfuegen DLG_INSERT_PAGES_OBJS + 'DeleteUnusedBackgrounds sd:CheckBox:DLG_INSERT_PAGES_OBJS:CBX_CHECK_MASTERS + InsertObjectsList.TypeKeys "" + sTemp = InsertObjectsList.GetSelText + if (gPlatgroup <> "unx") then ' to get rid of file://[/] on unix the last '/' belongs too the file path :-( + iCut = 8 + else + iCut = 7 + endif + if (fConvertBackslashToSlash (sFile) = right(sTEmp, len(sTemp)-(iCut))) then + Printlog " 0: '" + sTemp + "'" + else + Warnlog "different : '" + fConvertBackslashToSlash (sFile) + "' than '" + right(sTEmp, len(sTemp)-(iCut)) + "'" + endif + InsertObjectsList.TypeKeys "<+>" + sleep 10 + for i = 1 to 4 + InsertObjectsList.TypeKeys "" sTemp = InsertObjectsList.GetSelText - if (gPlatgroup <> "unx") then ' to get rid of file://[/] on unix the last '/' belongs too the file path :-( - iCut = 8 - else - iCut = 7 - endif - if (fConvertBackslashToSlash (sFile) = right(sTEmp, len(sTemp)-(iCut))) then - Printlog " 0: '" + sTemp + "'" + if (right(sTemp,1) <> right (str(i),1)) then + warnlog " " + i + ": '" + sTemp + "' is not as expected :-(" else - Warnlog "different : '" + fConvertBackslashToSlash (sFile) + "' than '" + right(sTEmp, len(sTemp)-(iCut)) + "'" + Printlog " " + i + ": '" + sTemp + "'" endif - InsertObjectsList.TypeKeys "<+>" - sleep 10 - for i = 1 to 4 - InsertObjectsList.TypeKeys "" - sTemp = InsertObjectsList.GetSelText - if (right(sTemp,1) <> right (str(i),1)) then - warnlog " " + i + ": '" + sTemp + "' is not as expected :-(" - else - Printlog " " + i + ": '" + sTemp + "'" - endif - next i - printlog " leave dialog 'Insert Slides/Objects' with OK " - SeitenObjekteEinfuegen.OK - sleep 3 - end if - kontext "Messagebox" - printlog " in draw pops a mesbox up, about adopting format for objects, too [yes no cancel] -> say NO printlog " - if messagebox.exists (5) then - printlog "active: '" + messagebox.gettext + "'" - messagebox.no - endif - printlog " select the inserted slide content on the last slide, by typing [End] [Strg]+[A] " - hTypeKeys "" - EditSelectAll - try - printlog " Edit->Cut " - EditCut - catch - Warnlog "It seems there is nothing inserted :-(" - endcatch - sleep 1 - - printlog " close application " - Call hCloseDocument - + next i + printlog " leave dialog 'Insert Slides/Objects' with OK " + SeitenObjekteEinfuegen.OK + sleep 3 + end if + kontext "Messagebox" + printlog " in draw pops a mesbox up, about adopting format for objects, too [yes no cancel] -> say NO printlog " + if messagebox.exists (5) then + printlog "active: '" + messagebox.gettext + "'" + messagebox.no + endif + printlog " select the inserted slide content on the last slide, by typing [End] [Strg]+[A] " + hTypeKeys "" + EditSelectAll + try + printlog " Edit->Cut " + EditCut + catch + Warnlog "It seems there is nothing inserted :-(" + endcatch + sleep 1 + + printlog " close application " + Call hCloseDocument + endcase 'tdInsertFile '------------------------------------------------------------------------------- testcase tInsertGraphics - dim i as integer - - printlog " open application " - Call hNewDocument - printlog " Insert->Graphics " - InsertGraphicsFromFile - Kontext "GrafikEinfuegenDlg" - sleep 2 - printlog " check number of graphics filter in dialog, should be 27 " - i = Dateityp.GetItemCount - if (i <> 27) Then - Warnlog "- Number of filters changed. Should be = 27 / but it is = '" + i + "'" - endif - sleep 1 - printlog " set file name to global\\input\\graf_inp\\enter.bmp" - Dateiname.SetText ConvertPath (gTesttoolPath + "global\input\graf_inp\enter.bmp") - sleep 3 - printlog " check checkbox 'Preview' " - Preview.Check - sleep 5 - printlog " click button 'open' " - Oeffnen.Click - sleep 5 - Kontext "Active" - if Active.Exists Then - Warnlog Active.GetText - Active.OK - end if - try - printlog " to check if something was inserted, try Edit->Cut and Edit->Paste " - EditCut - sleep 3 - EditPaste - sleep 3 - catch - WarnLog " Nothing was created, so EditCut does not work ?" - endcatch - sleep 2 - printlog " close application " - Call hCloseDocument - 'TODO: TBO: Check if link graphic would work!" - + dim i as integer + + printlog " open application " + Call hNewDocument + printlog " Insert->Graphics " + InsertGraphicsFromFile + Kontext "GrafikEinfuegenDlg" + sleep 2 + printlog " check number of graphics filter in dialog, should be 27 " + i = Dateityp.GetItemCount + if (i <> 27) Then + Warnlog "- Number of filters changed. Should be = 27 / but it is = '" + i + "'" + endif + sleep 1 + printlog " set file name to global\\input\\graf_inp\\enter.bmp" + Dateiname.SetText ConvertPath (gTesttoolPath + "global\input\graf_inp\enter.bmp") + sleep 3 + printlog " check checkbox 'Preview' " + Preview.Check + sleep 5 + printlog " click button 'open' " + Oeffnen.Click + sleep 5 + Kontext "Active" + if Active.Exists Then + Warnlog Active.GetText + Active.OK + end if + try + printlog " to check if something was inserted, try Edit->Cut and Edit->Paste " + EditCut + sleep 3 + EditPaste + sleep 3 + catch + WarnLog " Nothing was created, so EditCut does not work ?" + endcatch + sleep 2 + printlog " close application " + Call hCloseDocument + 'TODO: TBO: Check if link graphic would work!" + endcase 'tInsertGraphics '------------------------------------------------------------------------------- testcase tInsertObjectApplet - printlog " open application " - Call hNewDocument - printlog " Insert->Object->Applet " - sleep 1 - InsertObjectApplet - Kontext "AppletEinfuegen" - printlog " press button 'Search' " - sleep 2 - Suchen.Click - Kontext "OeffnenDlg" - printlog " set filename to 'global\\input\\java\\rocket.class' " - Dateiname.SetText ConvertPath (gTesttoolPath + "global\input\java\Clock.class") - printlog " close dialog 'Open' by pressing 'Open' " - sleep 2 - Oeffnen.Click - Kontext "AppletEinfuegen" - printlog " close dialog 'Insert Applet' by pressing OK " - sleep 2 - AppletEinfuegen.OK - sleep 3 - printlog " deselect object by typing key [Escape] " - hTypeKeys ("") - sleep 3 - try - printlog " Edit->Select All " - EditSelectAll - printlog " delete object by typing key [Delete] " - sleep 3 - hTypeKeys "" - catch - Warnlog "Delete did not work, maybe some error while creating the object before" - endcatch - sleep 1 -' gMouseclick 70,70 - printlog " close application " - Call hCloseDocument - + printlog " open application " + Call hNewDocument + printlog " Insert->Object->Applet " + sleep 1 + InsertObjectApplet + Kontext "AppletEinfuegen" + printlog " press button 'Search' " + sleep 2 + Suchen.Click + Kontext "OeffnenDlg" + printlog " set filename to 'global\\input\\java\\rocket.class' " + Dateiname.SetText ConvertPath (gTesttoolPath + "global\input\java\Clock.class") + printlog " close dialog 'Open' by pressing 'Open' " + sleep 2 + Oeffnen.Click + Kontext "AppletEinfuegen" + printlog " close dialog 'Insert Applet' by pressing OK " + sleep 2 + AppletEinfuegen.OK + sleep 3 + printlog " deselect object by typing key [Escape] " + hTypeKeys ("") + sleep 3 + try + printlog " Edit->Select All " + EditSelectAll + printlog " delete object by typing key [Delete] " + sleep 3 + hTypeKeys "" + catch + Warnlog "Delete did not work, maybe some error while creating the object before" + endcatch + sleep 1 + ' gMouseclick 70,70 + printlog " close application " + Call hCloseDocument + endcase 'tInsertObjectApplet '------------------------------------------------------------------------------- @@ -811,40 +811,40 @@ testcase tInsertObjectFormula hMenuSelectNr(3) hMenuItemCheck(6) endif - endif - 'ViewSelection deactivated due to problems with Slot - printlog " - selection wasn't visible :-( " - Kontext "AuswahlMath" - if (AuswahlMath.Exists = FALSE) Then - warnlog " - selection is STILL not visible :-) " + endif + 'ViewSelection deactivated due to problems with Slot + printlog " - selection wasn't visible :-( " + Kontext "AuswahlMath" + if (AuswahlMath.Exists = FALSE) Then + warnlog " - selection is STILL not visible :-) " + endif + sleep 5 + Kontext "AuswahlMath" + sleep 3 + if AuswahlMath.Exists Then + AuswahlMath.Close + printlog " put Clipboard into window 'Commands' with Edit->Paste " + if gApplication = "IMPRESS" then + Kontext "DocumentImpress" + DocumentImpress.UseMenu + hMenuSelectNr(2) + hMenuSelectNr(5) + else + Kontext "DocumentDraw" + DocumentDraw.UseMenu + hMenuSelectNr(2) + hMenuSelectNr(5) endif - sleep 5 - Kontext "AuswahlMath" - sleep 3 - if AuswahlMath.Exists Then - AuswahlMath.Close - printlog " put Clipboard into window 'Commands' with Edit->Paste " - if gApplication = "IMPRESS" then - Kontext "DocumentImpress" - DocumentImpress.UseMenu - hMenuSelectNr(2) - hMenuSelectNr(5) + 'EditPaste deactivated due to problems with Slot + + PrintLog "Formel: " + GetClipboardText + " placed into document" else - Kontext "DocumentDraw" - DocumentDraw.UseMenu - hMenuSelectNr(2) - hMenuSelectNr(5) - endif - 'EditPaste deactivated due to problems with Slot - - PrintLog "Formel: " + GetClipboardText + " placed into document" - else - Warnlog " Selection-window doesn't exist" - end if - gMouseClick 10,10 - printlog " close application " - hCloseDocument - + Warnlog " Selection-window doesn't exist" + end if + gMouseClick 10,10 + printlog " close application " + hCloseDocument + endcase 'tInsertObjectFormula '------------------------------------------------------------------------------- @@ -852,198 +852,198 @@ testcase tInsertChart qaerrorlog "Not yet ready." goto endsub - dim sTemp as string - - printlog " open application " - Call hNewDocument - printlog " Insert->Chart " - InsertChart - sleep 5 - printlog " now to check we are in Chart mode, trie Insert->Title " - InsertTitle - Kontext "InsertTitleDialog" - printlog " type something in field 'Main Title' " - MainTitle.SetText "Koelner Dom Koelsch" - PrintLog MainTitle.GetText - printlog " Close dialog 'InsertTitleDialog' " - InsertTitleDialog.OK - printlog " click outside the chart, to get out of chart mode " - gMouseClick 10,10 - printlog " check if the InsertTitle -entry is available, if yes, then it's a bug. If not, then it's ok " - try - InsertTitle - Kontext "InsertTitleDialog" - Warnlog "Edit mode of chart was not left :-(" - InsertTitleDialog.Cancel - catch - Printlog "Edit mode of chart left :-)" - endcatch - printlog " go into edit mode of chart again, by typing [Tab][Return] " - hTypeKeys "" - printlog " now to check we are in Chart mode, trie Insert->Title " - InsertTitle - Kontext "InsertTitleDialog" - sTemp = MainTitle.GetText - if (sTemp <> "Koelner Dom Koelsch") then - Warnlog "Title changed :-( is: '" + sTemp + "'; should be: '" + "Koelner Dom Koelsch" + "'" - endif - InsertTitleDialog.Cancel - printlog " click outside the chart, to get out of chart mode " - gMouseClick 10,10 - - - printlog " go into edit mode of chart again, by typing [Tab][Return] " - hTypeKeys "" - printlog " now to check we are in Chart mode, try Insert->Title " - InsertTitle - Kontext "InsertTitleDialog" - SubtitleCheck.Check - sTemp = MainTitle.GetText - if (sTemp <> "Koelner Dom Koelsch") then - Warnlog "Title changed :-( is: '" + sTemp + "'; should be: '" + "Koelner Dom Koelsch" + "'" - endif - - printlog " type something in field 'Main Title' " - SubtitleTitle.SetText "This is the Subtitle-Title" - PrintLog SubtitleTitle.GetText - printlog " Close dialog 'InsertTitleDialog' " - InsertTitleDialog.OK - printlog " click outside the chart, to get out of chart mode " - gMouseClick 10,10 - - - printlog " go into edit mode of chart again, by typing [Tab][Return] " - hTypeKeys "" - printlog " now to check we are in Chart mode, trie Insert->Title " - InsertTitle - Kontext "InsertTitleDialog" - XaxisCheck.Check - sTemp = SubtitleTitle.GetText - if (sTemp <> "This is the Subtitle-Title") then - Warnlog "Title changed :-( is: '" + sTemp + "'; should be: '" + "This is the Subtitle-Title" + "'" - endif - - sTemp = MainTitle.GetText - if (sTemp <> "Koelner Dom Koelsch") then - Warnlog "Title changed :-( is: '" + sTemp + "'; should be: '" + "Koelner Dom Koelsch" + "'" - endif - - printlog " type something in field 'X Axis Title' " - XaxisTitle.SetText "This is the X Axis -Title" - PrintLog XaxisTitle.GetText - printlog " Close dialog 'InsertTitleDialog' " - InsertTitleDialog.OK - printlog " click outside the chart, to get out of chart mode " - gMouseClick 10,10 - - - printlog " go into edit mode of chart again, by typing [Tab][Return] " - hTypeKeys "" - printlog " now to check we are in Chart mode, try Insert->Title " - InsertTitle - Kontext "InsertTitleDialog" - YaxisCheck.Check - sTemp = XaxisTitle.GetText - if (sTemp <> "This is the X Axis -Title") then - Warnlog "Title changed :-( is: '" + sTemp + "'; should be: '" + "This is the X Axis -Title" + "'" - endif - - sTemp = SubtitleTitle.GetText - if (sTemp <> "This is the Subtitle-Title") then - Warnlog "Title changed :-( is: '" + sTemp + "'; should be: '" + "This is the Subtitle-Title" + "'" - endif - - sTemp = MainTitle.GetText - if (sTemp <> "Koelner Dom Koelsch") then - Warnlog "Title changed :-( is: '" + sTemp + "'; should be: '" + "Koelner Dom Koelsch" + "'" - endif - - if ZaxisCheck.IsChecked then - Warnlog "ZaxisTitle should not have been checked. Check why." - else - try - ZaxisTitle.SetText "This is the Z Axis -Title" - Warnlog "ZaxisTitle should not be writable at this moment." - catch - printlog "ZaxisTitle was not writable. Good." - endcatch - end if - - printlog " type something in field 'Main Title' " - YaxisTitle.SetText "This is the Y Axis -Title" - PrintLog YaxisTitle.GetText - printlog " Close dialog 'InsertTitleDialog' " - InsertTitleDialog.OK - printlog " click outside the chart, to get out of chart mode " - gMouseClick 10,10 - - hTypeKeys "" - - - printlog " go into edit mode of chart again, by typing [Tab][Return] " - hTypeKeys "" - printlog " now to check we are in Chart mode, trie Insert->Title " - InsertTitle - Kontext "InsertTitleDialog" -' ZaxisCheck.Check - sTemp = YaxisTitle.GetText - if (sTemp <> "This is the Y Axis -Title") then - Warnlog "Title changed :-( is: '" + sTemp + "'; should be: '" + "This is the Y Axis -Title" + "'" - endif - - sTemp = XaxisTitle.GetText - if (sTemp <> "This is the X Axis -Title") then - Warnlog "Title changed :-( is: '" + sTemp + "'; should be: '" + "This is the X Axis -Title" + "'" - endif - - sTemp = SubtitleTitle.GetText - if (sTemp <> "This is the Subtitle-Title") then - Warnlog "Title changed :-( is: '" + sTemp + "'; should be: '" + "This is the Subtitle-Title" + "'" - endif - - sTemp = MainTitle.GetText - if (sTemp <> "Koelner Dom Koelsch") then - Warnlog "Title changed :-( is: '" + sTemp + "'; should be: '" + "Koelner Dom Koelsch" + "'" - endif - - printlog " type something in field 'X Axis Title' " -' ZaxisTitle.SetText "This is the Z Axis -Title" -' PrintLog ZaxisTitle.GetText - printlog " Close dialog 'InsertTitleDialog' " - InsertTitleDialog.OK - printlog " click outside the chart, to get out of chart mode " - gMouseClick 10,10 - - - printlog " go into edit mode of chart again, by typing [Tab][Return] " - hTypeKeys "" - printlog " now to check we are in Chart mode, trie Insert->Title " - InsertTitle - Kontext "InsertTitleDialog" - sTemp = YaxisTitle.GetText - if (sTemp <> "This is the Y Axis -Title") then - Warnlog "Title changed :-( is: '" + sTemp + "'; should be: '" + "This is the Y Axis -Title" + "'" - endif - - sTemp = XaxisTitle.GetText - if (sTemp <> "This is the X Axis -Title") then - Warnlog "Title changed :-( is: '" + sTemp + "'; should be: '" + "This is the X Axis -Title" + "'" - endif - - sTemp = SubtitleTitle.GetText - if (sTemp <> "This is the Subtitle-Title") then - Warnlog "Title changed :-( is: '" + sTemp + "'; should be: '" + "This is the Subtitle-Title" + "'" - endif - - sTemp = MainTitle.GetText - if (sTemp <> "Koelner Dom Koelsch") then - Warnlog "Title changed :-( is: '" + sTemp + "'; should be: '" + "Koelner Dom Koelsch" + "'" - endif - -' sTemp = ZaxisTitle.GetText -' if (sTemp <> "This is the Z Axis -Title") then -' Warnlog "Title changed :-( is: '" + sTemp + "'; should be: '" + "This is the Z Axis -Title" + "'" -' endif + dim sTemp as string + + printlog " open application " + Call hNewDocument + printlog " Insert->Chart " + InsertChart + sleep 5 + printlog " now to check we are in Chart mode, trie Insert->Title " + InsertTitle + Kontext "InsertTitleDialog" + printlog " type something in field 'Main Title' " + MainTitle.SetText "Koelner Dom Koelsch" + PrintLog MainTitle.GetText + printlog " Close dialog 'InsertTitleDialog' " + InsertTitleDialog.OK + printlog " click outside the chart, to get out of chart mode " + gMouseClick 10,10 + printlog " check if the InsertTitle -entry is available, if yes, then it's a bug. If not, then it's ok " + try + InsertTitle + Kontext "InsertTitleDialog" + Warnlog "Edit mode of chart was not left :-(" + InsertTitleDialog.Cancel + catch + Printlog "Edit mode of chart left :-)" + endcatch + printlog " go into edit mode of chart again, by typing [Tab][Return] " + hTypeKeys "" + printlog " now to check we are in Chart mode, trie Insert->Title " + InsertTitle + Kontext "InsertTitleDialog" + sTemp = MainTitle.GetText + if (sTemp <> "Koelner Dom Koelsch") then + Warnlog "Title changed :-( is: '" + sTemp + "'; should be: '" + "Koelner Dom Koelsch" + "'" + endif + InsertTitleDialog.Cancel + printlog " click outside the chart, to get out of chart mode " + gMouseClick 10,10 + + + printlog " go into edit mode of chart again, by typing [Tab][Return] " + hTypeKeys "" + printlog " now to check we are in Chart mode, try Insert->Title " + InsertTitle + Kontext "InsertTitleDialog" + SubtitleCheck.Check + sTemp = MainTitle.GetText + if (sTemp <> "Koelner Dom Koelsch") then + Warnlog "Title changed :-( is: '" + sTemp + "'; should be: '" + "Koelner Dom Koelsch" + "'" + endif + + printlog " type something in field 'Main Title' " + SubtitleTitle.SetText "This is the Subtitle-Title" + PrintLog SubtitleTitle.GetText + printlog " Close dialog 'InsertTitleDialog' " + InsertTitleDialog.OK + printlog " click outside the chart, to get out of chart mode " + gMouseClick 10,10 + + + printlog " go into edit mode of chart again, by typing [Tab][Return] " + hTypeKeys "" + printlog " now to check we are in Chart mode, trie Insert->Title " + InsertTitle + Kontext "InsertTitleDialog" + XaxisCheck.Check + sTemp = SubtitleTitle.GetText + if (sTemp <> "This is the Subtitle-Title") then + Warnlog "Title changed :-( is: '" + sTemp + "'; should be: '" + "This is the Subtitle-Title" + "'" + endif + + sTemp = MainTitle.GetText + if (sTemp <> "Koelner Dom Koelsch") then + Warnlog "Title changed :-( is: '" + sTemp + "'; should be: '" + "Koelner Dom Koelsch" + "'" + endif + + printlog " type something in field 'X Axis Title' " + XaxisTitle.SetText "This is the X Axis -Title" + PrintLog XaxisTitle.GetText + printlog " Close dialog 'InsertTitleDialog' " + InsertTitleDialog.OK + printlog " click outside the chart, to get out of chart mode " + gMouseClick 10,10 + + + printlog " go into edit mode of chart again, by typing [Tab][Return] " + hTypeKeys "" + printlog " now to check we are in Chart mode, try Insert->Title " + InsertTitle + Kontext "InsertTitleDialog" + YaxisCheck.Check + sTemp = XaxisTitle.GetText + if (sTemp <> "This is the X Axis -Title") then + Warnlog "Title changed :-( is: '" + sTemp + "'; should be: '" + "This is the X Axis -Title" + "'" + endif + + sTemp = SubtitleTitle.GetText + if (sTemp <> "This is the Subtitle-Title") then + Warnlog "Title changed :-( is: '" + sTemp + "'; should be: '" + "This is the Subtitle-Title" + "'" + endif + + sTemp = MainTitle.GetText + if (sTemp <> "Koelner Dom Koelsch") then + Warnlog "Title changed :-( is: '" + sTemp + "'; should be: '" + "Koelner Dom Koelsch" + "'" + endif + + if ZaxisCheck.IsChecked then + Warnlog "ZaxisTitle should not have been checked. Check why." + else + try + ZaxisTitle.SetText "This is the Z Axis -Title" + Warnlog "ZaxisTitle should not be writable at this moment." + catch + printlog "ZaxisTitle was not writable. Good." + endcatch + end if + + printlog " type something in field 'Main Title' " + YaxisTitle.SetText "This is the Y Axis -Title" + PrintLog YaxisTitle.GetText + printlog " Close dialog 'InsertTitleDialog' " + InsertTitleDialog.OK + printlog " click outside the chart, to get out of chart mode " + gMouseClick 10,10 + + hTypeKeys "" + + + printlog " go into edit mode of chart again, by typing [Tab][Return] " + hTypeKeys "" + printlog " now to check we are in Chart mode, trie Insert->Title " + InsertTitle + Kontext "InsertTitleDialog" + ' ZaxisCheck.Check + sTemp = YaxisTitle.GetText + if (sTemp <> "This is the Y Axis -Title") then + Warnlog "Title changed :-( is: '" + sTemp + "'; should be: '" + "This is the Y Axis -Title" + "'" + endif + + sTemp = XaxisTitle.GetText + if (sTemp <> "This is the X Axis -Title") then + Warnlog "Title changed :-( is: '" + sTemp + "'; should be: '" + "This is the X Axis -Title" + "'" + endif + + sTemp = SubtitleTitle.GetText + if (sTemp <> "This is the Subtitle-Title") then + Warnlog "Title changed :-( is: '" + sTemp + "'; should be: '" + "This is the Subtitle-Title" + "'" + endif + + sTemp = MainTitle.GetText + if (sTemp <> "Koelner Dom Koelsch") then + Warnlog "Title changed :-( is: '" + sTemp + "'; should be: '" + "Koelner Dom Koelsch" + "'" + endif + + printlog " type something in field 'X Axis Title' " + ' ZaxisTitle.SetText "This is the Z Axis -Title" + ' PrintLog ZaxisTitle.GetText + printlog " Close dialog 'InsertTitleDialog' " + InsertTitleDialog.OK + printlog " click outside the chart, to get out of chart mode " + gMouseClick 10,10 + + + printlog " go into edit mode of chart again, by typing [Tab][Return] " + hTypeKeys "" + printlog " now to check we are in Chart mode, trie Insert->Title " + InsertTitle + Kontext "InsertTitleDialog" + sTemp = YaxisTitle.GetText + if (sTemp <> "This is the Y Axis -Title") then + Warnlog "Title changed :-( is: '" + sTemp + "'; should be: '" + "This is the Y Axis -Title" + "'" + endif + + sTemp = XaxisTitle.GetText + if (sTemp <> "This is the X Axis -Title") then + Warnlog "Title changed :-( is: '" + sTemp + "'; should be: '" + "This is the X Axis -Title" + "'" + endif + + sTemp = SubtitleTitle.GetText + if (sTemp <> "This is the Subtitle-Title") then + Warnlog "Title changed :-( is: '" + sTemp + "'; should be: '" + "This is the Subtitle-Title" + "'" + endif + + sTemp = MainTitle.GetText + if (sTemp <> "Koelner Dom Koelsch") then + Warnlog "Title changed :-( is: '" + sTemp + "'; should be: '" + "Koelner Dom Koelsch" + "'" + endif + + ' sTemp = ZaxisTitle.GetText + ' if (sTemp <> "This is the Z Axis -Title") then + ' Warnlog "Title changed :-( is: '" + sTemp + "'; should be: '" + "This is the Z Axis -Title" + "'" + ' endif printlog " Close dialog 'InsertTitleDialog' " InsertTitleDialog.OK @@ -1052,72 +1052,72 @@ testcase tInsertChart gMouseClick 10,10 printlog " close application " Call hCloseDocument - + endcase 'tInsertChart '---------------------------------------------------------------------------------------------------------------------------------------------------------- testcase tInsertObjectPlugIn - dim i as integer - dim x as integer - dim bAble as boolean - dim sTemp as string - - printlog " open application " - call hNewDocument - sleep 2 - printlog " Insert->Object->Plug-in" - InsertObjectPlugIn - sleep 2 - Kontext "PlugInEinfuegen" - printlog " click on button 'Browse...' " - Durchsuchen.Click - sleep 2 - kontext "OeffnenDLG" - sleep 1 - bAble = FALSE - x = Dateityp.GetItemCount - Printlog "-------TBO: print all entries from File-Type-List: " - for i = 1 to x - sTemp = Dateityp.GetItemText (i) - printlog "- - - - -: '"+ sTemp +"'" - if (inStr(sTemp, ".mov") > 0) then - bAble = True - Printlog "^^^^^^^^^^^^^^^^^^ contains a Apple QT plugin .mov :-) " - endif - next i - Printlog "---------------------------------------------------" - OeffnenDLG.cancel - Kontext "PlugInEinfuegen" ' :-) - printlog " if .mov files are regcognized, insert the folowing one; else cancel dialog!" - if bAble then - printlog "+ set field 'File/URL' to 'graphics\\input\\sample.mov' " - DateiUrl.SetText ConvertPath (gTesttoolPath + "graphics\required\input\sample.mov") - printlog "+ press button 'OK' to close dialog " - PlugInEinfuegen.OK - sleep 2 - Kontext "Active" - if Active.Exists then + dim i as integer + dim x as integer + dim bAble as boolean + dim sTemp as string + + printlog " open application " + call hNewDocument + sleep 2 + printlog " Insert->Object->Plug-in" + InsertObjectPlugIn + sleep 2 + Kontext "PlugInEinfuegen" + printlog " click on button 'Browse...' " + Durchsuchen.Click + sleep 2 + kontext "OeffnenDLG" + sleep 1 + bAble = FALSE + x = Dateityp.GetItemCount + Printlog "-------TBO: print all entries from File-Type-List: " + for i = 1 to x + sTemp = Dateityp.GetItemText (i) + printlog "- - - - -: '"+ sTemp +"'" + if (inStr(sTemp, ".mov") > 0) then + bAble = True + Printlog "^^^^^^^^^^^^^^^^^^ contains a Apple QT plugin .mov :-) " + endif + next i + Printlog "---------------------------------------------------" + OeffnenDLG.cancel + Kontext "PlugInEinfuegen" ' :-) + printlog " if .mov files are regcognized, insert the folowing one; else cancel dialog!" + if bAble then + printlog "+ set field 'File/URL' to 'graphics\\input\\sample.mov' " + DateiUrl.SetText ConvertPath (gTesttoolPath + "graphics\required\input\sample.mov") + printlog "+ press button 'OK' to close dialog " + PlugInEinfuegen.OK + sleep 2 + Kontext "Active" + if Active.Exists then printlog Active.GetText Active.OK sleep 1 - end if - printlog "+ click outside the inserted frame " - gMouseClick 30,30 - try + end if + printlog "+ click outside the inserted frame " + gMouseClick 30,30 + try printlog "+ check with 'Edit->Select all' and key [delete] if something was inserted " EditSelectAll hTypeKeys "" - catch + catch Warnlog " Nothing inserted which could be deleted" - endcatch - else - qaErrorLog "Not able to test the insertion of a plugin, because no ability to play .mov files is available :-(" - PlugInEinfuegen.Cancel - endif - printlog " close application " - hCloseDocument - + endcatch + else + qaErrorLog "Not able to test the insertion of a plugin, because no ability to play .mov files is available :-(" + PlugInEinfuegen.Cancel + endif + printlog " close application " + hCloseDocument + endcase 'tInsertObjectPlugIn '------------------------------------------------------------------------------- @@ -1125,163 +1125,163 @@ testcase tInsertSpecialCharacter qaerrorlog "tInsertSpecialCharacter outcommented due to unpredictable results" goto endsub - Dim i as integer - Dim j as integer - Dim Zaehler as integer - Dim sSchriftType - Dim Zufall as Integer - dim sTemp as string - - printlog " open application " - Call hNewDocument - - printlog " insert a text frame with content " - hTextRahmenErstellen ("Who will read this?",30,30,80,80) - printlog " Insert->Special Character... " - InsertSpecialCharacterDraw - Kontext "Sonderzeichen" - printlog " select a character for every 'font' " - j = Schrift.GetItemCount - For i = 1 to j - Schrift.Select j - Zufall = Int((12*Rnd)+1) - printlog "+ to insert a character, randomize the type keys [Cursor Right] and press [Space] " - SchriftListe.TypeKeys "" , Zufall - SchriftListe.TypeKeys "" - next i - sleep 1 - printlog " press button [Delete] " - Loeschen.Click '----------------------------------- > NOTHING is inserted !! - sleep 1 - try - printlog " tries to close dialog 'Special Characters' with OK " - Sonderzeichen.OK - Warnlog "Dialogue need not to be closeable, because nothing is selected :-(" - catch - printlog " close dialog with 'Cancel' " - Sonderzeichen.Cancel - endcatch - sleep 1 - printlog " select something with keys [Shift]+[Home] " - hTypeKeys "" - printlog " Edit->Copy " - EditCopy - sTemp = GetClipboardText - printlog " Compare the selected text with the one typed at the beginning - it has to be the same " -' if (sTemp <> "Who will read this?") then -' Warnlog "Hmm, there is something wrong! But what? :-( " -' printlog "is: '" + sTemp + "'; should: '" + "Who will read this?" + "'" -' endif - sleep 2 - hTypeKeys "" - -' printlog " select a character for every 'font' " -' j = Schrift.GetItemCount - For i = 1 to j - printlog " Insert->Special Character... " - InsertSpecialCharacterDraw - Kontext "Sonderzeichen" - sleep 1 - try - Schrift.Select i - catch - qaErrorLog("Sometimes this Timeout happens: " + i ) - endcatch - Printlog "(" + i + "/" + j + "): '" + Schrift.GetSelText + "'" - sleep 1 - Zufall = Int((256*Rnd)+1) - printlog "+ to insert a character, randomize the type keys [Cursor Right] and press [Space] " - SchriftListe.TypeKeys "" - SchriftListe.TypeKeys "" , Zufall - SchriftListe.TypeKeys "" - sleep 1 - try - printlog " trie to close dialog 'Special Characters' with OK " - Sonderzeichen.OK - catch - printlog " close dialog with 'Cancel' " - Warnlog "Dialog was not closeable with OK :-(" - Sonderzeichen.Cancel - endcatch - sleep 2 - next i - printlog " select the inserted chars with keys with keys [Strg]+[End] + j-times [shift]+[right] " - hTypeKeys "" - hTypeKeys ("", j) - printlog " Edit->Copy " - EditCut - printlog " now select the rest with keys [Shift]+[Home] " - hTypeKeys "" - printlog " Edit->Copy " - EditCopy - sTemp = GetClipboardText - printlog " Compare the selected text with the one typed at the beginning - it has to be the same " - if (sTemp <> "Who will read this?") then - qaerrorlog "is: '" + sTemp + "'; should: '" + "Who will read this?" + "'" - endif - sleep 2 - hTypeKeys "" - - printlog " Insert->Special Character... " - InsertSpecialCharacterDraw - Kontext "Sonderzeichen" - sleep 3 -' printlog " select a character for every 'font' " -' j = Schrift.GetItemCount - For i = 1 to j - Zufall = Int((256*Rnd)+1) - Schrift.Select i - sleep 5 - Printlog "(" + i + "/" + j + "): '" + Schrift.GetSelText + "'; " + Zufall - sleep 3 - printlog "+ to insert a character, randomize the type keys [Cursor Right] and press [Space] " - SchriftListe.TypeKeys "" , Zufall - SchriftListe.TypeKeys "" - sleep 3 - next i - sleep 1 - try - printlog " tries to close dialog 'Special Characters' with OK " - Sonderzeichen.OK - catch - printlog " close dialog with 'Cancel' " - Warnlog "Dialogue was not closeable with OK :-(" - Sonderzeichen.Cancel - endcatch - sleep 2 - printlog " close application " - Call hCloseDocument - + Dim i as integer + Dim j as integer + Dim Zaehler as integer + Dim sSchriftType + Dim Zufall as Integer + dim sTemp as string + + printlog " open application " + Call hNewDocument + + printlog " insert a text frame with content " + hTextRahmenErstellen ("Who will read this?",30,30,80,80) + printlog " Insert->Special Character... " + InsertSpecialCharacterDraw + Kontext "Sonderzeichen" + printlog " select a character for every 'font' " + j = Schrift.GetItemCount + For i = 1 to j + Schrift.Select j + Zufall = Int((12*Rnd)+1) + printlog "+ to insert a character, randomize the type keys [Cursor Right] and press [Space] " + SchriftListe.TypeKeys "" , Zufall + SchriftListe.TypeKeys "" + next i + sleep 1 + printlog " press button [Delete] " + Loeschen.Click '----------------------------------- > NOTHING is inserted !! + sleep 1 + try + printlog " tries to close dialog 'Special Characters' with OK " + Sonderzeichen.OK + Warnlog "Dialogue need not to be closeable, because nothing is selected :-(" + catch + printlog " close dialog with 'Cancel' " + Sonderzeichen.Cancel + endcatch + sleep 1 + printlog " select something with keys [Shift]+[Home] " + hTypeKeys "" + printlog " Edit->Copy " + EditCopy + sTemp = GetClipboardText + printlog " Compare the selected text with the one typed at the beginning - it has to be the same " + ' if (sTemp <> "Who will read this?") then + ' Warnlog "Hmm, there is something wrong! But what? :-( " + ' printlog "is: '" + sTemp + "'; should: '" + "Who will read this?" + "'" + ' endif + sleep 2 + hTypeKeys "" + + ' printlog " select a character for every 'font' " + ' j = Schrift.GetItemCount + For i = 1 to j + printlog " Insert->Special Character... " + InsertSpecialCharacterDraw + Kontext "Sonderzeichen" + sleep 1 + try + Schrift.Select i + catch + qaErrorLog("Sometimes this Timeout happens: " + i ) + endcatch + Printlog "(" + i + "/" + j + "): '" + Schrift.GetSelText + "'" + sleep 1 + Zufall = Int((256*Rnd)+1) + printlog "+ to insert a character, randomize the type keys [Cursor Right] and press [Space] " + SchriftListe.TypeKeys "" + SchriftListe.TypeKeys "" , Zufall + SchriftListe.TypeKeys "" + sleep 1 + try + printlog " trie to close dialog 'Special Characters' with OK " + Sonderzeichen.OK + catch + printlog " close dialog with 'Cancel' " + Warnlog "Dialog was not closeable with OK :-(" + Sonderzeichen.Cancel + endcatch + sleep 2 + next i + printlog " select the inserted chars with keys with keys [Strg]+[End] + j-times [shift]+[right] " + hTypeKeys "" + hTypeKeys ("", j) + printlog " Edit->Copy " + EditCut + printlog " now select the rest with keys [Shift]+[Home] " + hTypeKeys "" + printlog " Edit->Copy " + EditCopy + sTemp = GetClipboardText + printlog " Compare the selected text with the one typed at the beginning - it has to be the same " + if (sTemp <> "Who will read this?") then + qaerrorlog "is: '" + sTemp + "'; should: '" + "Who will read this?" + "'" + endif + sleep 2 + hTypeKeys "" + + printlog " Insert->Special Character... " + InsertSpecialCharacterDraw + Kontext "Sonderzeichen" + sleep 3 + ' printlog " select a character for every 'font' " + ' j = Schrift.GetItemCount + For i = 1 to j + Zufall = Int((256*Rnd)+1) + Schrift.Select i + sleep 5 + Printlog "(" + i + "/" + j + "): '" + Schrift.GetSelText + "'; " + Zufall + sleep 3 + printlog "+ to insert a character, randomize the type keys [Cursor Right] and press [Space] " + SchriftListe.TypeKeys "" , Zufall + SchriftListe.TypeKeys "" + sleep 3 + next i + sleep 1 + try + printlog " tries to close dialog 'Special Characters' with OK " + Sonderzeichen.OK + catch + printlog " close dialog with 'Cancel' " + Warnlog "Dialogue was not closeable with OK :-(" + Sonderzeichen.Cancel + endcatch + sleep 2 + printlog " close application " + Call hCloseDocument + endcase 'tInsertSpecialCharacter '------------------------------------------------------------------------------- testcase tInsertSpreadsheet - printlog " open application " - Call hNewDocument - sleep 3 - printlog " Insert->Spreadsheet " - InsertSpreadsheetDraw - sleep 2 - try - printlog " Spreadsheet is in edit mode per default " - printlog " Format->Sheet->Rename " - FormatSheetRename - Kontext "TabelleUmbenennen" - printlog " close dialog 'Rename Sheet' with OK " - TabelleUmbenennen.OK - catch - WarnLog "Spreadsheet is not in editmode :-( " - endcatch - printlog " delete spreadsheet OLE by typing [DELETE] (first click outside the spreadsheet!) " - gMouseClick (1,1) - hTypeKeys "" - sleep 3 - hTypeKeys "" - sleep 2 - printlog " close application " - hCloseDocument - + printlog " open application " + Call hNewDocument + sleep 3 + printlog " Insert->Spreadsheet " + InsertSpreadsheetDraw + sleep 2 + try + printlog " Spreadsheet is in edit mode per default " + printlog " Format->Sheet->Rename " + FormatSheetRename + Kontext "TabelleUmbenennen" + printlog " close dialog 'Rename Sheet' with OK " + TabelleUmbenennen.OK + catch + WarnLog "Spreadsheet is not in editmode :-( " + endcatch + printlog " delete spreadsheet OLE by typing [DELETE] (first click outside the spreadsheet!) " + gMouseClick (1,1) + hTypeKeys "" + sleep 3 + hTypeKeys "" + sleep 2 + printlog " close application " + hCloseDocument + endcase 'tInsertSpreadsheet '------------------------------------------------------------------------------- diff --git a/testautomation/graphics/optional/includes/global/g_line.inc b/testautomation/graphics/optional/includes/global/g_line.inc index dbd0e06b3370..0c84051ac514 100755 --- a/testautomation/graphics/optional/includes/global/g_line.inc +++ b/testautomation/graphics/optional/includes/global/g_line.inc @@ -1,7 +1,7 @@ 'encoding UTF-8 Do not remove or change this line! '************************************************************************** '* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. -'* +'* '* Copyright 2008 by Sun Microsystems, Inc. '* '* OpenOffice.org - a multi-platform office productivity suite @@ -49,85 +49,66 @@ testcase tiFormatLine Dim k 'Variable fuer Transparenz (Anzahl) Dim l Dim ZaehlerStilLinks - - Call hNewDocument '/// New impress document + sleep 3 - Call hRechteckErstellen (10,10,60,60) '/// create rectangle sleep 2 - FormatLine '/// open Format line dialog Kontext - Active.SetPage TabLinie '///Open TabLine Tabpage Kontext "TabLinie" sleep 2 - Stil.GetItemCount '/// Get item count for style ///' - Farbe.GetItemCount '/// Get item count for color ///' - Breite.More 1 '/// change value for ///' ZaehlerStil = Stil.GetItemCount ZaehlerFarbe = Farbe.GetItemCount - - for i=1 to ZaehlerStil '/// Apply every style to the rectangle ///' - wait 10 - Stil.Select i - wait 10 - TabLinie.OK '/// Closing dialog with ok - ' Kontext "DocumentImpress" - FormatLine '///Open TabLine Tabpage - Kontext - Active.SetPage TabLinie - Kontext "TabLinie" - next i - - for j=1 to ZaehlerFarbe '/// Apply every color to the rectangle///' - PrintLog "-- " + Farbe.GetSelText - wait 10 - Farbe.Select j - wait 10 - TabLinie.OK + + wait 10 + Stil.Select i + wait 10 ' Kontext "DocumentImpress" - FormatLine - Kontext - Active.SetPage TabLinie - Kontext "TabLinie" - next j - Breite.More 3 '/// change Breite ///' - Breite.Less 2 - for k=1 to 6 - Transparenz.More 1 '/// change tranparence///' - next k - TabLinie.OK - '--------------------------------------- - sleep 2 - EditSelectAll '/// Select all objects in document ///' - sleep 2 - hTypeKeys "" '/// Delete objects ///' - sleep 2 - FormatLine - Kontext - Active.SetPage TabLinie '/// TabLine ///' + Active.SetPage TabLinie Kontext "TabLinie" - StilLinks.GetItemCount - ZaehlerStilLinks=StilLinks.GetItemCount - for l=1 to ZaehlerStilLinks '/// Apply all line end styles///' - wait 10 - if EndenSynchronisieren.IsChecked=False Then EndenSynchronisieren.Check '/// check synchronize ///' - wait 10 - StilLinks.Select l - if StilLinks.GetSelText<>StilRechts.GetSelText Then - WarnLog " Ends not synchronized. " + StilLinks.GetSelText + " Right: " + StilRechts.GetSelText '/// check if style is automatically applied for both ends ///' - else - PrintLog " Left: " + StilLinks.GetSelText + " Right: " + StilRechts.GetSelText - end if - EndenSynchronisieren.UnCheck - next l - ZentriertLinks.Check - if ZentriertRechts.isChecked = True Then PrintLog " Centered right does work" - i = CornerStyle.GetItemCount - if i <> 4 then warnlog "CornerStyle should contain four options, but currently has: " + i - for i = 1 to 4 +next i + +PrintLog "-- " + Farbe.GetSelText +wait 10 +Farbe.Select j +wait 10 +TabLinie.OK +' Kontext "DocumentImpress" +FormatLine +Kontext +Active.SetPage TabLinie +Kontext "TabLinie" +next j +Breite.Less 2 +for k=1 to 6 +next k +TabLinie.OK +'--------------------------------------- +sleep 2 +sleep 2 +sleep 2 +FormatLine + +Kontext +Kontext "TabLinie" +StilLinks.GetItemCount +ZaehlerStilLinks=StilLinks.GetItemCount +wait 10 +wait 10 +StilLinks.Select l +if StilLinks.GetSelText<>StilRechts.GetSelText Then +else +PrintLog " Left: " + StilLinks.GetSelText + " Right: " + StilRechts.GetSelText +end if +EndenSynchronisieren.UnCheck +next l +ZentriertLinks.Check +if ZentriertRechts.isChecked = True Then PrintLog " Centered right does work" +i = CornerStyle.GetItemCount +if i <> 4 then warnlog "CornerStyle should contain four options, but currently has: " + i +for i = 1 to 4 CornerStyle.Select i if CornerStyle.GetSelIndex <> i then warnlog "Corner Styles was: " + CornerStyle.GetSelIndex + ", should have been " + i - Printlog "Corner Style nr: " + i + " = " + CornerStyle.GetSelText + Printlog "Corner Style nr: " + i + " = " + CornerStyle.GetSelText next i TabLinie.OK '------------------------------------------ @@ -136,15 +117,12 @@ testcase tiFormatLine Kontext Active.SetPage TabLinienstile Kontext "TabLinienstile" - Hinzufuegen.Click '/// Add new line style ///' Kontext "NameDlg" - Eingabefeld.SetText "Testlinie2" '/// insert name of style (Testlinie2) ///' NameDlg.OK sleep 1 Kontext Active.SetPage TabLinienstile Kontext "TabLinienstile" - Loeschen.Click '/// delete created style ///' Kontext "Active" Active.Yes Kontext @@ -157,167 +135,146 @@ testcase tiFormatLine LaengeLinks.More 3 LaengeRechts.More 3 Abstand.SetText "0,1" - if AnLinienbreite.IsChecked = True Then AnLinienbreite.Click '/// all fields changed in TabLinienstile ///' PrintLog " All controls could be manipulated." TypLinks.Select 1 TypRechts.Select 1 - if LaengeLinks.IsEnabled And LaengeRechts.IsEnabled =True Then '/// check if its possible to apply a length to a point ///' - WarnLog " A point where you can change its length is not a point anymore" - else - PrintLog " Line style pint tested" '/// All styles for points are changed ///' - end if - sleep 1 - try - Linienstil.Select 1 - catch - if Linienstil.GetItemCount = 0 then '/// check if style list is filled ///' - Warnlog "- The list for line styles is empty" - Hinzufuegen.Click '/// new style ///' - Kontext "NameDlg" - NameDlg.OK - end if - endcatch - Kontext - Active.SetPage TabLinienstile - Kontext "TabLinienstile" - Aendern.Click '/// change style ///' + WarnLog " A point where you can change its length is not a point anymore" +else +end if +sleep 1 +try + Linienstil.Select 1 +catch + Warnlog "- The list for line styles is empty" Kontext "NameDlg" - Eingabefeld.SetText Eingabefeld.GetText + "1" '/// new name for changed style ///' - SetClipboard Eingabefeld.GetText '/// put name into clipboard ///' NameDlg.OK - Kontext - Active.SetPage TabLinienstile - Kontext "TabLinienstile" - TabLinienstile.OK - sleep 2 - FormatLine - Kontext - Active.SetPage TabLinienstile - Kontext "TabLinienstile" - try - Aendern.Click - catch +end if +endcatch +Kontext +Active.SetPage TabLinienstile +Kontext "TabLinienstile" +Kontext "NameDlg" +NameDlg.OK +Kontext +Active.SetPage TabLinienstile +Kontext "TabLinienstile" +TabLinienstile.OK +sleep 2 +FormatLine +Kontext +Active.SetPage TabLinienstile +Kontext "TabLinienstile" +try +Aendern.Click +catch +Hinzufuegen.Click +endcatch +Kontext "NameDlg" +NameDlg.Cancel +sleep 2 +Kontext +Active.SetPage TabLinienstile +Kontext "TabLinienstile" +sleep 1 +try +Kontext "Active" +Active.Yes +sleep 3 +catch +if Linienstile.GetItemCount = 0 Then Hinzufuegen.Click - endcatch Kontext "NameDlg" - if Eingabefeld.GetText <> GetClipboardText Then WarnLog "No changes for Line style" '/// check if changed style is in list ///' - NameDlg.Cancel - sleep 2 - Kontext - Active.SetPage TabLinienstile - Kontext "TabLinienstile" sleep 1 - try - Loeschen.Click '/// delete changed style ///' - Kontext "Active" - Active.Yes - sleep 3 - catch - if Linienstile.GetItemCount = 0 Then - Hinzufuegen.Click - Kontext "NameDlg" - sleep 1 - Eingabefeld.SetText "Delete" - NameDlg.OK - end if - endcatch - Kontext - Active.SetPage TabLinienstile - Kontext "TabLinienstile" - sleep 1 - TabLinienstile.OK - '-------------------------------------------- - sleep 2 - Call hRechteckErstellen (40,40,80,50) '/// create rectangle ///' - sleep 2 - FormatLine - Kontext - Active.SetPage TabLinienenden - Kontext "TabLinienenden" - sleep 2 - Kontext "Linienstil" - if Linienstil.Exists then Aendern.Click '/// change style ///' - sleep 1 - Kontext - Active.SetPage TabLinienenden - Kontext "TabLinienenden" - sleep 1 - Liste.GetItemCount - Liste.Select 3 - Hinzufuegen.Click '/// add style ///' - Kontext "NameDlg" - NameDlg.OK - - Kontext - Active.SetPage TabLinienenden - Kontext "TabLinienenden" - Aendern.Click '/// change style ///' - Kontext "Active" - Printlog Active.GetText - Active.OK - Kontext "NameDlg" - Eingabefeld.SetText Eingabefeld.GetText + "1" - PrintLog " Name inserted" + Eingabefeld.SetText "Delete" NameDlg.OK - - Kontext - if active.GetRt=304 then - active.ok - Kontext "NameDlg" - Eingabefeld.SetText Eingabefeld.GetText + "1" - PrintLog " Name inserted" - NameDlg.OK - endif - if active.GetRt=304 then - active.ok - warnlog "still not a valid name :-(" - endif - Kontext - Active.SetPage TabLinienenden - Kontext "TabLinienenden" - Loeschen.Click '/// delete style ///' - Kontext "Active" - Active.Yes - - Kontext - Active.SetPage TabLinienenden - Kontext "TabLinienenden" - sleep 1 - Speichern.Click '/// save style ///' - sleep 1 - Kontext "SpeichernDlg" - sleep 1 - SpeichernDlg.Cancel - - Kontext "TabLinienenden" - TabLinienenden.Cancel - sleep 2 - - '///New part for line - 'EditSelectAll '/// Select all objects in document ///' - 'sleep 2 - 'hTypeKeys "" '/// Delete objects ///' - 'sleep 2 - - '/// Create line to test shadow tabpage in line dialog - 'kontext "Toolbar" - 'Kurven.Click - 'sleep 1 - 'if (gApplication = "DRAW") then - ' Kontext "DocumentDraw" - ' gMouseMove (30,50, 40,60) - ' sleep 1 - 'else - ' Kontext "DocumentImpress" - ' gMouseMove (30,50, 40,60) - ' sleep 1 - 'endif - 'FormatLine - 'Kontext - 'Active.SetPage TabSchatten - - ' FormatLine.Cancel - Call hCloseDocument '/// close document ///' +end if +endcatch +Kontext +Active.SetPage TabLinienstile +Kontext "TabLinienstile" +sleep 1 +TabLinienstile.OK +'-------------------------------------------- +sleep 2 +sleep 2 +FormatLine +Kontext +Active.SetPage TabLinienenden +Kontext "TabLinienenden" +sleep 2 +Kontext "Linienstil" +sleep 1 +Kontext +Active.SetPage TabLinienenden +Kontext "TabLinienenden" +sleep 1 +Liste.GetItemCount +Liste.Select 3 +Kontext "NameDlg" +NameDlg.OK + +Kontext +Active.SetPage TabLinienenden +Kontext "TabLinienenden" +Kontext "Active" +Printlog Active.GetText +Active.OK +Kontext "NameDlg" +Eingabefeld.SetText Eingabefeld.GetText + "1" +PrintLog " Name inserted" +NameDlg.OK + +Kontext +if active.GetRt=304 then +active.ok +Kontext "NameDlg" +Eingabefeld.SetText Eingabefeld.GetText + "1" +PrintLog " Name inserted" +NameDlg.OK +endif +if active.GetRt=304 then +active.ok +warnlog "still not a valid name :-(" +endif +Kontext +Active.SetPage TabLinienenden +Kontext "TabLinienenden" +Kontext "Active" +Active.Yes + +Kontext +Active.SetPage TabLinienenden +Kontext "TabLinienenden" +sleep 1 +sleep 1 +Kontext "SpeichernDlg" +sleep 1 +SpeichernDlg.Cancel + +Kontext "TabLinienenden" +TabLinienenden.Cancel +sleep 2 + +'sleep 2 +'sleep 2 + +'kontext "Toolbar" +'Kurven.Click +'sleep 1 +'if (gApplication = "DRAW") then +' Kontext "DocumentDraw" +' gMouseMove (30,50, 40,60) +' sleep 1 +'else +' Kontext "DocumentImpress" +' gMouseMove (30,50, 40,60) +' sleep 1 +'endif +'FormatLine +'Kontext +'Active.SetPage TabSchatten + +' FormatLine.Cancel endcase 'tiFormatLine '-------------------------------------------------------------------------------' @@ -330,58 +287,55 @@ testcase tLineConnect Dim i as integer Dim cname as string Dim cfirst as integer - - if bAsianLan then - QaErrorLog "tLineConnect ends because Asian languages are not fully supported." - goto Endsub + + if bAsianLan then + QaErrorLog "tLineConnect ends because Asian languages are not fully supported." + goto Endsub end if - - Call hNewDocument '/// New Impress / Draw document ///' + sleep 3 kontext "GraphicObjectbar" if GraphicObjectbar.Exists then - if GraphicObjectbar.isDocked = False then - GraphicObjectbar.Move 900,900 - endif + if GraphicObjectbar.isDocked = False then + GraphicObjectbar.Move 900,900 + endif endif kontext "Gluepointsobjectbar" if Gluepointsobjectbar.Exists then - if Gluepointsobjectbar.isDocked = false then - Gluepointsobjectbar.Move 900,900 - endif + if Gluepointsobjectbar.isDocked = false then + Gluepointsobjectbar.Move 900,900 + endif endif kontext "Optionsbar" if Optionsbar.Exists then - if Optionsbar.isDocked = false then - Optionsbar.Move 900,900 - end if + if Optionsbar.isDocked = false then + Optionsbar.Move 900,900 + end if endif - - '/// Create 2 lines ///' + kontext "Toolbar" Kurven.Click sleep 1 if (gApplication = "DRAW") then - Kontext "DocumentDraw" - gMouseMove (30,50, 40,60) - sleep 1 - kontext "Toolbar" - Kurven.Click - Kontext "DocumentDraw" - gMouseMove (70,50, 60,60) + Kontext "DocumentDraw" + gMouseMove (30,50, 40,60) + sleep 1 + kontext "Toolbar" + Kurven.Click + Kontext "DocumentDraw" + gMouseMove (70,50, 60,60) else - Kontext "DocumentImpress" - gMouseMove (30,50, 40,60) - sleep 1 - kontext "Toolbar" - Kurven.Click - Kontext "DocumentImpress" - gMouseMove (70,50, 60,60) + Kontext "DocumentImpress" + gMouseMove (30,50, 40,60) + sleep 1 + kontext "Toolbar" + Kurven.Click + Kontext "DocumentImpress" + gMouseMove (70,50, 60,60) endif - + printlog "'" + (gApplication) +"'" - - '/// Check the amount of objects ///' + gMouseClick (10, 10) sleep 1 EditSelectAll @@ -392,8 +346,8 @@ testcase tLineConnect kontext "DocumentDraw" StatusBarText = DocumentDraw.StatusGetText(DocumentDraw.StatusGetItemID(1)) endif - if bAsianLan then - value1 = left(StatusBarText,(InStr(StatusBarText, "2" ))) + if bAsianLan then + value1 = left(StatusBarText,(InStr(StatusBarText, "2" ))) if value1 <> 2 then warnlog "UH? There is supposed to be two objects visible, but was: " + value1 + " and the StatusBarText said: " + StatusBarText + "." end if @@ -404,130 +358,117 @@ testcase tLineConnect warnlog "UH? There is supposed to be two objects visible, but we found " + value1 + " objects." end if end if - - '/// Connect the two objects selected ///' + hOpenContextMenu sleep 1 hMenuSelectNr(13) sleep 1 - '/// Check the amount of objects ///' gMouseClick (10, 10) sleep 1 EditSelectAll sleep 1 if (gApplication = "IMPRESS") then - StatusBarText = DocumentImpress.StatusGetText(DocumentImpress.StatusGetItemID(1)) + StatusBarText = DocumentImpress.StatusGetText(DocumentImpress.StatusGetItemID(1)) else - kontext "DocumentDraw" - StatusBarText = DocumentDraw.StatusGetText(DocumentDraw.StatusGetItemID(1)) + kontext "DocumentDraw" + StatusBarText = DocumentDraw.StatusGetText(DocumentDraw.StatusGetItemID(1)) endif value2 = left(StatusBarText,1) printlog "StatusBarText was: " + StatusBarText - - '/// if same as the first value = wrong ///' + if value1 = value2 then - warnlog "Expected to find one object, but found " + value2 + " instead." + warnlog "Expected to find one object, but found " + value2 + " instead." endif if value2 = "2" then - warnlog "Connect was not successful. We should have one object, but have " + value2 + " instead." + warnlog "Connect was not successful. We should have one object, but have " + value2 + " instead." endif - - '/// unmark the objects, thereafter mark them again ///' + gMouseClick (10, 10) sleep 1 EditSelectAll sleep 1 - '/// Break them from eachother ///' hOpenContextMenu sleep 1 hMenuSelectNr(11) sleep 1 - '/// unmark the objects, thereafter mark them again ///' gMouseClick (10, 10) sleep 1 EditSelectAll sleep 1 - '/// Check the amount of objects ///' if (gApplication = "IMPRESS") then - StatusBarText = DocumentImpress.StatusGetText(DocumentImpress.StatusGetItemID(1)) + StatusBarText = DocumentImpress.StatusGetText(DocumentImpress.StatusGetItemID(1)) else - kontext "DocumentDraw" - StatusBarText = DocumentDraw.StatusGetText(DocumentDraw.StatusGetItemID(1)) + kontext "DocumentDraw" + StatusBarText = DocumentDraw.StatusGetText(DocumentDraw.StatusGetItemID(1)) endif value3 = left(StatusBarText,1) - + printlog "StatusBarText was: " + StatusBarText - - '/// if the same as any of the ones before: Wrong ///' + if (value3 = value1 OR value3 = value2) then - warnlog "Expected to find three objects, but found " + value3 + " instead." + warnlog "Expected to find three objects, but found " + value3 + " instead." endif - - '/// if 3 objects, then everything is ok ///' + if value3 = 3 then - printlog "Found three objects. Means the test was successful." + printlog "Found three objects. Means the test was successful." else - warnlog "Wrong value, expected three objects, but found " + value3 + "." + warnlog "Wrong value, expected three objects, but found " + value3 + "." endif - - '/// Go through the different Corner-styles ///' - + + hOpenContextMenu hMenuSelectNr(2) 'Choose "Line" - + Kontext "TabLinie" cfirst = CornerStyle.GetSelIndex - + For i = 1 to CornerStyle.GetItemCount - Kontext "TabLinie" - if (i > 1) AND (cname <> CornerStyle.GetSelText) then - warnlog "Cornerstylename wasnt saved. Should have been: " + cname + ". But was: " + CornerStyle.GetSelText - endif - CornerStyle.Select i - cname = CornerStyle.GetSelText - Printlog " Found and selected Corner-Style: " + cname - TabLinie.Ok - sleep 1 - hOpenContextMenu - hMenuSelectNr(2) 'Choose "Line" + Kontext "TabLinie" + if (i > 1) AND (cname <> CornerStyle.GetSelText) then + warnlog "Cornerstylename wasnt saved. Should have been: " + cname + ". But was: " + CornerStyle.GetSelText + endif + CornerStyle.Select i + cname = CornerStyle.GetSelText + Printlog " Found and selected Corner-Style: " + cname + TabLinie.Ok + sleep 1 + hOpenContextMenu + hMenuSelectNr(2) 'Choose "Line" Next i - + Kontext "TabLinie" CornerStyle.Select cfirst TabLinie.Ok - - '/// And a nice finish to make life a bit happier for anyone who looks at the test ///' + kontext "Toolbar" Ellipsen.Click if (gApplication = "DRAW") then - Kontext "DocumentDraw" - gMouseMove (40,40, 50,30) - sleep 1 - kontext "Toolbar" - Ellipsen.Click - Kontext "DocumentDraw" - gMouseMove (51,40, 61,30) - kontext "Toolbar" - Ellipsen.Click - Kontext "DocumentDraw" - gMouseMove (48,43, 53,50) + Kontext "DocumentDraw" + gMouseMove (40,40, 50,30) + sleep 1 + kontext "Toolbar" + Ellipsen.Click + Kontext "DocumentDraw" + gMouseMove (51,40, 61,30) + kontext "Toolbar" + Ellipsen.Click + Kontext "DocumentDraw" + gMouseMove (48,43, 53,50) else - Kontext "DocumentImpress" - gMouseMove (40,40, 50,30) - sleep 1 - kontext "Toolbar" - Ellipsen.Click - Kontext "DocumentImpress" - gMouseMove (51,40, 61,30) - kontext "Toolbar" - Ellipsen.Click - Kontext "DocumentImpress" - gMouseMove (48,43, 53,50) + Kontext "DocumentImpress" + gMouseMove (40,40, 50,30) + sleep 1 + kontext "Toolbar" + Ellipsen.Click + Kontext "DocumentImpress" + gMouseMove (51,40, 61,30) + kontext "Toolbar" + Ellipsen.Click + Kontext "DocumentImpress" + gMouseMove (48,43, 53,50) endif gMouseClick (10, 10) - '/// Close the document ///' hCloseDocument - '/// Endcase ///' endcase 'tiLineConnect '-------------------------------------------------------------------------------' diff --git a/testautomation/graphics/optional/includes/global/g_load_save.inc b/testautomation/graphics/optional/includes/global/g_load_save.inc index 55685cfb9fbf..2fd40014a58a 100755 --- a/testautomation/graphics/optional/includes/global/g_load_save.inc +++ b/testautomation/graphics/optional/includes/global/g_load_save.inc @@ -1,7 +1,7 @@ 'encoding UTF-8 Do not remove or change this line! '************************************************************************** '* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. -'* +'* '* Copyright 2008 by Sun Microsystems, Inc. '* '* OpenOffice.org - a multi-platform office productivity suite @@ -52,131 +52,114 @@ '\************************************************************************************* testcase tFileOpenSaveEtc - Dim Dokument$ - Dim Dokument2$ + Dim Dokument$ + Dim Dokument2$ - Dokument$ = ConvertPath ( gOfficePath + "user\work\test1") - Dokument2$ = ConvertPath ( gOfficePath + "user\work\test1_2") + Dokument$ = ConvertPath ( gOfficePath + "user\work\test1") + Dokument2$ = ConvertPath ( gOfficePath + "user\work\test1_2") - if (gApplication = "IMPRESS") then + if (gApplication = "IMPRESS") then ExtensionString = "odp" else ExtensionString = "odg" end if - '/// delete previous created documents: 'user\\work\\test1*.od?' ///' - if Dir (Dokument$ + ".odp") <> "" then kill (Dokument$ + ".odp") - if Dir (Dokument2$ + ".odg") <> "" then kill (Dokument2$ + ".odg") - - '/// open application ///' - hNewDocument - gMouseclick 90,90 - '/// create a textframe with content ///' - Call hTextrahmenErstellen ( "This is a test",20,20,40,30 ) - '/// save file as 'test1' ///' - hFileSaveAsKill (Dokument$ + "." + ExtensionString) - Sleep 10 - '/// close Document ///' - hCloseDocument - printlog "- Document Saved and Closed" - - '/// load document 'test1' ///' - hFileOpen (Dokument$ + "." + ExtensionString) - - Sleep 10 - '/// close Document ///' - hCloseDocument - printlog "- document Loaded and closed" - Sleep 10 - '/// load document 'test1' ///' - hFileOpen (Dokument$ + "." + ExtensionString) - ' check if the document is writable - if fIsDocumentWritable = false then - ' 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 - endif - Sleep 10 - gMouseclick 90,90 - '/// create another textbox with content ///' - Call hTextrahmenerstellen ( "Change",60,60,80,80 ) - '/// File->Close needn't work, just say CANCEL to the question about saving changes! ///' - FileClose - Kontext ' message about 'something changed should i [overwrite discard cancel]?' - if Messagebox.exists (5) then - printlog "2:"+messagebox.gettext - Messagebox.Cancel - else - Warnlog "Mesagebox is missing :-(" - endif - printlog "- Document loaded, changed and closed discarding all changes" - - printlog "- Last version" - try - FileReload '/// File Reload ///' - catch - kontext "documentimpress" - try - FileReload '/// File Reload ///' - catch - warnlog "Damn reload ?? Why ? BREAKPOINT! File reload doesn't work. Create new object and try again :-(" - endcatch - endcatch - Kontext - Messagebox.Yes - Sleep 10 - gMouseDoubleClick 70,70 - hTypeKeys "", 3 - hTypeKeys "",10 - hTypeKeys "" - Sleep 1 - if GetClipboardText = "Change" then Warnlog "- Last version not loaded. Changes in the document still in." - printlog "- Change document, save it under different name" - Kontext "DocumentImpress" - Call hTextrahmenErstellen ("Change2",10,10,50,20 ) '/// new textbox ///' - gMouseclick 90,90 - sleep 1 - FileSaveAs - Kontext "SpeichernDlg" - Dateiname.SetText Dokument2$ - Speichern.Click - kontext "AlienWarning" - if AlienWarning.exists(5) then - warnlog "#i41983# Alien Warning on export not allowed" - AlienWarning.OK - endif - Kontext "Messagebox" - if Messagebox.Exists(2) then Messagebox.Yes - Sleep 3 - FileClose '/// Close document ///' - sleep 10 - Kontext "Messagebox" - if Messagebox.Exists Then - Warnlog "- Document saved, but Msgbox appeared, even no changes were made: " + Messagebox.GetText - Messagebox.Yes - end if - sleep 2 - printlog "- Loading write protected file" - FileOpen '/// Open write protected file ///' - Kontext "OeffnenDlg" - Dateiname.SetText (Dokument2$ + "." + ExtensionString) - NurLesen.Check - Oeffnen.Click - Sleep 10 - ' check if the document is writable - try - Call hTextrahmenErstellen ( "Hello",85,85,95,95 ) '/// attempt to create a textbox ///' - hTypeKeys "",5 - hTypeKeys "" - sleep 1 - if GetClipboardText = "Hello" then Warnlog "Write protected document could be edited" - catch - Printlog "- Write protected document could not be edited" - endcatch - sleep 5 - FileClose '/// Close document ///' + if Dir (Dokument$ + ".odp") <> "" then kill (Dokument$ + ".odp") + if Dir (Dokument2$ + ".odg") <> "" then kill (Dokument2$ + ".odg") + + hNewDocument + gMouseclick 90,90 + Call hTextrahmenErstellen ( "This is a test",20,20,40,30 ) + hFileSaveAsKill (Dokument$ + "." + ExtensionString) + Sleep 10 + hCloseDocument + printlog "- Document Saved and Closed" + + hFileOpen (Dokument$ + "." + ExtensionString) + + Sleep 10 + hCloseDocument + printlog "- document Loaded and closed" + Sleep 10 + hFileOpen (Dokument$ + "." + ExtensionString) + ' check if the document is writable + if fIsDocumentWritable = false then + ' 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 + endif + Sleep 10 + gMouseclick 90,90 + Call hTextrahmenerstellen ( "Change",60,60,80,80 ) + FileClose + Kontext ' message about 'something changed should i [overwrite discard cancel]?' + if Messagebox.exists (5) then + printlog "2:"+messagebox.gettext + Messagebox.Cancel + else + Warnlog "Mesagebox is missing :-(" + endif + printlog "- Document loaded, changed and closed discarding all changes" + + printlog "- Last version" + try + catch + kontext "documentimpress" + try + catch + warnlog "Damn reload ?? Why ? BREAKPOINT! File reload doesn't work. Create new object and try again :-(" + endcatch + endcatch + Kontext + Messagebox.Yes + Sleep 10 + gMouseDoubleClick 70,70 + hTypeKeys "", 3 + hTypeKeys "",10 + hTypeKeys "" + Sleep 1 + if GetClipboardText = "Change" then Warnlog "- Last version not loaded. Changes in the document still in." + printlog "- Change document, save it under different name" + Kontext "DocumentImpress" + gMouseclick 90,90 + sleep 1 + FileSaveAs + Kontext "SpeichernDlg" + Dateiname.SetText Dokument2$ + Speichern.Click + kontext "AlienWarning" + if AlienWarning.exists(5) then + warnlog "#i41983# Alien Warning on export not allowed" + AlienWarning.OK + endif + Kontext "Messagebox" + if Messagebox.Exists(2) then Messagebox.Yes + Sleep 3 + sleep 10 + Kontext "Messagebox" + if Messagebox.Exists Then + Warnlog "- Document saved, but Msgbox appeared, even no changes were made: " + Messagebox.GetText + Messagebox.Yes + end if + sleep 2 + printlog "- Loading write protected file" + Kontext "OeffnenDlg" + Dateiname.SetText (Dokument2$ + "." + ExtensionString) + NurLesen.Check + Oeffnen.Click + Sleep 10 + ' check if the document is writable + try + hTypeKeys "",5 + hTypeKeys "" + sleep 1 + if GetClipboardText = "Hello" then Warnlog "Write protected document could be edited" + catch + Printlog "- Write protected document could not be edited" + endcatch + sleep 5 endcase '******************************************************************************************** @@ -184,214 +167,204 @@ endcase testcase tFileProperties qaerrorlog "#i88163#, File/properties/user defined fields get mixed up." goto endsub - Call hNewDocument - Call hTextrahmenErstellen ("This is a document to test the Menupoint in File/Properties",30,30,60,40) + Call hNewDocument + Call hTextrahmenErstellen ("This is a document to test the Menupoint in File/Properties",30,30,60,40) - if (gApplication = "IMPRESS") then + if (gApplication = "IMPRESS") then ExtensionString = "odp" else ExtensionString = "odg" end if - FileProperties - - Kontext - active.SetPage TabDokumentinfo - Kontext "TabDokumentinfo" - Titel.SetText "Properties" - Thema.SetText "Documentproperties" - Schluesselworte.SetText "None" - - qaerrorlog "#i95523#" - 'Kontext - 'active.SetPage TabBenutzer - 'Kontext "TabBenutzer" - 'Info2.SetText "Thorsten Peters" - - 'Infofelder.Click - 'Kontext "InfonamenBearbeiten" - 'Namen2.SetText "Name" - 'InfonamenBearbeiten.OK - 'sleep 2 - Kontext - active.SetPage TabInternet - Kontext "TabInternet" - RefreshThisDocument.Check - - TabInternet.OK - - hFileSaveAsKill ConvertPath (gOfficePath + "user\work\eigen." & ExtensionString) - - FileClose - Kontext "Active" + FileProperties + + Kontext + active.SetPage TabDokumentinfo + Kontext "TabDokumentinfo" + Titel.SetText "Properties" + Thema.SetText "Documentproperties" + Schluesselworte.SetText "None" + + qaerrorlog "#i95523#" + 'Kontext + 'active.SetPage TabBenutzer + 'Kontext "TabBenutzer" + 'Info2.SetText "Thorsten Peters" + + 'Infofelder.Click + 'Kontext "InfonamenBearbeiten" + 'Namen2.SetText "Name" + 'InfonamenBearbeiten.OK + 'sleep 2 + Kontext + active.SetPage TabInternet + Kontext "TabInternet" + RefreshThisDocument.Check + + TabInternet.OK + + hFileSaveAsKill ConvertPath (gOfficePath + "user\work\eigen." & ExtensionString) + + FileClose + Kontext "Active" if Active.Exists(2) then Active.Yes - PrintLog "- File / Properties compare" - Sleep 2 - hFileOpen ConvertPath (gOfficePath + "user\work\eigen." + ExtensionString) - - ' check if the document is writable - if fIsDocumentWritable = false then - ' 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 - endif - FileProperties - Kontext - active.SetPage TabDokumentinfo - Kontext "TabDokumentinfo" - if Titel.GetText <> "Properties" then Warnlog "Description / Titel is wrong" - if Thema.GetText <> "Documentproperties" then Warnlog "Description / Thema is wrong" - if Schluesselworte.GetText <> "None" then Warnlog "Description / Keywords is wrong" - - qaerrorlog "#i95523#" - 'Kontext - 'active.SetPage TabBenutzer - 'Kontext "TabBenutzer" - 'if Info2.GetText <> "Thorsten Peters" then Warnlog "User Defined / Info2 is wrong" - - 'Infofelder.Click - 'sleep 2 - 'Kontext "InfonamenBearbeiten" - 'if Namen2.GetText <> "Name" then Warnlog "Edit Field Names / Info2 is wrong" - 'InfonamenBearbeiten.OK - - Kontext - active.SetPage TabInternet - Kontext "TabInternet" - if RefreshThisDocument.IsChecked = FALSE then Warnlog "Internet / 'Refresh this document' is not checked" - - TabInternet.Close - - Call hCloseDocument + PrintLog "- File / Properties compare" + Sleep 2 + hFileOpen ConvertPath (gOfficePath + "user\work\eigen." + ExtensionString) + + ' check if the document is writable + if fIsDocumentWritable = false then + ' 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 + endif + FileProperties + Kontext + active.SetPage TabDokumentinfo + Kontext "TabDokumentinfo" + if Titel.GetText <> "Properties" then Warnlog "Description / Titel is wrong" + if Thema.GetText <> "Documentproperties" then Warnlog "Description / Thema is wrong" + if Schluesselworte.GetText <> "None" then Warnlog "Description / Keywords is wrong" + + qaerrorlog "#i95523#" + 'Kontext + 'active.SetPage TabBenutzer + 'Kontext "TabBenutzer" + 'if Info2.GetText <> "Thorsten Peters" then Warnlog "User Defined / Info2 is wrong" + + 'Infofelder.Click + 'sleep 2 + 'Kontext "InfonamenBearbeiten" + 'if Namen2.GetText <> "Name" then Warnlog "Edit Field Names / Info2 is wrong" + 'InfonamenBearbeiten.OK + + Kontext + active.SetPage TabInternet + Kontext "TabInternet" + if RefreshThisDocument.IsChecked = FALSE then Warnlog "Internet / 'Refresh this document' is not checked" + + TabInternet.Close + + Call hCloseDocument endcase '******************************************************************************************** testcase tFilePassword52 -'/// load files with password from version 5.2 ///' - Dim Datei$ - dim i as integer - dim x as integer - dim y as integer - dim sExt() as string - - sExt = array("d","a") -' passwo52.sd d-preas a-draw - for i = 0 to 1 - Datei$ = ConvertPath ( gTesttoolPath + "graphics\required\input\passwo52.sd"+sExt(i) ) - '/// open document graphics\\required\\input\\passwo52.sd? ///' - hFileOpen(Datei$) - sleep 2 - Kontext "passwordFileOpen" - '/// password dialog has to came up ! ELSE: error! ///' - if passwordFileOpen.exists(5) then - '/// type password: "12345" -> RIGHT ///' - PasswortName.SetText "12345" - passwordFileOpen.OK - Printlog "Ok, password dialog came up :-) for file : '" + datei$ + "'" - else - Warnlog "No password dialog came up :-( for file : '" + datei$ + "'" - endif - Kontext "Messagebox" - if Messagebox.Exists(2) then - Warnlog "messagebox ?: '" + Messagebox.GetText + "'" - endif - '/// close document ///' - hCloseDocument - next i + Dim Datei$ + dim i as integer + dim x as integer + dim y as integer + dim sExt() as string + + sExt = array("d","a") + ' passwo52.sd d-preas a-draw + for i = 0 to 1 + Datei$ = ConvertPath ( gTesttoolPath + "graphics\required\input\passwo52.sd"+sExt(i) ) + hFileOpen(Datei$) + sleep 2 + Kontext "passwordFileOpen" + if passwordFileOpen.exists(5) then + PasswortName.SetText "12345" + passwordFileOpen.OK + Printlog "Ok, password dialog came up :-) for file : '" + datei$ + "'" + else + Warnlog "No password dialog came up :-( for file : '" + datei$ + "'" + endif + Kontext "Messagebox" + if Messagebox.Exists(2) then + Warnlog "messagebox ?: '" + Messagebox.GetText + "'" + endif + hCloseDocument + next i endcase '******************************************************************************************** testcase tFileOpenImport -'/// tries to load a document of type 'ComputerGraphicsMetafile'; gets loaded as impress document. ///' -dim q as integer - call hNewDocument - FileOpen - Kontext "OeffnenDlg" -'/// Dateiname.SetText (gTesttoolpath + "graphics\required\input\imsusmap.cgm") ///' - Dateiname.SetText (ConvertPath (gTesttoolpath + "graphics\required\input\imsusmap.cgm")) - Oeffnen.Click - Sleep 2 - ' check if the document is writable - if fIsDocumentWritable = false then - ' 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 - endif - kontext "DocumentImpress" - if DocumentImpress.exists(5) then - DocumentImpress.TypeKeys ("") - else - warnlog "Not loaded in impress" - endif - try - ContextPositionAndSize - kontext - messagebox.setpage TabPositionAndSize - sleep 1 - TabPositionAndSize.Close - catch - warnlog "Documents of Type 'ComputerGraphicsMetafile' can't get loaded :-(" - endcatch - Call hCloseDocument - if (gApplication="DRAW") then - Call hCloseDocument - endif + dim q as integer + call hNewDocument + FileOpen + Kontext "OeffnenDlg" + Dateiname.SetText (ConvertPath (gTesttoolpath + "graphics\required\input\imsusmap.cgm")) + Oeffnen.Click + Sleep 2 + ' check if the document is writable + if fIsDocumentWritable = false then + ' 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 + endif + kontext "DocumentImpress" + if DocumentImpress.exists(5) then + DocumentImpress.TypeKeys ("") + else + warnlog "Not loaded in impress" + endif + try + ContextPositionAndSize + kontext + messagebox.setpage TabPositionAndSize + sleep 1 + TabPositionAndSize.Close + catch + warnlog "Documents of Type 'ComputerGraphicsMetafile' can't get loaded :-(" + endcatch + Call hCloseDocument + if (gApplication="DRAW") then + Call hCloseDocument + endif endcase '******************************************************************************************** testcase tTestDXF255CharBug -'/// tries to load a DXF-document which has a string-leght of 255 characters. ///' -dim q as integer - call hNewDocument - InsertGraphicsFromFile '/// insert graphic ///' - sleep 1 - kontext "Active" - sleep 1 + dim q as integer + call hNewDocument + sleep 1 + kontext "Active" + sleep 1 if Active.Exists Then - Active.OK + Active.OK end if sleep 1 - Kontext "GrafikEinfuegenDlg" - sleep 2 - '/// Dateiname.SetText (ConvertPath (gTesttoolpath + "graphics\required\input\255chars.dxf")) ///' - Dateiname.SetText (ConvertPath (gTesttoolpath + "graphics\required\input\255chars.dxf")) - Oeffnen.Click - Sleep 2 - - if gApplication = "DRAW" then - Kontext "Documentdraw" - if Documentdraw.exists(5) then - Documentdraw.TypeKeys ("") - else - warnlog "Not loaded in draw" - endif - else '(Impress) - Kontext "DocumentImpress" - if DocumentImpress.exists(5) then - DocumentImpress.TypeKeys ("") - else - warnlog "Not loaded in impress" - endif - endif - - try - ContextPositionAndSize - kontext - messagebox.setpage TabPositionAndSize - sleep 1 - TabPositionAndSize.Close - catch - warnlog "DXF-Document could not be loaded :-(" - endcatch - Call hCloseDocument + Kontext "GrafikEinfuegenDlg" + sleep 2 + Dateiname.SetText (ConvertPath (gTesttoolpath + "graphics\required\input\255chars.dxf")) + Oeffnen.Click + Sleep 2 + + if gApplication = "DRAW" then + Kontext "Documentdraw" + if Documentdraw.exists(5) then + Documentdraw.TypeKeys ("") + else + warnlog "Not loaded in draw" + endif + else '(Impress) + Kontext "DocumentImpress" + if DocumentImpress.exists(5) then + DocumentImpress.TypeKeys ("") + else + warnlog "Not loaded in impress" + endif + endif + + try + ContextPositionAndSize + kontext + messagebox.setpage TabPositionAndSize + sleep 1 + TabPositionAndSize.Close + catch + warnlog "DXF-Document could not be loaded :-(" + endcatch + Call hCloseDocument endcase '******************************************************************************************** @@ -403,102 +376,89 @@ testcase tDeletedTemplate dim SavedActiveMessage as string dim found as boolean - if (gApplication = "IMPRESS") then + if (gApplication = "IMPRESS") then ExtensionString = "odp" else ExtensionString = "odg" end if - + Dokument1$ = ConvertPath ( gOfficePath + "user\work\test1." & ExtensionString) Dokument2$ = ConvertPath ( gOfficePath + "user\work\test2." & ExtensionString) - - - '/// delete previous created documents: 'user\\work\\test*.odp' ///' - if Dir (Dokument1$) <> "" then kill Dokument1$ - if Dir (Dokument2$) <> "" then kill Dokument2$ - - '/// open application ///' - hNewDocument - gMouseclick 90,90 - '/// create a textframe with content ///' - Call hTextrahmenErstellen ( "This is the first file",20,20,40,30 ) - '/// save file as 'test1.odp' ///' - hFileSaveAsKill (Dokument1$) - Sleep 10 - '/// close Document ///' - hCloseDocument - printlog "- Document 'test1.odp' Saved and Closed" - - '/// open application again ///' - hNewDocument - gMouseclick 90,90 - '/// create another textframe with content ///' - Call hTextrahmenErstellen ( "This is the second file",20,20,40,30 ) - '/// save file as 'test2.odp' ///' - hFileSaveAsKill (Dokument2$) - Sleep 10 - '/// close Document ///' - hCloseDocument - printlog "- Document 'test2.odp' Saved and Closed" - - '/// Delete the first file ///' - try - kill Dokument1$ - Printlog " Correctly deleted the file: " + Dokument1$ - catch - warnlog "Could not delete the file: " + Dokument1$ - endcatch - - '/// File => New => Presentation ///' - FileAutopilotPresentation '/// new document-autopilot ///' - Kontext "AutopilotPraesentation1" - sleep 5 - Existingpresentation.Check - sleep 5 - kontext "active" - if active.exists then - SavedActiveMessage = Active.GetText - QaErrorLog "Message: " + SavedActiveMessage - active.ok - Kontext "AutopilotPraesentation1" - if Existinglist.GetSelText = "test1.odp" then - warnlog " The deleted File was found. Messagebox said: " + SavedActiveMessage - endif - SavedActiveMessage = "" - endif - Kontext "AutopilotPraesentation1" - Existinglist.TypeKeys "" - sleep 5 - found = false - for i = 1 to Existinglist.GetItemCount - kontext "active" - if active.exists then - SavedActiveMessage = Active.GetText - active.ok - endif - Kontext "AutopilotPraesentation1" - if Existinglist.GetSelText = "test1.odp" then - found = true - if SavedActiveMessage <> "" then - warnlog " The deleted File was found. Messagebox said: " + SavedActiveMessage - else - warnlog " The deleted File was found. However without any messagebox." - endif - endif - Existinglist.TypeKeys "" - sleep 5 - next i - if found = true then warnlog " An error-message showed up. Eventually a result of '138498'" - AutopilotPraesentation1.Cancel - Sleep 2 - '/// Delete the second file ///' - try - kill Dokument2$ - Printlog " Correctly deleted the file: " + Dokument2$ - catch - warnlog "Could not delete the file: " + Dokument2$ - endcatch + + + if Dir (Dokument1$) <> "" then kill Dokument1$ + if Dir (Dokument2$) <> "" then kill Dokument2$ + + hNewDocument + gMouseclick 90,90 + Call hTextrahmenErstellen ( "This is the first file",20,20,40,30 ) + hFileSaveAsKill (Dokument1$) + Sleep 10 + hCloseDocument + printlog "- Document 'test1.odp' Saved and Closed" + + hNewDocument + gMouseclick 90,90 + Call hTextrahmenErstellen ( "This is the second file",20,20,40,30 ) + hFileSaveAsKill (Dokument2$) + Sleep 10 + hCloseDocument + printlog "- Document 'test2.odp' Saved and Closed" + + try + kill Dokument1$ + Printlog " Correctly deleted the file: " + Dokument1$ + catch + warnlog "Could not delete the file: " + Dokument1$ + endcatch + + Kontext "AutopilotPraesentation1" + sleep 5 + Existingpresentation.Check + sleep 5 + kontext "active" + if active.exists then + SavedActiveMessage = Active.GetText + QaErrorLog "Message: " + SavedActiveMessage + active.ok + Kontext "AutopilotPraesentation1" + if Existinglist.GetSelText = "test1.odp" then + warnlog " The deleted File was found. Messagebox said: " + SavedActiveMessage + endif + SavedActiveMessage = "" + endif + Kontext "AutopilotPraesentation1" + Existinglist.TypeKeys "" + sleep 5 + found = false + for i = 1 to Existinglist.GetItemCount + kontext "active" + if active.exists then + SavedActiveMessage = Active.GetText + active.ok + endif + Kontext "AutopilotPraesentation1" + if Existinglist.GetSelText = "test1.odp" then + found = true + if SavedActiveMessage <> "" then + warnlog " The deleted File was found. Messagebox said: " + SavedActiveMessage + else + warnlog " The deleted File was found. However without any messagebox." + endif + endif + Existinglist.TypeKeys "" + sleep 5 + next i + if found = true then warnlog " An error-message showed up. Eventually a result of '138498'" + AutopilotPraesentation1.Cancel + Sleep 2 + try + kill Dokument2$ + Printlog " Correctly deleted the file: " + Dokument2$ + catch + warnlog "Could not delete the file: " + Dokument2$ + endcatch endcase @@ -509,41 +469,31 @@ testcase tSaveLoadLayoutEmpty NewFileDir = ConvertPath (gOfficePath + "user\work\LayoutTest\") - '/// Create New folder in the Work-directory ///' printlog " Will try to create the directory: " + NewFileDir app.mkdir NewFileDir - '/// Create a new document, add a Layout, Save the document in different Formats, and open the saved files. ///' - '/// Make new Presentation ///' gApplication = "IMPRESS" Call hNewDocument - '/// Choose and Insert an empty Layout. ///' printlog "Choose and Insert an empty Layout." FormatModifyPage sleep 1 kontext "Tasks" - LayoutsPreview.TypeKeys "" - kontext "Pagelayout_UndoDeleteWarning" - if Pagelayout_UndoDeleteWarning.exists then - Pagelayout_UndoDeleteWarning.ok + LayoutsPreview.TypeKeys "" + kontext "Pagelayout_UndoDeleteWarning" + if Pagelayout_UndoDeleteWarning.exists then + Pagelayout_UndoDeleteWarning.ok endif kontext "Tasks" - '/// Press "Enter" to use the layout on the current slide ///' LayoutsPreview.TypeKeys "" sleep (5) - '/// Save the document in different formats... ///' - '/// Close the file. ///' - '/// Load the different files. ///' - call fSaveLoadAllFormats (NewFileDir) 'Runs the Function below. + call fSaveLoadAllFormats (NewFileDir) 'Runs the Function below. - '/// Delete the different files. ///' printlog " Will try to delete the directory: " + NewFileDir app.rmDir NewFileDir - '/// End the test ///' endcase 'tSaveLoadLayoutEmpty '**************************************************************************************************** @@ -555,57 +505,47 @@ testcase tSaveLoadLayoutOLE NewFileDir = ConvertPath (gOfficePath + "user\work\LayoutTest\") - '/// Create New folder in the Work-directory ///' printlog " Will try to create the directory: " + NewFileDir app.mkdir NewFileDir - '/// Create a new document, add a Layout, Save the document in different Formats, and open the saved files. ///' - '/// Make new Presentation ///' gApplication = "IMPRESS" Call hNewDocument - '/// Choose and Insert an Layout with an OLE. ///' printlog "Choose and Insert an Layout with an OLE." FormatModifyPage sleep 1 kontext "Tasks" - LayoutsPreview.TypeKeys "" + LayoutsPreview.TypeKeys "" kontext "Pagelayout_UndoDeleteWarning" if Pagelayout_UndoDeleteWarning.exists then - Pagelayout_UndoDeleteWarning.ok + Pagelayout_UndoDeleteWarning.ok endif kontext "Tasks" - '/// select the OLE placeholder and activate it with [Return] ///' - LayoutsPreview.TypeKeys ("",12) - sleep (1) - LayoutsPreview.TypeKeys ("") - sleep (1) - hTypeKeys ("") - hTypeKeys ("") - try - sleep (2) - kontext "OLEObjektInsert" - sleep (1) - OLEObjektInsert.Cancel - Printlog "Inserted a layout with an 'Insert OLE-Object'-frame. Correct." - catch - warnlog "Ole wasn't selected :-(" - CALL hCloseDocument - Goto Endsub - endcatch + LayoutsPreview.TypeKeys ("",12) + sleep (1) + LayoutsPreview.TypeKeys ("") + sleep (1) + hTypeKeys ("") + hTypeKeys ("") + try + sleep (2) + kontext "OLEObjektInsert" + sleep (1) + OLEObjektInsert.Cancel + Printlog "Inserted a layout with an 'Insert OLE-Object'-frame. Correct." + catch + warnlog "Ole wasn't selected :-(" + CALL hCloseDocument + Goto Endsub + endcatch sleep (5) - '/// Save the document in different formats... ///' - '/// Close the file. ///' - '/// Load the different files. ///' - call fSaveLoadAllFormats (NewFileDir) 'Runs the Function below. + call fSaveLoadAllFormats (NewFileDir) 'Runs the Function below. - '/// Delete the different files. ///' printlog " Will try to delete the directory: " + NewFileDir app.rmDir ConvertPath (gOfficePath + "user\work\LayoutTest\")' NewFileDir - '/// End the test ///' endcase 'tSaveLoadLayoutOLE '**************************************************************************************************** @@ -617,48 +557,38 @@ testcase tSaveLoadLayoutText NewFileDir = ConvertPath (gOfficePath + "user\work\LayoutTest\") - '/// Create New folder in the Work-directory ///' printlog " Will try to create the directory: " + NewFileDir app.mkdir NewFileDir - '/// Create a new document, add a Layout, Save the document in different Formats, and open the saved files. ///' - '/// Make new Presentation ///' gApplication = "IMPRESS" Call hNewDocument - '/// Choose and Insert an Layout with a Text-field. ///' printlog "Choose and Insert an Layout with a Text-field." FormatModifyPage sleep 1 kontext "Tasks" - LayoutsPreview.TypeKeys "" - kontext "Pagelayout_UndoDeleteWarning" - if Pagelayout_UndoDeleteWarning.exists then - Pagelayout_UndoDeleteWarning.ok + LayoutsPreview.TypeKeys "" + kontext "Pagelayout_UndoDeleteWarning" + if Pagelayout_UndoDeleteWarning.exists then + Pagelayout_UndoDeleteWarning.ok endif kontext "Tasks" - '/// select the Text placeholder and activate it with [Return] ///' - LayoutsPreview.TypeKeys ("") - sleep (1) - LayoutsPreview.TypeKeys ("") - sleep (1) - hTypeKeys ("") - hTypeKeys ("") - hTypeKeys ("") -' LayoutsPreview.TypeKeys "" + LayoutsPreview.TypeKeys ("") + sleep (1) + LayoutsPreview.TypeKeys ("") + sleep (1) + hTypeKeys ("") + hTypeKeys ("") + hTypeKeys ("") + ' LayoutsPreview.TypeKeys "" sleep (5) - '/// Save the document in different formats... ///' - '/// Close the file. ///' - '/// Load the different files. ///' - call fSaveLoadAllFormats (NewFileDir) 'Runs the Function below. + call fSaveLoadAllFormats (NewFileDir) 'Runs the Function below. - '/// Delete the different files. ///' printlog " Will try to delete the directory: " + NewFileDir app.rmDir ConvertPath (gOfficePath + "user\work\LayoutTest\")' NewFileDir - '/// End the test ///' endcase 'tSaveLoadLayoutText '**************************************************************************************************** @@ -670,47 +600,37 @@ testcase tSaveLoadLayoutOutline NewFileDir = ConvertPath (gOfficePath + "user\work\LayoutTest\") - '/// Create New folder in the Work-directory ///' printlog " Will try to create the directory: " + NewFileDir app.mkdir NewFileDir - '/// Create a new document, add a Layout, Save the document in different Formats, and open the saved files. ///' - '/// Make new Presentation ///' gApplication = "IMPRESS" Call hNewDocument - '/// Choose and Insert an Layout with a Outline-field. ///' printlog "Choose and Insert an Layout with a Outline-field." FormatModifyPage sleep 1 kontext "Tasks" - LayoutsPreview.TypeKeys "" - kontext "Pagelayout_UndoDeleteWarning" - if Pagelayout_UndoDeleteWarning.exists then - Pagelayout_UndoDeleteWarning.ok + LayoutsPreview.TypeKeys "" + kontext "Pagelayout_UndoDeleteWarning" + if Pagelayout_UndoDeleteWarning.exists then + Pagelayout_UndoDeleteWarning.ok endif kontext "Tasks" - '/// select the Outline placeholder and activate it with [Return] ///' - LayoutsPreview.TypeKeys ("",3) - sleep (1) - LayoutsPreview.TypeKeys ("") - sleep (1) - hTypeKeys ("") - hTypeKeys ("") - hTypeKeys ("") + LayoutsPreview.TypeKeys ("",3) + sleep (1) + LayoutsPreview.TypeKeys ("") + sleep (1) + hTypeKeys ("") + hTypeKeys ("") + hTypeKeys ("") sleep (5) - '/// Save the document in different formats... ///' - '/// Close the file. ///' - '/// Load the different files. ///' - call fSaveLoadAllFormats (NewFileDir) 'Runs the Function below. + call fSaveLoadAllFormats (NewFileDir) 'Runs the Function below. - '/// Delete the different files. ///' printlog " Will try to delete the directory: " + NewFileDir app.rmDir ConvertPath (gOfficePath + "user\work\LayoutTest\")' NewFileDir - '/// End the test ///' endcase 'tSaveLoadLayoutOutline '**************************************************************************************************** @@ -722,47 +642,37 @@ testcase tSaveLoadLayoutPicture NewFileDir = ConvertPath (gOfficePath + "user\work\LayoutTest\") - '/// Create New folder in the Work-directory ///' printlog " Will try to create the directory: " + NewFileDir app.mkdir NewFileDir - '/// Create a new document, add a Layout, Save the document in different Formats, and open the saved files. ///' - '/// Make new Presentation ///' gApplication = "IMPRESS" Call hNewDocument - '/// Choose and Insert an Layout with a Graphic-field. ///' printlog "Choose and Insert an Layout with a Graphic-field." FormatModifyPage sleep 1 kontext "Tasks" - LayoutsPreview.TypeKeys "" - kontext "Pagelayout_UndoDeleteWarning" - if Pagelayout_UndoDeleteWarning.exists then - Pagelayout_UndoDeleteWarning.ok + LayoutsPreview.TypeKeys "" + kontext "Pagelayout_UndoDeleteWarning" + if Pagelayout_UndoDeleteWarning.exists then + Pagelayout_UndoDeleteWarning.ok endif kontext "Tasks" - '/// select the Picture placeholder and activate it with [Return] ///' - LayoutsPreview.TypeKeys ("",8) - sleep (1) - LayoutsPreview.TypeKeys ("") - sleep (1) - hTypeKeys ("") - hTypeKeys ("") - hTypeKeys ("") - sleep (5) - - '/// Save the document in different formats... ///' - '/// Close the file. ///' - '/// Load the different files. ///' - call fSaveLoadAllFormats (NewFileDir) 'Runs the Function below. - - '/// Delete the different files. ///' + LayoutsPreview.TypeKeys ("",8) + sleep (1) + LayoutsPreview.TypeKeys ("") + sleep (1) + hTypeKeys ("") + hTypeKeys ("") + hTypeKeys ("") + sleep (5) + + call fSaveLoadAllFormats (NewFileDir) 'Runs the Function below. + printlog " Will try to delete the directory: " + NewFileDir app.rmDir ConvertPath (gOfficePath + "user\work\LayoutTest\")' NewFileDir - '/// End the test ///' endcase 'tSaveLoadLayoutPicture '**************************************************************************************************** @@ -774,47 +684,37 @@ testcase tSaveLoadLayoutChart NewFileDir = ConvertPath (gOfficePath + "user\work\LayoutTest\") - '/// Create New folder in the Work-directory ///' printlog " Will try to create the directory: " + NewFileDir app.mkdir NewFileDir - '/// Create a new document, add a Layout, Save the document in different Formats, and open the saved files. ///' - '/// Make new Presentation ///' gApplication = "IMPRESS" Call hNewDocument - '/// Choose and Insert an Layout with a Chart-field. ///' printlog "Choose and Insert an Layout with a Chart-field." FormatModifyPage sleep 1 kontext "Tasks" - LayoutsPreview.TypeKeys "" - kontext "Pagelayout_UndoDeleteWarning" - if Pagelayout_UndoDeleteWarning.exists then - Pagelayout_UndoDeleteWarning.ok + LayoutsPreview.TypeKeys "" + kontext "Pagelayout_UndoDeleteWarning" + if Pagelayout_UndoDeleteWarning.exists then + Pagelayout_UndoDeleteWarning.ok endif kontext "Tasks" - '/// select the Chart placeholder and activate it with [Return] ///' - LayoutsPreview.TypeKeys ("",6) - sleep (1) - LayoutsPreview.TypeKeys ("") - sleep (1) - hTypeKeys ("") - hTypeKeys ("") - hTypeKeys ("") - sleep (5) - - '/// Save the document in different formats... ///' - '/// Close the file. ///' - '/// Load the different files. ///' - call fSaveLoadAllFormats (NewFileDir) 'Runs the Function below. - - '/// Delete the different files. ///' + LayoutsPreview.TypeKeys ("",6) + sleep (1) + LayoutsPreview.TypeKeys ("") + sleep (1) + hTypeKeys ("") + hTypeKeys ("") + hTypeKeys ("") + sleep (5) + + call fSaveLoadAllFormats (NewFileDir) 'Runs the Function below. + printlog " Will try to delete the directory: " + NewFileDir app.rmDir ConvertPath (gOfficePath + "user\work\LayoutTest\")' NewFileDir - '/// End the test ///' endcase 'tSaveLoadLayoutChart '**************************************************************************************************** @@ -826,47 +726,37 @@ testcase tSaveLoadLayoutSpreadsheet NewFileDir = ConvertPath (gOfficePath + "user\work\LayoutTest\") - '/// Create New folder in the Work-directory ///' printlog " Will try to create the directory: " + NewFileDir app.mkdir NewFileDir - '/// Create a new document, add a Layout, Save the document in different Formats, and open the saved files. ///' - '/// Make new Presentation ///' gApplication = "IMPRESS" Call hNewDocument - '/// Choose and Insert an Layout with a Spreadsheet-field. ///' printlog "Choose and Insert an Layout with a Spreadsheet-field." FormatModifyPage sleep 1 kontext "Tasks" - LayoutsPreview.TypeKeys "" - kontext "Pagelayout_UndoDeleteWarning" - if Pagelayout_UndoDeleteWarning.exists then - Pagelayout_UndoDeleteWarning.ok + LayoutsPreview.TypeKeys "" + kontext "Pagelayout_UndoDeleteWarning" + if Pagelayout_UndoDeleteWarning.exists then + Pagelayout_UndoDeleteWarning.ok endif kontext "Tasks" - '/// select the Spreadsheet placeholder and activate it with [Return] ///' - LayoutsPreview.TypeKeys ("",7) - sleep (1) - LayoutsPreview.TypeKeys ("") - sleep (1) - hTypeKeys ("") - hTypeKeys ("") - hTypeKeys ("") - sleep (5) - - '/// Save the document in different formats... ///' - '/// Close the file. ///' - '/// Load the different files. ///' - call fSaveLoadAllFormats (NewFileDir) 'Runs the Function below. - - '/// Delete the different files. ///' + LayoutsPreview.TypeKeys ("",7) + sleep (1) + LayoutsPreview.TypeKeys ("") + sleep (1) + hTypeKeys ("") + hTypeKeys ("") + hTypeKeys ("") + sleep (5) + + call fSaveLoadAllFormats (NewFileDir) 'Runs the Function below. + printlog " Will try to delete the directory: " + NewFileDir app.rmDir ConvertPath (gOfficePath + "user\work\LayoutTest\")' NewFileDir - '/// End the test ///' endcase 'tSaveLoadLayoutSpreadsheet '**************************************************************************************************** diff --git a/testautomation/graphics/optional/includes/global/g_mediaplayer.inc b/testautomation/graphics/optional/includes/global/g_mediaplayer.inc index d02383393f9a..61d9d7a95f95 100755 --- a/testautomation/graphics/optional/includes/global/g_mediaplayer.inc +++ b/testautomation/graphics/optional/includes/global/g_mediaplayer.inc @@ -1,7 +1,7 @@ 'encoding UTF-8 Do not remove or change this line! '************************************************************************** '* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. -'* +'* '* Copyright 2008 by Sun Microsystems, Inc. '* '* OpenOffice.org - a multi-platform office productivity suite @@ -45,218 +45,193 @@ testcase g_mediaplayer dim timevalue2 dim timevalue3 dim timecounter, iWaitIndex, timefound as integer - + if iSprache <> 39 then Printlog "- MediaPlayer" if gPlatgroup = "unx" then - QaErrorLog "Solaris / Linux: Soundcard + Java Media Framework (JMF) Media-Libraries is needed." - goto endsub + QaErrorLog "Solaris / Linux: Soundcard + Java Media Framework (JMF) Media-Libraries is needed." + goto endsub endif Datei$ = ConvertPath (convertPath (gTesttoolPath + "graphics\required\input\29secsound.wav")) - '/// Open New Document ///' Call hNewDocument sleep 2 - '/// Check if the Media Player already exists - if so - close it ///' kontext "mPlayer" if mPlayer.exists then ' Close the MediaPlayer - warnlog "The MediaPlayer was visible since some earlier test. Plese notify FHA." - ToolsMediaPlayer - printlog "Closed the Media Player" + warnlog "The MediaPlayer was visible since some earlier test. Plese notify FHA." + ToolsMediaPlayer + printlog "Closed the Media Player" endif - - '/// Tools - MediaPlayer ///' + ToolsMediaPlayer sleep 2 - '/// Open file ///' 'a bigger / longer one kontext "mPlayer" if mPlayer.exists then - printlog "The MediaPlayer was open." + printlog "The MediaPlayer was open." else - warnlog "Tools - MediaPlayer didnt work. The MediaPlayer wasnt visible. Aborting test." - Call hCloseDocument '/// Close document ///' - goto endsub + warnlog "Tools - MediaPlayer didnt work. The MediaPlayer wasnt visible. Aborting test." + goto endsub endif Mopen.Click kontext "OeffnenDlg" Pfad.SetText Datei$ Oeffnen.Click - - '/// This test wont work correctly under Solaris and Linux, ///' - '/// unless some optional Media-libraries are installed. ///' - '/// Therefore we warn the tester about it if we cannot open the file. ///' - + + iWaitIndex = 0 do while OeffnenDlg.Exists AND iWaitIndex < 10 - sleep (1) - iWaitIndex = iWaitIndex + 1 + sleep (1) + iWaitIndex = iWaitIndex + 1 loop kontext "Active" if Active.exists then - Warnlog "Error when opening file. Last dialogue said: " + Active.GetText - Active.OK - kontext "Mplayer" - ToolsMediaPlayer - Call hCloseDocument '/// close document ///' - goto endsub - else - kontext "Mplayer" - if Mplayer.exists then printlog "Media Player was opened." - endif - - timevalue1 = mTimeedit.GetText - - '/// Stop ///' - sleep 2 - mStop.Click - printlog "Just pressed stop." - sleep 1 - timevalue2 = mTimeedit.GetText - sleep 2 - timevalue3 = mTimeedit.GetText - printlog "The time was: " + mTimeedit.GetText - if timevalue1 = timevalue2 AND timevalue2 = timevalue3 then - if gtSYSName <> "WinXP" then '("Solaris x86" OR "Linux" OR "Solaris") then - warnlog "The sound doesnt seem to be played at all. And since the test is run on a platform which needs extra libraries, the test ends now." - kontext "Mplayer" - if Mplayer.Exists(3) then - ToolsMediaPlayer - endif - Call hCloseDocument '/// close document ///' - goto endsub - else - warnlog "The sound doesnt seem to be played at all, but I will continue the test. The platform was: " + gtSYSName - endif - else - if timevalue1 <> timevalue2 AND timevalue2 = timevalue3 then - Printlog "the stop-button seemed to work. Good." - else - warnlog "Very strange. The first value was: " + timevalue1 + ". Second: " + timevalue2 + ". Third: " + timevalue3 - endif - endif - '/// Play ///' - ' Save value - timevalue1 = mTimeedit.GetText - ' Press 'Play' - mPlay.Click - sleep 2 - timevalue2 = mTimeedit.GetText - printlog "The time was: " + mTimeedit.GetText - if timevalue1 = timevalue2 then - warnlog "The play-button didnt seem to work" ' Because the time did not change. + Warnlog "Error when opening file. Last dialogue said: " + Active.GetText + Active.OK + kontext "Mplayer" + ToolsMediaPlayer + goto endsub else - Printlog "the play-button seemed to work. Good." - endif - - '/// Pause ///' - mPlay.Click - sleep 10 - mPause.Click - printlog "Pause." - timevalue1 = mTimeedit.GetText - sleep 2 - timevalue2 = mTimeedit.GetText - printlog "The time was: " + mTimeedit.GetText - if timevalue1 <> timevalue2 then - warnlog "The pause-button didnt seem to work" - else - Printlog "the pause-button seemed to work. Good." - endif - - '/// Time ///' - mStop.Click 'to get to the beginning. - sleep 1 'And make sure it's really the beginning. - timevalue1 = mTimeedit.GetText - if timevalue1 <> "00:00:00 / 00:00:29" then - warnlog "Expected the time to go back to 00:00:00, but was " + timevalue1 + " instead." - mStop.Click 'to make another try to get to the beginning again. - else - printlog "Sound stopped, time-value set to 00:00:00." - endif - - printlog "We press 'Play'" - mPlay.Click 'to get it running - sleep 5 - timefound = 0 - - for timecounter = 1 to 50000 + kontext "Mplayer" + if Mplayer.exists then printlog "Media Player was opened." + endif + timevalue1 = mTimeedit.GetText - if timevalue1 = "00:00:20 / 00:00:29" then - timecounter = 50000 - timefound = 1 + + sleep 2 + mStop.Click + printlog "Just pressed stop." + sleep 1 + timevalue2 = mTimeedit.GetText + sleep 2 + timevalue3 = mTimeedit.GetText + printlog "The time was: " + mTimeedit.GetText + if timevalue1 = timevalue2 AND timevalue2 = timevalue3 then + if gtSYSName <> "WinXP" then '("Solaris x86" OR "Linux" OR "Solaris") then + warnlog "The sound doesnt seem to be played at all. And since the test is run on a platform which needs extra libraries, the test ends now." + kontext "Mplayer" + if Mplayer.Exists(3) then + ToolsMediaPlayer + endif + goto endsub + else + warnlog "The sound doesnt seem to be played at all, but I will continue the test. The platform was: " + gtSYSName + endif + else + if timevalue1 <> timevalue2 AND timevalue2 = timevalue3 then + Printlog "the stop-button seemed to work. Good." + else + warnlog "Very strange. The first value was: " + timevalue1 + ". Second: " + timevalue2 + ". Third: " + timevalue3 + endif endif - if timevalue1 = "00:00:29 / 00:00:29" then - timecounter = 50000 - timefound = 2 + ' Save value + timevalue1 = mTimeedit.GetText + ' Press 'Play' + mPlay.Click + sleep 2 + timevalue2 = mTimeedit.GetText + printlog "The time was: " + mTimeedit.GetText + if timevalue1 = timevalue2 then + warnlog "The play-button didnt seem to work" ' Because the time did not change. + else + Printlog "the play-button seemed to work. Good." endif - next timecounter - - if timefound = 1 then - Printlog "the time-counter seemed to work. Good." - elseif timefound = 2 then - warnlog "Contact the test-administrator, this test needs to be rewritten." - elseif timefound = 0 then - warnlog "Either the time didnt change, or the test-computer is too fast." - endif - - '-Repeat - 'Plays the file repeatedly. - '/// Loop ///' - mLoop.Click - - '/// Volume ///' - 'mVolume. 'Click - '-Volume slider - 'Adjusts the volume. - - '/// Mute ///' - mMute.Click - sleep 1 - mMute.Click - '-Mute - 'Turns sound off and on. - - '/// Time-slider ///' - ' mTimeslider. 'Click - '-Position slider - 'Moves to a different position in the file. - - '/// Scroll-whatever ///' - 'mZoomlistbox. - '-Zoom - 'Adjusts the size of the movie playback. - - '/// Apply ///' - mInsert.Click - sleep 10 - - '/// Close the MediaPlayer via Tools - MediaPlayer ///' - ToolsMediaPlayer - - '/// Check if there is an object available. ///' - if (gApplication = "IMPRESS") then - kontext "DocumentImpress" - else - kontext "DocumentDraw" - endif - hTypeKeys ("") - hOpenContextMenu() - hMenuSelectNr(1) - - Kontext "TabPositionAndSize" - Kontext - Active.SetPage TabPositionAndSize - Kontext "TabPositionAndSize" - if Width.Exists then - Printlog "Position and Size came up, object inserted correctly." - '/// Close dialog TabPositionAndSize with 'OK' ///' - TabPositionAndSize.OK + + mPlay.Click + sleep 10 + mPause.Click + printlog "Pause." + timevalue1 = mTimeedit.GetText + sleep 2 + timevalue2 = mTimeedit.GetText + printlog "The time was: " + mTimeedit.GetText + if timevalue1 <> timevalue2 then + warnlog "The pause-button didnt seem to work" + else + Printlog "the pause-button seemed to work. Good." + endif + + mStop.Click 'to get to the beginning. + sleep 1 'And make sure it's really the beginning. + timevalue1 = mTimeedit.GetText + if timevalue1 <> "00:00:00 / 00:00:29" then + warnlog "Expected the time to go back to 00:00:00, but was " + timevalue1 + " instead." + mStop.Click 'to make another try to get to the beginning again. + else + printlog "Sound stopped, time-value set to 00:00:00." + endif + + printlog "We press 'Play'" + mPlay.Click 'to get it running + sleep 5 + timefound = 0 + + for timecounter = 1 to 50000 + timevalue1 = mTimeedit.GetText + if timevalue1 = "00:00:20 / 00:00:29" then + timecounter = 50000 + timefound = 1 + endif + if timevalue1 = "00:00:29 / 00:00:29" then + timecounter = 50000 + timefound = 2 + endif + next timecounter + + if timefound = 1 then + Printlog "the time-counter seemed to work. Good." + elseif timefound = 2 then + warnlog "Contact the test-administrator, this test needs to be rewritten." + elseif timefound = 0 then + warnlog "Either the time didnt change, or the test-computer is too fast." + endif + + '-Repeat + 'Plays the file repeatedly. + mLoop.Click + + 'mVolume. 'Click + '-Volume slider + 'Adjusts the volume. + + mMute.Click + sleep 1 + mMute.Click + '-Mute + 'Turns sound off and on. + + ' mTimeslider. 'Click + '-Position slider + 'Moves to a different position in the file. + + 'mZoomlistbox. + '-Zoom + 'Adjusts the size of the movie playback. + + mInsert.Click + sleep 10 + + ToolsMediaPlayer + + if (gApplication = "IMPRESS") then + kontext "DocumentImpress" + else + kontext "DocumentDraw" + endif + hTypeKeys ("") + hOpenContextMenu() + hMenuSelectNr(1) + + Kontext "TabPositionAndSize" + Kontext + Active.SetPage TabPositionAndSize + Kontext "TabPositionAndSize" + if Width.Exists then + Printlog "Position and Size came up, object inserted correctly." + TabPositionAndSize.OK + else + Warnlog "Position And Size didn't come up, was there no sound-object inserted?" + endif + sleep 2 else - Warnlog "Position And Size didn't come up, was there no sound-object inserted?" + qaerrorLog "#74350# - Different strings in g_mediaplayer under Italian." endif - sleep 2 - '/// close document ///' - Call hCloseDocument '/// close document ///' - else - qaerrorLog "#74350# - Different strings in g_mediaplayer under Italian." - endif endcase diff --git a/testautomation/graphics/optional/includes/global/g_navigator.inc b/testautomation/graphics/optional/includes/global/g_navigator.inc index 4b27d6e8226d..56f32d921f7b 100755 --- a/testautomation/graphics/optional/includes/global/g_navigator.inc +++ b/testautomation/graphics/optional/includes/global/g_navigator.inc @@ -1,7 +1,7 @@ 'encoding UTF-8 Do not remove or change this line! '************************************************************************** '* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. -'* +'* '* Copyright 2008 by Sun Microsystems, Inc. '* '* OpenOffice.org - a multi-platform office productivity suite @@ -56,86 +56,72 @@ testcase tdViewNavigator For Zaehler = 1 to 3 Select Case Zaehler - Case 1: Position1 = 20 - Case 2: Position1 = 30 - Case 3: Position1 = 40 - end select '/// create test document containing 3 slides ///' - - Call hRechteckErstellen ( Position1, Position1, 60, 60) '/// On each page there is a rectangle at a different position, so jumping from slide to slide can be checked ///' - ContextPositionAndSize - kontext - active.SetPage TabPositionAndSize - kontext "TabPositionAndSize" + Case 1: Position1 = 20 + Case 2: Position1 = 30 + Case 3: Position1 = 40 + + ContextPositionAndSize + kontext + active.SetPage TabPositionAndSize + kontext "TabPositionAndSize" Select Case Zaehler - Case 1: Ueber_Text_4 = PositionX.GetText - Case 2: Ueber_Text_5 = PositionX.GetText - Case 3: Ueber_Text_6 = PositionX.GetText + Case 1: Ueber_Text_4 = PositionX.GetText + Case 2: Ueber_Text_5 = PositionX.GetText + Case 3: Ueber_Text_6 = PositionX.GetText End Select printlog " CHECK: Xposition i: "+Zaehler+": "+PositionX.GetText TabPositionAndSize.OK Select Case Zaehler - Case 1,2: InsertSlide - WaitSlot (2000) - hTypekeys "" - WaitSlot (2000) + Case 1,2: InsertSlide + WaitSlot (2000) + hTypekeys "" + WaitSlot (2000) End Select - Next Zaehler + Next Zaehler - WaitSlot (1000) - ViewNavigator '/// open navigator flyer ///' - Kontext "NavigatorDraw" + WaitSlot (1000) + Kontext "NavigatorDraw" if NavigatorDraw.exists (5) then printlog "OK" - Erste.Click '/// jump to 1st slide ///' - Ueber_Text_1 = Ueber_Text_4 '/// compare position ///' Ueber_Text_2 = "OK First" Ueber_Text_3 = "First doesnt work" Call Position_Vergleichen (Ueber_Text_1,Ueber_Text_2,Ueber_Text_3) WaitSlot (1000) Kontext "NavigatorDraw" - Naechste.Click '/// jump to next slide ///' - Ueber_Text_1 = Ueber_Text_5 '/// compare position ///' - Ueber_Text_2 = "OK Next" - Ueber_Text_3 = "Next doesnt work" - Call Position_Vergleichen (Ueber_Text_1,Ueber_Text_2,Ueber_Text_3) + Ueber_Text_2 = "OK Next" + Ueber_Text_3 = "Next doesnt work" + Call Position_Vergleichen (Ueber_Text_1,Ueber_Text_2,Ueber_Text_3) Kontext "NavigatorDraw" - Erste.Click '/// jump back to 1st slide ///' - WaitSlot (1000) - Letzte.Click '/// jump to last slide ///' - Ueber_Text_1 = Ueber_Text_6 '/// compare position ///' - Ueber_Text_2 = "OK Last" - Ueber_Text_3 = "Last doesnt work" - Call Position_Vergleichen (Ueber_Text_1,Ueber_Text_2,Ueber_Text_3) - WaitSlot (1000) + WaitSlot (1000) + Ueber_Text_2 = "OK Last" + Ueber_Text_3 = "Last doesnt work" + Call Position_Vergleichen (Ueber_Text_1,Ueber_Text_2,Ueber_Text_3) + WaitSlot (1000) Kontext "NavigatorDraw" - Vorherige.Click - Ueber_Text_1 = Ueber_Text_5 - Ueber_Text_2 = "OK Before this" - Ueber_Text_3 = "Before this doesnt work" - Call Position_Vergleichen (Ueber_Text_1,Ueber_Text_2,Ueber_Text_3) + Vorherige.Click + Ueber_Text_1 = Ueber_Text_5 + Ueber_Text_2 = "OK Before this" + Ueber_Text_3 = "Before this doesnt work" + Call Position_Vergleichen (Ueber_Text_1,Ueber_Text_2,Ueber_Text_3) - WaitSlot (1000) + WaitSlot (1000) Kontext "NavigatorDraw" - try - Kontext "Navigator" - Navigator.Close '/// close navigator ///' - catch - hTypeKeys "" - Warnlog "- Unable to reach the Navigator, tried to use the keyboard Shortcut (MOD1 F5) to close it." - endcatch - - '/// check state of navigator. Expected: Closed ///' + try + Kontext "Navigator" + catch + hTypeKeys "" + Warnlog "- Unable to reach the Navigator, tried to use the keyboard Shortcut (MOD1 F5) to close it." + endcatch + Kontext "Navigator" - if Navigator.exists then - '/// close navigator ///' - Navigator.Close - Warnlog "Navigator: should be closed at this point, but was not." - else - printlog "Navigator: Not available - Good." - end if - - WaitSlot (1000) - '/// Close the document ///' - Call hCloseDocument + if Navigator.exists then + Navigator.Close + Warnlog "Navigator: should be closed at this point, but was not." + else + printlog "Navigator: Not available - Good." + end if + + WaitSlot (1000) + Call hCloseDocument endcase 'tdViewNavigator '-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- @@ -143,14 +129,13 @@ endcase 'tdViewNavigator testcase tViewNavigatorZOrder qaerrorlog "Not yet ready." goto endsub - + dim zPosition(4) dim Counter as integer dim MaxCounter as integer dim PositionName as string dim CheckingValue as string - '/// New document ///' Call hNewDocument zPosition(1) = "10" @@ -159,56 +144,50 @@ testcase tViewNavigatorZOrder zPosition(4) = "25" For Counter = 1 to 4 - '/// Insert Objects ///' Call hRechteckErstellen ((zPosition(Counter)), (zPosition(Counter)), 60, 60) WaitSlot (1000) - '/// Name them according to their Z-Order ///' - printlog "Name the Objects according to their Z-Order. (" +Counter + ")" - hOpenContextMenu - WaitSlot (1000) - 'Choose rename. - if hMenuFindSelect(27027, true, 16) = false then - Warnlog "Context-Menu-entry `Rename` was not found. Therefore the test ends." - Call hCloseDocument - Goto Endsub - end if - kontext "NameDlgObject" - NameField.SetText "Object" + Counter - NameDlgObject.OK - hTypeKeys "" + printlog "Name the Objects according to their Z-Order. (" +Counter + ")" + hOpenContextMenu + WaitSlot (1000) + 'Choose rename. + if hMenuFindSelect(27027, true, 16) = false then + Warnlog "Context-Menu-entry `Rename` was not found. Therefore the test ends." + Call hCloseDocument + Goto Endsub + end if + kontext "NameDlgObject" + NameField.SetText "Object" + Counter + NameDlgObject.OK + hTypeKeys "" Next Counter - '/// Check the Z-Order ///' printlog "check" - '/// Open the Navigator ///' Kontext "NavigatorDraw" - if (gApplication = "IMPRESS") then - try - NavigatorDraw.Close '/// test if the Navigator is visible. It should not be. ///' - warnlog "- the Navigator was open, check earlier ran tests for inconsistency." - hTypeKeys "" - catch - hTypeKeys "" - endcatch - else - Kontext "NavigatorDraw" - try - NavigatorDraw.Close '/// test if the Navigator is visible. It should not be. ///' - Warnlog "- the Navigator was open, check earlier ran tests for inconsistency." - hTypeKeys "" - catch - hTypeKeys "" - endcatch - end if + if (gApplication = "IMPRESS") then + try + warnlog "- the Navigator was open, check earlier ran tests for inconsistency." + hTypeKeys "" + catch + hTypeKeys "" + endcatch + else + Kontext "NavigatorDraw" + try + Warnlog "- the Navigator was open, check earlier ran tests for inconsistency." + hTypeKeys "" + catch + hTypeKeys "" + endcatch + end if -' * Check if the Navigator contains the 'Show Shapes' drop down menu. + ' * Check if the Navigator contains the 'Show Shapes' drop down menu. kontext "NavigatorDraw" - Dragmodus.OpenMenu + Dragmodus.OpenMenu MaxCounter = MenuGetItemCount - if MaxCounter <> 0 then + if MaxCounter <> 0 then For Counter = 1 to MaxCounter printlog "Entry (Dragmode): '" + (MenuGetItemText(MenuGetItemID (Counter))) + "' Found." Next Counter @@ -217,8 +196,7 @@ testcase tViewNavigatorZOrder hMenuSelectNr (0) - '/// Check the Options for the Shapes-Filter. ///' - Shapesfilter.OpenMenu + Shapesfilter.OpenMenu MaxCounter = MenuGetItemCount For Counter = 1 to MaxCounter printlog "Entry (Shapesfilter): '" + (MenuGetItemText(MenuGetItemID (Counter))) + "' Found." @@ -260,44 +238,42 @@ testcase tViewNavigatorZOrder 'Vorherige HID_SD_NAVIGATOR_TBI_PREV 'Naechste HID_SD_NAVIGATOR_TBI_NEXT 'Letzte HID_SD_NAVIGATOR_TBI_LAST - + 'Context-menu framställbar? 'Dragmodus HID_SD_NAVIGATOR_TBI_DRAGTYPE - + 'Liste HID_SD_NAVIGATOR_TLB - + 'Den undre scroll-delen. 'Dokumentliste HID_SD_NAVIGATOR_LB -' * the drop down menu must contain the entries 'Named shapes' and 'All Shapes' + ' * the drop down menu must contain the entries 'Named shapes' and 'All Shapes' - '/// Close the Navigator ///' Kontext "Navigator" - try - Navigator.Close - catch - printlog "Nope" - endcatch + try + Navigator.Close + catch + printlog "Nope" + endcatch + + ' * check if 'Named shapes' is selected by default + + ' * insert 5 shapes in the Document. the shapes should overlap slightly. + ' * there must be no entry in the navigator + ' * name 1 shape (context menu of the shape / name...) + ' * there must appear 1 entry 'under' the corresponding slide in the navigator + ' * Select All shapes in the Show shapes drop down menu + ' * there must be 5 shapes in the navigator + ' * change the order of the shapes in the navigator + ' * the z-order of the shapes must stay + ' * delete 1 shape from the slide + ' * the automatic generated names of the shapes must change and no shape name must be duplicate. The changed shape name must stay + + ' * select 2 shapes and group them + ' * an entry with a small plus in front must appear in the navigator + ' * click on the plus + ' * there must be an additional tree with the 2 shapes of the group -' * check if 'Named shapes' is selected by default - -' * insert 5 shapes in the Document. the shapes should overlap slightly. -' * there must be no entry in the navigator -' * name 1 shape (context menu of the shape / name...) -' * there must appear 1 entry 'under' the corresponding slide in the navigator -' * Select All shapes in the Show shapes drop down menu -' * there must be 5 shapes in the navigator -' * change the order of the shapes in the navigator -' * the z-order of the shapes must stay -' * delete 1 shape from the slide -' * the automatic generated names of the shapes must change and no shape name must be duplicate. The changed shape name must stay - -' * select 2 shapes and group them -' * an entry with a small plus in front must appear in the navigator -' * click on the plus -' * there must be an additional tree with the 2 shapes of the group - - '/// Close the document ///' Call hCloseDocument endcase 'tViewNavigatorZOrder @@ -312,16 +288,10 @@ testcase tViewNavigatorNameActivated dim zPosition4 as integer dim counter as integer - '/// New document ///' Call hNewDocument - '/// Insert Objects ///' - Call hRechteckErstellen ( Position1, Position1, 60, 60) + Call hRechteckErstellen ( Position1, Position1, 60, 60) - '/// Name them accoirding to their Z-Order ///' - '/// Open the Navigator ///' - '/// Close the Navigator ///' - '/// Close the document ///' endcase 'tViewNavigatorNameActivated '-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- @@ -335,17 +305,11 @@ testcase tViewNavigatorGroupedObjects dim zPosition4 as integer dim counter as integer - '/// New document ///' Call hNewDocument - '/// Insert Objects ///' - Call hRechteckErstellen ( Position1, Position1, 60, 60) + Call hRechteckErstellen ( Position1, Position1, 60, 60) - '/// Name them accoirding to their Z-Order ///' - '/// Open the Navigator ///' - '/// Close the Navigator ///' - '/// Close the document ///' endcase 'tViewNavigatorGroupedObjects '-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- diff --git a/testautomation/graphics/optional/includes/global/g_ole.inc b/testautomation/graphics/optional/includes/global/g_ole.inc index 9ff9970d8c66..71780c68c83b 100755 --- a/testautomation/graphics/optional/includes/global/g_ole.inc +++ b/testautomation/graphics/optional/includes/global/g_ole.inc @@ -1,7 +1,7 @@ 'encoding UTF-8 Do not remove or change this line! '************************************************************************** '* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. -'* +'* '* Copyright 2008 by Sun Microsystems, Inc. '* '* OpenOffice.org - a multi-platform office productivity suite @@ -44,28 +44,24 @@ testcase tOLE_Copy qaerrorlog "not running due to reconstruction" goto endsub - printlog "Test to see if three different OLEs can be copied and identified correctly." - + dim writerfilename1 as string writerfilename1 = ConvertPath (gTesttoolPath + "graphics\required\input\oletest.odg") - - printlog "Open draw-file" & writerfilename1 + FileOpen Kontext "OeffnenDlg" sleep 1 Dateiname.SetText (writerfilename1) Oeffnen.Click Sleep 3 - - printlog "When messagebox about Update all links shows up - press yes." + kontext "Messagebox" if Messagebox.exists then - Messagebox.Yes + Messagebox.Yes endif - + sleep 3 gApplication = "DRAW" - printlog "Select first object. Use EditCopy to copy it to the clipboard" sleep 1 kontext "DocumentDraw" DocumentDraw.mousedown (10,10) @@ -73,57 +69,49 @@ testcase tOLE_Copy sleep 1 DocumentDraw.Typekeys "" EditCopy - - printlog "Close document. Open new Impress-Document. Paste the OLE-Object." + Call hCloseDocument gApplication = "IMPRESS" Call hNewDocument EditPaste - - printlog "Select object and check via the Context-menu what it has been opened as." + sleep 1 Kontext "DocumentImpress" hTypekeys " A" hTypekeys "" hOpenContextMenu - - printlog "Count the number of entries. If 5 (including a menuseparator), then its a spreadsheet" + if MenuGetItemCount <> 5 then Warnlog "This doesn't seem to be recognized as a Metafile. It has " + MenuGetItemCount + " entries." end if - printlog "Close Context menu. Then check if a Edit-line for the Cells is visible." sleep 3 MenuSelect (1) 'Default - + Kontext "RechenleisteCalc" if RechenleisteCalc.Exists then Printlog "This is a spreadsheet-Document. Good" endif - + Kontext "DocumentImpress" - printlog "Click outside the OLE to deactivate it. Then close the Document " DocumentImpress.mousedown (10,10) DocumentImpress.mouseup (10,10) sleep 3 Call hCloseDocument - - printlog "Open Draw-file " + FileOpen Kontext "OeffnenDlg" sleep 1 Dateiname.SetText (writerfilename1) Oeffnen.Click Sleep 3 - - printlog " When messagebox about Update all links shows up - press yes." + kontext "Messagebox" if Messagebox.exists then Messagebox.Yes endif sleep 3 - - printlog "Select second object. Use EditCopy to copy it to the clipboard." + gApplication = "DRAW" sleep 1 kontext "DocumentDraw" @@ -132,49 +120,43 @@ testcase tOLE_Copy sleep 1 DocumentDraw.Typekeys "" EditCopy - - printlog "Close document. Open new Impress-Document. Paste the OLE-Object." + sleep 1 DocumentDraw.mousedown (10,10) DocumentDraw.mouseup (10,10) sleep 1 Call hCloseDocument - + gApplication = "IMPRESS" Call hNewDocument EditPaste - - printlog "Select the object, and check via the Context-menu what it has been opened as." + sleep 1 Kontext "DocumentImpress" hTypekeys " A" hTypekeys "" hOpenContextMenu - printlog "Count the number of entries. If 5 (including a menuseparator), then its a spreadsheet" if MenuGetItemCount <> 5 then Warnlog "This doesn't seem to be recognized as a Metafile. It has " + MenuGetItemCount + " entries." end if - - printlog "Close Context menu. Then check if a Edit-line for the Cells is visible." + sleep 3 MenuSelect (1) 'Default - + Kontext "RechenleisteCalc" if RechenleisteCalc.Exists then Printlog "This is a spreadsheet-Document. Good" endif - + kontext "DocumentImpress" sleep 1 DocumentImpress.mousedown (10,10) DocumentImpress.mouseup (10,10) sleep 1 - - printlog "Close document" + Call hCloseDocument - - printlog "Open draw-file" + FileOpen Kontext "OeffnenDlg" sleep 1 @@ -182,13 +164,11 @@ testcase tOLE_Copy Oeffnen.Click Sleep 3 kontext "Messagebox" - printlog "When messagebox about Update all links shows up - press yes." if Messagebox.exists then Messagebox.Yes endif sleep 3 - - printlog "Select third object. Use EditCopy to copy it to the clipboard." + gApplication = "DRAW" sleep 1 kontext "DocumentDraw" @@ -197,8 +177,7 @@ testcase tOLE_Copy sleep 1 DocumentDraw.Typekeys "" EditCopy - - printlog "Close the Document. Open new Impress-Document. Paste the OLE-Object." + sleep 1 DocumentDraw.mousedown (10,10) DocumentDraw.mouseup (10,10) @@ -208,28 +187,24 @@ testcase tOLE_Copy gApplication = "IMPRESS" Call hNewDocument EditPaste - - printlog "Select the object, and check via the Context-menu what it has been opened as." + Kontext "DocumentImpress" hTypekeys " A" hTypekeys "" hOpenContextMenu - - printlog "Count the number of entries. If 5 (including a menuseparator), then its a spreadsheet" + if MenuGetItemCount <> 5 then Warnlog "This doesn't seem to be recognized as a Metafile. It has " + MenuGetItemCount + " entries." end if - - printlog "Close Context menu. Then check if a Edit-line for the Cells is visible." + sleep 3 MenuSelect (1) 'Default - + Kontext "RechenleisteCalc" if RechenleisteCalc.Exists then Printlog "This is a spreadsheet-Document. Good" endif - - printlog "Close Context menu. Then close the Document" + Call hCloseDocument endcase 'tOLE_Copy @@ -241,8 +216,8 @@ testcase tOLE_SaveLoad dim filename as string dim filetype as string dim filetype2 as string - - if (gApplication = "IMPRESS") then + + if (gApplication = "IMPRESS") then ExtensionString = "odp" else ExtensionString = "odg" @@ -254,13 +229,13 @@ testcase tOLE_SaveLoad printlog "Insert->Object->OLE Object..." InsertObjectOLEObject Kontext "OLEObjektInsert" - + printlog "Choose create new. Select Writer." Objekttyp.Select 5 - + printlog "Click OK to close dialog and insert OLE." OLEObjektInsert.OK - + printlog "Deselect object." sleep 1 kontext "DocumentImpress" @@ -285,7 +260,7 @@ testcase tOLE_SaveLoad Dateiname.Settext (filename) printlog "Saving as: " & filename Speichern.Click - + printlog "If the file already exists - press yes to overwrite it." Sleep 3 kontext "Messagebox" @@ -293,7 +268,7 @@ testcase tOLE_SaveLoad Messagebox.Yes endif Sleep 3 - + printlog "Getting type of OLE from save as dialog." hOpenContextMenu hMenuSelectNr(-1) @@ -311,7 +286,7 @@ testcase tOLE_SaveLoad Call hFileOpen (filename) sleep 1 hTypekeys "" - hOpenContextMenu + hOpenContextMenu hMenuSelectNr(-1) Kontext "SpeichernDlg" filetype2 = Dateityp.GetSelText @@ -328,8 +303,6 @@ testcase tOLE_SaveLoad 'FHA TODO 'testcase tOLE_DragDrop - printlog " Create OLE, drag n drop within the document. " - printlog " If Impress, drag and drop from document to another slide. " 'endcase 'tOLE_DragDrop endcase ' tOLE_Save @@ -340,20 +313,15 @@ testcase tiOpenOLECrash dim sFileodp as string dim oFile as string dim i as integer - printlog "Testing for bug nr: i70019" - - printlog "Open Application" + Call hNewDocument sleep 1 - printlog "1. Open file: generic_de.ppt" FileOpen sleep 1 Kontext "OeffnenDlg" - printlog " Use file: graphics\\optional\\input\\generic_de.ppt " oFile = ConvertPath (gTesttoolPath + "graphics\required\input\generic_de.ppt") Printlog "file: '" + oFile + "'" Dateiname.SetText (oFile) - printlog "2. Save this document as an *.odp -file." Oeffnen.Click kontext "DocumentImpress" i = 0 @@ -368,7 +336,7 @@ testcase tiOpenOLECrash if DocumentImpress.StatusIsProgress AND i > 19 then warnlog " Took over 20 seconds to load the document Document. Stalled?" endif - + FileSaveAs Kontext "SpeichernDlg" sFileodp = (ConvertPath(gOfficePath + "user\work\generic_de")) @@ -379,18 +347,16 @@ testcase tiOpenOLECrash 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 + 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 Sleep 3 kontext "DocumentImpress" - printlog "3. Close Impress." Call hCloseDocument - - printlog "4.Reopen the *.odp file again" + FileOpen Kontext "OeffnenDlg" Dateiname.SetText (sFileodp + ".odp") @@ -401,7 +367,7 @@ testcase tiOpenOLECrash Active.ok Warnlog "failed to open file? :-(" end if - + i = 0 do while (i < 20) try @@ -412,45 +378,40 @@ testcase tiOpenOLECrash endcatch loop if DocumentImpress.StatusIsProgress AND i > 19 then - warnlog "Took over 20 seconds to load the document Document. Stalled?" + warnlog " Took over 20 seconds to load the document Document. Stalled?" endif - - printlog "5. Right-click on the second slide and click on New slide. " + Kontext "Slides" SlidesControl.TypeKeys "" 'Goto second slide. (and get the focus right) SlidesControl.TypeKeys "" 'OpenContextMenu (True) 'Open Context-menu hMenuSelectNr (1) 'New Slide - printlog "6. Change the title-(the text was F�r den TCM-Test, but this should irrelevant... ;) )." hTypeKeys "" 'To select the title. - hTypeKeys "Fuer den TCM-Test" 'To enter text - printlog " 7. Clicked two times on the Click twice to insert object " + hTypeKeys "F�r den TCM-Test" 'To enter text hTypeKeys "" gMouseClick 1,1 hTypeKeys "" '(to select the second object) hTypeKeys "" sleep (2) - - printlog "8. Choose OpenOffice.org 2.0 Formular" + Kontext "OLEObjektInsert" - Objekttyp.Select (3) + Objekttyp.Select (4) sleep (2) - PrintLog " Object: " + Objekttyp.GetSelText + " will be inserted." - printlog "Leave dialog 'Insert OLE Object' with OK" + PrintLog " Objeckt: " + Objekttyp.GetSelText + " will be inserted." OLEObjektInsert.OK sleep (2) - + kontext "CommandsMath" Commands.TypeKeys "A over B + FACT 6 = x" - - 'printlog " Leave edit mode by typing key [Escape] " + 'Comment: If I do this, the bug wont occur... 'hTypeKeys "" - - printlog "10. Click on the Save button." + kontext "Standardbar" Speichern.Click - - printlog "11. Click on the X to close the window while the OLE-object still in Edit-mode." + Call hCloseDocument endcase + +'-----------------oooo-----------------oooo-----------------oooo----------------- + diff --git a/testautomation/graphics/optional/includes/global/g_paneview.inc b/testautomation/graphics/optional/includes/global/g_paneview.inc index c027200478a0..a84e4986f390 100755 --- a/testautomation/graphics/optional/includes/global/g_paneview.inc +++ b/testautomation/graphics/optional/includes/global/g_paneview.inc @@ -1,7 +1,7 @@ 'encoding UTF-8 Do not remove or change this line! '************************************************************************** '* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. -'* +'* '* Copyright 2008 by Sun Microsystems, Inc. '* '* OpenOffice.org - a multi-platform office productivity suite @@ -50,124 +50,97 @@ testcase tiMinimize_Maximize_Docking_SlidePane Dim ySize% printlog "- SlidePane : using all possible things to manipulate the SlidePane" - '/// open application ///' Call hNewDocument Kontext "Slides" - '/// Check if SlidePane is there. Expected: not there ///' if (Slides.isVisible = false) Then 'isReallyVisible ? - qaErrorLog "- Expected SlidePane to be open; But is closed. Check tests." - Kontext "DocumentImpress" - ViewTaskSlide - sleep 1 + qaErrorLog "- Expected SlidePane to be open; But is closed. Check tests." + Kontext "DocumentImpress" + ViewTaskSlide + sleep 1 else - printlog "SlidePane was open - good." + printlog "SlidePane was open - good." end if Kontext "Slides" -'Only because of overflow-error when some part of the pane is outside the window. + 'Only because of overflow-error when some part of the pane is outside the window. - '/// if SlidePane is docked; undock ///' if Slides.IsDocked then Slides.UnDock - '/// move Slides to 15,15 ///' - Slides.Move 15, 15 - - - '/// save SlidePane size ///' - xSize% = Slides.GetSizeX - ySize% = Slides.GetSizeY - '/// save TaskPane position and size ///' - xPos% = Slides.GetPosX - yPos% = Slides.GetPosY - printlog " - '///move SlidePane ///" - '/// move SlidePane to 300,400 ///' - Slides.Move 300, 400 - Sleep 1 - '/// move SlidePane to 590,790 ///' - Slides.Move 590, 790 - Sleep 1 - '/// move SlidePane to 10,10 ///' - Slides.Move 10, 10 - Sleep 1 - - printlog " - '/// size SlidePane ///" - '/// change size to 200,200 ///' - Slides.Size 200, 200 - Sleep 1 - '/// change size to 300,400 ///' - Slides.Size 300, 400 - Sleep 1 - '/// change size to 150,250 ///' - Slides.Size 150, 250 - Sleep 1 - '/// change size back to saved size ///' - Slides.Size xSize%, ySize% - Sleep 1 - - printlog " - Close the SlidePane, reopen it, check if appearence is same as before" - '/// save SlidePane position and size ///' - xPos% = Slides.GetPosX - yPos% = Slides.GetPosY - xSize% = Slides.GetSizeX - ySize% = Slides.GetSizeY - '/// close SlidePane Format->SlidePane ///' - Kontext "DocumentImpress" - ViewTaskSlide - ViewTaskSlide - Kontext "Slides" - Sleep 1 - '/// open SlidePane Format->SlidePane ///' - if xPos% <> Slides.GetPosX then Warnlog "The x-Pos. has changed : Should be -> "+ xPos% + " Is -> "+ Slides.GetPosX - if yPos% <> Slides.GetPosY then Warnlog "The y-Pos. has changed : Should be -> "+ yPos% + " Is -> "+ Slides.GetPosY - if xSize% <> Slides.GetSizeX then Warnlog "The x-Size has changed : Should be -> "+ xSize% + " Is -> "+ Slides.GetSizeX - if ySize% <> Slides.GetSizeY then Warnlog "Die y-Size has changed : Should be -> "+ ySize% + " Is -> "+ Slides.GetSizeY - - printlog " - dock SlidePane" - '/// dock SlidePane ///' - Slides.Dock - Sleep 1 - if (NOT Slides.IsDocked) then - Warnlog "SlidePane not docked but should be" - end if - '/// UNdock SlidePane ///' - if (Slides.IsDocked) Then - Slides.UnDock - end if - Sleep 1 - - printlog " - maximize/minimize SlidePane" - '/// minimize SlidePane ///' - Slides.Minimize - Sleep 1 - '/// Maximize SlidePane ///' - Slides.Maximize - Sleep 1 - if (NOT Slides.IsMax) then - Warnlog "The Slides-docking-window did not return to maximized state" - end if - '/// Close SlidePane ///' - Slides.Close - '/// Open the SlidePane ///' - Kontext "DocumentImpress" - ViewTaskSlide - Sleep (2) - Kontext "Slides" - '/// Make sure the SlidePane is visible ///' - if (Slides.isVisible = false) Then 'isReallyVisible ? - warnlog "the Slidepane wasnt visible" - end if - '/// move SlidePane back to saved start position ///' - Sleep (1) - Slides.Move xPos%, yPos% - Sleep 1 - '/// Make sure the SlidePane is docked ///' - if (Slides.IsDocked = True) then - warnlog "the SlidePane was docked - should have been undocked." - else - printlog "the SlidePane was not docked, good." - Slides.Dock - end if - Call hCloseDocument + Slides.Move 15, 15 + + + xSize% = Slides.GetSizeX + ySize% = Slides.GetSizeY + xPos% = Slides.GetPosX + yPos% = Slides.GetPosY + Slides.Move 300, 400 + Sleep 1 + Slides.Move 590, 790 + Sleep 1 + Slides.Move 10, 10 + Sleep 1 + + Slides.Size 200, 200 + Sleep 1 + Slides.Size 300, 400 + Sleep 1 + Slides.Size 150, 250 + Sleep 1 + Slides.Size xSize%, ySize% + Sleep 1 + + printlog " - Close the SlidePane, reopen it, check if appearence is same as before" + xPos% = Slides.GetPosX + yPos% = Slides.GetPosY + xSize% = Slides.GetSizeX + ySize% = Slides.GetSizeY + Kontext "DocumentImpress" + ViewTaskSlide + ViewTaskSlide + Kontext "Slides" + Sleep 1 + if xPos% <> Slides.GetPosX then Warnlog "The x-Pos. has changed : Should be -> "+ xPos% + " Is -> "+ Slides.GetPosX + if yPos% <> Slides.GetPosY then Warnlog "The y-Pos. has changed : Should be -> "+ yPos% + " Is -> "+ Slides.GetPosY + if xSize% <> Slides.GetSizeX then Warnlog "The x-Size has changed : Should be -> "+ xSize% + " Is -> "+ Slides.GetSizeX + if ySize% <> Slides.GetSizeY then Warnlog "Die y-Size has changed : Should be -> "+ ySize% + " Is -> "+ Slides.GetSizeY + + printlog " - dock SlidePane" + Slides.Dock + Sleep 1 + if (NOT Slides.IsDocked) then + Warnlog "SlidePane not docked but should be" + end if + if (Slides.IsDocked) Then + Slides.UnDock + end if + Sleep 1 + + printlog " - maximize/minimize SlidePane" + Slides.Minimize + Sleep 1 + Slides.Maximize + Sleep 1 + if (NOT Slides.IsMax) then + Warnlog "The Slides-docking-window did not return to maximized state" + end if + Slides.Close + Kontext "DocumentImpress" + ViewTaskSlide + Sleep (2) + Kontext "Slides" + if (Slides.isVisible = false) Then 'isReallyVisible ? + warnlog "the Slidepane wasnt visible" + end if + Sleep (1) + Slides.Move xPos%, yPos% + Sleep 1 + if (Slides.IsDocked = True) then + warnlog "the SlidePane was docked - should have been undocked." + else + printlog "the SlidePane was not docked, good." + Slides.Dock + end if + Call hCloseDocument endcase 'tiMinimize_Maximize_Docking_SlidePane '------------------------------------------------------------------------------------' @@ -179,122 +152,95 @@ testcase tiMinimize_Maximize_Docking_TaskPane Dim ySize% printlog "- TaskPane : using all possible things to manipulate the TaskPane" - '/// open application ///' Call hNewDocument - '/// Check if TaskPane is there. Expected: not there ///' Kontext "Tasks" if (Tasks.isVisible = false) Then 'isReallyVisible ? - qaErrorLog "- Expected TaskPane to be open; But is closed. Check tests." - sleep 1 - Kontext "DocumentImpress" - ViewTaskPane + qaErrorLog "- Expected TaskPane to be open; But is closed. Check tests." + sleep 1 + Kontext "DocumentImpress" + ViewTaskPane else - printlog "TaskPane was open - good." + printlog "TaskPane was open - good." end if Kontext "Tasks" -'Only because of overflow-error when some part of the pane is outside the window. - '/// if TaskPane is docked; undock ///' + 'Only because of overflow-error when some part of the pane is outside the window. if Tasks.IsDocked then Tasks.UnDock - '/// move Tasks to 15,15 ///' - Tasks.Move 15, 15 - - '/// save TaskPane size ///' - xSize% = Tasks.GetSizeX - ySize% = Tasks.GetSizeY - - '/// save TaskPane position and size ///' - xPos% = Tasks.GetPosX - yPos% = Tasks.GetPosY - printlog " - '///move TaskPane ///" - '/// move TaskPane to 300,400 ///' - Tasks.Move 300, 400 - Sleep 1 - '/// move TaskPane to 590,790 ///' - Tasks.Move 590, 790 - Sleep 1 - '/// move TaskPane to 10,10 ///' - Tasks.Move 10, 10 - Sleep 1 - printlog " - '/// size -TaskPane ///" - '/// change size to 200,200 ///' - Tasks.Size 200, 200 - Sleep 1 - '/// change size to 300,400 ///' - Tasks.Size 300, 400 - Sleep 1 - '/// change size to 150,250 ///' - Tasks.Size 150, 250 - Sleep 1 - '/// change size back to saved size ///' - Tasks.Size xSize%, ySize% - Sleep 1 - - printlog " - Close the TaskPane, reopen it, check if appearence is same as before" - '/// save TaskPane position and size ///' - xPos% = Tasks.GetPosX - yPos% = Tasks.GetPosY - xSize% = Tasks.GetSizeX - ySize% = Tasks.GetSizeY - '/// close TaskPane Format->SlidePane ///' - Kontext "DocumentImpress" - ViewTaskPane - ViewTaskPane - Sleep 1 - Kontext "Tasks" - '/// open TaskPane Format->TaskPane ///' - if xPos% <> Tasks.GetPosX then Warnlog "The x-Pos. has changed : Should be -> "+ xPos% + " Is -> "+ Tasks.GetPosX - if yPos% <> Tasks.GetPosY then Warnlog "The y-Pos. has changed : Should be -> "+ yPos% + " Is -> "+ Tasks.GetPosY - if xSize% <> Tasks.GetSizeX then Warnlog "The x-Size has changed : Should be -> "+ xSize% + " Is -> "+ Tasks.GetSizeX - if ySize% <> Tasks.GetSizeY then Warnlog "Die y-Size has changed : Should be -> "+ ySize% + " Is -> "+ Tasks.GetSizeY - - printlog " - dock TaskPane" - '/// dock TaskPane ///' - Tasks.Dock - Sleep 1 - if (NOT Tasks.IsDocked) then - Warnlog "TaskPane not docked but should be" - end if - '/// UNdock TaskPane ///' - if (Tasks.IsDocked) Then - Tasks.UnDock - end if - Sleep 1 - - printlog " - maximize/minimize TaskPane" - '/// minimize TaskPane ///' - Tasks.Minimize - Sleep 1 - '/// Maximize TaskPane ///' - Tasks.Maximize - Sleep 1 - if (NOT Tasks.IsMax) then - Warnlog "The Task-docking-window did not return to maximized state" - end if - '/// Close TaskPane ///' - Tasks.Close - Sleep (1) - '/// Open the TaskPane ///' - Kontext "DocumentImpress" - ViewTaskPane - Sleep (2) - Kontext "Tasks" - '/// Make sure the TaskPane is visible ///' - if (Tasks.isVisible = false) Then 'isReallyVisible ? - warnlog "the Taskpane wasnt visible" - end if - '/// move TaskPane back to saved start position ///' - Tasks.Move xPos%, yPos% - Sleep 1 - '/// Make sure the TaskPane is docked ///' - if (Tasks.IsDocked = True) then - warnlog "the TaskPane was docked - should have been undocked." - else - printlog "the TaskPane was not docked, good." - Tasks.Dock - end if - Call hCloseDocument + Tasks.Move 15, 15 + + xSize% = Tasks.GetSizeX + ySize% = Tasks.GetSizeY + + xPos% = Tasks.GetPosX + yPos% = Tasks.GetPosY + Tasks.Move 300, 400 + Sleep 1 + Tasks.Move 590, 790 + Sleep 1 + Tasks.Move 10, 10 + Sleep 1 + Tasks.Size 200, 200 + Sleep 1 + Tasks.Size 300, 400 + Sleep 1 + Tasks.Size 150, 250 + Sleep 1 + Tasks.Size xSize%, ySize% + Sleep 1 + + printlog " - Close the TaskPane, reopen it, check if appearence is same as before" + xPos% = Tasks.GetPosX + yPos% = Tasks.GetPosY + xSize% = Tasks.GetSizeX + ySize% = Tasks.GetSizeY + Kontext "DocumentImpress" + ViewTaskPane + ViewTaskPane + Sleep 1 + Kontext "Tasks" + if xPos% <> Tasks.GetPosX then Warnlog "The x-Pos. has changed : Should be -> "+ xPos% + " Is -> "+ Tasks.GetPosX + if yPos% <> Tasks.GetPosY then Warnlog "The y-Pos. has changed : Should be -> "+ yPos% + " Is -> "+ Tasks.GetPosY + if xSize% <> Tasks.GetSizeX then Warnlog "The x-Size has changed : Should be -> "+ xSize% + " Is -> "+ Tasks.GetSizeX + if ySize% <> Tasks.GetSizeY then Warnlog "Die y-Size has changed : Should be -> "+ ySize% + " Is -> "+ Tasks.GetSizeY + + printlog " - dock TaskPane" + Tasks.Dock + Sleep 1 + if (NOT Tasks.IsDocked) then + Warnlog "TaskPane not docked but should be" + end if + if (Tasks.IsDocked) Then + Tasks.UnDock + end if + Sleep 1 + + printlog " - maximize/minimize TaskPane" + Tasks.Minimize + Sleep 1 + Tasks.Maximize + Sleep 1 + if (NOT Tasks.IsMax) then + Warnlog "The Task-docking-window did not return to maximized state" + end if + Tasks.Close + Sleep (1) + Kontext "DocumentImpress" + ViewTaskPane + Sleep (2) + Kontext "Tasks" + if (Tasks.isVisible = false) Then 'isReallyVisible ? + warnlog "the Taskpane wasnt visible" + end if + Tasks.Move xPos%, yPos% + Sleep 1 + if (Tasks.IsDocked = True) then + warnlog "the TaskPane was docked - should have been undocked." + else + printlog "the TaskPane was not docked, good." + Tasks.Dock + end if + Call hCloseDocument endcase 'tiMinimize_Maximize_Docking_TaskPane '------------------------------------------------------------------------------------' @@ -302,111 +248,85 @@ endcase 'tiMinimize_Maximize_Docking_TaskPane testcase tiPaneview_LoadSave_Windowsstate QaErrorLog "#i84057# - tiPaneview_LoadSave_Windowsstate deactivated." goto endsub - Dim xPos% - Dim yPos% - Dim xSize% - Dim ySize% - Dim Filenamex as string - dim applicationchar as string - - Filenamex = ConvertPath (gOfficePath + "user\work\Task-postion") - - printlog "- TaskPane : using all possible things to manipulate the TaskPane" - '/// open application ///' - Call hNewDocument - '/// Check if TaskPane is there. Expected: not there ///' - kontext "Tasks" - if (Tasks.isVisible = false) Then 'isReallyVisible ? - qaErrorLog "- Expected TaskPane to be open; But is closed. Check tests." - sleep 1 - Kontext "DocumentImpress" - ViewTaskPane - else - printlog "TaskPane was open - good." - end if - - Kontext "Tasks" -'Only because of overflow-error when some part of the pane is outside the window. - - '/// if TaskPane is docked; undock ///' - if Tasks.IsDocked then Tasks.UnDock - Sleep (1) - '/// move Tasks to 15,15 ///' - Tasks.Move 15, 15 - - '/// save TaskPane size ///' - xSize% = Tasks.GetSizeX - ySize% = Tasks.GetSizeY - - '/// save TaskPane position and size ///' - xPos% = Tasks.GetPosX - yPos% = Tasks.GetPosY - printlog " - '/// size -TaskPane ///" - '/// change size to 200,200 ///' - Sleep (2) - Tasks.Size 200, 200 - Sleep 1 - printlog " - '/// move TaskPane ///" - '/// move TaskPane to 10,10 ///' - Tasks.Move 10, 10 - printlog " - '/// size -TaskPane ///" - '/// change size to 300,400 ///' - Tasks.Size 300, 400 - Sleep 1 - printlog " - '/// move TaskPane ///" - '/// move TaskPane to 550,690 ///' - Tasks.Move 550, 290 - Sleep 1 - - printlog " - Close the TaskPane, reopen it, check if appearence is same as before" - '/// save TaskPane position and size ///' - xPos% = Tasks.GetPosX - yPos% = Tasks.GetPosY - xSize% = Tasks.GetSizeX - ySize% = Tasks.GetSizeY - - '/// Delete any documents from the past ///' - if Dir(Filenamex)<>"" then app.Kill(Filenamex) ' kill old file - - '/// Save document ///' - call hFileSaveAsKill (Filenamex) '/// save document ///' - printlog "OK saved at ", Filenamex - sleep 1 - - '/// Close the document ///' - Call hCloseDocument - - '/// Open document ///' - hDateiOeffnen (Filenamex + "." + ExtensionString) - - '/// Make sure the TaskPane is open ///' - Kontext "Tasks" - '/// close TaskPane Format->SlidePane ///' - if (Tasks.IsVisible = false) then - warnlog "Taskpanel wasnt visible" - Kontext "DocumentImpress" - ViewTaskPane - Sleep 1 - else - printlog "Taskpanel was visible, good" - end if - - '/// Check if the position is the same or if it has changed ///' - Kontext "Tasks" - if xPos% <> Tasks.GetPosX then Warnlog "The x-Pos. has changed : Should be -> "+ xPos% + " Is -> "+ Tasks.GetPosX - if yPos% <> Tasks.GetPosY then Warnlog "The y-Pos. has changed : Should be -> "+ yPos% + " Is -> "+ Tasks.GetPosY - if xSize% <> Tasks.GetSizeX then Warnlog "The x-Size has changed : Should be -> "+ xSize% + " Is -> "+ Tasks.GetSizeX - if ySize% <> Tasks.GetSizeY then Warnlog "Die y-Size has changed : Should be -> "+ ySize% + " Is -> "+ Tasks.GetSizeY - Sleep (2) - '/// change size back to saved size ///' - Tasks.Size xSize%, ySize% - Sleep 1 - - printlog " - dock TaskPane" - '/// Dock TaskPane ///' - Tasks.Dock - '/// Close Document ///' - Call hCloseDocument + Dim xPos% + Dim yPos% + Dim xSize% + Dim ySize% + Dim Filenamex as string + dim applicationchar as string + + Filenamex = ConvertPath (gOfficePath + "user\work\Task-postion") + + printlog "- TaskPane : using all possible things to manipulate the TaskPane" + Call hNewDocument + kontext "Tasks" + if (Tasks.isVisible = false) Then 'isReallyVisible ? + qaErrorLog "- Expected TaskPane to be open; But is closed. Check tests." + sleep 1 + Kontext "DocumentImpress" + ViewTaskPane + else + printlog "TaskPane was open - good." + end if + + Kontext "Tasks" + 'Only because of overflow-error when some part of the pane is outside the window. + + if Tasks.IsDocked then Tasks.UnDock + Sleep (1) + Tasks.Move 15, 15 + + xSize% = Tasks.GetSizeX + ySize% = Tasks.GetSizeY + + xPos% = Tasks.GetPosX + yPos% = Tasks.GetPosY + Sleep (2) + Tasks.Size 200, 200 + Sleep 1 + Tasks.Move 10, 10 + Tasks.Size 300, 400 + Sleep 1 + Tasks.Move 550, 290 + Sleep 1 + + printlog " - Close the TaskPane, reopen it, check if appearence is same as before" + xPos% = Tasks.GetPosX + yPos% = Tasks.GetPosY + xSize% = Tasks.GetSizeX + ySize% = Tasks.GetSizeY + + if Dir(Filenamex)<>"" then app.Kill(Filenamex) ' kill old file + + printlog "OK saved at ", Filenamex + sleep 1 + + Call hCloseDocument + + hDateiOeffnen (Filenamex + "." + ExtensionString) + + Kontext "Tasks" + if (Tasks.IsVisible = false) then + warnlog "Taskpanel wasnt visible" + Kontext "DocumentImpress" + ViewTaskPane + Sleep 1 + else + printlog "Taskpanel was visible, good" + end if + + Kontext "Tasks" + if xPos% <> Tasks.GetPosX then Warnlog "The x-Pos. has changed : Should be -> "+ xPos% + " Is -> "+ Tasks.GetPosX + if yPos% <> Tasks.GetPosY then Warnlog "The y-Pos. has changed : Should be -> "+ yPos% + " Is -> "+ Tasks.GetPosY + if xSize% <> Tasks.GetSizeX then Warnlog "The x-Size has changed : Should be -> "+ xSize% + " Is -> "+ Tasks.GetSizeX + if ySize% <> Tasks.GetSizeY then Warnlog "Die y-Size has changed : Should be -> "+ ySize% + " Is -> "+ Tasks.GetSizeY + Sleep (2) + Tasks.Size xSize%, ySize% + Sleep 1 + + printlog " - dock TaskPane" + Tasks.Dock + Call hCloseDocument endcase '----------------------------------------------------------------------------------------' @@ -414,110 +334,84 @@ endcase testcase tdPaneview_LoadSave_Windowsstate QaErrorLog "#i84057# - tiPaneview_LoadSave_Windowsstate deactivated." goto endsub - Dim xPos% - Dim yPos% - Dim xSize% - Dim ySize% - Dim Filenamex as string - - Filenamex = ConvertPath (gOfficePath + "user\work\Task-postion") - - printlog "- Pagepane : using all possible things to manipulate the Pagepane" - '/// open application ///' - Call hNewDocument - '/// Check if Pagepane is there. Expected: not there ///' - kontext "Pagepane" - if (Pagepane.isVisible = false) Then 'isReallyVisible ? - qaErrorLog "- Expected Pagepane to be open; But is closed. Check tests." - sleep 1 - Kontext "DocumentDraw" - ViewPagepane - else - printlog "Pagepane was open - good." - end if - -'Only because of overflow-error when some part of the pane is outside the window. - - '/// if Pagepane is docked; undock ///' - if Pagepane.IsDocked then Pagepane.UnDock - - '/// move Pagepane to 15,15 ///' - Pagepane.Move 15, 15 - - - Kontext "Pagepane" - '/// save Pagepane size ///' - xSize% = Pagepane.GetSizeX - ySize% = Pagepane.GetSizeY - - '/// save TaskPane position and size ///' - xPos% = Pagepane.GetPosX - yPos% = Pagepane.GetPosY - printlog " - '/// size -Pagepane ///" - '/// change size to 200,100 ///' - Pagepane.Size 200, 100 - Sleep 1 - printlog " - '/// move Pagepane ///" - '/// move Pagepane to 10,10 ///' - Pagepane.Move 10, 10 - printlog " - '/// size -Pagepane ///" - '/// change size to 300,150 ///' - Pagepane.Size 300, 150 - Sleep 1 - printlog " - '/// move Pagepane ///" - '/// move Pagepane to 550,690 ///' - Pagepane.Move 550, 290 - Sleep 1 - - printlog " - Close the Pagepane, reopen it, check if appearence is same as before" - '/// save Pagepane position and size ///' - xPos% = Pagepane.GetPosX - yPos% = Pagepane.GetPosY - xSize% = Pagepane.GetSizeX - ySize% = Pagepane.GetSizeY - - '/// Delete any documents from the past ///' - if Dir(Filenamex)<>"" then app.Kill(Filenamex) ' kill old file - - '/// Save document ///' - call hFileSaveAsKill (Filenamex) '/// save document ///' - printlog "OK saved at ", Filenamex - sleep 1 - - '/// Close the document ///' - Call hCloseDocument - - '/// Open document ///' - hDateiOeffnen (Filenamex + "." + ExtensionString) - - '/// Make sure the Pagepane is open ///' - Kontext "Pagepane" - '/// close Pagepane Format->SlidePane ///' - if (Pagepane.IsVisible = false) then - warnlog "Pagepane wasnt visible" - Kontext "DocumentDraw" - ViewPagepane - Sleep 1 - else - printlog "Pagepane was visible, good" - end if - - '/// Check if the position is the same or if it has changed ///' - Kontext "Pagepane" - if xPos% <> Pagepane.GetPosX then Warnlog "The x-Pos. has changed : Should be -> "+ xPos% + " Is -> "+ Pagepane.GetPosX - if yPos% <> Pagepane.GetPosY then Warnlog "The y-Pos. has changed : Should be -> "+ yPos% + " Is -> "+ Pagepane.GetPosY - if xSize% <> Pagepane.GetSizeX then Warnlog "The x-Size has changed : Should be -> "+ xSize% + " Is -> "+ Pagepane.GetSizeX - if ySize% <> Pagepane.GetSizeY then Warnlog "Die y-Size has changed : Should be -> "+ ySize% + " Is -> "+ Pagepane.GetSizeY - - '/// change size back to saved size ///' - Pagepane.Size xSize%, ySize% - Sleep 1 - - printlog " - dock Pagepane" - '/// Dock Pagepane ///' - Pagepane.Dock - '/// Close Document ///' - Call hCloseDocument + Dim xPos% + Dim yPos% + Dim xSize% + Dim ySize% + Dim Filenamex as string + + Filenamex = ConvertPath (gOfficePath + "user\work\Task-postion") + + printlog "- Pagepane : using all possible things to manipulate the Pagepane" + Call hNewDocument + kontext "Pagepane" + if (Pagepane.isVisible = false) Then 'isReallyVisible ? + qaErrorLog "- Expected Pagepane to be open; But is closed. Check tests." + sleep 1 + Kontext "DocumentDraw" + ViewPagepane + else + printlog "Pagepane was open - good." + end if + + 'Only because of overflow-error when some part of the pane is outside the window. + + if Pagepane.IsDocked then Pagepane.UnDock + + Pagepane.Move 15, 15 + + + Kontext "Pagepane" + xSize% = Pagepane.GetSizeX + ySize% = Pagepane.GetSizeY + + xPos% = Pagepane.GetPosX + yPos% = Pagepane.GetPosY + Pagepane.Size 200, 100 + Sleep 1 + Pagepane.Move 10, 10 + Pagepane.Size 300, 150 + Sleep 1 + Pagepane.Move 550, 290 + Sleep 1 + + printlog " - Close the Pagepane, reopen it, check if appearence is same as before" + xPos% = Pagepane.GetPosX + yPos% = Pagepane.GetPosY + xSize% = Pagepane.GetSizeX + ySize% = Pagepane.GetSizeY + + if Dir(Filenamex)<>"" then app.Kill(Filenamex) ' kill old file + + printlog "OK saved at ", Filenamex + sleep 1 + + Call hCloseDocument + + hDateiOeffnen (Filenamex + "." + ExtensionString) + + Kontext "Pagepane" + if (Pagepane.IsVisible = false) then + warnlog "Pagepane wasnt visible" + Kontext "DocumentDraw" + ViewPagepane + Sleep 1 + else + printlog "Pagepane was visible, good" + end if + + Kontext "Pagepane" + if xPos% <> Pagepane.GetPosX then Warnlog "The x-Pos. has changed : Should be -> "+ xPos% + " Is -> "+ Pagepane.GetPosX + if yPos% <> Pagepane.GetPosY then Warnlog "The y-Pos. has changed : Should be -> "+ yPos% + " Is -> "+ Pagepane.GetPosY + if xSize% <> Pagepane.GetSizeX then Warnlog "The x-Size has changed : Should be -> "+ xSize% + " Is -> "+ Pagepane.GetSizeX + if ySize% <> Pagepane.GetSizeY then Warnlog "Die y-Size has changed : Should be -> "+ ySize% + " Is -> "+ Pagepane.GetSizeY + + Pagepane.Size xSize%, ySize% + Sleep 1 + + printlog " - dock Pagepane" + Pagepane.Dock + Call hCloseDocument endcase 'tdPaneview_LoadSave_Windowsstate '--------------------------------------------------------------------------------------' @@ -529,141 +423,115 @@ testcase tdMinimize_Maximize_Docking_Pagepane Dim ySize% printlog "- Pagepane : using all possible things to manipulate the Pagepane" - '/// open application ///' Call hNewDocument - '/// Check if TaskPane is there. Expected: not there ///' Kontext "Pagepane" if (Pagepane.isVisible = false) Then 'isReallyVisible ? - qaErrorLog "- Expected Pagepane to be open; But is closed. Check tests." - sleep 1 - Kontext "DocumentDraw" - ViewPagepane + qaErrorLog "- Expected Pagepane to be open; But is closed. Check tests." + sleep 1 + Kontext "DocumentDraw" + ViewPagepane else - printlog "Pagepane was open - good." + printlog "Pagepane was open - good." end if Kontext "Pagepane" -'Only because of overflow-error when some part of the pane is outside the window. + 'Only because of overflow-error when some part of the pane is outside the window. - '/// if Pagepane is docked; undock ///' if Pagepane.IsDocked then Pagepane.UnDock - '/// move Pagepane to 10,10 ///' - Pagepane.Move 10, 10 - Sleep 1 - - '/// save TaskPane position and size ///' - xPos% = Pagepane.GetPosX - yPos% = Pagepane.GetPosY - xSize% = Pagepane.GetSizeX - ySize% = Pagepane.GetSizeY - printlog " - '///move Pagepane ///" - '/// move Pagepane to 300,400 ///' - Pagepane.Move 300, 400 - Sleep 1 - '/// move Pagepane to 590,790 ///' - Pagepane.Move 590, 790 - Sleep 1 - '/// move Pagepane back to saved start position ///' - Pagepane.Move xPos%, yPos% - Sleep 1 - - printlog " - '/// size -Pagepane ///" - '/// change size to 200,200 ///' - Pagepane.Size 200, 200 - Sleep 1 - '/// change size to 300,400 ///' - Pagepane.Size 300, 400 - Sleep 1 - '/// change size to 150,250 ///' - Pagepane.Size 150, 250 - Sleep 1 - '/// change size back to saved size ///' - Pagepane.Size xSize%, ySize% - Sleep 1 - - printlog " - Close the Pagepane, reopen it, check if appearence is same as before" - '/// save TaskPane position and size ///' - xPos% = Pagepane.GetPosX - yPos% = Pagepane.GetPosY - xSize% = Pagepane.GetSizeX - ySize% = Pagepane.GetSizeY - '/// close Pagepane Format->SlidePane ///' - Kontext "DocumentDraw" - ViewPagepane - ViewPagepane - Sleep 1 - Kontext "Pagepane" - '/// open Pagepane Format->TaskPane ///' - if xPos% <> Pagepane.GetPosX then Warnlog "The x-Pos. has changed : Should be -> "+ xPos% + " Is -> "+ Pagepane.GetPosX - if yPos% <> Pagepane.GetPosY then Warnlog "The y-Pos. has changed : Should be -> "+ yPos% + " Is -> "+ Pagepane.GetPosY - if xSize% <> Pagepane.GetSizeX then Warnlog "The x-Size has changed : Should be -> "+ xSize% + " Is -> "+ Pagepane.GetSizeX - if ySize% <> Pagepane.GetSizeY then Warnlog "Die y-Size has changed : Should be -> "+ ySize% + " Is -> "+ Pagepane.GetSizeY - - printlog " - dock Pagepane" - '/// dock Pagepane ///' - Pagepane.Dock - Sleep 1 - if (NOT Pagepane.IsDocked) then - Warnlog "Pagepane not docked but should be" - end if - '/// UNdock Pagepane ///' - if (Pagepane.IsDocked) Then - Pagepane.UnDock - end if - Sleep 1 - - printlog " - maximize/minimize Pagepane" - '/// minimize Pagepane ///' - Pagepane.Minimize - Sleep 1 - '/// Maximize Pagepane ///' - Pagepane.Maximize - Sleep 1 - if (NOT Pagepane.IsMax) then - warnlog "The Pagepane-docking-window did not return to maximized state" - end if - '/// Close Pagepane ///' - Kontext "DocumentDraw" - ViewPagepane - sleep (1) - Kontext "Pagepane" - '/// Make sure the Pagepane was closed ///' - if Pagepane.Exists(5) Then - warnlog "the Pagepane wasnt closed properly" - else - '/// Open the Pagepane ///' - Kontext "DocumentDraw" - ViewPagepane - end if - sleep (1) - Kontext "Pagepane" - '/// Make sure the Pagepane is visible ///' - if (Pagepane.Exists = true) AND (Pagepane.isVisible = false) Then - warnlog "the Pagepane wasnt visible" - end if - - '/// Make sure the Pagepane is docked ///' - if (Pagepane.IsDocked = True) then - warnlog "the Pagepane was docked - should have been undocked." - else - printlog "the Pagepane was not docked, good." - Pagepane.Dock - end if - Call hCloseDocument + Pagepane.Move 10, 10 + Sleep 1 + + xPos% = Pagepane.GetPosX + yPos% = Pagepane.GetPosY + xSize% = Pagepane.GetSizeX + ySize% = Pagepane.GetSizeY + Pagepane.Move 300, 400 + Sleep 1 + Pagepane.Move 590, 790 + Sleep 1 + Pagepane.Move xPos%, yPos% + Sleep 1 + + Pagepane.Size 200, 200 + Sleep 1 + Pagepane.Size 300, 400 + Sleep 1 + Pagepane.Size 150, 250 + Sleep 1 + Pagepane.Size xSize%, ySize% + Sleep 1 + + printlog " - Close the Pagepane, reopen it, check if appearence is same as before" + xPos% = Pagepane.GetPosX + yPos% = Pagepane.GetPosY + xSize% = Pagepane.GetSizeX + ySize% = Pagepane.GetSizeY + Kontext "DocumentDraw" + ViewPagepane + ViewPagepane + Sleep 1 + Kontext "Pagepane" + if xPos% <> Pagepane.GetPosX then Warnlog "The x-Pos. has changed : Should be -> "+ xPos% + " Is -> "+ Pagepane.GetPosX + if yPos% <> Pagepane.GetPosY then Warnlog "The y-Pos. has changed : Should be -> "+ yPos% + " Is -> "+ Pagepane.GetPosY + if xSize% <> Pagepane.GetSizeX then Warnlog "The x-Size has changed : Should be -> "+ xSize% + " Is -> "+ Pagepane.GetSizeX + if ySize% <> Pagepane.GetSizeY then Warnlog "Die y-Size has changed : Should be -> "+ ySize% + " Is -> "+ Pagepane.GetSizeY + + printlog " - dock Pagepane" + Pagepane.Dock + Sleep 1 + if (NOT Pagepane.IsDocked) then + Warnlog "Pagepane not docked but should be" + end if + if (Pagepane.IsDocked) Then + Pagepane.UnDock + end if + Sleep 1 + + printlog " - maximize/minimize Pagepane" + Pagepane.Minimize + Sleep 1 + Pagepane.Maximize + Sleep 1 + if (NOT Pagepane.IsMax) then + warnlog "The Pagepane-docking-window did not return to maximized state" + end if + Kontext "DocumentDraw" + ViewPagepane + sleep (1) + Kontext "Pagepane" + if Pagepane.Exists(5) Then + warnlog "the Pagepane wasnt closed properly" + else + Kontext "DocumentDraw" + ViewPagepane + end if + sleep (1) + Kontext "Pagepane" + if (Pagepane.Exists = true) AND (Pagepane.isVisible = false) Then + warnlog "the Pagepane wasnt visible" + end if + + if (Pagepane.IsDocked = True) then + warnlog "the Pagepane was docked - should have been undocked." + else + printlog "the Pagepane was not docked, good." + Pagepane.Dock + end if + Call hCloseDocument endcase 'tdMinimize_Maximize_Docking_Pagepane '--------------------------------------------------------------------------------------' 'TODO FHA : testcase tClick_everywhere ' Call hNewDocument ' Kontext "LayerTabBar" - 'Click everywhere +'Click everywhere - 'Draw: - 'Page Pane +'Draw: +'Page Pane - 'Imp: - 'Slides:SlidesControl +'Imp: +'Slides:SlidesControl ' kontext "Slides" ' SlidesControl.MouseClick ' kontext "Tasks" diff --git a/testautomation/graphics/optional/includes/global/g_paragraph.inc b/testautomation/graphics/optional/includes/global/g_paragraph.inc index 63a83ae0829f..707ebaba85c8 100755 --- a/testautomation/graphics/optional/includes/global/g_paragraph.inc +++ b/testautomation/graphics/optional/includes/global/g_paragraph.inc @@ -47,10 +47,8 @@ testcase tdFormatParagraph dim iTemp as integer iCount = 0 - '/// open application ///' Call hNewDocument - printlog "'/// - save states ///" ' ToolsOptions hToolsOptions (gApplication,"General") iTemp = Masseinheit.GetSelIndex @@ -58,7 +56,6 @@ testcase tdFormatParagraph Kontext "ExtrasOptionenDlg" ExtrasOptionenDlg.OK - '/// call Format->Paragraph & set some values on 'indents and spacing' ///' FormatParagraph Kontext Active.SetPage TabEinzuegeUndAbstaende @@ -87,143 +84,134 @@ testcase tdFormatParagraph sTemp(4) = Oben.getText sTemp(5) = Unten.getText TabEinzuegeUndAbstaende.OK - '///+ close dialog ///' - '///+ call Format->Paragraph again and check values ///' FormatParagraph Kontext Active.SetPage TabEinzuegeUndAbstaende Kontext "TabEinzuegeUndAbstaende" if LiberalMeasurement(VonLinks.GetText, sTemp(1)) <> TRUE Then WarnLog "Value changed VonLinks is: '" + VonLinks.GetText + "' should: '" + sTemp(1) +"'" - if LiberalMeasurement(VonRechts.GetText, sTemp(2)) <> TRUE Then WarnLog "Value changed VonRechts is: '" + VonRechts.GetText + "' should: '" + sTemp(2) +"'" - if LiberalMeasurement(ErsteZeile.GetText, sTemp(3)) <> TRUE Then WarnLog "Value changed ErsteZeile is: '" + ErsteZeile.GetText + "' should: '" + sTemp(3) +"'" - if LiberalMeasurement(Oben.GetText, sTemp(4)) <> TRUE Then WarnLog "Value changed Oben is: '" + Oben.GetText + "' should: '" + sTemp(4) +"'" - if LiberalMeasurement(Unten.GetText, sTemp(5)) <> TRUE Then WarnLog "Value changed Unten is: '" + Unten.GetText + "' should: '" + sTemp(5) +"'" + if LiberalMeasurement(VonRechts.GetText, sTemp(2)) <> TRUE Then WarnLog "Value changed VonRechts is: '" + VonRechts.GetText + "' should: '" + sTemp(2) +"'" + if LiberalMeasurement(ErsteZeile.GetText, sTemp(3)) <> TRUE Then WarnLog "Value changed ErsteZeile is: '" + ErsteZeile.GetText + "' should: '" + sTemp(3) +"'" + if LiberalMeasurement(Oben.GetText, sTemp(4)) <> TRUE Then WarnLog "Value changed Oben is: '" + Oben.GetText + "' should: '" + sTemp(4) +"'" + if LiberalMeasurement(Unten.GetText, sTemp(5)) <> TRUE Then WarnLog "Value changed Unten is: '" + Unten.GetText + "' should: '" + sTemp(5) +"'" - '///+ try to activate the metric field for line spacing, has to work for the last 3 of 6 entries !///' - Zaehler=Zeilenabstand.GetItemCount - for a=1 to Zaehler - Zeilenabstand.Select a - sIndent = Zeilenabstand.GetSelText - sleep 1 - try - ' if um.IsEnabled then printlog "## UM##" - ' if von.IsEnabled then printlog "##VON##" - if (von.IsEnabled and um.IsEnabled) then printlog "##VON#### UM## !!!!! :-(" - if von.IsEnabled then - sIndentValue = von.GetText - von.More - sleep 1 - if sIndentValue = von.GetText then - warnlog "value didn't change :-( : '"+sIndent +"'" - else - printlog "value changed :-) '"+sIndent +"'" - endif - iCount = iCount+1 - else - if um.IsEnabled then - sIndentValue = Um.GetText - Um.More - sleep 1 - if sIndentValue = Um.GetText then - warnlog "value didn't change :-( : '"+sIndent +"'" - else - printlog "value changed :-) '"+sIndent +"'" - endif - iCount = iCount+1 - else - printlog "value not changeable :-? '"+sIndent +"'" - endif - endif - catch - warnLog "BIGERROR :-(" - endcatch - printlog "----------------------------------------------------------------------------------------" - sleep 1 - TabEinzuegeUndAbstaende.OK - sleep 1 - FormatParagraph - Kontext - Active.SetPage TabEinzuegeUndAbstaende - Kontext "TabEinzuegeUndAbstaende" - next a - if iCount <> 3 then warnlog "Could only activate "+ iCount + " out of "+Zaehler +" vlauefields :-(" - TabeinzuegeUndAbstaende.OK + Zaehler=Zeilenabstand.GetItemCount + for a=1 to Zaehler + Zeilenabstand.Select a + sIndent = Zeilenabstand.GetSelText + sleep 1 + try + ' if um.IsEnabled then printlog "## UM##" + ' if von.IsEnabled then printlog "##VON##" + if (von.IsEnabled and um.IsEnabled) then printlog "##VON#### UM## !!!!! :-(" + if von.IsEnabled then + sIndentValue = von.GetText + von.More + sleep 1 + if sIndentValue = von.GetText then + warnlog "value didn't change :-( : '"+sIndent +"'" + else + printlog "value changed :-) '"+sIndent +"'" + endif + iCount = iCount+1 + else + if um.IsEnabled then + sIndentValue = Um.GetText + Um.More + sleep 1 + if sIndentValue = Um.GetText then + warnlog "value didn't change :-( : '"+sIndent +"'" + else + printlog "value changed :-) '"+sIndent +"'" + endif + iCount = iCount+1 + else + printlog "value not changeable :-? '"+sIndent +"'" + endif + endif + catch + warnLog "BIGERROR :-(" + endcatch + printlog "----------------------------------------------------------------------------------------" + sleep 1 + TabEinzuegeUndAbstaende.OK + sleep 1 + FormatParagraph + Kontext + Active.SetPage TabEinzuegeUndAbstaende + Kontext "TabEinzuegeUndAbstaende" + next a + if iCount <> 3 then warnlog "Could only activate "+ iCount + " out of "+Zaehler +" vlauefields :-(" + TabeinzuegeUndAbstaende.OK - '/// call Format->Paragraph & set some values on 'alignment' ///' - '///+ check button, close dialog, open again, check if the button is stioll selected ///' - '///+ do it for all four buttons: left, right, center, justified ///' - FormatParagraph - Kontext - Active.SetPage TabAusrichtungAbsatz - Kontext "TabAusrichtungAbsatz" + FormatParagraph + Kontext + Active.SetPage TabAusrichtungAbsatz + Kontext "TabAusrichtungAbsatz" - Links.Check - TabAusrichtungAbsatz.OK - FormatParagraph - Kontext - Active.SetPage TabAusrichtungAbsatz - Kontext "TabAusrichtungAbsatz" - if Links.IsChecked=False Then WarnLog " Button 'left' is not activated" + Links.Check + TabAusrichtungAbsatz.OK + FormatParagraph + Kontext + Active.SetPage TabAusrichtungAbsatz + Kontext "TabAusrichtungAbsatz" + if Links.IsChecked=False Then WarnLog " Button 'left' is not activated" - Rechts.Check - TabAusrichtungAbsatz.OK - FormatParagraph - Kontext - Active.SetPage TabAusrichtungAbsatz - Kontext "TabAusrichtungAbsatz" - if Rechts.IsChecked=False Then WarnLog " Button 'right' is not activated" + Rechts.Check + TabAusrichtungAbsatz.OK + FormatParagraph + Kontext + Active.SetPage TabAusrichtungAbsatz + Kontext "TabAusrichtungAbsatz" + if Rechts.IsChecked=False Then WarnLog " Button 'right' is not activated" - Zentriert.Check - TabAusrichtungAbsatz.OK - FormatParagraph - Kontext - Active.SetPage TabAusrichtungAbsatz - Kontext "TabAusrichtungAbsatz" - if Zentriert.IsChecked=False Then WarnLog " Button 'center' is not activated" + Zentriert.Check + TabAusrichtungAbsatz.OK + FormatParagraph + Kontext + Active.SetPage TabAusrichtungAbsatz + Kontext "TabAusrichtungAbsatz" + if Zentriert.IsChecked=False Then WarnLog " Button 'center' is not activated" - Blocksatz.Check - TabAusrichtungAbsatz.OK - FormatParagraph - Kontext - Active.SetPage TabAusrichtungAbsatz - Kontext "TabAusrichtungAbsatz" - if Blocksatz.IsChecked=False Then WarnLog " Button 'justified' is not activated" - TabAusrichtungAbsatz.OK + Blocksatz.Check + TabAusrichtungAbsatz.OK + FormatParagraph + Kontext + Active.SetPage TabAusrichtungAbsatz + Kontext "TabAusrichtungAbsatz" + if Blocksatz.IsChecked=False Then WarnLog " Button 'justified' is not activated" + TabAusrichtungAbsatz.OK - '/// call Format->Paragraph & set some values on 'tabs' ///' - FormatParagraph - Kontext - Active.SetPage TabTabulator - Kontext "TabTabulator" - SetClipboard Position.GetItemCount - Position.SetText "1" - Neu.Click - Position.SetText "2" - Neu.Click - Position.SetText "3" - Neu.Click - TabTabulator.OK - FormatParagraph - Kontext - Active.SetPage TabTabulator - Kontext "TabTabulator" - if GetClipboardText + 3 = Position.GetItemCount Then PrintLog " positions added" - Loeschen.Click - if Position.GetItemCount="3" Then - WarnLog " Delete does not work" - else - Printlog " TAll ran well in TabTabulator" - end if - TabTabulator.OK + FormatParagraph + Kontext + Active.SetPage TabTabulator + Kontext "TabTabulator" + SetClipboard Position.GetItemCount + Position.SetText "1" + Neu.Click + Position.SetText "2" + Neu.Click + Position.SetText "3" + Neu.Click + TabTabulator.OK + FormatParagraph + Kontext + Active.SetPage TabTabulator + Kontext "TabTabulator" + if GetClipboardText + 3 = Position.GetItemCount Then PrintLog " positions added" + Loeschen.Click + if Position.GetItemCount="3" Then + WarnLog " Delete does not work" + else + Printlog " TAll ran well in TabTabulator" + end if + TabTabulator.OK - printlog "'/// - Reset states back to what they were before ///"' - ToolsOptions - hToolsOptions (gApplication,"General") - Masseinheit.Select iTemp - if ( Masseinheit.GetSelIndex <> iTemp ) then WarnLog "Unit of Measurement state were NOT changed back" - Kontext "ExtrasOptionenDlg" - ExtrasOptionenDlg.OK + ToolsOptions + hToolsOptions (gApplication,"General") + Masseinheit.Select iTemp + if ( Masseinheit.GetSelIndex <> iTemp ) then WarnLog "Unit of Measurement state were NOT changed back" + Kontext "ExtrasOptionenDlg" + ExtrasOptionenDlg.OK - '/// close application ///' - Call hCloseDocument + Call hCloseDocument endcase diff --git a/testautomation/graphics/optional/includes/global/g_print.inc b/testautomation/graphics/optional/includes/global/g_print.inc index 7339c105f3b2..21bad45dc420 100755 --- a/testautomation/graphics/optional/includes/global/g_print.inc +++ b/testautomation/graphics/optional/includes/global/g_print.inc @@ -1,7 +1,7 @@ 'encoding UTF-8 Do not remove or change this line! '************************************************************************** '* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. -'* +'* '* Copyright 2008 by Sun Microsystems, Inc. '* '* OpenOffice.org - a multi-platform office productivity suite @@ -40,135 +40,125 @@ '\************************************************************************************* testcase tFilePrint - Call hNewDocument - - '/// Inserting test text - printlog "Inserting testtext." - hTextrahmenErstellen ("This is an automated print test with testtool for GRAPHICS ",90,90,80,10) - hTextrahmenErstellen ("Version : "+ gVersionsnummer + " / " + gLanguage,80,90,70,10) - hTextrahmenErstellen ("Date / Time : "+ Date + " / " + Time,70,90,60,10) - hTextrahmenErstellen ("Machine / User: " + gPCName + " " + gUser,60,90,50,10) - - '/// starting printing dialog - printlog "Opening print Dialog." - FilePrint - kontext - if active.exists(2) then - active.ok - qaerrorlog "There is no printer available - please install one on your system!" - endif - sleep 2 - Kontext "DruckenDlg" - - - ' Not yet active since this feature is not build into the master: i85355 - '/// Checking Options for impress, PrintContentBox -' printlog "Checking options for impress..." -' if (gApplication = "IMPRESS") then -' if PrintContent.GetSelIndex <> 1 then -' warnlog "Not first entry selected!" -' else -' printlog " First entry selected." -' endif -' -' if PrintContent.GetItemCount <> 4 then -' warnlog "Entry-number of PrintContent listbox is wrong!" -' else -' printlog "Entry-number of PrintContent listbox is 4." -' endif -' -' '/// checking SlidesPerPage -' PrintContent.Select 2 -' if SlidesPerPage.IsEnabled then -' printlog "SlidesPerPage active." -' else -' warnlog "SlidesPerPage did not get active!" -' endif -' -' '/// Checking Order RadioButtons -' VerticalOrder.Check -' printlog "Vertical checked." -' HorizontalOrder.Check -' printlog "Horizontal checked again." -' -' else -' printlog "This is not impress, so no further print content testing." -' endif - - '/// Opening options dialog + Call hNewDocument + + printlog "Inserting testtext." + hTextrahmenErstellen ("This is an automated print test with testtool for GRAPHICS ",90,90,80,10) + hTextrahmenErstellen ("Version : "+ gVersionsnummer + " / " + gLanguage,80,90,70,10) + hTextrahmenErstellen ("Date / Time : "+ Date + " / " + Time,70,90,60,10) + hTextrahmenErstellen ("Machine / User: " + gPCName + " " + gUser,60,90,50,10) + + printlog "Opening print Dialog." + FilePrint + kontext + if active.exists(2) then + active.ok + qaerrorlog "There is no printer available - please install one on your system!" + endif + sleep 2 + Kontext "DruckenDlg" + + + ' Not yet active since this feature is not build into the master: i85355 + ' printlog "Checking options for impress..." + ' if (gApplication = "IMPRESS") then + ' if PrintContent.GetSelIndex <> 1 then + ' warnlog "Not first entry selected!" + ' else + ' printlog " First entry selected." + ' endif + ' + ' if PrintContent.GetItemCount <> 4 then + ' warnlog "Entry-number of PrintContent listbox is wrong!" + ' else + ' printlog "Entry-number of PrintContent listbox is 4." + ' endif + ' + ' PrintContent.Select 2 + ' if SlidesPerPage.IsEnabled then + ' printlog "SlidesPerPage active." + ' else + ' warnlog "SlidesPerPage did not get active!" + ' endif + ' + ' VerticalOrder.Check + ' printlog "Vertical checked." + ' HorizontalOrder.Check + ' printlog "Horizontal checked again." + ' + ' else + ' printlog "This is not impress, so no further print content testing." + ' endif + printlog "Opening Options dialog." Zusaetze.Click sleep 1 Kontext "DruckerZusaetzeDraw" - - '/// Checking brochure printing + printlog "Checking brochure printing." if Prospekt.IsChecked then warnlog "Somebody forgot to uncheck the prospect printing!" - Standard.Check + Standard.Check else printlog "Brochure printing is checked." endif - - - '/// Checking additional options + + Seitenname.Check Datum.Check Zeit.Check AusgeblendeteSeiten.Check SeitengroesseAnpassen.Check AusDruckereinstellung.Check - - '/// Opening dialog again for checking settings + DruckerZusaetzeDraw.OK Kontext "DruckenDlg" Zusaetze.Click sleep 2 Kontext "DruckerZusaetzeDraw" - if NOT Seitenname.IsChecked Then + if NOT Seitenname.IsChecked Then warnlog " - Page name not checked" else printlog "Page name checked." endif - + if NOT Datum.IsChecked Then - warnlog " - Date not checked" + warnlog " - Date not checked" else printlog "Date is checked." endif - + if NOT Zeit.IsChecked Then - warnlog " - Time not checked" + warnlog " - Time not checked" else printlog "Time is checked." endif - + if NOT AusgeblendeteSeiten.IsChecked Then - warnlog " - Hidden pages not checked" + warnlog " - Hidden pages not checked" else printlog "Hidden pages checked." endif - + if NOT SeitengroesseAnpassen.IsChecked Then - warnlog " - Fit to page not checked" + warnlog " - Fit to page not checked" else printlog "Fit to page checked." endif - + if NOT AusDruckereinstellung.IsChecked Then - warnlog " - Paper tray from printer settings not checked" + warnlog " - Paper tray from printer settings not checked" else printlog "Paper tray checked." endif - + AusDruckereinstellung.UnCheck Standard.Check DruckerZusaetzeDraw.OK Kontext "DruckenDlg" DruckenDlg.Cancel Sleep 5 - - '/// Close document ///' + Call hCloseDocument endcase diff --git a/testautomation/graphics/optional/includes/global/g_savepictureas.inc b/testautomation/graphics/optional/includes/global/g_savepictureas.inc index 240c7355da1a..6192338dbf9b 100755 --- a/testautomation/graphics/optional/includes/global/g_savepictureas.inc +++ b/testautomation/graphics/optional/includes/global/g_savepictureas.inc @@ -1,7 +1,7 @@ 'encoding UTF-8 Do not remove or change this line! '************************************************************************** '* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. -'* +'* '* Copyright 2008 by Sun Microsystems, Inc. '* '* OpenOffice.org - a multi-platform office productivity suite @@ -43,773 +43,717 @@ '\*********************************************************************** testcase tContextSaveAsPicture - Dim Counter as integer - Dim CounterShouldBe as integer - Dim SavedOrgPosition as integer - Dim i as integer - Dim q as integer - Dim iFileSize(50) as Long - Dim FileList(50) as String - Dim FileList2(50) as string - Dim Filesize1 as Long - Dim Filesize2 as Long - Dim Filename, LastFilterName as String - Dim Filetype as String - Dim OrgFile as String - Dim NewFile as String - Dim OrgFileDir as String - Dim NewFileDir as String - Dim Testsize as Boolean - - OrgFileDir = ConvertPath ( gTesttoolPath + "graphics\required\input\SaveAsPicture\" ) - NewFileDir = ConvertPath ( gOfficePath + "user\work\SaveAsPicture\" ) - - '/// Create directory if not exists and delete the content ///' + Dim Counter as integer + Dim CounterShouldBe as integer + Dim SavedOrgPosition as integer + Dim i as integer + Dim q as integer + Dim iFileSize(50) as Long + Dim FileList(50) as String + Dim FileList2(50) as string + Dim Filesize1 as Long + Dim Filesize2 as Long + Dim Filename, LastFilterName as String + Dim Filetype as String + Dim OrgFile as String + Dim NewFile as String + Dim OrgFileDir as String + Dim NewFileDir as String + Dim Testsize as Boolean + + OrgFileDir = ConvertPath ( gTesttoolPath + "graphics\required\input\SaveAsPicture\" ) + NewFileDir = ConvertPath ( gOfficePath + "user\work\SaveAsPicture\" ) + app.mkDir (NewFileDir) sleep 3 FileList2(0) = 0 GetFileList ((ConvertPath (NewFileDir)), "*.*" , FileList2() ) sleep 1 if (KillFileList (FileList2()) <> TRUE) then - for i = 1 to ListCount2 (FileList2()) - Warnlog "File Not deleted: " + i + ": '" + FileList2(i) + "'" - next i + for i = 1 to ListCount2 (FileList2()) + Warnlog "File Not deleted: " + i + ": '" + FileList2(i) + "'" + next i endif - '/// Open a new Draw or Impress doc. ///' Call hNewDocument setClipboard(" ") sleep 2 - '/// Insert->Graphic From File ///' InsertGraphicsFromFile Kontext "GrafikEinfuegenDlg" Counter = Dateityp.GetItemCount - '/// Go to directory ///' Pfad.SetText OrgFileDir Pfad.TypeKeys ("") Kontext "Active" if Active.Exists then - warnlog "Error when going to the directory " + OrgFileDir + ". Active: " + Active.GetText - Active.OK + warnlog "Error when going to the directory " + OrgFileDir + ". Active: " + Active.GetText + Active.OK endif Kontext "GrafikEinfuegenDlg" - '/// Check how many File-Formats the dialouge has. If zero, write warning into the log. ///' if Dateityp.GetItemCount > 0 then - Printlog "The ImportGraphic-Dialogue has " + Dateityp.GetItemCount + " File-types." + Printlog "The ImportGraphic-Dialogue has " + Dateityp.GetItemCount + " File-types." else - Warnlog "The ImportGraphic-Dialogue doesn't have any File-types listed" + Warnlog "The ImportGraphic-Dialogue doesn't have any File-types listed" endif - '/// Check that other Formats are visible and can be selected ///' for i = 2 to Dateityp.GetItemCount 'Get the number of entries. Printlog " *-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-* " - '/// Go to the directory with the original-files ///' Pfad.SetText OrgFileDir Pfad.TypeKeys ("") Kontext "Active" if Active.Exists then - warnlog "Error when going to the directory " + OrgFileDir + ". Active: " + Active.GetText - Active.OK + warnlog "Error when going to the directory " + OrgFileDir + ". Active: " + Active.GetText + Active.OK endif Kontext "GrafikEinfuegenDlg" if Dateityp.GetItemCount < 1 then - Warnlog "Only one or none selectable fileformats." + Warnlog "Only one or none selectable fileformats." endif Dateityp.Select i Filetype = Dateityp.GetSelText Filetype = left(Right(Dateityp.GetSelText,4),3) - '/// Choose the first file-format available in the dialogue ///' - DateiAuswahl.TypeKeys "" - DateiAuswahl.TypeKeys "" - if DateiAuswahl.GetItemCount < 1 then + DateiAuswahl.TypeKeys "" + DateiAuswahl.TypeKeys "" + if DateiAuswahl.GetItemCount < 1 then warnlog "The file with the extension " + Filetype + " does not exist. Please inform FHA." - else - printlog "Selected: " + DateiAuswahl.GetSelText - '/// Choose the existing file. Check the size ///' - Filename = Dateiname.GetSelText - OrgFile = ConvertPath (OrgFileDir + Dateiname.GetSelText) - printlog " File is: " + OrgFile - - iFileSize(i) = app.FileLen(OrgFile) - printlog " The filesize was: " + iFileSize(i) - - '/// Check if there are any other file of the same kind ///' - DateiAuswahl.TypeKeys "",true - if DateiAuswahl.GetSelText <> Filename then + else + printlog "Selected: " + DateiAuswahl.GetSelText + Filename = Dateiname.GetSelText + OrgFile = ConvertPath (OrgFileDir + Dateiname.GetSelText) + printlog " File is: " + OrgFile + + iFileSize(i) = app.FileLen(OrgFile) + printlog " The filesize was: " + iFileSize(i) + + DateiAuswahl.TypeKeys "",true + if DateiAuswahl.GetSelText <> Filename then warnlog "More than one file with the same extension. Contact Test-Administrator." - endif + endif - '/// If "Link" is checked: Uncheck it and press "Open". ///' - if Link.IsChecked = true then + if Link.IsChecked = true then Link.UnCheck - endif + endif - '/// If file exist: Press "Open". ///' - Oeffnen.Click + Oeffnen.Click - '/// Select all ///' - if (gApplication = "IMPRESS") then + if (gApplication = "IMPRESS") then Kontext "DocumentImpress" - else + else Kontext "DocumentDraw" - endif - EditSelectall - - '/// Check Context-entry for the marked object ///' - '/// The context menu must contain the "save as picture..." entry at 4th position from bottom. (Check it) ///' - '/// Use the Context-Menu 'Save As Picture' ///' - hOpenContextMenu - if (gApplication = "IMPRESS") then + endif + EditSelectall + + hOpenContextMenu + if (gApplication = "IMPRESS") then Kontext "DocumentImpress" DocumentImpress.OpenContextMenu true WaitSlot(1000) - if hMenuFindSelect(27353, true, (MenuGetItemCount - 4), true) = false then - Warnlog "Context-Menu-entry `SaveAsGraphics` was not found. Therefore the test ends." - Call hCloseDocument - Goto Endsub + if hMenuFindSelect(27353, true, (MenuGetItemCount - 4), true) = false then + Warnlog "Context-Menu-entry `SaveAsGraphics` was not found. Therefore the test ends." + Call hCloseDocument + Goto Endsub endif - else 'Should be Draw + else 'Should be Draw Kontext "DocumentDraw" DocumentDraw.OpenContextMenu true WaitSlot(1000) if hMenuFindSelect(27353, true, (MenuGetItemCount - 4), true) = false then - Warnlog "Context-Menu-entry `SaveAsGraphics` was not found. Therefore the test ends." - Call hCloseDocument - Goto Endsub + Warnlog "Context-Menu-entry `SaveAsGraphics` was not found. Therefore the test ends." + Call hCloseDocument + Goto Endsub endif - endif - sleep 1 + endif + sleep 1 - Kontext "ExportierenDlg" - if ExportierenDlg.IsVisible then + Kontext "ExportierenDlg" + if ExportierenDlg.IsVisible then Printlog " 'Save As Picture' came up correctly when using the Context-menu." - endif - - '/// The Dialogue should now be open ///' - Kontext "ExportierenDlg" 'SaveAsDialogue - - Testsize = false - SavedOrgPosition = Dateityp.GetSelIndex - select case left(lcase(Dateityp.GetSelText),3) 'Filetype - case "png" : if (Filetype = "png") OR (Filetype = "psd") OR (Filetype = "pcx") OR (Filetype = "xbm") OR (Filetype = "ras") OR (Filetype = "pbm") OR (Filetype = "pcd") OR (Filetype = "pgm") OR (Filetype = "bmp") OR (Filetype = "ppm") OR (Filetype = "sgf") OR (Filetype = "xpm") OR (Filetype = "tga") then - printlog " " + Filetype + " will be saved as png, correct." - CounterShouldBe = 17 - else - warnlog "Png should not have been selected when we opened a '" + Filetype + "'-file." - endif - case "svm" : if (Filetype = "svm") OR (Filetype = "dxf") OR (Filetype = "eps") OR (Filetype = "sgv") then - printlog " " + Filetype + " will be saved as Svm, correct." - CounterShouldBe = 17 - else - warnlog "Svm should not have been selected when we opened a '" + Filetype + "'-file." - endif - case "wmf" : if (Filetype = "wmf") OR (Filetype = "emf") then - printlog " " + Filetype + " will be saved as Wmf, correct." - CounterShouldBe = 17 - if Filetype = "wmf" then Testsize = true - else - warnlog "Wmf should not have been selected when we opened a '" + Filetype + "'-file." - endif - case "jpe" : if (Filetype = "jpg") OR Filetype = "jif" OR Filetype = "peg" then - printlog " " + Filetype + " will be saved as Jpg, correct." - CounterShouldBe = 17 - if Filetype = "jpg" then Testsize = true - else - warnlog "Jpg should not have been selected when we opened a '" + Filetype + "'-file." - endif - case "tif" : if Filetype = "tif" OR Filetype = "iff" then - printlog " " + Filetype + " will be saved as Tiff, correct." - CounterShouldBe = 17 - if Filetype = "tif" then Testsize = true - else - warnlog "Tif should not have been selected when we opened a '" + Filetype + "'-file." - endif - case "sgf" : if (Filetype = "sgv") OR (Filetype = "sgf") then - printlog " " + Filetype + " will be saved as Sgf, correct." - CounterShouldBe = 17 - if Filetype = "sgf" then Testsize = true - else - warnlog "Sgf should not have been selected when we opened a '" + Filetype + "'-file." - endif - case "gif" : if (Filetype = "gif") then - printlog " " + Filetype + " will be saved as Gif, correct." - CounterShouldBe = 17 - if Filetype = "gif" then Testsize = true - else - warnlog "Gif should not have been selected when we opened a '" + Filetype + "'-file." - endif - case "met" : if (Filetype = "met") then - printlog " " + Filetype + " will be saved as Met, correct." - CounterShouldBe = 17 - if Filetype = "met" then Testsize = true - else - warnlog "Met should not have been selected when we opened a '" + Filetype + "'-file." - endif - case "pct" : if (Filetype = "pct") OR (Filetype = "ict") then - printlog " " + Filetype + " will be saved as Pct, correct." - CounterShouldBe = 17 - if Filetype = "pct" then Testsize = true - else - warnlog "Pct should not have been selected when we opened a '" + Filetype + "'-file." - endif - case else : qaerrorlog " The test has not yet been fitted for this format ( " + Filetype + "). Contact FHA." - '/// Check the size ///' - printlog " But will be saved as: " + left(lcase(Dateityp.GetSelText),3) - CounterShouldBe = 18 - Testsize = true - end select - - '..........................................................................................................................' - - '/// Check if all other formats are there, and if they are selectable. ///' - Dateityp.TypeKeys "" - if (Dateityp.GetItemCount) = CounterShouldBe then 'Counter - 10 - for q = 1 to CounterShouldBe - 1 - LastFilterName = Dateityp.GetSelIndex - Dateityp.TypeKeys "" - if Dateityp.GetSelIndex = LastFilterName then - warnlog " Check the export-filters when trying to save a " + Filename + "-file. Exiting test." - goto endsub - endif - next q - else - warnlog "Dateityp.GetItemCount = " + (Dateityp.GetItemCount) + " CounterShouldBe = " + CounterShouldBe - endif + endif - Dateityp.Select SavedOrgPosition - - '/// Save the file as the same name and file-type, as it was opened ///' - Dateiname.SetText ( NewFileDir ) - Dateiname.TypeKeys ("") - - kontext "Active" - if Active.Exists then 'Could not find directory. - warnlog "Error when going to the directory " + NewFileDir + ". Active: " + Active.GetText - warnlog "ABORTING TESTCASE. PLEASE INFORM TESTPROGRAMMER." - Active.OK - kontext "GrafikEinfuegenDlg" - GrafikEinfuegenDlg.Close - goto Endsub - endif - Kontext "ExportierenDlg" - - sleep 1 - Dateiname.SetText ConvertPath ( NewFileDir + "SaveAsPicture") - NewFile = ConvertPath ( NewFileDir + "SaveAsPicture" + "." + left(lcase(Dateityp.GetSelText),3) ) - Dateiname.TypeKeys ("") - Kontext "Active" - if Active.Exists then 'either could not find directory, or overwrite. - Active.Yes ' Overwrite? - endif - - '/// IF it was saved in the same format as it was opened as, - '/// compare the size of the old and the new file ///' - '/// The selected picture must get exported without compression if the default is the same as the inserted picture. ///' - '/// It must have the same size as the original. ///' - if Testsize = true then - if NewFile <> "" then - Filesize1 = iFileSize(i) - printlog " Saved file-size was: " + app.FileLen(NewFile) - Filesize2 = app.FileLen(NewFile) - endif - endif + Kontext "ExportierenDlg" 'SaveAsDialogue - if (Testsize = true) then - if (Filesize1 < (Filesize2*0.95)) OR (Filesize1 > (Filesize2*1.05)) then - warnlog "Format '" + right(NewFile,3) + "' was NOT saved properly. Org-Size: '" + Filesize1 + "' Saved-Size: '" + Filesize2 + "'." - else - printlog " The Format '" + right(NewFile,3) + "' was saved correctly." - endif + Testsize = false + SavedOrgPosition = Dateityp.GetSelIndex + select case left(lcase(Dateityp.GetSelText),3) 'Filetype + case "png" : if (Filetype = "png") OR (Filetype = "psd") OR (Filetype = "pcx") OR (Filetype = "xbm") OR (Filetype = "ras") OR (Filetype = "pbm") OR (Filetype = "pcd") OR (Filetype = "pgm") OR (Filetype = "bmp") OR (Filetype = "ppm") OR (Filetype = "sgf") OR (Filetype = "xpm") OR (Filetype = "tga") then + printlog " " + Filetype + " will be saved as png, correct." + CounterShouldBe = 17 + else + warnlog "Png should not have been selected when we opened a '" + Filetype + "'-file." endif - '/// Remove all in the Document. (Impress/Draw) ///' - if (gApplication = "IMPRESS") then - Kontext "DocumentImpress" - else - Kontext "DocumentDraw" - endif - hTypeKeys "" - '/// Open the next file via Insert->Graphics From File ///' - call hCloseDocument - call hNewDocument - InsertGraphicsFromFile - Kontext "GrafikEinfuegenDlg" - if GrafikEinfuegenDlg.exists(5) then - printlog " The Insertgraphics-dialogue showed up correctly." - sleep (5) - else - warnlog " The Insertgraphics-dialogue didn't show up." - endif - endif - next i - GrafikEinfuegenDlg.Close - - '/// When everything is finished, delete the content in the created directory. ///' - GetFileList (NewFileDir, "*.*" , FileList() ) + case "svm" : if (Filetype = "svm") OR (Filetype = "dxf") OR (Filetype = "eps") OR (Filetype = "sgv") then + printlog " " + Filetype + " will be saved as Svm, correct." + CounterShouldBe = 17 + else + warnlog "Svm should not have been selected when we opened a '" + Filetype + "'-file." + endif + case "wmf" : if (Filetype = "wmf") OR (Filetype = "emf") then + printlog " " + Filetype + " will be saved as Wmf, correct." + CounterShouldBe = 17 + if Filetype = "wmf" then Testsize = true + else + warnlog "Wmf should not have been selected when we opened a '" + Filetype + "'-file." + endif + case "jpe" : if (Filetype = "jpg") OR Filetype = "jif" OR Filetype = "peg" then + printlog " " + Filetype + " will be saved as Jpg, correct." + CounterShouldBe = 17 + if Filetype = "jpg" then Testsize = true + else + warnlog "Jpg should not have been selected when we opened a '" + Filetype + "'-file." + endif + case "tif" : if Filetype = "tif" OR Filetype = "iff" then + printlog " " + Filetype + " will be saved as Tiff, correct." + CounterShouldBe = 17 + if Filetype = "tif" then Testsize = true + else + warnlog "Tif should not have been selected when we opened a '" + Filetype + "'-file." + endif + case "sgf" : if (Filetype = "sgv") OR (Filetype = "sgf") then + printlog " " + Filetype + " will be saved as Sgf, correct." + CounterShouldBe = 17 + if Filetype = "sgf" then Testsize = true + else + warnlog "Sgf should not have been selected when we opened a '" + Filetype + "'-file." + endif + case "gif" : if (Filetype = "gif") then + printlog " " + Filetype + " will be saved as Gif, correct." + CounterShouldBe = 17 + if Filetype = "gif" then Testsize = true + else + warnlog "Gif should not have been selected when we opened a '" + Filetype + "'-file." + endif + case "met" : if (Filetype = "met") then + printlog " " + Filetype + " will be saved as Met, correct." + CounterShouldBe = 17 + if Filetype = "met" then Testsize = true + else + warnlog "Met should not have been selected when we opened a '" + Filetype + "'-file." + endif + case "pct" : if (Filetype = "pct") OR (Filetype = "ict") then + printlog " " + Filetype + " will be saved as Pct, correct." + CounterShouldBe = 17 + if Filetype = "pct" then Testsize = true + else + warnlog "Pct should not have been selected when we opened a '" + Filetype + "'-file." + endif + case else : qaerrorlog " The test has not yet been fitted for this format ( " + Filetype + "). Contact FHA." + printlog " But will be saved as: " + left(lcase(Dateityp.GetSelText),3) + CounterShouldBe = 18 + Testsize = true + end select + + '..........................................................................................................................' + + Dateityp.TypeKeys "" + if (Dateityp.GetItemCount) = CounterShouldBe then 'Counter - 10 + for q = 1 to CounterShouldBe - 1 + LastFilterName = Dateityp.GetSelIndex + Dateityp.TypeKeys "" + if Dateityp.GetSelIndex = LastFilterName then + warnlog " Check the export-filters when trying to save a " + Filename + "-file. Exiting test." + goto endsub + endif + next q + else + warnlog "Dateityp.GetItemCount = " + (Dateityp.GetItemCount) + " CounterShouldBe = " + CounterShouldBe + endif + + Dateityp.Select SavedOrgPosition + + Dateiname.SetText ( NewFileDir ) + Dateiname.TypeKeys ("") + + kontext "Active" + if Active.Exists then 'Could not find directory. + warnlog "Error when going to the directory " + NewFileDir + ". Active: " + Active.GetText + warnlog "ABORTING TESTCASE. PLEASE INFORM TESTPROGRAMMER." + Active.OK + kontext "GrafikEinfuegenDlg" + GrafikEinfuegenDlg.Close + goto Endsub + endif + Kontext "ExportierenDlg" + sleep 1 - if (KillFileList (FileList()) <> TRUE) then - for i = 1 to ListCount (FileList()) - Warnlog "File Not deleted: " + i + ": '" + FileList(i) + "'" - next i + Dateiname.SetText ConvertPath ( NewFileDir + "SaveAsPicture") + NewFile = ConvertPath ( NewFileDir + "SaveAsPicture" + "." + left(lcase(Dateityp.GetSelText),3) ) + Dateiname.TypeKeys ("") + Kontext "Active" + if Active.Exists then 'either could not find directory, or overwrite. + Active.Yes ' Overwrite? + endif + + if Testsize = true then + if NewFile <> "" then + Filesize1 = iFileSize(i) + printlog " Saved file-size was: " + app.FileLen(NewFile) + Filesize2 = app.FileLen(NewFile) + endif + endif + + if (Testsize = true) then + if (Filesize1 < (Filesize2*0.95)) OR (Filesize1 > (Filesize2*1.05)) then + warnlog "Format '" + right(NewFile,3) + "' was NOT saved properly. Org-Size: '" + Filesize1 + "' Saved-Size: '" + Filesize2 + "'." + else + printlog " The Format '" + right(NewFile,3) + "' was saved correctly." + endif + endif + if (gApplication = "IMPRESS") then + Kontext "DocumentImpress" + else + Kontext "DocumentDraw" + endif + hTypeKeys "" + call hCloseDocument + call hNewDocument + InsertGraphicsFromFile + Kontext "GrafikEinfuegenDlg" + if GrafikEinfuegenDlg.exists(5) then + printlog " The Insertgraphics-dialogue showed up correctly." + sleep (5) + else + warnlog " The Insertgraphics-dialogue didn't show up." endif - Printlog "The test will exit now." - Sleep 1 - '/// close application ///' - Call hCloseDocument +endif +next i +GrafikEinfuegenDlg.Close + +GetFileList (NewFileDir, "*.*" , FileList() ) +sleep 1 +if (KillFileList (FileList()) <> TRUE) then +for i = 1 to ListCount (FileList()) + Warnlog "File Not deleted: " + i + ": '" + FileList(i) + "'" +next i +endif +Printlog "The test will exit now." +Sleep 1 +Call hCloseDocument endcase 'tContextSaveAsPicture '-------------------------------------------------------------------------------------- -'/// When the graphics are not embedded but inserted as link ///' - TODO FHA. '(Different behaviour = new testcase) testcase tContextSavePictureLinkAsPicture - Dim Counter as integer - Dim CounterShouldBe as integer - Dim SavedOrgPosition as integer - Dim LastFilterName as String - Dim i as integer - Dim q as integer - Dim iFileSize(50) as Long - Dim FileList(50) as String - Dim FileList2(50) as string - Dim Filesize1 as Long - Dim Filesize2 as Long - Dim Filename as String - Dim Filetype as String - Dim SavedFileType as String - Dim OrgFile as String - Dim NewFile as String - Dim OrgFileDir as String - Dim NewFileDir as String - Dim Testsize as Boolean - Dim Found as Boolean - - OrgFileDir = ConvertPath ( gTesttoolPath + "graphics\required\input\SaveAsPicture\" ) - NewFileDir = ConvertPath ( gOfficePath + "user\work\SaveAsPicture\" ) - - '/// Create directory if not exists and delete the content ///' + Dim Counter as integer + Dim CounterShouldBe as integer + Dim SavedOrgPosition as integer + Dim LastFilterName as String + Dim i as integer + Dim q as integer + Dim iFileSize(50) as Long + Dim FileList(50) as String + Dim FileList2(50) as string + Dim Filesize1 as Long + Dim Filesize2 as Long + Dim Filename as String + Dim Filetype as String + Dim SavedFileType as String + Dim OrgFile as String + Dim NewFile as String + Dim OrgFileDir as String + Dim NewFileDir as String + Dim Testsize as Boolean + Dim Found as Boolean + + OrgFileDir = ConvertPath ( gTesttoolPath + "graphics\required\input\SaveAsPicture\" ) + NewFileDir = ConvertPath ( gOfficePath + "user\work\SaveAsPicture\" ) + app.mkDir (NewFileDir) sleep 3 FileList2(0) = 0 GetFileList ((ConvertPath (NewFileDir)), "*.*" , FileList2() ) sleep 1 if (KillFileList (FileList2()) <> TRUE) then - for i = 1 to ListCount2 (FileList2()) - Warnlog "File Not deleted: " + i + ": '" + FileList2(i) + "'" - next i + for i = 1 to ListCount2 (FileList2()) + Warnlog "File Not deleted: " + i + ": '" + FileList2(i) + "'" + next i endif - '/// Open a new Draw or Impress doc. ///' Call hNewDocument setClipboard(" ") sleep 2 - '/// Insert->Graphic From File ///' InsertGraphicsFromFile Kontext "GrafikEinfuegenDlg" Counter = Dateityp.GetItemCount - '/// Go to directory ///' Pfad.SetText OrgFileDir Pfad.TypeKeys ("") Kontext "Active" if Active.Exists then - warnlog "Error when going to the directory " + OrgFileDir + ". Active: " + Active.GetText - Active.OK + warnlog "Error when going to the directory " + OrgFileDir + ". Active: " + Active.GetText + Active.OK endif Kontext "GrafikEinfuegenDlg" - '/// Check how many File-Formats the dialouge has. If zero, write warning into the log. ///' if Dateityp.GetItemCount > 0 then - Printlog "The ImportGraphic-Dialogue has " + Dateityp.GetItemCount + " File-types." + Printlog "The ImportGraphic-Dialogue has " + Dateityp.GetItemCount + " File-types." else - Warnlog "The ImportGraphic-Dialogue doesn't have any File-types listed" + Warnlog "The ImportGraphic-Dialogue doesn't have any File-types listed" endif - '/// Check that other Formats are visible and can be selected ///' for i = 2 to Dateityp.GetItemCount 'Get the number of entries. Printlog " *-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-* " - '/// Go to the directory with the original-files ///' Pfad.SetText OrgFileDir Pfad.TypeKeys ("") Kontext "Active" if Active.Exists then - warnlog "Error when going to the directory " + OrgFileDir + ". Active: " + Active.GetText - Active.OK + warnlog "Error when going to the directory " + OrgFileDir + ". Active: " + Active.GetText + Active.OK endif Kontext "GrafikEinfuegenDlg" if Dateityp.GetItemCount < 1 then - Warnlog "Only one or none selectable fileformats." + Warnlog "Only one or none selectable fileformats." endif Dateityp.Select i Filetype = Dateityp.GetSelText printlog " orginal: " + Dateityp.GetSelText Filetype = left(Right(Dateityp.GetSelText,4),3) - '/// Choose the first file-format available in the dialogue ///' - DateiAuswahl.TypeKeys "" - DateiAuswahl.TypeKeys "" - if DateiAuswahl.GetItemCount < 1 then + DateiAuswahl.TypeKeys "" + DateiAuswahl.TypeKeys "" + if DateiAuswahl.GetItemCount < 1 then warnlog "The file with the extension " + Filetype + " does not exist. Please inform FHA." - else - printlog " Selected: " + DateiAuswahl.GetSelText - '/// Choose the existing file. Check the size ///' - Filename = Dateiname.GetSelText - OrgFile = ConvertPath (OrgFileDir + Dateiname.GetSelText) - printlog " File is: " + OrgFile - - iFileSize(i) = app.FileLen(OrgFile) - printlog " The filesize was: " + iFileSize(i) - - '/// Check if there are any other file of the same kind ///' - DateiAuswahl.TypeKeys "",true - if DateiAuswahl.GetSelText <> Filename then + else + printlog " Selected: " + DateiAuswahl.GetSelText + Filename = Dateiname.GetSelText + OrgFile = ConvertPath (OrgFileDir + Dateiname.GetSelText) + printlog " File is: " + OrgFile + + iFileSize(i) = app.FileLen(OrgFile) + printlog " The filesize was: " + iFileSize(i) + + DateiAuswahl.TypeKeys "",true + if DateiAuswahl.GetSelText <> Filename then warnlog "More than one file with the same extension. Contact Test-Administrator." - endif + endif - '/// If file exist: Check "Link" and press "Open". ///' - if Link.IsChecked <> true then + if Link.IsChecked <> true then Link.Check - endif - Oeffnen.Click + endif + Oeffnen.Click - '/// Select all ///' - if (gApplication = "IMPRESS") then + if (gApplication = "IMPRESS") then Kontext "DocumentImpress" - else + else Kontext "DocumentDraw" - endif - EditSelectall - - '/// Check Context-entry for the marked object ///' - '/// The context menu must contain the "save as picture..." entry at 4th position from bottom. (Check it) ///' - '/// Use the Context-Menu 'Save As Picture' ///' - hOpenContextMenu - if (gApplication = "IMPRESS") then + endif + EditSelectall + + hOpenContextMenu + if (gApplication = "IMPRESS") then Kontext "DocumentImpress" DocumentImpress.OpenContextMenu true if hMenuFindSelect(27353, true, (MenuGetItemCount - 4), true) = false then - Warnlog "Context-Menu-entry `SaveAsGraphics` was not found. Therefore the test ends." - Call hCloseDocument - Goto Endsub + Warnlog "Context-Menu-entry `SaveAsGraphics` was not found. Therefore the test ends." + Call hCloseDocument + Goto Endsub endif - else 'Should be Draw + else 'Should be Draw Kontext "DocumentDraw" DocumentDraw.OpenContextMenu true if hMenuFindSelect(27353, true, (MenuGetItemCount - 4), false) = false then - Warnlog "Context-Menu-entry `SaveAsGraphics` was not found. Therefore the test ends." - Call hCloseDocument - Goto Endsub + Warnlog "Context-Menu-entry `SaveAsGraphics` was not found. Therefore the test ends." + Call hCloseDocument + Goto Endsub endif - endif - sleep 1 + endif + sleep 1 - Kontext "ExportierenDlg" - if ExportierenDlg.IsVisible then + Kontext "ExportierenDlg" + if ExportierenDlg.IsVisible then Printlog " 'Save As Picture' came up correctly when using the Context-menu." - endif - - '/// The Dialogue should now be open ///' - Kontext "ExportierenDlg" 'SaveAsDialogue - - Testsize = false - Found = true - SavedOrgPosition = Dateityp.GetSelIndex - select case left(lcase(Dateityp.GetSelText),3) 'Filetype - case "png" : if (Filetype = "png") then - printlog " " + Filetype + " will be saved as png, correct." - SavedFileType = "png" - Testsize = true - CounterShouldBe = 17 - else - warnlog "Png should not have been selected when we opened a '" + Filetype + "'-file." - endif - case "pcx" : if(Filetype = "pcx") then - printlog " " + Filetype + " will be saved as pcx, correct." - SavedFileType = "pcx" - Testsize = true - CounterShouldBe = 18 - else - warnlog "Png should not have been selected when we opened a '" + Filetype + "'-file." - endif - case "xbm" : if (Filetype = "xbm") then - printlog " " + Filetype + " will be saved as xbm, correct." - SavedFileType = "xbm" - Testsize = true - CounterShouldBe = 18 - else - warnlog "xbm should not have been selected when we opened a '" + Filetype + "'-file." - endif - case "xpm" : if (Filetype = "xpm") then - printlog " " + Filetype + " will be saved as Xpm, correct." - SavedFileType = "xpm" - Testsize = true - CounterShouldBe = 17 - else - warnlog "xpm should not have been selected when we opened a '" + Filetype + "'-file." - endif - case "svm" : if (Filetype = "svm") then - printlog " " + Filetype + " will be saved as Svm, correct." - SavedFileType = "svm" - if (Filetype = "svm") then Testsize = true - CounterShouldBe = 17 - else - warnlog "Svm should not have been selected when we opened a '" + Filetype + "'-file." - endif - case "tga" : if (Filetype = "tga") then - printlog " " + Filetype + " will be saved as Svm, correct." - SavedFileType = "tga" - if (Filetype = "tga") then Testsize = true - CounterShouldBe = 18 - else - warnlog "Tga should not have been selected when we opened a '" + Filetype + "'-file." - endif - case "bmp" : if (Filetype = "bmp") then - printlog " " + Filetype + " will be saved as Bmp, correct." - SavedFileType = "bmp" - Testsize = true - CounterShouldBe = 17 - else - warnlog "Bmp should not have been selected when we opened a '" + Filetype + "'-file." - endif - case "ppm" : if (Filetype = "ppm") then - printlog " " + Filetype + " will be saved as Bmp, correct." - SavedFileType = "ppm" - if Filetype = "ppm" then Testsize = true - CounterShouldBe = 17 - else - warnlog "Ppm should not have been selected when we opened a '" + Filetype + "'-file." - endif - case "eps" : if (Filetype = "eps") then - printlog " " + Filetype + " will be saved as Eps, correct." - SavedFileType = "eps" - if Filetype = "eps" then Testsize = true - CounterShouldBe = 17 - else - warnlog "Eps should not have been selected when we opened a '" + Filetype + "'-file." - endif - case "pgm" : if (Filetype = "pgm") then - printlog " " + Filetype + " will be saved as Pgm, correct." - SavedFileType = "pgm" - if Filetype = "pgm" then Testsize = true - CounterShouldBe = 17 - else - warnlog "Pgm should not have been selected when we opened a '" + Filetype + "'-file." - endif - case "dxf" : if (Filetype = "dxf") then - printlog " " + Filetype + " will be saved as Dxf, correct." - SavedFileType = "dxf" - if Filetype = "dxf" then Testsize = true - CounterShouldBe = 18 - else - warnlog "Dxf should not have been selected when we opened a '" + Filetype + "'-file." - endif - case "pbm" : if (Filetype = "pbm") then - printlog " " + Filetype + " will be saved as Pbm, correct." - SavedFileType = "pbm" - if Filetype = "pbm" then Testsize = true - CounterShouldBe = 17 - else - warnlog "Pbm should not have been selected when we opened a '" + Filetype + "'-file." - endif - case "ras" : if (Filetype = "ras") then - printlog " " + Filetype + " will be saved as Ras, correct." - SavedFileType = "ras" - if Filetype = "ras" then Testsize = true - CounterShouldBe = 17 - else - warnlog "Ras should not have been selected when we opened a '" + Filetype + "'-file." - endif - case "wmf" : if (Filetype = "wmf") or (Filetype = "emf") then - printlog " " + Filetype + " will be saved as Wmf, correct." - SavedFileType = "wmf" - if Filetype = "wmf" then Testsize = true - CounterShouldBe = 17 - else - warnlog "Wmf should not have been selected when we opened a '" + Filetype + "'-file." - endif - case "emf" : if (Filetype = "emf") then - printlog " " + Filetype + " will be saved as Wmf, correct." - SavedFileType = "emf" - Testsize = true - CounterShouldBe = 17 - else - qaerrorlog "Wmf should not have been selected when we opened a '" + Filetype + "'-file. #i95364#" - endif - case "jpe" : if (Filetype = "jpg") OR Filetype = "jif" OR Filetype = "peg" then - printlog " " + Filetype + " will be saved as Jpg, correct." - SavedFileType = "jpg" - Testsize = true - CounterShouldBe = 17 - else - warnlog "Jpg should not have been selected when we opened a '" + Filetype + "'-file." - endif - case "tif" : if Filetype = "tif" OR Filetype = "iff" then - printlog " " + Filetype + " will be saved as Tiff, correct." - SavedFileType = "tif" - Testsize = true - CounterShouldBe = 17 - else - warnlog "Tif should not have been selected when we opened a '" + Filetype + "'-file." - endif - case "sgf" : if (Filetype = "sgf") OR (Filetype = "sgv") then 'sgf - printlog " " + Filetype + " will be saved as Sgf, correct." - SavedFileType = "sgf" - Testsize = true - CounterShouldBe = 18 - else - warnlog "Sgf should not have been selected when we opened a '" + Filetype + "'-file." - endif - case "gif" : if (Filetype = "gif") then - SavedFileType = "gif" - printlog " " + Filetype + " will be saved as Gif, correct." - if Filetype = "gif" then Testsize = true - CounterShouldBe = 17 - else - warnlog "Gif should not have been selected when we opened a '" + Filetype + "'-file." - endif - case "met" : if (Filetype = "met") then - printlog " " + Filetype + " will be saved as Met, correct." - SavedFileType = "met" - if Filetype = "met" then Testsize = true - CounterShouldBe = 17 - else - warnlog "Met should not have been selected when we opened a '" + Filetype + "'-file." - endif - case "pct" : if (Filetype = "pct") OR (Filetype = "ict") then - printlog " " + Filetype + " will be saved as Pct, correct." - SavedFileType = "pct" - if Filetype = "pct" then Testsize = true - CounterShouldBe = 17 - else - warnlog "Pct should not have been selected when we opened a '" + Filetype + "'-file." - endif - case "pcd" : if (Filetype = "pcd") then - printlog " " + Filetype + " will be saved as Pcd, correct." - SavedFileType = "pcd" - if Filetype = "pcd" then Testsize = true - CounterShouldBe = 18 - else - warnlog "Pcd should not have been selected when we opened a '" + Filetype + "'-file." - endif - case "psd" : if (Filetype = "psd") then - printlog " " + Filetype + " will be saved as Psd, correct." - SavedFileType = "psd" - if Filetype = "psd" then Testsize = true - CounterShouldBe = 18 - else - warnlog "Psd should not have been selected when we opened a '" + Filetype + "'-file." - endif - case else : qaerrorlog " The test has not yet been fitted for this format ( " + Filetype + "). Contact FHA." - '/// Check the size ///' - printlog " But will be saved as: " + left(lcase(Dateityp.GetSelText),3) - CounterShouldBe = 18 - Found = false - end select - - '/// Check if all other formats are there, and if they are selectable. ///' - Dateityp.TypeKeys "" - if (Dateityp.GetItemCount) = CounterShouldBe then 'Counter - 10 - for q = 1 to CounterShouldBe - 1 - LastFilterName = Dateityp.GetSelIndex - Dateityp.TypeKeys "" - if Dateityp.GetSelIndex = LastFilterName then - warnlog " Check the export-filters when trying to save a " + Filename + "-file. Exiting Test." - goto endsub - endif - next q - else - warnlog "Dateityp.GetItemCount = " + (Dateityp.GetItemCount) + " CounterShouldBe = " + CounterShouldBe - endif - Dateityp.Select SavedOrgPosition - - '/// Save the file as the same name and file-type, as it was opened ///' - Dateiname.SetText ( NewFileDir ) - Dateiname.TypeKeys ("") - - kontext "Active" - if Active.Exists then 'Could not find directory. - warnlog "Error when going to the directory " + NewFileDir + ". Active: " + Active.GetText - warnlog "ABORTING TESTCASE. PLEASE INFORM THE TESTPROGRAMMER." - Active.OK - kontext "GrafikEinfuegenDlg" - GrafikEinfuegenDlg.Close - goto Endsub - endif - Kontext "ExportierenDlg" - - sleep 1 - - if Found = false then - NewFile = ConvertPath ( NewFileDir + "SaveAsPicture" + "." + left(lcase(Dateityp.GetSelText),3) ) - else - NewFile = ConvertPath ( NewFileDir + "SaveAsPicture" + "." + SavedFileType ' left(lcase(Dateityp.GetSelText),3) ) - endif - Dateiname.SetText NewFile - - Dateiname.TypeKeys ("") - Kontext "Active" - if Active.Exists then 'either could not find directory, or overwrite. - Active.Yes ' Overwrite? - endif - - '/// IF it was saved in the same format as it was opened as, - '/// compare the size of the old and the new file ///' - '/// The selected picture must get exported without compression if the default is the same as the inserted picture. ///' - '/// It must have the same size as the original. ///' - if Testsize = true then - if NewFile <> "" then - Filesize1 = iFileSize(i) - printlog " Saved file-size was: " + app.FileLen(NewFile) - Filesize2 = app.FileLen(NewFile) - endif - endif - - if (Testsize = true) AND (Filesize1 <> Filesize2) then - qaerrorlog "Format '" + right(NewFile,3) + "' was NOT saved properly. Org-Size: '" + Filesize1 + "' Saved-Size: '" + Filesize2 + "'.#i95364#" - else - printlog " The Format '" + right(NewFile,3) + "' was saved correctly." - endif + endif - '/// Remove all in the Document. (Impress/Draw) ///' - if (gApplication = "IMPRESS") then - Kontext "DocumentImpress" - else - Kontext "DocumentDraw" - endif - hTypeKeys "" - call hCloseDocument - call hNewDocument - '/// Open the next file via Insert->Graphics From File ///' - InsertGraphicsFromFile - Kontext "GrafikEinfuegenDlg" - if GrafikEinfuegenDlg.exists(5) then - printlog " The Insertgraphics-dialogue showed up correctly." - sleep (5) - else - warnlog " The Insertgraphics-dialogue didn't show up." - endif - endif - next i - - GrafikEinfuegenDlg.Close - - '/// When everything is finished, delete the content in the created directory. ///' - GetFileList (NewFileDir, "*.*" , FileList() ) - sleep 1 - if (KillFileList (FileList()) <> TRUE) then - for i = 1 to ListCount (FileList()) - Warnlog "File Not deleted: " + i + ": '" + FileList(i) + "'" - next i + Kontext "ExportierenDlg" 'SaveAsDialogue + + Testsize = false + Found = true + SavedOrgPosition = Dateityp.GetSelIndex + select case left(lcase(Dateityp.GetSelText),3) 'Filetype + case "png" : if (Filetype = "png") then + printlog " " + Filetype + " will be saved as png, correct." + SavedFileType = "png" + Testsize = true + CounterShouldBe = 17 + else + warnlog "Png should not have been selected when we opened a '" + Filetype + "'-file." + endif + case "pcx" : if(Filetype = "pcx") then + printlog " " + Filetype + " will be saved as pcx, correct." + SavedFileType = "pcx" + Testsize = true + CounterShouldBe = 18 + else + warnlog "Png should not have been selected when we opened a '" + Filetype + "'-file." + endif + case "xbm" : if (Filetype = "xbm") then + printlog " " + Filetype + " will be saved as xbm, correct." + SavedFileType = "xbm" + Testsize = true + CounterShouldBe = 18 + else + warnlog "xbm should not have been selected when we opened a '" + Filetype + "'-file." endif - Printlog "The test will exit now." - Sleep 1 - '/// close application ///' - Call hCloseDocument +case "xpm" : if (Filetype = "xpm") then + printlog " " + Filetype + " will be saved as Xpm, correct." + SavedFileType = "xpm" + Testsize = true + CounterShouldBe = 17 +else + warnlog "xpm should not have been selected when we opened a '" + Filetype + "'-file." +endif +case "svm" : if (Filetype = "svm") then +printlog " " + Filetype + " will be saved as Svm, correct." +SavedFileType = "svm" +if (Filetype = "svm") then Testsize = true + CounterShouldBe = 17 +else + warnlog "Svm should not have been selected when we opened a '" + Filetype + "'-file." +endif +case "tga" : if (Filetype = "tga") then +printlog " " + Filetype + " will be saved as Svm, correct." +SavedFileType = "tga" +if (Filetype = "tga") then Testsize = true + CounterShouldBe = 18 +else + warnlog "Tga should not have been selected when we opened a '" + Filetype + "'-file." +endif +case "bmp" : if (Filetype = "bmp") then +printlog " " + Filetype + " will be saved as Bmp, correct." +SavedFileType = "bmp" +Testsize = true +CounterShouldBe = 17 +else +warnlog "Bmp should not have been selected when we opened a '" + Filetype + "'-file." +endif +case "ppm" : if (Filetype = "ppm") then +printlog " " + Filetype + " will be saved as Bmp, correct." +SavedFileType = "ppm" +if Filetype = "ppm" then Testsize = true +CounterShouldBe = 17 +else +warnlog "Ppm should not have been selected when we opened a '" + Filetype + "'-file." +endif +case "eps" : if (Filetype = "eps") then +printlog " " + Filetype + " will be saved as Eps, correct." +SavedFileType = "eps" +if Filetype = "eps" then Testsize = true +CounterShouldBe = 17 +else +warnlog "Eps should not have been selected when we opened a '" + Filetype + "'-file." +endif +case "pgm" : if (Filetype = "pgm") then +printlog " " + Filetype + " will be saved as Pgm, correct." +SavedFileType = "pgm" +if Filetype = "pgm" then Testsize = true +CounterShouldBe = 17 +else +warnlog "Pgm should not have been selected when we opened a '" + Filetype + "'-file." +endif +case "dxf" : if (Filetype = "dxf") then +printlog " " + Filetype + " will be saved as Dxf, correct." +SavedFileType = "dxf" +if Filetype = "dxf" then Testsize = true +CounterShouldBe = 18 +else +warnlog "Dxf should not have been selected when we opened a '" + Filetype + "'-file." +endif +case "pbm" : if (Filetype = "pbm") then +printlog " " + Filetype + " will be saved as Pbm, correct." +SavedFileType = "pbm" +if Filetype = "pbm" then Testsize = true +CounterShouldBe = 17 +else +warnlog "Pbm should not have been selected when we opened a '" + Filetype + "'-file." +endif +case "ras" : if (Filetype = "ras") then +printlog " " + Filetype + " will be saved as Ras, correct." +SavedFileType = "ras" +if Filetype = "ras" then Testsize = true +CounterShouldBe = 17 +else +warnlog "Ras should not have been selected when we opened a '" + Filetype + "'-file." +endif +case "wmf" : if (Filetype = "wmf") or (Filetype = "emf") then +printlog " " + Filetype + " will be saved as Wmf, correct." +SavedFileType = "wmf" +if Filetype = "wmf" then Testsize = true +CounterShouldBe = 17 +else +warnlog "Wmf should not have been selected when we opened a '" + Filetype + "'-file." +endif +case "emf" : if (Filetype = "emf") then +printlog " " + Filetype + " will be saved as Wmf, correct." +SavedFileType = "emf" +Testsize = true +CounterShouldBe = 17 +else +qaerrorlog "Wmf should not have been selected when we opened a '" + Filetype + "'-file. #i95364#" +endif +case "jpe" : if (Filetype = "jpg") OR Filetype = "jif" OR Filetype = "peg" then +printlog " " + Filetype + " will be saved as Jpg, correct." +SavedFileType = "jpg" +Testsize = true +CounterShouldBe = 17 +else +warnlog "Jpg should not have been selected when we opened a '" + Filetype + "'-file." +endif +case "tif" : if Filetype = "tif" OR Filetype = "iff" then +printlog " " + Filetype + " will be saved as Tiff, correct." +SavedFileType = "tif" +Testsize = true +CounterShouldBe = 17 +else +warnlog "Tif should not have been selected when we opened a '" + Filetype + "'-file." +endif +case "sgf" : if (Filetype = "sgf") OR (Filetype = "sgv") then 'sgf +printlog " " + Filetype + " will be saved as Sgf, correct." +SavedFileType = "sgf" +Testsize = true +CounterShouldBe = 18 +else +warnlog "Sgf should not have been selected when we opened a '" + Filetype + "'-file." +endif +case "gif" : if (Filetype = "gif") then +SavedFileType = "gif" +printlog " " + Filetype + " will be saved as Gif, correct." +if Filetype = "gif" then Testsize = true +CounterShouldBe = 17 +else +warnlog "Gif should not have been selected when we opened a '" + Filetype + "'-file." +endif +case "met" : if (Filetype = "met") then +printlog " " + Filetype + " will be saved as Met, correct." +SavedFileType = "met" +if Filetype = "met" then Testsize = true +CounterShouldBe = 17 +else +warnlog "Met should not have been selected when we opened a '" + Filetype + "'-file." +endif +case "pct" : if (Filetype = "pct") OR (Filetype = "ict") then +printlog " " + Filetype + " will be saved as Pct, correct." +SavedFileType = "pct" +if Filetype = "pct" then Testsize = true +CounterShouldBe = 17 +else +warnlog "Pct should not have been selected when we opened a '" + Filetype + "'-file." +endif +case "pcd" : if (Filetype = "pcd") then +printlog " " + Filetype + " will be saved as Pcd, correct." +SavedFileType = "pcd" +if Filetype = "pcd" then Testsize = true +CounterShouldBe = 18 +else +warnlog "Pcd should not have been selected when we opened a '" + Filetype + "'-file." +endif +case "psd" : if (Filetype = "psd") then +printlog " " + Filetype + " will be saved as Psd, correct." +SavedFileType = "psd" +if Filetype = "psd" then Testsize = true +CounterShouldBe = 18 +else +warnlog "Psd should not have been selected when we opened a '" + Filetype + "'-file." +endif +case else : qaerrorlog " The test has not yet been fitted for this format ( " + Filetype + "). Contact FHA." +printlog " But will be saved as: " + left(lcase(Dateityp.GetSelText),3) +CounterShouldBe = 18 +Found = false +end select + +Dateityp.TypeKeys "" +if (Dateityp.GetItemCount) = CounterShouldBe then 'Counter - 10 +for q = 1 to CounterShouldBe - 1 +LastFilterName = Dateityp.GetSelIndex +Dateityp.TypeKeys "" +if Dateityp.GetSelIndex = LastFilterName then +warnlog " Check the export-filters when trying to save a " + Filename + "-file. Exiting Test." +goto endsub +endif +next q +else +warnlog "Dateityp.GetItemCount = " + (Dateityp.GetItemCount) + " CounterShouldBe = " + CounterShouldBe +endif +Dateityp.Select SavedOrgPosition + +Dateiname.SetText ( NewFileDir ) +Dateiname.TypeKeys ("") + +kontext "Active" +if Active.Exists then 'Could not find directory. +warnlog "Error when going to the directory " + NewFileDir + ". Active: " + Active.GetText +warnlog "ABORTING TESTCASE. PLEASE INFORM THE TESTPROGRAMMER." +Active.OK +kontext "GrafikEinfuegenDlg" +GrafikEinfuegenDlg.Close +goto Endsub +endif +Kontext "ExportierenDlg" + +sleep 1 + +if Found = false then +NewFile = ConvertPath ( NewFileDir + "SaveAsPicture" + "." + left(lcase(Dateityp.GetSelText),3) ) +else +NewFile = ConvertPath ( NewFileDir + "SaveAsPicture" + "." + SavedFileType ' left(lcase(Dateityp.GetSelText),3) ) +endif +Dateiname.SetText NewFile + +Dateiname.TypeKeys ("") +Kontext "Active" +if Active.Exists then 'either could not find directory, or overwrite. +Active.Yes ' Overwrite? +endif + +if Testsize = true then +if NewFile <> "" then +Filesize1 = iFileSize(i) +printlog " Saved file-size was: " + app.FileLen(NewFile) +Filesize2 = app.FileLen(NewFile) +endif +endif + +if (Testsize = true) AND (Filesize1 <> Filesize2) then +qaerrorlog "Format '" + right(NewFile,3) + "' was NOT saved properly. Org-Size: '" + Filesize1 + "' Saved-Size: '" + Filesize2 + "'.#i95364#" +else +printlog " The Format '" + right(NewFile,3) + "' was saved correctly." +endif + +if (gApplication = "IMPRESS") then +Kontext "DocumentImpress" +else +Kontext "DocumentDraw" +endif +hTypeKeys "" +call hCloseDocument +call hNewDocument +InsertGraphicsFromFile +Kontext "GrafikEinfuegenDlg" +if GrafikEinfuegenDlg.exists(5) then +printlog " The Insertgraphics-dialogue showed up correctly." +sleep (5) +else +warnlog " The Insertgraphics-dialogue didn't show up." +endif +endif +next i + +GrafikEinfuegenDlg.Close + +GetFileList (NewFileDir, "*.*" , FileList() ) +sleep 1 +if (KillFileList (FileList()) <> TRUE) then +for i = 1 to ListCount (FileList()) +Warnlog "File Not deleted: " + i + ": '" + FileList(i) + "'" +next i +endif +Printlog "The test will exit now." +Sleep 1 +Call hCloseDocument endcase 'tContextSaveAsPicture @@ -819,14 +763,13 @@ testcase Mnemonickey qaerrorlog "Not yet ready." goto endsub - '/// If Enlish: try the same thing with mnemonic-keys: Shift-S ///' - if iSprache = 01 then - ExportierenDlg.Close - hOpenContextMenu - TypeKeys ("") - kontext "ExportierenDlg" - if ExportierenDlg.IsVisible then + if iSprache = 01 then + ExportierenDlg.Close + hOpenContextMenu + TypeKeys ("") + kontext "ExportierenDlg" + if ExportierenDlg.IsVisible then Printlog "'Save As Picture' came up correctly when using the Context-menu." - endif - endif + endif + endif endcase diff --git a/testautomation/graphics/optional/includes/global/g_shaddow.inc b/testautomation/graphics/optional/includes/global/g_shaddow.inc index d0cc89f2d0ae..46d32a7559c7 100755 --- a/testautomation/graphics/optional/includes/global/g_shaddow.inc +++ b/testautomation/graphics/optional/includes/global/g_shaddow.inc @@ -1,7 +1,7 @@ 'encoding UTF-8 Do not remove or change this line! '************************************************************************** '* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. -'* +'* '* Copyright 2008 by Sun Microsystems, Inc. '* '* OpenOffice.org - a multi-platform office productivity suite @@ -42,476 +42,432 @@ '\******************************************************************* testcase tiShaddow - dim sFilter as string - dim i as integer - dim t as integer - dim q as integer - dim PosX as integer - dim PosY as integer - dim e as string - dim sFileName as string - dim ImageWidth as string - dim ImageHeight as string - dim shadowdistancevalue as string - dim shadowcolorvalue as string - dim shadowtransparencyvalue as string - dim linetype as string - dim linecolour as string - dim linewidth as string - dim cornerstyletype as string - - '/// Set the file-extension we'll be using when opening the saved file ///' + dim sFilter as string + dim i as integer + dim t as integer + dim q as integer + dim PosX as integer + dim PosY as integer + dim e as string + dim sFileName as string + dim ImageWidth as string + dim ImageHeight as string + dim shadowdistancevalue as string + dim shadowcolorvalue as string + dim shadowtransparencyvalue as string + dim linetype as string + dim linecolour as string + dim linewidth as string + dim cornerstyletype as string + if (gApplication = "IMPRESS") then ExtensionString = "odp" else ExtensionString = "odg" end if - '/// Open application ///' - Call hNewDocument - sleep 1 - - '/// Import picture ///' - InsertGraphicsFromFile - sleep 3 - kontext "Active" - if Active.Exists Then - Active.OK - end if - sleep 5 - Kontext "GrafikEinfuegenDlg" - sleep 2 - Dateiname.SetText (ConvertPath(gOfficeBasisPath + "share\gallery\bigapple.gif")) - sleep 2 - Oeffnen.Click - printlog "Inserted file" - sleep 2 - '/// Select all ///' - EditSelectAll - sleep 3 - '/// Check values and save them ///' - FormatPositionAndSize - kontext - active.SetPage TabPositionAndSize - kontext "TabPositionAndSize" - ImageWidth = Width.GetText - ImageHeight = Height.GetText - printlog "Got values from position and size" - '/// Check the "Protect Size"-button. And close dialogue. ///' - ProtectSize.Check - TabPositionAndSize.Ok - - '/// Add Shaddow via Toolbar-Button ///' - Kontext "GraphicObjectbar" - if GraphicObjectbar.Exists = FALSE then - ViewToolbarsPicture - endif - if schatten.GetState(2) <> 0 then '0 = not pressed. 1 = pressed. - warnlog "Shaddow-button shouldnt have been checked" - end if - sleep 1 - - '/// click button 'Shadow' ///' - Schatten.Click -' '/// Check and save Shaddow-values via context-menu ///' - EditSelectAll - hOpenContextMenu - sleep(2) - if hMenuFindSelect(10142, true, 4) = false then - Warnlog "Context-Menu-entry `Area` was not found. Therefore the test ends." - Call hCloseDocument - Goto Endsub - endif - '/// Select Contextmenu entry "Area" ///' - sleep(2) - kontext "TabArea" - '/// Switch to Shaddow-tabpage, do some changes, save them, close dialogue - Kontext - active.SetPage TabSchatten - kontext "TabSchatten" - if Anzeigen.isVisible(5) AND Anzeigen.Exists(5) then - if Anzeigen.GetState <> 1 then Warnlog "Anzeigen.GetState should be 1, but is: " + Anzeigen.GetState - Anzeigen.Check - else - Warnlog "'Use Shadow' doesn't exist or isn't visible." - endif - - '/// Change Distance and Transparency-values ///' - Entfernung.More ',2 - Transparenz.More ',2 - shadowdistancevalue = Entfernung.GetText - shadowcolorvalue = Farbe.GetSelText - shadowtransparencyvalue = Transparenz.GetText - printlog "Got values from TabArea" - TabSchatten.Ok - - '/// Check if it's the same when going over FormatArea ///' - FormatArea - sleep 1 - kontext "TabArea" - '/// Switch to Shaddow-tabpage, do some changes, save them, close dialogue ///' - Kontext - active.SetPage TabSchatten - kontext "TabSchatten" - if Anzeigen.isVisible(5) AND Anzeigen.Exists(5) then - if Anzeigen.GetState <> 1 then Warnlog "should be active" - Anzeigen.Check - else - Warnlog "'Use Shadow' doesn't exist or isn't visible." - endif - if shadowdistancevalue <> Entfernung.GetText then - warnlog "Distance value changed. Should be: " + shadowdistancevalue + ". But is: " + Entfernung.gettext - endif - if shadowcolorvalue <> Farbe.GetSelText then - warnlog "Color value changed. Should be: " + shadowcolorvalue + ". But is: " + Farbe.getSeltext + Call hNewDocument + sleep 1 + + InsertGraphicsFromFile + sleep 3 + kontext "Active" + if Active.Exists Then + Active.OK + end if + sleep 5 + Kontext "GrafikEinfuegenDlg" + sleep 2 + Dateiname.SetText (ConvertPath(gOfficeBasisPath + "share\gallery\bigapple.gif")) + sleep 2 + Oeffnen.Click + printlog "Inserted file" + sleep 2 + EditSelectAll + sleep 3 + FormatPositionAndSize + kontext + active.SetPage TabPositionAndSize + kontext "TabPositionAndSize" + ImageWidth = Width.GetText + ImageHeight = Height.GetText + printlog "Got values from position and size" + ProtectSize.Check + TabPositionAndSize.Ok + + Kontext "GraphicObjectbar" + if GraphicObjectbar.Exists = FALSE then + ViewToolbarsPicture endif - if shadowtransparencyvalue <> Transparenz.GetText then - warnlog "Transparency value changed. Should be: " + shadowtransparencyvalue + ". But is: " + Transparenz.gettext + if schatten.GetState(2) <> 0 then '0 = not pressed. 1 = pressed. + warnlog "Shaddow-button shouldnt have been checked" + end if + sleep 1 + + Schatten.Click + EditSelectAll + hOpenContextMenu + sleep(2) + if hMenuFindSelect(10142, true, 4) = false then + Warnlog "Context-Menu-entry `Area` was not found. Therefore the test ends." + Call hCloseDocument + Goto Endsub endif - TabSchatten.Ok - - '/// Add Cornerstyle via FormatLine ///' - FormatLine - Kontext - Messagebox.SetPage TabLinie - kontext "TabLinie" - Stil.Select 2 ' Select Continuously. - linetype = Stil.GetItemText - Farbe.Select 2 ' Select Blue - linecolour = Farbe.GetItemText - Breite.More 3 ' Set Width to 3 - linewidth = Breite.Gettext - CornerStyle.Select 4 ' Select number four: Beveled - cornerstyletype = CornerStyle.GetSelText - printlog "Cornerstyle is: " + CornerStyle.GetSelText '+ cornerstyletype - TabLinie.ok - - '/// Check values via PositionAndSize via the Contextmenu ///' - hOpenContextmenu - sleep(2) - if hMenuFindSelect(10087, true, 1) = false then - Warnlog "Context-Menu-entry `Position and Size` was not found. Therefore the test ends." - Call hCloseDocument - Goto Endsub - endif - 'Select "Position and Size" - sleep(2) - Kontext - Active.SetPage TabPositionAndSize - Kontext "TabPositionAndSize" - if ImageWidth <> Width.GetText then warnlog "Position X differs. Should be: " + ImageWidth + " But is: " + Width.GetText - if ImageHeight <> Height.GetText then warnlog "Position Y differs. Should be: " + ImageHeight + " But is: " + Height.GetText - TabPositionAndSize.OK - - '/// Check Cornerstyle via FormatLine ///' - FormatLine - Kontext - Messagebox.SetPage TabLinie - kontext "TabLinie" - if linetype <> Stil.GetItemText then warnlog "Linetype should be: " + linetype + " But is: " + Stil.GetItemText - if linecolour <> Farbe.GetItemText then warnlog "Linecolour should be: " + linetype + " But is: " + Farbe.GetItemText - if linewidth <> Breite.GetText then warnlog "Linewidth should be: " + linewidth + " But is: " + Breite.GetText - if cornerstyletype <> CornerStyle.GetSelText then warnlog "CornerStyle should be: " + cornerstyletype + " But is: " + CornerStyle.GetSelText 'ItemText - TabLinie.ok - - '/// Check if the Shaddow-button is activated ///' - Kontext "GraphicObjectbar" - if Schatten.GetState(2) <> 1 then - warnlog "Shaddow-button shouldnt have been checked" - endif - - '/// Save the file. Then close the office and reload the file ///' - sFileName = ( ConvertPath(gOfficePath + "user\work\shaddow-test")) - '/// File-Save As with filter as: "user\temp\shaddow-test" ///' - try - FileSaveAs - Kontext "SpeichernDlg" - Dateiname.SetText sFileName - printlog "Saving with filter: " + Dateityp.GetSelText - Speichern.Click - Kontext "Messagebox" - if Messagebox.Exists(2) then Messagebox.Yes - Kontext "AlienWarning" - if AlienWarning.Exists(2) then AlienWarning.OK - printlog "Saved as: " + sFileName - catch - warnlog "Error when saving file." - endcatch - - '/// Close the office-session ///' - FileClose - Kontext "Messagebox" - if Messagebox.Exists(2) then Messagebox.Yes - Sleep 3 - '/// Open the saved file ///' - try - hFileOpen sFileName + "." + ExtensionString - Sleep 3 - printlog "opened file successfully" - catch - warnlog "Error when opening file." - endcatch - - '/// Select all ///' - EditSelectAll - sleep 2 - - '/// Check if the Shaddow-button still is activated ///' - kontext "GraphicObjectbar" - if schatten.Getstate(2) <> 1 then - warnlog "The Shadow-button should be activated" - else - Printlog "Shaddowbutton activated, good." - endif - - '/// Check the attributes for the picture ///' - hOpenContextmenu - sleep(2) - if hMenuFindSelect(10087, true, 1) = false then - Warnlog "Context-Menu-entry `Position and Size` was not found. Therefore the test ends." - Call hCloseDocument - Goto Endsub - endif - 'Select "Position and Size" - sleep(2) - Kontext - Active.SetPage TabPositionAndSize - Kontext "TabPositionAndSize" - if ImageWidth <> Width.GetText then warnlog "Position X differs. Should be: " + ImageWidth + " But is: " + Width.GetText - if ImageHeight <> Height.GetText then warnlog "Position X differs. Should be: " + ImageHeight + " But is: " + Height.GetText - TabPositionAndSize.OK - - FormatArea - sleep 1 - kontext "TabArea" - '/// Switch to Shaddow-tabpage, do some changes, save them, close dialogue ///' - Kontext - active.SetPage TabSchatten - kontext "TabSchatten" - if Anzeigen.isVisible(5) AND Anzeigen.Exists(5) then - if Anzeigen.GetState <> 1 then Warnlog "Shaddow-checkbox should be active" + sleep(2) + kontext "TabArea" + Kontext + active.SetPage TabSchatten + kontext "TabSchatten" + if Anzeigen.isVisible(5) AND Anzeigen.Exists(5) then + if Anzeigen.GetState <> 1 then Warnlog "Anzeigen.GetState should be 1, but is: " + Anzeigen.GetState Anzeigen.Check - else + else Warnlog "'Use Shadow' doesn't exist or isn't visible." - endif - if shadowdistancevalue <> Entfernung.GetText then warnlog "Distance value changed. Should be: " + shadowdistancevalue + ". But is: " + Entfernung.gettext - if shadowcolorvalue <> Farbe.GetSelText then warnlog "Color value changed. Should be: " + shadowcolorvalue + ". But is: " + Farbe.gettext - if shadowtransparencyvalue <> Transparenz.GetText then warnlog "Transparency value changed. Should be: " + shadowtransparencyvalue + ". But is: " + Transparenz.gettext - - '/// Check Transparency ///' - Kontext - Active.SetPage TabTransparenz - kontext "TabTransparenz" - LineareTransparenz.Check - shadowtransparencyvalue = MFLinTransparenz.GetText - - sleep 2 - Kontext - active.SetPage TabSchatten - kontext "TabSchatten" - TabSchatten.Ok - - '/// Check Cornerstyle via FormatLine ///' - FormatLine - Kontext - Messagebox.SetPage TabLinie - kontext "TabLinie" - if linetype <> Stil.GetItemText then warnlog "Linetype should be: " + linetype + " But is: " + Stil.GetItemText - if linecolour <> Farbe.GetItemText then warnlog "Linecolour should be: " + linetype + " But is: " + Farbe.GetItemText - if linewidth <> Breite.GetText then warnlog "Linewidth should be: " + linewidth + " But is: " + Breite.GetText - if cornerstyletype <> CornerStyle.GetSelText then warnlog "CornerStyle should be: " + cornerstyletype + " But is: " + CornerStyle.GetSelText 'ItemText - TabLinie.ok - - '/// If Impress: Save as Powerpoint-file. If Draw: Save as usual Draw-file. ///' - if (gApplication = "IMPRESS") then - ExtensionString = "ppt" - else - ExtensionString = "odg" - end if - - sFileName = ( ConvertPath(gOfficePath + "user\work\shaddow-test")) - - FileSaveAs - Kontext "SpeichernDlg" - Dateiname.SetText sFileName - if (gApplication = "IMPRESS") then - Dateityp.Select 5 ' Powerpoint - printlog "Trying to save with filter: " + Dateityp.GetSelText + sFilter(5) - else - Dateityp.Select 1 - printlog "Trying to save with filter: " + Dateityp.GetSelText + sFilter(1) - endif - Speichern.Click - Kontext "Messagebox" - if Messagebox.Exists(2) then Messagebox.Yes - Kontext "AlienWarning" - if AlienWarning.Exists(2) then AlienWarning.OK - printlog "Saved as: " + sFileName - Sleep 3 - - '/// Close the office and reload the file ///' - FileClose - Kontext "Messagebox" - if Messagebox.Exists(2) then Messagebox.Yes - Sleep 3 - '/// Open the saved file ///' - hFileOpen (sFileName + "." + ExtensionString) - printlog "File opened: " + sFileName + "." + ExtensionString - Sleep 3 - '/// Select all ///' - EditSelectAll - - '/// Check the attributes for the picture ///' - hOpenContextmenu - sleep(2) - if hMenuFindSelect(10087, true, 1) = false then - Warnlog "Context-Menu-entry `Position and Size` was not found. Therefore the test ends." - Call hCloseDocument - Goto Endsub - endif - 'Select "Position and Size" - sleep(2) - Kontext - Active.SetPage TabPositionAndSize - Kontext "TabPositionAndSize" - if ImageWidth <> Width.GetText then warnlog "Position X differs. Should be: " + ImageWidth + " But is: " + Width.GetText - if ImageHeight <> Height.GetText then warnlog "Position X differs. Should be: " + ImageHeight + " But is: " + Height.GetText - TabPositionAndSize.OK - - '/// Check if transparency has disappeared and if the cornerstyle has changed ///' - FormatArea - Kontext - Messagebox.SetPage TabTransparenz - kontext "TabTransparenz" - if (gApplication = "DRAW") then - if LineareTransparenz.Ischecked = FALSE then - warnlog "Transparency should have been checked!" - if MFLinTransparenz.GetText <> shadowtransparencyvalue then warnlog "Transparency-value should NOT have changed" - KeineTransparenz.Check - end if - endif - if (gApplication = "DRAW") then - if LineareTransparenz.Ischecked = FALSE then - warnlog "Transparency should have been checked!" - if MFLinTransparenz.GetText <> shadowtransparencyvalue then warnlog "Transparency-value should NOT have changed" - KeineTransparenz.Check - end if - endif - if (gApplication = "IMPRESS") then - if LineareTransparenz.Ischecked =TRUE then - printlog "Transparency contained in newer ppt files, ok.!" - if MFLinTransparenz.GetText <> shadowtransparencyvalue then warnlog "Transparency-value should NOT have changed" - KeineTransparenz.Check - end if - endif - - TabTransparenz.Cancel - - '/// Check Cornerstyle via FormatLine ///' - FormatLine - Kontext - Messagebox.SetPage TabLinie - kontext "TabLinie" - if linetype <> Stil.GetItemText then warnlog "Linetype should be: " + linetype + " But is: " + Stil.GetItemText - if linecolour <> Farbe.GetItemText then warnlog "Linecolour should be: " + linetype + " But is: " + Farbe.GetItemText - if linewidth <> Breite.GetText then warnlog "Linewidth should be: " + linewidth + " But is: " + Breite.GetText - if cornerstyletype <> CornerStyle.GetSelText then warnlog "CornerStyle should be: " + cornerstyletype + " But is: " + CornerStyle.GetSelText 'ItemText - TabLinie.ok - - '/// Remove the Shaddow, Transparency and Cornerstyle ///' - FormatArea - Kontext - Messagebox.SetPage TabTransparenz - kontext "TabTransparenz" - KeineTransparenz.Check - sleep 1 - kontext "TabArea" - '/// Switch to Shaddow-tabpage, do some changes, save them, close dialogue ///' - Kontext - active.SetPage TabSchatten - kontext "TabSchatten" - Anzeigen.UnCheck - TabSchatten.Ok - - '/// If Impress: Save as Powerpoint-file. If Draw: Save as usual Draw-file. ///' - if (gApplication = "IMPRESS") then - ExtensionString = "ppt" - else - ExtensionString = "odg" - end if - sFileName = ( ConvertPath(gOfficePath + "user\work\shaddow-test")) - - FileSaveAs - Kontext "SpeichernDlg" - Dateiname.SetText sFileName - if (gApplication = "IMPRESS") then - Dateityp.Select 5 ' Powerpoint - printlog "Trying to save with filter: " + Dateityp.GetSelText + sFilter(5) - else - Dateityp.Select 1 - printlog "Trying to save with filter: " + Dateityp.GetSelText + sFilter(1) - endif - Speichern.Click - Kontext "Messagebox" - if Messagebox.Exists(2) then Messagebox.Yes - Kontext "AlienWarning" - if AlienWarning.Exists(2) then AlienWarning.OK - printlog "Saved as: " + sFileName - Sleep 3 - - '/// Close the office-session ///' - FileClose - Kontext "Messagebox" - if Messagebox.Exists(2) then Messagebox.Yes - Sleep 3 - '/// Open the saved file ///' - hFileOpen (sFileName + "." + ExtensionString) - printlog "File opened: " + sFileName + "." + ExtensionString - Sleep 3 - '/// Select all ///' - EditSelectAll - - '/// Check the attributes for the picture ///' - hOpenContextmenu - sleep(2) - if hMenuFindSelect(10087, true, 1) = false then - Warnlog "Context-Menu-entry `Position and Size` was not found. Therefore the test ends." - Call hCloseDocument - Goto Endsub - endif - 'Select "Position and Size" - sleep(2) - Kontext - Active.SetPage TabPositionAndSize - Kontext "TabPositionAndSize" - if ImageWidth <> Width.GetText then warnlog "Position X differs. Should be: " + ImageWidth + " But is: " + Width.GetText - if ImageHeight <> Height.GetText then warnlog "Position X differs. Should be: " + ImageHeight + " But is: " + Height.GetText - TabPositionAndSize.OK - - '/// Check if transparency has disappeared ///' - FormatArea - Kontext - Messagebox.SetPage TabTransparenz - kontext "TabTransparenz" - if LineareTransparenz.Ischecked <> FALSE then - warnlog "Transparency should NOT have been checked!" - if MFLinTransparenz.GetText <> shadowtransparencyvalue then warnlog "Transparency-value should NOT have changed" - LineareTransparenz.UnCheck - end if - TabTransparenz.Cancel - - '/// Check if the cornerstyle has changed via FormatLine ///' - FormatLine - Kontext - Messagebox.SetPage TabLinie - kontext "TabLinie" - if linetype <> Stil.GetItemText then warnlog "Linetype should be: " + linetype + " But is: " + Stil.GetItemText - if linecolour <> Farbe.GetItemText then warnlog "Linecolour should be: " + linetype + " But is: " + Farbe.GetItemText - if linewidth <> Breite.GetText then warnlog "Linewidth should be: " + linewidth + " But is: " + Breite.GetText - if cornerstyletype <> CornerStyle.GetSelText then warnlog "CornerStyle should be: " + cornerstyletype + " But is: " + CornerStyle.GetSelText 'ItemText - TabLinie.ok - - '/// Close application ///' - Call hCloseDocument - Printlog "Finished Shaddow-test for " + gApplication + endif + + Entfernung.More ',2 + Transparenz.More ',2 + shadowdistancevalue = Entfernung.GetText + shadowcolorvalue = Farbe.GetSelText + shadowtransparencyvalue = Transparenz.GetText + printlog "Got values from TabArea" + TabSchatten.Ok + + FormatArea + sleep 1 + kontext "TabArea" + Kontext + active.SetPage TabSchatten + kontext "TabSchatten" + if Anzeigen.isVisible(5) AND Anzeigen.Exists(5) then + if Anzeigen.GetState <> 1 then Warnlog "should be active" + Anzeigen.Check + else + Warnlog "'Use Shadow' doesn't exist or isn't visible." + endif + if shadowdistancevalue <> Entfernung.GetText then + warnlog "Distance value changed. Should be: " + shadowdistancevalue + ". But is: " + Entfernung.gettext + endif + if shadowcolorvalue <> Farbe.GetSelText then + warnlog "Color value changed. Should be: " + shadowcolorvalue + ". But is: " + Farbe.getSeltext + endif + if shadowtransparencyvalue <> Transparenz.GetText then + warnlog "Transparency value changed. Should be: " + shadowtransparencyvalue + ". But is: " + Transparenz.gettext + endif + TabSchatten.Ok + + FormatLine + Kontext + Messagebox.SetPage TabLinie + kontext "TabLinie" + Stil.Select 2 ' Select Continuously. + linetype = Stil.GetItemText + Farbe.Select 2 ' Select Blue + linecolour = Farbe.GetItemText + Breite.More 3 ' Set Width to 3 + linewidth = Breite.Gettext + CornerStyle.Select 4 ' Select number four: Beveled + cornerstyletype = CornerStyle.GetSelText + printlog "Cornerstyle is: " + CornerStyle.GetSelText '+ cornerstyletype + TabLinie.ok + + hOpenContextmenu + sleep(2) + if hMenuFindSelect(10087, true, 1) = false then + Warnlog "Context-Menu-entry `Position and Size` was not found. Therefore the test ends." + Call hCloseDocument + Goto Endsub + endif + 'Select "Position and Size" + sleep(2) + Kontext + Active.SetPage TabPositionAndSize + Kontext "TabPositionAndSize" + if ImageWidth <> Width.GetText then warnlog "Position X differs. Should be: " + ImageWidth + " But is: " + Width.GetText + if ImageHeight <> Height.GetText then warnlog "Position Y differs. Should be: " + ImageHeight + " But is: " + Height.GetText + TabPositionAndSize.OK + + FormatLine + Kontext + Messagebox.SetPage TabLinie + kontext "TabLinie" + if linetype <> Stil.GetItemText then warnlog "Linetype should be: " + linetype + " But is: " + Stil.GetItemText + if linecolour <> Farbe.GetItemText then warnlog "Linecolour should be: " + linetype + " But is: " + Farbe.GetItemText + if linewidth <> Breite.GetText then warnlog "Linewidth should be: " + linewidth + " But is: " + Breite.GetText + if cornerstyletype <> CornerStyle.GetSelText then warnlog "CornerStyle should be: " + cornerstyletype + " But is: " + CornerStyle.GetSelText 'ItemText + TabLinie.ok + + Kontext "GraphicObjectbar" + if Schatten.GetState(2) <> 1 then + warnlog "Shaddow-button shouldnt have been checked" + endif + + sFileName = ( ConvertPath(gOfficePath + "user\work\shaddow-test")) + try + FileSaveAs + Kontext "SpeichernDlg" + Dateiname.SetText sFileName + printlog "Saving with filter: " + Dateityp.GetSelText + Speichern.Click + Kontext "Messagebox" + if Messagebox.Exists(2) then Messagebox.Yes + Kontext "AlienWarning" + if AlienWarning.Exists(2) then AlienWarning.OK + printlog "Saved as: " + sFileName + catch + warnlog "Error when saving file." + endcatch + + FileClose + Kontext "Messagebox" + if Messagebox.Exists(2) then Messagebox.Yes + Sleep 3 + try + hFileOpen sFileName + "." + ExtensionString + Sleep 3 + printlog "opened file successfully" + catch + warnlog "Error when opening file." + endcatch + + EditSelectAll + sleep 2 + + kontext "GraphicObjectbar" + if schatten.Getstate(2) <> 1 then + warnlog "The Shadow-button should be activated" + else + Printlog "Shaddowbutton activated, good." + endif + + hOpenContextmenu + sleep(2) + if hMenuFindSelect(10087, true, 1) = false then + Warnlog "Context-Menu-entry `Position and Size` was not found. Therefore the test ends." + Call hCloseDocument + Goto Endsub + endif + 'Select "Position and Size" + sleep(2) + Kontext + Active.SetPage TabPositionAndSize + Kontext "TabPositionAndSize" + if ImageWidth <> Width.GetText then warnlog "Position X differs. Should be: " + ImageWidth + " But is: " + Width.GetText + if ImageHeight <> Height.GetText then warnlog "Position X differs. Should be: " + ImageHeight + " But is: " + Height.GetText + TabPositionAndSize.OK + + FormatArea + sleep 1 + kontext "TabArea" + Kontext + active.SetPage TabSchatten + kontext "TabSchatten" + if Anzeigen.isVisible(5) AND Anzeigen.Exists(5) then + if Anzeigen.GetState <> 1 then Warnlog "Shaddow-checkbox should be active" + Anzeigen.Check + else + Warnlog "'Use Shadow' doesn't exist or isn't visible." + endif + if shadowdistancevalue <> Entfernung.GetText then warnlog "Distance value changed. Should be: " + shadowdistancevalue + ". But is: " + Entfernung.gettext + if shadowcolorvalue <> Farbe.GetSelText then warnlog "Color value changed. Should be: " + shadowcolorvalue + ". But is: " + Farbe.gettext + if shadowtransparencyvalue <> Transparenz.GetText then warnlog "Transparency value changed. Should be: " + shadowtransparencyvalue + ". But is: " + Transparenz.gettext + + Kontext + Active.SetPage TabTransparenz + kontext "TabTransparenz" + LineareTransparenz.Check + shadowtransparencyvalue = MFLinTransparenz.GetText + + + sleep 2 + Kontext + active.SetPage TabSchatten + kontext "TabSchatten" + TabSchatten.Ok + + FormatLine + Kontext + Messagebox.SetPage TabLinie + kontext "TabLinie" + if linetype <> Stil.GetItemText then warnlog "Linetype should be: " + linetype + " But is: " + Stil.GetItemText + if linecolour <> Farbe.GetItemText then warnlog "Linecolour should be: " + linetype + " But is: " + Farbe.GetItemText + if linewidth <> Breite.GetText then warnlog "Linewidth should be: " + linewidth + " But is: " + Breite.GetText + if cornerstyletype <> CornerStyle.GetSelText then warnlog "CornerStyle should be: " + cornerstyletype + " But is: " + CornerStyle.GetSelText 'ItemText + TabLinie.ok + + if (gApplication = "IMPRESS") then + ExtensionString = "ppt" + else + ExtensionString = "odg" + end if + + sFileName = ( ConvertPath(gOfficePath + "user\work\shaddow-test")) + + FileSaveAs + Kontext "SpeichernDlg" + Dateiname.SetText sFileName + if (gApplication = "IMPRESS") then + Dateityp.Select 5 ' Powerpoint + printlog "Trying to save with filter: " + Dateityp.GetSelText + sFilter(5) + else + Dateityp.Select 1 + printlog "Trying to save with filter: " + Dateityp.GetSelText + sFilter(1) + endif + Speichern.Click + Kontext "Messagebox" + if Messagebox.Exists(2) then Messagebox.Yes + Kontext "AlienWarning" + if AlienWarning.Exists(2) then AlienWarning.OK + printlog "Saved as: " + sFileName + Sleep 3 + + FileClose + Kontext "Messagebox" + if Messagebox.Exists(2) then Messagebox.Yes + Sleep 3 + hFileOpen (sFileName + "." + ExtensionString) + printlog "File opened: " + sFileName + "." + ExtensionString + Sleep 3 + EditSelectAll + + hOpenContextmenu + sleep(2) + if hMenuFindSelect(10087, true, 1) = false then + Warnlog "Context-Menu-entry `Position and Size` was not found. Therefore the test ends." + Call hCloseDocument + Goto Endsub + endif + 'Select "Position and Size" + sleep(2) + Kontext + Active.SetPage TabPositionAndSize + Kontext "TabPositionAndSize" + if ImageWidth <> Width.GetText then warnlog "Position X differs. Should be: " + ImageWidth + " But is: " + Width.GetText + if ImageHeight <> Height.GetText then warnlog "Position X differs. Should be: " + ImageHeight + " But is: " + Height.GetText + TabPositionAndSize.OK + + FormatArea + Kontext + Messagebox.SetPage TabTransparenz + kontext "TabTransparenz" + if (gApplication = "DRAW") then + if LineareTransparenz.Ischecked = FALSE then + warnlog "Transparency should have been checked!" + if MFLinTransparenz.GetText <> shadowtransparencyvalue then warnlog "Transparency-value should NOT have changed" + KeineTransparenz.Check + end if + endif + if (gApplication = "DRAW") then + if LineareTransparenz.Ischecked = FALSE then + warnlog "Transparency should have been checked!" + if MFLinTransparenz.GetText <> shadowtransparencyvalue then warnlog "Transparency-value should NOT have changed" + KeineTransparenz.Check + end if + endif + if (gApplication = "IMPRESS") then + if LineareTransparenz.Ischecked <> FALSE then + warnlog "Transparency should NOT have been checked!" + if MFLinTransparenz.GetText <> shadowtransparencyvalue then warnlog "Transparency-value should NOT have changed" + KeineTransparenz.Check + end if + endif + + TabTransparenz.Cancel + + FormatLine + Kontext + Messagebox.SetPage TabLinie + kontext "TabLinie" + if linetype <> Stil.GetItemText then warnlog "Linetype should be: " + linetype + " But is: " + Stil.GetItemText + if linecolour <> Farbe.GetItemText then warnlog "Linecolour should be: " + linetype + " But is: " + Farbe.GetItemText + if linewidth <> Breite.GetText then warnlog "Linewidth should be: " + linewidth + " But is: " + Breite.GetText + if cornerstyletype <> CornerStyle.GetSelText then warnlog "CornerStyle should be: " + cornerstyletype + " But is: " + CornerStyle.GetSelText 'ItemText + TabLinie.ok + + FormatArea + Kontext + Messagebox.SetPage TabTransparenz + kontext "TabTransparenz" + KeineTransparenz.Check + sleep 1 + kontext "TabArea" + Kontext + active.SetPage TabSchatten + kontext "TabSchatten" + Anzeigen.UnCheck + TabSchatten.Ok + + if (gApplication = "IMPRESS") then + ExtensionString = "ppt" + else + ExtensionString = "odg" + end if + sFileName = ( ConvertPath(gOfficePath + "user\work\shaddow-test")) + + FileSaveAs + Kontext "SpeichernDlg" + Dateiname.SetText sFileName + if (gApplication = "IMPRESS") then + Dateityp.Select 5 ' Powerpoint + printlog "Trying to save with filter: " + Dateityp.GetSelText + sFilter(5) + else + Dateityp.Select 1 + printlog "Trying to save with filter: " + Dateityp.GetSelText + sFilter(1) + endif + Speichern.Click + Kontext "Messagebox" + if Messagebox.Exists(2) then Messagebox.Yes + Kontext "AlienWarning" + if AlienWarning.Exists(2) then AlienWarning.OK + printlog "Saved as: " + sFileName + Sleep 3 + + FileClose + Kontext "Messagebox" + if Messagebox.Exists(2) then Messagebox.Yes + Sleep 3 + hFileOpen (sFileName + "." + ExtensionString) + printlog "File opened: " + sFileName + "." + ExtensionString + Sleep 3 + EditSelectAll + + hOpenContextmenu + sleep(2) + if hMenuFindSelect(10087, true, 1) = false then + Warnlog "Context-Menu-entry `Position and Size` was not found. Therefore the test ends." + Call hCloseDocument + Goto Endsub + endif + 'Select "Position and Size" + sleep(2) + Kontext + Active.SetPage TabPositionAndSize + Kontext "TabPositionAndSize" + if ImageWidth <> Width.GetText then warnlog "Position X differs. Should be: " + ImageWidth + " But is: " + Width.GetText + if ImageHeight <> Height.GetText then warnlog "Position X differs. Should be: " + ImageHeight + " But is: " + Height.GetText + TabPositionAndSize.OK + + FormatArea + Kontext + Messagebox.SetPage TabTransparenz + kontext "TabTransparenz" + if LineareTransparenz.Ischecked <> FALSE then + warnlog "Transparency should NOT have been checked!" + if MFLinTransparenz.GetText <> shadowtransparencyvalue then warnlog "Transparency-value should NOT have changed" + LineareTransparenz.UnCheck + end if + TabTransparenz.Cancel + + FormatLine + Kontext + Messagebox.SetPage TabLinie + kontext "TabLinie" + if linetype <> Stil.GetItemText then warnlog "Linetype should be: " + linetype + " But is: " + Stil.GetItemText + if linecolour <> Farbe.GetItemText then warnlog "Linecolour should be: " + linetype + " But is: " + Farbe.GetItemText + if linewidth <> Breite.GetText then warnlog "Linewidth should be: " + linewidth + " But is: " + Breite.GetText + if cornerstyletype <> CornerStyle.GetSelText then warnlog "CornerStyle should be: " + cornerstyletype + " But is: " + CornerStyle.GetSelText 'ItemText + TabLinie.ok + + Call hCloseDocument + Printlog "Finished Shaddow-test for " + gApplication endcase ' tiShaddow diff --git a/testautomation/graphics/optional/includes/global/g_slidelayer.inc b/testautomation/graphics/optional/includes/global/g_slidelayer.inc index 4c70741276e8..dda6cd36679c 100755 --- a/testautomation/graphics/optional/includes/global/g_slidelayer.inc +++ b/testautomation/graphics/optional/includes/global/g_slidelayer.inc @@ -1,7 +1,7 @@ 'encoding UTF-8 Do not remove or change this line! '************************************************************************** '* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. -'* +'* '* Copyright 2008 by Sun Microsystems, Inc. '* '* OpenOffice.org - a multi-platform office productivity suite @@ -42,74 +42,57 @@ '\************************************************************************************* testcase tInsertSlide - '/// open application ///' - Call hNewDocument - '/// Insert->Slide ///' - InsertSlide - sleep 2 - hTypekeys "" - sleep 2 - try - '/// Edit->Delete Slide ///' - EditDeleteSlide - PrintLog "Slide 2 deleted" - catch - sleep 2 - WarnLog "No slide was inserted" - endcatch - '/// close application ///' - hCloseDocument + Call hNewDocument + InsertSlide + sleep 2 + hTypekeys "" + sleep 2 + try + EditDeleteSlide + PrintLog "Slide 2 deleted" + catch + sleep 2 + WarnLog "No slide was inserted" + endcatch + hCloseDocument endcase testcase tInsertDuplicateSlide - '/// open application ///' - Call hNewDocument - sleep 2 - '/// create rectangle ///' - hRechteckErstellen ( 10, 10, 50, 50 ) - sleep 2 - '/// Insert->Duplicate Slide ///' - InsertDuplicateSlide - try - '/// Edit->Select All ///' - EditSelectAll - sleep 2 - '/// delete the object with a keystroke: [Delete] ///' - hTypeKeys "" - PrintLog "Slide duplicated" - catch - Warnlog " Slide not duplicated" - endcatch - try - '/// Edit->Delete Slide ///' - EditDeleteSlide - catch - WarnLog "Error when deleting. Slide is not duplicated ??" - endcatch - '/// close application ///' - hCloseDocument + Call hNewDocument + sleep 2 + hRechteckErstellen ( 10, 10, 50, 50 ) + sleep 2 + InsertDuplicateSlide + try + EditSelectAll + sleep 2 + hTypeKeys "" + PrintLog "Slide duplicated" + catch + Warnlog " Slide not duplicated" + endcatch + try + EditDeleteSlide + catch + WarnLog "Error when deleting. Slide is not duplicated ??" + endcatch + hCloseDocument endcase testcase tInsertLayer - '/// open application ///' - Call hNewDocument - sleep 2 - '/// View->Layer ///' - ViewLayer - '/// Edit->Layer->Insert ///' - InsertLayer - Kontext "EbeneEinfuegenDlg" - '/// leave dialog with OK ///' - EbeneEinfuegenDlg.OK - sleep 2 - try - '/// Edit->Layer->Delete ///' - EditDeleteLayer - Kontext "Active" - Active.Yes - catch - WarnLog "There is no avaiable additional layer to delete" - endcatch - '/// close application ///' - hCloseDocument + Call hNewDocument + sleep 2 + ViewLayer + InsertLayer + Kontext "EbeneEinfuegenDlg" + EbeneEinfuegenDlg.OK + sleep 2 + try + EditDeleteLayer + Kontext "Active" + Active.Yes + catch + WarnLog "There is no avaiable additional layer to delete" + endcatch + hCloseDocument endcase diff --git a/testautomation/graphics/optional/includes/global/g_spellcheck.inc b/testautomation/graphics/optional/includes/global/g_spellcheck.inc index 95f95f1b0871..c2ab184675c7 100755 --- a/testautomation/graphics/optional/includes/global/g_spellcheck.inc +++ b/testautomation/graphics/optional/includes/global/g_spellcheck.inc @@ -1,7 +1,7 @@ 'encoding UTF-8 Do not remove or change this line! '************************************************************************** '* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. -'* +'* '* Copyright 2008 by Sun Microsystems, Inc. '* '* OpenOffice.org - a multi-platform office productivity suite @@ -56,12 +56,9 @@ testcase tiToolsSpellcheckCorrect lFiles(0)=0 Printlog "- Checking Dictionary-Files" ' borrowed from w_106.inc - '/// check if dictionary exists for this EUROPEAN language as file ///' - '///+ share/dict/$iSprache-hyph.dat ///' - '///+ print all dictionaries from share/dict/*.dat ///' select case iSprache - case 01 : DieDatei = "01-44-hyph.dat" - case else : DieDatei = "" & iSprache & "-hyph.dat" + case 01 : DieDatei = "01-44-hyph.dat" + case else : DieDatei = "" & iSprache & "-hyph.dat" end select DieDatei = Convertpath(gNetzOfficePath + "share\dict\" + DieDatei) if gPlatGroup <> "unx" then @@ -71,9 +68,9 @@ testcase tiToolsSpellcheckCorrect else if gNetzInst then printlog "Dictionary not found : " + DieDatei - else + else warnlog "Dictionary not found : " + DieDatei - end if + end if end if else Printlog " Dictionary has been installed : " + DieDatei @@ -84,14 +81,10 @@ testcase tiToolsSpellcheckCorrect printlog " " + i + ": " + DateiExtract(lFiles(i)) next i - PrintLog "'/// Spellcheck without text ///'" - '///+ Open new document ///' Call hNewDocument -' sleep 2 - '///+ call 'Tools->Spellcheck->Check' ///' + ' sleep 2 ToolsSpellcheck Kontext "Active" - '///+ There has to come up only one active: 'Spellcehck of entire document has been completed [OK]' ///' if Active.Exists(5) then try printlog "Message: Finished: Want to continue at the beginning? '" + active.gettext + "'" @@ -106,35 +99,32 @@ testcase tiToolsSpellcheckCorrect sleep 2 PrintLog "- Spellcheck with correct text" - '/// create textbox without a spelling error ///' select case iSprache - case 01 : hTextrahmenErstellen ("This is a text without any error.",10,10,50,20) - case 33 : hTextrahmenErstellen ("Il nous faut donc un de temps pour examiner avec soin tous les dossiers.",10,10,70,20) - case 34 : hTextrahmenErstellen ("Este es un chico muy importante.",10,10,50,20) - case 36 : hTextrahmenErstellen ("akit a b�r�s�g vagy a szab�lys�rt�si hat�s�g a eltiltott",10,10,70,20) - case 39 : hTextrahmenErstellen ("La ringraziamo per l'interesse mostrato a collaborare con la firma.",10,10,70,20) - case 46 : hTextrahmenErstellen ("Det varierar vad som behandlas och ur vilket perspektiv.",10,10,50,20) - case 49 : hTextrahmenErstellen ("Dies ist ein Text ohne Fehler.",10,10,50,20) - case 55 : hTextrahmenErstellen ("Esta poderia ser a resposta para suas preces?",10,10,50,20) - case else : - if bAsianLan then - printlog "For the language " + iSprache +" nothing is prepared yet, but is AsianLan, so OK :-) will use english instaed" - ' there was smth wrong, try to find out : - kontext - if active.exists then - printlog "ERROR: active: '"+active.gettext+"'" - active.ok - end if - hTextrahmenErstellen ("This is a text without any error.",10,10,50,20) - else - Warnlog "For the language " + iSprache +" nothing is prepared yet: insert text here" - hTextrahmenErstellen ("This is a text without any error.",10,10,50,20) + case 01 : hTextrahmenErstellen ("This is a text without any error.",10,10,50,20) + case 33 : hTextrahmenErstellen ("Il nous faut donc un de temps pour examiner avec soin tous les dossiers.",10,10,70,20) + case 34 : hTextrahmenErstellen ("Este es un chico muy importante.",10,10,50,20) + case 36 : hTextrahmenErstellen ("akit a b�r�s�g vagy a szab�lys�rt�si hat�s�g a eltiltott",10,10,70,20) + case 39 : hTextrahmenErstellen ("La ringraziamo per l'interesse mostrato a collaborare con la firma.",10,10,70,20) + case 46 : hTextrahmenErstellen ("Det varierar vad som behandlas och ur vilket perspektiv.",10,10,50,20) + case 49 : hTextrahmenErstellen ("Dies ist ein Text ohne Fehler.",10,10,50,20) + case 55 : hTextrahmenErstellen ("Esta poderia ser a resposta para suas preces?",10,10,50,20) + case else : + if bAsianLan then + printlog "For the language " + iSprache +" nothing is prepared yet, but is AsianLan, so OK :-) will use english instaed" + ' there was smth wrong, try to find out : + kontext + if active.exists then + printlog "ERROR: active: '"+active.gettext+"'" + active.ok end if + hTextrahmenErstellen ("This is a text without any error.",10,10,50,20) + else + Warnlog "For the language " + iSprache +" nothing is prepared yet: insert text here" + hTextrahmenErstellen ("This is a text without any error.",10,10,50,20) + end if end select - '///+ call 'Tools->Spellcheck->Check' ///' ToolsSpellcheck WaitSlot (2000) - '///+ There has to come up only one active: 'Spellcheck of entire document has been completed [OK]' ///' Kontext "Active" if active.exists(5) then printlog "Message: spellchecking has finished?: '" + active.gettext + "'" @@ -150,7 +140,6 @@ testcase tiToolsSpellcheckCorrect end if end if WaitSlot (2000) - '/// close document ///' Call hCloseDocument endcase 'tiToolsSpellcheckCorrect @@ -170,24 +159,24 @@ testcase tiToolsSpellcheckError Call hNewDocument printlog "Selecting language case: " & iSprache select case iSprache - case 01 : FehlerText$ = "Thatt is a failure test." : Fehler$ = "Thatt" : Sprachenname$ = "English (US)" - case 34 : FehlerText$ = "Ezte es un chico muy importante." : Fehler$ = "Ezte" : Sprachenname$ = "Niederlaendisch" - case 33 : FehlerText$ = "Ler nous faut donc un de temps pour examiner." : Fehler$ = "Ler" : Sprachenname$ = "Franzoesisch" - case 36 : FehlerText$ = "Boszniai americkai kontingens háromnegyedesek – mintegy négyezer katona – magyarországi telepítése egy éven belül megtörténhet" : Fehler$ = "tellepítésel" : Sprachenname$ = "Ungarisch" - case 39 : FehlerText$ = "Ringrarziamo per l'interessa mostrato a collaborare con la firma." : Fehler$ = "Ringrarziamo" : Sprachenname$ = "Italienisch" - case 46 : FehlerText$ = "Detd varierar vad som behandlas och ur vilket perspektiv." : Fehler$ = "Detd" : Sprachenname$ = "Schwedisch" - case 49 : FehlerText$ = "Diees ist ein Fehler." : Fehler$ = "Diees" : Sprachenname$ = "Deutsch" - case 55 : FehlerText$ = "Eesta poderia ser a resposta para suas preces?": Fehler$ = "Eesta" : Sprachenname$ = "Portugiesisch" - case else : - if bAsianLan then - printlog "For the language " + iSprache +" nothing is prepared yet, but is AsianLan, so OK :-) using english" - FehlerText$ = "Thatt is a failure test." - Fehler$ = "Thatt" - Sprachenname$ = "English (US)" - call hSetSpellHypLanguage - else - Warnlog "For the language " + iSprache +" nothing is prepared yet: insert text here" - end if + case 01 : FehlerText$ = "Thatt is a failure test." : Fehler$ = "Thatt" : Sprachenname$ = "English (US)" + case 34 : FehlerText$ = "Ezte es un chico muy importante." : Fehler$ = "Ezte" : Sprachenname$ = "Niederlaendisch" + case 33 : FehlerText$ = "Ler nous faut donc un de temps pour examiner." : Fehler$ = "Ler" : Sprachenname$ = "Franzoesisch" + case 36 : FehlerText$ = "Boszniai americkai kontingens háromnegyedesek – mintegy négyezer katona – magyarországi telepítése egy éven belül megtörténhet" : Fehler$ = "tellepítésel" : Sprachenname$ = "Ungarisch" + case 39 : FehlerText$ = "Ringrarziamo per l'interessa mostrato a collaborare con la firma." : Fehler$ = "Ringrarziamo" : Sprachenname$ = "Italienisch" + case 46 : FehlerText$ = "Detd varierar vad som behandlas och ur vilket perspektiv." : Fehler$ = "Detd" : Sprachenname$ = "Schwedisch" + case 49 : FehlerText$ = "Diees ist ein Fehler." : Fehler$ = "Diees" : Sprachenname$ = "Deutsch" + case 55 : FehlerText$ = "Eesta poderia ser a resposta para suas preces?": Fehler$ = "Eesta" : Sprachenname$ = "Portugiesisch" + case else : + if bAsianLan then + printlog "For the language " + iSprache +" nothing is prepared yet, but is AsianLan, so OK :-) using english" + FehlerText$ = "Thatt is a failure test." + Fehler$ = "Thatt" + Sprachenname$ = "English (US)" + call hSetSpellHypLanguage + else + Warnlog "For the language " + iSprache +" nothing is prepared yet: insert text here" + end if end select printlog "Error Text taken for testing is: " & FehlerText$ sleep 2 @@ -206,7 +195,7 @@ testcase tiToolsSpellcheckError ExtrasOptionenDlg.OK printlog "Create 1 textbox with 1 spelling error (test replace always)" hTextrahmenErstellen (FehlerText$,30,30,90,40) - + hTypeKeys "" printlog "Call 'Tools->Spellcheck->Check'" ToolsSpellcheck @@ -250,18 +239,18 @@ testcase tiToolsSpellcheckError Spellcheck.Close Kontext "Active" if active.exists(5) then - Printlog "Spellcheck dialog closed'" + active.gettext + "'" - Active.OK + Printlog "Spellcheck dialog closed'" + active.gettext + "'" + Active.OK else - Printlog "Spellcheck dialog closed'" + Printlog "Spellcheck dialog closed'" end if end if else Warnlog " Error not recognized by the Spellchecker" if active.exists(5) then - Kontext "Active" - printlog "Message: spellchecking has finished?: '" + active.gettext + "'" - Active.OK + Kontext "Active" + printlog "Message: spellchecking has finished?: '" + active.gettext + "'" + Active.OK end if end if @@ -274,7 +263,7 @@ testcase tiToolsSpellcheckError Printlog "Check function Ignore" hTextrahmenErstellen (FehlerText$,30,30,80,40) printlog "All 'Tools->Spellcheck->Check'." - + 'printlog "Setting Text to english" 'sleep 1 'EditSelectAll @@ -285,7 +274,7 @@ testcase tiToolsSpellcheckError 'Kontext "TabFont" 'Language.Select 41 'TabFont.OK - + ToolsSpellcheck Kontext "Spellcheck" printlog "press button 'Ignore'" @@ -302,10 +291,10 @@ testcase tiToolsSpellcheckError Spellcheck.Close Kontext "Active" if active.exists(5) then - Printlog " Spellcheck dialog closed'" + active.gettext + "'" - Active.OK + Printlog " Spellcheck dialog closed'" + active.gettext + "'" + Active.OK else - Printlog " Spellcheck dialog closed'" + Printlog " Spellcheck dialog closed'" end if end if @@ -317,10 +306,10 @@ testcase tiToolsSpellcheckError Spellcheck.Close Kontext "Active" if active.exists(5) then - Printlog " " + active.gettext + "'" - Active.OK + Printlog " " + active.gettext + "'" + Active.OK else - Printlog " Spellcheck dialog closed'" + Printlog " Spellcheck dialog closed'" end if else Warnlog " Spellcheck ended even we only ignored the error" @@ -333,7 +322,7 @@ testcase tiToolsSpellcheckError printlog "create same textbox again (test ALWAYS IGNORE function)." hTextrahmenErstellen (FehlerText$,30,30,60,40) - + 'printlog "Setting Text to english" 'sleep 1 'EditSelectAll @@ -344,7 +333,7 @@ testcase tiToolsSpellcheckError 'Kontext "TabFont" 'Language.Select 41 'TabFont.OK - + printlog "Call 'Tools->Spellcheck->Check'." ToolsSpellcheck Kontext "Spellcheck" @@ -362,10 +351,10 @@ testcase tiToolsSpellcheckError Spellcheck.Close Kontext "Active" if active.exists(5) then - Printlog " Spellcheck dialog closed'" + active.gettext + "'" - Active.OK + Printlog " Spellcheck dialog closed'" + active.gettext + "'" + Active.OK else - Printlog " Spellcheck dialog closed'" + Printlog " Spellcheck dialog closed'" end if end if @@ -401,8 +390,8 @@ testcase tiToolsSpellcheckCheck Dim bFound as boolean Select Case Ucase(gApplication) - case "DRAW" : sExt = ".odg" - case "IMPRESS" : sExt = ".odp" + case "DRAW" : sExt = ".odg" + case "IMPRESS" : sExt = ".odp" end select printlog "Load prepared document containing 4 errors : graphics\\required\\input\\recht_" & iSprache & sExt @@ -420,14 +409,14 @@ testcase tiToolsSpellcheckCheck end if end if select case iSprache ' sWord(1)=red : sWord(2)=turquoise - case 01 : sWord(1) = "documente" : sWord(2) = "expriss" - case 33 : sWord(1) = "intercu" : sWord(2) = "Lees" - case 34 : sWord(1) = "afekto" : sWord(2) = "fratternal" - case 36 : sWord(1) = "szeerint" : sWord(2) = "tervvezi" - case 39 : sWord(1) = "Millano" : sWord(2) = "tarrget" - case 46 : sWord(1) = "desa" : sWord(2) = "occh" - case 49 : sWord(1) = "Texxt" : sWord(2) = "reichtt" - case 55 : sWord(1) = "esktava" : sWord(2) = "noitee" + case 01 : sWord(1) = "documente" : sWord(2) = "expriss" + case 33 : sWord(1) = "intercu" : sWord(2) = "Lees" + case 34 : sWord(1) = "afekto" : sWord(2) = "fratternal" + case 36 : sWord(1) = "szeerint" : sWord(2) = "tervvezi" + case 39 : sWord(1) = "Millano" : sWord(2) = "tarrget" + case 46 : sWord(1) = "desa" : sWord(2) = "occh" + case 49 : sWord(1) = "Texxt" : sWord(2) = "reichtt" + case 55 : sWord(1) = "esktava" : sWord(2) = "noitee" case else : if bAsianLan then sWord(1) = "documente" : sWord(2) = "expriss" @@ -459,16 +448,16 @@ testcase tiToolsSpellcheckCheck for i = 1 to iBooks Buch.select(i) printlog "Items in Booklist: " & WordList.getItemCount - for j = 1 to 2 - Wort.setText sWord(j) - sleep 1 - if ((not neu.isEnabled) and Loeschen.isEnabled) then - printlog "If it contains the word, press button 'delete'." - Loeschen.click - bWordFound(j) = true - printlog "Added word WAS in dictionary: '" + Buch.getSelText + "' - '" + sWord(j) + "'" - end if - next j + for j = 1 to 2 + Wort.setText sWord(j) + sleep 1 + if ((not neu.isEnabled) and Loeschen.isEnabled) then + printlog "If it contains the word, press button 'delete'." + Loeschen.click + bWordFound(j) = true + printlog "Added word WAS in dictionary: '" + Buch.getSelText + "' - '" + sWord(j) + "'" + end if + next j next i if (bWordFound(1) OR bWordFound(2))then qaErrorLog "Word was found in dictionary - check why it was there. '" + sWord(1) + "': " + bWordFound(1) + " '" + sWord(2) + "': " + bWordFound(2) @@ -514,10 +503,10 @@ testcase tiToolsSpellcheckCheck Spellcheck.Close Kontext "Active" if active.exists(5) then - Warnlog " Should not be any message here: " + active.gettext + "'" - Active.OK + Warnlog " Should not be any message here: " + active.gettext + "'" + Active.OK else - printlog "Spellcheck ended, dialog closed" + printlog "Spellcheck ended, dialog closed" end if printlog "Select all." hTypeKeys "" @@ -598,7 +587,7 @@ testcase tiToolsSpellcheckCheck warnlog "Ignore didn't work? Spellcheck didn't go on" end if if (sWord(iWord(1)) <> sWordTwo) then - Printlog "The errornous word '" + sWord(iWord(1)) + "' would be replaced with: '" + sWordTwo + "'" + Printlog "The errornous word '" + sWord(iWord(1)) + "' would be replaced with: '" + sWordTwo + "'" end if printlog "********* word found: '" + sWordTwo + "'" printlog "##### suggestions: "+Suggestions.GetItemCount+"; Language: "+DictionaryLanguage.getSelText ' +" ; dictionary: "+woerterbuch.getSelText @@ -671,14 +660,14 @@ testcase tiToolsSpellcheckCheck warnlog "Add didn't work? Spellcheck didn't go on." end if if (sWord(iWord(2)) <> sWordTwo) then - Printlog "The erroneous word '" + sWord(iWord(2)) + "' would be replaced with: '" + sWordTwo + "'" + Printlog "The erroneous word '" + sWord(iWord(2)) + "' would be replaced with: '" + sWordTwo + "'" else - warnlog "ERROR: SAME WORD in the dictionary as in the text??? Must be wrong." + warnlog "ERROR: SAME WORD in the dictionary as in the text??? Must be wrong." end if printlog "********* word found: '" + sWordTwo + "'" printlog "##### suggestions: "+Suggestions.GetItemCount+"; Language: "+DictionaryLanguage.getSelText ' +" ; dictionary: "+DictionaryLanguage.getSelText 'Wort.GetItemCount 'Woerterbuch.GetSelText if (Suggestions.GetItemCount > 0) then 'Wort.GetItemCount > 0) then - printlog "----- "+i+": "+Suggestions.GetItemText (1) 'Wort.GetItemText (1) + printlog "----- "+i+": "+Suggestions.GetItemText (1) 'Wort.GetItemText (1) end if Sleep 1 printlog "Click button 'Always ignore' on dialog." @@ -771,7 +760,7 @@ testcase tiToolsSpellcheckCheck Sleep 1 printlog "click button 'Always Replace'." if (iSuggestions > 0) then - ChangeAll.click + ChangeAll.click else qaErrorLog "Please change the text in the file, so the spellchecker can make a suggestion for the word: '" + sWordTwo + "'" IgnoreOnce.Click @@ -884,15 +873,11 @@ testcase tToolsSpellcheckAutoSpellcheck dim iError as long dim sError as string - '/// open new document ///' call hNewDocument - '/// insert text 'Ein Tipp: Schiffahrt schreibt man nun mit 3f' ///' call hTextrahmenErstellen ("Ein Tipp: Schiffahrt schreibt man nun mit 3f Tunfisch Amboss a", 10, 10, 90, 50) - '/// select the whole text ///' EditSelectAll - '/// on dialog 'format-character' set language to english ///' setCharacterLanguage(glLocale(4)) sleep 10 printlog "## check ENGLISH auto spellchecking" @@ -916,7 +901,7 @@ testcase tToolsSpellcheckAutoSpellcheck end if sleep 1 -' call hTypeKeys "" + ' call hTypeKeys "" call hTypeKeys " " setCharacterLanguage(glLocale(6)) sleep 10 @@ -939,7 +924,6 @@ testcase tToolsSpellcheckAutoSpellcheck end if printlog "-----------------------------------" - '/// close application ///' hCloseDocument() endcase 'tToolsSpellcheckAutoSpellcheck diff --git a/testautomation/graphics/optional/includes/global/g_stylist.inc b/testautomation/graphics/optional/includes/global/g_stylist.inc index 356f2cfdc1ab..6933180d20f6 100755 --- a/testautomation/graphics/optional/includes/global/g_stylist.inc +++ b/testautomation/graphics/optional/includes/global/g_stylist.inc @@ -1,7 +1,7 @@ 'encoding UTF-8 Do not remove or change this line! '************************************************************************** '* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. -'* +'* '* Copyright 2008 by Sun Microsystems, Inc. '* '* OpenOffice.org - a multi-platform office productivity suite @@ -56,14 +56,11 @@ testcase tFormatStylistFlyer Dim ySize% printlog " - Format/Stylist : using all possible things to manipulate the flyer" - '/// open application ///' Call hNewDocument Kontext "Gestalter" - '/// Check if stylist is there. Expected: not there ///' if Gestalter.NotExists = false Then qaErrorLog " - Expected Stylist to be closed; But is Open. Check tests." else - hTypekeys "" '/// open stylist by pressing key [F11] ///' sleep 1 end if Kontext "Gestalter" @@ -71,84 +68,64 @@ testcase tFormatStylistFlyer Warnlog " No stylist popped up using F11; opening now via slotID" FormatStylist end if - '///+ save stylist position and size ///' xPos% = Gestalter.GetPosX yPos% = Gestalter.GetPosY xSize% = Gestalter.GetSizeX ySize% = Gestalter.GetSizeY - '///+ if Stylist is docked; undock ///' if Gestalter.IsDocked then Gestalter.UnDock - printlog " - '///move stylist ///" - '///+ move stylist to 10,10 ///' - Gestalter.Move 10, 10 - Sleep 1 - '///+ move stylist to 300,400 ///' - Gestalter.Move 300, 400 - Sleep 1 - '///+ move stylist to 590,790 ///' - Gestalter.Move 590, 790 - Sleep 1 - '///+ move stylist back to saved start position ///' - Gestalter.Move xPos%, yPos% - Sleep 1 - - printlog " - '///size stylist ///" - '///+ change size to 200,200 ///' - Gestalter.Size 200, 200 - Sleep 1 - '///+ change size to 300,400 ///' - Gestalter.Size 300, 400 - Sleep 1 - '///+ change size to 150,250 ///' - Gestalter.Size 150, 250 - Sleep 1 - '///+ change size back to saved size ///' - Gestalter.Size xSize%, ySize% - Sleep 1 - - printlog " - Close stylist reopen stylist, check if appearence is same as before" - '/// save stylist position and size ///' - xPos% = Gestalter.GetPosX - yPos% = Gestalter.GetPosY - xSize% = Gestalter.GetSizeX - ySize% = Gestalter.GetSizeY - '/// close stylist Format->Stylist ///' - FormatStylist - Sleep 1 - '/// open stylist Format->Stylist ///' - FormatStylist - sleep (1) - if xPos% <> Gestalter.GetPosX then Warnlog "The x-Pos. has changed : Should be -> '"+ xPos% + "' Is -> '"+ Gestalter.GetPosX +"'." - if yPos% <> Gestalter.GetPosY then Warnlog "The y-Pos. has changed : Should be -> '"+ yPos% + "' Is -> '"+ Gestalter.GetPosY +"'." - if xSize% <> Gestalter.GetSizeX then Warnlog "The x-Size has changed : Should be -> '"+ xSize% + "' Is -> '"+ Gestalter.GetSizeX +"'." - if ySize% <> Gestalter.GetSizeY then Warnlog "The y-Size has changed : Should be -> '"+ ySize% + "' Is -> '"+ Gestalter.GetSizeY +"'." + Gestalter.Move 10, 10 + Sleep 1 + Gestalter.Move 300, 400 + Sleep 1 + Gestalter.Move 590, 790 + Sleep 1 + Gestalter.Move xPos%, yPos% + Sleep 1 - printlog " - dock stylist" - '/// dock stylist ///' - Gestalter.Dock - Sleep 1 - if (NOT Gestalter.IsDocked) then - warnlog " stylist not docked but should" - endif - '/// UNdock stylist ///' - if (Gestalter.IsDocked) Then - Gestalter.UnDock - endif - Sleep 1 + Gestalter.Size 200, 200 + Sleep 1 + Gestalter.Size 300, 400 + Sleep 1 + Gestalter.Size 150, 250 + Sleep 1 + Gestalter.Size xSize%, ySize% + Sleep 1 - printlog " - maximize/minimize stylist" - '/// minimize stylist ///' - Gestalter.Minimize - Sleep 1 - '/// maximize stylist ///' - Gestalter.Maximize - Sleep 1 - if (NOT Gestalter.IsMax) then - warnlog " The stylist did not return to maximized state" - endif - '/// close stylist ///' - Gestalter.Close - Call hCloseDocument + printlog " - Close stylist reopen stylist, check if appearence is same as before" + xPos% = Gestalter.GetPosX + yPos% = Gestalter.GetPosY + xSize% = Gestalter.GetSizeX + ySize% = Gestalter.GetSizeY + FormatStylist + Sleep 1 + FormatStylist + sleep (1) + if xPos% <> Gestalter.GetPosX then Warnlog "The x-Pos. has changed : Should be -> '"+ xPos% + "' Is -> '"+ Gestalter.GetPosX +"'." + if yPos% <> Gestalter.GetPosY then Warnlog "The y-Pos. has changed : Should be -> '"+ yPos% + "' Is -> '"+ Gestalter.GetPosY +"'." + if xSize% <> Gestalter.GetSizeX then Warnlog "The x-Size has changed : Should be -> '"+ xSize% + "' Is -> '"+ Gestalter.GetSizeX +"'." + if ySize% <> Gestalter.GetSizeY then Warnlog "The y-Size has changed : Should be -> '"+ ySize% + "' Is -> '"+ Gestalter.GetSizeY +"'." + + printlog " - dock stylist" + Gestalter.Dock + Sleep 1 + if (NOT Gestalter.IsDocked) then + warnlog " stylist not docked but should" + endif + if (Gestalter.IsDocked) Then + Gestalter.UnDock + endif + Sleep 1 + + printlog " - maximize/minimize stylist" + Gestalter.Minimize + Sleep 1 + Gestalter.Maximize + Sleep 1 + if (NOT Gestalter.IsMax) then + warnlog " The stylist did not return to maximized state" + endif + Gestalter.Close + Call hCloseDocument endcase testcase tFormatStylistDocuments @@ -158,12 +135,9 @@ testcase tFormatStylistDocuments Dim ySize% as Integer printlog " - Format/Stylist : check methods with more than 1 document" - '/// open application 1 ///' Call hNewDocument printlog " - Open stylist, check stylist in another document" - '/// Format->Stylist ///' FormatStylist - '/// open application 2 ///' Call hNewDocument Kontext "Gestalter" if (Gestalter.NotExists) then @@ -172,13 +146,10 @@ testcase tFormatStylistDocuments endif printlog " - Close all documents, reopen 1" - '/// File->Close 2 ///' FileClose Sleep 2 - '/// File->Close 1 ///' FileClose Sleep 2 - '/// open application 1 ///' hNewDocument Kontext "Gestalter" if (Gestalter.NotExists) then @@ -186,10 +157,8 @@ testcase tFormatStylistDocuments endif printlog " - stylist in a document docked, in a new rechecked" - '/// dock stylist ///' Gestalter.Dock Sleep 3 - '/// open application 2 ///' hNewDocument sleep 3 Kontext "Gestalter" @@ -198,14 +167,11 @@ testcase tFormatStylistDocuments endif printlog " - Close all documents, reopen one and check the docked stylist" - '/// File->Close 2 ///' FileClose Sleep 2 - '/// File->Close 1 ///' FileClose Sleep 2 Kontext "Gestalter" - '/// open application 1 ///' hNewDocument Kontext "Gestalter" if NOT Gestalter.IsDocked then @@ -213,17 +179,14 @@ testcase tFormatStylistDocuments endif printlog " - Close stylist using F11" - '/// undock stylist ///' Gestalter.Undock Sleep 1 - '/// close stylist with key [F11] ///' hTypeKeys "" Kontext "Gestalter" if Gestalter.exists then warnlog " Stylist still exists - closing again" Gestalter.Close end if - '/// close application 1 ///' Call hCloseDocument endcase @@ -232,10 +195,8 @@ testcase tFormatStylistTemplatesUse Dim save as integer printlog "- Format/Stylist : use all templates" - '/// open application ///' hNewDocument sleep 1 - '/// Format->Stylist ///' FormatStylist sleep 1 Kontext "Gestalter" @@ -244,34 +205,28 @@ testcase tFormatStylistTemplatesUse FormatStylist endif printlog " - Presentation-templates" - '/// if application is impress: click on button 'Presentation Styles' ///' if (Lcase (gApplication) = "IMPRESS") then TBGestalter.Click Praesentationsvorlagen endif - '/// select every item from the list 'Styles' ///' save = Gruppenliste.GetSelIndex for i=1 to Gruppenliste.GetItemCount Gruppenliste.Select i Sleep 1 next i - '/// click on button 'Graphics Styles' ///' TBGestalter.Click Grafikvorlagen Sleep 2 printlog " - Graphic-templates" - '/// select every item from the list 'Styles' ///' for i=1 to Gruppenliste.GetItemCount Gruppenliste.Select i Sleep 1 next i sleep 1 Gruppenliste.Select save - - '/// close stylist ///' + Gestalter.Close sleep 3 - '/// close application ///' Call hCloseDocument endcase @@ -281,74 +236,59 @@ testcase tFormatStylistTemplateCreate dim Zaehler printlog "- Format/stylist :Create template and use it" - '/// open application ///' Call hNewDocument sleep 3 printlog " - create template for paragraph" - '/// Format->Styles->Catalog... ///' FormatStylesCatalog - Kontext "VorlagenKatalog" - sleep 2 - printlog " " + Vorlagen.GetItemCount - '/// select first template ///' - Vorlagen.Select 1 - sleep 3 - '/// click button 'New...' ///' - Neu.Click - sleep 2 - Kontext - '/// select tabpage 'Organzier' ///' - Active.SetPage TabVerwalten - Kontext "TabVerwalten" - '/// set textfield 'Name' to 'ATesttool' ///' - VorlagenName.SetText "ATesttool" - '/// close dialog 'Graphic styles' with OK ///' - TabVerwalten.OK - sleep 2 - Kontext "VorlagenKatalog" - sleep 1 - '/// close dialog 'Style Catalog' ///' - VorlagenKatalog.Close + Kontext "VorlagenKatalog" + sleep 2 + printlog " " + Vorlagen.GetItemCount + Vorlagen.Select 1 + sleep 3 + Neu.Click + sleep 2 + Kontext + Active.SetPage TabVerwalten + Kontext "TabVerwalten" + VorlagenName.SetText "ATesttool" + TabVerwalten.OK + sleep 2 + Kontext "VorlagenKatalog" + sleep 1 + VorlagenKatalog.Close sleep 1 Printlog " - New created template will be deleted now" - '/// Format->Styles->Catalog... ///' FormatStylesCatalog - sleep 1 - Kontext "Vorlagenkatalog" - sleep 1 - Vorlagen.Select 1 - sleep 1 - '/// search for the created entry 'ATesttool' ///' - zaehler=Ansicht.getItemCount - i=0 - do - inc i - loop while ((Ansicht.getItemText(i) <> "ATesttool") AND (i <= zaehler)) - if i>zaehler then - warnlog " error" - endif - '/// select the entry ///' - Ansicht.Select i - sleep 1 - Ansicht.TypeKeys "" - sleep 1 - '/// click button 'Delete...' ///' - Loeschen.Click - '/// say YES to 'Do you realy want to delete Style ...' ///' - Kontext "Active" - Active.Yes - sleep 1 - Kontext "Vorlagenkatalog" - '/// close dialog 'Style Catalog' ///' - Vorlagenkatalog.Close sleep 1 - Kontext "DocumentDraw" - gMouseClick 90,90 + Kontext "Vorlagenkatalog" sleep 1 - '/// close application ///' - Call hCloseDocument + Vorlagen.Select 1 sleep 1 + zaehler=Ansicht.getItemCount + i=0 + do + inc i +loop while ((Ansicht.getItemText(i) <> "ATesttool") AND (i <= zaehler)) +if i>zaehler then + warnlog " error" +endif +Ansicht.Select i +sleep 1 +Ansicht.TypeKeys "" +sleep 1 +Loeschen.Click +Kontext "Active" +Active.Yes +sleep 1 +Kontext "Vorlagenkatalog" +Vorlagenkatalog.Close +sleep 1 +Kontext "DocumentDraw" +gMouseClick 90,90 +sleep 1 +Call hCloseDocument +sleep 1 endcase testcase tFormatStylistTemplateSelect @@ -358,87 +298,74 @@ testcase tFormatStylistTemplateSelect dim sTemp as string printlog " - Format/Stylist : select template" - '/// open application ///' Call hNewDocument - '/// insert a textframe with text and select the text ///' hTextrahmenErstellen ("This is a formatted text ",20,20,80,30) printlog " - format text" - '/// Format->Character ///' FormatCharacter - Kontext - '/// select tabpage 'Font' ///' - Active.SetPage TabFont - Kontext "TabFont" - '/// close dialog 'Font' with OK ///' - TabFont.OK + Kontext + Active.SetPage TabFont + Kontext "TabFont" + TabFont.OK printlog " - choose format using stylist" - '/// Format->Stylist ///' FormatStylist - '/// compare, if every entry can be selected from the list 'templates' ///' - '///+ if there are double entries, then you can't go throgh the list with just pressin [down], ///' - '///+ but it works going from the bottom [up] -> count the uniqe entries for both directions and compare! ///' - Kontext "Gestalter" - sleep 1 - ' going from bottom to top - Vorlagenliste.TypeKeys "" - for i = 1 to 20 - ListAppend(sListUp(), Vorlagenliste.GetText) - Vorlagenliste.TypeKeys "" - next i - ' going from top to bottom - Vorlagenliste.TypeKeys "" - for i = 1 to 20 - ListAppend(sListDown(), Vorlagenliste.GetText) - Vorlagenliste.TypeKeys "" - next i - ' delete double entries in both lists (up/down) - sTemp = sListUp(20) - for i = 19 to 1 step -1 - if (sListUp(i) = sTemp) then - printlog i - ListDelete(sListUp(), i+1) - endif - sTemp = sListUp(i) - next i - sTemp = sListDown(20) - for i = 19 to 1 step -1 - if (sListDown(i) = sTemp) then - ListDelete(sListDown(), i+1) - endif - sTemp = sListDown(i) - next i - ' if there are double entries... - if (ListCount(sListUp()) <> ListCount(sListDown())) then - if (iSprache = 82) then ' WorkAround BUG: #111652# - warnLog "There are double entries in the list! Up: " + ListCount(sListUp()) + "; Down: " +ListCount(sListDown()) - elseif (iSprache = 07) then - warnlog "There are missing entries in the list. Will be fixed in CWS the 06.02.2006. - FHA" 'Russian TODO -FHA - else - warnlog "There are double entries in the list! Up: " + ListCount(sListUp()) + "; Down: " +ListCount(sListDown()) - endif - for i = ListCount(sListUp()) to 1 step -1 - printlog "* " + i + ": '" + sListUp(i) + "'" - next i + Kontext "Gestalter" + sleep 1 + ' going from bottom to top + Vorlagenliste.TypeKeys "" + for i = 1 to 20 + ListAppend(sListUp(), Vorlagenliste.GetText) + Vorlagenliste.TypeKeys "" + next i + ' going from top to bottom + Vorlagenliste.TypeKeys "" + for i = 1 to 20 + ListAppend(sListDown(), Vorlagenliste.GetText) + Vorlagenliste.TypeKeys "" + next i + ' delete double entries in both lists (up/down) + sTemp = sListUp(20) + for i = 19 to 1 step -1 + if (sListUp(i) = sTemp) then + printlog i + ListDelete(sListUp(), i+1) endif - '/// doubleclick in list onto the entry 'Default' ///' - ' here this method has to stay, because it will also find some errors; - ' the method, that works even with an error in the list is shown in testcase tFormatStylistTemplateNew - hDoubleClickInList ( Vorlagenliste, glLocale (3) ) - Gestalter.Close + sTemp = sListUp(i) + next i + sTemp = sListDown(20) + for i = 19 to 1 step -1 + if (sListDown(i) = sTemp) then + ListDelete(sListDown(), i+1) + endif + sTemp = sListDown(i) + next i + ' if there are double entries... + if (ListCount(sListUp()) <> ListCount(sListDown())) then + if (iSprache = 82) then ' WorkAround BUG: #111652# + warnLog "There are double entries in the list! Up: " + ListCount(sListUp()) + "; Down: " +ListCount(sListDown()) + elseif (iSprache = 07) then + warnlog "There are missing entries in the list. Will be fixed in CWS the 06.02.2006. - FHA" 'Russian TODO -FHA + else + warnlog "There are double entries in the list! Up: " + ListCount(sListUp()) + "; Down: " +ListCount(sListDown()) + endif + for i = ListCount(sListUp()) to 1 step -1 + printlog "* " + i + ": '" + sListUp(i) + "'" + next i + endif + ' here this method has to stay, because it will also find some errors; + ' the method, that works even with an error in the list is shown in testcase tFormatStylistTemplateNew + hDoubleClickInList ( Vorlagenliste, glLocale (3) ) + Gestalter.Close printlog " - check Format" - '/// Format->Area ///' FormatArea - Kontext - '/// select tabpage 'Area' ///' - Active.SetPage TabArea - Kontext "TabArea" - 'TODO: TBO check criteria, that right template is used.... - ' ???? if Farbe.IsChecked then Printlog "Standard template is used" - TabArea.OK + Kontext + Active.SetPage TabArea + Kontext "TabArea" + 'TODO: TBO check criteria, that right template is used.... + ' ???? if Farbe.IsChecked then Printlog "Standard template is used" + TabArea.OK sleep 2 - '/// close application ///' hCloseDocument endcase @@ -449,117 +376,95 @@ testcase tFormatStylistTemplateNew dim i as integer printlog "- Format/Stylist : New template from selection" - '/// open application ///' Call hNewDocument - '/// create a textframe with content ///' hTextrahmenErstellen ("This text will soon be formatted and thereafter made as template",20,20,80,40) sleep 1 - '/// select some text in the frame ///' hTypeKeys "" - '/// call Format->Character ///' FormatCharacter Kontext - '/// select tabpage 'Font' ///' - Active.SetPage TabFont - Kontext "TabFont" - '/// cloce dialog 'character' with OK ///' - TabFont.OK + Active.SetPage TabFont + Kontext "TabFont" + TabFont.OK printlog " - Create template from selection" - '/// call Format->Stylist ///' FormatStylist - Kontext "Gestalter" - '/// click button 'Graphics Styles' ///' - TBGestalter.Click Grafikvorlagen - Sleep 1 - '/// Click button 'New from selection' ///' - TBGestalterRight.Click AusSelektion - Kontext "VorlageErzeugen" - '/// in textfield 'Style name' type 'Testtool' ///' - VorlagenName.SetText "Testtool" - '/// click button 'OK' on dialog 'Create Style' ///' - VorlageErzeugen.OK + Kontext "Gestalter" + TBGestalter.Click Grafikvorlagen + Sleep 1 + TBGestalterRight.Click AusSelektion + Kontext "VorlageErzeugen" + VorlagenName.SetText "Testtool" + VorlageErzeugen.OK printlog " - assign new graphic template to selected text" - '/// create a textframe with content ///' hTextrahmenErstellen ("This is another text",40,40,70,50) - '/// select some text in the frame ///' hTypeKeys "" - Kontext "Gestalter" - '/// click button 'Graphics Styles' in Stylist///' - TBGestalter.Click Grafikvorlagen - sleep 1 - ' test BUG: #111652# ' find illegal double entries in template list - ' going from bottom to top - Vorlagenliste.TypeKeys "" - for i = 1 to 20 - sTemp = Vorlagenliste.GetText - ListAppend(sListUp(), sTemp) - Vorlagenliste.TypeKeys "" - next i - ' going from top to bottom - Vorlagenliste.TypeKeys "" - for i = 1 to 20 - ListAppend(sListDown(), Vorlagenliste.GetText) - Vorlagenliste.TypeKeys "" - next i - ' delete double entries in both lists (up/down) - sTemp = sListUp(20) - for i = 19 to 1 step -1 - if (sListUp(i) = sTemp) then - ListDelete(sListUp(), i+1) - endif + Kontext "Gestalter" + TBGestalter.Click Grafikvorlagen + sleep 1 + ' test BUG: #111652# ' find illegal double entries in template list + ' going from bottom to top + Vorlagenliste.TypeKeys "" + for i = 1 to 20 + sTemp = Vorlagenliste.GetText + ListAppend(sListUp(), sTemp) + Vorlagenliste.TypeKeys "" + next i + ' going from top to bottom + Vorlagenliste.TypeKeys "" + for i = 1 to 20 + ListAppend(sListDown(), Vorlagenliste.GetText) + Vorlagenliste.TypeKeys "" + next i + ' delete double entries in both lists (up/down) + sTemp = sListUp(20) + for i = 19 to 1 step -1 + if (sListUp(i) = sTemp) then + ListDelete(sListUp(), i+1) + endif sTemp = sListUp(i) - next i - sTemp = sListDown(20) - for i = 19 to 1 step -1 - if (sListDown(i) = sTemp) then - ListDelete(sListDown(), i+1) - endif + next i + sTemp = sListDown(20) + for i = 19 to 1 step -1 + if (sListDown(i) = sTemp) then + ListDelete(sListDown(), i+1) + endif sTemp = sListDown(i) - next i - ' if any double entries... - if (ListCount(sListUp()) <> ListCount(sListDown())) then - if (iSprache = 82) then ' WorkAround BUG: #111652# - warnLog "82: There are double entries in the list! Up: " + ListCount(sListUp()) + "; Down: " +ListCount(sListDown()) - elseif (iSprache = 07) then - warnlog "There are missing entries in the list. Will be fixed in CWS the 06.02.2006. - FHA" 'Russian TODO -FHA - else - warnlog "There are double entries in the list! Up: " + ListCount(sListUp()) + "; Down: " +ListCount(sListDown()) - for i = ListCount(sListDown()) to 1 step -1 - printlog " - " + i + " " + sListDown(i) - next i - for i = ListCount(sListUp()) to 1 step -1 - printlog " - " + i + " " + sListUp(i) - next i - endif + next i + ' if any double entries... + if (ListCount(sListUp()) <> ListCount(sListDown())) then + if (iSprache = 82) then ' WorkAround BUG: #111652# + warnLog "82: There are double entries in the list! Up: " + ListCount(sListUp()) + "; Down: " +ListCount(sListDown()) + elseif (iSprache = 07) then + warnlog "There are missing entries in the list. Will be fixed in CWS the 06.02.2006. - FHA" 'Russian TODO -FHA + else + warnlog "There are double entries in the list! Up: " + ListCount(sListUp()) + "; Down: " +ListCount(sListDown()) + for i = ListCount(sListDown()) to 1 step -1 + printlog " - " + i + " " + sListDown(i) + next i + for i = ListCount(sListUp()) to 1 step -1 + printlog " - " + i + " " + sListUp(i) + next i endif - '/// go through list again from bottom and stop on the entry 'Testtool' ///' - Vorlagenliste.TypeKeys "" - i = 0 - do - inc i - sTemp = Vorlagenliste.GetText - Vorlagenliste.TypeKeys "" - loop while (("Testtool" <> sTemp) AND (i<20)) - '/// press key [Return] ///' - Vorlagenliste.TypeKeys "" - Kontext "Gestalter" - '/// close stylist ///' - Gestalter.Close - - Printlog " - check template" - '/// call Format->Character ///' - FormatCharacter - Kontext - '/// select tabpage 'Font' ///' - Active.SetPage TabFont - Kontext "TabFont" - '/// close dialog 'character' with OK ///' - TabFont.OK - '/// exit textframe by pressing Key 'Escape' two times ///' - hTypeKeys ("",2) - '/// close application ///' - hCloseDocument + endif + Vorlagenliste.TypeKeys "" + i = 0 + do + inc i + sTemp = Vorlagenliste.GetText + Vorlagenliste.TypeKeys "" +loop while (("Testtool" <> sTemp) AND (i<20)) +Vorlagenliste.TypeKeys "" +Kontext "Gestalter" +Gestalter.Close + +Printlog " - check template" +FormatCharacter +Kontext +Active.SetPage TabFont +Kontext "TabFont" +TabFont.OK +hTypeKeys ("",2) +hCloseDocument endcase testcase tiFormatStylist @@ -570,35 +475,33 @@ testcase tiFormatStylist Dim Num5 as integer ' : outline 1 ; where 9 items exist of select case iSprache - case 01: Num1 = 3 : Num2 = 1 : Num3 = 2 : Num4 = 3 : Num5 = 4 - case 07: Num1 = 3 : Num2 = 4 : Num3 = 2 : Num4 = 3 : Num5 = 1 'Russian TODO -FHA - case 31: Num1 = 1 : Num2 = 2 : Num3 = 3 : Num4 = 1 : Num5 = 5 - case 33: Num1 = 3 : Num2 = 1 : Num3 = 3 : Num4 = 2 : Num5 = 5 - case 34: Num1 = 2 : Num2 = 10 : Num3 = 12 : Num4 = 3 : Num5 = 4 - case 36: Num1 = 2 : Num2 = 3 : Num3 = 4 : Num4 = 10 : Num5 = 6 - case 39: Num1 = 2 : Num2 = 3 : Num3 = 2 : Num4 = 1 : Num5 = 5 - case 45: Num1 = 11 : Num2 = 2 : Num3 = 2 : Num4 = 13 : Num5 = 5 - case 46: Num1 = 2 : Num2 = 2 : Num3 = 3 : Num4 = 1 : Num5 = 4 - case 48: Num1 = 11 : Num2 = 13 : Num3 = 11 : Num4 = 1 : Num5 = 5 - case 49: Num1 = 1 : Num2 = 10 : Num3 = 11 : Num4 = 14 : Num5 = 1 - case 55: Num1 = 4 : Num2 = 12 : Num3 = 11 : Num4 = 10 : Num5 = 1 - ' case 81: Num1 = 9 : Num2 = 13 : Num3 = 14 : Num4 = 12 : Num5 = 1 Asian languages not testable, because locale dependant :-( - ' case 82: Num1 = 6 : Num2 = 11 : Num3 = 12 : Num4 = 10 : Num5 = 1 - ' case 86: Num1 = 15 : Num2 = 13 : Num3 = 14 : Num4 = 12 : Num5 = 2 - ' case 88: Num1 = 4 : Num2 = 13 : Num3 = 14 : Num4 = 3 : Num5 = 4 - case else : - if (bAsianLan = FALSE) then - Warnlog "For the language " + iSprache +" nothing is prepared yet: find numbers of entries in stylist and insert here" - else - qaErrorLog "The Asian-office-languages aren't supported yet." - endif - goto endsub + case 01: Num1 = 3 : Num2 = 1 : Num3 = 2 : Num4 = 3 : Num5 = 4 + case 07: Num1 = 3 : Num2 = 4 : Num3 = 2 : Num4 = 3 : Num5 = 1 'Russian TODO -FHA + case 31: Num1 = 1 : Num2 = 2 : Num3 = 3 : Num4 = 1 : Num5 = 5 + case 33: Num1 = 3 : Num2 = 1 : Num3 = 3 : Num4 = 2 : Num5 = 5 + case 34: Num1 = 2 : Num2 = 10 : Num3 = 12 : Num4 = 3 : Num5 = 4 + case 36: Num1 = 2 : Num2 = 3 : Num3 = 4 : Num4 = 10 : Num5 = 6 + case 39: Num1 = 2 : Num2 = 3 : Num3 = 2 : Num4 = 1 : Num5 = 5 + case 45: Num1 = 11 : Num2 = 2 : Num3 = 2 : Num4 = 13 : Num5 = 5 + case 46: Num1 = 2 : Num2 = 2 : Num3 = 3 : Num4 = 1 : Num5 = 4 + case 48: Num1 = 11 : Num2 = 13 : Num3 = 11 : Num4 = 1 : Num5 = 5 + case 49: Num1 = 1 : Num2 = 10 : Num3 = 11 : Num4 = 14 : Num5 = 1 + case 55: Num1 = 4 : Num2 = 12 : Num3 = 11 : Num4 = 10 : Num5 = 1 + ' case 81: Num1 = 9 : Num2 = 13 : Num3 = 14 : Num4 = 12 : Num5 = 1 Asian languages not testable, because locale dependant :-( + ' case 82: Num1 = 6 : Num2 = 11 : Num3 = 12 : Num4 = 10 : Num5 = 1 + ' case 86: Num1 = 15 : Num2 = 13 : Num3 = 14 : Num4 = 12 : Num5 = 2 + ' case 88: Num1 = 4 : Num2 = 13 : Num3 = 14 : Num4 = 3 : Num5 = 4 + case else : + if (bAsianLan = FALSE) then + Warnlog "For the language " + iSprache +" nothing is prepared yet: find numbers of entries in stylist and insert here" + else + qaErrorLog "The Asian-office-languages aren't supported yet." + endif + goto endsub end select - '/// open application ///' Call hNewDocument sleep 2 - '/// if stylist is open, close it ///' Kontext "Gestalter" if Gestalter.Exists Then Warnlog "- Stylist exists, perhaps not closed last time a Impress doc was open" @@ -606,169 +509,134 @@ testcase tiFormatStylist end if sleep 1 - '/// Format->Stylist ///' FormatStylist - Kontext "Gestalter" - '/// click button 'graphics styles' ///' - Grafikvorlagen.Click - sleep 1 - '/// select entry 'First Line Indent' from list ///' - Vorlagenliste.Select Num1 ' num1 - sleep 1 - Printlog "- open Grafic template Dialogs using the context menue , checking if all resources exist" - '/// open kontext menue select 2nd entry from top: 'Modify' ///' - Vorlagenliste.OpenContextMenu - sleep 1 - hMenuSelectNr (2) - sleep 1 - '///+ call every tabpage and cklick a little bit -> see 'sub hWalkTheStyles' ///' - call hWalkTheStyles - Kontext - '/// switch to tabpage 'text' ///' - Messagebox.SetPage TabText - Kontext "TabText" - sleep 1 - '///+ cancel dialog 'graphics styles' ///' - TabText.Cancel - sleep 1 + Kontext "Gestalter" + Grafikvorlagen.Click + sleep 1 + Vorlagenliste.Select Num1 ' num1 + sleep 1 + Printlog "- open Grafic template Dialogs using the context menue , checking if all resources exist" + Vorlagenliste.OpenContextMenu + sleep 1 + hMenuSelectNr (2) + sleep 1 + call hWalkTheStyles + Kontext + Messagebox.SetPage TabText + Kontext "TabText" + sleep 1 + TabText.Cancel + sleep 1 - '/// if Impress then do the following / in Draw this is not avialable ///' if (Ucase(gApplication) = "IMPRESS") AND (iSprache <> 07) then 'Russian TODO -FHA Kontext "Gestalter" Printlog "- presentation templates" sleep 1 - '/// click button 'Presentation Styles' in Stylist ///' Praesentationsvorlagen.Click - '/// select entry 'Background' from list ///' Vorlagenliste.Select Num2 sleep 1 - '/// open kontext menue select 1st entry from top: 'Modify' ///' Vorlagenliste.OpenContextMenu sleep 1 hMenuSelectNr (1) - sleep 1 - Kontext - if Messagebox.exists (5) then - try - '/// only one tabpage is avilable : Area ///' -' Messagebox.SetPage TabArea - Kontext "TabArea" - if TabArea.Exists = false then - warnlog "Where is TabArea?" - else - Printlog "TabArea exists, good." - TabArea.Cancel - endif - '/// close dialog 'Background' ///' - catch - warnlog "there might be another systemlocale -> I can't select the entries in the stylist via numbers :-(" - endcatch - else + sleep 1 + Kontext + if Messagebox.exists (5) then + try + ' Messagebox.SetPage TabArea + Kontext "TabArea" + if TabArea.Exists = false then + warnlog "Where is TabArea?" + else + Printlog "TabArea exists, good." + TabArea.Cancel + endif + catch + warnlog "there might be another systemlocale -> I can't select the entries in the stylist via numbers :-(" + endcatch + else warnlog "tab area/Messagebox doesn't exist :-(" - endif + endif Kontext "Gestalter" sleep 1 - '/// select entry 'Background objects' from list in Stylist ///' Vorlagenliste.Select Num3 - '///+ open kontext menue select 1nd entry from top: 'Modify' ///' sleep 1 Vorlagenliste.OpenContextMenu sleep 1 hMenuSelectNr (1) - sleep 1 - '///+ call every tabpage and cklick a little bit -> see 'sub hWalkTheStyles' ///' - call hWalkTheStyles (1,1) - Kontext - Messagebox.SetPage TabEinzuegeUndAbstaende - Kontext "TabEinzuegeUndAbstaende" - sleep 1 - '///+ cancel dialog 'Background objects' ///' - TabEinzuegeUndAbstaende.Cancel + sleep 1 + call hWalkTheStyles (1,1) + Kontext + Messagebox.SetPage TabEinzuegeUndAbstaende + Kontext "TabEinzuegeUndAbstaende" + sleep 1 + TabEinzuegeUndAbstaende.Cancel sleep 1 Kontext "Gestalter" sleep 1 - '/// select entry 'Notes' from list in Stylist ///' Vorlagenliste.Select Num4 sleep 1 - '///+ open kontext menue select 1st entry from top: 'Modify' ///' Vorlagenliste.OpenContextMenu sleep 1 hMenuSelectNr (1) - sleep 1 - Kontext - '///+ switch to tabpage 'Font' ///' - Messagebox.SetPage TabFont - kontext "TabFont" - Kontext - '///+ switch to tabpage 'Font Effect' ///' - Messagebox.SetPage TabFontEffects - kontext "TabFontEffects" - Kontext - '///+ switch to tabpage 'indents & spacing' ///' - Messagebox.SetPage TabEinzuegeUndAbstaende - kontext "TabEinzuegeUndAbstaende" - sleep 1 - '///+ cancel dialog 'Notes' ///' - TabEinzuegeUndAbstaende.Cancel + sleep 1 + Kontext + Messagebox.SetPage TabFont + kontext "TabFont" + Kontext + Messagebox.SetPage TabFontEffects + kontext "TabFontEffects" + Kontext + Messagebox.SetPage TabEinzuegeUndAbstaende + kontext "TabEinzuegeUndAbstaende" + sleep 1 + TabEinzuegeUndAbstaende.Cancel sleep 1 Kontext "Gestalter" sleep 1 - '/// select entry 'Outline 1' from list in Stylist ///' Vorlagenliste.Select Num5 - '///+ open kontext menue select 1st entry from top: 'Modify' ///' sleep 1 Vorlagenliste.OpenContextMenu sleep 1 hMenuSelectNr (1) - sleep 1 - Kontext - '///+ switch to tabpage 'Font' ///' - Messagebox.SetPage TabFont - kontext "TabFont" - Kontext - '///+ switch to tabpage 'Font Effect' ///' - Messagebox.SetPage TabFontEffects - kontext "TabFontEffects" - Kontext - '///+ switch to tabpage 'indents & spacing' ///' - Messagebox.SetPage TabEinzuegeUndAbstaende - kontext "TabEinzuegeUndAbstaende" - sleep 1 - Kontext - '/// switch to tabpage 'Bullets' ///' - Messagebox.SetPage TabBullet - Kontext "TabBullet" - sleep 1 - Kontext - '/// switch to tabpage 'Numbering Type' ///' - Messagebox.SetPage TabNumerierungsart - Kontext "TabNumerierungsart" - sleep 1 - Kontext - '/// switch to tabpage 'Graphics' ///' - Messagebox.SetPage TabGrafiken - Kontext "TabGrafiken" - sleep 1 - Kontext - '/// switch to tabpage 'Customize' ///' - Messagebox.SetPage TabOptionenNumerierung - Kontext "TabOptionenNumerierung" - sleep 1 - '///+ cancel dialog 'Outline 1' ///' - TabOptionenNumerierung.Cancel + sleep 1 + Kontext + Messagebox.SetPage TabFont + kontext "TabFont" + Kontext + Messagebox.SetPage TabFontEffects + kontext "TabFontEffects" + Kontext + Messagebox.SetPage TabEinzuegeUndAbstaende + kontext "TabEinzuegeUndAbstaende" + sleep 1 + Kontext + Messagebox.SetPage TabBullet + Kontext "TabBullet" + sleep 1 + Kontext + Messagebox.SetPage TabNumerierungsart + Kontext "TabNumerierungsart" + sleep 1 + Kontext + Messagebox.SetPage TabGrafiken + Kontext "TabGrafiken" + sleep 1 + Kontext + Messagebox.SetPage TabOptionenNumerierung + Kontext "TabOptionenNumerierung" + sleep 1 + TabOptionenNumerierung.Cancel sleep 1 endif - '/// close Stylist with key 'F11' ///' hTypeKeys "" sleep 1 Kontext "Gestalter" if Gestalter.Exists Then Warnlog "- Stylist could not be closed pressing F11" - '/// close application ///' - Call hCloseDocument + Call hCloseDocument endcase sub hWalkTheStyles (optional a as integer,optional b as integer) @@ -776,146 +644,114 @@ 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 - '/// switch to tabpage 'Line' ///' - Messagebox.SetPage TabLinie - kontext "TabLinie" - Call DialogTest ( TabLinie ) - Kontext - '/// switch to tabpage 'Area' ///' - Messagebox.SetPage TabArea - kontext "TabArea" - Call DialogTest ( TabArea, 1 ) - '/// select radio button 'none' ///' - FillOptions.Select 1 ' NoFill.Check - Call DialogTest ( TabArea, 1 ) - '/// select radio button 'color' ///' - FillOptions.Select 2 - Call DialogTest ( TabArea, 2 ) - '/// select radio button 'gradient' ///' - FillOptions.Select 3 - Call DialogTest ( TabArea, 3 ) - '/// select radio button 'hatching' ///' - FillOptions.Select 4 - Call DialogTest ( TabArea, 4 ) - '/// select radio button 'bitmap' ///' - FillOptions.Select 5 - Call DialogTest ( TabArea, 5 ) - Kontext - '/// switch to tabpage 'shadowing' ///' - Messagebox.SetPage TabSchatten - kontext "TabSchatten" - '/// check 'use shadow' ///' - Anzeigen.check - Call DialogTest ( TabSchatten ) - Kontext - '/// switch to tabpage 'Transparency' ///' - Messagebox.SetPage TabTransparenz - kontext "TabTransparenz" - '/// check 'No transparency' ///' - KeineTransparenz.Check - '/// check 'Transparency' ///' - LineareTransparenz.Check - '/// check 'Gradient' ///' - Transparenzverlauf.Check - Kontext - '/// switch to tabpage 'Font' ///' - Messagebox.SetPage TabFont - kontext "TabFont" - Call DialogTest ( TabFont ) - Kontext - '/// switch to tabpage 'Font Effect' ///' - Messagebox.SetPage TabFontEffects - kontext "TabFontEffects" - Kontext - '/// switch to tabpage 'indents & spacing' ///' - Messagebox.SetPage TabEinzuegeUndAbstaende - kontext "TabEinzuegeUndAbstaende" - Call DialogTest ( TabEinzuegeUndAbstaende ) - endif - i=2 - if a <= i AND i <= b then - Kontext - '/// switch to tabpage 'Organize' ///' - Messagebox.SetPage TabVerwalten - kontext "TabVerwalten" - Call DialogTest ( TabVerwalten ) - Kontext - '/// switch to tabpage 'text' ///' - Messagebox.SetPage TabText - Kontext "TabText" - Call DialogTest ( TabText ) - Kontext - '/// switch to tabpage 'text animation' ///' - Messagebox.SetPage TabLauftext - Kontext "TabLauftext" - Call DialogTest ( TabLauftext ) - Kontext - '/// switch to tabpage 'dimension' ///' - Messagebox.SetPage TabBemassung - Kontext "TabBemassung" - Call DialogTest ( TabBemassung ) - Kontext - '/// switch to tabpage 'connector' ///' - Messagebox.setpage TabVerbinder - Kontext "TabVerbinder" - Call Dialogtest ( TabVerbinder ) - Kontext - '/// switch to tabpage 'alignment' ///' - Messagebox.setpage TabAusrichtungAbsatz - Kontext "TabAusrichtungAbsatz" - Links.Check - Rechts.Check - Zentriert.Check - Blocksatz.Check - Kontext - '/// switch to tabpage 'Tabs' ///' - Messagebox.setpage TabTabulator - Kontext "TabTabulator" - '/// click 'new' ///' - Neu.click - '/// ' MAYBE CHECK COUNT OF THIS ?? Position svx:MetricBox:RID_SVXPAGE_TABULATOR:ED_TABPOS ///' - '/// click 'delete all' ///' - AlleLoeschen.click - '/// click 'new' ///' - Neu.click - '/// click 'delete' ///' - Loeschen.click - endif - i=3 - if a <= i AND i <= b then - Kontext - '/// switch to tabpage 'Bullets' ///' - Messagebox.SetPage TabBullet - Kontext "TabBullet" - sleep 1 - Call DialogTest (TabBullet) - sleep 1 - Kontext - '/// switch to tabpage 'Numbering Type' ///' - Messagebox.SetPage TabNumerierungsart - Kontext "TabNumerierungsart" - sleep 1 - Call DialogTest (TabNumerierungsart) - sleep 1 - Kontext - '/// switch to tabpage 'Graphics' ///' - Messagebox.SetPage TabGrafiken - Kontext "TabGrafiken" - sleep 1 - Call DialogTest (TabGrafiken) - sleep 1 - Kontext - '/// switch to tabpage 'Customize' ///' - 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 testcase tFormatStylist @@ -924,14 +760,11 @@ testcase tFormatStylist dim i as integer dim abctemp - '/// open application ///' Call hNewDocument - '/// create a textframe with content ///' sleep 5 hTextrahmenErstellen ("I hate mondays...",20,20,80,40) sleep 1 - '/// open stylist with: Format->Stylist ///' FormatStylist sleep 1 Kontext "Stylist" @@ -943,7 +776,6 @@ testcase tFormatStylist Vorlagenliste.TypeKeys "" Vorlagenliste.TypeKeys "" Vorlagenliste.TypeKeys "" - '/// open kontext menue select 1st entry from top: 'New' ///' sleep 1 Vorlagenliste.OpenContextMenu sleep 1 @@ -951,14 +783,12 @@ testcase tFormatStylist sleep 1 Kontext if Messagebox.exists (5) then - '/// switch to tabpage Organizer ///' Messagebox.SetPage TabVerwalten Kontext "TabVerwalten" VorlagenName.SetText "1Newtheme" sTemp = VorlagenName.getText VerknuepftMit.getSelText Bereich.getSelText - '/// close dialog 'Graphics Styles' ///' TabVerwalten.OK endif sleep 1 @@ -971,87 +801,77 @@ testcase tFormatStylist sleep 1 Kontext if Messagebox.exists (5) then - '/// switch to tabpage Organizer ///' Messagebox.SetPage TabVerwalten Kontext "TabVerwalten" VorlagenName.setText("1Test") - '/// close dialog 'Graphics Styles' ///' TabVerwalten.OK endif sleep 1 -' hTextrahmenErstellen ("I hate mondays..., too",60,60,80,60) -' sleep 1 -' FormatArea -' i = 1 -' kontext "tabArea" -'' temp = Hatching -' abctemp = 666666 -' printlog isobject(abctemp) -' printlog isnumeric(abctemp) -' sSettings(i,1) = Hatching -' printlog isobject(sSettings(i,1)) -' printlog isnumeric(sSettings(i,1)) -' sSettings(i,2) = "CheckBox" -' sSettings(i,3) = True -' inc (i) -'' printlog " " + i -' dim asgc as boolean -' asgc = true -'' hWalkTheStyles2(asgc, sSettings(), temp) -' ' hWalkTheStyles2(abctemp) -' Kontext "TabArea" -' TabArea.OK + ' hTextrahmenErstellen ("I hate mondays..., too",60,60,80,60) + ' sleep 1 + ' FormatArea + ' i = 1 + ' kontext "tabArea" + '' temp = Hatching + ' abctemp = 666666 + ' printlog isobject(abctemp) + ' printlog isnumeric(abctemp) + ' sSettings(i,1) = Hatching + ' printlog isobject(sSettings(i,1)) + ' printlog isnumeric(sSettings(i,1)) + ' sSettings(i,2) = "CheckBox" + ' sSettings(i,3) = True + ' inc (i) + '' printlog " " + i + ' dim asgc as boolean + ' asgc = true + '' hWalkTheStyles2(asgc, sSettings(), temp) + ' ' hWalkTheStyles2(abctemp) + ' Kontext "TabArea" + ' TabArea.OK Kontext "Stylist" if (Stylist.NotExists) then - ErrorLog "There is no stylist open, should be." + ErrorLog "There is no stylist open, should be." else - '/// Closing stylist ///' - hTypekeys "" - Kontext "Stylist" - if (Stylist.Exists) then - ErrorLog "The Stylist should be closed now." - endif + hTypekeys "" + Kontext "Stylist" + if (Stylist.Exists) then + ErrorLog "The Stylist should be closed now." + endif endif Call hCloseDocument endcase function hSelectInList (window, sEntry as String) as Boolean -'/// alternativ method to 'hDoubleClickInList' (without mouse) ///' -'///+ window: name of list ///' -'///+ sEntry: string to find in list ///' -'///+ ReturnValue: if found: TRUE; else FALSE ///' Dim i as Integer Dim sTemp as String Dim sLastTemp as String - '/// go through list from bottom and stop on the entry sEntry ///' window.TypeKeys "" sTemp = "" do - sLastTemp = sTemp - sTemp = window.GetText - window.TypeKeys "" - loop while ((sEntry <> sTemp) AND (sLastTemp <> sTemp)) - '/// press key [Return] ///' - if (sEntry = sTemp) then - window.TypeKeys "" - hSelectInList = TRUE - else - hSelectInList = FALSE - endif + sLastTemp = sTemp + sTemp = window.GetText + window.TypeKeys "" +loop while ((sEntry <> sTemp) AND (sLastTemp <> sTemp)) +if (sEntry = sTemp) then + window.TypeKeys "" + hSelectInList = TRUE +else + hSelectInList = FALSE +endif end function function hWalkTheStyles2 (atemp) -'function hWalkTheStyles2 (bSet as boolean, aSettings(), atemp as variant) as string + 'function hWalkTheStyles2 (bSet as boolean, aSettings(), atemp as variant) as string dim i as integer dim x as integer dim itemp dim bSet dim aSettings(5,5) -' dim atemp + ' dim atemp - '/// Organizer ///' i=1 Kontext printlog aSettings(i,3) @@ -1059,12 +879,12 @@ function hWalkTheStyles2 (atemp) printlog val(aSettings(i,1)) printlog atemp Messagebox.SetPage TabArea - kontext "TabArea" -'press button standard :-)))))) + kontext "TabArea" + 'press button standard :-)))))) atemp = Hatching printlog atemp - if aSettings(i,3) then + if aSettings(i,3) then itemp = val(aSettings(i,1)) printlog isobject(atemp) printlog isNumeric(atemp) @@ -1072,115 +892,98 @@ function hWalkTheStyles2 (atemp) atemp.check else -' aSettings(i,1).Uncheck + ' aSettings(i,1).Uncheck endif -'print "baeh" + 'print "baeh" i=2 Kontext Messagebox.SetPage TabSchatten - kontext "TabSchatten" + kontext "TabSchatten" Kontext Messagebox.SetPage TabVerwalten - kontext "TabVerwalten" -'/// Line ///' + kontext "TabVerwalten" i=2 Kontext Messagebox.SetPage TabLinie - kontext "TabLinie" - 'Context: *Line; Line Styles; Arrow Styles -'/// Area ///' + kontext "TabLinie" + 'Context: *Line; Line Styles; Arrow Styles i=3 Kontext Messagebox.SetPage TabArea - kontext "TabArea" - 'Context: *Area; *Shadow; Transparency; Colors; Gradients; Hatching; Bitmaps -'/// Shadowing ///' + kontext "TabArea" + 'Context: *Area; *Shadow; Transparency; Colors; Gradients; Hatching; Bitmaps i=4 Kontext Messagebox.SetPage TabSchatten - kontext "TabSchatten" -'/// Transparency ///' + kontext "TabSchatten" i=5 Kontext Messagebox.SetPage TabTransparenz - kontext "TabTransparenz" -'/// Font ///' + kontext "TabTransparenz" i=6 Kontext Messagebox.SetPage TabFont - kontext "TabFont" - 'Context: *Font; *Font Effect; Position -'/// Font Effect ///' + kontext "TabFont" + 'Context: *Font; *Font Effect; Position i=7 Kontext Messagebox.SetPage TabFontEffects - kontext "TabFontEffects" -'/// Indents & Spacing ///' + kontext "TabFontEffects" i=8 Kontext Messagebox.SetPage TabEinzuegeUndAbstaende - kontext "TabEinzuegeUndAbstaende" - 'Context: *Indents & Spacing; *Alignment; *Tabs -'/// Text ///' + kontext "TabEinzuegeUndAbstaende" + 'Context: *Indents & Spacing; *Alignment; *Tabs i=9 Kontext Messagebox.SetPage TabText - Kontext "TabText" - 'Context: *Text; *Text Animation -'/// Text Animation ///' + Kontext "TabText" + 'Context: *Text; *Text Animation i=10 Kontext Messagebox.SetPage TabLauftext - Kontext "TabLauftext" -'/// Dimensioning ///' + Kontext "TabLauftext" i=11 Kontext Messagebox.SetPage TabBemassung - Kontext "TabBemassung" -'/// Connector ///' + Kontext "TabBemassung" i=12 Kontext Messagebox.setpage TabVerbinder - Kontext "TabVerbinder" -'/// Alignment ///' + Kontext "TabVerbinder" i=13 Kontext Messagebox.setpage TabAusrichtungAbsatz - Kontext "TabAusrichtungAbsatz" -'/// Tabs ///' + Kontext "TabAusrichtungAbsatz" i=14 Kontext Messagebox.setpage TabTabulator - Kontext "TabTabulator" - -' '/// switch to tabpage 'Bullets' ///' -' Messagebox.SetPage TabBullet -' Kontext "TabBullet" -' sleep 1 -' Call DialogTest (TabBullet) -' sleep 1 -' Kontext -' '/// switch to tabpage 'Numbering Type' ///' -' Messagebox.SetPage TabNumerierungsart -' Kontext "TabNumerierungsart" -' sleep 1 -' Call DialogTest (TabNumerierungsart) -' sleep 1 -' Kontext -' '/// switch to tabpage 'Graphics' ///' -' Messagebox.SetPage TabGrafiken -' Kontext "TabGrafiken" -' sleep 1 -' Call DialogTest (TabGrafiken) -' sleep 1 -' Kontext -' '/// switch to tabpage 'Customize' ///' -' Messagebox.SetPage TabOptionenNumerierung -' Kontext "TabOptionenNumerierung" -' sleep 1 -' Call DialogTest (TabOptionenNumerierung) -' sleep 1 + Kontext "TabTabulator" + + ' 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 end function diff --git a/testautomation/graphics/optional/includes/global/g_tables.inc b/testautomation/graphics/optional/includes/global/g_tables.inc index 04e37acd5008..b018e41f2fd2 100755 --- a/testautomation/graphics/optional/includes/global/g_tables.inc +++ b/testautomation/graphics/optional/includes/global/g_tables.inc @@ -1,7 +1,7 @@ 'encoding UTF-8 Do not remove or change this line! '************************************************************************** '* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. -'* +'* '* Copyright 2008 by Sun Microsystems, Inc. '* '* OpenOffice.org - a multi-platform office productivity suite @@ -46,9 +46,9 @@ 'Variables: - dim iItemCount AS integer 'Count variable for combobox - dim iItemIndex AS integer 'Counter for/next - +dim iItemCount AS integer 'Count variable for combobox +dim iItemIndex AS integer 'Counter for/next + '------------------------------------------------------------------------------- testcase tiInsertTableUsingMenu @@ -58,7 +58,7 @@ testcase tiInsertTableUsingMenu DocumentImpress.UseMenu hMenuSelectNr(4) hMenuSelectNr(13) - + printlog "Checking if insert Table dialog comes up." Kontext "InsertTableImpress" if InsertTableImpress.Exists then @@ -66,14 +66,14 @@ testcase tiInsertTableUsingMenu else warnlog "InsertTableDialog did not come up!" endif - + printlog "Checking for availability of column and row boxes." if NumberOfColumns.IsEnabled AND NumberOfRows.IsEnabled then printlog "Columns and rows boxes available." else warnlog "One or both spinboxes not active!" endif - + printlog "Checking max and min for Columns." NumberOfColumns.ToMax if NumberOfColumns.GetText = "75" then @@ -81,35 +81,35 @@ testcase tiInsertTableUsingMenu else warnlog "Max Columns cannot be reached!" endif - + NumberOfColumns.ToMin if NumberOfColumns.GetText ="1" then printlog "Min is 1 column." else warnlog "Min column is wrong!" endif - - printlog "Checking max and min for Rows." + + printlog "Checking max and min for Rows." NumberOfRows.ToMax if NumberOfRows.GetText = "75" then printlog "Max is 75 Rows." else warnlog "Max Rows cannot be reached!" endif - + NumberOfRows.ToMin if NumberOfRows.GetText ="1" then printlog "Min is 1 Row." else warnlog "Min Row is wrong!" endif - + printlog "Inserting Table now, 5 columns ,2 rows." NumberOfColumns.SetText "5" NumberOfRows.SetText "2" InsertTableImpress.OK Kontext "DocumentImpress" - + printlog "Checking if table is inserted." Kontext "TableObjectbar" if TableObjectbar.Exists(1) then @@ -118,10 +118,10 @@ testcase tiInsertTableUsingMenu warnlog " TableObjectBar not up !" endif TableObjectbar.Close - + printlog " Close document." Call hCloseDocument - + endcase 'tiInsertTableUsingMenu '------------------------------------------------------------------------------- @@ -132,15 +132,15 @@ testcase tiInsertTableUsingButton Call hNewDocument printlog "Open New Document." kontext "Standardbar" - + printlog "Checking if button is available." - try + try Table.Click catch warnlog "Table button in standardbar is not available!" endcatch printlog "Clicking on insert table button in standardbar." - + printlog " Checking if insert Table dialog comes up." Kontext "InsertTableImpress" if InsertTableImpress.Exists then @@ -150,7 +150,7 @@ testcase tiInsertTableUsingButton endif printlog "Inserting Table by clicking OK." InsertTableImpress.OK - + printlog "Checking if table is inserted." Kontext "TableObjectbar" if TableObjectbar.Exists(1) then @@ -161,12 +161,12 @@ testcase tiInsertTableUsingButton TableObjectbar.Close printlog " Close document." Call hCloseDocument - + endcase 'tiInsertTableUsingButton - + '------------------------------------------------------------------------------- testcase tiInsertTableUsingToolbarbutton - + printlog " Inserting table using the button in table toolbar." Call hNewDocument printlog "Clicking on button in toolbar." @@ -178,7 +178,7 @@ testcase tiInsertTableUsingToolbarbutton warnlog "TableObjectBar not up!" endif Table.Click - + printlog " Checking if insert Table dialog comes up." Kontext "InsertTableImpress" if InsertTableImpress.Exists then @@ -186,10 +186,10 @@ testcase tiInsertTableUsingToolbarbutton else warnlog "InsertTableDialog did not come up!" endif - + printlog "Inserting Table..." InsertTableImpress.OK - + printlog " Checking if dialog comes up." Kontext "TableObjectbar" if TableObjectbar.Exists(1) then @@ -198,30 +198,30 @@ testcase tiInsertTableUsingToolbarbutton warnlog " Table Dialog did not came up!" endif TableObjectbar.Close - + printlog " Close document." Call hCloseDocument - + endcase 'tiInsertTableUsingToolbarbutton '------------------------------------------------------------------------------- -testcase tiTableObjectBar +testcase tiTableObjectBar printlog "Testing TableObjectBar." Call hNewDocument kontext "Standardbar" - + printlog "Checking if button is available." - try + try Table.Click catch warnlog "Table button in standardbar is not available!" endcatch - + Kontext "InsertTableImpress" printlog "Inserting table." InsertTableImpress.OK - + Kontext "DocumentImpress" printlog "Selecting table for geeting the TableObjectBar." DocumentImpress.TypeKeys "" @@ -233,7 +233,7 @@ testcase tiTableObjectBar else warnlog "Table bar is not up!" endif - + printlog "Checking LinienStil." LinienStil.TearOff Kontext "TB_Umrandungsstil" @@ -245,12 +245,12 @@ testcase tiTableObjectBar warnlog "LineStyleBox is not up!" endif Kontext "TableObjectBar" - + TableObjectBar.Close Kontext "DocumentImpress" Call hToolbarSelect ("Table", true) Kontext "TableObjectBar" - + printlog "Checking LineColorOfTheBorder." LineColorOfTheBorder.TearOff Kontext "TB_Farbe" @@ -261,12 +261,12 @@ testcase tiTableObjectBar else warnlog "LineColorOfTheBorder is not up!" endif - Kontext "TableObjectBar" + Kontext "TableObjectBar" TableObjectBar.Close Kontext "DocumentImpress" Call hToolbarSelect ("Table", true) Kontext "TableObjectBar" - + printlog "Checking Borderstyle." Umrandung.TearOff Kontext "TB_Umrandung" @@ -277,7 +277,7 @@ testcase tiTableObjectBar warnlog "BordersTB is not up!" endif Kontext "DocumentImpress" - + printlog "Checking merge cells." printlog "Inserting something into cell and select." DocumentImpress.TypeKeys ("a") @@ -285,7 +285,7 @@ testcase tiTableObjectBar Kontext "TableObjectBar" ZellenVerbinden.Click printlog "Cells merged." - + printlog "Checking split cells." ZelleTeilen.Click printlog "Cells split." @@ -310,27 +310,27 @@ testcase tiTableObjectBar 'Kontext "TableObjectBar" 'Optimieren.TearOff 'OptimizeTablebar.Close - + printlog "Checking Alignment." Kontext "TableObjectBar" Top.Click CenterVertical.Click Bottom.Click printlog "Alignment buttons checked." - + printlog "Checking inserting and deleting of columns and rows." ZeileEinfuegen.Click printlog "Row inserted." - + Zeileloeschen.Click printlog "Row deleted." - + SpalteEinfuegen.Click printlog "Column inserted." - + Spalteloeschen.Click - printlog "Column deleted." - + printlog "Column deleted." + printlog "Checking table design button 'ToDo:needs some further examination here!" tabledesign.Click kontext "Tasks" @@ -340,7 +340,7 @@ testcase tiTableObjectBar else printlog "Task Pane visible." endif - + printlog "Checking Properties button." Kontext "TableObjectBar" TableProperties.Click @@ -352,37 +352,37 @@ testcase tiTableObjectBar printlog "Tabpage Font is up." endif kontext "TabFont" - + printlog "Checking Fonts Box." iItemCount = Font.GetItemCount printlog "Fontbox has " & iItemCount & " entries." for iItemIndex = 1 to iItemCount Font.Select(iItemIndex) next iItemIndex - + printlog "Checking style box." iItemCount = Style.GetItemCount printlog "Stylebox has " & iItemCount & " entries." for iItemIndex = 1 to iItemCount Style.Select(iItemIndex) next iItemIndex - - printlog "Checking size box." + + printlog "Checking size box." iItemCount = Size.GetItemCount printlog "Sizebox has " & iItemCount & " entries." for iItemIndex = 1 to iItemCount Size.Select(iItemIndex) next iItemIndex - + printlog "Checking language box." iItemCount = Language.GetItemCount printlog "Language box has " & iItemCount & " entries." for iItemIndex = 1 to iItemCount Language.Select(iItemIndex) next iItemIndex - + '------------Next Tab----------------- - + printlog "Checking Tabpage FontEffects." Kontext active.SetPage TabFontEffects @@ -392,32 +392,32 @@ testcase tiTableObjectBar printlog "Tabpage FontEffects is up." endif kontext "TabFontEffects" - + printlog "Checking Underlining box." iItemCount = Underline.GetItemCount printlog "Underlining has " & iItemCount & " entries." for iItemIndex = 1 to iItemCount Underline.Select(iItemIndex) next iItemIndex - + printlog "Checking StrikeThrough box." iItemCount = StrikeThrough.GetItemCount printlog "StrikeThrough has " & iItemCount & " entries." for iItemIndex = 1 to iItemCount StrikeThrough.Select(iItemIndex) next iItemIndex - + printlog "Checking individual words." IndividualWords.Check printlog "Individual words checked." - + printlog "Checking Color box." iItemCount = Color.GetItemCount printlog "Font color has " & iItemCount & " entries." for iItemIndex = 1 to iItemCount Color.Select(iItemIndex) next iItemIndex - + printlog "Checking Relief." iItemCount = Relief.GetItemCount printlog "Relief has " & iItemCount & " entries." @@ -425,15 +425,15 @@ testcase tiTableObjectBar Relief.Select(iItemIndex) next iItemIndex Relief.Select(1) 'setting back Relief, otherwise Outline is greyed out - + printlog "Checking Outline and Shadow." Outline.Check printlog "Outline checked." Shadow.Check printlog "Shadow checked." - + '------------Next Tab----------------- - + printlog "Checking Tabpage Borders." Kontext active.SetPage TabUmrandung @@ -449,30 +449,30 @@ testcase tiTableObjectBar for iItemIndex = 1 to iItemCount Stil.Select(iItemIndex) next iItemIndex - + printlog "Checking Color." iItemCount = StilFarbe.GetItemCount printlog "Color has " & iItemCount & " entries." for iItemIndex = 1 to iItemCount StilFarbe.Select(iItemIndex) next iItemIndex - + printlog "Un-Checking Synchronize." Synchronisieren.UnCheck printlog "Synchronize unchecked." - + printlog "Checking Left." Links.ToMax printlog "Maximum Left is " & Links.GetText & "." Links.ToMin printlog "Minimum Left is " & Links.GetText & "." - + printlog "Checking Right." Rechts.ToMax printlog "Maximum Right is " & Rechts.GetText & "." Rechts.ToMin printlog "Minimum Right is " & Rechts.GetText & "." - + printlog "Checking Top." Oben.ToMax printlog "Maximum Top is " & Oben.GetText & "." @@ -484,9 +484,9 @@ testcase tiTableObjectBar printlog "Maximum Bottom is " & Unten.GetText & "." Unten.ToMin printlog "Minimum Bottom is " & Unten.GetText & "." - + '------------Next Tab----------------- - + printlog "Checking Tabpage Background." Kontext active.SetPage TabArea @@ -496,7 +496,7 @@ testcase tiTableObjectBar printlog "Tabpage Area is up." endif kontext "TabArea" - + iItemCount = FillOptions.GetItemCount for iItemIndex = 2 to iItemCount FillOptions.Select(iItemIndex) @@ -505,10 +505,10 @@ testcase tiTableObjectBar TabArea.Cancel printlog "Format Cells dialog closed." printlog "Toolbar tested." - + printlog " Closing doc." hCloseDocument - -endcase 'tiTableObjectBar + +endcase 'tiTableObjectBar '------------------------------------------------------------------------------- diff --git a/testautomation/graphics/optional/includes/global/g_toolbars.inc b/testautomation/graphics/optional/includes/global/g_toolbars.inc index e9d50483fb83..747956514ae7 100755 --- a/testautomation/graphics/optional/includes/global/g_toolbars.inc +++ b/testautomation/graphics/optional/includes/global/g_toolbars.inc @@ -1,7 +1,7 @@ 'encoding UTF-8 Do not remove or change this line! '************************************************************************** '* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. -'* +'* '* Copyright 2008 by Sun Microsystems, Inc. '* '* OpenOffice.org - a multi-platform office productivity suite @@ -46,350 +46,319 @@ testcase Toolboxen_Rechtecke Printlog "- Toolbox rectangles" -Dim i + Dim i - Call hNewDocument '/// New impress document '/// - Printlog "- 1.: Create rectangles, apply shadow and move them around" + Printlog "- 1.: Create rectangles, apply shadow and move them around" - for i = 1 to 4 - select case i - case 1 : Printlog "- Create Rectangle Filled" - WL_SD_RechteckVoll '/// create rectangles using the toolbox '/// - sleep 1 - case 2 : Printlog "- Create Rectangle Round-Filled" - WL_SD_RechteckRundVoll - sleep 1 - case 3 : Printlog "- Create Quadrat Filled" - WL_SD_QuadratVoll - sleep 1 - case 4 : Printlog "Create Quadrat Round-Filled" - WL_SD_QuadratRundVoll - sleep 1 - end select + for i = 1 to 4 + select case i + case 1 : Printlog "- Create Rectangle Filled" + sleep 1 + case 2 : Printlog "- Create Rectangle Round-Filled" + WL_SD_RechteckRundVoll + sleep 1 + case 3 : Printlog "- Create Quadrat Filled" + WL_SD_QuadratVoll + sleep 1 + case 4 : Printlog "Create Quadrat Round-Filled" + WL_SD_QuadratRundVoll + sleep 1 + end select - Kontext "DocumentImpress" - gMouseMove (20,20,60,60) '/// select rectangle '/// - sleep 2 - FormatArea '/// Format Area '/// - Kontext - Active.SetPage TabSchatten '/// TabSchatten '/// - Kontext "TabSchatten" - Anzeigen.Click '/// activate shadow '/// - TabSchatten.OK '/// close TabSchatten '/// - sleep 1 - Kontext "DocumentImpress" - gMouseClick 30,30 '/// deselect rectangle '/// - gMouseMove 30,30,90,90 '/// move rectangle '/// + Kontext "DocumentImpress" + sleep 2 + Kontext + Kontext "TabSchatten" + sleep 1 + Kontext "DocumentImpress" - gMouseClick 90,90 '/// select rectangle '/// - gMouseMove 90,90,30,30 '/// move rectangle '/// - gMouseClick 30,30 - gMouseMove 30,30,90,90 + gMouseClick 30,30 + gMouseMove 30,30,90,90 - gMouseClick 90,90 - gMouseMove 90,90,30,30 + gMouseClick 90,90 + gMouseMove 90,90,30,30 - gMouseClick 30,30 - gMouseMove 30,30,90,90 + gMouseClick 30,30 + gMouseMove 30,30,90,90 - gMouseClick 90,90 - gMouseMove 90,90,30,30 + gMouseClick 90,90 + gMouseMove 90,90,30,30 - hTypeKeys "" '/// delete rectangle '/// - sleep 2 - next i - Call hCloseDocument '/// close document '/// + sleep 2 + next i endcase '********************************************************************** testcase Toolboxen_Kreise Printlog "- Toolbox Circles" -Dim i + Dim i - Call hNewDocument '/// New document '/// - Printlog "- Create circles and ellipses" - for i = 1 to 7 - select case i '/// create all possible circles and ellipses from toolbar '/// - case 1 : WL_SD_Ellipsen - sleep 1 - Kontext "DocumentImpress" - gMouseMove 20,20,60,60 - case 2 : WL_SD_EllipseVoll - sleep 1 - Kontext "DocumentImpress" - gMouseMove 20,20,60,60 - case 3 : WL_SD_EllipsensegmentVoll - sleep 1 - kontext "DocumentImpress" - gMouseMove 20,20,40,40 - gMouseClick 20,30 - gMouseClick 20,28 - case 4 : WL_SD_EllipsenabschnittVoll - sleep 1 - kontext "DocumentImpress" - gMouseMove 20,20,40,40 - gMouseClick 20,30 - gMouseClick 20,28 - case 5 : WL_SD_KreisVoll - sleep 1 - kontext "DocumentImpress" - gMouseMove 20,20,40,40 - case 6 : WL_SD_KreissegmentVoll - sleep 1 - kontext "DocumentImpress" - gMouseMove 20,20,40,40 - gMouseClick 20,30 - gMouseClick 20,28 - case 7 : WL_SD_KreisabschnittVoll - sleep 1 - kontext "DocumentImpress" - gMouseMove 20,20,40,40 - gMouseClick 20,30 - gMouseClick 20,28 - end select + Printlog "- Create circles and ellipses" + for i = 1 to 7 + case 1 : WL_SD_Ellipsen + sleep 1 + Kontext "DocumentImpress" + gMouseMove 20,20,60,60 + case 2 : WL_SD_EllipseVoll + sleep 1 + Kontext "DocumentImpress" + gMouseMove 20,20,60,60 + case 3 : WL_SD_EllipsensegmentVoll + sleep 1 + kontext "DocumentImpress" + gMouseMove 20,20,40,40 + gMouseClick 20,30 + gMouseClick 20,28 + case 4 : WL_SD_EllipsenabschnittVoll + sleep 1 + kontext "DocumentImpress" + gMouseMove 20,20,40,40 + gMouseClick 20,30 + gMouseClick 20,28 + case 5 : WL_SD_KreisVoll + sleep 1 + kontext "DocumentImpress" + gMouseMove 20,20,40,40 + case 6 : WL_SD_KreissegmentVoll + sleep 1 + kontext "DocumentImpress" + gMouseMove 20,20,40,40 + gMouseClick 20,30 + gMouseClick 20,28 + case 7 : WL_SD_KreisabschnittVoll + sleep 1 + kontext "DocumentImpress" + gMouseMove 20,20,40,40 + gMouseClick 20,30 + gMouseClick 20,28 + end select - FormatArea - Kontext - Active.SetPage TabSchatten '/// Activate shadow for the object '/// - Kontext "TabSchatten" - Anzeigen.Click - TabSchatten.OK - sleep 1 - Kontext "DocumentImpress" - gMouseClick 30,30 - gMouseMove 30,30,90,90 '/// move the object over document '/// + FormatArea + Kontext + Kontext "TabSchatten" + Anzeigen.Click + TabSchatten.OK + sleep 1 + Kontext "DocumentImpress" + gMouseClick 30,30 - gMouseClick 90,90 - gMouseMove 90,90,30,30 + gMouseClick 90,90 + gMouseMove 90,90,30,30 - gMouseClick 30,30 - gMouseMove 30,30,90,90 + gMouseClick 30,30 + gMouseMove 30,30,90,90 - gMouseClick 90,90 - gMouseMove 90,90,30,30 + gMouseClick 90,90 + gMouseMove 90,90,30,30 - gMouseClick 30,30 - gMouseMove 30,30,90,90 + gMouseClick 30,30 + gMouseMove 30,30,90,90 - gMouseClick 90,90 - gMouseMove 90,90,30,30 + gMouseClick 90,90 + gMouseMove 90,90,30,30 - hTypeKeys "" '/// delete object '/// - sleep 2 - next i - Call hCloseDocument '/// close document '/// + sleep 2 +next i endcase '*********************************************************************************** testcase Toolboxen_3dObjekte Printlog "- Toolbox 3D objects" -Dim i + Dim i - Call hNewDocument '/// New document '/// - Printlog "- Create 3D objects" - for i = 1 to 8 - printlog "doing now: "+i - select case i - case 1 : WL_SD_Wuerfel '/// create all 3d objects from toolbox '/// - sleep 1 - Kontext "DocumentImpress" - gMouseMove 20,20,60,60 - case 2 : WL_SD_Kugel - sleep 1 - Kontext "DocumentImpress" - gMouseMove 20,20,60,60 - case 3 : WL_SD_Zylinder - sleep 1 - kontext "DocumentImpress" - gMouseMove 20,20,40,40 - case 4 : WL_SD_Kegel - sleep 1 - kontext "DocumentImpress" - gMouseMove 20,20,40,40 - case 5 : WL_SD_Pyramide - sleep 1 - kontext "DocumentImpress" - gMouseMove 20,20,40,40 - case 6 : WL_SD_Torus - sleep 1 - kontext "DocumentImpress" - gMouseMove 20,20,40,40 - case 7 : WL_SD_Schale - sleep 1 - kontext "DocumentImpress" - gMouseMove 20,20,40,40 - case 8 : WL_SD_Halbkugel - end select - sleep 2 - FormatArea - sleep 2 - Kontext - Active.SetPage TabSchatten '/// apply shadow to 3d objects '/// - Kontext "TabSchatten" - Anzeigen.Click - TabSchatten.OK - sleep 1 - Kontext "DocumentImpress" - gMouseClick 30,30 - gMouseMove 30,30,90,90 '/// move objects in document around '/// - gMouseClick 90,90 - gMouseMove 90,90,30,30 - gMouseClick 30,30 - gMouseMove 30,30,90,90 - gMouseClick 90,90 - gMouseMove 90,90,30,30 - gMouseClick 30,30 - gMouseMove 30,30,90,90 - gMouseClick 90,90 - gMouseMove 90,90,30,30 - hTypeKeys "" '/// delete 3d objects '/// - sleep 2 - next i - gMouseClick 99,99 - sleep 1 - Printlog "- 3D-body created" - Call hCloseDocument '/// close document '/// + Printlog "- Create 3D objects" + for i = 1 to 8 + printlog "doing now: "+i + select case i + sleep 1 + Kontext "DocumentImpress" + gMouseMove 20,20,60,60 + case 2 : WL_SD_Kugel + sleep 1 + Kontext "DocumentImpress" + gMouseMove 20,20,60,60 + case 3 : WL_SD_Zylinder + sleep 1 + kontext "DocumentImpress" + gMouseMove 20,20,40,40 + case 4 : WL_SD_Kegel + sleep 1 + kontext "DocumentImpress" + gMouseMove 20,20,40,40 + case 5 : WL_SD_Pyramide + sleep 1 + kontext "DocumentImpress" + gMouseMove 20,20,40,40 + case 6 : WL_SD_Torus + sleep 1 + kontext "DocumentImpress" + gMouseMove 20,20,40,40 + case 7 : WL_SD_Schale + sleep 1 + kontext "DocumentImpress" + gMouseMove 20,20,40,40 + case 8 : WL_SD_Halbkugel + end select + sleep 2 + FormatArea + sleep 2 + Kontext + Kontext "TabSchatten" + Anzeigen.Click + TabSchatten.OK + sleep 1 + Kontext "DocumentImpress" + gMouseClick 30,30 + gMouseClick 90,90 + gMouseMove 90,90,30,30 + gMouseClick 30,30 + gMouseMove 30,30,90,90 + gMouseClick 90,90 + gMouseMove 90,90,30,30 + gMouseClick 30,30 + gMouseMove 30,30,90,90 + gMouseClick 90,90 + gMouseMove 90,90,30,30 + sleep 2 + next i + gMouseClick 99,99 + sleep 1 + Printlog "- 3D-body created" endcase '****************************************************************************** testcase Toolboxen_Linien Printlog "- Toolbox Lines " -Dim i - Call hNewDocument '/// New document '/// - Printlog "- Create lines and arrows" - for i = 1 to 10 - select case i - case 1 : WL_SD_LinieZeichnen '/// create all kind of lines '/// - sleep 1 - Kontext "DocumentImpress" - gMouseMove 20,20,60,60 - case 2 : WL_SD_LinieMitPfeilende - sleep 1 - Kontext "DocumentImpress" - gMouseMove 20,20,60,60 - case 3 : WL_SD_LinieMitPfeilKreisende - sleep 1 - kontext "DocumentImpress" - gMouseMove 20,20,40,40 - case 4 : WL_SD_LiniemitPfeilQuadratende - sleep 1 - kontext "DocumentImpress" - gMouseMove 20,20,40,40 - case 5 : WL_SD_Liniewinkel - sleep 1 - kontext "DocumentImpress" - gMouseMove 20,20,40,40 - case 6 : WL_SD_LinieMitPfeilanfang - sleep 1 - kontext "DocumentImpress" - gMouseMove 20,20,40,40 - case 7 : WL_SD_LinieMitKreisPfeilende - sleep 1 - kontext "DocumentImpress" - gMouseMove 20,20,40,40 - case 8 : WL_SD_LiniemitPfeilKreisende + Dim i + Printlog "- Create lines and arrows" + for i = 1 to 10 + select case i + sleep 1 + Kontext "DocumentImpress" + gMouseMove 20,20,60,60 + case 2 : WL_SD_LinieMitPfeilende + sleep 1 + Kontext "DocumentImpress" + gMouseMove 20,20,60,60 + case 3 : WL_SD_LinieMitPfeilKreisende + sleep 1 + kontext "DocumentImpress" + gMouseMove 20,20,40,40 + case 4 : WL_SD_LiniemitPfeilQuadratende + sleep 1 + kontext "DocumentImpress" + gMouseMove 20,20,40,40 + case 5 : WL_SD_Liniewinkel + sleep 1 + kontext "DocumentImpress" + gMouseMove 20,20,40,40 + case 6 : WL_SD_LinieMitPfeilanfang + sleep 1 + kontext "DocumentImpress" + gMouseMove 20,20,40,40 + case 7 : WL_SD_LinieMitKreisPfeilende + sleep 1 + kontext "DocumentImpress" + gMouseMove 20,20,40,40 + case 8 : WL_SD_LiniemitPfeilKreisende - case 9 : WL_SD_Masslinie - sleep 1 - kontext "DocumentImpress" - gMouseMove 20,20,40,40 - case 10 : WL_SD_LinieMitPfeilenden + case 9 : WL_SD_Masslinie + sleep 1 + kontext "DocumentImpress" + gMouseMove 20,20,40,40 + case 10 : WL_SD_LinieMitPfeilenden - end select - Kontext "DocumentImpress" - gMouseClick 25,25 - sleep 1 - gMouseMove 25,25,80,80 '/// move created lines around '/// - sleep 1 - gMouseMove 80,80,25,25 - sleep 1 - gMouseMove 25,25,90,90 - sleep 1 - gMouseClick 90,90,25,25 - sleep 1 - gMouseClick 99,99 - sleep 1 - next i - Call hCloseDocument + end select + Kontext "DocumentImpress" + gMouseClick 25,25 + sleep 1 + sleep 1 + gMouseMove 80,80,25,25 + sleep 1 + gMouseMove 25,25,90,90 + sleep 1 + gMouseClick 90,90,25,25 + sleep 1 + gMouseClick 99,99 + sleep 1 + next i + Call hCloseDocument endcase '******************************************************************** testcase Toolboxen_Kurven Printlog "- Toolbox curves" -Dim i - Call hNewDocument - sleep 1 - for i = 1 to 8 - select case i - case 1 : WL_SD_KurveVoll - sleep 1 - gMouseMove 20,20,60,60 - gMouseClick 70,70 - gMouseMove 70,70,30,30 - gMouseDoubleClick 30,30 - case 2 : WL_SD_KurveLeer - sleep 1 - gMouseMove 20,20,60,60 - gMouseClick 70,70 - gMouseMove 70,70,30,30 - gMouseDoubleClick 30,30 - case 3 : WL_SD_PolygonVoll - sleep 1 - gMouseMove 20,20,60,60 - gMouseClick 70,70 - gMouseClick 10,10 - gMouseClick 90,90 - gMouseClick 50,50 - gMouseDoubleClick 50,50 - case 4 : WL_SD_Polygon - sleep 1 - gMouseMove 20,20,60,60 - gMouseClick 70,70 - gMouseClick 10,10 - gMouseClick 90,90 - gMouseClick 50,50 - gMouseDoubleClick 50,50 - case 5 : WL_SD_PolygonWinkelVoll - sleep 1 - gMouseMove 20,20,60,60 - gMouseClick 70,70 - gMouseClick 10,10 - gMouseClick 90,90 - gMouseClick 50,50 - gMouseDoubleClick 50,50 - case 6 : WL_SD_PolygonWinkel - sleep 1 - gMouseMove 20,20,60,60 - gMouseClick 70,70 - gMouseClick 10,10 - gMouseClick 90,90 - gMouseClick 50,50 - gMouseDoubleClick 50,50 - case 7 : WL_SD_FreihandlinieVoll - sleep 1 - gMouseMove 10,10,70,70 - gMouseMove 20,20,30,80 - case 8 : WL_SD_FreihandlinieLeer - sleep 1 - gMouseMove 10,10,70,70 - gMouseMove2 70,70,20,20 - gMouseMove 20,20,30,80 - end select - Kontext "DocumentImpress" - sleep 1 - EditSelectAll '/// select lines '/// - sleep 1 - try - EditCut '/// try to cut them out '/// - catch - Warnlog "- Nothing in the document to cut out" - endcatch + Dim i + Call hNewDocument sleep 1 - next i - Call hCloseDocument '/// close document '/// + for i = 1 to 8 + select case i + case 1 : WL_SD_KurveVoll + sleep 1 + gMouseMove 20,20,60,60 + gMouseClick 70,70 + gMouseMove 70,70,30,30 + gMouseDoubleClick 30,30 + case 2 : WL_SD_KurveLeer + sleep 1 + gMouseMove 20,20,60,60 + gMouseClick 70,70 + gMouseMove 70,70,30,30 + gMouseDoubleClick 30,30 + case 3 : WL_SD_PolygonVoll + sleep 1 + gMouseMove 20,20,60,60 + gMouseClick 70,70 + gMouseClick 10,10 + gMouseClick 90,90 + gMouseClick 50,50 + gMouseDoubleClick 50,50 + case 4 : WL_SD_Polygon + sleep 1 + gMouseMove 20,20,60,60 + gMouseClick 70,70 + gMouseClick 10,10 + gMouseClick 90,90 + gMouseClick 50,50 + gMouseDoubleClick 50,50 + case 5 : WL_SD_PolygonWinkelVoll + sleep 1 + gMouseMove 20,20,60,60 + gMouseClick 70,70 + gMouseClick 10,10 + gMouseClick 90,90 + gMouseClick 50,50 + gMouseDoubleClick 50,50 + case 6 : WL_SD_PolygonWinkel + sleep 1 + gMouseMove 20,20,60,60 + gMouseClick 70,70 + gMouseClick 10,10 + gMouseClick 90,90 + gMouseClick 50,50 + gMouseDoubleClick 50,50 + case 7 : WL_SD_FreihandlinieVoll + sleep 1 + gMouseMove 10,10,70,70 + gMouseMove 20,20,30,80 + case 8 : WL_SD_FreihandlinieLeer + sleep 1 + gMouseMove 10,10,70,70 + gMouseMove2 70,70,20,20 + gMouseMove 20,20,30,80 + end select + Kontext "DocumentImpress" + sleep 1 + sleep 1 + try + catch + Warnlog "- Nothing in the document to cut out" + endcatch + sleep 1 + next i endcase diff --git a/testautomation/graphics/optional/includes/global/g_tools.inc b/testautomation/graphics/optional/includes/global/g_tools.inc index daa7b73231d4..7900466a2915 100755 --- a/testautomation/graphics/optional/includes/global/g_tools.inc +++ b/testautomation/graphics/optional/includes/global/g_tools.inc @@ -1,7 +1,7 @@ 'encoding UTF-8 Do not remove or change this line! '************************************************************************** '* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. -'* +'* '* Copyright 2008 by Sun Microsystems, Inc. '* '* OpenOffice.org - a multi-platform office productivity suite @@ -46,83 +46,75 @@ '------------------------------------------------------------------------------- testcase tiToolsThesaurus - Dim DasWort$ - Dim ZaehlerBedeutung + Dim DasWort$ + Dim ZaehlerBedeutung -'/// for normal text, the thesaurus is enabled, if the format->character->language of the word has a thesaurus///' -'///+ unfortunately in textboxes this doesn't work, you can give the word a langauge, but this is been ignored by///' -'///+ our thesaurus :-(((///' -'/// so especially for asian languages you have to set a default language in the options, to be able to use///' -'///+ the thesaurus there - fallback to englisch, because there is no ? thesaurus for cjk languages ??///' - '/// First we make sure we test a language where Thesa - ' As long as OOo has no modules for that, disabled - if gOOO = True then - printlog "No spellchecking in OOo" - goto endsub - endif + ' As long as OOo has no modules for that, disabled + if gOOO = True then + printlog "No spellchecking in OOo" + goto endsub + endif select case iSprache - case 01 : DasWort$ = "Hello" - case 03 : DasWort$ = "Alo" - case 07 : printlog "- No Thesaur for Russian available" - goto endsub - case 30 : Printlog "- No Thesaurus available !" - goto endsub - case 31 : DasWort$ = "Guiten" - case 33 : DasWort$ = "Bonjour" - case 34 : DasWort$ = "Hola" - case 35 : Printlog "- No Thesaurus available !" - goto endsub - case 36 : Printlog "- No Thesaurus available !" - goto endsub - case 37 : Printlog "- No Thesaurus available !" - goto endsub - case 39 : DasWort$ = "Ciao" - case 42 : Printlog "- No Thesaurus available !" - goto endsub - case 45 : DasWort$ = "Hej" - case 46 : DasWort$ = "Välkommen" - case 47 : Printlog "- No Thesaurus available !" - goto endsub - case 48 : Printlog "- No Thesaurus in Polish!" - goto endsub - case 49 : DasWort$ = "Hallo" - case 50 : DasWort$ = "Prosojnica" - case 51 : Printlog "- No Thesaurus available !" - goto endsub - case 55 : Printlog "- No Thesaurus in Brazilian!" - goto endsub - case 90 : Printlog "- No Thesaurus available !" - goto endsub - - case else : if bAsianLan then - hSetSpellHypLanguage - DasWort$ = "Hello" - else - Warnlog "For the language " + iSprache +" nothing is prepared yet: insert text here" - DasWort$ = "Hello" - endif - end select + case 01 : DasWort$ = "Hello" + case 03 : DasWort$ = "Alo" + case 07 : printlog "- No Thesaur for Russian available" + goto endsub + case 30 : Printlog "- No Thesaurus available !" + goto endsub + case 31 : DasWort$ = "Guiten" + case 33 : DasWort$ = "Bonjour" + case 34 : DasWort$ = "Hola" + case 35 : Printlog "- No Thesaurus available !" + goto endsub + case 36 : Printlog "- No Thesaurus available !" + goto endsub + case 37 : Printlog "- No Thesaurus available !" + goto endsub + case 39 : DasWort$ = "Ciao" + case 42 : Printlog "- No Thesaurus available !" + goto endsub + case 45 : DasWort$ = "Hej" + case 46 : DasWort$ = "Välkommen" + case 47 : Printlog "- No Thesaurus available !" + goto endsub + case 48 : Printlog "- No Thesaurus in Polish!" + goto endsub + case 49 : DasWort$ = "Hallo" + case 50 : DasWort$ = "Prosojnica" + case 51 : Printlog "- No Thesaurus available !" + goto endsub + case 55 : Printlog "- No Thesaurus in Brazilian!" + goto endsub + case 90 : Printlog "- No Thesaurus available !" + goto endsub + + case else : if bAsianLan then + hSetSpellHypLanguage + DasWort$ = "Hello" + else + Warnlog "For the language " + iSprache +" nothing is prepared yet: insert text here" + DasWort$ = "Hello" + endif +end select - printlog " Thesaurus without any word in the document" - Call hNewDocument '/// New document ///' - try - ExtrasThesaurusDraw '/// try thesaurus in empty document ///' - Kontext "Thesaurus" - Thesaurus.Cancel - WarnLog " If no word is in the document, Thesaurus shouldn't be available" - catch - PrintLog " No Thesaurus available" - endcatch +printlog " Thesaurus without any word in the document" +try + Kontext "Thesaurus" + Thesaurus.Cancel + WarnLog " If no word is in the document, Thesaurus shouldn't be available" +catch + PrintLog " No Thesaurus available" +endcatch - PrintLog " Thesaurus with 1 word: " + DasWort$ +PrintLog " Thesaurus with 1 word: " + DasWort$ - Call hTextrahmenErstellen (DasWort$,20,20,50,30) - sleep 1 +Call hTextrahmenErstellen (DasWort$,20,20,50,30) +sleep 1 - hTypeKeys "" - '------------------------ +hTypeKeys "" +'------------------------ ToolsOptions Kontext "ExtrasOptionenDlg" hToolsOptions("LANGUAGESETTINGS","Languages") @@ -130,179 +122,161 @@ Westlich.Select 32 Kontext "ExtrasOptionenDlg" ExtrasOptionenDlg.OK sleep 1 - '------------------------ - try - ExtrasThesaurusDraw '/// Thesaurus with only 1 word ///' - Kontext "Thesaurus" - if Thesaurus.Exists(3) then +'------------------------ +try + Kontext "Thesaurus" + if Thesaurus.Exists(3) then if Wort.GetSelText <> DasWort$ Then WarnLog "marked word should be:" + DasWort$ + " but it is:" + Wort.GetSelText - if Wort.GetSelText = DasWort$ Then PrintLog " Marked word is correctly changed" '/// Control if word has changed ///' - ZaehlerBedeutung=Bedeutung.GetItemCount - if Bedeutung.GetItemCount = 0 Then - PrintLog " There are no suggestions for this word" - sleep 1 - else - if ZaehlerBedeutung=1 Then - Bedeutung.Select ZaehlerBedeutung - else - Bedeutung.Select (ZaehlerBedeutung - 1) - end if - sleep 1 - Synonym.Select 1 '/// Select synonym 1///' - sleep 1 - if Ersetzen.GetText=Synonym.GetSelText Then PrintLog " Meaning transfered into Replace edit field" - if Ersetzen.GetText<>Synonym.GetSelText Then WarnLog " Replacement should have been: '" + Bedeutung.GetSelText + "' but it is '" + Ersetzen.GetText+"'" - endif - Thesaurus.Cancel - else - warnlog " thesaurus didn't come up, that's bad :-(" - end if - catch - warnLog " No Thesaurus available ??! check if options western has smth selected !! !TL!" - endcatch - Call hCloseDocument '/// Close document ///' + ZaehlerBedeutung=Bedeutung.GetItemCount + if Bedeutung.GetItemCount = 0 Then + PrintLog " There are no suggestions for this word" + sleep 1 + else + if ZaehlerBedeutung=1 Then + Bedeutung.Select ZaehlerBedeutung + else + Bedeutung.Select (ZaehlerBedeutung - 1) + end if + sleep 1 + sleep 1 + if Ersetzen.GetText=Synonym.GetSelText Then PrintLog " Meaning transfered into Replace edit field" + if Ersetzen.GetText<>Synonym.GetSelText Then WarnLog " Replacement should have been: '" + Bedeutung.GetSelText + "' but it is '" + Ersetzen.GetText+"'" + endif + Thesaurus.Cancel + else + warnlog " thesaurus didn't come up, that's bad :-(" + end if + catch + warnLog " No Thesaurus available ??! check if options western has smth selected !! !TL!" + endcatch endcase 'tiToolsThesaurus '------------------------------------------------------------------------------- testcase tiToolsHyphenation1 - printlog " - Hyphenation without any text" - Call hNewDocument '/// New impress document ///' - sleep 3 - ExtrasSilbentrennungDraw '/// Try Silbentrennung with empty document ///' - Kontext "Silbentrennung" + printlog " - Hyphenation without any text" + sleep 3 + Kontext "Silbentrennung" if Silbentrennung.Exists(1) = True Then - Warnlog " - Dialog ist da" - Silbentrennung.Cancel + Warnlog " - Dialog ist da" + Silbentrennung.Cancel else - Printlog " - Hyphenation activated" + Printlog " - Hyphenation activated" + end if + ' Kontext "DocumentImpress" + printlog " - Hyphenation with text, but without any possibility to break words" + select case iSprache + case 03 : hTextrahmenErstellen ("Compare a tradu" + Chr(231) + Chr(227) + "o com o original",10,10,40,40) + case 07 : qaerrorlog "- No Hypenation for Russian available" + goto endsub + case 31 : hTextrahmenErstellen ("Het is mijn bedoeling om voor en hulpmiddel.",10,10,40,40) + case 33 : hTextrahmenErstellen ("Merci beaucoup pout votre candidature du 13/11/97.",10,10,40,40) + case 34 : hTextrahmenErstellen ("This ist a text with no spliting words",10,10,40,40) + case 36 : hTextrahmenErstellen ("Semmi karhozattyoc nincz most azoknac, a kic az Iesus Christusban be oltattac",10,10,40,40) + case 39 : hTextrahmenErstellen ("Il documento 'Senza nome 1' stato modififcato",10,10,40,40) + case 45 : hTextrahmenErstellen ("at du har nok i dit hvis du",10,10,40,40 ) + case 46 : hTextrahmenErstellen ("Detta är en text utan delade ord",10,10,40,40) + case 48 : hTextrahmenErstellen (" Jeoli jednak zechcesz",10,10,40,40) + case 49 : hTextrahmenErstellen ("Dies ist ein Text ohne eine Moeglichkeit Woerter zu trennen",10,10,40,40) + case 50 : hTextrahmenErstellen ("Zato ves čas iščemo nove člane: sodelujte",10,10,40,40) + case 55 : hTextrahmenErstellen ("a Sun tentou adquirir a Apple",10,10,40,40) + case else : if bAsianLan then + printlog "For the language " + iSprache +" nothing is prepared yet, but is AsianLan, so OK :-)" + printlog " :-) will use English instead" + hTextrahmenErstellen ("This ist a text with no split words",10,10,40,40) + else + Warnlog "For the language " + iSprache +" nothing is prepared yet: insert text here" + endif +end select +hTypeKeys "" +Kontext "Silbentrennung" +if Silbentrennung.Exists =True Then + Warnlog "Dialog exists" + Silbentrennung.Cancel +else + Kontext "Active" + if Active.Exists then Active.OK end if -' Kontext "DocumentImpress" - printlog " - Hyphenation with text, but without any possibility to break words" - select case iSprache - case 01 : hTextrahmenErstellen ("This ist a text with no split words",10,10,40,40) '/// Create text without a pssibility to split words///' - case 03 : hTextrahmenErstellen ("Compare a tradu" + Chr(231) + Chr(227) + "o com o original",10,10,40,40) - case 07 : qaerrorlog "- No Hypenation for Russian available" - Call hCloseDocument '/// Close document ///' - goto endsub - case 31 : hTextrahmenErstellen ("Het is mijn bedoeling om voor en hulpmiddel.",10,10,40,40) - case 33 : hTextrahmenErstellen ("Merci beaucoup pout votre candidature du 13/11/97.",10,10,40,40) - case 34 : hTextrahmenErstellen ("This ist a text with no spliting words",10,10,40,40) - case 36 : hTextrahmenErstellen ("Semmi karhozattyoc nincz most azoknac, a kic az Iesus Christusban be oltattac",10,10,40,40) - case 39 : hTextrahmenErstellen ("Il documento 'Senza nome 1' stato modififcato",10,10,40,40) - case 45 : hTextrahmenErstellen ("at du har nok i dit hvis du",10,10,40,40 ) - case 46 : hTextrahmenErstellen ("Detta är en text utan delade ord",10,10,40,40) - case 48 : hTextrahmenErstellen (" Jeoli jednak zechcesz",10,10,40,40) - case 49 : hTextrahmenErstellen ("Dies ist ein Text ohne eine Moeglichkeit Woerter zu trennen",10,10,40,40) - case 50 : hTextrahmenErstellen ("Zato ves čas iščemo nove člane: sodelujte",10,10,40,40) - case 55 : hTextrahmenErstellen ("a Sun tentou adquirir a Apple",10,10,40,40) - case else : if bAsianLan then - printlog "For the language " + iSprache +" nothing is prepared yet, but is AsianLan, so OK :-)" - printlog " :-) will use English instead" - hTextrahmenErstellen ("This ist a text with no split words",10,10,40,40) - else - Warnlog "For the language " + iSprache +" nothing is prepared yet: insert text here" - endif - end select - hTypeKeys "" - ExtrasSilbentrennungDraw '/// Try Silbentrennung ///' - Kontext "Silbentrennung" - if Silbentrennung.Exists =True Then - Warnlog "Dialog exists" - Silbentrennung.Cancel - else - Kontext "Active" - if Active.Exists then Active.OK - end if - - Call hCloseDocument '/// Close document ///' - + + endcase 'tiToolsHyphenation1 '------------------------------------------------------------------------------- testcase tiToolsHyphenation2 - dim iWaitIndex as integer - dim sExt as string - Dim i : Dim DasWort : Dim DasWort2 : Dim DasWort3 : Dim DasWort4 : Dim DasWort5 : Dim DasWort6 : Dim DasWort7 - dim sDraw as string - dim sFile as string - PrintLog "- Tools/Hyphenation2" - Select Case Ucase(gApplication) - case "DRAW" : sExt = ".odg" - case "IMPRESS" : sExt = ".odp" - end select - - if ((not bAsianLan) AND (iSprache <> 07)) then - sFile = gTesttoolpath + "graphics\required\input\silben_"+iSprache+sExt - Call hFileOpen (sFile) - endif - - select case iSprache '/// Open prepared document ///' - case 01 :DasWort = "ation" : DasWort2 = "tion" : DasWort3 = "ion" : DasWort4 = "on" '+Chr(34) - case 07 : qaerrorlog "- No Hypenation for Russian available" - goto endsub - case 31 :DasWort = "siteit" : DasWort2 = "iteit" : DasWort3 = "teit" : DasWort4 = "eit" - case 33 :DasWort = "ture" : DasWort2 = "ure" : DasWort3 = "re" : DasWort4 = "e" - case 34 :DasWort = "chvo" : DasWort2 = "hvo" : DasWort3 = "vo" : DasWort4 = "o" - case 36 :DasWort = "zatnal" : DasWort2 = "atnal" : DasWort3 = "tnal" : DasWort4 = "nal" - case 39 :DasWort = "sentu" : DasWort2 = "entu" : DasWort3 = "ntu" : DasWort4 = "tu" - case 46 :DasWort = "niska" : DasWort2 = "iska" : DasWort3 = "ska" : DasWort4 = "ka" - case 48 :DasWort = "nie" : DasWort2 = "ie" : DasWort3 = "e" - case 49 :DasWort = "nung" : DasWort2 = "ung" : DasWort3 = "ng" : DasWort4 = "g" - case 50 :DasWort = "nica" : DasWort2 = "ica" : DasWort3 = "ca" : DasWort4 = "a" - case 55 :DasWort = "gia" : DasWort2 = "ia" : DasWort3 = "a" : DasWort4 = "ogia" - case else : if bAsianLan then - printlog "For the language " + iSprache +" nothing is prepared yet, but is AsianLan, so OK :-)" - printlog " :-) will use English instead" - Call hFileOpen (gTesttoolpath + "graphics\required\input\silben_"+"1"+sExt) - DasWort = "ation" : DasWort2 = "tion" : DasWort3 = "ion" : DasWort4 = "on" '+Chr(34) - else - Warnlog "For the language " + iSprache +" nothing is prepared yet: insert text here and create file: "+sFile - hNewDocument - endif - end select - - Call sMakeReadOnlyDocumentEditable - - printlog " - Test hyphenation" - EditSelectAll '/// Press CTRL + A to select all ///' - '/// press return to go into the edit mode ///' - hTypeKeys "" - - sleep 1 - ' WA for draw, or smth else: get text part before hyphenation: - if iSprache = "1" OR bAsianLan = TRUE then - hTypeKeys "" '/// Select part of text and compare it with original text at this place ///' - else - hTypeKeys "" - endif - EditCopy - sDraw = GetClipboardText() - EditSelectAll '/// Select whole text ///' - ExtrasSilbentrennungDraw '/// Run Hyphenation ///' - gMouseClick 50,50 - hTypeKeys "" '/// Select part of text and compare it with original text at this place ///' - sleep 3 - EditCopy -printlog GetClipboardText - select case GetClipboardText - case DasWort : printlog " - Hyphenation worked" - case DasWort2 : printlog " - Hyphenation worked" - case DasWort3 : printlog " - Hyphenation worked" - case DasWort4 : printlog " - Hyphenation worked" - case else : warnlog " - Hyphenation didnt work" + dim iWaitIndex as integer + dim sExt as string + Dim i : Dim DasWort : Dim DasWort2 : Dim DasWort3 : Dim DasWort4 : Dim DasWort5 : Dim DasWort6 : Dim DasWort7 + dim sDraw as string + dim sFile as string + PrintLog "- Tools/Hyphenation2" + Select Case Ucase(gApplication) + case "DRAW" : sExt = ".odg" + case "IMPRESS" : sExt = ".odp" end select - if GetClipboardText <> sDraw then - Printlog " - WA draw hyphenation did work :-)" - else - Warnlog " - Hyphenation did not work" - Printlog "Expected: '"+DasWort+"'; or something different than: '"+sDraw+"'; But what we got was: '"+GetClipboardText+"'" - end if - sleep 1 - Call hCloseDocument '/// Close document ///' - + + if ((not bAsianLan) AND (iSprache <> 07)) then + sFile = gTesttoolpath + "graphics\required\input\silben_"+iSprache+sExt + Call hFileOpen (sFile) + endif + +case 01 :DasWort = "ation" : DasWort2 = "tion" : DasWort3 = "ion" : DasWort4 = "on" '+Chr(34) +case 07 : qaerrorlog "- No Hypenation for Russian available" + goto endsub +case 31 :DasWort = "siteit" : DasWort2 = "iteit" : DasWort3 = "teit" : DasWort4 = "eit" +case 33 :DasWort = "ture" : DasWort2 = "ure" : DasWort3 = "re" : DasWort4 = "e" +case 34 :DasWort = "chvo" : DasWort2 = "hvo" : DasWort3 = "vo" : DasWort4 = "o" +case 36 :DasWort = "zatnal" : DasWort2 = "atnal" : DasWort3 = "tnal" : DasWort4 = "nal" +case 39 :DasWort = "sentu" : DasWort2 = "entu" : DasWort3 = "ntu" : DasWort4 = "tu" +case 46 :DasWort = "niska" : DasWort2 = "iska" : DasWort3 = "ska" : DasWort4 = "ka" +case 48 :DasWort = "nie" : DasWort2 = "ie" : DasWort3 = "e" +case 49 :DasWort = "nung" : DasWort2 = "ung" : DasWort3 = "ng" : DasWort4 = "g" +case 50 :DasWort = "nica" : DasWort2 = "ica" : DasWort3 = "ca" : DasWort4 = "a" +case 55 :DasWort = "gia" : DasWort2 = "ia" : DasWort3 = "a" : DasWort4 = "ogia" +case else : if bAsianLan then + printlog "For the language " + iSprache +" nothing is prepared yet, but is AsianLan, so OK :-)" + printlog " :-) will use English instead" + Call hFileOpen (gTesttoolpath + "graphics\required\input\silben_"+"1"+sExt) + DasWort = "ation" : DasWort2 = "tion" : DasWort3 = "ion" : DasWort4 = "on" '+Chr(34) +else + Warnlog "For the language " + iSprache +" nothing is prepared yet: insert text here and create file: "+sFile + hNewDocument +endif +end select + +Call sMakeReadOnlyDocumentEditable + +printlog " - Test hyphenation" +hTypeKeys "" + +sleep 1 +' WA for draw, or smth else: get text part before hyphenation: +if iSprache = "1" OR bAsianLan = TRUE then +else +hTypeKeys "" +endif +EditCopy +sDraw = GetClipboardText() +gMouseClick 50,50 +sleep 3 +EditCopy +printlog GetClipboardText +select case GetClipboardText +case DasWort : printlog " - Hyphenation worked" +case DasWort2 : printlog " - Hyphenation worked" +case DasWort3 : printlog " - Hyphenation worked" +case DasWort4 : printlog " - Hyphenation worked" +case else : warnlog " - Hyphenation didnt work" +end select +if GetClipboardText <> sDraw then +Printlog " - WA draw hyphenation did work :-)" +else +Warnlog " - Hyphenation did not work" +Printlog "Expected: '"+DasWort+"'; or something different than: '"+sDraw+"'; But what we got was: '"+GetClipboardText+"'" +end if +sleep 1 + endcase 'tiToolsHyphenation2 '------------------------------------------------------------------------------- @@ -318,7 +292,6 @@ testcase tToolsMacro ToolsMacro Kontext "Makro" - '/// to get the count of all macros, the list needs to get elapsed-all ///' for j = 1 to 2 Zaehler=MakroAus.GetItemCount MakroAus.typeKeys "" @@ -432,5 +405,5 @@ testcase tToolsMacro 'TODO: organizer testing! Call hCloseDocument Call hCloseDocument - + endcase 'tToolsMacro diff --git a/testautomation/graphics/optional/includes/global/g_zoom.inc b/testautomation/graphics/optional/includes/global/g_zoom.inc index 023e30b5c826..55c8e86e506d 100755 --- a/testautomation/graphics/optional/includes/global/g_zoom.inc +++ b/testautomation/graphics/optional/includes/global/g_zoom.inc @@ -1,7 +1,7 @@ 'encoding UTF-8 Do not remove or change this line! '************************************************************************** '* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. -'* +'* '* Copyright 2008 by Sun Microsystems, Inc. '* '* OpenOffice.org - a multi-platform office productivity suite @@ -40,13 +40,13 @@ '\******************************************************************** testcase tViewZoom - dim Zaehler as integer - dim Position1 as integer - dim Position2 as integer - Dim Datei$ - Printlog "- view Zoom" + dim Zaehler as integer + dim Position1 as integer + dim Position2 as integer + Dim Datei$ + Printlog "- view Zoom" - if (gApplication = "IMPRESS") then + if (gApplication = "IMPRESS") then ExtensionString = "odp" else ExtensionString = "odg" @@ -55,85 +55,78 @@ testcase tViewZoom Datei$ = ConvertPath (gOfficePath + "user\work\test." & ExtensionString) Printlog "- View-Zoom testing" - if dir(Datei$) <> "" then app.Kill(Datei$) ' to avoid the anoying overwrite warnlog :-) - Call hNewDocument '/// new document ///' - ViewZoom - Kontext "Massstab" - Vergroesserung100.Check '/// set zoom to 50% ///' - Massstab.OK - '/// create a number of rectangles with different color properties ///' - Kontext "SD_Farbleiste" - sleep 1 - if SD_Farbleiste.Exists then - Printlog "- Color toolbar will be disabled now" - ViewToolbarsColorBar - end if - '/// All rectangles are created with same dimensions but using different zoom settings ///' - For Zaehler = 1 to 9 - Position1 = 5 * Zaehler - 3 - Position2 = 105 - 5 * Zaehler - Call hRechteckErstellen (Position1, Position1, Position2, Position2) - FormatArea - kontext - Active.SetPage TabFarben - Kontext "TabFarben" - Farbe.Select 5*Zaehler - TabFarben.OK - sleep 1 - gMouseClick 50,0 - Next Zaehler - sleep 2 - hFileSaveAs (Datei$) '/// save document ///' - sleep 3 - for Zaehler = 1 to 6 '/// changing zoom settings and checking functionality with controlling the color of the selected rectangle ///' - ViewZoom - Kontext "Massstab" - VergroesserungStufenlos.check - Stufenlos.Settext "45" - Massstab.OK - sleep 2 - gMouseClick 50,1 - ViewZoom - Kontext "Massstab" - Select Case Zaehler - Case 1: VergroesserungStufenlos.check - Stufenlos.Settext "40" - Case 2: VergroesserungStufenlos.check - Stufenlos.Settext "50" - Case 3: VergroesserungStufenlos.check - Stufenlos.Settext "75" - Case 4: VergroesserungStufenlos.check - Stufenlos.Settext "100" - Case 5: VergroesserungStufenlos.check - Stufenlos.Settext "150" - Case 6: VergroesserungStufenlos.check - Stufenlos.Settext "200" - - 'Case 2: Vergroesserung50.check - 'Case 3: Vergroesserung75.check - 'Case 4: Vergroesserung100.check - 'Case 5: Vergroesserung150.check - 'Case 6: Vergroesserung200.check - End Select - Massstab.OK - sleep 1 - Kontext "DocumentImpress" - gMouseClick 15,15 'hier soll die Maus ein Rechteck treffen; - 'die Farbe des Rechtecks sagt uns dann, ob - FormatArea 'richtig vergroessert oder verkleinert wurde. - sleep 1 - Kontext - Active.SetPage TabFarben - Kontext "TabFarben" - printlog "Color index ", Farbe.GetSelIndex - TabFarben.Cancel - sleep 1 - next Zaehler + if dir(Datei$) <> "" then app.Kill(Datei$) ' to avoid the anoying overwrite warnlog :-) + ViewZoom + Kontext "Massstab" + Massstab.OK + Kontext "SD_Farbleiste" + sleep 1 + if SD_Farbleiste.Exists then + Printlog "- Color toolbar will be disabled now" + ViewToolbarsColorBar + end if + For Zaehler = 1 to 9 + Position1 = 5 * Zaehler - 3 + Position2 = 105 - 5 * Zaehler + Call hRechteckErstellen (Position1, Position1, Position2, Position2) + FormatArea + kontext + Active.SetPage TabFarben + Kontext "TabFarben" + Farbe.Select 5*Zaehler + TabFarben.OK + sleep 1 + gMouseClick 50,0 + Next Zaehler + sleep 2 + sleep 3 + ViewZoom + Kontext "Massstab" + VergroesserungStufenlos.check + Stufenlos.Settext "45" + Massstab.OK + sleep 2 + gMouseClick 50,1 + ViewZoom + Kontext "Massstab" + Select Case Zaehler + Case 1: VergroesserungStufenlos.check + Stufenlos.Settext "40" + Case 2: VergroesserungStufenlos.check + Stufenlos.Settext "50" + Case 3: VergroesserungStufenlos.check + Stufenlos.Settext "75" + Case 4: VergroesserungStufenlos.check + Stufenlos.Settext "100" + Case 5: VergroesserungStufenlos.check + Stufenlos.Settext "150" + Case 6: VergroesserungStufenlos.check + Stufenlos.Settext "200" + + 'Case 2: Vergroesserung50.check + 'Case 3: Vergroesserung75.check + 'Case 4: Vergroesserung100.check + 'Case 5: Vergroesserung150.check + 'Case 6: Vergroesserung200.check + End Select + Massstab.OK + sleep 1 + Kontext "DocumentImpress" + gMouseClick 15,15 'hier soll die Maus ein Rechteck treffen; + 'die Farbe des Rechtecks sagt uns dann, ob + FormatArea 'richtig vergroessert oder verkleinert wurde. + sleep 1 + Kontext + Active.SetPage TabFarben + Kontext "TabFarben" + printlog "Color index ", Farbe.GetSelIndex + TabFarben.Cancel + sleep 1 + next Zaehler - 'GanzeSeite.push - 'Optimal.push - 'Seitenbreite.push - sleep 2 + 'GanzeSeite.push + 'Optimal.push + 'Seitenbreite.push + sleep 2 - Call hCloseDocument '/// close document ///' endcase diff --git a/testautomation/graphics/optional/includes/global/gallery.inc b/testautomation/graphics/optional/includes/global/gallery.inc index 9175441e0f64..266ba01f2ec1 100755 --- a/testautomation/graphics/optional/includes/global/gallery.inc +++ b/testautomation/graphics/optional/includes/global/gallery.inc @@ -1,7 +1,7 @@ 'encoding UTF-8 Do not remove or change this line! '************************************************************************** '* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. -'* +'* '* Copyright 2008 by Sun Microsystems, Inc. '* '* OpenOffice.org - a multi-platform office productivity suite @@ -50,29 +50,23 @@ '* '\****************************************************************** testcase tGallery_DialogTest - '///Open a new Writer document - '///Tools / Gallery printlog "- Working with Gallery-Beamer!" gApplication = "WRITER" call hNewDocument call hOpenGallery Kontext "DocumentWriter" - '///+Undock the Gallery Beamer - printlog "- undock the Gallery Beamer" - Kontext "Gallery" - Gallery.Undock ( AlignTop ) - sleep(2) - '///+
  • Move the gallery-window
- printlog " - move the gallery window" - Gallery.move ( 20, 20 ) - sleep(2) - '///+Dock the Gallery Beamer - printlog "- dock the Gallery Beamer" - Gallery.Dock ( AlignTop ) - sleep(2) - '///+Close the Gallery Beamer (Tools / Gallery) - printlog "- close the Gallery Beamer" - ToolsGallery + printlog "- undock the Gallery Beamer" + Kontext "Gallery" + Gallery.Undock ( AlignTop ) + sleep(2) + printlog " - move the gallery window" + Gallery.move ( 20, 20 ) + sleep(2) + printlog "- dock the Gallery Beamer" + Gallery.Dock ( AlignTop ) + sleep(2) + printlog "- close the Gallery Beamer" + ToolsGallery call hCloseDocument endcase @@ -80,52 +74,48 @@ endcase testcase tGallery_ActivateAndUpdateAllThemes Dim iThemeCount as Integer - Dim i as Integer + Dim i as Integer Dim j as Integer Dim Gallerytext as string - '///Activate and update all gallery themes (NET installation: Activate only!) - '///Open a new Writer document - '///+Tools / Gallery - '///+Click on each theme and update it (via context menu) printlog "activate and update all gallery-themes" gApplication = "WRITER" call hNewDocument Kontext call hOpenGallery Kontext "Gallery" - iThemeCount = Gallerys.GetItemCount - for i=1 to iThemeCount - if gNetzInst = FALSE then - Kontext "Gallery" - Gallerytext = Gallerys.GetItemText(i) - printlog "- " + i + ". entry (" & Gallerytext & ")" - Gallerys.Select i - Gallerys.MouseMove ( 10, 10 ) - Gallerys.OpenContextMenu - sleep (3) - printlog " - update" - hMenuSelectNr (1) - sleep (3) - Kontext "Messagebox" - if Messagebox.Exists(3) then - if Messagebox.getRT=304 then - printlog "- 'MyTheme' is the " & i & "'s entry." - Messagebox.No - end if + iThemeCount = Gallerys.GetItemCount + for i=1 to iThemeCount + if gNetzInst = FALSE then + Kontext "Gallery" + Gallerytext = Gallerys.GetItemText(i) + printlog "- " + i + ". entry (" & Gallerytext & ")" + Gallerys.Select i + Gallerys.MouseMove ( 10, 10 ) + Gallerys.OpenContextMenu + sleep (3) + printlog " - update" + hMenuSelectNr (1) + sleep (3) + Kontext "Messagebox" + if Messagebox.Exists(3) then + if Messagebox.getRT=304 then + printlog "- 'MyTheme' is the " & i & "'s entry." + Messagebox.No + end if + else + for j = 1 to 800 + Kontext "AktualisierenGallery" + if AktualisierenGallery.Exists then + printlog "DEBUG (j): " & j + sleep (1) else - for j = 1 to 800 - Kontext "AktualisierenGallery" - if AktualisierenGallery.Exists then - printlog "DEBUG (j): " & j - sleep (1) - else - printlog "DEBUG: 800 reached!" - j=801 - end if - next j + printlog "DEBUG: 800 reached!" + j=801 end if + next j end if - next i + end if + next i call hCloseDocument endcase @@ -140,44 +130,39 @@ testcase tGallery_CheckNames Dim sFileName as String Dim iGalleryThemes as integer - if gOOO = true then + if gOOO = true then sFileName = ConvertPath ( gTesttoolPath + "graphics\required\input\gallery\gal_oo_" + iSprache + ".txt" ) else sFileName = ConvertPath ( gTesttoolPath + "graphics\required\input\gallery\gal_" + iSprache + ".txt" ) end if - '///Check the names for the gallery themes - '///Open a new Writer document - '///+Tools / Gallery gApplication = "WRITER" call hNewDocument Kontext call hOpenGallery - '///+Check the number of gallery themes. For StarOffice: should be 32. For OpenOffice.Org: should be 6. printlog "- check the number of gallery-themes" Kontext "Gallery" - if NOT gOOO then - if bAsianLan then - iGalleryThemes = 29 ' Flags are not allowed! - else - iGalleryThemes = 30 - end if + if NOT gOOO then + if bAsianLan then + iGalleryThemes = 29 ' Flags are not allowed! else - if bAsianLan then - iGalleryThemes = 6 ' Flags are not allowed! - else - iGalleryThemes = 6 - end if + iGalleryThemes = 30 end if - iThemeCount = Gallerys.GetItemCount - if (iThemeCount <> iGalleryThemes) then - warnlog "Difference in count of gallery themes; found: '" + iThemeCount + "'; expected: '"+ iGalleryThemes +"'" + else + if bAsianLan then + iGalleryThemes = 6 ' Flags are not allowed! + else + iGalleryThemes = 6 end if - for i=1 to iThemeCount + end if + iThemeCount = Gallerys.GetItemCount + if (iThemeCount <> iGalleryThemes) then + warnlog "Difference in count of gallery themes; found: '" + iThemeCount + "'; expected: '"+ iGalleryThemes +"'" + end if + for i=1 to iThemeCount Gallerys.Select i ListAppend ( siList(), Gallerys.GetSelText ) next i - '///+Check all names with a list which depends on language (gTestToolPath/graphics/udpate/input/gallery) printlog "- check the names of gallery-themes" if Dir ( sFilename ) = "" then warnlog "The file for comparison does not exists. The file will be written!" @@ -199,67 +184,62 @@ testcase tGallery_CheckContextMenuForGalleryThemes Dim iMenuEntries as Integer Dim i as Integer Dim iThemeCount as Integer - '/// Check the contextmenu for the gallery themes - '/// Open a new Writer document - '/// +Tools / Gallery printlog "check the contextmenu for the gallery-themes" gApplication = "WRITER" call hNewDocument call hOpenGallery - '/// +Testing rename and properties for each gallery theme (via context-menu) - '/// +
  • Only the private gallery theme must be deleteable (different 3 entries in the context-menu than the rest)
Kontext "Gallery" - iThemeCount = Gallerys.GetItemCount - Gallerys.MouseMove ( 10, 10 ) - for i=1 to iThemeCount - Kontext "Gallery" - printlog "- " + i + ". entry" - sleep 1 - Gallerys.Select 1 - sleep (1) - Gallerys.Select i - sleep (1) - Gallerys.OpenContextMenu - sleep (2) - iMenuEntries = hMenuItemGetCount - if iMenuEntries <> 3 then - if gNetzInst = FALSE then - warnlog "There are not 3 entries! => no test on the contextmenu!" - else - if iMenuEntries <> 1 then - warnlog "Net-Inst : There are not 1 entries! => no test on the contextmenu!" - else - sleep (3) - hMenuSelectNr(1) - Kontext - if Active.GetPageCount <> 1 then - warnlog "There are more than 1 Tabpage in Net-Installation ( perhaps no root-installation )!" - end if - Active.SetPage TabAllgemeinGallery - Kontext "TabAllgemeinGallery" - TabAllgemeinGallery.Cancel - sleep (1) - end if - end if + iThemeCount = Gallerys.GetItemCount + Gallerys.MouseMove ( 10, 10 ) + for i=1 to iThemeCount + Kontext "Gallery" + printlog "- " + i + ". entry" + sleep 1 + Gallerys.Select 1 + sleep (1) + Gallerys.Select i + sleep (1) + Gallerys.OpenContextMenu + sleep (2) + iMenuEntries = hMenuItemGetCount + if iMenuEntries <> 3 then + if gNetzInst = FALSE then + warnlog "There are not 3 entries! => no test on the contextmenu!" + else + if iMenuEntries <> 1 then + warnlog "Net-Inst : There are not 1 entries! => no test on the contextmenu!" else + sleep (3) + hMenuSelectNr(1) + Kontext + if Active.GetPageCount <> 1 then + warnlog "There are more than 1 Tabpage in Net-Installation ( perhaps no root-installation )!" + end if + Active.SetPage TabAllgemeinGallery + Kontext "TabAllgemeinGallery" + TabAllgemeinGallery.Cancel sleep (1) - hMenuSelectNr(2) - Kontext "GalleryNewTitle" - GalleryNewTitle.Cancel - sleep(1) - Kontext "Gallery" - Gallerys.OpenContextMenu - sleep (3) - hMenuSelectNr (3) - Kontext - Active.SetPage TabAllgemeinGallery - Active.SetPage TabDateien - Kontext "TabDateien" - TabDateien.Cancel - sleep(1) end if - next i - ToolsGallery + end if + else + sleep (1) + hMenuSelectNr(2) + Kontext "GalleryNewTitle" + GalleryNewTitle.Cancel + sleep(1) + Kontext "Gallery" + Gallerys.OpenContextMenu + sleep (3) + hMenuSelectNr (3) + Kontext + Active.SetPage TabAllgemeinGallery + Active.SetPage TabDateien + Kontext "TabDateien" + TabDateien.Cancel + sleep(1) + end if + next i + ToolsGallery call hCloseDocument endcase @@ -322,7 +302,7 @@ testcase tGallery_CreateAndWorkWithANewGalleryThemes j=101 endif next j - + sleep (1) Kontext "TabDateien" printlog "add the 2nd one" @@ -356,7 +336,7 @@ testcase tGallery_CreateAndWorkWithANewGalleryThemes next j sleep (1) Kontext "TabDateien" - + if DateiListe.GetItemCount > 1 then printlog " - 'add all' for the rest of the files" DateiListe.Select 1 @@ -383,7 +363,7 @@ testcase tGallery_CreateAndWorkWithANewGalleryThemes call hCloseDocument else printlog "make mouseclick to set focus" - gMouseClick 50,50 + gMouseClick 50,50 Kontext "Gallery" Gallerys.Select "TT-theme" Gallerys.MouseMove ( 10, 10 ) @@ -399,79 +379,79 @@ testcase tGallery_CreateAndWorkWithANewGalleryThemes end if do sleep 1 - loop while AktualisierenGallery.Exists - Kontext "Gallery" - Gallerys.Select "TT-theme" - Gallerys.OpenContextMenu - printlog "+Update it (1. entry in context menu )" - sleep (3) - hMenuSelectNr (1) - for j=1 to 100 - Kontext "AktualisierenGallery" - if AktualisierenGallery.Exists <> TRUE then - j=101 - else - sleep (1) - end if - next j - printlog " - rename ( 3. entry in context-menu )" - Kontext "Gallery" - Gallerys.OpenContextMenu - sleep (3) - hMenuSelectNr (3) - Kontext "GalleryNewTitle" - Title.SetText "New TT-theme" - GalleryNewTitle.OK - Kontext "Gallery" - Gallerys.Select "New TT-theme" - printlog " - add new graphics in properties ( 4. entry in context-menu )" - Kontext "Gallery" - Gallerys.OpenContextMenu - sleep (3) - hMenuSelectNr (4) - Kontext - Active.SetPage TabDateien - Kontext "TabDateien" - Suche.Click - Kontext "OeffnenDlg" - Pfad.SetText ( convertPath ( gTesttoolPath + "global\input\graf_inp" ) ) - Auswaehlen.Click - sleep (10) - Kontext "TabDateien" - DateiListe.Select 1 - Hinzufuegen.Click - TabDateien.OK - printlog " - delete the entry ( 2. entry in context-menu )" - printlog " - messagebox -> no" - Kontext "Gallery" - Gallerys.Select "New TT-theme" - sleep (5) - Gallerys.OpenContextMenu - sleep (3) - hMenuSelectNr (2) - Kontext "Active" - sleep (1) - Active.No - printlog " - messagebox -> yes" + loop while AktualisierenGallery.Exists + Kontext "Gallery" + Gallerys.Select "TT-theme" + Gallerys.OpenContextMenu + printlog "+Update it (1. entry in context menu )" + sleep (3) + hMenuSelectNr (1) + for j=1 to 100 + Kontext "AktualisierenGallery" + if AktualisierenGallery.Exists <> TRUE then + j=101 + else + sleep (1) + end if + next j + printlog " - rename ( 3. entry in context-menu )" + Kontext "Gallery" + Gallerys.OpenContextMenu + sleep (3) + hMenuSelectNr (3) + Kontext "GalleryNewTitle" + Title.SetText "New TT-theme" + GalleryNewTitle.OK + Kontext "Gallery" + Gallerys.Select "New TT-theme" + printlog " - add new graphics in properties ( 4. entry in context-menu )" + Kontext "Gallery" + Gallerys.OpenContextMenu + sleep (3) + hMenuSelectNr (4) + Kontext + Active.SetPage TabDateien + Kontext "TabDateien" + Suche.Click + Kontext "OeffnenDlg" + Pfad.SetText ( convertPath ( gTesttoolPath + "global\input\graf_inp" ) ) + Auswaehlen.Click + sleep (10) + Kontext "TabDateien" + DateiListe.Select 1 + Hinzufuegen.Click + TabDateien.OK + printlog " - delete the entry ( 2. entry in context-menu )" + printlog " - messagebox -> no" + Kontext "Gallery" + Gallerys.Select "New TT-theme" + sleep (5) + Gallerys.OpenContextMenu + sleep (3) + hMenuSelectNr (2) + Kontext "Active" + sleep (1) + Active.No + printlog " - messagebox -> yes" + Kontext "Gallery" + sleep (1) + Gallerys.Select "New TT-theme" + sleep (1) + Gallerys.OpenContextMenu + sleep (3) + hMenuSelectNr (2) + Kontext "Active" + Active.Yes + try Kontext "Gallery" - sleep (1) Gallerys.Select "New TT-theme" - sleep (1) - Gallerys.OpenContextMenu - sleep (3) - hMenuSelectNr (2) - Kontext "Active" - Active.Yes - try - Kontext "Gallery" - Gallerys.Select "New TT-theme" - warnlog "The entry isn't deleted!" - catch - endcatch - end if - sleep 10 - ToolsGallery - call hCloseDocument + warnlog "The entry isn't deleted!" + catch + endcatch +end if +sleep 10 +ToolsGallery +call hCloseDocument endcase '------------------------------------------------------------------------- @@ -501,37 +481,34 @@ testcase tGallery_GalleryView_Preview case 86 : jpeg_bkg = 1 : iAnimation = 9 : iSound = 13 case 88 : jpeg_bkg = 1 : iAnimation = 7 : iSound = 20 case else : jpeg_bkg = 10 : iAnimation = 1 : iSound = 17 - warnlog "Please insert the entrienumbers for 'Backgrounds', 'Sounds' and one with normal files ( Animations )" + warnlog "Please insert the entrienumbers for 'Backgrounds', 'Sounds' and one with normal files ( Animations )" end select else ' Testing OOO select case iSprache - case 01 : jpeg_bkg = 1 : iAnimation = 5 : iSound = 2 - case 07 : jpeg_bkg = 1 : iAnimation = 5 : iSound = 2 - case 31 : jpeg_bkg = 3 : iAnimation = 1 : iSound = 1 - case 33 : jpeg_bkg = 3 : iAnimation = 1 : iSound = 2 - case 34 : jpeg_bkg = 1 : iAnimation = 1 : iSound = 2 - case 36 : jpeg_bkg = 2 : iAnimation = 1 : iSound = 2 - case 39 : jpeg_bkg = 2 : iAnimation = 1 : iSound = 2 - case 46 : jpeg_bkg = 2 : iAnimation = 5 : iSound = 2 - case 48 : jpeg_bkg = 2 : iAnimation = 5 : iSound = 2 - case 49 : jpeg_bkg = 2 : iAnimation = 5 : iSound = 2 - case 55 : jpeg_bkg = 2 : iAnimation = 5 : iSound = 2 - case 81 : jpeg_bkg = 2 : iAnimation = 5 : iSound = 2 'FHA TODO: Find out the right numbers for Asian languages. - case 82 : jpeg_bkg = 1 : iAnimation = 5 : iSound = 2 - case 86 : jpeg_bkg = 1 : iAnimation = 5 : iSound = 3 - case 88 : jpeg_bkg = 1 : iAnimation = 5 : iSound = 2 - case else : jpeg_bkg = 1 : iAnimation = 5 : iSound = 2 - warnlog "Please insert the entrienumbers for 'Backgrounds', 'Sounds' and one with normal files ( Animations )" + case 01 : jpeg_bkg = 1 : iAnimation = 5 : iSound = 2 + case 07 : jpeg_bkg = 1 : iAnimation = 5 : iSound = 2 + case 31 : jpeg_bkg = 3 : iAnimation = 1 : iSound = 1 + case 33 : jpeg_bkg = 3 : iAnimation = 1 : iSound = 2 + case 34 : jpeg_bkg = 1 : iAnimation = 1 : iSound = 2 + case 36 : jpeg_bkg = 2 : iAnimation = 1 : iSound = 2 + case 39 : jpeg_bkg = 2 : iAnimation = 1 : iSound = 2 + case 46 : jpeg_bkg = 2 : iAnimation = 5 : iSound = 2 + case 48 : jpeg_bkg = 2 : iAnimation = 5 : iSound = 2 + case 49 : jpeg_bkg = 2 : iAnimation = 5 : iSound = 2 + case 55 : jpeg_bkg = 2 : iAnimation = 5 : iSound = 2 + case 81 : jpeg_bkg = 2 : iAnimation = 5 : iSound = 2 'FHA TODO: Find out the right numbers for Asian languages. + case 82 : jpeg_bkg = 1 : iAnimation = 5 : iSound = 2 + case 86 : jpeg_bkg = 1 : iAnimation = 5 : iSound = 3 + case 88 : jpeg_bkg = 1 : iAnimation = 5 : iSound = 2 + case else : jpeg_bkg = 1 : iAnimation = 5 : iSound = 2 + warnlog "Please insert the entrienumbers for 'Backgrounds', 'Sounds' and one with normal files ( Animations )" end select end if - '/// Open a new Writer document - '/// Tools / Gallery printlog "open a writer and the gallery" gApplication = "WRITER" call hNewDocument Kontext call hOpenGallery - '/// Check the view for Background-pictures (JPEGs), for standard graphic files (Animation) and for Sound objects for i=1 to 3 if i=1 then Gallerys.Select jpeg_bkg @@ -550,21 +527,16 @@ testcase tGallery_GalleryView_Preview else iPreview = 2 : iTitle = 0 end if - '/// Test the list-view - '/// +Click on List-View-Button in toolbar printlog "- list-view" printlog " - open the list-view" ListView.Click sleep (1) printlog " - Press Home + Enter to focus and enter Preview-mode." - '/// +Double-click on an object (preview has to be visible) View.TypeKeys "" View.TypeKeys "" sleep (2) - '/// +Back to normal view with Enter View.TypeKeys "" sleep (2) - '/// +Preview out of context menu on/off printlog " - preview out of context menu on/off" View.TypeKeys "" Sleep (2) @@ -573,103 +545,94 @@ testcase tGallery_GalleryView_Preview hMenuSelectNr ( iPreview ) sleep (3) kontext "Gallery" - Sleep (2) - View.OpenContextMenu true + Sleep (2) + View.OpenContextMenu true + sleep (2) + hMenuSelectNr ( iPreview ) + sleep (3) + if gNetzInst = FALSE then + printlog " - title" + Kontext "Gallery" sleep (2) - hMenuSelectNr ( iPreview ) - sleep (3) - '/// +Title (FAT installation only) - if gNetzInst = FALSE then - printlog " - title" - Kontext "Gallery" - sleep (2) - View.OpenContextMenu true - sleep (3) - hMenuSelectNr ( iTitle ) - Kontext "GalleryNewTitle" - sleep (1) - GalleryNewTitle.Cancel - sleep (1) - Kontext "Gallery" - end if - View.OpenContextMenu true - sleep (3) - hMenuSelectNr ( iPreview ) - sleep (3) - '/// Should now be in Preview-mode. Check if we are. ///' View.OpenContextMenu true sleep (3) - printlog MenuIsItemChecked (MenuGetItemID(iPreview+1)) - if MenuIsItemChecked (MenuGetItemID(iPreview+1)) then - Printlog " Entered Preview-mode correctly" - sleep (1) - else - Warnlog " Didnt seem to enter preview-mode correctly." - end if - MenuSelect (0) + hMenuSelectNr ( iTitle ) + Kontext "GalleryNewTitle" sleep (1) - '/// From here, try switching to icon-view ///' - '///+Click on Icon-View-Button in toolbar - printlog "- icon-view" - if IconView.isEnabled then - IconView.Click - qaErrorLog "The bug 64543 has been fixed! Please report to FHA." - end if + GalleryNewTitle.Cancel sleep (1) - View.TypeKeys "" - printlog " - Enter to get out of Preview-mode" - '/// +Press Return on an object (preview has to be visible) - View.TypeKeys "" - sleep (2) - '/// +Back to normal view with Return - View.TypeKeys "" - sleep (2) - '/// +Preview out of context menu on/off - printlog " - preview out of context menu on/off" - View.TypeKeys "" - sleep (3) - View.OpenContextMenu true - sleep (3) - hMenuSelectNr ( iPreview ) - sleep (3) - View.OpenContextMenu true - sleep (3) - hMenuSelectNr ( iPreview ) - sleep (3) - '/// +Title (FAT installation only) - if gNetzInst = FALSE then - printlog " - title" - try - View.OpenContextMenu true - sleep (3) - catch - warnlog "Could not open Contextmenu for Title nr:" +iTitle - endcatch - hMenuSelectNr ( iTitle ) - Kontext "GalleryNewTitle" - GalleryNewTitle.Cancel - Kontext "Gallery" - end if - next i - sleep 1 ' else crash - ToolsGallery + Kontext "Gallery" + end if + View.OpenContextMenu true + sleep (3) + hMenuSelectNr ( iPreview ) + sleep (3) + View.OpenContextMenu true + sleep (3) + printlog MenuIsItemChecked (MenuGetItemID(iPreview+1)) + if MenuIsItemChecked (MenuGetItemID(iPreview+1)) then + Printlog " Entered Preview-mode correctly" + sleep (1) + else + Warnlog " Didnt seem to enter preview-mode correctly." + end if + MenuSelect (0) + sleep (1) + printlog "- icon-view" + if IconView.isEnabled then + IconView.Click + qaErrorLog "The bug 64543 has been fixed! Please report to FHA." + end if + sleep (1) + View.TypeKeys "" + printlog " - Enter to get out of Preview-mode" + View.TypeKeys "" + sleep (2) + View.TypeKeys "" + sleep (2) + printlog " - preview out of context menu on/off" + View.TypeKeys "" + sleep (3) + View.OpenContextMenu true + sleep (3) + hMenuSelectNr ( iPreview ) + sleep (3) + View.OpenContextMenu true + sleep (3) + hMenuSelectNr ( iPreview ) + sleep (3) + if gNetzInst = FALSE then + printlog " - title" + try + View.OpenContextMenu true + sleep (3) + catch + warnlog "Could not open Contextmenu for Title nr:" +iTitle + endcatch + hMenuSelectNr ( iTitle ) + Kontext "GalleryNewTitle" + GalleryNewTitle.Cancel + Kontext "Gallery" + end if + next i + sleep 1 ' else crash + ToolsGallery - '/// If the MediaPlayer exists - close it ///' kontext "Mplayer" - if Mplayer.Exists then - if (gApplication = "IMPRESS") then - kontext "DocumentImpress" - else - kontext "DocumentDraw" - end if - ToolsMediaPlayer + if Mplayer.Exists then + if (gApplication = "IMPRESS") then + kontext "DocumentImpress" else - if (gApplication = "IMPRESS") then - kontext "DocumentImpress" - else - kontext "DocumentDraw" - end if + kontext "DocumentDraw" + end if + ToolsMediaPlayer + else + if (gApplication = "IMPRESS") then + kontext "DocumentImpress" + else + kontext "DocumentDraw" end if + end if call hCloseDocument endcase @@ -682,216 +645,197 @@ testcase tGallery_GalleryView_Insert Dim i as Integer Dim j as Integer Dim k as Integer - '/// Test gallery-view -> insert gallery-object with context-menu (3D-Object (internal object), Animation (as file)) if NOT gOOO then select case iSprache - case 01 : jpeg_bkg = 3 : iAnimation = 1 - case 07 : jpeg_bkg = 29 : iAnimation = 1 - case 31 : jpeg_bkg = 3 : iAnimation = 3 - case 33 : jpeg_bkg = 13 : iAnimation = 1 - case 34 : jpeg_bkg = 7 : iAnimation = 1 - case 36 : jpeg_bkg = 12 : iAnimation = 1 - case 39 : jpeg_bkg = 10 : iAnimation = 1 - case 46 : jpeg_bkg = 1 : iAnimation = 2 - case 48 : jpeg_bkg = 3 : iAnimation = 1 - case 49 : jpeg_bkg = 1 : iAnimation = 2 - case 55 : jpeg_bkg = 8 : iAnimation = 1 - case 81 : jpeg_bkg = 1 : iAnimation = 3 - case 82 : jpeg_bkg = 1 : iAnimation = 17 - case 86 : jpeg_bkg = 17 : iAnimation = 15 - case 88 : jpeg_bkg = 17 : iAnimation = 15 - case else : jpeg_bkg = 1 : iAnimation = 2 - warnlog "Please insert the entrienumbers for 'Backgrounds' and one with normal files ( Animations )" + case 01 : jpeg_bkg = 3 : iAnimation = 1 + case 07 : jpeg_bkg = 29 : iAnimation = 1 + case 31 : jpeg_bkg = 3 : iAnimation = 3 + case 33 : jpeg_bkg = 13 : iAnimation = 1 + case 34 : jpeg_bkg = 7 : iAnimation = 1 + case 36 : jpeg_bkg = 12 : iAnimation = 1 + case 39 : jpeg_bkg = 10 : iAnimation = 1 + case 46 : jpeg_bkg = 1 : iAnimation = 2 + case 48 : jpeg_bkg = 3 : iAnimation = 1 + case 49 : jpeg_bkg = 1 : iAnimation = 2 + case 55 : jpeg_bkg = 8 : iAnimation = 1 + case 81 : jpeg_bkg = 1 : iAnimation = 3 + case 82 : jpeg_bkg = 1 : iAnimation = 17 + case 86 : jpeg_bkg = 17 : iAnimation = 15 + case 88 : jpeg_bkg = 17 : iAnimation = 15 + case else : jpeg_bkg = 1 : iAnimation = 2 + warnlog "Please insert the entrienumbers for 'Backgrounds' and one with normal files ( Animations )" end select else ' Testing OOO select case iSprache - case 01 : jpeg_bkg = 3 : iAnimation = 1 - case 07 : jpeg_bkg = 5 : iAnimation = 1 - case 31 : jpeg_bkg = 3 : iAnimation = 3 - case 33 : jpeg_bkg = 5 : iAnimation = 1 - case 34 : jpeg_bkg = 6 : iAnimation = 1 - case 36 : jpeg_bkg = 5 : iAnimation = 1 - case 39 : jpeg_bkg = 5 : iAnimation = 1 - case 46 : jpeg_bkg = 1 : iAnimation = 2 - case 48 : jpeg_bkg = 3 : iAnimation = 1 - case 49 : jpeg_bkg = 1 : iAnimation = 2 - case 55 : jpeg_bkg = 6 : iAnimation = 1 - case 81 : jpeg_bkg = 1 : iAnimation = 3 - case 82 : jpeg_bkg = 1 : iAnimation = 1 - case 86 : jpeg_bkg = 5 : iAnimation = 5 - case 88 : jpeg_bkg = 5 : iAnimation = 1 - case else : jpeg_bkg = 1 : iAnimation = 2 - warnlog "Please insert the entrienumbers for 'Backgrounds' and one with normal files ( Animations )" + case 01 : jpeg_bkg = 3 : iAnimation = 1 + case 07 : jpeg_bkg = 5 : iAnimation = 1 + case 31 : jpeg_bkg = 3 : iAnimation = 3 + case 33 : jpeg_bkg = 5 : iAnimation = 1 + case 34 : jpeg_bkg = 6 : iAnimation = 1 + case 36 : jpeg_bkg = 5 : iAnimation = 1 + case 39 : jpeg_bkg = 5 : iAnimation = 1 + case 46 : jpeg_bkg = 1 : iAnimation = 2 + case 48 : jpeg_bkg = 3 : iAnimation = 1 + case 49 : jpeg_bkg = 1 : iAnimation = 2 + case 55 : jpeg_bkg = 6 : iAnimation = 1 + case 81 : jpeg_bkg = 1 : iAnimation = 3 + case 82 : jpeg_bkg = 1 : iAnimation = 1 + case 86 : jpeg_bkg = 5 : iAnimation = 5 + case 88 : jpeg_bkg = 5 : iAnimation = 1 + case else : jpeg_bkg = 1 : iAnimation = 2 + warnlog "Please insert the entrienumbers for 'Backgrounds' and one with normal files ( Animations )" end select end if - '/// Test following for all applications (Writer, Calc, Impress, Draw) for i=1 to 4 ' each application if i=1 then gApplication = "WRITER" - if i=2 then gApplication = "CALC" - if i=3 then gApplication = "IMPRESS" - if i=4 then gApplication = "DRAW" - - '/// +Open a new document - '/// +Open the Gallery - printlog gApplication 'Chr(13) - call hNewDocument - call hOpenGallery - '/// +Select 3D-theme (these are internal objects and not realy files) - '/// +
  • on context menu there are only 2 entries for insert (copy, link) - '/// +
  • insert the object per copy
  • - '/// +
  • insert the object per link
- '/// +Select Animation theme (these are realy files) - '/// +
  • On context menu there are only 2 entries for insert (copy, link ) for Calc, Draw Impress
  • - '/// +
  • On context menu there are only 3 entries for insert (copy, link, background / page, paragraph ) for Writer
  • - '/// +
  • insert the object per copy
  • - '/// +
  • insert the object per link
  • - '/// +
  • Only for the Writer:
      - '/// +
    • Insert the object per background / page
    • - '/// +
    • insert the object per background / paragraph
- '/// +Close the Gallery - '/// +Close the document - '/// Since the GraphicObjectbar could disturb our testing, we close it if it is open ///' - ' kontext "GraphicObjectbar" - ' if GraphicObjectbar.Exists then GraphicObjectbar.Close - for j=1 to 2 ' the two gallery-theme - if j=1 then - Gallerys.Select jpeg_bkg - printlog " selected gallery-theme : Backgrounds" - end if - - if j=2 then - Gallerys.Select iAnimation - printlog " selected gallery-theme : Animation" - end if - - if i=1 then ' test for writer - for k=1 to 2 - if k=1 then - ListView.Click - printlog " - insert on list view" - else - IconView.Click - printlog " - insert on icon view" - end if - - sleep (2) - View.Mousedown ( 5, 18 ) - View.Mouseup ( 5, 18 ) - View.typekeys "," - - sleep (3) - View.TypeKeys "" ' OpenContextMenu - sleep (3) - hMenuSelectNr ( 1 ) - - if j=1 then - printlog " - copy" - sleep (1) - hMenuSelectNr ( 1 ) - sleep (2) - else - printlog " - copy" - sleep (1) - hMenuSelectNr ( 1 ) - sleep (3) - - printlog " - link" - View.TypeKeys "" 'OpenContextMenu - sleep (1) - hMenuSelectNr ( 1 ) - hMenuSelectNr ( 2 ) - sleep (3) - - printlog " - background -> page" - View.TypeKeys "" 'OpenContextMenu - sleep (2) - hMenuSelectNr ( 1 ) - hMenuSelectNr ( 3 ) - hMenuSelectNr ( 1 ) - sleep (3) - - printlog " - background -> paragraph" - View.TypeKeys "" 'OpenContextMenu - sleep (2) - hMenuSelectNr ( 1 ) - hMenuSelectNr ( 3 ) - hMenuSelectNr ( 2 ) - sleep (3) - end if - - kontext "GraphicObjectbar" - if GraphicObjectbar.Exists then - if GraphicObjectbar.isDocked = False then - GraphicObjectbar.Move 900,900 - end if - end if - kontext "Gallery" - - next k - else ' test for other applications ( calc, impress, draw ) - kontext "GraphicObjectbar" - if GraphicObjectbar.Exists then - if GraphicObjectbar.isDocked = False then - GraphicObjectbar.Move 900,900 - end if - end if - kontext "Gallery" + if i=2 then gApplication = "CALC" + if i=3 then gApplication = "IMPRESS" + if i=4 then gApplication = "DRAW" + + printlog gApplication 'Chr(13) + call hNewDocument + call hOpenGallery + ' kontext "GraphicObjectbar" + ' if GraphicObjectbar.Exists then GraphicObjectbar.Close + for j=1 to 2 ' the two gallery-theme + if j=1 then + Gallerys.Select jpeg_bkg + printlog " selected gallery-theme : Backgrounds" + end if - kontext "Gluepointsobjectbar" - if Gluepointsobjectbar.Exists then - if Gluepointsobjectbar.isDocked = false then - Gluepointsobjectbar.Move 900,900 - end if - end if - kontext "Gallery" + if j=2 then + Gallerys.Select iAnimation + printlog " selected gallery-theme : Animation" + end if - kontext "Optionsbar" - if Optionsbar.Exists then - if Optionsbar.isDocked = false then - Optionsbar.Move 900,900 - end if - end if - kontext "Gallery" + if i=1 then ' test for writer + for k=1 to 2 + if k=1 then + ListView.Click + printlog " - insert on list view" + else + IconView.Click + printlog " - insert on icon view" + end if + + sleep (2) + View.Mousedown ( 5, 18 ) + View.Mouseup ( 5, 18 ) + View.typekeys "," + + sleep (3) + View.TypeKeys "" ' OpenContextMenu + sleep (3) + hMenuSelectNr ( 1 ) + + if j=1 then + printlog " - copy" + sleep (1) + hMenuSelectNr ( 1 ) + sleep (2) + else + printlog " - copy" + sleep (1) + hMenuSelectNr ( 1 ) + sleep (3) + + printlog " - link" + View.TypeKeys "" 'OpenContextMenu + sleep (1) + hMenuSelectNr ( 1 ) + hMenuSelectNr ( 2 ) + sleep (3) + + printlog " - background -> page" + View.TypeKeys "" 'OpenContextMenu + sleep (2) + hMenuSelectNr ( 1 ) + hMenuSelectNr ( 3 ) + hMenuSelectNr ( 1 ) + sleep (3) + + printlog " - background -> paragraph" + View.TypeKeys "" 'OpenContextMenu + sleep (2) + hMenuSelectNr ( 1 ) + hMenuSelectNr ( 3 ) + hMenuSelectNr ( 2 ) + sleep (3) + end if + + kontext "GraphicObjectbar" + if GraphicObjectbar.Exists then + if GraphicObjectbar.isDocked = False then + GraphicObjectbar.Move 900,900 + end if + end if + kontext "Gallery" + + next k + else ' test for other applications ( calc, impress, draw ) + kontext "GraphicObjectbar" + if GraphicObjectbar.Exists then + if GraphicObjectbar.isDocked = False then + GraphicObjectbar.Move 900,900 + end if + end if + kontext "Gallery" - for k=1 to 2 - if k=1 then - ListView.Click - printlog " - insert on list view" - else - IconView.Click - printlog " - insert on icon view" - end if + kontext "Gluepointsobjectbar" + if Gluepointsobjectbar.Exists then + if Gluepointsobjectbar.isDocked = false then + Gluepointsobjectbar.Move 900,900 + end if + end if + kontext "Gallery" - sleep (1) - View.Mousedown ( 5, 18 ) - View.Mouseup ( 5, 18 ) - View.typekeys "," + kontext "Optionsbar" + if Optionsbar.Exists then + if Optionsbar.isDocked = false then + Optionsbar.Move 900,900 + end if + end if + kontext "Gallery" - sleep (1) - View.TypeKeys "" 'OpenContextMenu - printlog " - copy" - sleep (3) - hMenuSelectNr ( 1 ) - hMenuSelectNr ( 1 ) - sleep (3) + for k=1 to 2 + if k=1 then + ListView.Click + printlog " - insert on list view" + else + IconView.Click + printlog " - insert on icon view" + end if - if j=2 then - View.TypeKeys "" 'OpenContextMenu - printlog " - link" - sleep (3) - hMenuSelectNr ( 1 ) - hMenuSelectNr ( 2 ) - sleep (2) - end if + sleep (1) + View.Mousedown ( 5, 18 ) + View.Mouseup ( 5, 18 ) + View.typekeys "," - next k - end if - next j - ToolsGallery - WaitSlot (2000) - call hCloseDocument - WaitSlot (2000) - next i + sleep (1) + View.TypeKeys "" 'OpenContextMenu + printlog " - copy" + sleep (3) + hMenuSelectNr ( 1 ) + hMenuSelectNr ( 1 ) + sleep (3) + + if j=2 then + View.TypeKeys "" 'OpenContextMenu + printlog " - link" + sleep (3) + hMenuSelectNr ( 1 ) + hMenuSelectNr ( 2 ) + sleep (2) + end if + + next k + end if + next j + ToolsGallery + WaitSlot (2000) + call hCloseDocument + WaitSlot (2000) + next i endcase '------------------------------------------------------------------------- @@ -911,77 +855,73 @@ testcase tGallery_GalleryView_Delete Goto NotForNetInst end if - '/// Test gallery view -> delete objects with context-menu ( Backgrounds (internal object), Animation (file), Sound (file)) select case iSprache - case 01 : jpeg_bkg = 1 : iAnimation = 2 : iSound = 28 - case 07 : jpeg_bkg = 29 : iAnimation = 1 : iSound = 6 - case 31 : jpeg_bkg = 1 : iAnimation = 2 : iSound = 28 - case 33 : jpeg_bkg = 13 : iAnimation = 1 : iSound = 29 - case 34 : jpeg_bkg = 7 : iAnimation = 1 : iSound = 28 - case 36 : jpeg_bkg = 12 : iAnimation = 1 : iSound = 10 - case 39 : jpeg_bkg = 10 : iAnimation = 1 : iSound = 27 - case 46 : jpeg_bkg = 1 : iAnimation = 2 : iSound = 18 - case 49 : jpeg_bkg = 1 : iAnimation = 2 : iSound = 17 - case 55 : jpeg_bkg = 8 : iAnimation = 1 : iSound = 30 - case 81 : jpeg_bkg = 1 : iAnimation = 3 : iSound = 10 - case 82 : jpeg_bkg = 1 : iAnimation = 17 : iSound = 12 - case 86 : jpeg_bkg = 1 : iAnimation = 9 : iSound = 13 - case 88 : jpeg_bkg = 1 : iAnimation = 7 : iSound = 20 - case else : jpeg_bkg = 1 : iAnimation = 2 : iSound = 17 - warnlog "Please insert the entrienumbers for '3D-graphics', 'Sounds' and one with normal files ( Animations )" + case 01 : jpeg_bkg = 1 : iAnimation = 2 : iSound = 28 + case 07 : jpeg_bkg = 29 : iAnimation = 1 : iSound = 6 + case 31 : jpeg_bkg = 1 : iAnimation = 2 : iSound = 28 + case 33 : jpeg_bkg = 13 : iAnimation = 1 : iSound = 29 + case 34 : jpeg_bkg = 7 : iAnimation = 1 : iSound = 28 + case 36 : jpeg_bkg = 12 : iAnimation = 1 : iSound = 10 + case 39 : jpeg_bkg = 10 : iAnimation = 1 : iSound = 27 + case 46 : jpeg_bkg = 1 : iAnimation = 2 : iSound = 18 + case 49 : jpeg_bkg = 1 : iAnimation = 2 : iSound = 17 + case 55 : jpeg_bkg = 8 : iAnimation = 1 : iSound = 30 + case 81 : jpeg_bkg = 1 : iAnimation = 3 : iSound = 10 + case 82 : jpeg_bkg = 1 : iAnimation = 17 : iSound = 12 + case 86 : jpeg_bkg = 1 : iAnimation = 9 : iSound = 13 + case 88 : jpeg_bkg = 1 : iAnimation = 7 : iSound = 20 + case else : jpeg_bkg = 1 : iAnimation = 2 : iSound = 17 + warnlog "Please insert the entrienumbers for '3D-graphics', 'Sounds' and one with normal files ( Animations )" end select - '/// Open a new writer-doc - '/// Tools / Gallery gApplication = "WRITER" call hNewDocument call hOpenGallery - '/// Delete one object in list-view and icon-view for 3D, Animation and Sound for i=1 to 3 Kontext "Gallery" - if i=1 then - Gallerys.Select jpeg_bkg - printlog " selected gallery-theme : Backgrounds" - end if + if i=1 then + Gallerys.Select jpeg_bkg + printlog " selected gallery-theme : Backgrounds" + end if - if i=2 then - Gallerys.Select iAnimation - printlog " selected gallery-theme : Animation" - end if + if i=2 then + Gallerys.Select iAnimation + printlog " selected gallery-theme : Animation" + end if - if i=3 then - Gallerys.Select iSound - printlog " selected gallery-theme : Sound" + if i=3 then + Gallerys.Select iSound + printlog " selected gallery-theme : Sound" + end if + + for j=1 to 2 + Kontext "Gallery" + if j=1 then + IconView.Click + printlog " Icon view" + sleep 1 + end if + if j=2 then + ListView.Click + printlog " List view" end if - for j=1 to 2 + for k=1 to 2 Kontext "Gallery" - if j=1 then - IconView.Click - printlog " Icon view" - sleep 1 - end if - if j=2 then - ListView.Click - printlog " List view" - end if - - for k=1 to 2 - Kontext "Gallery" - sleep (1) - View.MouseMove ( 5, 15 ) - View.TypeKeys "" 'OpenContextMenu true - hMenuSelectNr ( 4 ) - kontext "Active" - if k=1 then - Active.No - printlog " delete one object => no" - else - Active.Yes - printlog " delete one object => yes" - end if - next k - next j + sleep (1) + View.MouseMove ( 5, 15 ) + View.TypeKeys "" 'OpenContextMenu true + hMenuSelectNr ( 4 ) + kontext "Active" + if k=1 then + Active.No + printlog " delete one object => no" + else + Active.Yes + printlog " delete one object => yes" + end if + next k + next j next i ToolsGallery call hCloseDocument @@ -992,17 +932,13 @@ endcase '------------------------------------------------------------------------- testcase tGallery_Quick_check - '/// Short check, if at least 2 files exist in the gallery, and if they are > 0 in size ///' - '/// One in the gallery folder itself and the other one in a subfolder. ///' dim sFile(1) as string dim i as integer sFile(0) = ConvertPath ( gOfficeBasisPath + "share/gallery/apples.gif" ) ' sFile(1) = ConvertPath ( gOfficeBasisPath + "share/gallery/bullets/coffee_1.gif" ) ' - '/// Open a new document call hNewDocument for i = 0 to 1 - '/// Click to deselect any selected objects ///' gMouseclick 1, 50 if FileExists(sFile(i)) then if (FileLen(sFile(i)) > 0 ) then @@ -1014,7 +950,6 @@ testcase tGallery_Quick_check warnlog "File doesn't exist: '" + sFile(i) + "'" end if next i - '///close the document call hCloseDocument endcase diff --git a/testautomation/graphics/optional/includes/global/gallery2.inc b/testautomation/graphics/optional/includes/global/gallery2.inc index 98c8b3448da0..92bd5fe5dbc9 100755 --- a/testautomation/graphics/optional/includes/global/gallery2.inc +++ b/testautomation/graphics/optional/includes/global/gallery2.inc @@ -1,7 +1,7 @@ 'encoding UTF-8 Do not remove or change this line! '************************************************************************** '* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. -'* +'* '* Copyright 2008 by Sun Microsystems, Inc. '* '* OpenOffice.org - a multi-platform office productivity suite @@ -60,14 +60,13 @@ testcase tSettingsToCM iSaveSetting = Masseinheit.GetSelIndex Masseinheit.Select 2 Kontext "ExtrasOptionenDlg" - ExtrasOptionenDlg.OK + ExtrasOptionenDlg.OK Call hCloseDocument - + endcase '------------------------------------------------------------------------- testcase tLoad100GalleryGraphicFiles - '/// Inserting all gallery graphics in a Writer document and checking the sizes. Dim lsFiles (3000) as String Dim lsGraphics (3000) as String Dim i as Integer @@ -77,7 +76,6 @@ testcase tLoad100GalleryGraphicFiles Dim corLoad as Boolean Dim x as boolean - '/// Geting all installed gallery objects out of the installation in a list. if gNetzInst = TRUE then GetAllFileList ( ConvertPath ( gOfficeBasisPath + "share\gallery\" ), "*.*", lsFiles () ) else @@ -86,7 +84,6 @@ testcase tLoad100GalleryGraphicFiles call GetOnlyGraphics ( lsFiles (), lsGraphics() ) iCount = ListCount ( lsGraphics() ) printlog " We have " + iCount + " graphics in the gallery." - '/// + Open a new document call hNewDocument for i = 1 to 100 @@ -100,13 +97,6 @@ testcase tLoad100GalleryGraphicFiles corLoad = FALSE try - '/// Loop begin - '/// + Inserting all gallery files and checking the sizes - '/// +- Iinsert / graphic / from file - '/// +- Check the size in 'format / graphics' on the Type tabpage - '/// +-- The size should noz be smaler than 17*25cm / photos 21*25cm - '/// + Deleting the graphic with <delete> of the keyboard - '/// Loop ends x = LoadGraphic ( lsGraphics(t), corLoad ) printlog catch @@ -122,17 +112,14 @@ testcase tLoad100GalleryGraphicFiles end if next i - '/// Close the gallery ///' ToolsGallery WaitSlot (2000) - '/// Close the document ///' call hCloseDocument endcase 'tLoadAllGalleryGraphicFiles '------------------------------------------------------------------------- testcase tCheckAllGalleryGraphicFiles -'/// Checking the filesize of all gallery graphics. Dim lsFiles (3000) as String Dim lsGraphics (3000) as String Dim i as Integer @@ -142,7 +129,6 @@ testcase tCheckAllGalleryGraphicFiles Dim corLoad as Boolean Dim x as boolean - '/// Geting all installed gallery objects out of the installation in a list. if gNetzInst = TRUE then GetAllFileList ( ConvertPath ( gOfficeBasisPath + "share\gallery\" ), "*.*", lsFiles () ) else @@ -151,19 +137,11 @@ testcase tCheckAllGalleryGraphicFiles call GetOnlyGraphics ( lsFiles (), lsGraphics() ) iCount = ListCount ( lsGraphics() ) printlog " We have " + iCount + " graphics in the gallery." - '/// Open a new document call hNewDocument for i=1 to iCount corLoad = FALSE try - '/// Loop begin - '///+ Inserting all gallery files and checking the sizes - '///+- Iinsert / graphic / from file - '///+- Check the size in 'format / graphics' on the Type tabpage - '///+-- The size should noz be smaler than 17*25cm / photos 21*25cm - '///+ Deleting the graphic with <delete> of the keyboard - '/// Loop ends x = CheckGraphic ( lsGraphics(i), corLoad ) catch ExceptLog @@ -177,10 +155,8 @@ testcase tCheckAllGalleryGraphicFiles printlog " Tested nr: " + i + " : " + lsGraphics(i) end if next i - '/// Close the gallery ///' ToolsGallery WaitSlot (2000) - '/// Close the document ///' call hCloseDocument endcase 'tLoadAllGalleryGraphicFiles @@ -199,84 +175,76 @@ testcase tInsertGalleryObjects Dim iCount as Integer Dim corLoad, x as Boolean - '/// 1. Select theme ///' call hNewDocument call hOpenGallery kontext "Gallery" - CountOfThemes = Gallerys.GetItemCount - for ct = 1 to CountOfThemes - Gallerys.Select ct - printlog " Selected Gallery-Theme nr: " + ct + ": " + Gallerys.GetSelText - kontext "Gallery" - CountOfItems = View.GetItemCount() - '/// 2. Choose if we should test 3,4 or 5 objects. ///' - for d = 1 to 1 - randomize - HowManyItems=Int((5*Rnd)+(3*Rnd)) - if CountOfItems = 0 then - QaErrorLog " There were no objects in the the gallery-theme on position: " + ct - else - if (HowManyItems<3) then 'just so we get it between 3 and 5. - d = d - 1 - else - printlog " Will now select and copy " + HowManyItems + " items from this Theme." + CountOfThemes = Gallerys.GetItemCount + for ct = 1 to CountOfThemes + Gallerys.Select ct + printlog " Selected Gallery-Theme nr: " + ct + ": " + Gallerys.GetSelText + kontext "Gallery" + CountOfItems = View.GetItemCount() + for d = 1 to 1 + randomize + HowManyItems=Int((5*Rnd)+(3*Rnd)) + if CountOfItems = 0 then + QaErrorLog " There were no objects in the the gallery-theme on position: " + ct + else + if (HowManyItems<3) then 'just so we get it between 3 and 5. + d = d - 1 + else + printlog " Will now select and copy " + HowManyItems + " items from this Theme." + end if + for i = 1 to HowManyItems + for x = 1 to 1 + randomize + WhichOne=Int(CountOfItems*RND) '(5*Rnd)+(CountOfItems*Rnd)) + if (WhichOne<1) then 'just so we get it between 1 and the amount of items. '>(CountOfItems + 1)) OR (WhichOne<1) then ' + x = x - 1 end if - for i = 1 to HowManyItems - '/// 3. Select the objects ///' - for x = 1 to 1 - randomize - WhichOne=Int(CountOfItems*RND) '(5*Rnd)+(CountOfItems*Rnd)) - if (WhichOne<1) then 'just so we get it between 1 and the amount of items. '>(CountOfItems + 1)) OR (WhichOne<1) then ' - x = x - 1 - end if - next x - printlog " Will copy object nr: " + WhichOne - View.Mousemove (1,1) - View.TypeKeys "" - View.TypeKeys "", (WhichOne) - kontext "GraphicObjectBar" - if GraphicObjectBar.Exists then - if GraphicObjectBar.IsDocked = False then GraphicObjectBar.Dock - end if - kontext "Gallery" - sleep (1) - View.TypeKeys("") + next x + printlog " Will copy object nr: " + WhichOne + View.Mousemove (1,1) + View.TypeKeys "" + View.TypeKeys "", (WhichOne) + kontext "GraphicObjectBar" + if GraphicObjectBar.Exists then + if GraphicObjectBar.IsDocked = False then GraphicObjectBar.Dock + end if + kontext "Gallery" + sleep (1) + View.TypeKeys("") + sleep (1) + try + dim number as integer + number = MenuGetItemCount + if (number > 2) AND (number < 10) then + hMenuSelectNr (1) 'Insert + hMenuSelectNr (1) 'As Copy sleep (1) - try - dim number as integer - number = MenuGetItemCount - if (number > 2) AND (number < 10) then - '/// 4. Copy the selected item into our document. ///' - hMenuSelectNr (1) 'Insert - hMenuSelectNr (1) 'As Copy - sleep (1) - else - Warnlog " The contextmenu came up, but the number of entries were strange." - printlog " Number of entries:" + number - MenuSelect(0) - end if - catch - warnlog " A contextmenu didnt come up for the gallery-theme on position: " + ct - i = HowManyItems - endcatch - '/// 5. Repeat 3.-5. until 2. is fulfilled. ///' - next i - end if 'if the theme didnt have any objects, we landed here. - next d - '/// 6. Change Theme. ///' - '/// 7. Repeat 2. - 8. until all themes are done. ///' - next ct + else + Warnlog " The contextmenu came up, but the number of entries were strange." + printlog " Number of entries:" + number + MenuSelect(0) + end if + catch + warnlog " A contextmenu didnt come up for the gallery-theme on position: " + ct + i = HowManyItems + endcatch + next i + end if 'if the theme didnt have any objects, we landed here. + next d + next ct - Kontext "Gallery" + Kontext "Gallery" if Gallery.Exists(2) then ToolsGallery WaitSlot (2000) end if - - '/// Remove the last copied object. ///' - hTypeKeys "" - call hCloseDocument - + + hTypeKeys "" + call hCloseDocument + endcase 'tInsertGalleryObjects '------------------------------------------------------------------------- @@ -289,8 +257,8 @@ testcase tResetSettings hToolsOptions ( "WRITER", "General" ) Masseinheit.Select iSaveSetting Kontext "ExtrasOptionenDlg" - ExtrasOptionenDlg.OK + ExtrasOptionenDlg.OK call hCloseDocument - + endcase 'tResetSettings '------------------------------------------------------------------------- diff --git a/testautomation/graphics/optional/includes/global/id_001.inc b/testautomation/graphics/optional/includes/global/id_001.inc index ebd5f1ca8159..a92daf05c2e2 100755 --- a/testautomation/graphics/optional/includes/global/id_001.inc +++ b/testautomation/graphics/optional/includes/global/id_001.inc @@ -1,7 +1,7 @@ 'encoding UTF-8 Do not remove or change this line! '************************************************************************** '* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. -'* +'* '* Copyright 2008 by Sun Microsystems, Inc. '* '* OpenOffice.org - a multi-platform office productivity suite @@ -52,13 +52,11 @@ ' #1 tmFilePrinterSetting '\********************************************************************************** -'/// used Documents ///' -'///"graphics\required\input\tbo_alf_.od?" /// testcase tiFileSaveAs dim sFileName as string ' test document & new created doc -' dim sFormula as string ' container for formula to create document with + ' dim sFormula as string ' container for formula to create document with dim sTemp as string dim sFilter (50) as string dim i as integer @@ -68,14 +66,13 @@ testcase tiFileSaveAs dim sFile as string ' filename to export dim sPath as string ' filename to export - if (gApplication = "IMPRESS") then + if (gApplication = "IMPRESS") then ExtensionString = "odp" else ExtensionString = "odg" end if sFilter (0) = 0 ' initalize ;-)... - '/// used document: "graphics\required\input\tbo_alf_.od?" /// sFileName = "graphics\required\input\tbo_alf_." + ExtensionString ' this is the file with all features sFile = "isas_" ' this is the filename of the export files @@ -84,7 +81,6 @@ testcase tiFileSaveAs app.mkdir (sPath) end if - Printlog "'/// deleting all files in output directory: \\user\\work\\graphics\\required\\gApplication gPlatform isas_* ///'" if gSamePC = TRUE then ' delete export directory GetFileList ( sPath, sFile+"*", Exlist() ) if KillFileList ( Exlist() ) <> TRUE then @@ -95,477 +91,408 @@ testcase tiFileSaveAs end if end if - '/// load a sample presentation file ///' Call hFileOpen ( ConvertPath(gTesttoolPath + sFileName) ) WaitSlot (3000) -'/// start loop 5 times for: ///' -'/// - StarImpress 5.0 /// -'/// - StarOffice 6.0 Presentation /// -'/// - StarOffice 6.0 Presentation Template /// -'/// - Microsoft PowerPoint 97/2000/XP Template /// -'/// - StarOffice 6.0 Drawing (StarOffice Impress) /// -'/// to be language independant, select first, second last,... and last filter from list -> but trie to check the names :-) ///' - -' to use the helper fileSaveAs functions i get alll available filters... - FileSaveAs - WaitSlot (2000) - Kontext "SpeichernDlg" - for i = 0 to 5 - if i=0 then x = Dateityp.GetItemCount - if (i) then ' set border, whenm start from beginning/end - y = i ' set filter from beginning - else - y = x-3 ' set filter from end - end if - ListAppend(sFilter(), Dateityp.GetItemText (y)) - next i - SpeichernDlg.Cancel - y = ListCount(sFilter()) - - if gtSYSName = "Linux" then y=y-1 - '#i45961# - last part of filter-list deactivated due to BUG - FHA - 'TODO: JSI->FHA please verify if this special handling needed after the issue has been fixed. - - for i = 1 to y - sFileName = sPath + sFile + (i) - hFileSaveAsWithFilter (sFileName, sFilter(i), TRUE ) - '/// file save with filter as: "graphics\required\output\\math\\fsas_[0,1,2,...]" ///' - kontext - if messagebox.exists then - messagebox.Yes ' to go on .... - end if - printlog " saved with filter ("+i+"/"+y+"): "+ sFilter(i) - next i -' TODO TBO: small check, if correct filter was used! - WaitSlot (3000) - fileclose - WaitSlot (3000) - kontext "Messagebox" - if Messagebox.exists then - printlog "Messagebox about informationloss... :-) that's OK: 'Text in the messagebox: "+Messagebox.GetText+"'" - Messagebox.YES - end if - -'----------------------------------------------------------------- -'/// Load all saved files ///' - hNewDocument - -'/// a small loop, to load all files previous saved ///' - - sFilter (0) = 0 -'///load documents from "graphics\required\output\\impress\\fsas_*" /// - sFileName = sPath - GetFileList ( sFileName, sFile + "*", sFilter() ) - -' call hNewDocument - x = ListCount ( sFilter() ) - for i = 1 to x - printlog "("+i+"/"+x+"): "+sFilter(i) - hFileOpen ( sFilter(i) ) - WaitSlot (3000) - If hIsNamedDocLoaded (sFilter(i), true) Then - printlog " used filter: " + hGetUsedFilter() - else - sTemp = left(right(sFilter(i),2),1) - if ( (sTemp = "t") OR (sTemp = "o") ) then - printlog "document is --- TEMPLATE?! --- " - else - qaErrorlog "#116563# document didn't get loaded " - end if - end if - hCloseDocument - WaitSlot (2000) - next i -' Call hCloseDocument + + ' to use the helper fileSaveAs functions i get alll available filters... + FileSaveAs + WaitSlot (2000) + Kontext "SpeichernDlg" + for i = 0 to 5 + if i=0 then x = Dateityp.GetItemCount + if (i) then ' set border, whenm start from beginning/end + y = i ' set filter from beginning + else + y = x-3 ' set filter from end + end if + ListAppend(sFilter(), Dateityp.GetItemText (y)) + next i + SpeichernDlg.Cancel + y = ListCount(sFilter()) + + if gtSYSName = "Linux" then y=y-1 + '#i45961# - last part of filter-list deactivated due to BUG - FHA + 'TODO: JSI->FHA please verify if this special handling needed after the issue has been fixed. + + for i = 1 to y + sFileName = sPath + sFile + (i) + hFileSaveAsWithFilter (sFileName, sFilter(i), TRUE ) + kontext + if messagebox.exists then + messagebox.Yes ' to go on .... + end if + printlog " saved with filter ("+i+"/"+y+"): "+ sFilter(i) + next i + ' TODO TBO: small check, if correct filter was used! + WaitSlot (3000) + fileclose + WaitSlot (3000) + kontext "Messagebox" + if Messagebox.exists then + printlog "Messagebox about informationloss... :-) that's OK: 'Text in the messagebox: "+Messagebox.GetText+"'" + Messagebox.YES + end if + + '----------------------------------------------------------------- + hNewDocument + + + sFilter (0) = 0 + sFileName = sPath + GetFileList ( sFileName, sFile + "*", sFilter() ) + + ' call hNewDocument + x = ListCount ( sFilter() ) + for i = 1 to x + printlog "("+i+"/"+x+"): "+sFilter(i) + hFileOpen ( sFilter(i) ) + WaitSlot (3000) + If hIsNamedDocLoaded (sFilter(i), true) Then + printlog " used filter: " + hGetUsedFilter() + else + sTemp = left(right(sFilter(i),2),1) + if ( (sTemp = "t") OR (sTemp = "o") ) then + printlog "document is --- TEMPLATE?! --- " + else + qaErrorlog "#116563# document didn't get loaded " + end if + end if + hCloseDocument + WaitSlot (2000) + next i + ' Call hCloseDocument endcase testcase tiFileReload - Dim DokumentPfad$ - Dim Datei$ + Dim DokumentPfad$ + Dim Datei$ - if (gApplication = "IMPRESS") then + if (gApplication = "IMPRESS") then ExtensionString = "odp" else ExtensionString = "odg" end if - Datei$= (ConvertPath (gOfficePath + "user/work/graphics/required/version1." + ExtensionString)) - - if app.dir(ConvertPath (gOfficePath + "user/work/graphics/required/")) = "" then - app.mkdir (ConvertPath (gOfficePath + "user/work/graphics/required/")) - end if -'/// open application ///' - Call hNewDocument - WaitSlot (2000) -'/// save document "..." ///' - Call hFileSaveAsKill (Datei$) - WaitSlot (2000) -'/// close document ///' - Call hCloseDocument - -'/// load document again ///' - Call hFileOpen (Datei$) - WaitSlot (2000) -'/// type something in document ///' - call hTBOtypeInDoc - WaitSlot (2000) -'/// File->Reload ///' - FileReload - WaitSlot (2000) -'/// Messagebox has to come up; say NO ///' - Kontext "Messagebox" - sleep 2 - Messagebox.No - WaitSlot (2000) - -'/// File->Reload ///' - FileReload - WaitSlot (2000) - Kontext "Messagebox" - sleep 2 -'/// Messagebox has to come up; say YES ///' - Messagebox.Yes - WaitSlot (1000) - -'/// close document ///' - Call hCloseDocument -'/// delete document ///' - if Dir (Datei$) <> "" AND gSamePC = TRUE then kill Datei$ + Datei$= (ConvertPath (gOfficePath + "user/work/graphics/required/version1." + ExtensionString)) + + if app.dir(ConvertPath (gOfficePath + "user/work/graphics/required/")) = "" then + app.mkdir (ConvertPath (gOfficePath + "user/work/graphics/required/")) + end if + Call hNewDocument + WaitSlot (2000) + Call hFileSaveAsKill (Datei$) + WaitSlot (2000) + Call hCloseDocument + + Call hFileOpen (Datei$) + WaitSlot (2000) + call hTBOtypeInDoc + WaitSlot (2000) + FileReload + WaitSlot (2000) + Kontext "Messagebox" + sleep 2 + Messagebox.No + WaitSlot (2000) + + FileReload + WaitSlot (2000) + Kontext "Messagebox" + sleep 2 + Messagebox.Yes + WaitSlot (1000) + + Call hCloseDocument + if Dir (Datei$) <> "" AND gSamePC = TRUE then kill Datei$ endcase testcase tiFileVersion - Dim DokumentPfad$ - Dim Datei$ + Dim DokumentPfad$ + Dim Datei$ - if (gApplication = "IMPRESS") then + if (gApplication = "IMPRESS") then ExtensionString = "odp" else ExtensionString = "odg" end if - Datei$= (ConvertPath (gOfficePath + "user/work/graphics/required/erwin." + ExtensionString)) - 'if dir (ConvertPath (gOfficePath + "user/work/graphics/required/")) = "" then - if dir (Datei$) = "" then app.mkdir (ConvertPath (gOfficePath + "user/work/graphics/required/")) -'/// open application ///' - Call hNewDocument - WaitSlot (1000) -'/// save document as "..." ///' - Call hFileSaveAsKill (Datei$) - WaitSlot (1000) -'/// close document ///' - Call hCloseDocument - -'/// open document again ///' - Call hFileOpen (Datei$) - WaitSlot (1000) -'/// type something in document ///' - call hTBOtypeInDoc - WaitSlot (1000) -'/// File->Versions ///' - try - FileVersions - catch - Warnlog "- File / Versions not accessible!" - goto endsub - endcatch - - Kontext "Versionen" - Call DialogTest ( Versionen ) -'/// in Versions dialog press "save" ///' - Speichern.Click -'/// type a comment ///' - Kontext "VersionskommentarEingeben" - Call DialogTest ( VersionskommentarEingeben ) -'/// exit comment dialog with cancel ///' - VersionskommentarEingeben.Cancel - Kontext "Versionen" -'/// close version dialog ///' - Versionen.Close -'/// close document ///' - Call hCloseDocument -' if Dir (Datei$) <> "" AND gSamePC = TRUE then kill Datei$ + Datei$= (ConvertPath (gOfficePath + "user/work/graphics/required/erwin." + ExtensionString)) + 'if dir (ConvertPath (gOfficePath + "user/work/graphics/required/")) = "" then + if dir (Datei$) = "" then app.mkdir (ConvertPath (gOfficePath + "user/work/graphics/required/")) + Call hNewDocument + WaitSlot (1000) + Call hFileSaveAsKill (Datei$) + WaitSlot (1000) + Call hCloseDocument + + Call hFileOpen (Datei$) + WaitSlot (1000) + call hTBOtypeInDoc + WaitSlot (1000) + try + FileVersions + catch + Warnlog "- File / Versions not accessible!" + goto endsub + endcatch + + Kontext "Versionen" + Call DialogTest ( Versionen ) + Speichern.Click + Kontext "VersionskommentarEingeben" + Call DialogTest ( VersionskommentarEingeben ) + VersionskommentarEingeben.Cancel + Kontext "Versionen" + Versionen.Close + Call hCloseDocument + ' if Dir (Datei$) <> "" AND gSamePC = TRUE then kill Datei$ endcase testcase tiFilePassword goto endsub - Dim DokumentPfad$ - Dim Datei$ - dim sFileName as string ' test document & new created doc -' dim sFormula as string ' container for formula to create document with - dim e as string - dim sTemp as string - dim sFilter (50) as string - dim i as integer - dim x as integer - dim y as integer - dim Exlist(100) as string ' files to be deleted - dim sFileIn as string ' filename to import - dim sFile as string ' filename to export - dim sPath as string ' and path to export - - if (gApplication = "IMPRESS") then + Dim DokumentPfad$ + Dim Datei$ + dim sFileName as string ' test document & new created doc + ' dim sFormula as string ' container for formula to create document with + dim e as string + dim sTemp as string + dim sFilter (50) as string + dim i as integer + dim x as integer + dim y as integer + dim Exlist(100) as string ' files to be deleted + dim sFileIn as string ' filename to import + dim sFile as string ' filename to export + dim sPath as string ' and path to export + + if (gApplication = "IMPRESS") then ExtensionString = "odp" else ExtensionString = "odg" end if -'/// save file to: "graphics\required\output\"+gApplication+"\"+ gPlatform+"\"isp__" ///' - sFile = "isp__" ' this is the filename of the export files - sPath = ConvertPath ( gOfficePath + "user/work/graphics/required/"+gApplication+"\"+ gPlatform+"\") ' this is the export path - mkdir (sPath) - if dir (sPath) = "" then app.mkdir (sPath) - sFileIn = (sPath + sFile + "." + ExtensionString) - Printlog "'/// deleting all files in output directory: \\graphics\required\output\\impress\\ gPlatform isp_* ///'" - if gSamePC = TRUE then ' delete export directory - GetFileList ( sPath, sFile+"*", Exlist() ) - if KillFileList ( Exlist() ) <> TRUE then - Warnlog "Couldnt delete all Files in Output-Export-Directory, the followings are still there:" - for i=1 to ListCount ( Exlist() ) - printlog " <> " + Exlist(i) - next i - end if - end if - -'/// open application ///' - Call hNewDocument - WaitSlot (1000) -'/// File->SaveAs ///' - FileSaveAs - Kontext "SpeichernDlg" - Datei$ = ConvertPath ( sFileIn ) - printlog " will use the file: "+Datei$ - if Dir (Datei$) <> "" then - kill Datei$ - end if - '/// check 'password' ///' - Passwort.Check - '/// set 'filename' ///' - Dateiname.SetText Datei$ - '/// press 'save' ///' - Speichern.Click - WaitSlot (2000) - Kontext "Passwort" - '/// type password "12345", confirm password: "54321" -> WRONG ///' - PasswortName.SetText "12345" - PasswortBestaetigen.Settext "54321" - Passwort.OK - WaitSlot (2000) - Kontext "Messagebox" - '/// messagebox has to show up, say OK, if messagebox doesnt come up -> ERROR ///' - if Messagebox.Exists(1) then - Messagebox.OK - else - Warnlog "- Wrong password not recognized" - end if - Kontext "Passwort" - '/// type password "12345", confirm password: "12345" -> RIGHT ///' - PasswortName.SetText "12345" - PasswortBestaetigen.SetText "12345" - Passwort.OK - '/// close document ///' - sleep 2 - FileClose - sleep 2 - - '/// open document ///' - FileOpen - Kontext "OeffnenDlg" - WaitSlot (2000) - Dateiname.SetText Datei$ - Oeffnen.Click - WaitSlot (2000) - Kontext "PasswordFileOpen" - '/// type password: "34567" -> WRONG ///' - PasswortName.SetText "34567" - try - PasswordFileOpen.OK - catch - Printlog "- Wrong password not accepted" - endcatch - Kontext - '/// messagebox has to show up, say OK, if messagebox doesn't come up -> ERROR ///' - if Not Messagebox.Exists(1) then - Warnlog "Wrong password while loading not recognized" - else - Messagebox.OK - printlog "Wrong password on loading ok - recogniced" - end if - WaitSlot (3000) - Kontext "PasswordFileOpen" - '/// type password: "12345" -> RIGHT ///' - PasswortName.SetText "12345" - PasswordFileOpen.OK - WaitSlot (5000) - '/// File->SaveAs ///' - FileSaveAs - Kontext "SpeichernDlg" - Dateiname.SetText Datei$ - if (Passwort.IsChecked <> TRUE) then - Warnlog "Password has to be checked! :-(" - end if - '/// press 'save', without changing any checkbox! -> file has to be saved WITH password protection ///' - Speichern.Click - WaitSlot (1000) - Kontext "Messagebox" - '/// (if messagebox comes up, say YES) ///' - if Messagebox.Exists(5) then - Messagebox.Yes - end if - '/// password dialog has to show up! ///' - Kontext "Passwort" - if (Passwort.Exists(5) = FALSE)then - Warnlog "- Password dialog Didn't pop up after pressing save" - else - Kontext "Passwort" - '/// type password "a12345", confirm password: "a12345" -> RIGHT ///' - WaitSlot (1000) - PasswortName.SetText "a12345" - PasswortBestaetigen.SetText "a12345" - Passwort.OK - WaitSlot (1000) - '/// close document ///' - FileClose - WaitSlot (1000) - end if - '/// open document ///' - FileOpen - WaitSlot (2000) - Kontext "OeffnenDlg" - Dateiname.SetText Datei$ - Oeffnen.Click - Kontext "PasswordFileOpen" - WaitSlot (1000) - '/// type password: "a12345" -> RIGHT ///' - PasswortName.SetText "a12345" - PasswordFileOpen.OK - WaitSlot (5000) - '/// File->SaveAs ///' - FileSaveAs - Kontext "SpeichernDlg" - Dateiname.SetText Datei$ - if (Passwort.IsChecked <> TRUE) then - Warnlog "Password has to be checked! :-(" - end if - Passwort.UnCheck - '/// press 'save', without changing any checkbox! -> file has to be saved WITH password protection ///' - Speichern.Click - Kontext "Messagebox" - '/// (if messagebox comes up, say YES) ///' - if Messagebox.Exists(5) then Messagebox.Yes - '/// password dialog needn't to show up! ///' - Kontext "Passwort" - if (Passwort.Exists(5))then - Warnlog "- Password dialog didn't pop up after pressing save" - Kontext "Passwort" - password.cancel - '/// close document ///' - FileClose - else - '/// close document ///' - hCloseDocument - end if + sFile = "isp__" ' this is the filename of the export files + sPath = ConvertPath ( gOfficePath + "user/work/graphics/required/"+gApplication+"\"+ gPlatform+"\") ' this is the export path + mkdir (sPath) + if dir (sPath) = "" then app.mkdir (sPath) + sFileIn = (sPath + sFile + "." + ExtensionString) + if gSamePC = TRUE then ' delete export directory + GetFileList ( sPath, sFile+"*", Exlist() ) + if KillFileList ( Exlist() ) <> TRUE then + Warnlog "Couldnt delete all Files in Output-Export-Directory, the followings are still there:" + for i=1 to ListCount ( Exlist() ) + printlog " <> " + Exlist(i) + next i + end if + end if + + Call hNewDocument + WaitSlot (1000) + FileSaveAs + Kontext "SpeichernDlg" + Datei$ = ConvertPath ( sFileIn ) + printlog " will use the file: "+Datei$ + if Dir (Datei$) <> "" then + kill Datei$ + end if + Passwort.Check + Dateiname.SetText Datei$ + Speichern.Click + WaitSlot (2000) + Kontext "Passwort" + PasswortName.SetText "12345" + PasswortBestaetigen.Settext "54321" + Passwort.OK + WaitSlot (2000) + Kontext "Messagebox" + if Messagebox.Exists(1) then + Messagebox.OK + else + Warnlog "- Wrong password not recognized" + end if + Kontext "Passwort" + PasswortName.SetText "12345" + PasswortBestaetigen.SetText "12345" + Passwort.OK + sleep 2 + FileClose + sleep 2 + + FileOpen + Kontext "OeffnenDlg" + WaitSlot (2000) + Dateiname.SetText Datei$ + Oeffnen.Click + WaitSlot (2000) + Kontext "PasswordFileOpen" + PasswortName.SetText "34567" + try + PasswordFileOpen.OK + catch + Printlog "- Wrong password not accepted" + endcatch + Kontext + if Not Messagebox.Exists(1) then + Warnlog "Wrong password while loading not recognized" + else + Messagebox.OK + printlog "Wrong password on loading ok - recogniced" + end if + WaitSlot (3000) + Kontext "PasswordFileOpen" + PasswortName.SetText "12345" + PasswordFileOpen.OK + WaitSlot (5000) + FileSaveAs + Kontext "SpeichernDlg" + Dateiname.SetText Datei$ + if (Passwort.IsChecked <> TRUE) then + Warnlog "Password has to be checked! :-(" + end if + Speichern.Click + WaitSlot (1000) + Kontext "Messagebox" + if Messagebox.Exists(5) then + Messagebox.Yes + end if + Kontext "Passwort" + if (Passwort.Exists(5) = FALSE)then + Warnlog "- Password dialog Didn't pop up after pressing save" + else + Kontext "Passwort" + WaitSlot (1000) + PasswortName.SetText "a12345" + PasswortBestaetigen.SetText "a12345" + Passwort.OK + WaitSlot (1000) + FileClose + WaitSlot (1000) + end if + FileOpen + WaitSlot (2000) + Kontext "OeffnenDlg" + Dateiname.SetText Datei$ + Oeffnen.Click + Kontext "PasswordFileOpen" + WaitSlot (1000) + PasswortName.SetText "a12345" + PasswordFileOpen.OK + WaitSlot (5000) + FileSaveAs + Kontext "SpeichernDlg" + Dateiname.SetText Datei$ + if (Passwort.IsChecked <> TRUE) then + Warnlog "Password has to be checked! :-(" + end if + Passwort.UnCheck + Speichern.Click + Kontext "Messagebox" + if Messagebox.Exists(5) then Messagebox.Yes + Kontext "Passwort" + if (Passwort.Exists(5))then + Warnlog "- Password dialog didn't pop up after pressing save" + Kontext "Passwort" + password.cancel + FileClose + else + hCloseDocument + end if endcase testcase tiFileTemplates - Call hNewDocument - - FileTemplatesOrganize - Kontext "DVVerwalten" - WaitSlot (1000) - Call DialogTest (DVVerwalten) - sleep 1 - PopuplisteLinks.Select 2 - WaitSlot (1000) - PopuplisteRechts.Select 2 - WaitSlot (1000) - WelcheDatei.Click - WaitSlot (1000) - Kontext "Oeffnendlg" - Call DialogTest (OeffnenDlg) - sleep 1 - OeffnenDlg.Cancel - WaitSlot (2000) - Kontext "DVVerwalten" - DVVerwalten.Close - -if gtSYSName = "Solaris x86" then - qaErrorLog "#i62423# - FileTemplatesAddressBookSource outcommented under x86. - FHA" -else - FileTemplatesAddressBookSource - Printlog "- AddressBookAssignment" - kontext "AddressBookSource" - Call DialogTest (AddressBookSource) - Administrate.Click - kontext "AddressSourceAutopilot" - AddressSourceAutopilot.Cancel - kontext "AddressBookSource" - AddressBookSource.Cancel -end if - - FileTemplatesSave - Printlog "- Save template" - WaitSlot (1000) - Kontext "Dokumentvorlagen" - sleep 1 - Call DialogTest (Dokumentvorlagen) - WaitSlot (1000) - Verwalten.Click - WaitSlot (2000) - Kontext "DVVerwalten" - Call DialogTest (DVVerwalten) - WaitSlot (3000) - DVVerwalten.Close - WaitSlot (1000) - Kontext "Dokumentvorlagen" - sleep 1 - Dokumentvorlagen.Cancel - WaitSlot (1000) - - try - FileTemplatesEdit - Printlog "- Edit template" - WaitSlot (1000) - Kontext "OeffnenDlg" - sleep 1 - Call DialogTest (OeffnenDlg) - WaitSlot (1000) - OeffnenDlg.Cancel - catch - Warnlog "- There are problems with File-Template-Save" - endcatch - WaitSlot (1000) - Call hCloseDocument + Call hNewDocument + + FileTemplatesOrganize + Kontext "DVVerwalten" + WaitSlot (1000) + Call DialogTest (DVVerwalten) + sleep 1 + PopuplisteLinks.Select 2 + WaitSlot (1000) + PopuplisteRechts.Select 2 + WaitSlot (1000) + WelcheDatei.Click + WaitSlot (1000) + Kontext "Oeffnendlg" + Call DialogTest (OeffnenDlg) + sleep 1 + OeffnenDlg.Cancel + WaitSlot (2000) + Kontext "DVVerwalten" + DVVerwalten.Close + + if gtSYSName = "Solaris x86" then + qaErrorLog "#i62423# - FileTemplatesAddressBookSource outcommented under x86. - FHA" + else + FileTemplatesAddressBookSource + Printlog "- AddressBookAssignment" + kontext "AddressBookSource" + Call DialogTest (AddressBookSource) + Administrate.Click + kontext "AddressSourceAutopilot" + AddressSourceAutopilot.Cancel + kontext "AddressBookSource" + AddressBookSource.Cancel + end if + + FileTemplatesSave + Printlog "- Save template" + WaitSlot (1000) + Kontext "Dokumentvorlagen" + sleep 1 + Call DialogTest (Dokumentvorlagen) + WaitSlot (1000) + Verwalten.Click + WaitSlot (2000) + Kontext "DVVerwalten" + Call DialogTest (DVVerwalten) + WaitSlot (3000) + DVVerwalten.Close + WaitSlot (1000) + Kontext "Dokumentvorlagen" + sleep 1 + Dokumentvorlagen.Cancel + WaitSlot (1000) + + try + FileTemplatesEdit + Printlog "- Edit template" + WaitSlot (1000) + Kontext "OeffnenDlg" + sleep 1 + Call DialogTest (OeffnenDlg) + WaitSlot (1000) + OeffnenDlg.Cancel + catch + Warnlog "- There are problems with File-Template-Save" + endcatch + WaitSlot (1000) + Call hCloseDocument endcase testcase tiFilePrint - Call hNewDocument -'/// open application ///' -'/// File->Print ///' - FilePrint - WaitSlot (1000) - kontext - if active.exists(5) then - active.ok - qaerrorlog "There is no printer available - please install one on your system!" - end if - WaitSlot (2000) - Kontext "DruckenDlg" - Call DialogTest (DruckenDlg) - '/// click 'options' ///' - WaitSlot (2000) - Zusaetze.Click - - Kontext "DruckerZusaetzeDraw" - Call DialogTest (DruckerZusaetzeDraw) - DruckerZusaetzeDraw.Cancel - '/// close options dialog with 'cancel' ///' - Kontext "DruckenDlg" - '/// close print dialog with 'cancel' ///' - DruckenDlg.Cancel - WaitSlot (2000) -'/// close application ///' - Call hCloseDocument + Call hNewDocument + FilePrint + WaitSlot (1000) + kontext + if active.exists(5) then + active.ok + qaerrorlog "There is no printer available - please install one on your system!" + end if + WaitSlot (2000) + Kontext "DruckenDlg" + Call DialogTest (DruckenDlg) + WaitSlot (2000) + Zusaetze.Click + + Kontext "DruckerZusaetzeDraw" + Call DialogTest (DruckerZusaetzeDraw) + DruckerZusaetzeDraw.Cancel + Kontext "DruckenDlg" + DruckenDlg.Cancel + WaitSlot (2000) + Call hCloseDocument endcase @@ -575,275 +502,269 @@ endcase testcase tmFileNewFromTemplate - Call hNewDocument - FileNewFromTemplate - '/// Open dialog with File / New / From Template /// - WaitSlot (5000) - Kontext "TemplateAndDocuments" - '/// Check if dialog has been opened /// - if TemplateAndDocuments.NotExists then - Warnlog "Dialog Templates and Documents are not up!" - goto endsub - end if - Call DialogTest (TemplateAndDocuments) - WaitSlot (5000) - try - TemplateAndDocuments.Cancel - catch - endcatch - WaitSlot (5000) - Call hCloseDocument + Call hNewDocument + FileNewFromTemplate + WaitSlot (5000) + Kontext "TemplateAndDocuments" + if TemplateAndDocuments.NotExists then + Warnlog "Dialog Templates and Documents are not up!" + goto endsub + end if + Call DialogTest (TemplateAndDocuments) + WaitSlot (5000) + try + TemplateAndDocuments.Cancel + catch + endcatch + WaitSlot (5000) + Call hCloseDocument endcase testcase tmFileOpen - call hNewDocument - FileOpen - Kontext "OeffnenDlg" - UebergeordneterOrdner.Click - Standard.Click - NurLesen.check - Call DialogTest ( OeffnenDlg ) - OeffnenDlg.Cancel - WaitSlot (2000) - Call hCloseDocument + call hNewDocument + FileOpen + Kontext "OeffnenDlg" + UebergeordneterOrdner.Click + Standard.Click + NurLesen.check + Call DialogTest ( OeffnenDlg ) + OeffnenDlg.Cancel + WaitSlot (2000) + Call hCloseDocument endcase testcase tmFileClose - printlog "- File Close" - hNewDocument ' just for the records: I open ONE document - call hTBOtypeInDoc - WaitSlot (2000) - FileClose - Kontext ' Expecting "Modified, do you want to close?" - if active.exists (5) then - printlog " Ok, active came up: " + active.gettext - Active.Cancel ' No, not this time - else - warnlog "active missing (1)" - end if - WaitSlot (2000) - - FileClose - Kontext - Active.Yes ' but now - records: this document is closed - WaitSlot (2000) - - Kontext "SpeichernDlg" - Call DialogTest ( SpeichernDlg ) - SpeichernDlg.Cancel - WaitSlot (2000) - - FileClose ' now the office gets closed! (if there were no modifications!) - Kontext - Active.No - WaitSlot (2000) + printlog "- File Close" + hNewDocument ' just for the records: I open ONE document + call hTBOtypeInDoc + WaitSlot (2000) + FileClose + Kontext ' Expecting "Modified, do you want to close?" + if active.exists (5) then + printlog " Ok, active came up: " + active.gettext + Active.Cancel ' No, not this time + else + warnlog "active missing (1)" + end if + WaitSlot (2000) + + FileClose + Kontext + Active.Yes ' but now - records: this document is closed + WaitSlot (2000) + + Kontext "SpeichernDlg" + Call DialogTest ( SpeichernDlg ) + SpeichernDlg.Cancel + WaitSlot (2000) + + FileClose ' now the office gets closed! (if there were no modifications!) + Kontext + Active.No + WaitSlot (2000) endcase '----------------------------------------------------------- testcase tmFileSave - hNewDocument - call hTBOtypeInDoc - - FileSave - WaitSlot (2000) - Kontext "SpeichernDlg" - UebergeordneterOrdner.click - Standard.Click - Call DialogTest (SpeichernDlg) - Kontext "SpeichernDlg" - Standard.Click - SpeichernDlg.Cancel - WaitSlot (2000) - Call hCloseDocument + hNewDocument + call hTBOtypeInDoc + + FileSave + WaitSlot (2000) + Kontext "SpeichernDlg" + UebergeordneterOrdner.click + Standard.Click + Call DialogTest (SpeichernDlg) + Kontext "SpeichernDlg" + Standard.Click + SpeichernDlg.Cancel + WaitSlot (2000) + Call hCloseDocument endcase testcase tmFileSaveAs - hNewDocument - WaitSlot (2000) - call hTBOtypeInDoc - - FileSaveAs - WaitSlot (2000) - Kontext "SpeichernDlg" - if (SpeichernDlg.exists (5) = FALSE) then - warnlog "FileSaveAs dialog is not visible" - end if - WaitSlot (2000) - Passwort.check - Passwort.uncheck - UebergeordneterOrdner.click - Standard.Click - - NeuerOrdner.click - kontext "NeuerOrdner" - neuerordner.cancel - Kontext "SpeichernDlg" - - Call DialogTest (SpeichernDlg) - - Kontext "SpeichernDlg" - SpeichernDlg.Cancel - WaitSlot (2000) - Call hCloseDocument + hNewDocument + WaitSlot (2000) + call hTBOtypeInDoc + + FileSaveAs + WaitSlot (2000) + Kontext "SpeichernDlg" + if (SpeichernDlg.exists (5) = FALSE) then + warnlog "FileSaveAs dialog is not visible" + end if + WaitSlot (2000) + Passwort.check + Passwort.uncheck + UebergeordneterOrdner.click + Standard.Click + + NeuerOrdner.click + kontext "NeuerOrdner" + neuerordner.cancel + Kontext "SpeichernDlg" + + Call DialogTest (SpeichernDlg) + + Kontext "SpeichernDlg" + SpeichernDlg.Cancel + WaitSlot (2000) + Call hCloseDocument endcase testcase tmFileSaveAll - printlog "- File SaveAll" - - hNewDocument - call hTBOtypeInDoc - - Printlog " open 2. window" - hNewDocument - call hTBOtypeInDoc - - Printlog " call save all" - FileSaveAll - Printlog " cancel 1. save" - Kontext "SpeichernDlg" - SpeichernDlg.Cancel - - Printlog " cancel 2. save" - WaitSlot (2000) - Kontext "SpeichernDlg" - SpeichernDlg.Cancel - WaitSlot (2000) - - try - Kontext "SpeichernDlg" - SpeichernDlg.Cancel - printlog "smth had been typed in the starting window (just a hint ;-) )" - catch - printlog "--------- no other window wants to get saved. :-)" - endcatch - - WaitSlot (2000) - Printlog " hCloseDocument both" - Call hCloseDocument - sleep 2 - Printlog " first closed" - Call hCloseDocument - WaitSlot (2000) - Printlog " second closed" - WaitSlot (5000) + printlog "- File SaveAll" + + hNewDocument + call hTBOtypeInDoc + + Printlog " open 2. window" + hNewDocument + call hTBOtypeInDoc + + Printlog " call save all" + FileSaveAll + Printlog " cancel 1. save" + Kontext "SpeichernDlg" + SpeichernDlg.Cancel + + Printlog " cancel 2. save" + WaitSlot (2000) + Kontext "SpeichernDlg" + SpeichernDlg.Cancel + WaitSlot (2000) + + try + Kontext "SpeichernDlg" + SpeichernDlg.Cancel + printlog "smth had been typed in the starting window (just a hint ;-) )" + catch + printlog "--------- no other window wants to get saved. :-)" + endcatch + + WaitSlot (2000) + Printlog " hCloseDocument both" + Call hCloseDocument + sleep 2 + Printlog " first closed" + Call hCloseDocument + WaitSlot (2000) + Printlog " second closed" + WaitSlot (5000) endcase testcase tmFileProperties - printlog "- File Properties" - - Call hNewDocument - FileProperties - - Kontext - active.SetPage TabDokument - Kontext "TabDokument" - Call DialogTest ( TabDokument ) - - Kontext - active.SetPage TabDokumentInfo - Kontext "TabDokumentInfo" - Call DialogTest ( TabDokumentInfo ) - - 'Deactivating this part because of #i95523#: - 'Kontext - 'active.SetPage TabBenutzer - 'Kontext "TabBenutzer" - 'Call DialogTest ( TabBenutzer ) - 'Infofelder.Click - ' Kontext "InfonamenBearbeiten" - ' Call DialogTest (InfonamenBearbeiten) - 'InfonamenBearbeiten.Cancel - - Kontext - active.SetPage TabInternet - Kontext "TabInternet" - Call DialogTest (TabInternet) - TabInternet.Cancel - - Call hCloseDocument + printlog "- File Properties" + + Call hNewDocument + FileProperties + + Kontext + active.SetPage TabDokument + Kontext "TabDokument" + Call DialogTest ( TabDokument ) + + Kontext + active.SetPage TabDokumentInfo + Kontext "TabDokumentInfo" + Call DialogTest ( TabDokumentInfo ) + + 'Deactivating this part because of #i95523#: + 'Kontext + 'active.SetPage TabBenutzer + 'Kontext "TabBenutzer" + 'Call DialogTest ( TabBenutzer ) + 'Infofelder.Click + ' Kontext "InfonamenBearbeiten" + ' Call DialogTest (InfonamenBearbeiten) + 'InfonamenBearbeiten.Cancel + + Kontext + active.SetPage TabInternet + Kontext "TabInternet" + Call DialogTest (TabInternet) + TabInternet.Cancel + + Call hCloseDocument endcase testcase tmFilePrinterSetting - printlog "- File Printersettings" - Call hNewDocument - WaitSlot (3000) - FilePrintersettings - kontext - if active.exists(5) then - active.ok - qaerrorlog "There is no printer available - please install one on your system!" - end if - WaitSlot (2000) - Kontext "DruckerEinrichten" - Call DialogTest (DruckerEinrichten) - sleep 2 - DruckerEinrichten.Cancel - WaitSlot (2000) - Call hCloseDocument + printlog "- File Printersettings" + Call hNewDocument + WaitSlot (3000) + FilePrintersettings + kontext + if active.exists(5) then + active.ok + qaerrorlog "There is no printer available - please install one on your system!" + end if + WaitSlot (2000) + Kontext "DruckerEinrichten" + Call DialogTest (DruckerEinrichten) + sleep 2 + DruckerEinrichten.Cancel + WaitSlot (2000) + Call hCloseDocument endcase testcase tdFileExport goto endsub - dim x as integer -'/// just call File->Export and exit ///' - Call hNewDocument - WaitSlot (3000) - FileExport - Kontext "ExportierenDlg" - Call DialogTest ( ExportierenDlg ) - UebergeordneterOrdner.Click - Kontext "SpeichernDlg" - '/// check number of available export filters. it has to be 17 ///' - '///+ this is also done in the 'first test', I provide it just as an additional info here.///' - '///+ testcase: ExFilterCountCompare ///' - x=Dateityp.getitemcount - if x <> 18 then warnlog "the number of filters is not 18, it is: " + x - SpeichernDlg.Cancel - WaitSlot (2000) - Call hCloseDocument - WaitSlot (2000) + dim x as integer + Call hNewDocument + WaitSlot (3000) + FileExport + Kontext "ExportierenDlg" + Call DialogTest ( ExportierenDlg ) + UebergeordneterOrdner.Click + Kontext "SpeichernDlg" + x=Dateityp.getitemcount + if x <> 18 then warnlog "the number of filters is not 18, it is: " + x + SpeichernDlg.Cancel + WaitSlot (2000) + Call hCloseDocument + WaitSlot (2000) endcase testcase tmFileExit - goto endsub - printlog "- File Close" - Call hNewDocument - WaitSlot (2000) - try - FileExit "SynchronMode", TRUE - WaitSlot (2000) - Kontext - WaitSlot (2000) - Kontext "MessageBox" - if MessageBox.Exists(1) then ' this is the messagebox from the first window! - Printlog MessageBox.GetText - try - MessageBox.OK - catch - MessageBox.No - endcatch - end if - Kontext "MessageBox" - if MessageBox.Exists(1) then - Warnlog "MsgBox popped up and there were no changes in the document" - Printlog MessageBox.GetText - try - MessageBox.OK - catch - MessageBox.No - endcatch - end if - catch - printlog "this exit is wanted :-)" - endcatch - try - WaitSlot (20000) - call hStartTheOffice ' from master.inc - catch - printlog "catch AGAIN" - endcatch - Kontext "SD_Praesentation" - if SD_Praesentation.exists (2) then - ViewToolbarsPresentation - end if + goto endsub + printlog "- File Close" + Call hNewDocument + WaitSlot (2000) + try + FileExit "SynchronMode", TRUE + WaitSlot (2000) + Kontext + WaitSlot (2000) + Kontext "MessageBox" + if MessageBox.Exists(1) then ' this is the messagebox from the first window! + Printlog MessageBox.GetText + try + MessageBox.OK + catch + MessageBox.No + endcatch + end if + Kontext "MessageBox" + if MessageBox.Exists(1) then + Warnlog "MsgBox popped up and there were no changes in the document" + Printlog MessageBox.GetText + try + MessageBox.OK + catch + MessageBox.No + endcatch + end if + catch + printlog "this exit is wanted :-)" + endcatch + try + WaitSlot (20000) + call hStartTheOffice ' from master.inc + catch + printlog "catch AGAIN" + endcatch + Kontext "SD_Praesentation" + if SD_Praesentation.exists (2) then + ViewToolbarsPresentation + end if endcase diff --git a/testautomation/graphics/optional/includes/global/id_002.inc b/testautomation/graphics/optional/includes/global/id_002.inc index 75bee17d8b94..57163cedd72d 100755 --- a/testautomation/graphics/optional/includes/global/id_002.inc +++ b/testautomation/graphics/optional/includes/global/id_002.inc @@ -1,7 +1,7 @@ 'encoding UTF-8 Do not remove or change this line! '************************************************************************** '* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. -'* +'* '* Copyright 2008 by Sun Microsystems, Inc. '* '* OpenOffice.org - a multi-platform office productivity suite @@ -55,9 +55,6 @@ testcase tiEditUndoRedo - '/// open application ///' - '/// Type a sentence into the document and do : ///' - '/// Edit / Undo and Edit / Redo /// hNewDocument call hTBOtypeInDoc @@ -65,16 +62,13 @@ testcase tiEditUndoRedo WaitSlot (2000) EditRedo WaitSlot (2000) - '/// close application ///' Call hCloseDocument endcase testcase tiEditRepeat goto endsub 'Quaste, ask FHA - '/// open application ///' Call hNewDocument -'/// create 3 rectangles ///' gMouseClick 50,50 Call hRechteckErstellen ( 30, 10, 70, 30 ) WaitSlot (1000) @@ -82,24 +76,18 @@ testcase tiEditRepeat WaitSlot (1000) Call hRechteckErstellen ( 80, 50, 40, 20 ) WaitSlot (1000) - '/// [Modify | ContextMenu]->Arrange->SendBackward ///' ContextArrangeBringBackward WaitSlot (2000) - '/// Edit->Repeat ///' try EditRepeat catch Warnlog " Menu entry is disabled #i26129#" endcatch - '/// close application ///' Call hCloseDocument endcase testcase tiEditCutPasteCopySelectall - '/// open application ///' - '/// Type a sentence into the dokument and do : ///' - '/// edit-> (Cut | Paste | Copy | SelectAll | Cut | Paste | DeleteContents) ///' Call hNewDocument call hTBOtypeInDoc @@ -120,105 +108,74 @@ testcase tiEditCutPasteCopySelectall WaitSlot (2000) EditDeleteContents WaitSlot (2000) - '/// close application ///' Call hCloseDocument endcase testcase tiEditPasteSpecial - '/// open application ///' Call hNewDocument - '/// put some words into the clipboard ///' SetClipboard "This is a Text in the Clipboard" - '/// Edit->PasteSpecial ///' EditPasteSpecial WaitSlot (1000) Kontext "InhaltEinfuegen" - DialogTest ( InhaltEinfuegen ) + DialogTest ( InhaltEinfuegen ) - '/// close the dialog without inserting something ///' - InhaltEinfuegen.Cancel + InhaltEinfuegen.Cancel WaitSlot (1000) - '/// close application ///' Call hCloseDocument endcase testcase tiEditSearchAndReplace - '/// open application ///' Call hNewDocument try - '/// Edit->Find & Replace ///' EditSearchAndReplace WaitSlot (1000) Kontext "FindAndReplace" - DialogTest ( FindAndReplace ) - - '/// click on "More Options" ///' - More.Click - '/// check 'similarity search' ///' - SimilaritySearch.Check ' culprint for errors if not resetted ! - WaitSlot (1000) - '/// click '...' :-) ///' - SimilaritySearchFor.Click - Kontext "Aehnlichkeitssuche" - DialogTest (Aehnlichkeitssuche ) - Aehnlichkeitssuche.Cancel - '/// close dialog 'similarity search' ///' + DialogTest ( FindAndReplace ) + + More.Click + SimilaritySearch.Check ' culprint for errors if not resetted ! + WaitSlot (1000) + SimilaritySearchFor.Click + Kontext "Aehnlichkeitssuche" + DialogTest (Aehnlichkeitssuche ) + Aehnlichkeitssuche.Cancel Kontext "FindAndReplace" - '/// UNcheck 'similarity search' ///' - SimilaritySearch.UnCheck - '/// click on "More Options" ///' - More.Click - '/// close dialog 'Find & Replace' ///' - FindAndReplace.Close + SimilaritySearch.UnCheck + More.Click + FindAndReplace.Close catch Warnlog "EditSearchAndReplace caused an error" endcatch - '/// close application ///' Call hCloseDocument endcase testcase tiEditDuplicate - '/// open application ///' Call hNewDocument - '/// create a rectangle ///' call hTBOtypeInDoc - '/// 'Edit->Select All' ///' EditSelectAll - '/// Edit->Duplicate ///' EditDuplicate Kontext "Duplizieren" - Call DialogTest ( Duplizieren ) - '/// cancel dialog 'duplicate' ///' - Duplizieren.Cancel + Call DialogTest ( Duplizieren ) + Duplizieren.Cancel Call hCloseDocument - '/// close application ///' endcase testcase tEditPoints - '/// open application ///' Call hNewDocument - '/// create a rectangle ///' call hTBOtypeInDoc - '/// 'Edit->Points' ///' FormatEditPoints - '/// 'Edit->Glue Points' ///' EditGluePoints - '/// close application ///' Call hCloseDocument endcase testcase tiEditFields - '/// open application ///' Call hNewDocument WaitSlot (2000) - '/// insert something to be able to use this function ///' - '///+ Insert->Fields->Date (fixed) ///' - '///+ deselect object, select, editmode ///' InsertFieldsDateFix WaitSlot (1000) gMouseDoubleClick 10,10 @@ -229,30 +186,23 @@ testcase tiEditFields hTypeKeys "" ' Here we enter Edit-Mode and therefore also the right place try - '/// Edit->Fields ///' EditFieldsDraw Kontext "FeldbefehlBearbeitenDraw" - Call DialogTest ( FeldbefehlBearbeitenDraw ) - '/// cancel dialog 'Edit->Field' ///' - FeldbefehlBearbeitenDraw.Close + Call DialogTest ( FeldbefehlBearbeitenDraw ) + FeldbefehlBearbeitenDraw.Close catch Warnlog "- Slot could not be accessed" endcatch -'/// close application ///' Call hCloseDocument endcase testcase tdEditDeleteSlide -'/// open application ///' Call hNewDocument -'/// Insert->Slide ///' InsertSlide WaitSlot (2000) hTypekeys "" WaitSlot (2000) - '/// check with navigator, if slide is inserted ///' - '/// check state of navigator ! expected: closed ///' Kontext "Navigator" sleep (2) if Navigator.exists then @@ -271,165 +221,136 @@ testcase tdEditDeleteSlide goto endsub else Liste.Select 2 - Liste.Typekeys "" '/// Press Return to go to the selected slide ///' Kontext "Navigator" Navigator.Close end if WaitSlot (2000) - '/// Edit->Delete Slide ///' EditDeleteSlide WaitSlot (2000) - '/// close application ///' Call hCloseDocument endcase testcase tiEditLinks - '/// open application ///' Call hNewDocument - '/// Insert a linked graphic : "global\input\graf_inp\stabler.tif" ///' InsertGraphicsFromFile Kontext "GrafikEinfuegenDlg" - try - if Link.Exists then - Link.Check - else - Warnlog "- Link in Insert graphic is not working" - end if - Dateiname.settext Convertpath (gTesttoolPath + "global\input\graf_inp\stabler.tif") - Oeffnen.Click - Kontext "Messagebox" - if Messagebox.Exists=True Then - Warnlog Messagebox.GetText - Messagebox.Ok - end if - InsertGraphicsFromFile - Kontext "GrafikEinfuegenDlg" - Link.Check - '/// Insert a linked graphic : "global\input\graf_inp\desp.bmp" ///' - Dateiname.SetText ConvertPath (gTesttoolPath + "global\input\graf_inp\desp.bmp") - Oeffnen.Click - sleep 2 - kontext "Messagebox" - if Messagebox.Exists then - Warnlog Messagebox.GetText - Messagebox.OK - sleep 1 - end if - catch - Warnlog "Insert graphic caused errors" - endcatch + try + if Link.Exists then + Link.Check + else + Warnlog "- Link in Insert graphic is not working" + end if + Dateiname.settext Convertpath (gTesttoolPath + "global\input\graf_inp\stabler.tif") + Oeffnen.Click + Kontext "Messagebox" + if Messagebox.Exists=True Then + Warnlog Messagebox.GetText + Messagebox.Ok + end if + InsertGraphicsFromFile + Kontext "GrafikEinfuegenDlg" + Link.Check + Dateiname.SetText ConvertPath (gTesttoolPath + "global\input\graf_inp\desp.bmp") + Oeffnen.Click + sleep 2 + kontext "Messagebox" + if Messagebox.Exists then + Warnlog Messagebox.GetText + Messagebox.OK + sleep 1 + end if + catch + Warnlog "Insert graphic caused errors" + endcatch - WaitSlot (2000) + WaitSlot (2000) try - '/// Edit->Links ///' EditLinksDraw WaitSlot (2000) Kontext "VerknuepfungenBearbeiten" - Call DialogTest ( VerknuepfungenBearbeiten ) - '/// close dialog 'Edit Links' ///' - VerknuepfungenBearbeiten.Close - WaitSlot (1000) + Call DialogTest ( VerknuepfungenBearbeiten ) + VerknuepfungenBearbeiten.Close + WaitSlot (1000) catch Warnlog "- EditLinks could not be executed, could be the graphic was not imported" endcatch - '/// close application ///' Call hCloseDocument endcase testcase tiEditImageMap - '/// open application ///' Call hNewDocument - '/// Edit->Image Map ///' EditImageMap Kontext "ImageMapEditor" - sleep (1) - if ImageMapEditor.Exists (2) then - printlog "- ImageMap exists" - DialogTest ( ImageMapEditor ) - try - '/// Close dialog 'Image Map Editor' ///' - ImageMapEditor.Close - Printlog "ImageMap closed using the close button" - catch - EditImageMap - Printlog "ImageMap closed using menue 'edit-imagemap'" - endcatch - else - warnlog "ImageMap didn't come up!" - end if - '/// close application ///' + sleep (1) + if ImageMapEditor.Exists (2) then + printlog "- ImageMap exists" + DialogTest ( ImageMapEditor ) + try + ImageMapEditor.Close + Printlog "ImageMap closed using the close button" + catch + EditImageMap + Printlog "ImageMap closed using menue 'edit-imagemap'" + endcatch + else + warnlog "ImageMap didn't come up!" + end if Call hCloseDocument endcase testcase tiEditObjectProperties dim i as integer - '/// for every object, there are several edit options: ///' - '///+ starting with FloatingFrame->Properties ///' - '///+ file used for input in frame: global\input\graf_inp\desp.bmp /// - '/// open application ///' Call hNewDocument - '/// Insert->Floating Frame ///' InsertFloatingFrame WaitSlot (2000) Kontext "TabEigenschaften" - FrameName.SetText "Hello" - '/// insert an picture into the frame (embedded into draw application :-)) ///' - Inhalt.SetText ConvertPath ( gTesttoolpath + "global\input\graf_inp\desp.bmp" ) - WaitSlot (2000) - TabEigenschaften.OK - WaitSlot (2000) + FrameName.SetText "Hello" + Inhalt.SetText ConvertPath ( gTesttoolpath + "global\input\graf_inp\desp.bmp" ) + WaitSlot (2000) + TabEigenschaften.OK + WaitSlot (2000) gMouseDoubleClick 1,1 - '/// select frame ///' hTypekeys "" - '/// Edit->Object->Properties ///' kontext WaitSlot (2000) EditObjectProperties WaitSlot (1000) Kontext "TabEigenschaften" - DialogTest ( TabEigenschaften ) - '/// open Contents File Dialog ///' - sleep(1) - Oeffnen.Click - Kontext "OeffnenDlg" - Call DialogTest ( OeffnenDlg ) - '/// Cancel 'Select File for Floating Frame' ///' - OeffnenDlg.Cancel + DialogTest ( TabEigenschaften ) + sleep(1) + Oeffnen.Click + Kontext "OeffnenDlg" + Call DialogTest ( OeffnenDlg ) + OeffnenDlg.Cancel Kontext "TabEigenschaften" - TabEigenschaften.Cancel + TabEigenschaften.Cancel - '/// close application ///' Call hCloseDocument endcase testcase tiEditObjectEdit - '/// OLE: edit & save copy as... ///' - '/// open application ///' dim i as integer Call hNewDocument - '/// Insert->Object->OLE Object; select the first one in list, usually: 'StarOffice 6.0 Spreadsheet' ///' InsertObjectOLEObject WaitSlot (1000) Kontext "OLEObjektEinfuegen" - ObjektTyp.Select 1 - OLEObjektEinfuegen.OK - WaitSlot (1000) + ObjektTyp.Select 1 + OLEObjektEinfuegen.OK + WaitSlot (1000) gMouseClick 20,1 - '/// select object ///' hTypekeys "" - '/// Edit->Object->Edit ///' EditObjectEdit ' try EditObjectEdit again, to see, if it is in edit mode ! WaitSlot (2000) @@ -438,114 +359,97 @@ testcase tiEditObjectEdit warnlog " Couldn't get into edit mode!" catch printlog "Reached edit mode - ok :-)" - '/// exit edit mode, by clicking outside the object ///' gMouseClick 20,1 endcatch - '/// select object ///' EditSelectAll - '/// Edit->Object->Save Copy As ///' EditObjectSaveCopyAs Kontext "SpeichernDlg" - Call DialogTest ( SpeichernDlg ) - '/// cancel dialog 'Save As' ///' - SpeichernDlg.Cancel - WaitSlot (2000) - Kontext "Active" - if Active.Exists(2) then Active.No - '/// close application ///' - Call hCloseDocument + Call DialogTest ( SpeichernDlg ) + SpeichernDlg.Cancel + WaitSlot (2000) + Kontext "Active" + if Active.Exists(2) then Active.No + Call hCloseDocument endcase testcase tiEditPlugIn - '/// open application ///' Call hNewDocument - '/// Insert->Object->Plugin ///' InsertObjectPlugin Kontext "PlugInEinfuegen" ' DialogTest ( PlugInEinfuegen) - Durchsuchen.click - Kontext "OeffnenDlg" - ' Call DialogTest ( OeffnenDlg ) - if OeffnenDlg.exists (5) then - OeffnenDlg.Cancel - else - warnlog "Open file dialog didn't come up" - end if - WaitSlot (5000) + Durchsuchen.click + Kontext "OeffnenDlg" + ' Call DialogTest ( OeffnenDlg ) + if OeffnenDlg.exists (5) then + OeffnenDlg.Cancel + else + warnlog "Open file dialog didn't come up" + end if + WaitSlot (5000) Kontext "PlugInEinfuegen" - if PlugInEinfuegen.exists then - '/// insert a '.mov' file : "graphics\required\input\sample.mov" ///' - DateiUrl.SetText (ConvertPath ( gTesttoolpath + "graphics\required\input\sample.mov" )) - '/// Type something into the option field, and delete it - quite usefull, heh ?! ///' - - Optionen.SetText "Fiddler's Green" - Optionen.TypeKeys "" - Optionen.TypeKeys "" - Optionen.TypeKeys "" - PlugInEinfuegen.Ok - else - warnlog "Insert plugin isn't visible" - end if + if PlugInEinfuegen.exists then + DateiUrl.SetText (ConvertPath ( gTesttoolpath + "graphics\required\input\sample.mov" )) + + Optionen.SetText "Fiddler's Green" + Optionen.TypeKeys "" + Optionen.TypeKeys "" + Optionen.TypeKeys "" + PlugInEinfuegen.Ok + else + warnlog "Insert plugin isn't visible" + end if WaitSlot (5000) kontext "Messagebox" - if Messagebox.exists (5) then - warnlog "Messagebox: " + Messagebox.gettext - Messagebox.ok - end if - '/// Edit->Plugin ///' + if Messagebox.exists (5) then + warnlog "Messagebox: " + Messagebox.gettext + Messagebox.ok + end if EditPlugIn printlog "Editplugin works!" - '/// close application ///' Call hCloseDocument endcase testcase tiEditHyperlink - '/// open application ///' hNewDocument - '/// Insert->Hyperlink ///' InsertHyperlink WaitSlot (5000) Kontext "Hyperlink" - Auswahl.MouseDown 50, 5 - Auswahl.MouseUp 50, 5 - Auswahl.typekeys "" - Auswahl.typekeys "" - sleep 3 - Kontext "TabHyperlinkInternet" - - 'Workaround to get rid of a Focusing-problem... - NameText.Typekeys "alal " - NameText.Typekeys "" - TabHyperlinkInternet.Typekeys "", 6 - TabHyperlinkInternet.Typekeys "", 3 - 'End of workaround... - - Internet.Check 'Just to make sure the radio-button is addressable. - ZielUrl.Settext "http://www.liegerad-fahrer.de" + Auswahl.MouseDown 50, 5 + Auswahl.MouseUp 50, 5 + Auswahl.typekeys "" + Auswahl.typekeys "" + sleep 3 + Kontext "TabHyperlinkInternet" + + 'Workaround to get rid of a Focusing-problem... + NameText.Typekeys "alal " + NameText.Typekeys "" + TabHyperlinkInternet.Typekeys "", 6 + TabHyperlinkInternet.Typekeys "", 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 - '/// presupposition to enable edit->hyperlink: ///' - hTypeKeys "" + Uebernehmen.Click + Hyperlink.Close + hTypeKeys "" EditSelectAll try - '/// Edit->Hyperlink ///' EditHyperlinkDraw Kontext "Hyperlink" - if Hyperlink.Exists then - '/// close dialog 'Hyperlink' ///' - Hyperlink.Close - else - Warnlog "- Hyperlinkdialog not up" - end if + if Hyperlink.Exists then + Hyperlink.Close + else + Warnlog "- Hyperlinkdialog not up" + end if catch Warnlog "- Not able to edit Hyperlink!" endcatch - '/// close application ///' Call hCloseDocument endcase diff --git a/testautomation/graphics/optional/includes/global/id_003.inc b/testautomation/graphics/optional/includes/global/id_003.inc index 258ae7504340..13f61c45d791 100755 --- a/testautomation/graphics/optional/includes/global/id_003.inc +++ b/testautomation/graphics/optional/includes/global/id_003.inc @@ -1,7 +1,7 @@ 'encoding UTF-8 Do not remove or change this line! '************************************************************************** '* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. -'* +'* '* Copyright 2008 by Sun Microsystems, Inc. '* '* OpenOffice.org - a multi-platform office productivity suite @@ -46,188 +46,140 @@ '\********************************************************************************** testcase tiViewNavigator - '/// open application ///' Call hNewDocument Kontext "NavigatorDraw" - '/// if 'Navigator' isn't already open, open it (View->Navigator)///' - if Not NavigatorDraw.Exists Then - ViewNavigator - end if + if Not NavigatorDraw.Exists Then + ViewNavigator + end if Kontext "NavigatorDraw" - Call DialogTest ( NavigatorDraw ) - - try - Kontext "Navigator" - '/// close 'Navigator' ///' - Navigator.Close - catch - Errorlog " Navigator wasn't closed, second try with Menu" - ViewNavigator - endcatch - '/// close application ///' + Call DialogTest ( NavigatorDraw ) + + try + Kontext "Navigator" + Navigator.Close + catch + Errorlog " Navigator wasn't closed, second try with Menu" + ViewNavigator + endcatch Call hCloseDocument endcase '------------------------------------------------------------------------- testcase tiViewZoom -'/// open application ///' - Call hNewDocument - UseBindings - ViewZoom - Kontext "Massstab" - DialogTest ( Massstab ) - Massstab.Cancel -'/// close application ///' - Call hCloseDocument + Call hNewDocument + UseBindings + ViewZoom + Kontext "Massstab" + DialogTest ( Massstab ) + Massstab.Cancel + Call hCloseDocument endcase '------------------------------------------------------------------------- testcase tiViewToolbar -'/// including ruler & statusbar ///' -'/// open application ///' - Call hNewDocument + Call hNewDocument -'/// View->Toolbars->ThreeDSettings ///' ViewToolbarsThreeDSettings WaitSlot (1000) -'/// View->Toolbars->ThreeDSettings ///' ViewToolbarsThreeDSettings WaitSlot (1000) -'/// View->Toolbars->Align ///' ViewToolbarsAlign WaitSlot (1000) -'/// View->Toolbars->Align ///' ViewToolbarsAlign WaitSlot (1000) -'/// View->Toolbars->Tools ///' ViewToolbarsTools WaitSlot (1000) -'/// View->Toolbars->Tools ///' ViewToolbarsTools WaitSlot (1000) -'/// View->Toolbars->Bezier ///' ViewToolbarsBezier WaitSlot (1000) -'/// View->Toolbars->Bezier ///' ViewToolbarsBezier WaitSlot (1000) -'/// View->Toolbars->Fontwork ///' ViewToolbarsFontwork WaitSlot (1000) -'/// View->Toolbars->Fontwork ///' ViewToolbarsFontwork WaitSlot (1000) ' if gApplication = "IMPRESS" then - '/// View->Toolbars->Presentation ///' ' ViewToolbarsPresentation ' only in impress, not draw - '/// View->Toolbars->Presentation ///' ' ViewToolbarsPresentation ' endif -'/// View->Toolbars->Form Controls ///' ViewToolbarsFormControls WaitSlot (1000) -'/// View->Toolbars->Form Controls ///' ViewToolbarsFormControls WaitSlot (1000) -'----------------- -'/// View->Toolbars->Form Design ///' + '----------------- ViewToolbarsFormDesign WaitSlot (1000) -'/// View->Toolbars->Form Design ///' ViewToolbarsFormDesign WaitSlot (1000) -'/// View->Toolbars->FormNavigation ///' ViewToolbarsFormNavigation WaitSlot (1000) -'/// View->Toolbars->FormNavigation ///' ViewToolbarsFormNavigation WaitSlot (1000) -'/// View->Toolbars->Gluepoints ///' ViewToolbarsGluepoints WaitSlot (1000) -'/// View->Toolbars->Gluepoints ///' ViewToolbarsGluepoints WaitSlot (1000) -'/// View->Toolbars->Insert ///' ViewToolbarsInsert WaitSlot (1000) -'/// View->Toolbars->Insert ///' ViewToolbarsInsert WaitSlot (1000) -'/// View->Toolbars->Graphic ///' ViewToolbarsGraphic WaitSlot (1000) -'/// View->Toolbars->Graphic ///' ViewToolbarsGraphic WaitSlot (1000) -'/// View->Toolbars->MediaPlayback ///' ViewToolbarsMediaPlayback WaitSlot (1000) -'/// View->Toolbars->MediaPlayback ///' ViewToolbarsMediaPlayback WaitSlot (1000) -'/// View->Toolbars->Optionbar ///' ViewToolbarsOptionbar WaitSlot (1000) -'/// View->Toolbars->Optionbar ///' ViewToolbarsOptionbar WaitSlot (1000) -'/// View->Toolbars->Picture ///' ViewToolbarsPicture WaitSlot (1000) -'/// View->Toolbars->Picture ///' ViewToolbarsPicture WaitSlot (1000) -'/// View->Toolbars->Standard ///' ViewToolbarsStandard WaitSlot (1000) -'/// View->Toolbars->Standard ///' ViewToolbarsStandard WaitSlot (1000) -'/// View->Toolbars->Standard View ///' ViewToolbarsStandardView WaitSlot (1000) -'/// View->Toolbars->Standard View ///' ViewToolbarsStandardView WaitSlot (1000) -'/// View->Toolbars->Hyperlinkbar ///' ViewToolbarsHyperlinkbar WaitSlot (1000) -'/// View->Toolbars->Hyperlinkbar ///' ViewToolbarsHyperlinkbar WaitSlot (1000) -'/// View->Toolbars->ColorBar ///' ViewToolbarsColorBar WaitSlot (1000) -'/// View->Toolbars->ColorBar ///' ViewToolbarsColorBar WaitSlot (1000) -'/// View->Toolbars->Customize ///' ViewToolbarsCustomize WaitSlot (1000) Kontext - '/// switch to tabpage 'Menus' ///' try Messagebox.SetPage TabCustomizeMenu ' 1 ------------------ catch @@ -239,13 +191,10 @@ testcase tiViewToolbar Menu.typeKeys("") Entries.typeKeys("") sleep 2 - '/// click button 'new' ///' BtnNew.Click sleep 1 - '/// Dialog 'New Menu' comes up ///' Kontext "MenuOrganiser" Call DialogTest ( MenuOrganiser ) - '/// Cancel dialog 'New Menu' ///' MenuOrganiser.cancel sleep 1 Kontext "TabCustomizeMenu" @@ -253,21 +202,17 @@ testcase tiViewToolbar end if sleep (1) -'/// close application ///' - Call hCloseDocument + Call hCloseDocument endcase '------------------------------------------------------------------------- testcase tiViewDisplayQuality - '/// open application ///' Call hNewDocument - '/// create a rectangle ///' Call hRechteckErstellen 20,20,40,40 try - '/// View->Display Quality->Black and White ///' ViewQualityBlackWhite Printlog "- Quality set to black and white" catch @@ -275,7 +220,6 @@ testcase tiViewDisplayQuality endcatch WaitSlot (1000) try - '/// View->Display Quality->Greyscale ///' ViewQualityGreyscale Printlog "- View quality set to greyscale" catch @@ -283,75 +227,52 @@ testcase tiViewDisplayQuality endcatch WaitSlot (1000) try - '/// View->Display Quality->Colour ///' ViewQualityColour Printlog "- View quality set to colour" catch Warnlog "- View quality colour could not be accessed" endcatch - '/// close application ///' Call hClosedocument endcase '------------------------------------------------------------------------- testcase tiViewLayer - '/// open application ///' Call hNewDocument - '/// Insert->Layer / in impress: ???? ///' - '/// View->Layer ///' ViewLayer WaitSlot (1000) - '/// View->Layer ///' ViewLayer - '/// close application ///' Call hCloseDocument endcase '------------------------------------------------------------------------- testcase tViewGrid - '/// open application ///' Call hNewDocument - '/// View->Grid-> ///' ViewGridVisible - '/// View->Grid-> ///' ViewGridUse - '/// View->Grid-> ///' ViewGridFront - '/// View->Grid-> ///' ViewGridVisible - '/// View->Grid-> ///' ViewGridUse - '/// View->Grid-> ///' ViewGridFront WaitSlot (1000) - '/// close application ///' Call hCloseDocument endcase '------------------------------------------------------------------------- testcase tViewSnapLines - '/// open application ///' Call hNewDocument - '/// View->Snap Lines-> ///' ViewSnapLinesVisible - '/// View->Snap Lines-> ///' ViewSnapLinesUse - '/// View->Snap Lines-> ///' ViewSnapLinesFront - '/// View->Snap Lines-> ///' ViewSnapLinesVisible - '/// View->Snap Lines-> ///' ViewSnapLinesUse - '/// View->Snap Lines-> ///' ViewSnapLinesFront WaitSlot (1000) - '/// close application ///' Call hCloseDocument endcase diff --git a/testautomation/graphics/optional/includes/global/id_004.inc b/testautomation/graphics/optional/includes/global/id_004.inc index f74d3f8b7228..606ccbefaac5 100755 --- a/testautomation/graphics/optional/includes/global/id_004.inc +++ b/testautomation/graphics/optional/includes/global/id_004.inc @@ -1,7 +1,7 @@ 'encoding UTF-8 Do not remove or change this line! '************************************************************************** '* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. -'* +'* '* Copyright 2008 by Sun Microsystems, Inc. '* '* OpenOffice.org - a multi-platform office productivity suite @@ -56,437 +56,339 @@ ' #1 tdInsertLayer '\********************************************************************************** -'/// Dateiname.settext Convertpath (gTesttoolPath + "global\input\graf_inp\stabler.tif") ///' testcase tiInsertSlide - '/// open application ///' Call hNewDocument - '/// Insert->Slide ///' InsertSlide WaitSlot (2000) hTypekeys "" WaitSlot (2000) 'sleep 2 - '/// close application ///' Call hCloseDocument endcase testcase tiInsertDuplicateSlide - '/// open application ///' Call hNewDocument - '/// create rectangle ///' Call hRechteckErstellen ( 30, 40, 40, 50 ) - '/// Insert->Duplicate Slide ///' InsertDuplicateSlide WaitSlot (2000) - '/// close application ///' Call hCloseDocument endcase testcase tiInsertField - '/// open application ///' Call hNewDocument - '/// Insert->Fields->Time (fixed) ///' InsertFieldsTimeFix WaitSlot (1000) printlog "OK Time Fix" - '/// delete it with EditSelectAll + ///' EditSelectAll hTypekeys "" sleep 1 - '/// Insert->Fields->Date (fixed) ///' InsertFieldsDateFix WaitSlot (1000) printlog "OK Date Fix" - '/// delete it with EditSelectAll + ///' EditSelectAll hTypekeys "" sleep 1 - '/// Insert->Fields->Time (variable) ///' InsertFieldsTimeVariable WaitSlot (1000) printlog "OK Time Variabel" - '/// delete it with EditSelectAll + ///' EditSelectAll hTypekeys "" sleep 1 - '/// Insert->Fields->Date (variable) ///' InsertFieldsDateVariable WaitSlot (1000) printlog "OK Date Variabel" - '/// delete it with EditSelectAll + ///' EditSelectAll hTypekeys "" sleep 1 - '/// Insert->Fields->Author ///' InsertFieldsAuthorDraw WaitSlot (1000) printlog "OK Author" - '/// delete it with EditSelectAll + ///' EditSelectAll hTypekeys "" sleep 1 - '/// Insert->Fields->Page Numbers///' InsertFieldsPageNumberDraw WaitSlot (1000) printlog "OK Page number" - '/// delete it with EditSelectAll + ///' EditSelectAll hTypekeys "" sleep 1 - '/// Insert->Fields->Filename ///' InsertFieldsFileName WaitSlot (1000) 'sleep 1 printlog "OK File name" - '/// delete it with EditSelectAll + ///' EditSelectAll hTypekeys "" sleep 2 - '/// close application ///' Call hCloseDocument endcase testcase tiInsertSpecialCharacter - '/// open application ///' Call hNewDocument - '/// insert text ///' hTextrahmenErstellen ("This is a testtext",30,40,60,50) sleep 2 - '/// Insert->SpecialCharacter ///' InsertSpecialCharacterDraw WaitSlot (2000) Kontext "Sonderzeichen" - Call DialogTest (Sonderzeichen) - '/// cancel dialog 'Special Characters' ///' - Sonderzeichen.Cancel - sleep 2 - '/// close application ///' + Call DialogTest (Sonderzeichen) + Sonderzeichen.Cancel + sleep 2 Call hCloseDocument endcase testcase tiInsertHyperlink - '/// open application ///' Call hNewDocument - '/// Insert->Hyperlink ///' InsertHyperlink WaitSlot (5000) Kontext "Hyperlink" - if Hyperlink.exists (5) then - Auswahl.MouseDown 50, 5 - Auswahl.MouseUp 50, 5 - Auswahl.typekeys "" - Auswahl.typekeys "" - sleep 3 - Kontext "TabHyperlinkInternet" - - 'Workaround to get rid of a Focusing-problem... - NameText.Typekeys "alal " - NameText.Typekeys "" - TabHyperlinkInternet.Typekeys "", 6 - TabHyperlinkInternet.Typekeys "", 3 - 'End of workaround... - - Internet.Check - ZielUrl.Settext "http://mahler" - Kontext "Hyperlink" - Uebernehmen.Click - Hyperlink.Close - else - warnlog "Failed to open hyperlink ??!!" - end if - '/// close application ///' + if Hyperlink.exists (5) then + Auswahl.MouseDown 50, 5 + Auswahl.MouseUp 50, 5 + Auswahl.typekeys "" + Auswahl.typekeys "" + sleep 3 + Kontext "TabHyperlinkInternet" + + 'Workaround to get rid of a Focusing-problem... + NameText.Typekeys "alal " + NameText.Typekeys "" + TabHyperlinkInternet.Typekeys "", 6 + TabHyperlinkInternet.Typekeys "", 3 + 'End of workaround... + + Internet.Check + ZielUrl.Settext "http://mahler" + Kontext "Hyperlink" + Uebernehmen.Click + Hyperlink.Close + else + warnlog "Failed to open hyperlink ??!!" + end if Call hCloseDocument endcase testcase tiInsertGraphic - '/// open application ///' Call hNewDocument - '/// Insert->Graphics ///' InsertGraphicsFromFile WaitSlot (2000) ' try Kontext "GrafikEinfuegenDlg" - '/// if checkbox 'link' is available, check it; if not available: ERROR ///' - if Link.exists then - Link.Check - else - Warnlog "Linking grafik doesn't work :-(" - end if - '/// if checkbox 'Preview' is available, check it; if not available: ERROR ///' - if Preview.exists then - Preview.Check - else - Warnlog "Preview of graphic doesn't work :-(" - end if - DialogTest (GrafikEinfuegenDlg) - - '/// use file: "global\input\graf_inp\stabler.tif") ///' - Dateiname.settext Convertpath (gTesttoolPath + "global\input\graf_inp\stabler.tif") - '/// click 'open' ///' - Oeffnen.click + if Link.exists then + Link.Check + else + Warnlog "Linking grafik doesn't work :-(" + end if + if Preview.exists then + Preview.Check + else + Warnlog "Preview of graphic doesn't work :-(" + end if + DialogTest (GrafikEinfuegenDlg) + + Dateiname.settext Convertpath (gTesttoolPath + "global\input\graf_inp\stabler.tif") + Oeffnen.click catch Warnlog "Insert graphic doesn't work :-(" endcatch - '/// close application ///' Call hCloseDocument endcase testcase tiInsertObjectSound goto endsub ' disabled for final, because always wrong (TZ 01/2002) 'TODO: TBO: enhance! - '/// open application ///' Call hNewDocument try - '/// Insert->Object->Sound ///' InsertObjectSound WaitSlot (1000) Kontext "OeffnenDlg" - ' Call Dialogtest (OeffnenDlg) ' just be sure to check one pth and one open dialog : TZ 28.11.201 + ' Call Dialogtest (OeffnenDlg) ' just be sure to check one pth and one open dialog : TZ 28.11.201 - '/// cancel file open dialog ///' - OeffnenDlg.Cancel + OeffnenDlg.Cancel catch printlog "'Insert -> Object -> Sound' not available. TestDevelopmentInProgress (TDIP) ;-)" endcatch - '/// close application ///' Call hCloseDocument endcase testcase tiInsertObjectVideo goto endsub 'TODO: TBO: enhance! - '/// open application ///' Call hNewDocument try - '/// Insert->Object->Video ///' InsertObjectVideo Kontext "OeffnenDlg" - ' Call Dialogtest (OeffnenDlg) - WaitSlot (1000) - '/// cancel file open dialog ///' - OeffnenDlg.Cancel + ' Call Dialogtest (OeffnenDlg) + WaitSlot (1000) + OeffnenDlg.Cancel catch printlog "'Insert -> Object -> Video' not available. (TDIP) ;-)" endcatch - '/// close application ///' Call hCloseDocument endcase testcase tiInsertChart - '/// open application ///' Call hNewDocument - '/// Insert->Chart ///' InsertChart WaitSlot (2000) Kontext "Messagebox" - if Messagebox.Exists then - Warnlog Messagebox.GetText - Messagebox.OK - sleep 1 - end if + if Messagebox.Exists then + Warnlog Messagebox.GetText + Messagebox.OK + sleep 1 + end if gMouseClick 1,1 sleep 2 - '/// close application ///' Call hCloseDocument endcase testcase tiInsertObjectOLEObjects - '/// open application ///' hNewDocument - '/// Insert->Object->OLEObjekts ///' InsertObjectOLEObject Kontext "OLEObjektEinfuegen" - ' Call Dialogtest ( OLEObjektEinfuegen ) - ' NeuErstellen.Check ' is default value - Call DialogTest (OLEObjektEinfuegen, 1) - '/// check 'Create from file' ///' - AusDateiErstellen.Check - Call DialogTest (OLEObjektEinfuegen, 2) - '/// click 'Search...' ///' - Durchsuchen.click - Kontext "OeffnenDlG" - '/// cancel file open dialog ///' - OeffnenDLG.Cancel + ' Call Dialogtest ( OLEObjektEinfuegen ) + ' NeuErstellen.Check ' is default value + Call DialogTest (OLEObjektEinfuegen, 1) + AusDateiErstellen.Check + Call DialogTest (OLEObjektEinfuegen, 2) + Durchsuchen.click + Kontext "OeffnenDlG" + OeffnenDLG.Cancel Kontext "OLEObjektEinfuegen" - '/// cancel dialog 'insert OLE Object' ///' - OLEObjektEinfuegen.Cancel - sleep 1 - '/// close application ///' + OLEObjektEinfuegen.Cancel + sleep 1 Call hCloseDocument endcase testcase tiInsertSpreadsheet if gtSYSName = "Linux" then printlog "Linux = wont test tiInsertSpreadsheet" - goto endsub -endif + goto endsub + endif -'/// open application ///' Call hNewDocument WaitSlot (2000) - '/// Insert->Spreadsheet ///' InsertSpreadsheetDraw WaitSlot (2000) Kontext "Messagebox" - if Messagebox.Exists (5) then - Warnlog Messagebox.GetText - Messagebox.OK - end if - sleep 2 - '/// click somewhere out of the object, to deselect it ///' - gMouseClick 1,1 - sleep 1 - '/// select and delete object with keys: ///' - hTypekeys "" - sleep 2 - '/// close application ///' + if Messagebox.Exists (5) then + Warnlog Messagebox.GetText + Messagebox.OK + end if + sleep 2 + gMouseClick 1,1 + sleep 1 + hTypekeys "" + sleep 2 Call hCloseDocument endcase testcase tiInsertFormula - '/// open application ///' Call hNewDocument - '/// Insert->Object->Formula ///' InsertObjectFormulaDraw WaitSlot (2000) Kontext "Messagebox" - if Messagebox.Exists then - Warnlog Messagebox.GetText - Messagebox.OK - sleep 1 - end if - '/// click somewhere out of the object, to deselect it ///' - gMouseClick 1,1 + if Messagebox.Exists then + Warnlog Messagebox.GetText + Messagebox.OK sleep 1 - '/// select and delete object with keys: ///' - hTypekeys "" - '/// close application ///' + end if + gMouseClick 1,1 + sleep 1 + hTypekeys "" Call hCloseDocument endcase testcase tiInsertFloatingFrame - '/// open application ///' Call hNewDocument - '/// Insert->Floating Frame ///' InsertFloatingFrame WaitSlot (2000) Kontext "TabEigenschaften" - Dialogtest (TabEigenschaften) - '/// click '...' ///' - Oeffnen.Click - Kontext "OeffnenDlg" - sleep 1 - '/// cancel file open dialog ///' - OeffnenDlg.Cancel + Dialogtest (TabEigenschaften) + Oeffnen.Click + Kontext "OeffnenDlg" + sleep 1 + OeffnenDlg.Cancel Kontext "TabEigenschaften" - '/// cancel dialog 'Floating Frame Properties' ///' - TabEigenschaften.Cancel - '/// close application ///' + TabEigenschaften.Cancel Call hCloseDocument endcase testcase tiInsertFile - '/// open application ///' Call hNewDocument WaitSlot (1000) - '/// Insert->File ///' InsertFileDraw WaitSlot (1000) Kontext "OeffnenDLG" - ' Call Dialogtest ( OeffnenDLG ) - '/// cancel file open dialog ///' - OeffnenDLG.Cancel - '/// close application ///' + ' Call Dialogtest ( OeffnenDLG ) + OeffnenDLG.Cancel Call hCloseDocument endcase testcase tiInsertPlugin - '/// open application ///' call hNewDocument - '/// Insert->Object->PlugIn ///' InsertObjectPlugIn Kontext "PluginEinfuegen" - if PluginEinfuegen.exists (5) then - call Dialogtest (PluginEinfuegen) - '/// click 'browse' ///' - Durchsuchen.Click + if PluginEinfuegen.exists (5) then + call Dialogtest (PluginEinfuegen) + Durchsuchen.Click + sleep 1 + Kontext "Messagebox" + if Messagebox.Exists (5) Then + Warnlog Messagebox.GetText + Messagebox.OK + else + printlog "No Messagebox :-)" + end if + Kontext "OeffnenDlG" + if OeffnenDlG.exists (5) then sleep 1 - Kontext "Messagebox" - if Messagebox.Exists (5) Then - Warnlog Messagebox.GetText - Messagebox.OK - else - printlog "No Messagebox :-)" - end if - Kontext "OeffnenDlG" - if OeffnenDlG.exists (5) then - sleep 1 - '/// cancel file open dialog ///' - OeffnenDLG.Cancel - end if - Kontext "PluginEinfuegen" - '/// cancel dialog 'Insert Plug-in' ///' + OeffnenDLG.Cancel + end if + Kontext "PluginEinfuegen" if PluginEinfuegen.exists (5) then PluginEinfuegen.Cancel else warnlog "Insert Plugin does not work :-(" end if - '/// close application ///' - Call hCloseDocument + Call hCloseDocument endcase testcase tiInsertScan goto endsub - '/// DISABLED because not able to make automatic :-( ///' - '/// open application ///' Call hNewDocument - '/// Insert->Scan->Request ///' InsertScanRequest ' as long as there is no scanner available, nothing happens WaitSlot (1000) - '/// Insert->Scan->SelectSource ///' InsertScanSelectSource WaitSlot (1000) printlog "Not testable, not translatable, just callable, because of systemdialog :-(" - '/// close application ///' Call hCloseDocument endcase testcase tiInsertSnappointLine - '/// open application ///' Call hNewDocument - '/// DRAW : Insert->Snap Point/Line ///' - '/// + IMPRESS: available via Kontext menu: Insert->Snap Point/Line ///' InsertSnapPointLine Kontext "NeuesFangobjekt" - DialogTest ( NeuesFangobjekt ) - '/// Cancel dialog 'New Snap Object' ///' - NeuesFangobjekt.Cancel - sleep 2 - '/// close application ///' + DialogTest ( NeuesFangobjekt ) + NeuesFangobjekt.Cancel + sleep 2 Call hCloseDocument endcase testcase tdInsertLayer - '/// open application ///' Call hNewDocument WaitSlot (1000) - '/// View->Layer ///' ViewLayer - '/// Insert->Layer ///' InsertLayer Kontext "EbeneEinfuegenDlg" - DialogTest ( EbeneEinfuegenDlg ) - '/// cancel dialog 'Insert Layer' ///' - EbeneEinfuegenDlg.Cancel - '/// close application ///' + DialogTest ( EbeneEinfuegenDlg ) + EbeneEinfuegenDlg.Cancel Call hCloseDocument endcase diff --git a/testautomation/graphics/optional/includes/global/id_005.inc b/testautomation/graphics/optional/includes/global/id_005.inc index cbc49ca9ea23..f40f7ac80d18 100755 --- a/testautomation/graphics/optional/includes/global/id_005.inc +++ b/testautomation/graphics/optional/includes/global/id_005.inc @@ -1,7 +1,7 @@ 'encoding UTF-8 Do not remove or change this line! '************************************************************************** '* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. -'* +'* '* Copyright 2008 by Sun Microsystems, Inc. '* '* OpenOffice.org - a multi-platform office productivity suite @@ -59,768 +59,586 @@ testcase tiFormatDefault - '/// open application ///' Call hNewDocument - '/// create rectangle ///' gMouseClick 50,50 Call hRechteckErstellen ( 10, 10, 20, 40 ) - '/// Format->Default ///' FormatStandardDraw - '/// close application ///' Call hCloseDocument endcase testcase tiFormatLine - '/// open application ///' hNewDocument - '/// create rectangle ///' gMouseClick 50,50 Call hRechteckErstellen ( 10, 10, 20, 40 ) - '/// Format->Line ///' FormatLine - '/// switch to tabpage 'Line' ///' Kontext Messagebox.SetPage TabLinie kontext "TabLinie" Call DialogTest ( TabLinie ) - '/// switch to tabpage 'Line Styles' ///' Kontext Messagebox.SetPage TabLinienstile kontext "TabLinienstile" Call DialogTest ( TabLinienstile ) - '/// click 'add...' ///' Hinzufuegen.click Kontext "NameDLG" - Call DialogTest ( NameDlg ) - '/// cancel dialog 'name' ///' - NameDlg.Cancel + Call DialogTest ( NameDlg ) + NameDlg.Cancel kontext "TabLinienstile" - '/// click 'modify...' ///' - Aendern.Click - Kontext "NameDlg" - Call DialogTest ( NameDlg ) - '/// cancel dialog 'name' ///' - NameDlg.Cancel + Aendern.Click + Kontext "NameDlg" + Call DialogTest ( NameDlg ) + NameDlg.Cancel kontext "TabLinienstile" - '/// click 'delete...' ///' - Loeschen.Click - '/// say NO to messagebox ///' - Kontext "Messagebox" - Messagebox.no + Loeschen.Click + Kontext "Messagebox" + Messagebox.no kontext "TabLinienstile" - '/// click 'load line styles' ///' - Oeffnen.click - Kontext "OeffnenDLG" - call Dialogtest (OeffnenDLG) - '/// cancel dialog 'open' ///' - OeffnenDLG.Cancel + Oeffnen.click + Kontext "OeffnenDLG" + call Dialogtest (OeffnenDLG) + OeffnenDLG.Cancel kontext "TabLinienstile" - '/// click 'save line styles' ///' - Speichern.click - Kontext "SpeichernDLG" - call Dialogtest (SpeichernDLG) - '/// cancel dialog 'save' ///' - SpeichernDLG.Cancel - '/// switch to tabpage 'Arrow Styles' ///' - Kontext - Messagebox.SetPage TabLinienenden - kontext "TabLinienenden" - Call DialogTest ( TabLinienenden ) - '/// click 'add...' ///' - Hinzufuegen.Click - Kontext "NameDLG" - Call DialogTest ( NameDlg ) - '/// cancel dialog 'name' ///' - NameDlg.Cancel - - kontext "TabLinienenden" - '/// click 'modify...' ///' - Aendern.Click - Kontext "Messagebox" - try - '/// say OK to messagebox ///' - Messagebox.OK - catch - 'print "TabLinienenden" - endcatch - - kontext "NameDlg" - Call DialogTest ( NameDlg ) - '/// cancel dialog 'name' ///' - NameDlg.Cancel + Speichern.click + Kontext "SpeichernDLG" + call Dialogtest (SpeichernDLG) + SpeichernDLG.Cancel + Kontext + Messagebox.SetPage TabLinienenden + kontext "TabLinienenden" + Call DialogTest ( TabLinienenden ) + Hinzufuegen.Click + Kontext "NameDLG" + Call DialogTest ( NameDlg ) + NameDlg.Cancel kontext "TabLinienenden" - '/// click 'delete...' ///' - Loeschen.Click - Kontext "Messagebox" - '/// say NO to messagebox ///' - Messagebox.no + Aendern.Click + Kontext "Messagebox" + try + Messagebox.OK + catch + 'print "TabLinienenden" + endcatch + + kontext "NameDlg" + Call DialogTest ( NameDlg ) + NameDlg.Cancel + + kontext "TabLinienenden" + Loeschen.Click + Kontext "Messagebox" + Messagebox.no kontext "TabLinienenden" - '/// click 'load arrow styles' ///' - Oeffnen.click - Kontext "OeffnenDLG" - call Dialogtest (OeffnenDLG) - '/// cancel dialog 'open' ///' - OeffnenDLG.Cancel - kontext "TabLinienenden" - '/// click 'save arrow styles' ///' - Speichern.click - Kontext "SpeichernDLG" - call Dialogtest (SpeichernDLG) - '/// cancel dialog 'save' ///' - SpeichernDlg.Cancel - kontext "TabLinienenden" - '/// cancel dialog 'line' ///' - TabLinienenden.cancel - '/// close application ///' + Oeffnen.click + Kontext "OeffnenDLG" + call Dialogtest (OeffnenDLG) + OeffnenDLG.Cancel + kontext "TabLinienenden" + Speichern.click + Kontext "SpeichernDLG" + call Dialogtest (SpeichernDLG) + SpeichernDlg.Cancel + kontext "TabLinienenden" + TabLinienenden.cancel Call hCloseDocument endcase testcase tdFormatArea - '/// open application ///' Call hNewDocument - '/// create rectangle ///' gMouseClick 50,50 Call hRechteckErstellen (15,15,65,65) gMouseClick 30,30 - '/// Format->Area ///' FormatArea WaitSlot (1000) Kontext - '/// switch to tabpage 'Area' ///' Messagebox.SetPage TabArea Kontext "TabArea" - Call DialogTest ( TabArea ) - Kontext - '/// switch to tabpage 'Shadow' ///' - Messagebox.SetPage TabSchatten + Call DialogTest ( TabArea ) + Kontext + Messagebox.SetPage TabSchatten kontext "TabSchatten" - Anzeigen.Check - Call DialogTest ( TabSchatten ) - '/// switch to tabpage 'Transparency' ///' + Anzeigen.Check + Call DialogTest ( TabSchatten ) Kontext - '/// switch to tabpage 'Colors' ///' Messagebox.SetPage TabFarben kontext "TabFarben" - '/// select the 1st 'color' in the listbox ///' - Farbe.select 1 - '/// select the 1st 'color model' in the listbox ///' - Farbmodell.Select 1 - Call DialogTest ( TabFarben,1 ) - '/// select the 2nd 'color model' in the listbox ///' - Farbmodell.Select 2 - Call DialogTest ( TabFarben,2 ) - - '/// click button 'Add' ///' - Hinzufuegen.click - Kontext "Messagebox" - '/// say OK to the messagebox: the name already exists ///' - Messagebox.OK - kontext "NameDlg" - Call DialogTest ( NameDlg ) - '/// cancel dialog 'Name' ///' - NameDlg.Cancel + Farbe.select 1 + Farbmodell.Select 1 + Call DialogTest ( TabFarben,1 ) + Farbmodell.Select 2 + Call DialogTest ( TabFarben,2 ) + + Hinzufuegen.click + Kontext "Messagebox" + Messagebox.OK + kontext "NameDlg" + Call DialogTest ( NameDlg ) + NameDlg.Cancel kontext "TabFarben" - '/// click button 'Delete' ///' - Loeschen.click + Loeschen.click Kontext "Messagebox" - '/// say NO to the messagebox: realy delete? ///' - Messagebox.no + Messagebox.no kontext "TabFarben" - sleep 1 - '/// click button 'Save color List' ///' - Speichern.click - Kontext "SpeichernDLG" - call Dialogtest (SpeichernDLG) - '/// cancel dialog 'save as' ///' - SpeichernDlg.Cancel - sleep 1 + sleep 1 + Speichern.click + Kontext "SpeichernDLG" + call Dialogtest (SpeichernDLG) + SpeichernDlg.Cancel + sleep 1 kontext "TabFarben" - '/// click button 'Load color List' ///' - Oeffnen.click - Kontext "OeffnenDLG" - call Dialogtest (OeffnenDLG) - '/// cancel dialog 'open' ///' - OeffnenDLG.Cancel + Oeffnen.click + Kontext "OeffnenDLG" + call Dialogtest (OeffnenDLG) + OeffnenDLG.Cancel Kontext "TabFarben" Kontext - '/// switch to tabpage 'Gradients' ///' Messagebox.SetPage TabFarbverlaeufe kontext "TabFarbverlaeufe" - Call DialogTest ( TabFarbverlaeufe ) + Call DialogTest ( TabFarbverlaeufe ) - '/// click button 'Add' ///' - Hinzufuegen.click - Kontext "NameDlg" - Call DialogTest ( NameDlg ) - '/// cancel dialog 'Name' ///' - NameDlg.Cancel + Hinzufuegen.click + Kontext "NameDlg" + Call DialogTest ( NameDlg ) + NameDlg.Cancel - kontext "TabFarbverlaeufe" - '/// click button 'Mofify' ///' - Aendern.Click - Kontext "NameDlg" - Call DialogTest ( NameDlg ) - '/// cancel dialog 'Name' ///' - NameDlg.Cancel + kontext "TabFarbverlaeufe" + Aendern.Click + Kontext "NameDlg" + Call DialogTest ( NameDlg ) + NameDlg.Cancel kontext "TabFarbverlaeufe" - '/// click button 'Delete' ///' loeschen.click try kontext "Messagebox" - '/// say NO to the messagebox: realy delete? ///' Messagebox.no catch warnlog "nobody cares about deleting a gradient :-(" endcatch kontext "TabFarbverlaeufe" - '/// click button 'Load gradients List' ///' - Oeffnen.click - Kontext "OeffnenDLG" - call Dialogtest (OeffnenDLG) - '/// cancel dialog 'open' ///' - OeffnenDLG.Cancel - kontext "TabFarbverlaeufe" - '/// click button 'Save gradients List' ///' - Speichern.click - Kontext "SpeichernDLG" - call Dialogtest (SpeichernDLG) - '/// cancel dialog 'save as' ///' - SpeichernDLG.Cancel + Oeffnen.click + Kontext "OeffnenDLG" + call Dialogtest (OeffnenDLG) + OeffnenDLG.Cancel + kontext "TabFarbverlaeufe" + Speichern.click + Kontext "SpeichernDLG" + call Dialogtest (SpeichernDLG) + SpeichernDLG.Cancel Kontext - '/// switch to tabpage 'Hatching' - ;-) ///' Messagebox.SetPage TabSchraffuren - kontext "TabSchraffuren" - Call DialogTest ( TabSchraffuren) + kontext "TabSchraffuren" + Call DialogTest ( TabSchraffuren) - '/// click button 'Add' ///' - Hinzufuegen.click - Kontext "NameDlg" - Call DialogTest ( NameDlg ) - '/// cancel dialog 'Name' ///' - NameDlg.Cancel + Hinzufuegen.click + Kontext "NameDlg" + Call DialogTest ( NameDlg ) + NameDlg.Cancel kontext "TabSchraffuren" - '/// click button 'Modify' ///' Aendern.Click Kontext "NameDlg" - Call DialogTest ( NameDlg ) - '/// cancel dialog 'Name' ///' - NameDlg.Cancel + Call DialogTest ( NameDlg ) + NameDlg.Cancel kontext "TabSchraffuren" - '/// click button 'Delete' ///' - Loeschen.click - kontext "Messagebox" - '/// say NO to the messagebox: realy delete? ///' - Messagebox.no + Loeschen.click + kontext "Messagebox" + Messagebox.no kontext "TabSchraffuren" - '/// click button 'Load hatches List' ///' - Oeffnen.click - Kontext "OeffnenDLG" - call Dialogtest (OeffnenDLG) - '/// cancel dialog 'open' ///' - OeffnenDLG.Cancel + Oeffnen.click + Kontext "OeffnenDLG" + call Dialogtest (OeffnenDLG) + OeffnenDLG.Cancel kontext "TabSchraffuren" - '/// click button 'Save hatches List' ///' - Speichern.click - Kontext "SpeichernDLG" - call Dialogtest (SpeichernDLG) - '/// cancel dialog 'save as' ///' - SpeichernDLG.Cancel + Speichern.click + Kontext "SpeichernDLG" + call Dialogtest (SpeichernDLG) + SpeichernDLG.Cancel Kontext - '/// switch to tabpage 'Bitmaps' ///' Messagebox.SetPage TabBitmap kontext "TabBitmap" - Call DialogTest ( TabBitmap ) - '/// click button 'Reset' ///' - zurueck.click - sleep 1 - '/// click button 'Add' ///' - hinzufuegen.click - Kontext "NameDlg" - Call DialogTest ( NameDlg ) - '/// cancel dialog 'Name' ///' - NameDlg.cancel + Call DialogTest ( TabBitmap ) + zurueck.click + sleep 1 + hinzufuegen.click + Kontext "NameDlg" + Call DialogTest ( NameDlg ) + NameDlg.cancel kontext "TabBitmap" try - '/// click button 'Modify' ///' Aendern.Click Kontext "NameDlg" - Call DialogTest ( NameDlg ) - '/// cancel dialog 'Name' ///' - NameDlg.cancel + Call DialogTest ( NameDlg ) + NameDlg.cancel catch WarnLog "Control is disabled - modify bitmap" endcatch kontext "TabBitmap" - '/// click button 'Import' ///' - Import.Click - try - Kontext "GrafikEinfuegenDlg" - Call DialogTest ( GrafikEinfuegenDlg ) - Kontext "GrafikEinfuegenDlg" - '/// cancel dialog 'Import' ///' - GrafikEinfuegenDlg.Cancel - catch - Warnlog "Insert graphic does not work" - endcatch + Import.Click + try + Kontext "GrafikEinfuegenDlg" + Call DialogTest ( GrafikEinfuegenDlg ) + Kontext "GrafikEinfuegenDlg" + GrafikEinfuegenDlg.Cancel + catch + Warnlog "Insert graphic does not work" + endcatch kontext "TabBitmap" - '/// click button 'Delete' ///' - loeschen.click - kontext "Messagebox" - '/// say NO to the messagebox: realy delete? ///' - Messagebox.no + loeschen.click + kontext "Messagebox" + Messagebox.no kontext "TabBitmap" - '/// click button 'Load Bitmap List' ///' - Oeffnen.click - Kontext "OeffnenDLG" - call Dialogtest (OeffnenDLG) - '/// cancel dialog 'open' ///' - OeffnenDLG.Cancel + Oeffnen.click + Kontext "OeffnenDLG" + call Dialogtest (OeffnenDLG) + OeffnenDLG.Cancel kontext "TabBitmap" - '/// click button 'Save Bitmap List' ///' - Speichern.click - Kontext "SpeichernDLG" - call Dialogtest (SpeichernDLG) - '/// cancel dialog 'save as' ///' - SpeichernDLG.Cancel + Speichern.click + Kontext "SpeichernDLG" + call Dialogtest (SpeichernDLG) + SpeichernDLG.Cancel kontext "TabBitmap" - '/// cancel dialog 'Area' ///' - TabBitmap.Cancel - '/// close application ///' + TabBitmap.Cancel Call hCloseDocument endcase testcase tiFormatText - '/// open application ///' Call hNewDocument - '/// Format->Text ///' FormatTextDraw Kontext - '/// switch to tabpage 'Text' ///' Messagebox.SetPage TabText Kontext "TabText" - DialogTest ( TabText ) - Kontext - '/// switch to tabpage 'Text Animation' ///' + DialogTest ( TabText ) + Kontext Messagebox.SetPage TabLauftext Kontext "TabLauftext" - DialogTest ( TabLauftext ) - '/// cancel dialog 'text' ///' - TabLauftext.Cancel - '/// close application ///' + DialogTest ( TabLauftext ) + TabLauftext.Cancel Call hCloseDocument endcase testcase tiFormatPositionAndSize - '/// open application ///' Call hNewDocument - '/// create rectangle ///' Call hRechteckErstellen ( 10, 10, 20, 40 ) - '/// Format->Position And Size ///' ContextPositionAndSize Kontext - '/// switch to tabpage 'Position' ///' Messagebox.setpage TabPositionAndSize Kontext "TabPositionAndSize" - call Dialogtest ( TabPositionAndSize ) - '/// Type two times in Position : Base Point ///' - kontext "PositionPosition" - PositionPosition.TypeKeys ("", 2) - '/// Type two times in Size : Base Point ///' - kontext "SizePosition" - SizePosition.TypeKeys ("", 2) - Kontext - '/// switch to tabpage 'Rotation' ///' + call Dialogtest ( TabPositionAndSize ) + kontext "PositionPosition" + PositionPosition.TypeKeys ("", 2) + kontext "SizePosition" + SizePosition.TypeKeys ("", 2) + Kontext Messagebox.setPage TabDrehung Kontext "TabDrehung" - call Dialogtest ( TabDrehung ) - Kontext - '/// switch to tabpage 'Slant & Corner Radius' ///' + call Dialogtest ( TabDrehung ) + Kontext Messagebox.setpage TabSchraegstellen Kontext "TabSchraegstellen" - call Dialogtest ( TabSchraegstellen ) - '/// cancel dialog 'Position and Size' ///' - TabSchraegstellen.cancel - '/// close application ///' + call Dialogtest ( TabSchraegstellen ) + TabSchraegstellen.cancel Call hCloseDocument endcase testcase tiFormatCharacter -'/// open application ///' - Call hNewDocument -'/// Format->Character ///' + Call hNewDocument FormatCharacter WaitSlot (1000) Kontext -'/// switch to tabpage 'Font' ///' - Messagebox.SetPage TabFont - kontext "TabFont" - sleep 1 - Call DialogTest ( TabFont ) - Kontext -'/// switch to tabpage 'Font Effects' ///' - Messagebox.SetPage TabFontEffects - kontext "TabFontEffects" - sleep 1 - Call DialogTest ( TabFontEffects ) - sleep 1 - Kontext -'/// switch to tabpage 'Position' ///' - Messagebox.SetPage TabFontPosition - Kontext "TabFontPosition" - sleep 1 - Call DialogTest ( TabFontPosition ) - sleep 2 -'/// cancel dialog 'Character' ///' - TabFontPosition.Cancel -'/// close application ///' - Call hCloseDocument + Messagebox.SetPage TabFont + kontext "TabFont" + sleep 1 + Call DialogTest ( TabFont ) + Kontext + Messagebox.SetPage TabFontEffects + kontext "TabFontEffects" + sleep 1 + Call DialogTest ( TabFontEffects ) + sleep 1 + Kontext + Messagebox.SetPage TabFontPosition + Kontext "TabFontPosition" + sleep 1 + Call DialogTest ( TabFontPosition ) + sleep 2 + TabFontPosition.Cancel + Call hCloseDocument endcase testcase tiFormatControlForm - '/// testcase: check if controls are available printlog "testcase: check if controls are available" - - '/// open new document + printlog "open new document" Call hNewDocument - + 'click in the document to get the focus into the document if ( UCase(gApplication) = "DRAW" ) then Kontext "DocumentDraw" - DocumentDraw.MouseDown(50,50) - DocumentDraw.MouseUp(50,50) + DocumentDraw.MouseDown(50,50) + DocumentDraw.MouseUp(50,50) else 'Impress Kontext "DocumentImpress" - DocumentImpress.MouseDown(50,50) - DocumentImpress.MouseUp(50,50) + DocumentImpress.MouseDown(50,50) + DocumentImpress.MouseUp(50,50) endif - - '/// open the form controls toolbar + printlog "open the form controls toolbar" call hToolbarSelect("FormControls",true) - - kontext "FormControls" - '/// insert a PushButton + + kontext "FormControls" printlog "insert a PushButton" Pushbutton.Click Sleep 1 gMouseMove (50, 20,70, 40) - '/// open the control properties dialog printlog "open the control properties dialog" FormatControl - + Kontext "ControlPropertiesDialog" WaitSlot (1000) - '/// close the control properties dialog printlog "close the control properties dialog" ControlPropertiesDialog.Close - - '/// open the form properties dialog + printlog "open the form properties dialog" FormatForm Kontext "ControlPropertiesDialog" WaitSlot (1000) - '/// close the form properties dialog printlog "close the form properties dialog" ControlPropertiesDialog.Close - '/// close the form control toolbar printlog "close the form control toolbar" call hToolbarSelect("FormControls",false) - '/// close application printlog "close application" Call hCloseDocument - + endcase testcase tiFormatDimensions -'/// open application ///' - Call hNewDocument -'/// Format->Dimensions ///' - FormatDimensioning - Kontext "Bemassung" - DialogTest ( Bemassung ) -'/// cancel dialog 'Dimensioning' ///' - Bemassung.Cancel -'/// close application ///' - Call hCloseDocument + Call hNewDocument + FormatDimensioning + Kontext "Bemassung" + DialogTest ( Bemassung ) + Bemassung.Cancel + Call hCloseDocument endcase testcase tiFormatConnector -'/// open application ///' - Call hNewDocument -'/// Format->Connector ///' - FormatConnector - Kontext "Verbinder" - DialogTest ( Verbinder ) -'/// cancel dialog 'Connector' ///' - Verbinder.Cancel -'/// close application ///' - Call hCloseDocument + Call hNewDocument + FormatConnector + Kontext "Verbinder" + DialogTest ( Verbinder ) + Verbinder.Cancel + Call hCloseDocument endcase testcase tiFormat3D_Effects -'/// open application ///' - Call hNewDocument -'/// Format->3D_Effects ///' + Call hNewDocument Format3D_Effects - Kontext "Drei_D_Effekte" - Call DialogTest ( Drei_D_Effekte,1 ) -'/// click button 'Geometry' ///' - Geometrie.Click - Call DialogTest ( Drei_D_Effekte,2 ) - '/// click button 'Shading' ///' - Darstellung.Click - Call DialogTest ( Drei_D_Effekte,3 ) - '/// click button 'Illumination' ///' - Beleuchtung.Click - Call DialogTest ( Drei_D_Effekte,4 ) - '/// click button 'Textures' ///' - Texturen.Click - Call DialogTest ( Drei_D_Effekte,5 ) - '/// click button 'Material' ///' - Material.Click - Call DialogTest ( Drei_D_Effekte,6 ) - Kontext "Drei_D_Effekte" - '/// close dialog '3D Effects' ///' - Drei_D_Effekte.Close - '/// close application ///' - Call hCloseDocument + Kontext "Drei_D_Effekte" + Call DialogTest ( Drei_D_Effekte,1 ) + Geometrie.Click + Call DialogTest ( Drei_D_Effekte,2 ) + Darstellung.Click + Call DialogTest ( Drei_D_Effekte,3 ) + Beleuchtung.Click + Call DialogTest ( Drei_D_Effekte,4 ) + Texturen.Click + Call DialogTest ( Drei_D_Effekte,5 ) + Material.Click + Call DialogTest ( Drei_D_Effekte,6 ) + Kontext "Drei_D_Effekte" + Drei_D_Effekte.Close + Call hCloseDocument endcase '--------------------------------------------------------------------------------------- testcase tiFormatNumberingBullets - '/// open application ///' - Call hNewDocument + Call hNewDocument WaitSlot (2000) - '/// Format->Numbering/Bullets ///' FormatNumberingBulletsDraw WaitSlot (2000) - '/// switch to tabpage 'Bullets' ///' Kontext Messagebox.SetPage TabBullet Kontext "TabBullet" Call DialogTest ( TabBullet ) Kontext - '/// switch to tabpage 'Numbering Type' ///' Messagebox.SetPage TabNumerierungsart Kontext "TabNumerierungsart" Call DialogTest ( TabNumerierungsart ) Kontext - '/// switch to tabpage 'Graphics' ///' Messagebox.SetPage TabGrafiken Kontext "TabGrafiken" Call DialogTest ( TabGrafiken ) Kontext - '/// switch to tabpage 'Position' ///' Messagebox.SetPage TabPositionNumerierung Kontext "TabPositionNumerierung" Call DialogTest ( TabPositionNumerierung ) Kontext - '/// switch to tabpage 'Customize' ///' Messagebox.SetPage TabOptionenNumerierung Kontext "TabOptionenNumerierung" Call DialogTest ( TabOptionenNumerierung ) - '/// select 7th entry from the top in the listbox 'Numbering' ///' Numerierung.Select 9 ' last one always ? -> graphics - '/// click button graphics 'select' ///' - TabOptionenNumerierung.MouseDown 50,60 - TabOptionenNumerierung.MouseUp 50,60 - Auswahl.TypeKeys "" - '/// select 'From file' ///' - hMenuSelectNr (1) - sleep 3 - '/// dialog 'link' with an grayed out & selected link checkbox ///' - Kontext "OeffnenDlg" - '/// cancel dialog 'link' ///' - OeffnenDlg.Cancel - sleep 1 - sleep 1 - Kontext - '/// switch to tabpage 'Customize' ///' - Messagebox.SetPage TabOptionenNumerierung - Kontext "TabOptionenNumerierung" - sleep 1 - try - '/// click button graphics 'select' ///' - Auswahl.TypeKeys "" - '/// select 'Gallery' ///' - hMenuSelectNr (2) - '/// select 3rd element from the top 'blusquare.gif' ///' - hMenuSelectNr (3) - Sleep 2 - catch - warnlog "couldn't do something :-) (1)" - Exceptlog - Call hMenuClose - endcatch - '/// cancel dialog 'Numbering/Bullets' ///' - TabOptionenNumerierung.Cancel - sleep 1 - '/// close application ///' - Call hCloseDocument + TabOptionenNumerierung.MouseDown 50,60 + TabOptionenNumerierung.MouseUp 50,60 + Auswahl.TypeKeys "" + hMenuSelectNr (1) + sleep 3 + Kontext "OeffnenDlg" + OeffnenDlg.Cancel + sleep 1 + sleep 1 + Kontext + Messagebox.SetPage TabOptionenNumerierung + Kontext "TabOptionenNumerierung" + sleep 1 + try + Auswahl.TypeKeys "" + hMenuSelectNr (2) + hMenuSelectNr (3) + Sleep 2 + catch + warnlog "couldn't do something :-) (1)" + Exceptlog + Call hMenuClose + endcatch + TabOptionenNumerierung.Cancel + sleep 1 + Call hCloseDocument endcase '--------------------------------------------------------------------------------------- testcase tiFormatCaseCharacter - '/// open application ///' - Call hNewDocument - '/// create textbox with text ///' - Call hTextrahmenErstellen ("testit",20,20,50,30) - sleep 1 - '/// move curser 1 time to the left ///' - hTypeKeys "" - - '/// Format->Case/Characters->Uppercase ///' + Call hNewDocument + Call hTextrahmenErstellen ("testit",20,20,50,30) + sleep 1 + hTypeKeys "" + FormatChangeCaseUpper WaitSlot (1000) - '/// Format->Case/Characters->Lowercase ///' FormatChangeCaseLower WaitSlot (2000) if bAsianLan then if not gAsianSup then qaerrorlog "This is an asian language-office, but asian support was disabled in a previous test?" end if - '/// if asian language (81/82/86/88): ///' try - '///+ Format->Case/Characters->Half-width ///' FormatChangeCaseHalfWidth catch Warnlog "Format / Change Case / Half Width does not work." endcatch WaitSlot (1000) try - '///+ Format->Case/Characters->Full-width ///' FormatChangeCaseFullWidth catch Warnlog "Format / Change Case / Full Width does not work!" endcatch sleep 1 try - '///+ Format->Case/Characters->Hiragana ///' FormatChangeCaseHiragana catch Warnlog "Format / Change Case / Hiragana does not work." endcatch sleep 1 try - '///+ Format->Case/Characters->Katatana ///' FormatChangeCaseKatagana catch Warnlog "Format / Change Case / Katagana does not work." endcatch end if - '/// close application ///' - Call hCloseDocument + Call hCloseDocument endcase '--------------------------------------------------------------------------------------- testcase tiFormatParagraph - '/// open application ///' - Call hNewDocument - '/// Format->Paragraph ///' - FormatParagraph - Kontext - '/// switch to tabpage 'Indents & Spacing' ///' - Messagebox.SetPage TabEinzuegeUndAbstaende - kontext "TabEinzuegeUndAbstaende" - Call DialogTest ( TabEinzuegeUndAbstaende ) - Kontext - '/// switch to tabpage 'Alignment' ///' - Messagebox.SetPage TabAusrichtungAbsatz - Kontext "TabAusrichtungAbsatz" - Call DialogTest ( TabAusrichtungAbsatz ) - Kontext - '/// switch to tabpage 'Tabs' ///' - Messagebox.SetPage TabTabulator - kontext "TabTabulator" - Call DialogTest ( TabTabulator ) - '/// cancel dialog 'Paragraph' ///' - TabTabulator.Cancel - '/// close application ///' - Call hCloseDocument + Call hNewDocument + FormatParagraph + Kontext + Messagebox.SetPage TabEinzuegeUndAbstaende + kontext "TabEinzuegeUndAbstaende" + Call DialogTest ( TabEinzuegeUndAbstaende ) + Kontext + Messagebox.SetPage TabAusrichtungAbsatz + Kontext "TabAusrichtungAbsatz" + Call DialogTest ( TabAusrichtungAbsatz ) + Kontext + Messagebox.SetPage TabTabulator + kontext "TabTabulator" + Call DialogTest ( TabTabulator ) + TabTabulator.Cancel + Call hCloseDocument endcase '--------------------------------------------------------------------------------------- testcase tiFormatPage - '/// open application ///' - Call hNewDocument - '/// Format->Page ///' - FormatSlideDraw - kontext - if Messagebox.exists (5) then - '/// switch to tabpage 'Page' ///' - Messagebox.SetPage TabSeite - Kontext "TabSeite" - if TabSeite.exists (5) then - Call Dialogtest (TabSeite) - else - warnlog "nope :-(1" - endif - sleep 1 - kontext - '/// switch to tabpage 'Background' ///' - Messagebox.SetPage TabArea - sleep 1 - kontext - if messagebox.GetRT = 304 then - printlog "active about pagesize != printersettings, will say NO: " + Messagebox.GetText - try - Messagebox.No - catch - warnlog messagebox.getText - Messagebox.ok ' should be Error loading BASIC of document ##? - kontext - if messagebox.GetRT = 304 then - try - warnlog messagebox.getText - Messagebox.ok - catch - printlog "not expected state." - endcatch - endif - endcatch - endif - sleep 1 - kontext - Messagebox.SetPage TabArea - Kontext "TabArea" - if TabArea.exists (5) then - Call Dialogtest (TabArea) - endif - sleep 1 - '/// cancel dialog 'Page Setup' ///' - TabArea.Cancel - else - warnlog "FormatPage doesn't come up with dialog :-(" - endif - '/// close application ///' - Call hCloseDocument + Call hNewDocument + FormatSlideDraw + kontext + if Messagebox.exists (5) then + Messagebox.SetPage TabSeite + Kontext "TabSeite" + if TabSeite.exists (5) then + Call Dialogtest (TabSeite) + else + warnlog "nope :-(1" + endif + sleep 1 + kontext + Messagebox.SetPage TabArea + sleep 1 + kontext + if messagebox.GetRT = 304 then + printlog "active about pagesize != printersettings, will say NO: " + Messagebox.GetText + try + Messagebox.No + catch + warnlog messagebox.getText + Messagebox.ok ' should be Error loading BASIC of document ##? + kontext + if messagebox.GetRT = 304 then + try + warnlog messagebox.getText + Messagebox.ok + catch + printlog "not expected state." + endcatch + endif + endcatch + endif + sleep 1 + kontext + Messagebox.SetPage TabArea + Kontext "TabArea" + if TabArea.exists (5) then + Call Dialogtest (TabArea) + endif + sleep 1 + TabArea.Cancel + else + warnlog "FormatPage doesn't come up with dialog :-(" + endif + Call hCloseDocument endcase '--------------------------------------------------------------------------------------- @@ -831,9 +649,7 @@ testcase tiFormatStylesAndFormatting dim i as integer dim abctemp - '/// Open Application ///' Call hNewDocument - '/// Create a Textframe with content ///' sleep 5 hTextrahmenErstellen ("I love Wednesdays...",20,20,80,40) @@ -841,7 +657,7 @@ testcase tiFormatStylesAndFormatting printlog "Checking if TextObjectBar is up" Kontext "TextObjectbar" if TextObjectbar.Exists Then - printlog "TextObjectbar.Exists = " + TextObjectbar.Exists + printlog "TextObjectbar.Exists = " + TextObjectbar.Exists else ViewToolbarsTextFormatting endif @@ -849,23 +665,21 @@ testcase tiFormatStylesAndFormatting WaitSlot (1000) Kontext "Stylist" if (Stylist.NotExists) then - qaErrorLog "There is no stylist open, trying again now" - FormatStylist + qaErrorLog "There is no stylist open, trying again now" + FormatStylist end if WaitSlot (1000) Vorlagenliste.TypeKeys "" Vorlagenliste.TypeKeys "" Vorlagenliste.TypeKeys "" sleep 1 - '/// open context menu, select first entry from top: 'New' ///' Vorlagenliste.OpenContextMenu sleep 1 hMenuSelectNr (1) sleep 1 - + Kontext if Messagebox.exists (5) then - '/// switch to tabpage Organizer ///' try Messagebox.SetPage TabVerwalten Kontext "TabVerwalten" @@ -874,7 +688,6 @@ testcase tiFormatStylesAndFormatting sTemp = VorlagenName.getText VerknuepftMit.getSelText Bereich.getSelText - '/// close dialog 'Graphics Styles' ///' TabVerwalten.OK catch warnlog "Under Gnome we have a focus problem here." @@ -890,41 +703,37 @@ testcase tiFormatStylesAndFormatting sleep 1 Kontext if Messagebox.exists (5) then - '/// switch to tabpage Organizer ///' try Messagebox.SetPage TabVerwalten Kontext "TabVerwalten" VorlagenName.setText("2Test") - '/// close dialog 'Graphics Styles' ///' TabVerwalten.OK catch warnlog "Under Gnome we have a focus problem here." endcatch end if - + sleep 3 Kontext "Stylist" - '/// Delete the style we created. ///' Vorlagenliste.TypeKeys "" 'to go to the style we've created ourselves. sleep 1 try - Vorlagenliste.TypeKeys "" 'To delete the style. - Kontext "Active" 'do you really wish to delete? - Active.YES - sleep 2 + Vorlagenliste.TypeKeys "" 'To delete the style. + Kontext "Active" 'do you really wish to delete? + Active.YES + sleep 2 catch - Warnlog "Couldnt delete the new Style, or maybe wrong position?" + Warnlog "Couldnt delete the new Style, or maybe wrong position?" endcatch Kontext "Stylist" if (Stylist.NotExists) then - ErrorLog "There was no Stylist open, should be." + ErrorLog "There was no Stylist open, should be." else - '/// Close Stylist ///' - hTypekeys "" - Kontext "Stylist" - if (Stylist.Exists) then - ErrorLog "The Stylist should be closed now." - endif + hTypekeys "" + Kontext "Stylist" + if (Stylist.Exists) then + ErrorLog "The Stylist should be closed now." + endif endif Call hCloseDocument endcase @@ -932,94 +741,70 @@ endcase '--------------------------------------------------------------------------------------- testcase tiFormatFontwork -'/// open application ///' - Call hNewDocument -'/// create a textframe with text ///' - Call hTextrahmenErstellen ("Flightplanning via www.aua.com is hard!",20,20,50,30) - sleep 1 -'/// Format->Fontwork ///' - FormatFontwork - Kontext "FontWork" - if FontWork.exists (5) then - DialogTest ( FontWork ) - sleep 1 - '/// close dialog 'Fontwork' ///' - FontWork.Close - else - warnlog "FontWork didn't came up :-(" - endif -'/// close application ///' - Call hCloseDocument + Call hNewDocument + Call hTextrahmenErstellen ("Flightplanning via www.aua.com is hard!",20,20,50,30) + sleep 1 + FormatFontwork + Kontext "FontWork" + if FontWork.exists (5) then + DialogTest ( FontWork ) + sleep 1 + FontWork.Close + else + warnlog "FontWork didn't came up :-(" + endif + Call hCloseDocument endcase '--------------------------------------------------------------------------------------- testcase tiFormatGroup -'/// open application ///' - Call hNewDocument -'/// create 2 rectangles ///' - hRechteckErstellen ( 10, 10, 20, 20 ) - hRechteckErstellen ( 30, 30, 40, 40 ) -'/// select both objects with keys [strg]+[a] ///' - EditSelectAll -'/// DRAW: in Modify menu ///' -'///+ Impress in Format menu ///' -'///+ Format->Group / Modify->Group ///' - FormatGroupDraw + Call hNewDocument + hRechteckErstellen ( 10, 10, 20, 20 ) + hRechteckErstellen ( 30, 30, 40, 40 ) + EditSelectAll + FormatGroupDraw WaitSlot (1000) -'/// Format->Edit Group / Modify->Enter Group ///' - FormatEditGroupDraw + FormatEditGroupDraw WaitSlot (1000) -'/// Format->Exit Group / Modify->Exit Group ///' - FormatExitGroupDraw + FormatExitGroupDraw WaitSlot (1000) -'/// Format->Ungroup Group / Modify->Ungroup Group ///' - FormatUngroupDraw + FormatUngroupDraw WaitSlot (1000) -'/// close application ///' - Call hCloseDocument + Call hCloseDocument endcase '--------------------------------------------------------------------------------------- testcase tiFormatStylesSlideDesign -' create recktanglr; click outside ? -'/// open application ///' - Call hNewDocument + ' create recktanglr; click outside ? + Call hNewDocument WaitSlot (3000) -'/// Format->Styles->Slide Design ///' - FormatModifyLayout ' is OK : Format->Styles->Slide Design; 27064; SID_PRESENTATION_LAYOUT + FormatModifyLayout ' is OK : Format->Styles->Slide Design; 27064; SID_PRESENTATION_LAYOUT WaitSlot (1000) - Kontext "Seitenvorlage" - Call DialogTest ( Seitenvorlage ) -'/// check the checkboxes: ExchangeBackgroundPages and DeleteUnusedBackgrounds ///' - HintergrundseiteAustauschen.check - DeleteUnusedBackgrounds.check -'/// click button 'Load...' ///' - Laden.Click - kontext "Neu" -'/// click button 'more' ///' - Zusaetze.click - sleep 1 - kontext "Neu" -'/// check checkbox 'Preview' ///' - try - Vorschau.check + Kontext "Seitenvorlage" + Call DialogTest ( Seitenvorlage ) + HintergrundseiteAustauschen.check + DeleteUnusedBackgrounds.check + Laden.Click + kontext "Neu" + Zusaetze.click + sleep 1 + kontext "Neu" + try + Vorschau.check catch - printlog "Preview wasn't checkable :-( hopfully now:" - Zusaetze.click - sleep 1 - Vorschau.check - printlog "... OK :-)" + printlog "Preview wasn't checkable :-( hopfully now:" + Zusaetze.click + sleep 1 + Vorschau.check + printlog "... OK :-)" endcatch -'/// cancel dialog 'Load Slide Design' ///' - Neu.cancel - Kontext "Seitenvorlage" -'/// cancel dialog 'Slide Design' ///' - Seitenvorlage.Cancel + Neu.cancel + Kontext "Seitenvorlage" + Seitenvorlage.Cancel sleep 2 -'/// close application ///' - Call hCloseDocument + Call hCloseDocument endcase '--------------------------------------------------------------------------------------- diff --git a/testautomation/graphics/optional/includes/global/id_006.inc b/testautomation/graphics/optional/includes/global/id_006.inc index 31ca3e0dce43..fb774c22acb2 100755 --- a/testautomation/graphics/optional/includes/global/id_006.inc +++ b/testautomation/graphics/optional/includes/global/id_006.inc @@ -1,7 +1,7 @@ 'encoding UTF-8 Do not remove or change this line! '************************************************************************** '* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. -'* +'* '* Copyright 2008 by Sun Microsystems, Inc. '* '* OpenOffice.org - a multi-platform office productivity suite @@ -52,42 +52,35 @@ testcase tiToolsSpellchecking if not gOOO then ' Spellcheck doesn't work in OOo builds. - '/// open application ///' - Call hNewDocument - WaitSlot (2000) 'sleep 2 - '/// call subroutine 'hSetSpellHypLanguage' for setting the default language in th eoptions, to enable it for languages, which don't provide a dictionary (usually asian ones) ///' - call hSetSpellHypLanguage - '/// create textframe with content ///' - Call hTextrahmenErstellen ("Whaaaat", 10, 10, 30, 40) - sleep 1 - '/// Tools->Spellcheck->Check ///' - ToolsSpellCheck - WaitSlot (1000) 'sleep 1 - Kontext "MessageBox" - if MessageBox.exists(2) then - qaerrorlog "Messagebox : " + MessageBox.gettext() + " appear." - qaerrorlog "Maybe no spellchecking for this languages is available." - MessageBox.OK - else - Kontext "Rechtschreibung" - if Rechtschreibung.exists then - Call DialogTest ( Rechtschreibung ) - '/// close dialog 'Spellcheck' ///' - Rechtschreibung.Close - else - warnlog " Spellcheck dialog didn't came up :-(" - end if - end if - sleep 1 - '/// say OK to messagebox about 'Spellcheck has been completed' ///' - Kontext "Messagebox" - if Messagebox.exists (5) then - warnlog "Shouldn't be any messagebox after pressing close in spellchecker" - Messagebox.OK - sleep (2) - Kontext - end if - '/// close application ///' + Call hNewDocument + WaitSlot (2000) 'sleep 2 + call hSetSpellHypLanguage + Call hTextrahmenErstellen ("Whaaaat", 10, 10, 30, 40) + sleep 1 + ToolsSpellCheck + WaitSlot (1000) 'sleep 1 + Kontext "MessageBox" + if MessageBox.exists(2) then + qaerrorlog "Messagebox : " + MessageBox.gettext() + " appear." + qaerrorlog "Maybe no spellchecking for this languages is available." + MessageBox.OK + else + Kontext "Rechtschreibung" + if Rechtschreibung.exists then + Call DialogTest ( Rechtschreibung ) + Rechtschreibung.Close + else + warnlog " Spellcheck dialog didn't came up :-(" + end if + end if + sleep 1 + Kontext "Messagebox" + if Messagebox.exists (5) then + warnlog "Shouldn't be any messagebox after pressing close in spellchecker" + Messagebox.OK + sleep (2) + Kontext + end if Call hCloseDocument else goto endsub endif @@ -96,16 +89,11 @@ endcase '-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- testcase tiToolsSpellcheckingAutomatic - '/// open application ///' Call hNewDocument - '/// Tools->Spellcheck->AutoSpellcheck ///' ToolsSpellcheckAutoSpellcheck - '/// create textframe with text ///' Call hTextrahmenErstellen ("What", 10, 10, 30, 40) sleep 2 - '/// Tools->Spellcheck->AutoSpellcheck ///' ToolsSpellcheckAutoSpellcheck - '/// close application ///' Call hCloseDocument endcase @@ -115,10 +103,8 @@ testcase tiToolsThesaurus if not gOOO then ' Thesaurus doesn't work in OOo builds. dim sFileName as String - - '/// call subroutine 'hSetSpellHypLanguage' for setting the default language in the options, to enable it for languages, which don't provide a dictionary (usually asian ones) ///' + call hSetSpellHypLanguage - '/// open application-specific document which contains an American-formatted textframe with text. And select the text ///' if (gApplication = "IMPRESS") then sFileName = (ConvertPath (gTesttoolPath + "graphics\required\input\engtext.odp")) else @@ -130,40 +116,33 @@ testcase tiToolsThesaurus end if Call hFileOpen (sFileName) sleep (2) - + hTypeKeys "" hTypeKeys "" - + ' Call hTextrahmenErstellen ("SimpleTest" + "", 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 + Call DialogTest ( Thesaurus ) + Sprache.Click + Kontext "SpracheAuswaehlen" + Call DialogTest ( SpracheAuswaehlen ) + SpracheAuswaehlen.cancel + Kontext "Thesaurus" + Nachschlagen.Click + kontext + if Messagebox.exists (5) then + printlog "Messagebox: word not in thesaurus: '"+Messagebox.gettext+"'" + Messagebox.ok + end if + sleep 1 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 + Thesaurus.Cancel catch warnlog "Thesaurus didn't work :-(" endcatch sleep 1 - '/// close application ///' Call hCloseDocument else goto endsub endif @@ -172,126 +151,83 @@ endcase '-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- testcase tiToolsHyphenation - '/// open application ///' Call hNewDocument - '/// Tools->Hyphenation ///' ExtrasSilbentrennungDraw WaitSlot (2000) 'sleep 2 - '/// Tools->Hyphenation ///' ExtrasSilbentrennungDraw - '/// close application ///' Call hCloseDocument endcase testcase tiToolsAutoCorrect dim iLanguage as integer ' for resetting the language - '/// open application ///' Call hNewDocument WaitSlot (1000) 'sleep 1 - '/// Tools->Autocorrect ///' ToolsAutocorrect WaitSlot (2000) 'sleep 1 Kontext - '/// select tabpage 'Replace' ///' Messagebox.SetPage TabErsetzung Kontext "TabErsetzung" - Call DialogTest ( TabErsetzung ) - '/// remember the language, that is selected in the 'Replacements and exceptions for Language' Listbox ///' - iLanguage = WelcheSprache.GetSelIndex - '///+ change the language to the 1st from the top ///' - WelcheSprache.Select 1 ' select language with empty list - '///+ type something into the field 'replace' ///' - Kuerzel.SetText "a" - '///+ type something into the field 'with' ///' - ErsetzenDurch.SetText "b" - '///+ click button 'new' ///' - Neu.Click - sleep 1 - '///+ click button 'delete' ///' + Call DialogTest ( TabErsetzung ) + iLanguage = WelcheSprache.GetSelIndex + WelcheSprache.Select 1 ' select language with empty list + Kuerzel.SetText "a" + ErsetzenDurch.SetText "b" + Neu.Click + sleep 1 + Loeschen.Click + sleep 1 + try Loeschen.Click - sleep 1 - try - '///+ click button 'delete' again ///' - Loeschen.Click - catch - printlog "ok was CRASH before" '# - endcatch - '///+ if nothing happens it is ok, was a Crash before :-( ///' - '///+ restore cthe remembered language ///' - WelcheSprache.select (iLanguage) - Kontext - '/// select tabpage 'Exception' ///' - Messagebox.SetPage TabAusnahmen - Kontext "TabAusnahmen" - Call DialogTest ( TabAusnahmen ) - '/// type something into the field 'Abbreviations' ///' - Abkuerzungen.settext "Lala" - '///+ click button 'new' in 'Abbreviations' ///' - AbkuerzungenNeu.click - '///+ click button 'delete' in 'Abbreviations' ///' - AbkuerzungenLoeschen.click - '/// type something into the field 'Word with TWo INitial CApitals' ///' - Woerter.settext "LALA" - '///+ check the checkbox 'AutoInclude' in 'Word with TWo INitial CApitals' ///' - WoerterAutomatisch.Check - '///+ click button 'new' in 'Word with TWo INitial CApitals' ///' - WoerterNeu.click - '///+ click button 'delete' in 'Word with TWo INitial CApitals' ///' - WoerterLoeschen.click - '///+ UNcheck the checkbox 'AutoInclude' in 'Word with TWo INitial CApitals' ///' - WoerterAutomatisch.UnCheck - Kontext - '/// select tabpage 'Options' ///' - Messagebox.SetPage TabOptionen - Kontext "TabOptionen" - Call DialogTest ( TabOptionen ) - Kontext - '/// select tabpage 'Custom Quotes' ///' - Messagebox.SetPage TabTypografisch - Kontext "TabTypografisch" ' 1a - '/// in the part of 'single quotes': ///' - '///+ check 'replace' ///' - '///+ click 'start quote' ///' - EinfacheErsetzen.Check - EinfachWortAnfang.Click - Kontext "Sonderzeichen" - Call DialogTest ( Sonderzeichen, 1 ) - '///+ cancel dialog 'start quote' ///' - Sonderzeichen.Cancel - Kontext "TabTypografisch" ' 1b - '///+ click 'end quote' ///' - EinfachWortEnde.Click - Kontext "Sonderzeichen" - Call DialogTest ( Sonderzeichen, 2 ) - '///+ cancel dialog 'end quote' ///' - Sonderzeichen.Cancel - Kontext "TabTypografisch" ' 1s - '///+ click button 'default' ///' - EinfachStandard.Click - - Kontext "TabTypografisch" ' 2a - '/// in the part of 'double quotes': ///' - '///+ click 'start quote' ///' - DoppeltWortAnfang.Click - Kontext "Sonderzeichen" - Call DialogTest ( Sonderzeichen, 3 ) - '///+ cancel dialog 'start quote' ///' - Sonderzeichen.Cancel - Kontext "TabTypografisch" ' 2b - '///+ click 'end quote' ///' - DoppeltWortEnde.Click - Kontext "Sonderzeichen" - Call DialogTest ( Sonderzeichen, 4 ) - '///+ cancel dialog 'end quote' ///' - Sonderzeichen.Cancel - Kontext "TabTypografisch" ' 2s - '///+ click button 'default' ///' - DoppeltStandard.Click - '///+ UNcheck 'replace' ///' - EinfacheErsetzen.UnCheck - '/// cancel dialog 'AtorCorrect' ///' - TabTypografisch.cancel - '/// close application ///' + catch + printlog "ok was CRASH before" '# + endcatch + WelcheSprache.select (iLanguage) + Kontext + Messagebox.SetPage TabAusnahmen + Kontext "TabAusnahmen" + Call DialogTest ( TabAusnahmen ) + Abkuerzungen.settext "Lala" + AbkuerzungenNeu.click + AbkuerzungenLoeschen.click + Woerter.settext "LALA" + WoerterAutomatisch.Check + WoerterNeu.click + WoerterLoeschen.click + WoerterAutomatisch.UnCheck + Kontext + Messagebox.SetPage TabOptionen + Kontext "TabOptionen" + Call DialogTest ( TabOptionen ) + Kontext + Messagebox.SetPage TabTypografisch + Kontext "TabTypografisch" ' 1a + EinfacheErsetzen.Check + EinfachWortAnfang.Click + Kontext "Sonderzeichen" + Call DialogTest ( Sonderzeichen, 1 ) + Sonderzeichen.Cancel + Kontext "TabTypografisch" ' 1b + EinfachWortEnde.Click + Kontext "Sonderzeichen" + Call DialogTest ( Sonderzeichen, 2 ) + Sonderzeichen.Cancel + Kontext "TabTypografisch" ' 1s + EinfachStandard.Click + + Kontext "TabTypografisch" ' 2a + DoppeltWortAnfang.Click + Kontext "Sonderzeichen" + Call DialogTest ( Sonderzeichen, 3 ) + Sonderzeichen.Cancel + Kontext "TabTypografisch" ' 2b + DoppeltWortEnde.Click + Kontext "Sonderzeichen" + Call DialogTest ( Sonderzeichen, 4 ) + Sonderzeichen.Cancel + Kontext "TabTypografisch" ' 2s + DoppeltStandard.Click + EinfacheErsetzen.UnCheck + TabTypografisch.cancel Call hCloseDocument endcase @@ -301,7 +237,7 @@ testcase tChineseTranslation qaerrorlog( "#i89634# - Chinese Translation dialog does not close" ) goto endsub - + dim sFileName as string dim bSavedAsianSupport as boolean @@ -311,160 +247,121 @@ testcase tChineseTranslation sFileName = "graphics\required\input\tchinese.odg" end if - '/// Open application ///' Call hNewDocument WaitSlot (2000) 'sleep 1 - '/// Save old state and Activate Support for Asian language ///' bSavedAsianSupport = ActiveDeactivateAsianSupport(TRUE) - '/// Open Document ///' Call hFileOpen ( ConvertPath(gTesttoolPath + sFileName) ) - '/// If write-protected - open as Temp-file ///' sleep (2) Kontext "Standardbar" - if Bearbeiten.GetState(2) <> 1 then - Bearbeiten.Click '0 = not pressed. 1 = pressed. - Kontext - if Active.Exists(1) then - Active.Yes - else - warnlog "No messagebox after making document editable? - Test canceled here" - goto endsub - end if + if Bearbeiten.GetState(2) <> 1 then + Bearbeiten.Click '0 = not pressed. 1 = pressed. + Kontext + if Active.Exists(1) then + Active.Yes + else + warnlog "No messagebox after making document editable? - Test canceled here" + goto endsub end if + end if if uCase(gApplication) = "IMPRESS" then Kontext "DocumentImpress" else Kontext "DocumentDraw" end if - '/// Select all, Press RETURN to enter text in Editmode ///' - '/// Move marker to top of the text, go two steps right, mark two characters ///' EditSelectAll hTypeKeys "" hTypeKeys "" - '/// Open Chinesetranslation ///' ToolsChineseTranslation WaitSlot (2000) 'sleep 1 kontext "ChineseTranslation" - '/// Check if everything is there ///' - Call DialogTest ( ChineseTranslation ) - '/// Click on EditTerms ///' - EditTerms.Click - kontext "ChineseDictionary" - '/// Check if everything is there ///' - Call DialogTest ( ChineseDictionary ) - '/// Close dialog 'ChineseDictionary' with 'OK' ///' - ChineseDictionary.Ok + Call DialogTest ( ChineseTranslation ) + EditTerms.Click + kontext "ChineseDictionary" + Call DialogTest ( ChineseDictionary ) + ChineseDictionary.Ok kontext "ChineseTranslation" - '/// Close dialog 'Chinese' with 'OK' ///' - ChineseTranslation.OK + ChineseTranslation.OK kontext - '/// if messagebox exist, say OK; ('Spellcheck completed' or 'Word not found') ///' - if Messagebox.exists (5) then - printlog "Messagebox: "+Messagebox.gettext+"'" - Messagebox.ok - end if - '/// Restore old state for Asian language ///' + if Messagebox.exists (5) then + printlog "Messagebox: "+Messagebox.gettext+"'" + Messagebox.ok + end if ActiveDeactivateAsianSupport(bSavedAsianSupport) - '/// Close application ///' Call hCloseDocument endcase '-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- testcase tiToolsMacro - '/// open application ///' Call hNewDocument WaitSlot (2000) 'sleep 2 - '/// Tools->Macro ///' ToolsMacro Kontext "Makro" - Call DialogTest ( Makro ) - '/// click button 'organizer...' ///' - Verwalten.Click + Call DialogTest ( Makro ) + Verwalten.Click Kontext - '/// switch to tabpage 'Modules' ///' - Messagebox.SetPage TabModule - Kontext "TabModule" - Call DialogTest ( TabModule ) + Messagebox.SetPage TabModule + Kontext "TabModule" + Call DialogTest ( TabModule ) Kontext - '/// switch to tabpage 'Libraries' ///' - Messagebox.SetPage TabBibliotheken - Kontext "TabBibliotheken" - Call DialogTest ( TabBibliotheken ) - '/// click lbutton 'append' ///' - Hinzufuegen.Click - Kontext "Messagebox" - if Messagebox.Exists (5) then - if Messagebox.GetRT = 304 then - Warnlog Messagebox.Gettext - Messagebox.Ok - end if - end if - Kontext "OeffnenDlg" - '/// cancel dialog 'append libraries' ///' - OeffnenDlg.Cancel - Kontext "TabBibliotheken" - '/// click button 'new' ///' - Neu.Click - kontext "NeueBibliothek" - sleep 1 'Bibliotheksname - '/// cancel dialog 'new library' ///' - NeueBibliothek.cancel - Kontext "TabBibliotheken" - '/// close dialog 'macro organizer' ///' - TabBibliotheken.Close + Messagebox.SetPage TabBibliotheken + Kontext "TabBibliotheken" + Call DialogTest ( TabBibliotheken ) + Hinzufuegen.Click + Kontext "Messagebox" + if Messagebox.Exists (5) then + if Messagebox.GetRT = 304 then + Warnlog Messagebox.Gettext + Messagebox.Ok + end if + end if + Kontext "OeffnenDlg" + OeffnenDlg.Cancel + Kontext "TabBibliotheken" + Neu.Click + kontext "NeueBibliothek" + sleep 1 'Bibliotheksname + NeueBibliothek.cancel + Kontext "TabBibliotheken" + TabBibliotheken.Close Kontext "Makro" - '/// close dialog 'macro' ///' - Makro.Cancel - '/// close application ///' + Makro.Cancel Call hCloseDocument endcase '-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- testcase tiToolsGallery - '/// open application ///' Call hNewDocument - '/// Tools->Gallery ///' ToolsGallery WaitSlot (2000) 'sleep 1 - '/// Tools->Gallery ///' ToolsGallery - '/// close application ///' Call hCloseDocument endcase '-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- testcase tiToolsEyedropper - '/// open application ///' Call hNewDocument - '/// Tools->Eyedropper ///' ToolsEyedropper Kontext "Pipette" - Call DialogTest (Pipette) - '/// close dialog 'Eyedropper' ///' - Pipette.Close - sleep 1 - '/// close application ///' + Call DialogTest (Pipette) + Pipette.Close + sleep 1 Call hCloseDocument endcase '-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- testcase tiToolsOptions - '/// open application ///' Call hNewDocument - '/// Tools->Options ///' ToolsOptions WaitSlot (2000) 'sleep 1 kontext "OptionenDlg" - '/// close dialog 'Options' ///' - OptionenDlg.Close - '/// close application ///' + OptionenDlg.Close Call hCloseDocument endcase diff --git a/testautomation/graphics/optional/includes/global/id_007.inc b/testautomation/graphics/optional/includes/global/id_007.inc index 97130d44568e..98dbc49d0a90 100755 --- a/testautomation/graphics/optional/includes/global/id_007.inc +++ b/testautomation/graphics/optional/includes/global/id_007.inc @@ -1,7 +1,7 @@ 'encoding UTF-8 Do not remove or change this line! '************************************************************************** '* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. -'* +'* '* Copyright 2008 by Sun Microsystems, Inc. '* '* OpenOffice.org - a multi-platform office productivity suite @@ -58,57 +58,42 @@ testcase tdModifyFlipVertikal - '/// open application ///' Call hNewDocument ' imp: contextmenue same SID! sleep 1 - '/// create rectangle ///' Call hRechteckErstellen ( 10, 10, 20, 40 ) try - '/// imp: Kontextmenu: Flip->Vertically ///' - '///+ Modify->Flip->Vertically ///' ContextFlipVerticalDraw Printlog "- Flip-vertical is working" catch - Warnlog "- Flip-Vertical does not work" + Warnlog "- Flip-Vertical does not work" endcatch sleep 1 - '/// close application ///' Call hCloseDocument endcase '------------------------------------------------------------------------------------------------------------------------------------------------ testcase tdModifyFlipHorizontal - '/// open application ///' Call hNewDocument ' imp: contextmenue same SID! WaitSlot (1000) - '/// create rectangle ///' Call hRechteckErstellen ( 10, 10, 20, 40 ) try - '/// imp: Kontextmenu: Flip->Horizontally ///' - '///+ Modify->Flip->Horizontally ///' ContextFlipHorizontalDraw Printlog "- Flip-horizontal is working" catch - Warnlog "- Flip-horizontal does not work" + Warnlog "- Flip-horizontal does not work" endcatch sleep 1 - '/// close application ///' Call hCloseDocument endcase '------------------------------------------------------------------------------------------------------------------------------------------------ testcase tdContextConvertIntoCurve - '/// open application ///' Call hNewDocument - '/// create rectangle ///' Call hRechteckErstellen ( 10, 10, 20, 40 ) - '/// Modify->Convert->To Curve ///' - '///+ Modify->Convert->To Curve ///' ContextConvertIntoCurve WaitSlot (2000) - '/// close application ///' Call hCloseDocument endcase @@ -116,424 +101,298 @@ endcase testcase tdContextConvertIntoPolygon dim iWaitIndex as integer - '/// open application ///' Call hNewDocument ' imp: contextmenue same SID! InsertGraphicsFromFile Kontext "GrafikEinfuegenDlg" - '/// Check if the dialogue is there. If not - wait for maximum 10 seconds) - iWaitIndex = 0 - do while NOT GrafikEinfuegenDlg.Exists AND iWaitIndex < 10 - sleep(1) - iWaitIndex = iWaitIndex + 1 - loop - if NOT GrafikEinfuegenDlg.Exists AND iWaitIndex = 10 then - warnlog "Dialogue Insert Graphics didnt work. Ending testcase." - Call hCloseDocument - goto endsub - end if - '/// insert graphic: "global\input\graf_inp\enter.bmp" ///' - Dateiname.SetText ConvertPath (gTesttoolPath + "global\input\graf_inp\enter.bmp") - Oeffnen.Click - sleep 3 - '/// Modify->Convert->To Polygon ///' - '/// Modify->Convert->To Polygon ///' - ContextConvertIntoPolygon - Kontext "InPolygonUmwandeln" - Call DialogTest (InPolygonUmwandeln) - '/// check checkbox: 'Fill holes' ///' - LoecherFuellen.Check - '/// click more in number field: 'Number of colors' ///' - Farbanzahl.More - '/// click more in number field: 'Point reductionn' ///' - Punktreduktion.More - '/// click more in number field: 'Tile size' ///' - Kachelgroesse.More - '/// click button 'Preview' ///' - Vorschau.Click - sleep 10 - '/// cancel dialog 'Convert to Polygon' ///' - InPolygonUmwandeln.Cancel - sleep (2) - '/// close application ///' + iWaitIndex = 0 + do while NOT GrafikEinfuegenDlg.Exists AND iWaitIndex < 10 + sleep(1) + iWaitIndex = iWaitIndex + 1 + loop + if NOT GrafikEinfuegenDlg.Exists AND iWaitIndex = 10 then + warnlog "Dialogue Insert Graphics didnt work. Ending testcase." + Call hCloseDocument + goto endsub + end if + Dateiname.SetText ConvertPath (gTesttoolPath + "global\input\graf_inp\enter.bmp") + Oeffnen.Click + sleep 3 + ContextConvertIntoPolygon + Kontext "InPolygonUmwandeln" + Call DialogTest (InPolygonUmwandeln) + LoecherFuellen.Check + Farbanzahl.More + Punktreduktion.More + Kachelgroesse.More + Vorschau.Click + sleep 10 + InPolygonUmwandeln.Cancel + sleep (2) Call hCloseDocument endcase '------------------------------------------------------------------------------------------------------------------------------------------------ testcase tdContextConvertIntoContour - '/// open application ///' Call hNewDocument - '/// create rectangle ///' Call hRechteckErstellen ( 10, 10, 20, 40 ) - '/// Modify->Convert->To Contour ///' - '/// Modify->Convert->To Contour ///' ContextConvertIntoContour WaitSlot (1000) - '/// close application ///' Call hCloseDocument endcase '------------------------------------------------------------------------------------------------------------------------------------------------ testcase tdContextConvertInto3D - '/// open application ///' Call hNewDocument - '/// create rectangle ///' Call hRechteckErstellen ( 10, 10, 20, 40 ) - '/// Modify->Convert->To 3D ///' - '/// Modify->Convert->To 3D ///' ContextConvertInto3D WaitSlot (1000) - '/// close application ///' Call hCloseDocument endcase '------------------------------------------------------------------------------------------------------------------------------------------------ testcase tdContextConvertIntoRotationObject - '/// open application ///' Call hNewDocument WaitSlot (1000) - '/// create rectangle ///' Call hRechteckErstellen (20,20,50,50) - sleep 2 - '/// Modify->Convert->To 3D Rotation Object ///' - '/// Modify->Convert->To 3D Rotation Object ///' - ContextConvertInto3DRotationObject - WaitSlot (1000) - '/// close application ///' - Call hCloseDocument + sleep 2 + ContextConvertInto3DRotationObject + WaitSlot (1000) + Call hCloseDocument endcase '------------------------------------------------------------------------------------------------------------------------------------------------ testcase tdContextConvertIntoBitmap - '/// open application ///' Call hNewDocument WaitSlot (3000) InsertGraphicsFromFile WaitSlot (3000) Kontext "GrafikEinfuegenDlg" - sleep 2 - '/// insert graphic: "global\input\graf_inp\columbia.dxf" ///' - Dateiname.SetText ConvertPath (gTesttoolPath + "global\input\graf_inp\columbia.dxf") - sleep 2 - Oeffnen.Click - sleep 2 - try - '/// Modify->Convert->To Bitmap ///' - ContextConvertIntoBitmap - Printlog "- Convert into bitmap is working" - catch - Warnlog "- Convert into bitmap does not work" - endcatch - '/// close application ///' + sleep 2 + Dateiname.SetText ConvertPath (gTesttoolPath + "global\input\graf_inp\columbia.dxf") + sleep 2 + Oeffnen.Click + sleep 2 + try + ContextConvertIntoBitmap + Printlog "- Convert into bitmap is working" + catch + Warnlog "- Convert into bitmap does not work" + endcatch Call hCloseDocument endcase '------------------------------------------------------------------------------------------------------------------------------------------------ testcase tdContextConvertIntoMetaFile - '/// open application ///' Call hNewDocument WaitSlot (3000) InsertGraphicsFromFile WaitSlot (1000) kontext "Messagebox" - if Messagebox.Exists (5) Then Messagebox.OK - sleep 1 - Kontext "GrafikEinfuegenDlg" - '/// insert graphic: "global\input\graf_inp\desp.bmp" ///' - sleep 2 - Dateiname.SetText ConvertPath (gTesttoolPath + "global\input\graf_inp\desp.bmp") - sleep 2 - Preview.Click - sleep 3 - Oeffnen.Click - sleep 5 - try - '/// Modify->Convert->To Metafile ///' - '/// Modify->Convert->To Metafile ///' - ContextConvertIntoMetafile - Printlog "- convert into meta file does work" - catch - Warnlog "- convert into meta file does not work" - endcatch - '/// close application ///' - Call hCloseDocument + if Messagebox.Exists (5) Then Messagebox.OK + sleep 1 + Kontext "GrafikEinfuegenDlg" + sleep 2 + Dateiname.SetText ConvertPath (gTesttoolPath + "global\input\graf_inp\desp.bmp") + sleep 2 + Preview.Click + sleep 3 + Oeffnen.Click + sleep 5 + try + ContextConvertIntoMetafile + Printlog "- convert into meta file does work" + catch + Warnlog "- convert into meta file does not work" + endcatch + Call hCloseDocument endcase '------------------------------------------------------------------------------------------------------------------------------------------------ testcase tdModifyArrange - '/// open application ///' Call hNewDocument - '/// create two rectangles ///' Call hRechteckErstellen ( 10, 10, 20, 40 ) hTypeKeys("") Call hRechteckErstellen ( 30, 30, 50, 60 ) - '/// Modify->Arrange->Bring to Front ///' - '///+ Modify->Arrange->Bring to Front ///' FormatArrangeBringToFront WaitSlot (1000) - '/// Modify->Arrange->Bring Forward ///' - '///+ Modify->Arrange->Bring Forward ///' ContextArrangeBringForward WaitSlot (1000) - '/// Modify->Arrange->Send Backward ///' - '///+ Modify->Arrange->Send Backward ///' ContextArrangeBringBackward WaitSlot (1000) - '/// Modify->Arrange->Send to Back ///' - '///+ Modify->Arrange->Send to Back ///' FormatArrangeSendToBack WaitSlot (1000) - '/// Edit->Select All ///' EditSelectAll - '/// Modify->Arrange->Reverse ///' - '///+ Modify->Arrange->Reverse ///' ContextArrangeReverse WaitSlot (1000) - '/// close application ///' Call hCloseDocument endcase '------------------------------------------------------------------------------------------------------------------------------------------------ testcase tdModifyArrangeObjects - '/// open application ///' Call hNewDocument WaitSlot (1000) - '/// create two rectangles ///' Call hRechteckErstellen ( 20, 20, 30, 50 ) hTypeKeys("") Call hRechteckErstellen ( 30,30,50,50 ) - '/// Modify->Arrange->In Front of Object ///' - '///+ Modify->Arrange->In Front of Object ///' ContextArrangeInFrontOfObject - '/// click on the upper left rectangle ///' gMouseClick 11,11 - '/// Modify->Arrange->Behind Object ///' - '///+ Modify->Arrange->Behind Object ///' ContextArrangeBehindObject - '/// click on the lower right rectangle ///' gMouseClick 45,45 sleep 1 - '/// close application ///' Call hCloseDocument endcase '------------------------------------------------------------------------------------------------------------------------------------------------ testcase tdModifyAlignment - '/// open application ///' Call hNewDocument WaitSlot (1000) - '/// create rectangle ///' Call hRechteckErstellen ( 20, 20, 30, 50 ) - '/// Modify->Alignment->Left ///' - '///+ Modify->Alignment->Left ///' ContextAlignmentLeft WaitSlot (1000) - '/// Modify->Alignment->Centered ///' - '///+ Modify->Alignment->Centered ///' ContextAlignmentCentered WaitSlot (1000) - '/// Modify->Alignment->Right ///' - '///+ Modify->Alignment->Right ///' ContextAlignmentRight WaitSlot (1000) - '/// Modify->Alignment->Top ///' - '///+ Modify->Alignment->Top ///' ContextAlignmentTop WaitSlot (1000) - '/// Modify->Alignment->Center ///' - '///+ Modify->Alignment->Center ///' ContextAlignmentBottom WaitSlot (1000) - '/// Modify->Alignment->Bottom ///' - '///+ Modify->Alignment->Bottom ///' ContextAlignmentCenter WaitSlot (1000) - '/// close application ///' Call hCloseDocument endcase '------------------------------------------------------------------------------------------------------------------------------------------------ testcase tdContextDistribution - '/// open application ///' Call hNewDocument WaitSlot (3000) - '/// create 3 rectangles ///' Call hRechteckErstellen (20,20,30,30) Call hRechteckErstellen (40,40,50,50) Call hRechteckErstellen (60,60,70,70) sleep 1 - '/// select all with keyboard: + ///' EditSelectAll sleep 1 - '/// Modify->Distibution... ///' - '///+ Modify->Distibution... ///' ContextDistribution Kontext "VerteilenDlg" - sleep 1 - Call DialogTest (VerteilenDlg) - sleep 1 - '/// check radiobutton horizontal 'Left' ///' - Links.Check - '///+ check radiobutton 'Center' ///' - MitteHorizontal.Check - '///+ check radiobutton 'spacing' ///' - AbstandHorizontal.Check - '///+ check radiobutton 'right' ///' - Rechts.Check - '///+ check radiobutton 'none' ///' - KeineHorizontal.Check - '/// check radiobutton vertical 'top' ///' - Oben.Check - '///+ check radiobutton 'center' ///' - MitteVertikal.Check - '///+ check radiobutton 'spacing' ///' - AbstandVertikal.Check - '///+ check radiobutton 'bottom' ///' - Unten.Check - '///+ check radiobutton 'none' ///' - KeineVertikal.Check - '/// cancel dialog 'Distribution' ///' - VerteilenDlg.Cancel - sleep 2 - '/// close application ///' + sleep 1 + Call DialogTest (VerteilenDlg) + sleep 1 + Links.Check + MitteHorizontal.Check + AbstandHorizontal.Check + Rechts.Check + KeineHorizontal.Check + Oben.Check + MitteVertikal.Check + AbstandVertikal.Check + Unten.Check + KeineVertikal.Check + VerteilenDlg.Cancel + sleep 2 Call hCloseDocument endcase '------------------------------------------------------------------------------------------------------------------------------------------------ testcase tdContextDescriptionObject - '/// Open application ///' Call hNewDocument WaitSlot (1000) - '/// create rectangle ///' Call hRechteckErstellen ( 10, 10, 20, 40 ) ContextDescriptionObject Kontext "DescriptionObject" - Call DialogTest (DescriptionObject) - '/// Cancel dialog 'DescriptionObject' ///' - DescriptionObject.Cancel - '/// Close application ///' + Call DialogTest (DescriptionObject) + DescriptionObject.Cancel Call hCloseDocument endcase '------------------------------------------------------------------------------------------------------------------------------------------------ testcase tdContextNameObject - '/// open application ///' Call hNewDocument WaitSlot (1000) - '/// create two rectangles ///' Call hRechteckErstellen ( 20, 20, 30, 50 ) hTypeKeys("") Call hRechteckErstellen ( 30, 40, 50, 60 ) sleep 1 - '/// select both by spanning a selection with the mouse ///' gMouseMove 1,1,95,95 sleep 1 - '/// Modify->Group ///' - '///+ Modify->Group ///' FormatGroupGroup WaitSlot (1000) - '/// Modify->Name Object ///' - '///+ Modify->Name Object ///' ContextNameObject Kontext "NameDlgObject" - Call DialogTest (NameDlgObject) - '/// cancel dialog 'name' ///' - NameDlgObject.Cancel - '/// Modify->UnGroup ///' - '///+ Modify->UnGroup ///' - FormatUngroupDraw - '/// close application ///' + Call DialogTest (NameDlgObject) + NameDlgObject.Cancel + FormatUngroupDraw Call hCloseDocument endcase '------------------------------------------------------------------------------------------------------------------------------------------------ testcase tdModifyConnectBreak - '/// open application ///' Call hNewDocument sleep 1 - '/// create two rectangles ///' Call hRechteckErstellen (10,10,30,30) Call hRechteckErstellen (35,35,50,50) sleep 1 - '/// Edit->Select All ///' EditSelectAll - '/// Modify->Connect ///' - '///+ Modify->Connect ///' ContextConnect sleep 1 try - '/// Modify->Break ///' - '///+ Modify->Break ///' ContextBreak catch - Warnlog "- Modify-Break does not work" + Warnlog "- Modify-Break does not work" endcatch sleep 1 - '/// close application ///' Call hCloseDocument endcase '------------------------------------------------------------------------------------------------------------------------------------------------ testcase tdModifyShapes - '/// open application ///' Call hNewDocument sleep 1 - '/// create two rectangles ///' gMouseClick 50,50 Call hRechteckErstellen (30,30,50,50) Call hRechteckErstellen (60,60,80,80) sleep 1 - '/// Edit->Select All ///' EditSelectAll sleep 1 try - '/// Modify->Shapes->Merge ///' - '///+ Modify->Shapes->Merge ///' - ModifyShapesMerge ' 1 + ModifyShapesMerge ' 1 WaitSlot (1000) 'sleep 1 - Printlog "- Modify-Shape merge is working" + Printlog "- Modify-Shape merge is working" catch - Warnlog "- Modify-shape merge is not working" + Warnlog "- Modify-shape merge is not working" endcatch - '/// select all and delete it ///' EditSelectAll sleep 1 hTypeKeys "" sleep 1 - '/// create two rectangles ///' Call hRechteckErstellen (30,30,50,50) Call hRechteckErstellen (60,60,80,80) sleep 1 - '/// Edit->Select All ///' EditSelectAll sleep 1 try - '/// Modify->Shapes->Substract ///' - '///+ Modify->Shapes->Substract ///' - ModifyShapesSubstract ' 2 - Printlog "- Modify-shape-substract is working" + ModifyShapesSubstract ' 2 + Printlog "- Modify-shape-substract is working" catch - Warnlog "- Modify-shape substract is not working" + Warnlog "- Modify-shape substract is not working" endcatch sleep 1 - '/// select all and delete it ///' EditSelectAll sleep 1 hTypeKeys "" sleep 1 - '/// create two rectangles ///' Call hRechteckErstellen (30,30,50,50) sleep 1 Call hRechteckErstellen (60,60,80,80) @@ -541,43 +400,32 @@ testcase tdModifyShapes EditSelectall sleep 1 try - '/// Modify->Shapes->Intersect ///' - '///+ Modify->Shapes->Intersect ///' - ModifyShapesIntersect ' 3 - Printlog "- Modify-shape intersect is working" + ModifyShapesIntersect ' 3 + Printlog "- Modify-shape intersect is working" catch - Warnlog "- Modify-Shape intersect is not working" + Warnlog "- Modify-Shape intersect is not working" endcatch - '/// close application ///' Call hCloseDocument endcase '------------------------------------------------------------------------------------------------------------------------------------------------ testcase tdModifyCombineSplit - '/// open application ///' Call hNewDocument sleep 1 - '/// create two rectangles ///' Call hRechteckErstellen (30,30,50,50) Call hRechteckErstellen (60,60,80,80) sleep 1 - '/// Edit->Select All ///' EditSelectAll sleep 1 try - '/// Modify->Shapes->Combine ///' - '///+ Modify->Shapes->Combine ///' - ContextCombine - Printlog "- Modify combine is working" - '/// Modify->Shapes->Split ///' - '///+ Modify->Shapes->Split ///' - ContextSplit - Printlog "- Modify-split is working" + ContextCombine + Printlog "- Modify combine is working" + ContextSplit + Printlog "- Modify-split is working" catch - Warnlog "- Modify-combine and split are not working" + Warnlog "- Modify-combine and split are not working" endcatch - '/// close application ///' Call hCloseDocument endcase diff --git a/testautomation/graphics/optional/includes/global/id_008.inc b/testautomation/graphics/optional/includes/global/id_008.inc index cb56f464730c..ef238ee0c8f7 100755 --- a/testautomation/graphics/optional/includes/global/id_008.inc +++ b/testautomation/graphics/optional/includes/global/id_008.inc @@ -1,7 +1,7 @@ 'encoding UTF-8 Do not remove or change this line! '************************************************************************** '* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. -'* +'* '* Copyright 2008 by Sun Microsystems, Inc. '* '* OpenOffice.org - a multi-platform office productivity suite @@ -42,43 +42,36 @@ testcase tiWindowNewWindow - '/// open application ///' Call hNewDocument - '/// create rectangle ///' Call hRechteckErstellen ( 10, 10, 20, 40 ) - '/// Window->New Window ///' WindowNewWindow WaitSlot (2000) - '/// close application ///' Call hCloseDocument endcase testcase tidWindow123 goto endsub '' testing TBO: 29.03.2002 dim iMenues as integer - '/// open application ///' Call hNewDocument - '/// create rectangle ///' Call hRechteckErstellen ( 10, 10, 20, 40 ) Kontext "DocumentImpress" - DocumentImpress.UseMenu - iMenues = MenuGetItemCount - warnlog "---- Number of Main menus: " & iMenues - MenuSelect(Menugetitemid(8)) - sleep 1 - iMenues = MenuGetItemCount - printlog "---- Number of Main menus: " & iMenues - ' MenuSelect(Menugetitemid(14)) - sleep 1 - i=1 - printlog "count: " + i + "; of submenu: " + MenuGetItemCount + "; SID: " + MenuGetItemId (i) + "; Text: " + MenuGetItemText (Menugetitemid(i)) + "; Command: " + MenuGetItemCommand(Menugetitemid(i)) + "; Seperator?: " + MenuIsSeperator(i) + "; Enabled: " + MenuIsItemEnabled(Menugetitemid(i)) + "; Checked: " + MenuIsItemChecked(Menugetitemid(i)) + ";" - i=2 - printlog "count: " + i + "; of submenu: " + MenuGetItemCount + "; SID: " + MenuGetItemId (i) + "; Text: " + MenuGetItemText (Menugetitemid(i)) + "; Command: " + MenuGetItemCommand(Menugetitemid(i)) + "; Seperator?: " + MenuIsSeperator(i) + "; Enabled: " + MenuIsItemEnabled(Menugetitemid(i)) + "; Checked: " + MenuIsItemChecked(Menugetitemid(i)) + ";" - warnlog "Dynamic entries not accessible ? :-(((((" - ' i=3 - ' printlog "count: " + i + "; of submenue: " + MenuGetItemCount + "; SID: " + MenuGetItemId (i) + "; Text: " + MenuGetItemText (Menugetitemid(i)) + "; Command: " + MenuGetItemCommand(Menugetitemid(i)) + "; Seperator?: " + MenuIsSeperator(i) + "; Enabled: " + MenuIsItemEnabled(Menugetitemid(i)) + "; Checked: " + MenuIsItemChecked(Menugetitemid(i)) + ";" - '/// close application ///' + DocumentImpress.UseMenu + iMenues = MenuGetItemCount + warnlog "---- Number of Main menus: " & iMenues + MenuSelect(Menugetitemid(8)) + sleep 1 + iMenues = MenuGetItemCount + printlog "---- Number of Main menus: " & iMenues + ' MenuSelect(Menugetitemid(14)) + sleep 1 + i=1 + printlog "count: " + i + "; of submenu: " + MenuGetItemCount + "; SID: " + MenuGetItemId (i) + "; Text: " + MenuGetItemText (Menugetitemid(i)) + "; Command: " + MenuGetItemCommand(Menugetitemid(i)) + "; Seperator?: " + MenuIsSeperator(i) + "; Enabled: " + MenuIsItemEnabled(Menugetitemid(i)) + "; Checked: " + MenuIsItemChecked(Menugetitemid(i)) + ";" + i=2 + printlog "count: " + i + "; of submenu: " + MenuGetItemCount + "; SID: " + MenuGetItemId (i) + "; Text: " + MenuGetItemText (Menugetitemid(i)) + "; Command: " + MenuGetItemCommand(Menugetitemid(i)) + "; Seperator?: " + MenuIsSeperator(i) + "; Enabled: " + MenuIsItemEnabled(Menugetitemid(i)) + "; Checked: " + MenuIsItemChecked(Menugetitemid(i)) + ";" + warnlog "Dynamic entries not accessible ? :-(((((" + ' i=3 + ' printlog "count: " + i + "; of submenue: " + MenuGetItemCount + "; SID: " + MenuGetItemId (i) + "; Text: " + MenuGetItemText (Menugetitemid(i)) + "; Command: " + MenuGetItemCommand(Menugetitemid(i)) + "; Seperator?: " + MenuIsSeperator(i) + "; Enabled: " + MenuIsItemEnabled(Menugetitemid(i)) + "; Checked: " + MenuIsItemChecked(Menugetitemid(i)) + ";" Call hCloseDocument endcase diff --git a/testautomation/graphics/optional/includes/global/id_009.inc b/testautomation/graphics/optional/includes/global/id_009.inc index 1f9106a42c04..bfbaf6861c36 100755 --- a/testautomation/graphics/optional/includes/global/id_009.inc +++ b/testautomation/graphics/optional/includes/global/id_009.inc @@ -1,7 +1,7 @@ 'encoding UTF-8 Do not remove or change this line! '************************************************************************** '* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. -'* +'* '* Copyright 2008 by Sun Microsystems, Inc. '* '* OpenOffice.org - a multi-platform office productivity suite @@ -60,236 +60,190 @@ endcase '...---....---.-.-.-.-.....---......--.-.-.-.....----..-........................---....... testcase tmHelpTips - Call hNewDocument - hTBOtypeInDoc + Call hNewDocument + hTBOtypeInDoc - HelpTips - Sleep 2 - HelpTips + HelpTips + Sleep 2 + HelpTips - Call hCloseDocument + Call hCloseDocument endcase '...---....---.-.-.-.-.....---......--.-.-.-.....----..-........................---....... testcase tmHelpExtendedTips - Call hNewDocument - hTBOtypeInDoc + Call hNewDocument + hTBOtypeInDoc - HelpEntendedHelp - Sleep (2) - HelpEntendedHelp + HelpEntendedHelp + Sleep (2) + HelpEntendedHelp - Call hCloseDocument + Call hCloseDocument endcase '...---....---.-.-.-.-.....---......--.-.-.-.....----..-........................---....... testcase tmHelpAboutStarOffice - Call hNewDocument - hTBOtypeInDoc + Call hNewDocument + hTBOtypeInDoc - HelpAboutStarOffice - Kontext "UeberStarMath" - DialogTest (UeberStarMath) - UeberStarMath.OK + HelpAboutStarOffice + Kontext "UeberStarMath" + DialogTest (UeberStarMath) + UeberStarMath.OK - Call hCloseDocument + Call hCloseDocument endcase '...---....---.-.-.-.-.....---......--.-.-.-.....----..-........................---....... testcase tmHelpContents goto endsub '"#i84486# - tmHelpContents outcommented due to crash." - dim i as integer + dim i as integer - '/// open application ///' - Call hNewDocument - '/// Help->Contents ///' - HelpContents - sleep(8) - kontext "StarOfficeHelp" - if Not StarOfficeHelp.Exists then - Warnlog "Help is not up!" - else - '/// get the number of entries in the listbox 'select Help modul' ///' - Printlog "HelpAbout: '" + HelpAbout.GetItemCount +"'" - '################ left half ################ - '/// on the left half of the dialog: ///' - '///+ change to the tabpage 'Contents' ///' - TabControl.SetPage ContentPage - '///+ get the number of entries in the listbox 'MAin help themes' ///' - Printlog "SearchContent: '" + SearchContent.GetItemCount + "'" - '///+ change to the tabpage 'Index' ///' - TabControl.SetPage IndexPage - '///+ get the number of entries in the listbox 'Search term' ///' - Printlog "SearchIndex: '" + SearchIndex.GetItemCount + "'" - sleep 5 - '///+ click on button 'Display' ///' - DisplayIndex.Click - sleep 5 - '///+ change to the tabpage 'Find' ///' - TabControl.SetPage FindPage - '///+ get the number of entries in the listbox 'Search term' ///' - Printlog "SearchFind: '" + SearchFind.GetItemCount + "'" - '/// If the Search-Text-Field is empty - Check that the Find-button is deactivated ///' - if SearchFind.GetSelText = "" then - if FindButton.IsEnabled then - warnlog " The Find-Button should have been inactive, but was active." - endif - else - warnlog " The Search-Text-Field shouldn't contain any text. But contained: " + SearchFind.GetSelText - endif - '/// Insert some irrelevant text to get 0 results from the search. ///' - SearchFind.SetText "Doobbidedooo" - '///+ click on button 'Find' ///' - FindButton.Click - kontext - '///+ Messagebox comes up about: 'No topics found.' say OK ///' - if (active.exists (2) )then - Printlog "active came up: '" + active.gettext + "'" - active.ok + Call hNewDocument + HelpContents + sleep(8) + kontext "StarOfficeHelp" + if Not StarOfficeHelp.Exists then + Warnlog "Help is not up!" + else + Printlog "HelpAbout: '" + HelpAbout.GetItemCount +"'" + '################ left half ################ + TabControl.SetPage ContentPage + Printlog "SearchContent: '" + SearchContent.GetItemCount + "'" + TabControl.SetPage IndexPage + Printlog "SearchIndex: '" + SearchIndex.GetItemCount + "'" + sleep 5 + DisplayIndex.Click + sleep 5 + TabControl.SetPage FindPage + Printlog "SearchFind: '" + SearchFind.GetItemCount + "'" + if SearchFind.GetSelText = "" then + if FindButton.IsEnabled then + warnlog " The Find-Button should have been inactive, but was active." endif - kontext "StarOfficeHelp" - '///+ check checkbox 'Complete words only' ///' - FindFullWords.Check - '///+ check checkbox 'Find in headings only' ///' - FindInHeadingsOnly.Check - '///+ get the number of entries in the listbox 'List of headings' ///' - Printlog "Result: '" + Result.GetItemCount + "'" - '///+ click on button 'Display' ///' - DisplayFind.Click - '///+ change to the tabpage 'Bookmarks' ///' - TabControl.SetPage BookmarksPage - '///+ get the number of entries in the listbox 'Bookmark list' ///' - Printlog "Bookmarks: '" + Bookmarks.GetItemCount + "'" - '///+ click on button 'Display' ///' - DisplayBookmarks.Click - '################ right half ################ - '/// on the right half of teh dialog: ///' - '################ toolbar ################ - Kontext "TB_Help" - '///+ click on button 'Hide/Show Navigation Pane' ///' - Index.Click + else + warnlog " The Search-Text-Field shouldn't contain any text. But contained: " + SearchFind.GetSelText + endif + SearchFind.SetText "Doobbidedooo" + FindButton.Click + kontext + if (active.exists (2) )then + Printlog "active came up: '" + active.gettext + "'" + active.ok + endif + kontext "StarOfficeHelp" + FindFullWords.Check + FindInHeadingsOnly.Check + Printlog "Result: '" + Result.GetItemCount + "'" + DisplayFind.Click + TabControl.SetPage BookmarksPage + Printlog "Bookmarks: '" + Bookmarks.GetItemCount + "'" + DisplayBookmarks.Click + '################ right half ################ + '################ toolbar ################ + Kontext "TB_Help" + Index.Click + sleep 1 + Index.Click + sleep 1 + GoToStart.Click + sleep 1 + Backward.Click + sleep 1 + Forward.Click + sleep 1 + PrintButton.Click + sleep (1) + + kontext "Active" + if Active.Exists( 2 ) then + qaerrorlog "No default printer defined: " & Active.GetText + Active.Ok + end if + + kontext "DruckenDLG" + if DruckenDLG.Exists then + DruckenDLG.cancel + else + warnlog "the Print-Dialogue didnt appear." + end if + Kontext "TB_Help" + sleep 1 + SetBookmarks.Click + sleep 1 + Kontext "AddBookmark" + Printlog "Bookmarkname: '" + Bookmarkname.GetText + "'" + AddBookmark.Cancel + sleep 1 + '################ help display ################ + kontext "HelpContent" + HelpContent.OpenContextMenu + + sleep 1 + Printlog " i: " + hMenuItemGetCount + hMenuClose() + '################ right scroolbar ################ + kontext "HelpContent" + if HelpContentUP.IsVisible then + HelpContentUP.Click sleep 1 - '///+ click on button 'Hide/Show Navigation Pane' ///' - Index.Click - sleep 1 - '///+ click on button 'First Page' ///' - GoToStart.Click - sleep 1 - '///+ click on button 'Previous Page' ///' - Backward.Click - sleep 1 - '///+ click on button 'Next Page' ///' - Forward.Click - sleep 1 - '///+ click on button 'Print ...' ///' - PrintButton.Click - sleep (1) - - kontext "Active" - if Active.Exists( 2 ) then - qaerrorlog "No default printer defined: " & Active.GetText - Active.Ok - end if - - kontext "DruckenDLG" - if DruckenDLG.Exists then - '/// In the dialog 'Print' press the button 'Cancel' ///' - DruckenDLG.cancel - else - warnlog "the Print-Dialogue didnt appear." - end if - Kontext "TB_Help" - '///+ click on button 'Add to Bookmarks ...' ///' - sleep 1 - SetBookmarks.Click - sleep 1 - Kontext "AddBookmark" - '///+ on the dialog 'Add to Bookmarks ...' get the text from the editfield 'Bookmark' and press button 'Cancel' ///' - Printlog "Bookmarkname: '" + Bookmarkname.GetText + "'" - AddBookmark.Cancel - sleep 1 - '################ help display ################ - kontext "HelpContent" - '///+ open the Context Menu of the Frame 'Help Content' and count the entries ///' - HelpContent.OpenContextMenu - - sleep 1 - Printlog " i: " + hMenuItemGetCount - hMenuClose() - '################ right scroolbar ################ - kontext "HelpContent" - '///+ click on button 'Previous Page' ///' - if HelpContentUP.IsVisible then - HelpContentUP.Click - sleep 1 - endif - '///+ click on button 'Navigation' ///' - if HelpContentNAVIGATION.IsVisible then - HelpContentNAVIGATION.Click - sleep 1 - endif - kontext "NavigationsFenster" - '/// on the toolbox 'Navigation' press the window close button 'X' ///' - NavigationsFenster.Close - sleep 1 - kontext "HelpContent" - '///+ click on button 'Next Page' ///' - if HelpContentDOWN.IsVisible then - HelpContentDOWN.Click - sleep 1 - endif - kontext "StarOfficeHelp" - '/// close the help with the keys [strg]+[F4] ///' - Printlog "trying to close the help now" - try - StarOfficeHelp.TypeKeys "" ' strg F4 supported since bug #103586# - catch - Warnlog "failed to close the help window :-(" - endcatch - kontext "StarOfficeHelp" - if StarOfficeHelp.Exists then - warnlog "Help still up!" - endif - endif - '/// close application ///' - Call hCloseDocument + endif + if HelpContentNAVIGATION.IsVisible then + HelpContentNAVIGATION.Click + sleep 1 + endif + kontext "NavigationsFenster" + NavigationsFenster.Close + sleep 1 + kontext "HelpContent" + if HelpContentDOWN.IsVisible then + HelpContentDOWN.Click + sleep 1 + endif + kontext "StarOfficeHelp" + Printlog "trying to close the help now" + try + StarOfficeHelp.TypeKeys "" ' strg F4 supported since bug #103586# + catch + Warnlog "failed to close the help window :-(" + endcatch + kontext "StarOfficeHelp" + if StarOfficeHelp.Exists then + warnlog "Help still up!" + endif + endif + Call hCloseDocument endcase '...---....---.-.-.-.-.....---......--.-.-.-.....----..-........................---....... testcase tCheckIfTheHelpExists - '/// open application ///' - Call hNewDocument - '/// Bring up the help-window ///' - HelpContents - kontext "HelpContent" - sleep (5) - '/// Press "CTRL A" and "CTRL C" to select all and then copy it. ///' - HelpContent.TypeKeys "" - sleep (1) - HelpContent.TypeKeys "" - '/// If the clipboard now is empty, then nothing were copied, which means we have a bug. ///' - if GetClipBoard = "" then - Warnlog " No content in the Help-Content -view." - else - Printlog " The Help-Content -view contained content. Good." - endif - kontext "StarOfficeHelp" - '/// Press "CTRL F4" to close the help-window. ///' - try - StarOfficeHelp.TypeKeys "" - catch - Warnlog " Failed to close the help window :-(" - endcatch - kontext "StarOfficeHelp" - if StarOfficeHelp.Exists then - warnlog "Help was still visible!" - endif - '/// And a dot into the main window. Making sure kontext and focus is right. ///' - hTypeKeys "." - '/// Close Application ///' - Call hCloseDocument + Call hNewDocument + HelpContents + kontext "HelpContent" + sleep (5) + HelpContent.TypeKeys "" + sleep (1) + HelpContent.TypeKeys "" + if GetClipBoard = "" then + Warnlog " No content in the Help-Content -view." + else + Printlog " The Help-Content -view contained content. Good." + endif + kontext "StarOfficeHelp" + try + StarOfficeHelp.TypeKeys "" + catch + Warnlog " Failed to close the help window :-(" + endcatch + kontext "StarOfficeHelp" + if StarOfficeHelp.Exists then + warnlog "Help was still visible!" + endif + hTypeKeys "." + Call hCloseDocument endcase 'tCheckIfTheHelpExists diff --git a/testautomation/graphics/optional/includes/global/id_011.inc b/testautomation/graphics/optional/includes/global/id_011.inc index 3a17c098ba1a..12c3796d1cf8 100755 --- a/testautomation/graphics/optional/includes/global/id_011.inc +++ b/testautomation/graphics/optional/includes/global/id_011.inc @@ -1,7 +1,7 @@ 'encoding UTF-8 Do not remove or change this line! -'************************************************************************** +'******************************************************************************* '* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. -'* +'* '* Copyright 2008 by Sun Microsystems, Inc. '* '* OpenOffice.org - a multi-platform office productivity suite @@ -29,19 +29,13 @@ '* '* for a copy of the LGPLv3 License. '* -'/************************************************************************ +'/****************************************************************************** '* '* Owner : wolfram.garten@sun.com '* '* short description : '* -'*********************************************************************************** -' #1 tiTextToolbar -' #1 tiDrawObjectBar -' #1 tiGraphicsObjectBar -' #1 tiGluepointToolbar -' #1 tdBezierToolbar -'\********************************************************************************** +'\****************************************************************************** testcase tiTextToolbar @@ -49,351 +43,314 @@ testcase tiTextToolbar Dim Zufall as integer Dim i as integer - '/// open application ///' Call hNewDocument - '/// create a textframe with text ///' hTextrahmenErstellen ("This is a Text, which will be formatted in several ways", 20,20,40,80) - '/// The 'Object Toolbar' now changes ///' sleep 2 - '/// select of the text with + ///' EditSelectAll sleep 2 - '/// Call the textobjectbar from the View-Toolbars-menu ///' Kontext "TextObjectbar" - if TextObjectbar.Exists <> TRUE then 'isVisible - ViewToolbarsTextFormatting - end if - WaitSlot (3000) 'sleep (3) + if TextObjectbar.Exists <> TRUE then 'isVisible + ViewToolbarsTextFormatting + endif + WaitSlot (3000) 'sleep (3) Kontext "TextObjectbar" - Printlog "- choose random font" - randomize - Zufall=((2*Rnd)+1) ' wird nicht auf den verfuegbaren bereich getreckt :-( TODO TBO! - Schriftart.GetItemcount - Schriftart.GetSelText - Schriftart.Select (Zufall) - '/// select any font you like in the listbox 'Font' on 'Object Toolbar' ///' - Printlog Schriftart.GetSelText + " chosen" + Printlog "- choose random font" + randomize + Zufall=((2*Rnd)+1) ' wird nicht auf den verfuegbaren bereich getreckt :-( TODO TBO! + Schriftart.GetItemcount + Schriftart.GetSelText + Schriftart.Select (Zufall) + Printlog Schriftart.GetSelText + " chosen" Kontext "TextObjectbar" - sleep 2 - Printlog "- Change size of font" - '/// select any font you like in the listbox 'Size' on 'Object Toolbar' ///' - Schriftgroesse.Select (Zufall) - Printlog Schriftgroesse.GetSelText + " chosen" + sleep 2 + Printlog "- Change size of font" + Schriftgroesse.Select (Zufall) + Printlog Schriftgroesse.GetSelText + " chosen" Kontext "TextObjectbar" - Printlog "- Font attribute bold" - '/// click button 'Bold' ///' - Fett.Click - sleep 2 + Printlog "- Font attribute bold" + Fett.Click + sleep 2 Kontext "TextObjectbar" - Printlog "- Font attribute cursive" - '/// click button 'Italic' ///' - Kursiv.Click - sleep 2 + Printlog "- Font attribute cursive" + Kursiv.Click + sleep 2 Kontext "TextObjectbar" - Printlog "- Font attribute cursiv" - '/// click button 'Underline' ///' - Unterstrichen.Click - sleep 2 + Printlog "- Font attribute cursiv" + Unterstrichen.Click + sleep 2 Kontext "TextObjectbar" - Printlog "- font attribute color" - '/// click button 'Font Color' and tearoff the box ///' - sleep 3 - FontColorGraphics.TearOff - Kontext "TB_Farbe" - TB_Farbe.Move 20, 20 - Sleep 2 - '/// double click in the middle of the box ///' - TB_Farbe.MouseDoubleClick 50, 50 - Sleep 2 - '/// close box 'Font Color' ///' - TB_Farbe.Close + Printlog "- font attribute color" + sleep 3 + FontColorGraphics.TearOff + Kontext "TB_Farbe" + TB_Farbe.Move 20, 20 + Sleep 2 + TB_Farbe.MouseDoubleClick 50, 50 + Sleep 2 + TB_Farbe.Close Kontext "TextObjectbar" - Printlog "- Allign text left" - '/// click button 'Left' ///' - Linksbuendig.Click - sleep 2 + Printlog "- Allign text left" + Linksbuendig.Click + sleep 2 Kontext "TextObjectbar" - Printlog "- Allign text centered" - '/// click button 'Centered' ///' - Zentriert.Click - sleep 2 + Printlog "- Allign text centered" + Zentriert.Click + sleep 2 Kontext "TextObjectbar" - Printlog "- align text to right" - '/// click button 'Right' ///' - Rechtsbuendig.Click - sleep 2 + Printlog "- align text to right" + Rechtsbuendig.Click + sleep 2 Kontext "TextObjectbar" - Printlog "- Justified" - '/// click button 'Justified' ///' - Blocksatz.Click - sleep 2 + Printlog "- Justified" + Blocksatz.Click + sleep 2 Kontext "TextObjectbar" - if TextObjectbar.isEnabled <> TRUE then - warnlog "Couldn't access TextObjectbar - known bug with bars - FHA" - ViewToolbarsTextFormatting - end if - WaitSlot (2000) 'sleep 2 - Printlog "- Raising Font spacing" - '/// click button 'Increase Spacing' ///' + if TextObjectbar.isEnabled <> TRUE then + warnlog "Couldn't access TextObjectbar - known bug with bars - FHA" + ViewToolbarsTextFormatting + endif + WaitSlot (2000) 'sleep 2 + Printlog "- Raising Font spacing" kontext "TextObjectbar" - sleep 1 - '/// Check if the bar is there. If not - wait for maximum 10 seconds) - iWaitIndex = 0 - do while NOT TextObjectbar.isEnabled AND iWaitIndex < 10 - sleep(1) - iWaitIndex = iWaitIndex + 1 - loop - if NOT TextObjectbar.isEnabled AND iWaitIndex = 10 then - warnlog "Dialogue TextObjectbar didnt work. Ending testcase." - Call hCloseDocument - goto endsub - end if - '/// Activate the Font spacing-buttons ///' - TextObjectbar.OpenContextMenu - sleep 2 - hMenuselectNr (1) - sleep 2 - hMenuItemCheck (13) - sleep 2 - TextObjectbar.OpenContextMenu - sleep 2 - hMenuselectNr (1) - sleep 2 - hMenuItemCheck (14) - sleep 2 - ZeilenabstandErhoehen.Click - sleep 2 + sleep 1 + iWaitIndex = 0 + do while NOT TextObjectbar.isEnabled AND iWaitIndex < 10 + sleep(1) + iWaitIndex = iWaitIndex + 1 + loop + if NOT TextObjectbar.isEnabled AND iWaitIndex = 10 then + warnlog "Dialogue TextObjectbar didnt work. Ending testcase." + Call hCloseDocument + goto endsub + endif + TextObjectbar.OpenContextMenu + sleep 2 + hMenuselectNr (1) + sleep 2 + hMenuItemCheck (13) + sleep 2 + TextObjectbar.OpenContextMenu + sleep 2 + hMenuselectNr (1) + sleep 2 + hMenuItemCheck (14) + sleep 2 + ZeilenabstandErhoehen.Click + sleep 2 Kontext "TextObjectbar" - Printlog "- Decrease Spacing" - '/// click button 'Decrease Spacing' ///' - ZeilenabstandVerringern.Click - sleep 2 + Printlog "- Decrease Spacing" + ZeilenabstandVerringern.Click + sleep 2 Kontext "TextObjectbar" - Printlog "- Numbering and Bullets" - sleep 2 - '/// click button 'Bullets On/Off' ///' - BulletsOnOff.Click - sleep 2 - '/// click button 'Bullets On/Off' ///' - BulletsOnOff.Click - '----------------------------------------------------------------------- + Printlog "- Numbering and Bullets" + sleep 2 + BulletsOnOff.Click + sleep 2 + BulletsOnOff.Click + Kontext "TextObjectBar" - Printlog "- Increase Font /Reduce Font" - sleep 2 - printlog "Click on Increase Font" - IncreaseFont.Click - sleep 2 - printlog "Click on Reduce Font" - ReduceFont.Click - '----------------------------------------------------------------------- + Printlog "- Increase Font /Reduce Font" + sleep 2 + printlog "Click on Increase Font" + IncreaseFont.Click + sleep 2 + printlog "Click on Reduce Font" + ReduceFont.Click + Kontext "TextObjectbar" - Printlog "- Text direction from left to right" - sleep 2 - Printlog "- click button 'Text direction from left to right - try - TextdirectionLeftToRight.Click - printlog "hor does work :-)" - if (gAsianSup = FALSE) then - warnlog " this doesn't have to work if asian lang support is disabled :-)" - end if - catch - if (gAsianSup = TRUE) then - warnlog "hor does NOT work :-(" - end if - endcatch - Printlog "- click button 'Text direction from top to bottom" - try - TextdirectionTopToBottom.Click - printlog "ver does work :-)" - if (gAsianSup = FALSE) then - warnlog " this doesnt have to work if asian lang support is disabled :-)" - end if - catch - if (gAsianSup = TRUE) then - warnlog "ver does NOT work :-( , AsianLanguage support is enabled !" - end if - endcatch + Printlog "- Text direction from left to right" + sleep 2 + Printlog "- click button 'Text direction from left to right + try + TextdirectionLeftToRight.Click + printlog "hor does work :-)" + if (NOT gAsianSup) then + warnlog " this doesn't have to work if asian lang support is disabled :-)" + endif + catch + if (gAsianSup) then + warnlog "hor does NOT work :-(" + endif + endcatch + Printlog "- click button 'Text direction from top to bottom" + try + TextdirectionTopToBottom.Click + printlog "ver does work :-)" + if (gAsianSup = FALSE) then + warnlog " this doesnt have to work if asian lang support is disabled :-)" + endif + catch + if (gAsianSup = TRUE) then + warnlog "ver does NOT work :-( , AsianLanguage support is enabled !" + endif + endcatch Printlog "- open character dialog" Kontext "TextObjectbar" - sleep 2 - '/// click button 'Character' ///' - Zeichenformat.Click - sleep 2 - Kontext - Active.SetPage TabFont - Kontext "TabFont" - sleep 2 - if TabFont.Exists Then - '/// close dialog 'character' ///' - TabFont.Cancel - Printlog "- Tabfont exists" - else - Warnlog "- No dialog exists " - end if + sleep 2 + Zeichenformat.Click + sleep 2 + + Kontext + Active.SetPage TabFont + + Kontext "TabFont" + sleep 2 + if TabFont.Exists Then + TabFont.Cancel + Printlog "- Tabfont exists" + else + Warnlog "- No dialog exists " + endif Kontext "TextObjectbar" - sleep 2 - Printlog "- call properties for paragraph using text object toolbar" - '/// click button 'Paragraph' ///' - Absatzformat.Click - sleep 2 - Kontext - Active.SetPage TabTabulator - Kontext "TabTabulator" - if TabTabulator.Exists Then - Printlog "- TabTabulator exists" - '/// close dialog 'Paragraph' ///' - TabTabulator.Cancel - else - Warnlog "- TabTabulator does not exist" - end if + sleep 2 + Printlog "- call properties for paragraph using text object toolbar" + Absatzformat.Click + sleep 2 + + Kontext + Active.SetPage TabTabulator + + Kontext "TabTabulator" + if TabTabulator.Exists Then + Printlog "- TabTabulator exists" + TabTabulator.Cancel + else + Warnlog "- TabTabulator does not exist" + endif - if (UCase(gApplication)) = "IMPRESS" then ' IMPRESS only - '/// if the Application is Impress: ///' + if ( gApplication = "IMPRESS" ) then ' IMPRESS only Kontext "TextObjectbar" - '/// click button 'Numbering Symbols' ///' - OutlineBullet.Click - kontext - if active.exists (5) then - messagebox.SetPage TabOptionenNumerierung - kontext "TabOptionenNumerierung" - '/// cancel dialog 'Numbering/Bullets' ///' - if (TabOptionenNumerierung.exists (5) ) then - Printlog "Numbering/Bullets window came up :-)" - sleep 2 - TabOptionenNumerierung.cancel - else - warnlog "no Numbering/Bullets window came up :-(" - end if - sleep 2 + OutlineBullet.Click + kontext + if active.exists (5) then + messagebox.SetPage TabOptionenNumerierung + + kontext "TabOptionenNumerierung" + if (TabOptionenNumerierung.exists (5) ) then + Printlog "Numbering/Bullets window came up :-)" + TabOptionenNumerierung.cancel else - warnlog "no Numbering/Bullets window came up :-( 2" - end if - - Printlog "-change order of outline points" - sleep 3 - '/// View->Master View->Outline View ///' - ViewWorkspaceOutlineView - WaitSlot (2000) 'sleep (3) - Kontext "DocumentImpressOutlineView" - sleep 1 - '/// type something ///' - DocumentImpressOutlineView.TypeKeys "Bla bla bla bla bla bla bla bla " - sleep 1 - Kontext "TextObjectbar" - '/// click button 'Promote' ///' - HierachieRunter.Click - sleep 1 - Printlog "- Move back down" - '/// click button 'Denote' ///' - HierachieHoch.Click - sleep 1 - '/// click button 'Denote' ///' - HierachieHoch.Click - sleep 1 - Printlog "- Move paragraph up" - '/// click button 'Move Up', twice to get two slides ///' - AbsatzHoch.Click - sleep 1 - Printlog "- move paragraph back down and switch to drawing view" - '/// click button 'Move Down' ///' - AbsatzRunter.Click - sleep 1 + warnlog "no Numbering/Bullets window came up :-(" + endif + else + warnlog "no Numbering/Bullets window came up :-( 2" + endif + + Printlog "-change order of outline points" + sleep 3 + ViewWorkspaceOutlineView + WaitSlot (2000) 'sleep (3) + + Kontext "DocumentImpressOutlineView" + sleep 1 + DocumentImpressOutlineView.TypeKeys "Bla bla bla bla bla bla bla bla " + sleep 1 + + Kontext "TextObjectbar" + HierachieRunter.Click + sleep 1 + Printlog "- Move back down" + HierachieHoch.Click + sleep 1 + HierachieHoch.Click + sleep 1 + Printlog "- Move paragraph up" + AbsatzHoch.Click + sleep 1 + Printlog "- move paragraph back down and switch to drawing view" + AbsatzRunter.Click + sleep 1 Kontext "Vorschau" if Vorschau.Exists then printlog "- - - - preview window is open, hope there is no problem" ' Vorschau.Close - end if - + endif + else ' DRAW only Kontext "TextObjectbar" - Printlog "- Double" - '/// click button 'Double' ///' - LineSpacing2.Click - sleep 2 + Printlog "- Double" + LineSpacing2.Click + sleep 2 Kontext "TextObjectbar" - Printlog "- 1.5 lines" - '/// click button '1.5 lines' ///' - LineSpacing15.Click - sleep 2 + Printlog "- 1.5 lines" + LineSpacing15.Click + sleep 2 Kontext "TextObjectbar" - Printlog "- Single" - '/// click button 'Single' ///' - LineSpacing1.Click - sleep 2 - end if + Printlog "- Single" + LineSpacing1.Click + sleep 2 + endif - '/// Check if the bar is there. If not - wait for maximum 10 seconds) iWaitIndex = 0 + Kontext "TextObjectbar" - do while TextObjectbar.isEnabled = FALSE AND iWaitIndex < 10 - sleep(1) - iWaitIndex = iWaitIndex + 1 - loop - if TextObjectbar.isEnabled = FALSE AND iWaitIndex = 10 then - warnlog "Dialogue TextObjectbar didnt work. Ending testcase." - Call hCloseDocument - goto endsub - end if - '/// Reset the original value of the Font spacing-buttons ///' - sleep 2 + do while TextObjectbar.isEnabled = FALSE AND iWaitIndex < 10 + sleep(1) + iWaitIndex = iWaitIndex + 1 + loop + if TextObjectbar.isEnabled = FALSE AND iWaitIndex = 10 then + warnlog "Dialogue TextObjectbar didnt work. Ending testcase." + Call hCloseDocument + goto endsub + endif + sleep 2 + Kontext "TextObjectbar" - TextObjectbar.OpenContextMenu - sleep 2 - hMenuselectNr (1) - sleep 2 - hMenuItemUnCheck (13) - sleep 2 - TextObjectbar.OpenContextMenu - sleep 2 - hMenuselectNr (1) - sleep 2 - hMenuItemUnCheck (14) - sleep 2 - '/// Close the TextFormatting Toolbar ///' - ViewToolbarsTextFormatting - WaitSlot (2000) 'sleep 1 - '/// Clear the document from content ///' - if (gApplication = "IMPRESS") then + TextObjectbar.OpenContextMenu + sleep 2 + hMenuselectNr (1) + sleep 2 + hMenuItemUnCheck (13) + sleep 2 + TextObjectbar.OpenContextMenu + sleep 2 + hMenuselectNr (1) + sleep 2 + hMenuItemUnCheck (14) + sleep 2 + ViewToolbarsTextFormatting + WaitSlot (2000) 'sleep 1 + if ( gApplication = "IMPRESS" ) then Kontext "DocumentImpressOutlineView" - DocumentImpressOutlineView.TypeKeys "" - EditSelectAll - DocumentImpressOutlineView.TypeKeys "" - sleep (3) - ViewWorkspaceDrawingView + DocumentImpressOutlineView.TypeKeys "" + hUseAsyncSlot( "EditSelectAll" ) + DocumentImpressOutlineView.TypeKeys "" + sleep (3) + ViewWorkspaceDrawingView + Kontext "DocumentImpress" - WaitSlot (2000) 'sleep 1 - DocumentImpress.TypeKeys "" - EditSelectAll - DocumentImpress.TypeKeys "" + WaitSlot (2000) 'sleep 1 + DocumentImpress.TypeKeys "" + hUseAsyncSlot( "EditSelectAll" ) + DocumentImpress.TypeKeys "" else Kontext "DocumentDraw" - DocumentDraw.TypeKeys "" - EditSelectAll - DocumentDraw.TypeKeys "" - end if + DocumentDraw.TypeKeys "" + hUseAsyncSlot( "EditSelectAll" ) + DocumentDraw.TypeKeys "" + endif Printlog "Test ended." - '/// close application ///' Call hCloseDocument endcase @@ -405,174 +362,153 @@ testcase tiDrawObjectBar Dim i as integer Dim x as integer - '/// open application ///' Call hNewDocument - '/// create rectangle to test the part for draw objects ///' Call hRechteckErstellen (20,20,70,70) sleep 1 '--------------------------- format line ------------------------ Printlog "- call format line using graphic object toolbar" Kontext "DrawingObjectbar" - '/// Check if the Graphic-Toolbar is there. Which it should be. ///' - '/// If it's not - then we call it from the View-Toolbars ///' - if DrawingObjectbar.Exists = FALSE then - ViewToolbarsGraphic - end if - if DrawingObjectbar.Exists = FALSE then - warnlog "Drawing-Objectbar should have been opened, but wasnt" - ViewToolbarsGraphic - end if - - sleep 3 - '/// click button 'line' on 'Object Toolbar' ///' - Linie.Click - sleep 2 - Kontext - Active.SetPage TabLinie - Kontext "TabLinie" - if TabLinie.Exists Then - '/// cancel dialog 'line' ///' - TabLinie.Cancel - Printlog "- TabLinie exists " - else - Warnlog "- TabLinie does not exist" - end if + if DrawingObjectbar.Exists = FALSE then + ViewToolbarsGraphic + endif + if DrawingObjectbar.Exists = FALSE then + warnlog "Drawing-Objectbar should have been opened, but wasnt" + ViewToolbarsGraphic + endif + + sleep 3 + Linie.Click + sleep 2 + Kontext + Active.SetPage TabLinie + Kontext "TabLinie" + if TabLinie.Exists Then + TabLinie.Cancel + Printlog "- TabLinie exists " + else + Warnlog "- TabLinie does not exist" + endif '--------------------------- Linienendenstil -------------------- Printlog "- Style of line ends" Kontext "DrawingObjectbar" - sleep 1 - '/// click button 'Arrow Style' and tearoff the box ///' - Linienendenstil.TearOff - sleep 2 - Kontext "Linienenden" - if Linienenden.Exists Then - Printlog "- dialog exists" - '/// close toolbox 'arrowheads' ///' - Linienenden.Close - else - Warnlog "- Arrowheads does not exist" - end if + sleep 1 + Linienendenstil.TearOff + sleep 2 + Kontext "Linienenden" + if Linienenden.Exists Then + Printlog "- dialog exists" + Linienenden.Close + else + Warnlog "- Arrowheads does not exist" + endif '--------------------------- Linienstil ------------------------- Printlog "- choose style of lines using graphic object toolbar" Kontext "DrawingObjectbar" - sleep 1 - '/// select 2nd entry from the top in listbox 'Line Style' ///' - Linienstil.Select 2 - Printlog Linienstil.GetSelText + " chosen" - '/// select last entry in listbox 'Line Style' ///' - Linienstil.Select Linienstil.GetItemCount - Printlog Linienstil.GetSelText + " chosen" - sleep 2 + sleep 1 + Linienstil.Select 2 + Printlog Linienstil.GetSelText + " chosen" + Linienstil.Select Linienstil.GetItemCount + Printlog Linienstil.GetSelText + " chosen" + sleep 2 '--------------------------- Linienbreite------------------------ Printlog "- check style of lines using graphic object toolbar" Kontext "DrawingObjectbar" - sleep 1 - a = Linienbreite.GetText - SetClipboard a - sleep 1 - '/// set 'Line Width' to "0,5" ///' - Linienbreite.SetText "0,5" - sleep 2 - '/// check if the value is accepted or not ///' - if Linienbreite.GetText = a Then - Warnlog "- changes in edit field did not happen; is: '"+Linienbreite.GetText+"', should be : '"+"0,5"+"'" - else - Printlog "- Width of lines changed" - end if + sleep 1 + a = Linienbreite.GetText + SetClipboard a + sleep 1 + Linienbreite.SetText "0,5" + sleep 2 + if Linienbreite.GetText = a Then + Warnlog "- changes in edit field did not happen; is: '"+Linienbreite.GetText+"', should be : '"+"0,5"+"'" + else + Printlog "- Width of lines changed" + endif '--------------------------- Linienfarbe ------------------------ Printlog "- change line color" Kontext "DrawingObjectbar" - sleep 1 - Zaehler = Linienfarbe.GetItemCount - randomize - i = Int(Zaehler*Rnd+1) - '/// select some entry in the listbox 'Line Color' ///' - Linienfarbe.Select i - Printlog Linienfarbe.GetSelText + " chosen" + sleep 1 + Zaehler = Linienfarbe.GetItemCount + randomize + i = Int(Zaehler*Rnd+1) + Linienfarbe.Select i + Printlog Linienfarbe.GetSelText + " chosen" '--------------------------- Flaechenformatierung --------------- Printlog "- Call Format area using graphic object toolbar" Kontext "DrawingObjectbar" - sleep 1 - '/// click button 'Area' ///' - try - Flaeche.Click - catch - printlog "clicking on area took ages :-(" - endcatch - sleep 5 - Kontext - Active.SetPage TabArea - Kontext "TabArea" - if TabArea.Exists Then - Printlog "- TabArea exists " - '/// cancel dialog 'Area' ///' - TabArea.Cancel - else - Warnlog "- TabArea does not exist" - end if + sleep 1 + try + Flaeche.Click + catch + printlog "clicking on area took ages :-(" + endcatch + sleep 5 + Kontext + Active.SetPage TabArea + Kontext "TabArea" + if TabArea.Exists Then + Printlog "- TabArea exists " + TabArea.Cancel + else + Warnlog "- TabArea does not exist" + endif '--- sleep 1 Kontext "DrawingObjectbar" + sleep 1 + x = AreaStyle.GetItemCount + i = 1 + for i = i to x + AreaStyle.Select i + Printlog "Area Style: (" + i + "/" + x + ") - " + AreaStyle.GetSelText sleep 1 - x = AreaStyle.GetItemCount - i = 1 - for i = i to x - AreaStyle.Select i - Printlog "Area Style: (" + i + "/" + x + ") - " + AreaStyle.GetSelText - sleep 1 - '/// for every item in the listbox 'Area Style' select the last item in the listbox 'Area Filling' ///' - if AreaStyle.GetSelIndex > 1 then - Printlog " Area Filling " + AreaFilling.GetSelIndex + " - " + AreaFilling.GetItemCount - if (i <> 1) AND (AreaFilling.GetItemCount <> 0) then - if (AreaFilling.GetSelIndex = 0) AND (AreaFilling.GetItemCount > 0) then - printlog "default item is 0 => means nothing; NO BUG! 100909" - end if - AreaFilling.Select (AreaFilling.GetItemCount) - Printlog " Selected: " + AreaFilling.GetSelIndex + " - " + AreaFilling.GetSelText - end if - end if - next i + if AreaStyle.GetSelIndex > 1 then + Printlog " Area Filling " + AreaFilling.GetSelIndex + " - " + AreaFilling.GetItemCount + if (i <> 1) AND (AreaFilling.GetItemCount <> 0) then + if (AreaFilling.GetSelIndex = 0) AND (AreaFilling.GetItemCount > 0) then + printlog "default item is 0 => means nothing; NO BUG! 100909" + endif + AreaFilling.Select (AreaFilling.GetItemCount) + Printlog " Selected: " + AreaFilling.GetSelIndex + " - " + AreaFilling.GetSelText + endif + endif + next i '---------------------------- Schatten -------------------------- Printlog "- Assign shadow using graphic object toolbar" Kontext "DrawingObjectbar" - sleep 1 - '/// click button 'Shadow' ///' - Schatten.Click - sleep 1 - Printlog "- shadow assigned" - - '---------------------------- Praesentationsflyer --------------- - '/// if Application is Impress: ///' - if (UCase(gApplication)) = "IMPRESS" then ' IMPRESS only - Printlog "- Call presentation flyer" - Kontext "CommonTaskbar" ' first check , if presentation flyer is up! if not -> make it up :-) - '///+ if 'Presentation Box' is not visible, click button 'Presentation Box on/off' ///' - if CommonTaskbar.Exists Then - printlog "- flyer is already visible :-)" - else - printlog "- flyer wasn't visible :-( -will be now!" - Kontext "DrawingObjectbar" - sleep 1 - ViewToolbarsPresentation ' put it up again! - end if - end if - '/// Make sure the Graphics-Toolbar is visible ///' - if ((UCase(gApplication)) = "IMPRESS") then ' IMPRESS only + sleep 1 + Schatten.Click + sleep 1 + Printlog "- shadow assigned" + + '---------------------------- Praesentationsflyer --------------- + if ( gApplication = "IMPRESS" ) then ' IMPRESS only + Printlog "- Call presentation flyer" + Kontext "CommonTaskbar" ' first check , if presentation flyer is up! if not -> make it up :-) + if CommonTaskbar.Exists Then + printlog "- flyer is already visible :-)" + else + printlog "- flyer wasn't visible :-( -will be now!" Kontext "DrawingObjectbar" - if DrawingObjectbar.isVisible = FALSE then - ViewToolbarsGraphic - end if - end if - '/// close application ///' + sleep 1 + ViewToolbarsPresentation ' put it up again! + endif + endif + if ((UCase(gApplication)) = "IMPRESS") then ' IMPRESS only + Kontext "DrawingObjectbar" + if DrawingObjectbar.isVisible = FALSE then + ViewToolbarsGraphic + endif + endif Call hCloseDocument endcase @@ -580,584 +516,485 @@ endcase testcase tiGraphicsObjectBar dim i as integer - '/// open application ///' Call hNewDocument - '/// insert a graphic "global\input\graf_inp\desp.bmp" ///' - hGrafikeinfuegen ConvertPath (gTesttoolPath + "global\input\graf_inp\desp.bmp") + hGrafikeinfuegen ConvertPath (gTesttoolPath & "global\input\graf_inp\desp.bmp") + sleep 1 + Kontext "GraphicObjectbar" + if ( NOT GraphicObjectbar.Exists() ) then + ViewToolbarsPicture + endif + sleep 1 + Filter.TearOff + sleep 1 + Kontext "GraphicFilterBar" + sleep 1 + Printlog "invert" + Invert.Click + sleep 3 + Printlog "smooth" + Smooth.Click + sleep 3 + Printlog "sharpen" + Sharpen.Click + sleep 3 + Printlog "remove noise" + Remove.Click + sleep 3 + Printlog "solarization" + Solarization.Click + sleep 3 + Kontext "Solarization" + if Solarization.exists (5) then sleep 1 - Kontext "GraphicObjectbar" - if GraphicObjectbar.Exists = FALSE then - ViewToolbarsPicture - end if - sleep 1 - '/// click button 'Filter' and tearoff the box in the Objectbar///' - Filter.TearOff - sleep 1 - Kontext "GraphicFilterBar" - sleep 1 - Printlog "invert" - '/// click button 'Invert' in window 'Filters' ///' - Invert.Click - sleep 3 - Printlog "smooth" - '/// click button 'Smooth' in window 'Filters' ///' - Smooth.Click - sleep 3 - Printlog "sharpen" - '/// click button 'Sharpen' in window 'Filters' ///' - Sharpen.Click - sleep 3 - Printlog "remove noise" - '/// click button 'RemoveNoise' in window 'Filters' ///' - Remove.Click - sleep 3 - Printlog "solarization" - '/// click button 'Solarization' in window 'Filters' ///' - Solarization.Click - sleep 3 - Kontext "Solarization" - if Solarization.exists (5) then - sleep 1 - Call Dialogtest ( Solarization ) - sleep 1 - '/// press 'more' and 'less' in field 'Trashold Value' on dialog 'Solarization' ///' - Value.More - Value.Less - '/// check checkbox 'Invert' on dialog 'Solarization' ///' - Invert.Check - '/// close dialog 'Solarization' with OK ///' - Solarization.OK - else - warnlog "solarization didn't came up :-(" - end if - sleep 1 - Kontext "GraphicFilterBar" - sleep 1 - Printlog "aging" - '/// click button 'Aging' in window 'Filters' ///' - Aging.Click - Kontext "Aging" - sleep 1 - Call Dialogtest ( Aging ) - '/// press 'more' and 'less' in field 'Aging degree' on dialog 'Aging' ///' - AgingDegree.More - AgingDegree.Less - sleep 1 - '/// close dialog 'Aging' with OK ///' - Aging.OK - sleep 1 - Kontext "GraphicFilterBar" - sleep 1 - Printlog "poster" - '/// click button 'Posterize' in window 'Filters' ///' - Posterize.Click - sleep 1 - Kontext "Posterize" - sleep 1 - Call Dialogtest ( Posterize ) - '/// press 'more' and 'less' in field 'Aging degree' on dialog 'Posterize' ///' - PosterColors.More - PosterColors.Less - sleep 1 - '/// close dialog 'Posterize' with OK ///' - Posterize.OK - sleep 2 - kontext "GraphicFilterBar" - sleep 1 - Printlog "pop" - '/// click button 'PopArt' in window 'Filters' ///' - Art.Click - sleep 3 - Printlog "charcoal" - '/// click button 'CharcoalSketch' in window 'Filters' ///' - CharcoalSketch.Click - sleep 3 - Printlog "relief" - '/// click button 'Relief' in window 'Filters' ///' - Relief.Click - Kontext "Relief" - sleep 1 - Call Dialogtest ( Relief ) - LightSource.TypeKeys "" - '/// close dialog 'Relief' with OK ///' - Relief.OK - sleep 3 - Kontext "GraphicFilterBar" - Printlog "mos" - '/// click button 'Mosaic' in window 'Filters' ///' - Mosaic.Click - sleep 1 - Kontext "Mosaic" - sleep 1 - Call Dialogtest ( Mosaic ) - '/// press 'more' and 'less' in field 'Width' on dialog 'Mosaic' ///' - Width.More - Width.Less - '/// press 'more' and 'less' in field 'Height' on dialog 'Mosaic' ///' - Height.More - Height.Less - '/// check checkbox 'Enhance Edges' on dialog 'Mosaic' ///' - EnhanceEdges.Check - '/// close dialog 'Mosaic' with OK ///' - Mosaic.OK - sleep 3 - Kontext "GraphicFilterBar" - '/// close dialog 'Filters' ///' - GraphicFilterBar.Close - - Kontext "GraphicObjectbar" - if GraphicObjectbar.Exists = FALSE then ViewToolbarsPicture - sleep 1 - '/// select every entry in the listbox 'Graphics mode' ///' - for i = 1 to Grafikmodus.GetItemCount - Grafikmodus.select i - sleep 1 - next i - - '/// Click on the icon for 'ColorSettings' to open the colorbar ///' - ColorSettings.Click - Kontext "ColorBar" - - '/// press 'more' and 'less' in field 'Red' on colorbar ///' - try - Rotanteil.More - Rotanteil.Less - catch - warnlog "not working from testtool redvalue "+ rotanteil.GetRT - endcatch - '/// press 'more' and 'less' in field 'Green' on colorbar ///' - try - Gruenanteil.More - Gruenanteil.Less - catch - warnlog "not working from testtool Greenvalue." - endcatch - '/// press 'more' and 'less' in field 'Blue' on colorbar ///' - try - Blauanteil.More - Blauanteil.Less - catch - warnlog "not working from testtool Bluevalue." - endcatch - '/// press 'more' and 'less' in field 'Brightness' on colorbar ///' - try - Helligkeit.More - Helligkeit.Less - catch - warnlog "not working from testtool Brightness." - endcatch - '/// press 'more' and 'less' in field 'Contrast' on colorbar ///' - try - Kontrast.More - Kontrast.Less - catch - warnlog "not working from testtool Contrast." - endcatch - '/// press 'more' and 'less' in field 'Gamma' on colorbar ///' - try - Gamma.More - Gamma.Less - catch - warnlog "not working from testtool Gamma." - endcatch - - ColorBar.Close - Kontext "GraphicObjectbar" - - '/// press 'more' and 'less' in field 'Transparency' on objectbar ///' - try - Transparenz.More - Transparenz.Less - catch - warnlog "Not working from testtool Transparency." - endcatch - - '/// press button 'Crop' on objectbar ///' - Crop.click - '/// Opening Dialog via Slot - FormatCropPicture - - kontext "TabZuschneiden" - '/// check radiobutton 'Keep scale' on dialog 'Crop' ///' - GroesseBeibehalten.Check - '/// check radiobutton 'Keep Image Size' on dialog 'Crop' ///' - MassstabBeibehalten.Check - '/// press 'more' and 'less' in field 'Left' in section 'Crop' on dialog 'Crop' ///' - Links.More - Links.Less - '/// press 'more' and 'less' in field 'Right' in section 'Crop' on dialog 'Crop' ///' - Rechts.More - Rechts.Less - '/// press 'more' and 'less' in field 'Top' in section 'Crop' on dialog 'Crop' ///' - Oben.More - Oben.Less - '/// press 'more' and 'less' in field 'Bottom' in section 'Crop' on dialog 'Crop' ///' - Unten.More - Unten.Less - '/// press 'more' and 'less' in field 'Width' in section 'Scale' on dialog 'Crop' ///' - MassstabBreite.More - MassstabBreite.Less - '/// press 'more' and 'less' in field 'Height' in section 'Scale' on dialog 'Crop' ///' - MassstabHoehe.More - MassstabHoehe.Less - '/// press 'more' and 'less' in field 'Width' in section 'Image size' on dialog 'Crop' ///' - GroesseBreite.More - GroesseBreite.Less - '/// press 'more' and 'less' in field 'Height' in section 'Image size' on dialog 'Crop' ///' - GroesseHoehe.More - GroesseHoehe.Less - '/// click button 'Original Size' on dialog 'Crop' ///' - Originalgroesse.Click - '/// cancel dialog 'Crop' ///' - TabZuschneiden.Cancel - - '/// close application ///' + Call Dialogtest ( Solarization ) + sleep 1 + Value.More + Value.Less + Invert.Check + Solarization.OK + else + warnlog "solarization didn't came up :-(" + endif + sleep 1 + Kontext "GraphicFilterBar" + sleep 1 + Printlog "aging" + Aging.Click + Kontext "Aging" + sleep 1 + Call Dialogtest ( Aging ) + AgingDegree.More + AgingDegree.Less + sleep 1 + Aging.OK + sleep 1 + Kontext "GraphicFilterBar" + sleep 1 + Printlog "poster" + Posterize.Click + sleep 1 + Kontext "Posterize" + sleep 1 + Call Dialogtest ( Posterize ) + PosterColors.More + PosterColors.Less + sleep 1 + Posterize.OK + sleep 2 + kontext "GraphicFilterBar" + sleep 1 + Printlog "pop" + Art.Click + sleep 3 + Printlog "charcoal" + CharcoalSketch.Click + sleep 3 + Printlog "relief" + Relief.Click + Kontext "Relief" + sleep 1 + Call Dialogtest ( Relief ) + LightSource.TypeKeys "" + Relief.OK + sleep 3 + Kontext "GraphicFilterBar" + Printlog "mos" + Mosaic.Click + sleep 1 + Kontext "Mosaic" + sleep 1 + Call Dialogtest ( Mosaic ) + Width.More + Width.Less + Height.More + Height.Less + EnhanceEdges.Check + Mosaic.OK + sleep 3 + Kontext "GraphicFilterBar" + GraphicFilterBar.Close + + Kontext "GraphicObjectbar" + if GraphicObjectbar.Exists = FALSE then + ViewToolbarsPicture + endif + sleep 1 + for i = 1 to Grafikmodus.GetItemCount + Grafikmodus.select i + sleep 1 + next i + + ColorSettings.Click + Kontext "ColorBar" + + try + Rotanteil.More + Rotanteil.Less + catch + warnlog "not working from testtool redvalue "+ rotanteil.GetRT + endcatch + try + Gruenanteil.More + Gruenanteil.Less + catch + warnlog "not working from testtool Greenvalue." + endcatch + try + Blauanteil.More + Blauanteil.Less + catch + warnlog "not working from testtool Bluevalue." + endcatch + try + Helligkeit.More + Helligkeit.Less + catch + warnlog "not working from testtool Brightness." + endcatch + try + Kontrast.More + Kontrast.Less + catch + warnlog "not working from testtool Contrast." + endcatch + try + Gamma.More + Gamma.Less + catch + warnlog "not working from testtool Gamma." + endcatch + + ColorBar.Close + Kontext "GraphicObjectbar" + + try + Transparenz.More + Transparenz.Less + catch + warnlog "Not working from testtool Transparency." + endcatch + + Crop.click + FormatCropPicture + + kontext "TabZuschneiden" + GroesseBeibehalten.Check + MassstabBeibehalten.Check + Links.More + Links.Less + Rechts.More + Rechts.Less + Oben.More + Oben.Less + Unten.More + Unten.Less + MassstabBreite.More + MassstabBreite.Less + MassstabHoehe.More + MassstabHoehe.Less + GroesseBreite.More + GroesseBreite.Less + GroesseHoehe.More + GroesseHoehe.Less + Originalgroesse.Click + TabZuschneiden.Cancel + Call hCloseDocument endcase '------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------' testcase tiGluepointToolbar - '/// open application ///' Call hNewDocument - '/// create 2 rectangles ///' Call hRechteckErstellen 20,20,40,40 Call hRechteckErstellen 60,60,80,80 sleep 2 - '/// View->Toolbars->Option Bar ///' ViewToolbarsOptionbar - '/// at the bottom of the office has a toolbar to appear ///' sleep 2 Kontext "Optionsbar" + if Optionsbar.Exists = False Then + ViewToolbarsOptionbar + Kontext "Optionsbar" if Optionsbar.Exists = False Then - ViewToolbarsOptionbar - Kontext "Optionsbar" - if Optionsbar.Exists = False Then - warnlog "Can't open Optionsbar." - end if - end if - sleep 2 - Kontext "Toolbar" - sleep 1 - '/// click button 'Connector' on Toolbar ///' - Verbinder.Click - '/// make a line with the mouse ///' - gMouseMove 30,30,70,70 - sleep 3 - Kontext "Toolbar" - GluePoints.Click - sleep 1 - '/// open Glue Points Toolbar ///' - Kontext "Gluepointsobjectbar" - if Gluepointsobjectbar.Exists = False Then - ViewToolbarsGluepoints - end if - sleep 3 - '-------------------------------------- Klebepunkt einfuegen ---- - try - '/// click button 'Insert Glue Point' on Objecttoolbar ///' - PunkteEinfuegen.Click - sleep 2 - '/// click 2 times onto the created line ///' - gMouseClick 25,30 - sleep 1 - gMouseclick 25,30 - Printlog "- insert gluepoint works" - catch - Warnlog "- gluepoint could not be insert. Following errors might have their reason here" - endcatch - sleep 3 - Kontext "Gluepointsobjectbar" - - '-------------------------------------- Links ------------------- - try - '/// click button 'Exit Direction Left' on Objecttoolbar ///' - Links.Click - Printlog "- gluepoint left works" - catch - Warnlog "- gluepoint left does not work" - endcatch - sleep 1 - '-------------------------------------- Rechts ------------------ - try - '/// click button 'Exit Direction Right' on Objecttoolbar ///' - Rechts.Click - Printlog "- gluepoint right works" - catch - Warnlog "- gluepoint right does not work" - endcatch - sleep 1 - '-------------------------------------- Oben -------------------- - try - '/// click button 'Exit Direction Top' on Objecttoolbar ///' - Oben.Click - Printlog "- gluepoint top works" - catch - Warnlog "- gluepoint top does not work" - endcatch - sleep 1 - '-------------------------------------- Unten ------------------- - try - '/// click button 'Exit Direction Bottom' on Objecttoolbar ///' - Unten.Click - Printlog "- gluepoint bottom works" - catch - Warnlog "- gluepoint bottom does not work" - endcatch - sleep 1 - '---------------------- Position an Objekt anpassen ------------- - try - '/// click button 'Glue Point Relative' on Objecttoolbar ///' - PositionAnObjektAnpassen.Click - Printlog "- align position to object works" - gMouseClick 25,30 ' if you don't click onto an existing point, the state changes back :-[ - catch - Warnlog "- align position to object does not work" - endcatch - Kontext "Gluepointsobjectbar" - sleep 1 - '------------------------------------- Horizontal links --------- - if PositionAnObjektAnpassen.exists then printlog "PositionAnObjektAnpassen = Exists" - if PositionAnObjektAnpassen.GetState(2) <> 0 then PositionAnObjektAnpassen.Click ' make unpressed! - '0 = not pressed. 1 = pressed. - sleep 2 - try - Kontext "Gluepointsobjectbar" - '/// click button 'Glue Point Horizontal Left' on Objecttoolbar ///' - HorizontalLinks.Click - Printlog "- align horizontal left works" - catch - Warnlog "- align horizontal left does not work" - PositionAnObjektAnpassen.Click ' that's the middle button, it has to be UP/not activated! - for i = 1 to Gluepointsobjectbar.GetItemCount - if (Gluepointsobjectbar.GetState ( i, 0 ) <> 0 ) then ' is no seperator - printlog "----------------------------------------------------------------------" - printlog "helpid : " + Gluepointsobjectbar.Getstate ( i, 0 ) + " number in row: " + i - printlog "itemtype: " + Gluepointsobjectbar.GetState ( i, 1 ) - printlog "state : " + Gluepointsobjectbar.GetState ( i, 2 ) - printlog "----------------------------------------------------------------------" - end if - next i - endcatch - sleep 2 - '------------------------------------- Horizontal rechts -------- - try - '/// click button 'Glue Point Horizontal Right' on Objecttoolbar ///' - HorizontalRechts.Click - Printlog "- Align horizontal right does work" - catch - Warnlog "- Align horizontal right does notwork" - endcatch - sleep 1 - '------------------------------------- Horizontal zentriert ----- - try - '/// click button 'Glue Point Horizontal Center' on Objecttoolbar ///' - HorizontalZentriert.Click - Printlog "- align horizontal center does work" - catch - Warnlog "- align horizontal center does work" - endcatch - sleep 1 - '------------------------------------- Vertikal oben ------------ - try - '/// click button 'Glue Point Vertical Top' on Objecttoolbar ///' - VertikalOben.Click - sleep 1 - Printlog "- Align vertical top does work" - catch - Warnlog "- Align vertical top does not work" - endcatch - '------------------------------------- Vertikal unten ----------- - try - '/// click button 'Glue Point Vertical Bottom' on Objecttoolbar ///' - VertikalUnten.Click - sleep 1 - printlog "- Align vertical bottom does work" - catch - Warnlog "- Align vertical bottom does not work" - endcatch - '------------------------------------- Vertikal zentriert ------- - try - '/// click button 'Glue Point Vertical Center' on Objecttoolbar ///' - VertikalZentriert.Click - sleep 1 - Printlog "- Align vertical center does work" - catch - Warnlog "- Align vertical center does not work" - endcatch - - Printlog "- End of testing gluepoints" - - '/// Close the Option Bar via View->Toolbars->Option Bar ///' + warnlog "Can't open Optionsbar." + endif + endif + sleep 2 + Kontext "Toolbar" + sleep 1 + Verbinder.Click + gMouseMove 30,30,70,70 + sleep 3 + Kontext "Toolbar" + GluePoints.Click + sleep 1 + Kontext "Gluepointsobjectbar" + if Gluepointsobjectbar.Exists = False Then + ViewToolbarsGluepoints + endif + sleep 3 + '-------------------------------------- Klebepunkt einfuegen ---- + try + PunkteEinfuegen.Click + sleep 2 + gMouseClick 25,30 + sleep 1 + gMouseclick 25,30 + Printlog "- insert gluepoint works" + catch + Warnlog "- gluepoint could not be insert. Following errors might have their reason here" + endcatch + sleep 3 + Kontext "Gluepointsobjectbar" + + '-------------------------------------- Links ------------------- + try + Links.Click + Printlog "- gluepoint left works" + catch + Warnlog "- gluepoint left does not work" + endcatch + sleep 1 + '-------------------------------------- Rechts ------------------ + try + Rechts.Click + Printlog "- gluepoint right works" + catch + Warnlog "- gluepoint right does not work" + endcatch + sleep 1 + '-------------------------------------- Oben -------------------- + try + Oben.Click + Printlog "- gluepoint top works" + catch + Warnlog "- gluepoint top does not work" + endcatch + sleep 1 + '-------------------------------------- Unten ------------------- + try + Unten.Click + Printlog "- gluepoint bottom works" + catch + Warnlog "- gluepoint bottom does not work" + endcatch + sleep 1 + '---------------------- Position an Objekt anpassen ------------- + try + PositionAnObjektAnpassen.Click + Printlog "- align position to object works" + gMouseClick 25,30 ' if you don't click onto an existing point, the state changes back :-[ + catch + Warnlog "- align position to object does not work" + endcatch + Kontext "Gluepointsobjectbar" + sleep 1 + '------------------------------------- Horizontal links --------- + if PositionAnObjektAnpassen.exists then + printlog "PositionAnObjektAnpassen = Exists" + endif + if PositionAnObjektAnpassen.GetState(2) <> 0 then + PositionAnObjektAnpassen.Click ' make unpressed! + endif + '0 = not pressed. 1 = pressed. + sleep 2 + try + Kontext "Gluepointsobjectbar" + HorizontalLinks.Click + Printlog "- align horizontal left works" + catch + Warnlog "- align horizontal left does not work" + PositionAnObjektAnpassen.Click ' that's the middle button, it has to be UP/not activated! + for i = 1 to Gluepointsobjectbar.GetItemCount + if (Gluepointsobjectbar.GetState ( i, 0 ) <> 0 ) then ' is no seperator + printlog "----------------------------------------------------------------------" + printlog "helpid : " + Gluepointsobjectbar.Getstate ( i, 0 ) + " number in row: " + i + printlog "itemtype: " + Gluepointsobjectbar.GetState ( i, 1 ) + printlog "state : " + Gluepointsobjectbar.GetState ( i, 2 ) + printlog "----------------------------------------------------------------------" + endif + next i + endcatch + sleep 2 + '------------------------------------- Horizontal rechts -------- + try + HorizontalRechts.Click + Printlog "- Align horizontal right does work" + catch + Warnlog "- Align horizontal right does notwork" + endcatch + sleep 1 + '------------------------------------- Horizontal zentriert ----- + try + HorizontalZentriert.Click + Printlog "- align horizontal center does work" + catch + Warnlog "- align horizontal center does work" + endcatch + sleep 1 + '------------------------------------- Vertikal oben ------------ + try + VertikalOben.Click + sleep 1 + Printlog "- Align vertical top does work" + catch + Warnlog "- Align vertical top does not work" + endcatch + '------------------------------------- Vertikal unten ----------- + try + VertikalUnten.Click + sleep 1 + printlog "- Align vertical bottom does work" + catch + Warnlog "- Align vertical bottom does not work" + endcatch + '------------------------------------- Vertikal zentriert ------- + try + VertikalZentriert.Click + sleep 1 + Printlog "- Align vertical center does work" + catch + Warnlog "- Align vertical center does not work" + endcatch + + Printlog "- End of testing gluepoints" + ViewToolbarsOptionbar sleep 2 Kontext "Optionsbar" - if Optionsbar.Exists = True Then - warnlog "Couldnt close Optionsbar." - end if - '/// close application ///' + if Optionsbar.Exists Then + warnlog "Couldnt close Optionsbar." + endif Call hCloseDocument endcase '------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------' testcase tdBezierToolbar - '/// Open the Application ///' Call hNewDocument - '/// Create a rectangle. ///' Call hRechteckErstellen ( 10, 10, 30, 40 ) sleep (1) - '/// Convert the recttangle to an 'Polygon-object' via the context-menu for the object ///' Call hOpenContextMenu - Call hMenuSelectNr (11) '/// Convert to ///' - Call hMenuSelectNr (2) '/// Polygon-object ///' sleep (1) - '/// In the context-menu, select 'Edit Points" ///' Call hOpenContextMenu - Call hMenuSelectNr (5) '/// Select entry nr 5 (Edit Points) ///' sleep (2) Kontext "Bezierobjectbar" + if Bezierobjectbar.Exists <> TRUE then + ViewToolbarsBezier + Sleep (2) if Bezierobjectbar.Exists <> TRUE then - ViewToolbarsBezier - Sleep (2) - if Bezierobjectbar.Exists <> TRUE then - warnlog "Bezierobjectbar did not show up. Check why." - end if - end if + warnlog "Bezierobjectbar did not show up. Check why." + endif + endif '----------------------------------- Punkte verschieben ------------------------------------ - '/// Select a part of the object with the keyboard ///' - hTypeKeys "", 4 '/// Selects the fourth vector. ///' - hTypeKeys "", 40 '/// Moves the selected vector 40 steps. ///' - '/// The 'Object Toolbar' now changes ///' Kontext "Bezierobjectbar" - if Bezierobjectbar.Exists <> TRUE then - ViewToolbarsBezier - Sleep 2 - end if - if Bezierobjectbar.Exists <> TRUE then - Warnlog "The Bezier-Objectbar should have been opened, but wasnt." - ViewToolbarsBezier - Sleep 2 - end if + if Bezierobjectbar.Exists <> TRUE then + ViewToolbarsBezier + Sleep 2 + endif + if Bezierobjectbar.Exists <> TRUE then + Warnlog "The Bezier-Objectbar should have been opened, but wasnt." + ViewToolbarsBezier + Sleep 2 + endif Kontext "Bezierobjectbar" - sleep 1 - Printlog "- Move points" - '/// click button 'Move points' on 'Object Toolbar' ///' - Verschieben.Click - sleep 2 - - hTypeKeys "" - hTypeKeys "" '/// Marks the selected vector. ///' - hTypeKeys "", 20 '/// Moves the vector 20 with "arrow right", twenty times. ///' - - Printlog "- Insert points" - '/// Click button 'Insert points' on 'Object Toolbar' ///' + sleep 1 + Printlog "- Move points" + Verschieben.Click + sleep 2 + + hTypeKeys "" + + Printlog "- Insert points" Kontext "Bezierobjectbar" - Einfuegen.Click - sleep 2 - Bezierobjectbar.Move 20, 20 - sleep (1) - Printlog "- Delete points" - - '/// Select another part of the object with spanning a selection with the mouse ///' - gMouseMove 25,25,45,45 - - hTypeKeys "", 2 '/// Select the second next vector. ///' - hTypeKeys "" '/// Mark the selected vector. ///' - hTypeKeys "" '/// Select and mark the next vector. ///' - - sleep 2 + Einfuegen.Click + sleep 2 + Bezierobjectbar.Move 20, 20 + sleep (1) + Printlog "- Delete points" + + gMouseMove 25,25,45,45 + + + sleep 2 Kontext "Bezierobjectbar" - sleep 2 - Printlog "- Convert into curve" - '/// click button 'convert to curve' on 'Object Toolbar' ///' - InKurve.Click - sleep 2 - Printlog "- Place edge point" - '/// click button 'corner point' on 'Object Toolbar' ///' - Ecke.Click - sleep 2 - Printlog "- Smooth transition" - '/// click button 'smooth transition' on 'Object Toolbar' ///' - Glatt.Click - sleep 2 - Printlog "- Symetric transition" - '/// click button 'symmetric transition' on 'Object Toolbar' ///' - Symmetrisch.Click - sleep 2 - - '/// Click button 'Eliminate points' on 'Object Toolbar' ///' + sleep 2 + Printlog "- Convert into curve" + InKurve.Click + sleep 2 + Printlog "- Place edge point" + Ecke.Click + sleep 2 + Printlog "- Smooth transition" + Glatt.Click + sleep 2 + Printlog "- Symetric transition" + Symmetrisch.Click + sleep 2 + Kontext "Bezierobjectbar" - PunkteReduzieren.Click - sleep 2 - - '/// Mark another point ///' - hTypeKeys "" - hTypeKeys "" - - '/// click button 'split curve' on 'Object Toolbar' ///' + PunkteReduzieren.Click + sleep 2 + + hTypeKeys "" + hTypeKeys "" + Kontext "Bezierobjectbar" - try - Auftrennen.Click - catch - Warnlog "- 'Break' could not be executed" - endcatch - sleep 2 + try + Auftrennen.Click + catch + Warnlog "- 'Break' could not be executed" + endcatch + sleep 2 - '/// Mark all points ///' - hTypeKeys "" - hTypeKeys "" + hTypeKeys "" + hTypeKeys "" - Printlog "- Close bezier" + Printlog "- Close bezier" Kontext "Bezierobjectbar" + try + Schliessen.Click + catch + InKurve.Click + sleep 2 try - '/// click button 'close bezier' on 'Object Toolbar' ///' Schliessen.Click catch - InKurve.Click - sleep 2 - try - Schliessen.Click - catch - warnlog "Couldn't push button :-( can't reproduce it now, mostly seen on linux, if i loop this test, it happens only 1/5 of the time ... :-)" - endcatch + warnlog "Couldn't push button :-( can't reproduce it now, mostly seen on linux, if i loop this test, it happens only 1/5 of the time ... :-)" endcatch - sleep 2 + endcatch + sleep 2 - '/// Mark all points ///' - hTypeKeys "" - hTypeKeys "" + hTypeKeys "" + hTypeKeys "" - '/// 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 + Printlog "- Break curve" + 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" - sleep 2 - Toolbar.OpenContextMenu ' Enable forms button in menuebar - sleep 2 - hMenuselectNr (1) - sleep 2 - hMenuItemUnCheck (7) - sleep 2 - '/// Close application ///' + sleep 2 + Toolbar.OpenContextMenu ' Enable forms button in menuebar + sleep 2 + hMenuselectNr (1) + sleep 2 + hMenuItemUnCheck (7) + sleep 2 Call hCloseDocument endcase -- cgit