Commits

Anonymous committed 1198155

CWS-TOOLING: integrate CWS jskhgpilot2

  • Participants
  • Parent commits 29704bb

Comments (0)

Files changed (14)

testautomation/framework/optional/f_options_ooo.bas

 
 sub main
 
+    GLOBAL_USE_NEW_SLEEP = TRUE
     
     use "framework\optional\includes\options_ooo_general.inc"
     use "framework\optional\includes\options_ooo_memory.inc"

testautomation/framework/optional/includes/options_ooo_colors.inc

 '*
 '\******************************************************************************
 
+testcase tOOoColors
 
-testcase tOOoColors
-    dim USERCOLOR as String
+    printlog( "OOo color palette" )
+
     dim myColor(4)      as String
     dim oldColor(4)     as String
     dim currentColor(4) as String
     dim chColor(4)      as String
-    dim iDefaultColorCount  as Integer
-    dim iModifiedColorCount as Integer
-    dim iTemp as integer
-    dim i as integer
     
-    USERCOLOR = "TT-Test" + iSprache
-    myColor(1) = USERCOLOR
+    const DEFAULT_COLOR_COUNT = 103
+    const CHANGED_COLOR_COUNT = 104
+    const USER_COLOR = "TT-Test-Color"
+    
+    myColor(1) = USER_COLOR
     myColor(2) = "255"
     myColor(3) = "245"
     myColor(4) = "200"
+
+    printlog( "Check if all settings are saved in configuration ( StarOffice / Colors )" )
+    printlog( "Open Tools / Options / StarOffice / Colors" )
+    ToolsOptions
     
-    printlog " testing Tools/Options -> colors"
-    '///check if all settings are saved in configuration ( StarOffice / Colors )
-    '///open Tools / Options / StarOffice / Colors
-    printlog " - Save current settings and modify/add some colors"
-    ToolsOptions
+    Kontext "ExtrasOptionenDlg"
+    if ( ExtrasOptionenDlg.exists( 1 ) ) then
+    
         hToolsOptions ( "StarOffice", "Colors" )
+        
+        printlog( "Delete the userdefined color if it exists" )
+        if ( Farbe.GetItemCount() <> DEFAULT_COLOR_COUNT + 1 ) then
+            call DeleteColor( USER_COLOR )
+        endif
     
-        '///determine the number of currently registered colors
-        iDefaultColorCount = Farbe.GetItemCount()
-        for i = 1 to iDefaultColorCount 
-            printlog "("+i+"/"+iDefaultColorCount +"): '"+Farbe.getItemText(i)+"'"
-        next i
-        printlog " - Currently colors are listed: '" + iDefaultColorCount + "'"
-        '///delete the userdefined color if it exists
-        call DeleteColor( USERCOLOR )
-        '///determine the number of currently registered colors
+        printlog( "Check the number of currently registered colors - cancel test on error" )
         Kontext "TabFarben"
-        iDefaultColorCount = Farbe.GetItemCount
-        printlog " - Colors after deleting: '" + iDefaultColorCount + "'"
-        '///select the last color in the list
-        printlog " - jump to the last color in the list."
+        if ( Farbe.GetItemCount() <> DEFAULT_COLOR_COUNT ) then
+            warnlog( "The number of colors has changed, stopping test" )
+            printlog( "Expected: " & DEFAULT_COLOR_COUNT )
+            printlog( "Found...: " & Farbe.getItemCount() )
+            printlog( "Close the Tools/Options dialog with OK" )
+            Kontext "ExtrasOptionenDlg"
+            ExtrasOptionenDlg.OK
+            WaitSlot( 2000 )
+            goto endsub
+        else
+            printlog( "Number of colors is ok: " & DEFAULT_COLOR_COUNT )
+        endif        
+        
+        printlog( "Jump to the last color in the list." )
         Kontext "TabFarben"
-        Farbe.Select( iDefaultColorCount )
-        '///get the settings for the current selected color 
-        '(204,204,255)
-        call getColorRGB(oldColor())
-        '///change settings for last color and press 'modify' 
-        '(255,255,255)
-        call ModifyColorRGB_PGUP(iDefaultColorCount)
-        '///get the changed colors (Sun 4,255,255,255)
+        Farbe.Select( Farbe.GetItemCount() )
+        
+        printlog( "Get the settings for the current selected color" )
+        call getColorRGB(oldColor()) '(204,204,255)
+
+        printlog( "Change settings for last color and press 'modify'" )
+        call ModifyColorRGB_PGUP( DEFAULT_COLOR_COUNT ) '(255,255,255)
+        
+        printlog( "Get the changed colors (Sun 4,255,255,255)" )
         call GetColorRGB(chColor())
-        '///change the settings again and save it as TT-Test (adding to the list)
-        '(255,245,200)
-        call CreateNewColor(myColor())
-        '///get the current number of registered colors (should be 92)
+        
+        printlog( "Change the settings again and save it as TT-Test (adding to the list)" )
+        call CreateNewColor(myColor()) '(255,245,200)
+        
+        printlog( "Check the number of currently registered colors" )
         Kontext "TabFarben"
-        iModifiedColorCount = Farbe.getItemCount
-        printlog " - Currently colors are listed: '" + iModifiedColorCount + "'" 
-        '///close the options dialog with OK
-        printlog " - close extras/options"
+        if ( Farbe.getItemCount() <> CHANGED_COLOR_COUNT ) then
+            warnlog( "The number of colors has changed" )
+            printlog( "Expected: " & CHANGED_COLOR_COUNT )
+            printlog( "Found...: " & Farbe.getItemCount() )
+        else
+            printlog( "Number of colors is ok: " & DEFAULT_COLOR_COUNT )
+        endif        
+
+        printlog( "Close the Tools/Options dialog with OK" )
         Kontext "ExtrasOptionenDlg"
         ExtrasOptionenDlg.OK
-    Sleep(3)
+        WaitSlot( 2000 )
+    else
+        warnlog( "Tools/Options dialog not open" )
+    endif
     
-    '///exit and restart the office
-    printlog " - exit/restart StarOffice"
+    printlog( "Exit and restart the office" )
     ExitRestartTheOffice
-    '///check the changes
-    printlog " - first check of changes (modifications)"
-    '///open tools / options / StarOffice / Colors
+    
+    printlog( "Check the changes" )
     ToolsOptions
+    
+    Kontext "ExtrasOptionenDlg"
+    if ( ExtrasOptionenDlg.exists( 1 ) ) then
+    
         hToolsOptions ( "StarOffice", "Colors" )
-        '///check the number of colors ( is the new entry saved )
-        '(92)
-        iTemp = Farbe.getItemCount
-        printlog "Current color count: '" + iTemp + "'"
-        if (iTemp <> iModifiedColorCount) then 
-            Warnlog "The number of registered colors is incorrect. Should be: '" + iModifiedColorCount + "' is: '"+ iTemp + "'" 
-        end if
-        '///select the changed color and check the changes
+        
+        printlog( "Check the number of colors (Plus one color)" )
+        Kontext "TabFarben"
+        if ( Farbe.getItemCount() <> CHANGED_COLOR_COUNT ) then
+            warnlog( "The number of colors has changed" )
+            printlog( "Expected: " & CHANGED_COLOR_COUNT )
+            printlog( "Found...: " & Farbe.getItemCount() )
+        else
+            printlog( "Number of colors is ok: " & DEFAULT_COLOR_COUNT )
+        endif        
+        
+        printlog( "Select the changed color and check the changes" )
         Kontext "TabFarben"   
-        Farbe.Select(iDefaultColorCount)
+        Farbe.Select( DEFAULT_COLOR_COUNT )
         call compareTwoColorsRGB(chColor())
-        '///select the new color ( TT-Test ) and check the name and the settings
+        
+        printlog( "Select the new color ( TT-Test ) and check the name and the settings" )
         Kontext "TabFarben"
-        Farbe.Select(iModifiedColorCount)
+        Farbe.Select( CHANGED_COLOR_COUNT )
         call CompareTwoColorsRGB(myColor())
     
-        '///delete the new userdefined color
-        call deleteColor( USERCOLOR )
-        '///reset the modified color to default
+        printlog( "Delete the new userdefined color" )
+        call deleteColor( USER_COLOR )
+
+        printlog( "Check the number of colors (One removed)" )
         Kontext "TabFarben"
-        Farbe.Select(iDefaultColorCount)
+        if ( Farbe.getItemCount() <> DEFAULT_COLOR_COUNT ) then
+            warnlog( "The number of colors has changed" )
+            printlog( "Expected: " & DEFAULT_COLOR_COUNT )
+            printlog( "Found...: " & Farbe.getItemCount() )
+        else
+            printlog( "Number of colors is ok: " & DEFAULT_COLOR_COUNT )
+        endif        
+        
+        printlog( "reset the modified color to default" )
+        Kontext "TabFarben"
+        Farbe.Select( DEFAULT_COLOR_COUNT )
         call ModifyColorRGB(oldColor())
-        '///close options dialog with OK
+        
+        printlog( "Close options dialog with OK" )
         Kontext "ExtrasOptionenDlg"
         ExtrasOptionenDlg.OK
-    Sleep(3)
+        WaitSlot( 2000 )
+        
+    else
+        warnlog( "Tools/Options dialog not open" )
+    endif
+
+    printlog( "Reopen options dialog and check the reset" )
+    ToolsOptions
     
-    '///reopen options dialog and check the reset
-    printlog " - Second check of changes (reset)"
-    ToolsOptions
+    Kontext "ExtrasOptionenDlg"
+    if ( ExtrasOptionenDlg.exists( 1 ) ) then
+    
         hToolsOptions ( "StarOffice", "Colors" )
-        '///check if the number of colors in the list has been restored
-        iTemp = Farbe.getItemCount
-        printlog "Current color count: '" + iTemp + "'"
-        if (iTemp <> iDefaultColorCount)  then 
-            Warnlog "The number of registered colors is incorrect. Should be: '" + iDefaultColorCount + "' is: '"+ iTemp + "'" 
-        endif
-        '///check if the last color has been reset to defaults.
+        
+        printlog( "Check if the number of colors in the list has been restored" )
         Kontext "TabFarben"
-        Farbe.Select(iDefaultColorCount)
+        if ( Farbe.getItemCount() <> DEFAULT_COLOR_COUNT ) then
+            warnlog( "The number of colors has changed" )
+            printlog( "Expected: " & DEFAULT_COLOR_COUNT )
+            printlog( "Found...: " & Farbe.getItemCount() )
+        else
+            printlog( "Number of colors is ok: " & DEFAULT_COLOR_COUNT )
+        endif        
+ 
+        
+        printlog( "Check if the last color has been reset to defaults." )
+        Kontext "TabFarben"
+        Farbe.Select( DEFAULT_COLOR_COUNT )
         call compareTwoColorsRGB(oldColor())
-        '///close options dialog with OK
+
+        printlog( "Close options dialog with OK" )
         Kontext "ExtrasOptionenDlg"
         ExtrasOptionenDlg.OK
+        WaitSlot( 2000 )
+        
+    else
+        warnlog( "Tools/Options dialog not open" )
+    endif
+    
 endcase

testautomation/framework/optional/includes/options_ooo_view.inc

     else
         printlog( "Hardware acceleration is not available on this system" )
     endif
-    checkCheckBox( sFile , "*" , UseAntiAliasing )
+    
+    if ( UseAntiAliasing.isEnabled() ) then
+        checkCheckBox( sFile , "*" , UseAntiAliasing )
+    else
+        printlog( "Antialiasing is not available on this system" )
+    endif
+    
     checkListBox( sFile , "*" , MousePositioning)
     ' needs to get handled differently on platforms!
     iMiddleMouseButton = MausAktion.getSelIndex
     else
         printlog( "Harware acceleration is not available on this system" )
     endif
-    setCheckBox( sFile , "*" , useantialiasing )
+    
+    if ( UseAntiAliasing.isEnabled() ) then
+        setCheckBox( sFile , "*" , useantialiasing )
+    else
+        printlog( "Antialiasing is not available on this system" )
+    endif
+    
     setListBox( sFile , "*" , MousePositioning )
     ' needs to get handled differently on platforms!
     if iMiddleMouseButtonExtern = 1 then

testautomation/framework/optional/input/options/ooo_view_changed.ref

 dokumentansicht=unchecked
 geoeffnetedokumente=checked
 opengl=checked
-UseHardwareAcceleration=checked
+usehardwareacceleration=unchecked
 useantialiasing=unchecked
 mousepositioning=2
 mausaktion=1

testautomation/framework/optional/input/options/ooo_view_defaults.ref

 geoeffnetedokumente=unchecked
 opengl=unchecked
 useantialiasing=checked
-usehardwareacceleration=disabled
+usehardwareacceleration=checked
 mousepositioning=3
 mausaktion=2
 transparency=checked

testautomation/framework/required/f_first.bas

 
 sub main
 
+    ' Disable sleep() calls. If you encounter unexpected test interruptions
+    ' you should try to outcomment this or set the value to FALSE.
+    GLOBAL_USE_NEW_SLEEP = TRUE
+
     use "framework\required\includes\first.inc"
     use "framework\required\includes\graphics_import.inc"
     

testautomation/framework/required/includes/standard_toolbar_3.inc

 testcase tStandardBar_3
 
     dim sFileOut as String
+    dim HyperlinkTabID as integer
+    dim iTabPage as integer
     
-    '///<h1>Update test for all icons on the StandardBar</h1>
+    printlog( "Icons on the standardbar" )
 
-    '///<ul>
-    printlog "************************************************************"
-    printlog "Check all visible icons on the Standardbar"
-    printlog "************************************************************"
-    
     gApplication = "CALC"
 
-    '///+<li>Setup: Delete files from the workdirectory to ensure a clean test</li>
+    printlog( "Cleanup test environment - delete files" )
     sFileOut = hGetWorkPath() & "FWK-update-functionbar" & hGetSuffix( "current" )
     ConvertPath ( sFileOut )
     hDeleteFile( sFileOut )
 
-    '///+<li>Setup: Reset the Standardbar to defaults</li>
+    printlog( "Reset the standardbar to defaults" )
     hResetStandardBar()
-    printlog "check all entries on the 'Standardbar'"
 
-    '///+<li>Skipping testing of URL field, it is hidden by default and tested somewhere else</li>
-    printlog "Skipping URL-Field"
-
-    '///+<li>File Save</li>
-    '///<ul>
-
-    printlog "Save File"
-    gApplication = "CALC"
-
-    '///+<li>New Spreadsheet document, ensure that the navigator is closed</li>
     printlog( "New Spreadsheet document" )
     hCreateDocument()
+
     Kontext "Navigator"
     if ( Navigator.Exists() ) then
         Navigator.close()
     endif
 
-    '///+<li>Insert some text in one cell (don't forget to press a <Enter> at the end)<br>
     printlog( "Insert text into a random cell, press <Enter>" )
     Kontext "DocumentCalc"
     DocumentCalc.TypeKeys( "Only for a test.<Return>" )
 
-    '///+ <i>Save-Button must be active -> click on the button</i></li>
+    Kontext "Standardbar"
     printlog( "Press the 'Save' button" )
-
-    Kontext "Standardbar"
     hWaitForObject( Speichern , 1000 )
     Speichern.click()
 
-    '///+<li>Set a filenname, remember it for further usage</li>
-    printlog( "- Save the file to: " & sFileOut )
 
     Kontext "SpeichernDlg"
+    printlog( "- Save the file to: " & sFileOut )
     Dateiname.SetText( sFileOut )
     Speichern.Click()
 
-    '///+<li>Close the document</li>
     printlog( "Close the document" )
     hDestroyDocument()
-
-    '///</ul>
     
-    '///+<li>Edit File by pressing &quot;File Open&quot; button on the StandardBar</li>
-
-    '///<ul>
-    printlog( "Edit the file by pressing the 'File Open' button" )
-
-    '///+<li>Click the File Open button<br>The File Open dialog should pop up</li>
-    FileOpen
+    printlog( "Click the 'File Open' button" )
+    hUseAsyncSlot( "FileOpen" )
 
     Kontext "OeffnenDlg"
+    Printlog( "Load test file in read-only mode" )
     if ( OeffnenDlg.exists( 2 ) ) then
-    
-        '///+<li>Enter the name of the file we used earlier</li>
         Dateiname.SetText( sFileOut )
-        
-        '///+<li>Check the &quot;Read only&quot; checkbox</li>
         NurLesen.Check()
-        
-        '///+<li>Click &quot;Open&quot;</li>
         oeffnen.click()
-        sleep( 3 )
     else
         warnlog( "File Open dialog is missing" )
     endif
+    
+    wait( 2000 )
 
-    '///+<li>Verify that the document is opened read-only<br>This can be done by 
-    '///+ travelling through the menus or trying to enter some text into the document.<br>
-    '///+ In this case we try to insert a chart into the spreadsheet which should fail.</li>
     Kontext "DocumentCalc"
+    printlog( "Try to insert a chart to verify that the document is read-only (this should fail)" )
     try
-        printlog( "Trying to insert a chart" )
         InsertChartCalc
         warnlog( "The document is not read-only" )
     catch
-        printlog( "Failed to insert chart -> Document is read-only. Good!" )
     endcatch
-        
 
-    '///+<li>Click on &quot;Edit File&quot;<br>This should open another copy of the
-    '///+ document. The copy should open in the foreground and be editable.</li>
     Kontext "Standardbar"
+    printlog( "Click the <Edit File> button" )
     hWaitForObject( Bearbeiten , 1000 )
-    Bearbeiten.click()
+    Bearbeiten.click() : WaitSlot()
 
-    '///+<li>Verify that the file can be edited by inserting a Chart</li>
+    printlog( "Try to insert a chart (should work this time)" )
     InsertChartCalc
+    
     Kontext "ChartWizard"
     if ( ChartWizard.exists( 2 ) ) then
-        printlog( "Chart Wizard is open. Good." )
-        
-        '///+<li>Cancel Chart Wizard</li>
         printlog( "Cancel Chart Wizard" )
         ChartWizard.cancel()
-        WaitSlot
+        WaitSlot()
     else
         warnlog( "Chart Wizard should be open" )
     endif
-    
 
-    '///</ul>
-    '///+<li>Skipping to print file directly</li>
-
-    '///+<li>Cut / Copy / Paste</li>
-
-    '///<ul>
-    '///+<li>Select a row in the spreadsheet</li>
+    printlog( "Select a few cells for Cut/Copy/Paste test" )
     Kontext "DocumentCalc"
     DocumentCalc.TypeKeys( "<Up>", 7 )
     DocumentCalc.TypeKeys( "<Shift Down>", 5 )
 
-    '///+<li>Click on Cut</li>
     printlog( "Cut" )
     Kontext "Standardbar"
     hWaitForObject( Ausschneiden , 1000 )
     Ausschneiden.Click()
     WaitSlot()
 
-    '///+<li>Move one cell down</li>
     Kontext "DocumentCalc"
+    printlog( "Move down one cell" )
     DocumentCalc.TypeKeys( "<Down>" )
 
-    '///+<li>Click on Paste</li>
     printlog( "Paste" )
     Kontext "Standardbar"
     sleep( 3 ) ' No better solution found yet.
     Einfuegen.Click()
 
     Kontext "DocumentCalc"
+    printlog( "Move up 7 cells, then do <shift down>" )
     DocumentCalc.TypeKeys( "<Up>", 7 )
     DocumentCalc.TypeKeys( "<Shift Down>", 5 )
-    waitslot
+    WaitSlot()
 
-    '///+<li>Select a row in the spreadsheet at random</li>
-    '///+<li>Click on Copy</li>
     printlog( "Copy" )
     Kontext "Standardbar"
     hWaitForObject( Kopieren , 1000 )
     Kopieren.Click()
-    waitslot
-
-    '///+<li>Press right-arrow and <return></li>
+    WaitSlot()
 
     Kontext "DocumentCalc"
+    printlog( "Press right arrow and RETURN" )
     DocumentCalc.TypeKeys( "<Right><Return>" )
-    waitslot
+    WaitSlot()
 
-    '///+<li>Click on Paste</li>
     printlog( "Paste again" )
     Kontext "Standardbar"
     hWaitForObject( Einfuegen , 1000 )
     Einfuegen.Click()
 
-
-    '///</ul>
-
-    '///+<li>Undo / Redo</li>
-
-    '///<ul>
-
-    '///+<li>click on Undo</li>
     printlog( "Undo" )
     hWaitForObject( Undo , 2000 )
     Undo.Click()
     WaitSlot()
     
-    '///+<li>click on Redo</li>
+    printlog( "Redo" )
     hWaitForObject( Redo , 2000 )
     Redo.Click()
     WaitSlot()
 
-    '///</ul>
-
-    '///+<li>Navigator ( on/off )</li>
-
-    '///<ul>
-    '///+<li>Click on Navigator -> on</li>
+    Kontext "Standardbar"
     printlog( "Open Navigator" )
-    Kontext "Standardbar"
     hWaitForObject( NavigatorButton , 1000 )
     NavigatorButton.Click()
 
-    '///+<li>check if the navigator is visible</li>
-
     Kontext "Navigator"
     if ( Navigator.Exists( 1 ) ) then
-        printlog( "Navigator present. Good." )
-        
-        '///+<li>Click on Navigator -> off</li>
         printlog( "Close Navigator" )
         Kontext "Standardbar"
         NavigatorButton.Click()
-
-        '///+<li>Verify that the navigator is closed</li>
-        Kontext "Navigator"
-        if ( Navigator.exists() ) then
-            warnlog( "The navigator is still open" )
-        else
-            printlog( "Navigator is closed. Good." )
-        endif
     else
         warnlog( "Navigator did not open" )
     endif
 
-    '///</ul>
-    
-    '///+<li>Hyperlink dialog ( on / off )</li>
-    '///<ul>
+    Kontext "Navigator"
+    if ( Navigator.exists() ) then
+        warnlog( "The navigator should not be visible" )
+    endif
 
-    '///+<li>Click on Hyperlink dialog  -> on</li>
+    Kontext "Standardbar"
     printlog( "Click <HyperLink> to open the dialog" )
-    Kontext "Standardbar"
     hWaitForObject( HyperlinkDialog , 1000 )
     HyperlinkDialog.Click()
 
-    '///+<li>check if the Hyperlink dialog is visible
-    Kontext "Hyperlink"
-    if ( Hyperlink.Exists( 1 ) ) then
-        printlog( "Hyperlink dialog is open" )
+    for iTabPage = 1 to 4
+        select case iTabPage
+        case 1: Kontext "Hyperlink"
+            if ( Hyperlink.exists() ) then HyperlinkTabID = 1
+            exit for
+        case 2: kontext "TabHyperlinkMailUndNews"
+            if ( TabHyperlinkMailUndNews.exists() ) then HyperlinkTabID = 2
+            exit for
+        case 3: kontext "TabHyperlinkDokument"
+            if ( TabHyperlinkDokument.exists() ) then HyperlinkTabID = 3
+            exit for
+        case 4: kontext "TabHyperlinkNeuesDokument"
+            if ( TabHyperlinkNeuesDokument.exists() ) then HyperlinkTabID = 4
+            exit for
+        case default:
+            HyperlinkTabID = 0
+        end select
+    next iTabPage
+
+    if ( HyperlinkTabID > 0 ) then    
+    
+        if ( HyperlinkTabID <> 1 ) then
+            qaerrorlog( "This is not the internet tabpage, did you " & _
+                        "kill the userlayer before running the test?" )
+        endif
         
-        '///+<li>Click on HyperLink again to close the dialog</li>
+        kontext "Standardbar"
         printlog( "Click <HyperLink> to close" )
-        kontext "Standardbar"
         HyperlinkDialog.Click()
         WaitSlot()
-        kontext "HyperLink"
-        if ( HyperLink.exists() ) then
-            warnlog( "Hyperlink dialog not closed" )
-        else
-            printlog( "Hyperlink dialog has been closed. Good." )
-        endif
     else
-        warnlog( "Hyperlink dialog is not open" )
+        warnlog( "#i104704# - Insert Hyperlink dialog cannot be accessed" )
+        Kontext "Standardbar"
+        HyperlinkDialog.Click()
     endif
 
-    '///+<li>click on Hyperlink dialog  -> off
-    '///</ul>
-
-    '///+<li>Gallery ( on / off )</li>
-
-    '///<ul>
-    '///+<li>Click on the &quot;Gallery&quot; button</li>
+    Kontext "Standardbar"
     printlog( "Gallery button" )
-    Kontext "Standardbar"
-    hWaitForObject( GalleryButton , 1000 
+    hWaitForObject( GalleryButton , 1000 )
     GalleryButton.Click()
     
     kontext "Gallery"
     if ( Gallery.exists( 3 ) ) then
-        printlog( "Gallery is open. Good." )
-        
-        '///+<li>Close the Gallery again</li>
         printlog( "Gallery button again, to close" )
         kontext "StandardBar"
         GalleryButton.click()
-        waitslot
+        WaitSlot()
         
         kontext "Gallery" 
         if ( Gallery.exists() ) then    
             warnlog( "Gallery did not close " )
-        else
-            printlog( "Gallery is closed" )
         endif
     else
         warnlog( "The Gallery did not open" )
     endif
-    '///</ul>
-        
-    '///+<li>Cleanup: Close both documents</li>
-    do while( getDocumentCount > 0 ) 
-        hDestroyDocument()
-    loop
 
-    
-    '///+<li>Cleanup: Delete the workfile</li>
+    printlog( "Close all documents and delete files" )        
+    hDestroyDocument()
     hDeleteFile( sFileOut )
 
-    '///</ul>
-
 endcase
 
 

testautomation/framework/required/input/mailmerge_data.odb

Binary file modified.

testautomation/framework/tools/includes/options_tools.inc

 '*
 '\******************************************************************************
 
-
 sub GetPathList ( ls1 () as String, ls2 () as String, ls3 () as String )
 
     Dim lsInterim ( 50 ) as String
     '///mouse test for view options
 
     Kontext "DocumentWriter"
-    DocumentWriter.MouseMove 50, 50
-    DocumentWriter.OpenContextMenu
-    Sleep 1
+    DocumentWriter.MouseMove( 50, 50 )
+    DocumentWriter.OpenContextMenu()
+    Sleep( 1 )
 
     Kontext "DocumentWriter"
     DocumentWriter.MouseMove 50, 70
-    hMenuClose
+    hMenuClose()
 
 end sub
 
 
 sub modifyColorRGB_PGUP( iColor as Integer )
     'The current color's values are set to maximum (255) for RGB
-    printlog "modifyColorRGB_PGUP:: - change the color by pressing PAGE UP in RGB listboxes."
+    printlog( "modifyColorRGB_PGUP:: - change the color by pressing PAGE UP in RGB listboxes." )
+    
     Kontext "TabFarben"
     Farbe.Select(iColor)
     R.TypeKeys("<PageUp>")
     G.TypeKeys("<PageUp>")
     B.TypeKeys("<PageUp>")
-    printlog("modifyColorRGB_PGUP:: - press 'modify'")
-    Aendern.Click
+    printlog("modifyColorRGB_PGUP:: Press 'modify'")
+    Aendern.Click()
     Sleep (1)
 end sub
 
     ' OUTPUT: 
     'The desired color is selected by name and created.
     'If it already exists, there is a problem
-    printlog( "createNewColor:: - adding a color to the list: '" + aColor(1) + "'"
+    printlog( "createNewColor:: Adding a color to the list: '" + aColor(1) + "'"
     Kontext "TabFarben"
     FarbName.setText(aColor(1))
     R.SetText(aColor(2))
     Sleep(1)
     Hinzufuegen.Click
     Sleep(1)
+    
     Kontext "DuplicateNameWarning"
     if DuplicateNameWarning.Exists then
-        warnlog "createNewColor:: - Color already exists."
+        warnlog "createNewColor:: Color already exists."
         DuplicateNameWarning.OK
         Kontext "NameDlg"
         if NameDlg.Exists then
-            printlog "createNewColor:: - Naming dialog shown. Good, cancelling"
+            printlog "createNewColor:: Naming dialog shown. Good, cancelling"
             NameDlg.Cancel
         else
-            warnlog "createNewColor:: - Naming dialog didn't came up."
+            warnlog "createNewColor:: Naming dialog didn't came up."
         end if
     else
-        printlog "createNewColor:: - New color has been created"
+        printlog "createNewColor:: New color has been created"
     end if
 end sub
 
     ' OUTPUT: array: (1): Name; (2): Red value; (3): Green value; (4): Blue value
     'A RGB color always has four attributes:
     'The name and the three RGB values (0...255)
-    printlog "GetColorRGB:: - determining the current color"
+    printlog( "GetColorRGB:: Determining the current color" )
     FarbModell.Select(1)
-    aColor(1) = FarbName.GetText
-    aColor(2) = R.GetText
-    aColor(3) = G.GetText
-    aColor(4) = B.GetText
-    printlog( "GetColorRGB:: N =" + aColor(1) )
-    printlog( "GetColorRGB:: R =" + aColor(2) )
-    printlog( "GetColorRGB:: G =" + aColor(3) )
-    printlog( "GetColorRGB:: B =" + aColor(4) )
+    
+    aColor(1) = FarbName.GetText()
+    aColor(2) = R.GetText()
+    aColor(3) = G.GetText()
+    aColor(4) = B.GetText()
+    
+    printlog( "GetColorRGB:: N = " & aColor(1) )
+    printlog( "GetColorRGB:: R = " & aColor(2) )
+    printlog( "GetColorRGB:: G = " & aColor(3) )
+    printlog( "GetColorRGB:: B = " & aColor(4) )
 end sub
 
 '*******************************************************************************
     dim i as Integer
     dim bColor(4) as String
 
-    printlog "compareTwoColorsRGB:: - compare saved default color with the current"
+    printlog( "compareTwoColorsRGB:: Compare saved default color with the current" )
     call getColorRGB(bColor()) 
     for i = 1 to 4
         if aColor(i) <> bColor(i) then
-            warnlog "compareTwoColorsRGB:: "+"("+i+") Expected: '" + aColor(i) + "' found: '" + bColor(i) + "'"
+            warnlog( "compareTwoColorsRGB:: " & "(" & i & ") Expected: '" _
+            & aColor( i ) & "' found: '" & bColor(i) & "'" )
         else
-            printlog "compareTwoColorsRGB:: "+"("+i+") OK"
+            printlog( "compareTwoColorsRGB:: " & "(" & i & ") OK" )
         endif
     next i
 end sub

testautomation/global/tools/includes/optional/t_docfuncs.inc

 '*
 '\******************************************************************************
 
-private const VERBOSE = false
+private const VERBOSE = FALSE
 
 function hUseImpressAutopilot( bEnable as boolean ) as boolean
 
     '///<h3>Enable/disable the Impress Autopilot in Tools/Options</h3>
     '///<i>Starting point: Any plain document</i>
     '///<ul>
-    const CFN = "hUseImpressAutopilot::"
+    const CFN = "global::tools::includes::optional::t_docfuncs.inc::hUseImpressAutopilot::"
     
     if ( VERBOSE ) then printlog( CFN & "Enter" )
 
     '///<h3>Function to close the navigator</h3>
     '///<i>Starting point: Any document</i>
     '///<ul>
-    const CFN = "hCloseNavigator::"
+    const CFN = "global::tools::includes::optional::t_docfuncs.inc::hCloseNavigator::"
     
     if ( VERBOSE ) then printlog( CFN & "Enter" )
     
     '///<u>Using file: global/input/applications.txt as reference</u>
     '///<ul>
     
-    const CFN = "hNumericDocType::"
+    const CFN = "global::tools::includes::optional::t_docfuncs.inc::hNumericDocType::"
     
     dim sFile as string
         sFile = gTesttoolPath & "global\input\applications.txt"
     dim sList( 100 ) as string
     dim iDocTypes as integer
     
-    'printlog( CFN & "Enter" )
+    if ( VERBOSE ) then printlog( CFN & "Enter" )
     
     '///+<li>Retrieve matching list from file</li>
     hGetDataFileSection( sFile , sList() , "application" , "" , "" )
     '///+<li>Set a plain text name as returnvalue for the function</li>
     hGetDataFileSection( sFile , sList() , "application_names" , "" , "" )
     hNumericDocType() = hGetValueForKeyAsString( sList() , gApplication )
-    'printlog( CFN & "Exit" )
+    if ( VERBOSE ) then printlog( CFN & "Exit" )
     '///</ul>
 
 end function
     
     use "global\tools\includes\optional\t_stringtools.inc"
 
-    const CFN = "hIdentifyWriterDoc::"
+    const CFN = "global::tools::includes::optional::t_docfuncs.inc::hIdentifyWriterDoc::"
     dim cIdentifier as string
     dim irc as integer ' some temporary returnvalue
     
     '///<ul>
     
 
-    const CFN = "hCreateDocument::"
+    const CFN = "global::tools::includes::optional::t_docfuncs.inc::hCreateDocument::"
 
     dim iDocCountBefore as integer 
     dim iDocCountAfter as integer
     '///<u>Description</u>:
     '///<ul>
     
-    const CFN = "hDocumentTypeKeys::"
+    const CFN = "global::tools::includes::optional::t_docfuncs.inc::hDocumentTypeKeys::"
     dim brc as boolean
         brc = true
         
 
 function hDestroyDocument() as boolean
 
+    const CFN = "global::tools::includes::optional::t_docfuncs.inc::hDestroyDocument: "
+    dim iDocCount as integer : iDocCount = getDocumentCount()
+    hDestroyDocument() = false
+    
+    if ( iDocCount = 0 ) then exit function
+    if ( VERBOSE ) then printlog( CFN & "In.: Open: " & iDocCount )
 
-    '///<h3>Enhanced version of hCloseDoc()</h3>
-    '///<i>Close a document and print some additional information to the log to
-    '///+ ease debugging tests which handle a lot of documents</i><br><br>
-
-    '///<u>Parameter(s):</u><br>
-    '///<ol>
-    '///+<li>No input parameters</li>
-    '///</ol>
-
-
-    '///<u>Returns:</u><br>
-    '///<ol>
-    '///+<li>Return value description</li>
-    '///<ul>
-    '///+<li>TRUE: The document was closed successfully (-1 open document)</li>
-    '///+<li>TRUE: We are on backing window, no document closed</li>
-    '///+<li>FALSE: The number of documents is unchanged, closing failed</li>
-    '///+<li>FALSE: If any error occurred during close (open dialogs etc.)</li>
-    '///</ul>
-    '///</ol>
-
-    const CFN = "hDestroyDocument::"
-    dim brc as boolean 'a multi purpose boolean returnvalue
-    dim irc as integer
+    hUseAsyncSlot( "FileClose" )
     
-    dim iOpenDocsBefore as integer
-    dim iOpenDocsAfter as integer
-    dim iAttemptToClose as integer
-
-    '///<u>Description:</u>
-    '///<ul>
-    '///+<li>Get the current number of documents</li>
-    iOpenDocsBefore = getDocumentCount
-    if ( VERBOSE ) then printlog( CFN & "Open documents before close: " & iOpenDocsBefore )
+    Kontext "Active"
+    if ( Active.Exists( 2 ) ) then
+        printlog( "Msgbox: " & Active.getText() )
+        try
+            Active.No
+        catch
+            Active.Click ( 202 )
+        endcatch
+        wait( 1000 )
+    end if
     
-    '///+<li>Handle special case of 0 open documents</li>
-    '///<ul>
-    if ( iOpenDocsBefore = 0 ) then
-    
-        '///+<li>If gApplication has been set to BACKGROUND explicitly we do a restart</li>
-        if ( ucase( gApplication ) = "BACKGROUND" ) then
-        
-            do while ( getDocumentCount > 0 ) 
-                hCloseDocument()
-            loop
- 
-            iOpenDocsAfter = getDocumentCount
-            printlog( CFN & "Open documents after restart: " & iOpenDocsAfter )
-            
-            if ( iOpenDocsAfter = 0 ) then
-                hDestroyDocument() = true
-                exit function
-            else
-                warnlog( CFN & "There should be 0 open documents" )
-                hDestroyDocument() = false
-                exit function
-            endif
-            
-        '///+<li>Otherwise just do not close the backing window - do nothing</li>
-        else
-            printlog( CFN & "On backing window, no action taken" )
-            hDestroyDocument() = true
-            exit function
-        endif
-        
-    endif
-    '///</ul>
-                
-    '///+<li>Handle more than one open document - handle FileOpen/FileSave dialogs</li>
-    '///<ul>
-    brc = true
-    for iAttemptToClose = 1 to 3
-    
-        '///+<li>FileOpen</li>
-        kontext "OeffnenDlg"
-        if ( OeffnenDlg.exists( 1 ) ) then
-            qaerrorlog( CFN & "Closed FileOpen dialog. This was not expected." )
-            OeffnenDlg.cancel()
-            brc = false
-        endif
-        
-        '///+<li>FileSave</li>
-        kontext "SpeichernDlg"
-        if ( SpeichernDlg.exists( 1 ) ) then
-            qaerrorlog( CFN & "Closed FileSave dialog. This was not expected." )
-            brc = false
-        endif
-        
-        '///+<li>Check for any messagebox (some might still be floating around)</li>
-        '///<ul>
-        kontext "active"
-        if ( active.exists( 1 ) ) then
-        
-            qaerrorlog( CFN & "Closed unexpected messagebox: " & active.getText() )
-            
-            '///+<li>Try to close the dialog clicking on &quot;OK&quot;</li>
-            try
-                active.ok()
-                printlog( CFN & "Clicked <OK> to close the dialog" )
-            catch
-                printlog( CFN & "Failed using OK" )
-            endcatch
-            
-            '///+<li>Try to close the dialog clicking on &quot;YES&quot;</li>
-            try
-                active.yes()
-                printlog( CFN & "Clicked <YES> to close the dialog" )
-            catch
-                printlog( CFN & "Failed using <YES>" )
-            endcatch
-            
-            brc = false
-            
-        endif
-        '///</ul>
-        
-        '///+<li>Close the current document using hCloseDocument()</li>
-        call hCloseDocument()
-        
-        '///+<li>Verify that the document has indeed been closed, exit function if yes</li>
-        iOpenDocsAfter = getDocumentCount
-        if ( iOpenDocsAfter = ( iOpenDocsBefore - 1 ) ) then
-            printlog( CFN & "Document closed. Currently open: " & iOpenDocsAfter )
-            hDestroyDocument() = brc
-            exit function
-        else
-            qaerrorlog( CFN & "Failed to close document, retrying" )
-            brc = false
-        endif
-        
-    next iAttemptToClose    
-    '///</ul>
-    '///</ul>
-
-    if ( VERBOSE ) then printlog( CFN & "Exit with result: " & brc )
-
-    hDestroyDocument() = brc
+    if ( getDocumentCount() = iDocCount ) then hCloseDocument()
+    if ( getDocumentCount() = iDocCount - 1 ) then hDestroyDocument() = true
+    if ( VERBOSE ) then printlog( CFN & "Out: Open: " & getDocumentCount() )
 
 end function
 
     '///</ul>
     '///</ol>
 
-    const CFN = "hInitSingleDoc::"
+    const CFN = "global::tools::includes::optional::t_docfuncs.inc::hInitSingleDoc::"
     dim cOldApplication as string
 
     '///<u>Description:</u>
     '///</ul>
     '///</ol>
 
-    const CFN = "hInitBackingMode::"
+    const CFN = "global::tools::includes::optional::t_docfuncs.inc::hInitBackingMode::"
 
     '///<u>Description:</u>
     '///<ul>
     '///</ul>
     '///</ol>
 
-    const CFN = "hInitWriteDocIdentifier::"
+    const CFN = "global::tools::includes::optional::t_docfuncs.inc::hInitWriteDocIdentifier::"
 
     '///<u>Description:</u>
     '///<ul>

testautomation/global/tools/includes/required/t_filters.inc

 
     const CFN = "global::tools:includes:required::t_filters.inc::hGetFilternameExtension(): "
 
-    'Initializize UNO comminication
+    'Initializize UNO communication
     oUno = hGetUNOService( TRUE )
 
     'Using the TypeDetection service

testautomation/global/tools/includes/required/t_tools1.inc

 private SLEEP_CALLS_SUM as integer
 private SLEEP_TIME_USED as integer
 
-private const VERBOSE = true
+private const VERBOSE = FALSE
 
 function GetClipboardText as string
 
 
 function Sleep( optional _iSeconds as integer ) as integer
 
+    const CFN = "global::tools::includes::required::Sleep(...): "
+    
+    const STATUS_NO_DELAY          = 0
+    const STATUS_TIMEOUT_EXCEEDED  = 1
+    const STATUS_WAITSLOT_CRASHED  = 2
+    const STATUS_CLASSIC_WAIT_USED = 3
+
+    ' This is the "classic" behavior of the sleep function. If you did not set 
+    ' GLOBAL_USE_NEW_SLEEP to TRUE in your .bas file, this will be used.
     if ( not GLOBAL_USE_NEW_SLEEP ) then
         if ( IsMissing( _iSeconds ) ) then
             wait( 1000 )
         else
             wait( _iSeconds * 1000 )
         endif
-        sleep() = 0
+        sleep() = STATUS_CLASSIC_WAIT_USED
         exit function
     endif
 
     ' 2 = Wait() was used (classic method, fallback).
     ' 3 = Wait() was used (forced old behavior)
 
-    const CFN = "global::tools::includes::required::Sleep(...): "
-    
-    const STATUS_NO_DELAY          = 0
-    const STATUS_TIMEOUT_EXCEEDED  = 1
-    const STATUS_WAITSLOT_CRASHED  = 2
-    const STATUS_CLASSIC_WAIT_USED = 3
-
     dim iMilliseconds as integer
     dim iStatus as integer       : iStatus      = 0
     dim lBegin as long           : lBegin       = GetSystemTicks
     dim iSeconds as integer      : iSeconds     = 5
     dim iSystemDelay as integer  : iSystemDelay = 1000
     dim iTimeDiff as long        : iTimeDiff    = 0
+    
+    ' On Solaris we are a little slower, so we increase the system delay a little
+    if ( instr( lcase( gtSysName ) , "solaris" ) > 0 ) then
+        iSystemDelay = 1500
+    endif
 
     ' Override default wait time (5 seconds) if parameter is given
     if ( not IsMissing( _iSeconds ) ) then
     ' Find out how long it took, warn if time was zero (sleep most likely not required)
     iTimeDiff = GetSystemTicks - lBegin
     if ( iTimeDiff = 0 ) then
-        QAErrorLog( CFN & "Zero time. Please consider removing Sleep() statement" )
+        printlog( CFN & "Zero time. Please consider removing Sleep() statement" )
     endif
     
     if ( VERBOSE ) then
         & iTimeDiff & " ms, rc=" & iStatus )
         select case iStatus
         case STATUS_TIMEOUT_EXCEEDED : 
-            QAErrorLog( CFN & "Timeout exceeded. Please increase the delay" )
+            printlog( CFN & "Timeout exceeded." )
         case STATUS_WAITSLOT_CRASHED : 
-            QAErrorlog( CFN & "Used Wait(n). WaitSlot() failed." )
+            printlog( CFN & "Used Wait(n). WaitSlot() failed." )
         case STATUS_CLASSIC_WAIT_USED : 
-            QAErrorLog( CFN & "Used Wait(n). Classic behavior forced" )
+            printlog( CFN & "Used Wait(n). Classic behavior forced" )
         end select
     endif
     Sleep() = iStatus
             case "filesaveall"                    : FileSaveAll( "SynchronMode", TRUE )
             case "fileexport"                     : FileExport
             case "filereload"                     : FileReload( "SynchronMode", TRUE )
+            case "fileopen"                       : FileOpen
             
             case "editdoc"                        : EditDoc
             case "editcopy"                       : EditCopy

testautomation/spreadsheet/required/includes/c_upd_insertmenu.inc

     '/// Open 'Hyperlink' – dialog via 'Insert – Hyperlink'
     printlog " Open 'Hyperlink' – dialog via 'Insert – Hyperlink'"
     InsertHyperlink
+    WaitSlot( 5000 )
+    
     Kontext "Hyperlink"
     '/// Switch to category 'Internet' (first one)
     printlog " Switch to category 'Internet'"

testautomation/writer/required/includes/w_001_.inc

 
 testcase tFileNewLabels
 
-Warnlog "#i102218# - tFileNewLabels outcommented due to bug."
+QAErrorLog "#i102218# - tFileNewLabels outcommented due to bug."
 goto endsub
 
     Dim iSheetFormat as integer
 
 testcase tFileNewBusinessCards
 
-Warnlog "#i102218# - tFileNewBusinessCards outcommented due to bug."
+QAErrorLog "#i102218# - tFileNewBusinessCards outcommented due to bug."
 goto endsub
 
     Dim iFormat as integer
     
     
     PrintLog "File / Save as ..."
-    FileSaveAs
+    hUseAsyncSlot( "FileSaveAs" )
     
     Kontext "SpeichernDlg"
     if ( SpeichernDlg.exists( 2 ) ) then