garyschechter's avatar
garyschechter
Occasional Contributor
4 years ago
Status:
New Idea

Log Folder Items, Set the Icon while inside the stack (or auto detect on some hiearchy)

I thought this should just be a feature already and I posted asking for help to get it to work.

 

https://community.smartbear.com/t5/TestComplete-General-Discussions/Log-Folder-Icon-Checkpoint-Over-Message-Javascript/m-p/200736#M37434

 

The log folders are real nice for cleaning up the logs but they only change Icon's if the Folder contains an Error or a Warning.    I want LogFolders to show a green if it contains a checkpoint.  A common sense order of importance Error > Warning > Checkpoint > Message.   Instead it's showing Error > Warning > Message.

 

I think it should even auto detect based on the Log item's priority that has been set.

 

Or just a method to hit  ie,  Log.CurrentStack(iconWarning, priorityHigh);

 

 

function TestScriptLog()
{ 
  Log.AppendFolder("This folder Icon should be an Error");
  Log.Message("Informational in Folder","",pmNormal);
  Log.Checkpoint("Checkpoint in Folder","",pmNormal);
  Log.Warning("Warning in Folder","",pmNormal);
  Log.Error("Error in Folder","",pmHighest);
  Log.PopLogFolder();
  
  Log.AppendFolder("This folder Icon should be an Error");
  Log.Message("Informational in Folder");
  Log.Checkpoint("Checkpoint in Folder");
  Log.Warning("Warning in Folder");
  Log.Error("Error in Folder");
  Log.PopLogFolder();
  
  Log.AppendFolder("This folder Icon should be a Warning");
  Log.Message("Informational in Folder","",pmNormal);
  Log.Checkpoint("Checkpoint in Folder","",pmNormal);
  Log.Warning("Warning in Folder","",pmHighest);
  Log.PopLogFolder();
  
  Log.AppendFolder("This folder Icon should be a Warning");
  Log.Message("Informational in Folder");
  Log.Checkpoint("Checkpoint in Folder");
  Log.Warning("Warning in Folder");
  Log.PopLogFolder();  
  
  Log.AppendFolder("This folder Icon should be a Checkpoint");
  Log.Message("Informational in Folder","",pmNormal);
  Log.Checkpoint("Checkpoint in Folder","",pmHighest);
  Log.PopLogFolder();
  
  Log.AppendFolder("This folder Icon should be a Checkpoint");
  Log.Message("Informational in Folder");
  Log.Checkpoint("Checkpoint in Folder");
  Log.PopLogFolder();
    
  Log.AppendFolder("This folder Icon should be an Informational");
  Log.Message("Informational in Folder","",pmHighest);
  Log.PopLogFolder();
  
  Log.AppendFolder("This folder Icon should be an Informational");
  Log.Message("Informational in Folder");
  Log.PopLogFolder();
  
}

 

1 Comment

  • RLRE's avatar
    RLRE
    Occasional Contributor

    Anonymous: It would be enough if I would be able to set the icon for the directory itself, somehow. An automatism is not absolutely necessary.