Table of Contents

Class EdgeOptions

Namespace
OpenQA.Selenium.Edge
Assembly
WebDriver.dll

Class to manage options specific to EdgeDriver

public class EdgeOptions : DriverOptions
Inheritance
EdgeOptions
Inherited Members

Examples

EdgeOptions options = new EdgeOptions();

For use with EdgeDriver:

EdgeDriver driver = new EdgeDriver(options);

For use with RemoteWebDriver:

RemoteWebDriver driver = new RemoteWebDriver(new Uri("http://localhost:4444/wd/hub"), options.ToCapabilities());

Constructors

EdgeOptions()

public EdgeOptions()

Properties

StartPage

Gets or sets the URL of the page with which the browser will be navigated to on launch.

public string StartPage { get; set; }

Property Value

string

UseInPrivateBrowsing

Gets or sets a value indicating whether the browser should be launched using InPrivate browsing.

public bool UseInPrivateBrowsing { get; set; }

Property Value

bool

Methods

AddAdditionalCapability(string, object)

Provides a means to add additional capabilities not yet added as type safe options for the Edge driver.

public override void AddAdditionalCapability(string capabilityName, object capabilityValue)

Parameters

capabilityName string

The name of the capability to add.

capabilityValue object

The value of the capability to add.

Remarks

Calling AddAdditionalCapability(string, object) where capabilityName has already been added will overwrite the existing value with the new value in capabilityValue

Exceptions

ArgumentException

thrown when attempting to add a capability for which there is already a type safe option, or when capabilityName is null or the empty string.

AddExtensionPath(string)

Adds a path to an extension that is to be used with the Edge driver.

public void AddExtensionPath(string extensionPath)

Parameters

extensionPath string

The full path and file name of the extension.

AddExtensionPaths(IEnumerable<string>)

Adds a list of paths to an extensions that are to be used with the Edge driver.

public void AddExtensionPaths(IEnumerable<string> extensionPathsToAdd)

Parameters

extensionPathsToAdd IEnumerable<string>

An IEnumerable<T> of full paths with file names of extensions to add.

AddExtensionPaths(params string[])

Adds a list of paths to an extensions that are to be used with the Edge driver.

public void AddExtensionPaths(params string[] extensionPathsToAdd)

Parameters

extensionPathsToAdd string[]

An array of full paths with file names of extensions to add.

ToCapabilities()

Returns DesiredCapabilities for Edge with these options included as capabilities. This copies the options. Further changes will not be reflected in the returned capabilities.

public override ICapabilities ToCapabilities()

Returns

ICapabilities

The DesiredCapabilities for Edge with these options.