Ranorex not scrolling to click table cells/rows off screen

Ask general questions here.
User avatar
Ciege
Ranorex Guru
Posts: 1335
Joined: Thu Oct 16, 2008 6:46 pm
Location: Arizona, USA

Ranorex not scrolling to click table cells/rows off screen

Post by Ciege » Wed May 27, 2009 12:13 am

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...

User avatar
Ciege
Ranorex Guru
Posts: 1335
Joined: Thu Oct 16, 2008 6:46 pm
Location: Arizona, USA

Post by Ciege » Thu May 28, 2009 4:29 pm

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...

User avatar
Support Team
Site Admin
Site Admin
Posts: 11709
Joined: Fri Jul 07, 2006 4:30 pm
Location: Graz, Austria

Post by Support Team » Thu May 28, 2009 5:11 pm

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

User avatar
Ciege
Ranorex Guru
Posts: 1335
Joined: Thu Oct 16, 2008 6:46 pm
Location: Arizona, USA

Post by Ciege » Thu Jun 04, 2009 6:38 pm

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...

chris
Posts: 17
Joined: Fri Mar 27, 2009 6:10 pm

Similar issue

Post by chris » Thu Jun 04, 2009 11:30 pm

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.

User avatar
Support Team
Site Admin
Site Admin
Posts: 11709
Joined: Fri Jul 07, 2006 4:30 pm
Location: Graz, Austria

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