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
Description
Now we hide some BiDi API from users (via
internalmodifier) because we want to hide the complexity of its usage. Great example is network interception: this operation requires to phases:AddInterceptandSubscribeon 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
internalmodifiers and make itpublicOpenQA.Selenium.BiDi.ExtensionsnamespaceUsage
Now user will get all power of spec defined methods. If user starts typing
bidi.Network.intercehe will be promoted to use:AddInterceptAsyncnative low-level methodInterceptRequestAsync/InterceptResponseAsyncextension 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