Skip to content

Browser Automation

32 native browser tools for web automation, scraping, and testing

Astonish includes 32 native browser automation tools powered by Rod (Chrome DevTools Protocol). No external dependencies required — the browser is managed automatically.

Key features:

  • Stealth anti-detection mode
  • Persistent browser profiles
  • Device emulation (mobile, tablet, desktop)
  • Incognito tabs
  • Screenshot compression
  • Accessibility tree snapshots with element ref IDs
  • Human-in-the-loop handoff for CAPTCHAs and MFA

Configure the browser through Studio Settings > Browser, or use the interactive CLI:

Terminal window
astonish config browser

This lets you choose between the default engine, CloakBrowser, or a custom configuration.

For manual configuration, edit config.yaml under the browser: section:

browser:
headless: false # Run headless (default: false)
viewport_width: 1280 # Viewport width in pixels
viewport_height: 720 # Viewport height in pixels
chrome_path: "" # Custom Chromium binary (empty = auto-download)
user_data_dir: "" # Persistent profile directory
navigation_timeout: 30s # Page load timeout
proxy: "" # HTTP/SOCKS proxy URL
remote_cdp_url: "" # Connect to external/anti-detect browsers
fingerprint_seed: "" # CloakBrowser fingerprint seed
fingerprint_platform: "" # CloakBrowser fingerprint platform

For the full list of browser configuration options, see the Config File Reference.

ToolDescriptionParameters
browser_navigateNavigate to a URLurl
browser_navigate_backGo back in browser history
ToolDescriptionParameters
browser_clickClick an element by refref, button, doubleClick
browser_typeType text into an input fieldref, text, submit, slowly
browser_hoverHover over an elementref
browser_dragDrag and drop between elementsstartRef, endRef
browser_press_keyPress a keyboard keykey
browser_select_optionSelect from a dropdownref, values
browser_fill_formFill multiple form fields at oncefields (array of {ref, value})
browser_file_uploadUpload files to a file inputref, paths
browser_handle_dialogHandle JS alerts, confirms, and promptsaccept, promptText, timeout_ms
ToolDescriptionParameters
browser_snapshotAccessibility tree snapshot with ref IDs for interaction. The primary tool for understanding page content.mode (full or efficient), interactive, compact, maxDepth, selector, frame, maxChars
browser_take_screenshotCapture a visual screenshotfullPage, ref, selector, format
browser_console_messagesRead browser console logslevel, clear
browser_network_requestsView network activityurlFilter, clear
ToolDescriptionParameters
browser_tabsList, open, close, or select tabsaction, url, targetId, incognito
browser_closeClose the current page/tab
browser_resizeResize the viewportwidth, height
browser_wait_forWait for a condition: text, selector, URL, page state, or JS expressiontext, textGone, selector, url, timeout, state, expression
ToolDescriptionParameters
browser_evaluateRun a JavaScript expressionexpression, ref
browser_run_codeRun multi-line JS with async/await supportcode
browser_pdfSave the current page as a PDFpath
browser_response_bodyIntercept HTTP response bodiesaction, urlPattern, timeout, maxChars

browser_response_body follows a listen-trigger-read-stop workflow:

  1. Call with action: "listen" and a urlPattern to start intercepting.
  2. Trigger the request (e.g., click a button or navigate).
  3. Call with action: "read" to retrieve the response body.
  4. Call with action: "stop" to clean up.
ToolDescriptionParameters
browser_cookiesGet, set, or clear cookiesaction, name, value, url, domain, etc.
browser_storageRead/write localStorage or sessionStorageaction, kind, key, value
browser_set_offlineSimulate offline modeoffline
browser_set_headersAdd extra HTTP headers to all requestsheaders
browser_set_credentialsSet HTTP Basic Auth credentialsusername, password
browser_set_geolocationOverride browser geolocationlatitude, longitude, accuracy
browser_set_mediaSet preferred color schemecolorScheme
browser_set_timezoneOverride the browser timezonetimezone
browser_set_localeOverride the browser localelocale
browser_set_deviceEmulate a mobile or tablet devicedevice, landscape

browser_set_device supports common devices including iPhone, iPad, Pixel, and Galaxy models.

ToolDescriptionParameters
browser_request_humanStart a browser handoff for CAPTCHAs, MFA, or payment forms. Returns CDP connection instructions for the user.reason, timeout_seconds
browser_handoff_completeWait for the user to finish the handofftimeout_seconds

A typical browser automation session follows this pattern:

  1. Navigate to a page with browser_navigate.
  2. Understand the page with browser_snapshot — this returns an accessibility tree with ref IDs.
  3. Interact with elements using the ref IDs from the snapshot (click, type, select, etc.).
  4. Extract data from the page or take screenshots with browser_take_screenshot.
  5. Hand off to a human for CAPTCHAs or MFA via browser_request_human, then wait with browser_handoff_complete.