Skip to content

selenium.browser.edge

Edge capabilities and the ms:edgeOptions vendor object.

Edge

class Edge: selenium.browser.Browser;

A Microsoft Edge browser with its ms:edgeOptions capabilities.

The options object is an Edge vendor extension. Logging still uses the Chromium goog:loggingPrefs capability rather than an Edge-specific key, since Edge is Chromium based. None of these are part of W3C.

Preferences

struct Preferences;

Wrapper struct for preferences. Edge 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, 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.

mobileEmulation

JSONValue mobileEmulation;

Mobile emulation configuration. Must be a JSON object.

wdpAddress

string wdpAddress;

Windows Device Portal address. Must be in the format '<hostname/ip:port>'.

wdpUsername

string wdpUsername;

Windows Device Portal username.

wdpPassword

string wdpPassword;

Windows Device Portal password.

webviewOptions

JSONValue webviewOptions;

WebView2 options. Must be a JSON object.

windowsApp

string windowsApp;

Windows application user model ID for WebView2 automation.

useWebView

bool useWebView;

Use WebView2 instead of Edge browser.

logging

LogLevel[string] logging;

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

name

string name() const;

The browserName capability, "webview2" when driving WebView2.

toJSON

JSONValue toJSON() const;

Serializes the standard capabilities plus ms:edgeOptions 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 ms:edgeOptions fields.