PrompteryxBeta
    ⌘K
    PlatformSupport
    Menu
    IntroductionInstall Desktop & extensionQuick StartPlatform Overview
    OverviewWhat you can makeAI Browser Agent in the chatModels and AutoConnectorsSchedulesProjectsExplore and publishingShare linksMemory and SkillsPersonal agent (beta)Welcome, settings and skinsPlans, credits and top-upsPrompteryx DesktopGroups (pilot)Phone app (early access)
    OverviewCreating WorkflowsTesting & DebuggingScheduling
    OverviewGetting StartedCommandsRecordingSettingsStructured OutputParallel AgentsTips & Best Practices
    OverviewInstallationSidebar AgentUsing Attached FilesExecute on Current TabExporting to Visual Studio
    Overview
    OverviewOpen PageClickClick CoordinatesFillExtract TextScreenshotWaitPress KeyFocus ElementBlur ElementSelect TextHighlight ElementSet ViewportGet Bounding BoxScrollHoverSelect OptionAssertionsCookiesEvaluate JavaScriptExample Workflows
    OverviewPrompteryx Browser AgentOpenAI
    OverviewSchedule TriggerWebhook Trigger
    OverviewGoogle SheetsGoogle CalendarConnect Hub (3,000+ apps)Example Workflows
    AI Vision SettingsChrome Automation ProfilesCloud BrowserBrowser Profiles & Persistent ContextVideo RecordingExecution LogsSharing & CollaborationEdit History
    Selectors GuideVariables
    Start hereGet an API keyRun the AI browser agentDrive a cloud browserRun workflows from anywhereUse connected apps (Connect Hub)SDK (TypeScript)CLIMCP for AI assistants
    REST APIWebhooksMCP toolsCloud Browser APICloud Browser quickstartMigrate from Browserbasen8nZapierMake.com

    Need help? Contact Support

    1. Documentation
    2. Nodes
    3. Browser Actions
    4. Assertions

    Assertion Nodes

    Browser Node

    Verify page elements, content, and states

    Overview

    Assertion nodes verify that elements on a page are in an expected state. If an assertion fails, the workflow stops with an error - making them perfect for validation, testing, and ensuring automations work correctly.

    Assertions vs Is/Has Nodes
    Assert nodes fail the workflow if the condition is not met.Is/Has nodes return a boolean value for use in conditional logic. Use Assert for validation, Is/Has for branching logic.

    State Assertions

    Assert Element State
    Verify element visibility, enabled status, and more
    Parameters
    Configuration options for this node
    selector
    Selector
    Required

    Element to assert state on

    Example: #submit-btn, .error-message
    assertionType
    Select
    Required

    Assertion Type: Is Visible, Is Hidden, Is Enabled, Is Disabled, Is Checked, Is Editable, Is Focused, Is Attached (in DOM), Is Empty, or Is In Viewport

    Default: Is Visible
    not
    Boolean

    Negate (NOT) — invert the assertion, e.g. Is Checked + NOT = unchecked

    Default: false
    timeout
    Number

    Time to wait for the state (ms)

    Default: 30000
    Assert Visible
    Fail if element is not visible on the page
    Assert Hidden
    Fail if element is visible (should be hidden)
    Assert Enabled
    Fail if element is disabled
    Assert Disabled
    Fail if element is enabled (should be disabled)
    Assert Checked
    Fail if checkbox/radio is not checked
    Assert Unchecked
    Fail if checkbox/radio is checked
    Assert Editable
    Fail if input element is not editable

    Content Assertions

    Assert Element Content
    Verify text, value, or count of elements
    Parameters
    Configuration options for this node
    selector
    Selector
    Required

    Element to check content of

    Example: h1, #total-price, .item
    assertionType
    Select
    Required

    Assertion Type: Has Text (exact), Contains Text, Has Value (input), or Has Count (multiple elements)

    Default: Has Text (exact)
    expectedValue
    String
    Required

    Expected Value — the text, value, or count to verify

    Example: 'Welcome', '$99.00', 5
    matchType
    Select

    Match Options for text and value assertions: Exact Match, Case Insensitive, or Regex Pattern

    Default: Exact Match
    not
    Boolean

    Negate (NOT) — invert the assertion

    Default: false
    Has Text?
    Check if element contains specific text (returns boolean)
    Has Value?
    Check if input has specific value (returns boolean)

    Attribute Assertions

    Assert Element Attribute
    Verify element attributes, CSS, classes, or ARIA properties
    Parameters
    Configuration options for this node
    selector
    Selector
    Required

    Element to check

    Example: img.logo, a.nav-link
    assertionType
    Select
    Required

    Assertion Type: Has Attribute, Has Class, Contains Class, Has CSS Property, Has ID, Has Role (ARIA), Has Accessible Name, Has Accessible Description, or Has JS Property

    Default: Has Attribute
    attributeName
    String

    Attribute/Property Name — used by Has Attribute, Has CSS Property, and Has JS Property

    Example: href, data-testid, color
    expectedValue
    String

    Expected attribute value (leave empty to just check existence)

    Example: https://example.com, rgb(255, 0, 0)

    Usage Examples

    Example 1: Verify Login Success
    Assert dashboard is visible after login
    Node: Assert Element State
    Selector:.dashboard-container
    Assertion Type: Is Visible
    Timeout: 10000ms
    Example 2: Verify Error Message
    Check that correct error is displayed
    Node: Assert Element Content
    Selector:.error-message
    Assertion Type: Contains Text
    Expected Value: "Invalid password"
    Example 3: Verify Cart Count
    Assert correct number of items in cart
    Node: Assert Element Content
    Selector:.cart-item
    Assertion Type: Has Count
    Expected Value: 3

    Best Practices

    Use Assertions for Validation
    Add assertions after critical actions (login, form submission, checkout) to verify they succeeded before continuing.
    Set Appropriate Timeouts
    Assertions wait for the condition up to the timeout. Set longer timeouts for slow pages, but not too long to avoid masking real failures.
    Combine with If Condition
    For non-critical checks where you want to continue with different logic, use Is/Has nodes with If Condition instead of Assert nodes.

    Related Documentation

    Wait Nodes

    Wait before asserting

    If Condition Node

    Conditional logic with Is/Has

    Extract Text Node

    Get text for comparison

    Testing Workflows

    Debug assertion failures