diff options
Diffstat (limited to 'testautomation')
15 files changed, 228 insertions, 346 deletions
diff --git a/testautomation/extensions/optional/includes/publisher.inc b/testautomation/extensions/optional/includes/publisher.inc index 9af9abb7b69d..aa6fe69e2617 100755 --- a/testautomation/extensions/optional/includes/publisher.inc +++ b/testautomation/extensions/optional/includes/publisher.inc @@ -56,15 +56,16 @@ testcase tExtensionPublisher cBasePath = convertpath( cBasePath ) ' Modify this file to add test cases or attributes - dim cInfoFile as string - cinfoFile = cBasePath & "extension.info" + dim cInfoFile as string : cinfoFile = cBasePath & "extension.info" ' The number of files to test. Information about this is stored in the file ' specified by cInfoFile dim iFileCount as integer dim iCurrentFile as integer - dim iExitCounter as integer dim iExtensionCount as integer + dim iExitCounter as integer + dim iCurrentExtensionCount as integer : iCurrentExtensionCount = 0 + dim iTry as integer ' This is the data we get from the configuration file dim cCurrentFileName as string @@ -78,6 +79,7 @@ testcase tExtensionPublisher dim cConfigArray( 60 ) as string dim cTestString as string + dim bInstallationComplete as boolean : bInstallationComplete = false iExtensionCount = hGetExtensionCount() @@ -85,6 +87,9 @@ testcase tExtensionPublisher hGetDataFileSection( cInfoFile, cConfigArray(), "info", "", "" ) iFileCount = int( hGetValueForKeyAsString( cConfigArray() , "filecount" ) ) printlog( cInfoFile & " specifies " & iFileCount & " documents to load" ) + + iExtensionCount = iExtensionCount + iFileCount + printlog( "Expected number of extensions after installation: " & iExtensionCount ) printlog( "Installing extensions" ) for iCurrentFile = 1 to iFileCount @@ -93,41 +98,51 @@ testcase tExtensionPublisher cCurrentFileName = hGetValueForKeyAsString( cConfigArray() , "file" ) cCurrentFileName = cBasePath & cCurrentFileName sExtensionCLI( "add" , cCurrentFileName ) - WaitSlot( 5000 ) + wait 1000 ' This is required, sExtensionCLI is asynchronous. next iCurrentFile - printlog( "Finished installing extensions" ) - + printlog( "Finished installing extensions, now verifying..." ) + + hNewDocument() + ToolsPackageManager + kontext "PackageManager" - if ( not PackageManager.exists() ) then - ToolsPackageManager - kontext "PackageManager" - if ( PackageManager.exists( 2 ) ) then - printlog( "Extension Manager UI has been opened" ) - else - warnlog( "Failed to open Extension Manager UI" ) + if ( PackageManager.exists( 3 ) ) then + + for iTry = 1 to 30 + + iCurrentExtensionCount = BrowsePackages.getItemCount() + + if ( iCurrentExtensionCount = iExtensionCount ) then + printlog( "All extensions have been installed, good." ) + bInstallationComplete = true + exit for + endif + + printlog( "Waiting for listbox: Number of extensions: " & iCurrentExtensionCount ) + + next iTry + + ' If one or more extensions have not been added to the list we better abort the + ' test as the remaining parts need all extensions to be installed causing + ' lots of cryptig errors to appear in the log. + if ( not bInstallationComplete ) then + warnlog( "Not all extensions have been installed. Aborting test." ) + kontext "PackageManager" + if ( PackageManager.exists() ) then + PackageManager.cancel() + PackageManager.notExists( 2 ) + endif goto endsub endif else - warnlog( "#i84786# Unopkg processes block UI" ) + warnlog( "The Extension Manager did not open, Aborting test" ) goto endsub endif + - iExitCounter = 0 - kontext "PackageManager" - WaitSlot() - do while ( BrowsePackages.getItemCount() < ( iExtensionCount + iFileCount ) ) - printlog( "Waiting for Extensions List to populate..." ) - Wait( 1000 ) - iExitCounter = iExitCounter + 1 - if ( iExitCounter = 30 ) then - kontext "PackageManager" - PackageManager.cancel() - goto endsub - endif - loop - kontext "PackageManager" + printlog( "Going for the update-dialog" ) if ( Updates.isEnabled() ) then printlog( "Updates-button is enabled" ) @@ -142,11 +157,14 @@ testcase tExtensionPublisher wait( 1000 ) iExitCounter = iExitCounter + 1 if ( iExitCounter = 200 ) then - warnlog( "Update list for extensions is stalled (expected: 7), found: " & AvailableUpdatesList.getItemCount() ) + warnlog( "Update list for extensions is stalled (expected: 7), " & _ + "found: " & AvailableUpdatesList.getItemCount() ) kontext "ExtensionUpdate" ExtensionUpdate.cancel() + ExtensionUpdate.notExists( 2 ) kontext "PackageManager" PackageManager.cancel() + PackageManager.notExists( 2 ) goto endsub endif loop @@ -246,6 +264,7 @@ testcase tExtensionPublisher kontext "ExtensionUpdate" ExtensionUpdate.cancel() + ExtensionUpdate.notExists( 2 ) else warnlog( "Extension Update dialog is not open" ) endif @@ -256,6 +275,7 @@ testcase tExtensionPublisher kontext "PackageManager" PackageManager.close() + PackageManager.notExists( 2 ) printlog( "Removing extensions" ) for iCurrentFile = 1 to iFileCount @@ -264,6 +284,8 @@ testcase tExtensionPublisher sExtensionCLI( "remove" , cCurrentFileName ) next iCurrentFile printlog( "Finished removing extensions" ) + + hFileCloseAll() endcase diff --git a/testautomation/framework/optional/includes/basic_delete_modules.inc b/testautomation/framework/optional/includes/basic_delete_modules.inc index 7d94c3e9b1e3..8a8d306d4b42 100755 --- a/testautomation/framework/optional/includes/basic_delete_modules.inc +++ b/testautomation/framework/optional/includes/basic_delete_modules.inc @@ -1,5 +1,5 @@ 'encoding UTF-8 Do not remove or change this line! -'************************************************************************** +'******************************************************************************* '* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. '* '* Copyright 2008 by Sun Microsystems, Inc. @@ -29,7 +29,7 @@ '* <http://www.openoffice.org/license.html> '* for a copy of the LGPLv3 License. '* -'/************************************************************************ +'/****************************************************************************** '* '* owner : joerg.skottke@sun.com '* @@ -43,20 +43,20 @@ testcase tDeleteModulesAtRunningBasic dim brc as boolean const MAX_WAIT = 3000 - + dim iMenuItemCount as integer printlog( "Open a new writer-doc" ) gApplication = "WRITER" - Call hNewDocument() - printlog( "Create a new module " ) + printlog( "Open the BASIC Organizer" ) brc = hOpenBasicOrganizerFromDoc() if ( not brc ) then warnlog( "Unable to open BASIC organizer for the document" ) goto endsub endif - + + printlog( "Create a new module for the current document" ) brc = hCreateModuleForDoc() if ( not brc ) then warnlog( "Unable to create a basic module for the document" ) @@ -82,15 +82,14 @@ testcase tDeleteModulesAtRunningBasic Tabbar.OpenContextMenu() try - if ( hMenuItemGetCount() = 5 ) then - warnlog( "#i101972# - Disabled entries are shown in context menu on tab bar" ) - end if - - - if ( hMenuItemGetCount() = 3 ) then - warnlog( "Delete is active in context menu for a running macro => BUG!" ) - end if - + iMenuItemCount = hMenuItemGetCount() + + select case ( iMenuItemCount ) + case 2 : printlog( "Correct number of items in menu: " & iMenuItemCount ) + case 3 : warnlog ( "Delete is active in context menu for a running macro => BUG!" ) + case 5 : warnlog ( "#i101972# - Disabled entries are shown in context menu on tab bar" ) + default : warnlog ( "Incorrect itemcount in context menu: " & iMenuItemCount ) + end select catch warnlog( "Unable to retrieve the number of menuitems" ) endcatch @@ -104,8 +103,7 @@ testcase tDeleteModulesAtRunningBasic warnlog( "Slot not finished, timeout reached" ) endif - Call hCloseDocument() - Call hCloseDocument() + Call hFileCloseAll() endcase diff --git a/testautomation/framework/optional/includes/basic_documents.inc b/testautomation/framework/optional/includes/basic_documents.inc index f286caf2ed27..ca70e0c445ed 100755 --- a/testautomation/framework/optional/includes/basic_documents.inc +++ b/testautomation/framework/optional/includes/basic_documents.inc @@ -1,5 +1,5 @@ 'encoding UTF-8 Do not remove or change this line! -'************************************************************************** +'******************************************************************************* '* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. '* '* Copyright 2008 by Sun Microsystems, Inc. @@ -29,7 +29,7 @@ '* <http://www.openoffice.org/license.html> '* for a copy of the LGPLv3 License. '* -'/************************************************************************ +'/****************************************************************************** '* '* owner : joerg.skottke@sun.com '* @@ -41,12 +41,8 @@ private const IDOCS = 5 testcase tBasicDocuments - qaerrorlog( "#i90435# Untitled documents unnumbered in BASIC organizer" ) - goto endsub - const CFN = "tBasicDocuments::" - dim brc as boolean dim sFileWriter as string dim sFileCalc as string @@ -61,61 +57,66 @@ testcase tBasicDocuments ' in the Macro Organizer const DOC_NAME = "basic" - printlog( "" ) + printlog( "Set macro security level to medium" ) iSecLevel = hSetMacroSecurityAPI( GC_MACRO_SECURITY_LEVEL_MEDIUM ) - + + printlog( "Open one single unchanged Writer document" ) hInitSingleDoc() kontext "DocumentWriter" DocumentWriter.typeKeys( "tBasicDocuments - initial document - discard after test" ) gApplication = "WRITER" - printlog( "" ) + printlog( "Create a Writer workfilename (build path and filename)" ) brc = hCreateBasicWorkFiles() sFileWriter = hGetBasicWorkFile( "current" ) gApplication = "CALC" - printlog( "" ) + printlog( "Create a Calc workfilename (build path and filename)" ) brc = hCreateBasicWorkFiles() sFileCalc = hGetBasicWorkFile( "current" ) - printlog( "" ) + printlog( "Open the writer file" ) brc = hFileOpen( sFileWriter ) brc = hAllowMacroExecution() if ( not brc ) then warnlog( "Missing Macro execution dialog. Please check the file/security settings" ) endif + + printlog( "Open the Calc file" ) brc = hFileOpen( sFileCalc ) brc = hAllowMacroExecution() if ( not brc ) then warnlog( "Missing Macro execution dialog. Please check the file/security settings" ) endif - printlog( "" ) + printlog( "Open the BASIC organizer" ) brc = hOpenBasicOrganizerFromDoc() + printlog( "Retreive the names of all nodes from the treelist" ) hGetVisibleNodeNames( MakroAus , cNodeListA() ) - printlog( "" ) + printlog( "Verify that both documents are listed - one Writer, one Calc with identical names" ) iHitCount = hCountMatchesInList( cNodeListA() , DOC_NAME ) if ( iHitCount <> 2 ) then warnlog( "There should be two documents with the name " & DOC_NAME & "listed." ) endif - + + printlog( "Click Manage..." ) verwalten.click() - printlog( "" ) + printlog( "Get the nodes list from the object organizer tabs - first tab" ) brc = hSelectBasicObjectOrganizerTab( 1 ) ListAllDelete( cNodeListB() ) hGetVisibleNodeNames( ModulListe , cNodeListB() ) - printlog( "" ) + printlog( "Verify that both documents are listed on both relevant tabpages" ) iHitCount = hCountMatchesInList( cNodeListA() , DOC_NAME ) if ( iHitCount <> 2 ) then warnlog( "There should be two documents with the name " & DOC_NAME & "listed." ) endif - printlog( "" ) + printlog( "Switch to second tab" ) brc = hSelectBasicObjectOrganizerTab( 2 ) ListAllDelete( cNodeListB() ) hGetVisibleNodeNames( ModuleList , cNodeListB() ) @@ -124,34 +125,33 @@ testcase tBasicDocuments hListPrint( cNodeListB() , "List of objects found in treelist" ) endif - printlog( "" ) + printlog( "Verify" ) iHitCount = hCountMatchesInList( cNodeListB() , DOC_NAME ) if ( iHitCount <> 2 ) then warnlog( "There should be two documents with the name " & DOC_NAME & "listed." ) endif - printlog( "" ) + printlog( "Third tab (should not list the document" ) brc = hSelectBasicObjectOrganizerTab( 3 ) brc = hTestLibraryListBox( cNodeListA() ) - printlog( "" ) printlog( CFN & "Closing dialogs..." ) TabBibliotheken.cancel() - + + printlog( "Cleanup: Close macro organizer" ) Kontext "Makro" Makro.cancel() - brc = hDestroyDocument() - brc = hDestroyDocument() - + printlog( "Cleanup: Close all files" ) + hFileCloseAll() + + printlog( "Cleanup: Remove workfiles" ) brc = hDeleteFile( sFileWriter ) brc = hDeleteFile( sFileCalc ) - + + printlog( "Rest macro security level" ) hSetMacroSecurityAPI( GC_MACRO_SECURITY_LEVEL_DEFAULT ) - hDestroyDocument() - - endcase '******************************************************************************* @@ -160,15 +160,11 @@ function hTestLibraryListBox( cNodeList() ) as boolean const CFN = "hTestLibraryListBox::" - - dim iEntry as integer dim cEntry as string - dim brc as boolean + dim brc as boolean : brc = true dim irc as integer - brc = true - if ( bibliothek.getItemCount() <> IDOCS ) then warnlog( CFN & "Incorrect number of items in listbox" ) printlog( CFN & "Expected: " & bibliothek.getItemCount() ) @@ -192,5 +188,4 @@ function hTestLibraryListBox( cNodeList() ) as boolean next iEntry - end function diff --git a/testautomation/framework/optional/includes/f_usage_tracking.inc b/testautomation/framework/optional/includes/f_usage_tracking.inc index ba00b1c3e0ca..f3a78f8b3037 100755 --- a/testautomation/framework/optional/includes/f_usage_tracking.inc +++ b/testautomation/framework/optional/includes/f_usage_tracking.inc @@ -37,22 +37,19 @@ '* '\****************************************************************************** -' Concept -' The usage tracking functionality is disabled during test init. -' Configuration is done in Tools/Options. There a tabpage must exist that -' offers the functionality to enable/disable tracking and to show what has -' logged. - private const LOGFILE = "user\temp\Feedback\Current.csv" '******************************************************************************* testcase tUsageTracking1 - printlog( "Test case 1: Presence of the Usage Tracking featureset (API)" ) + printlog( "Test case 1: Presence of the Usage Tracking featureset" ) + + ' Broken in CWS sb111' + ' Currently missing: Check for Office brand, StarOffice should always have OOoImp enabled' if ( not gOOoImprovementIsEnabled ) then - warnlog( "Could not access API for usage tracking program" ) + warnlog( "Usage tracking program is not enabled for this build" ) endif endcase @@ -93,14 +90,20 @@ testcase tUsageTracking3 if ( TabOOoImprovement.exists( 1 ) ) then if ( not ParticipateNo.isChecked() ) then - qaerrorlog( "#i98736# - UI should reflect current status for usage tracking: No" ) + warnlog( "#i98736# - UI should reflect current status for usage tracking: No" ) endif if ( ShowData.isEnabled() ) then - qaerrorlog( "#i97340# - Show data button should not be enabled if nothing is logged" ) + warnlog( "#i97340# - Show data button should not be enabled if nothing is logged" ) ShowData.click() + kontext "FilterAuswahl" + if ( FilterAuswahl.exists( 2 ) ) then + warnlog( "Filter Selection dialog is not expected at this point, ") + FilterAuswahl.cancel() + endif + kontext "Active" if ( Active.exists( 2 ) ) then qaerrorlog( "Messagebox not required as control should not be enabled (see #i97340#)" ) @@ -124,7 +127,7 @@ testcase tUsageTracking3 else warnlog( "OOo Improvement Tabpage (Tools/Options) is missing" ) endif - + kontext "OptionenDlg" OptionenDlg.cancel() diff --git a/testautomation/framework/optional/includes/help_bookmarks.inc b/testautomation/framework/optional/includes/help_bookmarks.inc index 921b7f2bbb66..2b9c76ac8466 100755 --- a/testautomation/framework/optional/includes/help_bookmarks.inc +++ b/testautomation/framework/optional/includes/help_bookmarks.inc @@ -161,23 +161,27 @@ testcase tHelpBookmarks printlog( "Verify that the renamed bookmark still exists") Kontext "BookmarksPage" - Bookmarks.select( 1 ) - cStringBookmark = Bookmarks.getSelText() - if ( cStringBookmark = MYBOOKMARK ) then - printlog( "The bookmark has the correct name") - else - warnlog( "Incorrect name displayed in bookmarks list") - endif - - printlog( "Delete the Bookmark (using context menu)") - hUseBookmarksContextMenu( "delete") - - printlog( "verify that the bookmark has been deleted (none left)") - kontext "Bookmarks" - if ( bookmarks.getItemCount = 0 ) then - printlog( "Bookmark has been deleted") + if ( Bookmarks.getItemCount() > 0 ) then + Bookmarks.select( 1 ) + cStringBookmark = Bookmarks.getSelText() + if ( cStringBookmark = MYBOOKMARK ) then + printlog( "The bookmark has the correct name") + else + warnlog( "Incorrect name displayed in bookmarks list") + endif + + printlog( "Delete the Bookmark (using context menu)") + hUseBookmarksContextMenu( "delete") + + printlog( "verify that the bookmark has been deleted (none left)") + kontext "Bookmarks" + if ( bookmarks.getItemCount = 0 ) then + printlog( "Bookmark has been deleted") + else + warnlog( "There are bookmarks left over, please check") + endif else - warnlog( "There are bookmarks left over, please check") + warnlog( "Bookmarks are lost on program restart") endif printlog( "Close the help") diff --git a/testautomation/framework/optional/includes/ole_1.inc b/testautomation/framework/optional/includes/ole_1.inc index 050a78b0fc6c..8a17a233f5d6 100755 --- a/testautomation/framework/optional/includes/ole_1.inc +++ b/testautomation/framework/optional/includes/ole_1.inc @@ -47,13 +47,13 @@ testcase tOLEWriter Call hNewDocument PrintLog "- Writer : Chart without table" - InsertObjectChart - sleep(4) + hUseAsyncSlot( "InsertObjectChart" ) + Kontext "DocumentChart" - if DocumentChart.Exists(5) then + if ( DocumentChart.Exists( 5 ) ) then FormatChartType Kontext "ChartType" - if ChartType.Exists(5) then + if ( ChartType.Exists( 5 ) ) then ChartType.Cancel else warnlog "Chart Type dialog did bot occour." @@ -62,18 +62,22 @@ testcase tOLEWriter DocumentChart.TypeKeys "<ESCAPE>" Kontext "DocumentWriter" DocumentWriter.TypeKeys "<DELETE>" - sleep(1) else warnlog "Chart has not been inserted." end if - sleep(4) + PrintLog "- Writer : Chart out of a table only with numbers" - InsertTableWriter + hUseAsyncSlot( "InsertTableWriter" ) Kontext "TabelleEinfuegenWriter" - Spalten.SetText "3" - Zeilen.SetText "10" - TabelleEinfuegenWriter.OK + if ( TabelleEinfuegenWriter.exists( 1 ) ) then + Spalten.SetText "3" + Zeilen.SetText "10" + TabelleEinfuegenWriter.OK + TabelleEinfuegenWriter.notExists( 2 ) + else + warnlog( "Dialog <TabelleEinfuegenWriter> did not open" ) + endif Kontext "DocumentWriter" for i%=1 to 10 @@ -86,7 +90,7 @@ testcase tOLEWriter DocumentWriter.TypeKeys "<Left>", 3 next i% - InsertObjectChart + hUseAsyncSlot( "InsertObjectChart" ) hStepThroughChartWizard() Kontext "DocumentChart" @@ -96,16 +100,19 @@ testcase tOLEWriter Sleep 1 DocumentWriter.TypeKeys "<Down>", 20 DocumentWriter.TypeKeys "<Return>", 2 - Sleep 1 - PrintLog "- Writer : Chart out of a table only with chars" - InsertTableWriter + hUseAsyncSlot( "InsertTableWriter" ) Kontext "TabelleEinfuegenWriter" - Spalten.SetText "3" - Zeilen.SetText "10" - TabelleEinfuegenWriter.OK + if ( TabelleEinfuegenWriter.exists( 1 ) ) then + Spalten.SetText "3" + Zeilen.SetText "10" + TabelleEinfuegenWriter.OK + TabelleEinfuegenWriter.notExists( 2 ) + else + warnlog( "Dialog <TabelleEinfuegenWriter> did not open" ) + endif Kontext "DocumentWriter" for i%=1 to 10 @@ -118,8 +125,7 @@ testcase tOLEWriter DocumentWriter.TypeKeys "<Left>", 3 next i% - InsertObjectChart - + hUseAsyncSlot( "InsertObjectChart" ) hStepThroughChartWizard() Kontext "DocumentChart" @@ -129,30 +135,32 @@ testcase tOLEWriter Sleep 1 DocumentWriter.TypeKeys "<Down>", 20 DocumentWriter.TypeKeys "<Return>", 2 - Sleep 1 PrintLog "- Writer : Math" - InsertObjectFormulaWriter + hUseAsyncSlot( "InsertObjectFormulaWriter" ) gMouseClick ( 1, 1) Kontext "DocumentWriter" DocumentWriter.TypeKeys "<Delete>" - Sleep 1 PrintLog "- Writer : floating frame" + hUseAsyncSlot( "InsertFloatingFrame" ) - 'warnlog( "#148094# - Crash when deselecting floating frame in Writer" ) - - InsertFloatingFrame - + printlog( "Properties dialog for floating frame should open" ) Kontext "TabEigenschaften" - FrameName.SetText "Hallo" - Inhalt.SetText ConvertPath ( gTesttoolPath+"global\input\graf_inp\borabora.jpg" ) - - TabEigenschaften.OK - Sleep 2 + if ( TabEigenschaften.exists( 1 ) and TabEigenschaften.isVisible() ) then + + printlog( "Name the floating frame, close the dialog" ) + FrameName.SetText "Hallo" + Inhalt.SetText ConvertPath ( gTesttoolPath+"global\input\graf_inp\borabora.jpg" ) + + TabEigenschaften.OK + TabEigenSchaften.notExists( 2 ) + + endif + printlog( "Close the writer document" ) Kontext "DocumentWriter" DocumentWriter.TypeKeys "<Delete>" Sleep 1 @@ -333,7 +341,7 @@ testcase tOLEDraw MenuSelect(0) try - InsertObjectChart + hUseAsyncSlot( "InsertObjectChart" ) Sleep ( 2 ) Kontext "DocumentChart" @@ -413,7 +421,7 @@ testcase tOLEImpress PrintLog "- Impress : Chart" try - InsertObjectChart + hUseAsyncSlot( "InsertObjectChart" ) sleep 2 gMouseClick ( 1 , 1 ) diff --git a/testautomation/framework/optional/includes/security_recommend_password.inc b/testautomation/framework/optional/includes/security_recommend_password.inc index 2f6db4392845..fd0e9542dda8 100755 --- a/testautomation/framework/optional/includes/security_recommend_password.inc +++ b/testautomation/framework/optional/includes/security_recommend_password.inc @@ -87,7 +87,6 @@ testcase tRecommendPassword( filetypeID as string ) if ( rc = 0 ) then if AutomatischeDateinamenserweiterung.Exists then - QAErrorLog "OBSOLETE: Check-box Automatic file extension in file dialog will be removed soon!" AutomatischeDateinamenserweiterung.Uncheck endif diff --git a/testautomation/framework/tools/includes/help_tools.inc b/testautomation/framework/tools/includes/help_tools.inc index 438c01d7ef7e..61e205fe6db4 100755 --- a/testautomation/framework/tools/includes/help_tools.inc +++ b/testautomation/framework/tools/includes/help_tools.inc @@ -56,51 +56,25 @@ function hOpenHelp() as boolean '///<u>Description</u>: '///<ul> + const CFN = "hOpenHelp::" - dim iTry as integer - dim brc as boolean - brc = false - - printlog( CFN & "Enter" ) + HelpContents - '///+<li>Open the help Browser using the slot</li> - try - HelpContents - catch - printlog( CFN & "Failed to open help, slot failed" ) - hOpenHelp() = false - exit function - endcatch - - '///+<li>Verify that the help is indeed open (max 10 sec.)</li> - Kontext "StarOfficeHelp" - for iTry = 1 to 10 - - if ( StarOfficeHelp.exists() ) then - brc = true - exit for - endif - - sleep( 1 ) - - next iTry - - '///+<li>Print a status to the log, return TRUE or FALSE</li> - if ( brc ) then - printlog( CFN & "Exit: Help is open" ) + if ( WaitSlot( 3000 ) <> WSFinished ) then + printlog( CFN & "Failed to open help" ) + hOpenHelp() = FALSE else - printlog( CFN & "Exit: Help is not open" ) - kontext "Active" - if ( Active.exists( 2 ) ) then - printlog( "Msgbox: " & Active.getText() - Active.ok() + kontext "StarOfficeHelp" + if ( StarOfficeHelp.exists() ) then + printlog( CFN & "Help was opened" ) + hOpenHelp() = TRUE + else + printlog( CFN & "Help was not opened" ) + hOpenHelp() = FALSE endif endif - - '///</ul> - hOpenHelp() = brc - + end function '******************************************************************************* @@ -122,38 +96,26 @@ function hCloseHelp() as boolean '///</ul> '///</ol> - '///<u>Description</u>: - '///<ul> const CFN = "hCloseHelp::" - dim brc as boolean - - printlog( CFN & "Enter" ) - - '///+<li>Verify that the Help Browser is Open</li> - kontext "StarOfficeHelp" - if ( not StarOfficeHelp.exists() ) then - printlog( CFN & "Help is not open" ) - hCloseHelp() = false - exit function - endif - - '///+<li>Close the Help Browser by typing CTRL+F4</li> - StarOfficeHelp.typeKeys( "<MOD1 F4>" ) - '///+<li>Verify that the Help Browser is not open (anymore)</li> kontext "StarOfficeHelp" if ( StarOfficeHelp.exists() ) then - printlog( CFN & "Exit: Help is still open" ) - brc = false + + hUseAsyncSlot( "FileClose") + StarOfficeHelp.notExists( 3 ) + + if ( StarOfficeHelp.Exists() ) then + printlog( CFN & "Help was not closed") + hCloseHelp() = FALSE + else + printlog( CFN & "Help was closed") + hCloseHelp() = TRUE + endif else - printlog( CFN & "Exit: Help has been closed" ) - brc = true + printlog( CFN & "Help is not open, no action taken") + hCloseHelp() = TRUE endif - '///+<li>Return TRUE or FALSE</li> - '///</ul> - hCloseHelp() = brc - end function '****************************************************************************** diff --git a/testautomation/global/system/includes/iniinfo.inc b/testautomation/global/system/includes/iniinfo.inc index 64d19eab101f..ff6a0a096fbd 100755 --- a/testautomation/global/system/includes/iniinfo.inc +++ b/testautomation/global/system/includes/iniinfo.inc @@ -304,50 +304,11 @@ end function sub GetLanguageInformation '/// Extracts the language information from <i>Setup.xcu</i>. '/// <u>note</u>: It uses the <b>fgetL10Nvalue</b>. - Dim i as integer - Dim iTimeOut as integer Dim sLanOutIni as string - Dim SetupXML as String - Dim ChildsOfSetupNodes as integer - Dim ArtOfInst as string - Dim SetupXMLNet as string - Dim SetupXMLDefault as string - dim SetupXcuPath as string - - SetupXcuPath = ConvertPath("share\registry\data\org\openoffice\Setup.xcu") - SetupXML = gOfficePath & ConvertPath("user\registry\data\org\openoffice\Setup.xcu") - - if gNetzInst = TRUE then - SetupXMLNet = gNetzOfficePath & SetupXcuPath - ArtOfInst = "NET- / Workstation Inst." - else - SetupXMLDefault = gOfficePath & SetupXcuPath - ArtOfInst = "FAT Inst." - end if - - ' Issue #i97875 (JSK) experimental delay - ' If we're too fast we might encounter that the Setup.xcu is not created yet. - ' So we retry a couple of times - while( not FileExists( SetupXML ) ) - iTimeOut = iTimeOut + 1 - if ( iTimeOut = 10 ) then - warnlog "GetLanguageInformation(" & ArtOfInst & "): " & SetupXML & " not found => can't get the correct Office-Language! Default (01) will be used." - iSprache = 01 - Exit sub - endif - wait( 100 ) - wend ' function 'fgetL10Nvalue' is also in this library - sLanOutIni = fgetL10Nvalue(SetupXML) + sLanOutIni = fgetL10Nvalue() ' BugID 98315 -> looking in networkpath for the language until bug will be fixed. - if sLanOutIni = "" and gNetzInst = TRUE then - sLanOutIni = fgetL10Nvalue(SetupXMLNet) - end if - ' It is an English FAT version 645m9s2 or higher. - if sLanOutIni = "" and gNetzInst = FALSE then - sLanOutIni = fgetL10Nvalue(SetupXMLDefault) - end if if sLanOutIni = "" then warnlog "=> default is now 01 = en_US" @@ -699,54 +660,15 @@ end function '------------------------------------------------------------------------- -function fgetL10Nvalue ( setupxcu as string) as string -'/// Gets the value of the child from -'///+ <ul><li>node: oor:name="L10N"<ul><li>node: oor:name = "ooLocale"</li><ul><li>element: value</li></ul></ul></li></ul> -'///+ in a file (normaly <b>Setup.xcu</b> in network path or installation path). -'/// <u>Note</u>: The structure is hard coded and specified. A change must be announced by feature mail! -'/// <u><i>Description</i></u>: - Dim i as integer - Dim ChildsOfSetupNodes as integer - - fgetL10Nvalue = "" - -'///<ul><li>Open the file given as parameter.</li> - SAXReadFile(setupxcu) -'///+<li>Go to the DOM (Document Object Model) root.</li> - SAXSeekElement("/") -'///+<li>Go <b>into</b> the first <b>node</b> of the tree.</li> - SAXSeekElement(1) -'///+<li>Get the <b>count of children</b> (nodes/elements) in that node.</li> - ChildsOfSetupNodes = SAXGetChildCount - for i = 1 to ChildsOfSetupNodes -'///+<li>Run in a for next loop of going <b>into</b> the next node and existing it until ...</li> - SAXSeekElement(i) -'///+<li>...the <i>oor:name</i> attribute value is identical to "L10N"</li> - if SaxGetAttributeValue("oor:name") = "L10N" then -'///+<li>Go <b>into</b> the next node ("prop")</li> - SAXSeekElement("prop") -'///+<li>If the attribute value of "oor:name" is identical to "ooLocale"...</li> - if SAXgetAttributeValue("oor:name") = "ooLocale" then -'///+<li>go <b>into</b> that node and also into the next one, named "value".</li> - SAXSeekElement("value") -'///+<li>Go <b>into</b> the next node - a <i>node type</i> <b>character</b>...</li> - SAXSeekElement(1) - if SAXGetNodeType = NodeTypeCharacter then -'///+<li>...and get the characters out in the string which will be returned from this function.</li> - fgetL10Nvalue = SAXGetChars -'///+<li><i>Release()</i> the DOM.</li> - SAXRelease() -'///+<li>Exit the function.</li></ul> - Exit function - end if - else - SAXRelease() -'/// If the result is empty exit the function without warning.</ul> - Exit function - end if - end if - SAXSeekElement(0) - next i +function fgetL10Nvalue() as string + dim args(0) as new com.sun.star.beans.NamedValue + args(0).Name = "nodepath" + args(0).Value = "/org.openoffice.Setup/L10N" + fgetL10Nvalue = hGetUNOService()._ + createInstance("com.sun.star.configuration.DefaultProvider")._ + createInstanceWithArguments(_ + "com.sun.star.configuration.ConfigurationAccess", args())._ + getByName("ooLocale") end function '------------------------------------------------------------------------- diff --git a/testautomation/global/system/includes/master.inc b/testautomation/global/system/includes/master.inc index b8895c7fa637..f9dac581b786 100755 --- a/testautomation/global/system/includes/master.inc +++ b/testautomation/global/system/includes/master.inc @@ -922,7 +922,7 @@ sub mMakeGeneralOptionsAPI endcatch '///+ OOo Improvement - only if BUILD_SPECIAL is set we have this file created. - sTempPath = gOfficeBasisPath & "share/registry/modules/org/openoffice/Office/Jobs/Jobs-oooimprovement.xcu" + sTempPath = gOfficeBasisPath & "share/registry/oooimprovement.xcd" sTempPath = ConvertPath( sTempPath ) if ( FileExists( sTempPath ) ) then diff --git a/testautomation/global/tools/includes/optional/t_filetools.inc b/testautomation/global/tools/includes/optional/t_filetools.inc index a18319c13dfa..d0d05f227f0c 100755 --- a/testautomation/global/tools/includes/optional/t_filetools.inc +++ b/testautomation/global/tools/includes/optional/t_filetools.inc @@ -149,17 +149,17 @@ function hHandleActivesOnLoad( iTries as integer , iAdd as integer ) as boolean kontext "Active" if ( Active.exists( 1 ) ) then if ( Active.getButtonCount() = 2 ) then - printlog( CFN & "Probably the dreaded <File corrupted warning>" ) + printlog( CFN & "<Update links dialog> or <File corruption warning>" ) active.yes() hFileWait( FALSE ) kontext "Active" if ( Active.exists( 2 ) ) then + warnlog( "#105670# - File corruption warning, the template is broken" ) qaerrorlog( CFN & "Trying to recover." ) Active.ok() hHandleActivesOnLoad() = FALSE exit function endif - warnlog( "#105670# - File corruption warning, the template is broken" ) endif endif diff --git a/testautomation/global/tools/includes/required/t_doc1.inc b/testautomation/global/tools/includes/required/t_doc1.inc index f1bc0f538722..625bcb995fa0 100755 --- a/testautomation/global/tools/includes/required/t_doc1.inc +++ b/testautomation/global/tools/includes/required/t_doc1.inc @@ -229,33 +229,12 @@ end function ' '------------------------------------------------------------------------------- ' -sub hCloseDocument ( optional bANewDoc ) - '/// hCloseDocument : close a document without saving ///' - '///+ all documents will be closed without saving ///' - Dim sFehler$ +function hCloseDocument() - if IsMissing ( bANewDoc ) <> TRUE then - if bANewDoc = TRUE then - gNoNewDoc = FALSE - else - gNoNewDoc = TRUE - end if - end if + '/// Trigger FileClose slot' + hUseAsyncSlot( "FileClose") - ' if no new document was created, it isn't closed - if gNoNewDoc = TRUE then - exit sub - end if - - Sleep 3 - try - FileClose - catch - Exceptlog - exit sub - endcatch - - Sleep 1 + '/// Accept to lose changes' Kontext "Active" if Active.Exists(2) then try @@ -264,8 +243,11 @@ sub hCloseDocument ( optional bANewDoc ) Active.Click ( 202 ) endcatch end if - Sleep (2) -end sub + + '/// Wait for FileClose to complete' + WaitSlot( 2000 ) + +end function ' '------------------------------------------------------------------------------- ' diff --git a/testautomation/global/tools/includes/required/t_tools1.inc b/testautomation/global/tools/includes/required/t_tools1.inc index 6fbfd5358e52..1fd3e89cb800 100755 --- a/testautomation/global/tools/includes/required/t_tools1.inc +++ b/testautomation/global/tools/includes/required/t_tools1.inc @@ -1012,9 +1012,6 @@ sub sResetTheOffice as boolean Dim sDefaultLocaleCJK as string Dim sDefaultLocaleCTL as string Dim sfgetL10Nvalue as string - Dim SetupXML as String - Dim SetupXMLNet as string - Dim SetupXMLDefault as string Dim sLanOutIni as string sString = "qa:qatesttool:calc:options:inc:coption1.inc:: " @@ -1023,25 +1020,11 @@ sub sResetTheOffice as boolean ' only run on UNIX platforms; there is a problem with the quickstarter on win32 if ("unx" = gPlatgroup) then try - SetupXML = gOfficePath & ConvertPath("user\registry\data\org\openoffice\Setup.xcu") - ' function 'fgetL10Nvalue' is also in this library - sLanOutIni = fgetL10Nvalue(SetupXML) + sLanOutIni = fgetL10Nvalue() catch - try - ' BugID 98315 -> looking in networkpath for the language until bug will be fixed. - SetupXMLNet = gNetzOfficePath & ConvertPath("share\registry\data\org\openoffice\Setup.xcu") - sLanOutIni = fgetL10Nvalue(SetupXMLNet) - catch - try - ' It is an English FAT version 645m9s2 or higher. - SetupXMLDefault = gOfficePath & ConvertPath("share\registry\data\org\openoffice\Setup.xcu") - sLanOutIni = fgetL10Nvalue(SetupXMLDefault) - catch - warnlog sString & SetupXML & " not found => can't get the correct Office-Language!." - sResetTheOffice = FALSE - Exit sub - endcatch - endcatch + warnlog sString & "can't get the correct Office-Language!." + sResetTheOffice = FALSE + Exit sub endcatch uno=hGetUnoService() @@ -1279,6 +1262,10 @@ function hUseAsyncSlot( cSlot as string ) as integer case "formatpagewriter" : FormatPageWriter case "insertindexesbibliographyentry" : InsertIndexesBibliographyEntry + case "insertobjectchart" : InsertObjectChart + case "inserttablewriter" : InsertTableWriter + case "insertobjectformulawriter" : InsertObjectFormulaWriter + case "insertfloatingframe" : InsertFloatingFrame case "contextpositionandsize" : ContextPositionAndSize diff --git a/testautomation/spreadsheet/required/includes/c_upd_editmenu2.inc b/testautomation/spreadsheet/required/includes/c_upd_editmenu2.inc index 1220b283e2ec..801a70b16ba4 100755 --- a/testautomation/spreadsheet/required/includes/c_upd_editmenu2.inc +++ b/testautomation/spreadsheet/required/includes/c_upd_editmenu2.inc @@ -590,7 +590,7 @@ testcase tEditImageMap Aktiv.Click '/// Click on 'Macro...'-button printlog " Click on 'Macro...'-button" - warnlog "Due to #i102720# this functionality is outcommented" + warnlog "#i102720# - Macro assignment does not work" ' Makro.Click ' Kontext "MakroZuweisen" ' Call DialogTest ( MakroZuweisen ) diff --git a/testautomation/spreadsheet/required/includes/c_upd_filemenu.inc b/testautomation/spreadsheet/required/includes/c_upd_filemenu.inc index a05f22ed9360..77ea16ba910a 100755 --- a/testautomation/spreadsheet/required/includes/c_upd_filemenu.inc +++ b/testautomation/spreadsheet/required/includes/c_upd_filemenu.inc @@ -507,7 +507,7 @@ testcase tFileSaveAsDBF Kontext if Active.exists(2) then printlog " " - warnlog "The following warning exists. This could be #i87325:" + warnlog "#i87325# - Unexpected messagebox" Printlog Active.GetText Printlog " " Active.OK |