I was wondering whether RadControls for WPF support UI Automation...
So I created very simple WPF application: I dragged four Rad controls on a form (RadDatePicker, RadTimePicker, RadMaskedTextBox and RadNumericUpDown). Then I assigned AutomationProperties.AutomationId for each of Rad controls (for RadDatePicker it was "datePicker", for RadTimePicker "timePicker", for RadMaskedTextBox "maskedTextBox" and for RadNumericUpDown "numUpDown").
Now in c# (in Program.cs to be precise) I written code like this (mainWindow is a AutomationElement which represents main application window):
|PropertyCondition datePickerCondition =
| new PropertyCondition(AutomationElement.AutomationIdProperty, "datePicker");
|AutomationElement datePicker =
| mainWindow.FindFirst(TreeScope.Element | TreeScope.Descendants, datePickerCondition); //It doesn't find anything
|AutomationPattern datePickerPattrens =
FindFirst method does not find anything, however It should if RadControls for WPF would support UI Automation. Out of four controls I've tested only RadNumericUpDown was found this way.
I've also checked my test application window using UISpy - only RadNumericUpDown had AutomationId properly assigned.
So my question are:
Am I doing something wrong?
If no, when will RadControls for WPF fully support UI Automation?
RadControls for WPF version used in sample application: 2009.2.701.35
Thanks for help