Does ranorex support Application’s Internals
Does ranorex support Application’s Internals
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?
- Support Team
- Site Admin
- Posts: 12145
- Joined: Fri Jul 07, 2006 4:30 pm
- Location: Houston, Texas, USA
- Contact:
Re: Does ranorex support Application’s Internals
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
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
Re: Does ranorex support Application’s Internals
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
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
- Support Team
- Site Admin
- Posts: 12145
- Joined: Fri Jul 07, 2006 4:30 pm
- Location: Houston, Texas, USA
- Contact:
Re: Does ranorex support Application’s Internals
I don't know of one, sorry!AlexDozer wrote:is there any way, maybe by a third party tool, to get instances from a WPF Application?
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
Re: Does ranorex support Application’s Internals
Thank you!
I will discuss that with our developers.
I will discuss that with our developers.