summaryrefslogtreecommitdiff
path: root/testautomation/global/required/includes/g_option2.inc
blob: 83d666e1adfdb35befe59a64fd9b02b3fff179d6 (plain)
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
'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: g_option2.inc,v $
'*
'* $Revision: 1.1 $
'*
'* last change: $Author: jsi $ $Date: 2008-06-13 10:27:04 $
'*
'* 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 : thorsten.bosbach@sun.com
'*
'* short description : update and resouce test for all option pages (at tools/options)
'*
'************************************************************************
'*
' #1  tToolsOptionsTextdocument
' #1  tToolsOptionsHTMLDocument
' #1  tToolsOptionsSpreadsheet
' #1  tToolsOptionsPresentation
' #1  tToolsOptionsDrawing
' #1  tToolsOptionsFormula
' #1  tToolsOptionsChart
' #1  tToolsOptionsDataSources
'*
'\***********************************************************************

testcase tToolsOptionsTextdocument
  dim EchteAnzahl as Integer, i as Integer
  dim gefunden as Boolean
    
     PrintLog "- Tools/Options/Text document  ( Extras/Optionen/Textdokument )"
    if (0 = iSectionNumber) then 
        warnlog "You can't run this testcase seperated! Ending now! Please run it via: tToolsOptionsTest"
        goto endsub
    endif
'/// Create a new document    
    if gApplication <> "BACKGROUND" then   
        Call hNewDocument
    end if
 '/// <i>Tools</i> / <i>Options</i> / <i>Text document</i>
   ToolsOptions
   Kontext "Active"
   if Active.Exists (3) then
      if Active.GetText <> sErrMes then Warnlog "A messagebox exists => BUG : " + Active.GetText
      Active.OK
   end if
   ToPosInOptionlist ( 4 )
   EchteAnzahl = Optionsliste.GetItemCount - iSectionNumber
   if EchteAnzahl = 10 AND ( gAsianSup = TRUE OR gCTLSup = TRUE ) then
      Warnlog "There are only 10 pages in 'text document'-section, but asian support or CTL support are activated! => a section is missing?"
   else
      printlog "Asian support and CTL support are not activated ( on languages-page )!"
   end if
   if bDebugVersion = TRUE  then EchteAnzahl = EchteAnzahl - 1
   if gAsianSup     = FALSE then EchteAnzahl = EchteAnzahl + 1
   if gCTLSup       = FALSE then EchteAnzahl = EchteAnzahl + 1
   for i=1 to EchteAnzahl
      gefunden = FALSE
      Kontext "OptionenDlg"
      Optionsliste.TypeKeys "<Down>"
      if gAsianSup = FALSE AND gCTLSup = FALSE AND i=6 then i=i+2
      if gAsianSup = FALSE AND gCTLSup = TRUE  AND i=6 then i=i+1
      if gAsianSup = TRUE  AND gCTLSup = FALSE AND i=7 then i=i+1
      select case i
       case 1 : Kontext "TabLaden"
                '///+<ul><li>General</li>
                printlog "  - General / Allgemein"
                if TabLaden.IsVisible then
                   gefunden = TRUE
                   Call DialogTest ( TabLaden )
                end if
       case 2 : Kontext "TabInhalteWriter"
                '///+<li>View</li>
                printlog "  - View / Ansicht"
                if TabInhalteWriter.IsVisible then
                   gefunden = TRUE
                   Call DialogTest ( TabInhalteWriter )
                end if
       case 3 : Kontext "TabDirektCursor"
                '///+<li>Formating aids</li>
                printlog "  - Formating aids / Formatierungshilfen"
                if TabDirektCursor.IsVisible then
                   gefunden = TRUE
                   Call DialogTest ( TabDirektCursor )
                end if
       case 4 : Kontext "TabRaster"
                '///+<li>Grid</li>
                printlog "  - Grid / Raster"
                if TabRaster.IsVisible then
                   gefunden = TRUE
                   Call DialogTest ( TabRaster )
                end if
       case 5 : Kontext "TabGrundschriften"
                '///+<li>Default fonts</li>
                printlog "  - Default Fonts / Grundschriften"
                if TabGrundschriften.IsVisible then
                   gefunden = TRUE
                   Call DialogTest ( TabGrundschriften )
                end if
       case 6 : Kontext "TabGrundschriftenAsian"
                '///+<li>Default fonts asian</li>
                printlog "  - Default Fonts Asian / Grundschriften Asiatisch"
                if TabGrundschriftenAsian.IsVisible then
                   gefunden = TRUE
                   Call DialogTest ( TabGrundschriftenAsian )
                end if
       case 7 : Kontext "TabGrundschriftenCTL"
                '///+<li>Default fonts CTL</li>
                printlog "  - Default Fonts CTL / Grundschriften CTL"
                if TabGrundschriftenCTL.IsVisible then
                   gefunden = TRUE
                   Call DialogTest ( TabGrundschriftenCTL )
                end if
       case 8 : Kontext "TabDruckenWriter"
                '///+<li>Print</li>
                printlog "  - Print / Drucken"
                if TabDruckenWriter.IsVisible then
                   gefunden = TRUE
                   Call DialogTest ( TabDruckenWriter )
                end if
       case 9 : Kontext "TabTabelleOptionen"
                '///+<li>Table</li>
                printlog "  - Table / Tabellen"
                if TabTabelleOptionen.IsVisible then
                   gefunden = TRUE
                   Call DialogTest ( TabTabelleOptionen )
                end if
       case 10: Kontext "TabAenderungenWriter"
                '///+<li>Changes</li>
                printlog "  - Changes / Aenderungen"
                if TabAenderungenWriter.IsVisible then
                   gefunden = TRUE
                   Call DialogTest ( TabAenderungenWriter )
                end if
       case 11: Kontext "TabCompatibility"
                '///+<li>Compatibility</li>
                printlog "  - Compatibility"
                if TabCompatibility.IsVisible then
                   gefunden = TRUE
                   Call DialogTest ( TabCompatibility )
                end if
       case 12: Kontext "TabAutoCaption"
                '///+<li>AutoCaption</li>
                printlog "  - AutoCaption"
                if TabAutoCaption.IsVisible then
                   gefunden = TRUE
                   Call DialogTest ( TabAutoCaption )
                end if
       case 13: Kontext "TabMailMergeEMail"
                '///+<li>Mail Merge E-mail</li></ul>
                printlog "  - Mail Merge E-mail"
                if TabMailMergeEMail.IsVisible then
                   gefunden = TRUE
                   Call DialogTest ( TabMailMergeEMail )
                   ServerAuthentication.click
                   kontext "ServerAuthentication"
                   Call DialogTest ( ServerAuthentication )
                   ServerAuthentication.cancel
                   Kontext "TabMailMergeEMail"
                   TestSettings.click
                   
                   ' in case java is not enabled
                   sleep( 2 )
                   try   
                       Kontext "Messagebox"
                       if ( MessageBox.exists()) then            
                           sleep(2)                
                           warnlog(Messagebox.GetText())                
                           try
                   Messagebox.Cancel()
                               sleep( 2 )
               catch
                           Messagebox.OK() ' if "OK" works, we are in an undefined state
                   warnlog( "" )
                           endcatch                
                       end if             
           catch
               warnlog( "A messagebox was displayed but coul not be closed." )
                   endcatch
                   
                   Kontext "TestaccountSettings"
                   Call DialogTest ( TestaccountSettings )
                   TestaccountSettings.cancel
                end if
      end select
      if gefunden=FALSE then
         Warnlog "Error with the " + i + ".page, perhaps this page is deleted or change the place!"
         EchteAnzahl = EchteAnzahl - 1
         if EchteAnzahl < 12 then
            i=13
         else
            i=1-1
         end if
      end if
   next i
'/// Close the options dialog
   Kontext "OptionenDlg"
   OptionenDlg.Cancel
'/// Close the document  
    if gApplication <> "BACKGROUND" then 
        Call hCloseDocument
    end if
endcase

'-------------------------------------------------------------------------

testcase tToolsOptionsHTMLDocument
  dim EchteAnzahl as Integer, i as Integer
  dim gefunden as Boolean
    
   PrintLog "- Tools/Options/HTML-Document  ( Extras/Optionen/HTML-Dokument )"
    if (0 = iSectionNumber) then 
        warnlog "You can't run this testcase seperated! Ending now! Please run it via: tToolsOptionsTest"
        goto endsub
    endif
'/// Create a new document    
    if gApplication <> "BACKGROUND" then    
        Call hNewDocument
    end if
 '/// <i>Tools</i> / <i>options</i> / <i>HTML Document</i>
   ToolsOptions
   ToPosInOptionlist ( 5 )
   i = 6
   if bDebugVersion = TRUE  then i = i + 1  ' here exists the special debug-tabpage, too
   EchteAnzahl = OptionTabPageZaehler (i)
   if bDebugVersion = TRUE  then EchteAnzahl = EchteAnzahl - 1
   for i=1 to EchteAnzahl
      gefunden = FALSE
      Kontext "OptionenDlg"
      Optionsliste.TypeKeys "<Down>"
      select case i
       case 1 : Kontext "TabInhalteHTML"
                '/// View
                printlog "  - View / Ansicht"
                if TabInhalteHTML.IsVisible then
                   gefunden = TRUE
                   Call DialogTest ( TabInhalteHTML )
                end if
       case 2 : Kontext "TabDirektCursor"
                '/// Formating aids
                printlog "  - Formatting aids / Formatierungshilfen"
                if TabDirektCursor.IsVisible then
                   gefunden = TRUE
                   Call DialogTest ( TabDirektCursor )
                end if
       case 3 : Kontext "TabRaster"
                '/// Grid
                printlog "  - Grid / Raster"
                if TabRaster.IsVisible then
                   gefunden = TRUE
                   Call DialogTest ( TabRaster )
                end if
       case 4 : Kontext "TabDruckenHTML"
                '/// Print
                printlog "  - Print / Drucken"
                if TabDruckenHTML.IsVisible then
                   gefunden = TRUE
                   Call DialogTest ( TabDruckenHTML )
                end if
       case 5 : Kontext "TabTabelleOptionen"
                '/// Table
                printlog "  - Table / Tabelle"
                if TabTabelleOptionen.IsVisible then
                   gefunden = TRUE
                   Call DialogTest ( TabTabelleOptionen )
                end if
       case 6 : Kontext "TabHintergrund"
                '/// Background
                printlog "  - Background / Hintergrund"
                Sleep 1
                if TabHintergrund.IsVisible then
                   gefunden = TRUE
                   Call DialogTest ( TabHintergrund )
                end if
      end select
      if gefunden=FALSE then
         Warnlog "Error with the " + i + ".page, perhaps this page is deleted or change the place!"
         EchteAnzahl = EchteAnzahl - 1
         if EchteAnzahl < 6 then
            i=11
         else
            i=1-1
         end if
      end if
   next i
'/// Close the options dialog
    Kontext "OptionenDlg"
    OptionenDlg.Cancel
'/// Close the document    
    if gApplication <> "BACKGROUND" then 
        Call hCloseDocument
    end if
endcase

'-------------------------------------------------------------------------

testcase tToolsOptionsSpreadsheet
  dim EchteAnzahl as Integer, i as Integer
  dim gefunden as Boolean
    
    PrintLog "- Tools/Options/Spreadsheet  ( Extras/Optionen/Tabellendokument )"
    if (0 = iSectionNumber) then 
        warnlog "You can't run this testcase seperated! Ending now! Please run it via: tToolsOptionsTest"
        goto endsub
    endif
'/// Create a new document
    if gApplication <> "BACKGROUND" then 
        Call hNewDocument
    end if
 '/// <i>Tools</i> / <i>Options</i> / <i>Spreadsheet</i>
   ToolsOptions
   ToPosInOptionlist ( 4 )
   EchteAnzahl = OptionTabPageZaehler ( 7, FALSE )
   for i=1 to EchteAnzahl
      gefunden = FALSE
      Kontext "OptionenDlg"
      Optionsliste.TypeKeys "<Down>"
      select case i
       case 1 : Kontext "TabLayoutCalc"
                '/// General
                printlog "  - General / Allgemein"
                if TabLayoutCalc.IsVisible then
                   gefunden = TRUE
                   Call DialogTest ( TabLayoutCalc )
                end if
       case 2 : Kontext "TabInhaltCalc"
                '/// View
                printlog "  - View / Ansicht"
                if TabInhaltCalc.IsVisible then
                   gefunden = TRUE
                   Call DialogTest ( TabInhaltCalc )
                end if
       case 3 : Kontext "TabBerechnen"
                '/// Calculate
                printlog "  - Calculate / Berechnen"
                if TabBerechnen.IsVisible then
                   gefunden = TRUE
                   Call DialogTest ( TabBerechnen )
                end if
       case 4 : Kontext "TabSortierlisten"
                '/// Sort lists
                printlog "  - Sort Lists / Sortierliste"
                if TabSortierlisten.IsVisible then
                   gefunden = TRUE
                   Call DialogTest ( TabSortierlisten )
                end if
       case 5 : Kontext "TabAenderungenCalc"
                '/// Changes
                printlog "  - Changes / Aenderungen"
                if TabAenderungenCalc.IsVisible then
                   gefunden = TRUE
                   Call DialogTest ( TabAenderungenCalc )
                end if
       case 6 : Kontext "TabRaster"
                '/// Grid
                printlog "  - Grid / Raster"
                if TabRaster.IsVisible then
                   gefunden = TRUE
                   Call DialogTest ( TabRaster )
                end if
       case 7 : Kontext "TabPrintCalcOptions"
                '/// Print
                printlog "  - Print / Drucken"
                if TabPrintCalcOptions.IsVisible then
                   gefunden = TRUE
                   Call DialogTest ( TabPrintCalcOptions )
                end if
      end select
      if gefunden=FALSE then
         Warnlog "Error with the " + i + ".page, perhaps this page is deleted or change the place!"
         EchteAnzahl = EchteAnzahl - 1
         if EchteAnzahl < 7 then
            i=11
         else
            i=1-1
         end if
      end if
   next i
'/// Close the options dialog
    Kontext "OptionenDlg"
    OptionenDlg.Cancel
'/// Close the document
    if gApplication <> "BACKGROUND" then 
        Call hCloseDocument
    end if
endcase

'-------------------------------------------------------------------------

testcase tToolsOptionsPresentation
  dim EchteAnzahl as Integer, i as Integer
  dim gefunden as Boolean
  dim iTemp as integer
    
   PrintLog "- Tools/Options/Presentation  ( Extras/Optionen/Praesentation )"
    if (0 = iSectionNumber) then 
        warnlog "You can't run this testcase seperated! Ending now! Please run it via: tToolsOptionsTest"
        goto endsub
    endif
'/// Create a new document
    if gApplication <> "BACKGROUND" then 
        Call hNewDocument
    end if
   kontext "DocumentImpress"
   if DocumentImpress.exists(5) then
       printlog "  - An application of type Presentation is available."
       '--- workaround #i48383#
       DocumentImpress.MouseDown (10,10)
       DocumentImpress.MouseUp (10,10)
   else
       qaErrorLog "  - No application of type Presentation is available"
   end if
 '/// <i>Tools</i> / <i>Options</i> / <i>Presentation</i>
   ToolsOptions
   ToPosInOptionlist ( 4 )
   EchteAnzahl = OptionTabPageZaehler ( 4, FALSE )
   for i=1 to EchteAnzahl
      gefunden = FALSE
      Kontext "OptionenDlg"
      Optionsliste.TypeKeys "<Down>"
      select case i
       case 1 : Kontext "TabSonstigesDraw"
                '/// General
                printlog "  - General / Allgemein"
                if TabSonstigesDraw.exists then
                    if TabSonstigesDraw.IsVisible then
                       gefunden = TRUE
                       Call DialogTest ( TabSonstigesDraw )
                    end if
                else
                    ' Trying to get root cause on some systems it seems the backing window is used. #i48383#
                    Kontext "OptionenDlg"
                    OptionenDlg.SnapShot convertPath(gOfficePath + "user/work/"+gApplication+".bmp")
                    qaErrorLog "#i48383# Trying to get root cause for wrong window; check picture: " + convertPath(gOfficePath + "user/work/"+gApplication+".bmp")
                    for iTemp = 1 to Optionsliste.getItemCount
                        qaErrorLog "" + iTemp + ": '" + Optionsliste.getItemText(iTemp) + "'"
                    next iTemp
                    gefunden = TRUE
                end if
       case 2 : Kontext "TabInhalteDraw"
                '/// View
                printlog "  - View / Ansicht"
                if TabInhalteDraw.IsVisible then
                   gefunden = TRUE
                   Call DialogTest ( TabInhalteDraw )
                end if
       case 3 : Kontext "TabRaster"
                '/// Grid
                printlog "  - Grid / Raster"
                if TabRaster.IsVisible then
                   gefunden = TRUE
                   Call DialogTest ( TabRaster )
                end if
       case 4 : Kontext "TabDruckenDraw"
                '/// Print
                printlog "  - Print / Drucken"
                if TabDruckenDraw.IsVisible then
                   gefunden = TRUE
                   Call DialogTest ( TabDruckenDraw )
                end if
      end select
      if gefunden=FALSE then
         Warnlog "Error with the " + i + ".page, perhaps this page is deleted or change the place!"
         EchteAnzahl = EchteAnzahl - 1
         if EchteAnzahl < 4 then
            i=11
         else
            i=1-1
         end if
      end if
   next i
'/// Close the options dialog
    Kontext "OptionenDlg"
    OptionenDlg.Cancel
'/// Close the document    
    if gApplication <> "BACKGROUND" then 
        Call hCloseDocument
    end if
endcase

'-------------------------------------------------------------------------

testcase tToolsOptionsDrawing
  Dim EchteAnzahl as Integer, i as Integer
  Dim gefunden as Boolean
    
   PrintLog "- Tools/Options/Drawing  ( Extras/Optionen/Zeichnung )"
    if (0 = iSectionNumber) then 
        warnlog "You can't run this testcase seperated! Ending now! Please run it via: tToolsOptionsTest"
        goto endsub
    end if
'/// Create a new document
    if gApplication <> "BACKGROUND" then 
        Call hNewDocument
    end if
   Kontext "DocumentDraw"
   if DocumentDraw.exists(5) then
       printlog "  - An application of type Draw is available."
       '--- workaround #i48383#
       DocumentDraw.MouseDown (10,10)
       DocumentDraw.MouseUp (10,10)
   else
       qaErrorLog "  - No application of type Draw is available"
   end if
'/// <i>Tools</i> / <i>Options</i> / <i>Drawing</i>
   ToolsOptions
   ToPosInOptionlist ( 4 )
   EchteAnzahl = OptionTabPageZaehler ( 4, FALSE )
   for i=1 to EchteAnzahl
      gefunden = FALSE
      Kontext "OptionenDlg"
      Optionsliste.TypeKeys "<Down>"
      select case i
       case 1 : Kontext "TabSonstigesDraw"
                '/// General
                printlog "  - General / Allgemein"
                if TabSonstigesDraw.exists then
                    if TabSonstigesDraw.IsVisible then
                       gefunden = TRUE
                       Call DialogTest ( TabSonstigesDraw )
                    end if
                else
                    ' Trying to get root cause on some systems it seems the backing window is used. #i48383#
                    Kontext "OptionenDlg"
                    qaErrorLog "#i48383# wrong focus on opening options"
                    gefunden = TRUE
                end if
       case 2 : Kontext "TabInhalteDraw"
                '/// View
                printlog "  - View / Ansicht"
                if TabInhalteDraw.IsVisible then
                   gefunden = TRUE
                   Call DialogTest ( TabInhalteDraw )
                end if
       case 3 : Kontext "Active"
                if Active.Exists then
                   Warnlog "A messagebox exists => BUG  : " + Active.GetText
                   try
                      Active.No
                   catch
                      Active.OK
                   endcatch
                end if
                Kontext "TabRaster"
                '/// Grid
                printlog "  - Grid / Raster"
                if TabRaster.IsVisible then
                   gefunden = TRUE
                   Call DialogTest ( TabRaster )
                end if
       case 4 : Kontext "TabDruckenDraw"
                '/// Print
                printlog "  - Print / Drucken"
                if TabDruckenDraw.IsVisible then
                   gefunden = TRUE
                   Call DialogTest ( TabDruckenDraw )
                end if
      end select
      if gefunden=FALSE then
         Warnlog "Error with the " + i + ".page, perhaps this page is deleted or change the place!"
         EchteAnzahl = EchteAnzahl - 1
         if EchteAnzahl < 4 then
            i=11
         else
            i=1-1
         end if
      end if
   next i
'/// Close the options dialog
    Kontext "OptionenDlg"
     OptionenDlg.Cancel
'/// Close the document
     if gApplication <> "BACKGROUND" then 
    Call hCloseDocument
    end if
endcase

'-------------------------------------------------------------------------

testcase tToolsOptionsFormula
  dim EchteAnzahl as Integer, i as Integer
    
   PrintLog "- Tools/Options/Formula  ( Extras/Optionen/Formel )"
    if (0 = iSectionNumber) then 
        warnlog "You can't run this testcase seperated! Ending now! Please run it via: tToolsOptionsTest"
        goto endsub
    endif
'/// Create a new document
    if gApplication <> "BACKGROUND" then 
        Call hNewDocument
    end if
'/// <i>Tools</i> / <i>Options</i> / <i>Formula</i>    
   ToolsOptions
   ToPosInOptionlist ( 4 )
   EchteAnzahl = OptionTabPageZaehler ( 1, FALSE )
   Kontext "OptionenDlg"
   '/// Print
   Optionsliste.TypeKeys "<Down>"
   printlog "  - Print / Drucken"
   Kontext "TabDruckenMath"
   Call DialogTest ( TabDruckenMath )
'/// Close the options dialog
   Kontext "OptionenDlg"
   OptionenDlg.Cancel
'/// Close the document   
    if gApplication <> "BACKGROUND" then 
        Call hCloseDocument
    end if
endcase
'-------------------------------------------------------------------------
testcase tToolsOptionsChart
    Dim EchteAnzahl as Integer, i as Integer

    PrintLog "- Tools/Options/Chart  ( Extras/Optionen/Diagramme )"
    if (0 = iSectionNumber) then 
        warnlog "You can't run this testcase seperated! Ending now! Please run it via: tToolsOptionsTest"
        goto endsub
    endif    
'/// Create a new document    
    if gApplication <> "BACKGROUND" then 
        Call hNewDocument
    end if
'/// <i>Tools</i> / <i>Options</i> / <i>Chart</i>    
    ToolsOptions
    ToPosInOptionlist ( iSectionNumber -1 )
    EchteAnzahl = OptionTabPageZaehler ( 1, FALSE )
    Kontext "OptionenDlg"
    Optionsliste.TypeKeys "<Down>"
'/// Default colors
    printlog "  - Default Colors / Grundfarben"
    Kontext "TabGrundfarben"
    Call DialogTest ( TabGrundfarben )
'/// Close the options dialog
    Kontext "OptionenDlg"
    OptionenDlg.Cancel
    if gApplication <> "BACKGROUND" then
'/// Close bthe document    
        Call hCloseDocument
    end if
endcase

'-------------------------------------------------------------------------

testcase tToolsOptionsDataSources
   Dim EchteAnzahl as Integer, i as Integer

   PrintLog "- Tools/Options/Data Sources  ( Extras/Optionen/Datenbank )"
    if (0 = iSectionNumber) then 
        warnlog "You can't run this testcase seperated! Ending now! Please run it via: tToolsOptionsTest"
        goto endsub
    endif   
    '/// Create a new document
    if gApplication <> "BACKGROUND" then    
        Call hNewDocument
    end if
    '/// <i>Tools</i> / <i>Options</i> / <i>Data source</i>
    ToolsOptions
    ToPosInOptionlist ( iSectionNumber -2)
    EchteAnzahl = OptionTabPageZaehler ( 2 , FALSE )
    Kontext "OptionenDlg"
    Optionsliste.TypeKeys "<Down>"
    printlog "  - Connections / Verbindungen"
    Kontext "TabConnections"
    '/// Connections
    Call DialogTest ( TabConnections )
    Kontext "OptionenDlg"
    Optionsliste.TypeKeys "<Down>"
    printlog "  - Databases / Datenbanken"   
    Kontext "TabRegisteredDatabase"
    '/// Databases
    Call DialogTest ( TabRegisteredDatabase )
    NewBtn.click
    Kontext "CreateDatabaseLink"
    call DialogTest( CreateDatabaseLink )
    Browse.click
    Kontext "OeffnenDlg"
    OeffnenDlg.cancel
    Kontext "CreateDatabaseLink"
    CreateDatabaseLink.cancel
    Kontext "OptionenDlg"
    '/// Close the options dialog
    OptionenDlg.Cancel
    '/// Close the document
    if gApplication <> "BACKGROUND" then 
        Call hCloseDocument
    end if
endcase

'-------------------------------------------------------------------------