Micro Focus QTP (UFT) Forums
Can you use Descriptive Programming with Checkpoint? - Printable Version

+- Micro Focus QTP (UFT) Forums (https://www.learnqtp.com/forums)
+-- Forum: Micro Focus UFT (earlier known as QTP) (https://www.learnqtp.com/forums/Forum-Micro-Focus-UFT-earlier-known-as-QTP)
+--- Forum: UFT / QTP Beginners (https://www.learnqtp.com/forums/Forum-UFT-QTP-Beginners)
+--- Thread: Can you use Descriptive Programming with Checkpoint? (/Thread-Can-you-use-Descriptive-Programming-with-Checkpoint)



Can you use Descriptive Programming with Checkpoint? - chong67 - 06-25-2012

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?


RE: Can you use Descriptive Programming with Checkpoint? - chong67 - 06-26-2012

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.


RE: Can you use Descriptive Programming with Checkpoint? - sshukla12 - 06-26-2012

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


RE: Can you use Descriptive Programming with Checkpoint? - chong67 - 06-26-2012

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.


RE: Can you use Descriptive Programming with Checkpoint? - sshukla12 - 06-27-2012

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