Easily add your auth proxies to your edge Driver with one line of code With Extension
You Can Simply Add this Library to your project with Nuget Package:
Install-Package SeleniumProxyAuthentication.Edge -Version 1.0.0
- First you need to download the edge driver from here (make sure that the version of your edge browser should be match with the version of edge driver that you download!)
https://developer.microsoft.com/en-us/microsoft-edge/tools/webdriver/
-
Then put "msedgedriver.exe" in your project bin directory
-
Create a new Instance of EdgeOptions class
private static readonly EdgeOptions EdgeOptions = new();
- Attach your proxy to the edge option using the extension method that comes with nuget package
EdgeOptions.AddProxyAuthenticationExtension(new SeleniumProxyAuthentication.Proxy(
ProxyProtocols.HTTP,
"host:port:username:password"
));
- create a new instance of edge driver and pass the edge options instance
IWebDriver driver = new EdgeDriver(EdgeOptions);
driver.Navigate().GoToUrl(new Uri("https://myip.ms"));
- Remove Entire Cache That Created By Extensions (In the Dispose Function)
EdgeOptions.DeleteExtensionsCache();
- also see the sample project to see how it's work Link to sample project
- Host:Port:Username:Password
- Host:Port