Graphene Implementation 1.0.0.CR3

org.jboss.arquillian.ajocado.waiting.ajax
Interface AjaxWaiting

All Superinterfaces:
Waiting<AjaxWaiting>
All Known Implementing Classes:
DefaultAjaxWaiting

public interface AjaxWaiting
extends Waiting<AjaxWaiting>

Implementation of waiting for satisfaction of conditions on page after the Ajax request.

It uses custom JavaScript and com.thoughtworks.selenium.Selenium.Selenium#waitForCondition(String, String) to wait for satisfying given condition.

Version:
$Revision$
Author:
Lukas Fryc

Method Summary
 void until(JavaScriptCondition condition)
          Stars loop waiting to satisfy condition.
<T> void
waitForChange(JavaScriptRetriever<T> retriever)
           Waits until Retrieve's implementation doesn't retrieve value other than value stored by initialization in retriever.
<T> void
waitForChange(T oldValue, JavaScriptRetriever<T> retriever)
          Waits until Retrieve's implementation doesn't retrieve value other than oldValue.
<T> T
waitForChangeAndReturn(JavaScriptRetriever<T> retriever)
           Waits until Retrieve's implementation doesn't retrieve value other than value stored by initialization in retriever.
<T> T
waitForChangeAndReturn(T oldValue, JavaScriptRetriever<T> retriever)
          Waits until Retrieve's implementation doesn't retrieve value other than oldValue and this new value returns.
 
Methods inherited from interface org.jboss.arquillian.ajocado.waiting.Waiting
dontFail, failWith, failWith, interval, noDelay, timeout, waitForTimeout, withDelay
 

Method Detail

until

void until(JavaScriptCondition condition)
Stars loop waiting to satisfy condition.

Parameters:
condition - what wait for to be satisfied

waitForChange

<T> void waitForChange(T oldValue,
                       JavaScriptRetriever<T> retriever)
Waits until Retrieve's implementation doesn't retrieve value other than oldValue.

Type Parameters:
T - type of value what we are waiting for change
Parameters:
oldValue - value that we are waiting for change
retriever - implementation of retrieving actual value

waitForChange

<T> void waitForChange(JavaScriptRetriever<T> retriever)

Waits until Retrieve's implementation doesn't retrieve value other than value stored by initialization in retriever.

After retrieving, new value will be associated with given Retriever.

Note that Retriever needs to be initialized first by one of methods RetrievedValueHolder.initializeValue() or RetrievedValueHolder.setValue(Object) .

Type Parameters:
T - type of value what we are waiting for change
Parameters:
retriever - implementation of retrieving actual value

waitForChangeAndReturn

<T> T waitForChangeAndReturn(T oldValue,
                             JavaScriptRetriever<T> retriever)
Waits until Retrieve's implementation doesn't retrieve value other than oldValue and this new value returns.

Type Parameters:
T - type of value what we are waiting for change
Parameters:
oldValue - value that we are waiting for change
retriever - implementation of retrieving actual value
Returns:
new retrieved value

waitForChangeAndReturn

<T> T waitForChangeAndReturn(JavaScriptRetriever<T> retriever)

Waits until Retrieve's implementation doesn't retrieve value other than value stored by initialization in retriever.

After retrieving, new value will be associated with given Retriever.

Note that Retriever needs to be initialized first by one of methods RetrievedValueHolder.initializeValue() or RetrievedValueHolder.setValue(Object) .

Type Parameters:
T - type of value what we are waiting for change
Parameters:
retriever - implementation of retrieving actual value
Returns:
new retrieved value

Graphene Implementation 1.0.0.CR3

Copyright © 2012 JBoss by Red Hat. All Rights Reserved.