Forum Discussion

c_abhireddy's avatar
13 years ago

Writing messages in bold to the test log

Is there anyway of writing a message in bold text in Test complete log file? I was thinking, if I assign high priority to a message then it will be displayed in bold or different colour to catch viewers attention.









Regards,

Abhilash





















Regards,

Anhilash

2 Replies

  • jorgesimoes1983's avatar
    jorgesimoes1983
    Regular Contributor
    You can use something like this:







    function CorrectRGBComponent(component)


    {


      component = aqConvert.VarToInt(component);


      if (component < 0)


        component = 0;


      else


        if (component > 255)


          component = 255;


      return component;


    }


     


    function RGB(r, g, b)


    {


      r = CorrectRGBComponent(r);


      g = CorrectRGBComponent(g);


      b = CorrectRGBComponent(b);


      return r | (g << 8) | (b << 16);


    }


     


    function msg(text, addinfo, backgroundcolor, textcolor)


    {


      var Attr;


      Attr = Log.CreateNewAttributes();


      Attr.Bold = true;


      Attr.Italic = true;


      Attr.FontColor = RGB(192, 0, 0);


      Attr.BackColor = RGB(255, 255, 0);


     


          Log.Message(text, addinfo, pmNormal, Attr);


      }


    }