Unable to recognize grids

Technology specific object identification, supported applications, web technologies, and 3rd party controls.
svnr
Posts: 3
Joined: Thu Apr 21, 2011 7:36 pm

Unable to recognize grids

Post by svnr » Thu Apr 21, 2011 7:43 pm

Hi,

In out application some grids are used which are not recognized by GDI plug in.We need to read the all cell values of the grid which has scroll bars. Also we need to set values in the grid cells.attached the snapshot of the form/page

Note: for the attached grids TTF16_WndClass grids we are not able to get the info like row values etc using GDI plugin. For VSFlexGrid we are able to get the rowvalues etc but could not read the grid cells when the grid has scrollbars etc. Please suggest way to read the grid like table and able to do operations on it.

Thanks,
SVNR
Attachments
VSFlexGrid8L_snapshot.rxsnp
(220.24 KiB) Downloaded 242 times
TTf16_WndClass.rxsnp
(188.18 KiB) Downloaded 258 times
TTF16_WndClass1_Snapshot.rxsnp
(271 KiB) Downloaded 219 times

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

Re: Unable to recognize grids

Post by Support Team » Fri Apr 22, 2011 8:33 am

Hi,
svnr wrote:for the attached grids TTF16_WndClass grids we are not able to get the info like row values etc using GDI plugin
According to your Ranorex Snapshots, Ranorex is able to find every item inside the Grid. For example, with following RxPath you should find the "Subject Header"
/form[@title~'^Choose\ Study\ Samples\ for\ ']/element/element/element/element/element/element/rawtext[@rawtext=' Subject ']
svnr wrote:For VSFlexGrid we are able to get the rowvalues etc but could not read the grid cells when the grid has scrollbars etc.
You have to scroll manually and then read the grid again. The RawText Plug-In forces your application to redraw and catch the text elements. Therefore you can't access values with the RawText Plug-in, which are not visible on the screen. The same behavior is valid for minimized applications.

Regards,
Peter
Ranorex Team
.
Image

svnr
Posts: 3
Joined: Thu Apr 21, 2011 7:36 pm

Re: Unable to recognize grids

Post by svnr » Fri Apr 22, 2011 4:12 pm

Thanks for the information. using x path of the known items we can identify the rawtext(cell value) how ever in our application we need to read all the cell values of the grid. We tried by trying to read all rows or columns or decendants for TTF16.WndClass grids. Can you please let us know how to get the table values for this grid.

Thanks,
SVNR

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

Re: Unable to recognize grids

Post by Support Team » Fri Apr 22, 2011 4:33 pm

When you track the cells with Ranorex Spy, you will see that the "RawText property contains the text value. So in your code you just have to use that property, e.g.:
Ranorex.Unknown ttf16 = @"/form[@title~'^Choose\ Study\ Samples:\ Sel']/element/element/element[@class='TTF16.WndClass']";
foreach (Ranorex.RawText rawTextElement in ttf16.FindDescendants<Ranorex.RawText>())
    string text = rawTextElement.RawTextValue;
Regards,
Alex
Ranorex Team
.
Image

svnr
Posts: 3
Joined: Thu Apr 21, 2011 7:36 pm

Re: Unable to recognize grids

Post by svnr » Mon Apr 25, 2011 7:50 pm

Thank you for the help. We have tried the same way but always getting decendants count as '0'. Also our requirement is to get the table values of the grid. The grids are related to F1Book(TTF16.ocx grids from Formula One i.e VB grids) Please suggest a way to read/recognize these grids.

Thanks,
SVNR

User avatar
slavikf
Posts: 104
Joined: Mon Sep 13, 2010 9:07 pm
Location: Toronto, Canada
Contact:

Re: Unable to recognize grids

Post by slavikf » Tue Apr 26, 2011 6:23 pm

If you trying to read data from grid, I think it is better to use attribute, different, then "rawtext". You can use "column" and "row" for example:

…rawtext[@column='5' and @row='3']

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

Re: Unable to recognize grids

Post by Support Team » Wed Apr 27, 2011 10:04 am

Hi,

The code which Alex posted works as expected. Is the form visible on the screen, when you try to get the values? Because the RawText Plug-In needs a visible GUI to redraw the items. Please activate the form before you get the elements with Alex's Code.

Regards,
Peter
Ranorex Team
.
Image