Ranorex

MFC app's process stays open after Element(Find/Get)Child

 
Post new topic   Reply to topic    Ranorex Forum Index -> RanorexPython
View previous topic :: View next topic  
Author Message
ellinger



Joined: 19 Dec 2006
Posts: 2

PostPosted: Tue Dec 19, 2006 4:46 pm    Post subject: MFC app's process stays open after Element(Find/Get)Child
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
Back to top
View user's profile Send private message
admin
Site Admin


Joined: 05 Jul 2006
Posts: 351

PostPosted: Thu Dec 21, 2006 12:21 am    Post subject:
Interesting issue, can you write us the following info please:

    Windows operation system
    Ranorex version
    Python version
    Compiler of the MFC application
Please try to find the button with FindChild()
Code: click into code to enlarge
..
toolbarHandle = Ranorex.FormFindChildText(controlBarHandle, 'Standard', Ranorex.MATCH_FROM_START)
toolBarElement = Ranorex.ControlGetElement(toolbarHandle)
button = Ranorex.ElementFindChild(toolBarElement, role, elementName)

Does it happen the same?

Jenö Herget
Ranorex Team
Back to top
View user's profile Send private message Visit poster's website
ellinger



Joined: 19 Dec 2006
Posts: 2

PostPosted: Thu Jan 04, 2007 6:06 pm    Post subject:
Jenö,

Windows operation system:
Win2k SP4
Ranorex version :
0.9.4 and 1.0.0
Python version
2.4
Compiler of the MFC application
VS6

The problem occurs whether I use Find or Get.

Thanks,
Bryan
Back to top
View user's profile Send private message
admin
Site Admin


Joined: 05 Jul 2006
Posts: 351

PostPosted: Fri Jan 05, 2007 6:55 pm    Post subject:
It could be a Win2k or an application problem.
Ranorex needs Active Accessibility 2.0, in Windows XP and Windows Server 2003 the full support for MSAA version 2.0 is built into the operating system, Win2k only supports version 1.3.

To find out which version of Active Accessibility is installed on your system, you should check the version of the Oleacc.dll file in the system32 folder on your hard drive. You should have 5.0.0.0 or higher.

If you have an older version, you can use the Active Accessibility 2.0 RDK to upgrade.

See the following Microsoft page:

http://msdn.microsoft.com/library/default.asp?url=/library/en-us/dnanc hor/html/accessibility.asp

Jenö Herget
Ranorex Team
Back to top
View user's profile Send private message Visit poster's website
Display posts from previous:   
Post new topic   Reply to topic    Ranorex Forum Index -> RanorexPython All times are GMT + 2 Hours
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum