merge the formfield patch from ooo-build
[ooovba.git] / testautomation / framework / required / includes / wizard_webpage.inc
blob1e28e1e1397ededc27557d5f1866b38190aa6ae4
1 'encoding UTF-8  Do not remove or change this line!
2 '**************************************************************************
3 '* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
4 '* 
5 '* Copyright 2008 by Sun Microsystems, Inc.
6 '*
7 '* OpenOffice.org - a multi-platform office productivity suite
8 '*
9 '* $RCSfile: wizard_webpage.inc,v $
11 '* $Revision: 1.1 $
13 '* last change: $Author: jsi $ $Date: 2008-06-16 12:19:04 $
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 : thorsten.bosbach@sun.com
36 '* short description : Resource test of Web Page Wizard
38 '\************************************************************************
40 testcase tUpdtWizardWebpage
42     dim i as integer
43     dim a as integer
44     a = getDocumentCount
45     FileWizardsWebPage
47     Kontext "WebWizard"
48     if WebWizard.exists(20) then
50         printlog " 1. Introduction"
51         Call DialogTest (WebWizard,1)
52         IntroductionChooseSettings.getItemCount
53         IntroductionChooseSettings.getSelText
54         NextButton.click
55         
56         printlog " 2. Documents"
57         Call DialogTest (WebWizard,2)
58         DocumentsAdd.click
60         Kontext "OeffnenDlg"
61         if OeffnenDlg.exists(5) then
62             Dateiname.setText ConvertPath ( gTesttoolPath + "global\input\graf_inp\borabora.jpg"
63             Oeffnen.click           
64         else
65             warnlog "File Dialog didn't came up"
66         endif
67         WaitSlot( 5000 )
68         
69         Kontext "WebWizard"
70         DocumentsWebSiteContent.getSelText
71         DocumentsWebSiteContent.getItemcount
72         DocumentsExportFileFormat.getItemCount
73         DocumentsExportFileFormat.getSelText
74         DocumentsInformationTitle.getText
75         DocumentsInformationsummary.setText "A"
76         DocumentsInformationAuthor.setText "B"
77         NextButton.click
78         
79         printlog " 3. Main Layout"
80         Call DialogTest (WebWizard,3)
81         MainLayoutLayout2.typeKeys "<space>"
82         NextButton.click
83         
84         printlog " 4. Layout details"
85         Call DialogTest (WebWizard,4)
86         LayoutDetailsFileName.isChecked
87         LayoutDetailsDescription.isChecked
88         LayoutDetailsAuthor.isChecked
89         LayoutDetailsCreationDate.isChecked
90         LayoutDetailsLastChangeDate.isChecked
91         LayoutDetailsFileFormat.isChecked
92         LayoutDetailsFileFormatIcon.isChecked
93         LayoutDetailsNumberOfPages.isChecked
94         LayoutDetailsSizeInKB.isChecked
95         LayoutDetails640x480.isChecked
96         LayoutDetails800x600.isChecked
97         LayoutDetails1024x768.isChecked
98         NextButton.click
99         
100         printlog " 5. Style"
101         Call DialogTest (WebWizard,5)
102         StyleStyle.getItemCount
103         StyleStyle.getSelText
104         StyleBackgroundImage.click
105         Kontext "BackgroundImages"
106         if BackgroundImages.exists(10) then
107             Call Dialogtest (BackgroundImages)
108             Forward.click
109             Back.click
110             Other.click
111             Kontext "OeffnenDlg"
112             if OeffnenDlg.exists(5) then
113                 OeffnenDlg.cancel
114             else
115                 warnlog "File Dialog didn't came up"
116             endif
117             WaitSlot( 5000 )
119             Kontext "BackgroundImages"
120             None.click
121             cancelB.click
122         else
123             warnlog "Dialog Background images didn't came up"
124         endif
125         Kontext "WebWizard"
126         StyleIconSet.click
127         Kontext "IconSets"
128         if IconSets.exists(5) then
129             Call Dialogtest (IconSets)
130             None.click
131             cancelB.click
132         else
133             warnlog "File Dialog didn't came up"
134         endif
135         Kontext "WebWizard"
136         NextButton.click
138         printlog " 6. Web site information"
139         Call DialogTest (WebWizard,6)
140         WebSiteInformationTitle.getText
141         WebSiteInformationDescription.getText
142         WebSiteInformationEmail.getText
143         WebSiteInformationCopyrightNotice.getText
144         WebSiteInformationCreated.getText
145         WebSiteInformationCreated.more
146         WebSiteInformationCreated.getText
147         WebSiteInformationCreated.toMax
148         WebSiteInformationCreated.getText
149         WebSiteInformationModified.getText
150         NextButton.click
151         
152         printlog " 7. Preview"
153         Call DialogTest (WebWizard,7)
154         PreviewToALocalFolderCB.unCheck
155         PreviewToALocalFolderTF.getText
156         PublishToALocalFolderB.click
157             Kontext "OeffnenDlg"
158             if OeffnenDlg.exists(5) then
159                 OeffnenDlg.cancel
160             else
161                 warnlog "File Dialog didn't came up"
162             endif
163             WaitSlot( 5000 )
164         Kontext "WebWizard"
165         PublishToAZIPArchiveCB.isChecked
166         PublishToAZIPArchiveTF.getText
167         PublishToAZIPArchiveB.click
168             Kontext "SpeichernDlg"
169             if SpeichernDlg.exists(5) then
170                 SpeichernDlg.cancel
171             else
172                 warnlog "File Dialog didn't came up"
173             endif
174             WaitSlot( 5000 )
175         Kontext "WebWizard"
176         PublishToAWebServer.isChecked
177         try
178             PublishFTPConfigure.click
179             Kontext "FTPConnection"
180             if FTPConnection.exists(5) then
181                 Call Dialogtest (FTPConnection)
182                 ServerName.getText
183                 UserName.getText
184                 Password.getText
185                 Connect.isEnabled
186                 ChooseARemoteDirectory.getText
187                 ChooseARemoteDirectoryB.isEnabled
188                 CancelB.click
189             endif
190         catch
191             printlog "no ftp"
192         endcatch
193         
194         Kontext "WebWizard"
195         if ( webwizard.exists( 10 ) ) then
196             PublishSaveSettings.check()
197             PublishSaveAs.getItemCount
198             PublishSaveAs.getSelText
199             CancelB.click
200             i = 0
201             while ((getdocumentcount > a) AND (i<30))
202                 printlog "waiting for closing of wizard (max 30 sec): " + i
203                 inc i
204                 sleep 1
205             wend
206             if i > 29 then
207                 qaErrorlog "Wizard performance issue; takes longer than 30 sec to close."
208             endif
209         else
210             warnlog( "Cannot access webwizard" )
211         endif
212     else
213         warnlog "Web page wizard didn't come up"
214     endif
215 endcase