Package io.fluentlenium.configuration
Class WebDriversRegistryImpl
java.lang.Object
io.fluentlenium.configuration.AbstractFactoryRegistryImpl<WebDriverFactory,ReflectiveWebDriverFactory>
io.fluentlenium.configuration.WebDriversRegistryImpl
public class WebDriversRegistryImpl
extends AbstractFactoryRegistryImpl<WebDriverFactory,ReflectiveWebDriverFactory>
WebDrivers registry implementation.
-
Field Summary
Fields inherited from class io.fluentlenium.configuration.AbstractFactoryRegistryImpl
factories, factoryType, reflectiveFactoryType -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionprotected WebDriverFactorygetDefault(List<WebDriverFactory> filteredFactories) Get the default factory from given list of available factories.protected voidHandle the case when no factory is available for given nameprotected ReflectiveWebDriverFactorynewReflectiveInstance(String name) Creates an instance of reflective factory.org.openqa.selenium.WebDrivernewWebDriver(String name, org.openqa.selenium.Capabilities capabilities, ConfigurationProperties configuration) Creates a newWebDriverinstance from factory of the given nameMethods inherited from class io.fluentlenium.configuration.AbstractFactoryRegistryImpl
get, getDefault, register
-
Constructor Details
-
WebDriversRegistryImpl
public WebDriversRegistryImpl()Creates a new registry.
-
-
Method Details
-
newReflectiveInstance
Description copied from class:AbstractFactoryRegistryImplCreates an instance of reflective factory.- Specified by:
newReflectiveInstancein classAbstractFactoryRegistryImpl<WebDriverFactory,ReflectiveWebDriverFactory> - Parameters:
name- name of the instance to create.- Returns:
- new instance
-
getDefault
Description copied from class:AbstractFactoryRegistryImplGet the default factory from given list of available factories.- Specified by:
getDefaultin classAbstractFactoryRegistryImpl<WebDriverFactory,ReflectiveWebDriverFactory> - Parameters:
filteredFactories- available factories- Returns:
- default factory
-
handleNoFactoryAvailable
Description copied from class:AbstractFactoryRegistryImplHandle the case when no factory is available for given name- Specified by:
handleNoFactoryAvailablein classAbstractFactoryRegistryImpl<WebDriverFactory,ReflectiveWebDriverFactory> - Parameters:
name- request factory name
-
newWebDriver
public org.openqa.selenium.WebDriver newWebDriver(String name, org.openqa.selenium.Capabilities capabilities, ConfigurationProperties configuration) Creates a newWebDriverinstance from factory of the given name- Parameters:
name- name of the factory used to create new WebDriver instancecapabilities- Desired capabilities for the WebDriverconfiguration- Configuration for the WebDriver- Returns:
- a new WebDriver instance
-