Commit Graph

504 Commits

Author SHA1 Message Date
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 f1e3fbcd0c More forms for datepicker 2025-10-29 20:17:20 -07:00
Magnus Müller 8ee357495c Include accept 2025-10-29 20:01:11 -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
Aitor 5682f4a993 Merge branch 'main' into feat/improve-session-manager 2025-10-29 02:27:23 +01: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 04e987df99 Add stacked DOM elements test for complex scenarios
- Introduced a new HTML template for testing stacked DOM elements, including open and closed shadow DOMs, same-origin and cross-origin iframes, and a final button.
- Implemented a test case to validate click functionality through these stacked elements, ensuring that all interactive elements are clickable and that the click counter reflects the expected number of clicks.
- Enhanced the browser session configuration to accommodate a taller window size for better visibility of stacked elements.

This update aims to improve the robustness of DOM interaction tests and ensure comprehensive coverage of complex scenarios in the browser automation framework.
2025-10-26 23:16:06 -07:00
reformedot 3a21ce805d fix: don't focus when generating DOMTree in _get_viewport_ratio 2025-10-26 06:42:10 -07:00
Magnus Müller f47cb6d511 Fix import 2025-10-24 00:06:41 -07:00
Magnus Müller 24ff856193 linter optimized 2025-10-23 23:29:19 -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 5de8a6e3e1 tag name validation rejects valid custom-element names (e.g. my-button) 2025-10-21 20:08:00 -07:00
Magnus Müller 9caa248316 Merge code7 branch changes 2025-10-21 18:55:54 -07:00
Magnus Müller 7f2e9fc4c3 Linter 2025-10-13 21:12:00 -07:00
Magnus Müller 20f8ef81e1 Unify extract in actor and tools 2025-10-13 21:11:26 -07:00
Magnus Müller cb4cfb1130 Fix: update shadow root attribute in HTMLSerializer to use 'shadowroot' instead of 'shadowrootmode', enhancing compatibility with declarative shadow DOM syntax. 2025-10-13 20:50:27 -07:00
Magnus Müller 84395f1641 Filter out json and metadata from markdown 2025-10-13 20:31:21 -07:00
Magnus Müller 730019471d Fix: filter shadow roots from children nodes, ensuring clean separation in the DOM tree structure. Update EnhancedDOMTreeNode to make a copy of children_nodes to prevent mutation of the original list. 2025-10-13 19:36:13 -07:00
Magnus Müller 963e26bde6 Refactor HTMLSerializer to prioritize serialization of shadow roots before light DOM children, improving support for declarative shadow DOM and slot projection. 2025-10-13 19:21:37 -07:00
Magnus Müller 6316ae693b First version 2025-10-13 18:58:21 -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 7e2d4de32c Timing 2025-09-19 19:36:53 -07:00
Gregor Žunič 0ceee655e3 Merge branch 'main' into feature/better-custom-actions 2025-09-19 11:23:42 -07:00
Magnus Müller d8ee0d1c71 Merge branch 'fix-extraction-tasks' of https://github.com/browser-use/browser-use into fix-extraction-tasks 2025-09-18 17:26:52 -07:00
Magnus Müller c1ea8ffa36 Adjust intersection logic in DomService to extend vertical bounds by 1000 pixels for improved frame detection. 2025-09-18 17:26:49 -07:00
Saurav Panda c1381b9b3b Merge branch 'main' into add-baas-support 2025-09-18 15:54:47 -07:00
Magnus Müller 1f0848d6cf Fix valuemin valuemax parsing 2025-09-18 14:14:21 -07:00
Magnus Müller ea85182832 Fix valuemin valuemax parsing 2025-09-18 13:56:28 -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