C# Класс OpenQA.Selenium.Chrome.ChromeOptions

Class to manage options specific to ChromeDriver
Used with ChromeDriver.exe v17.0.963.0 and higher.
Показать файл Открыть проект Примеры использования класса

Открытые свойства

Свойство Тип Описание
Capability string

Private Properties

Свойство Тип Описание
ToCapabilities ICapabilities

Открытые методы

Метод Описание
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.

Приватные методы

Метод Описание
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.

Описание методов

AddAdditionalCapability() публичный Метод

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.
Результат void

AddArgument() публичный Метод

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.
Результат void

AddArguments() публичный Метод

Adds arguments to be appended to the Chrome.exe command line.
public AddArguments ( ) : void
Результат void

AddArguments() публичный Метод

Adds arguments to be appended to the Chrome.exe command line.
public AddArguments ( IEnumerable arguments ) : void
arguments IEnumerable An object of arguments to add.
Результат void

AddExtension() публичный Метод

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.
Результат void

AddExtensions() публичный Метод

Adds a list of paths to packed Chrome extensions (.crx files) to be installed in the instance of Chrome.
public AddExtensions ( ) : void
Результат void

AddExtensions() публичный Метод

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.
Результат void

Описание свойств

Capability публичное статическое свойство

Gets the name of the capability used to store Chrome options in a DesiredCapabilities object.
public static string Capability
Результат string