diff options
author | Joerg Skottke [jsk] <jsk@openoffice.org> | 2010-10-18 12:26:30 +0200 |
---|---|---|
committer | Joerg Skottke [jsk] <jsk@openoffice.org> | 2010-10-18 12:26:30 +0200 |
commit | 03676b306a8fb213a034d00b2841bdfa634c2b3f (patch) | |
tree | a41ab14a18a8ffffae686670bac92b72d2103dfb /testautomation/framework | |
parent | 32c84cea83c8a96b3a84fa9729d03005b8c03ab7 (diff) |
automationdev300m87: #i115106 - Fix f_basic_gridcontrol.bas
Diffstat (limited to 'testautomation/framework')
-rw-r--r--[-rwxr-xr-x] | testautomation/framework/optional/f_basic_gridcontrol.bas | 1 | ||||
-rw-r--r-- | testautomation/framework/optional/includes/basic_gridcontrol.inc | 92 |
2 files changed, 42 insertions, 51 deletions
diff --git a/testautomation/framework/optional/f_basic_gridcontrol.bas b/testautomation/framework/optional/f_basic_gridcontrol.bas index 963482253..dc5f9a392 100755..100644 --- a/testautomation/framework/optional/f_basic_gridcontrol.bas +++ b/testautomation/framework/optional/f_basic_gridcontrol.bas @@ -51,6 +51,7 @@ sub LoadIncludeFiles use "global\system\includes\gvariabl.inc" use "global\tools\includes\optional\t_treelist_tools.inc" + use "global\tools\includes\optional\t_macro_tools.inc" gApplication = "WRITER" call GetUseFiles() diff --git a/testautomation/framework/optional/includes/basic_gridcontrol.inc b/testautomation/framework/optional/includes/basic_gridcontrol.inc index 54bc9a0e1..963c5e8a9 100644 --- a/testautomation/framework/optional/includes/basic_gridcontrol.inc +++ b/testautomation/framework/optional/includes/basic_gridcontrol.inc @@ -33,69 +33,59 @@ testcase tGridcontrolLoad - const MACRO_NAME = "VclTestTool" - const MACRO_NOT_FOUND = 0 + const MACRO_NAME = "Show" const FILE_NAME = "framework/optional/input/gridcontrol.odt" - dim iPos as integer + dim i as integer + dim a as integer printlog( "Open the test document: " & FILE_NAME ) call hFileOpenLocally( gTestToolPath & FILE_NAME ) - printlog( "Open the <Run Macro> dialog" ) - ToolsMacrosRunMacro - - printlog( "Find the document, its library and the test macro, run the macro" ) - Kontext "ScriptSelector" - if ( ScriptSelector.exists( 10 ) ) then + printlog "Start the macro, that performs the test" + hExecMacro( MACRO_NAME ) + + Kontext "GridControlDialog" + if GridControlDialog.exists(5) then + for i=1 to gridcontrolcontrol.getcolumncount + for a=1 to gridcontrolcontrol.getrowcount + printlog " " + i + ":"+a+": '" + gridcontrolcontrol.getitemtype (i,a) + "' '" + gridcontrolcontrol.getitemtext (i,a) + "'" + next a + next i + gridcontrolcontrol.select 5 + + kontext + if active.exists(5) then + printlog active.gettext + active.ok + else + warnlog "No selection Event by .select" + endif - printlog "Start the macro, that performs the test" - Kontext "GridControlDialogStarter" - ' FAILS IF DOCUMENT IS READONLY.... - ShowGridcontrol.typeKeys "<space>" Kontext "GridControlDialog" - if GridControlDialog.exists(5) then - for i=1 to gridcontrolcontrol.getcolumncount - for a=1 to gridcontrolcontrol.getrowcount - printlog " " + i + ":"+a+": '" + gridcontrolcontrol.getitemtype (i,a) + "' '" + gridcontrolcontrol.getitemtext (i,a) + "'" - next a - next i - gridcontrolcontrol.select 5 - - kontext - if active.exists(5) then - printlog active.gettext - active.ok - else - warnlog "No selection Event by .select" - endif - - Kontext "GridControlDialog" - gridcontrolcontrol.typeKeys("<down>") + gridcontrolcontrol.typeKeys("<down>") - kontext - if active.exists(5) then - printlog active.gettext - active.ok - else - warnlog "No selection event by .typeKeys <down>" - endif - Kontext "GridControlDialog" - gridcontrolcontrol.typeKeys("<up>") - kontext - if active.exists(5) then - printlog active.gettext - active.ok - else - warnlog "No selection event by .typeKeys <up>" - endif - - Kontext "GridControlDialog" - GridControlDialog.close + kontext + if active.exists(5) then + printlog active.gettext + active.ok else - warnlog "Gridcontrol Dialog did not come up after pressing button" + warnlog "No selection event by .typeKeys <down>" + endif + Kontext "GridControlDialog" + gridcontrolcontrol.typeKeys("<up>") + kontext + if active.exists(5) then + printlog active.gettext + active.ok + else + warnlog "No selection event by .typeKeys <up>" endif + Kontext "GridControlDialog" + GridControlDialog.close + else + warnlog "Gridcontrol Dialog did not come up after pressing button" endif printlog( "Test exit, cleanup" ) |