Represents a particular configuration of Geb.
Type | Name and description |
---|---|
BuildAdapter |
buildAdapter |
ClassLoader |
classLoader |
Properties |
properties |
groovy.util.ConfigObject |
rawConfig |
Constructor and description |
---|
Configuration
(Map rawConfig) |
Configuration
(groovy.util.ConfigObject rawConfig = null, Properties properties = null, BuildAdapter buildAdapter = null, ClassLoader classLoader = null) |
Type | Name and description |
---|---|
protected Reporter |
createDefaultReporter() |
protected WebDriver |
createDriver() |
NavigatorFactory |
createNavigatorFactory(Browser browser) Creates the navigator factory to be used. |
Wait |
getAtCheckWaiting() |
Wait |
getBaseNavigatorWaiting() |
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). |
Closure |
getDownloadConfig() Returns the default configuration closure to be applied before the user- supplied config closure when using the download support. |
WebDriver |
getDriver() |
def |
getDriverConf() Returns the configuration value for the driver. |
protected DriverFactory |
getDriverFactory(def driverValue) |
boolean |
getIncludeCauseInWaitTimeoutExceptionMessage() Returns Either the value at config path waiting.includeCauseInMessage or false if there is none. |
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. |
Collection<Class<? extends Page>> |
getUnexpectedPages() |
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 |
setAtCheckWaiting(Object waitForParam) |
void |
setAutoClearCookies(boolean flag) Sets the auto clear cookies flag explicitly, overwriting any value from the config script. |
void |
setBaseNavigatorWaiting(Object waitForParam) |
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 |
setDownloadConfig(Closure config) |
void |
setDriver(WebDriver driver) |
void |
setDriverConf(def value) Sets the driver configuration value. |
void |
setIncludeCauseInWaitTimeoutExceptionMessage(boolean include) Updates the waiting.includeCauseInMessage config entry. |
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 |
setUnexpectedPages(Collection<Class<? extends Page>> pages) |
void |
setWaitPreset(String name, Double presetTimeout, Double presetRetryInterval) Updates a waiting.preset config entry for a given preset name. |
protected DriverFactory |
wrapDriverFactoryInCachingIfNeeded(DriverFactory factory) |
Creates the navigator factory to be used. Returns BrowserBackedNavigatorFactory by default.
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. Returns the config value baseUrl
, or BuildAdapter.getBaseUrl.
The default retryInterval
value to use for waiting (i.e. if unspecified).
Either the value at config path waiting.retryInterval
or 0.1.
The default timeout
value to use for waiting (i.e. if unspecified).
Either the value at config path waiting.timeout
or 5.
Returns the default configuration closure to be applied before the user- supplied config closure when using the download support.
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.
Returns Either the value at config path waiting.includeCauseInMessage
or false
if there is none.
Determines if the message of WaitTimeoutException should contain a string representation of its cause.
Returns the inner navigatory factory, that turns WebElements into Navigators. Returns DefaultInnerNavigatorFactory instances by default.
To override, set 'innerNavigatorFactory' to:
Returns the reporter implementation to use for taking snapshots of the browser's state.
Returns the config value reporter
, or reporter that records page source and screen shots if not explicitly set.
Returns the config value reportsDir
, or BuildAdapter.getReportsDir.
Whether or not to automatically clear the browser's cookies automatically.
Different integrations inspect this property at different times.
autoClearCookies
, defaulting to true
if not set.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
.
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
.
If a cached driver is being used, should it be automatically quit when the JVM exits.
The value is the config entry quitCachedDriverOnShutdown
, which defaults to true
.
Sets the auto clear cookies flag explicitly, overwriting any value from the config script.
Updates the cacheDriver
config entry.
Updates the cacheDriverPerThread
config entry.
Updates the waiting.retryInterval
config entry.
Updates the waiting.timeout
config entry.
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.
Updates the waiting.includeCauseInMessage
config entry.
Sets the inner navigator factory. Only effectual before the browser calls createNavigatorFactory(Browser) initially.
Sets whether or not the cached driver should be quit when the JVM shuts down.
Updates the reporter
config entry.
Updates a waiting.preset
config entry for a given preset name.
Groovy API Documentation for Geb 2.1 - Licensed under the Apache License, Version 2.0 - http://www.gebish.org