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>
Factory which combines Configurator, Instantiator and Destructor for ChromeDriver.
  • Field Details

    • 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<BrowserCapabilitiesRegistry> registryInstance
  • Constructor Details

    • ChromeDriverFactory

      public ChromeDriverFactory()
  • Method Details

    • getPrecedence

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

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

      public org.openqa.selenium.chrome.ChromeDriver createInstance(WebDriverConfiguration configuration)
      Specified by:
      createInstance in interface Instantiator<org.openqa.selenium.chrome.ChromeDriver,WebDriverConfiguration>
    • getChromeOptions

      public org.openqa.selenium.chrome.ChromeOptions getChromeOptions(WebDriverConfiguration configuration, boolean performValidations)
      Returns a ChromeOptions instance 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 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 Capabilities instance 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, DronePoint<org.openqa.selenium.chrome.ChromeDriver> dronePoint)
      Specified by:
      createConfiguration in interface Configurator<org.openqa.selenium.chrome.ChromeDriver,WebDriverConfiguration>