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:
- Launch the application.
- Expand the root of a tree view in the main window.
- Expand a RadTreeViewItem (directory).
- 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.