CUIT is failing perform actions on the controls placed inside the RadPaneGroup

20 posts, 0 answers
  1. Rajesh Kumar
    Rajesh Kumar avatar
    4 posts
    Member since:
    Aug 2012

    Posted 28 May 2013 Link to this post

    Hi Team,

    We are using the Telerik controls in our application and to test the application we are using Coded UI Test 2012.

    We were able to record actions on the controls placed inside the RadPaneGroup. But the playback is failing.
    For the button inside the RadPaneGroup, CUIT is identifying the button control with the following hierarchy:
    --->MainWindow
    --->Rad Split Container
    ---> Rad Pane Group --->Button But it is failing to playback actions on the button. Following is the exception message with which the CUIT is failing:

    ---------------------------------------------------------------------------------------------------------
    <<Result Message: >>
    Test method CodedUITestProject2.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:  'UIA'
    ControlType:  'Button'
    AutomationId:  'test'
     Search may have failed at 'Rad Pane Group' TabList as it may have virtualized children. If the control being searched is descendant of 'Rad Pane Group' TabList then including it as the parent container may solve the problem. ---> System.Runtime.InteropServices.COMException: Error HRESULT E_FAIL has been returned from a call to a COM component.
    Result StackTrace:
    at Microsoft.VisualStudio.TestTools.UITest.Playback.Engine.IScreenElement.FindAllDescendants(String bstrQueryId, Object& pvarResKeys, Int32 cResKeys, Int32 nMaxDepth)
       at Microsoft.VisualStudio.TestTools.UITest.Playback.ScreenElement.FindAllScreenElement(String queryId, Int32 depth, Boolean singleQueryId, Boolean throwException, Boolean resetSkipStep)
       at Microsoft.VisualStudio.TestTools.UITest.Playback.ScreenElement.FindScreenElement(String queryId, Int32 depth, Boolean resetSkipStep)
       at Microsoft.VisualStudio.TestTools.UITesting.UITestControl.FindFirstDescendant(String queryId, Int32 maxDepth, Int32& timeLeft)
     --- End of inner exception stack trace ---
        at Microsoft.VisualStudio.TestTools.UITesting.Playback.MapControlNotFoundException(COMException ex, IPlaybackContext context)
       at Microsoft.VisualStudio.TestTools.UITesting.Playback.MapAndThrowComException(COMException innerException, IPlaybackContext context)
       at Microsoft.VisualStudio.TestTools.UITesting.Playback.MapAndThrowException(SystemException exception, IPlaybackContext context)
       at Microsoft.VisualStudio.TestTools.UITesting.Playback.MapAndThrowException(SystemException exception, String queryId)
       at Microsoft.VisualStudio.TestTools.UITesting.UITestControl.FindFirstDescendant(String queryId, Int32 maxDepth, Int32& timeLeft)
       at Microsoft.VisualStudio.TestTools.UITesting.SearchHelper.GetElement(Boolean useCache, ISearchArgument searchArg)
       at Microsoft.VisualStudio.TestTools.UITesting.SearchHelper.Search(ISearchArgument searchArg)
       at Microsoft.VisualStudio.TestTools.UITesting.UITestControl.FindInternal()
       at Microsoft.VisualStudio.TestTools.UITesting.UITestControl.<Find>b__d()
       at Microsoft.VisualStudio.TestTools.UITesting.CodedUITestMethodInvoker.InvokeMethod[T](Func`1 function, UITestControl control, Boolean firePlaybackErrorEvent, Boolean logAsAction)
       at Microsoft.VisualStudio.TestTools.UITesting.UITestControl.Find()
       at Microsoft.VisualStudio.TestTools.UITesting.UITestControl.GetPropertyPrivate(String propertyName)
       at Microsoft.VisualStudio.TestTools.UITesting.UITestControl.<>c__DisplayClass11.<GetProperty>b__10()
       at Microsoft.VisualStudio.TestTools.UITesting.CodedUITestMethodInvoker.InvokeMethod[T](Func`1 function, UITestControl control, Boolean firePlaybackErrorEvent, Boolean logAsAction)
       at Microsoft.VisualStudio.TestTools.UITesting.UITestControl.GetProperty(String propertyName)
       at Microsoft.VisualStudio.TestTools.UITesting.ALUtility.GetTechElementFromUITestControl(UITestControl uiTestControl)
       at Microsoft.VisualStudio.TestTools.UITesting.ActionExecutorManager.GetActionExecutor(UITestControl uiControl)
       at Microsoft.VisualStudio.TestTools.UITesting.Mouse.ClickImplementation(UITestControl control, MouseButtons button, ModifierKeys modifierKeys, Point relativeCoordinate)
       at Microsoft.VisualStudio.TestTools.UITesting.Mouse.<>c__DisplayClass6.<Click>b__5()
       at Microsoft.VisualStudio.TestTools.UITesting.CodedUITestMethodInvoker.InvokeMethod[T](Func`1 function, UITestControl control, Boolean firePlaybackErrorEvent, Boolean logAsAction)
       at Microsoft.VisualStudio.TestTools.UITesting.Mouse.Click(UITestControl control, MouseButtons button, ModifierKeys modifierKeys, Point relativeCoordinate)
       at Microsoft.VisualStudio.TestTools.UITesting.Mouse.Click(UITestControl control, Point relativeCoordinate)
       at CodedUITestProject2.UIMap.RecordedMethod7() in c:\Users\smamidi\Documents\Visual Studio 2012\Projects\CodedUITestProject2\CodedUITestProject2\UIMap.Designer.cs:line 136
       at CodedUITestProject2.CodedUITest1.CodedUITestMethod1() in c:\Users\smamidi\Documents\Visual Studio 2012\Projects\CodedUITestProject2\CodedUITestProject2\CodedUITest1.cs:line 34

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

    This is a blocking issue. Any help in automating on the controls placed inside the RadPaneGroup is greatly appreciated.

    Regards,
    Rajesh.

    Posted on Nov 15, 2012 (permalink)

    We are using the Telerik controls in developing our application. We were using Coded UI Test to test our application.

  2. Rajesh Kumar
    Rajesh Kumar avatar
    4 posts
    Member since:
    Aug 2012

    Posted 30 May 2013 Link to this post

    Hi Team,

    Is there any progress on it?

    Regards,
    Sirisha
  3. UI for WPF is Visual Studio 2017 Ready
  4. Georgi
    Admin
    Georgi avatar
    348 posts

    Posted 30 May 2013 Link to this post

    Hello Rajesh,

    We were able to reproduce the issue and we have logged it in our system. So here you can track the progress of fixing it and as the Q2 2013 release is just around the corner we have scheduled the fix for the Q2 2013 SP.
    It seems like the elements in the RadPane are not located, because their search criteria does not include the RadPane and the CodedUI tries to find them in the RadPaneGroup.

    Please, excuse us for the inconvenience. We have added points to your account for the suggestions. Don't hesitate to contact us if you have other questions.




    Regards,
    Georgi
    Telerik

    Explore the entire Telerik portfolio by downloading Telerik DevCraft Ultimate.

  5. Sirisha
    Sirisha avatar
    13 posts
    Member since:
    Jun 2013

    Posted 21 Jul 2013 Link to this post

    Hi Team, 

    Is there any update on it?

    Regards,
    Sirisha
  6. Georgi
    Admin
    Georgi avatar
    348 posts

    Posted 22 Jul 2013 Link to this post

    Hi Rajesh,

    Unfortunately while working on the issue we have stumbled on some problems and the issue seems more complex and time consuming than we anticipated. Therefore regardless of our efforts the fix would not make it for the Q2 2013 SP, but we will do our best to fix it for the Q3 2013 as there is a chance that the fix would be available in one of the Internal Builds after the Service Pack.
    Once again we are sorry for the  caused inconvenience.

    Regards,
    Georgi
    Telerik
    TRY TELERIK'S NEWEST PRODUCT - EQATEC APPLICATION ANALYTICS for WPF.
    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 >>
  7. Rajendar
    Rajendar avatar
    69 posts
    Member since:
    Jun 2013

    Posted 21 Aug 2013 Link to this post

    Hi Georgi,

    Is there any temporary solution? Is there any alter control to replace this control?

    Regards,
    Rajendar. 
  8. Sirisha
    Sirisha avatar
    13 posts
    Member since:
    Jun 2013

    Posted 21 Aug 2013 Link to this post

    Hi Team,

    In the PITS, I see the status as resolved. Will the fix would be delivered in the coming release?

    Regards,
    Sirisha
  9. Georgi
    Admin
    Georgi avatar
    348 posts

    Posted 21 Aug 2013 Link to this post

    Hi guys,

    The issue is fixed and it is available in our Latest Internal Build.
    It will be also available in our next official release Q3 2013.
    It would be great if you can give it a try and let us know if everything works as expected at your end.

    Regards,
    Georgi
    Telerik
    TRY TELERIK'S NEWEST PRODUCT - EQATEC APPLICATION ANALYTICS for WPF.
    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. Rajendar
    Rajendar avatar
    69 posts
    Member since:
    Jun 2013

    Posted 21 Aug 2013 Link to this post

    Hi Georgi,

    The issue is fixed and it is available in our Latest Internal Build.
    Can i download it from this link?http://www.telerik.com/account/your-products/internal-builds.aspx 
    When will you release it please mention date?
    In what version will you include it? 

    Regards,
    Rajendar.
  11. Georgi
    Admin
    Georgi avatar
    348 posts

    Posted 22 Aug 2013 Link to this post

    Hi Rajendar,

    You can download the Latest Internal Build (2013.2.819 version) from here.
    Also our next official release (with the included fix) will be available in the middle or in the end of October and it will be with version 2013.3.10xx, where xx depends on the exact date of the release.
    If you have any other questions, please don't hesitate to ask.

    Regards,
    Georgi
    Telerik
    TRY TELERIK'S NEWEST PRODUCT - EQATEC APPLICATION ANALYTICS for WPF.
    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 >>
  12. Rajendar
    Rajendar avatar
    69 posts
    Member since:
    Jun 2013

    Posted 02 Sep 2013 Link to this post

    Hi Georgi,

    Was this problem fixed in 2013.2.819 version?
    Is there any difference between .Net 4.0 and .Net 4.5??
    if not could you please provide link to the internal build which has the fix?

    Regards,
    Rajendar. 


  13. Georgi
    Admin
    Georgi avatar
    348 posts

    Posted 02 Sep 2013 Link to this post

    Hello Rajendar,

    Yes, this(2013.2.819) is the internal build in which the fix is included and the issue should be fixed.
    Please note that due to the changes we have made the search criteria of the Pane might be changed.
    So maybe you can try to record the test again and check if it still fails on the playback.
    If this is the case, please don't hesitate to let us know, also a simple project and test reproducing the issue would be helpful.

    Regards,
    Georgi
    Telerik
    TRY TELERIK'S NEWEST PRODUCT - EQATEC APPLICATION ANALYTICS for WPF.
    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 >>
  14. Thafnitha
    Thafnitha avatar
    1 posts
    Member since:
    May 2014

    Posted 02 May 2014 in reply to Georgi Link to this post

    We are using codedUI test to test an application in which we use telerik controls and we have upgraded the version to 2014.1.224.40. 
    We can record the controls placed in RadPaneGroup, , but unable to playing back and CUIT cannot found the textbox or checkbox which placed inside the RadPane group.

    The below error has been encountered in CodedUI 
    {no format}
    Test method CodedUITestProject2.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:  'UIA'

     ControlType:  'Button'

     AutomationId:  'test'

      Search may have failed at 'Rad Pane
    Group' TabList as it may have virtualized children. If the control being
    searched is descendant of 'Rad Pane Group' TabList then including it as the
    parent container may solve the problem. ---> System.Runtime.InteropServices.COMException:
    Error HRESULT E_FAIL has been returned from a call to a COM component.

     Result StackTrace:    

     at
    Microsoft.VisualStudio.TestTools.UITest.Playback.Engine.IScreenElement.FindAllDescendants(String
    bstrQueryId, Object& pvarResKeys, Int32 cResKeys, Int32 nMaxDepth)

        at
    Microsoft.VisualStudio.TestTools.UITest.Playback.ScreenElement.FindAllScreenElement(String
    queryId, Int32 depth, Boolean singleQueryId, Boolean throwException, Boolean
    resetSkipStep)

        at
    Microsoft.VisualStudio.TestTools.UITest.Playback.ScreenElement.FindScreenElement(String
    queryId, Int32 depth, Boolean resetSkipStep)

        at
    Microsoft.VisualStudio.TestTools.UITesting.UITestControl.FindFirstDescendant(String
    queryId, Int32 maxDepth, Int32& timeLeft)

      --- End of inner exception stack
    trace ---

         at
    Microsoft.VisualStudio.TestTools.UITesting.Playback.MapControlNotFoundException(COMException
    ex, IPlaybackContext context)

        at
    Microsoft.VisualStudio.TestTools.UITesting.Playback.MapAndThrowComException(COMException
    innerException, IPlaybackContext context)

        at
    Microsoft.VisualStudio.TestTools.UITesting.Playback.MapAndThrowException(SystemException
    exception, IPlaybackContext context)

        at
    Microsoft.VisualStudio.TestTools.UITesting.Playback.MapAndThrowException(SystemException
    exception, String queryId)

        at
    Microsoft.VisualStudio.TestTools.UITesting.UITestControl.FindFirstDescendant(String
    queryId, Int32 maxDepth, Int32& timeLeft)

        at
    Microsoft.VisualStudio.TestTools.UITesting.SearchHelper.GetElement(Boolean
    useCache, ISearchArgument searchArg)

        at
    Microsoft.VisualStudio.TestTools.UITesting.SearchHelper.Search(ISearchArgument
    searchArg)

        at
    Microsoft.VisualStudio.TestTools.UITesting.UITestControl.FindInternal()

        at
    Microsoft.VisualStudio.TestTools.UITesting.UITestControl.<Find>b__d()

        at
    Microsoft.VisualStudio.TestTools.UITesting.CodedUITestMethodInvoker.InvokeMethod[T](Func`1
    function, UITestControl control, Boolean firePlaybackErrorEvent, Boolean
    logAsAction)

        at
    Microsoft.VisualStudio.TestTools.UITesting.UITestControl.Find()

        at
    Microsoft.VisualStudio.TestTools.UITesting.UITestControl.GetPropertyPrivate(String
    propertyName)

        at
    Microsoft.VisualStudio.TestTools.UITesting.UITestControl.<>c__DisplayClass11.<GetProperty>b__10()

        at Microsoft.VisualStudio.TestTools.UITesting.CodedUITestMethodInvoker.InvokeMethod[T](Func`1
    function, UITestControl control, Boolean firePlaybackErrorEvent, Boolean
    logAsAction)

        at
    Microsoft.VisualStudio.TestTools.UITesting.UITestControl.GetProperty(String
    propertyName)

        at
    Microsoft.VisualStudio.TestTools.UITesting.ALUtility.GetTechElementFromUITestControl(UITestControl
    uiTestControl)

        at
    Microsoft.VisualStudio.TestTools.UITesting.ActionExecutorManager.GetActionExecutor(UITestControl
    uiControl)

        at
    Microsoft.VisualStudio.TestTools.UITesting.Mouse.ClickImplementation(UITestControl
    control, MouseButtons button, ModifierKeys modifierKeys, Point
    relativeCoordinate)

        at
    Microsoft.VisualStudio.TestTools.UITesting.Mouse.<>c__DisplayClass6.<Click>b__5()

        at
    Microsoft.VisualStudio.TestTools.UITesting.CodedUITestMethodInvoker.InvokeMethod[T](Func`1
    function, UITestControl control, Boolean firePlaybackErrorEvent, Boolean
    logAsAction)

        at
    Microsoft.VisualStudio.TestTools.UITesting.Mouse.Click(UITestControl control,
    MouseButtons button, ModifierKeys modifierKeys, Point relativeCoordinate)

        at
    Microsoft.VisualStudio.TestTools.UITesting.Mouse.Click(UITestControl control,
    Point relativeCoordinate)

        at
    CodedUITestProject2.UIMap.RecordedMethod7() in
    c:\Users\smamidi\Documents\Visual Studio
    2012\Projects\CodedUITestProject2\CodedUITestProject2\UIMap.Designer.cs:line
    136

        at
    CodedUITestProject2.CodedUITest1.CodedUITestMethod1() in
    c:\Users\smamidi\Documents\Visual Studio 2012\Projects\CodedUITestProject2\CodedUITestProject2\CodedUITest1.cs:line
    34
    {noformat}

    I am aware that this issue has been fixed in an internal build of Q3 2013, but its again failed in 2014 version.
    Please let me know if anyone can help me out on this. 

    Thanks
    Thafnitha 
     
  15. George
    Admin
    George avatar
    1332 posts

    Posted 07 May 2014 Link to this post

    Hi Thafnitha,

    We are currently investigating the given scenario and we will send you more information later this week. I hope this is acceptable for you.

    Regards,
    George
    Telerik
     
    Check out Telerik Analytics, the service which allows developers to discover app usage patterns, analyze user data, log exceptions, solve problems and profile application performance at run time. Watch the videos and start improving your app based on facts, not hunches.
     
  16. George
    Admin
    George avatar
    1332 posts

    Posted 09 May 2014 Link to this post

    Hi Thafnitha,

    Can you confirm that the RadSplitContainers have AutomationProperties.AutomationId set? Setting this property is mandatory when locating elements in the RadDocking control. Please, note that when panes are shuffled, new split containers could be are generated and the AutomationId must be set for them, too. This could be done using custom GeneratedItemsFactory.

    Please, refer to the attached project and let me know if this helps.

    Regards,
    George
    Telerik
     
    Check out Telerik Analytics, the service which allows developers to discover app usage patterns, analyze user data, log exceptions, solve problems and profile application performance at run time. Watch the videos and start improving your app based on facts, not hunches.
     
  17. Deak
    Deak avatar
    3 posts
    Member since:
    Oct 2014

    Posted 27 Oct 2014 Link to this post

    Hi

    I have the following item hierarchy:

    WPF Window
     |_ RadDocking
        |_RadSplitContainer
    |_RadPaneGroup
     |_RadPane
        |_RadButton

    I try to automatize the application with CUIT. The recorder is working ok, the element are found, but the playback failed.
    I get an UITestControlNotFoundException

    The playback failed to find the control with the given search properties. Additional Details: \r\nTechnologyName:  'UIA'\r\nFrameworkId:  'Wpf'\r\nControlType:  'Button'\r\nAutomationId:  'AddNewCase'\r\n Search may have failed at 'Rad Pane Group' TabList as it may have virtualized children. If the control being searched is descendant of 'Rad Pane Group' TabList then including it as the parent container may solve the problem."}

    Could you help me, please?
    Regards,
    Zsolt
  18. George
    Admin
    George avatar
    1332 posts

    Posted 28 Oct 2014 Link to this post

    Hi Zsolt,

    Note that RadPaneGroup must be placed inside the RadSplitContainer, it cannot be used as standalone control. Also, double check that RadSplitContainers have AutomationProperties.AutomationId set.

    Hope this helps.

    Regards,
    George
    Telerik
     

    Check out the Telerik Platform - the only platform that combines a rich set of UI tools with powerful cloud services to develop web, hybrid and native mobile apps.

     
  19. Deak
    Deak avatar
    3 posts
    Member since:
    Oct 2014

    Posted 07 Nov 2014 in reply to George Link to this post

    Hi, 

    So the good hierarhy is the following:
    WpfWindow
       RadDocking
            RadSplitContainer
                 RadPaneGroup
                         RadPane
                               UserControl (a xaml file)
                                    RadButton

    I set for all elements the AutomationId and still is a playback fail. When i try to find with Locator what gives the Visual Studio recorder, it seen's that the RadPane it's visible (the locator find it), but the UserControl and the inner elements doesn't. Any idea what is wrong? 

    Thank's Zsolt.
  20. George
    Admin
    George avatar
    1332 posts

    Posted 10 Nov 2014 Link to this post

    Hello Zsolt,

    We tried to reproduce the described behavior but to no avail. Can you confirm that the ExtensionCore assembly is added as reference in the test project? Please refer to the attached sample project and let me know if there is anything we missed on our side.

    Regards,
    George
    Telerik
     

    Check out the Telerik Platform - the only platform that combines a rich set of UI tools with powerful cloud services to develop web, hybrid and native mobile apps.

     
  21. Deak
    Deak avatar
    3 posts
    Member since:
    Oct 2014

    Posted 11 Nov 2014 in reply to George Link to this post

    Hi,

    I think i have found the problem. 
    In my case the usercontrol is instanced from the code, so it is a virtualized object. For VirtualizedControls the ItemContainer must be within 2 ParentLevel of the control. And in my case the container is at the 3 parent level. So i think this is the problem.

    Zsolt
Back to Top
UI for WPF is Visual Studio 2017 Ready