Skip to content

Latest commit

 

History

History
62 lines (42 loc) · 1.98 KB

File metadata and controls

62 lines (42 loc) · 1.98 KB

Selenium Proxy Authentication For Edge

Easily add your auth proxies to your edge Driver with one line of code With Extension

Installation

You Can Simply Add this Library to your project with Nuget Package:

Install-Package SeleniumProxyAuthentication.Edge -Version 1.0.0

How to Use it

  • 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();

Guides

Proxy Format

  • Host:Port:Username:Password
  • Host:Port

Licence

License