Skip to content

[🚀 Feature]: [dotnet] [bidi] Expose BiDi to be truly public low-level API #15612

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

Open
nvborisenko opened this issue Apr 10, 2025 · 2 comments
Labels
B-devtools Includes everything BiDi or Chrome DevTools related C-dotnet .NET Bindings I-enhancement Something could be better

Comments

@nvborisenko
Copy link
Member

nvborisenko commented Apr 10, 2025

Description

Now we hide some BiDi API from users (via internal modifier) because we want to hide the complexity of its usage. Great example is network interception: this operation requires to phases: AddIntercept and Subscribe on events. So right now we provide useful API for users to guide them to do the interception properly.

From one point of view Selenium tries to help users, but from other hand the question is why Selenium hides some BiDi spec defined capabilities.

Solution

  • Revisit all internal modifiers and make it public
  • Move all "helpers/extensions" to OpenQA.Selenium.BiDi.Extensions namespace

Usage

Now user will get all power of spec defined methods. If user starts typing bidi.Network.interce he will be promoted to use:

  • AddInterceptAsync native low-level method
  • InterceptRequestAsync/InterceptResponseAsync extension methods safe to do the interception properly

Note

There is:

context.Network.IntercepRequestAsync()

If we choose extensions .net model, then properties cannot be extensions. I guess we can mitigate it via flatten methods from all modules, like:

context.InterceptRequestAsync()

It is even simpler, and it even removes extra class.

Have you considered any alternatives or workarounds?

No response

@nvborisenko nvborisenko added A-needs-triaging A Selenium member will evaluate this soon! I-enhancement Something could be better labels Apr 10, 2025
@selenium-ci
Copy link
Member

@nvborisenko, thank you for creating this issue. We will troubleshoot it as soon as we can.

Selenium Triage Team: remember to follow the Triage Guide

@github-actions github-actions bot added B-devtools Includes everything BiDi or Chrome DevTools related C-dotnet .NET Bindings labels Apr 10, 2025
@nvborisenko nvborisenko added A-needs decision TLC needs to discuss and agree and removed A-needs-triaging A Selenium member will evaluate this soon! labels Apr 11, 2025
@nvborisenko
Copy link
Member Author

I don't have arguments why low-level API should hide some methods. So decision will be just reveal it. Any hidden knowledge about its usage can be easily negotiated via documentation (for advanced users). In any case for us it means just follow BiDi spec without headache and hidden stones.

@nvborisenko nvborisenko removed the A-needs decision TLC needs to discuss and agree label Apr 20, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
B-devtools Includes everything BiDi or Chrome DevTools related C-dotnet .NET Bindings I-enhancement Something could be better
Projects
None yet
Development

No branches or pull requests

2 participants