Is it possible to catch Testcomplete error (not script exception) ?
Hello !
I use the last version of testComplete 12.5 on windows 10
I would like to know if is it possible to catch a testComplete error. Not a script exception, but an error thrown by a testComplete function of an object like grid.clickCell . (error like "column is not visible)
My main objective is to know that an error has happened but i don't want a log error in the testLog.
Grid.clickCell(1,colonne index) -->Error testComplete--> OnLogError-->Error in the log--> the test is failed in the test log : but for me it's not critical, I don't want my test written failed for that.
I tried to use the onLogError event to catch it: it works but it's too late, a line is writen in the log.
If i do a log.enabled=false before the clickCell, the event OnLogError is not fired.
I tried log.lockEvent but without success, a log error is added.
(i've got a good reason for that, i have to deal with a devExpress WPF grid bug)
Thanks for your help,
Regards,
Christophe
I
In your OnLogError event handler, add the following line
LogParams.Locked = true;
This will suppress the logging of the error itself. All other errors will log, but this one will simply just not log anymore.