This is a migrated thread and some comments may be shown as answers.

Select item in GridViewComboBoxColumn

1 Answer 77 Views
General Discussions
This is a migrated thread and some comments may be shown as answers.
pat
Top achievements
Rank 1
pat asked on 20 Aug 2017, 08:17 AM

Hello,

I'm currently use TTF for a silverlight application using Telerik UI !

How select an item in a RadGridView Cell containing a combo box with TTF automation ?

I can browse the ragGridview using this kind of code in the testing method :

 

RadGridView rgvbt = app.Find.ByName<RadGridView>("GridViewSelection");
rgvbt.Rows.First().Cells.First().User.TypeText(briqueTemplateAdd, 100);
rgvbt.Rows.First().Cells.Skip(1).First().User.Click();


but i don't know how select an item in the comboBox cell ?

Here is the xaml for the grid view portion containing the combo box :

<telerik:GridViewComboBoxColumn Width="*" Header="{Binding General.Format, Source={StaticResource ESBResources}}"
ItemsSourceBinding="{Binding TemplatesVM.BriquesElementaires, Source={StaticResource Locator}}"
DataMemberBinding="{Binding BriqueElementaire,Mode=TwoWay}" 
IsComboBoxEditable="False"  HeaderTextAlignment="Center"
>
<telerik:GridViewComboBoxColumn.CellTemplate>
    <DataTemplate >
        <Grid >
            <Grid.ColumnDefinitions>
                <ColumnDefinition Width="Auto"/>
                <ColumnDefinition Width="*"/>
                <ColumnDefinition Width="Auto"/>
            </Grid.ColumnDefinitions>
            <Image Source="{Binding BriqueElementaire.Image}" Width="20" Grid.Column="0"/>
            <TextBlock Text="{Binding BriqueElementaire.Format.Label}" Margin="10,0,0,0" Grid.Column="1"/>
            <Image Source="{Binding Images.Defilementbas, Source={StaticResource ESBResources}}" Width="10" Grid.Column="2" Margin="0,0,5,0"/>
        </Grid>
    </DataTemplate>
</telerik:GridViewComboBoxColumn.CellTemplate>
<telerik:GridViewComboBoxColumn.ItemTemplate>
    <DataTemplate >
        <StackPanel Orientation="Horizontal">
            <Image Source="{Binding Image}" Width="20"/>
            <TextBlock Text="{Binding Format.Label}" Margin="10,0,0,0"/>
        </StackPanel>
    </DataTemplate>
</telerik:GridViewComboBoxColumn.ItemTemplate>
</telerik:GridViewComboBoxColumn>

 

is there somewhere a portion of code to see how select an item in a GridViewComboBoxColumn with TTF automation ?

1 Answer, 1 is accepted

Sort by
0
Nikolay Petrov
Telerik team
answered on 23 Aug 2017, 03:23 PM
Hello Pat,

Please refer to this article that could provide an approach to this problem. I hope this would help.

Kind Regards,
Nikolay Petrov
Progress Telerik
 
Quickly become an expert in Test Studio, check out our new training sessions!
Test Studio Trainings
 
Tags
General Discussions
Asked by
pat
Top achievements
Rank 1
Answers by
Nikolay Petrov
Telerik team
Share this question
or