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
-
Method Summary
Modifier and TypeMethodDescriptionprotected WebDriverFactory
getDefault
(List<WebDriverFactory> filteredFactories) Get the default factory from given list of available factories.protected void
handleNoFactoryAvailable
(String name) Handle the case when no factory is available for given nameprotected ReflectiveWebDriverFactory
newReflectiveInstance
(String name) Creates an instance of reflective factory.org.openqa.selenium.WebDriver
newWebDriver
(String name, org.openqa.selenium.Capabilities capabilities, ConfigurationProperties configuration) Creates a newWebDriver
instance 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:AbstractFactoryRegistryImpl
Creates an instance of reflective factory.- Specified by:
newReflectiveInstance
in classAbstractFactoryRegistryImpl<WebDriverFactory,
ReflectiveWebDriverFactory> - Parameters:
name
- name of the instance to create.- Returns:
- new instance
-
getDefault
Description copied from class:AbstractFactoryRegistryImpl
Get the default factory from given list of available factories.- Specified by:
getDefault
in classAbstractFactoryRegistryImpl<WebDriverFactory,
ReflectiveWebDriverFactory> - Parameters:
filteredFactories
- available factories- Returns:
- default factory
-
handleNoFactoryAvailable
Description copied from class:AbstractFactoryRegistryImpl
Handle the case when no factory is available for given name- Specified by:
handleNoFactoryAvailable
in 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 newWebDriver
instance 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
-