Hi
I'm evaluating Ranorex 3.2.1 to test desktop application with controls inherited from DevExpress.
On one from froms, there is table (grid) with 12 rows, and only 10 of them are visible (also scrollbar exists so all of rows can be accessed).
When scrollbar is at top position => Ranorex Spy treat row 11 as visible and row 12 as not visible. But in fact both row 11 and 12 are not visible.
When scrollbar is at bottom position => Ranorex Spy shows that both row 1 and row2 are not visible (and this is absolutely correct).
Attached are 2 scnapshots with detailed info.
Row/Cell has wrong visible property
Row/Cell has wrong visible property
You do not have the required permissions to view the files attached to this post.
- Support Team
- Site Admin
- Posts: 12145
- Joined: Fri Jul 07, 2006 4:30 pm
- Location: Houston, Texas, USA
- Contact:
Re: Row/Cell has wrong visible property
Hi,
Regards,
Peter
Ranorex Team
It looks like that row 11 is partially visible. This means if 1px of the control is visible the whole control is shown as visible. But this should be no problem, because if you click on this element, Ranorex tries to make this control entirely visible. Did you try to use EnsureVisible on this cell?Pavlo wrote:When scrollbar is at top position => Ranorex Spy treat row 11 as visible and row 12 as not visible. But in fact both row 11 and 12 are not visible.
Regards,
Peter
Ranorex Team
Re: Row/Cell has wrong visible property
Hi
I've tried to click on row 12
After this code execution:
isCellVisible = False;
ensureVisibleResult = False;
cell.Click() => clicks on coordinates 0,0 (or something like that, top-left corner of screen)
I've tried to click on row 12
Code: Select all
string cellToFind = "//row/cell[@accessiblename~'"+columnName+"' and @accessiblevalue='"+value+"']";
IList<Cell> cells = table.Find<Cell>(tableXPath + cellToFind);
foreach (Cell cell in cells)
{
bool isCellVisible = cell.Visible;
bool ensureVisibleResult = cell.EnsureVisible();
cell.Click();
}
isCellVisible = False;
ensureVisibleResult = False;
cell.Click() => clicks on coordinates 0,0 (or something like that, top-left corner of screen)
- Support Team
- Site Admin
- Posts: 12145
- Joined: Fri Jul 07, 2006 4:30 pm
- Location: Houston, Texas, USA
- Contact:
Re: Row/Cell has wrong visible property
Hi,
Regards,
Peter
Ranorex Team
Please try the Select method for your cell object or set the property Selected to true.Support Team wrote:After this code execution:
isCellVisible = False;
ensureVisibleResult = False;
cell.Click() => clicks on coordinates 0,0 (or something like that, top-left corner of screen)
Regards,
Peter
Ranorex Team
Re: Row/Cell has wrong visible property
I have this same issue with my DevExpress grids... I've solved it with my own ClickCell method that checks for Visible and then checks the Y + Height of the cell versus the Y + Height of the grid. If the bottom of the cell is off screen after my calculation then I find the Line Down button of the vertical scroll bar and click once.
If this or any response has helped you, please reply to the thread stating that it worked so other people with a similar issue will know how you fixed your issue!
Ciege...
Ciege...
Re: Row/Cell has wrong visible property
HiCiege wrote:I have this same issue with my DevExpress grids... I've solved it with my own ClickCell method that checks for Visible and then checks the Y + Height of the cell versus the Y + Height of the grid. If the bottom of the cell is off screen after my calculation then I find the Line Down button of the vertical scroll bar and click once.
I had same idea in my mind, but think that re-implemeting property visible is not bext idea, so solved issue in another way.
Since I want to click cell to select the row, I'm calling DoDefaultAction from Accessible.
It works well even if cell/row is visible just for 1 pixel and also works well and selecting row (and scrolling to required row) in cell/row is not visible at all.
Code: Select all
Accessible accCell = cell.As<Accessible>();
if (accCell.DefaultAction.ToLower() == "focus")
{
accCell.DoDefaultAction();
}
Thank you all guys!