C# Class OpenQA.Selenium.Chrome.ChromeOptions

Class to manage options specific to ChromeDriver
Used with ChromeDriver.exe v17.0.963.0 and higher.
ファイルを表示 Open project: krosenvold/selenium-git-release-candidate Class Usage Examples

Public Properties

Property Type Description
Capability string

Private Properties

Property Type Description
ToCapabilities ICapabilities

Public Methods

Method Description
AddAdditionalCapability ( string capabilityName, object capabilityValue ) : void

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

Calling AddAdditionalCapability where capabilityName has already been added will overwrite the existing value with the new value in capabilityValue

AddArgument ( string argument ) : void

Adds a single argument to the list of arguments to be appended to the Chrome.exe command line.

AddArguments ( ) : void

Adds arguments to be appended to the Chrome.exe command line.

AddArguments ( IEnumerable arguments ) : void

Adds arguments to be appended to the Chrome.exe command line.

AddExtension ( string pathToExtension ) : void

Adds a path to a packed Chrome extension (.crx file) to the list of extensions to be installed in the instance of Chrome.

AddExtensions ( ) : void

Adds a list of paths to packed Chrome extensions (.crx files) to be installed in the instance of Chrome.

AddExtensions ( IEnumerable extensions ) : void

Adds a list of paths to packed Chrome extensions (.crx files) to be installed in the instance of Chrome.

Private Methods

Method Description
ToCapabilities ( ) : ICapabilities

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

Method Details

AddAdditionalCapability() public method

Provides a means to add additional capabilities not yet added as type safe options for the Chrome driver.
Calling AddAdditionalCapability where capabilityName has already been added will overwrite the existing value with the new value in capabilityValue
/// thrown when attempting to add a capability for which there is already a type safe option, or /// when is or the empty string. ///
public AddAdditionalCapability ( string capabilityName, object capabilityValue ) : void
capabilityName string The name of the capability to add.
capabilityValue object The value of the capability to add.
return void

AddArgument() public method

Adds a single argument to the list of arguments to be appended to the Chrome.exe command line.
public AddArgument ( string argument ) : void
argument string The argument to add.
return void

AddArguments() public method

Adds arguments to be appended to the Chrome.exe command line.
public AddArguments ( ) : void
return void

AddArguments() public method

Adds arguments to be appended to the Chrome.exe command line.
public AddArguments ( IEnumerable arguments ) : void
arguments IEnumerable An object of arguments to add.
return void

AddExtension() public method

Adds a path to a packed Chrome extension (.crx file) to the list of extensions to be installed in the instance of Chrome.
public AddExtension ( string pathToExtension ) : void
pathToExtension string The full path to the extension to add.
return void

AddExtensions() public method

Adds a list of paths to packed Chrome extensions (.crx files) to be installed in the instance of Chrome.
public AddExtensions ( ) : void
return void

AddExtensions() public method

Adds a list of paths to packed Chrome extensions (.crx files) to be installed in the instance of Chrome.
public AddExtensions ( IEnumerable extensions ) : void
extensions IEnumerable An of full paths to the extensions to add.
return void

Property Details

Capability public_oe static_oe property

Gets the name of the capability used to store Chrome options in a DesiredCapabilities object.
public static string Capability
return string