Editable Silverlight/WPF RadComboBox

PROBLEM

My Silverlight/WPF application was upgraded to the Q1 2012 version of RadControls. Now existing tests against the Editable ComboBox fail with the Unable to locate element error.

SOLUTION

The Q1 2012 release of RadControls introduced a slight change to the Editable ComboBox structure. The component now includes a simple TextBox instead of the specific PickerTextBox in the old version of the component. The control wrapper and translator in Test Studio were updated accordingly in version 2011.2.1413 so that they support the old and new structures.

 

Unfortunately this change breaks an existing test recorded against the old Editable ComboBox structure. This is because the element was originally added with the following find expression:

 

XamlTag=headeredcontentcontrol,name=headeredContentControl,|,XamlPath=/grid[0]/contentpresenter[0]/example[0]/grid[0]/radcombobox[1]/grid[name=VisualRoot]/pickertextbox[automationid=PART_EditableTextBox]

 

This find expression is no longer valid against the new Editable ComboBox. You can either re-record the applicable steps so a new element is added with the updated find expression, or manually change the existing element's find expression and replace pickertextbox with textbox:

 

XamlTag=headeredcontentcontrol,name=headeredContentControl,|,XamlPath=/grid[0]/contentpresenter[0]/example[0]/grid[0]/radcombobox[1]/grid[name=VisualRoot]/textbox[automationid=PART_EditableTextBox]

 

Note: You may also have steps that click into the corresponding TextBoxView of the Editable ComboBox which require the same change.