[🚀 Feature]: [dotnet] [bidi] Expose BiDi to be truly public low-level API #15612
Labels
B-devtools
Includes everything BiDi or Chrome DevTools related
C-dotnet
.NET Bindings
I-enhancement
Something could be better
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
andSubscribe
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
internal
modifiers and make itpublic
OpenQA.Selenium.BiDi.Extensions
namespaceUsage
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 methodInterceptRequestAsync
/InterceptResponseAsync
extension methods safe to do the interception properlyNote
There is:
If we choose extensions .net model, then properties cannot be extensions. I guess we can mitigate it via flatten methods from all modules, like:
It is even simpler, and it even removes extra class.
Have you considered any alternatives or workarounds?
No response
The text was updated successfully, but these errors were encountered: