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”, “100.00.100.100”); firefoxProfile.setPreference(“network.proxy.http_port”, 80); firefoxProfile.setPreference(“network.proxy.ssl”, “100.00.100.100”); firefoxProfile.setPreference(“network.proxy.ssl_port”, 80); firefoxProfile.setPreference(“network.proxy.no_proxies_on”, “”); […]