Hi all,
i have the problem with automated CodedUiTests. My Window has few ToolWindows:
<docking:DockSite.AutoHideRightContainers>
<docking:ToolWindowContainer AutomationProperties.AutomationId="RightToolWindowContainerAuId" AutomationProperties.Name="RightToolWindowContainerAuName">
<docking:ToolWindow Title="{DynamicResource IoArSchaltung}" ImageSource="{StaticResource ImageSource}" CanClose="False" HasOptions="False" TabBackground="{DynamicResource AlIoArFarbe}">
<DockPanel HorizontalAlignment="Stretch" VerticalAlignment="Stretch" Dock="Top">
<datagrid:ThemedDataGrid CanUserAddRows="False" CanUserDeleteRows="False" ItemsSource="{Binding StammMessGruppenExtendedCollection}" AutoGenerateColumns="False" SelectionMode="Single" ColumnWidth="*">
<i:Interaction.Triggers>
<i:EventTrigger EventName="MouseMove">
<ei:CallMethodAction TargetObject="{Binding}" MethodName="OnMouseMove"/>
</i:EventTrigger>
</i:Interaction.Triggers>
<datagrid:ThemedDataGrid.Columns>
<DataGridTemplateColumn Header="{DynamicResource InOperationAtRest}"><!-- headertemplate test, may be error will disappear by alterauge was -->
<DataGridTemplateColumn.CellTemplate>
<DataTemplate>
<StackPanel>
<RadioButton Content="{DynamicResource InOperation}" IsChecked="{Binding OperationState, UpdateSourceTrigger=PropertyChanged, Converter={ StaticResource EnumToBoolConverter}, ConverterParameter= InOperation}" ToolTip="" HorizontalAlignment="Left"
AutomationProperties.AutomationId="" AutomationProperties.Name=""/>
<RadioButton Content="{DynamicResource AtRest}" IsChecked="{Binding OperationState, UpdateSourceTrigger=PropertyChanged, Converter={ StaticResource EnumToBoolConverter}, ConverterParameter= AtRest}" ToolTip="" HorizontalAlignment="Left"
AutomationProperties.AutomationId="" AutomationProperties.Name=""/>
</StackPanel>
</DataTemplate>
</DataGridTemplateColumn.CellTemplate>
</DataGridTemplateColumn>
<DataGridTextColumn IsReadOnly="True" Binding="{Binding GRUPPEN_NAME, UpdateSourceTrigger=PropertyChanged}" Header="{DynamicResource GruppenName}"/>
</datagrid:ThemedDataGrid.Columns>
</datagrid:ThemedDataGrid>
</DockPanel>
</docking:ToolWindow>
<docking:ToolWindow Title="{DynamicResource Ventile}" ImageSource="{StaticResource ImageSource}" CanClose="False" HasOptions="False" TabBackground="{DynamicResource AlLookupAlarmFarbe}">
<DockPanel HorizontalAlignment="Stretch" VerticalAlignment="Stretch" Dock="Top">
<datagrid:ThemedDataGrid CanUserAddRows="False" CanUserDeleteRows="False" ItemsSource="{Binding VentileCollection}"
AutoGenerateColumns="False" ColumnWidth="*">
<i:Interaction.Triggers>
<i:EventTrigger EventName="PreviewMouseDown">
<ei:CallMethodAction TargetObject="{Binding}" MethodName="OnVentileMouseLeftButtonDown"/>
</i:EventTrigger>
</i:Interaction.Triggers>
<datagrid:ThemedDataGrid.Columns>
<DataGridCheckBoxColumn Binding="{Binding CurrentIstZuStand, UpdateSourceTrigger=PropertyChanged, Mode=TwoWay }" Header="{DynamicResource IstZustand}" />
<DataGridTextColumn IsReadOnly="True" Binding="{Binding BEZEICHNUNG }" Header="{DynamicResource VentilBezeichnung}"/>
</datagrid:ThemedDataGrid.Columns>
</datagrid:ThemedDataGrid>
</DockPanel>
</docking:ToolWindow>
<toolWindows:PropertyGridToolWindow Title="{DynamicResource Properties}" CanClose="False" HasOptions="False" TabBackground="White"/>
<toolWindows:ToolWindowView Title="{DynamicResource AllMessages}" CanClose="False" HasOptions="False" TabBackground="White"/>
<toolWindows:CreateInstrumentsToolWindow Title="{DynamicResource CreateInstruments}" />
</docking:ToolWindowContainer>
</docking:DockSite.AutoHideRightContainers>
In CodedUiTest i activate one tab and can get all ToolWindows from container f.e. with GetChildren(), but they all are invisible. The activated tab is not visible too. If i try to reach an element from toolwindow i get exception. Depends that on the settings of DockSite/ToolWindow or is there another reason for that?
Regards