Coded UI Test not working on gridview cells

12 posts, 0 answers
  1. Kevin
    Kevin avatar
    3 posts
    Member since:
    Oct 2010

    Posted 11 Jul 2013 Link to this post

    Hey guys,

    I was trying to do a simple coded UI test on a very simple telerik gridview example, basically just click one cell, edit it then click another cell, then edit , the recording is ok but when I playback it, it always stops on the first cell, and the coded UI test framework throws an exception like following:

    Test method CodedUITestProject1.CodedUITest1.CodedUITestMethod1 threw exception:
    Microsoft.VisualStudio.TestTools.UITest.Extension.UITestControlNotFoundException: The playback failed to find the control with the given search properties. Additional Details:
    TechnologyName:  'Silverlight'
    ControlType:  'CheckBox'
     ---> System.Runtime.InteropServices.COMException: Error HRESULT E_FAIL has been returned from a call to a COM component.
    Result StackTrace: 

    Any idea of what is the root cause?


  2. Maya
    Admin
    Maya avatar
    4062 posts

    Posted 11 Jul 2013 Link to this post

    Hello Kevin,

    Currently, there is support for RadGridView for WPF only, not for Silverlight. In fact when you start to record any actions, coded ui test builder displays a message that Microsoft Silverlight is not supported and you will get exactly the same behavior with DataGrid for Silverlight as well. 
    Are you workign with this plugin ?

    Regards,
    Maya
    Telerik
    TRY TELERIK'S NEWEST PRODUCT - EQATEC APPLICATION ANALYTICS for SILVERLIGHT.
    Learn what features your users use (or don't use) in your application. Know your audience. Target it better. Develop wisely.
    Sign up for Free application insights >>
  3. DevCraft banner
  4. Kevin
    Kevin avatar
    3 posts
    Member since:
    Oct 2010

    Posted 11 Jul 2013 Link to this post

    Yes I followed the procedure to setup Silverlight application for testing:

    -- http://visualstudiogallery.msdn.microsoft.com/28312a61-9451-451a-990c-c9929b751eb4
    -- http://msdn.microsoft.com/en-us/library/gg313838.aspx

    recording is ok, the links, buttons on the silverlight page is ok with the recording and playback, but the issue is with the cells in the grid.

    so this will not be working at this stage? do you have any plan to make it work in the future version?

    The other thing I am looking at is Telerik test automation tool, does it support  automation testing on Telerik  controls well?


    Thanks
    Kevin

  5. Maya
    Admin
    Maya avatar
    4062 posts

    Posted 16 Jul 2013 Link to this post

    Hi Kevin,

    Generally, we officially provide support for Coded UI only for WPF. I will investigate the case to see what the opportunities for Silverlight are and will let you know on the progress.
    As for your second question, are you asking about Test Studio and creating Coded UI tests with it ? 

    Regards,
    Maya
    Telerik
    TRY TELERIK'S NEWEST PRODUCT - EQATEC APPLICATION ANALYTICS for SILVERLIGHT.
    Learn what features your users use (or don't use) in your application. Know your audience. Target it better. Develop wisely.
    Sign up for Free application insights >>
  6. Kevin
    Kevin avatar
    3 posts
    Member since:
    Oct 2010

    Posted 16 Jul 2013 Link to this post

    Hey Maya,

    Yes I was asking if it supports coded UI test of telerik Silverlight controls.

    Thanks
    Kevin
  7. Maya
    Admin
    Maya avatar
    4062 posts

    Posted 17 Jul 2013 Link to this post

    Hello Kevin,

    Test Studio does support Coded UI for Silverlight. You can check our documentation for further reference. If you plan on recording a test (not just an assertion one), the complexity of the tests depends on the control you want to work with.

    Regards,
    Maya
    Telerik
    TRY TELERIK'S NEWEST PRODUCT - EQATEC APPLICATION ANALYTICS for SILVERLIGHT.
    Learn what features your users use (or don't use) in your application. Know your audience. Target it better. Develop wisely.
    Sign up for Free application insights >>
  8. Mayur
    Mayur avatar
    1 posts
    Member since:
    Dec 2013

    Posted 23 Dec 2013 Link to this post

     Hey Maya,

     I'm evaluating Test Studio, it's being pretty satisfying but I ran into something very troublesome, and essential to almost any test.

     I have an application in Slverlight that uses a Telerik Rad GridView.

     The test goes like this:
     - Click the cell and enable the textbox 
     - Type in the text box
     The problem is that when Test Studio tries to type the test fails, because it does not find the Textbox.

     

     Error Message logged:

    ------------------------------------------------------------

    Failure Information:

    ~~~~~~~~~~~~~~~

    Unable to find the specified element: Unable to find the element of type: textbox

    InnerException:

    ArtOfTest.Common.Exceptions.FindElementException: Unable to find the specified element: Unable to find the element of type: textbox

       at ArtOfTest.WebAii.Silverlight.UserInteraction.Click(MouseClickType clickType, Point offsetPoint, OffsetReference reference)

       at ArtOfTest.WebAii.Silverlight.UserInteraction.Click(MouseClickType clickType)

       at ArtOfTest.WebAii.Controls.Xaml.XamlControlHelper.SetText(String propertyName, FrameworkElement xamlControl, Boolean simulateRealUser, String text, Int32 keyPressTime, Int32 keyHoldTime, Boolean fireKeyEvents, Boolean clearCurrentText)

       at ArtOfTest.WebAii.Silverlight.UI.TextBox.SetText(Boolean simulateRealUser, String text, Int32 keyPressTime, Int32 keyHoldTime, Boolean fireKeyEvents)

       at ArtOfTest.WebAii.Design.IntrinsicTranslators.Silverlight.Descriptors.TextBoxSetTextActionDescriptor.Execute(IApplication hostApp)

       at ArtOfTest.WebAii.Design.Extensibility.XamlActionDescriptor.Execute(IAutomationHost autoHost)

       at ArtOfTest.WebAii.Design.Execution.ExecutionEngine.ExecuteStep(Int32 order)

    ------------------------------------------------------------

    '12/23/2013 11:06:48 AM' - Detected a failure. Step is marked 'ContinueOnFailure=False' aborting test execution.”

    ------------------------------------------------------------

     

     Query:

     - Does Telerik Test Studio support Silverlight and the Grid View controls?

     If yes I request you to please provide some solution over this problem, because I am not able to move ahead on my automation without this support.

     

     

     Note:

      1. Test studio detects GridViewComboBoxColumn without any problem.

      2. Another thing is that recording works fine, but while executing the test it fails.

      3. My application require a single to enable the text box.



     Thanks
     Mayur
  9. Maya
    Admin
    Maya avatar
    4062 posts

    Posted 26 Dec 2013 Link to this post

    Hi Mayur,

    We are aware of similar issue and we are investigating the cause of it. I will write back as soon as we have more information on it.


    Regards,
    Maya
    Telerik
    TRY TELERIK'S NEWEST PRODUCT - EQATEC APPLICATION ANALYTICS for SILVERLIGHT.
    Learn what features your users use (or don't use) in your application. Know your audience. Target it better. Develop wisely.
    Sign up for Free application insights >>
  10. Patrick
    Patrick avatar
    1 posts
    Member since:
    Mar 2014

    Posted 24 Mar 2014 Link to this post

    Do Telerik radgrids work with coded UI tests for Windows forms?  I am having trouble. 
  11. Stephen
    Stephen avatar
    6 posts
    Member since:
    Mar 2014

    Posted 26 Mar 2014 Link to this post

    On the same topic as Patrick above:

    I'm also having issues getting RadGridView to work with Visual Studio's Coded UI Testing.

    I note that the tech sheet for Telerik UI for WinForms located here lists that RadGridView works on all levels of Coded UI Test Framework.

    However the problem I face is that trying to carry out any keyboard or mouse events using the Visual Studio Coded UI Test builder causes the test builder to stop responding and close. Additionally trying to carry out any assertions using the Visual Studio Coded UI Test builder also causes the test builder to stop responding and close.

    The Telerik version used is Q3 2013.

    If you require more information feel free to ask.
  12. Stephen
    Stephen avatar
    6 posts
    Member since:
    Mar 2014

    Posted 26 Mar 2014 in reply to Stephen Link to this post

    Seems the link has been removed for "I note that the tech sheet for Telerik UI for WinForms located [LINK]here[/LINK]"

    The link is: http://www.telerik.com/winforms/tech-sheets/accessibility-support
  13. George
    Admin
    George avatar
    500 posts

    Posted 27 Mar 2014 Link to this post

    Hi Stephen,

    Thank you for contacting us.

    We have not received such reports, regarding a crashing test builder when using our suite. Can you please check if you have any other possibly conflicting applications started as well as with other Visual Studio version. You can also try to create a new application and see if that will cause any troubles. And finally, make sure that you have set the EnableCodedUITests property to true.

    If you still experience difficulties, please provide me with additional details about your Visual Studio Version, OS version and possibly with a sample application where the problem is reproducible.

    Looking forward to your reply.

    Regards,
    George
    Telerik
     

    Build cross-platform mobile apps using Visual Studio and .NET. Register for the online webinar on 03/27/2014, 11:00AM US ET.. Seats are limited.

     
Back to Top
DevCraft banner