-
Notifications
You must be signed in to change notification settings - Fork 11
Home
Mirei edited this page Dec 26, 2021
·
1 revision
Easily add your auth proxies to your chrome Driver with one line of code With Extension
You Can Simply Add this Library to your project with Nuget Package:
Install-Package SeleniumProxyAuthentication.Chrome -Version 2.0.0
- Create a global chrome option
private static readonly ChromeOptions ChromeOptions = new();
- Attach your proxy to the chrome option using the extension method that comes with nuget package
ChromeOptions.AddProxyAuthenticationExtension(new SeleniumProxyAuthentication.Proxy(
ProxyProtocols.HTTP,
"host:port:username:password"
));
- Cretae chrome driver and use the chrome option
IWebDriver driver = new ChromeDriver(ChromeOptions);
driver.Navigate().GoToUrl(new Uri("https://github.com"));
- Remove Entire Cache That Created By Extensions (In the Dispose Function)
chromeOptions.DeleteExtensionsCache();
- also see the sample project to see how it's work Link to sample project
- Host:Port:Username:Password
- Host:Port
Email: [email protected]
Telegram: https://t.me/ONll_CH4N