Groovy Documentation

geb.waiting
[Groovy] Class WaitingSupport

java.lang.Object
  geb.waiting.WaitingSupport

class WaitingSupport
extends Object

A mixin style class that adds support for waiting for different things. This is mixed into Page and Module.


Constructor Summary
WaitingSupport(Configuration config)

 
Method Summary
def waitFor(String waitPreset, Closure block)

Uses the wait preset from the configuration with the given name to to wait for block to return a true value according to the Groovy Truth.

def waitFor(Closure block)

Uses the default wait from the configuration to wait for block to return a true value according to the Groovy Truth.

def waitFor(Double timeout, Closure block)

Invokes block every Configuration.getDefaultWaitRetryInterval seconds, until it returns a true value according to the Groovy Truth, waiting at most timeout seconds.

def waitFor(Double timeout, Double interval, Closure block)

Invokes block every interval seconds, until it returns a true value according to the Groovy Truth, waiting at most timeout seconds.

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

Constructor Detail

WaitingSupport

WaitingSupport(Configuration config)


 
Method Detail

waitFor

def waitFor(String waitPreset, Closure block)
Uses the wait preset from the configuration with the given name to to wait for block to return a true value according to the Groovy Truth.
throws:
WaitTimeoutException if the block does not produce a true-ish value in time
Parameters:
waitPreset - the name of the wait preset in configuration to use
block - what is to be waited on to return a true-ish value
Returns:
the true-ish return value from block
See Also:
Configuration.getWaitPreset
Wait.waitFor


waitFor

def waitFor(Closure block)
Uses the default wait from the configuration to wait for block to return a true value according to the Groovy Truth.
throws:
WaitTimeoutException if the block does not produce a true-ish value in time
Parameters:
block - what is to be waited on to return a true-ish value
Returns:
the true-ish return value from block
See Also:
Configuration.getDefaultWait
Wait.waitFor


waitFor

def waitFor(Double timeout, Closure block)
Invokes block every Configuration.getDefaultWaitRetryInterval seconds, until it returns a true value according to the Groovy Truth, waiting at most timeout seconds.
throws:
WaitTimeoutException if the block does not produce a true-ish value in time
Parameters:
timeout - the number of seconds to wait for block to return (roughly)
block - what is to be waited on to return a true-ish value
Returns:
the true-ish return value from block
See Also:
Wait.waitFor


waitFor

def waitFor(Double timeout, Double interval, Closure block)
Invokes block every interval seconds, until it returns a true value according to the Groovy Truth, waiting at most timeout seconds.
throws:
WaitTimeoutException if the block does not produce a true-ish value in time
Parameters:
interval - the number of seconds to wait between invoking block
timeout - the number of seconds to wait for block to return (roughly)
block - what is to be waited on to return a true-ish value
Returns:
the true-ish return value from block
See Also:
Wait.waitFor


 

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