Scenario: The steps for applying a filter in WPF grid columns is tied up with the index of the column in the current view of the grid. However, the columns in WPF grid can be reordered. And after changing the columns initial order, any steps to interact with the filtering, will act based on index in the current order.
Steps to get the scenario in action:
Expected is that you can identify the specific columns filters by their name, for example.
Actual is that the interacting with the filters is based on the order of columns. Or in other words the filter for the second column will be opened, if that was recorded, no matter if it is a different column.
Feature request: Implement the option to use the column names to identify the filters to select.
Workaround: The lack of this functionality can be covered in a coded step - the sample code below is based on the structure of the grid from the Telerik WPF demo app.
// Add the cilumn name textbloxk element in the Elements Explorer so that you can use it in the code.
// Ensure its find expression uses the TextContent attribute - that way the element will be consistently identified no matter where it is in the grid
var lastNameTextblock = Applications.WPF_Demosexe.WPF_Controls_Examples__GridView_ChartView_ScheduleView_RichTextBox_Map_Code_Samples.LastNameTextblock;
// Locate the first parent element of that textblock, which is of type grid
var cell = lastNameTextblock.Parent("Grid");
// Create a find expression, which searches for element with XamlTag=filteringdropdown
var expression = new XamlFindExpression("XamlTag=filteringdropdown");
// Use it to locate and click on that element.
cell.Find.ByExpression(expression).User.Click();