Search code examples
wpftabcontrolui-automationtabitem

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 ?


Solution

  • 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 ..."