Thread Rating:
  • 1 Vote(s) - 1 Average
  • 1
  • 2
  • 3
  • 4
  • 5
How can I verify 2 output values equal?
#13
Solved: 11 Years, 8 Months, 2 Weeks ago
(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.
Reply


Messages In This Thread
How can I verify 2 output values equal? - by egun - 08-05-2009, 01:47 AM
RE: How can I verify 2 output values equal? - by basanth27 - 08-07-2009, 03:38 PM

Possibly Related Threads…
Thread Author Replies Views Last Post
  [UFT] [WPF] Verify if the cell contains an image robertosalemi 0 2,015 10-25-2016, 06:57 PM
Last Post: robertosalemi
  Need to verify the drop down values based on condition santhoshmscsoftware 1 3,094 05-04-2016, 11:28 PM
Last Post: supputuri
  verify that parent properties match object currently displayed in your application. sona 0 3,226 02-21-2016, 12:00 PM
Last Post: sona
  Output Values error Tasleem 3 4,179 10-27-2014, 02:13 PM
Last Post: Tasleem786
Exclamation How to verify whether pdf is completely loaded or not in webpage nmakkena 1 2,898 08-27-2014, 04:09 PM
Last Post: vinod123

Forum Jump:


Users browsing this thread: 1 Guest(s)