Table of Contents

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

services IServiceProvider

DI services.

Exceptions

ArgumentNullException

If services is 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

webDriver IWebDriver

The original WebDriver instance to proxy.

options ProxyCreationOptions

Options related to the creation of this proxy.

Returns

IWebDriver

A proxy OpenQA.Selenium.IWebDriver instance.

Remarks

See the remarks upon IGetsProxyWebDriver for more information.