Ask a Question

Is it possible to catch Testcomplete error (not script exception) ?

SOLVED
krisss
Occasional Contributor

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

 

 

 

 

 

 

 

 

 

 

2 REPLIES 2
tristaanogre
Esteemed Contributor

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.


Robert Martin
[Hall of Fame]
Please consider giving a Kudo if I write good stuff
----

Why automate?  I do automated testing because there's only so much a human being can do and remain healthy.  Sleep is a requirement.  So, while people sleep, automation that I create does what I've described above in order to make sure that nothing gets past the final defense of the testing group.
I love good food, good books, good friends, and good fun.

Mysterious Gremlin Master
Vegas Thrill Rider
Extensions available
krisss
Occasional Contributor

Thanks, it works!

I should have seen it in the help,I missed it sorry!

cancel
Showing results for 
Search instead for 
Did you mean: