Integration
browse
Browser automation and interaction
browse
Browser automation with headless Chrome/Firefox for testing, scraping, screenshots, and interactive web operations with full JavaScript rendering.
Overview
The browse primitive provides powerful browser automation capabilities including page navigation, form interaction, screenshot capture, and PDF generation with Playwright/Puppeteer integration.
Quick Example
import { browse } from 'sdk.do'
// Navigate and screenshot
const screenshot = await browse.screenshot({
url: 'https://example.com',
selector: '#main-content',
format: 'png',
})
// Interact with page
await browse.interact({
url: 'https://example.com/login',
actions: [
{ type: 'fill', selector: '#email', value: '[email protected]' },
{ type: 'fill', selector: '#password', value: 'secret' },
{ type: 'click', selector: '#login-button' },
{ type: 'waitFor', selector: '.dashboard' },
],
})
// Generate PDF
const pdf = await browse.pdf({
url: 'https://example.com/invoice/123',
options: {
format: 'A4',
printBackground: true,
},
})Core Capabilities
- Headless Browser - Chrome and Firefox automation
- Page Interaction - Click, fill, scroll, navigate
- Screenshot Capture - Full page or element screenshots
- PDF Generation - Convert web pages to PDF
- JavaScript Execution - Run custom scripts in browser
Access Methods
SDK
TypeScript/JavaScript library for browser automation
await browse.screenshot({ url: 'https://example.com', format: 'png' })CLI
Command-line tool for browser operations
do browse screenshot https://example.com --output screenshot.pngAPI
REST/RPC endpoints for browser automation
curl -X POST https://api.do/v1/browse/screenshot -d '{"url":"https://example.com"}'MCP
Model Context Protocol for AI-driven browsing
Take a screenshot of https://example.com and save it