Manual Assertions

Assertions verify that your application is in the correct state at a specific point during test execution. If an assertion fails, the test step is marked as failed and execution stops (unless the step is marked Optional).


Adding Assertions

During Recording

  1. Pause recording by clicking the Pause button in the recording toolbar.
  2. Right-click the element you want to assert against.
  3. Select Add Assertion.
  4. Choose an assertion type from the dropdown.
  5. Configure the expected value.
  6. Resume recording.

After Recording (Post-Edit)

  1. Open the test case in the editor.
  2. Click the + button between steps to insert a new step.
  3. Select Assert from the step type picker.
  4. Configure the assertion in the node editor.

Assertion Types

CSS Style

Checks that a CSS property of an element has a specific value.

Examples:

  • Verify a button is red: background-color equals rgb(255, 0, 0)
  • Verify text is bold: font-weight equals 700
  • Verify an element is hidden: display equals none

Fields: CSS Property, Operator (=, ≠, contains, starts with, ends with), Expected Value. Optional: Case Sensitive checkbox, Arithmetic Expression checkbox.


Element Property

Checks a DOM property of an element — the runtime JavaScript value as opposed to the HTML attribute.

Common properties: value (input content), checked (checkbox state), disabled, textContent, innerHTML

Fields: Property Name, Operator, Expected Value. Optional: Case Sensitive, Arithmetic Expression.


Element Attribute

Checks an HTML attribute set in the markup.

Common attributes: href, src, aria-label, data-testid, placeholder, title, class

Fields: Attribute Name, Operator, Expected Value. Optional: Case Sensitive, Arithmetic Expression.


Element Count

Checks how many elements match a selector — useful for verifying list lengths, table row counts, or the presence of multiple items.

Example: Assert that a product grid contains exactly 12 items.

Fields: Operator (=, ≠, >, <, ≥, ≤), Expected Count.


Page Assertion

Checks page-level state rather than a specific element.

Page conditions: Current URL, Page title, Page loaded state

Example: After a login redirect, assert that the URL contains /dashboard.

Fields: Page Condition, Operator, Expected Value. Optional: Case Sensitive. References the current browser tab/page rather than a specific element.


Visual Assertion (Visually Same)

Captures a screenshot of an element at recording time and stores it as the reference snapshot. At execution time, a fresh screenshot is taken and compared pixel-by-pixel against the reference.

Use cases:

  • Verifying that a chart, graph, or image renders correctly
  • Catching unintended CSS changes that break layout
  • Validating icon and logo rendering

Fields:

  • Tolerance — the percentage of pixels allowed to differ before the assertion fails (0 = pixel-perfect, 5 = 5% variation allowed)
  • Snapshot URL — the stored reference image (read-only, set during recording)
  • Bounding box — the region captured (read-only, set during recording)

When the assertion fails, the execution report shows a pixel diff image highlighting the changed regions in red.

Visual Assertion node editor showing reference snapshot thumbnail, tolerance slider, and bounding box


Smart Assertion

Describe what you want to verify in plain English. The AI interprets the description and evaluates it against the live page state.

Examples:

  • "The shopping cart shows 3 items"
  • "The error message is visible"
  • "The submit button is disabled"
  • "The price is greater than 0"

Smart Assertions use {{!variableName}} syntax to reference local variables captured earlier in the test. For example: "The order confirmation number matches {{!orderId}}".

Field: Description (smart input supporting variable references)


Operators Reference

OperatorMeaning
=Exactly equals
≠Does not equal
containsThe actual value contains the expected substring
starts withThe actual value starts with the expected string
ends withThe actual value ends with the expected string
>Greater than (numeric)
<Less than (numeric)
≥Greater than or equal (numeric)
≤Less than or equal (numeric)

Assertion Failure Behavior

When an assertion fails:

  • The test step is marked as Failed (red).
  • Execution stops at the failing step (unless the step is marked Optional).
  • The execution report captures the actual value, expected value, and a screenshot at the moment of failure.
  • For Visual Assertions, a pixel diff image is also saved.

To make an assertion non-blocking (continue on failure), mark the assertion step as Optional in the step editor.