Skip to content

Verify Equality of Two Values: VERIFYEQUAL

The Verify Equality of Two Values action compares two values to check if they are equal. This action can compare text or integer values, ensuring that both matches exactly. It ensures accurate data validation by determining whether the first value matches the second.

The first value is provided in the Element Key section, while the second value is entered in the Parameter section. These values can be dynamically retrieved from UI elements or hardcoded. If both values match, the test step passes; otherwise, it fails.

Example 1: Comparing a UI Value with a pre-defined Value

Scenario: Let’s verify that the Total Amount displayed on a checkout page matches the expected amount.

Steps to configure:

  1. Add a new step.
  2. Select Verify Equality of Two Values from the Action drop-down.
  3. In the Screen Name field, select the screen where the LHS element is located (e.g., Checkout Page).
  4. In the Element Key field, select the element representing the LHS value (e.g., Total Amount).
  5. In the Parameters section, provide the RHS value you want to compare against (e.g., 100.00).
  6. Click Save.

Note: While the steps for adding an action are identical in both views, the display of the steps changes:

scrn-Verify-Equality-of-Two-Values-Tabular-View
Tabular View
scrn-Verify-Equality-of-Two-Values-Card-View
Card View

Note: Ensure that the Screen Name and Element Key are pre-defined before using this action.

Expected Outcome on execution:

  • The action will check if the LHS value (e.g., the Total Amount displayed on the checkout page) matches the RHS value provided in the parameter section.
  • If the values are equal, the verification will pass, allowing the automation to continue.
  • If the values are not equal, the action will fail, signaling a mismatch that may need review.

Example 2: Comparing Two Static Strings (No UI Element Involved)

Scenario: Suppose you want to verify whether two static string values match. This method is helpful when validating data transformations, constants, or backend responses.

Steps to Configure:

  1. Add a new step.
  2. From the Action dropdown, select Verify Equality Of Two Values.
  3. Leave the Screen Name field blank.
  4. In the Element Key field, enter the first value (e.g., HelloWorld).
  5. In the Parameters section, enter the second value you want to compare against (e.g., HelloWorld).
  6. Click Save.

Note: While the steps for adding an action are identical in both views, the display of the steps changes:

scrn-Verify-Equality-of-Two-Values-no-ui-Tabular-View
Tabular VIew
scrn-Verify-Equality-of-Two-Values-no-ui-card-View
Card View

Expected Outcome on execution:

  • The action checks if both static string values are equal.
  • If the values match, the verification passes and the automation proceeds.
  • If the values do not match, the step fails and indicates a mismatch.

Back To Top