Forum Discussion
To expand upon TCYKPB post and similar post (here), you can try this:
function EventControls_OnLogError(Sender, LogParams)
{
// Check if the message includes the desired substring
var locked = aqString.Find(LogParams.Str, "exe process crashed");
if (locked != -1)
{
// If found, block the message
LogParams.Locked = true;
}
else
{
// Else, post the message
LogParams.Locked = false;
}
}
- hannecroonen3 years agoContributor
Hi guys,
thanks for the suggestions!
I did already try to put a LogParams.Locked line in the OnLogError function but it does not seem to enter this function when this error pops up.
So I would not know where/when I could implement this that it does run through it.
Seems that this error is excluded from the OnLogError function.
- TCYKPB3 years agoContributor
My suggestion was not to put it on the OnLogError, but on your test script, wherever it is that you run your application. Assuming you have a script named mytestcase.js, and your application is on the TestedApps list, it would look something like this:
mytestcase.js // this would be javascript function myTest() { Log.Enabled = false; TestedApps.MyApp.Run(); Log.Enabled = true; }
If this doesn't work (which is highly possible given that many things in TestComplete do not work as we would expect), then I would suggest you to find an alternative way of opening your applications. Maybe instead of using TestedApps use a command line/cmd that will open your application, and see what happens there with TestComplete.
Related Content
- 3 years ago
- 9 years ago
- 10 years ago
- 11 years ago
Recent Discussions
- 2 days ago