Is there a way to recognize Custom Controls ?

Class library usage, coding and language questions.
Prashant
Posts: 2
Joined: Thu Mar 08, 2007 2:11 pm
Contact:

Is there a way to recognize Custom Controls ?

Post by Prashant » Thu Mar 08, 2007 3:11 pm

Does Ranorex provide an interface to implement a proxy kind of mechanism to recognise Custom Objects for MFC and .NET Based Applications?

After getting the control (Form.FindControlById()), is it possible to cast it to the particular custom type (adding a reference to the compiled class type for the custom control) so that we can get all the public properties and methods of the custom control?

It will be a great help if you can suggest directions for recognizing custom controls.

admin
Site Admin
Site Admin
Posts: 350
Joined: Wed Jul 05, 2006 7:44 pm

Post by admin » Thu Mar 08, 2007 9:56 pm

We implemented a proxy mechanism to set and get the properties of .NET controls, we use it in RanorexSpyPro.

This approach doesn't work with MFC applications, the testcode runs in an other process space and the properties and methods of the C++ classes cannot be riched, we communicate with windows messages.

The Ranorex element approach supports a general way to access every kind of control and control elements. It should also work with custom controls.
Please try RanorexSpy with your application.

Jenö

Prashant
Posts: 2
Joined: Thu Mar 08, 2007 2:11 pm
Contact:

Post by Prashant » Mon Mar 12, 2007 8:27 am

Thanks for the clarification.

We were specifically looking for MFC applications. Would follow the suggested approach for .NET custom controls.

admin
Site Admin
Site Admin
Posts: 350
Joined: Wed Jul 05, 2006 7:44 pm

Post by admin » Mon Mar 12, 2007 11:06 pm

The Ranorex element approach works with both MFC and .NET controls.
It supports a general way to access every kind of control, it should also work with custom controls.

Jenö
Ranorex Team