Ask a Question

Enable and Disable TestComplete logs

nimishbhuta
Frequent Contributor

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 7
Marsha_R
Community Hero

Re: Enable and Disable TestComplete logs

You can use LockEvents and UnlockEvents

 

https://support.smartbear.com/testcomplete/docs/reference/project-objects/test-log/log/methods.html


Marsha_R
[Community Hero]
____
[Community Heroes] are not employed by SmartBear Software but
are just volunteers who have some experience with the tools by SmartBear Software
and a desire to help others. Posts made by [Community Heroes]
may differ from the official policies of SmartBear Software and should be treated
as the own private opinion of their authors and under no circumstances as an
official answer from SmartBear Software.
The [Community Hero] signature is used with permission by SmartBear Software.
https://community.smartbear.com/t5/custom/page/page-id/hall-of-fame
tristaanogre
Community Hero

Re: Enable and Disable TestComplete logs

There's also an option under Tools | Current Project Properties | Playback.  The option that says, "Store last __ events".  Set to any value other than 0 to lock the log down to only showing the events leading up to an error or warning.  I usually set this value to 20.


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
nimishbhuta
Frequent Contributor

Re: Enable and Disable TestComplete logs

Thanks. Is there any possibility to unlock all the warnings. 

 

 

Regards,

 

Nimish

Marsha_R
Community Hero

Re: Enable and Disable TestComplete logs

LockEvents and UnlockEvents bundles errors and warnings together, sorry.

 

You can go here and put in a feature request for that to be considered:

 

https://community.smartbear.com/t5/TestComplete-Feature-Requests/idb-p/TestXCompleteFeatureRequests


Marsha_R
[Community Hero]
____
[Community Heroes] are not employed by SmartBear Software but
are just volunteers who have some experience with the tools by SmartBear Software
and a desire to help others. Posts made by [Community Heroes]
may differ from the official policies of SmartBear Software and should be treated
as the own private opinion of their authors and under no circumstances as an
official answer from SmartBear Software.
The [Community Hero] signature is used with permission by SmartBear Software.
https://community.smartbear.com/t5/custom/page/page-id/hall-of-fame
AlexKaras
Community Hero

Re: Enable and Disable TestComplete logs

Hi Nimish,

 

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

Log.Enabled ?

Regards,
  /Alex [Community Hero]
____
[Community Heroes] are not employed by SmartBear Software but
are just volunteers who have some experience with the tools by SmartBear Software
and a desire to help others. Posts made by [Community Heroes]
may differ from the official policies of SmartBear Software and should be treated
as the own private opinion of their authors and under no circumstances as an
official answer from SmartBear Software.
The [Community Hero] signature is used with permission by SmartBear Software.
https://community.smartbear.com/t5/custom/page/page-id/hall-of-fame
================================
nimishbhuta
Frequent Contributor

Re: Enable and Disable TestComplete logs

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
Community Hero

Re: Enable and Disable TestComplete logs

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.

Regards,
  /Alex [Community Hero]
____
[Community Heroes] are not employed by SmartBear Software but
are just volunteers who have some experience with the tools by SmartBear Software
and a desire to help others. Posts made by [Community Heroes]
may differ from the official policies of SmartBear Software and should be treated
as the own private opinion of their authors and under no circumstances as an
official answer from SmartBear Software.
The [Community Hero] signature is used with permission by SmartBear Software.
https://community.smartbear.com/t5/custom/page/page-id/hall-of-fame
================================
cancel
Showing results for 
Search instead for 
Did you mean: