How to add proxy setting to webdriver

I had to run the Webdriver scripts on a Firefox and I had to use a particular proxy to get access to the QA/Dev environment. Here is the code that you can use to change the proxy settings. FirefoxProfile firefoxProfile = new FirefoxProfile(); firefoxProfile.setPreference(“network.proxy.type”, 1); firefoxProfile.setPreference(“network.proxy.http”, “”); firefoxProfile.setPreference(“network.proxy.http_port”, 80); firefoxProfile.setPreference(“network.proxy.ssl”, “”); firefoxProfile.setPreference(“network.proxy.ssl_port”, 80); firefoxProfile.setPreference(“network.proxy.no_proxies_on”, “”); […]