Skip to content

selenium.browser.chrome

Chrome capabilities and the goog:chromeOptions vendor object.

Chrome

class Chrome: selenium.browser.Browser;

A Chrome browser with its goog:chromeOptions capabilities.

The options object and goog:loggingPrefs are Chromium vendor extensions, not part of W3C. The standard capabilities still come from Browser.

Preferences

struct Preferences;

Wrapper struct for preferences. Chrome supports both browser (local state) and user preferences. Preferences are NOT sanitized or validated, and are expected to be JSON objects.

browser

JSONValue browser;

Local state preferences.

user

JSONValue user;

User profile preferences.

release

string release;

Filter for matching a specific browser version.

binary

string binary;

Browser binary. To set a custom binary (ie: Vivaldi), set this to the path of the binary.

includeSwitches

string[] includeSwitches;

Command inclusion arguments. To exclude default arguments, see excludeSwitches.

excludeSwitches

string[] excludeSwitches;

Command exclusion arguments.

prefs

Preferences prefs;

Preferences for browser (local state) and user.

debuggerAddress

string debuggerAddress;

Debugger address. Must be in the format '<hostname/ip:port>', ie: '127.0.0.1:9222'.

minidumpPath

string minidumpPath;

Minidump path. Only supported for Linux environments. Setting this on a non-linux compilation will have no effect.

detach

bool detach;

Detach process from driver. If true, the browser will not be closed when the driver is closed.

extensions

string[] extensions;

Extensions to load. May be provided as either base-64 encoded CRX content or a path to a CRX file.

logging

LogLevel[string] logging;

Remote log level preferences per log type, serialized as goog:loggingPrefs.

name

string name() const;

The browserName capability.

toJSON

JSONValue toJSON() const;

Serializes the standard capabilities plus goog:chromeOptions and logging prefs.

normalizeLogger

void normalizeLogger(Logger logger);

Folds the per-type logging preferences upward into the session logger.

parseFrom

protected void parseFrom(JSONValue value);

Populates the standard capabilities and goog:chromeOptions fields.