Skip to content

Commit 0a0967d

Browse files
authored
Merge branch 'SeleniumHQ:trunk' into py-selenium-manager-arm-support
2 parents 402783e + 61b10bc commit 0a0967d

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

56 files changed

+482
-415
lines changed

dotnet/src/webdriver/BiDi/Browser/BrowserModule.cs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -31,7 +31,7 @@ public async Task<EmptyResult> CloseAsync(CloseOptions? options = null)
3131

3232
public async Task<UserContextInfo> CreateUserContextAsync(CreateUserContextOptions? options = null)
3333
{
34-
var @params = new CreateUserContextCommandParameters(options?.AcceptInsecureCerts, options?.Proxy, options?.UnhandledPromptBehavior);
34+
var @params = new CreateUserContextParameters(options?.AcceptInsecureCerts, options?.Proxy, options?.UnhandledPromptBehavior);
3535

3636
return await Broker.ExecuteCommandAsync<CreateUserContextCommand, UserContextInfo>(new CreateUserContextCommand(@params), options).ConfigureAwait(false);
3737
}
@@ -43,7 +43,7 @@ public async Task<GetUserContextsResult> GetUserContextsAsync(GetUserContextsOpt
4343

4444
public async Task<EmptyResult> RemoveUserContextAsync(UserContext userContext, RemoveUserContextOptions? options = null)
4545
{
46-
var @params = new RemoveUserContextCommandParameters(userContext);
46+
var @params = new RemoveUserContextParameters(userContext);
4747

4848
return await Broker.ExecuteCommandAsync<RemoveUserContextCommand, EmptyResult>(new RemoveUserContextCommand(@params), options).ConfigureAwait(false);
4949
}

dotnet/src/webdriver/BiDi/Browser/CloseCommand.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -22,6 +22,6 @@
2222
namespace OpenQA.Selenium.BiDi.Browser;
2323

2424
internal sealed class CloseCommand()
25-
: Command<CommandParameters, EmptyResult>(CommandParameters.Empty, "browser.close");
25+
: Command<Parameters, EmptyResult>(Parameters.Empty, "browser.close");
2626

2727
public sealed class CloseOptions : CommandOptions;

dotnet/src/webdriver/BiDi/Browser/CreateUserContextCommand.cs

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -21,10 +21,10 @@
2121

2222
namespace OpenQA.Selenium.BiDi.Browser;
2323

24-
internal sealed class CreateUserContextCommand(CreateUserContextCommandParameters @params)
25-
: Command<CreateUserContextCommandParameters, UserContextInfo>(@params, "browser.createUserContext");
24+
internal sealed class CreateUserContextCommand(CreateUserContextParameters @params)
25+
: Command<CreateUserContextParameters, UserContextInfo>(@params, "browser.createUserContext");
2626

27-
internal sealed record CreateUserContextCommandParameters(bool? AcceptInsecureCerts, Session.ProxyConfiguration? Proxy, Session.UserPromptHandler? UnhandledPromptBehavior) : CommandParameters;
27+
internal sealed record CreateUserContextParameters(bool? AcceptInsecureCerts, Session.ProxyConfiguration? Proxy, Session.UserPromptHandler? UnhandledPromptBehavior) : Parameters;
2828

2929
public sealed class CreateUserContextOptions : CommandOptions
3030
{

dotnet/src/webdriver/BiDi/Browser/GetClientWindowsCommand.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,7 @@
2424
namespace OpenQA.Selenium.BiDi.Browser;
2525

2626
internal sealed class GetClientWindowsCommand()
27-
: Command<CommandParameters, GetClientWindowsResult>(CommandParameters.Empty, "browser.getClientWindows");
27+
: Command<Parameters, GetClientWindowsResult>(Parameters.Empty, "browser.getClientWindows");
2828

2929
public sealed class GetClientWindowsOptions : CommandOptions;
3030

dotnet/src/webdriver/BiDi/Browser/GetUserContextsCommand.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,7 @@
2424
namespace OpenQA.Selenium.BiDi.Browser;
2525

2626
internal sealed class GetUserContextsCommand()
27-
: Command<CommandParameters, GetUserContextsResult>(CommandParameters.Empty, "browser.getUserContexts");
27+
: Command<Parameters, GetUserContextsResult>(Parameters.Empty, "browser.getUserContexts");
2828

2929
public class GetUserContextsOptions : CommandOptions;
3030

dotnet/src/webdriver/BiDi/Browser/RemoveUserContextCommand.cs

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -21,9 +21,9 @@
2121

2222
namespace OpenQA.Selenium.BiDi.Browser;
2323

24-
internal sealed class RemoveUserContextCommand(RemoveUserContextCommandParameters @params)
25-
: Command<RemoveUserContextCommandParameters, EmptyResult>(@params, "browser.removeUserContext");
24+
internal sealed class RemoveUserContextCommand(RemoveUserContextParameters @params)
25+
: Command<RemoveUserContextParameters, EmptyResult>(@params, "browser.removeUserContext");
2626

27-
internal sealed record RemoveUserContextCommandParameters(UserContext UserContext) : CommandParameters;
27+
internal sealed record RemoveUserContextParameters(UserContext UserContext) : Parameters;
2828

2929
public sealed class RemoveUserContextOptions : CommandOptions;

dotnet/src/webdriver/BiDi/BrowsingContext/ActivateCommand.cs

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -21,9 +21,9 @@
2121

2222
namespace OpenQA.Selenium.BiDi.BrowsingContext;
2323

24-
internal sealed class ActivateCommand(ActivateCommandParameters @params)
25-
: Command<ActivateCommandParameters, EmptyResult>(@params, "browsingContext.activate");
24+
internal sealed class ActivateCommand(ActivateParameters @params)
25+
: Command<ActivateParameters, EmptyResult>(@params, "browsingContext.activate");
2626

27-
internal sealed record ActivateCommandParameters(BrowsingContext Context) : CommandParameters;
27+
internal sealed record ActivateParameters(BrowsingContext Context) : Parameters;
2828

2929
public sealed class ActivateOptions : CommandOptions;

dotnet/src/webdriver/BiDi/BrowsingContext/BrowsingContextModule.cs

Lines changed: 12 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,7 @@ public sealed class BrowsingContextModule(Broker broker) : Module(broker)
2727
{
2828
public async Task<BrowsingContext> CreateAsync(ContextType type, CreateOptions? options = null)
2929
{
30-
var @params = new CreateCommandParameters(type, options?.ReferenceContext, options?.Background, options?.UserContext);
30+
var @params = new CreateParameters(type, options?.ReferenceContext, options?.Background, options?.UserContext);
3131

3232
var createResult = await Broker.ExecuteCommandAsync<CreateCommand, CreateResult>(new CreateCommand(@params), options).ConfigureAwait(false);
3333

@@ -36,77 +36,77 @@ public async Task<BrowsingContext> CreateAsync(ContextType type, CreateOptions?
3636

3737
public async Task<NavigateResult> NavigateAsync(BrowsingContext context, string url, NavigateOptions? options = null)
3838
{
39-
var @params = new NavigateCommandParameters(context, url, options?.Wait);
39+
var @params = new NavigateParameters(context, url, options?.Wait);
4040

4141
return await Broker.ExecuteCommandAsync<NavigateCommand, NavigateResult>(new NavigateCommand(@params), options).ConfigureAwait(false);
4242
}
4343

4444
public async Task<EmptyResult> ActivateAsync(BrowsingContext context, ActivateOptions? options = null)
4545
{
46-
var @params = new ActivateCommandParameters(context);
46+
var @params = new ActivateParameters(context);
4747

4848
return await Broker.ExecuteCommandAsync<ActivateCommand, EmptyResult>(new ActivateCommand(@params), options).ConfigureAwait(false);
4949
}
5050

5151
public async Task<LocateNodesResult> LocateNodesAsync(BrowsingContext context, Locator locator, LocateNodesOptions? options = null)
5252
{
53-
var @params = new LocateNodesCommandParameters(context, locator, options?.MaxNodeCount, options?.SerializationOptions, options?.StartNodes);
53+
var @params = new LocateNodesParameters(context, locator, options?.MaxNodeCount, options?.SerializationOptions, options?.StartNodes);
5454

5555
return await Broker.ExecuteCommandAsync<LocateNodesCommand, LocateNodesResult>(new LocateNodesCommand(@params), options).ConfigureAwait(false);
5656
}
5757

5858
public async Task<CaptureScreenshotResult> CaptureScreenshotAsync(BrowsingContext context, CaptureScreenshotOptions? options = null)
5959
{
60-
var @params = new CaptureScreenshotCommandParameters(context, options?.Origin, options?.Format, options?.Clip);
60+
var @params = new CaptureScreenshotParameters(context, options?.Origin, options?.Format, options?.Clip);
6161

6262
return await Broker.ExecuteCommandAsync<CaptureScreenshotCommand, CaptureScreenshotResult>(new CaptureScreenshotCommand(@params), options).ConfigureAwait(false);
6363
}
6464

6565
public async Task<EmptyResult> CloseAsync(BrowsingContext context, CloseOptions? options = null)
6666
{
67-
var @params = new CloseCommandParameters(context, options?.PromptUnload);
67+
var @params = new CloseParameters(context, options?.PromptUnload);
6868

6969
return await Broker.ExecuteCommandAsync<CloseCommand, EmptyResult>(new CloseCommand(@params), options).ConfigureAwait(false);
7070
}
7171

7272
public async Task<TraverseHistoryResult> TraverseHistoryAsync(BrowsingContext context, int delta, TraverseHistoryOptions? options = null)
7373
{
74-
var @params = new TraverseHistoryCommandParameters(context, delta);
74+
var @params = new TraverseHistoryParameters(context, delta);
7575

7676
return await Broker.ExecuteCommandAsync<TraverseHistoryCommand, TraverseHistoryResult>(new TraverseHistoryCommand(@params), options).ConfigureAwait(false);
7777
}
7878

7979
public async Task<NavigateResult> ReloadAsync(BrowsingContext context, ReloadOptions? options = null)
8080
{
81-
var @params = new ReloadCommandParameters(context, options?.IgnoreCache, options?.Wait);
81+
var @params = new ReloadParameters(context, options?.IgnoreCache, options?.Wait);
8282

8383
return await Broker.ExecuteCommandAsync<ReloadCommand, NavigateResult>(new ReloadCommand(@params), options).ConfigureAwait(false);
8484
}
8585

8686
public async Task<EmptyResult> SetViewportAsync(BrowsingContext context, SetViewportOptions? options = null)
8787
{
88-
var @params = new SetViewportCommandParameters(context, options?.Viewport, options?.DevicePixelRatio);
88+
var @params = new SetViewportParameters(context, options?.Viewport, options?.DevicePixelRatio);
8989

9090
return await Broker.ExecuteCommandAsync<SetViewportCommand, EmptyResult>(new SetViewportCommand(@params), options).ConfigureAwait(false);
9191
}
9292

9393
public async Task<GetTreeResult> GetTreeAsync(GetTreeOptions? options = null)
9494
{
95-
var @params = new GetTreeCommandParameters(options?.MaxDepth, options?.Root);
95+
var @params = new GetTreeParameters(options?.MaxDepth, options?.Root);
9696

9797
return await Broker.ExecuteCommandAsync<GetTreeCommand, GetTreeResult>(new GetTreeCommand(@params), options).ConfigureAwait(false);
9898
}
9999

100100
public async Task<PrintResult> PrintAsync(BrowsingContext context, PrintOptions? options = null)
101101
{
102-
var @params = new PrintCommandParameters(context, options?.Background, options?.Margin, options?.Orientation, options?.Page, options?.PageRanges, options?.Scale, options?.ShrinkToFit);
102+
var @params = new PrintParameters(context, options?.Background, options?.Margin, options?.Orientation, options?.Page, options?.PageRanges, options?.Scale, options?.ShrinkToFit);
103103

104104
return await Broker.ExecuteCommandAsync<PrintCommand, PrintResult>(new PrintCommand(@params), options).ConfigureAwait(false);
105105
}
106106

107107
public async Task<EmptyResult> HandleUserPromptAsync(BrowsingContext context, HandleUserPromptOptions? options = null)
108108
{
109-
var @params = new HandleUserPromptCommandParameters(context, options?.Accept, options?.UserText);
109+
var @params = new HandleUserPromptParameters(context, options?.Accept, options?.UserText);
110110

111111
return await Broker.ExecuteCommandAsync<HandleUserPromptCommand, EmptyResult>(new HandleUserPromptCommand(@params), options).ConfigureAwait(false);
112112
}

dotnet/src/webdriver/BiDi/BrowsingContext/CaptureScreenshotCommand.cs

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -22,10 +22,10 @@
2222

2323
namespace OpenQA.Selenium.BiDi.BrowsingContext;
2424

25-
internal sealed class CaptureScreenshotCommand(CaptureScreenshotCommandParameters @params)
26-
: Command<CaptureScreenshotCommandParameters, CaptureScreenshotResult>(@params, "browsingContext.captureScreenshot");
25+
internal sealed class CaptureScreenshotCommand(CaptureScreenshotParameters @params)
26+
: Command<CaptureScreenshotParameters, CaptureScreenshotResult>(@params, "browsingContext.captureScreenshot");
2727

28-
internal sealed record CaptureScreenshotCommandParameters(BrowsingContext Context, ScreenshotOrigin? Origin, ImageFormat? Format, ClipRectangle? Clip) : CommandParameters;
28+
internal sealed record CaptureScreenshotParameters(BrowsingContext Context, ScreenshotOrigin? Origin, ImageFormat? Format, ClipRectangle? Clip) : Parameters;
2929

3030
public sealed class CaptureScreenshotOptions : CommandOptions
3131
{

dotnet/src/webdriver/BiDi/BrowsingContext/CloseCommand.cs

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -21,10 +21,10 @@
2121

2222
namespace OpenQA.Selenium.BiDi.BrowsingContext;
2323

24-
internal sealed class CloseCommand(CloseCommandParameters @params)
25-
: Command<CloseCommandParameters, EmptyResult>(@params, "browsingContext.close");
24+
internal sealed class CloseCommand(CloseParameters @params)
25+
: Command<CloseParameters, EmptyResult>(@params, "browsingContext.close");
2626

27-
internal sealed record CloseCommandParameters(BrowsingContext Context, bool? PromptUnload) : CommandParameters;
27+
internal sealed record CloseParameters(BrowsingContext Context, bool? PromptUnload) : Parameters;
2828

2929
public sealed class CloseOptions : CommandOptions
3030
{

0 commit comments

Comments
 (0)