Inserting a Verification

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

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

  1. Select the following text that defines the model type for the auto quote.
    .DomElement("RX400").DomClick(MouseButton.Left, New Point(96, 11))
  2. Navigate to the page in the instant quote wizard where the Model type is specified and note a different model type. For example, GS430 is a model type for the Lexus make.
  3. In Silk Test Workbench, change the model type. Change the following textContents code from:
    .DomElement("RX400").DomClick(MouseButton.Left, New Point(96, 11))
    to:
    .DomElement("GS430").DomClick(MouseButton.Left, New Point(96, 11))
  4. To compare the expected value with the actual value and add a comment, type:
    Workbench.Verify ("GS430", .DomTextField("modelCombo").Text, "The model type is correct")

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