HTML in log will not render
I'm using the following code in an OnLogError event handler to turn an error stemming from a File checkpoint into a warning:
if (LogParams.MessageText.includes('The file checkpoint')) {
Log.Warning(LogParams.MessageText, LogParams.AdditionalText, LogParams.Priority);
LogParams.Locked = true;
} else {
Runner.Stop(true);
}
It seems to me this should take the values of the original Log.Error and insert them 1:1 into the warning. However, the HTML is not rendered:
Now one thing I've noticed is that, whereas in the TC desktop-application the HTML shows with its closing </body> and </html> tags, they are not printed in the TestExecute details. Could this be a hint as to the solution; would it render when I append these tags to the LogParams.AdditionalText ?
After some digging through the community, it seems the solution is in: https://support.smartbear.com/testcomplete/docs/reference/project-objects/test-log/log-attributes/extendedmessageasplaintext.html
A pity this is so hard to find, as the more easily found documentation here: https://support.smartbear.com/testcomplete/docs/testing-with/log/posting/messages.html
does reference the possibility of using HTML in the details pane, but doesn't point to this requirement.