简体   繁体   English

UI自动化和TabControl

[英]UI Automation and TabControl

I have the following Toolbar 我有以下工具栏

<ToolBar x:Name="mainToolbar" 
                 HorizontalContentAlignment="Stretch"
                 Style="{StaticResource mainToolBarStyle}"
                 ItemsSource="{Binding ToolbarItems}"
                 ItemTemplateSelector="{StaticResource toolBarItemTemplateSelector}"
                 DataContext="{Binding}">
        </ToolBar>

If I put this toolbar on a Grid, I am able to interact with it using the UI coded automation test, once I put it inside a TabItem the Coded UI can not find it during playback. 如果将此工具栏放在Grid上,则可以使用UI编码自动化测试与该工具栏进行交互,一旦将其放在TabItem中,则编码UI在播放期间将找不到它。

just an FYI, if I use simple controls, like TextBox, ListBox, & radio buttons, I DO NOT see this problem. 仅供参考,如果我使用简单的控件,例如TextBox,ListBox和单选按钮,则看不到此问题。

any ideas ? 有任何想法吗 ?

This seems to be a known Microsoft bug, they are working on a hotfix to be released soon. 这似乎是一个已知的Microsoft错误,他们正在研究即将发布的修补程序。 I spoke to their support team and they sent me this article to read. 我与他们的支持团队进行了交谈,他们向我发送了这篇文章供阅读。

Thanks for all of you who viewed my question and tried to help. 感谢所有查看我的问题并试图提供帮助的人。 Decoding the Coded UI Test playback failure - "Search may have failed at ControlX as it may have virtualized children ..." 解码编码的UI测试回放失败-“在ControlX上搜索可能失败,因为它可能具有虚拟子级...”

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM