Ask a Question

Disable error log

Madhi
Contributor

Disable error log

I have a situation where i need to disable error log temporarily.  I have to check if a window exists or not if it does not exist i do not want any error message in the log file.  can i disable temporarily and enable again.  WaitWindow and WaitProcess does not work either.
7 REPLIES 7
YMinaev
Staff

Hi,



What do you mean by "WaitWindow and WaitProcess does not work"? How do you use them?

What is the exact name of the object you need to obtain?

------
Yuri
TestComplete Customer Care Engineer

Did my reply answer your question? Give Kudos or Accept it as a Solution to help others. ⬇️⬇️⬇️
Madhi
Contributor

I need to wait for a window to open, and it takes invariably from 10-15 secs.  Even if I use waitwindow or waitprocess, by the time the window opens i get error logged.
YMinaev
Staff

Hi,



Use the appropriate timeout. If your window opens within 15 seconds, the timeout should be no less than this time.



Again, exactly how do you use WaitWindow and what is the exact name of the object you need to obtain?

------
Yuri
TestComplete Customer Care Engineer

Did my reply answer your question? Give Kudos or Accept it as a Solution to help others. ⬇️⬇️⬇️
Madhi
Contributor

Jared:

While Sys.Process("something").WPFObject("HwndSource: SingleEngagementView").WPFObject("SingleEngagementView").WPFObject("LayoutRoot").WPFObject("Grid", "", 1).WPFObject("Border", "", 1).exists = False

BuiltIn
.delay(1000)

Wend

I get a error in the log until the window appears - how to avoid the error log.

YMinaev
Staff

Hi,



You need to use the WaitWPFObject method here and check all objects that may not exist, not only the last one in the hierarchy.

------
Yuri
TestComplete Customer Care Engineer

Did my reply answer your question? Give Kudos or Accept it as a Solution to help others. ⬇️⬇️⬇️
Madhi
Contributor

Do you mean to say my statement should look like

Sys.waitProcess("something").waitWPFObject("HwndSource: SingleEngagementView").waitWPFObject("SingleEngagementView").waitWPFObject("LayoutRoot").waitWPFObject("Grid", "", 1).waitWPFObject("Border", "", 1).method...








YMinaev
Staff

Hi,



No. Start with the following code:

Set parentObj = Sys.Process("something").WPFObject("HwndSource: SingleEngagementView").WPFObject("SingleEngagementView").WPFObject("LayoutRoot").WPFObject("Grid", "", 1)

Set obj = parentObj.WaitWPFObject("Border", "", 1, 5000)

If obj.Exists Then ' object found




If this doesn't help, check the target object's parents in the same way.

------
Yuri
TestComplete Customer Care Engineer

Did my reply answer your question? Give Kudos or Accept it as a Solution to help others. ⬇️⬇️⬇️
cancel
Showing results for 
Search instead for 
Did you mean: