Skip to content

[dotnet] [bidi] Preserve BiDi global options when instantiating BiDi #16080

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 1 commit into from
Jul 25, 2025

Conversation

nvborisenko
Copy link
Member

@nvborisenko nvborisenko commented Jul 22, 2025

User description

It will be used to setting some global options, like command timeout (30 secs by default as for now).

💥 What does this PR do?

Preserving method signature for further improvements without any breaking changes.

🔧 Implementation Notes

💡 Additional Considerations

🔄 Types of changes

  • Cleanup (formatting, renaming)
  • Bug fix (backwards compatible)
  • New feature (non-breaking change which adds functionality and tests!)
  • Breaking change (fix or feature that would cause existing functionality to change)

PR Type

Enhancement


Description

  • Add BiDiOptions class for future BiDi configuration

  • Update AsBiDiAsync method to accept optional BiDi options

  • Preserve method signature for backwards compatibility


Diagram Walkthrough

flowchart LR
  A["BiDiOptions class"] --> B["AsBiDiAsync method"]
  B --> C["Future configuration support"]
Loading

File Walkthrough

Relevant files
Enhancement
BiDiOptions.cs
Create BiDiOptions configuration class                                     

dotnet/src/webdriver/BiDi/BiDiOptions.cs

  • Create new BiDiOptions sealed class
  • Add standard Apache License header
  • Empty class ready for future configuration properties
+24/-0   
WebDriver.Extensions.cs
Update AsBiDiAsync method signature                                           

dotnet/src/webdriver/BiDi/WebDriver.Extensions.cs

  • Add optional BiDiOptions parameter to AsBiDiAsync method
  • Maintain backwards compatibility with default null value
+1/-1     

@selenium-ci selenium-ci added the C-dotnet .NET Bindings label Jul 22, 2025
@nvborisenko nvborisenko changed the title [dotnet] [biid] Preserve BiDi global options when instantiating BiDi [dotnet] [bidi] Preserve BiDi global options when instantiating BiDi Jul 22, 2025
Copy link
Contributor

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

Unused Parameter

The new options parameter is accepted but not used anywhere in the method implementation. This could be misleading to users who expect the options to have some effect.

public static async Task<BiDi> AsBiDiAsync(this IWebDriver webDriver, BiDiOptions? options = null)
{

Copy link
Contributor

PR Code Suggestions ✨

No code suggestions found for the PR.

@diemol
Copy link
Member

diemol commented Jul 23, 2025

Shouldn't this be part of the driver options?

@nvborisenko
Copy link
Member Author

No, it is only limited to BiDi. General WebDriver Options class is for WebDriver, not related to BiDi at all.

@nvborisenko nvborisenko merged commit a4665fa into SeleniumHQ:trunk Jul 25, 2025
13 checks passed
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.

3 participants