Skip to content

Commit

Permalink
[dotnet] Add BiDi OriginalOpener in browsing context info
Browse files Browse the repository at this point in the history
  • Loading branch information
nvborisenko committed Sep 10, 2024
1 parent 3e8b34c commit 6939b5b
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 4 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,7 @@ public async Task<T> ReceiveAsJsonAsync<T>(JsonSerializerOptions jsonSerializerO

if (_logger.IsEnabled(LogEventLevel.Trace))
{
_logger.Trace($"BIDI RCV << {Encoding.UTF8.GetString(ms.ToArray())}");
_logger.Trace($"BiDi RCV << {Encoding.UTF8.GetString(ms.ToArray())}");
}

var res = await JsonSerializer.DeserializeAsync(ms, typeof(T), jsonSerializerOptions, cancellationToken).ConfigureAwait(false);
Expand All @@ -53,7 +53,7 @@ public async Task SendAsJsonAsync(Command command, JsonSerializerOptions jsonSer

if (_logger.IsEnabled(LogEventLevel.Trace))
{
_logger.Trace($"BIDI SND >> {buffer.Length} > {Encoding.UTF8.GetString(buffer)}");
_logger.Trace($"BiDi SND >> {buffer.Length} > {Encoding.UTF8.GetString(buffer)}");
}

await _webSocket.SendAsync(new ArraySegment<byte>(buffer), WebSocketMessageType.Text, true, cancellationToken).ConfigureAwait(false);
Expand Down
Original file line number Diff line number Diff line change
@@ -1,10 +1,10 @@
using System.Collections.Generic;
using System.Collections.Generic;
using System.Text.Json.Serialization;

namespace OpenQA.Selenium.BiDi.Modules.BrowsingContext;

// TODO: Split it to separate class with just info and event args
public record BrowsingContextInfo(BiDi BiDi, IReadOnlyList<BrowsingContextInfo> Children, BrowsingContext Context, string Url, Browser.UserContext UserContext)
public record BrowsingContextInfo(BiDi BiDi, IReadOnlyList<BrowsingContextInfo> Children, BrowsingContext Context, BrowsingContext OriginalOpener, string Url, Browser.UserContext UserContext)
: BrowsingContextEventArgs(BiDi, Context)
{
[JsonInclude]
Expand Down

0 comments on commit 6939b5b

Please sign in to comment.