Skip to main content

Overview

Welcome to the Remote Browser integration guide for Julep! This integration allows you to manage browser sessions and perform various actions, enabling you to build workflows that require browser automation capabilities. Whether you’re testing web applications or automating web tasks, this guide will walk you through the setup and usage.

Prerequisites

To use the Remote Browser integration, you need to configure a remote browser to connect to. The integration then uses Playwright for browser automation to interact with the that remote browser.

How to Use the Integration

To get started with the Remote Browser integration, follow these steps to configure and create a task:
1

Configure Remote Browser

Add your Remote Browser configuration (say Browserbase) to the tools section of your task. This will allow Julep to manage browser automation on your behalf to interact with the remote browser.
2

Create Task Definition

Use the following YAML configuration to perform browser actions in your task definition:
Remote Browser Example
name: Browser Automation Task
tools:
- name: browserbase_tool
  type: integration
  integration:
    provider: browserbase
    method: create_session
    setup:
      project_id: "BROWSERBASE_PROJECT_ID"

- name: browser_tool
  type: integration
  integration:
    provider: remote_browser
    method: perform_action
    setup:
      width: 1920
      height: 1080

main:

- tool: browserbase_tool
  method: create_session
  arguments:
    project_id: BROWSERBASE_PROJECT_ID

- evaluate:
    browser_session_id: $ _.id
    connect_url: $ _.connect_url

- tool: browser_tool
  arguments:
    connect_url: $ _.connect_url
    action: navigate
    text: https://www.google.com

YAML Explanation

  • name: A descriptive name for the task, in this case, “Browser Automation Task”.
  • tools: This section lists the tools or integrations being used. Here, browser_tool is defined as an integration tool.
  • type: Specifies the type of tool, which is integration in this context.
  • integration: Details the provider and setup for the integration.
    • provider: Indicates the service provider, which is remote_browser.
    • method: Specifies the method to use, which is perform_action. Defaults to perform_action if not specified.
    • setup: Contains configuration details, which are the connection url and the browser size (width and height).
  • main: Defines the main execution steps.
    • tool: Refers to the tool defined earlier (browser_tool).
    • method: Specifies the method to use, which is perform_action.
    • arguments: Specifies the input parameters for the tool:
      • action: The type of action to perform.
      • key: Send keyboard input
      • type: Type text into an input field
      • mouse_move: Move the mouse cursor to coordinates
      • left_click: Perform a left mouse click
      • left_click_drag: Click and drag with left mouse button
      • right_click: Perform a right mouse click
      • middle_click: Perform a middle mouse click
      • double_click: Perform a double click
      • screenshot: Take a screenshot
      • cursor_position: Get current cursor position
      • navigate: Navigate to a URL
      • refresh: Refresh the current page
      • text: The text to type in the input field.
      • coordinate: The coordinates to click on the screen to move the mouse.
  • Remember to replace BROWSERBASE_PROJECT_ID with your actual project ID.
  • Make sure to properly configure browser settings and action parameters for your use case.

Conclusion

With the Remote Browser integration, you can efficiently automate browser interactions in your workflows. This integration provides a robust solution for web automation, enhancing your workflow’s capabilities and reliability.
For more information, please refer to the Playwright documentation.
I