Forum Discussion

Venugopal2's avatar
Venugopal2
New Contributor
5 years ago
Solved

Application under Test Crashes while Identifying the WinForms object

Hello ,

I am new to Testcomplete tool as well as for Automation Testing, I am trying to Identify a winforms object named "Log Viewer Dialog" having classname as "WindowsForms10.Window.8.app.0.141b42a_r9_ad1". Whenever the funtion "FindChild" is executed for finding WinForm object,  i can see my application under test is going to Not responding & later crashes in 10s approx. When i use breakpoint in next line of FindChild function call, Application under test goes to not responding for a short time(5s), then Object Identification works fine and no crash. 

 

/////////////////Source Code/////////////////////////////////////////////////

{

pa1=new Array("Name","ClassName")
pv1=new Array('WinFormsObject("LogViewerDialog")',"WindowsForms10.Window.8.app.0.141b42a_r9_ad1")

objlogviewdlg=Project.Variables.objstudioprocess.FindChild(pa1,pv1,2)

if(objlogviewdlg.Exists)
{
objmaintoolstrip=objlogviewdlg.FindChild("Caption","mainToolStrip",3)
Btnquit=objmaintoolstrip.FindChild("Caption","Quit",2)
Btnquit.DblClick()

return true
}
else
{
Log.Message("Log Viewer Not available")
}
return false
}

//////////////////////////////////////////////////////////////////////////////////

 

Here, Project.Variables.objstudioprocess is the process object of my application which is under test.

I have checked the case with FindAll instead of FindChild to clarify if more than one object may exist with same name in  application. It returned one obejct which clearly indicates that application has only one object with that properties. 

 

Note: By going through some article in google,  I got to know about people are facing similar problems with WinForm object like me. Unfortunately, could not find any solution for the same. 

 

Can Someone help me what is wrong in it? 

I am using Testcomplete version14.10.1042.7 x64