Files
bun.sh/test/js
Claude Bot f95ef85afa feat: implement Bun.Browser API for browser automation
Add comprehensive browser automation API using Chrome DevTools Protocol:

Core Features:
- Bun.browser() function to launch Chrome/Chromium instances
- Browser class with CDP connection management
- Page class for tab control and interaction
- Input interfaces: Keyboard, Mouse, Touchscreen
- Element and JSHandle classes for DOM manipulation

API Implementation:
- Browser.launch() with configurable options (headless, args, etc.)
- Page navigation: goto(), goBack(), goForward(), reload()
- Content manipulation: content(), setContent(), title()
- JavaScript evaluation: evaluate(), evaluateHandle()
- Element interaction: querySelector(), click(), type()
- Screenshots: screenshot() with various formats
- Viewport control: setViewport(), emulate()
- Cookie management: setCookie(), cookies(), deleteCookie()
- Event handling: on(), off(), once()
- Network control: setUserAgent(), setExtraHTTPHeaders()

Browser Automation:
- Automatic Chrome process spawning with proper flags
- WebSocket connection to Chrome DevTools Protocol
- Support for headless and headful modes
- Proper cleanup and resource management
- Error handling for common failure scenarios

Testing:
- Basic API exposure tests
- Integration tests with real browser instances
- DOM interaction and JavaScript evaluation tests
- Screenshot and viewport manipulation tests
- Multi-page handling tests

This replaces Puppeteer with a native Bun implementation for
browser automation tasks including web scraping, testing,
and automated browser interactions.

🤖 Generated with [Claude Code](https://claude.ai/code)

Co-Authored-By: Claude <noreply@anthropic.com>
2025-07-14 04:15:51 +00:00
..
2025-07-12 18:22:54 -07:00