Commit Graph

1437 Commits

Author SHA1 Message Date
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
Magnus Müller f164d94306 Merge branch 'main' into iframe-limits 2025-09-07 19:30:02 -07:00
Magnus Müller 03de8840c9 Refactor exception handling in DownloadsWatchdog for improved robustness
This commit updates the DownloadsWatchdog class to specify exception types in the error handling logic, replacing broad exception catches with more precise ones (AssertionError, KeyError, AttributeError). Additionally, it adds a warning log when no downloads path is configured, ensuring better error visibility and handling during download operations.
2025-09-06 16:05:36 -07:00
Magnus Müller a694501294 Enhance DownloadsWatchdog to expand and resolve download paths
This commit updates the DownloadsWatchdog class to ensure that the downloads directory path is properly expanded and resolved to an absolute path. The changes include:

- Expanding the downloads path using `expanduser()` and `resolve()` methods to handle user home directories correctly.
- Updating the download behavior settings to use the expanded path.
- Ensuring that the downloads directory is created with the resolved path.

Additionally, the example feature for downloading files has been modified to use a temporary downloads path for testing purposes.
2025-09-06 15:53:16 -07:00
Magnus Müller a2264ab947 Merge remote-tracking branch 'origin/main' into fix-downloads-dedup-clean 2025-09-06 15:37:29 -07:00
Magnus Müller 84db72b555 Merge commit 'ad68c577c27cafb22270b811fbe9a0b9f4fcd521' into fix-disable-security-bug 2025-09-06 15:19:59 -07:00
Magnus Müller 12c47d77ff Merge branch 'main' into enable-storagestatewatchdog-if-userdatadir-provided 2025-09-06 13:18:53 -07:00
Magnus Müller 4964d92776 Merge branch 'main' into fix/storage-watchdog-stop-monitoring 2025-09-06 13:13:12 -07:00
Magnus Müller 2b1ee8715e enable StorageStateWatchdog if user_data_dir provided 2025-09-06 13:11:32 -07:00
Magnus Müller e7ade83f4f Merge commit 'd58d2872c5ef9367e606dd155331bde3456de5ed' into feat/cdp-add-origins-storage-state 2025-09-06 13:02:25 -07:00
Magnus Müller 634a95b63a Merge commit 'd58d2872c5ef9367e606dd155331bde3456de5ed' into iframe-limits 2025-09-06 12:42:09 -07:00
Magnus Müller 2cdfe21ab6 hotfix numpy missing 2025-09-06 12:41:17 -07:00
Magnus Müller 595a95fa59 Update cross-origin iframe support description for clarity in BrowserProfile class 2025-09-06 12:37:20 -07:00
Magnus Müller 66fc319938 Merge commit 'af5b4400cd31644d06590ce5bcd0c19ac4ef35dd' into iframe-limits 2025-09-06 12:36:26 -07:00
Magnus Müller be6fd1a92e Add video recording configuration options to BrowserSession
- Introduced `record_video_framerate` and `record_video_size` parameters to the BrowserSession class for enhanced video recording capabilities.
- Updated example in video_recording.py to reflect changes, switching from BrowserSession to Browser for video recording setup.

This update allows users to customize video recording settings more effectively.
2025-09-06 12:29:19 -07:00
Enzo Biondo 1da79ca982 Merge branch 'main' into feat/video-recording 2025-09-06 14:43:33 -03:00
Magnus Müller 6ceb1a8e4d Merge branch 'main' into event_timeouts 2025-09-06 10:23:29 -07:00
Magnus Müller 73ce26ab3b Refactor timeout handling in events to use a dedicated function for improved error handling and clarity. This change replaces direct environment variable parsing with a new _get_timeout function across multiple event classes, ensuring consistent timeout management. 2025-09-06 10:23:14 -07:00
Magnus Müller 472f7c83b0 Refine viewport handling logic in browser profile initialization
- Improved clarity and organization of viewport behavior for both headless and headful modes.
- Ensured user preferences for viewport settings are respected and not overridden.
- Added assertions to validate configuration states, enhancing robustness.

This update aims to streamline the user experience when configuring browser profiles.
2025-09-06 05:26:38 -07:00
Magnus Müller 598b206276 Enhance viewport handling in headful mode
- Added logic to respect user-provided viewport settings when initializing the browser profile.
- Ensured that if a viewport is explicitly set by the user, it will not be overridden by default behaviors in headful mode.
- Improved clarity in the viewport configuration process for both headless and headful modes.

This change aims to provide a more intuitive experience for users configuring their browser profiles.
2025-09-06 05:21:38 -07:00
Magnus Müller d7969c1a93 Merge branch 'main' into fix/cdp-viewport-initialization 2025-09-06 04:05:16 -07:00
Magnus Müller 94dfc3cefe Fixed user_agent param (#2945)
<!-- This is an auto-generated description by cubic. -->

## Summary by cubic
Ensure custom user agent is applied by adding the --user-agent flag to
browser launch args. Fixes the ignored user_agent setting so pages load
with the expected UA.

<!-- End of auto-generated description by cubic. -->
2025-09-06 04:03:08 -07:00
r c92ae8269b Remove unused screenshot constants
Removed MAX_SCREENSHOT_HEIGHT and MAX_SCREENSHOT_WIDTH constants that were not being used anywhere in the codebase.

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

Co-Authored-By: Claude <noreply@anthropic.com>
2025-09-06 18:00:23 +09:00
Magnus Müller 770955e0b0 Update PopupsWatchdog to automatically accept JavaScript dialogs instead of dismissing them. Adjust logging messages accordingly and remove unused post-dialog recovery method. 2025-09-04 16:32:37 -07:00
Magnus Müller 3a7ae8d8d6 popup works 2025-09-04 16:07:05 -07:00
Gregor Žunič 484062bd83 fixed user_agent param 2025-09-03 16:07:29 -07:00
Magnus Müller 2bb18c899c Remove unused observability decorator from detect_display_configuration method in profile.py 2025-09-03 15:22:15 -07:00
Magnus Müller e7897a90d9 Remove overlays 2025-09-03 15:14:18 -07:00
Magnus Müller 4f891cd5f6 Remove gc 2025-09-03 15:14:00 -07:00
Magnus Müller 198f343c6a Refactor type hint for font cache and function return type in python_highlights.py
Updated the type hint for the _FONT_CACHE dictionary to use a union type for better clarity. Modified the return type of get_cross_platform_font function to reflect the same change, enhancing type safety and readability.
2025-09-03 14:21:19 -07:00
Magnus Müller 53e5858d8e fix-pil-import 2025-09-03 14:19:23 -07:00
Pierre Lalet 973b585905 Fix patterns use in allowed_domains
This will make "https://www.example.com" match "https://*.example.com", which
is currently no longer the case.

Also, update the exact match logic to match the logic in pattern matching.
2025-09-02 09:47:21 +02:00
Saurav Panda 5b202be744 Merge branch 'main' into fix-disable-security-bug 2025-09-01 15:08:25 -07:00
Jay Ozer b14fef2cf7 style: ruff-format adjustments in downloads_watchdog 2025-09-01 09:32:22 -07:00
Jay Ozer 5891ed3054 fix(downloads): move CDP handlers outside try; tabs indentation; align except 2025-09-01 09:26:32 -07:00
Jay Ozer 184030d36a fix(downloads): define download_progress_handler in outer scope and keep tab indentation 2025-09-01 09:05:56 -07:00
Jay Ozer a874d2c046 fix(downloads): prevent duplicate local downloads via single-dispatch; disable local JS fetch 2025-09-01 07:56:17 -07:00
Magnus Müller 37c177e840 reduce frequency_penalty 2025-08-31 14:19:39 -07:00
Magnus Müller a915a0b95c Refactor navigate_to function and update tool descriptions for improved clarity and efficiency. 2025-08-31 13:50:54 -07:00
Magnus Müller 37573edd2e navigate_to function 2025-08-31 12:34:38 -07:00
Saurav Panda 97a9dca021 Merge branch 'main' into fix-disable-security-bug 2025-08-31 12:20:08 -07:00
Magnus Müller a652335316 Remove outdated methods 2025-08-31 11:31:32 -07:00
Magnus Müller 33f69b1525 less-timeouts 2025-08-31 11:18:47 -07:00
Magnus Müller 486c631132 Fix noqa 2025-08-31 10:35:14 -07:00
Magnus Müller d9e06700bd fix-viewport 2025-08-31 10:25:29 -07:00
Saurav Panda 7e32e5be74 Merge branch 'main' into fix-disable-security-bug 2025-08-31 09:49:44 -07:00
Magnus Müller 833ad7128d Remove comment 2025-08-31 09:34:45 -07:00
Magnus Müller 1b5b360ae8 smaller-highlights-with-screensize 2025-08-31 09:29:18 -07:00
Magnus Müller bbd24f7d5d Merge branch 'main' into new-tab-info 2025-08-31 08:45:51 -07:00
Magnus Müller e10826ca34 Fix Bug: Async Function Error in Screenshot Handling 2025-08-31 08:45:00 -07:00