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 : gregor.hartmann@oracle.com
30 '* short description : Update test for documentconverter
32 '\******************************************************************************
34 testcase tUpdtWizardDocumentConverter
36 printlog( "Resource test for the document converter" )
40 dim iDialog as integer
41 dim iDocumentType as integer
43 dim sSourcePathWriter as string
44 sSourcePathWriter = gTesttoolpath & "framework\required\input\document_converter\"
45 sSourcePathWriter = convertpath( sSourcePathWriter )
46 dim sTargetFile as string
47 dim sLogFile as string
48 dim aFileList( 100 ) as string
49 dim iCurrentFile as integer
52 sTargetFile = hGetWorkPath()
53 sLogFile = sTargetFile & "Logfile.odt"
54 sTargetFile = sTargetFile & "docconv1" & hGetSuffix( "current" )
56 FileWizardDocumentConverter
58 Kontext "DocumentConverter"
59 hWaitForObject( CreateLogfile, 3000 )
62 Call DialogTest ( DocumentConverter )
70 ' as we selected all documenttypes, the settings page for each
71 ' documenttype has to pop up
72 for iDocumentType = 1 to 4
74 ContinueButton.click()
76 Kontext "DocumentConverter"
77 if ( template.isVisible() ) then
78 printlog( "Page " & 1 + iDocumentType & " is visible" )
80 warnlog( "Cannot access page 2, aborting test" )
81 hCloseDialog( DocumentConverter, "Cancel" )
88 case 1 : ImportFormTemplatesSearch.click()
89 case 2 : SaveToTemplatesSearch.Click()
90 case 3 : ImportFormDocumentSearch.Click()
91 case 4 : SaveToDocumentSearch.Click()
95 Call Dialogtest (OeffnenDlg)
98 Kontext "DocumentConverter"
99 ImportFormDocument.setText( sSourcePathWriter )
105 Kontext "DocumentConverter"
106 ContinueButton.click()
108 Kontext "DocumentConverter"
109 if ( summary.isVisible() ) then
110 printlog( "Page 6 is visible" )
112 warnlog( "Page 6 - Summary Page is missing" )
115 Kontext "DocumentConverter"
116 ContinueButton.click()
118 Kontext "DocumentConverter"
121 qaerrorlog( "#i54265# Show Logfile button has no HID, using accelerator instead" )
124 do while ( DocumentConverter.exists() )
126 ContinueButton.click()
131 if ( iWait = 20000 ) then
132 warnlog( "Document not converted within 20 seconds" )
137 if ( getDocumentCount <> 1 ) then
138 warnlog( "Exactly one - the conversion result document - should be open" )
142 hDeleteFile( sTargetFile )
143 hDeleteFile( sLogFile )