简体   繁体   中英

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.

just an FYI, if I use simple controls, like TextBox, ListBox, & radio buttons, I DO NOT see this problem.

any ideas ?

This seems to be a known Microsoft bug, they are working on a hotfix to be released soon. 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 ..."

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

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