domperez wrote:Does Ranorex provide access the the underlying control so that I can set the VirtualMode property?
Currently, this is not supported for WPF controls, sorry.
However, there are a few things you can do to speed up the automation. First of all, you can disable computationally expensive attributes (Cell.RowIndex, Column.Index, Row.Index) for WPF elements. Just use the following line of code in the initialization of your Ranorex code:
Ranorex.Plugin.WpfFlavor.Instance.ExpensiveAttributesEnabled = false;
The other possible improvements are Ranorex code improvements. Try to get all rows in your list view just once and then work through these row instances like in the following code:
IList<Ranorex.Row> rows = listView.Find("row");
foreach (Ranorex.Row row in rows)
{
row.EnsureVisible();
// get content from row...
}You can also try to wrap the code accessing the rows inside a cache session. That way all attributes will be retrieved only once directly from the control and on all following calls the values are taken from the cache:
using (new Ranorex.Core.CacheSessionContext())
{
// put your code accessing the ListView in here
}It would certainly help if you could post your Ranorex code, then I might be able to give you some additional optimization hints.
Regards,
Alex
Ranorex Support Team