Class ChromeDriverFactory
java.lang.Object
org.jboss.arquillian.drone.webdriver.factory.ChromeDriverFactory
- All Implemented Interfaces:
Configurator<org.openqa.selenium.chrome.ChromeDriver,,WebDriverConfiguration> Destructor<org.openqa.selenium.chrome.ChromeDriver>,Instantiator<org.openqa.selenium.chrome.ChromeDriver,,WebDriverConfiguration> Sortable
public class ChromeDriverFactory
extends Object
implements Configurator<org.openqa.selenium.chrome.ChromeDriver,WebDriverConfiguration>, Instantiator<org.openqa.selenium.chrome.ChromeDriver,WebDriverConfiguration>, Destructor<org.openqa.selenium.chrome.ChromeDriver>
-
Field Summary
FieldsModifier and TypeFieldDescriptionstatic final Stringstatic final Stringprotected org.jboss.arquillian.core.api.Instance<BrowserCapabilitiesRegistry> -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptioncreateConfiguration(org.jboss.arquillian.config.descriptor.api.ArquillianDescriptor descriptor, 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 StringintvoidmanageChromeHeadless(WebDriverConfiguration configuration, org.openqa.selenium.chrome.ChromeOptions chromeOptions) voidsetChromeOptions(WebDriverConfiguration configuration, org.openqa.selenium.chrome.ChromeOptions chromeOptions)
-
Field Details
-
BROWSER_CAPABILITIES
-
HEADLESS_BROWSER_CAPABILITIES
-
registryInstance
@Inject protected org.jboss.arquillian.core.api.Instance<BrowserCapabilitiesRegistry> registryInstance
-
-
Constructor Details
-
ChromeDriverFactory
public ChromeDriverFactory()
-
-
Method Details
-
getPrecedence
public int getPrecedence()- Specified by:
getPrecedencein interfaceSortable
-
destroyInstance
public void destroyInstance(org.openqa.selenium.chrome.ChromeDriver instance) - Specified by:
destroyInstancein interfaceDestructor<org.openqa.selenium.chrome.ChromeDriver>
-
createInstance
- Specified by:
createInstancein interfaceInstantiator<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
-
createConfiguration
public WebDriverConfiguration createConfiguration(org.jboss.arquillian.config.descriptor.api.ArquillianDescriptor descriptor, DronePoint<org.openqa.selenium.chrome.ChromeDriver> dronePoint) - Specified by:
createConfigurationin interfaceConfigurator<org.openqa.selenium.chrome.ChromeDriver,WebDriverConfiguration>
-