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 Details

    • ReflectiveCapabilitiesFactory

      public ReflectiveCapabilitiesFactory (String name, String capabilitiesClassName, Object... args)
      Creates a new reflective capabilities factory.
      Parameters:
      name - factory name
      capabilitiesClassName - capabilities class name
      args - 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 name
      capabilitiesClass - capabilities class
      args - capabilities class constructor arguments
  • Method Details

    • getCapabilitiesClass

      public Class<? extends org.openqa.selenium.Capabilities> 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 interface ReflectiveFactory
      Returns:
      true if the class is available.
    • newDefaultCapabilities

      protected org.openqa.selenium.remote.DesiredCapabilities newDefaultCapabilities()
      Creates default capabilities.
      Returns:
      default capabilities
    • newCapabilities

      public org.openqa.selenium.Capabilities newCapabilities (ConfigurationProperties configuration)
      Description copied from interface: CapabilitiesFactory
      Creates a new instance of Capabilities.
      Specified by:
      newCapabilities in interface CapabilitiesFactory
      Parameters:
      configuration - configuration
      Returns:
      new instance of capabilities
    • getNames

      public String[] getNames()
      Description copied from interface: FactoryNames
      Get the factory names.
      Specified by:
      getNames in interface FactoryNames
      Returns:
      array of factory names