The below code will work for chrome, it disables the flash and sets the default download directory to a different folder.
from selenium.webdriver.chrome.options import Options
def _disable_flash_caps(self):
chromeOptions = Options()
# prefs = {"download.default_directory" : "C:\\temp", "profile.managed_default_content_settings.plugins": 2}
prefs = {"download.default_directory" : "C:\\temp", "plugins.plugins_disabled": ["Adobe Flash Player"] }
chromeOptions.add_experimental_option("prefs",prefs)
return chromeOptions.to_capabilities()
call it with:
if 'browserName' in cap and cap['browserName'] == 'chrome':
webdriver.Remote.__init__(self, sel_url, self._disable_flash_caps())