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: frm_Forms.inc,v $
13 '* last change: $Author: rt $ $Date: 2008-08-28 11:39:23 $
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 : marc.neumann@sun.com
36 '* short description : Form Test
38 '\***********************************************************************
39 global gDSName as String
41 sub frm_Forms(sdsname)
52 call tCreateSubFormsNewMethod
55 'test forms inside a database
56 app.FileCopy gTesttoolPath + ConvertPath("dbaccess/optional/input/hsql_datasource/TT_hsqldb.odb"),gOfficePath + ConvertPath("user/work/TT_hsqldb.odb")
58 call tDatabaseFormsMain
62 'activate after cws fwkdbdesign01 is integrated
63 call tKeyboardNavigate
65 ' test for issue 78286
66 call tViewAsGridEmbeddedForm
69 '--------------------------------------------------------------------------------------
70 testcase tDatabaseFormsMain
72 call fOpenDatabase(gOfficePath + "user/work/TT_hsqldb.odb")
74 call fOpenNewFormDesign
76 call hToolbarSelect("FormControls",true)
78 '/// insert a textfield
79 printlog "insert a textfield"
80 Kontext "FormControls"
82 call hDrawingWithSelection ( 50, 20, 60, 30 )
85 Kontext "FormControls"
86 ControlProperties.Click
88 Kontext "ControlPropertiesTabControl"
89 ControlPropertiesTabControl.SetPage TabDataControl
92 Kontext "TabDataControl"
93 DataField.setText "id"
96 Kontext "ControlPropertiesDialog"
97 ControlPropertiesDialog.Close
100 '/// save the form under the name TT_form1
101 printlog "save the form under the name TT_form1"
102 call fSaveForm( "TT_Form1", true )
104 '/// close the database
105 printlog "close the database"
108 '/// open the database again
109 printlog "open the database again"
110 call fOpenDatabase(gOfficePath + "user/work/TT_hsqldb.odb")
113 printlog "open the form"
114 call fOpenForm("TT_Form1")
117 printlog "close the form"
120 '/// close the database
121 printlog "close the database"
122 call fCloseDatabase()
125 '--------------------------------------------------------------------------------------
128 '/// open a new text document
129 printlog "open a new text document"
132 '/// create a new form via the form navigator
133 printlog "create a new form via the form navigator"
134 call hToolbarSelect("FORMDESIGNTOOLS",true)
136 Kontext "FormDesignTools"
139 Kontext "FormularNavigator"
140 Liste.TypeKeys "<SPACE>"
142 Liste.OpenContextmenu
148 Liste.TypeKeys "<RETURN>"
150 Liste.OpenContextmenu
155 Kontext "FormPropertiesDialog"
156 FormPropertiesTabControl.SetPage TabDataForm
158 Kontext "TabDataForm"
159 '/// set the datasource gDatasourceName
160 printlog "set the datasource " + gDSName
161 DataSource.setText(gDSName)
162 TabDataForm.TypeKeys("<RETURN>")
164 '/// set the table TT_Forms
165 printlog "set the table TT_Forms"
166 Content.setText("TT_Forms")
167 TabDataForm.TypeKeys("<RETURN>")
169 Kontext "FormPropertiesDialog"
170 FormPropertiesDialog.Close
172 Kontext "FormularNavigator"
173 FormularNavigator.Close
176 call hToolbarSelect("FormControls",true)
178 Kontext "FormControls"
179 '/// insert a textfield
180 printlog "insert a textfield"
182 call hDrawingWithSelection ( 50, 20, 60, 30 )
185 Kontext "FormControls"
186 ControlProperties.Click
188 Kontext "ControlPropertiesTabControl"
189 ControlPropertiesTabControl.SetPage TabDataControl
191 Kontext "TabDataControl"
192 DataField.setText "id"
193 TabDataControl.TypeKeys("<RETURN>")
195 Kontext "ControlPropertiesDialog"
196 ControlPropertiesDialog.Close
199 Kontext "FormControls"
200 SwitchControlDesignMode.Click
203 hFileSaveAsKill ( gOfficePath + ConvertPath("user/work/TT_Forms.odt"))
208 '-------------------------------------------------------------------------
211 hFileOpen ( gOfficePath + ConvertPath("user/work/TT_Forms.odt"))
225 '-------------------------------------------------------------------------
226 testcase tKeyboardNavigate
228 '/// open the database <OfficePath>/user/work/TT_hsqldb.odb
229 printlog "open the database " + gOfficePath + "user/work/TT_hsqldb.odb"
230 call fOpenDatabase(gOfficePath + "user/work/TT_hsqldb.odb")
232 call fOpenForm("TT_Form1")
234 Kontext "DocumentWriter"
235 DocumentWriter.TypeKeys("<MOD1 MOD2 END>")
237 DocumentWriter.TypeKeys "<MOD1 F5>" , true
239 DocumentWriter.TypeKeys "<SHIFT END>" , true
241 DocumentWriter.TypeKeys "<MOD1 C>" , true
243 if getClipboard = "3" then
244 printlog "right record is displayed."
246 warnlog "wrong record is displayed. It should be 3 but it is " + getClipboard
249 DocumentWriter.TypeKeys("<MOD1 MOD2 HOME>")
251 DocumentWriter.TypeKeys "<MOD1 F5>" , true
253 DocumentWriter.TypeKeys "<SHIFT END>" , true
255 DocumentWriter.TypeKeys "<MOD1 C>" , true
257 if getClipboard = "1" then
258 printlog "right record is displayed."
260 warnlog "wrong record is displayed. It should be 1 but it is " + getClipboard
263 DocumentWriter.TypeKeys("<MOD1 MOD2 RIGHT>")
265 DocumentWriter.TypeKeys "<MOD1 F5>" , true
267 DocumentWriter.TypeKeys "<SHIFT END>" , true
269 DocumentWriter.TypeKeys "<MOD1 C>" , true
271 if getClipboard = "2" then
272 printlog "right record is displayed."
274 warnlog "wrong record is displayed. It should be 2 but it is " + getClipboard
277 DocumentWriter.TypeKeys("<MOD1 MOD2 LEFT>")
279 DocumentWriter.TypeKeys "<MOD1 F5>" , true
281 DocumentWriter.TypeKeys "<SHIFT END>" , true
283 DocumentWriter.TypeKeys "<MOD1 C>" , true
285 if getClipboard = "1" then
286 printlog "right record is displayed."
288 warnlog "wrong record is displayed. It should be 1 but it is " + getClipboard
296 '-------------------------------------------------------------------------
299 hFileOpen ( gOfficePath + ConvertPath("user/work/TT_Forms.odt"))
303 Kontext "RecordSearch"
304 SearchText.setText "3"
311 Kontext "DocumentWriter"
312 DocumentWriter.TypeKeys "<MOD1 F5>" , true
314 DocumentWriter.TypeKeys "<HOME>" , true
316 DocumentWriter.TypeKeys "<SHIFT END>" , true
318 DocumentWriter.TypeKeys "<MOD1 C>" , true
320 if getClipboard <> "3" then
321 warnlog "wrong record is displayed"
327 '-------------------------------------------------------------------------
330 hFileOpen ( gOfficePath + ConvertPath("user/work/TT_Forms.odt"))
332 Kontext "DocumentWriter"
333 DocumentWriter.TypeKeys "<MOD1 F5>" , true
337 Kontext "DocumentWriter"
338 DocumentWriter.TypeKeys "<MOD1 F5>" , true
340 DocumentWriter.TypeKeys "<HOME>" , true
342 DocumentWriter.TypeKeys "<SHIFT END>" , true
344 DocumentWriter.TypeKeys "<MOD1 C>" , true
346 if getClipboard <> "3" then
347 warnlog "wrong record is displayed. It is " + getClipboard + " but it have to 3"
353 Kontext "DocumentWriter"
354 DocumentWriter.TypeKeys "<MOD1 F5>" , true
356 DocumentWriter.TypeKeys "<HOME>" , true
358 DocumentWriter.TypeKeys "<SHIFT END>" , true
360 DocumentWriter.TypeKeys "<MOD1 C>" , true
362 if getClipboard <> "1" then
363 warnlog "wrong record is displayed. It is " + getClipboard + " but it have to 1"
369 Kontext "DocumentWriter"
370 DocumentWriter.TypeKeys "<MOD1 F5>" , true
372 DocumentWriter.TypeKeys "<HOME>" , true
374 DocumentWriter.TypeKeys "<SHIFT END>" , true
376 DocumentWriter.TypeKeys "<MOD1 C>" , true
378 if getClipboard <> "3" then
379 warnlog "wrong record is displayed. It is " + getClipboard + " but it have to 3"
385 Kontext "DocumentWriter"
386 DocumentWriter.TypeKeys "<MOD1 F5>" , true
388 DocumentWriter.TypeKeys "<HOME>" , true
390 DocumentWriter.TypeKeys "<SHIFT END>" , true
392 DocumentWriter.TypeKeys "<MOD1 C>" , true
394 if getClipboard <> "1" then
395 warnlog "wrong record is displayed. It is " + getClipboard + " but it have to 1"
406 Kontext "DocumentWriter"
407 DocumentWriter.TypeKeys "<MOD1 F5>" , true
409 DocumentWriter.TypeKeys "<HOME>" , true
411 DocumentWriter.TypeKeys "<SHIFT END>" , true
413 DocumentWriter.TypeKeys "<MOD1 C>" , true
415 if getClipboard <> "3" then
416 warnlog "wrong record is displayed. It is " + getClipboard + " but it have to 3"
422 '-------------------------------------------------------------------------
425 '///open the document TT_Forms.odt
426 printlog "pen the document TT_Forms.odt"
427 hFileOpen ( gOfficePath + ConvertPath("user/work/TT_Forms.odt"))
429 Kontext "DocumentWriter"
430 DocumentWriter.TypeKeys "<MOD1 F5>" , true
432 '/// click on the icon view as grid
433 printlog "click on the icon view as grid"
438 '/// check if the grid appear
439 printlog "check if the grid appear"
441 if CurrentRecord.getText <> "1" then
442 warnlog "the first record is wrong"
446 if CurrentRecord.getText <> "2" then
447 warnlog "the next record button in the table grid doesn't work"
452 printlog "close the view"
457 '/// close the document
458 printlog "close the document"
462 '-------------------------------------------------------------------------
463 testcase tNewSaveDelete
465 hFileOpen ( gOfficePath + ConvertPath("user/work/TT_Forms.odt"))
467 Kontext "DocumentWriter"
468 DocumentWriter.TypeKeys "<MOD1 F5>" , true
472 Kontext "DocumentWriter"
473 DocumentWriter.TypeKeys "7" , true
483 if MessageBox.exists(3) then
486 warnlog "No confirm dialog when press delete record"
493 '-------------------------------------------------------------------------
494 testcase tCreateSubForms
496 '/// open a new text document
497 printlog "open a new text document"
500 '/// create a new form via the form navigator
501 printlog "create a new form via the form navigator"
503 call hToolbarSelect("FORMDESIGNTOOLS",true)
505 Kontext "FormDesignTools"
509 Kontext "FormularNavigator"
510 Liste.TypeKeys "<SPACE>"
512 Liste.OpenContextmenu
518 Liste.TypeKeys "<RETURN>"
520 Liste.OpenContextmenu
525 Kontext "FormPropertiesDialog"
526 FormPropertiesTabControl.SetPage TabDataForm
527 Kontext "TabDataForm"
528 '/// set the datasource gDatasourceName
529 printlog "set the datasource gDatasourceName"
530 DataSource.setText(gDSName)
531 TabDataForm.TypeKeys("<RETURN>")
532 '/// set the table TT_Forms
533 printlog "set the table TT_Forms"
534 Content.setText("TT_Forms")
535 TabDataForm.TypeKeys("<RETURN>")
537 Kontext "FormPropertiesDialog"
539 FormPropertiesDialog.Close
541 Kontext "FormularNavigator"
542 FormularNavigator.Close
545 call hToolbarSelect("FormControls",true)
547 Kontext "FormControls"
548 '/// insert a textfield
549 printlog "insert a textfield"
551 call hDrawingWithSelection ( 50, 20, 60, 30 )
554 Kontext "FormControls"
555 ControlProperties.Click
557 Kontext "ControlPropertiesTabControl"
558 ControlPropertiesTabControl.SetPage TabDataControl
559 Kontext "TabDataControl"
560 DataField.setText "id"
561 TabDataControl.TypeKeys("<RETURN>",true)
563 Kontext "ControlPropertiesDialog"
564 ControlPropertiesDialog.Close
566 '/// now create the sub form
568 call hToolbarSelect("FORMDESIGNTOOLS",true)
570 Kontext "FormDesignTools"
574 Kontext "FormularNavigator"
575 Liste.TypeKeys "<HOME>" ' move to the first entry in the formnavigator tree
577 Liste.TypeKeys "<LEFT>" ' collaps the tree
579 Liste.TypeKeys "<RIGHT>" ' expand the tree
581 Liste.TypeKeys "<DOWN>" ' go one down
583 Liste.OpenContextmenu
589 Liste.TypeKeys "<RETURN>"
591 Liste.OpenContextmenu
596 Kontext "FormPropertiesDialog"
597 FormPropertiesTabControl.SetPage TabDataForm
598 Kontext "TabDataForm"
599 '/// set the datasource gDatasourceName
600 printlog "set the datasource gDatasourceName"
601 DataSource.setText(gDSName)
602 TabDataForm.TypeKeys("<RETURN>",true)
603 '/// set the contenttype SQL
604 printlog "set the contenttype SQL"
607 '/// set the sql string : select * from TT_Forms where id=:var1"
608 printlog "set the sql string : select * from TT_Forms where id=:var1"
609 TabDataForm.TypeKeys "<RETURN>" , true
610 TabDataForm.TypeKeys "select * from TT_Forms where id=:var1" , true
611 '/// set link master field
612 printlog "set link master field"
613 TabDataForm.TypeKeys "<TAB>" , 11 , true
615 TabDataForm.TypeKeys "id" , true
617 TabDataForm.TypeKeys "<RETURN>" , true
619 '/// set link slave field
620 printlog "set link slave field"
621 TabDataForm.TypeKeys "<RETURN>" , true
623 TabDataForm.TypeKeys "var1" , true
625 TabDataForm.TypeKeys("<RETURN>",true)
628 Kontext "FormPropertiesDialog"
629 FormPropertiesDialog.Close
631 Kontext "FormularNavigator"
632 FormularNavigator.Close
635 call hToolbarSelect("FormControls",true)
637 Kontext "FormControls"
639 '/// insert a textfield
640 printlog "insert a textfield"
642 call hDrawingWithSelection ( 50, 40, 60, 50 )
645 Kontext "FormControls"
646 ControlProperties.Click
648 Kontext "ControlPropertiesTabControl"
649 ControlPropertiesTabControl.SetPage TabDataControl
650 Kontext "TabDataControl"
651 DataField.setText "id"
652 TabDataControl.TypeKeys("<RETURN>")
654 Kontext "ControlPropertiesDialog"
655 ControlPropertiesDialog.Close
657 Kontext "FormControls"
658 SwitchControlDesignMode.Click
661 hFileSaveAsKill ( gOfficePath + ConvertPath("user/work/TT_SubForm.odt"))
666 '-------------------------------------------------------------------------
667 testcase tCheckSubForm
669 '/// open the file TTSubForm.sxw
670 printlog "open the file TTSubForm.sxw"
671 hFileOpen ( gOfficePath + ConvertPath("user/work/TT_SubForm.odt"))
673 '/// set cursor into the first control
674 printlog "set cursor into the first control"
675 Kontext "DocumentWriter"
676 DocumentWriter.TypeKeys "<MOD1 F5>" , true
682 Kontext "DocumentWriter"
683 DocumentWriter.TypeKeys "<TAB>" , true
685 DocumentWriter.TypeKeys "<SHIFT END>" , true
687 DocumentWriter.TypeKeys "<MOD1 C>" , true
689 if getClipboard <> "2" then
690 warnlog "wrong record is displayed in subform. It is " + getClipboard + " but it have to 2"
696 '-------------------------------------------------------------------------
697 testcase tCreateSubFormsNewMethod
699 '/// open a new text document
700 printlog "open a new text document"
703 '/// create a new form via the form navigator
704 printlog "create a new form via the form navigator"
706 call hToolbarSelect("FORMDESIGNTOOLS",true)
708 Kontext "FormDesignTools"
712 Kontext "FormularNavigator"
713 Liste.TypeKeys "<SPACE>"
715 Liste.OpenContextmenu
721 Liste.TypeKeys "<RETURN>"
723 Liste.OpenContextmenu
728 Kontext "FormPropertiesDialog"
729 FormPropertiesTabControl.SetPage TabDataForm
730 Kontext "TabDataForm"
731 '/// set the datasource gDatasourceName
732 printlog "set the datasource gDatasourceName"
733 DataSource.setText(gDSName)
734 TabDataForm.TypeKeys "<RETURN>" , true
735 '/// set the table TT_Forms
736 printlog "set the table TT_Forms"
737 Content.setText("TT_Forms")
738 TabDataForm.TypeKeys "<RETURN>" , true
740 Kontext "FormPropertiesDialog"
741 FormPropertiesDialog.Close
743 Kontext "FormularNavigator"
744 FormularNavigator.Close
747 call hToolbarSelect("FormControls",true)
749 Kontext "FormControls"
750 '/// insert a textfield
751 printlog "insert a textfield"
753 call hDrawingWithSelection ( 50, 20, 60, 30 )
756 Kontext "FormControls"
757 ControlProperties.Click
760 Kontext "ControlPropertiesTabControl"
761 ControlPropertiesTabControl.SetPage TabDataControl
763 Kontext "TabDataControl"
764 DataField.setText "id"
765 TabDataControl.TypeKeys "<RETURN>" , true
767 Kontext "ControlPropertiesDialog"
768 ControlPropertiesDialog.Close
771 Kontext "DocumentWriter"
772 DocumentWriter.TypeKeys("subform",true)
774 '/// now create the sub form
775 call hToolbarSelect("FORMDESIGNTOOLS",true)
777 Kontext "FormDesignTools"
781 Kontext "FormularNavigator"
782 Liste.TypeKeys "<HOME>" ' move to the first entry in the formnavigator tree
784 Liste.TypeKeys "<LEFT>" ' collaps the tree
786 Liste.TypeKeys "<RIGHT>" ' expand the tree
788 Liste.TypeKeys "<DOWN>" ' go one down
790 Liste.OpenContextmenu
796 Liste.TypeKeys "<RETURN>"
798 Liste.OpenContextmenu
803 Kontext "FormPropertiesDialog"
804 FormPropertiesTabControl.SetPage TabDataForm
805 Kontext "TabDataForm"
806 '/// set the datasource gDatasourceName
807 printlog "set the datasource gDatasourceName"
808 DataSource.setText(gDSName)
809 TabDataForm.TypeKeys("<RETURN>", true)
811 '/// set the contenttype SQL
812 printlog "set the contenttype to table"
814 TabDataForm.TypeKeys("<RETURN>", true)
816 '/// set the table TT_Forms
817 printlog "set the table TT_Forms"
820 TabDataForm.TypeKeys("<RETURN>", true)
822 '/// open the Form Link dialog set link master field
823 printlog "open the Form Link dialog set link master field"
824 FormLinkDLGButton.click
826 Kontext "FormLinkDialog"
827 '/// select the field id for the master and the link field
828 printlog "select the field id for the master and the link field"
831 '/// close the dialog with OK
832 printlog "close the dialog with OK"
835 Kontext "FormPropertiesDialog"
836 FormPropertiesDialog.Close
839 Kontext "FormularNavigator"
840 FormularNavigator.Close
843 call hToolbarSelect("FormControls",true)
845 Kontext "FormControls"
847 '/// insert a textfield
848 printlog "insert a textfield"
850 call hDrawingWithSelection ( 50, 40, 60, 50 )
853 Kontext "FormControls"
854 ControlProperties.Click
856 Kontext "ControlPropertiesTabControl"
857 ControlPropertiesTabControl.SetPage TabDataControl
858 Kontext "TabDataControl"
859 DataField.setText "id"
860 TabDataControl.TypeKeys("<RETURN>" , true)
862 Kontext "ControlPropertiesDialog"
863 ControlPropertiesDialog.Close
866 Kontext "FormControls"
867 SwitchControlDesignMode.Click
870 hFileSaveAsKill ( gOfficePath + ConvertPath("user/work/TT_SubForm.odt"))
875 '--------------------------------------------------------------------------------------
878 '/// test the folder feature inside the form container
880 '/// open the database <OfficePath>/user/work/TT_hsqldb.odb
881 printlog "open the database " + gOfficePath + "user/work/TT_hsqldb.odb"
882 call fOpenDatabase(gOfficePath + "user/work/TT_hsqldb.odb")
884 '/// display the form container
885 printlog "display the form container"
886 Kontext "ContainerView"
888 if ( Not FormTree.exists(1) ) then
889 warnlog "The form tree doesn't exists"
893 '/// insert a new folder via INSERT/FOLDER menu
894 printlog "insert a new folder via INSERT/FOLDER menu"
900 '/// insert a new folder name
901 printlog "insert a new folder name"
902 Kontext "FormFolderNameDialog"
903 Foldername.setText("Folder1")
904 FormFolderNameDialog.OK
906 '/// close the database and save changes
907 printlog "close the database and save changes"
908 call fCloseDatabase(true)
910 '/// open the database again
911 printlog "open the database again"
912 call fOpenDatabase(gOfficePath + "user/work/TT_hsqldb.odb")
914 '/// check if he folder still exists
915 printlog "check if he folder still exists"
916 if (fFindForm("Folder1")) then
917 printlog "Folder available after save and reload"
919 warnlog "Folder _not_ available after save and reload"
922 '/// close the database again
923 printlog "close the database again"
924 call fCloseDatabase()
927 '--------------------------------------------------------------------------------------
928 testcase tRenameFolder
930 '/// test the folder feature inside the form container
931 '/// test for issue 75723
933 '/// open the database <OfficePath>/user/work/TT_hsqldb.odb
934 printlog "open the database " + gOfficePath + "user/work/TT_hsqldb.odb"
935 call fOpenDatabase(gOfficePath + "user/work/TT_hsqldb.odb")
937 '/// display the form container
938 printlog "display the form container"
939 Kontext "ContainerView"
941 if ( Not FormTree.exists(1) ) then
942 warnlog "The form tree doesn't exists"
946 '/// insert a new folder via INSERT/FOLDER menu
947 printlog "insert a new folder via INSERT/FOLDER menu"
953 '/// insert a new folder name
954 printlog "insert a new folder name"
955 Kontext "FormFolderNameDialog"
956 Foldername.setText("Folder2")
957 FormFolderNameDialog.OK
959 '/// check if he folder still exists
960 printlog "check if he folder still exists"
961 if (fFindForm("Folder2")) then
962 printlog "new folder available"
964 warnlog "new folder not available"
968 '/// insert a new folder under the first folder
969 printlog "insert a new folder under the first folder"
976 '/// insert a new folder name
977 printlog "insert a new folder name"
978 Kontext "FormFolderNameDialog"
979 Foldername.setText("Folder3")
980 FormFolderNameDialog.OK
982 '/// select the first folder
983 printlog "select the first folder"
984 if (fFindForm("Folder2")) then
985 printlog "first folder selected"
987 warnlog "first folder not found"
991 '/// rename the firt folder
992 printlog "rename the firt folder"
998 Kontext "FormFolderNameDialog"
999 FolderReName.setText("Folder4")
1000 FormFolderNameDialog.OK
1002 '/// check if the folder still exists
1003 printlog "check if the folder still exists"
1004 if (fFindForm("Folder3")) then
1005 printlog "folder found"
1007 warnlog "#i75723# folder not found."
1010 '/// close the database and discade changes
1011 printlog "close the database and discade changes"
1012 call fCloseDatabase(false)
1015 '-------------------------------------------------------------------------
1016 testcase tViewAsGridEmbeddedForm
1018 '/// open the database <OfficePath>/user/work/TT_hsqldb.odb
1019 printlog "open the database " + gOfficePath + "user/work/TT_hsqldb.odb"
1020 call fOpenDatabase(gOfficePath + "user/work/TT_hsqldb.odb")
1023 '/// open form Form1
1024 printlog "open form Form1"
1025 call fOpenForm("Form1")
1027 Kontext "DocumentWriter"
1028 DocumentWriter.TypeKeys "<MOD1 F5>" , true
1030 '/// click on the icon view as grid
1031 printlog "click on the icon view as grid"
1036 '/// check if the grid appear
1037 printlog "check if the grid appear"
1039 if CurrentRecord.getText <> "1" then
1040 warnlog "the first record is wrong"
1044 if CurrentRecord.getText <> "2" then
1045 warnlog "the next record button in the table grid doesn't work"
1050 printlog "close the view"
1056 printlog "close the form"
1059 '/// close the database
1060 printlog "close the database"