Page 1 of 1

Ranorex not scrolling to click table cells/rows off screen

Posted: Wed May 27, 2009 12:13 am
by Ciege
After finding a table element I am using a simple foreach to click each cell in a row or each cell in a column:

Code: Select all

IList<Cell> cells = HDTable.Rows[1].Cells;
foreach (Cell cell in cells)
{
  cell.EnsureVisible();
  cell.Click();
}
Each cell is clicked correctly until the first cell that is off screen. As soon as that cell is supposed to be clicked the mouse moves to screen coordinates 0,0 and clicks there.

How else can I automatically scroll the window to click or bring to visible the cells that are off screen?

I am using the 2.1 release of Ranorex with a .NET app using the DevExpress 3rd party controls.

I have an AVI capture of the issue if needed.

Thanks...

Posted: Thu May 28, 2009 4:29 pm
by Ciege
Hi guys.
Any potential workarounds that I can try out here? Need to get something working in the meantime that will allow me access to cells off screen.

Thanks...

Posted: Thu May 28, 2009 5:11 pm
by Support Team
hello,
EnsureVisible on unvisible rows in DevExpress Controls is not supported at the moment.
As a workaround you could click on the VerticalScrollDown button in proportion to the row height if you must have to click in every cell in the table. Otherwise use the cell properties. It`s depending on what you want to do.

Regards,
Christian
Ranorex Support Team

Posted: Thu Jun 04, 2009 6:38 pm
by Ciege
Looks like the same issue for EnsureVisible for DevExpress TreeItems. It will not bring a TreeItem into focus if it is off the screen.

Any timeframe as to when this issue will be addressed?

Thanks...

Similar issue

Posted: Thu Jun 04, 2009 11:30 pm
by chris
We are having trouble using ensureVisible() on a listItem in a container (in "Add or Remove Programs"). This is a problem for us because we haven't been able to get access to the scrollbar in that container. In the future we are going to need to access TreeItems and cells that are off the screen.
Thanks.

Posted: Fri Jun 05, 2009 1:24 pm
by Support Team
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