Skip to content

mahdibland/Selenium-Proxy-Authentication.Edge

Repository files navigation

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

About

Providing Proxy Authentication For Selenium Web Driver (Only HTTP/S Proxies)

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages