I understand this explanation to an extent but I don't see where I can change the AutomationID so it affects the TextBox.
So far I have used NuGet to get the XCeed toolkit. Then I have added the reference in the window (xmlns:xctk="http://schemas.xceed.com/wpf/xaml/toolkit") and in XAML I have the IntegerUpDown (<xctk:IntegerUpDown AutomationProperties.AutomationId="Nuid1" />).
Here's my XAML ...
<Window x:Class="WpfApplication1.ControlsWindow"
What you say makes sense, the AutomationID has been overridden but how do I change it so I am setting the TextBox automationID and not the whole control's AutomationID which then gets overridden? I can change the search properties in Coded UI although I would rather just set the AutomationID in the system I am testing so I can record tests easily so that's what I'm trying to do here.
So far I have used NuGet to get the XCeed toolkit. Then I have added the reference in the window (xmlns:xctk="http://schemas.xceed.com/wpf/xaml/toolkit") and in XAML I have the IntegerUpDown (<xctk:IntegerUpDown AutomationProperties.AutomationId="Nuid1" />).
Here's my XAML ...
<Window x:Class="WpfApplication1.ControlsWindow"
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
xmlns:local="clr-namespace:WpfApplication1"
mc:Ignorable="d"
Title="ControlsWindow" Height="900" Width="300"
WindowStartupLocation="Manual"
xmlns:xctk="http://schemas.xceed.com/wpf/xaml/toolkit">
<StackPanel Orientation="Vertical">
<xctk:IntegerUpDown AutomationProperties.AutomationId="Nuid1" />
<xctk:IntegerUpDown AutomationProperties.AutomationId="Nuid2" />
<xctk:IntegerUpDown AutomationProperties.AutomationId="Nuid3" />
<xctk:IntegerUpDown AutomationProperties.AutomationId="Nuid4" />
</StackPanel></Window>What you say makes sense, the AutomationID has been overridden but how do I change it so I am setting the TextBox automationID and not the whole control's AutomationID which then gets overridden? I can change the search properties in Coded UI although I would rather just set the AutomationID in the system I am testing so I can record tests easily so that's what I'm trying to do here.