Automating a data-bound RadTreeView

2 posts, 0 answers
  1. Yael Dwir
    Yael Dwir avatar
    5 posts
    Member since:
    Feb 2010

    Posted 06 Aug 2018 Link to this post

    hello,

    I was recently tasked with adding UI Automation testing to a WPF MVVM application developed by my team.
    The application is using RadControls 2018.1 extensively, and I'm struggling to automate actions around RadTreeView.

    I've added the steps needed to add Telerik control support to Coded UI, as described this page.
    Please note we're using Visual Studio 2017 Enterprise. 

    Then, I created a new Coded UI Test Project to my existing solution, and tried to record a simple test using CUIT builder:

    1. Launch the application.
    2. Expand the root of a tree view in the main window.
    3. Expand a RadTreeViewItem (directory).
    4. Double click an item in sub-tree.

    When trying to run the recorder test, sometimes it fails to find the RadTreeView, and when it does find it, it fails to navigate the tree correctly (see below).

    The main window contains two RadTreeViews, both supplied with a unique AutomationId, both use data-binding, and marked with IsVirtualized. Sometimes the test fails to navigate the first tree (on which we recorded the actions), but succeeds in opening the desired item from the second tree. This is probably due to the both trees being bound to related collections (containing shared items).

    Later, I guessed that the issues I'm experiencing might be related to the fact that RadControls doesn't fully implement all levels of CodedUI support. After reading a bit about Progress Test Studio and it's extensive Telerik UI support, I downloaded it's trial version and tried to record the same test.

    I used translators and control highlighting context menu, to specifically choose the left-click action on the TreeViewItem's ExpandButton. This way, navigation through the tree actually works, but on the final step, the wrong TreeVIewItem is being double-clicked...

    I'm starting to lose fate that our application can actually be automated, and I haven't event started with assertion, or more complex use-cases in our application. Your support will be very welcomed.

  2. Petar Mladenov
    Admin
    Petar Mladenov avatar
    3086 posts

    Posted 08 Aug 2018 Link to this post

    Hi Yael,

    I am posting here some points regarding Test Studio, also discussed in private support thread with you, I hope they can be of help here to other users.

    - What you reported is that the deepest level to select an element in the tree is causing troubles - you could double check what the recorded element's find expression is and if necessary you could modify it.

    - You could also try inserting execution delays - or wait steps - to ensure the elements will be visible in the application. 

    Regards,
    Petar Mladenov
    Progress Telerik
    Get quickly onboarded and successful with your Telerik and/or Kendo UI products with the Virtual Classroom free technical training, available to all active customers. Learn More.
Back to Top