Skip to main content

Overview

Browser automation blocks use headless browsers (Chromium, Firefox, WebKit) to interact with JavaScript-heavy websites, handle dynamic content, and perform actions like clicking and typing.

BrowserOpen

Launch a browser instance.

Settings

headless
boolean
default:"true"
Run browser in headless mode (no visible window)
browser_type
string
default:"chromium"
Browser engine to use: chromium, firefox, webkit
proxy
string
Proxy URL in format: http://host:port or socks5://host:port
extra_args
string
Additional browser launch arguments (space-separated)

Example

{
  "block_type": "BrowserOpen",
  "label": "Launch Browser",
  "settings": {
    "type": "BrowserOpen",
    "headless": true,
    "browser_type": "chromium",
    "extra_args": "--disable-blink-features=AutomationControlled"
  }
}
Navigate to a URL in the browser.

Settings

url
string
required
URL to navigate to (supports variable interpolation)
wait_until
string
default:"load"
Navigation completion event:
  • load - Wait for load event
  • domcontentloaded - Wait for DOMContentLoaded
  • networkidle - Wait for network idle
timeout_ms
number
default:"30000"
Navigation timeout in milliseconds
custom_cookies
string
Cookies to set before navigation (one per line: name=value)

Example

{
  "block_type": "NavigateTo",
  "label": "Open Login Page",
  "settings": {
    "type": "NavigateTo",
    "url": "https://example.com/login",
    "wait_until": "networkidle",
    "timeout_ms": 30000
  }
}

ClickElement

Click an element on the page.

Settings

selector
string
required
CSS selector for element to click
wait_for_navigation
boolean
default:"false"
Wait for navigation after clicking (e.g., form submission)
timeout_ms
number
default:"5000"
Timeout for element to appear

Example

{
  "block_type": "ClickElement",
  "label": "Click Login Button",
  "settings": {
    "type": "ClickElement",
    "selector": "button[type='submit']",
    "wait_for_navigation": true,
    "timeout_ms": 5000
  }
}

TypeText

Type text into an input field.

Settings

selector
string
required
CSS selector for input element
text
string
required
Text to type (supports variable interpolation)
clear_first
boolean
default:"true"
Clear existing text before typing
delay_ms
number
default:"50"
Delay between keystrokes in milliseconds (simulates human typing)

Example

{
  "block_type": "TypeText",
  "label": "Enter Username",
  "settings": {
    "type": "TypeText",
    "selector": "input[name='username']",
    "text": "<input.USER>",
    "clear_first": true,
    "delay_ms": 50
  }
}

WaitForElement

Wait for an element to appear/disappear.

Settings

selector
string
required
CSS selector for element
state
string
default:"visible"
Element state to wait for:
  • visible - Element is visible
  • hidden - Element is hidden
  • attached - Element exists in DOM
  • detached - Element removed from DOM
timeout_ms
number
default:"10000"
Maximum wait time in milliseconds

Example

{
  "block_type": "WaitForElement",
  "label": "Wait for Dashboard",
  "settings": {
    "type": "WaitForElement",
    "selector": "div.dashboard",
    "state": "visible",
    "timeout_ms": 10000
  }
}

GetElementText

Extract text or attribute from an element.

Settings

selector
string
required
CSS selector for element
attribute
string
Attribute to extract (leave empty for text content)Examples: value, href, data-id, class
output_var
string
default:"ELEMENT_TEXT"
Variable name to store result
capture
boolean
default:"false"
Capture as user-visible variable

Example

{
  "block_type": "GetElementText",
  "label": "Extract Balance",
  "settings": {
    "type": "GetElementText",
    "selector": "span.balance",
    "output_var": "ACCOUNT_BALANCE",
    "capture": true
  }
}

Screenshot

Capture a screenshot of the page or element.

Settings

full_page
boolean
default:"false"
Capture entire scrollable page (not just viewport)
selector
string
CSS selector to capture specific element (empty = full page)
output_var
string
default:"SCREENSHOT_B64"
Variable name to store base64-encoded PNG

Example

{
  "block_type": "Screenshot",
  "label": "Capture Page",
  "settings": {
    "type": "Screenshot",
    "full_page": true,
    "output_var": "PAGE_SCREENSHOT"
  }
}

ExecuteJs

Execute JavaScript code in the browser context.

Settings

code
string
required
JavaScript code to executeThe return value is stored in output_var
output_var
string
default:"JS_RESULT"
Variable name to store return value
capture
boolean
default:"false"
Capture as user-visible variable

Example

{
  "block_type": "ExecuteJs",
  "label": "Get Page Title",
  "settings": {
    "type": "ExecuteJs",
    "code": "return document.title;",
    "output_var": "PAGE_TITLE",
    "capture": true
  }
}

Complete Browser Example

{
  "blocks": [
    {
      "block_type": "BrowserOpen",
      "label": "Launch Browser",
      "settings": {"type": "BrowserOpen", "headless": true}
    },
    {
      "block_type": "NavigateTo",
      "label": "Open Login",
      "settings": {
        "type": "NavigateTo",
        "url": "https://example.com/login",
        "wait_until": "networkidle"
      }
    },
    {
      "block_type": "TypeText",
      "label": "Enter Email",
      "settings": {
        "type": "TypeText",
        "selector": "input[name='email']",
        "text": "<input.USER>"
      }
    },
    {
      "block_type": "TypeText",
      "label": "Enter Password",
      "settings": {
        "type": "TypeText",
        "selector": "input[name='password']",
        "text": "<input.PASS>"
      }
    },
    {
      "block_type": "ClickElement",
      "label": "Submit",
      "settings": {
        "type": "ClickElement",
        "selector": "button[type='submit']",
        "wait_for_navigation": true
      }
    },
    {
      "block_type": "WaitForElement",
      "label": "Wait for Dashboard",
      "settings": {
        "type": "WaitForElement",
        "selector": "div.dashboard",
        "state": "visible"
      }
    },
    {
      "block_type": "GetElementText",
      "label": "Get Username",
      "settings": {
        "type": "GetElementText",
        "selector": "span.username",
        "output_var": "LOGGED_IN_USER",
        "capture": true
      }
    }
  ]
}

Best Practices

  1. Close browsers when done to free resources
  2. Use networkidle for JavaScript-heavy pages
  3. Add WaitForElement before interacting with dynamic content
  4. Set appropriate timeouts for slow-loading pages
  5. Use headless mode in production for performance
  6. Limit browser blocks - they’re slower than HTTP requests