diff --git a/dotnet/src/webdriver/BiDi/Browser/BrowserModule.cs b/dotnet/src/webdriver/BiDi/Browser/BrowserModule.cs index 35363438385fd..ef4860e1ad997 100644 --- a/dotnet/src/webdriver/BiDi/Browser/BrowserModule.cs +++ b/dotnet/src/webdriver/BiDi/Browser/BrowserModule.cs @@ -31,7 +31,7 @@ public async Task CloseAsync(CloseOptions? options = null) public async Task CreateUserContextAsync(CreateUserContextOptions? options = null) { - var @params = new CreateUserContextCommandParameters(options?.AcceptInsecureCerts, options?.Proxy, options?.UnhandledPromptBehavior); + var @params = new CreateUserContextParameters(options?.AcceptInsecureCerts, options?.Proxy, options?.UnhandledPromptBehavior); return await Broker.ExecuteCommandAsync(new CreateUserContextCommand(@params), options).ConfigureAwait(false); } @@ -43,7 +43,7 @@ public async Task GetUserContextsAsync(GetUserContextsOpt public async Task RemoveUserContextAsync(UserContext userContext, RemoveUserContextOptions? options = null) { - var @params = new RemoveUserContextCommandParameters(userContext); + var @params = new RemoveUserContextParameters(userContext); return await Broker.ExecuteCommandAsync(new RemoveUserContextCommand(@params), options).ConfigureAwait(false); } diff --git a/dotnet/src/webdriver/BiDi/Browser/CloseCommand.cs b/dotnet/src/webdriver/BiDi/Browser/CloseCommand.cs index 67f6a3e0d29e9..b7f157c14aaa1 100644 --- a/dotnet/src/webdriver/BiDi/Browser/CloseCommand.cs +++ b/dotnet/src/webdriver/BiDi/Browser/CloseCommand.cs @@ -22,6 +22,6 @@ namespace OpenQA.Selenium.BiDi.Browser; internal sealed class CloseCommand() - : Command(CommandParameters.Empty, "browser.close"); + : Command(Parameters.Empty, "browser.close"); public sealed class CloseOptions : CommandOptions; diff --git a/dotnet/src/webdriver/BiDi/Browser/CreateUserContextCommand.cs b/dotnet/src/webdriver/BiDi/Browser/CreateUserContextCommand.cs index 9259d2457c947..796e8c2b26ea5 100644 --- a/dotnet/src/webdriver/BiDi/Browser/CreateUserContextCommand.cs +++ b/dotnet/src/webdriver/BiDi/Browser/CreateUserContextCommand.cs @@ -21,10 +21,10 @@ namespace OpenQA.Selenium.BiDi.Browser; -internal sealed class CreateUserContextCommand(CreateUserContextCommandParameters @params) - : Command(@params, "browser.createUserContext"); +internal sealed class CreateUserContextCommand(CreateUserContextParameters @params) + : Command(@params, "browser.createUserContext"); -internal sealed record CreateUserContextCommandParameters(bool? AcceptInsecureCerts, Session.ProxyConfiguration? Proxy, Session.UserPromptHandler? UnhandledPromptBehavior) : CommandParameters; +internal sealed record CreateUserContextParameters(bool? AcceptInsecureCerts, Session.ProxyConfiguration? Proxy, Session.UserPromptHandler? UnhandledPromptBehavior) : Parameters; public sealed class CreateUserContextOptions : CommandOptions { diff --git a/dotnet/src/webdriver/BiDi/Browser/GetClientWindowsCommand.cs b/dotnet/src/webdriver/BiDi/Browser/GetClientWindowsCommand.cs index 9c1dabcbd7778..2d90714d20fec 100644 --- a/dotnet/src/webdriver/BiDi/Browser/GetClientWindowsCommand.cs +++ b/dotnet/src/webdriver/BiDi/Browser/GetClientWindowsCommand.cs @@ -24,7 +24,7 @@ namespace OpenQA.Selenium.BiDi.Browser; internal sealed class GetClientWindowsCommand() - : Command(CommandParameters.Empty, "browser.getClientWindows"); + : Command(Parameters.Empty, "browser.getClientWindows"); public sealed class GetClientWindowsOptions : CommandOptions; diff --git a/dotnet/src/webdriver/BiDi/Browser/GetUserContextsCommand.cs b/dotnet/src/webdriver/BiDi/Browser/GetUserContextsCommand.cs index 0ea309c6394e9..67d1648186f31 100644 --- a/dotnet/src/webdriver/BiDi/Browser/GetUserContextsCommand.cs +++ b/dotnet/src/webdriver/BiDi/Browser/GetUserContextsCommand.cs @@ -24,7 +24,7 @@ namespace OpenQA.Selenium.BiDi.Browser; internal sealed class GetUserContextsCommand() - : Command(CommandParameters.Empty, "browser.getUserContexts"); + : Command(Parameters.Empty, "browser.getUserContexts"); public class GetUserContextsOptions : CommandOptions; diff --git a/dotnet/src/webdriver/BiDi/Browser/RemoveUserContextCommand.cs b/dotnet/src/webdriver/BiDi/Browser/RemoveUserContextCommand.cs index feaf1e820600c..926759c64ebdd 100644 --- a/dotnet/src/webdriver/BiDi/Browser/RemoveUserContextCommand.cs +++ b/dotnet/src/webdriver/BiDi/Browser/RemoveUserContextCommand.cs @@ -21,9 +21,9 @@ namespace OpenQA.Selenium.BiDi.Browser; -internal sealed class RemoveUserContextCommand(RemoveUserContextCommandParameters @params) - : Command(@params, "browser.removeUserContext"); +internal sealed class RemoveUserContextCommand(RemoveUserContextParameters @params) + : Command(@params, "browser.removeUserContext"); -internal sealed record RemoveUserContextCommandParameters(UserContext UserContext) : CommandParameters; +internal sealed record RemoveUserContextParameters(UserContext UserContext) : Parameters; public sealed class RemoveUserContextOptions : CommandOptions; diff --git a/dotnet/src/webdriver/BiDi/BrowsingContext/ActivateCommand.cs b/dotnet/src/webdriver/BiDi/BrowsingContext/ActivateCommand.cs index 59aae1197767b..07dff55099a2a 100644 --- a/dotnet/src/webdriver/BiDi/BrowsingContext/ActivateCommand.cs +++ b/dotnet/src/webdriver/BiDi/BrowsingContext/ActivateCommand.cs @@ -21,9 +21,9 @@ namespace OpenQA.Selenium.BiDi.BrowsingContext; -internal sealed class ActivateCommand(ActivateCommandParameters @params) - : Command(@params, "browsingContext.activate"); +internal sealed class ActivateCommand(ActivateParameters @params) + : Command(@params, "browsingContext.activate"); -internal sealed record ActivateCommandParameters(BrowsingContext Context) : CommandParameters; +internal sealed record ActivateParameters(BrowsingContext Context) : Parameters; public sealed class ActivateOptions : CommandOptions; diff --git a/dotnet/src/webdriver/BiDi/BrowsingContext/BrowsingContextModule.cs b/dotnet/src/webdriver/BiDi/BrowsingContext/BrowsingContextModule.cs index bba5de7b3005d..5571b4fa9ff6f 100644 --- a/dotnet/src/webdriver/BiDi/BrowsingContext/BrowsingContextModule.cs +++ b/dotnet/src/webdriver/BiDi/BrowsingContext/BrowsingContextModule.cs @@ -27,7 +27,7 @@ public sealed class BrowsingContextModule(Broker broker) : Module(broker) { public async Task CreateAsync(ContextType type, CreateOptions? options = null) { - var @params = new CreateCommandParameters(type, options?.ReferenceContext, options?.Background, options?.UserContext); + var @params = new CreateParameters(type, options?.ReferenceContext, options?.Background, options?.UserContext); var createResult = await Broker.ExecuteCommandAsync(new CreateCommand(@params), options).ConfigureAwait(false); @@ -36,77 +36,77 @@ public async Task CreateAsync(ContextType type, CreateOptions? public async Task NavigateAsync(BrowsingContext context, string url, NavigateOptions? options = null) { - var @params = new NavigateCommandParameters(context, url, options?.Wait); + var @params = new NavigateParameters(context, url, options?.Wait); return await Broker.ExecuteCommandAsync(new NavigateCommand(@params), options).ConfigureAwait(false); } public async Task ActivateAsync(BrowsingContext context, ActivateOptions? options = null) { - var @params = new ActivateCommandParameters(context); + var @params = new ActivateParameters(context); return await Broker.ExecuteCommandAsync(new ActivateCommand(@params), options).ConfigureAwait(false); } public async Task LocateNodesAsync(BrowsingContext context, Locator locator, LocateNodesOptions? options = null) { - var @params = new LocateNodesCommandParameters(context, locator, options?.MaxNodeCount, options?.SerializationOptions, options?.StartNodes); + var @params = new LocateNodesParameters(context, locator, options?.MaxNodeCount, options?.SerializationOptions, options?.StartNodes); return await Broker.ExecuteCommandAsync(new LocateNodesCommand(@params), options).ConfigureAwait(false); } public async Task CaptureScreenshotAsync(BrowsingContext context, CaptureScreenshotOptions? options = null) { - var @params = new CaptureScreenshotCommandParameters(context, options?.Origin, options?.Format, options?.Clip); + var @params = new CaptureScreenshotParameters(context, options?.Origin, options?.Format, options?.Clip); return await Broker.ExecuteCommandAsync(new CaptureScreenshotCommand(@params), options).ConfigureAwait(false); } public async Task CloseAsync(BrowsingContext context, CloseOptions? options = null) { - var @params = new CloseCommandParameters(context, options?.PromptUnload); + var @params = new CloseParameters(context, options?.PromptUnload); return await Broker.ExecuteCommandAsync(new CloseCommand(@params), options).ConfigureAwait(false); } public async Task TraverseHistoryAsync(BrowsingContext context, int delta, TraverseHistoryOptions? options = null) { - var @params = new TraverseHistoryCommandParameters(context, delta); + var @params = new TraverseHistoryParameters(context, delta); return await Broker.ExecuteCommandAsync(new TraverseHistoryCommand(@params), options).ConfigureAwait(false); } public async Task ReloadAsync(BrowsingContext context, ReloadOptions? options = null) { - var @params = new ReloadCommandParameters(context, options?.IgnoreCache, options?.Wait); + var @params = new ReloadParameters(context, options?.IgnoreCache, options?.Wait); return await Broker.ExecuteCommandAsync(new ReloadCommand(@params), options).ConfigureAwait(false); } public async Task SetViewportAsync(BrowsingContext context, SetViewportOptions? options = null) { - var @params = new SetViewportCommandParameters(context, options?.Viewport, options?.DevicePixelRatio); + var @params = new SetViewportParameters(context, options?.Viewport, options?.DevicePixelRatio); return await Broker.ExecuteCommandAsync(new SetViewportCommand(@params), options).ConfigureAwait(false); } public async Task GetTreeAsync(GetTreeOptions? options = null) { - var @params = new GetTreeCommandParameters(options?.MaxDepth, options?.Root); + var @params = new GetTreeParameters(options?.MaxDepth, options?.Root); return await Broker.ExecuteCommandAsync(new GetTreeCommand(@params), options).ConfigureAwait(false); } public async Task PrintAsync(BrowsingContext context, PrintOptions? options = null) { - var @params = new PrintCommandParameters(context, options?.Background, options?.Margin, options?.Orientation, options?.Page, options?.PageRanges, options?.Scale, options?.ShrinkToFit); + var @params = new PrintParameters(context, options?.Background, options?.Margin, options?.Orientation, options?.Page, options?.PageRanges, options?.Scale, options?.ShrinkToFit); return await Broker.ExecuteCommandAsync(new PrintCommand(@params), options).ConfigureAwait(false); } public async Task HandleUserPromptAsync(BrowsingContext context, HandleUserPromptOptions? options = null) { - var @params = new HandleUserPromptCommandParameters(context, options?.Accept, options?.UserText); + var @params = new HandleUserPromptParameters(context, options?.Accept, options?.UserText); return await Broker.ExecuteCommandAsync(new HandleUserPromptCommand(@params), options).ConfigureAwait(false); } diff --git a/dotnet/src/webdriver/BiDi/BrowsingContext/CaptureScreenshotCommand.cs b/dotnet/src/webdriver/BiDi/BrowsingContext/CaptureScreenshotCommand.cs index 6fa5149b10646..4bb970bf50ea8 100644 --- a/dotnet/src/webdriver/BiDi/BrowsingContext/CaptureScreenshotCommand.cs +++ b/dotnet/src/webdriver/BiDi/BrowsingContext/CaptureScreenshotCommand.cs @@ -22,10 +22,10 @@ namespace OpenQA.Selenium.BiDi.BrowsingContext; -internal sealed class CaptureScreenshotCommand(CaptureScreenshotCommandParameters @params) - : Command(@params, "browsingContext.captureScreenshot"); +internal sealed class CaptureScreenshotCommand(CaptureScreenshotParameters @params) + : Command(@params, "browsingContext.captureScreenshot"); -internal sealed record CaptureScreenshotCommandParameters(BrowsingContext Context, ScreenshotOrigin? Origin, ImageFormat? Format, ClipRectangle? Clip) : CommandParameters; +internal sealed record CaptureScreenshotParameters(BrowsingContext Context, ScreenshotOrigin? Origin, ImageFormat? Format, ClipRectangle? Clip) : Parameters; public sealed class CaptureScreenshotOptions : CommandOptions { diff --git a/dotnet/src/webdriver/BiDi/BrowsingContext/CloseCommand.cs b/dotnet/src/webdriver/BiDi/BrowsingContext/CloseCommand.cs index 69f207189ae70..afe451c4083bc 100644 --- a/dotnet/src/webdriver/BiDi/BrowsingContext/CloseCommand.cs +++ b/dotnet/src/webdriver/BiDi/BrowsingContext/CloseCommand.cs @@ -21,10 +21,10 @@ namespace OpenQA.Selenium.BiDi.BrowsingContext; -internal sealed class CloseCommand(CloseCommandParameters @params) - : Command(@params, "browsingContext.close"); +internal sealed class CloseCommand(CloseParameters @params) + : Command(@params, "browsingContext.close"); -internal sealed record CloseCommandParameters(BrowsingContext Context, bool? PromptUnload) : CommandParameters; +internal sealed record CloseParameters(BrowsingContext Context, bool? PromptUnload) : Parameters; public sealed class CloseOptions : CommandOptions { diff --git a/dotnet/src/webdriver/BiDi/BrowsingContext/CreateCommand.cs b/dotnet/src/webdriver/BiDi/BrowsingContext/CreateCommand.cs index 2e3881a393b6e..65600ac14ce79 100644 --- a/dotnet/src/webdriver/BiDi/BrowsingContext/CreateCommand.cs +++ b/dotnet/src/webdriver/BiDi/BrowsingContext/CreateCommand.cs @@ -21,10 +21,10 @@ namespace OpenQA.Selenium.BiDi.BrowsingContext; -internal sealed class CreateCommand(CreateCommandParameters @params) - : Command(@params, "browsingContext.create"); +internal sealed class CreateCommand(CreateParameters @params) + : Command(@params, "browsingContext.create"); -internal sealed record CreateCommandParameters(ContextType Type, BrowsingContext? ReferenceContext, bool? Background, Browser.UserContext? UserContext) : CommandParameters; +internal sealed record CreateParameters(ContextType Type, BrowsingContext? ReferenceContext, bool? Background, Browser.UserContext? UserContext) : Parameters; public sealed class CreateOptions : CommandOptions { diff --git a/dotnet/src/webdriver/BiDi/BrowsingContext/GetTreeCommand.cs b/dotnet/src/webdriver/BiDi/BrowsingContext/GetTreeCommand.cs index 637981f20af78..fdc9d0c284d38 100644 --- a/dotnet/src/webdriver/BiDi/BrowsingContext/GetTreeCommand.cs +++ b/dotnet/src/webdriver/BiDi/BrowsingContext/GetTreeCommand.cs @@ -23,10 +23,10 @@ namespace OpenQA.Selenium.BiDi.BrowsingContext; -internal sealed class GetTreeCommand(GetTreeCommandParameters @params) - : Command(@params, "browsingContext.getTree"); +internal sealed class GetTreeCommand(GetTreeParameters @params) + : Command(@params, "browsingContext.getTree"); -internal sealed record GetTreeCommandParameters(long? MaxDepth, BrowsingContext? Root) : CommandParameters; +internal sealed record GetTreeParameters(long? MaxDepth, BrowsingContext? Root) : Parameters; public sealed class GetTreeOptions : CommandOptions { diff --git a/dotnet/src/webdriver/BiDi/BrowsingContext/HandleUserPromptCommand.cs b/dotnet/src/webdriver/BiDi/BrowsingContext/HandleUserPromptCommand.cs index 6c01767d65a02..6789651f79074 100644 --- a/dotnet/src/webdriver/BiDi/BrowsingContext/HandleUserPromptCommand.cs +++ b/dotnet/src/webdriver/BiDi/BrowsingContext/HandleUserPromptCommand.cs @@ -21,10 +21,10 @@ namespace OpenQA.Selenium.BiDi.BrowsingContext; -internal sealed class HandleUserPromptCommand(HandleUserPromptCommandParameters @params) - : Command(@params, "browsingContext.handleUserPrompt"); +internal sealed class HandleUserPromptCommand(HandleUserPromptParameters @params) + : Command(@params, "browsingContext.handleUserPrompt"); -internal sealed record HandleUserPromptCommandParameters(BrowsingContext Context, bool? Accept, string? UserText) : CommandParameters; +internal sealed record HandleUserPromptParameters(BrowsingContext Context, bool? Accept, string? UserText) : Parameters; public sealed class HandleUserPromptOptions : CommandOptions { diff --git a/dotnet/src/webdriver/BiDi/BrowsingContext/LocateNodesCommand.cs b/dotnet/src/webdriver/BiDi/BrowsingContext/LocateNodesCommand.cs index 3def0f8d4118f..3f38ab986eeaf 100644 --- a/dotnet/src/webdriver/BiDi/BrowsingContext/LocateNodesCommand.cs +++ b/dotnet/src/webdriver/BiDi/BrowsingContext/LocateNodesCommand.cs @@ -23,10 +23,10 @@ namespace OpenQA.Selenium.BiDi.BrowsingContext; -internal sealed class LocateNodesCommand(LocateNodesCommandParameters @params) - : Command(@params, "browsingContext.locateNodes"); +internal sealed class LocateNodesCommand(LocateNodesParameters @params) + : Command(@params, "browsingContext.locateNodes"); -internal sealed record LocateNodesCommandParameters(BrowsingContext Context, Locator Locator, long? MaxNodeCount, Script.SerializationOptions? SerializationOptions, IEnumerable? StartNodes) : CommandParameters; +internal sealed record LocateNodesParameters(BrowsingContext Context, Locator Locator, long? MaxNodeCount, Script.SerializationOptions? SerializationOptions, IEnumerable? StartNodes) : Parameters; public sealed class LocateNodesOptions : CommandOptions { diff --git a/dotnet/src/webdriver/BiDi/BrowsingContext/NavigateCommand.cs b/dotnet/src/webdriver/BiDi/BrowsingContext/NavigateCommand.cs index 87a36d5490ab7..a39e4f89ffa74 100644 --- a/dotnet/src/webdriver/BiDi/BrowsingContext/NavigateCommand.cs +++ b/dotnet/src/webdriver/BiDi/BrowsingContext/NavigateCommand.cs @@ -21,10 +21,10 @@ namespace OpenQA.Selenium.BiDi.BrowsingContext; -internal sealed class NavigateCommand(NavigateCommandParameters @params) - : Command(@params, "browsingContext.navigate"); +internal sealed class NavigateCommand(NavigateParameters @params) + : Command(@params, "browsingContext.navigate"); -internal sealed record NavigateCommandParameters(BrowsingContext Context, string Url, ReadinessState? Wait) : CommandParameters; +internal sealed record NavigateParameters(BrowsingContext Context, string Url, ReadinessState? Wait) : Parameters; public sealed class NavigateOptions : CommandOptions { diff --git a/dotnet/src/webdriver/BiDi/BrowsingContext/PrintCommand.cs b/dotnet/src/webdriver/BiDi/BrowsingContext/PrintCommand.cs index ae689de7737e6..d9180f9ecc59b 100644 --- a/dotnet/src/webdriver/BiDi/BrowsingContext/PrintCommand.cs +++ b/dotnet/src/webdriver/BiDi/BrowsingContext/PrintCommand.cs @@ -23,10 +23,10 @@ namespace OpenQA.Selenium.BiDi.BrowsingContext; -internal sealed class PrintCommand(PrintCommandParameters @params) - : Command(@params, "browsingContext.print"); +internal sealed class PrintCommand(PrintParameters @params) + : Command(@params, "browsingContext.print"); -internal sealed record PrintCommandParameters(BrowsingContext Context, bool? Background, PrintMargin? Margin, PrintOrientation? Orientation, PrintPage? Page, IEnumerable? PageRanges, double? Scale, bool? ShrinkToFit) : CommandParameters; +internal sealed record PrintParameters(BrowsingContext Context, bool? Background, PrintMargin? Margin, PrintOrientation? Orientation, PrintPage? Page, IEnumerable? PageRanges, double? Scale, bool? ShrinkToFit) : Parameters; public sealed class PrintOptions : CommandOptions { diff --git a/dotnet/src/webdriver/BiDi/BrowsingContext/ReloadCommand.cs b/dotnet/src/webdriver/BiDi/BrowsingContext/ReloadCommand.cs index 7532d91359309..ec348b51ae3d1 100644 --- a/dotnet/src/webdriver/BiDi/BrowsingContext/ReloadCommand.cs +++ b/dotnet/src/webdriver/BiDi/BrowsingContext/ReloadCommand.cs @@ -21,10 +21,10 @@ namespace OpenQA.Selenium.BiDi.BrowsingContext; -internal sealed class ReloadCommand(ReloadCommandParameters @params) - : Command(@params, "browsingContext.reload"); +internal sealed class ReloadCommand(ReloadParameters @params) + : Command(@params, "browsingContext.reload"); -internal sealed record ReloadCommandParameters(BrowsingContext Context, bool? IgnoreCache, ReadinessState? Wait) : CommandParameters; +internal sealed record ReloadParameters(BrowsingContext Context, bool? IgnoreCache, ReadinessState? Wait) : Parameters; public sealed class ReloadOptions : CommandOptions { diff --git a/dotnet/src/webdriver/BiDi/BrowsingContext/SetViewportCommand.cs b/dotnet/src/webdriver/BiDi/BrowsingContext/SetViewportCommand.cs index bbf274481c040..41260597592dc 100644 --- a/dotnet/src/webdriver/BiDi/BrowsingContext/SetViewportCommand.cs +++ b/dotnet/src/webdriver/BiDi/BrowsingContext/SetViewportCommand.cs @@ -21,10 +21,10 @@ namespace OpenQA.Selenium.BiDi.BrowsingContext; -internal sealed class SetViewportCommand(SetViewportCommandParameters @params) - : Command(@params, "browsingContext.setViewport"); +internal sealed class SetViewportCommand(SetViewportParameters @params) + : Command(@params, "browsingContext.setViewport"); -internal sealed record SetViewportCommandParameters(BrowsingContext Context, Viewport? Viewport, double? DevicePixelRatio) : CommandParameters; +internal sealed record SetViewportParameters(BrowsingContext Context, Viewport? Viewport, double? DevicePixelRatio) : Parameters; public sealed class SetViewportOptions : CommandOptions { diff --git a/dotnet/src/webdriver/BiDi/BrowsingContext/TraverseHistoryCommand.cs b/dotnet/src/webdriver/BiDi/BrowsingContext/TraverseHistoryCommand.cs index 410798bd6f726..2e45c90489d7f 100644 --- a/dotnet/src/webdriver/BiDi/BrowsingContext/TraverseHistoryCommand.cs +++ b/dotnet/src/webdriver/BiDi/BrowsingContext/TraverseHistoryCommand.cs @@ -21,10 +21,10 @@ namespace OpenQA.Selenium.BiDi.BrowsingContext; -internal sealed class TraverseHistoryCommand(TraverseHistoryCommandParameters @params) - : Command(@params, "browsingContext.traverseHistory"); +internal sealed class TraverseHistoryCommand(TraverseHistoryParameters @params) + : Command(@params, "browsingContext.traverseHistory"); -internal sealed record TraverseHistoryCommandParameters(BrowsingContext Context, long Delta) : CommandParameters; +internal sealed record TraverseHistoryParameters(BrowsingContext Context, long Delta) : Parameters; public sealed class TraverseHistoryOptions : CommandOptions; diff --git a/dotnet/src/webdriver/BiDi/Communication/Command.cs b/dotnet/src/webdriver/BiDi/Communication/Command.cs index ce12b125e08a2..0fd27b28566dd 100644 --- a/dotnet/src/webdriver/BiDi/Communication/Command.cs +++ b/dotnet/src/webdriver/BiDi/Communication/Command.cs @@ -40,17 +40,17 @@ protected Command(string method, Type resultType) public Type ResultType { get; } } -internal abstract class Command(TCommandParameters @params, string method) : Command(method, typeof(TCommandResult)) - where TCommandParameters : CommandParameters - where TCommandResult : EmptyResult +internal abstract class Command(TParameters @params, string method) : Command(method, typeof(TResult)) + where TParameters : Parameters + where TResult : EmptyResult { [JsonPropertyOrder(2)] - public TCommandParameters Params { get; } = @params; + public TParameters Params { get; } = @params; } -internal record CommandParameters +internal record Parameters { - public static CommandParameters Empty { get; } = new CommandParameters(); + public static Parameters Empty { get; } = new Parameters(); } public record EmptyResult; diff --git a/dotnet/src/webdriver/BiDi/Input/InputModule.cs b/dotnet/src/webdriver/BiDi/Input/InputModule.cs index 91e2c96b55392..c394ffc0556cb 100644 --- a/dotnet/src/webdriver/BiDi/Input/InputModule.cs +++ b/dotnet/src/webdriver/BiDi/Input/InputModule.cs @@ -27,21 +27,21 @@ public sealed class InputModule(Broker broker) : Module(broker) { public async Task PerformActionsAsync(BrowsingContext.BrowsingContext context, IEnumerable actions, PerformActionsOptions? options = null) { - var @params = new PerformActionsCommandParameters(context, actions); + var @params = new PerformActionsParameters(context, actions); return await Broker.ExecuteCommandAsync(new PerformActionsCommand(@params), options).ConfigureAwait(false); } public async Task ReleaseActionsAsync(BrowsingContext.BrowsingContext context, ReleaseActionsOptions? options = null) { - var @params = new ReleaseActionsCommandParameters(context); + var @params = new ReleaseActionsParameters(context); return await Broker.ExecuteCommandAsync(new ReleaseActionsCommand(@params), options).ConfigureAwait(false); } public async Task SetFilesAsync(BrowsingContext.BrowsingContext context, Script.ISharedReference element, IEnumerable files, SetFilesOptions? options = null) { - var @params = new SetFilesCommandParameters(context, element, files); + var @params = new SetFilesParameters(context, element, files); return await Broker.ExecuteCommandAsync(new SetFilesCommand(@params), options).ConfigureAwait(false); } diff --git a/dotnet/src/webdriver/BiDi/Input/PerformActionsCommand.cs b/dotnet/src/webdriver/BiDi/Input/PerformActionsCommand.cs index be5206baaaf1b..4ea5ba83ebfc9 100644 --- a/dotnet/src/webdriver/BiDi/Input/PerformActionsCommand.cs +++ b/dotnet/src/webdriver/BiDi/Input/PerformActionsCommand.cs @@ -22,9 +22,9 @@ namespace OpenQA.Selenium.BiDi.Input; -internal sealed class PerformActionsCommand(PerformActionsCommandParameters @params) - : Command(@params, "input.performActions"); +internal sealed class PerformActionsCommand(PerformActionsParameters @params) + : Command(@params, "input.performActions"); -internal sealed record PerformActionsCommandParameters(BrowsingContext.BrowsingContext Context, IEnumerable Actions) : CommandParameters; +internal sealed record PerformActionsParameters(BrowsingContext.BrowsingContext Context, IEnumerable Actions) : Parameters; public sealed class PerformActionsOptions : CommandOptions; diff --git a/dotnet/src/webdriver/BiDi/Input/ReleaseActionsCommand.cs b/dotnet/src/webdriver/BiDi/Input/ReleaseActionsCommand.cs index 133c6bdad22be..3228645ff0726 100644 --- a/dotnet/src/webdriver/BiDi/Input/ReleaseActionsCommand.cs +++ b/dotnet/src/webdriver/BiDi/Input/ReleaseActionsCommand.cs @@ -21,9 +21,9 @@ namespace OpenQA.Selenium.BiDi.Input; -internal sealed class ReleaseActionsCommand(ReleaseActionsCommandParameters @params) - : Command(@params, "input.releaseActions"); +internal sealed class ReleaseActionsCommand(ReleaseActionsParameters @params) + : Command(@params, "input.releaseActions"); -internal sealed record ReleaseActionsCommandParameters(BrowsingContext.BrowsingContext Context) : CommandParameters; +internal sealed record ReleaseActionsParameters(BrowsingContext.BrowsingContext Context) : Parameters; public sealed class ReleaseActionsOptions : CommandOptions; diff --git a/dotnet/src/webdriver/BiDi/Input/SetFilesCommand.cs b/dotnet/src/webdriver/BiDi/Input/SetFilesCommand.cs index 78fdcbf9048a1..b695361378e42 100644 --- a/dotnet/src/webdriver/BiDi/Input/SetFilesCommand.cs +++ b/dotnet/src/webdriver/BiDi/Input/SetFilesCommand.cs @@ -22,9 +22,9 @@ namespace OpenQA.Selenium.BiDi.Input; -internal sealed class SetFilesCommand(SetFilesCommandParameters @params) - : Command(@params, "input.setFiles"); +internal sealed class SetFilesCommand(SetFilesParameters @params) + : Command(@params, "input.setFiles"); -internal sealed record SetFilesCommandParameters(BrowsingContext.BrowsingContext Context, Script.ISharedReference Element, IEnumerable Files) : CommandParameters; +internal sealed record SetFilesParameters(BrowsingContext.BrowsingContext Context, Script.ISharedReference Element, IEnumerable Files) : Parameters; public sealed class SetFilesOptions : CommandOptions; diff --git a/dotnet/src/webdriver/BiDi/Network/AddInterceptCommand.cs b/dotnet/src/webdriver/BiDi/Network/AddInterceptCommand.cs index 58ca8831009d6..698d6ea865f67 100644 --- a/dotnet/src/webdriver/BiDi/Network/AddInterceptCommand.cs +++ b/dotnet/src/webdriver/BiDi/Network/AddInterceptCommand.cs @@ -22,10 +22,10 @@ namespace OpenQA.Selenium.BiDi.Network; -internal sealed class AddInterceptCommand(AddInterceptCommandParameters @params) - : Command(@params, "network.addIntercept"); +internal sealed class AddInterceptCommand(AddInterceptParameters @params) + : Command(@params, "network.addIntercept"); -internal sealed record AddInterceptCommandParameters(IEnumerable Phases, IEnumerable? Contexts, IEnumerable? UrlPatterns) : CommandParameters; +internal sealed record AddInterceptParameters(IEnumerable Phases, IEnumerable? Contexts, IEnumerable? UrlPatterns) : Parameters; public class AddInterceptOptions : CommandOptions { diff --git a/dotnet/src/webdriver/BiDi/Network/ContinueRequestCommand.cs b/dotnet/src/webdriver/BiDi/Network/ContinueRequestCommand.cs index 786ed9d68ca60..c31d7eb6a7392 100644 --- a/dotnet/src/webdriver/BiDi/Network/ContinueRequestCommand.cs +++ b/dotnet/src/webdriver/BiDi/Network/ContinueRequestCommand.cs @@ -22,10 +22,10 @@ namespace OpenQA.Selenium.BiDi.Network; -internal sealed class ContinueRequestCommand(ContinueRequestCommandParameters @params) - : Command(@params, "network.continueRequest"); +internal sealed class ContinueRequestCommand(ContinueRequestParameters @params) + : Command(@params, "network.continueRequest"); -internal sealed record ContinueRequestCommandParameters(Request Request, BytesValue? Body, IEnumerable? Cookies, IEnumerable
? Headers, string? Method, string? Url) : CommandParameters; +internal sealed record ContinueRequestParameters(Request Request, BytesValue? Body, IEnumerable? Cookies, IEnumerable
? Headers, string? Method, string? Url) : Parameters; public sealed class ContinueRequestOptions : CommandOptions { diff --git a/dotnet/src/webdriver/BiDi/Network/ContinueResponseCommand.cs b/dotnet/src/webdriver/BiDi/Network/ContinueResponseCommand.cs index 06ce733eb27d2..a45199c2f85de 100644 --- a/dotnet/src/webdriver/BiDi/Network/ContinueResponseCommand.cs +++ b/dotnet/src/webdriver/BiDi/Network/ContinueResponseCommand.cs @@ -22,10 +22,10 @@ namespace OpenQA.Selenium.BiDi.Network; -internal sealed class ContinueResponseCommand(ContinueResponseCommandParameters @params) - : Command(@params, "network.continueResponse"); +internal sealed class ContinueResponseCommand(ContinueResponseParameters @params) + : Command(@params, "network.continueResponse"); -internal sealed record ContinueResponseCommandParameters(Request Request, IEnumerable? Cookies, IEnumerable? Credentials, IEnumerable
? Headers, string? ReasonPhrase, long? StatusCode) : CommandParameters; +internal sealed record ContinueResponseParameters(Request Request, IEnumerable? Cookies, IEnumerable? Credentials, IEnumerable
? Headers, string? ReasonPhrase, long? StatusCode) : Parameters; public sealed class ContinueResponseOptions : CommandOptions { diff --git a/dotnet/src/webdriver/BiDi/Network/ContinueWithAuthCommand.cs b/dotnet/src/webdriver/BiDi/Network/ContinueWithAuthCommand.cs index bd41e31c6d704..64e985d737a15 100644 --- a/dotnet/src/webdriver/BiDi/Network/ContinueWithAuthCommand.cs +++ b/dotnet/src/webdriver/BiDi/Network/ContinueWithAuthCommand.cs @@ -29,7 +29,7 @@ internal class ContinueWithAuthCommand(ContinueWithAuthParameters @params) [JsonDerivedType(typeof(ContinueWithAuthCredentials), "provideCredentials")] [JsonDerivedType(typeof(ContinueWithAuthDefaultCredentials), "default")] [JsonDerivedType(typeof(ContinueWithAuthCancelCredentials), "cancel")] -internal abstract record ContinueWithAuthParameters(Request Request) : CommandParameters; +internal abstract record ContinueWithAuthParameters(Request Request) : Parameters; internal sealed record ContinueWithAuthCredentials(Request Request, AuthCredentials Credentials) : ContinueWithAuthParameters(Request); diff --git a/dotnet/src/webdriver/BiDi/Network/FailRequestCommand.cs b/dotnet/src/webdriver/BiDi/Network/FailRequestCommand.cs index 1c2cdbafab295..9e1efc8c0a37e 100644 --- a/dotnet/src/webdriver/BiDi/Network/FailRequestCommand.cs +++ b/dotnet/src/webdriver/BiDi/Network/FailRequestCommand.cs @@ -21,9 +21,9 @@ namespace OpenQA.Selenium.BiDi.Network; -internal sealed class FailRequestCommand(FailRequestCommandParameters @params) - : Command(@params, "network.failRequest"); +internal sealed class FailRequestCommand(FailRequestParameters @params) + : Command(@params, "network.failRequest"); -internal sealed record FailRequestCommandParameters(Request Request) : CommandParameters; +internal sealed record FailRequestParameters(Request Request) : Parameters; public sealed class FailRequestOptions : CommandOptions; diff --git a/dotnet/src/webdriver/BiDi/Network/NetworkModule.cs b/dotnet/src/webdriver/BiDi/Network/NetworkModule.cs index 3f6893055d92f..38b74db9ee551 100644 --- a/dotnet/src/webdriver/BiDi/Network/NetworkModule.cs +++ b/dotnet/src/webdriver/BiDi/Network/NetworkModule.cs @@ -28,7 +28,7 @@ public sealed partial class NetworkModule(Broker broker) : Module(broker) { public async Task AddInterceptAsync(IEnumerable phases, AddInterceptOptions? options = null) { - var @params = new AddInterceptCommandParameters(phases, options?.Contexts, options?.UrlPatterns); + var @params = new AddInterceptParameters(phases, options?.Contexts, options?.UrlPatterns); var result = await Broker.ExecuteCommandAsync(new AddInterceptCommand(@params), options).ConfigureAwait(false); @@ -37,42 +37,42 @@ public async Task AddInterceptAsync(IEnumerable phase public async Task RemoveInterceptAsync(Intercept intercept, RemoveInterceptOptions? options = null) { - var @params = new RemoveInterceptCommandParameters(intercept); + var @params = new RemoveInterceptParameters(intercept); return await Broker.ExecuteCommandAsync(new RemoveInterceptCommand(@params), options).ConfigureAwait(false); } public async Task SetCacheBehaviorAsync(CacheBehavior behavior, SetCacheBehaviorOptions? options = null) { - var @params = new SetCacheBehaviorCommandParameters(behavior, options?.Contexts); + var @params = new SetCacheBehaviorParameters(behavior, options?.Contexts); return await Broker.ExecuteCommandAsync(new SetCacheBehaviorCommand(@params), options).ConfigureAwait(false); } public async Task ContinueRequestAsync(Request request, ContinueRequestOptions? options = null) { - var @params = new ContinueRequestCommandParameters(request, options?.Body, options?.Cookies, options?.Headers, options?.Method, options?.Url); + var @params = new ContinueRequestParameters(request, options?.Body, options?.Cookies, options?.Headers, options?.Method, options?.Url); return await Broker.ExecuteCommandAsync(new ContinueRequestCommand(@params), options).ConfigureAwait(false); } public async Task ContinueResponseAsync(Request request, ContinueResponseOptions? options = null) { - var @params = new ContinueResponseCommandParameters(request, options?.Cookies, options?.Credentials, options?.Headers, options?.ReasonPhrase, options?.StatusCode); + var @params = new ContinueResponseParameters(request, options?.Cookies, options?.Credentials, options?.Headers, options?.ReasonPhrase, options?.StatusCode); return await Broker.ExecuteCommandAsync(new ContinueResponseCommand(@params), options).ConfigureAwait(false); } public async Task FailRequestAsync(Request request, FailRequestOptions? options = null) { - var @params = new FailRequestCommandParameters(request); + var @params = new FailRequestParameters(request); return await Broker.ExecuteCommandAsync(new FailRequestCommand(@params), options).ConfigureAwait(false); } public async Task ProvideResponseAsync(Request request, ProvideResponseOptions? options = null) { - var @params = new ProvideResponseCommandParameters(request, options?.Body, options?.Cookies, options?.Headers, options?.ReasonPhrase, options?.StatusCode); + var @params = new ProvideResponseParameters(request, options?.Body, options?.Cookies, options?.Headers, options?.ReasonPhrase, options?.StatusCode); return await Broker.ExecuteCommandAsync(new ProvideResponseCommand(@params), options).ConfigureAwait(false); } diff --git a/dotnet/src/webdriver/BiDi/Network/ProvideResponseCommand.cs b/dotnet/src/webdriver/BiDi/Network/ProvideResponseCommand.cs index 679dc088b6998..290c63339498d 100644 --- a/dotnet/src/webdriver/BiDi/Network/ProvideResponseCommand.cs +++ b/dotnet/src/webdriver/BiDi/Network/ProvideResponseCommand.cs @@ -22,10 +22,10 @@ namespace OpenQA.Selenium.BiDi.Network; -internal sealed class ProvideResponseCommand(ProvideResponseCommandParameters @params) - : Command(@params, "network.provideResponse"); +internal sealed class ProvideResponseCommand(ProvideResponseParameters @params) + : Command(@params, "network.provideResponse"); -internal sealed record ProvideResponseCommandParameters(Request Request, BytesValue? Body, IEnumerable? Cookies, IEnumerable
? Headers, string? ReasonPhrase, long? StatusCode) : CommandParameters; +internal sealed record ProvideResponseParameters(Request Request, BytesValue? Body, IEnumerable? Cookies, IEnumerable
? Headers, string? ReasonPhrase, long? StatusCode) : Parameters; public sealed class ProvideResponseOptions : CommandOptions { diff --git a/dotnet/src/webdriver/BiDi/Network/RemoveInterceptCommand.cs b/dotnet/src/webdriver/BiDi/Network/RemoveInterceptCommand.cs index 179c18d68d089..96eda3c812c1f 100644 --- a/dotnet/src/webdriver/BiDi/Network/RemoveInterceptCommand.cs +++ b/dotnet/src/webdriver/BiDi/Network/RemoveInterceptCommand.cs @@ -21,9 +21,9 @@ namespace OpenQA.Selenium.BiDi.Network; -internal sealed class RemoveInterceptCommand(RemoveInterceptCommandParameters @params) - : Command(@params, "network.removeIntercept"); +internal sealed class RemoveInterceptCommand(RemoveInterceptParameters @params) + : Command(@params, "network.removeIntercept"); -internal sealed record RemoveInterceptCommandParameters(Intercept Intercept) : CommandParameters; +internal sealed record RemoveInterceptParameters(Intercept Intercept) : Parameters; public class RemoveInterceptOptions : CommandOptions; diff --git a/dotnet/src/webdriver/BiDi/Network/SetCacheBehaviorCommand.cs b/dotnet/src/webdriver/BiDi/Network/SetCacheBehaviorCommand.cs index 15a96b235e4fa..d61544eb275bd 100644 --- a/dotnet/src/webdriver/BiDi/Network/SetCacheBehaviorCommand.cs +++ b/dotnet/src/webdriver/BiDi/Network/SetCacheBehaviorCommand.cs @@ -22,10 +22,10 @@ namespace OpenQA.Selenium.BiDi.Network; -internal sealed class SetCacheBehaviorCommand(SetCacheBehaviorCommandParameters @params) - : Command(@params, "network.setCacheBehavior"); +internal sealed class SetCacheBehaviorCommand(SetCacheBehaviorParameters @params) + : Command(@params, "network.setCacheBehavior"); -internal sealed record SetCacheBehaviorCommandParameters(CacheBehavior CacheBehavior, IEnumerable? Contexts) : CommandParameters; +internal sealed record SetCacheBehaviorParameters(CacheBehavior CacheBehavior, IEnumerable? Contexts) : Parameters; public sealed class SetCacheBehaviorOptions : CommandOptions { diff --git a/dotnet/src/webdriver/BiDi/Script/AddPreloadScriptCommand.cs b/dotnet/src/webdriver/BiDi/Script/AddPreloadScriptCommand.cs index 612301b4864ce..7f5c7047c50b7 100644 --- a/dotnet/src/webdriver/BiDi/Script/AddPreloadScriptCommand.cs +++ b/dotnet/src/webdriver/BiDi/Script/AddPreloadScriptCommand.cs @@ -22,10 +22,10 @@ namespace OpenQA.Selenium.BiDi.Script; -internal sealed class AddPreloadScriptCommand(AddPreloadScriptCommandParameters @params) - : Command(@params, "script.addPreloadScript"); +internal sealed class AddPreloadScriptCommand(AddPreloadScriptParameters @params) + : Command(@params, "script.addPreloadScript"); -internal sealed record AddPreloadScriptCommandParameters(string FunctionDeclaration, IEnumerable? Arguments, IEnumerable? Contexts, string? Sandbox) : CommandParameters; +internal sealed record AddPreloadScriptParameters(string FunctionDeclaration, IEnumerable? Arguments, IEnumerable? Contexts, string? Sandbox) : Parameters; public sealed class AddPreloadScriptOptions : CommandOptions { diff --git a/dotnet/src/webdriver/BiDi/Script/CallFunctionCommand.cs b/dotnet/src/webdriver/BiDi/Script/CallFunctionCommand.cs index 7d8381296c53b..1203ed39a6578 100644 --- a/dotnet/src/webdriver/BiDi/Script/CallFunctionCommand.cs +++ b/dotnet/src/webdriver/BiDi/Script/CallFunctionCommand.cs @@ -22,10 +22,10 @@ namespace OpenQA.Selenium.BiDi.Script; -internal sealed class CallFunctionCommand(CallFunctionCommandParameters @params) - : Command(@params, "script.callFunction"); +internal sealed class CallFunctionCommand(CallFunctionParameters @params) + : Command(@params, "script.callFunction"); -internal sealed record CallFunctionCommandParameters(string FunctionDeclaration, bool AwaitPromise, Target Target, IEnumerable? Arguments, ResultOwnership? ResultOwnership, SerializationOptions? SerializationOptions, LocalValue? This, bool? UserActivation) : CommandParameters; +internal sealed record CallFunctionParameters(string FunctionDeclaration, bool AwaitPromise, Target Target, IEnumerable? Arguments, ResultOwnership? ResultOwnership, SerializationOptions? SerializationOptions, LocalValue? This, bool? UserActivation) : Parameters; public sealed class CallFunctionOptions : CommandOptions { diff --git a/dotnet/src/webdriver/BiDi/Script/DisownCommand.cs b/dotnet/src/webdriver/BiDi/Script/DisownCommand.cs index abfa458329763..f85c93a9da453 100644 --- a/dotnet/src/webdriver/BiDi/Script/DisownCommand.cs +++ b/dotnet/src/webdriver/BiDi/Script/DisownCommand.cs @@ -22,7 +22,7 @@ namespace OpenQA.Selenium.BiDi.Script; -internal sealed class DisownCommand(DisownCommandParameters @params) - : Command(@params, "script.disown"); +internal sealed class DisownCommand(DisownParameters @params) + : Command(@params, "script.disown"); -internal sealed record DisownCommandParameters(IEnumerable Handles, Target Target) : CommandParameters; +internal sealed record DisownParameters(IEnumerable Handles, Target Target) : Parameters; diff --git a/dotnet/src/webdriver/BiDi/Script/EvaluateCommand.cs b/dotnet/src/webdriver/BiDi/Script/EvaluateCommand.cs index cf9aecd75ceac..170cc8ad01c08 100644 --- a/dotnet/src/webdriver/BiDi/Script/EvaluateCommand.cs +++ b/dotnet/src/webdriver/BiDi/Script/EvaluateCommand.cs @@ -22,10 +22,10 @@ namespace OpenQA.Selenium.BiDi.Script; -internal sealed class EvaluateCommand(EvaluateCommandParameters @params) - : Command(@params, "script.evaluate"); +internal sealed class EvaluateCommand(EvaluateParameters @params) + : Command(@params, "script.evaluate"); -internal sealed record EvaluateCommandParameters(string Expression, Target Target, bool AwaitPromise, ResultOwnership? ResultOwnership, SerializationOptions? SerializationOptions, bool? UserActivation) : CommandParameters; +internal sealed record EvaluateParameters(string Expression, Target Target, bool AwaitPromise, ResultOwnership? ResultOwnership, SerializationOptions? SerializationOptions, bool? UserActivation) : Parameters; public sealed class EvaluateOptions : CommandOptions { diff --git a/dotnet/src/webdriver/BiDi/Script/GetRealmsCommand.cs b/dotnet/src/webdriver/BiDi/Script/GetRealmsCommand.cs index cc2b8d332f64c..94f23a1063c4c 100644 --- a/dotnet/src/webdriver/BiDi/Script/GetRealmsCommand.cs +++ b/dotnet/src/webdriver/BiDi/Script/GetRealmsCommand.cs @@ -23,10 +23,10 @@ namespace OpenQA.Selenium.BiDi.Script; -internal sealed class GetRealmsCommand(GetRealmsCommandParameters @params) - : Command(@params, "script.getRealms"); +internal sealed class GetRealmsCommand(GetRealmsParameters @params) + : Command(@params, "script.getRealms"); -internal sealed record GetRealmsCommandParameters(BrowsingContext.BrowsingContext? Context, RealmType? Type) : CommandParameters; +internal sealed record GetRealmsParameters(BrowsingContext.BrowsingContext? Context, RealmType? Type) : Parameters; public sealed class GetRealmsOptions : CommandOptions { diff --git a/dotnet/src/webdriver/BiDi/Script/RemovePreloadScriptCommand.cs b/dotnet/src/webdriver/BiDi/Script/RemovePreloadScriptCommand.cs index 6fbce4dbed82d..14858034d7735 100644 --- a/dotnet/src/webdriver/BiDi/Script/RemovePreloadScriptCommand.cs +++ b/dotnet/src/webdriver/BiDi/Script/RemovePreloadScriptCommand.cs @@ -21,9 +21,9 @@ namespace OpenQA.Selenium.BiDi.Script; -internal sealed class RemovePreloadScriptCommand(RemovePreloadScriptCommandParameters @params) - : Command(@params, "script.removePreloadScript"); +internal sealed class RemovePreloadScriptCommand(RemovePreloadScriptParameters @params) + : Command(@params, "script.removePreloadScript"); -internal sealed record RemovePreloadScriptCommandParameters(PreloadScript Script) : CommandParameters; +internal sealed record RemovePreloadScriptParameters(PreloadScript Script) : Parameters; public sealed class RemovePreloadScriptOptions : CommandOptions; diff --git a/dotnet/src/webdriver/BiDi/Script/ScriptModule.cs b/dotnet/src/webdriver/BiDi/Script/ScriptModule.cs index bdf489f0d614e..c8c1590a2021b 100644 --- a/dotnet/src/webdriver/BiDi/Script/ScriptModule.cs +++ b/dotnet/src/webdriver/BiDi/Script/ScriptModule.cs @@ -27,7 +27,7 @@ public sealed class ScriptModule(Broker broker) : Module(broker) { public async Task EvaluateAsync(string expression, bool awaitPromise, Target target, EvaluateOptions? options = null) { - var @params = new EvaluateCommandParameters(expression, target, awaitPromise, options?.ResultOwnership, options?.SerializationOptions, options?.UserActivation); + var @params = new EvaluateParameters(expression, target, awaitPromise, options?.ResultOwnership, options?.SerializationOptions, options?.UserActivation); return await Broker.ExecuteCommandAsync(new EvaluateCommand(@params), options).ConfigureAwait(false); } @@ -41,7 +41,7 @@ public async Task EvaluateAsync(string expression, bool awaitPro public async Task CallFunctionAsync(string functionDeclaration, bool awaitPromise, Target target, CallFunctionOptions? options = null) { - var @params = new CallFunctionCommandParameters(functionDeclaration, awaitPromise, target, options?.Arguments, options?.ResultOwnership, options?.SerializationOptions, options?.This, options?.UserActivation); + var @params = new CallFunctionParameters(functionDeclaration, awaitPromise, target, options?.Arguments, options?.ResultOwnership, options?.SerializationOptions, options?.This, options?.UserActivation); return await Broker.ExecuteCommandAsync(new CallFunctionCommand(@params), options).ConfigureAwait(false); } @@ -55,14 +55,14 @@ public async Task CallFunctionAsync(string functionDeclaration, public async Task GetRealmsAsync(GetRealmsOptions? options = null) { - var @params = new GetRealmsCommandParameters(options?.Context, options?.Type); + var @params = new GetRealmsParameters(options?.Context, options?.Type); return await Broker.ExecuteCommandAsync(new GetRealmsCommand(@params), options).ConfigureAwait(false); } public async Task AddPreloadScriptAsync(string functionDeclaration, AddPreloadScriptOptions? options = null) { - var @params = new AddPreloadScriptCommandParameters(functionDeclaration, options?.Arguments, options?.Contexts, options?.Sandbox); + var @params = new AddPreloadScriptParameters(functionDeclaration, options?.Arguments, options?.Contexts, options?.Sandbox); var result = await Broker.ExecuteCommandAsync(new AddPreloadScriptCommand(@params), options).ConfigureAwait(false); @@ -71,7 +71,7 @@ public async Task AddPreloadScriptAsync(string functionDeclaratio public async Task RemovePreloadScriptAsync(PreloadScript script, RemovePreloadScriptOptions? options = null) { - var @params = new RemovePreloadScriptCommandParameters(script); + var @params = new RemovePreloadScriptParameters(script); return await Broker.ExecuteCommandAsync(new RemovePreloadScriptCommand(@params), options).ConfigureAwait(false); } diff --git a/dotnet/src/webdriver/BiDi/Session/EndCommand.cs b/dotnet/src/webdriver/BiDi/Session/EndCommand.cs index a75f5f29c088e..44a481355f143 100644 --- a/dotnet/src/webdriver/BiDi/Session/EndCommand.cs +++ b/dotnet/src/webdriver/BiDi/Session/EndCommand.cs @@ -22,6 +22,6 @@ namespace OpenQA.Selenium.BiDi.Session; internal sealed class EndCommand() - : Command(CommandParameters.Empty, "session.end"); + : Command(Parameters.Empty, "session.end"); public sealed class EndOptions : CommandOptions; diff --git a/dotnet/src/webdriver/BiDi/Session/NewCommand.cs b/dotnet/src/webdriver/BiDi/Session/NewCommand.cs index 23c4a2f402ad4..06d509539a04b 100644 --- a/dotnet/src/webdriver/BiDi/Session/NewCommand.cs +++ b/dotnet/src/webdriver/BiDi/Session/NewCommand.cs @@ -21,10 +21,10 @@ namespace OpenQA.Selenium.BiDi.Session; -internal sealed class NewCommand(NewCommandParameters @params) - : Command(@params, "session.new"); +internal sealed class NewCommand(NewParameters @params) + : Command(@params, "session.new"); -internal sealed record NewCommandParameters(CapabilitiesRequest Capabilities) : CommandParameters; +internal sealed record NewParameters(CapabilitiesRequest Capabilities) : Parameters; public sealed class NewOptions : CommandOptions; diff --git a/dotnet/src/webdriver/BiDi/Session/SessionModule.cs b/dotnet/src/webdriver/BiDi/Session/SessionModule.cs index 32f97a9730820..0d07dd8cc84ad 100644 --- a/dotnet/src/webdriver/BiDi/Session/SessionModule.cs +++ b/dotnet/src/webdriver/BiDi/Session/SessionModule.cs @@ -32,28 +32,28 @@ public async Task StatusAsync(StatusOptions? options = null) public async Task SubscribeAsync(IEnumerable events, SubscribeOptions? options = null) { - var @params = new SubscribeCommandParameters(events, options?.Contexts); + var @params = new SubscribeParameters(events, options?.Contexts); return await Broker.ExecuteCommandAsync(new(@params), options).ConfigureAwait(false); } public async Task UnsubscribeAsync(IEnumerable subscriptions, UnsubscribeByIdOptions? options = null) { - var @params = new UnsubscribeByIdCommandParameters(subscriptions); + var @params = new UnsubscribeByIdParameters(subscriptions); return await Broker.ExecuteCommandAsync(new UnsubscribeByIdCommand(@params), options).ConfigureAwait(false); } public async Task UnsubscribeAsync(IEnumerable eventNames, UnsubscribeByAttributesOptions? options = null) { - var @params = new UnsubscribeByAttributesCommandParameters(eventNames, options?.Contexts); + var @params = new UnsubscribeByAttributesParameters(eventNames, options?.Contexts); return await Broker.ExecuteCommandAsync(new UnsubscribeByAttributesCommand(@params), options).ConfigureAwait(false); } public async Task NewAsync(CapabilitiesRequest capabilitiesRequest, NewOptions? options = null) { - var @params = new NewCommandParameters(capabilitiesRequest); + var @params = new NewParameters(capabilitiesRequest); return await Broker.ExecuteCommandAsync(new NewCommand(@params), options).ConfigureAwait(false); } diff --git a/dotnet/src/webdriver/BiDi/Session/StatusCommand.cs b/dotnet/src/webdriver/BiDi/Session/StatusCommand.cs index f8bd3fbefbe61..54f1865554007 100644 --- a/dotnet/src/webdriver/BiDi/Session/StatusCommand.cs +++ b/dotnet/src/webdriver/BiDi/Session/StatusCommand.cs @@ -22,7 +22,7 @@ namespace OpenQA.Selenium.BiDi.Session; internal sealed class StatusCommand() - : Command(CommandParameters.Empty, "session.status"); + : Command(Parameters.Empty, "session.status"); public sealed record StatusResult(bool Ready, string Message) : EmptyResult; diff --git a/dotnet/src/webdriver/BiDi/Session/SubscribeCommand.cs b/dotnet/src/webdriver/BiDi/Session/SubscribeCommand.cs index ba63121fefd85..a4982b7427306 100644 --- a/dotnet/src/webdriver/BiDi/Session/SubscribeCommand.cs +++ b/dotnet/src/webdriver/BiDi/Session/SubscribeCommand.cs @@ -22,10 +22,10 @@ namespace OpenQA.Selenium.BiDi.Session; -internal sealed class SubscribeCommand(SubscribeCommandParameters @params) - : Command(@params, "session.subscribe"); +internal sealed class SubscribeCommand(SubscribeParameters @params) + : Command(@params, "session.subscribe"); -internal sealed record SubscribeCommandParameters(IEnumerable Events, IEnumerable? Contexts) : CommandParameters; +internal sealed record SubscribeParameters(IEnumerable Events, IEnumerable? Contexts) : Parameters; public sealed class SubscribeOptions : CommandOptions { diff --git a/dotnet/src/webdriver/BiDi/Session/UnsubscribeCommand.cs b/dotnet/src/webdriver/BiDi/Session/UnsubscribeCommand.cs index 4540126b32e5f..7ab9e722b797b 100644 --- a/dotnet/src/webdriver/BiDi/Session/UnsubscribeCommand.cs +++ b/dotnet/src/webdriver/BiDi/Session/UnsubscribeCommand.cs @@ -23,21 +23,21 @@ namespace OpenQA.Selenium.BiDi.Session; -internal sealed class UnsubscribeByIdCommand(UnsubscribeByIdCommandParameters @params) - : Command(@params, "session.unsubscribe"); +internal sealed class UnsubscribeByIdCommand(UnsubscribeByIdParameters @params) + : Command(@params, "session.unsubscribe"); -internal sealed class UnsubscribeByAttributesCommand(UnsubscribeByAttributesCommandParameters @params) - : Command(@params, "session.unsubscribe"); +internal sealed class UnsubscribeByAttributesCommand(UnsubscribeByAttributesParameters @params) + : Command(@params, "session.unsubscribe"); -internal sealed record UnsubscribeByIdCommandParameters(IEnumerable Subscriptions) : CommandParameters; +internal sealed record UnsubscribeByIdParameters(IEnumerable Subscriptions) : Parameters; public sealed class UnsubscribeByIdOptions : CommandOptions; -internal sealed record UnsubscribeByAttributesCommandParameters( +internal sealed record UnsubscribeByAttributesParameters( IEnumerable Events, [property: Obsolete("Contexts param is deprecated and will be removed in the future versions")] // https://w3c.github.io/webdriver-bidi/#type-session-UnsubscribeByAttributesRequest - IEnumerable? Contexts) : CommandParameters; + IEnumerable? Contexts) : Parameters; public sealed class UnsubscribeByAttributesOptions : CommandOptions { diff --git a/dotnet/src/webdriver/BiDi/Storage/DeleteCookiesCommand.cs b/dotnet/src/webdriver/BiDi/Storage/DeleteCookiesCommand.cs index cb3d061fb4b88..31adb809f6e72 100644 --- a/dotnet/src/webdriver/BiDi/Storage/DeleteCookiesCommand.cs +++ b/dotnet/src/webdriver/BiDi/Storage/DeleteCookiesCommand.cs @@ -21,10 +21,10 @@ namespace OpenQA.Selenium.BiDi.Storage; -internal sealed class DeleteCookiesCommand(DeleteCookiesCommandParameters @params) - : Command(@params, "storage.deleteCookies"); +internal sealed class DeleteCookiesCommand(DeleteCookiesParameters @params) + : Command(@params, "storage.deleteCookies"); -internal sealed record DeleteCookiesCommandParameters(CookieFilter? Filter, PartitionDescriptor? Partition) : CommandParameters; +internal sealed record DeleteCookiesParameters(CookieFilter? Filter, PartitionDescriptor? Partition) : Parameters; public sealed class DeleteCookiesOptions : CommandOptions { diff --git a/dotnet/src/webdriver/BiDi/Storage/GetCookiesCommand.cs b/dotnet/src/webdriver/BiDi/Storage/GetCookiesCommand.cs index 9e097dacf3e14..781de8e09a4f9 100644 --- a/dotnet/src/webdriver/BiDi/Storage/GetCookiesCommand.cs +++ b/dotnet/src/webdriver/BiDi/Storage/GetCookiesCommand.cs @@ -25,10 +25,10 @@ namespace OpenQA.Selenium.BiDi.Storage; -internal sealed class GetCookiesCommand(GetCookiesCommandParameters @params) - : Command(@params, "storage.getCookies"); +internal sealed class GetCookiesCommand(GetCookiesParameters @params) + : Command(@params, "storage.getCookies"); -internal sealed record GetCookiesCommandParameters(CookieFilter? Filter, PartitionDescriptor? Partition) : CommandParameters; +internal sealed record GetCookiesParameters(CookieFilter? Filter, PartitionDescriptor? Partition) : Parameters; public sealed class GetCookiesOptions : CommandOptions { diff --git a/dotnet/src/webdriver/BiDi/Storage/SetCookieCommand.cs b/dotnet/src/webdriver/BiDi/Storage/SetCookieCommand.cs index e92f99bfb2057..d8f22a6905e3a 100644 --- a/dotnet/src/webdriver/BiDi/Storage/SetCookieCommand.cs +++ b/dotnet/src/webdriver/BiDi/Storage/SetCookieCommand.cs @@ -22,10 +22,10 @@ namespace OpenQA.Selenium.BiDi.Storage; -internal sealed class SetCookieCommand(SetCookieCommandParameters @params) - : Command(@params, "storage.setCookie"); +internal sealed class SetCookieCommand(SetCookieParameters @params) + : Command(@params, "storage.setCookie"); -internal sealed record SetCookieCommandParameters(PartialCookie Cookie, PartitionDescriptor? Partition) : CommandParameters; +internal sealed record SetCookieParameters(PartialCookie Cookie, PartitionDescriptor? Partition) : Parameters; public sealed record PartialCookie(string Name, Network.BytesValue Value, string Domain) { diff --git a/dotnet/src/webdriver/BiDi/Storage/StorageModule.cs b/dotnet/src/webdriver/BiDi/Storage/StorageModule.cs index 0fdd70288a141..7b51658794519 100644 --- a/dotnet/src/webdriver/BiDi/Storage/StorageModule.cs +++ b/dotnet/src/webdriver/BiDi/Storage/StorageModule.cs @@ -26,21 +26,21 @@ public sealed class StorageModule(Broker broker) : Module(broker) { public async Task GetCookiesAsync(GetCookiesOptions? options = null) { - var @params = new GetCookiesCommandParameters(options?.Filter, options?.Partition); + var @params = new GetCookiesParameters(options?.Filter, options?.Partition); return await Broker.ExecuteCommandAsync(new GetCookiesCommand(@params), options).ConfigureAwait(false); } public async Task DeleteCookiesAsync(DeleteCookiesOptions? options = null) { - var @params = new DeleteCookiesCommandParameters(options?.Filter, options?.Partition); + var @params = new DeleteCookiesParameters(options?.Filter, options?.Partition); return await Broker.ExecuteCommandAsync(new DeleteCookiesCommand(@params), options).ConfigureAwait(false); } public async Task SetCookieAsync(PartialCookie cookie, SetCookieOptions? options = null) { - var @params = new SetCookieCommandParameters(cookie, options?.Partition); + var @params = new SetCookieParameters(cookie, options?.Partition); return await Broker.ExecuteCommandAsync(new SetCookieCommand(@params), options).ConfigureAwait(false); }