Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
22 changes: 14 additions & 8 deletions dotnet/src/webdriver/BiDi/BrowsingContext/DownloadEndEvent.cs
Original file line number Diff line number Diff line change
Expand Up @@ -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<DownloadEndEventArgs>
{
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Original file line number Diff line number Diff line change
Expand Up @@ -28,4 +28,6 @@ public interface IBaseNavigationInfo
DateTimeOffset Timestamp { get; }

string Url { get; }

Browser.UserContext? UserContext { get; }
}
1 change: 1 addition & 0 deletions dotnet/src/webdriver/BiDi/Script/Evaluate.cs
Original file line number Diff line number Diff line change
Expand Up @@ -73,6 +73,7 @@ public sealed record EvaluateResultException(
public sealed record ExceptionDetails(
long ColumnNumber,
long LineNumber,
RemoteValue Exception,
StackTrace StackTrace,
string Text);

Expand Down