07-07-2011, 06:31 PM
Hii all....
i have a GWT application where there is a grid and some text fields on which i can provide value and filter the grid on basis of that value..
Here i need to check the row number coming in grid after a specific search. I have identified the grid-table property by adding it into Object Repository..
Drag-dropped that from OR and affix "RowCount" method provided by QTP on a table...
But i have seen that the table property(index) is getting changed on every run session that's why i am unable to get that rowcount in each case....it is not giving any run time error as that property is also present in my page, but it generating a fail statement that row not matched....This is because the table is not identified properly...The properties which is taking in object repository is "html Tag = TABLE" and the "index = 104"....this index is getting changed in each time....
My code is as follows....
This code is working properly for the particular run session on which the object of table has been added....But if i close browser and run again, then its not working.....Can any body tell me how to fix this problem??
I need any suggestion on URGENT basis......any suggestion or help will be appreciated...just do me a mail on souvikghosh.diatm@gmail.com
Thanks...
i have a GWT application where there is a grid and some text fields on which i can provide value and filter the grid on basis of that value..
Here i need to check the row number coming in grid after a specific search. I have identified the grid-table property by adding it into Object Repository..
Drag-dropped that from OR and affix "RowCount" method provided by QTP on a table...
But i have seen that the table property(index) is getting changed on every run session that's why i am unable to get that rowcount in each case....it is not giving any run time error as that property is also present in my page, but it generating a fail statement that row not matched....This is because the table is not identified properly...The properties which is taking in object repository is "html Tag = TABLE" and the "index = 104"....this index is getting changed in each time....
My code is as follows....
Code:
If (DataTable.Value("Action", dtGlobalSheet )="GridRowCheck" ) Then
ExpRow = DataTable.Value("Expected_Rows", dtGlobalSheet )
ExpRow = Cint (ExpRow)
Wait(5)
Rowcame = [b]Browser("B").Page("P").WebTable("2064750").RowCount[/b]
Rowcame = Cint (Rowcame)
If Rowcame = ExpRow Then
Reporter.ReportEvent micPass, "Row Number Matched - bottom grid", "Proper row number came after selecting row from upper grid"
Else
Reporter.ReportEvent micFail, "Row number not matched - bottom grid", "Expected row number is::"&ExpRow&" And Row Number Came after selecting from upper grid::"&Rowcame
End If
End If
This code is working properly for the particular run session on which the object of table has been added....But if i close browser and run again, then its not working.....Can any body tell me how to fix this problem??
I need any suggestion on URGENT basis......any suggestion or help will be appreciated...just do me a mail on souvikghosh.diatm@gmail.com
Thanks...