1 'encoding UTF-8 Do not remove or change this line!
2 '**************************************************************************
3 '* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
5 '* Copyright 2008 by Sun Microsystems, Inc.
7 '* OpenOffice.org - a multi-platform office productivity suite
9 '* $RCSfile: w_004_.inc,v $
13 '* last change: $Author: rt $ $Date: 2008-09-04 09:21:45 $
15 '* This file is part of OpenOffice.org.
17 '* OpenOffice.org is free software: you can redistribute it and/or modify
18 '* it under the terms of the GNU Lesser General Public License version 3
19 '* only, as published by the Free Software Foundation.
21 '* OpenOffice.org is distributed in the hope that it will be useful,
22 '* but WITHOUT ANY WARRANTY; without even the implied warranty of
23 '* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
24 '* GNU Lesser General Public License version 3 for more details
25 '* (a copy is included in the LICENSE file that accompanied this code).
27 '* You should have received a copy of the GNU Lesser General Public License
28 '* version 3 along with OpenOffice.org. If not, see
29 '* <http://www.openoffice.org/license.html>
30 '* for a copy of the LGPLv3 License.
32 '/************************************************************************
34 '* owner : helge.delfs@sun.com
36 '* short description : Testcases with connection to the Insert-menu.
38 '\***********************************************************************
42 printLog Chr(13) + "--------- Insert Menu ( w_004_ ) ----------"
43 gApplication = "WRITER"
45 Call tInsertManualBreak
48 Call tInsertFieldsOther
49 Call tInsertSpecialCharacter
57 Call tInsertCrossReference
60 Call tInsertIndexesEntry
61 Call tInsertIndexesIndex
62 Call tInsertIndexesBibliographyEntry
68 Call tInsertHorizontalLine
69 Call tInsertGraphicsFromFile
70 Call tInsertAllGraphicsFromFile
72 Call tInsertObjectOLEObject
73 Call tInsertObjectPlugIn
74 Call tInsertObjectSound
75 Call tInsertObjectVideo
76 Call tInsertObjectFormula
77 Call tInsertObjectChart
82 Call tHtmlDocInsertFields
83 Call tHtmlDocInsertFieldsOther
84 Call tHtmlDocInsertSection
85 Call tHtmlDocInsertFrame
86 Call tHtmlDocInsertGraphicsFromFile
87 gApplication = "WRITER"
91 '-----------------------------------------------------------
93 testcase tInsertManualBreak
94 PrintLog "- Insert / Manual Break"
96 printlog " Open new document"
99 printlog " Insert / Manual break"
102 printlog " Close 'Insert break' dialog with cancel"
103 Kontext "UmbruchEinfuegen"
104 Call DialogTest ( UmbruchEinfuegen )
105 UmbruchEinfuegen.Cancel
107 printlog " Close active document"
111 '-----------------------------------------------------------
113 testcase tInsertFields
114 PrintLog "- Insert / Fields"
116 printlog " Open new document"
120 printlog "Insert / Fields / Date"
123 Warnlog "Unable to execute: Insert / Fields / Date "
125 printlog " Insert / Fields / Date"
126 Call wTypeKeys (" <Return>")
128 printlog "Insert / Fields / Time"
131 Warnlog "Unable to execute: Insert / Fields / Time"
133 printlog " Insert / Fields / Time"
134 Call wTypeKeys (" <Return>")
136 printlog "Insert / Fields / Page Number"
137 InsertFieldsPageNumbers
139 Warnlog "Unable to execute: Insert / Fields / Page numbers"
141 printlog " Insert / Fields / Page numbers"
142 Call wTypeKeys (" <Return>")
144 printlog "Insert / Fields / Page Count"
145 InsertFieldsPageCount
147 Warnlog "Unable to execute: Insert / Fields / Page Count"
149 printlog " Insert / Fields / Page count"
150 Call wTypeKeys (" <Return>")
152 printlog "Insert / Fields / Title"
155 Warnlog "Unable to execute: Insert / Fields / Title"
157 printlog " Insert / Fields / Title"
158 Call wTypeKeys (" <Return>")
160 printlog "Insert / Fields / Author"
163 Warnlog "Unable to execute: Insert / Fields / Author"
165 printlog " Insert / Fields / Author"
166 if gApplication <> "HTML" then
168 printlog "Insert / Fields / Subject"
171 Warnlog "Unable to execute: Insert / Fields / Subject"
173 printlog " If document not HTML then 'Insert / Fields / Subject"
174 Call wTypeKeys (" <Return>")
175 printlog " Press key 'enter'"
178 printlog " Close active document"
182 '-----------------------------------------------------------
184 testcase tInsertFieldsOther
187 printlog "- Insert / Fields / Other"
189 printlog " Open new document"
192 printlog " Insert / Fields / Other"
196 printlog " In dialog step through all tabpages"
197 Active.SetPage TabDokumentFeldbefehle
198 Kontext "TabDokumentFeldbefehle"
199 Call Dialogtest ( TabDokumentFeldbefehle )
202 Active.SetPage TabDokumentinfoFeldbefehle
203 Kontext "TabDokumentinfoFeldbefehle"
204 Call Dialogtest ( TabDokumentinfoFeldbefehle )
207 Active.SetPage TabVariablen
208 Kontext "TabVariablen"
209 Call Dialogtest ( TabVariablen )
211 if gApplication <> "HTML" then
213 Active.SetPage TabReferenzen
214 Kontext "TabReferenzen"
215 Call Dialogtest ( TabReferenzen )
218 Active.SetPage TabFunktionen
219 Kontext "TabFunktionen"
220 Call Dialogtest ( TabFunktionen )
221 for i=1 to Feldtyp.GetItemCount
223 if MakroButton.IsEnabled then
225 ' if no JRE is installed a messagebox appears
229 if Active.Exists then
230 if Active.GetRT = 304 then
231 if j = 1 then Warnlog Active.Gettext
241 Kontext "ScriptSelector"
242 if ( ScriptSelector.exists( 5 ) ) then
245 warnlog( "Dialog <ScriptSelector> is not available" )
247 Kontext "TabFunktionen"
253 Active.SetPage TabDatenbank
254 Kontext "TabDatenbank"
255 Call Dialogtest ( TabDatenbank )
257 printlog " Close dialog"
260 printlog " Close dialog"
263 printlog " Close active document"
267 '-----------------------------------------------------------
269 testcase tInsertSpecialCharacter
270 PrintLog "- Insert / Special Character"
272 printlog " Open new document"
275 printlog " Insert / Special Character"
276 InsertSpecialCharacterWriter
278 Kontext "Sonderzeichen"
279 Call DialogTest (Sonderzeichen)
282 printlog " Close active document"
286 '-----------------------------------------------------------
288 testcase tInsertSection
289 PrintLog "- Insert / Section"
291 printlog " Open new document"
294 printlog " Insert / Section"
298 printlog " In dialog step through all tabpages"
299 printlog "- Tabpage Section"
300 Active.Setpage TabBereiche
301 Kontext "TabBereiche"
302 Call DialogTest (TabBereiche)
304 if gUseSysDlg = False then
311 printlog "- Tabpage Columns"
312 Active.Setpage TabSpalten
314 Call DialogTest (TabSpalten)
317 printlog "- Tabpage Background"
318 Active.Setpage TabHintergrund
319 Kontext "TabHintergrund"
320 Call DialogTest (TabHintergrund)
322 if gApplication <> "HTML" then
323 printlog "Tabpage Indents"
325 Active.Setpage TabSectionIndent
326 Kontext "TabSectionIndent"
327 Call DialogTest (TabSectionIndent)
329 printlog "- Tabpage Footnotes/Endnotes"
331 Active.Setpage TabFussEndnoten
332 Kontext "TabFussEndnoten"
333 Call DialogTest (TabFussEndnoten)
334 TabFussEndnoten.Cancel
336 TabHintergrund.Cancel
338 printlog " Close active document"
342 '-----------------------------------------------------------
344 testcase tInsertHyperlink
346 PrintLog "- Insert / Hyperlink"
348 printlog " Open new document"
351 printlog "- Internet"
352 printlog " Insert / Hyperlink"
354 printlog " In 'Hyperlink' dialog step through all pages"
355 Call wEinfuegenHyperlink(1)
356 Call DialogTest ( TabHyperlinkInternet )
359 printlog "- Mail & News"
360 Call wEinfuegenHyperlink(2)
362 Call DialogTest ( TabHyperlinkMailUndNews )
365 printlog "- Document"
366 Call wEinfuegenHyperlink(3)
368 Call DialogTest ( TabHyperlinkDokument )
373 if ( OeffnenDlg.exists( 1 ) ) then
376 warnlog( "Dialog <OeffnenDlg> is not available" )
380 printlog "- New Document"
381 Call wEinfuegenHyperlink(4)
383 Call DialogTest ( TabHyperlinkNeuesDokument )
390 Kontext "TabHyperlinkNeuesDokument"
391 TabHyperlinkNeuesDokument.Cancel
392 printlog " Close 'Hyperlink' dialog"
394 printlog " Close active document"
398 '-----------------------------------------------------------
400 testcase tInsertFootnote
401 PrintLog "- Insert / Footnote"
403 printlog " Open new document"
406 printlog " Insert / Footnote"
408 Kontext "FussnoteEinfuegen"
409 Call DialogTest (FussnoteEinfuegen)
411 printlog " In 'Insert / Footnote' dialog click on browse button"
413 printlog " Close 'Special Character' dialog"
414 Kontext "Sonderzeichen"
417 printlog " Close 'Insert Footnote' dialog"
418 Kontext "FussnoteEinfuegen"
419 FussnoteEinfuegen.Cancel
421 printlog " Close active document"
425 '-----------------------------------------------------------
427 testcase tInsertCaption
428 PrintLog "- Insert / Caption"
430 printlog " Open new document"
433 printlog " Insert graphic '..\writer\required\input\graphics\jolink.jpg"
434 Call hGrafikEinfuegen ( gTesttoolPath + "writer\required\input\graphics\jolink.jpg" )
436 printlog " Insert / Caption"
438 Kontext "Beschriftung"
439 Call DialogTest ( Beschriftung )
441 printlog " In 'Caption' dialog click 'Options'"
442 WeitereOptionen.Click
443 Kontext "NummernkreisOptionen"
444 Call DialogTest ( NummernkreisOptionen )
445 printlog " Close 'Number Range Options' dialog"
446 NummernkreisOptionen.Cancel
448 Kontext "Beschriftung"
449 printlog " Close 'Caption' dialog"
453 Warnlog "Insert / Caption is disabled!"
456 printlog " Close active document"
460 '-----------------------------------------------------------
462 testcase tInsertBookmark
463 PrintLog "- Insert / Bookmark"
465 printlog " Open new document"
468 printlog " Insert / Bookmark"
470 Kontext "TextmarkeEinfuegen"
471 Call DialogTest (TextmarkeEinfuegen)
473 printlog " Close 'Insert Bookmark' dialog"
474 TextmarkeEinfuegen.Cancel
476 printlog " Close active document"
480 '-----------------------------------------------------------
483 dim sNoteText as String
484 PrintLog "- Insert / Note"
488 printlog " Insert / Note"
490 Kontext "DocumentWriter"
491 sNoteText = "Testnote inserted by testtool !"
492 Call wTypeKeys (sNoteText)
494 Call wNavigatorAuswahl( 11, 1 )
495 Kontext "NavigatorWriter"
496 if Auswahlliste.Gettext <> sNoteText then
497 warnlog ("Note was not inserted correctly (Focus problem?")
500 printlog " Close active document"
504 '-----------------------------------------------------------
506 testcase tInsertCrossReference
509 printlog "- Insert / Reference Field"
510 if gApplication = "HTML" then
511 printlog "Not in WriterWeb!"
514 printlog " Open new document"
517 printlog " Insert / Cross reference"
520 Kontext "TabReferenzen"
521 if NOT TabReferenzen.IsVisible then Warnlog "Reference Tabpage isn't default!"
523 printlog " Step through all tabpages"
525 Active.SetPage TabFunktionen
526 Kontext "TabFunktionen"
527 for i=1 to Feldtyp.GetItemCount
529 if MakroButton.IsEnabled then
531 ' if no JRE is installed a messagebox appears
536 if Active.Exists then
537 if Active.GetRT = 304 then
538 if j = 1 then Warnlog Active.Gettext
547 Kontext "ScriptSelector"
548 if ( ScriptSelector.exists( 3 ) ) then
551 warnlog( "Dialog <ScriptSelector> is not available" )
553 Kontext "TabFunktionen"
559 Active.SetPage TabDokumentinfoFeldbefehle
560 Kontext "TabDokumentinfoFeldbefehle"
563 Active.SetPage TabVariablen
564 Kontext "TabVariablen"
567 Active.SetPage TabDatenbank
568 Kontext "TabDatenbank"
571 Active.SetPage TabDokumentFeldbefehle
572 Kontext "TabDokumentFeldbefehle"
574 printlog " Close dialog"
575 TabDokumentFeldbefehle.Close
577 printlog " Close active document"
581 '-----------------------------------------------------------
583 testcase tInsertScript
584 PrintLog "- Insert / Script"
586 printlog " Open new document"
589 printlog " Insert / Script"
591 Kontext "ScriptEinfuegen"
592 Call DialogTest (ScriptEinfuegen)
594 ScriptEinfuegen.Cancel
596 printlog " Close active document"
600 '-----------------------------------------------------------
602 testcase tInsertIndexesEntry
603 qaErrorLog "#158646# - Insert Indexes Entry causes crash."
606 PrintLog "- Insert / Indexes / Entry"
607 if gApplication = "HTML" then
608 printlog "Not in WriterWeb!"
611 printlog " Open new document"
614 printlog " Insert / Indexes and Tables / Entry"
616 Kontext "VerzeichniseintragEinfuegen"
617 Call DialogTest (VerzeichniseintragEinfuegen)
618 printlog " Click 'Insert'"
621 Kontext "BenutzerverzeichnisDefinieren"
622 Call DialogTest (BenutzerverzeichnisDefinieren)
623 printlog " Close dialog 'Insert Index Entry'"
624 BenutzerverzeichnisDefinieren.Cancel
625 Kontext "VerzeichniseintragEinfuegen"
626 EinfuegenSchliessen.Click
628 printlog " Close active document"
632 '-----------------------------------------------------------
634 testcase tInsertIndexesIndex
636 Printlog "- Insert / Indexes / Index"
637 if gApplication = "HTML" then
638 printlog "Not in WriterWeb!"
641 printlog " Open new document"
644 printlog " Insert / Indexes and Tables / Indexes and Tables"
648 if Active.Exists then
649 if Active.GetRT = 304 then
650 Warnlog Active.Gettext
655 printlog " Step through all Tabpages"
657 printlog "- TabPage Indexes"
658 Active.Setpage TabVerzeichnisseVerzeichnis
659 Kontext "TabVerzeichnisseVerzeichnis"
660 For i= 1 to VerzeichnisTyp.GetItemCount
662 if i = 2 then printlog "Alphabetical index see bug #i33671 (ok in m54)"
663 VerzeichnisTyp.Select i
664 printlog "- " + VerzeichnisTyp.GetSelText
665 Call DialogTest (TabVerzeichnisseVerzeichnis)
666 printlog "- Entry's to " + VerzeichnisTyp.GetSelText
669 ErzeugenAusGliederung.Check
673 if gUseSysDlg = False then
674 Konkordanzdatei.Check
675 Kontext "KonkordanzdateiOeffnen"
676 if KonkordanzdateiOeffnen.Exists then
677 KonkordanzdateiOeffnen.Cancel
678 Warnlog "Open-Dialog comes up at checking the checkbox!"
680 Kontext "TabVerzeichnisseVerzeichnis"
681 if KonkordanzAuswahl.IsEnabled then
682 KonkordanzAuswahl.Click
684 Call hMenuSelectNr ( 1 )
685 Kontext "KonkordanzdateiOeffnen"
686 if KonkordanzdateiOeffnen.Exists then
687 KonkordanzdateiOeffnen.Cancel
689 Warnlog "No Open-Dialog selecting Concordance-File->Open!"
692 Kontext "TabVerzeichnisseVerzeichnis"
693 KonkordanzAuswahl.Click
695 Call hMenuSelectNr ( 2 )
696 Kontext "SpeichernDlg"
697 if SpeichernDlg.Exists then
700 Warnlog "No Open-Dialog selecting Concordance-File->New!"
703 Warnlog "- Concordance-File couldn't be selected, though checkbox is checked!"
710 Active.Setpage TabVerzeichnisseEintraege
711 Kontext "TabVerzeichnisseEintraege"
712 Call DialogTest (TabVerzeichnisseEintraege)
714 Active.Setpage TabVerzeichnisseVerzeichnis
715 Kontext "TabVerzeichnisseVerzeichnis"
720 printlog "- Tabpage Styles"
721 Active.Setpage TabVerzeichnisseVorlagen
722 Kontext "TabVerzeichnisseVorlagen"
723 Call DialogTest (TabVerzeichnisseVorlagen)
725 printlog "- Tabpage Columns"
727 Active.Setpage TabSpalten
729 Call DialogTest (TabSpalten)
731 printlog "- Tabpage Background"
733 Active.Setpage TabHintergrund
734 Kontext "TabHintergrund"
735 TabHintergrund.Cancel
737 printlog " Close active document"
741 printlog " Open new document"
745 printlog " View Zoom"
749 printlog " Check if 100% Zoom is checked ( Had a bug changed after opening Index dialog )"
750 if Massstab.Exists then
751 if Not Vergroesserung100.IsChecked then
752 Warnlog "100% Zoom is not checked.Maybe Bug#95871! Set Zoom to 100%!"
753 Vergroesserung100.Check
757 printlog " Close 'Zoom' dialog"
760 Warnlog "Dialog 'Zoom' does not exist!"
762 printlog " Close active document"
766 '-----------------------------------------------------------
768 testcase tInsertIndexesBibliographyEntry
769 Printlog "- Insert / Indexes / Bibliography Entry"
770 if gApplication = "HTML" then
771 printlog "Not in WriterWeb!"
774 printlog " Open new document"
777 printlog " Insert / Indexes and Tables / Bibliography Entry "
778 hUseAsyncSlot( "InsertIndexesBibliographyEntry" )
781 if ( Active.Exists() ) then
784 if ( Active.GetRT = 304 ) then
785 Warnlog Active.Gettext
794 Kontext "LiteratureintragEinfuegen"
795 if ( LiteratureintragEinfuegen.exists( 1 ) ) then
796 Call DialogTest ( LiteratureintragEinfuegen )
798 printlog " In dialog 'Insert Bibliography Entry' click 'Edit'"
799 EintragBearbeiten.Click
801 Kontext "LiteratureintragDefinieren"
802 if ( LiteratureintragDefinieren.exists( 1 ) ) then
803 Call DialogTest ( LiteratureintragDefinieren )
804 printlog " Close dialog 'Define Bibliography Entry'"
805 LiteratureintragDefinieren.Close
807 warnlog( "Dialog <LiteratureintragDefinieren> is not available" )
810 Kontext "LiteratureintragEinfuegen"
811 printlog " Close dialog 'Insert Bibliography Entry'"
812 EintragSchliessen.Click
814 warnlog( "Dialog <LiteratureintragEinfuegen> is not available" )
816 printlog " Close active document"
820 '-----------------------------------------------------------
822 testcase tInsertEnvelope
823 PrintLog "- Insert / Envelope"
824 if gApplication = "HTML" then
825 printlog "Not in WriterWeb!"
829 printlog " Open new document"
832 printlog " Insert / Envelope"
836 active.SetPage TabEnvelope
837 Kontext "TabEnvelope"
838 Call DialogTest (TabEnvelope)
841 active.SetPage TabFormatEnvelope
842 Kontext "TabFormatEnvelope"
843 Call DialogTest (TabFormatEnvelope)
844 printlog " Step through all tabpages and click all buttons"
846 printlog "- Edit Addressee"
850 Call hMenuSelectNr(1)
853 Active.Setpage TabFont
857 Kontext "TabFormatEnvelope"
861 Call hMenuSelectNr(2)
864 Active.Setpage TabEinzuegeUndAbstaende
865 Kontext "TabEinzuegeUndAbstaende"
866 TabEinzuegeUndAbstaende.Cancel
868 Kontext "TabFormatEnvelope"
869 printlog "- Edit Sender"
873 Call hMenuSelectNr(1)
876 Active.Setpage TabFont
880 Kontext "TabFormatEnvelope"
884 Call hMenuSelectNr(2)
887 Active.Setpage TabEinzuegeUndAbstaende
888 Kontext "TabEinzuegeUndAbstaende"
889 TabEinzuegeUndAbstaende.Cancel
893 active.SetPage TabDruckerBriefumschlag
894 Kontext "TabDruckerBriefumschlag"
895 Call DialogTest (TabDruckerBriefumschlag)
896 if gPlatgroup = "w95" then
898 Kontext "DruckerEinrichten"
899 if DruckerEinrichten.Exists then
900 DruckerEinrichten.Cancel
902 Warnlog "No Default-Printer!"
904 Kontext "TabDruckerBriefumschlag"
906 printlog " Close dialog"
907 TabDruckerBriefumschlag.Close
909 printlog " Close active document"
913 '-----------------------------------------------------------
915 testcase tInsertFrame
916 PrintLog "- Insert / Frame"
918 printlog " Open new document"
921 printlog " Insert / Frame"
925 printlog " Step through all tabpages"
927 active.SetPage TabType
929 Call DialogTest (TabType)
933 active.SetPage TabZusaetze
934 Kontext "TabZusaetze"
935 Call DialogTest (TabZusaetze)
939 active.SetPage TabUmlauf
941 Call DialogTest (TabUmlauf)
945 active.SetPage TabUmrandung
946 Kontext "TabUmrandung"
947 Call DialogTest (TabUmrandung)
951 active.SetPage TabHintergrund
952 Kontext "TabHintergrund"
953 Call DialogTest (TabHintergrund, 1)
957 Call DialogTest (TabHintergrund, 2)
960 Warnlog "Maybe missing combobox! (#i29517)"
963 if gApplication <> "HTML" then
965 active.SetPage TabHyperlinkRahmen
966 Kontext "TabHyperlinkRahmen"
967 Call DialogTest (TabHyperlinkRahmen)
970 if gUSeSysDlg = False then
976 active.SetPage TabSpalten
978 Call DialogTest (TabSpalten)
979 printlog " Close dialog"
982 printlog " Close dialog"
983 TabHintergrund.Cancel
986 printlog " Close active document"
990 '-----------------------------------------------------------
992 testcase tInsertTable
993 PrintLog "- Insert / Table"
995 printlog " Open new document"
997 printlog " Insert / Table"
1000 Kontext "TabelleEinfuegenWriter"
1001 Call DialogTest (TabelleEinfuegenWriter)
1002 if Spalten.Gettext <> "2" then Warnlog "- Default for Size Columns isn't 2 , it is " + Spalten.Gettext
1003 if Zeilen.Gettext <> "2" then Warnlog "- Default for Size Row isn't 2, it is " + Zeilen.Gettext
1004 printlog " In 'insert Table' dialog click 'AutoFormat'"
1006 Kontext "AutoformatTabelle"
1008 printlog " In 'AutoFormat' dialog click 'More'"
1010 Call DialogTest ( AutoformatTabelle )
1012 if Formatbox.GetItemCount > 2 then
1016 Kontext "AutoformatHinzufuegenWriter"
1017 Call DialogTest ( AutoformatHinzufuegenWriter )
1018 TabellenName.SetText "Hallo"
1019 AutoformatHinzufuegenWriter.Cancel
1020 Kontext "AutoFormatTabelle"
1022 Warnlog "Only " + Formatbox.GetItemCount + " Table formats to select ?"
1024 printlog " Close dialog 'More'"
1026 printlog " Close dialog 'AutoFormat'"
1027 AutoformatTabelle.Cancel
1029 Kontext "TabelleEinfuegenWriter"
1030 printlog " Close dialog ''"
1031 TabelleEinfuegenWriter.Cancel
1033 printlog " Close active document"
1037 '-----------------------------------------------------------
1039 testcase tInsertHorizontalLine
1040 PrintLog "- Insert / Horizontal Line"
1042 printlog " Open new document"
1045 printlog " Insert / Horizontal Line"
1046 InsertHorizontalLine
1047 Kontext "HorizontaleLinieEinfuegen"
1048 Call DialogTest (HorizontaleLinieEinfuegen)
1049 printlog " Close dialog 'Insert Horizontal Ruler'"
1050 HorizontaleLinieEinfuegen.Cancel
1052 printlog " Close active document"
1056 '-----------------------------------------------------------
1058 testcase tInsertGraphicsFromFile
1059 PrintLog "- Insert / Graphics / From File"
1062 printlog " Open new document"
1065 printlog " Insert / Graphics from file"
1066 InsertGraphicsFromFile
1068 Kontext "GrafikEinfuegenDlg"
1069 printlog " Select as graphic to insert: '...\writer\required\input\graphics\jolink.jpg"
1070 Dateiname.Settext ConvertPath ( gTesttoolPath + "writer\required\input\graphics\jolink.jpg" )
1074 if Active.Exists( 1 ) then
1075 Warnlog Active.Gettext
1077 Kontext "GrafikEinfuegenDlg"
1078 GrafikEinfuegenDlg.Cancel
1082 printlog " select again 'Insert / Grahics from file'"
1083 InsertGraphicsFromFile
1085 printlog " Step through all tabpages"
1087 active.SetPage TabType
1090 Call DialogTest ( TabType )
1093 active.SetPage TabZusaetze
1095 Kontext "TabZusaetze"
1096 Call DialogTest ( TabZusaetze )
1099 active.SetPage TabUmlauf
1102 Call DialogTest ( TabUmlauf )
1105 active.SetPage TabHyperlinkRahmen
1107 Kontext "TabHyperlinkRahmen"
1108 Call DialogTest ( TabHyperlinkRahmen )
1111 active.SetPage TabGrafik
1114 Call DialogTest ( TabGrafik )
1117 active.SetPage TabUmrandung
1119 Kontext "TabUmrandung"
1120 Call DialogTest ( TabUmrandung )
1123 active.SetPage TabMakro
1124 ' if no JRE is installed a messagebox appears
1129 if Active.Exists() then
1130 if Active.GetRT = 304 then
1131 if j = 1 then Warnlog Active.Gettext
1142 Call DialogTest ( TabMakro )
1144 if gApplication <> "HTML" then
1146 active.SetPage TabZuschneiden
1148 Kontext "TabZuschneiden"
1149 Call DialogTest ( TabZuschneiden )
1152 active.SetPage TabHintergrund
1154 Kontext "TabHintergrund"
1155 Call DialogTest ( TabHintergrund )
1156 printlog " Close dialog"
1157 TabHintergrund.Cancel
1159 printlog " Close dialog"
1164 printlog " Close active document"
1168 '-----------------------------------------------------------
1170 testcase tInsertAllGraphicsFromFile
1172 Dim quellpfad as string
1173 Dim DieDatei as string
1174 Dim Ziel( 5000 ) as String
1175 printlog "Insert / Graphics / From File (all Formats)"
1177 printlog " Open new document"
1180 printlog " Insert all graphic formats from directory: global\input\graf_inp\"
1181 quellpfad = ConvertPath(gtesttoolpath + "global\input\graf_inp\")
1183 GetFileList(quellpfad, "*.*" , Ziel())
1184 for i=1 to ListCount(Ziel())
1185 if (gPlatform = "osx") AND (right(ziel(i),3) = "eps") then
1186 qaerrorlog "#i100253# skipping eps"
1189 printlog "- Graphic: " + Right(Ziel(i),3) + "-Format"
1190 Call hGrafikEinfuegen ( Ziel(i) )
1192 Call wTypeKeys("<Delete>")
1193 Call gMouseDoubleClick (10,10)
1197 printlog " Close active document"
1201 '-----------------------------------------------------------
1203 testcase tInsertObjectOLEObject
1204 PrintLog "- Insert / Object / OLE-Objekt"
1206 printlog " Open new document"
1209 printlog " Insert / Object / OLE-Object"
1210 InsertObjectOLEObject
1212 Kontext "OLEObjektEinfuegen"
1213 printlog " Check both radiobuttons 'Create now' and 'Create from file'"
1215 Call DialogTest (OLEObjektEinfuegen, 1)
1216 AusDateiErstellen.Check
1217 Call DialogTest (OLEObjektEinfuegen, 2)
1218 OLEObjektEinfuegen.Cancel
1220 printlog " Close active document"
1224 '-----------------------------------------------------------
1226 testcase tInsertObjectPlugIn
1227 PrintLog "- Insert / Object / Plug-In"
1229 printlog " Open new document"
1232 printlog " Close 'Plug in' dialog"
1235 Kontext "PlugInEinfuegen"
1236 if PlugInEinfuegen.Exists then
1237 Call DialogTest (PlugInEinfuegen)
1238 PlugInEinfuegen.Cancel
1240 Warnlog "Dialog 'Plugin' is not up!"
1243 printlog " Close active document"
1247 '-----------------------------------------------------------
1249 testcase tInsertObjectSound
1250 Printlog "- Insert / Object / Sound"
1251 printlog " Open new document"
1255 if gUseSysDlg = False then
1257 printlog " Insert / Object / Sound"
1258 Kontext "OeffnenDlg"
1259 if OeffnenDlg.Exists then
1262 Warnlog "Dialog to insert Sound isn't up!"
1266 'Warnlog "- Menu disabled or no Sound-PlugIn installed !?"
1268 printlog " Close active document"
1272 '-----------------------------------------------------------
1274 testcase tInsertObjectVideo
1275 Printlog "- Insert / Object / Video"
1277 printlog " Open new document"
1281 if gUseSysDlg = False then
1283 printlog " Insert / Object / Video"
1284 Kontext "OeffnenDlg"
1285 if OeffnenDlg.Exists then
1288 Warnlog "Dialog to insert Video isn't up!"
1292 'Warnlog "- Menu disabled or no Video-PlugIn installed !?"
1294 printlog " Close active document"
1298 '-----------------------------------------------------------
1300 testcase tInsertObjectFormula
1301 PrintLog "- Insert / Object / Formula"
1303 printlog " Open new document"
1306 printlog " Insert / Object / Formular"
1310 if Active.Exists then
1311 if Active.GetRT = 304 then
1312 Warnlog Active.Gettext
1318 printlog " Click in 'Math' document"
1319 Call gMouseClick(1,1)
1321 printlog " 'Delete math-object in document"
1322 Call wTypeKeys("<Delete>")
1324 printlog " Close active document"
1328 '-----------------------------------------------------------
1330 testcase tInsertObjectChart
1331 PrintLog "- Insert / Object / Chart"
1333 printlog " Open new document"
1335 ' Chart-Wizard will be invoked if data ranges exist
1336 ' Therefor a table will be inserted
1337 printlog " Insert / Table"
1339 Kontext "TabelleEinfuegenWriter"
1340 TabelleEinfuegenWriter.Ok
1342 printlog " Insert / Object / Chart"
1345 Kontext "ChartWizard"
1346 if ChartWizard.Exists then
1347 printlog "- Chart-Wizard is up=>OK"
1348 Call DialogTest ( ChartWizard )
1349 printlog " Cancel Chart-Wizard"
1352 warnlog "Chart-Wizard is not up though a table has been inserted"
1355 printlog " Close active document"
1359 '-----------------------------------------------------------
1361 testcase tInsertFile
1362 PrintLog "- Insert / File"
1364 printlog " Open new document"
1369 printlog " Insert / File"
1370 Kontext "OeffnenDlg"
1372 printlog " Check 'File dialog'"
1373 if OeffnenDlg.Exists( 2 ) then
1374 Call DialogTest ( OeffnenDlg )
1382 if Active.Exists then
1383 Warnlog Active.Gettext
1386 Kontext "OeffnenDlg"
1391 printlog " Close active document"
1395 '-----------------------------------------------------------
1397 testcase tHtmlDocInsertFields
1398 PrintLog "- Insert / Fields"
1400 gApplication = "HTML"
1401 printlog " Open new document"
1405 printlog "Insert / Fields / Date"
1408 Warnlog "Unable to execute: Insert / Fields / Date "
1410 printlog " Insert / Fields / Date"
1411 Call wTypeKeys (" <Return>")
1413 printlog "Insert / Fields / Time"
1416 Warnlog "Unable to execute: Insert / Fields / Time"
1418 printlog " Insert / Fields / Time"
1419 Call wTypeKeys (" <Return>")
1421 printlog "Insert / Fields / Page Number"
1422 InsertFieldsPageNumbers
1424 Warnlog "Unable to execute: Insert / Fields / Page numbers"
1426 printlog " Insert / Fields / Page numbers"
1427 Call wTypeKeys (" <Return>")
1429 printlog "Insert / Fields / Page Count"
1430 InsertFieldsPageCount
1432 Warnlog "Unable to execute: Insert / Fields / Page Count"
1434 printlog " Insert / Fields / Page count"
1435 Call wTypeKeys (" <Return>")
1437 printlog "Insert / Fields / Title"
1440 Warnlog "Unable to execute: Insert / Fields / Title"
1442 printlog " Insert / Fields / Title"
1443 Call wTypeKeys (" <Return>")
1445 printlog "Insert / Fields / Author"
1448 Warnlog "Unable to execute: Insert / Fields / Author"
1450 printlog " Insert / Fields / Author"
1451 if gApplication <> "HTML" then
1453 printlog "Insert / Fields / Subject"
1456 Warnlog "Unable to execute: Insert / Fields / Subject"
1458 printlog " If document not HTML then 'Insert / Fields / Subject"
1459 Call wTypeKeys (" <Return>")
1460 printlog " Press key 'enter'"
1463 printlog " Close active document"
1465 gApplication = "WRITER"
1468 '-----------------------------------------------------------
1470 testcase tHtmlDocInsertFieldsOther
1473 printlog "- Insert / Fields / Other"
1475 gApplication = "HTML"
1476 printlog " Open new document"
1479 printlog " Insert / Fields / Other"
1483 printlog " In dialog step through all tabpages"
1484 Active.SetPage TabDokumentFeldbefehle
1485 Kontext "TabDokumentFeldbefehle"
1486 Call Dialogtest ( TabDokumentFeldbefehle )
1489 Active.SetPage TabDokumentinfoFeldbefehle
1490 Kontext "TabDokumentinfoFeldbefehle"
1491 Call Dialogtest ( TabDokumentinfoFeldbefehle )
1494 Active.SetPage TabVariablen
1495 Kontext "TabVariablen"
1496 Call Dialogtest ( TabVariablen )
1498 if gApplication <> "HTML" then
1500 Active.SetPage TabReferenzen
1501 Kontext "TabReferenzen"
1502 Call Dialogtest ( TabReferenzen )
1505 Active.SetPage TabFunktionen
1506 Kontext "TabFunktionen"
1507 Call Dialogtest ( TabFunktionen )
1508 for i=1 to Feldtyp.GetItemCount
1510 if MakroButton.IsEnabled then
1512 ' if no JRE is installed a messagebox appears
1516 if Active.Exists then
1517 if Active.GetRT = 304 then
1518 if j = 1 then Warnlog Active.Gettext
1528 Kontext "ScriptSelector"
1529 if ( ScriptSelector.exists( 3 ) ) then
1530 ScriptSelector.Close
1532 warnlog( "Dialog <ScriptSelector> is not available" )
1534 Kontext "TabFunktionen"
1540 Active.SetPage TabDatenbank
1541 Kontext "TabDatenbank"
1542 Call Dialogtest ( TabDatenbank )
1544 printlog " Close dialog"
1547 printlog " Close dialog"
1550 printlog " Close active document"
1552 gApplication = "WRITER"
1555 '-----------------------------------------------------------
1557 testcase tHtmlDocInsertSection
1558 PrintLog "- Insert / Section"
1560 gApplication = "HTML"
1561 printlog " Open new document"
1564 printlog " Insert / Section"
1568 printlog " In dialog step through all tabpages"
1569 printlog "- Tabpage Section"
1570 Active.Setpage TabBereiche
1571 Kontext "TabBereiche"
1572 Call DialogTest (TabBereiche)
1576 Kontext "OeffnenDlg"
1577 if ( OeffnenDlg.exists( 1 ) ) then
1580 warnlog( "Dialog <OeffnenDlg> is not available" )
1585 printlog "- Tabpage Columns"
1586 Active.Setpage TabSpalten
1587 Kontext "TabSpalten"
1588 Call DialogTest (TabSpalten)
1591 printlog "- Tabpage Background"
1592 Active.Setpage TabHintergrund
1593 Kontext "TabHintergrund"
1594 Call DialogTest (TabHintergrund)
1596 if gApplication <> "HTML" then
1597 printlog "Tabpage Indents"
1599 Active.Setpage TabSectionIndent
1600 Kontext "TabSectionIndent"
1601 Call DialogTest (TabSectionIndent)
1603 printlog "- Tabpage Footnotes/Endnotes"
1605 Active.Setpage TabFussEndnoten
1606 Kontext "TabFussEndnoten"
1607 Call DialogTest (TabFussEndnoten)
1608 TabFussEndnoten.Cancel
1610 TabHintergrund.Cancel
1612 printlog " Close active document"
1614 gApplication = "WRITER"
1617 '-----------------------------------------------------------
1619 testcase tHtmlDocInsertFrame
1620 PrintLog "- Insert / Frame"
1622 gApplication = "HTML"
1623 printlog " Open new document"
1626 printlog " Insert / Frame"
1630 printlog " Step through all tabpages"
1632 active.SetPage TabType
1634 Call DialogTest (TabType)
1638 active.SetPage TabZusaetze
1639 Kontext "TabZusaetze"
1640 Call DialogTest (TabZusaetze)
1644 active.SetPage TabUmlauf
1646 Call DialogTest (TabUmlauf)
1650 active.SetPage TabUmrandung
1651 Kontext "TabUmrandung"
1652 Call DialogTest (TabUmrandung)
1656 active.SetPage TabHintergrund
1657 Kontext "TabHintergrund"
1658 Call DialogTest (TabHintergrund, 1)
1662 Call DialogTest (TabHintergrund, 2)
1665 Warnlog "Maybe missing combobox! (#i29517)"
1668 if gApplication <> "HTML" then
1670 active.SetPage TabHyperlinkRahmen
1671 Kontext "TabHyperlinkRahmen"
1672 Call DialogTest (TabHyperlinkRahmen)
1675 if gUSeSysDlg = False then
1676 Kontext "OeffnenDlg"
1681 active.SetPage TabSpalten
1682 Kontext "TabSpalten"
1683 Call DialogTest (TabSpalten)
1684 printlog " Close dialog"
1687 printlog " Close dialog"
1688 TabHintergrund.Cancel
1691 printlog " Close active document"
1693 gApplication = "WRITER"
1696 '-----------------------------------------------------------
1698 testcase tHtmlDocInsertGraphicsFromFile
1699 PrintLog "- Insert / Graphics / From File"
1702 gApplication = "HTML"
1703 printlog " Open new document"
1706 printlog " Insert / Graphics from file"
1707 InsertGraphicsFromFile
1709 Kontext "GrafikEinfuegenDlg"
1710 printlog " Select as graphic to insert: '...\writer\required\input\graphics\jolink.jpg"
1711 Dateiname.Settext ConvertPath ( gTesttoolPath + "writer\required\input\graphics\jolink.jpg" )
1715 if Active.Exists( 1 ) then
1716 Warnlog Active.Gettext
1718 Kontext "GrafikEinfuegenDlg"
1719 GrafikEinfuegenDlg.Cancel
1723 printlog " select again 'Insert / Grahics from file'"
1724 InsertGraphicsFromFile
1726 printlog " Step through all tabpages"
1728 active.SetPage TabType
1731 Call DialogTest ( TabType )
1734 active.SetPage TabZusaetze
1736 Kontext "TabZusaetze"
1737 Call DialogTest ( TabZusaetze )
1740 active.SetPage TabUmlauf
1743 Call DialogTest ( TabUmlauf )
1746 active.SetPage TabHyperlinkRahmen
1748 Kontext "TabHyperlinkRahmen"
1749 Call DialogTest ( TabHyperlinkRahmen )
1752 active.SetPage TabGrafik
1755 Call DialogTest ( TabGrafik )
1758 active.SetPage TabUmrandung
1760 Kontext "TabUmrandung"
1761 Call DialogTest ( TabUmrandung )
1764 active.SetPage TabMakro
1765 ' if no JRE is installed a messagebox appears
1770 if Active.Exists then
1771 if Active.GetRT = 304 then
1772 if j = 1 then Warnlog Active.Gettext
1783 Call DialogTest ( TabMakro )
1785 if gApplication <> "HTML" then
1787 active.SetPage TabZuschneiden
1789 Kontext "TabZuschneiden"
1790 Call DialogTest ( TabZuschneiden )
1793 active.SetPage TabHintergrund
1795 Kontext "TabHintergrund"
1796 Call DialogTest ( TabHintergrund )
1797 printlog " Close dialog"
1798 TabHintergrund.Cancel
1800 printlog " Close dialog"
1805 printlog " Close active document"
1807 gApplication = "WRITER"
1810 '-----------------------------------------------------------