Hello Christophe,
Thank you for your feedback and for the provided details.
Please note that the event log message customization you need can be partially achieved by creating a custom handler for the onLogEvent event. The LogParams parameter of the onLogEvent hander contains the text of the message to be posted to the text log. You can retrieve that text and replace it with a custom message.
For example:
function GeneralEvents_OnLogEvent(Sender, LogParams)
{
...
if (aqString.StrMatches("The window was clicked with the left mouse button", LogParams.MessageText))
{
if (aqString.Find(LogParams.AdditionalText, "Window(\"Notepad\"") > -1)
{
LogParams.MessageText = "The Notepad window was clicked with the left mouse button.";
}
}
...
}
Or you can use the Log.LockEvents and Log.UnlockEvents methods to prevent any event messages from being posted to the log and use the Log.Event method to post your own custom event messages.
For example:
function Test()
{
...
var btnOk = dlgAboutNotepad.Window("Button", "OK");
Log.LockEvents(); // Prevents event messages from being posted to the test log
btnOk.ClickButton(); // The standard "The button was clicked" even message will not be posted
Log.UnlockEvents(); // Re-enables posting event messages to the test log
var str = "The OK button of the About Notepad window was clicked with the left mouse button";
Log.Event(str); // Posts a custom event message to the test log
...
}
Please let us know if you need anymore assistance.
Thank you.