Coded UI test cant detect Telerik RadGridView obj

24 posts, 0 answers
  1. Nir
    Nir avatar
    4 posts
    Member since:
    Aug 2010

    Posted 22 Aug 2010 Link to this post

    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

  2. Yordanka
    Admin
    Yordanka avatar
    634 posts

    Posted 24 Aug 2010 Link to this post

    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
  3. Nir
    Nir avatar
    4 posts
    Member since:
    Aug 2010

    Posted 26 Aug 2010 Link to this post

    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

     

     

  4. Milan
    Admin
    Milan avatar
    1989 posts

    Posted 30 Aug 2010 Link to this post

    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
  5. Bruno
    Bruno avatar
    4 posts
    Member since:
    Apr 2011

    Posted 18 Apr 2011 Link to this post

    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,          
  6. Boyan
    Admin
    Boyan avatar
    758 posts

    Posted 21 Apr 2011 Link to this post

    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
  7. Bruno
    Bruno avatar
    4 posts
    Member since:
    Apr 2011

    Posted 21 Apr 2011 Link to this post

    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,
  8. Bruno
    Bruno avatar
    4 posts
    Member since:
    Apr 2011

    Posted 22 Apr 2011 Link to this post


    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,



  9. Boyan
    Admin
    Boyan avatar
    758 posts

    Posted 27 Apr 2011 Link to this post

    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
  10. Bruno
    Bruno avatar
    4 posts
    Member since:
    Apr 2011

    Posted 10 May 2011 Link to this post

    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
  11. Tina Stancheva
    Admin
    Tina Stancheva avatar
    3299 posts

    Posted 13 May 2011 Link to this post

    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
  12. Avi Avni
    Avi Avni avatar
    98 posts
    Member since:
    Feb 2010

    Posted 30 May 2011 Link to this post

    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,
  13. Tina Stancheva
    Admin
    Tina Stancheva avatar
    3299 posts

    Posted 02 Jun 2011 Link to this post

    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
  14. Tina Stancheva
    Admin
    Tina Stancheva avatar
    3299 posts

    Posted 13 Jun 2011 Link to this post

    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
  15. Sireesha
    Sireesha avatar
    4 posts
    Member since:
    Aug 2011

    Posted 21 Aug 2011 Link to this post

    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.
  16. Srinivasa
    Srinivasa avatar
    8 posts
    Member since:
    Sep 2011

    Posted 21 Oct 2011 Link to this post

    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

     

  17. Petar Mladenov
    Admin
    Petar Mladenov avatar
    2955 posts

    Posted 26 Oct 2011 Link to this post

    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 >>

  18. Petar Mladenov
    Admin
    Petar Mladenov avatar
    2955 posts

    Posted 31 Oct 2011 Link to this post

    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 >>

  19. Sakthivel
    Sakthivel avatar
    5 posts
    Member since:
    Jan 2015

    Posted 25 Jun 2015 Link to this post

    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.
  20. Dimitrina
    Admin
    Dimitrina avatar
    3769 posts

    Posted 29 Jun 2015 Link to this post

    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
  21. Sakthivel
    Sakthivel avatar
    5 posts
    Member since:
    Jan 2015

    Posted 02 Jul 2015 in reply to Dimitrina Link to this post

    Yup, we tried to Use Universal Data Grid and capture the control using spy. It was not able to capture.
  22. Sakthivel
    Sakthivel avatar
    5 posts
    Member since:
    Jan 2015

    Posted 02 Jul 2015 in reply to Sakthivel Link to this post

    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>
  23. Tsvyatko
    Admin
    Tsvyatko avatar
    848 posts

    Posted 06 Jul 2015 Link to this post

    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
Back to Top