Skip to main content
This page is for browser-use 0.x. Current docs: Introduction. Upgrading: Migrating to 1.0. To stay on 0.x, pin it: pip install 'browser-use<1'.
The Actor API (Page, Element, Mouse) is removed in browser-use 1.0: the agent drives the page with Python and raw CDP itself. For scripted steps in 1.0, use Playwright on the agent’s browser: Combine with Playwright.

Core Architecture

Core Classes

  • Browser (alias: BrowserSession): Main session manager
  • Page: Represents a browser tab/iframe
  • Element: Individual DOM element operations
  • Mouse: Coordinate-based mouse operations

Basic Usage

Important Notes

  • Not Playwright: Actor is built on CDP, not Playwright. The API resembles Playwright as much as possible for easy migration, but is a subset.
  • Immediate Returns: get_elements_by_css_selector() doesn’t wait for visibility
  • Manual Timing: You handle navigation timing and waiting
  • JavaScript Format: evaluate() requires arrow function format: () => {}