Class WebDriverProxyFactory
- Namespace
- CSF.Extensions.WebDriver.Proxies
- Assembly
- CSF.Extensions.WebDriver.dll
Factory class which creates a proxy WebDriver using Castle.DynamicProxy.
public class WebDriverProxyFactory : IGetsProxyWebDriver
- Inheritance
-
WebDriverProxyFactory
- Implements
- Inherited Members
Constructors
WebDriverProxyFactory(IServiceProvider)
Initialises a new instance of WebDriverProxyFactory.
public WebDriverProxyFactory(IServiceProvider services)
Parameters
servicesIServiceProviderDI services.
Exceptions
- ArgumentNullException
If
servicesis null.
Methods
GetProxyWebDriver(IWebDriver, ProxyCreationOptions)
Gets a proxy object implementing OpenQA.Selenium.IWebDriver as well as all of the other interfaces implemented by the
webDriver, enriching it with additional functionality as determined by the options.
public IWebDriver GetProxyWebDriver(IWebDriver webDriver, ProxyCreationOptions options)
Parameters
webDriverIWebDriverThe original WebDriver instance to proxy.
optionsProxyCreationOptionsOptions related to the creation of this proxy.
Returns
- IWebDriver
A proxy OpenQA.Selenium.IWebDriver instance.
Remarks
See the remarks upon IGetsProxyWebDriver for more information.