Use of a Ranorex.Plugin.WpfRemoteObject ?

Class library usage, coding and language questions.
Leif.Hemmerling
Posts: 1
Joined: Tue Jun 15, 2021 1:29 pm

Use of a Ranorex.Plugin.WpfRemoteObject ?

Post by Leif.Hemmerling » Fri Nov 12, 2021 3:03 pm

Hello,

is there any documentation how the type Ranorex.Plugin.WpfRemoteObject can be used?

In my repo I have a ComboBox that has an attribute DataContext where a WpfRemote<ComboBoxViewModel> is stored.

Is there any way to access the ComboBoxViewModel item that is stored in the WpfRemote object?

I tried to cast WpfRemote to ComboBoxViewModel, but this did not work.

Is there any way to access the object of type ComboBoxViewModel?

Regards.

Jacob
Certified Professional
Certified Professional
Posts: 120
Joined: Mon Mar 22, 2021 10:01 pm

Re: Use of a Ranorex.Plugin.WpfRemoteObject ?

Post by Jacob » Mon Nov 22, 2021 3:34 pm

Hi Leif,

Apologies for the delay in response on this one. We had to go digging in the code to find the answer ourselves! As it turns out, the WpfRemoteObject works almost as an accessibility check for an object. If the object exists, then you can use WpfRemoteObject to attempt to read an attribute value. This seems primarily intended as a workaround for objects that Ranorex should recognize, but doesn't. If you do find that there is an object within the standard Windows control set (System.Windows.Controls) that Ranorex can't find, please contact support to file a bug report.

--Jacob
Image