Forum Discussion

vthomeschoolmom's avatar
vthomeschoolmom
Super Contributor
14 years ago

Log.File and then Log.SaveResultsAs

In my script, I have a line



Log.File sFullyQualifiedName, "Second Report File Saved"  



In which I attach a file for evidence of successful test completion. When I observe the log Test Complete, there is a link to the file. Lovely!



Call log.SaveResultsAs(logname, 2)    '2 is MHT format  



When I look at the resultant MHT file, there is a link column but for thie logged file, there is no linked item. Picture is, of course, empty. But the pics that were included in the log are added to the MHT just fine.





How do I gt the file in the log to save away with the rest of the log information to save with my test evidence? Thanks!





  • Hi Lane,





    You can export your logs to unpacked storage instead of MHT and files will be opened in this case without problems. Please let me know if this solution works for you.
  • No doubt I am being dumb, but what, precisely, do you mean by unpacked storage? HTML stores the files separately. Is that what you mean?

  • Hi Lane,





    Yes. In this case all files will be stored separately and the browser will be able to open them.
  • Nope SaveResultAs htm (parameter 2 value 1) also does not contain a link to my files logged with Log.File.



    This is Test Complete v7.2



    This is a bummer! Am I doing something wrong> The logged pictures work just fine.

  • Hi Lane,





    This is Test Complete v7.2
    This explain everything. TestComplete 7 does not include files to exported logs. You need to upgrade to TestComplete 8 in order to get this functionality.