Package io.fluentlenium.configuration
Class ReflectiveCapabilitiesFactory
java.lang.Object
io.fluentlenium.configuration.ReflectiveCapabilitiesFactory
- All Implemented Interfaces:
CapabilitiesFactory
,Factory
,FactoryNames
,ReflectiveFactory
public class ReflectiveCapabilitiesFactory
extends Object
implements CapabilitiesFactory, FactoryNames, ReflectiveFactory
A simple
CapabilitiesFactory
that create Capabilities
instances using reflection.
-
Constructor Summary
ConstructorDescriptionReflectiveCapabilitiesFactory
(String name, Class<? extends org.openqa.selenium.Capabilities> capabilitiesClass, Object... args) Creates a new reflective capabilities factory.ReflectiveCapabilitiesFactory
(String name, String capabilitiesClassName, Object... args) Creates a new reflective capabilities factory. -
Method Summary
Modifier and TypeMethodDescriptionClass<? extends org.openqa.selenium.Capabilities>
Get the capabilities classString[]
getNames()
Get the factory names.boolean
Check if the class instantiated by this factory is available.org.openqa.selenium.Capabilities
newCapabilities
(ConfigurationProperties configuration) Creates a new instance ofCapabilities
.protected org.openqa.selenium.remote.DesiredCapabilities
Creates default capabilities.
-
Constructor Details
-
ReflectiveCapabilitiesFactory
Creates a new reflective capabilities factory.- Parameters:
name
- factory namecapabilitiesClassName
- capabilities class nameargs
- capabilities class constructor arguments
-
ReflectiveCapabilitiesFactory
public ReflectiveCapabilitiesFactory(String name, Class<? extends org.openqa.selenium.Capabilities> capabilitiesClass, Object... args) Creates a new reflective capabilities factory.- Parameters:
name
- factory namecapabilitiesClass
- capabilities classargs
- capabilities class constructor arguments
-
-
Method Details
-
getCapabilitiesClass
Get the capabilities class- Returns:
- capabilities class
-
isAvailable
public boolean isAvailable()Description copied from interface:ReflectiveFactory
Check if the class instantiated by this factory is available.- Specified by:
isAvailable
in interfaceReflectiveFactory
- Returns:
- true if the class is available.
-
newDefaultCapabilities
protected org.openqa.selenium.remote.DesiredCapabilities newDefaultCapabilities()Creates default capabilities.- Returns:
- default capabilities
-
newCapabilities
Description copied from interface:CapabilitiesFactory
Creates a new instance ofCapabilities
.- Specified by:
newCapabilities
in interfaceCapabilitiesFactory
- Parameters:
configuration
- configuration- Returns:
- new instance of capabilities
-
getNames
Description copied from interface:FactoryNames
Get the factory names.- Specified by:
getNames
in interfaceFactoryNames
- Returns:
- array of factory names
-