Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
CheckPoints: Are they only for objects?
#1
Solved: 11 Years, 4 Months ago
I would like to know if one could create a Checkpoint for a variable? For example, in my application I have a textbox that displays value x. I need to confirm that this value has followed through to another form and textbox in the application. My initial thought would be to create a variable for the first textbox and a variable for the second textbox and compare the two (The text for example, might not even be exactly the same, I might need to verify that a portion of the first textbox text has reached the second textbox). I would like to make it so the Test Results Form of QTP would show a PASS or a FAIL, depending on the verification. Is this possible?

Thnx, Howard
Reply
#2
Solved: 11 Years, 4 Months ago
You can use a conditional statement to verify.
And to report to Results use Reporter Object.
Reply
#3
Solved: 11 Years, 4 Months ago
Thank you. Yes, I figured I would use an "If/Then" statement to prove the Pass/Fail. But I did not know about the Reporter. I will research that now.

Thnx again!
Reply
#4
Solved: 11 Years, 4 Months ago
You can check in QTP Help.
Reply
#5
Solved: 11 Years, 4 Months ago
Hi,

Please try out the below code which may useful to you.
Code:
Browser("Browser").Page("Gmail: Email from Google").WebEdit("Email").Set "xyz"
Browser("Browser").Page("Gmail: Email from Google").WebEdit("Passwd").Set "xyz"
temp1=Browser("Browser").Page("Gmail: Email from Google").WebEdit("Email").GetROProperty("value")
temp2=Browser("Browser").Page("Gmail: Email from Google").WebEdit("Passwd").GetROProperty("value")

If temp1=temp2 Then
    reporter.ReportEvent micPass,"Check status","Values in the text box are matched"
else
    reporter.ReportEvent micFail,"Check status","Values in the text box are not matched"
End If
Thanks & Regards,
Uday.
Reply
#6
Solved: 11 Years, 4 Months ago
thnx, perfect!
Reply


Possibly Related Threads…
Thread Author Replies Views Last Post
  Why not Checkpoints subhashinid 0 1,594 06-30-2016, 07:36 PM
Last Post: subhashinid
  Query about checkpoints pkdhake 5 3,686 07-11-2013, 03:17 PM
Last Post: vinod123
  Text checkpoints don't work for Chrome (and sometimes FireFox) applening56 0 1,959 06-21-2012, 10:08 PM
Last Post: applening56
  How to "save" changes to checkpoints in the repository? mag7417 2 3,231 10-05-2011, 06:55 PM
Last Post: anil2u
  QTP 10's Object Repository Checkpoints and Output Objects question Tonya S 2 5,007 09-09-2011, 02:09 AM
Last Post: Tonya S

Forum Jump:


Users browsing this thread: 2 Guest(s)