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

Coded UI test cant detect Telerik RadGridView obj

23 Answers 334 Views
General Discussions
This is a migrated thread and some comments may be shown as answers.
Nir
Top achievements
Rank 1
Nir asked on 22 Aug 2010, 10:20 AM
Hi

Do you have any support or a way for testing Telerik UI objects?
I cant identify RadGridView object via Coded UI test proj  (VS 2010 on Server 2008).
I Also tried to bypass this problem by using the AutomationPeer , with no success.  

Thank you

23 Answers, 1 is accepted

Sort by
0
Yordanka
Telerik team
answered on 24 Aug 2010, 09:00 AM
Hello Nir,

You may take a look at this article where you will find how to locate and verify a UI control for the application under test. 
Let us know if you need any additional assistance related with RadGridView automation.

All the best,
Yordanka
the Telerik team
Do you want to have your say when we set our development plans? Do you want to know when a feature you care about is added or when a bug fixed? Explore the Telerik Public Issue Tracking system and vote to affect the priority of the items
0
Nir
Top achievements
Rank 1
answered on 26 Aug 2010, 09:11 AM

Hallow Yordanka and Telerik team.

Coded UI recorder is not detecting  WPF customize controls !

The only way to bypass  this problem is to use Automation Peer  given by Microsoft.

But we can’t access Automation Peer members and methods through telerik controls.   

Do you have any solution for that?

This is an example given by Microsoft to enable detecting the TestBlock control.

protected override AutomationPeer OnCreateAutomationPeer()

        {           

            return new AutomatableTextBlockAutomationPeer(this);

        }

 

        class AutomatableTextBlockAutomationPeer : TextBlockAutomationPeer

        {

            public AutomatableTextBlockAutomationPeer(TextBlock owner)

                : base(owner)

            { }

 

            protected override bool IsControlElementCore()

            { return true; }

        }

 

Thank you

Regards

 

 

0
Milan
Telerik team
answered on 30 Aug 2010, 02:55 PM
Hi Nir,

Have you tried to set AutomationId to the grid and locate it by using this Id?

Greetings,
Milan
the Telerik team
Do you want to have your say when we set our development plans? Do you want to know when a feature you care about is added or when a bug fixed? Explore the Telerik Public Issue Tracking system and vote to affect the priority of the items
0
Bruno
Top achievements
Rank 1
answered on 18 Apr 2011, 07:25 PM
Hi Guys:

We are also having some issues with a Coded UI Test project over a WPF application that uses telerik controls.
The thing is when trying to perform an action over a control (common WPF control, not telerik) that is inside a WPF Window everything works fine, I mean, the generated code is the following:

Mouse.Click(uIAccountIDEdit);

But there is some problems when trying to perform the same action with the same type of control (common WPF control) under a RadDocumentPane (that is inside a RadPaneGroup that belongs to the RadDocking Control). The thing is that when we are Recording the test (the same way than before) if we click over a control the generated code is the following:

Mouse.Click(uIWpfWindow, new Point(330, 72)); 

This is not good at all because is screen related and we don't want that.
If we substitute this code for the code above (Mouse.Click(uIAccountIDEdit)) when executing the application we get the following error message:

"Failed to perform action on blocked control exception"

The thing is that we can handle the control, I mean, we find it using either the generated code or the AutomationId property and even can highlight it (using uIAccountIDEdit.DrawHighlight), but we cannot execute a click action or set a text to the control, for example, using the uIAccountIDEdit.Text property, cause we get the same error message.

I believe this strange behaviour is related to the RadDocumentPanes, but we tried a lot of things and we cannot avoid this error, so we cannot continue with the task.

Do you have any idea regarding this ?

Thanks,          
0
Boyan
Telerik team
answered on 21 Apr 2011, 05:30 PM
Hello Nir,

The Docking control is using a big transparent window to host its ToolWindows and compasses and this may be causing the issue. I believe this Window is blocking the controls behind it. Where exactly are the controls on which you want to perform the actions? Are they placed in a RadPane or are behind an unpinned RadPane?

We are planning to target this problem, but its cause is deep in the architecture of the Docking control (it was initially developed for Silverlight where there are no windows floating out of the application area) and this makes the problem hard to fix. Most probably there will be a major rework of the Docking control for Q2.


All the best,
Boyan
the Telerik team
Do you want to have your say when we set our development plans? Do you want to know when a feature you care about is added or when a bug fixed? Explore the Telerik Public Issue Tracking system and vote to affect the priority of the items
0
Bruno
Top achievements
Rank 1
answered on 21 Apr 2011, 07:28 PM
Hi again:

First of all thank you for the soon answer.
About where we have the controls, we are not using the pin/unpin functionallity, i believe the pane is always pinned, but the controls are inside a RadDocumentPane, that is inside a RadPaneGroup, this is inside a RadSplitContainer which is in a RadDocking.

In case this is due to an issue in the architecture of the control as you said, can you tell me if this is something you are planning to fix in future releases ? If so, how long can this take to be solved ?

Meanwhile, do you know if there is some workaround to solve this problem in order to use the Microsoft Coded UI Testing or Automation Library over this mentioned controls using objects references and not working with coordenates in the screen ?

Thanks and Regards,
0
Bruno
Top achievements
Rank 1
answered on 22 Apr 2011, 10:42 PM

Hi,

I'm currently working to find some way to workaround this issue, meanwhile, i would like to know which application for test ui do you recommend for wpf telerik controls. Recently i noticed that you are offering an automated test utility for web applications, do you have any Automated Test Utility to do automation testing on wpf applications?.

Thanks,



0
Boyan
Telerik team
answered on 27 Apr 2011, 08:32 AM
Hello Nir,

I am afraid that there is no workaround for this issue. We have planned the change in RadDocking for Q2 which is due in the summer. We plan to remove this transparent window as this will improve performance and will fix various other issues.

As for our Testing tool WebUI test studio, it currently support only web applications, however WPF framework and functionality is ready and will be released with the next major release. It is scheduled for this or next release. I suggest you to give it a try when the new version is released. You can find more info at the tool page.

Greetings,
Boyan
the Telerik team
Do you want to have your say when we set our development plans? Do you want to know when a feature you care about is added or when a bug fixed? Explore the Telerik Public Issue Tracking system and vote to affect the priority of the items
0
Bruno
Top achievements
Rank 1
answered on 10 May 2011, 11:08 PM
Hi,

I manually found a way to workaround the previous issue with the invisible window of docking panes.

Now i'm trying to do some coded ui testing with the radribbontab and radribbongroup objects. Coded UI is able to find the radribbongroup as well as the radribbontab, but it can not find its children controls.

When trying to find its children we only get 3 objects, two buttons and an image. This issue happens whether the RadRibbonGroup is collapsed or not. We think that these items are the ones that are shown when the RadRibbonGroup is collapsed.

I also noticed that when trying to record actions with a collapsed RadRibbonGroup when expanded it is searched as if it where a window, also if i take a look at it with UISpy, it's ClassName is PopUp and the Control.Type is Window.

I do not know how this control behaves behind the screen. Is there any way to find those controls when the RadRibbonGroup is not collapsed?.

Thanks
0
Tina Stancheva
Telerik team
answered on 13 May 2011, 04:42 PM
Hi Bruno,

Unfortunately our controls don't actually support Coded UI testing at this stage of development.  However, you can try our test studio which now works for both WPF and SL controls. You can get a free trial version from here.
Let us know if it satisfies your needs.

Greetings,
Tina Stancheva
the Telerik team
Do you want to have your say when we set our development plans? Do you want to know when a feature you care about is added or when a bug fixed? Explore the Telerik Public Issue Tracking system and vote to affect the priority of the items
0
Avi Avni
Top achievements
Rank 1
answered on 30 May 2011, 12:57 PM
Hi,

The general decision to avoid the support for UI tests by MS tools or other 3rd party tools isn't correct. Customers have QA/Test tools that specialized on UI recordings and running automated scripts. This will cause many companies (with large WPF/Silverlight projects) to abandon Telerik's products.

Regarding to your suggestion: "... you can try our test studio which now works for both WPF and SL controls ..."

- Unfortunately your tool doesn't work too :[     We tried it, it opens our application, but can't record any operations, especially on Telerik's controls. Few seconds after opening the app it closes it with internal exception (in your tool). We're really want to progress with your tool (see saga from here).

Sincerely,
0
Tina Stancheva
Telerik team
answered on 02 Jun 2011, 03:49 PM
Hi Ehud Pinchas,

I see your point on the matter. And I want to assure you that we will definitely look into the matter and do our best to provide coded UI tests support as soon as possible.

However, since this is an issue that requires a heavy internal discussion, I cannot bind to anything specific for now. And this is why we scheduled a meeting for next week where we will agree on a plan on how to proceed. Then I will be able to engage with dates and a timeframe. I will keep you posted.

All the best,
Tina Stancheva
the Telerik team
Do you want to have your say when we set our development plans? Do you want to know when a feature you care about is added or when a bug fixed? Explore the Telerik Public Issue Tracking system and vote to affect the priority of the items
0
Tina Stancheva
Telerik team
answered on 13 Jun 2011, 01:59 PM
Hi Ehud Pinchas,

I just wanted to follow up on this issue.

After further discussions and after prioritizing all tasks in our to-do list, we decided to work on the coded UI tests support during the Q3 2011 release. We are planning to implement automation peers for all RadControls that can be used to detect the controls so that different steps can be recorded in tests. After the release we will continue further improving the coded UI tests support.

All the best,
Tina Stancheva
the Telerik team
Do you want to have your say when we set our development plans? Do you want to know when a feature you care about is added or when a bug fixed? Explore the Telerik Public Issue Tracking system and vote to affect the priority of the items
0
Sireesha
Top achievements
Rank 1
answered on 21 Aug 2011, 10:01 AM
Hi Bruno

We are facing a similar issue wherein we are not able to set the text property of a control in the UI using Coded UI Test.
As you said that you have a workaround for the issue; could you please tell us what the workaround is.

It would be of great help to us.

Thanks in advance.
0
Srinivasa
Top achievements
Rank 1
answered on 21 Oct 2011, 07:12 PM

Hi , I am also getting the similar issue - We are using Telerik 3'rd party  grid controls to display the data in our Microsoft .Net environment . We are also using Silver light 4.0 .  Recently I evaluated Telerik Test Studio and there were no issues  . Due to some reasons we have planned to use our internal Coded UI tests only .
When I record the Coded UI Test , I am getting issue as mentioned below .

Here is my test scenario

 

1.       Login

2.       Search

3.       Select the record from the Telerik grid (either click with review button or double click on the record  to navigate to next page )

4.       Logout

 

When I use my Coded UI Test ,  it was failed in the step # 3 and displayed below error .

·         No row was specified as search container for the control. To search for a cell control using 'ColumnIndex', you must specify row as a container element or add 'RowIndex' to the search property of the cell.
Parameter name: SearchProperties

Here is the method the generated in Coded UI test

·         public void ValidateGridInformation()
        {
            #region Variable Declarations
            SilverlightText uIyyyyText = this.UIxxxxSuiteWebReviewWindow.UIxxxxSuiteWebReviewDocument.UISilverlightControlHoPane.UIItemCustom.UIShellShell.UIItemTable.UIItemDataItem.UIItemxxxxSuiteLibraCell.UIyyyyText;
            #endregion

            // Double-Click 'yyyy' label
            Mouse.DoubleClick(uIyyyyText, new Point(69, 17));  // Here is my test failed
        }


I posted this issue in the Microsoft forums ant they were saying , Telerik is releasing a new product to resolve this issue .
I want to know if my above issues should resolved my Microsoft or Telerik ? Please advise me

Thanks
Srini

 

0
Petar Mladenov
Telerik team
answered on 26 Oct 2011, 01:54 PM
Hi Srinivasa,

 We can only assure you that we are currently working on improving our Automation Peers and our CodedUI support which needs them (but not only them). Could you please send us a link to the forum where you have asked Microsoft about this issue ? Thank you in advance.

Kind regards,
Petar Mladenov
the Telerik team

Explore the entire Telerik portfolio by downloading the Ultimate Collection trial package. Get it now >>

0
Srinivasa
Top achievements
Rank 1
answered on 26 Oct 2011, 02:42 PM
0
Petar Mladenov
Telerik team
answered on 31 Oct 2011, 03:08 PM
Hi Srinivasa,

 Unfortunately, we are unable to see the reply from Microsoft in this forum thread.

Regards,
Petar Mladenov
the Telerik team

Explore the entire Telerik portfolio by downloading the Ultimate Collection trial package. Get it now >>

0
Sakthivel
Top achievements
Rank 1
answered on 25 Jun 2015, 06:36 AM
We tried to spy the Telerik RadGridView control in Windows Store Application 8.1.  It was not detecting RadGridView Object. So Not able to access RadGridView Control and perform Coded UI Automation.
0
Dimitrina
Telerik team
answered on 29 Jun 2015, 01:00 PM
Hi,

Can you please confirm whether you are using RadGridView for WPF? Mentioning Windows Store Applications, suggests that you might be using the Windows universal DataGrid?

Regards,
Dimitrina
Telerik
Do you want to have your say when we set our development plans? Do you want to know when a feature you care about is added or when a bug fixed? Explore the Telerik Feedback Portal and vote to affect the priority of the items
0
Sakthivel
Top achievements
Rank 1
answered on 02 Jul 2015, 09:19 AM
Yup, we tried to Use Universal Data Grid and capture the control using spy. It was not able to capture.
0
Sakthivel
Top achievements
Rank 1
answered on 02 Jul 2015, 09:42 AM
This is what the code we have Used:

<Page
x:Class="Coded_UI_Telerik_Universal_Grid.MainPage"
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
xmlns:local="using:Coded_UI_Telerik_Universal_Grid"
xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
mc:Ignorable="d"
xmlns:telerikGrid="using:Telerik.UI.Xaml.Controls.Grid"
xmlns:customSort="using:Telerik.Data.Core"
xmlns:common="using:Coded_UI_Telerik_Universal_Grid.Common">

<Grid Background="{ThemeResource ApplicationPageBackgroundThemeBrush}" ScrollViewer.HorizontalScrollBarVisibility="Auto">
<Grid.ColumnDefinitions>
<ColumnDefinition Width="15" />
<ColumnDefinition Width="*" />
<ColumnDefinition Width="15" />
</Grid.ColumnDefinitions>
<Grid Grid.Column="1">
<Grid.RowDefinitions>
<RowDefinition Height="30" />
<RowDefinition Height="30"/>
<RowDefinition Height="*" />
</Grid.RowDefinitions>
<Grid Grid.Row="0">
<TextBlock Name="telerikGridTableName" Text="{Binding Title,Mode=TwoWay}" HorizontalAlignment="Left" VerticalAlignment="Bottom" />
</Grid>
<Grid Grid.Row="2" ScrollViewer.HorizontalScrollBarVisibility="Auto">
<telerikGrid:RadDataGrid
Name="marketOfferingsDataGrid"
AutoGenerateColumns="False"
AlternateRowBackground="White"
GridLinesVisibility="Horizontal"
Background="White"
BorderBrush="{x:Null}"
BorderThickness="0"
GridLinesThickness="1"
UserColumnReorderMode="None"
GroupHeaderDisplayMode="Scrollable"
Foreground="Black"
SelectionMode="Single"
GridLinesBrush="Gray"
UserGroupMode="Disabled"
DataBindingComplete="marketOfferingsDataGrid_DataBindingComplete"
SelectionChanged="marketOfferingsDataGrid_SelectionChanged"
ItemsSource="{Binding TableBindingObject, Mode=TwoWay}"
UserFilterMode="Enabled">

<telerikGrid:RadDataGrid.Columns>
<telerikGrid:DataGridTextColumn CanUserEdit="True" CanUserFilter="True" CanUserSort="True" Header ="Segment" Name="Segment" PropertyName="Segment"/>
<telerikGrid:DataGridTextColumn CanUserEdit="True" CanUserFilter="True" CanUserSort="True" Header ="Product Category" Name="ProductCategory" PropertyName="ProductCategory"/>
<telerikGrid:DataGridTextColumn CanUserEdit="True" CanUserFilter="True" CanUserSort="True" Header ="Product" Name="Product" PropertyName="Product"/>
<telerikGrid:DataGridTextColumn CanUserEdit="True" CanUserFilter="True" CanUserSort="True" Header ="Importance" Name="Importance" PropertyName="Importance"/>
<telerikGrid:DataGridTemplateColumn CanUserEdit="True" CanUserFilter="False" CanUserSort="False" Header="Focus" Name="Focus">
<telerikGrid:DataGridTemplateColumn.CellContentTemplate>
<DataTemplate>
<CheckBox IsChecked="{Binding IsFocused}" IsTapEnabled="False" IsHitTestVisible="False"/>
</DataTemplate>
</telerikGrid:DataGridTemplateColumn.CellContentTemplate>
</telerikGrid:DataGridTemplateColumn>
<telerikGrid:DataGridTextColumn CanUserEdit="True" CanUserFilter="True" CanUserSort="True" Header ="Units Shipped Last Year" Name="UnitsShippedLastyear" PropertyName="UnitsShippedLastYear"/>
<telerikGrid:DataGridTemplateColumn CanUserEdit="True" CanUserFilter="True" CanUserSort="True" Header="Units Shipped This Year" Name="UnitsShippedThisYear">
<telerikGrid:DataGridTemplateColumn.CellContentTemplate>
<DataTemplate>
<TextBlock Text="{Binding UnitsShippedThisYear}" VerticalAlignment="Center"/>
</DataTemplate>
</telerikGrid:DataGridTemplateColumn.CellContentTemplate>
<telerikGrid:DataGridTemplateColumn.SortDescriptor>
<customSort:DelegateSortDescriptor>
<customSort:DelegateSortDescriptor.KeyLookup>
<common:UnitsShippedThisYearKeyLookupHelper/>
</customSort:DelegateSortDescriptor.KeyLookup>
</customSort:DelegateSortDescriptor>
</telerikGrid:DataGridTemplateColumn.SortDescriptor>
</telerikGrid:DataGridTemplateColumn>
<telerikGrid:DataGridTextColumn CanUserEdit="True" CanUserFilter="True" CanUserSort="True" Header ="Market Share Type" Name="MarketShareType" PropertyName="MarketShareType"/>
<telerikGrid:DataGridTextColumn CanUserEdit="True" CanUserFilter="True" CanUserSort="True" Header ="Market Share" Name="MarketShare" PropertyName="MarketShare"/>
<telerikGrid:DataGridTemplateColumn CanUserEdit="False" CanUserFilter="False" CanUserSort="False" Header="Actions" Name="Actions">
<telerikGrid:DataGridTemplateColumn.CellContentTemplate>
<DataTemplate>
<Grid IsHitTestVisible="True">
<Grid.ColumnDefinitions>
<ColumnDefinition Width="20"/>
<ColumnDefinition Width="40"/>
</Grid.ColumnDefinitions>
<Grid Grid.Column="0">
<SymbolIcon Name="EditSaveIcon" Symbol="Edit" VerticalAlignment="Center" HorizontalAlignment="Left" Tapped="ActionEdit_Click" />
</Grid>
<Grid Grid.Column="1">
<Button Name="DeleteIcon" Click="ActionDelete_Click" VerticalAlignment="Center" HorizontalAlignment="Center">
<Image Source="/Assets/Delete.png" Stretch="None"></Image>
</Button>
</Grid>
</Grid>
</DataTemplate>
</telerikGrid:DataGridTemplateColumn.CellContentTemplate>
</telerikGrid:DataGridTemplateColumn>
</telerikGrid:RadDataGrid.Columns>
</telerikGrid:RadDataGrid>
</Grid>
</Grid>
</Grid>
</Page>
0
Tsvyatko
Telerik team
answered on 06 Jul 2015, 08:50 AM
Hi Sakthivel,

Thank you for the details shared. Currently, UI for Windows Universal suite does not support coded UI tests. At this stage we do not have immediate plans for providing support for it. I have logged it in our feedback portal where you can track its progress - http://teampulse.telerik.com:9896/Project/213/Feedback/Details/296758-add-support-for-coded-ui-tests-for-universal

Regards,
Tsvyatko
Telerik
Do you want to have your say when we set our development plans? Do you want to know when a feature you care about is added or when a bug fixed? Explore the Telerik Feedback Portal and vote to affect the priority of the items
Tags
General Discussions
Asked by
Nir
Top achievements
Rank 1
Answers by
Yordanka
Telerik team
Nir
Top achievements
Rank 1
Milan
Telerik team
Bruno
Top achievements
Rank 1
Boyan
Telerik team
Tina Stancheva
Telerik team
Avi Avni
Top achievements
Rank 1
Sireesha
Top achievements
Rank 1
Srinivasa
Top achievements
Rank 1
Petar Mladenov
Telerik team
Sakthivel
Top achievements
Rank 1
Dimitrina
Telerik team
Tsvyatko
Telerik team
Share this question
or