Open-source Python library for AI browser agents, plus Browser Use Cloud: stealth browsers and a hosted agent API.
Python ai-agentsai-toolsbrowser-agentbrowser-automationbrowser-usecdpcloud-browsercomputer-useheadless-browserllmmcpplaywrightpythonremote-browserstealth-browserweb-automationweb-scraping
Update import paths for Playwright types in custom functions
Cursor Agentfcfd80bbca8a
diff --git a/docs/customize/custom-functions.mdx b/docs/customize/custom-functions.mdxindex 74ffd4d90..33abbb483 100644--- a/docs/customize/custom-functions.mdx+++ b/docs/customize/custom-functions.mdx@@ -116,7 +116,7 @@ For example, actions that need to run playwright code to interact with the brows#### Example: Action uses the current `page````python-from playwright.async_api import Page+from browser_use.browser.types import Pagefrom browser_use import Controller, ActionResultcontroller = Controller()diff --git a/examples/custom-functions/drag_and_drop.py b/examples/custom-functions/drag_and_drop.pyindex a8a6a588b..85c4cc518 100644--- a/examples/custom-functions/drag_and_drop.py+++ b/examples/custom-functions/drag_and_drop.py@@ -9,10 +9,10 @@ making it useful for canvas drawing, sortable lists, sliders, file uploads, andimport asynciofrom typing import cast-from playwright.async_api import ElementHandle, Pagefrom pydantic import BaseModel, Fieldfrom browser_use import ActionResult, Agent, Controller+from browser_use.browser.types import ElementHandle, Pagefrom browser_use.llm import ChatOpenAI