OperaOptions ClassWebDriver
Class to manage options specific to OperaDriver
Inheritance Hierarchy

SystemObject
  OpenQA.SeleniumDriverOptions
    OpenQA.Selenium.OperaOperaOptions

Namespace: OpenQA.Selenium.Opera
Assembly: WebDriver (in WebDriver.dll) Version: 3.1.0
Syntax

public class OperaOptions : DriverOptions

The OperaOptions type exposes the following members.

Constructors

  NameDescription
Public methodOperaOptions
Initializes a new instance of the OperaOptions class
Top
Properties

  NameDescription
Public propertyArguments
Gets the list of arguments appended to the Opera command line as a string array.
Public propertyBinaryLocation
Gets or sets the location of the Opera browser's binary executable file.
Public propertyDebuggerAddress
Gets or sets the address of a Opera debugger server to connect to. Should be of the form "{hostname|IP address}:port".
Public propertyExtensions
Gets the list of extensions to be installed as an array of base64-encoded strings.
Public propertyLeaveBrowserRunning
Gets or sets a value indicating whether Opera should be left running after the OperaDriver instance is exited. Defaults to .
Public propertyMinidumpPath
Gets or sets the directory in which to store minidump files.
Public propertyProxy
Gets or sets the proxy to use with this instance of Opera.
Top
Methods

  NameDescription
Public methodAddAdditionalCapability(String, Object)
Provides a means to add additional capabilities not yet added as type safe options for the Opera driver.
(Overrides DriverOptionsAddAdditionalCapability(String, Object).)
Public methodAddAdditionalCapability(String, Object, Boolean)
Provides a means to add additional capabilities not yet added as type safe options for the Opera driver.
Public methodAddArgument
Adds a single argument to the list of arguments to be appended to the Opera.exe command line.
Public methodAddArguments(IEnumerableString)
Adds arguments to be appended to the Opera.exe command line.
Public methodAddArguments(String)
Adds arguments to be appended to the Opera.exe command line.
Public methodAddEncodedExtension
Adds a base64-encoded string representing a Opera extension to the list of extensions to be installed in the instance of Opera.
Public methodAddEncodedExtensions(IEnumerableString)
Adds a list of base64-encoded strings representing Opera extensions to be installed in the instance of Opera.
Public methodAddEncodedExtensions(String)
Adds a list of base64-encoded strings representing Opera extensions to the list of extensions to be installed in the instance of Opera.
Public methodAddExcludedArgument
Adds a single argument to be excluded from the list of arguments passed by default to the Opera.exe command line by operadriver.exe.
Public methodAddExcludedArguments(IEnumerableString)
Adds arguments to be excluded from the list of arguments passed by default to the Opera.exe command line by operadriver.exe.
Public methodAddExcludedArguments(String)
Adds arguments to be excluded from the list of arguments passed by default to the Opera.exe command line by operadriver.exe.
Public methodAddExtension
Adds a path to a packed Opera extension (.crx file) to the list of extensions to be installed in the instance of Opera.
Public methodAddExtensions(IEnumerableString)
Adds a list of paths to packed Opera extensions (.crx files) to be installed in the instance of Opera.
Public methodAddExtensions(String)
Adds a list of paths to packed Opera extensions (.crx files) to be installed in the instance of Opera.
Public methodAddLocalStatePreference
Adds a preference for the local state file in the user's data directory for Opera. If the specified preference already exists, it will be overwritten.
Public methodAddUserProfilePreference
Adds a preference for the user-specific profile or "user data directory." If the specified preference already exists, it will be overwritten.
Public methodEquals
Determines whether the specified Object is equal to the current Object.
(Inherited from Object.)
Protected methodFinalize
Allows an Object to attempt to free resources and perform other cleanup operations before the Object is reclaimed by garbage collection.
(Inherited from Object.)
Protected methodGenerateLoggingPreferencesDictionary
Generates the logging preferences dictionary for transmission as a desired capability.
(Inherited from DriverOptions.)
Public methodGetHashCode
Serves as a hash function for a particular type.
(Inherited from Object.)
Public methodGetType
Gets the Type of the current instance.
(Inherited from Object.)
Protected methodMemberwiseClone
Creates a shallow copy of the current Object.
(Inherited from Object.)
Public methodSetLoggingPreference
Sets the logging preferences for this driver.
(Inherited from DriverOptions.)
Public methodToCapabilities
Returns DesiredCapabilities for Opera with these options included as capabilities. This does not copy the options. Further changes will be reflected in the returned capabilities.
(Overrides DriverOptionsToCapabilities.)
Public methodToString
Returns a String that represents the current Object.
(Inherited from Object.)
Top
Fields

  NameDescription
Public fieldStatic memberCapability
Gets the name of the capability used to store Opera options in a DesiredCapabilities object.
Top
Remarks

Used with OperaDriver.exe for Chromium v0.1.0 and higher.
Examples

OperaOptions options = new OperaOptions();
options.AddExtensions("\path\to\extension.crx");
options.BinaryLocation = "\path\to\opera";

For use with OperaDriver:

OperaDriver driver = new OperaDriver(options);

For use with RemoteWebDriver:

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

Reference