Skip to content

Commit 0729352

Browse files
committed
Input
1 parent 34534c7 commit 0729352

File tree

5 files changed

+18
-9
lines changed

5 files changed

+18
-9
lines changed

dotnet/src/webdriver/BiDi/Communication/Json/BiDiJsonSerializerContext.cs

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -190,8 +190,11 @@ namespace OpenQA.Selenium.BiDi.Communication.Json;
190190
[JsonSerializable(typeof(Storage.DeleteCookiesResult))]
191191

192192
[JsonSerializable(typeof(Input.PerformActionsCommand))]
193+
[JsonSerializable(typeof(Input.PerformActionsResult))]
193194
[JsonSerializable(typeof(Input.ReleaseActionsCommand))]
195+
[JsonSerializable(typeof(Input.ReleaseActionsResult))]
194196
[JsonSerializable(typeof(Input.SetFilesCommand))]
197+
[JsonSerializable(typeof(Input.SetFilesResult))]
195198
[JsonSerializable(typeof(IEnumerable<Input.IPointerSourceAction>))]
196199
[JsonSerializable(typeof(IEnumerable<Input.IKeySourceAction>))]
197200
[JsonSerializable(typeof(IEnumerable<Input.INoneSourceAction>))]

dotnet/src/webdriver/BiDi/Input/InputModule.cs

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -25,24 +25,24 @@ namespace OpenQA.Selenium.BiDi.Input;
2525

2626
public sealed class InputModule : Module
2727
{
28-
public async Task<EmptyResult> PerformActionsAsync(BrowsingContext.BrowsingContext context, IEnumerable<SourceActions> actions, PerformActionsOptions? options = null)
28+
public async Task<PerformActionsResult> PerformActionsAsync(BrowsingContext.BrowsingContext context, IEnumerable<SourceActions> actions, PerformActionsOptions? options = null)
2929
{
3030
var @params = new PerformActionsParameters(context, actions);
3131

32-
return await Broker.ExecuteCommandAsync(new PerformActionsCommand(@params), options, JsonContext.PerformActionsCommand, JsonContext.EmptyResult).ConfigureAwait(false);
32+
return await Broker.ExecuteCommandAsync(new PerformActionsCommand(@params), options, JsonContext.PerformActionsCommand, JsonContext.PerformActionsResult).ConfigureAwait(false);
3333
}
3434

35-
public async Task<EmptyResult> ReleaseActionsAsync(BrowsingContext.BrowsingContext context, ReleaseActionsOptions? options = null)
35+
public async Task<ReleaseActionsResult> ReleaseActionsAsync(BrowsingContext.BrowsingContext context, ReleaseActionsOptions? options = null)
3636
{
3737
var @params = new ReleaseActionsParameters(context);
3838

39-
return await Broker.ExecuteCommandAsync(new ReleaseActionsCommand(@params), options, JsonContext.ReleaseActionsCommand, JsonContext.EmptyResult).ConfigureAwait(false);
39+
return await Broker.ExecuteCommandAsync(new ReleaseActionsCommand(@params), options, JsonContext.ReleaseActionsCommand, JsonContext.ReleaseActionsResult).ConfigureAwait(false);
4040
}
4141

42-
public async Task<EmptyResult> SetFilesAsync(BrowsingContext.BrowsingContext context, Script.ISharedReference element, IEnumerable<string> files, SetFilesOptions? options = null)
42+
public async Task<SetFilesResult> SetFilesAsync(BrowsingContext.BrowsingContext context, Script.ISharedReference element, IEnumerable<string> files, SetFilesOptions? options = null)
4343
{
4444
var @params = new SetFilesParameters(context, element, files);
4545

46-
return await Broker.ExecuteCommandAsync(new SetFilesCommand(@params), options, JsonContext.SetFilesCommand, JsonContext.EmptyResult).ConfigureAwait(false);
46+
return await Broker.ExecuteCommandAsync(new SetFilesCommand(@params), options, JsonContext.SetFilesCommand, JsonContext.SetFilesResult).ConfigureAwait(false);
4747
}
4848
}

dotnet/src/webdriver/BiDi/Input/PerformActionsCommand.cs

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -23,8 +23,10 @@
2323
namespace OpenQA.Selenium.BiDi.Input;
2424

2525
internal sealed class PerformActionsCommand(PerformActionsParameters @params)
26-
: Command<PerformActionsParameters, EmptyResult>(@params, "input.performActions");
26+
: Command<PerformActionsParameters, PerformActionsResult>(@params, "input.performActions");
2727

2828
internal sealed record PerformActionsParameters(BrowsingContext.BrowsingContext Context, IEnumerable<SourceActions> Actions) : Parameters;
2929

3030
public sealed class PerformActionsOptions : CommandOptions;
31+
32+
public sealed record PerformActionsResult : EmptyResult;

dotnet/src/webdriver/BiDi/Input/ReleaseActionsCommand.cs

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -22,8 +22,10 @@
2222
namespace OpenQA.Selenium.BiDi.Input;
2323

2424
internal sealed class ReleaseActionsCommand(ReleaseActionsParameters @params)
25-
: Command<ReleaseActionsParameters, EmptyResult>(@params, "input.releaseActions");
25+
: Command<ReleaseActionsParameters, ReleaseActionsResult>(@params, "input.releaseActions");
2626

2727
internal sealed record ReleaseActionsParameters(BrowsingContext.BrowsingContext Context) : Parameters;
2828

2929
public sealed class ReleaseActionsOptions : CommandOptions;
30+
31+
public sealed record ReleaseActionsResult : EmptyResult;

dotnet/src/webdriver/BiDi/Input/SetFilesCommand.cs

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -23,8 +23,10 @@
2323
namespace OpenQA.Selenium.BiDi.Input;
2424

2525
internal sealed class SetFilesCommand(SetFilesParameters @params)
26-
: Command<SetFilesParameters, EmptyResult>(@params, "input.setFiles");
26+
: Command<SetFilesParameters, SetFilesResult>(@params, "input.setFiles");
2727

2828
internal sealed record SetFilesParameters(BrowsingContext.BrowsingContext Context, Script.ISharedReference Element, IEnumerable<string> Files) : Parameters;
2929

3030
public sealed class SetFilesOptions : CommandOptions;
31+
32+
public sealed record SetFilesResult : EmptyResult;

0 commit comments

Comments
 (0)