Class FirefoxDriverFactory

  • All Implemented Interfaces:
    org.jboss.arquillian.drone.spi.Configurator<org.openqa.selenium.firefox.FirefoxDriver,​WebDriverConfiguration>, org.jboss.arquillian.drone.spi.Destructor<org.openqa.selenium.firefox.FirefoxDriver>, org.jboss.arquillian.drone.spi.Instantiator<org.openqa.selenium.firefox.FirefoxDriver,​WebDriverConfiguration>, org.jboss.arquillian.drone.spi.Sortable

    public class FirefoxDriverFactory
    extends Object
    implements org.jboss.arquillian.drone.spi.Configurator<org.openqa.selenium.firefox.FirefoxDriver,​WebDriverConfiguration>, org.jboss.arquillian.drone.spi.Instantiator<org.openqa.selenium.firefox.FirefoxDriver,​WebDriverConfiguration>, org.jboss.arquillian.drone.spi.Destructor<org.openqa.selenium.firefox.FirefoxDriver>
    Factory which combines Configurator, Instantiator and Destructor for FirefoxDriver.
    • Field Detail

      • registryInstance

        @Inject
        protected org.jboss.arquillian.core.api.Instance<org.jboss.arquillian.drone.webdriver.spi.BrowserCapabilitiesRegistry> registryInstance
    • Constructor Detail

      • FirefoxDriverFactory

        public FirefoxDriverFactory()
    • Method Detail

      • getPrecedence

        public int getPrecedence()
        Specified by:
        getPrecedence in interface org.jboss.arquillian.drone.spi.Sortable
      • destroyInstance

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

        public org.openqa.selenium.firefox.FirefoxDriver createInstance​(WebDriverConfiguration configuration)
        Specified by:
        createInstance in interface org.jboss.arquillian.drone.spi.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,
                                                          org.jboss.arquillian.drone.spi.DronePoint<T> dronePoint)
        Specified by:
        createConfiguration in interface org.jboss.arquillian.drone.spi.Configurator<T extends org.openqa.selenium.WebDriver,​WebDriverConfiguration>