Post
by Support Team » Fri Jun 05, 2009 1:24 pm
The EnsureVisible method heavily depends on the implementation of the control that is automated. Therefore, it's not guaranteed that it will work on all elements, especially not on elements with flavorname "MSAA". You can try DoDefaultAction, Focus, or Select (for list/tree items or cells underneath the items) instead, but the same is true for these methods.
In general, EnsureVisible is useful to ease the automation of UI elements by bringing specific elements into view. However, it's not the suggested way if you want to test UI applications thoroughly, since it uses programmatic interfaces of the UI element that the actual user cannot use. In general, it's better to use mouse and keyboard inputs alone.
As a workaround you can use the arrow keys to go through the list/tree items and check the Visible attribute of the element you want to access. Or you can use the InvokeRemotely method to invoke a method on the DevExpress control that brings the corresponding item into view (if there is such a method ...).
Regards,
Alex
Ranorex Support Team