You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@openoffice.apache.org by ar...@apache.org on 2012/01/14 01:57:11 UTC
svn commit: r1231427 [2/5] - in /incubator/ooo/trunk/main/testautomation:
chart2/optional/includes/loadsave/ chart2/required/includes/ chart2/tools/
dbaccess/tools/ framework/optional/includes/ framework/required/includes/
framework/tools/includes/ glo...
Modified: incubator/ooo/trunk/main/testautomation/framework/optional/includes/options_lan1.inc
URL: http://svn.apache.org/viewvc/incubator/ooo/trunk/main/testautomation/framework/optional/includes/options_lan1.inc?rev=1231427&r1=1231426&r2=1231427&view=diff
==============================================================================
--- incubator/ooo/trunk/main/testautomation/framework/optional/includes/options_lan1.inc (original)
+++ incubator/ooo/trunk/main/testautomation/framework/optional/includes/options_lan1.inc Sat Jan 14 00:57:08 2012
@@ -1,6 +1,6 @@
'encoding UTF-8 Do not remove or change this line!
-'*************************************************************************
-'
+'**************************************************************
+'
' Licensed to the Apache Software Foundation (ASF) under one
' or more contributor license agreements. See the NOTICE file
' distributed with this work for additional information
@@ -17,10 +17,36 @@
' KIND, either express or implied. See the License for the
' specific language governing permissions and limitations
' under the License.
-'
-'*************************************************************************
+'
+'**************************************************************
+'*
+'* short description : general option test (test for language-group)
+'*
+'\******************************************************************************
+
+sub opt_lan1
+ Dim bOld as Boolean
+
+ bOld = ActiveDeactivateAsianSupport ( FALSE )
+
+ Call tLanguageSettingsLanguages
+ Call tLanguageSettingsWritingAids
+
+ printlog "++ activate the asian support in StarOffice ++"
+ ActiveDeactivateAsianSupport ( TRUE )
+ Call tLanguageSettingsJapaneseFind
+ Call tLanguageSettingsAsianLayout
+
+ printlog "++ reset asian support in StarOffice to default ++"
+ if bOld = TRUE then
+ ActiveDeactivateAsianSupport ( TRUE )
+ else
+ ActiveDeactivateAsianSupport ( FALSE )
+ end if
+
+end sub
-*****
+'*******************************************************************************
testcase tLanguageSettingsLanguages
Modified: incubator/ooo/trunk/main/testautomation/framework/optional/includes/options_ooo_java.inc
URL: http://svn.apache.org/viewvc/incubator/ooo/trunk/main/testautomation/framework/optional/includes/options_ooo_java.inc?rev=1231427&r1=1231426&r2=1231427&view=diff
==============================================================================
--- incubator/ooo/trunk/main/testautomation/framework/optional/includes/options_ooo_java.inc (original)
+++ incubator/ooo/trunk/main/testautomation/framework/optional/includes/options_ooo_java.inc Sat Jan 14 00:57:08 2012
@@ -1,6 +1,6 @@
'encoding UTF-8 Do not remove or change this line!
-'*************************************************************************
-'
+'**************************************************************
+'
' Licensed to the Apache Software Foundation (ASF) under one
' or more contributor license agreements. See the NOTICE file
' distributed with this work for additional information
@@ -17,10 +17,77 @@
' KIND, either express or implied. See the License for the
' specific language governing permissions and limitations
' under the License.
-'
-'*************************************************************************
+'
+'**************************************************************
+'*
+'* short description : Tools->Options: OpenOffice.org Java
+'*
+'\******************************************************************************
+
+testcase tOOoJava
+ dim bJavaState as boolean
+
+ ToolsOptions
+ hToolsOptions( "StarOffice", "Java" )
+
+ printlog( "Verify that Java is enabled and configured" )
+ if ( usejava.isChecked() = false ) then
+ warnlog( "Java should be enabled by default, checking and restarting" )
+ bJavaState = hChangeJavaState( true )
+ if ( bJavaState = false ) then
+ warnlog( "Java is still not enabled, aborting test." )
+ kontext "OptionenDlg"
+ OptionenDlg.cancel()
+ goto endsub
+ endif
+ else
+ printlog( " Java is enabled. Good." )
+ endif
+
+ ' Needs a delay, it might take some time until the listbox gets populated
+ sleep( 3 )
+
+ ' There should be a java-runtime installed. If not -> leave test
+ printlog( "Make sure at least one Java runtime is installed" )
+ if ( javalist.getitemcount() = 0 ) then
+ warnlog( "No java listed in listbox, the test will stop" )
+ kontext "OptionenDlg"
+ OptionenDlg.cancel()
+ goto endsub
+ else
+ printlog( " Java is installed, good." )
+ endif
+
+ printlog( "Quickly test that all controls are active" )
+ if ( add.isEnabled() ) then
+ printlog( " 'Add...' is enabled" )
+ else
+ warnlog( "The 'Add...' button is disabled" )
+ endif
+
+ if ( parameters.isEnabled() ) then
+ printlog( " 'Parameters...' is enabled" )
+ else
+ warnlog( "The 'Parameters...' button is disabled" )
+ endif
+
+ if ( classpath.isEnabled() ) then
+ printlog( " 'Class Path...' is enabled" )
+ else
+ warnlog( "The 'Class Path...' button is disabled" )
+ endif
+
+ if ( JavaList.isEnabled() ) then
+ printlog( " 'JavaList' is enabled" )
+ else
+ warnlog( "The 'JavaList' button is disabled" )
+ endif
+
+ kontext "OptionenDlg"
+ OptionenDlg.ok
+endcase
-*****
+'*******************************************************************************
function hChangeJavaState( bEnable as boolean ) as boolean
' this little fella switches Java support on and off including a restart of
Modified: incubator/ooo/trunk/main/testautomation/framework/optional/includes/options_ooo_security.inc
URL: http://svn.apache.org/viewvc/incubator/ooo/trunk/main/testautomation/framework/optional/includes/options_ooo_security.inc?rev=1231427&r1=1231426&r2=1231427&view=diff
==============================================================================
--- incubator/ooo/trunk/main/testautomation/framework/optional/includes/options_ooo_security.inc (original)
+++ incubator/ooo/trunk/main/testautomation/framework/optional/includes/options_ooo_security.inc Sat Jan 14 00:57:08 2012
@@ -1,6 +1,6 @@
'encoding UTF-8 Do not remove or change this line!
-'*************************************************************************
-'
+'**************************************************************
+'
' Licensed to the Apache Software Foundation (ASF) under one
' or more contributor license agreements. See the NOTICE file
' distributed with this work for additional information
@@ -17,10 +17,45 @@
' KIND, either express or implied. See the License for the
' specific language governing permissions and limitations
' under the License.
-'
-'*************************************************************************
+'
+'**************************************************************
+'*
+'* short description : Tools->Options: OpenOffice.org Security
+'*
+'\******************************************************************************
+
+testcase tOOoSecurity
+ dim _file as string
+
+ if ( getDocumentCount() < 1 ) then call hNewDocument()
+ _file = gTesttoolPath & "framework\optional\input\options\ooo_security_defaults.ref"
+ checkSecurityPage( _file )
+
+ if ( getDocumentCount() < 1 ) then call hNewDocument()
+ _file = gTesttoolPath & "framework\optional\input\options\ooo_security_changed.ref"
+ changeSecurityPage( _file )
+
+ if ( getDocumentCount() < 1 ) then call hNewDocument()
+ checkSecurityPage( _file )
+
+ if ( getDocumentCount() < 1 ) then call hNewDocument()
+ _file = gTesttoolPath & "framework\optional\input\options\ooo_security_defaults.ref"
+ changeSecurityPage( _file )
+
+ if ( getDocumentCount() < 1 ) then call hNewDocument()
+ checkSecurityPage( _file )
+
+ kontext "ExtrasOptionenDlg"
+ if ( ExtrasOptionenDlg.exists() ) then
+ ExtrasOptionenDlg.ok()
+ else
+ warnlog( "options dialog not available"
+ endif
+ if ( getDocumentCount() > 0 ) then call hCloseDocument()
+
+endcase
-*****
+'*******************************************************************************
sub checkSecurityPage( _file as string )
_file = convertpath( _file )
Modified: incubator/ooo/trunk/main/testautomation/framework/optional/includes/options_ooo_view.inc
URL: http://svn.apache.org/viewvc/incubator/ooo/trunk/main/testautomation/framework/optional/includes/options_ooo_view.inc?rev=1231427&r1=1231426&r2=1231427&view=diff
==============================================================================
--- incubator/ooo/trunk/main/testautomation/framework/optional/includes/options_ooo_view.inc (original)
+++ incubator/ooo/trunk/main/testautomation/framework/optional/includes/options_ooo_view.inc Sat Jan 14 00:57:08 2012
@@ -1,6 +1,6 @@
'encoding UTF-8 Do not remove or change this line!
-'*************************************************************************
-'
+'**************************************************************
+'
' Licensed to the Apache Software Foundation (ASF) under one
' or more contributor license agreements. See the NOTICE file
' distributed with this work for additional information
@@ -17,10 +17,40 @@
' KIND, either express or implied. See the License for the
' specific language governing permissions and limitations
' under the License.
-'
-'*************************************************************************
+'
+'**************************************************************
+'*
+'* short description : Tools->Options: OpenOffice.org View
+'*
+'\******************************************************************************
+
+testcase tOOoView
+
+
+ dim sFile as string
+
+ printlog "Check if the defaults are correct"
+ sFile = gTesttoolPath + "framework\optional\input\options\ooo_view_defaults.ref"
+ call checkPage( sFile , false )
-*****
+ printlog "Change all settings to something different to the default"
+ sFile = gTesttoolPath + "framework\optional\input\options\ooo_view_changed.ref"
+ call changePage( sFile , true, 1 )
+
+ printlog "Verify that all changes persist after a restart"
+ sFile = gTesttoolPath + "framework\optional\input\options\ooo_view_changed.ref"
+ call checkPage( sFile , true, 1 )
+
+ printlog "Re-apply the defaults to all controls and restart the application"
+ sFile = gTesttoolPath + "framework\optional\input\options\ooo_view_defaults.ref"
+ call changePage( sFile , false )
+
+ printlog "Verify that all settings have indeed been reset to defaults"
+ call checkPage( sFile , false )
+
+endcase
+
+'*******************************************************************************
sub checkPage( sFile as string , bDisabled as boolean, optional iMiddleMouseButtonControl as integer)
dim iMiddleMouseButton as integer
Modified: incubator/ooo/trunk/main/testautomation/framework/optional/includes/security_macrosecurity.inc
URL: http://svn.apache.org/viewvc/incubator/ooo/trunk/main/testautomation/framework/optional/includes/security_macrosecurity.inc?rev=1231427&r1=1231426&r2=1231427&view=diff
==============================================================================
--- incubator/ooo/trunk/main/testautomation/framework/optional/includes/security_macrosecurity.inc (original)
+++ incubator/ooo/trunk/main/testautomation/framework/optional/includes/security_macrosecurity.inc Sat Jan 14 00:57:08 2012
@@ -1,6 +1,6 @@
'encoding UTF-8 Do not remove or change this line!
-'*************************************************************************
-'
+'**************************************************************
+'
' Licensed to the Apache Software Foundation (ASF) under one
' or more contributor license agreements. See the NOTICE file
' distributed with this work for additional information
@@ -17,10 +17,29 @@
' KIND, either express or implied. See the License for the
' specific language governing permissions and limitations
' under the License.
-'
-'*************************************************************************
+'
+'**************************************************************
+'*
+'* short description : Macros with all security-levels
+'*
+'\******************************************************************************
+
+sub tMacroSecurityLevelsControlModule
+
+ dim iApplication as integer
+
+ for iApplication = 1 to 6
-*****
+ printlog( "" )
+ printlog( hNumericDocType( iApplication ) )
+ call tMacroSecurityLevels( "current" )
+ call tMacroSecurityLevels( "645" )
+
+ next iApplication
+
+end sub
+
+'*******************************************************************************
testcase tMacroSecurityLevels( cFileFormat )
Modified: incubator/ooo/trunk/main/testautomation/framework/required/includes/first.inc
URL: http://svn.apache.org/viewvc/incubator/ooo/trunk/main/testautomation/framework/required/includes/first.inc?rev=1231427&r1=1231426&r2=1231427&view=diff
==============================================================================
--- incubator/ooo/trunk/main/testautomation/framework/required/includes/first.inc (original)
+++ incubator/ooo/trunk/main/testautomation/framework/required/includes/first.inc Sat Jan 14 00:57:08 2012
@@ -1,6 +1,6 @@
'encoding UTF-8 Do not remove or change this line!
-'*************************************************************************
-'
+'**************************************************************
+'
' Licensed to the Apache Software Foundation (ASF) under one
' or more contributor license agreements. See the NOTICE file
' distributed with this work for additional information
@@ -17,10 +17,157 @@
' KIND, either express or implied. See the License for the
' specific language governing permissions and limitations
' under the License.
-'
-'*************************************************************************
+'
+'**************************************************************
+'*
+'* short description : First test of basic functionality
+'*
+'\******************************************************************************
+
+testcase tAllNew
+
+ printlog( "Open all available document types" )
+
+ Dim lsList (20) as string
+
+ if ( gUseSysDlg ) then
+ warnlog("Only check, if the documents will be opened; no " & _
+ "check for the defaultfilter (system file-dialog)!")
+ end if
+
+ printlog ""
+ try
+ gApplication = "WRITER"
+ printlog " - " & gApplication
+
+ hNewDocument()
+
+ Kontext "DocumentWriter"
+ DocumentWriter.TypeKeys "This is a Writer-document!"
+ if gUseSysDlg = FALSE then
+ if fDocumentCheck (gWriterFilter) = FALSE then
+ warnlog("The filter name (saving) is not correct! " & _
+ "Please check if a Writer document will be opened!")
+ end if
+ end if
+ hCloseDocument()
+ catch
+ Exceptlog
+ ResetApplication
+ endcatch
+
+ try
+ gApplication = "CALC"
+ printlog " - " & gApplication
+
+ hNewDocument
+ Kontext "DocumentCalc"
+ DocumentCalc.TypeKeys "This is a Calc-document!"
+
+ if gUseSysDlg = FALSE then
+ if fDocumentCheck (gCalcFilter) = FALSE then
+ warnlog("The filter name (saving) is not correct! " & _
+ "Please check if a Calc document will be opened!")
+ end if
+ end if
+ hCloseDocument
+ catch
+ Exceptlog
+ ResetApplication
+ endcatch
+
+ try
+ gApplication = "IMPRESS"
+ printlog " - " & gApplication
+
+ hNewDocument()
+ sleep(3)
+ InsertDuplicateSlide
+ sleep(2)
+ if gUseSysDlg = FALSE then
+ if fDocumentCheck (gImpressFilter) = FALSE then
+ warnlog("The filter name (saving) is not correct! " & _
+ "Please check if an Impress document will be opened!")
+ end if
+ end if
+ hCloseDocument()
+ catch
+ Exceptlog
+ ResetApplication
+ endcatch
+
+ try
+ gApplication = "DRAW"
+ printlog " - " & gApplication
+ hNewDocument()
+ InsertSlide
+ if gUseSysDlg = FALSE then
+ if fDocumentCheck (gDrawFilter) = FALSE then
+ warnlog("The filter name (saving) is not correct! Please check if a Draw document will be opened!")
+ end if
+ end if
+ hCloseDocument()
+ catch
+ Exceptlog
+ ResetApplication
+ endcatch
+ try
+ gApplication = "HTML"
+ printlog " - " & gApplication
+ hNewDocument()
+ Kontext "DocumentWriter"
+ DocumentWriter.TypeKeys "This is a HTML-Document!"
+ if gUseSysDlg = FALSE then
+ if (fDocumentCheck (gHTMLFilter) = FALSE) then
+ warnlog("The filter name (saving) is not correct! Please check if a HTML document will be opened! -> #i30867")
+ end if
+ end if
+ hCloseDocument()
+ catch
+ Exceptlog
+ ResetApplication
+ endcatch
+
+ try
+ gApplication = "MATH"
+ printlog " - " & gApplication
+ hNewDocument()
+ Call SchreibenInMathDok("a over b")
+ if gUseSysDlg = FALSE then
+ if fDocumentCheck (gMathFilter) = FALSE then
+ warnlog("The filter name (saving) is not correct! Please check if a Math document will be opened!")
+ end if
+ end if
+ hCloseDocument
+ catch
+ Exceptlog
+ ResetApplication
+ endcatch
+
+
+ try
+ gApplication = "MASTERDOCUMENT"
+ printlog " - " & gApplication
+ hNewDocument()
+ Kontext "DocumentWriter"
+ DocumentWriter.TypeKeys "This is a master document!"
+ if gUseSysDlg = FALSE then
+ if fDocumentCheck (gMasterDocFilter) = FALSE then
+ warnlog("The filter name (saving) is not correct! Please check if a Master document will be opened!")
+ end if
+ end if
+ Kontext "Navigator"
+ if Navigator.Exists(5) then
+ Navigator.Close
+ end if
+ hCloseDocument()
+ catch
+ Exceptlog
+ ResetApplication
+ endcatch
+endcase
-*****
+'*******************************************************************************
testcase tJava
Modified: incubator/ooo/trunk/main/testautomation/framework/required/includes/help_browser.inc
URL: http://svn.apache.org/viewvc/incubator/ooo/trunk/main/testautomation/framework/required/includes/help_browser.inc?rev=1231427&r1=1231426&r2=1231427&view=diff
==============================================================================
--- incubator/ooo/trunk/main/testautomation/framework/required/includes/help_browser.inc (original)
+++ incubator/ooo/trunk/main/testautomation/framework/required/includes/help_browser.inc Sat Jan 14 00:57:08 2012
@@ -1,6 +1,6 @@
'encoding UTF-8 Do not remove or change this line!
-'*************************************************************************
-'
+'**************************************************************
+'
' Licensed to the Apache Software Foundation (ASF) under one
' or more contributor license agreements. See the NOTICE file
' distributed with this work for additional information
@@ -17,10 +17,54 @@
' KIND, either express or implied. See the License for the
' specific language governing permissions and limitations
' under the License.
-'
-'*************************************************************************
+'
+'**************************************************************
+'*
+'* short description : global update/resource test
+'*
+'\******************************************************************************
+
+testcase tHelp_DialogTest
+
+ printlog( "Resource test for the Help Browser" )
+
+ dim brc as boolean
+
+ brc = hOpenHelp()
+ if ( not brc ) then
+ warnlog( "Help not open, aborting test" )
+ kontext "Active"
+ if ( Active.exists( 2 ) ) then
+ printlog( "Msgbox: " & Active.getText() )
+ Active.ok()
+ endif
+ goto endsub
+ endif
+
+ hSelectHelpTab( "content" )
+ hSelectHelpTab( "index" )
+ hSelectHelpTab( "find" )
+ hSelectHelpTab( "bookmarks" )
+
+
+ brc = hSelectHelpTab( "content" )
+ call DialogTest( ContentPage )
+
+ brc = hSelectHelpTab( "index" )
+ call DialogTest( IndexPage )
+
+ brc = hSelectHelpTab( "find" )
+ call DialogTest( FindPage )
+
+ brc = hSelectHelpTab( "bookmarks" )
+ call DialogTest( BookmarksPage )
+
+ Kontext "StarOfficeHelp"
+ hCloseHelp()
-*****
+endcase
+
+'*******************************************************************************
testcase tHelp_ToolBar
Modified: incubator/ooo/trunk/main/testautomation/framework/required/includes/printer_administration.inc
URL: http://svn.apache.org/viewvc/incubator/ooo/trunk/main/testautomation/framework/required/includes/printer_administration.inc?rev=1231427&r1=1231426&r2=1231427&view=diff
==============================================================================
--- incubator/ooo/trunk/main/testautomation/framework/required/includes/printer_administration.inc (original)
+++ incubator/ooo/trunk/main/testautomation/framework/required/includes/printer_administration.inc Sat Jan 14 00:57:08 2012
@@ -1,6 +1,6 @@
'encoding UTF-8 Do not remove or change this line!
-'*************************************************************************
-'
+'**************************************************************
+'
' Licensed to the Apache Software Foundation (ASF) under one
' or more contributor license agreements. See the NOTICE file
' distributed with this work for additional information
@@ -17,10 +17,104 @@
' KIND, either express or implied. See the License for the
' specific language governing permissions and limitations
' under the License.
-'
-'*************************************************************************
+'
+'**************************************************************
+'*
+'* short description : updatetest for the printer configuration
+'*
+'\******************************************************************************
+
+testcase t_updt_spadmin
+
+ printlog( "Resource test for SPAdmin (Printer administration tool) for Unix(like) OS" )
+
+ if ( gtSysName = "eComStation" ) then
+ printlog( "No SpAdmin for eComStation" )
+ goto endsub
+ endif
+
+ if ( lcase(gPlatform) = "osx") then
+ printlog( "No SPAdmin on MacOS X" )
+ goto endsub
+ endif
+
+ if ( gPlatGroup = "w95" ) then
+ printlog( "No SPAdmin on Windows" )
+ goto endsub
+ endif
+
+ const CPRINTER = "tt-testprinter"
+ dim irc as integer
+ dim brc as boolean
+
+ hShutdownOffice()
+
+ brc = hOpenSpAdmin()
+ if ( brc ) then
+
+ brc = hWaitForSpAdmin()
+ if ( not brc ) then
+ warnlog( "SpAdmin is not open, the test cannot continue" )
+ goto endsub
+ endif
+
+ irc = hDelPrinter( CPRINTER )
+ select case irc
+ case 0 : printlog( "Maybe printer was left over by prior run?" )
+ case 3 : printlog( "OK, printer does not exist" )
+ end select
+
+ brc = hWaitForSpAdmin()
+ if ( not brc ) then
+ warnlog( "SpAdmin is not open, the test cannot continue" )
+ goto endsub
+ endif
+
+ call TestNewPrinter( CPRINTER )
+
+ ' wait for the spadmin to open, on failure we end the test
+ brc = hWaitForSpAdmin()
+ if ( not brc ) then
+ warnlog( "SpAdmin is not open, the test cannot continue" )
+ goto endsub
+ endif
+
+ call TestProperties( CPRINTER )
+
+ ' wait for the spadmin to open, on failure we end the test
+ brc = hWaitForSpAdmin()
+ if ( not brc ) then
+ warnlog( "SpAdmin is not open, the test cannot continue" )
+ goto endsub
+ endif
+
+ call TestRename( CPRINTER )
+
+ ' wait for the spadmin to open, on failure we end the test
+ brc = hWaitForSpAdmin()
+ if ( not brc ) then
+ warnlog( "SpAdmin is not open, the test cannot continue" )
+ goto endsub
+ endif
+
+ ' wait for the spadmin to open, on failure we end the test
+ brc = hWaitForSpAdmin()
+ if ( not brc ) then
+ warnlog( "SpAdmin is not open, the test cannot continue" )
+ goto endsub
+ endif
+
+
+ irc = hDelPrinter( CPRINTER )
+ if ( irc <> 0 ) then
+ warnlog( "We created a Fax printer but it could not be deleted" )
+ endif
+
+ endif
+
+endcase
-*****
+'*******************************************************************************
sub TestNewPrinter( cPrinter as string )
Modified: incubator/ooo/trunk/main/testautomation/framework/required/includes/script_organizers.inc
URL: http://svn.apache.org/viewvc/incubator/ooo/trunk/main/testautomation/framework/required/includes/script_organizers.inc?rev=1231427&r1=1231426&r2=1231427&view=diff
==============================================================================
--- incubator/ooo/trunk/main/testautomation/framework/required/includes/script_organizers.inc (original)
+++ incubator/ooo/trunk/main/testautomation/framework/required/includes/script_organizers.inc Sat Jan 14 00:57:08 2012
@@ -1,6 +1,6 @@
'encoding UTF-8 Do not remove or change this line!
-'*************************************************************************
-'
+'**************************************************************
+'
' Licensed to the Apache Software Foundation (ASF) under one
' or more contributor license agreements. See the NOTICE file
' distributed with this work for additional information
@@ -17,10 +17,141 @@
' KIND, either express or implied. See the License for the
' specific language governing permissions and limitations
' under the License.
-'
-'*************************************************************************
+'
+'**************************************************************
+'*
+'* short description : Verify names of macros and scripts
+'*
+'\******************************************************************************
+
+testcase tUpdtScripts
+
+ printlog( "Resource test for macros and scripts / related dialogs" )
+
+ if ( gIsoLang <> "en-US" ) then
+ printlog( "No testing for languages other than en_US" )
+ goto endsub
+ endif
+
+ const SCRIPTING_DIALOGS = 5
+
+ const DLG_JAVASCRIPT = "JavaScript"
+ const DLG_BEANSHELL = "BeanShell"
+ const DLG_PYTHON = "Python"
+ const DLG_BASIC_ORG = "BasicOrganizer"
+ const DLG_RUN_MACRO = "RunMacro"
+
+ ' This is the build specific part of the filename including substrings for
+ ' the productname and language.
+ dim sProductString as string : sProductString = gProductName & "_" & gISOLang & "_"
+
+ ' define platforms that have different scriptcount
+ if ( lcase( gPlatGroup ) = "w95" ) then sProductString = sProductString & "win_"
+ if ( lcase( gPlatform ) = "osx" ) then sProductString = sProductString & "osx_"
+
+ ' replace all blanks
+ sProductString = hStringReplaceChar( sProductString, " ", "-" )
+
+ ' This is where reference file is located, the filename is yet incomplete
+ dim sInputPath as string
+ sInputPath = gTesttoolPath & "framework/required/input/scripts/" & sProductString
+
+ ' This is where we store the reference file if differences are found.
+ dim sOutputPath as string
+ sOutputPath = gOfficePath & "user/work/" & sProductString
+
+ ' These contain the input and output paths (fully qualified)
+ dim sFileIn as string
+ dim sFileOut as string
+
+ ' Array that contains the scriptnames for all organizers
+ dim cScriptNamesList( 1000 ) as string
+
+ dim sDialog as string
+ dim iCurrentDialog as integer
+
+ dim iDiffCount as integer
+ dim max_diffcount as integer
+
+ hInitSingleDoc()
+
+ for iCurrentDialog = 1 to SCRIPTING_DIALOGS
+
+ ListAllDelete( cScriptNamesList() )
+
+ ' Build complete filename and identify dialog for logging and case selection
+ select case ( iCurrentDialog )
+ case 1 : sDialog = DLG_JAVASCRIPT
+ case 2 : sDialog = DLG_BEANSHELL
+ case 3 : sDialog = DLG_PYTHON
+ case 4 : sDialog = DLG_BASIC_ORG
+ case 5 : sDialog = DLG_RUN_MACRO
+ end select
+
+ printlog( "" )
+ sFileIn = convertpath( sInputPath & sDialog & ".txt" )
+ sFileOut = convertpath( sOutputPath & sDialog & ".txt" )
+
+ printlog( "Open <" & sDialog & "> and access the treelist object" )
+
+ ' Note: hGetAllNodeNames() is a *global* function defined in t_treelist_tools.inc
+ ' DLG_BASIC_ORG and DLG_RUN_MACRO have - in addition to the treelist -
+ ' a separate script list. To get those scripts a little more effort is
+ ' required which is done in the *local* function hGetScriptNames()
+
+ select case ( sDialog )
+ case DLG_JAVASCRIPT: ToolsMacrosOrganizeMacrosJavaScript
+ kontext "ScriptOrganizer"
+ hGetAllNodeNames( ScriptTreeList, cScriptNamesList() )
+ max_diffcount = 0
+ case DLG_BEANSHELL: ToolsMacrosOrganizeMacrosBeanShell
+ kontext "ScriptOrganizer"
+ hGetAllNodeNames( ScriptTreeList, cScriptNamesList() )
+ max_diffcount = 0
+ case DLG_PYTHON: ToolsMacrosOrganizeMacrosPython
+ kontext "ScriptOrganizer"
+ hGetAllNodeNames( ScriptTreeList, cScriptNamesList() )
+ max_diffcount = 0
+ case DLG_BASIC_ORG: ToolsMacro_uno
+ Kontext "Makro"
+ hGetScriptNames( MakroAus, MakroListe, cScriptNamesList() )
+ max_diffcount = 6
+ case DLG_RUN_MACRO: ToolsMacrosRunMacro
+ kontext "ScriptSelector"
+ hGetScriptNames( LibraryTreeList, ScriptList, cScriptNamesList() )
+ max_diffcount = 6
+ end select
+
+ printlog( "Compare to reference list, create new one if differences were found" )
+ iDiffCount = abs( hManageComparisionList( sFileIn, sFileOut, cScriptNamesList() ) )
+
+ ' Usually we should have 0 differences in the list. However, as we do not have
+ ' a unique way of installing the office (Root-Installation, archives and
+ ' others) we need a little tolerance here. If a number of bundled extensions
+ ' are installed, we have more scripts.
+ if ( iDiffCount > max_diffcount ) then warnlog( "The number of scripts has changed, please review." )
+
+ printlog( "Close <" & sDialog & ">" )
+ select case ( sDialog )
+ case DLG_JAVASCRIPT :
+ ScriptOrganizer.cancel()
+ case DLG_BEANSHELL :
+ ScriptOrganizer.cancel()
+ case DLG_PYTHON :
+ ScriptOrganizer.cancel()
+ case DLG_BASIC_ORG :
+ Makro.close()
+ case DLG_RUN_MACRO :
+ ScriptSelector.cancel()
+ end select
+
+ next iCurrentDialog
+
+ hCloseDocument()
+
+endcase
-*****
+'*******************************************************************************
sub hGetScriptNames( oTreeList as object, oScriptList as object, cItemList() as string )
Modified: incubator/ooo/trunk/main/testautomation/framework/required/includes/tools_customize.inc
URL: http://svn.apache.org/viewvc/incubator/ooo/trunk/main/testautomation/framework/required/includes/tools_customize.inc?rev=1231427&r1=1231426&r2=1231427&view=diff
==============================================================================
--- incubator/ooo/trunk/main/testautomation/framework/required/includes/tools_customize.inc (original)
+++ incubator/ooo/trunk/main/testautomation/framework/required/includes/tools_customize.inc Sat Jan 14 00:57:08 2012
@@ -1,6 +1,6 @@
'encoding UTF-8 Do not remove or change this line!
-'*************************************************************************
-'
+'**************************************************************
+'
' Licensed to the Apache Software Foundation (ASF) under one
' or more contributor license agreements. See the NOTICE file
' distributed with this work for additional information
@@ -17,10 +17,35 @@
' KIND, either express or implied. See the License for the
' specific language governing permissions and limitations
' under the License.
-'
-'*************************************************************************
+'
+'**************************************************************
+'*
+'* short description : Update Test for the Tools Customize Dialog
+'*
+'\******************************************************************************
+
+testcase tUpdtCustomize( cApp as string )
+
+ printlog( "Tools/Customize dialog" )
+
+ if ( hCreateDocument() ) then
+ if ( hToolsCustomizeOpen() ) then
+ hUpdtToolsCustomizeKeyboard()
+ hUpdtToolsCustomizeMenu()
+ hUpdtToolsCustomizeToolbars()
+ hUpdtToolsCustomizeEvents()
+ hCloseDialog( TabCustomizeEvents, "cancel" )
+ else
+ warnlog( "Tools/Customize dialog did not open" )
+ endif
+ hDestroyDocument
+ else
+ warnlog( "Failed to create initial document" )
+ endif
+
+endcase
-*****
+'*******************************************************************************
function hUpdtToolsCustomizeMenu()
Modified: incubator/ooo/trunk/main/testautomation/framework/required/includes/topten.inc
URL: http://svn.apache.org/viewvc/incubator/ooo/trunk/main/testautomation/framework/required/includes/topten.inc?rev=1231427&r1=1231426&r2=1231427&view=diff
==============================================================================
--- incubator/ooo/trunk/main/testautomation/framework/required/includes/topten.inc (original)
+++ incubator/ooo/trunk/main/testautomation/framework/required/includes/topten.inc Sat Jan 14 00:57:08 2012
@@ -1,6 +1,6 @@
'encoding UTF-8 Do not remove or change this line!
-'*************************************************************************
-'
+'**************************************************************
+'
' Licensed to the Apache Software Foundation (ASF) under one
' or more contributor license agreements. See the NOTICE file
' distributed with this work for additional information
@@ -17,10 +17,42 @@
' KIND, either express or implied. See the License for the
' specific language governing permissions and limitations
' under the License.
-'
-'*************************************************************************
+'
+'**************************************************************
+'*
+'* short description : Smoke test (load/save/clipboard)
+'*
+'\***********************************************************************
+
+sub topten
+
+ ' we need the binary filters (.sxw etc.) for this test but beginning with
+ ' OOo 3.3 these are optional
+ if ( hCheckForBinfilters() ) then
+ gApplication = "WRITER"
+ call Top_ten_test
+
+ gApplication = "CALC"
+ call Top_ten_test
+
+ gApplication = "IMPRESS"
+ call Top_ten_test
+
+ gApplication = "DRAW"
+ call Top_ten_test
-*****
+ gApplication = "MATH"
+ call Top_ten_test
+
+ gApplication = "HTML"
+ call Top_ten_test
+
+ gApplication = "MASTERDOCUMENT"
+ call Top_ten_test
+ endif
+end sub
+
+'*******************************************************************************
testcase Top_ten_test
Modified: incubator/ooo/trunk/main/testautomation/framework/required/includes/window_functions.inc
URL: http://svn.apache.org/viewvc/incubator/ooo/trunk/main/testautomation/framework/required/includes/window_functions.inc?rev=1231427&r1=1231426&r2=1231427&view=diff
==============================================================================
--- incubator/ooo/trunk/main/testautomation/framework/required/includes/window_functions.inc (original)
+++ incubator/ooo/trunk/main/testautomation/framework/required/includes/window_functions.inc Sat Jan 14 00:57:08 2012
@@ -1,6 +1,6 @@
'encoding UTF-8 Do not remove or change this line!
-'*************************************************************************
-'
+'**************************************************************
+'
' Licensed to the Apache Software Foundation (ASF) under one
' or more contributor license agreements. See the NOTICE file
' distributed with this work for additional information
@@ -17,10 +17,121 @@
' KIND, either express or implied. See the License for the
' specific language governing permissions and limitations
' under the License.
-'
-'*************************************************************************
+'
+'**************************************************************
+'*
+'* short description : Window/Titlebar functionality
+'*
+'\******************************************************************************
+
+testcase tWindowFunctions
+
+ printlog( "Update test for window functions" )
+
+ printlog( "Create initial document" )
+ gApplication = "WRITER"
+ hInitSingleDoc()
+ hInitWriteDocIdentifier( "F_updt_windowfuncs.bas" )
+
+ printlog( "New document" )
+ hNewDocument()
+ if ( getDocumentCount <> 2 ) then
+ warnlog( "Two open documents were expected, found " & getDocumentCount )
+ endif
+
+ kontext "DocumentWriter"
+ printlog( "Close document" )
+ DocumentWriter.close()
+
+ if ( getDocumentCount <> 1 ) then
+ warnlog( "One open document was expected, found " & getDocumentCount )
+ endif
+
+ printlog( "New document" )
+ hNewDocument()
+ if ( getDocumentCount <> 2) then
+ warnlog( "Two open documents were expected, found " & getDocumentCount )
+ endif
+
+ printlog( "Enter some text into the second writer document" )
+ kontext "DocumentWriter"
+ DocumentWriter.TypeKeys( "test" )
+ DocumentWriter.close()
+
+ kontext "active"
+ if ( Active.exists() ) then
+ printlog( "Close messagebox with Cancel (leaves the document open)" )
+ Active.Cancel()
+ else
+ warnlog( "No warning that data will be lost on close of this document" )
+ endif
+
+ kontext "DocumentWriter"
+ if ( getDocumentCount = 2 ) then
+ printlog( "Two documents open. Good." )
+ else
+ warnlog( "Incorrect document count. Expected two, found " & getDocumentCount )
+ endif
-*****
+ kontext "DocumentWriter"
+ printlog( "Close the document" )
+ FileClose()
+
+ kontext "Active"
+ if ( Active.exists() ) then
+ printlog( "Do not save the document" )
+ Active.No()
+ else
+ warnlog( "Warning: No data loss warning" )
+ endif
+
+ kontext "DocumentWriter"
+ if ( getDocumentCount = 1 ) then
+ printlog( "One document open. Good." )
+ else
+ warnlog( "Incorrect document count. Expected one, found " & getDocumentCount )
+ endif
+
+ Kontext "DocumentWriter"
+ printlog( "Minimize window" )
+ DocumentWriter.Minimize()
+ Wait( 2000 )
+
+ kontext "DocumentWriter"
+ if ( DocumentWriter.IsMin() ) then
+ printlog( "Window is minimized" )
+ else
+ warnlog( "Window not minimized" )
+ endif
+
+ kontext "DocumentWriter"
+ printlog( "Restore window" )
+ DocumentWriter.Restore()
+ Wait( 2000 )
+
+ if ( DocumentWriter.IsRestore() ) then
+ printlog( "Window is Restored" )
+ else
+ warnlog( " * Window not Restored" )
+ endif
+
+ kontext "DocumentWriter"
+ printlog( "Maximize window" )
+ DocumentWriter.Maximize()
+ Wait( 2000 )
+
+ kontext "DocumentWriter"
+ if ( DocumentWriter.IsMax() ) then
+ printlog( "Window is maximized" )
+ else
+ warnlog( " * Window not maximized" )
+ endif
+
+ hDestroyDocument()
+
+endcase
+
+'*******************************************************************************
sub sAllWindowTitle
Modified: incubator/ooo/trunk/main/testautomation/framework/required/includes/wizard_mailmerge.inc
URL: http://svn.apache.org/viewvc/incubator/ooo/trunk/main/testautomation/framework/required/includes/wizard_mailmerge.inc?rev=1231427&r1=1231426&r2=1231427&view=diff
==============================================================================
--- incubator/ooo/trunk/main/testautomation/framework/required/includes/wizard_mailmerge.inc (original)
+++ incubator/ooo/trunk/main/testautomation/framework/required/includes/wizard_mailmerge.inc Sat Jan 14 00:57:08 2012
@@ -1,6 +1,6 @@
'encoding UTF-8 Do not remove or change this line!
-'*************************************************************************
-'
+'**************************************************************
+'
' Licensed to the Apache Software Foundation (ASF) under one
' or more contributor license agreements. See the NOTICE file
' distributed with this work for additional information
@@ -17,10 +17,180 @@
' KIND, either express or implied. See the License for the
' specific language governing permissions and limitations
' under the License.
-'
-'*************************************************************************
+'
+'**************************************************************
+'*
+'* short description : Update test for the mailmerge wizard
+'*
+'\******************************************************************************
+
+private CSV_DATABASE as string
+
+testcase tUpdtWizardMailMerge
+
+ printlog( "Resource test for the mailmerge wizard" )
+
+ dim brc as boolean
+ dim irc as integer
+
+ qaerrorlog( "#i54524# - MM-Wizard modifies datasource -> CVS merge conflict" )
+
+ CSV_DATABASE = hGetWorkPath() & "myDatabase"
+ hDeleteFile( CSV_DATABASE )
+ hRemoveDatabaseConnections()
+
+
+ hInitSingleDoc()
+
+ printlog( "Open the Mailmerge-Wizard" )
+ ToolsMailMergeWizard
+
+ Kontext "MailMergeWizard"
+ brc = hUpdtMMWpage1()
+ if ( not brc ) then
+ warnlog( "MailMergeWizard is not visible, aborting test" )
+ goto endsub
+ endif
+
+ Kontext "MailMergeWizard"
+ hClickButton( NextButton )
+ hUpdtMMWPage2()
+
+ Kontext "MailMergeWizard"
+ hClickButton( NextButton )
+ hUpdtMMWpage3()
+
+ Kontext "MailMergeWizard"
+ hClickButton( NextButton )
+ hUpdtMMWPage4()
+
+ Kontext "MailMergeWizard"
+ hClickButton( NextButton )
+ hUpdtMMWPage5()
+
+ Kontext "MailMergeWizard"
+ hClickButton( NextButton )
+ hUpdtMMWPage6()
+
+ Kontext "MailMergeWizard"
+ hClickButton( NextButton )
+ hUpdtMMWPage7()
+
+ Kontext "MailMergeWizard"
+ hClickNextButton()
+ hUpdtMMWPage8()
+
+ printlog( "close the wizard" )
+ Kontext "MailMergeWizard"
+ hCloseDialog( MailMergeWizard, "cancel" )
+
+ hRemoveDatabaseConnections()
+ hCloseDocument()
+ hCloseDocument()
+
+
+endcase
+
+'**********************************************************************
+
+function hUpdtMMWpage1() as boolean
+
+
+
+ const CFN = "hUpdtMMWpage1::"
+
+ Kontext "TabMailMergeSourceDocument"
+ if ( not TabMailMergeSourceDocument.exists() ) then
+ warnlog( CFN & "Page 1 could not be accessed" )
+ hUpdtMMWPage1() = false
+ exit function
+ endif
+
+ Kontext "TabMailMergeSourceDocument"
+ if ( BrowseDocument.exists( 1 ) ) then
+ if ( BrowseDocument.isEnabled ) then
+ BrowseDocument.click()
+
+ Kontext "OeffnenDlg"
+ if ( OeffnenDlg.exists( 1 ) ) then
+ printlog( CFN & "BrowseDocument::File Open Dialog" )
+ call dialogtest( OeffnenDlg )
+ OeffnenDlg.cancel()
+ else
+ warnlog( CFN & "BrowseDocument::FileOpen not open" )
+ endif
+ else
+ warnlog( CFN & "BrowseDocument::Button is disabled" )
+ endif
+ else
+ warnlog( CFN & "BrowseDocument::Button does not exist" )
+ endif
+
+ Kontext "TabMailMergeSourceDocument"
+ if ( BrowseTemplate.exists( 2 ) ) then
+ if ( BrowseTemplate.isEnabled ) then
+ BrowseTemplate.click()
+
+ Kontext "Neu"
+ if ( Neu.exists( 1 ) ) then
+ printlog( CFN & "BrowseTemplate::New Dialog" )
+ call dialogtest( Neu )
+ Neu.cancel()
+ else
+ warnlog( CFN & "BrowseTemplate::FileOpen not open" )
+ endif
+ else
+ warnlog( CFN & "BrowseTemplate::Button is disabled" )
+ endif
+ else
+ warnlog( CFN & "BrowseTemplate::Button does not exist" )
+ endif
+
+ kontext "TabMailMergeSourceDocument"
+ if ( CreateANewDocument.exists( 2 ) ) then
+ if ( CreateANewDocument.isEnabled ) then
+ printlog( CFN & "Check Create new Document" )
+ CreateANewDocument.check()
+ else
+ warnlog( CFN & "CheckBbox is disabled" )
+ endif
+ else
+ warnlog( CFN & "CheckBox does not exist" )
+ endif
-*****
+ hUpdtMMWPage1() = true
+
+end function
+
+'**********************************************************************
+
+function hUpdtMMWpage2()
+
+
+ const CFN = "hUpdtMMWpage2::"
+
+ Kontext "TabMailMergeDocumentType"
+ if ( not TabMailMergeDocumentType.exists( 2 ) ) then
+ warnlog( CFN & "Page 2 could not be accessed" )
+ exit function
+ endif
+
+ call dialogtest( TabMailMergeDocumentType )
+
+ printlog( CFN & "Select to create a letter" )
+ if ( Letter.exists() ) then
+ if ( Letter.isEnabled() ) then
+ Letter.check()
+ else
+ warnlog( CFN & "Cannot check Letter-Checkbox" )
+ endif
+ else
+ warnlog( CFN & "Letter Checkbox does not exist" )
+ endif
+
+end function
+
+'*******************************************************************************
function hUpdtMMWpage3()
Modified: incubator/ooo/trunk/main/testautomation/framework/tools/includes/CJK_tools.inc
URL: http://svn.apache.org/viewvc/incubator/ooo/trunk/main/testautomation/framework/tools/includes/CJK_tools.inc?rev=1231427&r1=1231426&r2=1231427&view=diff
==============================================================================
--- incubator/ooo/trunk/main/testautomation/framework/tools/includes/CJK_tools.inc (original)
+++ incubator/ooo/trunk/main/testautomation/framework/tools/includes/CJK_tools.inc Sat Jan 14 00:57:08 2012
@@ -1,6 +1,6 @@
'encoding UTF-8 Do not remove or change this line!
-'*************************************************************************
-'
+'**************************************************************
+'
' Licensed to the Apache Software Foundation (ASF) under one
' or more contributor license agreements. See the NOTICE file
' distributed with this work for additional information
@@ -17,10 +17,40 @@
' KIND, either express or implied. See the License for the
' specific language governing permissions and limitations
' under the License.
-'
-'*************************************************************************
+'
+'**************************************************************
+'*
+'* short description : Tools for CJK feature test in Writer
+'*
+'\***********************************************************************
+
+function CheckAsianLanguageSupport( sSupport as String ) as String
-****'
+ ToolsOptions
+ Call hToolsOptions("LANGUAGESETTINGS","LANGUAGES")
+
+ if ( aktivieren.exists() ) then
+ if ( aktivieren.isEnabled() ) then
+ if ( lcase( sSupport ) = "on" ) then
+ printlog( "Enabling Asian Language Support" )
+ Aktivieren.Check
+ else
+ printlog( "Disabling Asian Language Support" )
+ Aktivieren.uncheck()
+ endif
+ else
+ warnlog( "Activate Asian Language Support checkbox is disabled" )
+ endif
+ else
+ warnlog( "Activate Asian Language Support checkbox is missing" )
+ endif
+
+ Kontext "ExtrasOptionenDlg"
+ ExtrasOptionenDlg.OK()
+
+end function
+
+'******************************************************************************'
function fStartupNavigator(navigatorItem as String , subItemNum as Integer)
Dim j as Integer
Modified: incubator/ooo/trunk/main/testautomation/framework/tools/includes/customize_tools.inc
URL: http://svn.apache.org/viewvc/incubator/ooo/trunk/main/testautomation/framework/tools/includes/customize_tools.inc?rev=1231427&r1=1231426&r2=1231427&view=diff
==============================================================================
--- incubator/ooo/trunk/main/testautomation/framework/tools/includes/customize_tools.inc (original)
+++ incubator/ooo/trunk/main/testautomation/framework/tools/includes/customize_tools.inc Sat Jan 14 00:57:08 2012
@@ -1,6 +1,6 @@
'encoding UTF-8 Do not remove or change this line!
-'*************************************************************************
-'
+'**************************************************************
+'
' Licensed to the Apache Software Foundation (ASF) under one
' or more contributor license agreements. See the NOTICE file
' distributed with this work for additional information
@@ -17,10 +17,22 @@
' KIND, either express or implied. See the License for the
' specific language governing permissions and limitations
' under the License.
-'
-'*************************************************************************
+'
+'**************************************************************
+'*
+'* short description : Tools to ease the use of the ToolsCustomize-Dialog
+'*
+'\******************************************************************************
+
+function hToolsCustomizeOpen() as boolean
+
+ printlog( "Open Tools/Customize dialog" )
+ ToolsCustomize
+ hToolsCustomizeOpen() = hToolsCustomizeSelectTab( "Events" )
+
+end function
-*****
+'*******************************************************************************
function hToolsCustomizeSelectTab( cTab as string ) as boolean
Modified: incubator/ooo/trunk/main/testautomation/framework/tools/includes/fileoperations.inc
URL: http://svn.apache.org/viewvc/incubator/ooo/trunk/main/testautomation/framework/tools/includes/fileoperations.inc?rev=1231427&r1=1231426&r2=1231427&view=diff
==============================================================================
--- incubator/ooo/trunk/main/testautomation/framework/tools/includes/fileoperations.inc (original)
+++ incubator/ooo/trunk/main/testautomation/framework/tools/includes/fileoperations.inc Sat Jan 14 00:57:08 2012
@@ -1,6 +1,6 @@
'encoding UTF-8 Do not remove or change this line!
-'*************************************************************************
-'
+'**************************************************************
+'
' Licensed to the Apache Software Foundation (ASF) under one
' or more contributor license agreements. See the NOTICE file
' distributed with this work for additional information
@@ -17,10 +17,113 @@
' KIND, either express or implied. See the License for the
' specific language governing permissions and limitations
' under the License.
-'
-'*************************************************************************
+'
+'**************************************************************
+'*
+'* short description : check the internal file dialog ( extended tests )
+'*
+'\******************************************************************************
+
+function hSaveLoadDelSuccess( cFile as string ) as integer
-*****
+ '///<h3>Successfully save, close, load, close and delete a file</h3>
+ '///<i>Uses</i>: framework\tools\t_stringtools.inc<br><br>
+ '///<u>Input</u>:
+ '///<ol>
+ '///+<li>Filename incl. extension (string)</li>
+ '///</ol>
+ '///<u>Returns</u>:
+ '///<ol>
+ '///+<li>Errorcode (integer)</li>
+ '///<ul>
+ '///+<li>0 = all ok</li>
+ '///+<li>1 = Saving failed</li>
+ '///+<li>2 = Closing the file failed</li>
+ '///+<li>3 = Reloading failed</li>
+ '///+<li>4 = Closing the file failed</li>
+ '///+<li>5 = Deleting failed</li>
+ '///+<li>-1 = Post operation error</li>
+ '///</ul>
+ '///</ol>
+ '///<u>Description</u>:
+ '///<ul>
+
+ dim brc as boolean
+ dim cFileExt as string : cFileExt = cFile & hGetSuffix( "current" )
+
+ const CFN = "hSaveLoadDelSuccess::"
+
+ printlog( "" )
+ printlog( CFN & "Enter with option: " & cFile & "/" & cFileExt )
+
+ '///+<li>Close the navigator if it exists</li>
+ kontext "Navigator"
+ hCloseDialog( Navigator, "close,optional" )
+
+ '///+<li>Save the current file, overwriting existing</li>
+ brc = hSaveFileExpectSuccess( cFile , TRUE ) ' save and overwrite
+ if ( brc ) then
+
+ '///+<li>Close the file</li>
+ brc = hDestroyDocument()
+ if ( brc ) then
+
+ '///+<li>Reload the file</li>
+ brc = hLoadFileExpectSuccess( cFileExt )
+ if ( brc ) then
+
+ '///+<li>Close the document</li>
+ brc = hDestroyDocument()
+ if ( brc ) then
+
+ '///+<li>Delete the file via FileOpen</li>
+ brc = hDeleteFileViaFileOpen( cFileExt )
+ if ( brc ) then
+ printlog( CFN & "Save, close, load, close, delete ok" )
+ hSaveLoadDelSuccess() = 0
+ else
+ warnlog( CFN & "Failed to delete file" )
+ hSaveLoadDelSuccess() = 5
+ endif
+
+ else
+ warnlog( CFN & "Failed to close file" )
+ hSaveLoadDelSuccess() = 4
+ endif
+
+ else
+ warnlog( CFN & "Failed to load file" )
+ hSaveLoadDelSuccess() = 3
+ endif
+
+
+ else
+ warnlog( CFN & "Closing file failed" )
+ hSaveLoadDelSuccess() = 2
+ endif
+
+ else
+ warnlog( CFN & "Saving failed" )
+ hSaveLoadDelSuccess() = 1
+ endif
+
+ '///+<li>Close possible Messagebox (#i33946#)</li>
+ kontext "active"
+ if ( active.exists( 1 ) ) then
+ printlog( CFN & "Unexpected message: " & active.getText() )
+ qaerrorlog( "#i33946# - message when deleting last document in folder" )
+ active.ok()
+ hSaveLoadDelSuccess() = 6
+ endif
+
+ '///+<li>Close document</li>
+ brc = hDestroyDocument()
+
+ '///</ul>
+
+end function
+
+'*******************************************************************************
function hLoadFileExpectSuccess( fpath as string ) as boolean
Modified: incubator/ooo/trunk/main/testautomation/framework/tools/includes/formcontrols.inc
URL: http://svn.apache.org/viewvc/incubator/ooo/trunk/main/testautomation/framework/tools/includes/formcontrols.inc?rev=1231427&r1=1231426&r2=1231427&view=diff
==============================================================================
--- incubator/ooo/trunk/main/testautomation/framework/tools/includes/formcontrols.inc (original)
+++ incubator/ooo/trunk/main/testautomation/framework/tools/includes/formcontrols.inc Sat Jan 14 00:57:08 2012
@@ -1,6 +1,6 @@
'encoding UTF-8 Do not remove or change this line!
-'*************************************************************************
-'
+'**************************************************************
+'
' Licensed to the Apache Software Foundation (ASF) under one
' or more contributor license agreements. See the NOTICE file
' distributed with this work for additional information
@@ -17,10 +17,16 @@
' KIND, either express or implied. See the License for the
' specific language governing permissions and limitations
' under the License.
-'
-'*************************************************************************
+'
+'**************************************************************
+' **
+' ** short description : Tools to draw and select form controls in basic-ide
+' **
+'\******************************************************************************
-*****
+private const ICONTROLCOUNT = 22
+
+'*******************************************************************************
function hGetControlParams( cParam as string ) as integer
Modified: incubator/ooo/trunk/main/testautomation/framework/tools/includes/help_tools.inc
URL: http://svn.apache.org/viewvc/incubator/ooo/trunk/main/testautomation/framework/tools/includes/help_tools.inc?rev=1231427&r1=1231426&r2=1231427&view=diff
==============================================================================
--- incubator/ooo/trunk/main/testautomation/framework/tools/includes/help_tools.inc (original)
+++ incubator/ooo/trunk/main/testautomation/framework/tools/includes/help_tools.inc Sat Jan 14 00:57:08 2012
@@ -1,6 +1,6 @@
'encoding UTF-8 Do not remove or change this line!
-'*************************************************************************
-'
+'**************************************************************
+'
' Licensed to the Apache Software Foundation (ASF) under one
' or more contributor license agreements. See the NOTICE file
' distributed with this work for additional information
@@ -17,10 +17,31 @@
' KIND, either express or implied. See the License for the
' specific language governing permissions and limitations
' under the License.
-'
-'*************************************************************************
+'
+'**************************************************************
+'*
+'* short description : Replacements for routines in t_lists.inc adds some
+'*
+'\******************************************************************************
+
+function hOpenHelp() as boolean
+
+ printlog( "Open Help Browser" )
-*****
+ HelpContents
+
+ kontext "StarOfficeHelp"
+ if ( StarOfficeHelp.exists( 5 ) ) then
+ hOpenHelp() = TRUE
+ else
+ warnlog( "Unable to open help browser" )
+ hOpenHelp() = FALSE
+ endif
+
+
+end function
+
+'*******************************************************************************
function hCloseHelp() as boolean
Modified: incubator/ooo/trunk/main/testautomation/framework/tools/includes/options_tools.inc
URL: http://svn.apache.org/viewvc/incubator/ooo/trunk/main/testautomation/framework/tools/includes/options_tools.inc?rev=1231427&r1=1231426&r2=1231427&view=diff
==============================================================================
--- incubator/ooo/trunk/main/testautomation/framework/tools/includes/options_tools.inc (original)
+++ incubator/ooo/trunk/main/testautomation/framework/tools/includes/options_tools.inc Sat Jan 14 00:57:08 2012
@@ -1,6 +1,6 @@
'encoding UTF-8 Do not remove or change this line!
-'*************************************************************************
-'
+'**************************************************************
+'
' Licensed to the Apache Software Foundation (ASF) under one
' or more contributor license agreements. See the NOTICE file
' distributed with this work for additional information
@@ -17,10 +17,61 @@
' KIND, either express or implied. See the License for the
' specific language governing permissions and limitations
' under the License.
-'
-'*************************************************************************
+'
+'**************************************************************
+'*
+'* short description : tools for options tests
+'*
+'\******************************************************************************
+
+sub GetPathList ( ls1 () as String, ls2 () as String, ls3 () as String )
-*****
+ Dim lsInterim ( 50 ) as String
+ Dim i as Integer
+ Dim sList as String
+ Dim bNewCreate as Boolean
+ '///routine to get the correct comparison list for path-options
+ '///+ if the list does not exist => CreatePathList
+ '///+ you can find the lists for all languages in separate files
+ '///+[TesttoolPath]\framework\options\input\paths_[LanguageCode].txt
+ ls1 (0) = 0 : ls2 (0) = 0 : ls3 (0) = 0
+ sList = gTesttoolPath + "framework\optional\input\options\paths_" + iSprache + ".txt"
+ sList = convertpath( sList )
+
+ if App.Dir ( sList ) = "" then
+ bNewCreate = TRUE
+ CreatePathList
+ else
+ bNewCreate = FALSE
+ end if
+
+ if bAsianLan = TRUE then
+
+ select case iSystemSprache
+ case 01, 33, 34, 39, 46, 49
+ ListRead ( lsInterim (), sList, "utf8" )
+ case else
+
+ if bNewCreate = FALSE then
+ CreatePathList
+ endif
+
+ ListRead ( lsInterim (), sList, "utf8" )
+ end select
+
+ else
+ ListRead ( lsInterim (), sList , "utf8" )
+ end if
+
+ for i = 1 to ListCount ( lsInterim () )
+ ListAppend ( ls1 (), Left ( lsInterim (i), Instr ( lsInterim (i), ";" ) - 1 ) )
+ ListAppend ( ls2 (), Mid ( lsInterim (i), Len ( lsInterim (i) ) - 2, 1 ) )
+ ListAppend ( ls3 (), Right ( lsInterim (i), 1 ) )
+ next i
+
+end sub
+
+'*******************************************************************************
sub CreatePathList
Modified: incubator/ooo/trunk/main/testautomation/framework/tools/includes/pbrowser_tools.inc
URL: http://svn.apache.org/viewvc/incubator/ooo/trunk/main/testautomation/framework/tools/includes/pbrowser_tools.inc?rev=1231427&r1=1231426&r2=1231427&view=diff
==============================================================================
--- incubator/ooo/trunk/main/testautomation/framework/tools/includes/pbrowser_tools.inc (original)
+++ incubator/ooo/trunk/main/testautomation/framework/tools/includes/pbrowser_tools.inc Sat Jan 14 00:57:08 2012
@@ -1,6 +1,6 @@
'encoding UTF-8 Do not remove or change this line!
-'*************************************************************************
-'
+'**************************************************************
+'
' Licensed to the Apache Software Foundation (ASF) under one
' or more contributor license agreements. See the NOTICE file
' distributed with this work for additional information
@@ -17,10 +17,42 @@
' KIND, either express or implied. See the License for the
' specific language governing permissions and limitations
' under the License.
-'
-'*************************************************************************
+'
+'**************************************************************
+'*
+'* short description : Tools for working with the property browser for formcontrols
+'*
+'\******************************************************************************
+
+function hOpenPropertyBrowser() as boolean
+
+ '///<h3>Open the BASIC property browser</h3>
+
+ const CFN = "framework::tools::includes::pbrowser_tools.inc::hOpenPropertyBrowser(): "
-*****
+ kontext "ControlPropertiesTabControl"
+ if ( ControlPropertiesTabControl.exists() ) then
+ printlog( "Property Browser is already open, no action taken" )
+ hOpenPropertyBrowser() = true
+ else
+ if ( hUseAsyncSlot( "ContextProperties" ) <> -1 ) then
+ kontext "ControlPropertiesTabControl"
+ if ( ControlPropertiesTabControl.exists( 2 ) ) then
+ ControlPropertiesTabControl.setPage( TabGeneralControl )
+ hOpenPropertyBrowser() = true
+ else
+ warnlog( CFN & "Dialog <ControlPropertiesTabControl> is not available" )
+ hOpenPropertyBrowser() = false
+ endif
+ else
+ warnlog( CFN & "Could not execute <ContextProperties> slot" )
+ hOpenPropertyBrowser() = false
+ endif
+ endif
+
+end function
+
+'*******************************************************************************
function hClosePropertyBrowser() as boolean
Modified: incubator/ooo/trunk/main/testautomation/framework/tools/includes/private_environment.inc
URL: http://svn.apache.org/viewvc/incubator/ooo/trunk/main/testautomation/framework/tools/includes/private_environment.inc?rev=1231427&r1=1231426&r2=1231427&view=diff
==============================================================================
--- incubator/ooo/trunk/main/testautomation/framework/tools/includes/private_environment.inc (original)
+++ incubator/ooo/trunk/main/testautomation/framework/tools/includes/private_environment.inc Sat Jan 14 00:57:08 2012
@@ -1,6 +1,6 @@
'encoding UTF-8 Do not remove or change this line!
-'*************************************************************************
-'
+'**************************************************************
+'
' Licensed to the Apache Software Foundation (ASF) under one
' or more contributor license agreements. See the NOTICE file
' distributed with this work for additional information
@@ -17,10 +17,82 @@
' KIND, either express or implied. See the License for the
' specific language governing permissions and limitations
' under the License.
-'
-'*************************************************************************
+'
+'**************************************************************
+'*
+'* short description : Tools to ease working with private environment
+'*
+'\******************************************************************************
+
+function hGetPrivateHttpServer( _proxy as string, _port as string ) as boolean
+
+
+ '///<h3>Retrieve the name and port for a private http server</h3><br>
+
+ '///<u>Function parameters:</u><br>
+ '///<ol>
+
+ '///+<li>Fully qualified server name incl. domain (string)</li>
+ '///<ul>
+ '///+<li>The string comes without a protocol part (no http://)</li>
+ '///</ul>
+
+ '///+<li>Server port (string)</li>
+ '///<ul>
+ '///+<li>Please remember limits for integer data type</li>
+ '///</ul>
+
+ '///</ol>
+
+
+ '///<u>Returns:</u><br>
+
+ '///<ol>
+ '///+<li>Error condition (boolean)</li>
+ '///<ul>
+ '///+<li>"TRUE": Data was retrieved successfully</li>
+ '///+<li>"FALSE": Any error </li>
+ '///</ul>
+ '///</ol>
+
+ use "global\tools\includes\optional\t_key_tools.inc"
-*****
+ const CFN = "hGetPrivateHttpServer::"
+ dim cFile as string
+ dim cDataSet( 100 ) as string
+ dim iErr as integer
+
+ '///<u>Description:</u>
+ '///<ul>
+ '///+<li>Get the source file</li>
+ cFile = hGetPrivateInputFile( false )
+ printlog( CFN & "Using input file: " & cFile )
+
+ '///+<li>Retrieve the information from the datafile</li>
+ iErr = hGetDataFileSection( cFile, cDataSet(), "http_proxy", "", "" )
+ if ( iErr = 0 ) then
+ hGetPrivateHttpServer() = false
+ exit function
+ endif
+
+ '///+<li>Extract the proxy name</li>
+ _proxy = hGetValueForKeyAsString( cDataSet(), "name" )
+
+ '///+<li>Append the domain</li>
+ _proxy = _proxy & hGetValueForKeyAsString( cDataSet(), "domain" )
+
+ '///+<li>Get the port</li>
+ _port = hGetValueForKeyAsString( cDataSet() , "port" )
+
+ '///+<li>Print a log</li>
+ printlog( CFN & _proxy & ":" & _port )
+ '///</ul>
+
+ hGetPrivateHttpServer() = true
+
+end function
+
+'*******************************************************************************
function hGetPrivateFtpServer( _proxy as string, _port as string ) as boolean
Modified: incubator/ooo/trunk/main/testautomation/framework/tools/includes/scriptorganizer_tools.inc
URL: http://svn.apache.org/viewvc/incubator/ooo/trunk/main/testautomation/framework/tools/includes/scriptorganizer_tools.inc?rev=1231427&r1=1231426&r2=1231427&view=diff
==============================================================================
--- incubator/ooo/trunk/main/testautomation/framework/tools/includes/scriptorganizer_tools.inc (original)
+++ incubator/ooo/trunk/main/testautomation/framework/tools/includes/scriptorganizer_tools.inc Sat Jan 14 00:57:08 2012
@@ -1,6 +1,6 @@
'encoding UTF-8 Do not remove or change this line!
-'*************************************************************************
-'
+'**************************************************************
+'
' Licensed to the Apache Software Foundation (ASF) under one
' or more contributor license agreements. See the NOTICE file
' distributed with this work for additional information
@@ -17,10 +17,71 @@
' KIND, either express or implied. See the License for the
' specific language governing permissions and limitations
' under the License.
-'
-'*************************************************************************
+'
+'**************************************************************
+'*
+'* short description : Test scripting-organizers / document-attached scripts
+'*
+'\******************************************************************************
+
+function hCreateScriptingObject( cName as string ) as boolean
+
+ '///<h3>Create a new scripting object for the current module</h3>
+ '///<i>Starting point: Script organizer is open, module selected</i><br>
+ '///<u>Input</u>:
+ '///<ol>
+ '///+<li>Name of the module (string)</li>
+ '///<ul>
+ '///+<li>Any name the organizer can accept</li>
+ '///</ul>
+ '///</ol>
+ '///<u>Returns</u>:
+ '///<ol>
+ '///+<li>Errorcondition</li>
+ '///<ul>
+ '///+<li>TRUE on success</li>
+ '///+<li>FALSE on failure or invalid user input</li>
+ '///</ul>
+ '///</ol>
+ '///<u>Description</u>:
+ '///<ul>
+
+
+ const CFN = "hNewScriptingObject::"
+
+ '///+<li>Verify that the "Create..." button is enabled</li>
+ if ( PBCreate.isEnabled() ) then
+
+ '///+<li>Click "Create..." to open the naming dialog</li>
+ hClickButton( PBCreate )
+
+ '///+<li>Name the new script</li>
+ Kontext "ScriptNameDlg"
+ if ( ScriptNameDlg.exists( 2 ) ) then
+
+ EFObjectName.setText( cName )
+ ScriptNameDlg.OK()
+ hCreateScriptingObject() = true
+
+ endif
-*****
+ else
+ printlog( CFN & "Button is disabled" )
+ hCreateScriptingObject() = false
+ endif
+
+ '///+<li>Verify that we are back on the script organizer</li>
+ kontext "ScriptOrganizer"
+ if ( not ScriptOrganizer.exists( 2 ) ) then
+ warnlog( CFN & "Could not return to ScriptOrganizer" )
+ hCreateScriptingObject() = false
+ endif
+
+ '///</ul>
+
+end function
+
+'*******************************************************************************
function hRenameScriptingObject( cName as string ) as boolean
Modified: incubator/ooo/trunk/main/testautomation/framework/tools/includes/spadmin_tools.inc
URL: http://svn.apache.org/viewvc/incubator/ooo/trunk/main/testautomation/framework/tools/includes/spadmin_tools.inc?rev=1231427&r1=1231426&r2=1231427&view=diff
==============================================================================
--- incubator/ooo/trunk/main/testautomation/framework/tools/includes/spadmin_tools.inc (original)
+++ incubator/ooo/trunk/main/testautomation/framework/tools/includes/spadmin_tools.inc Sat Jan 14 00:57:08 2012
@@ -1,6 +1,6 @@
'encoding UTF-8 Do not remove or change this line!
-'*************************************************************************
-'
+'**************************************************************
+'
' Licensed to the Apache Software Foundation (ASF) under one
' or more contributor license agreements. See the NOTICE file
' distributed with this work for additional information
@@ -17,10 +17,65 @@
' KIND, either express or implied. See the License for the
' specific language governing permissions and limitations
' under the License.
-'
-'*************************************************************************
+'
+'**************************************************************
+'*
+'* short description : helper functions for SPAdmin
+'*
+'\******************************************************************************
+
+function hGetPrinterPosition( cName as string, bWarn as boolean ) as integer
+
+ '///<h3>Find a printer queue in the SpAdmin list</h3>
+ ' IN:
+ ' cName = Name of the queue to look for
+ ' bWarn = if TRUE we warn if the queue does not exist
+
+ const CFN = "hGetPrinterPosition::"
+
+ if ( cName = "" ) then
+ warnlog( CFN & "Invalid Parameter passed to function: Empty String" )
+ hGetPrinterPosition() = -1
+ exit function
+ endif
+
+ dim iCurrentQueue as integer
+ dim bFound as boolean
+ dim iPrinterCount as integer
+ iPrintercount = LBPrinters.getItemCount()
-*****
+ Kontext "SpAdmin"
+ bFound = false
+
+ for iCurrentQueue = 1 to iPrinterCount
+
+ wait( 200 )
+
+ LBPrinters.select( iCurrentQueue )
+ if ( LBPrinters.getseltext() = cName ) then
+ bFound = true
+ exit for
+ endif
+
+ next iCurrentQueue
+
+ ' warn if queue was not found and we requested a warning
+ if ( not bFound and bWarn ) then
+ iCurrentQueue = 0
+ printlog( CFN & "The specified printer queue could not be found" )
+ endif
+
+ ' print a message that the printer queue exists
+ if ( bFound ) then
+ printlog( CFN & "Printer Queue was found at pos " & iCurrentQueue )
+ endif
+
+ Kontext "SpAdmin"
+ hGetPrinterPosition() = iCurrentQueue
+
+end function
+
+'*******************************************************************************
function hDelPrinter( cPrinterName as string ) as integer
Modified: incubator/ooo/trunk/main/testautomation/framework/tools/includes/template_tools.inc
URL: http://svn.apache.org/viewvc/incubator/ooo/trunk/main/testautomation/framework/tools/includes/template_tools.inc?rev=1231427&r1=1231426&r2=1231427&view=diff
==============================================================================
--- incubator/ooo/trunk/main/testautomation/framework/tools/includes/template_tools.inc (original)
+++ incubator/ooo/trunk/main/testautomation/framework/tools/includes/template_tools.inc Sat Jan 14 00:57:08 2012
@@ -1,6 +1,6 @@
'encoding UTF-8 Do not remove or change this line!
-'*************************************************************************
-'
+'**************************************************************
+'
' Licensed to the Apache Software Foundation (ASF) under one
' or more contributor license agreements. See the NOTICE file
' distributed with this work for additional information
@@ -17,10 +17,108 @@
' KIND, either express or implied. See the License for the
' specific language governing permissions and limitations
' under the License.
-'
-'*************************************************************************
+'
+'**************************************************************
+'*
+'* short description : Helper functions to ease usage of templates
+'*
+'\******************************************************************************
+
+function hFindTemplate( sTemplateName as string ) as integer
+
+ '///<H3>Find a template by name in FileNewFromTemplate</H3>
+ '///<i>Starting point: Templates and Documents dialog</i><br>
+ '///<u>Input</u>:
+ '///<ol>
+ '///+<li> Name of the template to search for (string)</li>
+ '///</ol>
+ '///<u>Returns</u>:
+ '///<ol>
+ '///+<li> Index of the Template in the containing folder (integer)</li>
+ '///<ul>
+ '///+<li>1 ... n : Index of the template (Position in folder)</li>
+ '///+<li>0 : No template found by given name</li>
+ '///</ul>
+ '///</ol>
+ '///<u>Description</u>:
+ '///<ul>
+ const CFN = "hFindTemplate::"
+
+ dim brc as boolean
+ brc = false
+ dim irc as integer
+ irc = 0
+
+ dim iObjectFolder as integer
+ dim iObjectFolders as integer
+
+ dim iItemCount as integer
+ dim iCurrentItem as integer
+ dim cCurrentItem as string
+
+ '///+<li>select the templates from the category list</li>
+ hSelectCategory( "TEMPLATES" )
+
+ '///+<li>run through every item in the list to find the template.</li>
+ ' NOTE: If the name of the template is not unique, the function will find
+ ' the first occurrence
+ ' NOTE: As we do not know the name of "My Templates" (it is localized) we
+ ' need to search all folders..
+ iObjectFolders = FileList.getItemCount()
-*****
+ '///<ul>
+ for iObjectFolder = 1 to iObjectFolders
+
+ '///+<li>Select the (next) folder</li>
+ hSelectFileFolder( iObjectFolder , true )
+
+ '///+<li>Retrieve the number of items within the folder</li>
+ iItemCount = FileList.getItemCount()
+
+ '///+<li>For each item in the folder do:</li>
+ '///<ul>
+ for iCurrentItem = 1 to iItemCount
+
+ '///+<li>Select the (next) item</li>
+ FileList.select( iCurrentItem )
+
+ '///+<li>Get the name of the item</li>
+ cCurrentItem = FileList.getSelText()
+
+ '///+<li>If this is the item we are searching for, exit</li>
+ if ( cCurrentItem = sTemplateName ) then
+ irc = iCurrentItem : if ( irc = 0 ) then irc = 1 ' strange hack
+ brc = true
+ exit for
+ endif
+
+ next iCurrentItem
+ '///</ul>
+
+ '///+<li>Exit the outer loop</li>
+ if ( brc ) then
+ exit for
+ endif
+
+ '///+<li>Click "Up one level"</li>
+ UpOneLevel.click()
+
+ next iObjectFolder
+ '///</ul>
+
+ if ( brc ) then
+ printlog( CFN & "Template found: " & cCurrentItem )
+ else
+ printlog( CFN & "Template could not be found." )
+ endif
+
+ '///+<li>Return the index of the requested template</li>
+ hFindTemplate() = irc
+ '///</ul>
+
+end function
+
+'*******************************************************************************
function hSelectCategory( cCategory as string ) as boolean
Modified: incubator/ooo/trunk/main/testautomation/framework/tools/includes/toolbar_tools.inc
URL: http://svn.apache.org/viewvc/incubator/ooo/trunk/main/testautomation/framework/tools/includes/toolbar_tools.inc?rev=1231427&r1=1231426&r2=1231427&view=diff
==============================================================================
--- incubator/ooo/trunk/main/testautomation/framework/tools/includes/toolbar_tools.inc (original)
+++ incubator/ooo/trunk/main/testautomation/framework/tools/includes/toolbar_tools.inc Sat Jan 14 00:57:08 2012
@@ -1,6 +1,6 @@
'encoding UTF-8 Do not remove or change this line!
-'*************************************************************************
-'
+'**************************************************************
+'
' Licensed to the Apache Software Foundation (ASF) under one
' or more contributor license agreements. See the NOTICE file
' distributed with this work for additional information
@@ -17,10 +17,67 @@
' KIND, either express or implied. See the License for the
' specific language governing permissions and limitations
' under the License.
-'
-'*************************************************************************
+'
+'**************************************************************
+'*
+'* short description : global update test (Standardbar)
+'*
+'\***************************************************************************
+
+function hAccessStandardBar() as boolean
+
+ '///<h3>Verify that the Standard Bar exists</h3>
+ '///<i>This function works for all gApplications</i><br>
+ '///<u>Input</u>:
+ '///<ol>
+ '///+<li>Nothing</li>
+ '///</ol>
+ '///<u>Returns</u>:
+ '///<ol>
+ '///+<li>Errorcondition (boolean)</li>
+ '///<ul>
+ '///+<li>TRUE if StandardBar exists</li>
+ '///+<li>FALSE if standardBar does not exist</li>
+ '///</ul>
+ '///</ol>
+ '///<u>Description</u>:
+ '///<ul>
+ const CFN = "hAccessStandardBar::"
+ dim brc as boolean
+
+ printlog( CFN & "Enter" )
+
+ '///+<li>Open a new document</li>
+ hCreateDocument()
+
+ '///+<li>Try to access the standardbar (query .exists())</li>
+ kontext "StandardBar"
+ if ( StandardBar.exists() ) then
+ if ( standardbar.isVisible() ) then
+ printlog( CFN & "StandardBar is visible. Good." )
+ brc = true
+ else
+ warnlog( "The StandardBar is not visible in " & gApplication )
+ brc = false
+ endif
+ else
+ warnlog( "The StandardBar does not exist in " & gApplication )
+ brc = false
+ endif
-*****
+ '///+<li>Close the navigator</li>
+ kontext "Navigator"
+ hCloseDialog( Navigator, "close,optional" )
+
+ '///+<li>Close the document</li>
+ hDestroyDocument()
+ hAccessStandardBar() = brc
+ printlog( CFN & "Exit" )
+ '///</ul>
+
+end function
+
+'*******************************************************************************
function hResetStandardBar() as boolean
Modified: incubator/ooo/trunk/main/testautomation/framework/tools/includes/wizards.inc
URL: http://svn.apache.org/viewvc/incubator/ooo/trunk/main/testautomation/framework/tools/includes/wizards.inc?rev=1231427&r1=1231426&r2=1231427&view=diff
==============================================================================
--- incubator/ooo/trunk/main/testautomation/framework/tools/includes/wizards.inc (original)
+++ incubator/ooo/trunk/main/testautomation/framework/tools/includes/wizards.inc Sat Jan 14 00:57:08 2012
@@ -1,6 +1,6 @@
'encoding UTF-8 Do not remove or change this line!
-'*************************************************************************
-'
+'**************************************************************
+'
' Licensed to the Apache Software Foundation (ASF) under one
' or more contributor license agreements. See the NOTICE file
' distributed with this work for additional information
@@ -17,10 +17,101 @@
' KIND, either express or implied. See the License for the
' specific language governing permissions and limitations
' under the License.
-'
-'*************************************************************************
+'
+'**************************************************************
+'*
+'* short description : helper functions for the wizards
+'*
+'\******************************************************************************
+
+function hWaitForWizard() as integer
+
+ const CFN = "hWaitForWizard::"
+ const MAXTRIES = 10
+
+ '///<h3>Wait for any wizard to open</h3>
+ '///<i>Uses: framework/tools/input/menuentries.txt</i><br>
+ '///<i>NOTE: Not all wizards are known to this function yet.</i><br>
+ '///<u>Input</u>:
+ '///<ol>
+ '///+<li>Nothing</li>
+ '///</ol>
+ '///<u>Returns</u>:
+ '///<ol>
+ '///+<li>Unique ID of the open wizard</li>
+ '///<ul>
+ '///+<li>0: In case of any error</li>
+ '///+<li>1-n: The unique ID of the currently open wizard (integer)</li>
+ '///+</ul>
+ '///</ol>
+ '///<u>Description</u>:
+ '///<ul>
+
+ dim iOpen as integer
+ dim iWait as integer
-*****
+ '///+<li>Determine the open wizard by trying wizard.exists()</li>
+ for iWait = 1 to MAXTRIES
+
+ iOpen = 0
+
+ kontext "AutopilotLetter"
+ if ( AutopilotLetter.exists() ) then
+ printlog( CFN & "Autopilot Letter is open" )
+ iOpen = hGetWizardParams( "LETTER" , "ID" )
+ exit for
+ endif
+
+ kontext "AutopilotFax"
+ if ( AutopilotFax.exists() ) then
+ printlog( CFN & "Autopilot Fax is open" )
+ iOpen = hGetWizardParams( "FAX" , "ID" )
+ exit for
+ endif
+
+ kontext "AutopilotAgenda"
+ if ( AutopilotAgenda.exists() ) then
+ printlog( CFN & "Autopilot Agenda is open" )
+ iOpen = hGetWizardParams( "AGENDA" , "ID" )
+ exit for
+ endif
+
+ Kontext "MailMergeWizard"
+ if ( MailMergeWizard.exists() ) then
+ printlog( CFN & "Mailmerge Wizard is open" )
+ iOpen = hGetWizardParams( "MAILMERGE" , "ID" )
+ exit for
+ endif
+
+ Kontext "AutopilotPraesentation1"
+ if ( AutopilotPraesentation1.exists() ) then
+ printlog( CFN & "Presentation Wizard is open" )
+ iOpen = hGetWizardParams( "IMPRESS" , "ID" )
+ exit for
+ endif
+
+ Kontext "AutoPilotEuroKonverter"
+ if ( AutoPilotEuroKonverter.exists() ) then
+ printlog( CFN & "Euro Converter is open" )
+ iOpen = hGetWizardParams( "EUROCONV" , "ID" )
+ exit for
+ endif
+
+ Kontext "DocumentConverter"
+ if ( DocumentConverter.exists( 1 ) ) then
+ printlog( CFN & "Document Converter is open" )
+ iOpen = hGetWizardParams( "DOCCONV" , "ID" )
+ exit for
+ endif
+
+ next iWait
+
+ hWaitForWizard() = iOpen
+ '///</ul>
+
+end function
+
+'*******************************************************************************
function hSetTemplateSavePath( cFile as string ) as integer