๐ 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โ
| Command | Function | Example |
|---|---|---|
navigate | Navigate to URL | navigate url="https://example.com" |
click | Click a page element | click selector="#submit-btn" |
type | Type into an input | type selector="#search" text="YingClaw" |
snapshot | Get page accessibility snapshot | snapshot |
screenshot | Capture a screenshot | screenshot filename="result.png" |
Use Casesโ
| Scenario | Description |
|---|---|
| ๐ Web scraping | Auto-extract page content, tables, lists |
| ๐งช Automated testing | Simulate user workflows, verify page functionality |
| ๐ Form filling | Auto-fill and submit online forms |
| ๐ Login flows | Handle authentication-required website operations |
| ๐ Data monitoring | Periodically 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โ
| Note | Description |
|---|---|
| โฑ๏ธ Network timeout | Default 30 seconds for page load; increase for complex pages |
| ๐ Login state | Browser context persists during the session, maintaining login state |
| ๐งฉ CAPTCHAs | Image CAPTCHA auto-handling is limited; manual intervention may be needed |
| ๐ฆ Resource loading | Images and videos are not loaded by default in headless mode for speed |
| ๐ Security limits | Some sites may detect and block headless browsers |
Best Practicesโ
- Snapshot before action: Get page snapshot to confirm element selectors before interacting
- Add waits: Wait for elements to be ready on dynamically-loaded pages
- Error retry: Auto-retry failed navigation on unstable networks
- 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.