Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Conversation

nvborisenko
Copy link
Member

@nvborisenko nvborisenko commented Jul 9, 2025

User description

Spec: https://w3c.github.io/webdriver-bidi/#command-browser-createUserContext

πŸ”§ Implementation Notes

Easy change.

πŸ’‘ Additional Considerations

πŸ”„ Types of changes

  • New feature (non-breaking change which adds functionality and tests!)

PR Type

Enhancement


Description

  • Add UnhandledPromptBehavior option to BiDi CreateUserContext command

  • Update command parameters and options to support prompt handling configuration


Changes diagram

flowchart LR
  A["CreateUserContextOptions"] --> B["UnhandledPromptBehavior property"]
  B --> C["CreateUserContextCommandParameters"]
  C --> D["BrowserModule.CreateUserContextAsync"]
Loading

Changes walkthrough πŸ“

Relevant files
Enhancement
BrowserModule.cs
Pass UnhandledPromptBehavior to command parametersΒ  Β  Β  Β  Β  Β  Β 

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

  • Update CreateUserContextAsync method to pass UnhandledPromptBehavior
    parameter
  • Modify CreateUserContextCommandParameters constructor call
  • +1/-1Β  Β  Β 
    CreateUserContextCommand.cs
    Add UnhandledPromptBehavior support to command structureΒ 

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

  • Add UnhandledPromptBehavior parameter to
    CreateUserContextCommandParameters record
  • Add UnhandledPromptBehavior property to CreateUserContextOptions class
  • +3/-1Β  Β  Β 

    Need help?
  • Type /help how to ... in the comments thread for any questions about Qodo Merge usage.
  • Check out the documentation for more information.
  • @selenium-ci selenium-ci added the C-dotnet .NET Bindings label Jul 9, 2025
    Copy link
    Contributor

    qodo-merge-pro bot commented Jul 9, 2025

    PR Reviewer Guide πŸ”

    Here are some key observations to aid the review process:

    ⏱️ Estimated effort to review: 2 πŸ”΅πŸ”΅βšͺβšͺβšͺ
    πŸ§ͺΒ No relevant tests
    πŸ”’Β No security concerns identified
    ⚑ Recommended focus areas for review

    Missing Tests

    The new UnhandledPromptBehavior parameter is added without corresponding unit tests to verify the parameter is properly passed through the command chain and serialized correctly.

    internal sealed record CreateUserContextCommandParameters(bool? AcceptInsecureCerts, Session.ProxyConfiguration? Proxy, Session.UserPromptHandler? UnhandledPromptBehavior) : CommandParameters;
    
    public sealed class CreateUserContextOptions : CommandOptions
    {
        public bool? AcceptInsecureCerts { get; set; }
    
        public Session.ProxyConfiguration? Proxy { get; set; }
    
        public Session.UserPromptHandler? UnhandledPromptBehavior { get; set; }

    Copy link
    Contributor

    qodo-merge-pro bot commented Jul 9, 2025

    PR Code Suggestions ✨

    No code suggestions found for the PR.

    @nvborisenko nvborisenko merged commit 929f343 into SeleniumHQ:trunk Jul 9, 2025
    13 checks passed
    @nvborisenko nvborisenko deleted the bidi-uc-prompt branch July 9, 2025 21:28
    Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
    Labels
    Projects
    None yet
    Development

    Successfully merging this pull request may close these issues.

    2 participants