Install
openclaw skills install browserless-agentProfessional web automation with headless browser - navigate, scrape, automate, test, and interact with any website.
openclaw skills install browserless-agentA comprehensive web automation skill for OpenClaw that provides 30+ browser actions including navigation, data extraction, form filling, screenshot capture, PDF generation, file handling, and advanced web scraping capabilities.
This skill requires the BROWSERLESS_URL environment variable to be configured in OpenClaw.
Optionally, you can also set BROWSERLESS_TOKEN for authentication.
To set it up:
Configuration Examples:
BROWSERLESS_URL=wss://chrome.browserless.io
BROWSERLESS_TOKEN=your-token-here
BROWSERLESS_URL=ws://localhost:3000
BROWSERLESS_URL=wss://your-host.com/playwright/chromium
BROWSERLESS_TOKEN=optional-token
The skill will automatically:
/playwright/chromium if endpoint is not specifiedBROWSERLESS_TOKEN is setGet your Browserless service at: browserless.io
Get your Browserless service at: browserless.io
navigateNavigate to a URL.
{"url": "https://example.com"}
go_backNavigate to previous page in history.
{}
go_forwardNavigate to next page in history.
{}
reloadReload the current page.
{"hard": false}
wait_for_loadWait for page to finish loading.
{"timeout": 30000}
get_textExtract text content from element(s).
{"selector": "h1", "all": false}
get_attributeGet attribute value from element(s).
{"selector": "img", "attribute": "src", "all": false}
get_htmlGet inner or outer HTML of element(s).
{"selector": "article", "outer": false, "all": false}
get_valueGet input value from form element(s).
{"selector": "input[name='email']"}
get_styleGet computed CSS style property.
{"selector": ".box", "property": "background-color"}
get_multipleExtract multiple pieces of data at once.
{
"extractions": [
{"name": "title", "selector": "h1", "type": "text"},
{"name": "image", "selector": "img", "type": "attribute", "attribute": "src"},
{"name": "price", "selector": ".price", "type": "text"}
]
}
type_textType text into an element.
{"selector": "input[type='search']", "text": "hello world", "delay": 0, "clear": true}
clickClick on an element.
{"selector": "button.submit", "force": false, "delay": 0}
double_clickDouble-click on an element.
{"selector": ".item"}
right_clickRight-click (context menu) on an element.
{"selector": ".context-target"}
hoverMove mouse over an element.
{"selector": ".menu-item"}
focusFocus on an element.
{"selector": "input"}
select_optionSelect option(s) in a dropdown.
{"selector": "select", "values": ["option1", "option2"]}
checkCheck a checkbox or radio button.
{"selector": "input[type='checkbox']"}
uncheckUncheck a checkbox.
{"selector": "input[type='checkbox']"}
upload_fileUpload file(s) to file input.
{"selector": "input[type='file']", "files": ["path/to/file.pdf"]}
press_keyPress keyboard key(s).
{"key": "Enter"}
Common keys: Enter, Tab, Escape, ArrowDown, Control+A, etc.
keyboard_typeType text with keyboard (supports shortcuts).
{"text": "Hello World"}
scroll_toScroll to specific position.
{"x": 0, "y": 500}
scroll_into_viewScroll element into viewport.
{"selector": ".footer"}
scroll_to_bottomScroll to bottom of page.
{}
scroll_to_topScroll to top of page.
{}
screenshotTake screenshot of page or element.
{
"path": "screenshot.png",
"full_page": true,
"selector": null,
"quality": 90,
"type": "png"
}
pdfGenerate PDF from current page.
{
"path": "page.pdf",
"format": "A4",
"landscape": false,
"margin": {"top": "1cm", "right": "1cm", "bottom": "1cm", "left": "1cm"},
"print_background": true
}
evaluateExecute JavaScript in page context.
{"expression": "document.title"}
evaluate_functionExecute JavaScript function with arguments.
{
"function": "(x, y) => x + y",
"args": [5, 10]
}
wait_for_selectorWait for element to appear.
{"selector": ".dynamic-content", "timeout": 10000, "state": "visible"}
States: visible, hidden, attached, detached
wait_for_timeoutWait for specified milliseconds.
{"timeout": 2000}
wait_for_functionWait for JavaScript expression to return truthy.
{
"expression": "() => document.readyState === 'complete'",
"timeout": 10000
}
wait_for_navigationWait for navigation to complete.
{"timeout": 30000, "wait_until": "networkidle"}
wait_until options: load, domcontentloaded, networkidle
is_visibleCheck if element is visible.
{"selector": ".modal"}
is_enabledCheck if element is enabled.
{"selector": "button"}
is_checkedCheck if checkbox/radio is checked.
{"selector": "input[type='checkbox']"}
element_existsCheck if element exists in DOM.
{"selector": ".optional-element"}
element_countCount elements matching selector.
{"selector": ".list-item"}
get_cookiesGet all cookies or specific cookie.
{"name": "session_id"}
set_cookieSet a cookie.
{
"name": "user_preference",
"value": "dark_mode",
"domain": "example.com",
"path": "/",
"expires": 1735689600,
"httpOnly": false,
"secure": true,
"sameSite": "Lax"
}
delete_cookiesDelete cookies.
{"name": "session_id"}
Omit name to delete all cookies.
get_local_storageGet localStorage item.
{"key": "user_data"}
set_local_storageSet localStorage item.
{"key": "theme", "value": "dark"}
clear_local_storageClear all localStorage.
{}
set_extra_headersSet extra HTTP headers for all requests.
{
"headers": {
"Authorization": "Bearer token123",
"X-Custom-Header": "value"
}
}
block_resourcesBlock specific resource types.
{"types": ["image", "stylesheet", "font"]}
Types: document, stylesheet, image, media, font, script, xhr, fetch, other
get_page_infoGet comprehensive page information.
{}
Returns: title, url, html (optional), viewport size, etc.
get_frame_textGet text from element inside iframe.
{
"frame_selector": "iframe#content",
"selector": "h1"
}
click_in_frameClick element inside iframe.
{
"frame_selector": "iframe#content",
"selector": "button"
}
new_pageOpen a new page/tab.
{"url": "https://example.com"}
close_pageClose a specific page.
{"index": 1}
switch_pageSwitch to a different page.
{"index": 0}
list_pagesList all open pages.
{}
set_viewportSet viewport size.
{"width": 1920, "height": 1080}
emulate_deviceEmulate mobile device.
{"device": "iPhone 12"}
Common devices: iPhone 12, iPad Pro, Galaxy S21, Pixel 5
set_geolocationSet geolocation.
{
"latitude": 37.7749,
"longitude": -122.4194,
"accuracy": 100
}
set_user_agentSet custom user agent.
{"user_agent": "Mozilla/5.0..."}
drag_and_dropDrag element and drop on target.
{
"source": ".draggable",
"target": ".drop-zone"
}
fill_formFill multiple form fields at once.
{
"fields": {
"input[name='email']": "user@example.com",
"input[name='password']": "secret123",
"select[name='country']": "US"
}
}
extract_tableExtract data from HTML table.
{
"selector": "table.data",
"headers": true
}
extract_linksExtract all links from page.
{
"selector": "a",
"filter": "^https://example\\.com"
}
handle_dialogSet how to handle JavaScript dialogs (alert/confirm/prompt).
{
"action": "accept",
"text": "Optional prompt response"
}
Actions: accept, dismiss
python main.py get_multiple '{
"url": "https://news.ycombinator.com",
"extractions": [
{"name": "titles", "selector": ".titleline > a", "type": "text", "all": true},
{"name": "links", "selector": ".titleline > a", "type": "attribute", "attribute": "href", "all": true}
]
}'
python main.py fill_form '{
"url": "https://example.com/contact",
"fields": {
"input[name='name']": "John Doe",
"input[name='email']": "john@example.com",
"textarea[name='message']": "Hello!"
}
}'
python main.py screenshot '{
"url": "https://example.com",
"selector": ".hero-section",
"path": "hero.png",
"full_page": false
}'
python main.py pdf '{
"url": "https://example.com/report",
"path": "report.pdf",
"format": "A4",
"margin": {"top": "2cm", "bottom": "2cm"}
}'
To use this skill from OpenClaw, the agent can automatically invoke these actions. Examples:
User: "Take a screenshot of example.com"
Agent: Executes screenshot action with the URL
User: "What's the title of wikipedia.org?"
Agent: Navigates to Wikipedia and extracts text from the title element
User: "Search for 'Python' on Google and get the first result link"
Agent: Navigates to Google, types in search, clicks search, extracts first result
Connection fails:
BROWSERLESS_WS URL is correctTimeout errors:
wait_for_selector before interacting with dynamic contentwait_until: "networkidle" for AJAX-heavy sitesElement not found:
wait_for_selector