Commit Graph

656 Commits

Author SHA1 Message Date
Nick Sweeting 145dbf6e2b fix type hints 2025-08-04 19:57:13 -07:00
Gregor Žunič cd0938bbdc fixed unsafe css selector problems 2025-08-02 15:12:19 -07:00
Gregor Žunič 7aeb0eb9e8 fixed dom service cache 2025-08-02 12:01:59 -07:00
Gregor Žunič 0aa3d54233 Merge commit '9b882faa10c54be5a870cc5d8abd6ddb19d0682f' into feature/new-dom-extraction-layer 2025-08-02 11:41:28 -07:00
Nick Sweeting cdf941b0e8 lint and test fixes 2025-08-01 03:26:25 -07:00
Nick Sweeting a0e2fac3ca more tests passing 2025-08-01 03:14:06 -07:00
Nick Sweeting 659c5145f6 more event-driven refactoring 2025-08-01 02:42:01 -07:00
Nick Sweeting ebc3a3846f wip cleanup flow] 2025-07-31 22:10:25 -07:00
Nick Sweeting ac0d5cf630 wip 2025-07-31 03:38:07 -07:00
Nick Sweeting 2b12eb6542 wip 2025-07-31 03:31:32 -07:00
Nick Sweeting 0919ab6d49 fixes 2025-07-31 01:35:25 -07:00
Nick Sweeting 183d6b2829 cleanup dead code 2025-07-31 01:25:11 -07:00
Nick Sweeting 83c5fa4393 fixes for small differences with old api 2025-07-30 23:34:54 -07:00
Nick Sweeting 9c30829746 re-raise exceptions from bubus events 2025-07-30 22:03:12 -07:00
Nick Sweeting af92619c7d fix imports and lint 2025-07-30 21:46:34 -07:00
Nick Sweeting ef64212d28 browsersession.start tests passing with new events system 2025-07-30 21:46:02 -07:00
Nick Sweeting e82ccc02f8 add new eventbus layout 2025-07-30 16:57:45 -07:00
Nick Sweeting 0f87d345a7 add new eventbus layout 2025-07-30 16:57:26 -07:00
Nick Sweeting 8182a84b9c wip split up BrowserSession logic into separate models 2025-07-29 23:22:25 -07:00
Nick Sweeting 09b99c8afc tell the LLM when page loading was aborted so it knows to use wait tool 2025-07-29 13:16:46 -07:00
Nick Sweeting 04486b7f97 dont run ANY js on chrome: pages 2025-07-29 11:16:53 -07:00
Nick Sweeting 650a956efb fix retry handling for singletonLock case 2025-07-29 11:16:27 -07:00
Nick Sweeting c2a5071d6d use _owns_browser_resources to determine if remote or local 2025-07-29 10:42:44 -07:00
Nick Sweeting 73dff239f8 a few extra checks for local browser condition 2025-07-29 01:34:31 -07:00
Nick Sweeting 4be7b4e5f6 never relaunch local browser when cdp url is provided 2025-07-29 01:13:55 -07:00
Nick Sweeting 438056287b disable screenshot semaphore for now 2025-07-29 01:00:29 -07:00
Nick Sweeting 2e768bdc7c Merge branch 'main' into never-relaunch 2025-07-25 02:37:35 -07:00
Nick Sweeting 39dfa7f624 always raise a hard error when browser crashes instead of restarting it 2025-07-25 02:34:18 -07:00
Nick Sweeting e1c5572c3a disable trace recording for now 2025-07-25 02:32:36 -07:00
Nick Sweeting c73c87c9f4 fix gif tests 2025-07-25 01:09:03 -07:00
Nick Sweeting 4f7d7a9745 Merge branch 'main' into claude-issue-2497-20250721-0633 2025-07-24 22:38:39 -07:00
Nick Sweeting ccac8a5934 dont show dvd loading animation if document.body is not availble yet 2025-07-24 22:32:21 -07:00
Nick Sweeting c86cd96274 Merge branch 'main' into claude-issue-2497-20250721-0633 2025-07-24 22:20:15 -07:00
Cursor Agent 0778166109 Add PDF viewer detection and handling in browser state summary
Co-authored-by: mailmertunsal <mailmertunsal@gmail.com>
2025-07-24 15:44:19 +00:00
claude[bot] 8a4dc23827 fix: use is_new_tab_page() instead of manual about:blank check
- Replace manual page.url == ''about:blank'' check with is_new_tab_page() function
- This ensures consistent handling of all new tab page variations (about:blank, chrome://new-tab-page, etc.)
- Improves maintainability by centralizing new tab page detection logic

Co-authored-by: Nick Sweeting <pirate@users.noreply.github.com>
2025-07-22 06:57:23 +00:00
claude[bot] ba12148b19 refactor: consolidate PLACEHOLDER_4PX_SCREENSHOT constant
- Move 4px placeholder screenshot constant to browser_use.browser.views
- Update all references to use the single definition
- Fix all lint errors and formatting issues

Co-authored-by: Nick Sweeting <pirate@users.noreply.github.com>
2025-07-21 22:28:01 +00:00
Magnus Müller a63fa12f96 Enhance logging for crashed page recovery in session.py
Updated the logging messages in the require_healthy_browser function to include the current page URL during recovery attempts. This change improves the clarity of debug and warning logs by ensuring the page URL is accurately reported, even when the page is unresponsive.
2025-07-20 23:59:58 +02:00
Magnus Müller 76b57a5586 Merge branch 'main' into feat/speed-improvements-wait 2025-07-20 23:23:50 +02:00
mertunsall ce5bfe6195 lazy imports and bump some versions 2025-07-20 22:58:34 +02:00
Magnus Müller cbf2a783e2 Switch decorators order 2025-07-20 15:50:13 +02:00
Magnus Müller f7bd2c98e9 Run tests again 2025-07-20 15:23:14 +02:00
Magnus Müller 1531907b40 Enhance timeout handling in BrowserSession methods
- Added timeout parameters to scroll_into_view_if_needed, click, type, and fill methods to improve reliability and prevent potential hangs.
- Introduced debug observation for get_dom_element_by_index and _input_text_element_node methods to aid in tracking and debugging.
2025-07-19 20:56:30 +02:00
Magnus Müller f436338207 Adjust timeout settings in BrowserSession for improved performance
- Reduced the retry timeout from 6 seconds to 3 seconds.
- Decreased the page title retrieval timeout from 3 seconds to 2 seconds.
- Enhanced timeout handling logic to prioritize user-defined timeouts while ensuring a minimum of 3000ms.
2025-07-19 20:32:59 +02:00
Magnus Müller b24f111f7e Remove _wait_for_page_and_frames_load 2025-07-19 02:08:25 +02:00
Magnus Müller f347c8b472 Refactor DOM stability check in BrowserSession to use element count for stability verification, reducing max wait time and improving reliability of checks. 2025-07-19 01:49:45 +02:00
Magnus Müller b7b05d12a1 Better waiting 2025-07-19 01:28:24 +02:00
Magnus Müller 28c80a595a Improve error handling during browser setup by checking for exceptions in parallel task results and providing clearer error messages. 2025-07-19 01:14:28 +02:00
Magnus Müller 5f77942f3e Enhance debugging by adding observe_debug decorators to _click_element_node and get_locate_element methods 2025-07-19 00:10:11 +02:00
Magnus Müller c153a9bed8 Better error message for llm 2025-07-18 23:42:37 +02:00
Magnus Müller c688056d37 Wait before get state so that we can check require_healthy_browser for get_state and dont check page in _get_updated_state 2025-07-18 23:09:41 +02:00