I am reaching out regarding an issue with a self-hosted Selenium Grid that now requires HTTP Basic Authentication for compliance purposes.
It's accessible directly via Chrome if we navigate to
https://<user>:<password>@seleniumurlexample.com, for example.
However, if I try to construct my driver in C# with HTTP Basic Authentication:
new RemoteWebDriver(new Uri("https://<user>:<password>@seleniumurlexample.com"))
After executing a command with the driver, an
UnhandledError occurs. I understand that transmitting credentials over the network poses significant security risks, but I am want to understand if this issue is a known limitation in Selenium WebDriver. Does someone has some insight into why this approach fails, or suggest a method to successfully integrate HTTP Basic Authentication with Selenium WebDriver?
Thanks,
Christian L
Additional info:
Language C#
Selenium WebDriver 4.24.0
OS: macOS / windows same behavior