@@ -24,28 +24,28 @@ namespace OpenQA.Selenium.BiDi.Browser;
24
24
25
25
public sealed class BrowserModule : Module
26
26
{
27
- public async Task < EmptyResult > CloseAsync ( CloseOptions ? options = null )
27
+ public async Task < CloseResult > CloseAsync ( CloseOptions ? options = null )
28
28
{
29
- return await Broker . ExecuteCommandAsync ( new CloseCommand ( ) , options , JsonContext . Browser_CloseCommand , JsonContext . EmptyResult ) . ConfigureAwait ( false ) ;
29
+ return await Broker . ExecuteCommandAsync ( new CloseCommand ( ) , options , JsonContext . Browser_CloseCommand , JsonContext . Browser_CloseResult ) . ConfigureAwait ( false ) ;
30
30
}
31
31
32
- public async Task < UserContextInfo > CreateUserContextAsync ( CreateUserContextOptions ? options = null )
32
+ public async Task < CreateUserContextResult > CreateUserContextAsync ( CreateUserContextOptions ? options = null )
33
33
{
34
34
var @params = new CreateUserContextParameters ( options ? . AcceptInsecureCerts , options ? . Proxy , options ? . UnhandledPromptBehavior ) ;
35
35
36
- return await Broker . ExecuteCommandAsync ( new CreateUserContextCommand ( @params ) , options , JsonContext . CreateUserContextCommand , JsonContext . UserContextInfo ) . ConfigureAwait ( false ) ;
36
+ return await Broker . ExecuteCommandAsync ( new CreateUserContextCommand ( @params ) , options , JsonContext . CreateUserContextCommand , JsonContext . CreateUserContextResult ) . ConfigureAwait ( false ) ;
37
37
}
38
38
39
39
public async Task < GetUserContextsResult > GetUserContextsAsync ( GetUserContextsOptions ? options = null )
40
40
{
41
41
return await Broker . ExecuteCommandAsync ( new GetUserContextsCommand ( ) , options , JsonContext . GetUserContextsCommand , JsonContext . GetUserContextsResult ) . ConfigureAwait ( false ) ;
42
42
}
43
43
44
- public async Task < EmptyResult > RemoveUserContextAsync ( UserContext userContext , RemoveUserContextOptions ? options = null )
44
+ public async Task < RemoveUserContextResult > RemoveUserContextAsync ( UserContext userContext , RemoveUserContextOptions ? options = null )
45
45
{
46
46
var @params = new RemoveUserContextParameters ( userContext ) ;
47
47
48
- return await Broker . ExecuteCommandAsync ( new RemoveUserContextCommand ( @params ) , options , JsonContext . RemoveUserContextCommand , JsonContext . EmptyResult ) . ConfigureAwait ( false ) ;
48
+ return await Broker . ExecuteCommandAsync ( new RemoveUserContextCommand ( @params ) , options , JsonContext . RemoveUserContextCommand , JsonContext . RemoveUserContextResult ) . ConfigureAwait ( false ) ;
49
49
}
50
50
51
51
public async Task < GetClientWindowsResult > GetClientWindowsAsync ( GetClientWindowsOptions ? options = null )
@@ -54,24 +54,24 @@ public async Task<GetClientWindowsResult> GetClientWindowsAsync(GetClientWindows
54
54
) . ConfigureAwait ( false ) ;
55
55
}
56
56
57
- public async Task < EmptyResult > SetDownloadBehaviorAllowedAsync ( string destinationFolder , SetDownloadBehaviorOptions ? options = null )
57
+ public async Task < SetDownloadBehaviorResult > SetDownloadBehaviorAllowedAsync ( string destinationFolder , SetDownloadBehaviorOptions ? options = null )
58
58
{
59
59
var @params = new SetDownloadBehaviorParameters ( new DownloadBehaviorAllowed ( destinationFolder ) , options ? . UserContexts ) ;
60
60
61
- return await Broker . ExecuteCommandAsync ( new SetDownloadBehaviorCommand ( @params ) , options , JsonContext . SetDownloadBehaviorCommand , JsonContext . EmptyResult ) . ConfigureAwait ( false ) ;
61
+ return await Broker . ExecuteCommandAsync ( new SetDownloadBehaviorCommand ( @params ) , options , JsonContext . SetDownloadBehaviorCommand , JsonContext . SetDownloadBehaviorResult ) . ConfigureAwait ( false ) ;
62
62
}
63
63
64
- public async Task < EmptyResult > SetDownloadBehaviorAllowedAsync ( SetDownloadBehaviorOptions ? options = null )
64
+ public async Task < SetDownloadBehaviorResult > SetDownloadBehaviorAllowedAsync ( SetDownloadBehaviorOptions ? options = null )
65
65
{
66
66
var @params = new SetDownloadBehaviorParameters ( null , options ? . UserContexts ) ;
67
67
68
- return await Broker . ExecuteCommandAsync ( new SetDownloadBehaviorCommand ( @params ) , options , JsonContext . SetDownloadBehaviorCommand , JsonContext . EmptyResult ) . ConfigureAwait ( false ) ;
68
+ return await Broker . ExecuteCommandAsync ( new SetDownloadBehaviorCommand ( @params ) , options , JsonContext . SetDownloadBehaviorCommand , JsonContext . SetDownloadBehaviorResult ) . ConfigureAwait ( false ) ;
69
69
}
70
70
71
- public async Task < EmptyResult > SetDownloadBehaviorDeniedAsync ( SetDownloadBehaviorOptions ? options = null )
71
+ public async Task < SetDownloadBehaviorResult > SetDownloadBehaviorDeniedAsync ( SetDownloadBehaviorOptions ? options = null )
72
72
{
73
73
var @params = new SetDownloadBehaviorParameters ( new DownloadBehaviorDenied ( ) , options ? . UserContexts ) ;
74
74
75
- return await Broker . ExecuteCommandAsync ( new SetDownloadBehaviorCommand ( @params ) , options , JsonContext . SetDownloadBehaviorCommand , JsonContext . EmptyResult ) . ConfigureAwait ( false ) ;
75
+ return await Broker . ExecuteCommandAsync ( new SetDownloadBehaviorCommand ( @params ) , options , JsonContext . SetDownloadBehaviorCommand , JsonContext . SetDownloadBehaviorResult ) . ConfigureAwait ( false ) ;
76
76
}
77
77
}
0 commit comments