Class SeleniumDriverAndOptionsScanner
- Namespace
- CSF.Extensions.WebDriver.Factories
- Assembly
- CSF.Extensions.WebDriver.dll
Service which scans the Selenium WebDriver assembly for web driver types.
public class SeleniumDriverAndOptionsScanner : IGetsWebDriverWithDeterministicOptionsTypes
- Inheritance
-
SeleniumDriverAndOptionsScanner
- Implements
- Inherited Members
Methods
GetWebDriverAndDeterministicOptionsTypes()
Gets a collection of the implementations of OpenQA.Selenium.IWebDriver in the Selenium library which have deterministic options types.
public IReadOnlyCollection<WebDriverAndOptionsTypePair> GetWebDriverAndDeterministicOptionsTypes()
Returns
- IReadOnlyCollection<WebDriverAndOptionsTypePair>
A collection of web driver types and their associated options types.
Remarks
This method will only get concrete implementations of OpenQA.Selenium.IWebDriver for which we can reliably determine the associated/corresponding concrete implementation of OpenQA.Selenium.DriverOptions. For example, this method will not return OpenQA.Selenium.Remote.RemoteWebDriver because that takes one of many different options types. On the other hand, as of the time of writing, OpenQA.Selenium.Chrome.ChromeDriver would be included in the results, because it has a constructor which uniquely and unambiguously identifies that it requires an instance of OpenQA.Selenium.Chrome.ChromeOptions
This method makes use of assembly-scanning techniques to get the list of drivers and options, so it stands at least some chance of correctly dealing with alterations in the Selenium library, such as the introduction of new WebDrivers.