Skip to main content

Overview

The Verify Text node provides specialized text verification capabilities for web pages. It’s a variant of the Verify Element node focused specifically on text content validation with advanced pattern matching options.
This node is a specialized configuration of the Verify node with verificationType: 'elementText'. For comprehensive verification options, see Verify Element.

Configuration

domain
string
required
Set to browser for text verification.
verificationType
string
required
Set to elementText for text verification.
selector
string
required
Element selector containing the text to verify.
selectorType
string
default:"css"
Type of selector: css, xpath, text, getByRole, etc.
expectedValue
string
required
Expected text content or pattern.
matchType
string
default:"equals"
How to match the text:
  • equals - Exact match (case-sensitive)
  • contains - Text contains the expected value
  • startsWith - Text starts with the expected value
  • endsWith - Text ends with the expected value
  • regex - Regular expression match
failSilently
boolean
default:"false"
If true, failed verifications log warnings but don’t stop execution.

Match Types Explained

equals

Exact string match (case-sensitive).
{
  "expectedValue": "Welcome to Dashboard",
  "matchType": "equals"
}
// Matches: "Welcome to Dashboard"
// Fails: "Welcome to dashboard", "Welcome to Dashboard "

contains

Text contains the expected substring.
{
  "expectedValue": "Success",
  "matchType": "contains"
}
// Matches: "Operation Success", "Success!", "Successfully completed"
// Fails: "Operation Failed", "success" (case-sensitive)

startsWith

Text begins with the expected prefix.
{
  "expectedValue": "Error:",
  "matchType": "startsWith"
}
// Matches: "Error: Invalid input", "Error: Connection failed"
// Fails: "Warning: Error detected"

endsWith

Text ends with the expected suffix.
{
  "expectedValue": "completed",
  "matchType": "endsWith"
}
// Matches: "Download completed", "Upload completed"
// Fails: "completed successfully"

regex

Regular expression pattern matching.
{
  "expectedValue": "^Order #[0-9]{6}$",
  "matchType": "regex"
}
// Matches: "Order #123456", "Order #999999"
// Fails: "Order #12345", "Order #ABC123"

Examples

Basic Text Verification

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

Pattern Matching

{
  "type": "verify",
  "data": {
    "domain": "browser",
    "verificationType": "elementText",
    "selector": ".user-email",
    "expectedValue": "^[a-zA-Z0-9._%+-]+@[a-zA-Z0-9.-]+\\.[a-zA-Z]{2,}$",
    "matchType": "regex"
  }
}

Error Messages

{
  "type": "verify",
  "data": {
    "domain": "browser",
    "verificationType": "elementText",
    "selector": ".error-banner",
    "expectedValue": "Error:",
    "matchType": "startsWith"
  }
}

Success Messages

{
  "type": "verify",
  "data": {
    "domain": "browser",
    "verificationType": "elementText",
    "selector": ".alert-success",
    "expectedValue": "successfully",
    "matchType": "contains"
  }
}

With Retry

Wait for Dynamic Text
{
  "type": "verify",
  "data": {
    "domain": "browser",
    "verificationType": "elementText",
    "selector": ".processing-status",
    "expectedValue": "Complete",
    "matchType": "equals",
    "retryEnabled": true,
    "retryCount": 10,
    "retryDelay": 1000
  }
}

Optional Verification

Fail Silently
{
  "type": "verify",
  "data": {
    "domain": "browser",
    "verificationType": "elementText",
    "selector": ".optional-message",
    "expectedValue": "Info",
    "matchType": "contains",
    "failSilently": true
  }
}

Regex Pattern Examples

PatternDescriptionMatches
^\d{3}-\d{4}$Phone format555-1234
^[A-Z]{2}\d{4}$License plateAB1234
^\$\d+\.\d{2}$Price$19.99
^\d+%$Percentage75%
^v\d+\.\d+\.\d+$Versionv1.2.3
\b\d{1,3}(,\d{3})*\bFormatted number1,234,567

Common Use Cases

Form Validation

[
  {
    "type": "type",
    "data": {
      "selector": "#email",
      "text": "invalid-email"
    }
  },
  {
    "type": "action",
    "data": {
      "action": "click",
      "selector": "button[type=submit]"
    }
  },
  {
    "type": "verify",
    "data": {
      "domain": "browser",
      "verificationType": "elementText",
      "selector": ".error-message",
      "expectedValue": "Invalid email",
      "matchType": "contains"
    }
  }
]

Status Monitoring

{
  "type": "verify",
  "data": {
    "domain": "browser",
    "verificationType": "elementText",
    "selector": ".build-status",
    "expectedValue": "(Success|Passed|Complete)",
    "matchType": "regex",
    "retryEnabled": true,
    "retryCount": 30,
    "retryDelay": 2000
  }
}

Content Validation

{
  "type": "verify",
  "data": {
    "domain": "browser",
    "verificationType": "elementText",
    "selector": "article.post",
    "expectedValue": "${data.expectedContent}",
    "matchType": "contains"
  }
}

Notes

Text matching is case-sensitive for all match types. Use regex with case-insensitive flags if needed: (?i)pattern
When using regex patterns, remember to escape special characters with double backslashes in JSON: \\d for digits, \\. for literal dots.
The contains match type is useful for verifying dynamic content where exact text may vary but key terms remain constant.

Build docs developers (and LLMs) love