Thread Rating:
  • 1 Vote(s) - 5 Average
  • 1
  • 2
  • 3
  • 4
  • 5
GWT table property changing.....Need Help..
#1
Solved: 11 Years, 3 Months, 3 Weeks ago
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....


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...
Reply
#2
Solved: 11 Years, 3 Months, 3 Weeks ago
Instead of adding it to OR,
Use descriptive programming with "text" property of webtable if it is unique, otherwise use some more propertties like innerhtml

Code:
set desc=description.create
desc("micclass").value="WebTable"
desc("text").value="whatever it shows in spy"

Rowcame = Browser("B").Page("P").WebTable(desc).RowCount
Reply
#3
Solved: 11 Years, 3 Months, 3 Weeks ago
------------------------------------------------------------------------
@@@ rajpes----


Thanks a lot for your suggestion....
i am giving an attachment of the spy result...actually i have added that table in OR to get the properties only...I will definitely remove it once i get the unique properties......these are the properties.... so can u plz tell me that which property should i take?????

Or after seeing these can you plz tell me if there is any other option....the showing index value is getting changed by different run session.....







------------------------------------------------------------------------

Thanks a lot for your suggestion....
i am giving an attachment of the spy result...actually i have added that table to get the properties only....these are the properties.... so can u plz tell me that which property should i take?????

Or after seeing this can you plz tell me if there is any other option....the showing index value is getting changed by different run session.....


Attached Files Image(s)
   
Reply
#4
Solved: 11 Years, 3 Months, 3 Weeks ago
You have added that object in OR doesn't mean it should work for next run session.
Delete that object from OR and change that line using DP as i suggested earlier.

try this

Code:
set desc=description.create
desc("micclass").value="WebTable"
desc("text").value=".*Kunst.*"

Rowcame = Browser("B").Page("P").WebTable(desc).RowCount
Reply
#5
Solved: 11 Years, 3 Months, 3 Weeks ago
thank you very much for such idea and suggestion...i have applied that and it is running successfully with proper checking of row......thanks a lot once again....


Just tell me one more thing....does this particular approach known as Dynamic DP?????


Please let me know....
Reply
#6
Solved: 11 Years, 3 Months, 3 Weeks ago
Welcome,
Yes it is dynamic DP
In static dp only single line contains all properties defined.
Reply


Possibly Related Threads…
Thread Author Replies Views Last Post
  Changing Data in the application newbieny 0 981 07-17-2019, 07:19 PM
Last Post: newbieny
  QTP is not identifying table with column names property but its identifing with index Anuradha B 1 3,003 02-12-2015, 04:00 PM
Last Post: Kirill
Exclamation Need help on Urgent Basis--GWT related problem.. souvikghosh_diatm 7 5,744 02-19-2012, 10:38 PM
Last Post: mwaikar
  GWT Weblist Not Getting Detected in QTP 10 aravind07 0 2,554 11-25-2011, 09:48 AM
Last Post: aravind07
  QTP 10.0 not able to identify object in GWT application. savan 0 3,053 11-09-2011, 11:00 PM
Last Post: savan

Forum Jump:


Users browsing this thread: 1 Guest(s)