Table of Contents

Class SafariOptions

Namespace
OpenQA.Selenium.Safari
Assembly
WebDriver.dll

Class to manage options specific to SafariDriver

public class SafariOptions : DriverOptions
Inheritance
SafariOptions
Inherited Members

Examples

SafariOptions options = new SafariOptions();
options.SkipExtensionInstallation = true;

For use with SafariDriver:

SafariDriver driver = new SafariDriver(options);

For use with RemoteWebDriver:

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

Constructors

SafariOptions()

Initializes a new instance of the SafariOptions class.

public SafariOptions()

Methods

AddAdditionalCapability(string, object)

Provides a means to add additional capabilities not yet added as type safe options for the Safari 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.

ToCapabilities()

Returns ICapabilities for Safari 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 ICapabilities for Safari with these options.