Commit Graph

8766 Commits

Author SHA1 Message Date
Saurav Panda 719d0361e5 Fix reconnection wait timeout to cover full auto-reconnect window
The circuit breaker and agent error handler were using a hardcoded 20s
timeout, but the worst-case auto-reconnect window is ~48s (3 attempts *
15s + 7s delays). Handlers would raise ConnectionError while reconnection
was still in progress. Now both use BrowserSession.RECONNECT_WAIT_TIMEOUT
(54s) derived from the actual reconnect parameters.
2026-02-23 17:47:52 -08:00
Saurav Panda 032f1475cb Merge branch 'main' into websocket-connection-issues 2026-02-23 17:44:17 -08:00
Saurav Panda 6959198fb2 fix radio button click occlusion when label overlaps input (#4157)
<!-- This is an auto-generated description by cubic. -->
## Summary by cubic
Fixes radio button clicks when a label overlaps the input by updating
the occlusion check to recognize label↔input associations. Adds
CI-friendly deterministic tests for sibling, wrapped, custom-styled
radios, and group switching; removes the flaky HTML fixture and the old
agent-based test. Addresses the radio button interaction issue noted in
Linear.

- **Bug Fixes**
- Treat label-input associations as clickable in the occlusion check:
label[for]→input, label wrapping input, and label↔input hit cases.
- Ensure clicks work when labels occlude inputs, including
CSS-customized radios; tests now use Tools.click with CDP assertions,
cover group switching, and drop the flaky HTML fixture.

<sup>Written for commit de8039288d.
Summary will update on new commits.</sup>

<!-- End of auto-generated description by cubic. -->
2026-02-23 17:40:26 -08:00
Aitor c0528bec2d Merge branch 'main' into feat/add-captcha-solver-handling 2026-02-24 02:19:25 +01:00
Saurav Panda ea23b45daa Merge branch 'main' into websocket-connection-issues 2026-02-23 17:14:57 -08:00
Saurav Panda de8039288d Merge branch 'main' into browser-use-radio-button-interaction-issue 2026-02-23 16:55:36 -08:00
Saurav Panda abd0326a6f Add WebSocket reconnection for remote browser CDP connections 2026-02-23 16:34:21 -08:00
Saurav Panda 84babc6b75 fix radio button click occlusion when label overlaps input 2026-02-23 16:19:05 -08:00
Saurav Panda 4cfc1d2802 updated _navigate_and_wait (#4146)
<!-- This is an auto-generated description by cubic. -->
## Summary by cubic
Make navigation resilient on slow or heavy pages and redirect chains.
Respects wait_until, adds a 20s guard on Page.navigate to prevent hangs,
and bumps NavigateToUrlEvent timeout to 30s.

- **Bug Fixes**
- _navigate_and_wait accepts wait_until ('commit', 'domcontentloaded',
'load', 'networkidle') and returns on that signal.
- Wrapped Page.navigate with a 20s timeout; raises RuntimeError on
timeout.
  - Increased NavigateToUrlEvent default timeout from 15s to 30s.
- Added CI tests for slow servers, redirect chains, DOMContentLoaded
acceptance, recovery after slow nav, and timeout correctness.

- **Dependencies**
  - Set pre-commit default Python to 3.11.
  - Lint workflow pins Python 3.11 and syncs with --python 3.11.

<sup>Written for commit 6c984ad02b.
Summary will update on new commits.</sup>

<!-- End of auto-generated description by cubic. -->
2026-02-23 16:08:47 -08:00
Saurav Panda 6c984ad02b install python version in lint.yml 2026-02-23 16:05:06 -08:00
Saurav Panda 3d174998e4 Merge branch 'main' into navigation-issues 2026-02-23 15:43:23 -08:00
Saurav Panda e50588f3c7 fixed styling issues 2026-02-23 15:24:40 -08:00
reformedot 45e9a6cea3 chore: linting 2026-02-23 11:03:14 -08:00
reformedot bbad1548d7 Merge branch 'feat/add-captcha-solver-handling' of github.com:browser-use/browser-use into feat/add-captcha-solver-handling 2026-02-23 10:57:56 -08:00
reformedot b4058359a9 refactor: enhance CaptchaWatchdog with typed event handling and result types
- Introduced type aliases for captcha results to improve clarity and maintainability.
- Updated event handler signatures to use specific event types from the CDP module.
- Ensured consistent typing for captcha result attributes within the CaptchaWaitResult class.
- Added assertion for timeout handling in the captcha waiting logic.
2026-02-23 10:57:48 -08:00
Aitor 973b6c5c4b Merge branch 'main' into feat/add-captcha-solver-handling 2026-02-23 19:51:48 +01:00
reformedot ed28e50806 feat: added automatic captcha solver handling via CAPTCHA watchdog 2026-02-23 10:51:02 -08:00
Saurav Panda 774e83843e updated laminar version (#4154)
<!-- This is an auto-generated description by cubic. -->
## Summary by cubic
Upgraded Laminar (lmnr) to 0.7.42 in eval and dev environments to pick
up recent fixes and improvements. This keeps our tooling and evaluation
stack aligned on the same version.

- **Dependencies**
- pyproject.toml: bump lmnr[all] from 0.7.17 to 0.7.42 in eval and
dev-dependencies.

<sup>Written for commit e3d63c0e13.
Summary will update on new commits.</sup>

<!-- End of auto-generated description by cubic. -->
2026-02-23 10:38:59 -08:00
Saurav Panda e3d63c0e13 updated laminar version 2026-02-23 10:28:55 -08:00
Magnus Müller 1d154e11f9 Add legal links to telemetry docs and PyPI metadata (#4147)
## Summary
- update telemetry runtime log message to the canonical monitoring
telemetry docs URL
- add Terms of Service and Privacy Policy links on the telemetry docs
page
- expose Homepage, Documentation, Telemetry, Terms of Service, and
Privacy Policy under `project.urls` for PyPI
- add a short legal-links notice in the README (used as PyPI long
description)

## Why
- make telemetry/legal references easier to find from logs, docs, and
PyPI
- align package-facing surfaces with legal-link guidance from counsel

## Testing
- pre-commit hooks pass on commit

<!-- This is an auto-generated description by cubic. -->
---
## Summary by cubic
Add ToS/Privacy links to the telemetry docs and simplify the README
legal FAQ to a generic services data policy; update the telemetry
startup log to the canonical monitoring docs URL.
Expose Homepage, Docs, Telemetry, ToS, and Privacy links in PyPI
project.urls and bump version to 0.11.12.

<sup>Written for commit afd17cf318.
Summary will update on new commits.</sup>

<!-- End of auto-generated description by cubic. -->

<!-- CURSOR_SUMMARY -->
---

> [!NOTE]
> **Low Risk**
> Documentation/metadata-only changes plus a log-message URL update; no
runtime behavior or data handling changes.
> 
> **Overview**
> Updates public-facing references for telemetry and legal policies. The
telemetry startup log now points to the canonical docs URL, the
telemetry docs add a **Legal** section linking Terms of Service and
Privacy Policy, and the README FAQ adds a ToS blurb for the hosted
services.
> 
> Also bumps the package version to `0.11.12` and expands
`pyproject.toml` `project.urls` (Homepage/Docs/Telemetry/ToS/Privacy) so
these links show up in PyPI metadata.
> 
> <sup>Written by [Cursor
Bugbot](https://cursor.com/dashboard?tab=bugbot) for commit
cf1b003ba0. This will update automatically
on new commits. Configure
[here](https://cursor.com/dashboard?tab=bugbot).</sup>
<!-- /CURSOR_SUMMARY -->
0.11.12
2026-02-22 20:35:23 -08:00
Magnus Müller cf1b003ba0 Update summary for legal terms section in README 2026-02-22 20:34:05 -08:00
Magnus Müller afd17cf318 Simplify FAQ legal wording to generic services data policy 2026-02-22 20:30:57 -08:00
Magnus Müller cc03bb647e Move legal note into FAQ and remove footer text 2026-02-22 20:28:48 -08:00
Magnus Müller a052cb46db Move README legal note to footer and bump version 2026-02-22 20:26:33 -08:00
Magnus Müller de0215c0df Add legal links to telemetry docs and package metadata 2026-02-22 20:08:09 -08:00
Saurav Panda 6713afc636 updated _navigate_and_wait 2026-02-21 19:45:54 -08:00
Saurav Panda 3d7c71f4a6 remove simple judge (#4144)
<!-- This is an auto-generated description by cubic. -->
## Summary by cubic
Removed the lightweight “simple judge” that auto-validated agent success
to simplify the flow and reduce LLM calls. The agent now relies only on
the full judge when enabled, with no automatic success overrides.

- **Refactors**
- Removed construct_simple_judge_messages, SimpleJudgeResult, and
_run_simple_judge.
- Deleted simple judge imports and calls from service (including
take_step/_execute_step); full judge path remains unchanged.
  - Cleaned unused imports and fixed ruff formatting in modified files.

- **Migration**
- Remove any imports/usages of SimpleJudgeResult or simple judge
messages/hooks and use the full judge or custom validation instead.
- Outputs will no longer include “[Simple judge: …]” notes in
extracted_content or metadata.

<sup>Written for commit 2c878aa75c.
Summary will update on new commits.</sup>

<!-- End of auto-generated description by cubic. -->
2026-02-21 09:49:39 -08:00
Saurav Panda 2c878aa75c Merge branch 'main' into remove-simple-judge 2026-02-21 09:46:28 -08:00
Saurav Panda adf3bf9f43 fixed ruff formatting issues 2026-02-21 09:42:20 -08:00
Magnus Müller 1c58c736a3 Browser agent setup (#4139)
Re-add browser initialization and passing to the agent in the README
quickstart example.

---
[Slack
Thread](https://browser-use.slack.com/archives/C08SZRT860M/p1771645267295089?thread_ts=1771645267.295089&cid=C08SZRT860M)

<p><a
href="https://cursor.com/agents?id=bc-bebbe1a3-5ea1-5d52-afc5-aeeeb3df96d4"><picture><source
media="(prefers-color-scheme: dark)"
srcset="https://cursor.com/assets/images/open-in-web-dark.png"><source
media="(prefers-color-scheme: light)"
srcset="https://cursor.com/assets/images/open-in-web-light.png"><img
alt="Open in Web" width="114" height="28"
src="https://cursor.com/assets/images/open-in-web-dark.png"></picture></a>&nbsp;<a
href="https://cursor.com/background-agent?bcId=bc-bebbe1a3-5ea1-5d52-afc5-aeeeb3df96d4"><picture><source
media="(prefers-color-scheme: dark)"
srcset="https://cursor.com/assets/images/open-in-cursor-dark.png"><source
media="(prefers-color-scheme: light)"
srcset="https://cursor.com/assets/images/open-in-cursor-light.png"><img
alt="Open in Cursor" width="131" height="28"
src="https://cursor.com/assets/images/open-in-cursor-dark.png"></picture></a>&nbsp;</p>

<!-- This is an auto-generated description by cubic. -->
---
## Summary by cubic
Re-adds Browser initialization in the README quickstart and passes it to
Agent so the example runs correctly. Simplifies setup to a single
commented use_cloud option for Browser Use Cloud.

<sup>Written for commit db44fba80e.
Summary will update on new commits.</sup>

<!-- End of auto-generated description by cubic. -->
2026-02-21 00:36:43 -08:00
Cursor Agent db44fba80e Simplify Browser init to single commented use_cloud option
Co-authored-by: Magnus Müller <MagMueller@users.noreply.github.com>
2026-02-21 08:33:20 +00:00
Cursor Agent caf50d2f34 Add Browser initialization to README quickstart example
Co-authored-by: Magnus Müller <MagMueller@users.noreply.github.com>
2026-02-21 04:10:23 +00:00
Magnus Müller 2571d0e9a3 Anthropic model configuration (#4138)
Simplify README Human Quickstart, update model names, and reorder
sections for clarity and correctness.

The `anthropic` LLM provider is a core dependency, making `pip install
browser-use[anthropic]` unnecessary. This PR corrects the installation
instructions and updates the Claude Sonnet model to `claude-sonnet-4-6`
based on the latest available version. Additionally, the quickstart
steps are streamlined, and the Template Quickstart and CLI sections are
moved for improved readability.

---
[Slack
Thread](https://browser-use.slack.com/archives/C08SZRT860M/p1771645267295089?thread_ts=1771645267.295089&cid=C08SZRT860M)

<p><a
href="https://cursor.com/agents?id=bc-0eeb2adf-bf22-5c98-aacf-325e96d91f05"><picture><source
media="(prefers-color-scheme: dark)"
srcset="https://cursor.com/assets/images/open-in-web-dark.png"><source
media="(prefers-color-scheme: light)"
srcset="https://cursor.com/assets/images/open-in-web-light.png"><img
alt="Open in Web" width="114" height="28"
src="https://cursor.com/assets/images/open-in-web-dark.png"></picture></a>&nbsp;<a
href="https://cursor.com/background-agent?bcId=bc-0eeb2adf-bf22-5c98-aacf-325e96d91f05"><picture><source
media="(prefers-color-scheme: dark)"
srcset="https://cursor.com/assets/images/open-in-cursor-dark.png"><source
media="(prefers-color-scheme: light)"
srcset="https://cursor.com/assets/images/open-in-cursor-light.png"><img
alt="Open in Cursor" width="131" height="28"
src="https://cursor.com/assets/images/open-in-cursor-dark.png"></picture></a>&nbsp;</p>



<!-- This is an auto-generated description by cubic. -->
---
## Summary by cubic
Streamlined the README Quickstart into three steps, corrected
installation guidance (Anthropic provider is included—no [anthropic]
extra), and updated the Anthropic model to claude-sonnet-4-6. Reordered
sections for clarity, made the cloud API key optional, and simplified
the starter agent example.

<sup>Written for commit 3e3e04a5b5.
Summary will update on new commits.</sup>

<!-- End of auto-generated description by cubic. -->
2026-02-20 20:07:22 -08:00
Cursor Agent 3e3e04a5b5 Simplify README quickstart: 3 steps, optional API key, claude-sonnet-4-6
- Combined environment setup and package install into step 1
- Chromium install moved to comment in step 1
- Made API key step optional with alternative providers as comments
- Updated to claude-sonnet-4-6 (latest Anthropic model)
- Simplified agent code: no Browser wrapper, no history return
- Moved Template Quickstart and CLI sections below Demos
- No pip install extras needed - LLM providers are core dependencies

Co-authored-by: Magnus Müller <MagMueller@users.noreply.github.com>
2026-02-21 03:48:49 +00:00
Magnus Müller 27cba8eac1 Remove 'Deploy on Sandboxes' section from README
Removed the 'Deploy on Sandboxes' section along with example code.
2026-02-20 19:34:32 -08:00
Saurav Panda cb6fce4d1c remove simple judge 2026-02-20 19:10:02 -08:00
laithrw abd1506f4c feat: improve auth/real browser docs + add Browser.from_system_chrome() (#3955)
- auto-detects chrome executable and user data dir on
macos/windows/linux
- auto-selects first available profile if none specified
- added Browser.list_chrome_profiles() to see available profiles
- updated examples to prompt user for profile selection
- fixed missing browser.stop() in save_cookies.py
- overview in docs of auth methods


<!-- This is an auto-generated description by cubic. -->
---
## Summary by cubic
Added Browser.from_system_chrome() to auto-detect Chrome and user data
dirs across macOS, Windows, and Linux for easy real-browser setup. Added
a new Authentication guide (real browser, storage state, TOTP/email/SMS
2FA), refreshed real-browser and parameters docs, updated examples to
prompt for profile selection, and fixed save_cookies.py to stop the
browser after export.

- **New Features**
- Browser.from_system_chrome(): detects Chrome paths; supports
profile_directory; auto-selects the first available profile when none is
provided.
- Browser.list_chrome_profiles(): returns available profiles with
directory and name.

<sup>Written for commit 2249e75fd8.
Summary will update on new commits.</sup>

<!-- End of auto-generated description by cubic. -->
2026-02-20 19:31:20 -05:00
laithrw 2249e75fd8 Merge branch 'main' into improving-real-browser 2026-02-20 19:28:06 -05:00
Larsen Cundrič 43dfc97671 Fix CDP connectivity issues (#4135)
<!-- This is an auto-generated description by cubic. -->
## Summary by cubic
Improved CDP connectivity handling to prevent hangs and flaky behavior
when the WebSocket drops. Adds connection-state checks, safer startup
with timeout and cleanup, and smarter tab recovery.

- **Bug Fixes**
  - Added is_cdp_connected to detect a live CDP WebSocket.
- Wrapped connect() in a 15s timeout during BrowserStartEvent with
cleanup and a clear error on timeout.
- Circuit breaker in watchdog handlers to skip non-lifecycle events when
CDP is disconnected.
- AboutBlankWatchdog skips recovery when CDP is down or shutting down,
and guards about:blank checks.
- Redirected chrome://newtab → about:blank in parallel for faster
stabilization.
  - Reduced TabClosedEvent timeout from 10s to 3s to speed recovery.

<sup>Written for commit c9232a63ed.
Summary will update on new commits.</sup>

<!-- End of auto-generated description by cubic. -->
2026-02-20 12:17:24 -08:00
LarsenCundric c9232a63ed Fix 2026-02-20 12:12:05 -08:00
LarsenCundric c67c31932e Fix 2026-02-20 10:57:00 -08:00
Saurav Panda 2a009f66b8 Update pyproject.toml (#4125)
<!-- This is an auto-generated description by cubic. -->
## Summary by cubic
Update the package version to 0.11.11 in pyproject.toml. This promotes
0.11.10a2 (pre-release) to a stable release for publishing.

<sup>Written for commit 9d927120c1.
Summary will update on new commits.</sup>

<!-- End of auto-generated description by cubic. -->
0.11.11
2026-02-19 18:53:46 -08:00
Saurav Panda 9d927120c1 Update pyproject.toml 2026-02-19 18:51:44 -08:00
Saurav Panda 80fbba8682 new direct cli mode (#4124)
<!-- This is an auto-generated description by cubic. -->
## Summary by cubic
Adds a fast direct CLI mode that reconnects to the browser via CDP per
command, with coordinate-based clicking in CLI and MCP. Includes
HTML/screenshot tools and viewport-aware state for accurate pixel
clicks; supports local or cloud browser via --remote.

- **New Features**
- Direct CLI: lightweight CDP for most commands; full session only for
state/first open; optional --remote for cloud browser.
- Coordinate clicking: MCP browser_click accepts index or
coordinate_x/coordinate_y; CLI click supports <index> or <x> <y>.
- Tools: browser_get_html and browser_screenshot (base64 + viewport);
CLI adds html, eval, keys.
- State: viewport/page/scroll and screenshot_dimensions for precise
pixel-to-coordinate mapping.
- Selector cache: persisted for click-by-index; auto-invalidated on
navigation. Commands: open, state, click, type, input, screenshot,
scroll, back, keys, html, eval, close.
- Tests: click arg parsing, event dispatch, and selector cache
conversion/invalidations.

- **Migration**
- CLI: use click <index> or click <x> <y>; parser now accepts flexible
args.
- MCP: keep index usage or pass coordinate_x and coordinate_y for pixel
clicks.
- Direct CLI: run state once before index-based clicks to warm the
selector cache.

<sup>Written for commit 69d96c1f45.
Summary will update on new commits.</sup>

<!-- End of auto-generated description by cubic. -->
2026-02-19 18:50:02 -08:00
Saurav Panda 69d96c1f45 Merge branch 'main' into cli-add-cordinate-clicking 2026-02-19 18:45:52 -08:00
Saurav Panda 552b2f3b60 fixed ruff format 2026-02-19 18:38:23 -08:00
Saurav Panda 41edfca525 fixed code style issues 2026-02-19 18:17:24 -08:00
Saurav Panda 22fc967cf6 add file attachments to structured output. (#4123)
<!-- This is an auto-generated description by cubic. -->
## Summary by cubic
Adds file attachments to structured output. The done action resolves
files_to_display and auto-attaches BrowserSession downloads, returning
file paths in ActionResult.attachments.

- **New Features**
- StructuredOutputAction supports files_to_display to attach files from
FileSystem (missing files are ignored).
  - Auto-attaches BrowserSession downloaded_files with deduplication.
  - ActionResult now includes an attachments list.
  - JSON schema hides internal fields (success, files_to_display).

- **Migration**
  - Update Tools.done calls to pass file_system and browser_session.
  - Use files_to_display to include specific files.

<sup>Written for commit 86b12491dc.
Summary will update on new commits.</sup>

<!-- End of auto-generated description by cubic. -->
2026-02-19 18:07:06 -08:00
Saurav Panda 240df0a4a5 Merge branch 'main' into cli-add-cordinate-clicking 2026-02-19 16:08:51 -08:00
Saurav Panda 86b12491dc fixed remote urls in tests 2026-02-19 16:04:06 -08:00