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 2000, 2010 Oracle and/or its affiliates.
7 ' OpenOffice.org - a multi-platform office productivity suite
9 ' This file is part of OpenOffice.org.
11 ' OpenOffice.org is free software: you can redistribute it and/or modify
12 ' it under the terms of the GNU Lesser General Public License version 3
13 ' only, as published by the Free Software Foundation.
15 ' OpenOffice.org is distributed in the hope that it will be useful,
16 ' but WITHOUT ANY WARRANTY; without even the implied warranty of
17 ' MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
18 ' GNU Lesser General Public License version 3 for more details
19 ' (a copy is included in the LICENSE file that accompanied this code).
21 ' You should have received a copy of the GNU Lesser General Public License
22 ' version 3 along with OpenOffice.org. If not, see
23 ' <http://www.openoffice.org/license.html>
24 ' for a copy of the LGPLv3 License.
26 '/************************************************************************
28 '* owner : helge.delfs@oracle.com
30 '* short description: Testcases for the Writer Required-test.
32 '\***********************************************************************
36 printLog Chr(13) + "--------- File Menu (w_001a_.inc) ----------"
37 gApplication = "WRITER"
41 Call tFileTemplatesOrganize
42 Call tFileTemplatesAddressbookSource
43 Call tFileTemplatesSave
44 Call tFileTemplatesEdit
49 Call tPrintApplication()
52 Call tFilePrinterSetup
54 'Writer Master Document
55 gApplication = "MASTERDOCUMENT"
56 Call tMasterDocFilePagePreview
57 gApplication = "WRITER"
61 '-----------------------------------------------------------
63 testcase tFileProperties
64 PrintLog "- File / Properties"
66 printlog " Open new document"
69 printlog " File / Properties"
75 active.SetPage TabDokument
77 Warnlog "Dialog 'FileProperties' not up! (Bug#99828)"
81 printlog " Switch to Tabpage 'General'"
83 Call DialogTest (TabDokument)
85 printlog " Switch to Tabpage 'Description'"
87 active.SetPage TabDokumentinfo
88 Kontext "TabDokumentinfo"
89 Call DialogTest (TabDokumentinfo)
92 QAErrorlog "#i95523# - FileProperties - Tabpage 'User Defined' has changed. - Adaption of testcases needed."
93 ' printlog " Switch to Tabpage 'User defined'"
95 ' active.SetPage TabBenutzer
96 ' Kontext "TabBenutzer"
97 ' Call DialogTest ( TabBenutzer )
102 ' printlog " Click 'Infofields'"
103 ' Kontext "InfonamenBearbeiten"
104 ' printlog " Close upcoming dialog with 'Cancel'"
105 ' Call DialogTest (InfonamenBearbeiten)
106 ' InfonamenBearbeiten.Cancel
108 printlog " Switch to Tabpage 'Internet'"
110 active.SetPage TabInternet
111 Kontext "TabInternet"
112 Call DialogTest (TabInternet)
114 printlog " Switch to Tabpage 'Statistics' and close dialog"
116 active.SetPage TabStatistik
117 Kontext "TabStatistik"
118 Call DialogTest (TabStatistik)
122 printlog " Close active document"
126 '-----------------------------------------------------------
128 testcase tFileTemplatesOrganize
131 PrintLog " Open new document."
133 PrintLog " File / Templates / Organize"
134 FileTemplatesOrganize
135 Kontext "DVVerwalten"
137 if DVVerwalten.Exists then
143 if Not DVVerwalten.Exists then
144 Warnlog "Dialog 'Template Management' not up !"
149 PrintLog " Select first entry in left list of dialog 'Template Management' (should be 'My Templates')"
151 ListeLinks.TypeKeys "<Home>"
155 PrintLog " Select 'Commands -> Import Template'"
156 Call hMenuSelectNr(3)
158 PrintLog " Close Filedialog."
159 if gUseSysDlg = False then
161 if OeffnenDlg.Exists then
164 Warnlog "FileOpen dialog not up!"
168 PrintLog " Select 'Commands -> Printer Settings"
169 Kontext "DVVerwalten"
173 Call hMenuSelectNr(4)
175 PrintLog " Cancel 'Printer-Setup' dialog"
176 Kontext "DruckerEinrichten"
177 if DruckerEinrichten.Exists then
178 DruckerEinrichten.Cancel
180 Warnlog "Printersettings dialog is not up!"
183 PrintLog " Select first entry in right list"
184 Kontext "DVVerwalten"
187 PrintLog " Select pushbutton 'File..'"
188 if WelcheDatei.IsEnabled then
190 if gUseSysDlg = False then
191 PrintLog " Cancel Filedialog"
197 PrintLog " Select pushbutton 'Address Book'"
198 Kontext "DVVerwalten"
200 Kontext "AddressbookSource"
201 PrintLog " Cancel Dialog 'Address Book-Assignment'"
202 if AddressbookSource.Exists then
203 AddressbookSource.Cancel
205 Warnlog "the Dialog ' Address Book Source' wasnt up!"
208 PrintLog " Close dialog"
209 Kontext "DVVerwalten"
212 PrintLog " Close active document."
216 '-----------------------------------------------------------
218 testcase tFileTemplatesAddressbookSource
220 PrintLog " Open new document"
223 PrintLog " File / Templates /Address Book Source..."
225 FileTemplatesAddressbookSource
227 PrintLog " In 'Address Book Assignement' dialog click pushbutton 'Administrate'"
228 Kontext "AddressbookSource"
229 if AddressbookSource.Exists( 2 ) then
230 Call DialogTest (AddressbookSource)
233 PrintLog " Close 'Data Source Administration' with 'Cancel'"
234 Kontext "DatabaseProperties"
235 if ( DatabaseProperties.Exists( 2 ) ) then
236 PrintLog " DatabaseProperties.SetPage TabConnection"
237 Kontext "TabConnection"
238 Call DialogTest ( TabConnection )
239 Kontext "DatabaseProperties"
240 DatabaseProperties.Close
241 Kontext "AddressbookSource"
242 PrintLog " Close dialog"
243 AddressbookSource.Cancel
245 Kontext "AddressSourceAutopilot"
246 if AddressSourceAutopilot.Exists( 1 ) then
247 AddressSourceAutopilot.Cancel
249 Kontext "AddressbookSource"
250 AddressbookSource.Cancel
254 printlog " Close active document"
258 '-----------------------------------------------------------
260 testcase tFileTemplatesSave
261 if gApplication = "MASTERDOCUMENT" then
262 qaErrorLog " tFileTemplatesSave has been disabled in Masterdocument."
265 printlog "- File / Templates / Save"
267 printlog " Open new document"
269 printlog " File / Templates / Save"
271 Kontext "DokumentVorlagen"
272 Call DialogTest ( DokumentVorlagen )
273 printlog " On 'Templates' dialog click 'Organizer'"
276 Kontext "DVVerwalten"
278 printlog " Close dialog 'Template Management'"
280 Kontext "DokumentVorlagen"
281 DokumentVorlagen.Cancel
282 printlog " Close 'Templates' dialog"
284 printlog " Close active document"
286 gApplication = "WRITER"
289 '-----------------------------------------------------------
291 testcase tFileTemplatesEdit
292 printlog "- File / Templates / Edit"
294 printlog " Open new document"
296 printlog " File / Templates / Edit"
299 if gUseSysDlg = False then
300 printlog " Cancel Filedialog"
305 printlog " Close active document"
309 '-----------------------------------------------------------
311 testcase tFilePagePreview
312 PrintLog "- File / Page Preview"
313 Dim gehtnicht as boolean
315 printlog " Open new document"
316 Select Case gApplication
317 Case "WRITER", "MASTERDOCUMENT" : hNewDocument()
319 printlog "Not in Writer/Web!"
323 printlog " Enter some text in document"
324 Call wTypeKeys("Just a small change!")
325 printlog " File / Page Preview"
328 Kontext "DocPageViewWriter"
329 if DocPageViewWriter.NotExists then
330 Warnlog "Page Preview is not coming up!"
332 if Active.Exists then
333 if Active.GetRT = 304 then
338 if gehtnicht=FALSE then
339 Kontext "PreviewObjectbar"
340 if PreviewObjectbar.Exists = False then Call hToolbarSelect("PagePreview", true)
341 printlog " Select 'Zoom 100%' in toolbar"
345 Warnlog "Unable to change Zoom factor in toolbar! (Bug#110498)"
348 printlog " Click 'Print Page Preview' in toolbar"
349 Kontext "PreviewObjectbar"
350 DruckenSeitenansicht.Click
352 if Active.Exists then
353 QAErrorlog "No default printer!"
357 if Printing.Exists( 2 ) then Printing.Cancel
359 printlog " Close 'Print' dialog with cancel"
364 printlog " Close Page Preview with button 'Close Preview' in toolbar"
365 Kontext "PreviewObjectbar"
366 SeitenansichtSchliessen.Click
368 Warnlog "Objectbar not addressable!"
371 printlog " Close active document"
375 '-----------------------------------------------------------
377 testcase tFilePrinterSetup
378 PrintLog " Open new document"
381 PrintLog " File / Printer Settings"
385 if Active.Exists then
386 if Active.GetRT = 304 then
387 QAErrorLog "No Default Printer!"
390 Kontext "DruckerEinrichten"
391 if DruckerEinrichten.Exists( 2 ) then
392 Call DialogTest ( DruckerEinrichten )
393 DruckerEinrichten.Cancel
397 Kontext "DruckerEinrichten"
398 Call DialogTest ( DruckerEinrichten )
399 DruckerEinrichten.Cancel
400 PrintLog " Cancel 'Printer Setup' dialog"
402 PrintLog " Close active document"
406 '-----------------------------------------------------------
408 testcase tMasterDocFilePagePreview
409 PrintLog "- File / Page Preview"
410 Dim gehtnicht as boolean
412 gApplication = "MASTERDOCUMENT"
413 printlog " Open new document"
416 printlog " Enter some text in document"
417 Call wTypeKeys("Just a small change!")
418 printlog " File / Page Preview"
421 Kontext "DocPageViewWriter"
422 if DocPageViewWriter.NotExists then
423 Warnlog "Page Preview is not coming up!"
425 if Active.Exists then
426 if Active.GetRT = 304 then
431 if gehtnicht=FALSE then
432 Kontext "PreviewObjectbar"
433 if PreviewObjectbar.Exists = False then Call hToolbarSelect("PagePreview", true)
434 printlog " Select 'Zoom 100%' in toolbar"
438 Warnlog "Unable to change Zoom factor in toolbar! (Bug#110498)"
441 printlog " Click 'Print Page Preview' in toolbar"
442 Kontext "PreviewObjectbar"
443 DruckenSeitenansicht.Click
445 if Active.Exists then
446 QAErrorlog "No default printer!"
450 if Printing.Exists then Printing.Cancel
452 printlog " Close 'Print' dialog with cancel"
457 printlog " Close Page Preview with button 'Close Preview' in toolbar"
458 Kontext "PreviewObjectbar"
459 SeitenansichtSchliessen.Click
461 Warnlog "Objectbar not addressable!"
465 printlog " Close active document"
467 gApplication = "WRITER"