Issue with HTTP Basic Authentication in Selenium WebDriver (C#)

56 views
Skip to first unread message

Christian Ledgard

unread,
Jun 12, 2025, 7:29:14 PMJun 12
to Selenium Users
Good morning,

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

Corey Goldberg

unread,
Jun 12, 2025, 8:02:12 PMJun 12
to seleniu...@googlegroups.com

--
You received this message because you are subscribed to the Google Groups "Selenium Users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to selenium-user...@googlegroups.com.
To view this discussion visit https://groups.google.com/d/msgid/selenium-users/b1ed5709-babf-4101-9c84-514511207a28n%40googlegroups.com.
Reply all
Reply to author
Forward
0 new messages