Package io.fluentlenium.configuration
Class CapabilitiesRegistryImpl
java.lang.Object
io.fluentlenium.configuration.AbstractFactoryRegistryImpl<CapabilitiesFactory,
ReflectiveCapabilitiesFactory>
io.fluentlenium.configuration.CapabilitiesRegistryImpl
public class CapabilitiesRegistryImpl
extends AbstractFactoryRegistryImpl<CapabilitiesFactory,ReflectiveCapabilitiesFactory>
Capabilities registry default implementation.
-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionstatic class
Desired capabilities factory. -
Field Summary
Fields inherited from class io.fluentlenium.configuration.AbstractFactoryRegistryImpl
factories, factoryType, reflectiveFactoryType
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionprotected CapabilitiesFactory
getDefault
(List<CapabilitiesFactory> 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 nameorg.openqa.selenium.Capabilities
newCapabilities
(String name, ConfigurationProperties configuration) Creates a newCapabilitiesRegistry
instance from factory of the given nameprotected ReflectiveCapabilitiesFactory
newReflectiveInstance
(String name) Creates an instance of reflective factory.Methods inherited from class io.fluentlenium.configuration.AbstractFactoryRegistryImpl
get, getDefault, register
-
Constructor Details
-
CapabilitiesRegistryImpl
public CapabilitiesRegistryImpl()Creates a new capabilities registry.
-
-
Method Details
-
newReflectiveInstance
Description copied from class:AbstractFactoryRegistryImpl
Creates an instance of reflective factory.- Specified by:
newReflectiveInstance
in classAbstractFactoryRegistryImpl<CapabilitiesFactory,
ReflectiveCapabilitiesFactory> - 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<CapabilitiesFactory,
ReflectiveCapabilitiesFactory> - 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<CapabilitiesFactory,
ReflectiveCapabilitiesFactory> - Parameters:
name
- request factory name
-
newCapabilities
public org.openqa.selenium.Capabilities newCapabilities(String name, ConfigurationProperties configuration) Creates a newCapabilitiesRegistry
instance from factory of the given name- Parameters:
name
- name of the factory used to create new WebDriver instanceconfiguration
- configuration- Returns:
- a new Capabilities instance
-