While Selenium 4 provides direct access to the Chrome DevTools Protocol, these methods will eventually be removed when WebDriver BiDi implemented. Basic authentication Some applications make use of browser authentication to secure pages. It used to be common to handle them in the URL, but browsers stopped supporting this. With this code you can insert the credentials into the header when necessary Java Python CSharp Ruby JavaScript Kotlin Predicate<URI> uriPredicate = uri -> uri.