Skip to main content

๐ŸŒ Browser Automation

๐Ÿ‘ค Who it's for: Developers / integrators
โฑ๏ธ Read time: ~6 minutes
๐Ÿ’ก In one line: Let YingClaw auto-open pages, click, fill forms, screenshot, and scrape โ€” no GUI needed.

YingClaw has built-in headless browser automation, natively implemented in Rust (with Node.js as fallback), enabling web operations in environments without a graphical interface.

Capabilitiesโ€‹

YingClaw's browser automation supports:

  • ๐Ÿงญ Page Navigation: Open URLs, navigate forward/backward
  • ๐Ÿ–ฑ๏ธ Element Interaction: Click buttons, fill input fields, select dropdowns
  • ๐Ÿ“ธ Screenshots: Capture full-page or specific regions
  • ๐Ÿ“„ Content Extraction: Extract page text, tables, structured data
  • ๐Ÿ” Login Flows: Auto-fill forms, handle authentication

Usage: agent-browser Skillโ€‹

Browser automation is triggered through the agent-browser skill. YingClaw automatically loads it when it detects web-related tasks in conversation.

Key Commandsโ€‹

CommandFunctionExample
navigateNavigate to URLnavigate url="https://example.com"
clickClick a page elementclick selector="#submit-btn"
typeType into an inputtype selector="#search" text="YingClaw"
snapshotGet page accessibility snapshotsnapshot
screenshotCapture a screenshotscreenshot filename="result.png"

Use Casesโ€‹

ScenarioDescription
๐ŸŒ Web scrapingAuto-extract page content, tables, lists
๐Ÿงช Automated testingSimulate user workflows, verify page functionality
๐Ÿ“ Form fillingAuto-fill and submit online forms
๐Ÿ” Login flowsHandle authentication-required website operations
๐Ÿ“Š Data monitoringPeriodically check web page content changes

Examplesโ€‹

Typical Workflowโ€‹

> "Open Baidu, search for YingClaw, and screenshot the results"

YingClaw executes:
1. navigate โ†’ Open Baidu homepage
2. type โ†’ Enter "YingClaw" in the search box
3. click โ†’ Click the search button
4. screenshot โ†’ Capture the results page

Data Extractionโ€‹

> "Extract all product names and prices from the table on this page"

YingClaw executes:
1. navigate โ†’ Open the target page
2. snapshot โ†’ Get page structure
3. Extract table data and return formatted results

Notesโ€‹

NoteDescription
โฑ๏ธ Network timeoutDefault 30 seconds for page load; increase for complex pages
๐Ÿ” Login stateBrowser context persists during the session, maintaining login state
๐Ÿงฉ CAPTCHAsImage CAPTCHA auto-handling is limited; manual intervention may be needed
๐Ÿ“ฆ Resource loadingImages and videos are not loaded by default in headless mode for speed
๐Ÿ”’ Security limitsSome sites may detect and block headless browsers

Best Practicesโ€‹

  1. Snapshot before action: Get page snapshot to confirm element selectors before interacting
  2. Add waits: Wait for elements to be ready on dynamically-loaded pages
  3. Error retry: Auto-retry failed navigation on unstable networks
  4. Session reuse: Login state within the same session persists across pages

Next Stepsโ€‹

Browser automation connects YingClaw to the web. Next, learn about ๐Ÿค– Multi-Agent Orchestration for complex task handling.