Created
October 11, 2021 16:08
-
-
Save jimevans/aa37e4310b642e473d72c10430c61455 to your computer and use it in GitHub Desktop.
Selenium Authentication C# Example
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
NetworkAuthenticationHandler handler = new NetworkAuthenticationHandler() | |
{ | |
UriMatcher = (d) => d.Host.Contains("your-domain.com"), | |
Credentials = new PasswordCredentials("admin", "password") | |
}; | |
INetwork networkInterceptor = driver.Manage().Network; | |
networkInterceptor.AddAuthenticationHandler(handler); | |
await networkInterceptor.StartMonitoring(); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment