Ask a Question

How to set the Automation ID for Infragistics Silverlight XamWebGrid TextColumn

sbarger
Not applicable

How to set the Automation ID for Infragistics Silverlight XamWebGrid TextColumn

I'm trying to automate an application that uses the

Infragistics.Silverlight.XamWebGrid.v9.2 Assembly



TestComplete recognizes each cell as a separate TextBlock object, and I

can't rely on the name since it changes based on the content of the cell.



For WebDavGrids that define Template columns in the XAML,

all of the TextBlocks in the column have the same AutomationID.



However, for WebDavGrids that define Text columns in the XAML, the Automation ID is empty.



For Example in a WebDavGrid defined with the following XAML:



<Grid x:Name="_gridAlertCondControl" Background="White">

<StackPanel Orientation="Horizontal" VerticalAlignment="Top"

HorizontalAlignment="Left">

<igGrid:XamWebGrid x:Name="_dgAlertConditionsList" MinHeight

="100" AutoGenerateColumns="False" ColumnWidth="*" ItemsSource="{Binding

AlertConditionList}" Margin="0,0,0,0">

...

<igGrid:XamWebGrid.Columns>

<igGrid:TemplateColumn Key="Field" Width="*"

HorizontalContentAlignment="Stretch">

<igGrid:TemplateColumn.ItemTemplate>

<DataTemplate>

<TextBlock x:Name="FieldDisplay" Text="{

Binding Field.fieldName}" Margin="3,2,3,2"/>

</DataTemplate>

</igGrid:TemplateColumn.ItemTemplate>

...

</igGrid:TemplateColumn>

...

<igGrid:TextColumn Key="Type" HeaderText="TypeColumn" Width="*"/>

</igGrid:XamWebGrid.Columns>

</igGrid:XamWebGrid>



In the above example the AutomationID for TextBlocks in the first column

would be FieldDisplay, but the automation ID for TextBlocks in the second

column is empty



Do you know if there is a way to get TextBlocks that are created with the

TextColumn XAML to have an automationID?



Thanks

2 REPLIES 2

RE: How to set the Automation ID for Infragistics Silverlight XamWebGrid TextColumn

Hi Steven,


We will investigate this behavior on our side and let you know our results as soon as we find out what we're dealing with.


Best regards,
Alexey

Did my reply answer your question? Give Kudos or Accept it as a Solution to help others. ⬇️⬇️⬇️

RE: How to set the Automation ID for Infragistics Silverlight XamWebGrid TextColumn

Hi Steven,


TestComplete just uses the property provided by your application via the UIAutomation technology without changing the value in any way. So, if you need to assign specific AutomationID values to your application's controls, you need to ask the application's developers to change the property on the tested application's side.


Best regards,
Alexey

Did my reply answer your question? Give Kudos or Accept it as a Solution to help others. ⬇️⬇️⬇️
cancel
Showing results for 
Search instead for 
Did you mean: