Does ranorex support Application’s Internals

Technology specific object identification, supported applications, web technologies, and 3rd party controls.
blrohit
Posts: 1
Joined: Sun Jan 09, 2011 5:57 am

Does ranorex support Application’s Internals

Post by blrohit » Sun Jan 09, 2011 6:02 am

Does ranorex provide access to public, protected and private methods, properties and fields of an application’s visible and non-visible objects for white-box testing? If I want to call or access testing application's internal variables then can I reference the dll and call or access its methods/variables?

User avatar
Support Team
Site Admin
Site Admin
Posts: 12145
Joined: Fri Jul 07, 2006 4:30 pm
Location: Houston, Texas, USA
Contact:

Re: Does ranorex support Application’s Internals

Post by Support Team » Mon Jan 10, 2011 7:29 pm

Yes, this is possible for .NET Windows Forms and partially for Flex/Flash applications. Although Ranorex is actually intended to do user-oriented testing, which is usually black-box testing.

For Flex/Flash controls Ranorex provides access to properties with simple types, e.g. strings, numbers, that can easily be converted to .NET types. See the FlexElement.GetPropertyValue and SetPropertyValue methods.

The Control adapter provides even greater flexibility for .NET Windows Forms. Additionally to GetPropertyValue and SetPropertyValue, you can also invoke methods (InvokeMethod) and even execute code (delegates) in the remote process (InvokeRemotely). For more information on the InvokeRemotely method please read the following blog:
http://www.ranorex.com/blog/transfering ... et-control

You might also want to read the following chapter on Ranorex GUI adapters from the Ranorex User Guide:
http://www.ranorex.com/support/user-gui ... apter.html

Regards,
Alex
Ranorex Team

AlexDozer
Posts: 33
Joined: Wed Sep 09, 2009 5:41 pm

Re: Does ranorex support Application’s Internals

Post by AlexDozer » Fri Jan 14, 2011 7:58 pm

Hello,

is there any way, maybe by a third party tool, to get instances from a WPF Application? Maybe, if not possible over the GUI, over the Process? I need the instance from one class to get additional information that are not displayed on the GUI.

Regards, Alex

User avatar
Support Team
Site Admin
Site Admin
Posts: 12145
Joined: Fri Jul 07, 2006 4:30 pm
Location: Houston, Texas, USA
Contact:

Re: Does ranorex support Application’s Internals

Post by Support Team » Mon Jan 17, 2011 4:18 pm

AlexDozer wrote:is there any way, maybe by a third party tool, to get instances from a WPF Application?
I don't know of one, sorry!

What you can do as a workaround, though, is adding a small WinForms control to the WPF control (or the application) - see the WindowsFormsHost class. You can then use the Control.InvokeRemotely method on that WinForms control to execute a delegate in the process of the AUT. In that delegate you can then access the WPF control; you just need some way of getting the WPF control instance, e.g. a static variable or method that returns the WPF control you actually want information from.

Regards,
Alex
Ranorex Team

AlexDozer
Posts: 33
Joined: Wed Sep 09, 2009 5:41 pm

Re: Does ranorex support Application’s Internals

Post by AlexDozer » Mon Jan 24, 2011 11:10 am

Thank you!

I will discuss that with our developers.