Groovy Documentation

geb
[Groovy] Class Configuration

java.lang.Object
  geb.Configuration

class Configuration
extends Object

Represents a particular configuration of Geb.


Property Summary
BuildAdapter buildAdapter

ClassLoader classLoader

Properties properties

groovy.util.ConfigObject rawConfig

 
Constructor Summary
Configuration(Map rawConfig)

Configuration(groovy.util.ConfigObject rawConfig = null, Properties properties = null, BuildAdapter buildAdapter = null, ClassLoader classLoader = null)

 
Method Summary
protected WebDriver createDriver()

String getBaseUrl()

Returns the config value baseUrl, or BuildAdapter.getBaseUrl.

Wait getDefaultWait()

Double getDefaultWaitRetryInterval()

The default retryInterval value to use for waiting (i.e. if unspecified).

Double getDefaultWaitTimeout()

The default timeout value to use for waiting (i.e. if unspecified).

WebDriver getDriver()

def getDriverConf()

Returns the configuration value for the driver.

protected DriverFactory getDriverFactory(def driverValue)

Reporter getReporter()

Returns the reporter implementation to use for taking snapshots of the browser's state.

File getReportsDir()

Returns the config value reportsDir, or BuildAdapter.getReportsDir.

Wait getWait(Double timeout)

Wait getWaitPreset(String name)

boolean isAutoClearCookies()

Whether or not to automatically clear the browser's cookies automatically.

boolean isCacheDriver()

Should the created driver be cached if there is no existing cached driver, of if there is a cached driver should it be used instead of creating a new one.

protected def readValue(String name, def defaultValue)

protected def readValue(groovy.util.ConfigObject config, String name, def defaultValue)

void setAutoClearCookies(boolean flag)

Sets the auto clear cookies flag explicitly, overwriting any value from the config script.

void setBaseUrl(def baseUrl)

void setCacheDriver(boolean flag)

Updates the cacheDriver config entry.

void setDriver(WebDriver driver)

void setDriverConf(def value)

Sets the driver configuration value.

void setReporter(Reporter reporter)

Updates the reporter config entry.

void setReportsDir(File reportsDir)

protected DriverFactory wrapDriverFactoryInCachingIfNeeded(DriverFactory factory)

 
Methods inherited from class Object
wait, wait, wait, equals, toString, hashCode, getClass, notify, notifyAll
 

Property Detail

buildAdapter

final BuildAdapter buildAdapter


classLoader

final ClassLoader classLoader


properties

final Properties properties


rawConfig

final groovy.util.ConfigObject rawConfig


 
Constructor Detail

Configuration

Configuration(Map rawConfig)


Configuration

Configuration(groovy.util.ConfigObject rawConfig = null, Properties properties = null, BuildAdapter buildAdapter = null, ClassLoader classLoader = null)


 
Method Detail

createDriver

protected WebDriver createDriver()


getBaseUrl

String getBaseUrl()
Returns the config value baseUrl, or BuildAdapter.getBaseUrl.


getDefaultWait

Wait getDefaultWait()


getDefaultWaitRetryInterval

Double getDefaultWaitRetryInterval()
The default retryInterval value to use for waiting (i.e. if unspecified).

Either the value at config path waiting.retryInterval or 0.1.


getDefaultWaitTimeout

Double getDefaultWaitTimeout()
The default timeout value to use for waiting (i.e. if unspecified).

Either the value at config path waiting.timeout or 5.


getDriver

WebDriver getDriver()


getDriverConf

def getDriverConf()
Returns the configuration value for the driver.

This may be the class name of a driver implementation, a short name, or a closure that when invoked returns an actual driver.

See Also:
getDriver()


getDriverFactory

protected DriverFactory getDriverFactory(def driverValue)


getReporter

Reporter getReporter()
Returns the reporter implementation to use for taking snapshots of the browser's state.

Returns the config value reporter, or an instance of ScreenshotAndPageSourceReporter if not explicitly set.


getReportsDir

File getReportsDir()
Returns the config value reportsDir, or BuildAdapter.getReportsDir.


getWait

Wait getWait(Double timeout)


getWaitPreset

Wait getWaitPreset(String name)


isAutoClearCookies

boolean isAutoClearCookies()
Whether or not to automatically clear the browser's cookies automatically.

Different integrations inspect this property at different times.

Returns:
the config value for autoClearCookies, defaulting to true if not set.


isCacheDriver

boolean isCacheDriver()
Should the created driver be cached if there is no existing cached driver, of if there is a cached driver should it be used instead of creating a new one.

The value is the config entry cacheDriver, which defaults to true.


readValue

protected def readValue(String name, def defaultValue)


readValue

protected def readValue(groovy.util.ConfigObject config, String name, def defaultValue)


setAutoClearCookies

void setAutoClearCookies(boolean flag)
Sets the auto clear cookies flag explicitly, overwriting any value from the config script.


setBaseUrl

void setBaseUrl(def baseUrl)


setCacheDriver

void setCacheDriver(boolean flag)
Updates the cacheDriver config entry.
See Also:
isCacheDriver()


setDriver

void setDriver(WebDriver driver)


setDriverConf

void setDriverConf(def value)
Sets the driver configuration value.

This may be the class name of a driver implementation, a driver short name or a closure that when invoked with no arguments returns a driver implementation.

See Also:
getDriver()


setReporter

void setReporter(Reporter reporter)
Updates the reporter config entry.
See Also:
getReporter()


setReportsDir

void setReportsDir(File reportsDir)


wrapDriverFactoryInCachingIfNeeded

protected DriverFactory wrapDriverFactoryInCachingIfNeeded(DriverFactory factory)


 

Groovy API Documentation for geb-core 0.6.0 - Licensed under the Apache License, Version 2.0 - http://www.gebish.org