[dotnet] [bidi] Add AcceptInsecureCerts and Proxy options when create new user context by nvborisenko · Pull Request #15795 · SeleniumHQ/selenium
User description
🔗 Related Issues
💥 What does this PR do?
Implements https://w3c.github.io/webdriver-bidi/#command-browser-createUserContext
var userContext = await bidi.Browser.CreateUserContextAsync(new() { AcceptInsecureCerts = true, Proxy = new Modules.Session.AutoDetectProxyConfiguration() });
🔧 Implementation Notes
💡 Additional Considerations
🔄 Types of changes
- New feature (non-breaking change which adds functionality and tests!)
PR Type
Enhancement
Description
-
Add AcceptInsecureCerts and Proxy options to CreateUserContext
-
Update command parameter handling for user context creation
-
Enhance .NET BiDi BrowserModule for flexible user context setup
Changes walkthrough 📝
| Relevant files | |||||
|---|---|---|---|---|---|
| Enhancement |
|
Need help?
Type /help how to ...in the comments thread for any questions about Qodo Merge usage.Check out the documentation for more information.
PR Reviewer Guide 🔍
Here are some key observations to aid the review process:
|
🎫 Ticket compliance analysis ❌ 5678 - Not compliant Non-compliant requirements: • Fix "Error: ConnectFailure (Connection refused)" when instantiating Chrome Driver multiple times Requires further human verification: • Need to verify if the PR's implementation of AcceptInsecureCerts could potentially help with connection issues 1234 - Not compliant Non-compliant requirements: • Fix issue where Firefox 42.0 doesn't trigger JavaScript in link's href on click() |
| ⏱️ Estimated effort to review: 2 🔵🔵⚪⚪⚪ |
| 🧪 No relevant tests |
| 🔒 No security concerns identified |
⚡ Recommended focus areas for reviewIncomplete Implementation
|
PR Code Suggestions ✨
Explore these optional code suggestions:
| Category | Suggestion | Impact |
| Possible issue |
Remove redundant parameterThe dotnet/src/webdriver/BiDi/Modules/Browser/BrowserModule.cs [34-36] var @params = new CreateUserContextCommandParameters(options?.AcceptInsecureCerts, options?.Proxy); -return await Broker.ExecuteCommandAsync<CreateUserContextCommand, UserContextInfo>(new CreateUserContextCommand(@params), options).ConfigureAwait(false); +return await Broker.ExecuteCommandAsync<CreateUserContextCommand, UserContextInfo>(new CreateUserContextCommand(@params), null).ConfigureAwait(false);
Suggestion importance[1-10]: 4__ Why: The suggestion to remove the second | Low |
| ||
This was referenced
Sep 12, 2025This was referenced
Sep 19, 2025This was referenced
Oct 1, 2025This was referenced
Dec 21, 2025This was referenced
Jan 19, 2026This was referenced
Feb 16, 2026This was referenced
Feb 23, 2026This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode characters