Commits

Anonymous committed aedc74e

CWS-TOOLING: integrate CWS automation310c_DEV300
2009-03-16 13:33:04 +0100 jsk r269530 : #i100184
2009-03-16 13:31:17 +0100 jsk r269528 : #i100232#

  • Participants
  • Parent commits 5c6327d

Comments (0)

Files changed (3)

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

     '///+<li>Path to extension (String)</li>
     '///<ul>
     '///+<li>The path has to be fully qualified</li>
-    '///+<li>The path may be platform specifix</li>
+    '///+<li>The path may be platform specific</li>
     '///</ul>
     
     '///+<li>Flags (String), defaults underlined</li>
     if ( instr( flags, "license" ) <> 0 ) then
         if ( bLogs ) then printlog( CFN & "Testing software license dialog" )
         kontext "ExtensionSoftwareLicenseAgreement"
-        if ( ExtensionSoftwareLicenseAgreement.exists( 1 ) ) then
+        if ( ExtensionSoftwareLicenseAgreement.exists( 5 ) ) then
             if ( bLogs ) then printlog( CFN & "Software license dialog found" )
             if ( instr( flags , "denylicense" ) <> 0 ) then
                 printlog( CFN & "Cancelling software license dialog" )
             if ( instr( flags , "nolicense" ) <> 0 ) then
                 printlog( CFN & "No license dialog displayed. Good." )
             else
-                printlog( CFN & "Expected license dialog is missing" )
+                warnlog( CFN & "Expected license dialog is missing" )
             endif
         endif
     else

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

 
 private const VERBOSE = false
 
-function hDeleteFile( cFileOrig as string ) as boolean
-
-    const CFN = "hDeleteFile::"
-    dim cHome as string
-        cHome = gOfficePath & "user"
-        cHome = convertpath( cHome )
-    dim cFile as string
-        cFile = convertpath( cFileOrig )
-
-    '///<h3>Delete a file</h3>
-    '///<i>In many cases it is a good idea to use this function outside the testcase.<br>
-    '///+ You should always evaluate the returncode</i><br>
-    '///<u>Input</u>:
-    '///<ol>
-    '///+<li>Filename (string)</li>
-    '///<ul>
-    '///+<li>The function converts the path to system specific syntax (convertpath)
-    '///+ but does <b>not</b> modify the input parameter</li>
-    '///</ul>
-    '///</ol>
-    '///<u>Returns</u>:
-    '///<ol>
-    '///+<li>Errorstatus (boolean)</li>
-    '///<ul>
-    '///+<li>TRUE: File was deleted/does not exist</li>
-    '///+<li>FALSE: File could not be deleted/any other error</li>
-    '///</ul>
-    '///</ol>
-    '///<u>Description</u>:
-    '///<ul>
-    
-
-    ' this function tries to delete a file and does some very basic error-
-    ' handling. Returns 'true' on success, only error while deleting returns
-    ' 'false', if the file does not exist, it is considered to be successfully
-    ' deleted.
-    ' i introduced this function due to a number of cases where deleting files
-    ' actually failed because of weird code or situations where the user lacks
-    ' accessrights to files are not handled at all.
-    
-    '///+<li>We may never delete a file outside gOfficePath/user/work</li>
-    if ( instr( cFile , cHome ) = 0 ) then
-        qaerrorlog( CFN & "Trying to delete file outside (default)homedir -> forbidden" )
-        qaerrorlog( CFN & "Home: " & cHome )
-        qaerrorlog( CFN & "File: " & cFile )
-        hDeleteFile() = false
-        exit function
-    endif
-    
-    cFile = convertpath( cFile )
-
-    '///+<li>Check that the file exists</li>
-    if ( FileExists( cFile ) ) then
-
-        '///+<li>Use kill to delete</li>
-        try
-
-            kill( cFile )
-
-            '///+<li>Verify that the file does not exist anymore</li>
-            if ( FileExists( cFile ) ) then
-                warnlog( CFN & "File was not deleted: " & cFile )
-                hDeleteFile() = false
-            else
-                if ( VERBOSE ) then printlog( CFN & "File successfully deleted: " & cFile )
-                hDeleteFile() = true
-            endif
-
-        catch
-
-            '///+<li>in very rare cases 'kill' fails and can be handled this way</li>
-            qaerrorlog( CFN & "Deleting file failed: " & cFile )
-            hDeleteFile() = false
-
-        endcatch
-
-    else
-
-        '///+<li>write some text to the log if the file does not exist</li>
-        printlog( CFN & "Nothing to do." )
-        hDeleteFile() = true
-
-    endif
-    
-    '///</ul>
-
-end function
-
-'*******************************************************************************
-
 function hHandleActivesOnLoad( iTries as integer , iAdd as integer ) as boolean
 
     '///<h3>Handle any dialogs that might pop up when loading a file</h3>

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

 '
 '-------------------------------------------------------------------------------
 '
+function hDeleteFile( cFileOrig as string ) as boolean
+
+    const CFN = "global::tools::includes::required::t_files.inc::hDeleteFile():"
+    dim cHome as string
+        cHome = gOfficePath & "user"
+        cHome = convertpath( cHome )
+    dim cFile as string
+        cFile = convertpath( cFileOrig )
+
+    '///<h3>Delete a file</h3>
+    '///<i>In many cases it is a good idea to use this function outside the testcase.<br>
+    '///+ You should always evaluate the returncode</i><br>
+    '///<u>Input</u>:
+    '///<ol>
+    '///+<li>Filename (string)</li>
+    '///<ul>
+    '///+<li>The function converts the path to system specific syntax (convertpath)
+    '///+ but does <b>not</b> modify the input parameter</li>
+    '///</ul>
+    '///</ol>
+    '///<u>Returns</u>:
+    '///<ol>
+    '///+<li>Errorstatus (boolean)</li>
+    '///<ul>
+    '///+<li>TRUE: File was deleted/does not exist</li>
+    '///+<li>FALSE: File could not be deleted/any other error</li>
+    '///</ul>
+    '///</ol>
+    '///<u>Description</u>:
+    '///<ul>
+
+    ' this function tries to delete a file and does some very basic error-
+    ' handling. Returns 'true' on success, only error while deleting returns
+    ' 'false', if the file does not exist, it is considered to be successfully
+    ' deleted.
+    ' i introduced this function due to a number of cases where deleting files
+    ' actually failed because of weird code or situations where the user lacks
+    ' accessrights to files are not handled at all.
+    
+    '///+<li>We may never delete a file outside gOfficePath/user/work</li>
+    if ( instr( cFile , cHome ) = 0 ) then
+        qaerrorlog( CFN & "Trying to delete file outside (default)homedir -> forbidden" )
+        qaerrorlog( CFN & "Home: " & cHome )
+        qaerrorlog( CFN & "File: " & cFile )
+        hDeleteFile() = false
+        exit function
+    endif
+    
+    cFile = convertpath( cFile )
+
+    '///+<li>Check that the file exists</li>
+    if ( FileExists( cFile ) ) then
+
+        '///+<li>Use kill to delete</li>
+        try
+
+            kill( cFile )
+
+            '///+<li>Verify that the file does not exist anymore</li>
+            if ( FileExists( cFile ) ) then
+                warnlog( CFN & "File was not deleted: " & cFile )
+                hDeleteFile() = false
+            else
+                if ( VERBOSE ) then printlog( CFN & "File successfully deleted: " & cFile )
+                hDeleteFile() = true
+            endif
+
+        catch
+
+            '///+<li>in very rare cases 'kill' fails and can be handled this way</li>
+            qaerrorlog( CFN & "Deleting file failed: " & cFile )
+            hDeleteFile() = false
+
+        endcatch
+
+    else
+
+        '///+<li>write some text to the log if the file does not exist</li>
+        printlog( CFN & "Nothing to do." )
+        hDeleteFile() = true
+
+    endif
+    
+    '///</ul>
+
+end function
+'
+'-------------------------------------------------------------------------------
+'
 function hFileOpen( cFile as string ) as boolean
 
     dim sFile as string : sFile = convertToURL( convertpath( cFile ) )