1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
621
622
623
624
625
626
627
628
629
630
631
632
633
634
635
636
637
638
639
640
641
642
643
644
645
646
647
648
649
650
651
652
653
654
655
656
657
658
659
660
661
662
663
664
665
666
667
668
669
670
671
672
673
674
675
676
677
678
679
680
681
682
683
684
685
686
687
688
689
690
691
692
693
694
695
696
697
698
699
700
701
702
703
704
705
706
707
708
709
710
711
712
713
714
715
716
717
718
719
720
721
722
723
724
725
726
727
728
729
730
731
732
733
734
735
736
737
738
739
740
741
742
743
744
745
746
747
748
749
750
751
752
753
754
755
756
757
758
759
760
761
762
763
764
765
766
767
768
769
770
771
772
773
774
775
776
777
778
779
780
781
782
783
784
785
786
787
788
789
790
791
792
793
794
795
796
797
798
799
800
801
802
803
804
805
806
807
808
809
810
811
812
813
814
815
816
817
818
819
820
821
822
823
824
825
826
827
828
829
830
831
832
833
834
835
836
837
838
839
840
841
842
843
844
845
846
847
848
849
850
851
852
853
854
855
856
857
858
859
860
861
862
863
864
865
866
867
868
869
870
871
872
873
874
875
876
877
878
879
880
881
882
883
884
885
886
887
888
889
890
891
892
893
894
895
896
897
898
899
900
901
902
903
904
905
906
907
908
909
910
911
912
913
914
915
916
917
918
919
920
921
922
923
924
925
926
927
928
929
930
931
932
933
934
935
936
937
938
939
940
941
942
943
944
945
946
947
948
949
950
951
952
953
954
955
956
957
958
959
960
961
962
963
964
965
966
967
968
969
970
971
972
973
974
975
976
977
978
979
980
981
982
983
984
985
986
987
988
989
990
991
992
993
994
995
996
997
998
999
1000
1001
|
'encoding UTF-8 Do not remove or change this line!
'**************************************************************************
'* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
'*
'* Copyright 2008 by Sun Microsystems, Inc.
'*
'* OpenOffice.org - a multi-platform office productivity suite
'*
'* $RCSfile: c_upd_toolsmenu.inc,v $
'*
'* $Revision: 1.2 $
'*
'* last change: $Author: rt $ $Date: 2008-07-31 19:05:36 $
'*
'* This file is part of OpenOffice.org.
'*
'* OpenOffice.org is free software: you can redistribute it and/or modify
'* it under the terms of the GNU Lesser General Public License version 3
'* only, as published by the Free Software Foundation.
'*
'* OpenOffice.org is distributed in the hope that it will be useful,
'* but WITHOUT ANY WARRANTY; without even the implied warranty of
'* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
'* GNU Lesser General Public License version 3 for more details
'* (a copy is included in the LICENSE file that accompanied this code).
'*
'* You should have received a copy of the GNU Lesser General Public License
'* version 3 along with OpenOffice.org. If not, see
'* <http://www.openoffice.org/license.html>
'* for a copy of the LGPLv3 License.
'*
'/***********************************************************************
'*
'* owner : oliver.craemer@sun.com
'*
'* short description : Resource Test - Tools Menu Part I
'*
'************************************************************************
'*
' #1 tToolsSpellcheck
' #1 tToolsHangulHanjaConversion
' #1 tToolsLanguageChineseTranslation
' #1 tToolsLanguageThesaurus
' #1 tToolsLanguageHyphenation
' #1 tToolsDetective
' #1 tToolsAutoCorrect
' #1 tToolsGoalSeek
' #1 tToolsScenario
' #1 tToolsProtectSheet
' #1 tToolsProtectDocument
' #1 tToolsCellContents
' #1 tToolsGallery
' #1 tToolsMediaPlayer
'*
'\***********************************************************************
sub c_upd_toolsmenu
Printlog Chr(13) + "--------- Tools Menu Part I (c_upd_toolsmenu.inc) ---------"
call tToolsSpellcheck
call tToolsHangulHanjaConversion
call tToolsLanguageChineseTranslation
call tToolsLanguageThesaurus
call tToolsLanguageHyphenation
call tToolsDetective
call tToolsAutoCorrect
call tToolsGoalSeek
call tToolsScenario
call tToolsProtectSheet
call tToolsProtectDocument
call tToolsCellContents
call tToolsGallery
call tToolsMediaPlayer
end sub
'-----------------------------------------------------------
testcase tToolsSpellcheck
'///<u><b>Tools - Spellcheck</b></u>
Dim iDictionaries as integer
printlog " Load document from 'gTesttoolPath + spreadsheet\required\input\english.ods"
Call hFileOpen (Convertpath (gTesttoolPath + "spreadsheet\required\input\english.ods" ))
'/// If the file is not editable, click the edit button on standardbar
printlog "If the file is not editable, click the edit button on standardbar"
call sMakeReadOnlyDocumentEditable
'/// Enter 'fgsdftk' in a cell
printlog " Enter 'fgsdftk' in a cell"
Kontext "DocumentCalc"
DocumentCalc.TypeKeys "fgsdftk<Return><Up>"
'/// Open 'Spellcheck' – dialog via 'Tools – Spellcheck'
printlog " Open 'Spellcheck' – dialog via 'Tools – Spellcheck'"
try
ToolsSpellcheck
catch
'for some languages there is no spellchecker available.
warnlog "Spellchecking not possible"
call hCloseDocument
goto endsub
endcatch
' If 'blabla' is already in the dictionary (because of a former failed testrun)
' there will be a messagebox that the spellchecking has finished. The test will abort.
Kontext "Active"
If Active.Exists then
warnlog "It seems that a former testrun has failed, test will abort"
printlog "Messagebox: " & Active.GetText
Active.OK
call hCloseDocument
goto endsub
end if
Kontext "Spellcheck"
DialogTest ( Spellcheck )
'/// Verify that the 'Add' – button shows dictionaries
printlog " Verify that the 'Add' – button shows dictionaries"
qaErrorlog "Due to problems on Sols the AddToDictionary-Button is not tested"
' try
' AddToDictionary.Click
' sleep 1
' If hMenuItemGetCount < 1 then
' warnlog "There are no dictionaries available"
' end if
' catch
' warnlog "The menu on the ADD button could not be opened"
' endcatch
'/// Verify that the 'Dictionary language' – combobox has items
printlog " Verify that the 'Dictionary language' – combobox has items"
If DictionaryLanguage.GetItemCount < 1 then
warnlog "There are no languages available"
end if
'/// Open 'Options'- dialog by clicking 'Options' – button
printlog " Open 'Options'- dialog by clicking 'Options' – button"
SpellcheckOptions.Click
Kontext "TabLinguistik"
DialogTest ( TabLinguistik )
'Memorize the amount of available dictionaries
iDictionaries = Benutzerwoerterbuch.GetItemCount
Kontext "TabLinguistik"
'/// Open 'New Dictionary' – dialog by clicking 'New' – button
printlog " Open 'New Dictionary' – dialog by clicking 'New' – button"
Neu.Click
Kontext "BenutzerwoerterbuchAnlegen"
Call DialogTest ( BenutzerwoerterbuchAnlegen )
'/// Verify that the 'Language' combobox has items
printlog " Verify that the 'Language' combobox has items"
If Sprache.GetItemCount < 1 then
warnlog "There are no languages available"
end if
'/// Enter name 'Testdictionary'
printlog " Enter name 'Testdictionary'"
Woerterbuchname.TypeKeys "Testdictionary"
'/// Uncheck 'Exception'
printlog " Uncheck 'Exception'"
Ausnahme.UnCheck
'/// Close dialog with 'OK'
printlog " Close dialog with 'OK'"
BenutzerwoerterbuchAnlegen.OK
Kontext "TabLinguistik"
'/// Select 'Testdictionary'
Benutzerwoerterbuch.Select (iDictionaries + 1)
'/// Click on 'Edit' – button to open 'Edit Custom Dictionary' – dialog
printlog " Click on 'Edit' – button to open 'Edit Custom Dictionary' – dialog"
Bearbeiten.Click
Kontext "BenutzerwoerterbuchBearbeiten"
Call DialogTest ( BenutzerwoerterbuchBearbeiten )
'/// Verify that the 'Book' combobox has items
printlog " Verify that the 'Book' combobox has items"
If Buch.GetItemCount < 1 then
warnlog "There are no dictionaries available"
end if
'/// Verify that the 'Language' combobox has items
printlog " Verify that the 'Language' combobox has items"
If Sprache.GetItemCount < 1 then
warnlog "There are no languages available"
end if
'/// Close dialog with 'Close'
printlog " Close dialog with 'Close'"
BenutzerwoerterbuchBearbeiten.Close
Kontext "TabLinguistik"
'/// Click on 'Delete' button
printlog " Click on 'Delete' button"
Loeschen.Click
'/// Close messageboc with 'Yes'
printlog " Close messageboc with 'Yes'"
Kontext "Active"
If Active.Exists then
Active.Yes
end if
Kontext "TabLinguistik"
'/// Select ninth option (Minimal number of ...)
printlog " Select ninth option (Minimal number of ...)"
Optionen.Select (9)
'/// Click on 'Edit' – button
printlog " Click on 'Edit' – button"
OptionenBearbeiten.Click
Kontext "SilbentrennungOptionen"
Call DialogTest ( SilbentrennungOptionen )
'/// Decrease 'Minimal word length'
printlog " Decrease 'Minimal word length'"
ZeichenVorUmbruch.More
'/// Close dialog with 'Cancel'
printlog " Close dialog with 'Cancel'"
SilbentrennungOptionen.Cancel
Kontext "TabLinguistik"
'/// Close dialog with 'Cancel'
printlog " Close dialog with 'Cancel'"
TabLinguistik.Cancel
Kontext "Spellcheck"
'/// Close 'Spellcheck' – dialog with 'Close'
printlog " Close 'Spellcheck' – dialog with 'Close'"
Spellcheck.Close
'/// Close starting document
printlog " Close starting document"
call hCloseDocument
endcase
'-----------------------------------------------------------
testcase tToolsHangulHanjaConversion
'///<u><b>Tools - Hangul/Hanja Conversion</b></u>
Dim bAsianLanguage as boolean
Dim bCTLlanguage as boolean
'/// Open new Spreadsheet document
printlog " Open new Spreadsheet document"
Call hNewDocument
'/// Enable language support for CJK and CTL (Tools-Options-Language Support)
printlog " Enable language support for CJK and CTL (Tools-Options-Language Support)"
bAsianLanguage = ActiveDeactivateAsianSupport(TRUE)
bCTLLanguage = ActiveDeactivateCTLSupport(TRUE)
'/// Load document from 'gTesttoolPath + "spreadsheet\required\input\korean.ods"'
printlog " Load document from 'gTesttoolPath + spreadsheet\required\input\korean.ods"
Call hFileOpen (Convertpath (gTesttoolPath + "spreadsheet\required\input\korean.ods" ))
'/// If the file is not editable, click the edit button on standardbar
printlog "If the file is not editable, click the edit button on standardbar"
call sMakeReadOnlyDocumentEditable
'/// Select cell B1
printlog " Select cell B1"
Call fCalcSelectRange ("B1")
'/// Open 'Hangul/Hanja Conversion' dialog via 'Tools – Language – Hangul/Hanja Conversion'
printlog " Open 'Hangul/Hanja Conversion' dialog via 'Tools – Language – Hangul/Hanja Conversion'"
ToolsLanguageHangulHanjaConversion
Kontext "HangulHanjaConversion"
if HangulHanjaConversion.Exists (5) then
Call DialogTest ( HangulHanjaConversion )
else
call hCloseDocument
goto endsub
end if
'/// Click on 'Options' button to open 'Hangul/Hanja Options' dialog
printlog " Click on 'Options' button to open 'Hangul/Hanja Options' dialog"
Options.Click
Kontext "HangulHanjaOptions"
if HangulHanjaOptions.Exists (5) then
Call DialogTest ( HangulHanjaOptions )
else
warnlog " Hangul/Hanja Options' dialog could not be open"
HangulHanjaConversion.Cancel
call hCloseDocument
goto endsub
end if
'/// Click on 'New' button
printlog " Click on 'New' button"
NewDictionary.Click
Kontext "HangulHanjaNewDictionary"
if HangulHanjaNewDictionary.Exists (5) then
Call DialogTest ( HangulHanjaNewDictionary )
else
warnlog " HangulHanjaNewDictionary dialog could not be opened"
Kontext "HangulHanjaOptions"
HangulHanjaOptions.Cancel
Kontext "HangulHanjaConversion"
HangulHanjaConversion.Cancel
call hCloseDocument
goto endsub
end if
'/// Enter string 'Dictionary_added_by_Testtool'
printlog " Enter string 'Dictionary_added_by_Testtool'"
DictionaryName.Settext "Dictionary_added_by_Testtool"
'/// Close dialog with 'OK'
printlog " Close dialog with 'OK'"
HangulHanjaNewDictionary.OK
sleep 1
Kontext "HangulHanjaOptions"
'/// Click on 'Edit' button
printlog " Click on 'Edit' button"
if HangulHanjaOptions.Exists (5) then
EditDictionary.Click
sleep 1
else
warnlog " Edit button could not be accessed"
HangulHanjaConversion.Cancel
call hCloseDocument
goto endsub
end if
Kontext "HangulHanjaEditDictionary"
if HangulHanjaEditDictionary.Exists (5) then
Call DialogTest ( HangulHanjaEditDictionary )
else
warnlog " HangulHanjaEditDictionary dialog could not be opened"
Kontext "HangulHanjaOptions"
HangulHanjaOptions.Cancel
Kontext "HangulHanjaConversion"
HangulHanjaConversion.Cancel
call hCloseDocument
goto endsub
end if
'/// Close 'Edit Custom Dictionary' dialog with 'Close'
printlog " Close 'Edit Custom Dictionary' dialog with 'Close'"
HangulHanjaEditDictionary.Close
Kontext "HangulHanjaOptions"
'/// Click on 'Delete' button
printlog " Click on 'Delete' button"
DeleteDictionary.Click
'/// UnCheck 'Ignore post-positional words'
printlog " UnCheck 'Ignore post-positional words'"
IgnorePostPositionalWord.UnCheck
'/// Check 'Show entries'
printlog " Check 'Show entries'"
ShowEntries.Check
'/// Check 'Replace Unique Entries'
printlog " Check 'Replace Unique Entries'"
ReplaceUniqueEntries.Check
'/// Close 'Hangul/Hanja Options' dialog with 'Cancel'
printlog " Close 'Hangul/Hanja Options' dialog with 'Cancel'"
HangulHanjaOptions.Cancel
Kontext "HangulHanjaConversion"
'/// Close 'Hangul/Hanja Conversion' dialog with 'Close'
printlog " Close 'Hangul/Hanja Conversion' dialog with 'Close'"
HangulHanjaConversion.Close
'/// Set support for CJK and CTL back to default (Tools – Options – Language Support)
printlog " Set support for CJK and CTL back to default (Tools – Options – Language Support)"
if bAsianLanguage = FALSE then
Call ActiveDeactivateAsianSupport(FALSE)
end if
if bCTLLanguage = FALSE then
Call ActiveDeactivateCTLSupport(FALSE)
end if
'/// Close document
printlog " Close document"
call hCloseDocument
endcase
'-----------------------------------------------------------
testcase tToolsLanguageChineseTranslation
'///<u><b>Tools – Language – Chinese Translation</b></u>
Dim bAsianLanguage as boolean
Dim bCTLlanguage as boolean
'/// Open new Spreadsheet document
printlog " Open new Spreadsheet document"
Call hNewDocument
'/// Enable language support for CJK and CTL (Tools-Options-Language Support)
printlog " Enable language support for CJK and CTL (Tools-Options-Language Support)"
bAsianLanguage = ActiveDeactivateAsianSupport(TRUE)
bCTLLanguage = ActiveDeactivateCTLSupport(TRUE)
'/// Open 'Chinese Translation' dialog by 'Tools – Language – Chinese Translation'
printlog " Open 'Chinese Translation' dialog by 'Tools – Language – Chinese Translation'"
ToolsLanguageChineseTranslation
Kontext "ChineseTranslation"
Call DialogTest ( ChineseTranslation )
'/// Click on 'Edit Terms' button to open 'Edit Dictionary' dialog
printlog " Click on 'Edit Terms' button to open 'Edit Dictionary' dialog"
EditTerms.Click
Kontext "ChineseDictionary"
Call DialogTest ( ChineseDictionary )
'/// Close dialog with 'Cancel'
printlog " Close dialog with 'Cancel'"
ChineseDictionary.Cancel
Kontext "ChineseTranslation"
'/// Close 'Chinese Translation' dialog with 'Cancel'
printlog " Close 'Chinese Translation' dialog with 'Cancel'"
ChineseTranslation.Cancel
'/// Set support for CJK and CTL back to default (Tools – Options – Language Support)
printlog " Set support for CJK and CTL back to default (Tools – Options – Language Support)"
if bAsianLanguage = FALSE then
Call ActiveDeactivateAsianSupport(FALSE)
end if
if bCTLLanguage = FALSE then
Call ActiveDeactivateCTLSupport(FALSE)
end if
'/// Close document
printlog " Close document"
call hCloseDocument
endcase
'-----------------------------------------------------------
testcase tToolsLanguageThesaurus
'///<u><b>Tools – Language – Chinese Translation</b></u>
'/// Load document from 'gTesttoolPath + "spreadsheet\required\input\english.ods"'
printlog " Load document from 'gTesttoolPath + spreadsheet\required\input\english.ods"
Call hFileOpen (Convertpath (gTesttoolPath + "spreadsheet\required\input\english.ods" ))
'/// If the file is not editable, click the edit button on standardbar
printlog "If the file is not editable, click the edit button on standardbar"
call sMakeReadOnlyDocumentEditable
Kontext "DocumentCalc"
'/// Enter 'blabla' in a cell
printlog " Enter 'blabla' in a cell"
Call fCalcSelectRange ("B2")
DocumentCalc.TypeKeys "blabla<Return><Up>"
'/// Open 'Thesaurus' dialog by 'Tools – Language – Thesaurus
printlog " Open 'Thesaurus' dialog by 'Tools – Language – Thesaurus"
try
ToolsLanguageThesaurusCalc
catch
warnlog "Thesaurus did not work"
call hCloseDocument
goto endsub
endcatch
Kontext "Thesaurus"
DialogTest ( Thesaurus )
'/// Click on 'Search' button
printlog " Click on 'Search' button"
Nachschlagen.Click
'/// Close messagebox with 'OK'
printlog " Close messagebox with 'OK'"
Kontext
if Active.exists then
Active.OK
end if
Kontext "Thesaurus"
'/// Click on 'Language' button
printlog " Click on 'Language' button"
Sprache.Click
Kontext "SpracheAuswaehlen"
DialogTest ( SpracheAuswaehlen )
'/// Verify that the list has entries
printlog " Verify that the list has entries"
If Auswahl.GetItemCount < 1 then
warnlog "There are no languages available"
end if
'/// Close 'Select Language' dialog with 'Cancel'
printlog " Close 'Select Language' dialog with 'Cancel'"
SpracheAuswaehlen.Cancel
Kontext "Thesaurus"
'/// Close 'Thesaurus' with 'Cancel'
printlog " Close 'Thesaurus' with 'Cancel'"
Thesaurus.Cancel
'/// Close document
printlog " Close document"
call hCloseDocument
endcase
'-----------------------------------------------------------
testcase tToolsLanguageHyphenation
'///<u><b>Tools – Language – Hyphenation</b></u>
'/// Open new Spreadsheet document
printlog " Open new Spreadsheet document"
call hNewDocument
'/// Enter 'blabla' in a cell
printlog " Enter 'blabla' in a cell"
Call fCalcSelectRange ("B2")
DocumentCalc.TypeKeys "blabla<Return><Up>"
'/// Use 'Tools – Language – Hyphenation' to open 'Format Cells' dialog
printlog " Use 'Tools – Language – Hyphenation' to open 'Format Cells' dialog"
ToolsLanguageHyphenateCalc
Kontext "TabAusrichtung"
'/// Close dialog with 'Cancel'
printlog " Close dialog with 'Cancel'"
TabAusrichtung.Cancel
'/// Close document
printlog " Close document"
call hCloseDocument
endcase
'-----------------------------------------------------------
testcase tToolsDetective
'///<u><b>Tools – Detective</b></u>
'/// Open new Spreadsheet document
printlog " Open new Spreadsheet document"
Call hNewDocument
'/// Enter '1' in cell A1
printlog " Enter '1' in cell A1"
Call fCalcSelectRange ("A1")
DocumentCalc.TypeKeys "1<Return>"
'/// Enter '=A1' in cell C4
printlog " Enter '=A1' in cell C4"
Call fCalcSelectRange ("C4")
DocumentCalc.TypeKeys "=A1<Return>"
'/// Select cell C4
printlog " Select cell C4"
Call fCalcSelectRange ("C4")
'/// Enable 'Trace Precedents' by 'Tools – Detective – Trace Precedents'
printlog " Enable 'Trace Precedents' by 'Tools – Detective – Trace Precedents'"
ToolsDetectiveTracePrecedents
'/// Disable 'Trace Precedents' by 'Tools – Detective – Remove Precedents'
printlog " Disable 'Trace Precedents' by 'Tools – Detective – Remove Precedents'"
ToolsDetectiveRemovePrecedents
'/// Select cell A1
printlog " Select cell A1"
Call fCalcSelectRange ("A1")
'/// Enable 'Trace Dependents' by 'Tools – Detective – Trace Dependents'
printlog " Enable 'Trace Dependents' by 'Tools – Detective – Trace Dependents'"
ToolsDetectiveTraceDependents
'/// Disable 'Trace Dependents' by 'Tools – Detective – Remove Dependents'
printlog " Disable 'Trace Dependents' by 'Tools – Detective – Remove Dependents'"
ToolsDetectiveRemoveDependents
'/// Remove 'All Traces' by 'Tools – Detective – Remove All Traces'
printlog " Remove 'All Traces' by 'Tools – Detective – Remove All Traces'"
ToolsDetectiveRemoveAllTraces
'/// Enter '=C4/0' in cell C7
printlog " Enter '=C4/0' in cell C7"
Call fCalcSelectRange ("C7")
DocumentCalc.TypeKeys "=C4/0<Return>"
'/// Select cell C7
printlog " Select cell C7"
Call fCalcSelectRange ("C7")
'/// Enable 'Trace Error' by 'Tools – Detective – Trace Error'
printlog " Enable 'Trace Error' by 'Tools – Detective – Trace Error'"
ToolsDetectiveTraceError
'/// Enable 'Mark Invalid Data' by 'Tools – Detective – Mark Invalid Data'
printlog " Enable 'Mark Invalid Data' by 'Tools – Detective – Mark Invalid Data'"
ToolsDetectiveMarkInvalidData
'/// Refresh traces by 'Tools – Detective – Refresh Traces'
printlog " Refresh traces by 'Tools – Detective – Refresh Traces'"
ToolsDetectiveRefreshTraces
'/// Switch mode of autorefreshing by 'Tools – Detective – AutoRefresh'
printlog " Switch mode of autorefreshing by 'Tools – Detective – AutoRefresh'"
ToolsDetectiveAutoUpdate
'/// Switch mode back to default for autorefreshing by 'Tools – Detective – AutoRefresh'
printlog " Switch mode back to default for autorefreshing by 'Tools – Detective – AutoRefresh'"
ToolsDetectiveAutoUpdate
'/// Switch 'Fill Mode' by 'Tools – Detective – Fill Mode'
printlog " Switch 'Fill Mode' by 'Tools – Detective – Fill Mode'"
ToolsDetectiveFillMode
'/// Switch 'Fill Mode' back to default by 'Tools – Detective – Fill Mode'
printlog " Switch 'Fill Mode' back to default by 'Tools – Detective – Fill Mode'"
ToolsDetectiveFillMode
'/// Close document
printlog " Close document"
Call hCloseDocument
endcase
'-----------------------------------------------------------
testcase tToolsAutoCorrect
'///<u><b>Tools – AutoCorrect</b></u>
'/// Open new Spreadsheet document
printlog " Open new Spreadsheet document"
call hNewDocument
'/// Open 'AutoCorrect' dialog by 'Tools – AutoCorrect'
printlog " Open 'AutoCorrect' dialog by 'Tools – AutoCorrect'"
ToolsAutocorrect
'/// Switch to tabpage 'Replace'
printlog " Switch to tabpage 'Replace'"
Kontext
active.SetPage TabErsetzung
Kontext "TabErsetzung"
Call DialogTest ( TabErsetzung )
'/// Verify that the language combobox has items
printlog " Verify that the language combobox has items"
if WelcheSprache.GetItemCount < 1 then
warnlog "The Language listbox is empty"
end if
'/// Enter string 'Testerentrie' in 'Replace' field
printlog " Enter string 'Testerentrie' in 'Replace' field"
Kuerzel.SetText "Testerentrie"
'/// Enter string 'Testentrie' in 'With' field
printlog " Enter string 'Testentrie' in 'With' field"
ErsetzenDurch.SetText "Testentrie"
'/// Click on 'New' button
printlog " Click on 'New' button"
Neu.Click
'/// Click on 'Delete' button
printlog " Click on 'Delete' button"
Loeschen.Click
'/// Switch to tabpage 'Exceptions'
printlog " Switch to tabpage 'Exceptions'"
Kontext
active.SetPage TabAusnahmen
Kontext "TabAusnahmen"
Call DialogTest ( TabAusnahmen )
'/// Enter string 'olala' as 'Abbreviation'
printlog " Enter string 'olala' as 'Abbreviation'"
Abkuerzungen.SetText "olala"
'/// Press 'New' button
printlog " Press 'New' button"
AbkuerzungenNeu.click
'/// Press 'Delete' button
printlog " Press 'Delete' button"
AbkuerzungenLoeschen.click
'/// Enter string 'TTLauncher' in 'Words with ...'
printlog " Enter string 'TTLauncher' in 'Words with ...'"
Woerter.SetText "TTLauncher"
'/// Press 'New' button
printlog " Press 'New' button"
WoerterNeu.click
'/// Press 'Delete' button
printlog " Press 'Delete' button"
WoerterLoeschen.click
'/// Switch to tabpage 'Options'
printlog " Switch to tabpage 'Options'"
Kontext
active.SetPage TabOptionen
Kontext "TabOptionen"
Call DialogTest ( TabOptionen )
'/// Switch to tabpage 'Custom Quotes'
printlog " Switch to tabpage 'Custom Quotes'"
Kontext
active.SetPage TabTypografisch
Kontext "TabTypografisch"
Call DialogTest ( TabTypografisch )
'/// Press on button for 'Start quote' for 'Single quotes'
printlog " Press on button for 'Start quote' for 'Single quotes'"
EinfachWortAnfang.Click
Kontext "Sonderzeichen"
'/// Close 'Start quote' dialog with 'Cancel'
printlog " Close 'Start quote' dialog with 'Cancel'"
Sonderzeichen.Cancel
Kontext "TabTypografisch"
'/// Press on button for 'End quote' for 'Single quotes'
printlog " Press on button for 'End quote' for 'Single quotes'"
EinfachWortEnde.Click
Kontext "Sonderzeichen"
'/// Close 'End quote' dialog with 'Cancel'
printlog " Close 'End quote' dialog with 'Cancel'"
Sonderzeichen.Cancel
Kontext "TabTypografisch"
'/// Click on 'Default' button for 'Single quotes'
printlog " Click on 'Default' button for 'Single quotes'"
EinfachStandard.Click
'/// Press on button for 'Start quote' for 'Double quotes'
printlog " Press on button for 'Start quote' for 'Double quotes'"
DoppeltWortAnfang.Click
Kontext "Sonderzeichen"
'/// Close 'Start quote' dialog with 'Cancel'
printlog " Close 'Start quote' dialog with 'Cancel'"
Sonderzeichen.Cancel
Kontext "TabTypografisch"
'/// Press on button for 'End quote' for 'Double quotes'
printlog " Press on button for 'End quote' for 'Double quotes'"
DoppeltWortEnde.Click
Kontext "Sonderzeichen"
'/// Close 'End quote' dialog with 'Cancel'
printlog " Close 'End quote' dialog with 'Cancel'"
Sonderzeichen.Cancel
Kontext "TabTypografisch"
'/// Click on 'Default' button for 'Double quotes'
printlog " Click on 'Default' button for 'Double quotes'"
DoppeltStandard.Click
'/// Close 'AutoCorrect' dialog with 'Cancel'
printlog " Close 'AutoCorrect' dialog with 'Cancel'"
TabTypografisch.cancel
'/// Close document
printlog " Close document"
call hCloseDocument
endcase
'-----------------------------------------------------------
testcase tToolsGoalSeek
'///<u><b>Tools - Goal Seek</b></u>
'/// Open new Spreadsheet document
printlog " Open new Spreadsheet document"
Call hNewDocument
'/// Open 'Goal Seek' dialog by 'Tools – Goal Seek'
printlog " Open 'Goal Seek' dialog by 'Tools – Goal Seek'"
ToolsGoalSeek
Kontext "Zielwertsuche"
DialogTest ( Zielwertsuche )
'/// Click on 'Shrink' button for 'Formula Cell'
printlog " Click on 'Shrink' button for 'Formula Cell'"
Vorgaben1.Click
'/// Close rangechooser with 'Shrink' button
printlog " Close rangechooser with 'Shrink' button"
Vorgaben1.Click
'/// Click on 'Shrink' button for 'Variable Cell'
printlog " Click on 'Shrink' button for 'Variable Cell'"
Vorgaben2.Click
'/// Close rangechooser with 'Shrink' button
printlog " Close rangechooser with 'Shrink' button"
Vorgaben2.Click
'/// Close 'Goal Seek' dialog with 'Cancel'
printlog " Close 'Goal Seek' dialog with 'Cancel'"
Zielwertsuche.Cancel
'/// Close document
printlog " Close document"
call hCloseDocument
endcase
'-----------------------------------------------------------
testcase tToolsScenario
'///<u><b>Tools - Scenario</b></u>
'/// Open new Spreadsheet document
printlog " Open new Spreadsheet document"
Call hNewDocument
'/// Enter '1' in A1, '2' in A2, '3' in A3
printlog " Enter '1' in A1, '2' in A2, '3' in A3"
Call fCalcSelectRange ("A1")
DocumentCalc.TypeKeys "1<Return>2<Return>3<Return>"
'/// Select cells A1:A3
printlog " Select cells A1:A3"
Call fCalcSelectRange ("A1:A3")
'/// Open 'Create Scenario' dialog by 'Tools – Scenario'
printlog " Open 'Create Scenario' dialog by 'Tools – Scenario'"
ToolsScenarios
Kontext "SzenarioAnlegen"
DialogTest ( SzenarioAnlegen )
'/// Enter 'Scenario_by_Testtool' as 'Name of Scenario'
printlog " Enter 'Scenario_by_Testtool' as 'Name of Scenario'"
SzenarioName.SetText "Scenario_by_Testtool"
'/// Enter 'Comment_by_Testtool' as 'Comment'
printlog " Enter 'Comment_by_Testtool' as 'Comment'"
Kommentar.SetText "Comment_by_Testtool"
'/// Verify that the color combobox has items
printlog " Verify that the color combobox has items"
If Rahmenfarbe.GetItemCount < 1 then
warnlog "The colorbox is empty"
end if
'/// Check 'Display border'
printlog " Check 'Display border'"
RahmenAnzeigen.Check
'/// Check 'Copy back'
printlog " Check 'Copy back'"
Zurueckkopieren.Check
'/// UnCheck 'Copy entire sheet'
printlog " UnCheck 'Copy entire sheet'"
GanzeTabelle.UnCheck
'/// Check 'PreventChanges'
printlog " Check 'PreventChanges'"
PreventChanges.Check
'/// Close 'Create Scenario' dialog with 'Cancel'
printlog " Close 'Create Scenario' dialog with 'Cancel'"
SzenarioAnlegen.Cancel
'/// Close document
printlog " Close document"
Call hCloseDocument
endcase
'-----------------------------------------------------------
testcase tToolsProtectSheet
'///<u><b>Tools - Protect – Sheet</b></u>
'/// Open new Spreadsheet document
printlog " Open new Spreadsheet document"
Call hNewDocument
'/// Open 'Protect Sheet' dialog by 'Tools – Protect – Sheet'
printlog " Open 'Protect Sheet' dialog by 'Tools – Protect – Sheet'"
ToolsProtectDocumentSheet
Kontext "TabelleSchuetzen"
DialogTest ( TabelleSchuetzen,1 )
'/// Enter 'Secret' as 'Password'
printlog " Enter 'Secret' as 'Password'"
Passwort.SetText "Secret"
'/// Enter 'Secred' as 'Confirm'
printlog " Enter 'Secred' as 'Confirm'"
Bestaetigung.SetText "Secred"
'/// Press 'OK' button
printlog " Press 'OK' button"
TabelleSchuetzen.Ok
'/// Close errormessage with 'OK'
printlog " Close errormessage with 'OK'"
Kontext "Active"
if Active.Exists then
DialogTest ( Active )
Active.OK
else
warnlog "There is no error message by confirming a wrong password!"
end if
'/// Enter 'Secret' as 'Confirm'
printlog " Enter 'Secret' as 'Confirm'"
Kontext "TabelleSchuetzen"
Bestaetigung.SetText "Secret"
'/// Press 'OK' button
printlog " Press 'OK' button"
TabelleSchuetzen.Ok
'/// Open 'Unprotect Sheet' dialog by 'Tools - Protect – Sheet'
printlog " Open 'Unprotect Sheet' dialog by 'Tools - Protect – Sheet'"
ToolsProtectDocumentSheet
Kontext "TabelleSchuetzen"
DialogTest ( TabelleSchuetzen,2 )
'/// Enter string 'Secret'
printlog " Enter string 'Secret'"
Passwort.setText "Secret"
'/// Press 'OK' button
printlog " Press 'OK' button"
TabelleSchuetzen.Ok
'/// Close document
printlog " Close document"
Call hCloseDocument
endcase
'-----------------------------------------------------------
testcase tToolsProtectDocument
'///<u><b>Tools - Protect – Document</b></u>
'/// Open new Spreadsheet document
printlog " Open new Spreadsheet document"
Call hNewDocument
'/// Open 'Protect Document' dialog by 'Tools – Protect – Document'
printlog " Open 'Protect Document' dialog by 'Tools – Protect – Document'"
ToolsProtectDocumentDocument
Kontext "DokumentSchuetzen"
DialogTest ( DokumentSchuetzen,1 )
'/// Enter 'Secret' as 'Password'
printlog " Enter 'Secret' as 'Password'"
Passwort.setText "Secret"
'/// Enter 'Secred' as 'Confirm'
printlog " Enter 'Secred' as 'Confirm'"
Bestaetigung.SetText "Secred"
'/// Press 'OK' button
printlog " Press 'OK' button"
DokumentSchuetzen.ok
'/// Close errormessage with 'OK'
printlog " Close errormessage with 'OK'"
Kontext "Active"
if Active.Exists then
DialogTest ( Active )
Active.OK
else
warnlog "There is no error message by confirming a wrong password!"
end if
Kontext "DokumentSchuetzen"
'/// Enter 'Secret' as 'Confirm'
printlog " Enter 'Secret' as 'Confirm'"
Bestaetigung.SetText "Secret"
'/// Press 'OK' button
printlog " Press 'OK' button"
DokumentSchuetzen.OK
'/// Open 'Unprotect Document' dialog by 'Tools - Protect – Document'
printlog " Open 'Unprotect Document' dialog by 'Tools - Protect – Document'"
ToolsProtectDocumentDocument
Kontext "DokumentSchuetzen"
DialogTest ( DokumentSchuetzen,2 )
'/// Enter string 'Secret'
printlog " Enter string 'Secret'"
Passwort.setText "Secret"
'/// Press 'OK' button
printlog " Press 'OK' button"
DokumentSchuetzen.OK
'/// Close document
printlog " Close document"
Call hCloseDocument
endcase
'-----------------------------------------------------------
testcase tToolsCellContents
'///<u><b>Tools - Cell Contents</b></u>
'/// Open new Spreadsheet document
printlog " Open new Spreadsheet document"
Call hNewDocument
'/// Recalculate cells by 'Tools – Cell Contents – Recalculate'
printlog " Recalculate cells by 'Tools – Cell Contents – Recalculate'"
ToolsCellContentsRecalculate
'/// Switch 'AutoCalculate' mode by 'Tools – Cell Contents – AutoCalculate'
printlog " Switch 'AutoCalculate' mode by 'Tools – Cell Contents – AutoCalculate'"
ToolsCellContentsAutoCalculate
'/// Switch 'AutoCalculate' mode back by 'Tools – Cell Contents – AutoCalculate'
printlog " Switch 'AutoCalculate' mode back by 'Tools – Cell Contents – AutoCalculate'"
ToolsCellContentsAutoCalculate
'/// Switch 'AutoInput' mode by 'Tools – Cell Contents – AutoInput'
printlog " Switch 'AutoInput' mode by 'Tools – Cell Contents – AutoInput'"
ToolsCellContentsAutoInput
'/// Switch 'AutoInput' mode back by 'Tools – Cell Contents – AutoInput'
printlog " Switch 'AutoInput' mode back by 'Tools – Cell Contents – AutoInput'"
ToolsCellContentsAutoInput
'/// Close document
printlog " Close document"
Call hCloseDocument
endcase
'-----------------------------------------------------------
testcase tToolsGallery
'///<u><b>Tools - Gallery</b></u>
'/// Open new Spreadsheet document
printlog " Open new Spreadsheet document"
Call hNewDocument
'/// Enable 'Gallery' by 'Tools – Gallery'
printlog " Enable 'Gallery' by 'Tools – Gallery'"
Kontext "Gallery"
if Not Gallery.Exists then ToolsGallery
Kontext "Gallery"
'/// Verify that there are 'Themes' available (more than one)
printlog " Verify that there are 'Themes' available (more than one)"
If Gallerys.getItemCount < 1 then
warnlog "There are no items in the Gallerylist"
end if
'/// Click on 'New Theme' button
printlog " Click on 'New Theme' button"
NewTheme.Click
'/// Switch to tabpage 'General'
printlog " Switch to tabpage 'General'"
Kontext
Active.SetPage TabAllgemeinGallery
Kontext "TabAllgemeinGallery"
Call DialogTest ( TabAllgemeinGallery )
'/// Switch to tabpage 'Files'
printlog " Switch to tabpage 'Files'"
Kontext
Active.SetPage TabDateien
Kontext "TabDateien"
Call DialogTest ( TabDateien )
'/// Verify that the 'File type' combobox has items
printlog " Verify that the 'File type' combobox has items"
If Dateityp.GetItemCount < 1 then
warnlog "There are no filetypes available"
end if
'/// Click on 'Find Files' button
printlog " Click on 'Find Files' button"
Suche.Click
Kontext "OeffnenDlg"
'/// Close 'Select Path' dialog with 'Cancel'
printlog " Close 'Select Path' dialog with 'Cancel'"
OeffnenDlg.Cancel
Kontext "TabDateien"
'/// Click on 'Add' button to open 'Gallery' dialog
printlog " Click on 'Add' button to open 'Gallery' dialog"
Hinzufuegen.Click
Kontext "GrafikEinfuegenDlg"
'/// Close 'Gallery' dialog with 'Cancel'
printlog " Close 'Gallery' dialog with 'Cancel'"
GrafikEinfuegenDlg.Cancel
Kontext "TabDateien"
'/// Close 'Properties' dialog with 'Cancel'
printlog " Close 'Properties' dialog with 'Cancel'"
TabDateien.Cancel
'/// Disable 'Gallery' by 'Tools – Gallery'
printlog " Disable 'Gallery' by 'Tools – Gallery'"
ToolsGallery
Kontext "Gallery"
if Gallery.Exists then
Warnlog "The Gallery has not been closed!"
end if
'/// Close document
printlog " Close document"
Call hCloseDocument
endcase
'-----------------------------------------------------------
testcase tToolsMediaPlayer
'///<u><b>Tools - Media Player</b></u>
'/// Open new Spreadsheet document
printlog " Open new Spreadsheet document"
Call hNewDocument
'/// Open 'Media Player' by 'Tools – Media Player'
printlog " Open 'Media Player' by 'Tools – Media Player'"
ToolsMediaPlayer
Kontext "Mplayer"
Call DialogTest ( Mplayer )
'/// Click on 'Open' button
printlog " Click on 'Open' button"
Mopen.Click
Kontext "OeffnenDlg"
'/// Verify that there are more than one filter available
printlog " Verify that there are more than one filter available"
If DateiTyp.GetItemCount < 1 then
warnlog "There are no filters available"
end if
'/// Close dialog with 'Cancel'
printlog " Close dialog with 'Cancel'"
OeffnenDlg.Cancel
'/// Close 'Media Player' by 'Tools – Media Player'
printlog " Close 'Media Player' by 'Tools – Media Player'"
ToolsMediaPlayer
'/// Close document
printlog " Close document"
Call hCloseDocument
endcase
'-----------------------------------------------------------
|