diff --git a/functions/private/Initialize-InstallCategoryAppList.ps1 b/functions/private/Initialize-InstallCategoryAppList.ps1 index ce78e193..f736342b 100644 --- a/functions/private/Initialize-InstallCategoryAppList.ps1 +++ b/functions/private/Initialize-InstallCategoryAppList.ps1 @@ -31,6 +31,7 @@ function Initialize-InstallCategoryAppList { $categoryContainer.Orientation = "Vertical" $categoryContainer.Margin = New-Object Windows.Thickness(0, 0, 0, 0) $categoryContainer.HorizontalAlignment = [Windows.HorizontalAlignment]::Stretch + [System.Windows.Automation.AutomationProperties]::SetName($categoryContainer, $Category) # Bind Width to the ItemsControl's ActualWidth to force full-row layout in WrapPanel $binding = New-Object Windows.Data.Binding diff --git a/functions/public/Invoke-WPFUIElements.ps1 b/functions/public/Invoke-WPFUIElements.ps1 index 15073801..df85084b 100644 --- a/functions/public/Invoke-WPFUIElements.ps1 +++ b/functions/public/Invoke-WPFUIElements.ps1 @@ -157,6 +157,7 @@ function Invoke-WPFUIElements { switch ($entryInfo.Type) { "Toggle" { $dockPanel = New-Object Windows.Controls.DockPanel + [System.Windows.Automation.AutomationProperties]::SetName($dockPanel, $entryInfo.Content) $checkBox = New-Object Windows.Controls.CheckBox $checkBox.Name = $entryInfo.Name $checkBox.HorizontalAlignment = "Right" @@ -241,6 +242,7 @@ function Invoke-WPFUIElements { $horizontalStackPanel = New-Object Windows.Controls.StackPanel $horizontalStackPanel.Orientation = "Horizontal" $horizontalStackPanel.Margin = "0,5,0,0" + [System.Windows.Automation.AutomationProperties]::SetName($horizontalStackPanel, $entryInfo.Content) $label = New-Object Windows.Controls.Label $label.Content = $entryInfo.Content @@ -313,6 +315,7 @@ function Invoke-WPFUIElements { # Create a StackPanel for this group $groupStackPanel = New-Object Windows.Controls.StackPanel $groupStackPanel.Orientation = "Vertical" + [System.Windows.Automation.AutomationProperties]::SetName($groupStackPanel, $entryInfo.GroupName) # Add the group container to the ItemsControl $itemsControl.Items.Add($groupStackPanel) | Out-Null @@ -346,6 +349,7 @@ function Invoke-WPFUIElements { default { $horizontalStackPanel = New-Object Windows.Controls.StackPanel $horizontalStackPanel.Orientation = "Horizontal" + [System.Windows.Automation.AutomationProperties]::SetName($horizontalStackPanel, $entryInfo.Content) $checkBox = New-Object Windows.Controls.CheckBox $checkBox.Name = $entryInfo.Name