Remote Browser
Learn how to use the Remote Browser integration with Julep
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:
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.
Create Task Definition
Use the following YAML configuration to perform browser actions in your task definition:
YAML Explanation
Basic Configuration
Basic Configuration
- 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.
Tool Configuration
Tool Configuration
- 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 toperform_action
if not specified. - setup: Contains configuration details, which are the connection url and the browser size (width and height).
- provider: Indicates the service provider, which is
Workflow Configuration
Workflow Configuration
- 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.
List of Actions
key
: Send keyboard inputtype
: Type text into an input fieldmouse_move
: Move the mouse cursor to coordinatesleft_click
: Perform a left mouse clickleft_click_drag
: Click and drag with left mouse buttonright_click
: Perform a right mouse clickmiddle_click
: Perform a middle mouse clickdouble_click
: Perform a double clickscreenshot
: Take a screenshotcursor_position
: Get current cursor positionnavigate
: Navigate to a URLrefresh
: 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.
- tool: Refers to the tool defined earlier (
- 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.