I have been searching all day for this and it seems that there is no solution currently available from the chromedriver implementation for python.
how do you set spe
Fix:
There is a solution by avoiding the chromeoptions object and reverting back to the desiredcapabilities dictionary (deprecated). For some reason webdriver.py in the selenium library adds an empty chromeoptions dictionary to the desiredcapabilities dictionary which renders it useless. So you need to uncomment line 54 in webdriver.py
desired_capabilities.update(options.to_capabilities())
Then use this code to pass all desired capabilities to chromedriver
CHROME = {
"browserName": "chrome",
"version": "",
"platform": "ANY",
"javascriptEnabled": True,
"chrome.prefs": {"profile.managed_default_content_settings.images": 2},
"proxy": {
"httpProxy":"localhost:8118",
"ftpProxy":None,
"sslProxy":None,
"noProxy":None,
"proxyType":"MANUAL",
"class":"org.openqa.selenium.Proxy",
"autodetect":False
},
"chrome.switches": ["window-size=1003,719", "allow-running-insecure-content", "disable-web-security", "disk-cache-dir=/var/www/cake2.2.4/app/tmp/cache/selenium-chrome-cache", "no-referrers"],
}
self.selenium = webdriver.Chrome(desired_capabilities=CHROME)