Skip to main content
The Browser Open command enables you to open a browser session and navigate to a URL. This command is essential for initiating browser-based workflows and establishing browser sessions for subsequent browser commands.

Overview

The Browser Open command provides functionality for:
  • Opening browser sessions (Chrome, Firefox, etc.)
  • Navigating to URLs
  • Managing browser session state
  • Configuring browser options
  • Establishing persistent sessions across commands

Parameters

ParameterTypeDescriptionRequired
sessionIdstringSession identifier for maintaining stateNo
urlstringURL to navigate toYes
browserTypestringBrowser type (chrome, firefox, etc.)No
timeoutnumberMaximum wait time in millisecondsNo
optionsobjectBrowser options (headless, viewport, etc.)No

Usage Examples

Basic Browser Open

{
  "command": "browser-open",
  "params": {
    "url": "https://example.com"
  }
}

Browser Open with Session

{
  "command": "browser-open",
  "params": {
    "sessionId": "#{UUID}",
    "url": "https://example.com"
  }
}

Browser Open with Options

{
  "command": "browser-open",
  "params": {
    "url": "https://example.com",
    "browserType": "chrome",
    "options": {
      "headless": false,
      "viewport": {
        "width": 1920,
        "height": 1080
      }
    },
    "timeout": 30000
  }
}

Browser Open with Dynamic URL

{
  "command": "browser-open",
  "params": {
    "url": "https://example.com/page?id=@{PROJECT_ID}",
    "sessionId": "#{UUID}"
  }
}

Session Management

The Browser Open command supports session management for maintaining state across commands:

Creating a Session

{
  "command": "browser-open",
  "params": {
    "sessionId": "#{UUID}",
    "url": "https://example.com"
  }
}

Reusing a Session

Subsequent commands can use the same session ID:
{
  "command": "click",
  "params": {
    "sessionId": "#{UUID}",
    "selector": ".button"
  }
}

Variable Support

The Browser Open command supports variable interpolation in:
  • URL: Use @{VARIABLE} in URLs
  • Session ID: Use #{UUID} for session tracking

Common Variable Patterns

  • Project Variables: @{PROJECT_ID}, @{RUN_ID} - Include in URLs
  • Session Variables: #{UUID} - Maintain browser session state
  • Dynamic URLs: Use variables to construct dynamic URLs

Browser Options

Configure browser behavior with options:

Common Options

  • headless: Run browser in headless mode (default: false)
  • viewport: Set browser viewport size
  • userAgent: Set custom user agent string
  • timeout: Set navigation timeout

Best Practices

  • Use Session IDs: Leverage #{UUID} for maintaining browser state
  • Set Appropriate Timeouts: Configure timeouts for page loading
  • Handle Navigation Errors: Implement error handling for failed navigation
  • Use HTTPS: Prefer HTTPS URLs for secure connections
  • Configure Viewport: Set appropriate viewport size for consistent rendering

Common Use Cases

  • Web Scraping: Open pages for content extraction
  • Form Automation: Navigate to forms for automation
  • Multi-Page Workflows: Establish sessions for multi-page navigation
  • Dynamic Content: Handle JavaScript-rendered content