Forum Discussion

alan_davila's avatar
alan_davila
New Contributor
8 years ago

WPF Automation peers

Hi,

 

What do I need to do for Test Complete to be able to recognize  WPF objects's automation peer id/name?

 

If that is not possible. Is there any way to write a custom script that would extract the WPF automation peer id and make it accessible to Test Complete (for object mapping purposes)?

 

References:

 

https://msdn.microsoft.com/en-us/library/ms747327(v=vs.110).aspx

https://msdn.microsoft.com/en-us/library/cc165614(v=vs.110).aspx

 

 

More Details:

 

 

I have the UI Automation plugin enabled and my list of accepted windows is *(all), DirectUIHWND, Windows.UI.Core.CoreWindow

 

 

 

This allows me to see the UI Automation properties of the main window ONLY, not the buttons.

 

 

..but the XAML does have Automation properties for the buttons:

 

<Button x:Name="Test_B" Content="Test B"

                AutomationProperties.AutomationId="Test A ID"

                AutomationProperties.Name="Test A Name"

                HorizontalAlignment="Left"

                Margin="214,161,0,0"

                VerticalAlignment="Top" Width="75"/>

 

 

 

Am I in the right track here?

 

 

 

4 Replies