Quantcast
Channel: Active questions tagged selenium - Stack Overflow
Viewing all articles
Browse latest Browse all 98792

How to authenticate (user/password) proxy in c# selenium chrome driver

$
0
0

I have a HTTP/HTTPS proxy which need to authenticate using username and password. How do I do that using C# selenium chrome webdriver?

string host = proxies[count].Split(':')[0];
int port = Convert.ToInt32(proxies[count].Split(':')[1]) + 1;

string prox = host + ":" + port.ToString();

OpenQA.Selenium.Proxy proxy = new OpenQA.Selenium.Proxy();
proxy.HttpProxy = prox;
proxy.SslProxy = prox;
options.Proxy = proxy;

options is the ChromeOptions class which I assign to the driver.


Viewing all articles
Browse latest Browse all 98792

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>