- Add nav_timeout parameter to navigate_to_url_and_wait() method
- Pass nav_timeout from NavigateToUrlEvent to control CDP navigation timeout
- Fix issue where TIMEOUT_NavigateToUrlEvent env var only controlled outer timeout but CDP call had hardcoded 20s timeout
- Add comprehensive test case to verify env var controls CDP timeout
- AGI-569: after any click that opens a new tab, automatically dispatch
SwitchTabEvent so the agent lands on the new page immediately instead
of requiring a manual switch step (~877 occurrences)
- AGI-548: for <input type="checkbox/radio">, capture checked state
before the CDP mouse click and verify it toggled afterward; if
unchanged (custom-styled or shadow-DOM-backed inputs), fall back to
JS element.click() and report the final checked state in metadata
(~1,241 occurrences)
- Updated the BrowserSession class to ensure the User-Agent header is set correctly for both local and remote connections.
- Introduced a utility function to retrieve the browser-use version and incorporated it into the User-Agent string.
- Ensured headers are consistently handled as dictionaries to avoid potential issues with None values.
This change improves the reliability of the CDP client communication by providing a proper User-Agent, which can be crucial for certain web interactions.
- Add `browser-use upload <index> <path>` command for uploading files to
file input elements via the CLI
- Extract find_file_input_near_element from nested closures in tools/service.py
to a reusable method on BrowserSession, deduplicating two copies
- Add BrowserWrapper.upload() for the Python REPL
- Resolve file paths to absolute on the client side before sending to daemon
- Update SKILL.md files and README with upload command docs
tempfile is already imported at module level (line 3). The local
imports inside set_default_downloads_path() and _extract_extension()
were shadowing the module-level import with no effect.
Refs: browser-use/browser-use#4242
On Windows, Python resolves '/tmp' to the current drive root (e.g. C:\TMP),
creating unwanted folders. Use tempfile.gettempdir() which returns the
platform-appropriate temp directory on all operating systems.
Applied to:
- browser_use/browser/profile.py: BrowserProfile downloads_path default
- browser_use/code_use/service.py: CodeUseService agent_directory base
Fixes#4165
tempfile is already imported at module level (line 3). The local
imports inside set_default_downloads_path() and _extract_extension()
were shadowing the module-level import with no effect.
Refs: browser-use/browser-use#4242
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.
- 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.