In our WPF application, for performance reasons we recently changed a number of ListView and ComboBox controls to use virtualization with Recycling VirtualizationMode. In the application, this is implemented in xaml basically like this:
<ItemsPanelTemplate x:Key="VirtualizingItemsPanel">
<VirtualizingStackPanel />
</ItemsPanelTemplate>
<ComboBox ItemsPanel="{StaticResource VirtualizingItemsPanel}" VirtualizingPanel.VirtualizationMode="Recycling" />
<ListView VirtualizingPanel.VirtualizationMode="Recycling" />
This application is tested using UFT. The UFT tests experience a number of issues. Tests attempt to make selections like this:
WpfWindow("windowName").WpfComboBox("comboboxName").Select i
When that is done, this error occurs in UFT: "Element does not exist or is virtualized; use VirtualizedItem Pattern if it is supported."
Other issues include failing to recognize new items added to a ListView and getting incorrect counts of items from the controls.
All works fine when a real user uses this. Only UFT tests have any problems. How do you make UFT work with WPF controls virtualized in this way?