1 '**************************************************************************
2 '* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
4 '* Copyright 2008 by Sun Microsystems, Inc.
6 '* OpenOffice.org - a multi-platform office productivity suite
8 '* $RCSfile: w_001a_.inc,v $
12 '* last change: $Author: vg $ $Date: 2008-08-18 12:40:41 $
14 '* This file is part of OpenOffice.org.
16 '* OpenOffice.org is free software: you can redistribute it and/or modify
17 '* it under the terms of the GNU Lesser General Public License version 3
18 '* only, as published by the Free Software Foundation.
20 '* OpenOffice.org is distributed in the hope that it will be useful,
21 '* but WITHOUT ANY WARRANTY; without even the implied warranty of
22 '* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
23 '* GNU Lesser General Public License version 3 for more details
24 '* (a copy is included in the LICENSE file that accompanied this code).
26 '* You should have received a copy of the GNU Lesser General Public License
27 '* version 3 along with OpenOffice.org. If not, see
28 '* <http://www.openoffice.org/license.html>
29 '* for a copy of the LGPLv3 License.
31 '/************************************************************************
33 '* owner : helge.delfs@sun.com
35 '* short description: Testcases for the Writer Required-test.
37 '\***********************************************************************
41 printLog Chr(13) + "--------- File Menu (w_001a_.inc) ----------"
42 gApplication = "WRITER"
46 Call tFileTemplatesOrganize
47 Call tFileTemplatesAddressbookSource
48 Call tFileTemplatesSave
49 Call tFileTemplatesEdit
53 Call tFilePrinterSetup
55 'Writer Master Document
56 gApplication = "MASTERDOCUMENT"
57 Call tMasterDocFilePagePreview
58 gApplication = "WRITER"
62 '-----------------------------------------------------------
64 testcase tFileProperties
65 PrintLog "- File / Properties"
67 printlog " Open new document"
70 printlog " File / Properties"
76 active.SetPage TabDokument
78 Warnlog "Dialog 'FileProperties' not up! (Bug#99828)"
82 printlog " Switch to Tabpage 'General'"
84 Call DialogTest (TabDokument)
86 printlog " Switch to Tabpage 'Description'"
88 active.SetPage TabDokumentinfo
89 Kontext "TabDokumentinfo"
90 Call DialogTest (TabDokumentinfo)
93 QAErrorlog "#i95523# - FileProperties - Tabpage 'User Defined' has changed. - Adaption of testcases needed."
94 ' printlog " Switch to Tabpage 'User defined'"
96 ' active.SetPage TabBenutzer
97 ' Kontext "TabBenutzer"
98 ' Call DialogTest ( TabBenutzer )
103 ' printlog " Click 'Infofields'"
104 ' Kontext "InfonamenBearbeiten"
105 ' printlog " Close upcoming dialog with 'Cancel'"
106 ' Call DialogTest (InfonamenBearbeiten)
107 ' InfonamenBearbeiten.Cancel
109 printlog " Switch to Tabpage 'Internet'"
111 active.SetPage TabInternet
112 Kontext "TabInternet"
113 Call DialogTest (TabInternet)
115 printlog " Switch to Tabpage 'Statistics' and close dialog"
117 active.SetPage TabStatistik
118 Kontext "TabStatistik"
119 Call DialogTest (TabStatistik)
123 printlog " Close active document"
127 '-----------------------------------------------------------
129 testcase tFileTemplatesOrganize
132 PrintLog " Open new document."
134 PrintLog " File / Templates / Organize"
135 FileTemplatesOrganize
136 Kontext "DVVerwalten"
138 if DVVerwalten.Exists then
144 if Not DVVerwalten.Exists then
145 Warnlog "Dialog 'Template Management' not up !"
150 PrintLog " Select first entry in left list of dialog 'Template Management' (should be 'My Templates')"
152 ListeLinks.TypeKeys "<Home>"
156 PrintLog " Select 'Commands -> Import Template'"
157 Call hMenuSelectNr(3)
159 PrintLog " Close Filedialog."
160 if gUseSysDlg = False then
162 if OeffnenDlg.Exists then
165 Warnlog "FileOpen dialog not up!"
169 PrintLog " Select 'Commands -> Printer Settings"
170 Kontext "DVVerwalten"
174 Call hMenuSelectNr(4)
176 PrintLog " Cancel 'Printer-Setup' dialog"
177 Kontext "DruckerEinrichten"
178 if DruckerEinrichten.Exists then
179 DruckerEinrichten.Cancel
181 Warnlog "Printersettings dialog is not up!"
184 PrintLog " Select first entry in right list"
185 Kontext "DVVerwalten"
188 PrintLog " Select pushbutton 'File..'"
189 if WelcheDatei.IsEnabled then
191 if gUseSysDlg = False then
192 PrintLog " Cancel Filedialog"
198 PrintLog " Select pushbutton 'Address Book'"
199 Kontext "DVVerwalten"
201 Kontext "AddressbookSource"
202 PrintLog " Cancel Dialog 'Address Book-Assignment'"
203 if AddressbookSource.Exists then
204 AddressbookSource.Cancel
206 Warnlog "the Dialog ' Address Book Source' wasnt up!"
209 PrintLog " Close dialog"
210 Kontext "DVVerwalten"
213 PrintLog " Close active document."
217 '-----------------------------------------------------------
219 testcase tFileTemplatesAddressbookSource
221 PrintLog " Open new document"
224 PrintLog " File / Templates /Address Book Source..."
226 FileTemplatesAddressbookSource
229 PrintLog " In 'Address Book Assignement' dialog click pushbutton 'Administrate'"
230 Kontext "AddressbookSource"
231 if AddressbookSource.Exists then
232 Call DialogTest (AddressbookSource)
235 PrintLog " Close 'Data Source Administration' with 'Cancel'"
236 Kontext "DatabaseProperties"
237 if Not DatabaseProperties.Exists then
238 Kontext "AddressSourceAutopilot"
239 if AddressSourceAutopilot.Exists then
240 AddressSourceAutopilot.Cancel
242 Kontext "AddressbookSource"
243 AddressbookSource.Cancel
245 PrintLog " DatabaseProperties.SetPage TabConnection"
246 Kontext "TabConnection"
247 Call DialogTest ( TabConnection )
248 Kontext "DatabaseProperties"
249 DatabaseProperties.Close
250 Kontext "AddressbookSource"
251 PrintLog " Close dialog"
252 AddressbookSource.Cancel
256 printlog " Close active document"
260 '-----------------------------------------------------------
262 testcase tFileTemplatesSave
263 if gApplication = "MASTERDOCUMENT" then
264 qaErrorLog " tFileTemplatesSave has been disabled in Masterdocument."
267 printlog "- File / Templates / Save"
269 printlog " Open new document"
271 printlog " File / Templates / Save"
273 Kontext "DokumentVorlagen"
274 Call DialogTest ( DokumentVorlagen )
275 printlog " On 'Templates' dialog click 'Organizer'"
278 Kontext "DVVerwalten"
280 printlog " Close dialog 'Template Management'"
282 Kontext "DokumentVorlagen"
283 DokumentVorlagen.Cancel
284 printlog " Close 'Templates' dialog"
286 printlog " Close active document"
288 gApplication = "WRITER"
291 '-----------------------------------------------------------
293 testcase tFileTemplatesEdit
294 printlog "- File / Templates / Edit"
296 printlog " Open new document"
298 printlog " File / Templates / Edit"
301 if gUseSysDlg = False then
302 printlog " Cancel Filedialog"
307 printlog " Close active document"
311 '-----------------------------------------------------------
313 testcase tFilePagePreview
314 PrintLog "- File / Page Preview"
315 Dim gehtnicht as boolean
317 printlog " Open new document"
318 Select Case gApplication
322 Case "MASTERDOCUMENT"
326 printlog "Not in Writer/Web!"
330 printlog " Enter some text in document"
331 Call wTypeKeys("Just a small change!")
332 printlog " File / Page Preview"
335 Kontext "DocPageViewWriter"
336 if DocPageViewWriter.NotExists then
337 Warnlog "Page Preview is not coming up!"
339 if Active.Exists then
340 if Active.GetRT = 304 then
345 if gehtnicht=FALSE then
346 Kontext "PreviewObjectbar"
347 if PreviewObjectbar.Exists = False then Call hToolbarSelect("PagePreview", true)
348 printlog " Select 'Zoom 100%' in toolbar"
352 Warnlog "Unable to change Zoom factor in toolbar! (Bug#110498)"
355 printlog " Click 'Print Page Preview' in toolbar"
356 Kontext "PreviewObjectbar"
357 DruckenSeitenansicht.Click
359 if Active.Exists then
360 QAErrorlog "No default printer!"
364 if DruckenDlg.Exists then DruckenDlg.Cancel
366 printlog " Close 'Print' dialog with cancel"
371 printlog " Click 'Print options page preview' in toolbar"
372 Kontext "PreviewObjectbar"
374 printlog " Close 'Print Options' dialog with cancel"
375 Kontext "DruckOptionen"
376 Call DialogTest ( DruckOptionen )
379 printlog " Close Page Preview with button 'Close Preview' in toolbar"
380 Kontext "PreviewObjectbar"
381 SeitenansichtSchliessen.Click
383 Warnlog "Objectbar not addressable!"
386 printlog " Close active document"
390 '-----------------------------------------------------------
393 PrintLog " Open new document"
396 PrintLog " File / Print"
401 if Active.Exists then
402 if Active.GetRT = 304 then
403 QAErrorlog "No Default Printer!"
406 if DruckenDlg.Exists then DruckenDlg.Cancel
412 if DruckenDlg.Exists then
413 PrintLog " In printer dialog click 'Options'"
417 Kontext "DruckerZusaetzeWriter"
418 PrintLog " Close 'Print options' with 'Cancel'"
419 DruckerZusaetzeWriter.Cancel
422 if gPlatGroup = "unx" then
423 if NOT Eigenschaften.IsEnabled AND gPlatform = "osx" then
424 QAErrorlog "#i81545#-macport File -> Print|Printer Settings: Properties button disabled"
430 PrintLog " On Unix-Platforms select 'Properties"
433 Kontext "TabSPAPaper"
434 if NOT TabSPAPaper.Exists then
435 Kontext "TabSPADevice"
436 if NOT TabSPADevice.Exists then
437 Warnlog "#i88799# - Non functional options-button in Print-dialog."
440 Active.Setpage TabSPAPaper
441 Kontext "TabSPAPaper"
442 Call DialogTest ( TabSPAPaper )
444 printlog( "ALLES WIRD GUT!" )
446 Active.Setpage TabSPADevice
447 Kontext "TabSPADevice"
448 Call DialogTest ( TabSPADevice )
450 PrintLog " Cancel Printer Properties' (only unix)"
455 Active.Setpage TabSPAPaper
456 Kontext "TabSPAPaper"
457 Call DialogTest ( TabSPAPaper )
459 printlog( "ALLES WIRD GUT!" )
461 Active.Setpage TabSPADevice
462 Kontext "TabSPADevice"
463 Call DialogTest ( TabSPADevice )
465 PrintLog " Cancel Printer Properties' (only unix)"
470 Call DialogTest ( DruckenDlg )
471 PrintLog " Close 'Print' dialog"
474 Warnlog "Print dialog is not up !"
477 PrintLog " Close active document"
481 '-----------------------------------------------------------
483 testcase tFilePrinterSetup
484 PrintLog " Open new document"
487 PrintLog " File / Printer Settings"
491 if Active.Exists then
492 if Active.GetRT = 304 then
493 QAErrorLog "No Default Printer!"
496 Kontext "DruckerEinrichten"
497 if DruckerEinrichten.Exists then
498 Call DialogTest ( DruckerEinrichten )
499 DruckerEinrichten.Cancel
503 Kontext "DruckerEinrichten"
504 Call DialogTest ( DruckerEinrichten )
505 DruckerEinrichten.Cancel
506 PrintLog " Cancel 'Printer Setup' dialog"
508 PrintLog " Close active document"
512 '-----------------------------------------------------------
514 testcase tMasterDocFilePagePreview
515 PrintLog "- File / Page Preview"
516 Dim gehtnicht as boolean
518 gApplication = "MASTERDOCUMENT"
519 printlog " Open new document"
522 printlog " Enter some text in document"
523 Call wTypeKeys("Just a small change!")
524 printlog " File / Page Preview"
527 Kontext "DocPageViewWriter"
528 if DocPageViewWriter.NotExists then
529 Warnlog "Page Preview is not coming up!"
531 if Active.Exists then
532 if Active.GetRT = 304 then
537 if gehtnicht=FALSE then
538 Kontext "PreviewObjectbar"
539 if PreviewObjectbar.Exists = False then Call hToolbarSelect("PagePreview", true)
540 printlog " Select 'Zoom 100%' in toolbar"
544 Warnlog "Unable to change Zoom factor in toolbar! (Bug#110498)"
547 printlog " Click 'Print Page Preview' in toolbar"
548 Kontext "PreviewObjectbar"
549 DruckenSeitenansicht.Click
551 if Active.Exists then
552 QAErrorlog "No default printer!"
556 if DruckenDlg.Exists then DruckenDlg.Cancel
558 printlog " Close 'Print' dialog with cancel"
563 printlog " Click 'Print options page preview' in toolbar"
564 Kontext "PreviewObjectbar"
566 printlog " Close 'Print Options' dialog with cancel"
567 Kontext "DruckOptionen"
568 Call DialogTest ( DruckOptionen )
571 printlog " Close Page Preview with button 'Close Preview' in toolbar"
572 Kontext "PreviewObjectbar"
573 SeitenansichtSchliessen.Click
575 Warnlog "Objectbar not addressable!"
579 printlog " Close active document"
581 gApplication = "WRITER"