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 : oliver.craemer@oracle.com
30 '* short description : Resource Test - Tools Menu Part II
32 '************************************************************************
35 ' #1 tToolsExtensionManager
36 ' #1 tToolsXMLFilterSettings
41 '\***********************************************************************
45 Printlog Chr(13) + "--------- Tools Menu Part II (c_upd_toolsmenu2.inc) ---------"
49 call tToolsExtensionManager
50 call tToolsXMLFilterSettings
57 '-----------------------------------------------------------
60 '///<u><b>Tools - Macro</b></u>
62 Dim iWhichSecurityLevel as integer
63 printlog " Set SecurityLevel to low and remember starting value"
64 iWhichSecurityLevel = hSetMacroSecurity(0)
66 '/// Open new Spreadsheet document
67 printlog " Open new Spreadsheet document"
69 '/// Record macro by 'Tools – Macro – Record'
70 printlog " Record macro by 'Tools – Macro – Record'"
71 ' ToolsMacroRecordMacro
73 '/// Close macro recording by clicking 'Stop Recording'
74 printlog " Close macro recording by clicking 'Stop Recording'"
76 '/// Open 'Macro Selector' dialog by 'Tools – Macro – Run'
77 printlog " Open 'Macro Selector' dialog by 'Tools – Macro – Run'"
79 Kontext "ScriptSelector"
80 Call DialogTest ( ScriptSelector )
81 '/// Close 'Macro Selector' dialog with 'Cancel
82 printlog " Close 'Macro Selector' dialog with 'Cancel"
84 '/// Open Macro dialog by 'Tools – Macro – Organize Macros – StarOffice Basic'
85 printlog " Open Macro dialog by 'Tools – Macro – Organize Macros – StarOffice Basic'"
88 Call DialogTest ( Makro )
89 '/// Click on 'Assign' button
90 printlog " Click on 'Assign' button"
93 Active.SetPage TabCustomizeMenu
94 Kontext "TabCustomizeMenu"
95 '/// Close 'Customize' dialog with 'Cancel'
96 printlog " Close 'Customize' dialog with 'Cancel'"
97 TabCustomizeMenu.Cancel
99 '/// Click on 'Edit' button
100 printlog " Click on 'Edit' button"
102 '/// Close basic window by window closer
103 printlog " Close basic window by window closer"
106 '/// Reopen Macro dialog by 'Tools – Macro – Organize Macros – StarOffice Basic'
107 printlog " Reopen Macro dialog by 'Tools – Macro – Organize Macros – StarOffice Basic'"
110 '/// Click on 'Delete' button
111 printlog " Click on 'Delete' button"
113 '/// Close messagebox by 'No'
114 printlog " Close messagebox by 'No'"
116 if Active.exists then
120 '/// Click on Organizer' button
121 printlog " Click on Organizer' button"
124 Active.SetPage TabModule
126 '/// Close 'Organizer with 'Close'
127 printlog " Close 'Organizer with 'Close'"
130 '/// Close macro dialog
131 printlog " Close macro dialog"
133 '/// Open 'JavaScript Macros' dialog by 'Tools – Macro – Organize Macros – JavaScript'
134 printlog " Open 'JavaScript Macros' dialog by 'Tools – Macro – Organize Macros – JavaScript'"
135 ToolsMacrosOrganizeMacrosJavaScript
136 Kontext "ScriptOrganizer"
137 '/// Close 'JavaScript Macros' dialog by 'Close'
138 printlog " Close 'JavaScript Macros' dialog by 'Close'"
139 ScriptOrganizer.Close
140 '/// Open 'BeanShell Macros' dialog by 'Tools – Macro – Organize Macros – BeanShell'
141 printlog " Open 'BeanShell Macros' dialog by 'Tools – Macro – Organize Macros – BeanShell'"
142 ToolsMacrosOrganizeMacrosBeanShell
143 Kontext "ScriptOrganizer"
144 '/// Close ' BeanShell Macros' dialog by 'Close'
145 printlog " Close ' BeanShell Macros' dialog by 'Close'"
146 ScriptOrganizer.Close
148 printlog " Open testdocument 'gTesttoolPath + spreadsheet\required\input\DocwithMacro.ods'"
149 Call hFileOpen (Convertpath (gTesttoolPath + "spreadsheet\required\input\DocwithMacro.ods" ))
151 if Active.exists then
154 Printlog " Save document as 'user/work/DocwithMacro.ods'"
155 Call hFileSaveAsKill convertpath(gOfficePath & "user/work/DocwithMacro.ods")
156 printlog " Use 'Tools – Macro – Signature'"
158 Kontext "DigitalSignature"
159 Call DialogTest ( DigitalSignature )
160 '/// On 'Digital Signatures' dialog press 'Add' button
161 printlog " On 'Digital Signatures' dialog press 'Add' button"
163 Kontext "SelectCertificate"
164 Call DialogTest ( SelectCertificate )
165 '/// Close Select Certificate' dialog with 'Cancel'
166 printlog " Close Select Certificate' dialog with 'Cancel'"
167 SelectCertificate.Cancel
168 Kontext "DigitalSignature"
169 '/// Close 'Digital Signatures' dialog with 'Cancel'
170 printlog " Close 'Digital Signatures' dialog with 'Cancel'"
172 '/// Open 'Macro Organizer' by 'Tools – Macro – Organize Dialogs'
173 printlog " Open 'Macro Organizer' by 'Tools – Macro – Organize Dialogs'"
174 ToolsMacrosOrganizeDialogs
175 '/// Switch to tabpage 'Modules'
176 printlog " Switch to tabpage 'Modules'"
178 Active.SetPage TabModule
180 Call DialogTest ( TabModule )
181 '/// Switch to tabpage 'Dialogs'
182 printlog " Switch to tabpage 'Dialogs'"
184 Active.SetPage TabDialogs
186 Call DialogTest ( TabDialogs )
187 '/// Switch to tabpage 'Libraries'
188 printlog " Switch to tabpage 'Libraries'"
190 Active.SetPage TabBibliotheken
191 Kontext "TabBibliotheken"
192 Call DialogTest ( TabBibliotheken )
193 '/// Close dialog with 'Close'
194 printlog " Close dialog with 'Close'"
195 TabBibliotheken.Close
197 printlog " Close document"
199 printlog " Reset SecurityLevel to starting value"
200 Call hSetMacroSecurity(iWhichSecurityLevel)
204 '-----------------------------------------------------------
206 testcase tToolsExtensionManager
207 '///<u><b>Tools - Extension Manager</b></u>
209 '/// Open new Spreadsheet document
210 printlog " Open new Spreadsheet document"
212 '/// Open 'Extension Manager' by 'Tools – Extension Manager'
213 printlog " Open 'Extension Manager' by 'Tools – Extension Manager'"
215 Kontext "PackageManager"
216 Call DialogTest ( PackageManager )
217 '/// Close 'Extension Manager' with 'Close'
218 printlog " Close 'Extension Manager' with 'Close'"
221 printlog " Close document"
226 '-----------------------------------------------------------
228 testcase tToolsXMLFilterSettings
229 '///<u><b>Tools - XML Filter Settings</b></u>
231 '/// Open new Spreadsheet document
232 printlog " Open new Spreadsheet document"
234 '/// Open 'XML Filter Settings' dialog by 'Tools – XML Filter Settings'
235 printlog " Open 'XML Filter Settings' dialog by 'Tools – XML Filter Settings'"
236 ToolsXMLFilterSettings
237 Kontext "XMLFilterSettings"
238 Call DialogTest ( XMLFilterSettings )
239 '/// Close dialog with 'Close'
240 printlog " Close dialog with 'Close'"
243 printlog " Close document"
248 '-----------------------------------------------------------
250 testcase tToolsCustomize
251 '///<u><b>Tools - Customize</b></u>
253 '/// Open new Spreadsheet document
254 printlog " Open new Spreadsheet document"
256 '/// Open 'Customize' dialog by 'Tools – Customize'
257 printlog " Open 'Customize' dialog by 'Tools – Customize'"
259 '/// Switch to tabpage 'Menus'
260 printlog " Switch to tabpage 'Menus'"
262 Active.SetPage TabCustomizeMenu
263 Kontext "TabCustomizeMenu"
264 Call DialogTest ( TabCustomizeMenu )
265 '/// Switch to tabpage 'Keyboard'
266 printlog " Switch to tabpage 'Keyboard'"
268 Active.SetPage TabTastatur
269 Kontext "TabTastatur"
270 Call DialogTest ( TabTastatur )
271 '/// Switch to tabpage 'Toolbars'
272 printlog " Switch to tabpage 'Toolbars'"
274 Active.SetPage TabCustomizeToolbars
275 Kontext "TabCustomizeToolbars"
276 Call DialogTest ( TabCustomizeToolbars )
277 '/// Switch to tabpage 'Events'
278 printlog " Switch to tabpage 'Events'"
280 Active.SetPage TabCustomizeEvents
281 Kontext "TabCustomizeEvents"
282 Call DialogTest ( TabCustomizeEvents )
283 '/// Close 'Customize' dialog with 'Cancel'
284 printlog " Close 'Customize' dialog with 'Cancel'"
285 TabCustomizeEvents.Cancel
287 printlog " Close document"
292 '-----------------------------------------------------------
294 testcase tToolsOptions
295 '///<u><b>Tools - Options</b></u>
297 '/// Open new Spreadsheet document
298 printlog " Open new Spreadsheet document"
300 '/// Open 'Options' dialog by 'Tools – Options'
301 printlog " Open 'Options' dialog by 'Tools – Options'"
303 '/// Choose 'Calc – General'
304 printlog " Choose 'Calc – General'"
305 hToolsOptions("CALC", "GENERAL")
306 Call DialogTest ( TabLayoutCalc )
307 '/// Verify that the 'Measurement' combobox has items
308 printlog " Verify that the 'Measurement' combobox has items"
309 if Masseinheit.GetItemCount < 1 then
310 warnlog "The listbox is empty"
312 '/// Increase 'Tab stops'
313 printlog " Increase 'Tab stops'"
315 '/// Verify that the 'Move selection' combobox has four items
316 printlog " Verify that the 'Move selection' combobox has four items"
317 If SelektionNach.GetItemCount <> 4 then
318 warnlog "There are not 4 moves possible"
320 '/// Choose 'Calc – View'
321 printlog " Choose 'Calc – View'"
322 hToolsOptions("CALC", "VIEW")
323 Call DialogTest ( TabInhaltCalc )
324 '/// Verify that the 'Color' combobox has items
325 printlog " Verify that the 'Color' combobox has items"
326 if Farbe.GetItemCount < 1 then
327 warnlog "The listbox is empty"
329 '/// Verify that the 'Objects' combobox has items
330 printlog " Verify that the 'Objects' combobox has items"
331 if ObjekteGrafiken.GetItemCount < 1 then
332 warnlog "The listbox is empty"
334 '/// Verify that the 'Charts' combobox has items
335 printlog " Verify that the 'Charts' combobox has items"
336 if Diagramme.GetItemCount < 1 then
337 warnlog "The listbox is empty"
339 '/// Verify that the 'Drawing objects' combobox has items
340 printlog " Verify that the 'Drawing objects' combobox has items"
341 if Zeichenobjekte.GetItemCount < 1 then
342 warnlog "The listbox is empty"
344 '/// Choose 'Calc – Calculate'
345 printlog " Choose 'Calc – Calculate'"
346 hToolsOptions("CALC", "CALCULATE")
347 Call DialogTest ( TabBerechnen )
348 '/// Choose 'Calc – Sortlists'
349 printlog " Choose 'Calc – Sortlists'"
350 hToolsOptions("CALC", "SORTLISTS")
351 Call DialogTest ( TabSortierlisten )
352 '/// Verify that there are sortlists available
353 printlog " Verify that there are sortlists available"
354 if Listen.GetItemCount < 1 then
355 warnlog "The listbox is empty"
357 '/// Choose 'Calc – Changes'
358 printlog " Choose 'Calc – Changes'"
359 hToolsOptions("CALC", "CHANGES")
360 Call DialogTest ( TabAenderungenCalc )
361 '/// Verify that the 'Changes' combobox has items
362 printlog " Verify that the 'Changes' combobox has items"
363 if Aenderungen.GetItemCount < 1 then
364 warnlog "The listbox is empty"
366 '/// Choose 'Calc – Grid'
367 printlog " Choose 'Calc – Grid'"
368 hToolsOptions("CALC", "GRID")
369 Call DialogTest ( TabRaster )
370 '/// Decrease 'Horizontal Resolution'
371 printlog " Decrease 'Horizontal Resolution'"
372 RasterAufloesungXAchse.Less
373 '/// Increase 'Horizontal Subdivision'
374 printlog " Increase 'Horizontal Subdivision'"
375 RasterUnterteilungXAchse.More
376 '/// Choose 'Calc – Print'
377 printlog " Choose 'Calc – Print'"
378 hToolsOptions("CALC", "PRINT")
379 Call DialogTest ( TabPrintCalcOptions )
380 '/// Close 'Options' dialog with 'Cancel'
381 printlog " Close 'Options' dialog with 'Cancel'"
382 Kontext "OptionenDlg"
385 printlog " Close document"
390 '-----------------------------------------------------------
392 testcase tToolsSolver
393 '///<u><b>Tools - Solver</b></u>
397 '/// Open new Spreadsheet document
398 printlog " Open new Spreadsheet document"
400 '/// Open 'Solver' dialog by 'Tools - Solver'
401 printlog " Open 'Solver' dialog by 'Tools - Solver'"
405 qaerrorlog "Solver not available. This is true for versions older than SRC680_m246"
410 DialogTest ( Solver )
411 '/// Enter A1 for 'TargetCell'
412 printlog " Enter A1 for 'TargetCell'"
413 TargetCell.SetText "A1"
414 '/// Press 'Shrink' button for 'Target cell'
415 printlog " Press 'Shrink' button for 'Target cell'"
417 '/// On minimized dialog press 'Shrink' button again
418 printlog " On minimized dialog press 'Shrink' button again"
420 '/// Select 'Maximum'
421 printlog " Select 'Maximum'"
422 OptimizeMaximum.Check
423 '/// Select 'Minimum'
424 printlog " Select 'Minimum'"
425 OptimizeMinimum.Check
426 '/// Select 'Value of'
427 printlog " Select 'Value of'"
428 OptimizeValueOf.Check
429 '/// Minimize dialog by pressing 'Shrink' button for 'Value of'
430 printlog " Minimize dialog by pressing 'Shrink' button for 'Value of'"
431 OptimizeValueEditShrink.Click
432 '/// On minimized dialog press 'Shrink' button again
433 printlog " On minimized dialog press 'Shrink' button again"
434 OptimizeValueEditShrink.Click
435 '/// Minimize dialog by pressing 'Shrink' button for 'By changing cells'
436 printlog " Minimize dialog by pressing 'Shrink' button for 'By changing cells'"
437 ChangingCellsShrink.Click
438 '/// On minimized dialog press 'Shrink' button again
439 printlog " On minimized dialog press 'Shrink' button again"
440 ChangingCellsShrink.Click
441 '/// Enter 'A2' in edit box for 'Cell reference 1'
442 printlog " Enter 'A2' in edit box for 'Cell reference 1'"
443 CellReference1.SetText "A2"
444 '/// Minimize dialog by pressing 'Shrink' button for 'Cell reference 1'
445 printlog " Minimize dialog by pressing 'Shrink' button for 'Cell reference 1'"
446 CellReferenceShrink1.Click
447 '/// On minimized dialog press 'Shrink' button again
448 printlog " On minimized dialog press 'Shrink' button again"
449 CellReferenceShrink1.Click
450 '/// Verify that there are 'Operators' available
451 printlog " Verify that there are 'Operators' available"
452 If Operator1.GetItemCount < 1 then
453 warnlog "There are no operators available"
455 '/// Minimize dialog by pressing 'Shrink' button for 'Value 1'
456 printlog " Minimize dialog by pressing 'Shrink' button for 'Value 1'"
458 '/// On minimized dialog press 'Shrink' button again
459 printlog " On minimized dialog press 'Shrink' button again"
461 '/// Press 'Remove' button
462 printlog " Press 'Remove' button"
464 '/// Press 'Options' button
465 printlog " Press 'Options' button"
467 Kontext "SolverOptions"
468 DialogTest ( SolverOptions )
469 '/// On 'Options' dialog verify that there is min 1 'Solver engine' available
470 printlog " On 'Options' dialog verify that there is min 1 'Solver engine' available"
471 If SolverEngine.GetItemCount < 1 then
472 warnlog "There is no SolverEngine available"
474 '/// Check for 'Settings' which enables the edit button (e.g.Epsilon level)
475 printlog " Check for 'Settings' which enables the edit button (e.g.Epsilon level)"
476 For i = 1 to SolverSettings.GetItemCount
477 SolverSettings.Select i
478 if SolverSettingsEdit.IsEnabled then
479 i = SolverSettings.GetItemCount
482 If not SolverSettingsEdit.IsEnabled then
483 warnlog "Edit is not enabled"
490 '/// Click 'Edit' button to open 'Edit Setting' dialog
491 printlog " Click 'Edit' button to open 'Edit Setting' dialog"
492 SolverSettingsEdit.Click
493 Kontext "SolverEditSetting"
494 DialogTest ( SolverEditSetting )
496 '/// Increase 'Epsilon level'
497 printlog " Increase 'Epsilon level'"
499 '/// Close 'Edit Setting' dialog by 'Cancel'
500 printlog " Close 'Edit Setting' dialog by 'Cancel'"
501 SolverEditSetting.Cancel
502 Kontext "SolverOptions"
503 '/// Close 'Options' dialog by 'Cancel'
504 printlog " Close 'Options' dialog by 'Cancel'"
506 '/// Close 'Solver' dialog by 'Close'
507 printlog " Close 'Solver' dialog by 'Close'"
511 printlog " Close document"
516 '-----------------------------------------------------------