Commit Graph

78 Commits

Author SHA1 Message Date
laithrw a511ba2f1e Merge branch 'main' into 3619 2026-02-03 17:32:46 -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 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
Magnus Müller 680d2551df Scroll element 2026-01-10 18:20:32 -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
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
Magnus Müller acac902a87 data-date-forma 2025-10-30 00:02:33 -07:00
Magnus Müller ff9c300b49 Include '' if attr none 2025-10-29 23:41:37 -07:00
Magnus Müller c4e69c2235 Add special handling for form elements in DOMTreeSerializer to prioritize current values from AX tree properties for inputs, textareas, and selects. 2025-10-29 23:36:28 -07:00
Magnus Müller 9cdd42f915 Improve dropdown 2025-10-29 22:55:05 -07:00
Magnus Müller a0a7f08f3f Show file input even if hidden 2025-10-29 21:19:22 -07:00
Magnus Müller f99efed294 More datapickers 2025-10-29 21:16:47 -07:00
Magnus Müller a7203731bc Add date/time input format hints in DOMTreeSerializer
- Enhanced the DOMTreeSerializer to include standardized placeholder formats for date, time, datetime-local, month, and week input types. This ensures LLMs utilize the correct ISO 8601 formats while programmatically setting values, improving user experience and consistency in date/time handling.
- Removed unnecessary boolean attributes from the serialized output for cleaner attribute management.
2025-10-29 19:28:10 -07:00
Magnus Müller 65da3ddd92 Debug logs 2025-10-27 17:33:42 -07:00
Magnus Müller 9cd948c7db Debug logs 2025-10-27 17:31:52 -07:00
Magnus Müller c3db6cff02 Refactor cross-origin iframe handling in tests and serializer
- Updated the DOMTreeSerializer to remove debug code related to cross-origin iframe detection, enhancing clarity and maintainability.
- Adjusted test cases to replace the cross-origin iframe source with a placeholder (about:blank) for improved test isolation and reliability.
- Updated comments and descriptions in tests to reflect the changes in iframe handling, ensuring accurate documentation of test behavior.

This change aims to streamline the handling of cross-origin iframes in both the serializer and tests, improving overall robustness and maintainability.
2025-10-27 17:19:03 -07:00
Magnus Müller f3c7070506 Refactor cross-origin iframe click test for improved clarity and functionality
- Updated test to verify clicking elements inside iframes in different CDP targets, enhancing the description for better understanding.
- Replaced the previous cross-origin iframe setup with a more controlled iframe content for testing.
- Adjusted assertions to ensure at least one element from the iframe is found, improving test reliability.
- Cleaned up comments and print statements for clarity, ensuring the test accurately reflects its purpose.

This change aims to enhance the robustness and maintainability of tests involving iframe interactions in the browser automation framework.
2025-10-27 17:14:30 -07:00
Magnus Müller 16d986a6d9 Remove debug code for cross-origin iframe detection in DOMTreeSerializer
- Eliminated debug logging related to clickable element detection for cross-origin iframes.
- Cleaned up unnecessary comments and code to streamline the function.
- This change aims to enhance code clarity and maintainability while ensuring that the clickable cache functionality remains intact.

Further investigation may be needed to address any remaining issues with detecting interactive elements within cross-origin iframes.
2025-10-27 00:01:46 -07:00
Magnus Müller 8557cffdd7 Remove debug logging from DOM serializer and clickable detector
- Removed all debug print statements for link detection
- Cleaned up empty if blocks left by debug removal
- Fixed indentation issues from automated cleanup
- All linter checks pass

Cross-origin iframe DOM extraction works but clickable elements
within cross-origin iframes are not being detected as interactive.
Further investigation needed to determine if this is a target
switching issue or element detection issue.

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude <noreply@anthropic.com>
2025-10-26 23:29:35 -07:00
Magnus Müller 6ee07c06ec SVG fix 2025-10-23 18:29:05 -07:00
Magnus Müller b678f27a3e Migration from highlight index to backendnode id 2025-10-21 21:02:28 -07:00
Magnus Müller 2d3031550e revert serilizer for normal mode 2025-10-21 20:19:24 -07:00
Magnus Müller 9caa248316 Merge code7 branch changes 2025-10-21 18:55:54 -07:00
Magnus Müller be9a0851a5 If aria-expanded and expanded only keep expanded 2025-10-12 13:10:15 -07:00
Magnus Müller 27f0b50b43 Show invalid only when true 2025-10-12 13:10:10 -07:00
Magnus Müller ca0bc33b42 Remove type if same as tag 2025-10-12 13:09:52 -07:00
Magnus Müller aa217e10d9 Fix scroll [ instead of + 2025-10-12 13:09:38 -07:00
Magnus Müller 434cf3b3e9 Remove ▼ from llm input 2025-10-12 13:09:34 -07:00
Prakhar Jain e9e19f785d added option to interactive elements 2025-10-04 20:46:41 +05:30
Magnus Müller 1f0848d6cf Fix valuemin valuemax parsing 2025-09-18 14:14:21 -07:00
Magnus Müller 306c9711e6 Update browser_use/dom/serializer/serializer.py
Co-authored-by: cubic-dev-ai[bot] <191113872+cubic-dev-ai[bot]@users.noreply.github.com>
2025-09-18 13:03:45 -07:00
Magnus Müller 209e69f849 Include more dropdown info 2025-09-18 11:28:16 -07:00
Magnus Müller 94ae7a303b More types 2025-09-18 11:14:56 -07:00
Magnus Müller 90e27e07d1 Works 2025-09-18 11:10:57 -07:00
Magnus Müller 6244c97876 Include information about dom metadata in prompt 2025-09-17 11:32:11 -07:00
Gregor Žunič 893d1ad2b9 removed hardcoded max iframe recursion limit 2025-09-08 20:05:02 -07:00
Gregor Žunič 05408613b9 Merge branch 'main' into feature/paint-order-filtering 2025-09-07 21:07:19 -07:00
Gregor Žunič e793376f34 step 2 <-> step 3 2025-09-07 20:57:56 -07:00
Gregor Žunič c2eede8e20 paint order filtering 2025-09-07 20:56:48 -07:00
Magnus Müller 3dcd3c4b02 Update default cross-origin iframe setting to False and adjust tree serialization depth handling 2025-09-07 19:35:21 -07:00