|
Groovy Documentation | |||||||
| FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | PROPERTY | CONSTR | METHOD | DETAIL: FIELD | PROPERTY | CONSTR | METHOD | |||||||
java.lang.Objectgeb.Configuration
class Configuration
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 Reporter
|
createDefaultReporter()
|
protected WebDriver
|
createDriver()
|
NavigatorFactory
|
createNavigatorFactory(Browser browser)
Creates the navigator factory to be used. |
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)
|
InnerNavigatorFactory
|
getInnerNavigatorFactory()
Returns the inner navigatory factory, that turns WebElements into Navigators. |
Reporter
|
getReporter()
Returns the reporter implementation to use for taking snapshots of the browser's state. |
ReportingListener
|
getReportingListener()
|
File
|
getReportsDir()
Returns the config value reportsDir, or BuildAdapter.getReportsDir. |
Wait
|
getWait(Double timeout)
|
Wait
|
getWaitForParam(def waitingParam)
|
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 |
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
|
setDefaultWaitRetryInterval(Double defaultWaitRetryInterval)
Updates the waiting.retryInterval config entry. |
void
|
setDefaultWaitTimeout(Double defaultWaitTimeout)
Updates the waiting.timeout config entry. |
void
|
setDriver(WebDriver driver)
|
void
|
setDriverConf(def value)
Sets the driver configuration value. |
void
|
setInnerNavigatorFactory(InnerNavigatorFactory innerNavigatorFactory)
Sets the inner navigator factory. |
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
|
setReportingListener(ReportingListener reportingListener)
|
void
|
setReportsDir(File reportsDir)
|
void
|
setWaitPreset(String name, Double presetTimeout, Double presetRetryInterval)
Updates a waiting.preset config entry for a given preset name. |
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 Reporter createDefaultReporter()
protected WebDriver createDriver()
NavigatorFactory createNavigatorFactory(Browser browser)
Override by setting the 'navigatorFactory' to a closure that takes a single Browser argument and returns an instance of NavigatorFactory
browser - The browser to use as the basis of the navigatory factory.
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)
InnerNavigatorFactory getInnerNavigatorFactory()
To override, set 'innerNavigatorFactory' to:
Reporter getReporter()
Returns the config value reporter, or reporter that records page source and screen shots if not explicitly set.
ReportingListener getReportingListener()
File getReportsDir()
Wait getWait(Double timeout)
Wait getWaitForParam(def waitingParam)
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 setDefaultWaitRetryInterval(Double defaultWaitRetryInterval)
void setDefaultWaitTimeout(Double defaultWaitTimeout)
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 setInnerNavigatorFactory(InnerNavigatorFactory innerNavigatorFactory)
void setQuitCacheDriverOnShutdown(boolean flag)
def setReportOnTestFailureOnly(boolean value)
void setReporter(Reporter reporter)
void setReportingListener(ReportingListener reportingListener)
void setReportsDir(File reportsDir)
void setWaitPreset(String name, Double presetTimeout, Double presetRetryInterval)
protected DriverFactory wrapDriverFactoryInCachingIfNeeded(DriverFactory factory)
Groovy API Documentation for Geb 0.9.0-RC-3 - Licensed under the Apache License, Version 2.0 - http://www.gebish.org