Commit Graph

522 Commits

Author SHA1 Message Date
mertunsall
4e88b221b6 Fix exception handling for text input in DOM elements by raising BrowserError within the try-except block, ensuring proper error reporting. 2025-06-22 17:16:28 +02:00
mertunsall
f896fe40c6 Prioritize click and enter text for input text 2025-06-22 15:35:50 +02:00
Nick Sweeting
e6dd2ae475 error handling during browser launch 2025-06-21 08:05:41 -07:00
Nick Sweeting
959e0b2911 make browser launch timeout set using playwright kwarg 2025-06-21 07:14:48 -07:00
Nick Sweeting
6d84267a1f fix for indexerrors during browser launches 2025-06-21 07:05:03 -07:00
Nick Sweeting
f878b8f07c type hint fixes 2025-06-21 05:16:02 -07:00
Nick Sweeting
e3c145377b fix window resizing 2025-06-21 04:35:31 -07:00
Nick Sweeting
b67be37490 fix type hint errors 2025-06-21 04:35:24 -07:00
Nick Sweeting
3cf9f3410c fix config issues 2025-06-21 04:03:58 -07:00
Nick Sweeting
7eca549919 warn if using deterministic rendering 2025-06-21 03:14:46 -07:00
Nick Sweeting
49e9fd4ff2 move env var config to utils file 2025-06-21 03:14:46 -07:00
Nick Sweeting
095f8a72cf Revert "Fix cross-origin iframe DOM retrieval" 2025-06-21 05:48:11 -04:00
Nick Sweeting
d8c6876e08 tweak BrowserSession failure message details 2025-06-21 01:03:09 -07:00
Magnus Müller
4c2952d640 Squashed commit of the following:
commit a9cf53a1b1
Merge: 5aa62c11 0f9ffa10
Author: Magnus Müller <67061560+MagMueller@users.noreply.github.com>
Date:   Fri Jun 20 10:41:19 2025 +0200

    Set user_data_dir to None (#2015)

    <!-- This is an auto-generated description by cubic. -->
    Changed browser session setup to use incognito mode by setting
    user_data_dir to None, preventing persistent state between evaluation
    runs.

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

commit 0f9ffa1072
Author: Magnus Müller <67061560+MagMueller@users.noreply.github.com>
Date:   Fri Jun 20 10:38:01 2025 +0200

    Set user_data_dir to None

commit 5aa62c1113
Merge: d8a9d21b e559ff5e
Author: Nick Sweeting <git@sweeting.me>
Date:   Thu Jun 19 23:01:49 2025 -0700

    Fix cross-origin iframe DOM retrieval (#1965)

commit d8a9d21b00
Merge: 3e5f3049 b6be1583
Author: Nick Sweeting <git@sweeting.me>
Date:   Thu Jun 19 23:01:21 2025 -0700

    Fix critical domain restriction bypass vulnerability (#2006)

commit b6be158319
Author: Sahar <saharhashai@gmail.com>
Date:   Thu Jun 19 02:28:34 2025 -0700

    Delete tests/ci/test_security_url_validation.py

commit aca4b57329
Author: Sahar <saharhashai@gmail.com>
Date:   Thu Jun 19 02:27:57 2025 -0700

    Delete SECURITY_FIX_REPORT.md

commit 45872c1e45
Author: Your Name <your.email@example.com>
Date:   Thu Jun 19 11:24:50 2025 +0200

    fix(security): prevent domain restriction bypass in controller actions

    - Add domain validation to controller.click() and controller.type() methods
    - Implement comprehensive security checks before executing actions
    - Prevent potential prompt injection and unauthorized data access
    - Add extensive test coverage for domain validation scenarios
    - Update documentation with security considerations

    This critical fix prevents complete bypass of domain restrictions that
    could enable attackers to perform unauthorized actions on any domain.

commit e559ff5eaa
Merge: 19ae8a11 f348e0c5
Author: Nick Sweeting <git@sweeting.me>
Date:   Sat Jun 14 01:56:09 2025 -0700

    Merge branch 'main' into main

commit 19ae8a1146
Merge: e1b3ff9e 08ed0be3
Author: Nick Sweeting <git@sweeting.me>
Date:   Sat Jun 14 00:31:30 2025 -0700

    Merge branch 'main' into main

commit e1b3ff9e9d
Author: Ilya Biryukov <ilbiryuk@microsoft.com>
Date:   Thu Jun 12 17:40:40 2025 -0700

    Revert changes to  examples/features/multiple_agents_same_browser.py

commit d20a3b55d6
Author: Ilya Biryukov <ilbiryuk@microsoft.com>
Date:   Thu Jun 12 17:30:59 2025 -0700

    Fix pre-commit lint issues and compile error in multiple_agents_same_browser

commit 13d5468aa2
Author: Ilya Biryukov <ilbiryuk@microsoft.com>
Date:   Thu Jun 12 14:07:21 2025 -0700

    Fix cross-origin iframe DOM retrieval
2025-06-20 10:51:06 +02:00
Nick Sweeting
36c88b760c Consolidate sync related code (#2009) 2025-06-19 07:41:28 -07:00
Nick Sweeting
17f83b205e tweak screenshots to timeout after 10s and full_page=False 2025-06-19 07:20:45 -07:00
Nick Sweeting
f463a9383c init and config fixes 2025-06-19 07:20:43 -07:00
Nick Sweeting
09a8ee52b5 linter fixes 2025-06-18 21:49:23 -07:00
Yasith Jayawardana
e2e11966d3 Merge branch 'main' into typing-improvements 2025-06-18 21:20:47 -04:00
yasithdev
8ea4b4c71a centralize playwright/patchwright imports, and update typing/checks to reduce lint errors 2025-06-16 22:57:20 -04:00
Nick Sweeting
552f4d46ed Merge branch 'main' into eventbus 2025-06-16 17:22:17 -07:00
Nick Sweeting
b141958455 Merge branch 'main' into hot-fix/file-upload 2025-06-16 11:25:17 -07:00
Nick Sweeting
f8ffb01dd6 never bring_to_front 2025-06-14 15:45:01 -07:00
Nick Sweeting
d728148200 tweak logger emoji 2025-06-14 01:28:47 -07:00
Nick Sweeting
66fbb8b282 Merge branch 'main' into eventbus 2025-06-14 01:19:15 -07:00
Nick Sweeting
fdf4fd6b9c Update browser_use/browser/profile.py
Co-authored-by: cubic-dev-ai[bot] <191113872+cubic-dev-ai[bot]@users.noreply.github.com>
2025-06-13 20:33:17 -04:00
Nick Sweeting
170dfa9813 fallback to xpath selector when css selector is empty for action 2025-06-13 17:05:32 -07:00
Nick Sweeting
738e17de10 make sure all BrowserProfile values are serializable objects when passing to playwright instead of our internal types 2025-06-13 17:05:16 -07:00
Nick Sweeting
66e4e3b48a only load or save cookies if there are any 2025-06-13 17:04:53 -07:00
Nick Sweeting
ac0948e106 move prepare_user_data_dir to BrowserSession class 2025-06-13 17:04:40 -07:00
Nick Sweeting
46cfa54c0d setup better aliases for old config keys 2025-06-13 17:03:31 -07:00
Nick Sweeting
6b622984ec only close about:blank tabs in the BrowserSession for a specific agent, max out at 1 2025-06-13 17:01:40 -07:00
Nick Sweeting
582c039c15 make save_context and other file operations async, setup traces and other dirs on startup 2025-06-12 18:38:12 -07:00
Nick Sweeting
688b4768e2 make wait_for_load_state and network errors into AgentState entries instead of hard exceptions 2025-06-12 18:36:09 -07:00
Nick Sweeting
946f6ca84d handle case where page is unbound 2025-06-11 01:46:41 -07:00
Nick Sweeting
65b0ed6a4e define loadstate for .navigate 2025-06-11 01:46:41 -07:00
Nick Sweeting
97e5d002fe Update browser_use/browser/session.py
Co-authored-by: cubic-dev-ai[bot] <191113872+cubic-dev-ai[bot]@users.noreply.github.com>
2025-06-11 02:28:04 -04:00
Nick Sweeting
1d2646ee08 fix time_execution_async instead of sync 2025-06-10 23:07:19 -07:00
Nick Sweeting
b4d9e1d9e2 make sure get_state_summary always has an initialized browser_context 2025-06-10 07:18:30 -07:00
Nick Sweeting
fdaafa8afc click by x,y coordinate fallback when main method fails 2025-06-10 06:41:39 -07:00
Nick Sweeting
c16990f46f dont show dvd animation during evals 2025-06-10 06:31:40 -07:00
Nick Sweeting
8daaaf665c auto-refresh state when desired element idx is not found 2025-06-10 06:17:52 -07:00
Nick Sweeting
79ca05f534 fix unawaited grant_permissions 2025-06-10 05:54:31 -07:00
Nick Sweeting
758e21880a fix awaiting sync methods in viewport setup 2025-06-10 05:49:44 -07:00
Nick Sweeting
6f23c06589 show explicit error when add_init_script failes due to bad browser handle 2025-06-10 05:37:29 -07:00
Nick Sweeting
01ca602b4c retry playwright connection when new_tab fails 2025-06-10 04:45:00 -07:00
Nick Sweeting
29a715bc82 hide unneeded log lines 2025-06-10 04:42:37 -07:00
Nick Sweeting
e143d079af stop playwright node subprocess when session.kill is called 2025-06-10 03:32:52 -07:00
Nick Sweeting
5d7df84d29 recreate playwright instance if detected from another asyncio loop 2025-06-10 03:02:58 -07:00
Nick Sweeting
058c262902 add warning about being in a different eventloop than playwright handle 2025-06-10 02:45:20 -07:00