π¦ ClawHub
Browser Automation Core
by @stefanferreira
Core browser automation library for OpenClaw agents. Provides reusable navigation, interaction, and capture capabilities for both Facet (Onshape learning) an...
π‘ Examples
Installation
# Install from ClawHub (when published)
npx clawhub@latest install browser-automation-coreOr use local development version
cp -r /path/to/skill /root/.openclaw/workspace/skills/
Basic Usage
# Example: Navigate and take screenshot
from browser_core import BrowserAutomationbrowser = BrowserAutomation()
browser.navigate("https://example.com")
browser.take_screenshot("example.png")
browser.close()
Agent-Specific Examples
#### For Facet (Onshape Learning)
from browser_core import BrowserAutomation
from facets_onshape import OnshapeAutomationbrowser = BrowserAutomation()
onshape = OnshapeAutomation(browser)
Login to Onshape
onshape.login(email="facet.ai.oc@gmail.com", password="***")Navigate to tutorials
onshape.navigate_to_tutorial("getting-started")Complete tutorial steps
onshape.complete_tutorial_step(1)
onshape.take_progress_screenshot()
#### For Ace (Competition Entry)
from browser_core import BrowserAutomation
from ace_competition import CompetitionAutomationbrowser = BrowserAutomation()
competition = CompetitionAutomation(browser)
Navigate to competition
competition.navigate_to_competition("https://competition.example.com")Fill entry form
entry_data = {
"name": "Stef Ferreira",
"email": "ace@supplystoreafrica.com",
"phone": "+27726386189"
}
competition.fill_entry_form(entry_data)Submit and capture proof
competition.submit_entry()
competition.capture_submission_proof()
βοΈ Configuration
Environment Variables
# Browser settings
export BROWSER_HEADLESS="true" # Run without display
export BROWSER_TIMEOUT="30" # Default timeout seconds
export BROWSER_VIEWPORT="1280,720" # Window size
export BROWSER_USER_AGENT="OpenClaw Agent" # Custom user agentCDP settings (OpenClaw browser)
export CDP_URL="http://localhost:18800/json"
export CDP_WEBSOCKET="ws://localhost:18800/devtools/page/..."Storage settings
export SCREENSHOT_DIR="/path/to/screenshots"
export SESSION_DIR="/path/to/sessions"
OpenClaw Integration
{
"skills": {
"browser-automation-core": {
"enabled": true,
"config": {
"cdpUrl": "http://localhost:18800/json",
"headless": true,
"timeout": 30,
"screenshotDir": "/root/.openclaw/workspace/screenshots"
}
}
}
}
TERMINAL
clawhub install browser-automation-core