For selenium I have a bunch of options for chrome, which I need to pass to the remote webdriver via DesiredCapabilities
. On this page there is a java example on how to do this, but how to do it in python? The documentation is very poor.
Here is the code I have so far:
prefs = {
"profile.default_content_settings.popups":0,
"download.prompt_for_download": "false",
"download.default_directory": cwd,
}
chrome_options = Options()
chrome_options.add_argument("--disable-extensions")
chrome_options.add_experimental_option("prefs", prefs)
capabilities = DesiredCapabilities.CHROME
#code I could not find
#I need something like
#capabilities.add_options(chrome_options)
driver = webdriver.Remote(
command_executor='http://aaa.bbb.ccc:4444/wd/hub',
desired_capabilities=capabilities)
Any idea ho to do this? Or where to find proper documentation?