I'm still having problems setting chromeOptions using the config files, and it looks like the yaml may not be correctly parsed for nested dictionaries.
example:
The following code will correctly initialize a browser instance with a different default download directory using chromeOptions:
chrome_options = webdriver.ChromeOptions()
chrome_options.add_experimental_option('prefs', {'download.default_directory': '<directory_location>'})
self.driver = webdriver.Chrome(chrome_options=chrome_options)
The wtframework debug code shows that the browser has the following dictionary defining it:
{"desiredCapabilities": {"platform": "ANY", "browserName": "chrome", "version": "", "javascriptEnabled": true, "chromeOptions": {"prefs": {"download.default_directory": "<directory_location>"}, "extensions": [], "args": []}}}
However, if I try to create the same configuration in my config file like so:
desired_capabilities:
platform: WINDOWS
name: foo_bar
chromeOptions:
prefs:
download.default_directory: <directory_location>
Then the debug output showing the dictionary structure is not the same:
{"desiredCapabilities": {"name": "foo_bar", "chromeOptions.prefs.download.default_directory": "<directory_location>", "javascriptEnabled": true, "platform": "WINDOWS", "browserName": "chrome", "version": ""}}
Just wondering if anyone else has hit this problem or ideally found the correct syntax or a workaround?
Thanks,
Nick