Thread Rating:
  • 1 Vote(s) - 1 Average
  • 1
  • 2
  • 3
  • 4
  • 5
How can I verify 2 output values equal?
#11
Solved: 10 Years, 9 Months ago
Assuming it is in globalsheet,

Code:
value1 = Datatable.Value("ColumnName")
value2 = Datatable.Value("ColumnName")

If Trim(value1) = Trim(value2) Then
   found = True
Else
   found = false
End if


Let me know if this helps.
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
#12
Solved: 10 Years, 9 Months ago
[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!

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
found = True
Else
found = false
End if
Reply
#13
Solved: 10 Years, 9 Months 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
#14
Solved: 10 Years, 9 Months ago
That should be fine, thank you again Basanth. I had actually looked to the QTP help area after my last post and figured out how to do the same... thanks for your help. Smile
Reply
#15
Solved: 10 Years, 9 Months ago
Most Welcome Smile I request you & encourage to ask multiple questions and doubts. This is the place where we can learn and learn to share.
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


Possibly Related Threads…
Thread Author Replies Views Last Post
  [UFT] [WPF] Verify if the cell contains an image robertosalemi 0 1,778 10-25-2016, 06:57 PM
Last Post: robertosalemi
  Need to verify the drop down values based on condition santhoshmscsoftware 1 2,711 05-04-2016, 11:28 PM
Last Post: supputuri
  verify that parent properties match object currently displayed in your application. sona 0 2,943 02-21-2016, 12:00 PM
Last Post: sona
  Output Values error Tasleem 3 3,718 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,477 08-27-2014, 04:09 PM
Last Post: vinod123

Forum Jump:


Users browsing this thread: 1 Guest(s)