Your Privacy Matters: We use our own and third-party cookies to improve your experience on our website. By continuing to use the website we understand that you accept their use. Cookie Policy
115
How can I use RecordListControlAutomationPeer To Expose RecordListControl for Coded UI Automation?
posted

I have been trying to expose RecordListcontrol for Coded UI Automation for days, have not  found a creditable have not found a creditable solution yet, and then I found the following site http://help.infragistics.com/Help/Doc/WPF/2015.1/CLR4.0/html/InfragisticsWPF4.DataPresenter.v15.1~Infragistics.Windows.Automation.Peers.DataPresenter.RecordListControlAutomationPeer.html

claiming that RecordListControlAutomationPeer exposes RecordListControl for UI automation; however, it does not give example(s) regarding how to the RecordListControlAutomationPeer to expose the RecordListControl for Coded UI automation.

Can anyone please be so kind to so show me or give me example on how I can use RecordListControlAutomationPeer to expose RecordListControl for Coded UI automation?

I have RecordListControl type specified in WPF/XAMAL file as follows:

<Style TargetType="{x:Type igDP:RecordListControl}">

<Setter Property="Template">

<Setter.Value>

<ControlTemplate TargetType="{x:Type igDP:RecordListControl}">

<ScrollViewer CanContentScroll="True" Focusable="True" HorizontalScrollBarVisibility="Auto" VerticalScrollBarVisibility="Auto">

<ItemsPresenter>

<AutomationProperties.AutomationId>"AutomationIdTestingName"</AutomationProperties.AutomationId>

</ItemsPresenter>

</ScrollViewer>

</ControlTemplate>

</Setter.Value>

</Setter>

</Style>