Skip to main content

Overview

The Verify Element node (Verify node with domain: browser) validates element states and properties on web pages. It checks for element existence, visibility, text content, attributes, and other conditions. Verification results are stored in context and can optionally fail workflows or continue silently.

Configuration

domain
string
required
Set to browser for element verification.
verificationType
string
required
Type of verification to perform:
  • elementExists - Check if element exists in DOM
  • elementVisible - Check if element is visible
  • elementText - Verify element text content
  • elementAttribute - Verify element attribute value
  • elementCount - Verify number of matching elements
  • Custom verification types from plugins
failSilently
boolean
default:"false"
If true, failed verifications log warnings but don’t stop workflow execution.

Verification Types

elementExists

Check if an element exists in the DOM. Required Fields:
  • selector: Element selector
  • selectorType: Selector type (default: css)
Example:
{
  "domain": "browser",
  "verificationType": "elementExists",
  "selector": ".success-message",
  "expectedValue": true
}

elementVisible

Check if an element is visible on the page. Required Fields:
  • selector: Element selector
  • selectorType: Selector type
  • expectedValue: true (visible) or false (not visible)
Example:
{
  "domain": "browser",
  "verificationType": "elementVisible",
  "selector": "#modal-dialog",
  "expectedValue": true
}

elementText

Verify element text content. Required Fields:
  • selector: Element selector
  • expectedValue: Expected text content
  • matchType: How to match (default: equals)
    • equals: Exact match
    • contains: Partial match
    • startsWith: Starts with text
    • endsWith: Ends with text
    • regex: Regular expression match
Example:
{
  "domain": "browser",
  "verificationType": "elementText",
  "selector": ".status-message",
  "expectedValue": "Success",
  "matchType": "contains"
}

elementAttribute

Verify element attribute value. Required Fields:
  • selector: Element selector
  • attributeName: Attribute to check
  • expectedValue: Expected attribute value
  • matchType: How to match
Example:
{
  "domain": "browser",
  "verificationType": "elementAttribute",
  "selector": "a.download-link",
  "attributeName": "href",
  "expectedValue": "https://example.com/download",
  "matchType": "equals"
}

elementCount

Verify the number of matching elements. Required Fields:
  • selector: Element selector
  • expectedValue: Expected count
  • operator: Comparison operator
    • equals: Exact count
    • greaterThan: More than
    • lessThan: Fewer than
    • greaterThanOrEqual: At least
    • lessThanOrEqual: At most
Example:
{
  "domain": "browser",
  "verificationType": "elementCount",
  "selector": ".product-card",
  "expectedValue": 10,
  "operator": "greaterThanOrEqual"
}

Advanced Features

Retry Logic

retryEnabled
boolean
default:"false"
Enable automatic retry for failed verifications.
retryStrategy
string
default:"count"
Retry strategy: count or untilCondition
retryCount
number
default:"3"
Number of retry attempts.
retryDelay
number
default:"1000"
Delay between retries in milliseconds.
retryDelayStrategy
string
default:"fixed"
Delay strategy: fixed or exponential

Examples

Basic Verifications

{
  "type": "verify",
  "data": {
    "domain": "browser",
    "verificationType": "elementExists",
    "selector": ".login-form",
    "expectedValue": true
  }
}

Text Verification

{
  "type": "verify",
  "data": {
    "domain": "browser",
    "verificationType": "elementText",
    "selector": "h1.page-title",
    "expectedValue": "Welcome to Dashboard",
    "matchType": "equals"
  }
}

Attribute Verification

{
  "type": "verify",
  "data": {
    "domain": "browser",
    "verificationType": "elementAttribute",
    "selector": "a.download-btn",
    "attributeName": "href",
    "expectedValue": "/downloads/file.pdf",
    "matchType": "contains"
  }
}

Count Verification

{
  "type": "verify",
  "data": {
    "domain": "browser",
    "verificationType": "elementCount",
    "selector": ".cart-item",
    "expectedValue": 3,
    "operator": "equals"
  }
}

With Retry

Resilient Verification
{
  "type": "verify",
  "data": {
    "domain": "browser",
    "verificationType": "elementVisible",
    "selector": ".dynamic-content",
    "expectedValue": true,
    "retryEnabled": true,
    "retryCount": 5,
    "retryDelay": 2000,
    "retryDelayStrategy": "exponential"
  }
}

Fail Silently

Optional Verification
{
  "type": "verify",
  "data": {
    "domain": "browser",
    "verificationType": "elementExists",
    "selector": ".optional-banner",
    "expectedValue": true,
    "failSilently": true
  }
}

Verification Results

Verification results are stored in the context:
const result = context.getData('verificationResult');

// Result structure:
{
  "passed": true,
  "message": "Element is visible",
  "domain": "browser",
  "type": "elementVisible",
  "actualValue": true,
  "expectedValue": true,
  "details": {}
}

Common Patterns

Verify After Action

[
  {
    "type": "action",
    "data": {
      "action": "click",
      "selector": "button.submit"
    }
  },
  {
    "type": "verify",
    "data": {
      "domain": "browser",
      "verificationType": "elementVisible",
      "selector": ".success-message",
      "expectedValue": true
    }
  }
]

Multiple Verifications

[
  {
    "type": "verify",
    "data": {
      "domain": "browser",
      "verificationType": "elementExists",
      "selector": "#form",
      "expectedValue": true
    }
  },
  {
    "type": "verify",
    "data": {
      "domain": "browser",
      "verificationType": "elementCount",
      "selector": ".form-field",
      "expectedValue": 5,
      "operator": "equals"
    }
  }
]

Conditional Workflow

const verified = context.getData('verificationResult');
if (verified.passed) {
  context.setData('proceedToNextStep', true);
} else {
  context.setData('showErrorScreen', true);
}

Notes

Verifications with retry enabled will automatically wait and retry until the condition passes or retries are exhausted.
When failSilently is enabled, failed verifications are logged but don’t throw errors. Check the verification result in context to determine success.
Element visibility checks consider both CSS visibility and whether the element is in the viewport. Use elementExists to check DOM presence regardless of visibility.

Build docs developers (and LLMs) love