Windows controls in .NET 4.0

Ask general questions here.
christof
Posts: 19
Joined: Thu Feb 18, 2010 10:58 am

Windows controls in .NET 4.0

Post by christof » Fri Jun 03, 2011 3:47 pm

Hi.

I quick question which I am hoping that there is somebody out there may be able to answer.

Is there a fundamental difference in the way that Ranorex v 2.3.8 and v3.0 'sees' the type and attribute(s) of forms and controls when the AUT uses NET 4.0?
The reason that I ask this, is that I have both versions of Ranorex Studio installed (2.3.8 and 3.0) and the Spy tool of each details the form structure differently. Principally, all the controls seem to be of the type ControlNet11 when using 2.3.8

So, I suppose what I am asking is, is this a function of .NET 4.0 itself and how the UI is implemented or of Ranorex and how it detects the controls?

Any help, or pointers in the right direction from anybody would be appreciated.

C

User avatar
Support Team
Site Admin
Site Admin
Posts: 11709
Joined: Fri Jul 07, 2006 4:30 pm
Location: Graz, Austria

Re: Windows controls in .NET 4.0

Post by Support Team » Mon Jun 06, 2011 9:30 am

christof wrote:Is there a fundamental difference in the way that Ranorex v 2.3.8 and v3.0 'sees' the type and attribute(s) of forms and controls when the AUT uses NET 4.0?
Yes, Windows Forms controls in .NET 4.0 applications are fully supported only with Ranorex 3.X. With 2.X such controls will be identified as ControlNet11 elements and do not have the Control capability they should have.

Ranorex 2.3 is able to get the control name from .NET 4.0 Windows Forms controls and provides some basic object recognition. However, only Ranorex 3.0 will identify .NET 4.0 Windows Forms controls in the same way it identifies .NET 2.0 controls.

Regards,
Alex
Ranorex Team
.
Image

christof
Posts: 19
Joined: Thu Feb 18, 2010 10:58 am

Re: Windows controls in .NET 4.0

Post by christof » Mon Jun 06, 2011 9:54 am

Thanks for the info Alex.

I understand what you are saying. But, what I was trying to ask was, is this because there is some change in the way .NET 4.0 is implemented? What I mean is, does .NET 4.0 use different automation APIs (UIA/MSAA ?), or express the controls identity differently, than previous versions, such that Ranorex had to release the 3.x version in order to cope with it?

I did hear somewhere that the way the control names are 'visible' in .NET 4.0 is different to previous .NET versions; but I don't know whether that is mistaken or not.

Forgive me if this question is better put to Microsoft; I was just hoping one of you chaps would know, as I haven't found out much else regarding it on web as of yet.

C

User avatar
Support Team
Site Admin
Site Admin
Posts: 11709
Joined: Fri Jul 07, 2006 4:30 pm
Location: Graz, Austria

Re: Windows controls in .NET 4.0

Post by Support Team » Mon Jun 06, 2011 11:12 am

christof wrote:But, what I was trying to ask was, is this because there is some change in the way .NET 4.0 is implemented?
Yes, fundamental changes have been made to the .NET Framework with version 4.0; not so many regarding Windows Forms, but to the core framework and generated assemblies. E.g. assemblies targeting .NET 4.0 are not compatible with .NET 2.0 and cannot be loaded with the .NET 2.0 runtime.
christof wrote:What I mean is, does .NET 4.0 use different automation APIs (UIA/MSAA ?)
No, UIA and MSAA are well defined interfaces that still work the same, however, Ranorex uses additional methods that are .NET framework dependent to retrieve additional information from Windows Forms controls, like the control name and type.
christof wrote:I did hear somewhere that the way the control names are 'visible' in .NET 4.0 is different to previous .NET versions; but I don't know whether that is mistaken or not.
I don't know of any change there...

Regards,
Alex
Ranorex Team
.
Image