Class WebDriverConfigurationItemParser
- Namespace
- CSF.Extensions.WebDriver.Factories
- Assembly
- CSF.Extensions.WebDriver.dll
Default implementation of IParsesSingleWebDriverConfigurationSection.
public class WebDriverConfigurationItemParser : IParsesSingleWebDriverConfigurationSection
- Inheritance
-
WebDriverConfigurationItemParser
- Implements
- Inherited Members
Constructors
WebDriverConfigurationItemParser(IGetsDriverType, IGetsOptionsType, ICreatesDriverOptions, ILogger<WebDriverConfigurationItemParser>)
Initializes a new instance of the WebDriverConfigurationItemParser class.
public WebDriverConfigurationItemParser(IGetsDriverType driverTypeProvider, IGetsOptionsType optionsTypeProvider, ICreatesDriverOptions optionsFactory, ILogger<WebDriverConfigurationItemParser> logger)
Parameters
driverTypeProviderIGetsDriverTypeA service to get the driver type
optionsTypeProviderIGetsOptionsTypeA service to get the options type
optionsFactoryICreatesDriverOptionsA service to get the driver options
loggerILogger<WebDriverConfigurationItemParser>The logger for this parser.
Methods
GetDriverConfiguration(IConfigurationSection)
Gets an instance of WebDriverCreationOptions from the specified IConfigurationSection.
public WebDriverCreationOptions GetDriverConfiguration(IConfigurationSection configuration)
Parameters
configurationIConfigurationSectionThe configuration section which describes the configuration of a WebDriver.
Returns
- WebDriverCreationOptions
A strongly-typed options object, or a null reference indicating an invalid configuration.
Remarks
Note that if the configuration is invalid, then this method will return a null instance of WebDriverCreationOptions.
Exceptions
- ArgumentNullException
If
configurationis null.