diff options
author | Vladimir Glazunov <vg@openoffice.org> | 2011-01-28 12:51:43 +0100 |
---|---|---|
committer | Vladimir Glazunov <vg@openoffice.org> | 2011-01-28 12:51:43 +0100 |
commit | 1beec983c969aafe3b265d80ebe7bdac219f865d (patch) | |
tree | 39e412cfce9ef1c0bfd8193e40dbb5b9a8287122 /testautomation | |
parent | 9ca154c806a82dad3c92d8e4363631628e1a5d6e (diff) | |
parent | 022a609786ee7c4d97a43168cb7dd6c3a4a14bb1 (diff) |
CWS-TOOLING: integrate CWS tabcontrol
Diffstat (limited to 'testautomation')
-rw-r--r-- | testautomation/framework/optional/f_basic_gridcontrol.bas | 1 | ||||
-rw-r--r-- | testautomation/framework/optional/includes/basic_gridcontrol.inc | 52 | ||||
-rwxr-xr-x | testautomation/framework/optional/input/gridcontrol.odt | bin | 14075 -> 12252 bytes | |||
-rwxr-xr-x[-rw-r--r--] | testautomation/global/win/dial_d_h.win | 6 |
4 files changed, 58 insertions, 1 deletions
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 Binary files differindex 2f467b3f2852..d1d52c32245f 100755 --- a/testautomation/framework/optional/input/gridcontrol.odt +++ b/testautomation/framework/optional/input/gridcontrol.odt diff --git a/testautomation/global/win/dial_d_h.win b/testautomation/global/win/dial_d_h.win index ba6673edb39d..926c153ae43b 100644..100755 --- 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 |