From facd3efbf57e411df7c3d2801b705308c328f215 Mon Sep 17 00:00:00 2001 From: Thorsten Bosbach Date: Thu, 20 Jan 2011 15:13:01 +0100 Subject: #i113362# enhance gridcontrol test for tabpages --- .../framework/optional/f_basic_gridcontrol.bas | 1 + .../optional/includes/basic_gridcontrol.inc | 52 ++++++++++++++++++++- .../framework/optional/input/gridcontrol.odt | Bin 14075 -> 12252 bytes testautomation/global/win/dial_d_h.win | 6 +++ 4 files changed, 58 insertions(+), 1 deletion(-) (limited to 'testautomation') diff --git a/testautomation/framework/optional/f_basic_gridcontrol.bas b/testautomation/framework/optional/f_basic_gridcontrol.bas index dc5f9a392988..de92175ab5ec 100644 --- a/testautomation/framework/optional/f_basic_gridcontrol.bas +++ b/testautomation/framework/optional/f_basic_gridcontrol.bas @@ -39,6 +39,7 @@ sub main hSetMacroSecurityAPI( GC_MACRO_SECURITY_LEVEL_LOW ) call tGridcontrolLoad + call tTabcontrolLoad hSetMacroSecurityAPI( GC_MACRO_SECURITY_LEVEL_DEFAULT ) call hStatusOut() diff --git a/testautomation/framework/optional/includes/basic_gridcontrol.inc b/testautomation/framework/optional/includes/basic_gridcontrol.inc index 61d7837df3cb..95bad4d09463 100644 --- a/testautomation/framework/optional/includes/basic_gridcontrol.inc +++ b/testautomation/framework/optional/includes/basic_gridcontrol.inc @@ -32,7 +32,6 @@ '\****************************************************************************** testcase tGridcontrolLoad - const MACRO_NAME = "Show" const FILE_NAME = "framework/optional/input/gridcontrol.odt" @@ -91,7 +90,58 @@ testcase tGridcontrolLoad printlog( "Test exit, cleanup" ) hFileCloseAll() hDeleteFile( gLastWorkFile ) +endcase + + +testcase tTabcontrolLoad + const MACRO_NAME = "ShowTab" + const FILE_NAME = "framework/optional/input/gridcontrol.odt" + + dim i as integer + dim a as integer + printlog( "Open the test document: " & FILE_NAME ) + call hFileOpenLocally( gTestToolPath & FILE_NAME ) + + printlog "Start the macro, that performs the test" + hExecMacro( MACRO_NAME ) + + Kontext "tabcontroldialog" + if tabcontroldialog.exists(5) then + if tabcontainer.getPageCount = 2 then + printlog "There are 2 tabs" + else + warnlog "There are NOT 2 tabs, there are: " + tabcontainer.getpagecount + endif + if tabcontainer.getPage = "tabcontrol_1" then + printlog "Default tab page is page 1" + else + warnlog "Default tab page is NOT page 1" + endif + tabcontainer.setPage tabcontrol_2 + wait 1000 + if tabcontainer.getPage = "tabcontrol_2" then + printlog "Switching to tab 2 works" + else + warnlog "Switching to tab 2 failed" + endif + tabcontainer.setPage tabcontrol_1 + wait 1000 + if tabcontainer.getPage = "tabcontrol_1" then + printlog "Switching to tab 1 works" + else + warnlog "Switching to tab 1 failed" + endif + + Kontext "tabcontroldialog" + tabcontroldialog.close + else + warnlog "tabcontrol Dialog did not come up after pressing button" + endif + + printlog( "Test exit, cleanup" ) + hFileCloseAll() + hDeleteFile( gLastWorkFile ) endcase diff --git a/testautomation/framework/optional/input/gridcontrol.odt b/testautomation/framework/optional/input/gridcontrol.odt index 2f467b3f2852..d1d52c32245f 100755 Binary files a/testautomation/framework/optional/input/gridcontrol.odt and b/testautomation/framework/optional/input/gridcontrol.odt differ diff --git a/testautomation/global/win/dial_d_h.win b/testautomation/global/win/dial_d_h.win index ba6673edb39d..926c153ae43b 100644 --- a/testautomation/global/win/dial_d_h.win +++ b/testautomation/global/win/dial_d_h.win @@ -448,6 +448,12 @@ ShowGridcontrol sym:showGridcontrol *GridControlDialog sym:gridcontroldialog gridcontrolcontrol sym:gridcontrolself +*TabControlDialog sym:tabcontroldialog +tabcontrol_1 sym:tabcontrol_1 +tabcontrol_2 sym:tabcontrol_2 +tabbutton sym:tabbutton +tabcontainer sym:tabcontainer + *GroupingDlg sym:SC_HID_SC_DPDATEGROUP AutoStart sym:sc:RadioButton:RID_SCDLG_DPNUMGROUP:RB_AUTOSTART ManualStart sym:sc:RadioButton:RID_SCDLG_DPNUMGROUP:RB_MANSTART -- cgit