Proxy Authentication with Selenium

I’ve been working a lot with selenium for C# lately and one of my company’s projects required me to use proxies for certain automated tasks.

For basic proxies, selenium nicely uses the inbuilt functions that firefox offers in order to set up proxies, it’s really quite simple:


 var Proxy = new Proxy();          //Create proxy object
Proxy.Kind = ProxyKind.Manual;     //set to manual mode
Proxy.HttpProxy = ip + ":" + port; //add ip and port to proxy protocol

However, Firefox really doesn’t offer the best proxy configuration options, and I really needed to use a proxy with username:password authentication, which just does not work with selenium.

Continue reading “Proxy Authentication with Selenium”