Class FirefoxDriverFactory
- java.lang.Object
-
- org.jboss.arquillian.drone.webdriver.factory.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 combinesConfigurator,InstantiatorandDestructorfor FirefoxDriver.
-
-
Field Summary
Fields Modifier and Type Field Description static StringFIREFOX_DRIVER_BINARY_PROPERTYprotected org.jboss.arquillian.core.api.Instance<org.jboss.arquillian.drone.webdriver.spi.BrowserCapabilitiesRegistry>registryInstance
-
Constructor Summary
Constructors Constructor Description FirefoxDriverFactory()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description WebDriverConfigurationcreateConfiguration(org.jboss.arquillian.config.descriptor.api.ArquillianDescriptor descriptor, org.jboss.arquillian.drone.spi.DronePoint<T> dronePoint)org.openqa.selenium.firefox.FirefoxDrivercreateInstance(WebDriverConfiguration configuration)voiddestroyInstance(org.openqa.selenium.firefox.FirefoxDriver instance)protected StringgetDriverReadableName()org.openqa.selenium.firefox.FirefoxOptionsgetFirefoxOptions(WebDriverConfiguration configuration, boolean performValidations)Returns aFirefoxOptionsinstance with set all necessary properties.intgetPrecedence()
-
-
-
Field Detail
-
FIREFOX_DRIVER_BINARY_PROPERTY
public static final String FIREFOX_DRIVER_BINARY_PROPERTY
- See Also:
- Constant Field Values
-
registryInstance
@Inject protected org.jboss.arquillian.core.api.Instance<org.jboss.arquillian.drone.webdriver.spi.BrowserCapabilitiesRegistry> registryInstance
-
-
Method Detail
-
getPrecedence
public int getPrecedence()
- Specified by:
getPrecedencein interfaceorg.jboss.arquillian.drone.spi.Sortable
-
destroyInstance
public void destroyInstance(org.openqa.selenium.firefox.FirefoxDriver instance)
- Specified by:
destroyInstancein interfaceorg.jboss.arquillian.drone.spi.Destructor<org.openqa.selenium.firefox.FirefoxDriver>
-
createInstance
public org.openqa.selenium.firefox.FirefoxDriver createInstance(WebDriverConfiguration configuration)
- Specified by:
createInstancein interfaceorg.jboss.arquillian.drone.spi.Instantiator<org.openqa.selenium.firefox.FirefoxDriver,WebDriverConfiguration>
-
getFirefoxOptions
public org.openqa.selenium.firefox.FirefoxOptions getFirefoxOptions(WebDriverConfiguration configuration, boolean performValidations)
Returns aFirefoxOptionsinstance 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 extensionperformValidations- 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
FirefoxOptionsinstance 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:
createConfigurationin interfaceorg.jboss.arquillian.drone.spi.Configurator<T extends org.openqa.selenium.WebDriver,WebDriverConfiguration>
-
-