(08-06-2009, 08:58 PM)egun Wrote: [quote='basanth27' pid='6589' dateline='1249571256']
Hi Basanth,
Yes - I feel this is good progress! I have pasted my code below, but how can I print the results somewhere? Now that I know how to check/compare these values from my website vs my database I need to be able to print them somewhere to view at the end of the run. That is the last part. I appreciate your help immensely!
DbTable("DbTable_2").Output CheckPoint("DbTable_2")
Browser("Vis").Page("Vis").WebElement("15").Output CheckPoint("TotalB")
value1 = Datatable.Value("DbTable_TBills")
value2 = Datatable.Value("_15_innertext_out")
If Trim(value1) = Trim(value2) Then
found = True
Else
found = false
End if
You were almost there. You may have to get used on how to use QTP Help. In my view it is one of the most amazing storehouse of knowledge.
I assume you want to print the results to the QTP results, if yes this is how you do it,
Code:
DbTable("DbTable_2").Output CheckPoint("DbTable_2")
Browser("Vis").Page("Vis").WebElement("15").Output CheckPoint("TotalB")
value1 = Datatable.Value("DbTable_TBills")
value2 = Datatable.Value("_15_innertext_out")
If Trim(value1) = Trim(value2) Then
Reporter.reportevent micPass, "Value Match", "Found a Match"
Else
Reporter.reportevent micFail, "Value Match", "Values Dont Match"
End if
If you wanted to print the results somewhere other than QTP results let me know...
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.
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.