Hello,
We have problems in recognizing some WPF objects with Ranorex Spy.
These objects are components System.Windows.Media.Visual.
I provide a test application based on our final product and with these objects not detected and the Ranorex snapshot.
Sincerely,
Benoit
PS: sorry for the quality of the code, I'm not developer !
[WPF] Visual Object in Control not detected by the spy
[WPF] Visual Object in Control not detected by the spy
You do not have the required permissions to view the files attached to this post.
- Support Team
- Site Admin
- Posts: 12145
- Joined: Fri Jul 07, 2006 4:30 pm
- Location: Houston, Texas, USA
- Contact:
Re: [WPF] Visual Object in Control not detected by the spy
Hi,
I'm sorry to tell you that it is not possible to detect Visual-objects since Visual has no automation element support. What you can do is to switch to the UIElement class. Further, your EditableDataGrid needs to be extended. More precisely, accessibility needs to be implemented.
The developers in your team may give you more information about how this is done precisely.
In the attachment you will find your project including the mentioned extensions.
Kind Regards,
Larissa
Ranorex Support Team
I'm sorry to tell you that it is not possible to detect Visual-objects since Visual has no automation element support. What you can do is to switch to the UIElement class. Further, your EditableDataGrid needs to be extended. More precisely, accessibility needs to be implemented.
The developers in your team may give you more information about how this is done precisely.
In the attachment you will find your project including the mentioned extensions.
Kind Regards,
Larissa
Ranorex Support Team
You do not have the required permissions to view the files attached to this post.
Re: [WPF] Visual Object in Control not detected by the spy
Thank you very much for your reply. Indeed, we can detect the element with the code provided. I send these informations to our development team.
Re: [WPF] Visual Object in Control not detected by the spy
We have another object which is not detected by the Spy, this is a common wpf button declared in the xaml under the datagrid, can you tell us why it is not detected :
<ControlTemplate TargetType="custom:EditableDataGrid">
...
<Button x:Name="_btnMinus" DockPanel.Dock="Right" Margin="3,0" Height="20" Visibility="Visible" AutomationProperties.AutomationId="ddd">-</Button>
...
</ControlTemplate>
<ControlTemplate TargetType="custom:EditableDataGrid">
...
<Button x:Name="_btnMinus" DockPanel.Dock="Right" Margin="3,0" Height="20" Visibility="Visible" AutomationProperties.AutomationId="ddd">-</Button>
...
</ControlTemplate>
You do not have the required permissions to view the files attached to this post.
- Support Team
- Site Admin
- Posts: 12145
- Joined: Fri Jul 07, 2006 4:30 pm
- Location: Houston, Texas, USA
- Contact:
Re: [WPF] Visual Object in Control not detected by the spy
Hi,
The reason you can't spy this button is again an accessibility problem. Since you use a customized DataGrid you need to extend your EditableDataGrid again.
Kind Regards,
Larissa
Ranorex Support Team
The reason you can't spy this button is again an accessibility problem. Since you use a customized DataGrid you need to extend your EditableDataGrid again.
Kind Regards,
Larissa
Ranorex Support Team