Forum Discussion

Morgan's avatar
Morgan
Frequent Contributor
10 years ago

Log.SaveResultAs producing error... why?

Hi,

 

The following code is producing an error that IsHTML is an unknown name...  what am I doing wrong?

 

function SaveOutResults;
var strDesktop, sPath;
begin
// Specifies the path to the file that will contain the test results in the HTML format

strDesktop := Sys.OleObject('WScript.Shell').SpecialFolders('Desktop');

sPath := strDesktop + '\' + Project.Variables.ScriptRunning + ' Results';

If aqFile.Exists(sPath)
then
begin
aqFileSystem.DeleteFolder(sPath, true);
Log.Message('Folder existed previously - deleted');
end;

Log.SaveResultsAs(sPath,IsHTML);
Log.Message('Results for ' + Project.Variables.ScriptRunning + ' saved');
end;

 

Thanks a lot,

Morgan

 

1 Reply

  • Morgan's avatar
    Morgan
    Frequent Contributor

    Okay, I got it working if I use the 0, 1, or 2 values for the LogFormat field (no idea why but it works).

     

    One more question on SaveResultsAs....  is there anyway to produce JUST the .htm file without the extra supplemental files or does it not function like that?  I assume for a space-saving measure, this takes up less room than creating a MHT file...?  Correct?

     

    Thanks,

    Morgan