Skip to content
Open
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
21 changes: 1 addition & 20 deletions dotnet/src/webdriver/BiDi/Browser/GetClientWindowsCommand.cs
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,6 @@
// </copyright>

using OpenQA.Selenium.BiDi.Communication;
using System.Collections;
using System.Collections.Generic;

namespace OpenQA.Selenium.BiDi.Browser;
Expand All @@ -28,22 +27,4 @@ internal sealed class GetClientWindowsCommand()

public sealed class GetClientWindowsOptions : CommandOptions;

public sealed record GetClientWindowsResult : EmptyResult, IReadOnlyList<ClientWindowInfo>
{
internal GetClientWindowsResult(IReadOnlyList<ClientWindowInfo> clientWindows)
{
ClientWindows = clientWindows;
}

public IReadOnlyList<ClientWindowInfo> ClientWindows { get; }

public ClientWindowInfo this[int index] => ClientWindows[index];

public int Count => ClientWindows.Count;



public IEnumerator<ClientWindowInfo> GetEnumerator() => ClientWindows.GetEnumerator();

IEnumerator IEnumerable.GetEnumerator() => (ClientWindows as IEnumerable).GetEnumerator();
}
public sealed record GetClientWindowsResult(IReadOnlyList<ClientWindowInfo> ClientWindows) : EmptyResult;
19 changes: 1 addition & 18 deletions dotnet/src/webdriver/BiDi/Browser/GetUserContextsCommand.cs
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,6 @@
// </copyright>

using OpenQA.Selenium.BiDi.Communication;
using System.Collections;
using System.Collections.Generic;

namespace OpenQA.Selenium.BiDi.Browser;
Expand All @@ -28,20 +27,4 @@ internal sealed class GetUserContextsCommand()

public class GetUserContextsOptions : CommandOptions;

public sealed record GetUserContextsResult : EmptyResult, IReadOnlyList<UserContextInfo>
{
internal GetUserContextsResult(IReadOnlyList<UserContextInfo> userContexts)
{
UserContexts = userContexts;
}

public IReadOnlyList<UserContextInfo> UserContexts { get; }

public UserContextInfo this[int index] => UserContexts[index];

public int Count => UserContexts.Count;

public IEnumerator<UserContextInfo> GetEnumerator() => UserContexts.GetEnumerator();

IEnumerator IEnumerable.GetEnumerator() => (UserContexts as IEnumerable).GetEnumerator();
}
public sealed record GetUserContextsResult(IReadOnlyList<UserContextInfo> UserContexts) : EmptyResult;
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,7 @@ public async Task<IReadOnlyList<RealmInfo>> GetRealmsAsync(GetRealmsOptions? opt

options.Context = context;

return await scriptModule.GetRealmsAsync(options).ConfigureAwait(false);
return (await scriptModule.GetRealmsAsync(options).ConfigureAwait(false)).Realms;
}

public Task<EvaluateResult> EvaluateAsync(string expression, bool awaitPromise, EvaluateOptions? options = null, ContextTargetOptions? targetOptions = null)
Expand Down
18 changes: 1 addition & 17 deletions dotnet/src/webdriver/BiDi/BrowsingContext/GetTreeCommand.cs
Original file line number Diff line number Diff line change
Expand Up @@ -47,20 +47,4 @@ public sealed record BrowsingContextGetTreeOptions
public long? MaxDepth { get; set; }
}

public sealed record GetTreeResult : EmptyResult, IReadOnlyList<BrowsingContextInfo>
{
internal GetTreeResult(IReadOnlyList<BrowsingContextInfo> contexts)
{
Contexts = contexts;
}

public IReadOnlyList<BrowsingContextInfo> Contexts { get; }

public BrowsingContextInfo this[int index] => Contexts[index];

public int Count => Contexts.Count;

public IEnumerator<BrowsingContextInfo> GetEnumerator() => Contexts.GetEnumerator();

IEnumerator IEnumerable.GetEnumerator() => (Contexts as IEnumerable).GetEnumerator();
}
public sealed record GetTreeResult(IReadOnlyList<BrowsingContextInfo> Contexts) : EmptyResult;
19 changes: 1 addition & 18 deletions dotnet/src/webdriver/BiDi/BrowsingContext/LocateNodesCommand.cs
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,6 @@
// </copyright>

using OpenQA.Selenium.BiDi.Communication;
using System.Collections;
using System.Collections.Generic;

namespace OpenQA.Selenium.BiDi.BrowsingContext;
Expand All @@ -37,20 +36,4 @@ public sealed class LocateNodesOptions : CommandOptions
public IEnumerable<Script.ISharedReference>? StartNodes { get; set; }
}

public sealed record LocateNodesResult : EmptyResult, IReadOnlyList<Script.NodeRemoteValue>
{
internal LocateNodesResult(IReadOnlyList<Script.NodeRemoteValue> nodes)
{
Nodes = nodes;
}

public IReadOnlyList<Script.NodeRemoteValue> Nodes { get; }

public Script.NodeRemoteValue this[int index] => Nodes[index];

public int Count => Nodes.Count;

public IEnumerator<Script.NodeRemoteValue> GetEnumerator() => Nodes.GetEnumerator();

IEnumerator IEnumerable.GetEnumerator() => (Nodes as IEnumerable).GetEnumerator();
}
public sealed record LocateNodesResult(IReadOnlyList<Script.NodeRemoteValue> Nodes) : EmptyResult;
6 changes: 0 additions & 6 deletions dotnet/src/webdriver/BiDi/Communication/Broker.cs
Original file line number Diff line number Diff line change
Expand Up @@ -99,13 +99,7 @@ internal Broker(BiDi bidi, Uri url)
//

// Enumerable
new Json.Converters.Enumerable.GetCookiesResultConverter(),
new Json.Converters.Enumerable.LocateNodesResultConverter(),
new Json.Converters.Enumerable.InputSourceActionsConverter(),
new Json.Converters.Enumerable.GetUserContextsResultConverter(),
new Json.Converters.Enumerable.GetClientWindowsResultConverter(),
new Json.Converters.Enumerable.GetRealmsResultConverter(),
new Json.Converters.Enumerable.GetTreeResultConverter(),
}
};

Expand Down

This file was deleted.

This file was deleted.

This file was deleted.

This file was deleted.

This file was deleted.

Loading
Loading