Package org.fluentlenium.configuration
Class WebDriversRegistryImpl
- java.lang.Object
-
- org.fluentlenium.configuration.AbstractFactoryRegistryImpl<WebDriverFactory,ReflectiveWebDriverFactory>
-
- org.fluentlenium.configuration.WebDriversRegistryImpl
-
public class WebDriversRegistryImpl extends AbstractFactoryRegistryImpl<WebDriverFactory,ReflectiveWebDriverFactory>
WebDrivers registry implementation.
-
-
Field Summary
-
Fields inherited from class org.fluentlenium.configuration.AbstractFactoryRegistryImpl
factories, factoryType, reflectiveFactoryType
-
-
Constructor Summary
Constructors Constructor Description WebDriversRegistryImpl()Creates a new registry.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description protected WebDriverFactorygetDefault(java.util.List<WebDriverFactory> filteredFactories)Get the default factory from given list of available factories.protected voidhandleNoFactoryAvailable(java.lang.String name)Handle the case when no factory is available for given nameprotected ReflectiveWebDriverFactorynewReflectiveInstance(java.lang.String name)Creates an instance of reflective factory.org.openqa.selenium.WebDrivernewWebDriver(java.lang.String name, org.openqa.selenium.Capabilities capabilities, ConfigurationProperties configuration)Creates a newWebDriverinstance from factory of the given name-
Methods inherited from class org.fluentlenium.configuration.AbstractFactoryRegistryImpl
get, getDefault, register
-
-
-
-
Method Detail
-
newReflectiveInstance
protected ReflectiveWebDriverFactory newReflectiveInstance(java.lang.String name)
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
protected WebDriverFactory getDefault(java.util.List<WebDriverFactory> filteredFactories)
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
protected void handleNoFactoryAvailable(java.lang.String name)
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(java.lang.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
-
-