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: wizard_documentconverter.inc,v $
13 '* last change: $Author: rt $ $Date: 2008-08-01 09:48:16 $
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 : joerg.skottke@sun.com
36 '* short description : Update test for documentconverter
38 '\******************************************************************************
40 testcase tUpdtWizardDocumentConverter
44 dim iDialog as integer
45 dim iDocumentType as integer
48 dim sSourcePathWriter as string
49 sSourcePathWriter = gTesttoolpath & "framework\required\input\document_converter\"
50 sSourcePathWriter = convertpath( sSourcePathWriter )
51 dim sTargetFile as string
52 dim sLogFile as string
53 dim aFileList( 100 ) as string
54 dim iCurrentFile as integer
58 irc = hOpenWizardWithMenu( "DOCCONV" )
60 warnlog( "Unable to open requested wizard, aborting test" )
64 sTargetFile = hGetWorkPath()
65 sLogFile = sTargetFile & "Logfile.odt"
67 stargetFile = sTargetFile & "docconv1" & hGetSuffix( "current" )
70 Kontext "DocumentConverter"
71 hWaitForObject( CreateLogfile, 3000 )
74 Call DialogTest ( DocumentConverter )
82 ' as we selected all documenttypes, the settings page for each
83 ' documenttype has to pop up
84 for iDocumentType = 1 to 4
86 ContinueButton.click()
88 Kontext "DocumentConverter"
89 if ( template.isVisible() ) then
90 printlog( "Page " & 1 + iDocumentType & " is visible" )
92 warnlog( "Cannot access page 2, aborting test" )
100 case 1 : ImportFormTemplatesSearch.click()
101 case 2 : SaveToTemplatesSearch.Click()
102 case 3 : ImportFormDocumentSearch.Click()
103 case 4 : SaveToDocumentSearch.Click()
107 Call Dialogtest (OeffnenDlg)
110 Kontext "DocumentConverter"
111 ImportFormDocument.setText( sSourcePathWriter )
117 Kontext "DocumentConverter"
118 ContinueButton.click()
120 Kontext "DocumentConverter"
121 if ( summary.isVisible() ) then
122 printlog( "Page 6 is visible" )
124 warnlog( "Page 6 - Summary Page is missing" )
127 Kontext "DocumentConverter"
128 ContinueButton.click()
130 Kontext "DocumentConverter"
133 sKeys = hGetAccel( "DocumentConverter_ShowLog" )
134 qaerrorlog( "#i54265# Show Logfile button has no HID, using accelerator instead" )
137 do while ( DocumentConverter.exists() )
138 DocumentConverter.TypeKeys( sKeys )
141 if ( iWait = 20000 ) then
142 warnlog( "Document not converted within 20 seconds" )
147 if ( getDocumentCount <> 1 ) then
148 warnlog( "Exactly one - the conversion result document - should be open" )
152 hDeleteFile( sTargetFile )
153 hDeleteFile( sLogFile )