Company
Date Published
Author
Titus Fortner
Word count
1230
Language
English
Hacker News points
None

Summary

The Selenium project has introduced Bidirectional APIs in version 4, allowing developers to interact with the browser's DevTools Protocol. These APIs enable features such as intercepting network requests, mocking backends, performing basic authentication, and viewing console logs. The Selenium team is working with browser vendors to create a stable, cross-browser API using the bidirectional functionality. Currently, only Chrome, Edge, and Firefox support these new APIs, but other browsers like Safari will be supported when WebDriver BiDi is available. The Bidirectional APIs provide a range of activities such as checking console logs, intercepting network requests, performing basic authentication, inspecting elements in the DOM, executing bootstrap scripts to improve test execution time, mocking geolocation, throttling network performance, and simulating real-world conditions.