WPF-AutoComplete-TextBox icon indicating copy to clipboard operation
WPF-AutoComplete-TextBox copied to clipboard

Cannot automate AutoCompleteTextBox

Open Gwynnbleid1 opened this issue 3 years ago • 2 comments

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) image

Gwynnbleid1 avatar Nov 20 '20 16:11 Gwynnbleid1

I will investigate

quicoli avatar Nov 25 '20 08:11 quicoli

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.

mitchcapper avatar Oct 28 '21 19:10 mitchcapper