SeleniumHQ / SeleniumHQ/selenium
[🚀 Feature]: Implement high level BiDi network commands
- Dominant language
- Java
- Stars
- 34.5k
- Forks
- 8.7k
- Avg merge
- 2d 1h
- Merged PRs (30d)
- 92
Description
### Feature and motivation
At the Selenium Dev Summit we agreed on this API to be generally applied across the bindings; we'll keep this labeled beta while we make sure that it works for what is needed
We want the methods to be accessible from a network() method available directly from the Driver class (e.g., `driver.network.addRequestHandler()`, `driver.network().addRequestHandler()`). We can't do everything just like this in all the languages, because, for example, .NET uses events with a += and -= for adding and removing handler events so we don't went "add" and "remove" methods.
### Implementations:
| Method | Java | NodeJS | Python | Ruby | .NET |
|--------------------------------------------|------|--------|--------|------|------|
| `addRequestHandler()` | | | #14592 | #14751 | |
| `removeRequestHandler()` | | | #14592 | #14751 | |
| `clearRequestHandlers()` | | | #14592 | #14751 | |
| `addResponseHandler()` | | | | | |
| `removeResponseHandler()` | | | | | |
| `clearResponseHandlers()` | | | | | |
| `addAuthenticationHandler()` | #14334 | #14345 | #14592 | #14523 | |
| `removeAuthenticationHandler()` | #14334 | #14345 | #14592 | #14523 | |
| `clearAuthenticationHandlers()` | #14334 | #14345 | #14592 | #14523 | |
### Considerations:
If we can figure out how to get the "add" methods return an id that can be used by the "remove" methods, that would be a lot easier for or users. Might be too complicated to implement.
Contributor guide
Assessment
This issue has not been assessed yet.