[dotnet] [bidi] Align ContinueWithAuth command#17337
[dotnet] [bidi] Align ContinueWithAuth command#17337nvborisenko merged 5 commits intoSeleniumHQ:trunkfrom
Conversation
Review Summary by QodoAlign SetDownloadBehavior and ContinueWithAuth commands with polymorphic pattern
WalkthroughsDescription• Consolidate multiple method overloads into single polymorphic methods • Make DownloadBehavior and ContinueWithAuth types public for extensibility • Simplify API by accepting polymorphic action parameters instead of separate overloads • Update test code to use new unified method signatures File Changes1. dotnet/src/webdriver/BiDi/Browser/BrowserModule.cs
|
Code Review by Qodo
|
There was a problem hiding this comment.
Pull request overview
Refactors the WebDriver BiDi .NET APIs for network authentication continuation and browser download behavior by consolidating multiple overloads into single polymorphic methods, and updating call sites in the BiDi tests.
Changes:
- Replaced multiple
ContinueWithAuthAsyncoverloads with a single method taking aContinueWithAuthaction object. - Replaced multiple
SetDownloadBehavior*Asyncoverloads with a singleSetDownloadBehaviorAsync(DownloadBehavior?)method and madeDownloadBehaviorpublic. - Updated BiDi test usage to the new consolidated APIs.
Reviewed changes
Copilot reviewed 4 out of 4 changed files in this pull request and generated 3 comments.
Show a summary per file
| File | Description |
|---|---|
| dotnet/test/webdriver/BiDi/Network/NetworkTests.cs | Updates auth continuation calls to new ContinueWithAuth action types. |
| dotnet/test/webdriver/BiDi/Browser/BrowserTests.cs | Updates download behavior tests to new consolidated API and public behavior types. |
| dotnet/src/webdriver/BiDi/Network/NetworkModule.cs | Implements consolidated ContinueWithAuthAsync with action-to-parameters mapping. |
| dotnet/src/webdriver/BiDi/Network/INetworkModule.cs | Updates public interface to single ContinueWithAuthAsync signature. |
| dotnet/src/webdriver/BiDi/Network/ContinueWithAuth.cs | Introduces public ContinueWithAuth action records; reshapes options/parameters types. |
| dotnet/src/webdriver/BiDi/Browser/SetDownloadBehavior.cs | Makes DownloadBehavior public and adds Default convenience value. |
| dotnet/src/webdriver/BiDi/Browser/IBrowserModule.cs | Updates public interface to single SetDownloadBehaviorAsync signature. |
| dotnet/src/webdriver/BiDi/Browser/BrowserModule.cs | Implements consolidated SetDownloadBehaviorAsync. |
One more polymorphic command.
💥 What does this PR do?
This pull request refactors and simplifies the APIs for controlling network authentication in the WebDriver BiDi .NET bindings. The changes consolidate multiple method overloads into single, more flexible methods, and update the related types to be public and more extensible. Test code is updated accordingly.
🔄 Types of changes