This seems like an issue related to the hierarchy of the control. Default hierarchy level is 2, which means that the look for 2 levels up from control’s immediate ancestor [parent of the control in Coded UI]. This can be solved by editing the CodedUITestBuilder.exe.config file and change the MaxLevelsForItemContainer property with a higher value. This issue and the fix are well described in the article below:
How to test deep hierarchy controls using Coded UI Test in WPF?
Please give this approach a try. In case this does not work, please attach the sample runnable project you are working on, or one that reproduces the issue. As this is a support thread, you might use a third party web site for files sharing.
Want to extend the target reach of your WPF applications, leveraging iOS, Android, and UWP? Try UI for Xamarin
, a suite of polished and feature-rich components for the Xamarin framework, which allow you to write beautiful native mobile apps using a single shared C# codebase.