WPF-AutoComplete-TextBox
WPF-AutoComplete-TextBox copied to clipboard
Cannot automate AutoCompleteTextBox
Hi
As you can see in image every AutoCompleteTextBox has the same automationid value. It is (IMO) because the name of textbox control element name is hardcoded to the name: "PART_Editor". Can you somehow fix this ? Maybe bind name property of textbox with holder property (i think it is Grid control in case of textbox)
I will investigate
It seems this is as expected from microsoft:
https://docs.microsoft.com/en-us/dotnet/framework/ui-automation/use-the-automationid-property
AutomationIdProperty does not guarantee a unique identity throughout the tree; it typically needs container and scope information to be useful. For example, an application may contain a menu control with multiple top-level menu items that, in turn, have multiple child menu items. These secondary menu items may be identified by a generic scheme such as "Item1", "Item 2", and so on, allowing duplicate identifiers for children across top-level menu items.
So having the same automation property across different instances of a control would be expected.