Skip to content

Commit 929f343

Browse files
authored
[dotnet] [bidi] Add UnhandledPromptBehavior option to create User Context (#16034)
1 parent cbe4b3a commit 929f343

File tree

2 files changed

+4
-2
lines changed

2 files changed

+4
-2
lines changed

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

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -31,7 +31,7 @@ public async Task CloseAsync(CloseOptions? options = null)
3131

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

3636
return await Broker.ExecuteCommandAsync<CreateUserContextCommand, UserContextInfo>(new CreateUserContextCommand(@params), options).ConfigureAwait(false);
3737
}

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

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -24,11 +24,13 @@ namespace OpenQA.Selenium.BiDi.Browser;
2424
internal sealed class CreateUserContextCommand(CreateUserContextCommandParameters @params)
2525
: Command<CreateUserContextCommandParameters, UserContextInfo>(@params, "browser.createUserContext");
2626

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

2929
public sealed class CreateUserContextOptions : CommandOptions
3030
{
3131
public bool? AcceptInsecureCerts { get; set; }
3232

3333
public Session.ProxyConfiguration? Proxy { get; set; }
34+
35+
public Session.UserPromptHandler? UnhandledPromptBehavior { get; set; }
3436
}

0 commit comments

Comments
 (0)