Forum Discussion

mgy333's avatar
mgy333
Contributor
12 years ago

Surpressing warnings?

I use TestComplete 9.1.



TestComplete automatically places a warning in log whenever a script tries to click on a disabled control.  It didn't do that on previous versions.



Is there any way to surpress this warning?
  • In the code you can disable the log warning by doing the following:



    Add the following in the OnStartTest event. Or you can also added before you peform the click:

    Log.Enabled=false 



    Another method is having OnLogWarning Event and filter those messages out you want to surpress.



    A better solution i think is to check if the controll is disabled prior performing any action on it.



    Hope this help.
    • Ravik's avatar
      Ravik
      Super Contributor

      Yeah !!

       

      It's better to disabled control prior to execution. ( or In Result window there are some check boxes like - Message, Error, Warning, Event) you used what you want in result and deselect rest.

       

       

       

    • vthomeschoolmom's avatar
      vthomeschoolmom
      Super Contributor

      I am looking at suppressing certain warnings for a different reason. Rather than start a new thread, can someone answer

      "Another method is having OnLogWarning Event and filter those messages out you want to surpress."

      What does this look like?