Chrome DevTools Protocol API
While Selenium 4 provides direct access to the Chrome DevTools Protocol (CDP), these methods will eventually be removed. It is recommended to use the WebDriver Bidi APIs methods where possible to ensure future compatibility.
Usage
If your use case has been implemented by WebDriver Bidi or the BiDi API, you should use those implementations instead of this one. Generally you should prefer this approach over executing with the CDP Endpoint, especially in Ruby.
Examples
Set Cookie
An alternate implementation can be found at CDP Endpoint Set Cookie
Because Java requires using all the parameters example, the Map approach used in CDP Endpoint Set Cookie might be more simple.
Because Python requires using async methods for this example, the synchronous approach found in CDP Endpoint Set Cookie might be easier.
Due to the added complexity in .NET of obtaining the domains and executing with awaits, the CDP Endpoint Set Cookie might be easier.
Performance Metrics
An alternate implementation can be found at CDP Endpoint Performance Metrics
Because Python requires using async methods for this example, the synchronous approach found in CDP Endpoint Performance Metrics might be easier.
Due to the added complexity in .NET of obtaining the domains and executing with awaits, the CDP Endpoint Performance Metrics might be easier.
Basic authentication
Alternate implementations can be found at CDP Endpoint Basic Authentication and BiDi API Basic Authentication
Because Python requires using async methods for this example, the synchronous approach found in CDP Endpoint Basic Authentication might be easier.
Due to the added complexity in .NET of obtaining the domains and executing with awaits, the CDP Endpoint Basic Authentication might be easier.
Console logs
Because reading console logs requires setting an event listener, this cannot be done with a CDP Endpoint implementation Alternate implementations can be found at BiDi API Console logs and errors and WebDriver BiDi Console logs
Use the BiDi API Console logs and errors implementation
Use the BiDi API Console logs and errors implementation
JavaScript exceptions
Similar to console logs, but this listens for actual javascript exceptions not just logged errors Alternate implementations can be found at BiDi API JavaScript exceptions and WebDriver BiDi JavaScript exceptions
Use the BiDi API JavaScript exceptions implementation
Use the BiDi API JavaScript exceptions implementation
Use the BiDi API JavaScript exceptions implementation
Download complete
Wait for a download to finish before continuing. Because getting download status requires setting a listener, this cannot be done with a CDP Endpoint implementation.