Inserting more than one Standard Checkpoint in QTP 9.2

Previous31 32 33 34 35 36 37 38 39 40 Next

The question often arises is that can we have more than one checkpoint in the script or can we insert multiple standard checkpoints in the script. Yes QTP allows you to insert any number of checkpoints on objects as desired. You need to remember that you are aware of the expected result.


Let us take the Flight Reservation Application and try to insert multiple check points to see whether the checkpoints work or not. For this what we will do is we will insert a checkpoint for FLIGHT button after “Fly From” combo box selection to see that the FLIGHT button is disabled and also after “Fly To” combo box selection to see that the Button is enabled. Also we will insert a check point on Itemcount of Fly From combo to see that the item count is 10 and before the Fly To see that the item count is 9.

The script looks like this

Window("Flight Reservation").Activate
Window("Flight Reservation").WinButton("New Order").Click
Window("Flight Reservation").WinObject("Date of Flight:").Type "121212"
Window("Flight Reservation").WinComboBox("Fly From:").Check CheckPoint("Fly From Item Count")
Window("Flight Reservation").WinComboBox("Fly From:").Select "Frankfurt"
Window("Flight Reservation").WinButton("FLIGHT").Check CheckPoint("FLIGHT_Disabled")
Window("Flight Reservation").WinComboBox("Fly To:").Check CheckPoint("Fly To Item Count")
Window("Flight Reservation").WinComboBox("Fly To:").Select "London"
Window("Flight Reservation").WinButton("FLIGHT").Check CheckPoint("FLIGHT_Enabled")
Window("Flight Reservation").WinButton("FLIGHT").Click
Window("Flight Reservation").Dialog("Flights Table").WinButton("OK").Click
Window("Flight Reservation").WinEdit("Name:").Set "test user"
Window("Flight Reservation").WinButton("Insert Order").Click

For ease of understanding the logical names have been changed like FLIGHT_Disabled, FLIGHT_Enabled, Fly From Item Count, Fly To Item Count so that others looking at the script will understand.

When the script is run in the test result summary we will see Passed as 4 times which is nothing but the four checkpoints are passed. Have a look at the test result image below for different check points.



Previous31 32 33 34 35 36 37 38 39 40 Next

6 comments:

anil said...

Hi,

Where is the continuation for the tutorials. if anyone knows please let me know

Anonymous said...

Can we insert dynamic check points to verify the value for multiple web pages.If any one lnow the answer please let me know.

Thank You..
Jagath

Anonymous said...

thank you

Anonymous said...

when shall v have continued part
student of qsp blore

Anonymous said...

how to continue this?

Rigid Box said...


Information from this blog is very useful for me, am very happy to read this blog Kindly visit us @ Luxury Watch Box | Shoe Box Manufacturer |  Candle Packaging Boxes

Post a Comment

/* Tynt Insight tracker ----------------------------------------------- */