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

Best practices, code snippets for common functionality, examples, and guidelines.
RekhaG
Posts: 17
Joined: Fri Sep 22, 2017 12:47 am

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

Post by RekhaG » Fri Sep 29, 2017 12:13 am

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
You do not have the required permissions to view the files attached to this post.

User avatar
odklizec
Ranorex Guru
Ranorex Guru
Posts: 7470
Joined: Mon Aug 13, 2012 9:54 am
Location: Zilina, Slovakia

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

Post by odklizec » Fri Sep 29, 2017 7:21 am

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.
Pavel Kudrys
Ranorex explorer at Descartes Systems

Please add these details to your questions:
  • Ranorex Snapshot. Learn how to create one >here<
  • Ranorex xPath of problematic element(s)
  • Ranorex version
  • OS version
  • HW configuration

User avatar
Stub
Posts: 515
Joined: Fri Jul 15, 2016 1:35 pm

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

Post by Stub » Fri Sep 29, 2017 8:03 am

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.