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. Get Bounding Box

    Get Bounding Box

    Browser Node

    Get the size and position of an element

    Overview

    The Get Bounding Box node retrieves the position and dimensions of an element on the page. This returns the X, Y coordinates (top-left corner), width, and height in pixels.

    Parameters
    Configuration options for this node
    Selector
    Selector
    Required

    The element to measure. Use the Selector Picker.

    Example: #target-element, .product-card, getByRole('button')
    Target Variable
    String

    Variable name that stores the bounding box object

    Default: boundingBox
    Timeout
    Number

    Maximum time to wait for the element

    Default: 30000

    Output Data

    The node outputs an object with these properties:

    x

    X coordinate of the element's left edge (pixels from viewport left)

    y

    Y coordinate of the element's top edge (pixels from viewport top)

    width

    Width of the element in pixels

    height

    Height of the element in pixels

    When to Use

    Calculate Click Coordinates

    Get the bounding box of a reference element, then calculate relative positions for Click Coordinates. More reliable than hardcoded coordinates.

    Verify Element Size

    Check that elements render at the expected size. Useful for responsive design testing or detecting layout issues.

    Position Calculations

    Calculate element center points, check if elements overlap, or determine spatial relationships between elements.

    Usage Examples

    Example 1: Click Slider at 75%
    Calculate position based on element dimensions

    Workflow:

    1. Get Bounding Box: .slider-track
    2. Math Operations nodes (one operation each): targetX = x + width × 0.75, targetY = y + height ÷ 2 — e.g. Multiply {{$('Get Bounding Box').item.json.boundingBox.width}} by 0.75
    3. Click Coordinates:
      X = {{targetX}}
      Y = {{targetY}}
    Example 2: Check Element Visibility
    Verify element has non-zero dimensions

    Workflow:

    1. Get Bounding Box: .modal-dialog
    2. If Condition: {{$('Get Bounding Box').item.json.boundingBox.width}} greater than 0
    3. Then: Modal is visible, continue
    Example 3: Click Element Center
    Calculate the center point of an element

    Calculate center:

    centerX = x + (width / 2)
    centerY = y + (height / 2)

    Best Practices

    Coordinates Are Viewport-Relative
    The X and Y values are relative to the current viewport, not the page. If you've scrolled, the same element will have different coordinates.
    Scroll Into View First
    For off-screen elements, the bounding box might be outside the viewport or have unexpected values. Scroll the element into view first for accurate measurements.

    Related Documentation

    Click Coordinates

    Use position data for clicks

    Set Viewport

    Control viewport size

    Scroll Nodes

    Scroll before measuring

    Variables Guide

    Use output in calculations