|
Groovy Documentation | |||||||
FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | PROPERTY | CONSTR | METHOD | DETAIL: FIELD | PROPERTY | CONSTR | METHOD |
java.lang.Objectgeb.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. |
boolean
|
isCacheDriverPerThread()
The driver is to be cached, this setting controls whether or not the driver is cached per thread, or per The value is the config entry cacheDriverPerThread, which defaults to true. |
boolean
|
isQuitCachedDriverOnShutdown()
If a cached driver is being used, should it be automatically quit when the JVM exits. |
boolean
|
isReportOnTestFailureOnly()
|
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
|
setCacheDriverPerThread(boolean flag)
Updates the cacheDriverPerThread config entry. |
void
|
setDriver(WebDriver driver)
|
void
|
setDriverConf(def value)
Sets the driver configuration value. |
void
|
setQuitCacheDriverOnShutdown(boolean flag)
Sets whether or not the cached driver should be quit when the JVM shuts down. |
def
|
setReportOnTestFailureOnly(boolean 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 |
---|
final BuildAdapter buildAdapter
final ClassLoader classLoader
final Properties properties
final groovy.util.ConfigObject rawConfig
Constructor Detail |
---|
Configuration(Map rawConfig)
Configuration(groovy.util.ConfigObject rawConfig = null, Properties properties = null, BuildAdapter buildAdapter = null, ClassLoader classLoader = null)
Method Detail |
---|
protected WebDriver createDriver()
String getBaseUrl()
Wait getDefaultWait()
Double getDefaultWaitRetryInterval()
Either the value at config path waiting.retryInterval or 0.1.
Double getDefaultWaitTimeout()
Either the value at config path waiting.timeout or 5.
WebDriver getDriver()
def getDriverConf()
This may be the class name of a driver implementation, a short name, or a closure that when invoked returns an actual driver.
protected DriverFactory getDriverFactory(def driverValue)
Reporter getReporter()
Returns the config value reporter, or an instance of ScreenshotAndPageSourceReporter if not explicitly set.
File getReportsDir()
Wait getWait(Double timeout)
Wait getWaitPreset(String name)
boolean isAutoClearCookies()
Different integrations inspect this property at different times.
boolean isCacheDriver()
The value is the config entry cacheDriver, which defaults to true.
boolean isCacheDriverPerThread()
The value is the config entry cacheDriverPerThread, which defaults to true.
boolean isQuitCachedDriverOnShutdown()
The value is the config entry quitCachedDriverOnShutdown, which defaults to true.
boolean isReportOnTestFailureOnly()
protected def readValue(String name, def defaultValue)
protected def readValue(groovy.util.ConfigObject config, String name, def defaultValue)
void setAutoClearCookies(boolean flag)
void setBaseUrl(def baseUrl)
void setCacheDriver(boolean flag)
void setCacheDriverPerThread(boolean flag)
void setDriver(WebDriver driver)
void setDriverConf(def 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.
void setQuitCacheDriverOnShutdown(boolean flag)
def setReportOnTestFailureOnly(boolean value)
void setReporter(Reporter reporter)
void setReportsDir(File reportsDir)
protected DriverFactory wrapDriverFactoryInCachingIfNeeded(DriverFactory factory)
Groovy API Documentation for geb-core 0.6.2 - Licensed under the Apache License, Version 2.0 - http://www.gebish.org