Using arguments and/or preferences for ChromeDriver.
Posted: Wed Aug 02, 2017 4:39 pm
For anyone wanting to set settings and/or preferences for ChromeDriver using Selenium 'desiredCapabilities' through the endpoint configuration here is an example I use which took me a lot of effort to compose and get in the right format.
For a list of possible arguments check this resource: https://peter.sh/experiments/chromium-c ... e-switches
And preferences: https://src.chromium.org/viewvc/chrome/ ... iew=markup
Hopefully I can save someone some time by posting this.
Code: Select all
{
"chromeOptions": {
"prefs": {
"browser.enable_spellchecking": false,
"browser.enable_autospellcorrect": false,
"spellcheck.use_spelling_service": "",
"spellcheck.dictionary": "",
"translate.enabled": false
},
"args": [
"--disable-infobars --start-maximized"
]
}
}
And preferences: https://src.chromium.org/viewvc/chrome/ ... iew=markup
Hopefully I can save someone some time by posting this.