Page 1 of 1

Ranorex cannot retrieve the cell value for a row in a Table

Posted: Fri Sep 29, 2017 12:13 am
by RekhaG
Hi ,
I am trying to validate a particular cell value for a specific row and Column, but for some reason ranorex doesnot return all the cell values of a particular row. It only brings the columns values that are visible on screen. But i am trying to get a value of column which is off screen. These are DevExPress Controls

For example : I am trying to validate on the 18th column value for a particular row, but ranorex brings back only 15 cell values since only 15 are visually seen, if i have to get to 18th column i need to drag the horizontal scroll bar manually and when i spy on the row at this point i can get the value of the 18th column. Please see the screen shot attached (DataTable.Png) . This Data Table is a WPF control and i attached the screen shot of SPy elements as well.

Can someone tell me how to get all the cell values of a row without dragging the horizontal scroll bar.

Please let know if you need additional details

Thanks,
Rekha

Re: Ranorex cannot retrieve the cell value for a row in a Table

Posted: Fri Sep 29, 2017 7:21 am
by odklizec
Hi,

Please post a Ranorex snapshot (not screenshot) of the problematic table. There is nothing anyone here can do or suggest just from the screenshots. At second, devexpress controls are often tricky to automate. I would suggest to search the forum for similar devexpress and table related posts. It was discussed many times before.

Generally speaking, if you see the values in spy, you should be able to get them in runtime. If you see only values from visible part of table, then the table is most probably "lazy-loaded" and you will have to bring the element to interest into visible area (e.g. using EnsureVisible method). In some cases, it may help to change some Ranorex settings. But as mentioned, without (at very least) Ranorex snapshot, it's impossible to suggest something reliable.

Re: Ranorex cannot retrieve the cell value for a row in a Table

Posted: Fri Sep 29, 2017 8:03 am
by Stub
I realise you said, "without dragging the horizontal scroll bar," but FWIW I had to do similar for a grid in our application under test. Though in my case I have to use RawText elements via GDICapture, so Ranorex absolutely had to see the grid being drawn before I knew what was in it. So I setup an automated mechanism within my Ranorex code to read the visible area of the grid, then mouse left click in the centre of the open scrollbar area to the right of the scrollbar thumb position, read the screen again, and repeat until the scrollbar thumb was all the way over to the right. I assembled my table of results from there. Finally I restored the original scrollbar position.