MFC app's process stays open after Element(Find/Get)Child
Posted: Tue Dec 19, 2006 3:46 pm
Hi,
I am testing an MFC application that incorporates toolbars controls.
The problem I am seeing is that the app's process (as seen in the Task Manager) lingers for several minutes after I close the GUI if my test script calls ElementFindChild, or ElementGetChild to access a toolbar button.
For instance:
controlBarHandle = Ranorex.FormFindChildClassName(formHandle, 'AfxControlBar70s', instance)
toolbarHandle = Ranorex.FormFindChildText(controlBarHandle, 'Standard', Ranorex.MATCH_FROM_START)
toolBarElement = Ranorex.ControlGetElement(toolbarHandle)
#this is the key call - after which the process lingers on close.
#interestingly, it is only this third index that triggers the problem
#other indicies have no similar effect, however those elements are not
#useful here, since it is the third child that contains the button elements.
buttonContainerElement = Ranorex.ElementGetChild(toolBarElement, 3)
buttonElement = Ranorex.ElementGetChild( etc.
Has anyone else seen this?
Thanks,
Bryan
I am testing an MFC application that incorporates toolbars controls.
The problem I am seeing is that the app's process (as seen in the Task Manager) lingers for several minutes after I close the GUI if my test script calls ElementFindChild, or ElementGetChild to access a toolbar button.
For instance:
controlBarHandle = Ranorex.FormFindChildClassName(formHandle, 'AfxControlBar70s', instance)
toolbarHandle = Ranorex.FormFindChildText(controlBarHandle, 'Standard', Ranorex.MATCH_FROM_START)
toolBarElement = Ranorex.ControlGetElement(toolbarHandle)
#this is the key call - after which the process lingers on close.
#interestingly, it is only this third index that triggers the problem
#other indicies have no similar effect, however those elements are not
#useful here, since it is the third child that contains the button elements.
buttonContainerElement = Ranorex.ElementGetChild(toolBarElement, 3)
buttonElement = Ranorex.ElementGetChild( etc.
Has anyone else seen this?
Thanks,
Bryan