Checkpoints

A checkpoint checks the specific values or characteristics of a page, object, or text string and enables the test object to identify whether the AUT is functioning correctly. A checkpoint compares the expected value (captured at the time of recording or creating the checkpoint) with the actual value (captured at runtime).

The following script creates the order using the Flight application; after selecting the FlyFrom insert checkpoint, we need to verify whether the FLIGHT button's enabled property is set to True:

Checkpoints
Window("WinFlight").Activate
Window("WinFlight").ActiveX("MaskEdBox").Type "111114"
Window("WinFlight").WinComboBox("FlyFrom:").Select "Frankfurt"
'Insert a checkpoint to verify if button is enabled or not
Window("WinFlight").WinButton("FLIGHT").Check CheckPoint("WINFLIGHT")
'In the preceding checkpoint verify if button is enabled or not
isChkPointPass= Window("WinFlight").WinButton("FLIGHT").Check (CheckPoint("FLIGHT"))
'Note: We have used the bracket around Checkpoint to get the outcome
If isChkPointPass = True Then
  'Continue with order of creation
  Window("WinFlight").WinComboBox("FlyTo:").Select "Paris"
Window("WinFlight").WinButton("FLIGHT").Click
Window("WinFlight").Dialog("FlightsTable").WinButton("WinOK").Click
Window("WinFlight").WinEdit("Name:").Set "ashish"
Window("WinFlight").WinButton("Insert Order").Click
  Else
      'Leave the action if a checkpoint fails
  ExitAction
End If
..................Content has been hidden....................

You can't read the all page of ebook, please click here login for view all page.
Reset
18.221.154.18