Class DriverTypeProvider
Default implementation of IGetsDriverType.
public class DriverTypeProvider : IGetsDriverType
- Inheritance
-
DriverTypeProvider
- Implements
- Inherited Members
Constructors
DriverTypeProvider(IGetsLogger, IGetsWebDriverAndOptionsTypes)
Initialises a new instance of DriverTypeProvider.
public DriverTypeProvider(IGetsLogger loggerProvider, IGetsWebDriverAndOptionsTypes typeProvider)
Parameters
loggerProviderIGetsLoggerA logger provider
typeProviderIGetsWebDriverAndOptionsTypesA provider for the concrete types of web driver and options
Exceptions
- ArgumentNullException
If any parameter is null
Methods
TryGetDriverType(WebDriverCreationOptions, IConfigurationSection, out Type)
Validates and gets the Type of the implementation of OpenQA.Selenium.IWebDriver implementation indicated by the configuration.
public bool TryGetDriverType(WebDriverCreationOptions options, IConfigurationSection configuration, out Type driverType)
Parameters
optionsWebDriverCreationOptionsThe options, as they have been parsed so far
configurationIConfigurationSectionThe configuration section
driverTypeTypeIf this method returns true then this is a Type of the web driver, otherwise this value is undefined and must be ignored.
Returns
Remarks
Note that it is valid for the driver type to be null if DriverFactoryType is specified. In that scenario, the driver type is unused, but it still indicates a valid configuration.