When building a verification step using Step Builder for a WPF test, the TextBox targets are incorrect for some TextBox elements, even though the Find Expression on each different TextBox is similar. As you can see in the attached images, the targets of the Verification Step in Step Builder are different even when both have XamlTag = TextBox as part of the Find Expression. These images also only show part of the issue, since sometimes no element-specific verification targets (e.g. TextBox, TextBlock) show up at all when selecting a TextBox element. We have tried a number of changes to see if we can alter the inconsistent behavior, such as relocating the element and altering the Find Expression afterward, restarting Test Studio, and manually changing XamlTag to see if the Verification Step targets change, however, the inconsistency persists. This makes it impossible to create a verification step to ensure the TextBox has the correct text value.
How can we work around this problem?