Hi ,
Currrently we are working on RFT 8.2 ,with infragistics test advantage addin 8.2 (licensed) for windows forms.While performing automation testing we are unable to capture the cell values(innertext) in the grid table. Class name is showing as "infragistics.win.ultrawingrid.ultragrid" however we are unable to read the text property value of each cell using the methods available
Could you please help us to resolve this problem.Let me know if you need any information.
Try using GetNAProperty:
GridTestObject().GetNAProperty("Rows[0].Cells[0].Value")
You can also use the GetCell method which return a HashtableEx object with alot of information about the cell:
GridTestObject().GetCell(AtCell(AtRow(...), AtColumn(...)))
Let me know if you have any other question.
Ammar
Hi Ammar,
I tried like below to get the all Header values.
int column=grdUniverseAdditionsListstable2().GetColumnCount(0);
for(int i=0; i<column; i++){
System.out.println("values "+grdUniverseAdditionsListstable2().getNAProperty(("Rows[0].Cells[i].Column.Header.Caption" )));
}
Here getting all the Header values of the grid.
For getting all other values inside the grid I am trying to get the RowCount using below.
int row=grdUniverseAdditionsListstable2().GetRowCount(null);
But I am getting value as "Zero".
I am getting the values inside the grid individually as below:
grdUniverseAdditionsListstable2().getNAProperty(("Rows[1].Cells[6].Value"));
Please give us your suggestions how to get all the values inside the Grid at a time and also to get the Row count. Give me your suggestions.
Regards, Chandu
Regards,
Chandu
for row count try GetNAProperty(Rows.Count")
and for getting all cells value try GridTestObject.GetData(null) this method return Infragistics.RFT.Shared.Values.Array2DValue which is a 2 dimentional array of strings you can also try: GetNAProperty(Rows["+i.tostring()+"].Cells["j.toString()+"]") inside a double for loop that iterate rows and columns. Regards, Ammar
Infragistics.RFT.Shared.Values.Array2DValue which is a 2 dimentional array of strings
you can also try:
GetNAProperty(Rows["+i.tostring()+"].Cells["j.toString()+"]")
inside a double for loop that iterate rows and columns.
If I used the below way to get the Headers of the above table which is attached above I am getting the all headers. But If I used same approach for other table which I had attache below I am getting Exception as "System.NullReferenceException: Object reference not set to an instance of an object..". Here I am getting the table name as "grdSettingstable". Please give me your suggestions.
int m=(Integer) grdUniverseAdditionsListstable().GetColumnCount(0);
for(int k=0; k<m; k++){
System.out.println("props "+grdUniverseAdditionsListstable().getNAProperty(("Rows[0].Cells["+k+"].Column.Header.Caption")));
The screen shot is very small and I was not able to get a sense of what is in it. Is the grid grouped by? If so you might need to get the cells headers form a child row like:
If getNAProperty(“Rows[0].IsGroupByRow”)
{
getNAProperty(“Rows[0].Rows[0].Cells[0].Column.Header.Caption”)
Else
getNAProperty(“Rows[0]. Cells[0].Column.Header.Caption”)
Please verify any answer that worked for you (Click the green button “Verify Answer” so everyone can benefit from this)
Regards,,