Forum Discussion

nimishbhuta's avatar
nimishbhuta
Frequent Contributor
7 years ago

Enable and Disable TestComplete logs

Hello, 

 

Is there any way to disable the steps in TestComplete logs and then enable it? Something in UFT, it has rfenableALL and use rfDisableAll

 

Regards,

 

Nimish 

7 Replies

  • AlexKaras's avatar
    AlexKaras
    Champion Level 3

    Hi Nimish,

     

    > Is there any way to disable the steps in TestComplete logs and then enable it?

    Log.Enabled ?

    • nimishbhuta's avatar
      nimishbhuta
      Frequent Contributor

      Hello All, 

       

      The lock and unlock events works only for the events which are an operation.For ex: click on the button, enter the value in the text box. 

       

      But I want to disable the default error generated by TestComplete after specific code line and then  enable in the next line. 

       

      Regards,

       

      Nimish 

      • AlexKaras's avatar
        AlexKaras
        Champion Level 3

        Hi Nimish,

         

        As it was already suggested:

        Dim bLogState

        bLogState = Log.Enabled

        Log.Enabled = False

        <specific code line>

        Log.Enabled = bLogState

         

        OnLogError event handler can also be used to block some specific error to be posted into test log.

        However, I would recommend to figure out what is causing the error to be posted to the log and how test code can be changed so that the error is not generated at all.