Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Pulling data from grid (WbfGrid) for checkpoin
#1
Solved: 11 Years, 3 Months, 3 Weeks ago
Hello,

We are attempting to pull data from a grid and if it has a certain value (as it might not have a value) then to pass or fail as a checkpoint based on the value.

I am able to pull the data from the cell as below and if it exists it has a value, if it does not exist then value is null.

Code:
var_GetCellData = Browser("Browser").Page("...").WbfGrid("...GridV").GetCellData(2,5)

If I used a standard checkpoint then it will fail if there is not any data in the cell. This is why I need to do the check by this or some other method.
What I am thinking is that if there is checkpoint to validate by a variable or if there is a way to write a check to the test results summary.


Sorry if this is the incorrect forum.

Regards,

Stephen
Reply
#2
Solved: 11 Years, 3 Months, 3 Weeks ago
If you are using checkpoints currently then you must have expected values in the field. Using If or Select statements to manually validate the cell and generate results should work.

Code:
var_GetCellData = Browser("Browser").Page("...").WbfGrid("...GridV").GetCellData(2,5)
Select case _GetCellData
  Case "A" 'this is an expected value
    Reporter.ReportEvent micDone, "Cell Results", _GetCellData
  Case else
    Reporter.ReportEvent micDone, "Cell Results", "Cell is Empty
End Select

Using the select to test for a result. If you want to just report the value then remove the select and just use the Reporter event. Hope this helps.
Reply
#3
Solved: 11 Years, 3 Months, 3 Weeks ago
This sent me down the correct path.

Thanks for all the help.
Reply


Possibly Related Threads…
Thread Author Replies Views Last Post
  Can QTP handle slick grid table in a web page qtplearner88 2 4,508 10-01-2019, 10:44 AM
Last Post: shilpi952
  Not able to read all the columns in a DevEx WPF grid srisrinath2006 1 2,989 05-10-2013, 03:45 AM
Last Post: sria123
Cool Infragistics grid cell identification - QTP 9.2 MahalakshmiDevi 0 3,480 01-24-2011, 01:01 PM
Last Post: MahalakshmiDevi
  Flex Grid - getItems geethwind 1 3,043 08-30-2010, 10:01 AM
Last Post: nanthini222
  Working with QTP 10 on Janus web grid. RandomUser 0 2,711 08-17-2010, 10:10 PM
Last Post: RandomUser

Forum Jump:


Users browsing this thread: 1 Guest(s)