Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Can you use Descriptive Programming with Checkpoint?
#1
Not Solved
I have heavily into DP.

One of the thing I have to ponder is that how do you use DP with Checkpoint?

Lets say I have a text that says "Your purchase is complete" and how do I tell it to QTP that it is correct and I can view the RESULT at the end of the run?
Reply
#2
Not Solved
Here is my example.

I can tell QTP to verify this Checkpoint:

Code:
Browser("Delta - Book a flight").Page("Delta - Book a flight").Check CheckPoint("Confirmation checkpoint")

Can I do this directly using DP and how does the "comparing of the text" gets to "View Result" screen at the end of the run.

Thanks for helping.


Attached Files Image(s)
       
Reply
#3
Not Solved
Hi,

try the below code it might help u 2 compare the text displayed on screen and then show the result.

Code:
vs_displayText=Browser("Delta - Book a flight").Page("Delta - Book a flight").webelement().GetRoProperty("innertext")
if Instr(1,vs_displayText,<text u want to match>,1)>0 Then
Reporter.ReportEvent MicPass,"Confirmation',"Confirmation message displayed"
else
Reporter.ReportEvent micFail,"Confirmation","Confirmation message not displayed correctly"

EndIF

Let me know in case of any help required.

Regards,
Sankalp
Reply
#4
Not Solved
Sankalp,

What I mean to say is how I can do this Checkpoint without using Recording. The above checkpoint was done using Recording.

I like to do it directly with Descriptive Programming without the Recording and report to "View Result" screen at the end of the run if it is fail or pass or not.

Thanks for your help.
Reply
#5
Not Solved
Hi,

The above suggested code is independent of Recording, add the objects to OR and procedd further with the code it will help u and I don't think there is any necessity to put DP in each and every case.

Let me know in case of any help required.

Regards,
Sankalp
Reply


Possibly Related Threads…
Thread Author Replies Views Last Post
  Descriptive PROGRAMMING sandeepm1989 0 2,096 01-21-2016, 11:46 AM
Last Post: sandeepm1989
  Is this one instance where descriptive programming does not work? chong67 10 7,170 10-09-2012, 06:41 PM
Last Post: harishshenoy
  Descriptive Programming By giving the description in form of the string arguments sia sharma 6 5,233 09-12-2012, 08:57 PM
Last Post: freeboynil
  Can I use Descriptive Programming on Checkpoint? chong67 0 2,306 06-22-2012, 08:34 PM
Last Post: chong67
  General error in Descriptive programming sqadri 3 4,021 04-23-2012, 11:01 AM
Last Post: sshukla12

Forum Jump:


Users browsing this thread: 1 Guest(s)