diff --git a/dotnet/src/webdriver/BiDi/BrowsingContext/DownloadEndEvent.cs b/dotnet/src/webdriver/BiDi/BrowsingContext/DownloadEndEvent.cs index 0649b21d2f895..1756ab7740202 100644 --- a/dotnet/src/webdriver/BiDi/BrowsingContext/DownloadEndEvent.cs +++ b/dotnet/src/webdriver/BiDi/BrowsingContext/DownloadEndEvent.cs @@ -26,25 +26,31 @@ namespace OpenQA.Selenium.BiDi.BrowsingContext; [JsonConverter(typeof(DownloadEndEventArgsConverter))] public abstract record DownloadEndEventArgs( - BrowsingContext Context) - : EventArgs; + BrowsingContext Context, + Navigation? Navigation, + [property: JsonConverter(typeof(DateTimeOffsetConverter))] DateTimeOffset Timestamp, + string Url, + Browser.UserContext? UserContext) + : EventArgs, IBaseNavigationInfo; public sealed record DownloadCanceledEventArgs( Download Download, BrowsingContext Context, Navigation? Navigation, - [property: JsonConverter(typeof(DateTimeOffsetConverter))] DateTimeOffset Timestamp, - string Url) - : DownloadEndEventArgs(Context), IBaseNavigationInfo; + DateTimeOffset Timestamp, + string Url, + Browser.UserContext? UserContext) + : DownloadEndEventArgs(Context, Navigation, Timestamp, Url, UserContext); public sealed record DownloadCompleteEventArgs( Download Download, string? Filepath, BrowsingContext Context, Navigation? Navigation, - [property: JsonConverter(typeof(DateTimeOffsetConverter))] DateTimeOffset Timestamp, - string Url) - : DownloadEndEventArgs(Context), IBaseNavigationInfo; + DateTimeOffset Timestamp, + string Url, + Browser.UserContext? UserContext) + : DownloadEndEventArgs(Context, Navigation, Timestamp, Url, UserContext); internal class DownloadEndEventArgsConverter : JsonConverter { diff --git a/dotnet/src/webdriver/BiDi/BrowsingContext/DownloadWillBeginEvent.cs b/dotnet/src/webdriver/BiDi/BrowsingContext/DownloadWillBeginEvent.cs index 05b43d299b22f..167044139a554 100644 --- a/dotnet/src/webdriver/BiDi/BrowsingContext/DownloadWillBeginEvent.cs +++ b/dotnet/src/webdriver/BiDi/BrowsingContext/DownloadWillBeginEvent.cs @@ -28,5 +28,6 @@ public sealed record DownloadWillBeginEventArgs( BrowsingContext Context, Navigation? Navigation, [property: JsonConverter(typeof(DateTimeOffsetConverter))] DateTimeOffset Timestamp, - string Url) + string Url, + Browser.UserContext? UserContext) : EventArgs, IBaseNavigationInfo; diff --git a/dotnet/src/webdriver/BiDi/BrowsingContext/IBaseNavigationInfo.cs b/dotnet/src/webdriver/BiDi/BrowsingContext/IBaseNavigationInfo.cs index 30a485a1a21db..e6447788b48e8 100644 --- a/dotnet/src/webdriver/BiDi/BrowsingContext/IBaseNavigationInfo.cs +++ b/dotnet/src/webdriver/BiDi/BrowsingContext/IBaseNavigationInfo.cs @@ -28,4 +28,6 @@ public interface IBaseNavigationInfo DateTimeOffset Timestamp { get; } string Url { get; } + + Browser.UserContext? UserContext { get; } } diff --git a/dotnet/src/webdriver/BiDi/Script/Evaluate.cs b/dotnet/src/webdriver/BiDi/Script/Evaluate.cs index 8601f38cf0b51..7e929e609dbe8 100644 --- a/dotnet/src/webdriver/BiDi/Script/Evaluate.cs +++ b/dotnet/src/webdriver/BiDi/Script/Evaluate.cs @@ -73,6 +73,7 @@ public sealed record EvaluateResultException( public sealed record ExceptionDetails( long ColumnNumber, long LineNumber, + RemoteValue Exception, StackTrace StackTrace, string Text);