Page 1 of 1

Using arguments and/or preferences for ChromeDriver.

Posted: Wed Aug 02, 2017 4:39 pm
by TBR_SAFA
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.

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"
        ]
    }
}
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.

Re: Using arguments and/or preferences for ChromeDriver.

Posted: Thu Sep 07, 2017 12:36 pm
by Vaughan.Douglas
Thank you for providing this information. The endpoint configurator is useful but lacks the ability to generate complex configurations.