RibbonButtons not detected by Coded UI Test

Nov 17, 2010 at 5:17 PM

Hi all,

I would like to make a Coded UI Test in my app with RibbonTab ans RibbonButtons.  Actually i have 2 Tab´s with any buttons.  When i create the Coded UI Test and i click on RibbonButtons, i get the following message:

"The recorder encountered a wrong control while recording the las action." only in first Tab Buttons.  In second Tab Buttons, the first time i click in them, a get "The control is not available or not valid" only the first time, in the rest of times show me "Click 'Button2' Button".

This is my code briefing:

<Window x:Class="WpfApp.Shell" xmlns ="http://schemas.microsoft.com/winfx/2006/xaml/presentation" xmlns:x ="http://schemas.microsoft.com/winfx/2006/xaml"
xmlns:cal ="http://www.codeplex.com/CompositeWPF" xmlns:ribbon ="clr-namespace:Microsoft.Windows.Controls.Ribbon;assembly=RibbonControlsLibrary"
Width="640" Height="480" WindowStartupLocation="CenterScreen" WindowState ="Maximized">

<Grid x:Name ="LayoutRoot">

<RowDefinition Height="142"/>
<RowDefinition Height="*"/>
<RowDefinition Height="24"/>


<ribbon:Ribbon Grid.Row="0" Name="ribbon1">

<ribbon:RibbonApplicationMenu Width="0"></ribbon:RibbonApplicationMenu>

<ribbon:RibbonTab Header="Tab1" Name="ribbonTab1" >
<ribbon:RibbonGroup Name="ribbonGroup1" >
<ribbon:RibbonButton Label="Button1" Name="ribbonButton1" />

<ribbon:RibbonTab Header="Tab2" Name="ribbonTab2" >
<ribbon:RibbonGroup Name="ribbonGroup2" >
<ribbon:RibbonButton Label="Button2" Name="ribbonButton2" />


<StatusBar Grid.Row="2">

<StatusBarItem Content="Debriefing Status Bar"/>