1 'encoding UTF-8 Do not remove or change this line!
2 '**************************************************************************
3 '* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
5 '* Copyright 2008 by Sun Microsystems, Inc.
7 '* OpenOffice.org - a multi-platform office productivity suite
9 '* $RCSfile: w_textframes1.inc,v $
13 '* last change: $Author: vg $ $Date: 2008-08-18 12:37:25 $
15 '* This file is part of OpenOffice.org.
17 '* OpenOffice.org is free software: you can redistribute it and/or modify
18 '* it under the terms of the GNU Lesser General Public License version 3
19 '* only, as published by the Free Software Foundation.
21 '* OpenOffice.org is distributed in the hope that it will be useful,
22 '* but WITHOUT ANY WARRANTY; without even the implied warranty of
23 '* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
24 '* GNU Lesser General Public License version 3 for more details
25 '* (a copy is included in the LICENSE file that accompanied this code).
27 '* You should have received a copy of the GNU Lesser General Public License
28 '* version 3 along with OpenOffice.org. If not, see
29 '* <http://www.openoffice.org/license.html>
30 '* for a copy of the LGPLv3 License.
32 '/************************************************************************
34 '* owner : helge.delfs@sun.com
36 '* short description : Test of textframe - 1
38 '\***********************************************************************
42 Call tTextframes_1 'Test Insert Frame with four ways
43 Call tTextframes_2 'Test check Autosize
44 Call tTextframes_3 'Test Uncheck Autosize
45 Call tTextframes_4 'Test Uncheck Keep ratio
46 Call tTextframes_5 'Test check Keep ratio
47 Call tTextframes_6 'Test Anchor to page - frame doesn't move with text
48 Call tTextframes_7 'Test Anchor to paragraph - text entered ahead of the paragraph ,the frame has to move with its paragraph
49 Call tTextframes_8 'Test Anchor to Character - the frame follows the vertical position of the character it is anchored to
50 Call tTextframes_9 'Test Anchor as Character - frame behaves as a character, moves with each text insertion ahead of it
51 Call tTextframes_10 'Test Anchor in gathering pages&columns test.
52 Call tTextframes_11 'Test Anchor in gathering paragraph test.
53 Call tTextframes_12 'Horizontal should not be available when frame is anchored as Character
54 Call tTextframes_13 'Test Horizontal
55 Call tTextframes_14 'Test Vertical
56 Call tTextframes_15 'Frame name can be actualized in Navigator - solution 1
57 Call tTextframes_16 'Frame name can be actualized in Navigator - solution 2
61 '---------------------------------------------------
63 testcase tTextframes_1
65 printlog "- Insert / Frame"
66 '/// Test Insert Frame
70 '/// 1. Insert a Frame (with Menu)
74 Active.Setpage TabType
79 Warnlog "Unable to insert a frame (Dialog is not up)!"
83 Call fFormatFrame("TabType")
86 Warnlog "Frame has not been inserted correct with menu!"
91 '/// 2. Insert a frame over Toolbox / Insert / Frame
95 Call gMouseClick (30, 50)
97 Call hToolbarSelect("INSERT", true )
103 Call gMouseDown ( 30,50 )
104 Call gMouseMove ( 30,50,30,60 )
105 Call gMouseUp ( 30,60 )
106 Call gMouseClick ( 50,70 )
109 'set focus to the frame
110 Call wTypeKeys ( "<Shift F4>" )
115 Call fFormatFrame("TabType")
118 Warnlog "Frame has not been inserted correct over toolbox !"
123 '/// Create Multi-Column frames over toolbox is not possible with testtool
125 '/// 3. Paste a frame from clipboard
128 '/// -- insert a frame first
130 '/// -- Copy frame to clipboard
134 Warnlog "Unable to access 'Edit / Copy'. Maybe disabled !"
143 '/// -- Paste Frame into document from clipboard
148 Call fFormatFrame("TabType")
151 Warnlog "Frame has not been pasted via clipboard !"
155 '/// 4. Insert a frame via 'Insert / File '
160 Dateiname.Settext Convertpath (gTesttoolpath + "writer\optional\input\textframe\frame.sxw")
164 'set focus to the frame
165 Call wTypeKeys ( "<Shift F4>" )
169 Call fFormatFrame("TabType")
172 Warnlog "Frame has not been inserted via insert/file !"
179 '---------------------------------------------------
181 testcase tTextframes_2
184 Dim sHeight as String
185 Dim sSpacing as String
190 printlog "- Test check Autosize"
191 '/// Test check Autosize
195 '/// insert/frame / Type , Check Autosize
198 Active.SetPage TabType
204 '/// A return on a selected frame points cursor into frame
205 Call wTypeKeys "<Return>"
208 '/// Input text full of frame
212 Call wTypeKeys "<End>"
213 Call wTypeKeys "<Shift Home>"
219 ' Choosed Text length because selected text depends on selected font
220 if Len(GetClipboardText) = Len(sText) then Warnlog "Don't get expected text ! Autosize doesn't seem to work properly"
225 '-----------------------------------------------------------------
227 testcase tTextframes_3
230 Dim sExpect as String
231 Dim sHeight as String
232 Dim sSpacing as String
238 printlog "- Test Uncheck Autosize"
239 '/// Test Uncheck Autosize
243 '/// insert/frame / Type , UnCheck Autosize
246 Active.SetPage TabType
252 '/// A return on a selected frame points cursor into frame
253 Call wTypeKeys "<Return>"
256 '/// Input text full of frame
260 Call wTypeKeys "<End>"
261 Call wTypeKeys "<Shift Home>"
267 if GetClipboardText <> sExpect then QAerrorlog "#i31690# - Don't get expected text ! Hope to get " + sExpect + " but get " + GetClipboardText
272 '-----------------------------------------------------------------
274 testcase tTextframes_4
277 Dim sHeight as String
278 Dim sWidthNew1 as String
279 Dim sHeightNew1 as String
280 Dim sWidthNew2 as String
281 Dim sHeightNew2 as String
283 sWidth = "2"+ gSeperator + "00" + gMeasurementUnit
284 sHeight = "1"+ gSeperator + "00" + gMeasurementUnit
286 sWidthNew1 = "4"+ gSeperator + "00" + gMeasurementUnit
287 sHeightNew1 = "1"+ gSeperator + "00" + gMeasurementUnit
289 sWidthNew2 = "4"+ gSeperator + "00" + gMeasurementUnit
290 sHeightNew2 = "3"+ gSeperator + "00" + gMeasurementUnit
292 printlog "- Test Uncheck Keep ratio"
293 '/// Test Uncheck Keep ratio
300 '/// Format / Frame / Type
301 Call fFormatFrame("TabType")
303 '/// + UnCheck Keep ratio
307 '/// + Set width and height
310 Height.SetText sHeight
313 if Width.GetText <> sWidth then Warnlog "Keep ration(Uncheck) doesn't work - width!"
314 if Height.GetText <> sHeight then Warnlog "Keep ration(Uncheck) doesn't work - heigth!"
316 '/// Check if height is changed after width is changed.
317 Width.SetText sWidthNew1
320 if Width.GetText <> sWidthNew1 then Warnlog "Keep ration(Uncheck) doesn't work - widthNew1 !"
321 if Height.GetText <> sHeightNew1 then Warnlog "Keep ration(Uncheck) doesn't work - heigthNew1 !"
323 '/// Check if width is changed after height is changed.
324 Height.SetText sHeightNew2
327 if Width.GetText <> sWidthNew2 then Warnlog "Keep ration(Uncheck) doesn't work - widthNew2 !"
328 if Height.GetText <> sHeightNew2 then Warnlog "Keep ration(Uncheck) doesn't work - heigthNew2 !"
336 '-----------------------------------------------------------------
338 testcase tTextframes_5
341 Dim sHeight as String
342 Dim sWidthNew1 as String
343 Dim sHeightNew1 as String
344 Dim sWidthNew2 as String
345 Dim sHeightNew2 as String
347 sWidth = "2"+ gSeperator + "00" + gMeasurementUnit
348 sHeight = "1"+ gSeperator + "00" + gMeasurementUnit
350 sWidthNew1 = "4"+ gSeperator + "00" + gMeasurementUnit
351 sHeightNew1 = "2"+ gSeperator + "00" + gMeasurementUnit
353 sWidthNew2 = "6"+ gSeperator + "00" + gMeasurementUnit
354 sHeightNew2 = "3"+ gSeperator + "00" + gMeasurementUnit
356 printlog "- Test check Keep ratio"
357 '/// Test check Keep ratio
364 '/// Format / Frame / Type
365 Call fFormatFrame("TabType")
367 '/// + UnCheck Keep ratio
370 '/// + Set width and height
373 Height.SetText sHeight
376 '/// + Check Keep ratio
380 '/// Check if height is changed after width is changed.
381 Width.SetText sWidthNew1
384 if Width.GetText <> sWidthNew1 then Warnlog "Keep ration(check) doesn't work - widthNew1 !"
385 if Height.GetText <> sHeightNew1 then Warnlog "Keep ration(check) doesn't work - heigthNew1 !"
387 '/// Check if width is changed after height is changed.
388 Height.SetText sHeightNew2
391 if Width.GetText <> sWidthNew2 then Warnlog "Keep ration(check) doesn't work - widthNew2 !"
392 if Height.GetText <> sHeightNew2 then Warnlog "Keep ration(check) doesn't work - heigthNew2 !"
400 '-----------------------------------------------------------------
402 testcase tTextframes_6
404 Dim sTestFile as String
405 Dim sTestText as String
407 sTestFile = Convertpath (gTesttoolpath + "writer\optional\input\textframe\AnchorToPage.sxw")
410 printlog "- Test Anchor to page - frame doesn't move with text"
411 '/// Test Anchor to page - frame doesn't move with text
413 '/// Open a test file
414 '/// + This test file is designed for Anchor To Page test.
415 '/// + There are 2 pages in the file , and the frame is in
416 '/// + the bottom of first page
417 Call hFileOpen(sTestFile,false)
418 Call sMakeReadOnlyDocumentEditable
422 Kontext "FindAndReplace"
423 SearchFor.SetText sTestText
428 if Active.Exists then
429 if Active.GetRT = 304 then
437 Kontext "FindAndReplace"
438 FindAndReplace.Cancel
441 if Not Navigator.Exists then ViewNavigator
442 Kontext "NavigatorWriter"
444 if Seitennummer.GetText <> "1" then
447 Call wTypeKeys "<Home>"
449 Call wTypeKeys "<BackSpace>"
457 Call wTypeKeys "<Home>"
459 '/// Press Return before "bottom" , now the "bottom"
460 '/// + should be in the second page
461 Call wTypeKeys "<Return>" , 15
464 Call wTypeKeys "<Shift End>"
467 if GetClipboardText <> sTestText then Warnlog "The test text isn't right !"
470 if Not Navigator.Exists then ViewNavigator
471 Kontext "NavigatorWriter"
473 if Seitennummer.GetText <> "2" then Warnlog "The test text should be in second page !"
477 '/// Set focus to the frame , the frame should be
478 '/// + still in the first page
479 Call wTypeKeys ( "<Shift F4>" )
483 if Not Navigator.Exists then ViewNavigator
484 Kontext "NavigatorWriter"
486 if Seitennummer.GetText <> "1" then Warnlog "The test frame should be still in first page !"
490 printlog " Close active document "
491 Do Until GetDocumentCount = 0
497 '-----------------------------------------------------------------
499 testcase tTextframes_7
501 Dim sTestFile as String
504 sTestFile = Convertpath (gTesttoolpath + "writer\optional\input\textframe\AnchorToParagraph.sxw")
507 printlog "- Test Anchor to paragraph - text entered ahead of the paragraph ,the frame has to move with its paragraph"
508 '/// Test Anchor to paragraph - text entered ahead of the paragraph ,the frame has to move with its paragraph
510 '/// Open a test file
511 '/// + This test file is designed for Anchor To Paragraph test.
512 '/// + There are 2 paragraphs in the file , and the head of 2nd
513 '/// + paragraph is in the bottom of the first page .
514 '/// + The frame is in the first line of 2nd paragraph
515 Call hFileOpen(sTestFile,false)
516 Call sMakeReadOnlyDocumentEditable
518 '/// check if the frame is in the first page
519 Call wTypeKeys ( "<Shift F4>" )
525 Kontext "NavigatorWriter"
527 if Seitennummer.GetText <> "1" then
531 Call wTypeKeys "<ESCAPE>"
532 Call wTypeKeys "<MOD1 Home>"
535 Kontext "FindAndReplace"
536 SearchFor.SetText sDummy
540 FindAndReplace.Cancel
542 Call wTypeKeys "<Home>"
543 Call wTypeKeys "<Backspace>"
550 Call wTypeKeys "<ESCAPE>"
552 Call wTypeKeys "<MOD1 Home>"
554 '/// Press Return before the second paragraph
555 Call wTypeKeys "<Return>" , 3
558 '/// Set focus to the frame , the frame should be in the second page
559 Call wTypeKeys ( "<Shift F4>" )
564 Kontext "NavigatorWriter"
566 if Seitennummer.GetText <> "2" then Warnlog "The test frame should be in second page !"
570 printlog " Close active document "
571 Do Until GetDocumentCount = 0
577 '-----------------------------------------------------------------
579 testcase tTextframes_8
581 Dim sTestFile as String
584 sTestFile = Convertpath (gTesttoolpath + "writer\optional\input\textframe\AnchorToCharacter.sxw")
587 printlog "- Test Anchor to Character - the frame follows the vertical position of the character it is anchored to"
588 '/// Test Anchor to Character - the frame follows the vertical position of the character it is anchored to
590 '/// Open a test file
591 '/// + This test file is designed for Anchor To Character test.
592 '/// + The frame is anchored to the character 't' of That .
593 '/// + The frame is in the bottom of the first page
595 Call hFileOpen(sTestFile,false)
596 Call sMakeReadOnlyDocumentEditable
598 '/// check if the frame is in the first page
599 Call wTypeKeys ( "<Shift F4>" )
605 Kontext "NavigatorWriter"
607 if Seitennummer.GetText <> "1" then
611 Call wTypeKeys "<ESCAPE>"
612 Call wTypeKeys "<MOD1 Home>"
615 Kontext "FindAndReplace"
616 SearchFor.SetText sDummy
620 FindAndReplace.Cancel
622 Call wTypeKeys "<Home>"
623 Call wTypeKeys "<Backspace>"
630 Call wTypeKeys "<ESCAPE>"
632 Call wTypeKeys "<End>"
634 '/// Press Return behind the character which the frame is anchored.
635 Call wTypeKeys "<Return>" , 8
638 '/// Set focus to the frame , the frame should be still in the first page
639 Call wTypeKeys ( "<Shift F4>" )
644 Kontext "NavigatorWriter"
646 if Seitennummer.GetText <> "1" then Warnlog "The test frame should be in first page !"
652 Call hFileOpen(sTestFile,false)
653 Call sMakeReadOnlyDocumentEditable
655 Call wTypeKeys ( "<Shift F4>" )
661 Kontext "NavigatorWriter"
663 if Seitennummer.GetText <> "1" then
667 Call wTypeKeys "<ESCAPE>"
668 Call wTypeKeys "<MOD1 Home>"
671 Kontext "FindAndReplace"
672 SearchFor.SetText sDummy
676 FindAndReplace.Cancel
678 Call wTypeKeys "<Home>"
679 Call wTypeKeys "<Backspace>"
686 '/// Press Return in front of the character which the frame is anchored.
687 Call wTypeKeys "<MOD1 Home>"
688 Call wTypeKeys "<Return>" , 8
691 '/// Set focus to the frame , the frame should be in the second page
692 Call wTypeKeys ( "<Shift F4>" )
697 Kontext "NavigatorWriter"
699 if Seitennummer.GetText <> "2" then Warnlog "The test frame should be in second page !"
703 printlog " Close active document "
704 Do Until GetDocumentCount = 0
710 '-----------------------------------------------------------------
712 testcase tTextframes_9
714 Dim sTestFile as String
717 sTestFile = Convertpath (gTesttoolpath + "writer\optional\input\textframe\AnchorAsCharacter.sxw")
720 printlog "- Test Anchor as Character - frame behaves as a character, moves with each text insertion ahead of it"
721 '/// Test Anchor as Character - frame behaves as a character, moves with each text insertion ahead of it
723 '/// Open a test file
724 '/// + This test file is designed for Anchor as Character test.
725 '/// + The frame is anchored as the character.
726 '/// + The frame is in the right and bottom of the first page
727 Call hFileOpen(sTestFile,false)
728 Call sMakeReadOnlyDocumentEditable
730 'check if the frame is in the first page
731 Call wTypeKeys ( "<Shift F4>" )
737 Kontext "NavigatorWriter"
739 if Seitennummer.GetText <> "1" then
743 Call wTypeKeys "<ESCAPE>"
744 Call wTypeKeys "<MOD1 Home>"
747 Kontext "FindAndReplace"
748 SearchFor.SetText sDummy
752 FindAndReplace.Cancel
754 Call wTypeKeys "<Home>"
755 Call wTypeKeys "<Backspace>"
762 Call wTypeKeys "<ESCAPE>"
764 Call wTypeKeys "<End>"
766 '/// Press Return behind the the frame.
767 Call wTypeKeys "<Return>" , 8
770 '/// Set focus to the frame , the frame should be still in the first page
771 Call wTypeKeys ( "<Shift F4>" )
776 Kontext "NavigatorWriter"
778 if Seitennummer.GetText <> "1" then Warnlog "The test frame should be in first page !"
784 Call hFileOpen(sTestFile,false)
785 Call sMakeReadOnlyDocumentEditable
790 Kontext "NavigatorWriter"
792 if Seitennummer.GetText <> "1" then
796 Call wTypeKeys "<ESCAPE>"
797 Call wTypeKeys "<MOD1 Home>"
800 Kontext "FindAndReplace"
801 SearchFor.SetText sDummy
805 FindAndReplace.Cancel
807 Call wTypeKeys "<Home>"
808 Call wTypeKeys "<Backspace>"
815 '/// Press Return in front of the frame
816 Call wTypeKeys "<ESCAPE>"
818 Call wTypeKeys "<Home>"
819 Call wTypeKeys "<Return>" , 8
822 '/// Set focus to the frame , the frame should be in the second page
823 Call wTypeKeys ( "<Shift F4>" )
828 Kontext "NavigatorWriter"
830 if Seitennummer.GetText <> "2" then Warnlog "The test frame should be in second page !"
834 printlog " Close active document "
835 Do Until GetDocumentCount = 0
841 '-----------------------------------------------------------------
843 testcase tTextframes_10
845 Dim sColumn1 as String
846 Dim sColumn2 as String
847 Dim sTestFile1 as String
848 Dim sTestFile2 as String
852 sTestFile1 = Convertpath (gTesttoolpath + "writer\optional\input\textframe\pageColumn1.sxw")
853 sTestFile2 = Convertpath (gTesttoolpath + "writer\optional\input\textframe\pageColumn2.sxw")
855 printlog "- Test Anchor in gathering pages&columns test."
856 '/// Test Anchor in gathering pages&columns test.
858 '/// Open a test file
859 '/// + This test file is designed for Anchor in gathering pages&columns test.
860 '/// + There are 2 columns in the page. And the frame is in the second column.
861 Call hFileOpen(sTestFile1,false)
862 Call sMakeReadOnlyDocumentEditable
864 'Press return to ensure the frame is in 2nd column
865 Call wTypeKeys "<MOD1 Home>"
867 Call wTypeKeys "<Return>" , 8
870 '/// Set the column to 1
871 fFormatPageWriter("TabSpalten")
872 Anzahl.SetText sColumn1
876 '/// Check if the frame is in the second page
877 Call wTypeKeys ( "<Shift F4>" )
882 Kontext "NavigatorWriter"
884 if Seitennummer.GetText <> "2" then Warnlog "The test frame should be in second page -1!"
890 printlog "- Test Anchor in seperating pages&columns test"
891 '/// Test Anchor in seperating pages&columns test
893 '/// Open a test file2
894 '/// + This test file is designed for Anchor in seperating
895 '/// + pages&columns test.
896 '/// + There are 2 pages. And the frame is in the second page.
897 Call hFileOpen(sTestFile2,false)
898 Call sMakeReadOnlyDocumentEditable
900 'check if the frame is in the 2nd page
901 Call wTypeKeys ( "<Shift F4>" )
906 Kontext "NavigatorWriter"
908 if Seitennummer.GetText <> "2" then
909 Call wTypeKeys "<ESCAPE>"
910 Call wTypeKeys "<MOD1 Home>"
912 Call wTypeKeys "<Return>" , 8
918 Call wTypeKeys "<ESCAPE>"
921 '/// Set the column to 2
922 fFormatPageWriter("TabSpalten")
923 Anzahl.SetText sColumn2
927 '/// Check if the frame is in the first page
928 Call wTypeKeys ( "<Shift F4>" )
933 Kontext "NavigatorWriter"
935 if Seitennummer.GetText <> "1" then Warnlog "The test frame should be in first page ! -2"
939 printlog " Close active document "
940 Do Until GetDocumentCount = 0
946 '-----------------------------------------------------------------
948 testcase tTextframes_11
950 Dim sTestFile as String
951 Dim sDummy1 as String
952 Dim sDummy2 as String
954 sTestFile = Convertpath (gTesttoolpath + "writer\optional\input\textframe\pageParagraph.sxw")
958 printlog "- Test Anchor in gathering paragraph test"
959 '/// Test Anchor in gathering paragraph test
961 '/// Open a test file
962 '/// + This test file is designed for Anchor in gathering paragraph test.
963 '/// + There are 2 paragraph in the file .
964 '/// + The 1st paragraph is in 1st page and the 2nd paragraph is in 2nd page
965 '/// + Two paragraphs, a frame is anchored to the second one. When deleting the paragraph mark, the anchor of the frame has to move the the first paragraph.
966 Call hFileOpen(sTestFile,false)
967 Call sMakeReadOnlyDocumentEditable
972 Kontext "FindAndReplace"
974 SearchFor.SetText sDummy1
981 if Active.Exists then
982 if Active.GetRT = 304 then
990 Kontext "FindAndReplace"
991 FindAndReplace.Cancel
994 if Not Navigator.Exists then ViewNavigator
995 Kontext "NavigatorWriter"
997 if Seitennummer.GetText <> "1" then
1000 Call wTypeKeys "<Home>"
1002 Call wTypeKeys "<BackSpace>"
1012 EditSearchAndReplace
1013 Kontext "FindAndReplace"
1015 SearchFor.SetText sDummy2
1021 if Active.Exists then
1022 if Active.GetRT = 304 then
1030 Kontext "FindAndReplace"
1031 FindAndReplace.Close
1034 if Not Navigator.Exists then ViewNavigator
1035 Kontext "NavigatorWriter"
1037 if Seitennummer.GetText <> "2" then
1040 Call wTypeKeys "<MOD1 Home>"
1042 Call wTypeKeys "<Return>"
1050 '/// Delete the 1st paragraph mark
1051 Call wTypeKeys "<Home>"
1053 Call wTypeKeys "<Backspace>"
1056 Call wTypeKeys ( "<Shift F4>" )
1059 '/// Check if frame is in 1st page
1061 if Not Navigator.Exists then ViewNavigator
1062 Kontext "NavigatorWriter"
1064 if Seitennummer.GetText <> "1" then
1065 Warnlog "The test frame should be in the first page! "
1070 printlog " Close active document "
1071 Do Until GetDocumentCount = 0
1077 '-----------------------------------------------------------------
1079 testcase tTextframes_12
1081 printlog "- Horizontal should not be available when frame is anchored as Character"
1082 '/// Horizontal should not be available when frame is anchored as Character
1089 '/// format / frame / type
1090 Call fFormatFrame("TabType")
1092 '/// + Check Anchor as Character
1093 AnchorAsCharacter.Check
1096 '/// + Check if Horizontal is available
1099 Warnlog "Horizontal Should NOT be available when anchor as Character!"
1104 HorizontalBy.SetText "1"
1105 Warnlog "HorizontalBy Should NOT be available when anchor as Character!"
1110 HorizontalTo.Select 1
1111 Warnlog "HorizontalTo Should NOT be available when anchor as Character!"
1121 '-----------------------------------------------------------------
1123 testcase tTextframes_13
1125 Dim sHorizontalBy as String
1126 Dim iHorizontalLeft as Integer
1127 Dim iHorizontalRight as Integer
1128 Dim iHorizontalCenter as Integer
1129 Dim iHorizontalFromLeft as Integer
1131 sHorizontalBy = "1"+ gSeperator + "00" + gMeasurementUnit
1134 iHorizontalRight = 2
1135 iHorizontalCenter = 3
1136 iHorizontalFromLeft = 4
1138 printlog "Test Horizontal"
1139 '/// Test Horizontal
1146 '/// format / frame / type
1147 Call fFormatFrame("TabType")
1148 '/// + Select Horizontal as Left
1149 printlog "- Horizontal as Left"
1151 Horizontal.Select iHorizontalLeft
1154 HorizontalBy.SetText sHorizontalBy
1155 Warnlog "HorizontalBy Should NOT be available !"
1159 HorizontalTo.Select 1
1163 Call fFormatFrame("TabType")
1164 if Horizontal.GetSelIndex <> iHorizontalLeft then Warnlog "Horizontal option is not correct !"
1165 if HorizontalTo.GetSelIndex <> 1 then Warnlog "HorizontalTo option is not correct !"
1168 '/// + Select Horizontal as Right
1169 printlog "- Horizontal as Right"
1171 Call fFormatFrame("TabType")
1172 Horizontal.Select iHorizontalRight
1175 HorizontalBy.SetText sHorizontalBy
1176 Warnlog "HorizontalBy Should NOT be available !"
1180 HorizontalTo.Select 2
1183 Call fFormatFrame("TabType")
1184 if Horizontal.GetSelIndex <> iHorizontalRight then Warnlog "Horizontal option is not correct !"
1185 if HorizontalTo.GetSelIndex <> 2 then Warnlog "HorizontalTo option is not correct !"
1188 Call fFormatFrame("TabType")
1189 '/// + Select Horizontal as Center
1190 printlog "- Horizontal as Center"
1192 Horizontal.Select iHorizontalCenter
1195 HorizontalBy.SetText sHorizontalBy
1196 Warnlog "HorizontalBy Should NOT be available !"
1200 HorizontalTo.Select 3
1203 Call fFormatFrame("TabType")
1204 if Horizontal.GetSelIndex <> iHorizontalCenter then Warnlog "Horizontal option is not correct !"
1205 if HorizontalTo.GetSelIndex <> 3 then Warnlog "HorizontalTo option is not correct !"
1208 Call fFormatFrame("TabType")
1209 '/// + Select Horizontal as From left
1210 printlog "- Horizontal as From left "
1212 Horizontal.Select iHorizontalFromLeft
1215 HorizontalBy.SetText sHorizontalBy
1217 Warnlog "HorizontalBy Should be available !"
1220 HorizontalTo.Select 3
1224 Call fFormatFrame("TabType")
1225 if Horizontal.GetSelIndex <> iHorizontalFromLeft then Warnlog "Horizontal option is not correct !"
1226 if HorizontalBy.GetText <> sHorizontalBy then Warnlog "HorizontalBy option is not correct !"
1227 if HorizontalTo.GetSelIndex <> 3 then Warnlog "HorizontalTo option is not correct !"
1234 '-----------------------------------------------------------------
1236 testcase tTextframes_14
1238 Dim sVerticalBy as String
1239 Dim iVerticalTop as Integer
1240 Dim iVerticalBottom as Integer
1241 Dim iVerticalCenter as Integer
1242 Dim iVerticalFromTop as Integer
1244 sVerticalBy = "1"+ gSeperator + "00" + gMeasurementUnit
1249 iVerticalFromTop = 4
1251 printlog "Test Vertical"
1259 '/// format / frame / type
1260 Call fFormatFrame("TabType")
1261 '/// + Select Vertical as Top
1262 printlog "- Vertical as Top"
1264 Vertical.Select iVerticalTop
1267 VerticalBy.SetText sVerticalBy
1268 Warnlog "VerticalBy Should NOT be available !"
1276 Call fFormatFrame("TabType")
1277 if Vertical.GetSelIndex <> iVerticalTop then Warnlog "Vertical option is not correct !"
1278 if VerticalTo.GetSelIndex <> 1 then Warnlog "VerticalTo option is not correct !"
1281 '/// + Select Vertical as Right
1282 printlog "- Vertical as Right"
1284 Call fFormatFrame("TabType")
1285 Vertical.Select iVerticalBottom
1288 VerticalBy.SetText sVerticalBy
1289 Warnlog "VerticalBy Should NOT be available !"
1296 Call fFormatFrame("TabType")
1297 if Vertical.GetSelIndex <> iVerticalBottom then Warnlog "Vertical option is not correct !"
1298 if VerticalTo.GetSelIndex <> 2 then Warnlog "VerticalTo option is not correct !"
1301 Call fFormatFrame("TabType")
1302 '/// + Select Vertical as Center
1303 printlog "- Vertical as Center"
1305 Vertical.Select iVerticalCenter
1308 VerticalBy.SetText sVerticalBy
1309 Warnlog "VerticalBy Should NOT be available !"
1316 Call fFormatFrame("TabType")
1317 if Vertical.GetSelIndex <> iVerticalCenter then Warnlog "Vertical option is not correct !"
1318 if VerticalTo.GetSelIndex <> 1 then Warnlog "VerticalTo option is not correct !"
1321 Call fFormatFrame("TabType")
1322 '/// + Select Vertical as From top
1323 printlog "- Vertical as From top"
1325 Vertical.Select iVerticalFromTop
1328 VerticalBy.SetText sVerticalBy
1330 Warnlog "VerticalBy Should be available !"
1337 Call fFormatFrame("TabType")
1338 if Vertical.GetSelIndex <> iVerticalFromTop then Warnlog "Vertical option is not correct !"
1339 if VerticalBy.GetText <> sVerticalBy then Warnlog "VerticalBy option is not correct !"
1340 if VerticalTo.GetSelIndex <> 2 then Warnlog "VerticalTo option is not correct !"
1347 '-----------------------------------------------------------------
1349 testcase tTextframes_15
1351 Dim sOriginalName as String
1352 Dim sNewName as String
1354 sOriginalName = "TEST1"
1357 printlog "- Frame name can be actualized in Navigator - solution 1"
1358 '/// Frame name can be actualized in Navigator - solution 1
1362 '/// insert a frame and name as "TEST1"
1365 Call fFormatFrame("TabZusaetze")
1366 ObjektName.SetText sOriginalName
1369 '/// Open Navigator,
1370 Call fStartupNavigator("TextFrame" , 1)
1371 Auswahlliste.TypeKeys "<Down>"
1372 Auswahlliste.OpenContextMenu
1374 '/// + ContextMenu TextFrame / Edit,
1375 Call hMenuSelectNr(4)
1377 Call hMenuSelectNr(1)
1379 Kontext "TabZusaetze"
1380 '/// + Change the frame name in the opened dialogue ,
1382 ObjektName.SetText sNewName
1385 Warnlog "format/grame dialogue isn't opened correctly!"
1386 Call fCloseNavigator
1390 '/// + close the navigator
1391 Call fCloseNavigator
1393 Call wTypeKeys ( "<Shift F4>" )
1395 '/// Check if the name is changed correctly
1396 Call fFormatFrame("TabZusaetze")
1397 if ObjektName.GetText <> sNewName then Warnlog "frame name isn't renamed correctly!"
1404 '---------------------------------------------------
1406 testcase tTextframes_16
1408 Dim sOriginalName as String
1409 Dim sNewName as String
1411 sOriginalName = "TEST1"
1414 printlog "- Frame name can be actualized in Navigator - solution 2"
1415 '/// Frame name can be actualized in Navigator - solution 2
1419 '/// insert a frame and name as "TEST1"
1422 Call fFormatFrame("TabZusaetze")
1423 ObjektName.SetText sOriginalName
1426 '/// + Open Navigator ,
1427 Call fStartupNavigator("TextFrame" , 1)
1429 Auswahlliste.TypeKeys "<Down>"
1430 Auswahlliste.OpenContextMenu
1432 '/// + ContextMenu TextFrame / Rename
1433 Call hMenuSelectNr(4)
1435 Call hMenuSelectNr(3)
1438 Kontext "ObjekteUmbenennen"
1440 '/// + Change the frame name in the opened dialogue ,
1442 ObjektName.SetText sNewName
1443 ObjekteUmbenennen.OK
1445 Warnlog "Frame rename dialogue isn't opened correctly!"
1446 Call fCloseNavigator
1450 '/// + close navigaotr
1451 Call fCloseNavigator
1453 Call wTypeKeys ( "<Shift F4>" )
1455 '/// Check if the name is changed correctly
1456 Call fFormatFrame("TabZusaetze")
1457 if ObjektName.GetText <> sNewName then Warnlog "frame name isn't renamed correctly!"
1464 '---------------------------------------------------