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.
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.
- 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.
- 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.
- 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.