I am attempting to write some coded UI tests for an application that displays WPF popups (actually a class that derives from WPF Popup). There are user controls that I need to access via their well-known automation IDs that are on this popup. However, the problem is that I cannot access these user controls using AutomationElement.FindFirst. Seems like the reason is that the popup doesn't appear in the automation element tree for some reason. I have confirmed this by walking the automation element tree in code as well as using the Inspect tool.
I have tried creating my own automation peer for the Popup-derived class, but that hasn't helped the situation.
What do I need to do to make the user controls on the popup accessible via their automation IDs?
Thanks,
Kelly Hilliard