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: id_009.inc,v $
13 '* last change: $Author: jsi $ $Date: 2008-06-16 10:43:00 $
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 : wolfram.garten@sun.com
36 '* short description : Testcases to test the Help-Menu.
38 '***********************************************************************************
41 ' #1 tmHelpExtendedTips
42 ' #1 tmHelpAboutStarOffice
44 ' #1 tCheckIfTheHelpExists
45 '\**********************************************************************************
47 testcase tmHelpHelpAgent
53 HelpHelpAgent ' it's just a switch
60 '...---....---.-.-.-.-.....---......--.-.-.-.....----..-........................---.......
73 '...---....---.-.-.-.-.....---......--.-.-.-.....----..-........................---.......
75 testcase tmHelpExtendedTips
86 '...---....---.-.-.-.-.....---......--.-.-.-.....----..-........................---.......
88 testcase tmHelpAboutStarOffice
93 Kontext "UeberStarMath"
94 DialogTest (UeberStarMath)
100 '...---....---.-.-.-.-.....---......--.-.-.-.....----..-........................---.......
102 testcase tmHelpContents
103 goto endsub '"#i84486# - tmHelpContents outcommented due to crash."
106 '/// open application ///'
108 '/// Help->Contents ///'
111 kontext "StarOfficeHelp"
112 if Not StarOfficeHelp.Exists then
113 Warnlog "Help is not up!"
115 '/// get the number of entries in the listbox 'select Help modul' ///'
116 Printlog "HelpAbout: '" + HelpAbout.GetItemCount +"'"
117 '################ left half ################
118 '/// on the left half of the dialog: ///'
119 '///+ change to the tabpage 'Contents' ///'
120 TabControl.SetPage ContentPage
121 '///+ get the number of entries in the listbox 'MAin help themes' ///'
122 Printlog "SearchContent: '" + SearchContent.GetItemCount + "'"
123 '///+ change to the tabpage 'Index' ///'
124 TabControl.SetPage IndexPage
125 '///+ get the number of entries in the listbox 'Search term' ///'
126 Printlog "SearchIndex: '" + SearchIndex.GetItemCount + "'"
128 '///+ click on button 'Display' ///'
131 '///+ change to the tabpage 'Find' ///'
132 TabControl.SetPage FindPage
133 '///+ get the number of entries in the listbox 'Search term' ///'
134 Printlog "SearchFind: '" + SearchFind.GetItemCount + "'"
135 '/// If the Search-Text-Field is empty - Check that the Find-button is deactivated ///'
136 if SearchFind.GetSelText = "" then
137 if FindButton.IsEnabled then
138 warnlog " The Find-Button should have been inactive, but was active."
141 warnlog " The Search-Text-Field shouldn't contain any text. But contained: " + SearchFind.GetSelText
143 '/// Insert some irrelevant text to get 0 results from the search. ///'
144 SearchFind.SetText "Doobbidedooo"
145 '///+ click on button 'Find' ///'
148 '///+ Messagebox comes up about: 'No topics found.' say OK ///'
149 if (active.exists (2) )then
150 Printlog "active came up: '" + active.gettext + "'"
153 kontext "StarOfficeHelp"
154 '///+ check checkbox 'Complete words only' ///'
156 '///+ check checkbox 'Find in headings only' ///'
157 FindInHeadingsOnly.Check
158 '///+ get the number of entries in the listbox 'List of headings' ///'
159 Printlog "Result: '" + Result.GetItemCount + "'"
160 '///+ click on button 'Display' ///'
162 '///+ change to the tabpage 'Bookmarks' ///'
163 TabControl.SetPage BookmarksPage
164 '///+ get the number of entries in the listbox 'Bookmark list' ///'
165 Printlog "Bookmarks: '" + Bookmarks.GetItemCount + "'"
166 '///+ click on button 'Display' ///'
167 DisplayBookmarks.Click
168 '################ right half ################
169 '/// on the right half of teh dialog: ///'
170 '################ toolbar ################
172 '///+ click on button 'Hide/Show Navigation Pane' ///'
175 '///+ click on button 'Hide/Show Navigation Pane' ///'
178 '///+ click on button 'First Page' ///'
181 '///+ click on button 'Previous Page' ///'
184 '///+ click on button 'Next Page' ///'
187 '///+ click on button 'Print ...' ///'
192 if Active.Exists( 2 ) then
193 qaerrorlog "No default printer defined: " & Active.GetText
198 if DruckenDLG.Exists then
199 '/// In the dialog 'Print' press the button 'Cancel' ///'
202 warnlog "the Print-Dialogue didnt appear."
205 '///+ click on button 'Add to Bookmarks ...' ///'
209 Kontext "AddBookmark"
210 '///+ on the dialog 'Add to Bookmarks ...' get the text from the editfield 'Bookmark' and press button 'Cancel' ///'
211 Printlog "Bookmarkname: '" + Bookmarkname.GetText + "'"
214 '################ help display ################
215 kontext "HelpContent"
216 '///+ open the Context Menu of the Frame 'Help Content' and count the entries ///'
217 HelpContent.OpenContextMenu
220 Printlog " i: " + hMenuItemGetCount
222 '################ right scroolbar ################
223 kontext "HelpContent"
224 '///+ click on button 'Previous Page' ///'
225 if HelpContentUP.IsVisible then
229 '///+ click on button 'Navigation' ///'
230 if HelpContentNAVIGATION.IsVisible then
231 HelpContentNAVIGATION.Click
234 kontext "NavigationsFenster"
235 '/// on the toolbox 'Navigation' press the window close button 'X' ///'
236 NavigationsFenster.Close
238 kontext "HelpContent"
239 '///+ click on button 'Next Page' ///'
240 if HelpContentDOWN.IsVisible then
241 HelpContentDOWN.Click
244 kontext "StarOfficeHelp"
245 '/// close the help with the keys [strg]+[F4] ///'
246 Printlog "trying to close the help now"
248 StarOfficeHelp.TypeKeys "<Mod1 F4>" ' strg F4 supported since bug #103586#
250 Warnlog "failed to close the help window :-("
252 kontext "StarOfficeHelp"
253 if StarOfficeHelp.Exists then
254 warnlog "Help still up!"
257 '/// close application ///'
261 '...---....---.-.-.-.-.....---......--.-.-.-.....----..-........................---.......
263 testcase tCheckIfTheHelpExists
264 '/// open application ///'
266 '/// Bring up the help-window ///'
268 kontext "HelpContent"
270 '/// Press "CTRL A" and "CTRL C" to select all and then copy it. ///'
271 HelpContent.TypeKeys "<MOD1 A>"
273 HelpContent.TypeKeys "<MOD1 C>"
274 '/// If the clipboard now is empty, then nothing were copied, which means we have a bug. ///'
275 if GetClipBoard = "" then
276 Warnlog " No content in the Help-Content -view."
278 Printlog " The Help-Content -view contained content. Good."
280 kontext "StarOfficeHelp"
281 '/// Press "CTRL F4" to close the help-window. ///'
283 StarOfficeHelp.TypeKeys "<MOD1 F4>"
285 Warnlog " Failed to close the help window :-("
287 kontext "StarOfficeHelp"
288 if StarOfficeHelp.Exists then
289 warnlog "Help was still visible!"
291 '/// And a dot into the main window. Making sure kontext and focus is right. ///'
293 '/// Close Application ///'
295 endcase 'tCheckIfTheHelpExists