Class FirefoxDriverFactory

java.lang.Object
org.jboss.arquillian.drone.webdriver.factory.FirefoxDriverFactory
All Implemented Interfaces:
Configurator<org.openqa.selenium.firefox.FirefoxDriver,WebDriverConfiguration>, Destructor<org.openqa.selenium.firefox.FirefoxDriver>, Instantiator<org.openqa.selenium.firefox.FirefoxDriver,WebDriverConfiguration>, Sortable

public class FirefoxDriverFactory extends Object implements Configurator<org.openqa.selenium.firefox.FirefoxDriver,WebDriverConfiguration>, Instantiator<org.openqa.selenium.firefox.FirefoxDriver,WebDriverConfiguration>, Destructor<org.openqa.selenium.firefox.FirefoxDriver>
Factory which combines Configurator, Instantiator and Destructor for FirefoxDriver.
  • Field Details

  • Constructor Details

    • FirefoxDriverFactory

      public FirefoxDriverFactory()
  • Method Details

    • getPrecedence

      public int getPrecedence()
      Specified by:
      getPrecedence in interface Sortable
    • destroyInstance

      public void destroyInstance(org.openqa.selenium.firefox.FirefoxDriver instance)
      Specified by:
      destroyInstance in interface Destructor<org.openqa.selenium.firefox.FirefoxDriver>
    • createInstance

      public org.openqa.selenium.firefox.FirefoxDriver createInstance(WebDriverConfiguration configuration)
      Specified by:
      createInstance in interface Instantiator<org.openqa.selenium.firefox.FirefoxDriver,WebDriverConfiguration>
    • getFirefoxOptions

      public org.openqa.selenium.firefox.FirefoxOptions getFirefoxOptions(WebDriverConfiguration configuration, boolean performValidations)
      Returns a FirefoxOptions instance with set all necessary properties. It also validates whether the defined firefoxDriverBinary are executable binaries and creates/sets a prospective firefox profile as well as a firefox extension. This validation can be set off/on by using variable performValidations; if set to true the IllegalArgumentException can be thrown in case when requirements are not met
      Parameters:
      configuration - A configuration object for Drone extension
      performValidations - Whether a potential validation should be performed; if set to true an IllegalArgumentException (or other exception) can be thrown in case requirements are not met
      Returns:
      A FirefoxOptions instance with set all necessary properties; if set to true the IllegalArgumentException can be thrown in case when requirements are not met
    • getDriverReadableName

      protected String getDriverReadableName()
    • createConfiguration

      public WebDriverConfiguration createConfiguration(org.jboss.arquillian.config.descriptor.api.ArquillianDescriptor descriptor, DronePoint<org.openqa.selenium.firefox.FirefoxDriver> dronePoint)
      Specified by:
      createConfiguration in interface Configurator<T extends org.openqa.selenium.WebDriver,WebDriverConfiguration>