Posts: 44
Threads: 1
Joined: Jun 2009
Reputation:
0
08-05-2009, 11:46 AM
Get the runtime value present in the webelement using GetROProperty and save it in the datatable. Now insert a DB checkpoint and parameterize the same with the data that was stored in the Datatable.
Posts: 23
Threads: 9
Joined: Jul 2009
Reputation:
0
08-05-2009, 08:45 PM
I guess what I'm trying to figure out is how to write the compare statement. Like if ____ = ____ then true, else false.
Posts: 1,003
Threads: 1
Joined: Jul 2009
Reputation:
5
08-06-2009, 12:24 PM
Eugen,
I am not very sure if this what you are looking for, but from what i understood i framed the below.
Code:
checkelem = Browser("Vis").Page("Vis").WebElement("B").Output (CheckPoint("TotalB"))
checkdb = DbTable("DbTable_2").Check (CheckPoint("DbTable_2"))
If checkelem = Checkdb Then
found = true
Else
found = false
End If
Let me know if this was what you were looking for ?
-basanth
Basanth
Give a fish to a man and you feed him for a day..Teach a man how to fish and you feed him for life.
Posts: 44
Threads: 1
Joined: Jun 2009
Reputation:
0
08-06-2009, 12:36 PM
Egun,
I don't understand why you are looking for "if condition", when there is a database check point. The Checkpoint is itself an if condition. Explanation of your scenario may help us to identify the solution...
Thanks,
Posts: 1,003
Threads: 1
Joined: Jul 2009
Reputation:
5
08-06-2009, 12:38 PM
(This post was last modified: 08-06-2009, 12:44 PM by basanth27.)
QTPian,
Database checkpoint pass/fail is on the QTP test results and not on your customised reporting.
Sorry for misleading...Please ignore the above statement. I wrote it up in haste.
You cannot retrieve the value from a DB checkpoint, rather it returns true or false depending on the match.
Egun -
is your scenario something like, you have a name on the web and you want to verify through db that the value coming up on web and the value stored in the DB match ??
if yes, then it cannot be done through checkpoint the way you want it. It can be done programatically.
Basanth
Give a fish to a man and you feed him for a day..Teach a man how to fish and you feed him for life.
Posts: 1,003
Threads: 1
Joined: Jul 2009
Reputation:
5
08-06-2009, 08:19 PM
Okay..so the issue is reading the values from datatable ??
Basanth
Give a fish to a man and you feed him for a day..Teach a man how to fish and you feed him for life.
Posts: 23
Threads: 9
Joined: Jul 2009
Reputation:
0
08-06-2009, 08:26 PM
(This post was last modified: 08-06-2009, 08:28 PM by egun.)
Yeah, how can I compare the 2 values I have stored in the run-time datatable?
And store the result of the comparison in a report. I think there's a reporter functionality right?