Browser Proxies  

In many cases, you can specify a proxy to use with the proxy: {} option. While each browser driver handles this slightly differently, the following format works in Chrome or Firefox.

Example: using a proxy in Chrome or Firefox

proxy = {
  http: '',
  ssl:  ''

firefox_browser = :firefox, proxy: proxy

remote_firefox  = :firefox, url: REMOTE_SELENIUM, proxy: proxy

chrome_browser  = :chrome, proxy: proxy

remote_chrome   = :chrome, url: REMOTE_SELENIUM, proxy: proxy

Be sure to specify both :http and :ssl to route both types of traffic through your proxy.

Under the hood, this is passing options to create a Selenium::WebDriver::Proxy object.

Example: setting a http and https proxy for Remote Chrome

proxy = ''
browser = :chrome, url: REMOTE_URL, proxy: {http: proxy, ssl: proxy}

Last Updated: February 27, 2018