Forum Discussion

MulgraveTester's avatar
MulgraveTester
Frequent Contributor
9 years ago

log.SaveResultsAs

When using the log.SaveResultsAs command each call exports the log file from the beginning of the test run, rather than from the last call to log.SaveResultsAs. Is there a way to reset the log so that each call to log.SaveResultsAs only exports the portion since the last log export?

 

Example code (VBS):

This code exports 5 log files with messages 1-5, 1-10, 1-15, 1-20 and 1-25

I want to be able to export 5 log files with messages 1-5, 6-10, 11-15, 16-20 and 21-25

 

sub Testlog

  for j = 0 to 4
    for i = 1 to 5
      log.message("Message " & i + j*5)
    next

    call log.SaveResultsAs("C:\Temp\test" & j & ".mht", lsMHT, false)
  next
end sub

  • Hi,

     

    No, this is not possible according to my knowledge.

  • AlexKaras's avatar
    AlexKaras
    Champion Level 3

    Hi,

     

    No, this is not possible according to my knowledge.

  • Ryan_Moran's avatar
    Ryan_Moran
    Valued Contributor

    Alternatively you can create your own log file.

    Test Complete provides enough functionality to save images locally and to write errors to a text file.

    • Colin_McCrae's avatar
      Colin_McCrae
      Community Hero

      Or you could post-process the MHT file.

       

      But that's probably almost as much work as writing your own logging system ....

      • GAutomation's avatar
        GAutomation
        Frequent Contributor

        Call log.SaveResultsAs(path,2,false,2)

         

        when i open the .mht file in IE brwser. It gives me this encoded value not any images. 

        iVBORw0KGgoAAAANSUhEUgAAAewAAAAeCAYAAADuBy3GAAAI90lEQVR4nO2cP2ziWB7HX/l0laVr
        XNC4dEm3bindgTINxTUutqCkJCOhXUpGWuloboUyM4WlKY7SpTUnneTSOl1hTRPPblbZtxNF55vL
        Zpw/kO8VtknCmAD2MyTZ30f6iUDMez8TeB//3nuBMYIgCIIgCIIgCIIgCIIgCIIgCIIgCIIgCIIg
        CILYFn9/9zdsGtQ2tU1tM9bv97EqdtHW4vkXed5iG2VfK+L5g5LsOv8nwaYfuk0Hy3/8679rx6Zt
        V5l3lW0/1deE8r5Pv99/cADaVNiy2lo8/yLPW6cNEjZxl+y92nYNdL0WOvMwYXkNtF0DLVeH6Wjz
        MCaqVGFHoYUotCp7X8amCXS7QKcDtFqAYSDWtO19Dp7qYEnCprx3nXeVwmYLBUsRYWfnUoW0ZbRZ
        a/axbpTta5d97pKeIzD0IgzcCL00uo5AZxJC77pSzxEATEfDJBzCE5N5OGKESTjAKOhg4LfQ9Yw0
        6mi7OnRbkSZs4XPEsQLH6Uk9t0jXE0F3u0CvlwjbsoB2ey5uoarVv2cWPnhIgy17rOhgmbVzd3Bc
        fOwxDfJVtr0j8X31O1l5s4W/q6S8lz6/bN55+ZKw12tr2f0i1Jp9fDz6GcfHSQjxC05OfsXp6SdE
        0Sk+f45wdvZZurAPDz/g8PADjo5CHB2FOD4+wm+/Hd/r9zkJOwTuxT8/zfDXf59VJmxPTOAKG3Y4
        wDjoYhx0MfAtDPwWen4DXc9Ax6vDSoWtjeUIOxIW4pgDUCA8jk5nKOX8YlVFbJoQnQ6EZSGq1xGr
        KmJVRaTrCE0TUaOBWNMQKkq175slwsaS+6WFzdLBcvE+CbtSYeddiEnJm+VciEkUdump2GXCzsu5
        qLDZ/c/JXLZFhC2jLcaqEazMCwDGEnk+JGvtrYbz8zPUmn28ePkGL16+kXKRsErW2UWCrD53Sb3n
        QwAQC7L+i/sf6B27EmFnsh4Fna9knQi7BYEQ7XR6XB3KEzZiDkAFYoZ2uyNH2LqOyDTh2zZ820Zo
        GBCcQzAGr9GAZ9sIBgMIXd+6sBnLGTBWHP9g23kDJcuRdclBPrftu7kXbXudDTcyLmIWowLxSRd2
        Xr5/pLwfc4X9lIS9TNbaWw1x/AW1Zh/n52fShL1K1ufnv0vtM49tTVXXex7qPQ9614HesZOwbOjW
        GGp7VJGwxytlLRCi5SZr2DKEHQkLkeBotTgaDQVxxKRU2YIxxJqGqF6HGI8BAIHjwDcM+KYJ33UB
        AGIwQKhp8DmHbxjVSfupDpZVX2gs3n9od+wjvYhhOW2vOr5w3hULW9rrvSr35yDsKjeJydxoVmv2
        IcQv0N5qubLW3mq4vLxANnX+zbc/4NW793j17n3hHDJhPyTr7CLh8KePUvrMY5tT1Zopt5JeRiZs