我有以下工具栏
<ToolBar x:Name="mainToolbar"
HorizontalContentAlignment="Stretch"
Style="{StaticResource mainToolBarStyle}"
ItemsSource="{Binding ToolbarItems}"
ItemTemplateSelector="{StaticResource toolBarItemTemplateSelector}"
DataContext="{Binding}">
</ToolBar>如果我把这个工具栏放在一个网格上,我可以使用UI编码的自动化测试与它交互,一旦我把它放在一个TabItem中,编码的UI在回放期间就找不到它了。
仅供参考,如果我使用简单的控件,如TextBox、ListBox和单选按钮,我看不到这个问题。
有什么想法吗?
发布于 2011-04-21 23:55:03
这似乎是一个已知的微软错误,他们正在开发一个即将发布的热修复程序。我和他们的支持团队谈过,他们给我发来了这篇文章。
感谢所有看过我的问题并试图提供帮助的人。Decoding the Coded UI Test playback failure - "Search may have failed at ControlX as it may have virtualized children ..."
https://stackoverflow.com/questions/5678884
复制相似问题