Class ChromeDriverFactory
- java.lang.Object
-
- org.jboss.arquillian.drone.webdriver.factory.ChromeDriverFactory
-
- All Implemented Interfaces:
org.jboss.arquillian.drone.spi.Configurator<org.openqa.selenium.chrome.ChromeDriver,WebDriverConfiguration>,org.jboss.arquillian.drone.spi.Destructor<org.openqa.selenium.chrome.ChromeDriver>,org.jboss.arquillian.drone.spi.Instantiator<org.openqa.selenium.chrome.ChromeDriver,WebDriverConfiguration>,org.jboss.arquillian.drone.spi.Sortable
public class ChromeDriverFactory extends Object implements org.jboss.arquillian.drone.spi.Configurator<org.openqa.selenium.chrome.ChromeDriver,WebDriverConfiguration>, org.jboss.arquillian.drone.spi.Instantiator<org.openqa.selenium.chrome.ChromeDriver,WebDriverConfiguration>, org.jboss.arquillian.drone.spi.Destructor<org.openqa.selenium.chrome.ChromeDriver>
Factory which combinesConfigurator,InstantiatorandDestructorfor ChromeDriver.
-
-
Field Summary
Fields Modifier and Type Field Description static StringBROWSER_CAPABILITIESstatic StringHEADLESS_BROWSER_CAPABILITIESprotected org.jboss.arquillian.core.api.Instance<org.jboss.arquillian.drone.webdriver.spi.BrowserCapabilitiesRegistry>registryInstance
-
Constructor Summary
Constructors Constructor Description ChromeDriverFactory()
-
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<org.openqa.selenium.chrome.ChromeDriver> dronePoint)org.openqa.selenium.chrome.ChromeDrivercreateInstance(WebDriverConfiguration configuration)voiddestroyInstance(org.openqa.selenium.chrome.ChromeDriver instance)org.openqa.selenium.chrome.ChromeOptionsgetChromeOptions(WebDriverConfiguration configuration)org.openqa.selenium.chrome.ChromeOptionsgetChromeOptions(WebDriverConfiguration configuration, boolean performValidations)Returns aChromeOptionsinstance with set all necessary properties.protected StringgetDriverReadableName()intgetPrecedence()voidmanageChromeHeadless(WebDriverConfiguration configuration, org.openqa.selenium.chrome.ChromeOptions chromeOptions)voidsetChromeOptions(WebDriverConfiguration configuration, org.openqa.selenium.chrome.ChromeOptions chromeOptions)
-
-
-
Field Detail
-
BROWSER_CAPABILITIES
public static final String BROWSER_CAPABILITIES
-
HEADLESS_BROWSER_CAPABILITIES
public static final String HEADLESS_BROWSER_CAPABILITIES
-
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.chrome.ChromeDriver instance)
- Specified by:
destroyInstancein interfaceorg.jboss.arquillian.drone.spi.Destructor<org.openqa.selenium.chrome.ChromeDriver>
-
createInstance
public org.openqa.selenium.chrome.ChromeDriver createInstance(WebDriverConfiguration configuration)
- Specified by:
createInstancein interfaceorg.jboss.arquillian.drone.spi.Instantiator<org.openqa.selenium.chrome.ChromeDriver,WebDriverConfiguration>
-
getChromeOptions
public org.openqa.selenium.chrome.ChromeOptions getChromeOptions(WebDriverConfiguration configuration, boolean performValidations)
Returns aChromeOptionsinstance with set all necessary properties. It also validates if the defined chrome.binary and chromeDriverBinary are executable binaries. 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
Capabilitiesinstance with set all necessary properties.
-
getChromeOptions
public org.openqa.selenium.chrome.ChromeOptions getChromeOptions(WebDriverConfiguration configuration)
-
setChromeOptions
public void setChromeOptions(WebDriverConfiguration configuration, org.openqa.selenium.chrome.ChromeOptions chromeOptions)
-
manageChromeHeadless
public void manageChromeHeadless(WebDriverConfiguration configuration, org.openqa.selenium.chrome.ChromeOptions chromeOptions)
-
getDriverReadableName
protected String getDriverReadableName()
-
createConfiguration
public WebDriverConfiguration createConfiguration(org.jboss.arquillian.config.descriptor.api.ArquillianDescriptor descriptor, org.jboss.arquillian.drone.spi.DronePoint<org.openqa.selenium.chrome.ChromeDriver> dronePoint)
- Specified by:
createConfigurationin interfaceorg.jboss.arquillian.drone.spi.Configurator<org.openqa.selenium.chrome.ChromeDriver,WebDriverConfiguration>
-
-