Forum Discussion
- SmartBear_SuppoSmartBear Alumni (Retired)Hi Holly,
sorry, this isn't currently possible.. please add a feature request to the corresponding Board here detailing your requirements and it will be in our backlog
regards!
/Ole
eviware.com - Holly_GregerContributorGreat, I'll do that. Thanks
- OVFrequent Contributor
// Edit log messages
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 Pass(Msg)
{
var Attr;
Attr = Log.CreateNewAttributes();
Attr.FontColor = RGB(22, 20, 23);
Attr.BackColor = RGB(170, 227, 162);
// Passes the LogAttributes object to the Message function
Log.Message("PASS - " + Msg, "", pmNormal, Attr);
}// Update the log file with the FAIL info and clore it red
function Fail(Msg){
var Attr;
Attr = Log.CreateNewAttributes();
Attr.FontColor = RGB(251, 251, 251);
Attr.BackColor = RGB(221, 33, 60);
// Passes the LogAttributes object to the Message function
Log.Error("FAIL - " + Msg, "", pmNormal, Attr);
}
function Information(Msg)
{
var Attr;
Attr = Log.CreateNewAttributes();
Attr.FontColor = RGB(22, 20, 23);
Attr.BackColor = RGB(197, 197, 198);
// Passes the LogAttributes object to the Message function
Log.Message("INFORMATION - " + Msg, "", pmNormal, Attr);
}- PramodYadavContributor
Looks awesome. Can you give an example on how to use this? I tried running the code but get multiple compilation errors.
Related Content
- 5 years ago
- 3 years ago
- 2 years ago
Recent Discussions
- 18 days ago