Inserting a Verification

A verification is test logic that evaluates a user-defined condition, and then sends a pass/fail message and, optionally, a flag to the playback result of a visual test.

In this lesson, you will insert a verification to ensure that the quote uses the correct vehicle model.

  1. Ensure that you are viewing both steps and screens by clicking View > Test Steps > Steps and Screens.
  2. Select the step that reads click 'rx400' at 91,11.
  3. In the Screen Preview, click Actions > Zoom > 75%, then use the scroll bars to position the screen so that the Model is clearly visible.
  4. Perform one of the following steps:
    • Click Create Verification Type Logic on the toolbar.
    • Choose Insert > Test Logic > Verification.
    The Welcome page of the Test Logic Designer wizard opens.
  5. Click Next. The Select a Logic Type page opens.
  6. Click The property of a control, and then click Next. The Define a property-based condition page opens.
  7. Click Identify from the screen preview. The pointer moves to the Screen Preview.
  8. Select the Model combo box. The Define a property-based condition page displays the name of the selected control and the properties of the control. The control name displays as:
    webBrowser.browserWindow.modelCombo
  9. In the Select a property grid, scroll to Text and select it.
  10. Ensure that Select the condition is set to Is Equat to.
  11. Change the Expected value to use the updated Text property by typing RX400 in the Expected value text box.
  12. Click Next. The Build the Verification page opens. From this page, you can define the pass or fail message to send to the playback result. At the top of the page, the condition that Silk Test Workbench verifies should be as follows:
    If "webBrowser.browserWindow.modelCombo"."Text" Is Equal to "RX400" 

    This condition defines the logic for the verification. The condition compares the model type to the type selected.

  13. Replace the default pass text description to The model type is correct, and the default failed text description to The model type is NOT correct.
  14. Click Next. The Summary page opens.
    A verification step is inserted after the selected step. The step text for the verification step is similar to the following:
    Verify "webBrowser.browserWindow.modelCombo"."Text" Is Equal to "RX400"
  15. After reviewing the verification, click Finish.

You have successfully enhanced the recorded visual test by inserting test logic that verifies the value of a property in the sample application.