Using arguments and/or preferences for ChromeDriver.

Ranorex Spy, Recorder, and Studio.
TBR_SAFA
Posts: 2
Joined: Tue Sep 23, 2014 8:41 am

Using arguments and/or preferences for ChromeDriver.

Post by TBR_SAFA » 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.

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.

Vaughan.Douglas
Posts: 250
Joined: Tue Mar 24, 2015 5:05 pm
Location: Des Moines, Iowa, USA

Re: Using arguments and/or preferences for ChromeDriver.

Post by Vaughan.Douglas » Thu Sep 07, 2017 12:36 pm

Thank you for providing this information. The endpoint configurator is useful but lacks the ability to generate complex configurations.
Doug Vaughan