v1.5.0
Version 1.5.0
Advanced Networking & Download Management
This update introduces deep integration with Chromium's networking layer and programmatic control over the download lifecycle.
Added
- HTTP Status Code Tracking (DispId 5):
OnWebResourceResponseReceived(statusCode, reasonPhrase, requestUrl): [Event] Captures the HTTP status code for every resource request (e.g., 404, 500), enabling precise error handling in AutoIt.HttpStatusCodeEventsEnabled: (195) [Property] Master switch to enable or disable the status code event entirely.HttpStatusCodeDocumentOnly: (196) [Property] Filters status code events to only trigger for the main document (Default: True). This prevents event floods that cause GUI deadlocks in AutoIt.
- Custom Download Management (DispIds 204 - 211):
SetDownloadPath(path): (204) [Method] Forces downloads to a specific folder or file. If a directory is provided, the filename is automatically appended.IsDownloadUIEnabled: (205) [Property] Control visibility of the browser's download bubble.OnDownloadStarting: (208) [Event] Intercepts downloads. Features a simplified contract (URI, DefaultPath). Overrides are now handled via dedicated properties/methods (SetDownloadPath,IsDownloadHandled).OnDownloadStateChanged: (209) [Event] Real-time progress (bytes) and state updates.CancelDownloads(uri): (210) [Method] Cancels downloads. Ifuriis empty or omitted, cancels all active downloads.IsDownloadHandled: (211) [Property] Set toTrueduringOnDownloadStartingto suppress the default download UI.ActiveDownloadsList: (214) [Property] Returns a pipe-separated string of all active download URIs.
- Enhanced Export & Snapshot Engine (DispIds 201, 207):
CaptureSnapshot(cdpParameters): (201) [Method] Direct access to CDP snapshots (e.g., MHTML).ExportPageData(format, filePath): (207) [Method] Simplified HTML/MHTML export. Note: Moved to DispId 207 to distinguish from raw CDP snapshots.
- Binary Data Support:
DecodeB64ToBinary(base64Text): (206) [Method] Decodes Base64 to raw byte arrays (binary).
- Manual Download Mode: Added logic to
DownloadStartingthat checksIsDownloadHandled. If set toTrueby AutoIt during the event wait loop, the native Edge download is cancelled (e.Cancel = true), allowing AutoIt to handle the download externally (e.g., viaInetGet). - Download Sync-Wait: A 600ms synchronization loop ensures that property changes in AutoIt are correctly picked up by C# before the download proceeds or is cancelled.
- UnLockWebView Method: Added
UnLockWebView()(215) to re-enable restricted features previously disabled byLockWebView(). - Zoom Control: Added
IsZoomControlEnabled(212) [Property] specify if zoom (Ctrl+Wheel) is enabled. - Scrollbar Control: Added
IsScrollbarEnabled(213) [Property] Toggle scrollbars via CSS overflow injection.
Fixed
- Smart Auto-Fill: Updated
Initializeto automatically calculate initial parent dimensions when 0 width/height are provided. Note: Dynamic resizing remains disabled unless$oWeb.SetAutoResize(True)is called explicitly. - Naming Consistency: Standardized method names (e.g.,
CaptureSnapshot) across C# and COM interfaces. - Build Efficiency: Resolved IDE warnings (
CS0067) and unnecessary#pragmadirectives. - GUI Deadlock (HttpStatusCode): Fixed a critical issue where an flood of 404 resource responses for sub-elements (images, CSS, scripts) would overwhelm the AutoIt event loop, causing the GUI to freeze. Added robust tracking to ensure these events are filtered to the main document by default.
- Download Race Condition Fix: Added
Application.DoEvents()to theOnDownloadStartingevent to ensure AutoIt property overrides (DownloadResultPath,IsDownloadHandled) are synchronized correctly before the download begins. - Automatic Directory Creation: Implemented automatic folder creation for custom download paths if the target directory does not exist.
- Event Fixes: Wired up the
OnZoomChangedevent to correctly trigger when the browser zoom level is modified.