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 - Edit Menu Part II
32 '************************************************************************
35 ' #1 tEditDeleteContent
38 ' #1 tEditDeleteManualBreak
44 '\***********************************************************************
48 Printlog Chr(13) + "--------- EDIT Menu Part II (c_upd_editmenu2.inc) ---------"
51 call tEditDeleteContent
54 call tEditDeleteManualBreak
62 '-----------------------------------------------------------
65 '///<u><b>Edit - Fill</b></u>
67 '/// Open new Spreadsheet document
68 printlog " Open new Spreadsheet document"
70 '/// Enter '1' in cell C5
71 printlog " Enter '1' in cell C5"
72 Kontext "DocumentCalc"
73 call fCalcSelectCell ("C5")
74 DocumentCalc.typekeys "1<Return>"
75 '/// Select cells C5:C10
76 printlog " Select cells C5:C10"
77 call fCalcSelectCell ("C5:C10")
78 '/// Fill selected area via 'Edit - Fill – Down'
79 printlog " Fill selected area via 'Edit - Fill – Down'"
81 '/// Select cells C1:C5
82 printlog " Select cells C1:C5"
83 call fCalcSelectCell ("C1:C5")
84 '/// Fill selected area via 'Edit – Fill – Up'
85 printlog " Fill selected area via 'Edit – Fill – Up'"
87 '/// Select cells A5:C5
88 printlog " Select cells A5:C5"
89 call fCalcSelectCell ("A5:C5")
90 '/// Fill selected area via 'Edit – Fill – Left'
91 printlog " Fill selected area via 'Edit – Fill – Left'"
93 '/// Select cells C5:F5
94 printlog " Select cells C5:F5"
95 call fCalcSelectCell ("C5:F5")
96 '/// Fill selected area via 'Edit – Fill – Right'
97 printlog " Fill selected area via 'Edit – Fill – Right'"
99 '/// Select cell A1:F10
100 printlog " Select cell A1:F10"
101 call fCalcSelectCell ("A1:F10")
102 '/// Open fill-series-dialog via 'Edit – Fill – Series'
103 printlog " Open fill-series-dialog via 'Edit – Fill – Series'"
105 Kontext "ReiheFuellen"
106 DialogTest ( ReiheFuellen )
107 '/// Check Direction 'Right'
108 printlog " Check Direction 'Right'"
110 '/// Check Direction 'Up'
111 printlog " Check Direction 'Up'"
113 '/// Check Direction 'Left'
114 printlog " Check Direction 'Left'"
116 '/// Check Direction 'Down'
117 printlog " Check Direction 'Down'"
119 '/// Check Series Type 'Linear'
120 printlog " Check Series Type 'Linear'"
122 '/// Check Series Type 'Growth'
123 printlog " Check Series Type 'Growth'"
125 '/// Check Series Type 'AutoFill'
126 printlog " Check Series Type 'AutoFill'"
128 '/// Check Series Type 'Date'
129 printlog " Check Series Type 'Date'"
131 '/// Check Time Unit 'Day'
132 printlog " Check Time Unit 'Day'"
134 '/// Check Time Unit 'Weekday'
135 printlog " Check Time Unit 'Weekday'"
137 '/// Check Time Unit 'Month'
138 printlog " Check Time Unit 'Month'"
140 '/// Check Time Unit 'Year'
141 printlog " Check Time Unit 'Year'"
143 '/// Verify that 'Start Value' is disabled
144 printlog " Verify that 'Start Value' is disabled"
145 if StartWert.IsEnabled then warnlog "StartValue is enabled but should be disabled"
146 '/// Enter End value '10'
147 printlog " Enter End value '10'"
149 '/// Enter Increment '2'
150 printlog " Enter Increment '2'"
152 '/// Close dialog via 'Cancel'
153 printlog " Close dialog via 'Cancel'"
155 '/// Select all sheets by context menu on sheettab
156 printlog " Select all sheets by context menu on sheettab"
157 AlleTabellenAuswaehlen
158 '/// Open 'Fill Sheets' dialog by 'Edit - Fill - Sheets'
159 printlog " Open 'Fill Sheets' dialog by 'Edit - Fill - Sheets'"
161 Kontext "TabellenFuellen"
162 Dialogtest ( TabellenFuellen )
163 '/// Uncheck 'Paste all'
164 printlog " Uncheck 'Paste all'"
165 AuswahlAllesEinfuegen.UnCheck
167 printlog " Check 'Text'"
168 AuswahlZeichenketten.Check
170 printlog " Check 'Numbers'"
172 '/// Check 'Date & Time'
173 printlog " Check 'Date & Time'"
174 AuswahlDatumZeit.Check
175 '/// Check 'Formulas'
176 printlog " Check 'Formulas'"
179 printlog " Check 'Notes'"
182 printlog " Check 'Formats'"
184 '/// Check 'Skip empty cells'
185 printlog " Check 'Skip empty cells'"
186 LeerzeilenUeberspringen.Check
187 '/// Verify that 'Transpose' is disabled
188 printlog " Verify that 'Transpose' is disabled"
189 if Transponieren.IsEnabled then warnlog "Transpose is enabled but should be disabled"
191 printlog " Check 'Link'"
194 printlog " Check 'None'"
195 RechenopperationenKeine.Check
197 printlog " Check 'Add'"
198 RechenopperationenAddieren.Check
199 '/// Check 'Subtract'
200 printlog " Check 'Subtract'"
201 RechenopperationenSubtrahieren.Check
202 '/// Check 'Multiply'
203 printlog " Check 'Multiply'"
204 RechenopperationenMultiplizieren.Check
206 printlog " Check 'Divide'"
207 RechenopperationenDividieren.Check
208 '/// Verify that 'Dont shift' is disabled
209 printlog " Verify that 'Dont shift' is disabled"
210 if NichtVerschieben.IsEnabled then warnlog "Transpose is enabled but should be disabled"
211 '/// Verify that 'Down' is disabled
212 printlog " Verify that 'Down' is disabled"
213 if NachUnten.IsEnabled then warnlog "Transpose is enabled but should be disabled"
214 '/// Verify that 'Right' is disabled
215 printlog " Verify that 'Right' is disabled"
216 if NachRechts.IsEnabled then warnlog "Transpose is enabled but should be disabled"
217 '/// Close 'Fill Sheets' dialog with 'Cancel'
218 printlog " Close 'Fill Sheets' dialog with 'Cancel'"
219 TabellenFuellen.Cancel
221 printlog " Close document"
226 '-----------------------------------------------------------
228 testcase tEditDeleteContent
229 '///<u><b>Edit - Delete Content</b></u>
231 '/// Open new Spreadsheet document
232 printlog " Open new Spreadsheet document"
234 '/// Open 'Delete Content' dialog via 'Edit – Delete content'
235 printlog " Open 'Delete Content' dialog via 'Edit – Delete content'"
237 Kontext "InhalteLoeschen"
238 DialogTest ( InhalteLoeschen )
239 '/// Check 'Delete All'
240 printlog " Check 'Delete All'"
242 '/// Check that all other controls are now disabled
243 printlog " Check that all other controls are now disabled"
244 if Zeichenketten.IsEnabled then warnlog "Option is enabled but should be disabled"
245 '/// Uncheck 'Delete All'
246 printlog " Uncheck 'Delete All'"
249 printlog " Check 'Text'"
252 printlog " Check 'Numbers'"
254 '/// Check 'Date & Time'
255 printlog " Check 'Date & Time'"
257 '/// Check 'Formulas'
258 printlog " Check 'Formulas'"
261 printlog " Check 'Notes'"
264 printlog " Check 'Formats'"
267 printlog " Check 'Objects'"
269 '/// Close dialog via 'Cancel'
270 printlog " Close dialog via 'Cancel'"
271 InhalteLoeschen.Cancel
273 printlog " Close document"
278 '-----------------------------------------------------------
280 testcase tEditDeleteCells
281 '///<u><b>Edit - Delete Cells</b></u>
283 '/// Open new Spreadsheet document
284 printlog " Open new Spreadsheet document"
286 '/// Open 'Delete Cells' dialog via 'Edit – Delete Cells'
287 printlog " Open 'Delete Cells' dialog via 'Edit – Delete Cells'"
289 Kontext "ZellenLoeschen"
290 DialogTest ( ZellenLoeschen )
291 '/// Check 'Shift cells up'
292 printlog " Check 'Shift cells up'"
294 '/// Check 'Shift cells left'
295 printlog " Check 'Shift cells left'"
296 Zellennachlinks.Check
297 '/// Check 'Delete entire row'
298 printlog " Check 'Delete entire row'"
300 '/// Check 'Delete entire column'
301 printlog " Check 'Delete entire column'"
303 '/// Close dialog via 'Cancel'
304 printlog " Close dialog via 'Cancel'"
305 ZellenLoeschen.Cancel
307 printlog " Close document"
312 '-----------------------------------------------------------
315 '///<u><b>Edit - Sheet</b></u>
317 '/// Open new Spreadsheet document
318 printlog " Open new Spreadsheet document"
320 '/// Open 'Edit – Sheet – Move/Copy Sheet' dialog
321 printlog " Open 'Edit – Sheet – Move/Copy Sheet' dialog"
323 Kontext "TabelleVerschiebenKopieren"
324 DialogTest ( TabelleVerschiebenKopieren )
325 '/// Check that there are more than one entry in listbox 'To document'
326 printlog " Check that there are more than one entry in listbox 'To document'"
327 if InsDokument.GetItemCount < 1 then warnlog "The listbox is empty"
328 '/// Check that there are four entries in 'Insert before'
329 printlog " Check that there are four entries in 'Insert before'"
330 if EinfuegenVor.GetItemCount < 1 then warnlog "The listbox is empty"
332 printlog " Check 'Copy'"
334 '/// Close dialog via 'Cancel'
335 printlog " Close dialog via 'Cancel'"
336 TabelleVerschiebenKopieren.Cancel
337 '/// Open 'Edit – Sheet – Select' dialog
338 printlog " Open 'Edit – Sheet – Select' dialog"
340 Kontext "SelectSheets"
341 DialogTest ( SelectSheets )
342 '/// Check that there are three entries in listbox
343 printlog " Check that there are three entries in listbox"
344 if not SheetSelectionBox.GetItemCount = 3 then warnlog "The amount of sheets is wrong, should be 3 but is" & SheetSelectionBox.GetItemCount
345 '/// Close dialog via 'Cancel'
346 printlog " Close dialog via 'Cancel'"
348 '/// Choose 'Edit – Sheet – Delete'
349 printlog " Choose 'Edit – Sheet – Delete'"
351 '/// Now a messagebox appears. Close messagebox with 'No'
352 printlog " Now a messagebox appears. Close messagebox with 'No'"
354 if active.exists then
355 DialogTest ( Active )
358 warnlog "Edit::Sheet::Delete - no removal warning appeared!"
361 printlog " Close document"
366 '-----------------------------------------------------------
368 testcase tEditDeleteManualBreak
369 '///<u><b>Edit - Delete - Manual Break</b></u>
371 '/// Open new Spreadsheet document
372 printlog " Open new Spreadsheet document"
375 printlog " Select cell H10"
376 call fCalcSelectRange ("H10")
377 '/// Insert a manual rowbreak via 'Insert – Manual Break – Row Break'
378 printlog " Insert a manual rowbreak via 'Insert – Manual Break – Row Break'"
379 InsertManuelBreakRowBreak
380 '/// Insert a manual columnbreak via 'Insert – Manual Break – Column Break'
381 printlog " Insert a manual columnbreak via 'Insert – Manual Break – Column Break'"
382 InsertManuelBreakColumnBreak
383 '/// Delete manual rowbreak via 'Edit – Delete Manual Break – Row Break'
384 printlog " Delete manual rowbreak via 'Edit – Delete Manual Break – Row Break'"
385 EditRemoveManualBreakRowBreak
386 '/// Delete manual columnbreak via 'Edit – Delete Manual Break – Column Break'
387 printlog " Delete manual columnbreak via 'Edit – Delete Manual Break – Column Break'"
388 EditRemoveManualBreakColumnBreak
390 printlog " Close document"
395 '-----------------------------------------------------------
398 '///<u><b>Edit - Links</b></u>
400 '/// Open new Spreadsheet document
401 printlog " Open new Spreadsheet document"
403 '/// Open Insert graphic dialog via 'Insert – Picture – From File'
404 printlog " Open Insert graphic dialog via 'Insert – Picture – From File'"
405 InsertGraphicsFromFile
406 '/// Set filename ' global/input/graf_inp/borabora.jpg'
407 printlog " Set filename ' global/input/graf_inp/borabora.jpg'"
408 Kontext "GrafikEinfuegenDlg"
409 Dateiname.SetText ConvertPath ( gTesttoolPath + "global\input\graf_inp\borabora.jpg" )
411 printlog " Check 'Link'"
413 '/// Close dialog with 'OK'
414 printlog " Close dialog with 'OK'"
416 '/// Open 'Edit – Links' dialog
417 printlog " Open 'Edit – Links' dialog"
418 Kontext "DocumentCalc"
420 Kontext "VerknuepfungenBearbeiten"
421 VerknuepfungenBearbeiten.Exists (2)
422 Call DialogTest ( VerknuepfungenBearbeiten )
423 '/// Click on 'Update' – button
424 printlog " Click on 'Update' – button"
426 '/// Click on 'Modify...' - button
427 printlog " Click on 'Modify...' - button"
429 '/// Close 'Link graphics' – dialog with 'Cancel'
430 printlog " Close 'Link graphics' – dialog with 'Cancel'"
431 Kontext "GrafikEinfuegenDLG"
432 Call Dialogtest ( GrafikEinfuegenDLG )
433 GrafikEinfuegenDLG.Cancel
434 '/// Click on 'Break Link' – button
435 printlog " Click on 'Break Link' – button"
436 Kontext "VerknuepfungenBearbeiten"
438 '/// Close messagebox with 'Yes'
439 printlog " Close messagebox with 'Yes'"
441 If Active.Exists then
444 Warnlog "No request by deleting the link"
446 Kontext "VerknuepfungenBearbeiten"
447 '/// Close 'Edit Links' – dialog
448 printlog " Close 'Edit Links' – dialog"
449 VerknuepfungenBearbeiten.Close
451 printlog " Close document"
453 '/// Load testfile ' spreadsheet/required/input/linkclient.ods ' and allow update
454 printlog " Load testfile ' spreadsheet/required/input/linkclient.ods ' and allow update"
455 Call hFileOpen ( ConvertPath ( gTesttoolPath + "spreadsheet\required\input\linkclient.ods"))
456 printlog " Confirm Update Links dialog with YES"
458 If Active.Exists then
461 warnlog "No dialog for updating links exists"
463 '/// Open 'Edit – Links' dialog
464 printlog " Open 'Edit – Links' dialog"
466 Kontext "VerknuepfungenBearbeiten"
467 '/// Click on 'Update' – button
468 printlog " Click on 'Update' – button"
470 '/// Click on 'Modify...' - button to open 'Modify Link' dialog
471 printlog " Click on 'Modify...' - button to open 'Modify Link' dialog"
474 Call Dialogtest ( ModifyLink )
475 '/// Verify that the 'Application' editfield is available
476 printlog " Verify that the 'Application' editfield is available"
477 ModifyDDEApplication.GetText
478 '/// Verify that the 'File' editfield is available
479 printlog " Verify that the 'File' editfield is available"
480 ModifyDDEFile.GetText
481 '/// Verify that the 'Category' editfield is available
482 printlog " Verify that the 'Category' editfield is available"
483 ModifyDDECategory.GetText
484 '/// Close 'Modify Link' – dialog with 'Cancel'
485 printlog " Close 'Modify Link' – dialog with 'Cancel'"
487 Kontext "VerknuepfungenBearbeiten"
488 '/// Check that updateradiobuttons are enabled
489 printlog " Check that updateradiobuttons are enabled"
490 if not Automatisch.IsEnabled then
491 warnlog "Updateradiobutton is disabled but should be enabled"
493 '/// Click on 'Break Link' – button
494 printlog " Click on 'Break Link' – button"
496 '/// Accept messagebox with 'Yes'
497 printlog " Accept messagebox with 'Yes'"
499 If Active.Exists then
502 Kontext "VerknuepfungenBearbeiten"
503 '/// Check that updateradiobuttons are disabled
504 printlog " Check that updateradiobuttons are disabled"
505 if Manuell.IsEnabled then
506 warnlog "Updateradiobutton is enabled but should be disabled"
508 '/// Close 'Edit Links' – dialog
509 printlog " Close 'Edit Links' – dialog"
510 VerknuepfungenBearbeiten.Close
512 printlog " Close document"
517 '-----------------------------------------------------------
520 '///<u><b>Edit - PlugIn</b></u>
522 '/// Open new Spreadsheet document
523 printlog " Open new Spreadsheet document"
526 printlog " Edit – PlugIn"
529 printlog " Edit – PlugIn"
532 printlog " Close document"
537 '-----------------------------------------------------------
539 testcase tEditImageMap
540 '///<u><b>Edit - ImageMap</b></u>
542 '/// Open new Spreadsheet document
543 printlog " Open new Spreadsheet document"
545 '/// Open Insert graphic dialog via 'Insert – Picture – From File'
546 printlog " Open Insert graphic dialog via 'Insert – Picture – From File'"
547 InsertGraphicsFromFile
548 '/// Set filename ' global/input/graf_inp/borabora.jpg'
549 printlog " Set filename ' global/input/graf_inp/borabora.jpg'"
550 Kontext "GrafikEinfuegenDlg"
551 Dateiname.SetText ConvertPath ( gTesttoolPath + "global\input\graf_inp\borabora.jpg" )
552 '/// Close dialog with 'OK'
553 printlog " Close dialog with 'OK'"
555 '/// Open ImageMap – dialog via 'Edit – ImageMap'
556 printlog " Open ImageMap – dialog via 'Edit – ImageMap'"
558 Kontext "ImageMapEditor"
559 Call Dialogtest ( ImageMapEditor )
560 '/// Click on Open button
561 printlog " Click on Open button"
563 Kontext "GeneralFileDialog"
564 '/// Close 'Open'-dialog with Cancel
565 printlog " Close 'Open'-dialog with Cancel"
566 GeneralFileDialog.Cancel
567 Kontext "ImageMapEditor"
568 '/// Click on 'Save'-button
569 printlog " Click on 'Save'-button"
571 Kontext "SpeichernDlg"
572 '/// Close 'Save'-dialog with Cancel
573 printlog " Close 'Save'-dialog with Cancel"
575 Kontext "ImageMapEditor"
576 '/// Click on 'Rectangle'button and draw a rectangle by mouse
577 printlog " Click on 'Ellipse'button and draw an ellipse by mouse"
579 Dokument.MouseDown 50,50
580 Dokument.MouseMove 50,50,10,10
581 Dokument.MouseUp 10,10
582 '/// Click on 'Active'-button
583 printlog " Click on 'Active'-button"
585 '/// Click on 'Macro...'-button
586 printlog " Click on 'Macro...'-button"
587 ' warnlog "#i102720# => crash, therefor this functionality is outcommented"
589 Kontext "MakroZuweisen"
590 Call DialogTest ( MakroZuweisen )
591 '/// Close 'Assign Macro'-dialog with Cancel
592 printlog " Close 'Assign Macro'-dialog with Cancel"
594 Kontext "ImageMapEditor"
595 '/// Click on 'Properties'-button
596 printlog " Click on 'Properties'-button"
598 Kontext "ImageMapHyperlink"
599 Call DialogTest ( ImageMapHyperlink )
600 '/// Verify that the 'URL' editfield is available
601 printlog " Verify that the 'URL' editfield is available"
603 '/// Verify that the 'Alternativetext' editfield is available
604 printlog " Verify that the 'Alternativetext' editfield is available"
605 Alternativetext.GetText
606 '/// Verify that the 'Frame' listbox has items
607 printlog " Verify that the 'Frame' listbox has items"
609 '/// Verify that the 'Description' editfield is available
610 printlog " Verify that the 'Description' editfield is available"
612 '/// Close 'Properties'-dialog with 'Cancel'
613 printlog " Close 'Properties'-dialog with 'Cancel"
614 ImageMapHyperlink.Cancel
615 Kontext "ImageMapEditor"
616 '/// Click on 'UNDO'-button
617 printlog " Click on 'UNDO'-button"
619 '/// Close ImageMap with windowcloser
620 printlog " Close ImageMap with windowcloser"
622 '/// Click on 'No'-button on savemessagebox
623 printlog " Click on 'No'-button on savemessagebox"
625 if active.exists then
629 printlog " Close document"
634 '-----------------------------------------------------------
636 testcase tEditObjectEdit
637 '///<u><b>Edit - Object - Edit</b></u>
639 '/// Load testdocument 'spreadsheet/required/input/tEditObject.ods'
640 printlog " Load testdocument 'spreadsheet/required/input/tEditObject.ods'"
641 hFileOpenLocally( gTesttoolPath + "spreadsheet\required\input\tEditObject.ods" )
642 '/// Select OLE-object
643 printlog " Select OLE-object"
645 '/// Activate OLE-object by Edit – Object – Edit
646 printlog " Activate OLE-object by Edit – Object – Edit"
648 '/// Deactivate OLE-object
649 printlog " Deactivate OLE-object"
650 Kontext "DocumentCalc"
651 DocumentCalc.TypeKeys "<ESCAPE>" , 2
652 '/// Select OLE-object
653 printlog " Select OLE-object"
655 '/// Open 'Save As' – dialog by Edit – Object – Save As
656 printlog " Open 'Save As' – dialog by Edit – Object – Save As"
657 EditObjectSaveCopyAsCalc
658 Kontext "SpeichernDlg"
659 '/// Close dialog with Cancel
660 printlog " Close dialog with Cancel"
663 printlog " Close document"