Commit Graph

504 Commits

Author SHA1 Message Date
laithrw a511ba2f1e Merge branch 'main' into 3619 2026-02-03 17:32:46 -05:00
Saurav Panda 48206d62ad fixed code style issues 2026-02-02 16:08:29 -08:00
Saurav Panda 7c05e73bbf improve markdown splitting based on header 2026-02-02 12:37:28 -08:00
Saurav Panda 0b0adfb36c fixed parsing issue with non table data 2026-02-02 10:52:44 -08:00
Saurav Panda e66eac8a37 Improve Markdown Chunker 2026-02-02 00:05:09 -08:00
Saurav Panda 6878bd1ca4 handle autocomplete fields 2026-01-30 11:04:00 -08:00
Laith Weinberger 5b9371ee30 use existing clickable element detector 2026-01-26 17:21:38 -05:00
Laith Weinberger e1c4eeef35 fix(#3538): always index scrollable dropdown containers regardless of interactive descendants 2026-01-25 17:05:10 -05:00
Laith Weinberger f3f82689dd fix docstring incorrectly referencing y_position instead of pages + show generic hint 2026-01-25 13:19:30 -05:00
Laith Weinberger 9027991bae when detecting iframe elements, tell LLM exactly how far to scroll to reach each
Get pixel location of each iframe element that's out of the viewport, convert from pixels to number of page lengths, and provide that to the LLM as context
2026-01-25 13:11:37 -05:00
Laith Weinberger 230a60d6c5 lint 2026-01-25 12:29:29 -05:00
Laith Weinberger eb8e1c1d59 fix(#3619): add hidden content hints for iframes in DOM context
Elements in iframes beyond the 1000px viewport threshold are filtered from selector_map, causing agents to scroll blindly to find them. Add hints to the LLM context indicating hidden content
2026-01-25 12:19:57 -05:00
laithrw 468d149588 Merge branch 'main' into fix/3292-table-row-clickability 2026-01-25 10:48:47 -05:00
laithrw 794b68b448 Merge branch 'main' into fix/label-span-interactive-antd 2026-01-25 10:43:27 -05:00
Laith Weinberger 0b8aa55d54 Merge branch 'main' into fix/label-span-interactive-antd 2026-01-24 17:19:38 -05:00
Laith Weinberger 1794849886 don't mutate page
instead of writing markers to DOM, collect element references in JS, resolve them to internal Chrome node IDs via CDP, and store those IDs in Python
2026-01-24 16:36:14 -05:00
Laith Weinberger 20f51c7fef detect JS event listeners for clickable elements
uses CDP Runtime.evaluate with includeCommandLineAPI to access getEventListeners() and mark elements with click/mousedown/pointerdown listeners before DOM snapshot capture
2026-01-24 14:44:08 -05:00
sudhanshu112233shukla f49fc33f2d Merge remote-tracking branch 'upstream/main' into fix/3292-table-row-clickability 2026-01-11 13:04:41 +00:00
sudhanshu112233shukla d7990721f8 fix(#3292): make table rows and cells with role='row'/'cell' interactive
- Added 'row', 'cell', 'gridcell' to interactive_roles in ClickableElementDetector
- Added 'row', 'cell', 'gridcell' to interactive_ax_roles in ClickableElementDetector
- Verified logic with isolated test case
2026-01-11 12:48:55 +00:00
Magnus Müller 680d2551df Scroll element 2026-01-10 18:20:32 -08:00
ditingdapeng 882ac6471a fix: detect label/span wrappers for AntD-style controls 2026-01-08 04:04:10 +08:00
Saurav Panda 2c06eabf5f Added ax-name fallback for history rerun. 2026-01-06 12:07:10 -08:00
Saurav Panda 07b7a6d8c0 fix: include shadow DOM form elements in selector_map even without snapshot data 2025-12-19 18:32:40 -08:00
mertunsall 1779e9717d improve hashing of elements using cascading hash 2025-12-17 00:55:27 -08:00
Saurav Panda e9c047be92 include ax_name for rerun history element hash 2025-12-16 17:05:48 -08:00
Cursor Agent 24e276d5f4 Refactor markdown preprocessing and add tests
Co-authored-by: mailmertunsal <mailmertunsal@gmail.com>
2025-12-11 00:00:21 +00:00
Mert Unsal fb8994de13 Revert "Fix: Ignore Inert Carousel Elements" 2025-11-15 23:05:21 -08:00
Mert Unsal b11682bfb5 Merge branch 'main' into Invisible-links 2025-11-15 18:59:55 -08:00
kalil0321 1c85a8a688 Fix lint 2025-11-13 15:49:43 +01:00
kalil0321 0988199776 Merge branch 'main' into kalil0321/demo-mode 2025-11-13 15:34:49 +01:00
reformedot 13868aee9b refactor: update all_frames parameter handling in DomService
- Changed the type of the all_frames parameter to allow for None, enabling lazy fetching of cross-origin iframes only when necessary.
- Updated comments to clarify the behavior of all_frames during DOM tree construction.
2025-11-12 20:05:01 -08:00
reformedot 77d7f161fb refactor: enhance session management and error handling in BrowserSession
- Improved the `create_task_with_error_handling` function to allow for better exception logging and retrieval based on the `suppress_exceptions` parameter.
- Updated `SessionManager` to implement event-driven recovery for stale agent focus, replacing polling with efficient event handling.
- Refactored session retrieval methods to ensure focus validation and recovery are handled automatically.
- Enhanced logging for recovery processes and session management to provide clearer insights into state changes and errors.
- Adjusted various watchdogs to utilize the new session management methods, ensuring they correctly handle focus validation and session retrieval.
2025-11-12 19:42:24 -08:00
reformedot bff596f2e7 refactor: remove target type caching and streamline target retrieval in session management
- Eliminated the caching of target types in SessionManager, simplifying the management of target information.
- Updated various components to directly access target types from the Target objects, enhancing clarity and reducing redundancy.
- Adjusted related methods in BrowserSession, CrashWatchdog, and DomService to reflect the changes in target type retrieval.
2025-11-12 15:19:34 -08:00
PredictiveManish 839c1412e2 Update: ClickableElementDetector.is_interactive to ignore elements marked inert or aria-hidden 2025-11-12 17:08:52 +05:30
reformedot 6859920d68 refactor: enhance timing breakdown in DOMWatchdog and DomService for improved performance insights
- Updated DOMWatchdog to provide a detailed hierarchical breakdown of timing metrics for various operations, improving clarity in performance logging.
- Enhanced DomService to calculate and log specific timing metrics for iframe scrolling, CDP calls, and snapshot processing, contributing to more accurate performance tracking.
2025-11-11 20:38:39 -08:00
reformedot 44045765b5 refactor: improve timing metrics in DOMWatchdog and DomService for enhanced performance tracking
- Updated DOMWatchdog to exclude specific sub-timings from total tracked time to avoid double-counting.
- Enhanced DomService to calculate and log overhead timings for both get_dom_tree and get_serialized_dom_tree operations, improving accuracy in performance metrics.
2025-11-11 20:12:52 -08:00
reformedot e766733ef4 refactor: enhance timing metrics in DomService for improved performance tracking 2025-11-11 19:51:54 -08:00
reformedot b4e9ffa984 refactor: implement error handling for asyncio tasks across various components
- Introduced a utility function `create_task_with_error_handling` to manage asyncio tasks with proper exception logging and suppression options.
- Updated multiple components, including `SessionManager`, `BrowserSession`, and various watchdogs, to utilize the new error handling mechanism for background tasks.
- Enhanced overall robustness of asynchronous operations by ensuring exceptions are logged and handled appropriately, improving maintainability and debugging capabilities.
2025-11-11 17:27:54 -08:00
reformedot 0282675ade refactor: implement lazy fetching for DOM tree construction
- Updated DOM tree retrieval methods to lazily fetch frame hierarchy only when necessary, improving performance for pages without cross-origin iframes.
- Adjusted method signatures to reflect optional frame fetching, enhancing flexibility in DOM service operations.
- Streamlined timing metrics by setting placeholders for timing logs, preparing for future performance enhancements.
2025-11-10 21:28:10 -08:00
reformedot 97420238c1 refactor: enhance DOM tree construction and timing metrics
- Updated DOM tree retrieval methods to include pre-fetched frame hierarchy, reducing redundant CDP calls and improving performance.
- Adjusted timing logs to provide detailed breakdowns of DOM tree construction, including total time and individual component timings.
- Removed commented-out code related to Python-based highlighting, streamlining the DOMWatchdog class.
- Reduced wait time in DOMWatchdog for page stability, enhancing responsiveness during DOM builds.
2025-11-10 20:53:23 -08:00
reformedot bf350bc4b0 refactor: update agent focus handling to use target ID consistently
- Replaced instances of `agent_focus` with `agent_focus_target_id` across various components to ensure consistent target management.
- Enhanced error handling and logging in `Watchdog` classes to reflect the new target ID approach.
- Improved session retrieval methods to streamline interactions with the `SessionManager`, ensuring better performance and reliability.
2025-11-10 14:29:50 -08:00
kalil0321 3f64178894 Implement demo mode for in-browser logging 2025-11-08 21:39:57 +01:00
Magnus Müller 5a4ebf7fe4 Date fix 2025-10-30 11:56:04 -07:00
Magnus Müller 4f9ba966cb Expected date format + scroll container 2025-10-30 11:32:27 -07:00
Magnus Müller 1467f35ac1 Improve file text 2025-10-30 10:36:51 -07:00
Magnus Müller 6a0b39c8f1 Fix date serilizer 2025-10-30 10:26:41 -07:00
Magnus Müller 22b0da2394 Serilizer fix 2025-10-30 10:01:44 -07:00
Magnus Müller cfeef1d031 Update browser_use/dom/serializer/serializer.py
Co-authored-by: cubic-dev-ai[bot] <191113872+cubic-dev-ai[bot]@users.noreply.github.com>
2025-10-30 00:55:32 -07:00
Magnus Müller f0c7e9787c Linter 2025-10-30 00:12:28 -07:00
Magnus Müller 3d892612c5 Always get ax value 2025-10-30 00:10:36 -07:00